Summarize Block
- from @localmode
- by LocalMode
Summarize a document with extractive and abstractive modes and short/medium/long length presets, rendered in a split pane with input/summary word counts, a compression-ratio badge and bar, and a reading-time-saved estimate. On the Transformers.js path abstractive is served by DistilBART and extractive by a real on-device sentence-extraction algorithm drawing sentences verbatim from the source; Chrome summary styles are offered only when the Chrome Summarizer API actually serves the block. Resolves Chrome Built-in AI when available and falls back automatically 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/summarizeRegistry dependencies7
- @localmode/ui/input-controls/copy-button
- @localmode/ui/input-controls/segmented-mode-picker
- @localmode/ui/input-controls/text-processing-panel
- @localmode/ui/lib/utils
- @localmode/ui/local-first/chrome-ai-download-gate
- @localmode/ui/local-first/provider-badge
- @localmode/ui/results/error-alert
