dsh-session-delete
Manifest validDeepSeek Harness Plugin: Sidebar Session Menu "Delete Session" (Permanently Delete, Not Archive)
dsh-delete-sessions
给 DeepSeek Harness 增加真正的 「删除会话」:从侧栏每个会话的「…」菜单永久删除它,而不是只能「归档」。
为什么需要这个插件
DSH 内建的「归档」(archive)只做一件事:把会话 id 加进 archivedSessionIds 集合,把它从分组界面里藏起来。它从不删除磁盘文件——会话日志(~/.dsh/sessions/<project>/<id>/session.v4.jsonl.zstd)和投影缓存(~/.dsh/storages/session_projcache/sessions/<id>.json)会一直留在硬盘上。
本插件补上缺失的「删除」:停止该会话正在跑的工作 → 摘除归档/置顶/工作区记账 → 删除投影缓存 → 删除日志目录 → 广播移除事件让界面立即刷新。
安装
方式一:作为 bundle 安装(推荐)
dsh plugin --profile desktop add dsh-delete-sessions
cordis.patch.yml 会自动插入一行,加载插件。
方式二:手动安装
- 把本目录复制到 profile 的
node_modules/dsh-delete-sessions(或用link:依赖)。 - 在该 profile 自己的
cordis.patch.yml里加一行:
- insert:
- id: dsh-session-delete
name: 'dsh-delete-sessions'
注意:手动加行后不要再让
cordis.patch.yml(本目录里的那份)也被应用,否则同一插件会因 id 冲突重复加载。
- 重启 DeepSeek Harness。
使用
- 在侧栏任意会话上点「…」。
- 菜单里「归档会话」正下方会多出「删除会话」(带删除图标,风格与其余菜单项一致)。
- 点击后确认。删除后该行立即从列表消失。
行为细节
删除按固定顺序执行,任何一步失败都会整体报错,避免「界面里没了但磁盘还在」的半完成状态:
- 停活动 —— 触发
workspace/session-stop(与归档「停止并归档」同一条路径,agent.cancel),并短暂等待最后一次事件落盘。 - 摘除记账 ——
unarchiveSession+unpinSession+ 逐工作区detachSession(均幂等)。 - 删投影缓存 —— 走 storage-domain 的
session_projcache域(内存与磁盘同步);域未挂载时跳过(缓存是派生数据,下次冷读会重建)。 - 删日志目录 —— 优先用
sessionPersistence.locate()拿精确路径(session id 已被安全编码,无路径穿越风险),带重试处理 Windows 上反病毒/索引短暂占用。 - 广播移除 ——
api-session/removed已在 DSH 的转发白名单中,浏览器会立即移除该行。
安全
- 删除路由只接受回环来源的 POST,且 body 只承载一个
sessionId。 - session id 会先经
sessionPersistence.stat()校验真实存在,才继续删除。 locate()路径由 DSH 自身的encodeSegment编码,无路径穿越。
局限
- 若 profile 未挂载
session_projcache域或~/.dsh/sessions无法定位,投影缓存/日志目录可能残留(缓存下次冷读自动重建;日志需手动清理)。 - 删除不可撤销,请确认后再点。
License
MIT
Comments
Loading…
Similar plugins
by reverse-PAI
Permanently delete a DeepSeek Harness session: a sidebar session-row "..." menu item plus a hover button, a risk-consent dialog, and an authenticated Host route that removes the session log, its projection-cache row and its archive mark.
★ 1
MIT
JavaScript
Oct 19, 2026
dsh plugin --profile web add dsh-minimal-session-deleteby zenghang25
One-click session deletion for the DeepSeek Harness sidebar: permanently removes the session log, projection cache and its per-conversation artifact directory (.dsh-sessions/<session-id>/). · DSH 侧栏会话一键删除 + 每个对话独立产出目录
★ 1
MIT
JavaScript
Oct 18, 2026
dsh plugin --profile web add dsh-session-deleteA DeepSeek Harness Web plugin for quickly and thoroughly deleting sessions. 快速彻底删除会话的 DeepSeek Harness Web 插件。
★ 0
MIT
JavaScript
dsh plugin --profile web add @kagurazakayashi/dsh-delete-sessionby lxchapu
DSH(DeepSeek Harness)插件:把会话从磁盘上彻底删除。任意会话的「…」菜单里可删单条,侧边栏切到「仅显示已归档」时可一键删除全部已归档会话;两者都先弹二次确认,正在运行的会话会被拒绝删除。
★ 1
MIT
JavaScript
Oct 3, 2026
dsh plugin --profile web add @lxchapu/dsh-session-purgeby mcf171
Permanently delete a session from the session row menu — archives the id, removes the log directory and drops the row at once, with a Delete shortcut; built only on shipped extension points, and a ses
★ 0
MIT
JavaScript
Oct 16, 2026
dsh plugin --profile web add @mcf171/dsh-session-deleteby luckamuu
DeepSeek Harness 插件:提供删除已归档会话的入口(可以彻底删除不会在次出现)
★ 0
MIT
JavaScript
Oct 8, 2026
dsh plugin --profile web add @local/archived-sessions