从对话中删除一个完整闭合的轮次而不动 Session:动作出现在每个最终助手回复旁
Delete one complete closed turn from a DeepSeek Harness conversation without deleting or replacing the Session. The action appears beside the final assistant response for each…
安装
dsh plugin --profile web add github:hanshenmesen/dsh-turn-deleteGitHub 源码安装:首次需按提示配置 allowBuilds 构建授权后重试
安装与环境配置指引、插件开发教程见 DSH 中文社区文档 ↗
安装即在你的机器上以你的权限运行第三方代码——它可读写文件、使用凭据、访问网络,DSH 的工具审批不会为插件代码加沙箱。「检测到 manifest」仅代表发现 dsh.bundle / dsh.plugin 清单,不构成兼容性或安全审查;安装前请审阅源码,不熟悉的插件先在不含密钥的环境试用。
README
English | 中文
从 DeepSeek Harness 对话中删除一个完整且已经结束的 Turn(轮次),不删除或替换整个 Session。每个已完成的顶层轮次,其最后一条助手回复旁会出现删除按钮。
演示
确认后删除中间轮次,同时保留原 Session 与后续轮次。本演示通过 DeepSeek Harness 0.1.0-rc.7 的真实 DeepSeek 模型流程录制。

安装
从 npm 安装(推荐):
dsh plugin --profile web add dsh-turn-delete
从 GitHub 安装:
dsh plugin --profile web add github:hanshenmesen/dsh-turn-delete
从预构建的 GitHub Release 安装:
dsh plugin --profile web add https://github.com/hanshenmesen/dsh-turn-delete/releases/latest/download/dsh-turn-delete.tgz
安装后重启 dsh web。卸载命令:
dsh plugin --profile web remove dsh-turn-delete
行为
- 删除按钮只出现在普通 Session 已完成的轮次上,Subagent 对话不会显示。
- 删除前必须确认;Session 正在运行时不能删除。
- 所选轮次的提问、助手消息与工具记录会从 Session 当前的模型上下文中移除。
- Session id、标题、工作区关联、后续轮次和原始 append-only 事件日志保持不变。
- 删除由一个持久的零内容替换事件记录;刷新页面或重启 profile 后仍然生效。
- 重复提交同一次删除是幂等的。
目标轮次尚未结束,或已与其他历史一起合并进 compaction 替换节点时,插件会拒绝删除,避免只删除模型可见上下文的一部分。
设计
Host 端注册 POST /dsh-turn-delete,取得目标 Agent 的维护租约,验证完整闭合轮次对应的 surface 区间,追加零内容替换事件,并在 sessions.flush() 完成后才返回成功。
浏览器端使用公开的 conversation.chat.assistant-actions 与 conversation.chat.turnTail slot。Conversation definition 将持久 tombstone 投影到目标 Turn。DeepSeek Harness 目前还没有公开完整 Turn 的可见性扩展点,因此 tail contribution 会对相邻 Turn tail 之间的 Chat 行应用一个范围受限的呈现兼容层;模型上下文删除本身不依赖这个兼容层。
兼容性
- DeepSeek Harness
0.1.0-rc.6与0.1.0-rc.7 - Node.js 22.19 或更高版本
- Web profile 与基于 Web 的桌面套壳
DeepSeek Harness 仍处于 developer preview。升级 Harness 后,建议新建一个含三个短轮次的临时 Session,并删除中间轮次完成一次验证。
开发
npm install
npm run check
dsh plugin --profile web add -w link:/absolute/path/to/dsh-turn-delete
npm run check 会检查类型、构建 Host/Browser 两部分、运行单元与 UI 测试,并校验 npm 包内容。
安全
与所有 DSH 插件一样,本包拥有 Harness 进程的权限。安装第三方插件前应检查源码。删除会改变后续模型上下文,但为了审计与回放会保留原始 append-only 事件。
许可证
MIT
原始 README: https://github.com/hanshenmesen/dsh-turn-delete/blob/main/README.zh.md ↗
同类插件
查看全部 →
archify
Agent 技能:生成美观、可校验的架构图、工作流图、时序图、数据流图与生命周期图——自包含 HTML、带动画与清晰导出

dsh-turn-rewind
对话回退:基于持久 Change Ledger 回滚会话与工作区状态。

dsh-plugin-cc
把 DeepSeek Harness 接入 Claude Code:评审、批评、委派与会话导入

dsh-interconnect
跨实例互联:经 interconnect 服务在多个 DSH 实例间转发消息与事件。

dsh-chat-import
把 13 家 coding agent(Claude Code、Codex、ChatGPT、Cursor、Gemini、opencode 等)的完整对话历史导入为可续聊的 DeepSeek Harness 会话,并支持反向导出回 Claude Code。

dsh-crew
DSH 插件:从 Claude Code / Codex 向 DSH agent 派活——原生 subagent 进度、宿主内 worker 会话(分级预设),以及为纯文本宿主补上视觉与图像生成的多模态桥