D
@wasd258/dsh-context-surgery
v0.1.2 · 3 天前发布
Surgical rewriting of the model-visible conversation history of a DSH session (surface replacement); edit reply and reasoning chain separately. 上下文手术刀:强制改写会话的模型可见历史,回复与思考链分开编辑。
README
dsh-context-surgery
English | 中文
强制改写 DSH 会话的模型可见历史(surface 替换)。剧情扮演 AI 跑偏(OOC)时把回复改成没跑偏的
版本、retcon 整场戏、修正措辞——模型下一轮请求读到的就是改后的历史,仿佛从未发生过。
回复正文与思考链(reasoning)分开编辑。
社区插件——非 DeepSeek 官方组件,不代表 DeepSeek 背书。
功能
conversation.chat.assistant-actions,order 20):✏️ 改回复、💡 改思考链、🗑️ 删除。💡 仅在消息确实带 reasoning 块时出现。
part=reply 只改 text 块(保留思考链与工具调用);part=thinking只改 reasoning 块(留空 = 全部移除);
part=all 整条重写为纯文本。/context 命令全家桶——list / edit / think / clear-think / rewrite / delete / replace,聊天输入框即可完成一切操作。
context_list / context_edit / context_delete / context_replace,把同样的能力交给 agent 本身(可用于自我纠错循环)。
/api/dsh-context-surgery 下的 GET /list、GET /message、版本兼容矩阵
| DSH 版本 | 状态 | 说明 |
|---|---|---|
dsh@0.1.0-rc.6 | ✅ 兼容 | cordis patch ✅ |
dsh@0.1.0 | ✅ 兼容 | 标准 patch ✅ |
dsh@0.2.0 | ⚠️ 待验证 | 待实测(API 可能在变) |
dsh@0.3.0+ | ❓ 未知 | 尚未发布 |
💡 兼容矩阵每周末自动跑实测,欢迎 PR 修正
元数据
- License
- MIT
- npm
- @wasd258/dsh-context-surgery
- Repo
- git+https://github.com/WASD258-jpg/dsh-context-surgery.git
- Engines
{"node":">=22.19.0"}- Weekly DL
- 0
- Monthly DL
- 0
- dsh.bundle
{"client":{"platform":"web","inject":["@deepseek-ai/dsh-client-runtime","@deepseek-ai/dsh-client-ui-slots","@deepseek-ai/dsh-client-ui-conversation"],"immediately":true}}