Reads local .txt novels in the right sidebar, with encoding detection, chapter splitting, full-text search, reading progress, bookmarks, and a boss key that hides the reader or the whole right sidebar in one keystroke.
Install
# from GitHub (first run asks for allowBuilds approval — follow the hint, retry)
dsh plugin --profile web add github:XIAOZHAOXSXH/dsh-moyu-reader
Any plugin you install runs third-party code with your own permissions — it can read your files, use your credentials, and reach the network, and tool approvals don’t sandbox it. GitHub-sourced plugins also run build scripts at install time — pnpm blocks those until you allow them, so an install can stop with ERR_PNPM_GIT_DEP_PREPARE_NOT_ALLOWED or ERR_PNPM_IGNORED_BUILDS; dsh prints the exact key to add under allowBuilds in your profile’s pnpm-workspace.yaml, and the install works on the next run. Allowing a build is a trust decision: only install sources you trust, and pin a commit (github:owner/repo#sha).
README
Read local .txt novels in the DSH web UI's right sidebar — with a boss key.
Features
- A reader in the right sidebar. It opens as a tab beside the conversation rather than as a modal, so a glance never costs you your place.
- One-key hide (boss key). Defaults to Ctrl+
</kbd> (<kbd>⌘</kbd>+<kbd>on macOS). Configure it to collapse only the reader, or the whole right sidebar with it. - Three launchers. A button in the left sidebar footer, one in the session header, and a floating ball in the bottom-right corner. Each can be turned off independently.
- Shelf. Browse local directories, with text files filtered out of the noise and recently opened books remembered.
- Automatic chapter splitting. Recognizes
第一章,第 1 章,Chapter 1, and similar headings; falls back to fixed-size chunks when a file has none. - Chinese encoding detection. UTF-8, UTF-8 with BOM, UTF-16 LE/BE, GB18030/GBK, and Big5 — including the hard case of a GBK file that is 99% ASCII and therefore looks like valid UTF-8.
- Search, bookmarks, reading progress. Full-text search with snippets; reopening a book returns you to where you stopped.
- Adjustable typography. Font size, line height, family (serif / sans / kai), theme (follow DSH / sepia / dark / light), first-line indent, justification.
- Wired into DSH settings. Every option lives in the plugin's card under
Settings → Plugins, takes effect immediately, and persists to
settings.yaml.
Install
dsh plugin --profile web add dsh-moyu-reader
Then restart the profile. The package declares its own bundle patch, so the
plugin row is mounted for you — do not also add a manual insert row to the
profile's cordis.patch.yml, or it will mount twice.
Usage
Open the reader from any of the three launchers, or pick the 小说阅读器 tab in the right sidebar. Press the boss key to hide it.
Settings
| Key | Default | Meaning |
|---|---|---|
enabled |
true |
Master switch. Off hides every launcher, tab and the boss key. |
hotkey |
`mod+`` | Boss key. mod is Ctrl on Windows/Linux and ⌘ on macOS. |
hotkeyHidesSidebar |
true |
Also collapse the whole right sidebar, not just the reader. |
launcherFooter |
true |
Show the launcher in the left sidebar footer. |
launcherHeader |
true |
Show the launcher in the session header. |
floatingBall |
false |
Show the floating ball in the bottom-right corner. |
defaultDir |
(working directory) | Directory the shelf opens in. |
theme |
auto |
auto / sepia / dark / light. |
fontSize |
17 |
Reader font size in px (12–30). |
lineHeight |
1.95 |
Line height (1.3–2.8). |
family |
serif |
serif / sans / kai. |
indent |
true |
Indent the first line of each paragraph. |
justify |
true |
Justify body text. |
maxBookBytes |
100663296 |
Largest file the host will read, in bytes. |
fallbackChunkChars |
6000 |
Chunk size used when a file has no chapter headings. |
Turning the plugin off does not delete your saved reading state.
How it works
Two halves, as a DSH plugin requires:
- Host (
lib/index.js) reads files through thefsservice and serves a small JSON bridge overwebServeratPOST /dsh-moyu-reader/api. The route is exact-match, rejects a mismatchedOrigin, and caps request bodies at 1 MiB. It holds the book cache and the process-local reading state. - Client (
client/client.js) is a browser module — a plain lazy-CJS factory registered onwindow.__ModuleLoader__, no bundler involved. It renders into six slots and binds thedsh-moyu-readersettings namespace so the settings card and the reader's own settings tab write through the same scope.
Both halves talk only through the bridge route; nothing else crosses.
Known limitations
- Reading state (recent books, progress, bookmarks) is process-local. It survives closing the reader but not restarting DSH. Only configuration is persisted. Moving it to the storage domain is the obvious follow-up.
- The reader is read-only: it will not write to your files.
- Chapter detection is heuristic. Unusual heading styles may fall back to fixed-size chunks.
Development
npm install
npm run build # emit client/client.js from src/client.js
npm test # 45 host checks + 67 client checks
npm run watch # rebuild the client bundle on change
src/client.js is the source of truth for the client half; client/client.js
is generated and should not be edited by hand. The test suites mount the real
shipped code — the host suite drives the bridge route against a stand-in fs
service, and the client suite renders the bundle with React, drives its
controls, and fires the boss key at a fake document.
License
MIT
Links
More in this category
PC2005-cloud/dsh-pet#dsh-pet★ 6767
Desktop pet for the DSH Web UI on Windows, macOS and Linux: 106 transparent animations in the browser overlay or a transparent always-on-top desktop window, throw-and-bounce drag physics with squash and particle scoring, a work-status bubble driven by live session events, self-talk and chat with persistent memory, balance display, meme-image bubbles, multiple pets on screen, and drop-in custom animations and pet packs.
flizzywine/dsh-tavern#dsh-tavern★ 1777
An agent-powered tavern for DeepSeek Harness with SillyTavern compatibility, character card imports, support for multiple models, and mobile play. Install the tavern from Settings → Tavern Launcher on desktop. A launcher derived from 2NF/dsh-profile-bridge (MIT): it downloads the tavern into a separate DSH profile and switches profiles on restart. Install this launcher or the upstream plugin, not both — they claim the same /profile-bridge channel.
Alterssss/dsh-bili-whale★ 1136
A Bilibili companion that keeps its own schedule. A 60-second tick in the plugin host wakes a dedicated agent session at a random moment inside the configured time windows (opting out of a day is a configurable chance), then hands it a bundled CLI of 38 subcommands — feed, subtitles, danmaku, comments, ffmpeg frame grabs, and two diaries. Shares at most N items a day by commenting on them and @-mentioning the owner (default 3, enforced from a written quota log, and it stops on rate-limit or captcha signals). Also polls comment replies, direct messages and live-room danmaku; replies to anyone but the owner are queued for approval in Settings. Settings → 养鱼 writes ~/.dsh/bili-whale.config.json; cookies live separately in ~/.bili-ai/credentials.json and are never echoed back. The HTTP routes are loopback-only behind DSH's trust fence. Needs Node 18+ and ffmpeg on PATH for frame extraction.
Nagi-ovo/dsh-ads★ 736
Parody ads in 2005-Chinese-web style: sidebar banners, in-chat feeds, corner popups, and a close button whose hit area is smaller than it looks. All fictional.
yyh-001/dsh-meme★ 607
Chat meme stickers: text-only send, mood auto-send, QQ/WeChat-style picker, auto-learn, custom packs.
vlln/whale-girl★ 418
Desktop pet (QQ-pet style): floats in the corner, draggable, feedable, playable.
Community comments
Comments are public GitHub Discussions. Loading them connects to GitHub and Giscus; a GitHub account is required to post.