MeowLynxSea/dsh-cot-summerization ↗★ 3
dsh-cot-summerization
DeepSeek Harness plugin: hide the raw chain of thought and show a summarized chain of thought produced by a small model (any Chat Completions-compatible API). 适合希望简化界面、只看精简版思维链而不影响模型推理的Web用户。
Install
$
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:MeowLynxSea/dsh-cot-summerizationREADME
Read the full README ↗⚙️ 配置(Web Client → Settings → cot-summarizer)
| 字段 | 默认值 | 说明 |
|---|---|---|
enabled | true | 总开关,一键回到坦诚世界 |
preserveRawForModel | true | 在模型可见历史中恢复原始思维链(model-only surface 替换事件),Agent Loop 多轮推理不受摘要影响;仅 UI 显示摘要 |
provider | "" | 走 DSH 自身 LLM 通道的提供方路由;留空跟随当前请求的提供方 |
model | "" | 走 DSH 自身 LLM 通道的模型;留空跟随当前请求的模型,填写可选用其他模型 |
systemPrompt | 内置 | 重写提示词,支持 {maxSummaryChars} 占位符;防注入安全规则始终追加在最后 |
language | "中文" | 强制缩略思维链语言;留空则跟随原始思维链 |
style | native | native / none / concise / descriptive / wenyan / custom;默认 native 以第一人称“正在思考”的口吻输出,看起来像原生思维链而不是总结 |
customStyle | "" | style: custom 时的自由文本风格 |
minReasoningChars | 32 | 短于此长度的思维链原文放行,不值得一次 API |
maxSummaryChars | 50 | 摘要长度上限 |
timeoutMs | 30000 | 改写员超时;开启 streamReasoningBlock 时,同时也是回复被停住等待收尾段摘要的最长时间 |
onError | hide | hide 显示占位符 / pass-through 情急之下全裸放行 / drop 悄无声息(什么都不显示) |
incremental | true | 流式分段摘要(近实时) |
chunkChars | 500 | 每段积累的原始字符数 |
chunkIntervalMs | 8000 | 慢流下两次摘要的最大间隔 |
adaptiveChunk | true | 根据实时流速率与总结器 RTT 动态调整分块大小 |
minChunkChars | 64 | 自适应分块下限(字符) |
maxChunkChars | 2000 | 自适应分块上限(字符) |
chunkSafetyFactor | 2 | 一个分块约覆盖多少个总结器 RTT 的流式文本 |
streamReasoningBlock | true | 总结器较慢时,Think 行也始终落在回复正文/工具调用上方(见下) |
行为细节(严肃模式)
- 无 reasoning 的流(非思考模型)原样通过,插件不作任何干预。
- 每次分段摘要只处理新到达的段落,之前的摘要与最近一段原始推理会作为上下文传入以保持连贯、消解指代,但不重复输出。
- 防注入:原始推理(以及上下文、前序摘要)先做 XML 转义再放入
//数据区,无法用 `` 逃逸;系统提示词末尾强制追加最高优先级安全规则(即使自定义systemPrompt),原生第一人称风格同样不能把推理内容当成指令。 - 结构化输出:改写员必须输出
{"summary":"..."}JSON;插件按 schema 解析,不符合 schema 的杂讯(如 `