Write Block
- from @localmode
- by LocalMode
A draft editor with live length feedback, preset and free-text edit instructions with prompt improvement, and an AI edit reviewed as a before/after diff with explicit Accept/Reject (Accept applies exactly the after text). Resolves the Chrome Prompt API when available (zero download) and automatically falls back to a Llama-3.2-1B Transformers.js instruct model behind an explicit download gate, with a truthful provider badge. No model bytes download until an explicit in-block action.
Install
New to shadcn? Set up your project
If your project already has a shadcn components.json, skip initialization. Otherwise, run this once from your project root.
pnpm dlx shadcn@latest initpnpm dlx shadcn@latest add @localmode/ui/blocks/writing-tools/writeRegistry dependencies8
- @localmode/ui/artifacts/code-diff-viewer
- @localmode/ui/input-controls/char-limit-indicator
- @localmode/ui/input-controls/prompt-enhance-button
- @localmode/ui/lib/utils
- @localmode/ui/local-first/capability-gate
- @localmode/ui/local-first/chrome-ai-download-gate
- @localmode/ui/local-first/provider-badge
- @localmode/ui/results/error-alert
