Smart Reader
Feed web articles into CodeBuddy without leaving the editor. Extracts clean, readable content and injects it as context for both Ask and Agent modes.
Quick start
Section titled “Quick start”CodeBuddy: Read URL- Paste URL.
- Article opens in a webview panel with two actions:
- Add to Chat — inject as context in your current conversation
- Summarize Article — AI-generated summary
Or paste a URL into the chat input — CodeBuddy detects it and offers to read the page.
Extraction pipeline
Section titled “Extraction pipeline”
graph TB
A[URL] --> B[axios fetch<br/>redirects + 30 s timeout]
B --> C[JSDOM parse<br/>virtual DOM from raw HTML]
C --> D[Mozilla Readability<br/>strips nav / ads / sidebars / scripts<br/>extracts title, author, excerpt, content]
D --> E[DOMPurify<br/>removes XSS vectors, unsafe tags/attrs]
E --> F[Clean article]
Same Readability algorithm that powers Firefox’s Reader View. Works well on blog posts, docs, Stack Overflow, READMEs, and article-style pages.
Context injection
Section titled “Context injection”Add to Chat injects the first 5000 chars into the conversation context:
- Ask mode — text prepended to the system prompt alongside
@-mentions. - Agent mode — text lives in the agent’s context window; the agent can reference it while reasoning + using tools.
Caching + history
Section titled “Caching + history”| Aspect | Value |
|---|---|
| Capacity | 100 articles |
| TTL | 24 hours |
| Eviction | LRU |
| Storage | In-memory (session-scoped) |
Browsing history: last 50 URLs. Access via the webview panel to re-read or re-inject.
Commands
Section titled “Commands”| Command | Effect |
|---|---|
CodeBuddy: Read URL | Open a URL in Smart Reader |
CodeBuddy: Add Article to Chat | Inject current article into the active conversation |
CodeBuddy: Summarize Article | Generate an AI summary |
What works well
Section titled “What works well”- Technical blog posts, tutorials
- Library / framework documentation
- Stack Overflow Q&A
- GitHub README + wiki
- News + long-form content
What doesn’t
Section titled “What doesn’t”- SPAs requiring JavaScript to render content
- Pages behind auth walls
- PDF or non-HTML content
- Pages with aggressive anti-scraping
For JS-heavy pages, use Browser Automation — it runs a full Chromium that can render client-side content.
Related
Section titled “Related”- News reader — for curated feeds instead of one-off URLs
- Browser automation — for JS-rendered pages