Novel Reader — read novels in VS Code's status barA quiet, stealthy novel reader for VS Code. Normally the status bar shows only a tiny symbol; show it and the status bar itself becomes one line of the book —
Quick start
FeaturesMaster switch
Stealth
Reading
Shelf
AI assistant (settings page)Ask it to find a book, download it as txt, or check whether a link is a table of contents. It decides which tool to use: web search (Bing / Baidu / Sogou), source search, fetch page, list shelf, add to shelf, download txt (confirmations are shown for shelf changes). Backends: VS Code built-in language models (no API key) or an OpenAI-compatible API. FeedbackThe settings page has a Feedback box (or run Novel: Feedback / Suggest a Feature): write a title and text, optionally attach anonymized diagnostics (extension and VS Code versions, OS, non-private settings — never book paths, titles or keys). Without a token it opens a prefilled GitHub issue in your browser; paste a GitHub token with Issues: read and write on this repository (stored in VS Code's SecretStorage) and the issue is created directly. Issues land at z-Zihan/vscode-novel-reader/issues with the Keyboard shortcuts
All shortcuts can be changed: Keyboard Shortcuts → search Settings (
|
| Setting | Default | Description |
|---|---|---|
enabled |
true |
Master switch |
iconText |
▯ |
Status bar symbol; empty = hidden completely |
iconClickable |
true |
Whether the icon is clickable |
hideStatusFocusRing |
true |
Neutralize VS Code's blue status bar focus outline (global theme override) |
textColor / opacity |
"" / 1 |
Color and opacity of the reading line |
charsPerPage |
40 |
Characters per page (fixed width of the line) |
idleSeconds |
5 |
Idle seconds before auto hide; 0 = never |
hideOnBlur |
true |
Hide when VS Code loses focus |
autoPageSeconds |
0 |
Auto page turn interval; 0 = off |
bossKeyCover / coverFile |
true / "" |
Switch to a work-looking file after the boss key |
bookPaths |
[] |
Shelf paths from settings |
sources |
[] |
Online book sources (JSON) |
windowTitle / disguise |
notes.txt / plain |
Reader window disguise |
fileStyle |
js |
Code file mode style: js / py / md / txt |
fontSize / lineHeight / fontFamily / pageWidth |
16 / 1.8 / "" / 720 |
Reader window typography |
theme / indent / autoScrollSpeed |
plain / true / 30 |
Reader window colors and scrolling |
ai.enabled / ai.backend / ai.model / ai.endpoint |
true / vscode / "" / "" |
AI assistant backend |
ai.searchUrl / ai.downloadDir |
"" / "" |
Web search template ({{q}}), download folder |
Online book sources
The extension knows no websites by itself; you tell it how to search, where the table of contents is and where the text is. Import rules from the settings page (Import source → paste JSON or pick a file) or edit novelReader.sources.
Many novel sites render in the browser or sign their requests — rules cannot scrape those. Such sites can still be added by URL if the table of contents page itself is static. Mind copyright when choosing sites.
{
"name": "Example",
"url": "https://example.com",
"charset": "utf-8",
"search": {
"url": "/search.php?keyword={{key}}&page={{page}}",
"method": "GET",
"list": ".result-item",
"fields": { "name": ".title@text", "author": ".author@text", "bookUrl": "a@href", "latest": ".latest@text" }
},
"toc": {
"list": "#list dd",
"fields": { "title": "a@text", "contentUrl": "a@href" },
"info": { "title": "#info h1@text", "author": "#info p@text##Author:\\s*(.*)##$1" }
},
"content": { "selector": "#content", "remove": [".ads"], "regex": "\\(To be continued.*?\\)" }
}
charset:utf-8(default) orgbk.search.url:{{key}}/{{page}};methodmay bePOSTwithbody. Omitsearchto allow add-by-URL only.- Field rules:
CSS selector@value##regex##replacement— value istext(default),html,textOwn, or an attribute such ashref; an empty selector (@href) means the item itself;##regex##replacementruns a global replace ($1allowed). toc.listmatches each chapter;content.selectoris the text container; optionalparagraphs,remove,regex.
Example: samples/书源示例.json.
Install
Download the vsix from Releases and run code --install-extension statusbar-novel-reader-x.y.z.vsix, or Install from VSIX in the Extensions view, then reload.
Development
npm install
npm run build # esbuild → dist/extension.js
npm test # unit tests (decoding, chapters, paging, source engine, downloads, stats)
npm run test:vscode # smoke test in the installed VS Code (local mock novel site, webview render acks)
npm run shot # CDP screenshots of the status bar item (diagnostics)
npx @vscode/vsce package
Structure: src/book.ts pure logic · src/sources.ts source engine · src/ai/ tools, agent, web search, download · src/statsModel.ts + src/statsPage.ts statistics · src/reader.ts status bar, shelf, bookmarks · src/window.ts reader window · src/settingsPage.ts settings page. Tools must also be declared in package.json (contributes.languageModelTools) — a unit test checks the manifest against src/ai/toolDefs.ts.
Publishing: create a publisher at the Marketplace, put its id into package.json, then npx @vscode/vsce publish (PAT) or push a v* tag to use the included GitHub Actions trusted-publishing workflow.
License
MIT