dsh-novel-reader
Read local txt novels through the chat dialog: pick a novel beside the model selector, one message reads one chapter, and progress is remembered.
Other repositories with this package name
Install
$
npx -p @deepseek-ai/dsh dsh plugin --profile web add https://github.com/ukkyo1/dsh-novel-reader/releases/download/v0.9.4/dsh-novel-reader-0.9.4.tgzREADME
Read the full README ↗使用示例
配置目录和小说别名
选择小说
阅读小说
配置(高级)
插件在 cordis.patch.yml(DSH 配置目录下的补丁层)里对应一行配置,可以调三个参数。改完后让插件重新加载(禁用/启用本插件,或重启 DSH)生效:
- id: novel-reader
name: dsh-novel-reader
config:
directory: "" # 小说目录;留空 = /novels(设置页可改)
chunkChars: 420 # 无章节标题时的切段字数(80 - 4000)
streamMode: instant # instant=瞬间;duration=整段固定秒数;speed=固定字/秒
streamSeconds: 4 # duration 模式的秒数(0.5 - 60)
streamCharsPerSecond: 200 # speed 模式的速度(字/秒,10 - 5000)
firstTokenDelayMs: 350 # 首字之前的停顿,毫秒(0 - 3000);instant 模式忽略
display: thinking # thinking = 正文放思考里、可见固定总结;answer = 正文就是可见回复
summaryTemplate: "" # 可见总结模板;留空用内置长报告,支持 {title} {percent} {offset} {total}
chapters: true # 自动识别章节,每条消息读一整章
numberedJump: true # 纯数字消息跳转到对应序号的章节
maxChapterChars: 0 # 单条回复最多输出多少章节字数;0 = 不限
sessionTitle: "" # 会话标题;留空用内置普通工作型标题池(不出现书名)
readingFontSize: 15 # 翻页正文字号(px)
readingLineHeight: 1.8 # 行距(倍)
readingLetterSpacing: 0 # 字间距(px)
readingParagraphSpacing: 0.8 # 段间距(行)
readingPageHeight: 440 # 每页正文区高度(px)
readingPagePadding: 18 # 页面内边距(px)
readingPageMaxWidth: 0 # 页面最大宽度(px,0=自适应)
readingFontFamily: "" # CSS font-family,留空继承
readingFlip: fast # 翻页效果:none / fast(140ms) / normal(280ms)
| 配置项 | 默认值 | 说明 |
|---|---|---|
directory | \novels(即 C:\Users\\.dsh\novels) | 小说目录。留空(推荐)时用默认目录,并允许在设置页随时修改;填绝对路径(或相对 DSH_HOME 的路径)则目录被配置固定,设置页不能改。 |
chunkChars | 420 | 没有识别到章节标题时,每次回复「一段」的字数基准。取值范围 80 - 4000。 |
streamMode | instant | 出字方式:instant 瞬间生成;duration 整条回复(正文+总结)用固定秒数出完;speed 按固定字/秒出。 |
streamSeconds | 4 | duration 模式的秒数(0.5 - 60)。 |
streamCharsPerSecond | 200 | speed 模式的速度(字/秒,10 - 5000)。 |
firstTokenDelayMs | 350 | 开始出字之前的停顿,模拟真实模型的「思考时间」。instant 模式会忽略它。取值范围 0 - 3000。 |
display | thinking | thinking:小说正文进「思考」折叠块,可见助手回复是固定总结;answer:小说正文直接作为可见回复。 |
summaryTemplate | 空(内置较长的结构化报告) | 仅在 display: thinking 时生效。自定义可见总结的 Markdown 文案,支持 {title} {percent} {offset} {total} 占位符;留空用内置长报告。 |
chapters | true | 自动识别章节标题、每条消息读一整章。设为 false 则退回按 chunkChars 切段。 |
numberedJump | true | 阅读模式下,用户只发一个数字时跳到对应序号的章节并直接读它。 |
maxChapterChars | 0 | 单条回复最多输出多少章节字数,用于防超长章节一次读太久;0 = 不限。被截断时下一次回复继续同一章。 |
sessionTitle | 空 | 阅读模式会话的标题。留空时从内置的普通工作型标题池(「内容整理」「继续处理」「分段梳理」等)按会话 id 稳定选一个,不会出现书名。 |
readingFontSize | 15 | 翻页正文的字号(px,12-40)。 |
readingLineHeight | 1.8 | 翻页正文的行距倍数(1.2-3)。 |
readingLetterSpacing | 0 | 字间距(px,0-8)。 |
readingParagraphSpacing | 0.8 | 段间距(以行高为单位,0-3)。 |
readingPageHeight | 440 | 每页正文区高度(px,240-1200)。翻页按这个高度切分。 |
readingPagePadding | 18 | 页面内边距(px,0-64)。 |
readingPageMaxWidth | 0 | 页面最大宽度(px,0 = 跟随正文宽度)。 |
readingFontFamily | 空 | CSS font-family,例如 "Noto Serif SC", serif;留空继承界面字体。 |
readingFlip | fast | 翻页效果:none 无动画直接切换、fast 140ms 快速覆盖、normal 280ms 标准覆盖。 |
关于按字数切段:只有没有识别到章节标题的书才会用这个模式。插件先取
chunkChars个字,然后尽量对齐到原文的自然段换行处收尾(最多再多看六成篇幅),所以实际一段大约是 420 到 670 字;找不到合适的换行时会按字数硬切。