DSH Plugins Marketplace

DSH Plugins

Plugins

/

Sessions & Messages

/

dsh-archive-workbench

d

dsh-archive-workbench

Manifest valid

Adds a Delete session item to the sidebar session row menu that permanently removes the session log directory, projection cache and archive/pin membership and drops its row from the sidebar, plus an a

UI (client)hasBundlePatch

dsh-archive-workbench

归档工作台 — DeepSeek Harness 的会话删除 + 归档管理插件。

中文 | English

DeepSeek Harness 官方只能归档会话(隐藏,不删盘),也没有一个方便的地方查看已归档的会话。这个插件补上这两块:

  1. 永久删除会话 —— 侧边栏会话行的「...」菜单里多一项「删除会话」,真正删掉磁盘上的日志,而不是只隐藏。
  2. 归档会话面板 —— 侧边栏底部多一个归档图标,点开是一整页已归档会话列表,每行可恢复归档或删除。

截图

归档会话面板 —— 侧边栏的「已归档会话」,每行可恢复归档或删除:

归档会话面板

删除确认弹窗 —— 从会话菜单或面板删除时都会弹出:

删除确认弹窗


功能

1. 会话菜单:删除会话

在任一会话行的「...」菜单最下方(复制 Session ID 之后,带分隔线):

置顶 → 重命名 → 分叉 → 归档 → 复制 Session ID → 删除会话

点击后弹出确认框,确认即永久删除:

  • 删除该会话自己的日志目录(~/.dsh/sessions/<项目>/<会话ID>/)
  • 清理它的投影缓存(~/.dsh/storages/session_projcache/sessions/<会话ID>.json)
  • 把该 id 从归档/置顶集合里移除(避免重启后出现"幽灵行")
  • 通知前端立即移除该行(无需刷新页面)

已归档的会话同样支持 —— 菜单项不区分状态。

2. 归档会话面板

侧边栏底部图标栏(与「插件」「定时」并排)多一个归档图标,点开后在主区域显示整页列表:

已归档会话  2
归档的会话会显示在这里,可随时恢复或删除。

┌─────────────────────────────────────────────────────────┐
│ 会话标题                              [恢复归档] [删除]   │
│ session-cf676d08-1890-427e-aa64-34a910d31600            │
└─────────────────────────────────────────────────────────┘
  • 每行显示标题 + 原始会话 ID(取不到标题时显示「未命名」)
  • 恢复归档:调官方 unarchiveSession,该行立即消失,会话回到原工作区位置
  • 删除:复用同一个确认框,永久删除
  • 顺序:最近归档的在最上
  • 空状态:「暂无已归档会话」

顺便说明:官方其实也有查看归档会话的入口(侧边栏顶部「视图选项」→ 全部对话(显示已归档)),但入口较深,且那里没有恢复/删除按钮 —— 恢复还得回到会话行的「...」菜单。本面板把这两件事集中到一个地方。


安装

方式一:插件市场(推荐)

在 DeepSeek Harness 里打开 设置 → 插件,搜索 dsh-archive-workbench。

方式二:命令行

dsh plugin add dsh-archive-workbench

方式三:从 GitHub 直接安装

dsh plugin add https://github.com/CHYMZXS/dsh-archive-workbench

方式四:本地开发目录

dsh plugin add /path/to/dsh-archive-workbench

安装后重启一次 DeepSeek Harness(插件含 Host 端代码,首次安装需要重启生效)。


已知限制

正在运行的会话(重要)

DeepSeek Harness 没有任何公开 API 能让一个会话从内存中退出。因此对于本次运行中打开过、还驻留在内存里的会话,删除文件不够 —— 它可能立刻把日志重新写回来。

插件的处理方式是:

  1. 先调用官方 archiveSession({ stopActivity: true }),停掉它正在跑的工作并封住后续写入
  2. 等它空闲(最多 8 秒)
  3. 再删文件
  4. 删完反复复查(最多 6 次)确认文件没有重新出现

如果文件仍然被重建,插件会明确报错(而不是假装成功):

the session is still resident in this application and keeps recreating its log; restart the application and delete it again

建议:如果要删的是"当前正在用/刚用过"的会话,先重启一次应用再删 —— 重启后它变成冷会话,删除是干净的。

附件不会被删除

~/.dsh/attachments/ 里的图片/附件不会被删除。它们按内容哈希全局共享,多个会话可能引用同一个对象 —— 按会话去删会破坏其他会话。

子智能体会话

子智能体(subagent)产生的会话不会出现在侧边栏,因此无法从 UI 删除。这是官方行为。


工作原理

插件完全建立在官方扩展点上,不修改官方任何一行代码:

部分用到的官方扩展点
删除菜单项sidebar.workspaces.session.menu.item 槽位(官方为插件预留,order 500)
确认弹窗shell.overlay 槽位 + 官方 Modal / Button 组件
归档面板图标sidebar.panellist 槽位(order 20)
归档面板页面main 键值槽位(key = dsh-archive-workbench-archived)
删除动作Host 端 ctx.webServer.register() 注册私有路由;客户端 fetch 调用
前端移除行发官方 api-session/removed 事件(在官方转发白名单内)
恢复归档官方 uiWorkspace.unarchiveSession()
清理投影缓存官方 storageDomain 的 table.delete()

删除逻辑在 Host 端(index.js),UI 在客户端(client.js),通过一条私有 HTTP 路由通信。


开发

git clone https://github.com/CHYMZXS/dsh-archive-workbench
cd dsh-archive-workbench
dsh plugin add .

改完 client.js 会自动热重载;改 index.js(Host 端)需要重启应用。


License

MIT

Comments

Loading…

Similar plugins

dsh-session-purge

Adds a permanent-delete row to the sidebar menu of archived sessions, removing the session log, its projection cache and its workspace registration.

Sessions & MessagesManifest valid

★ 0

dsh plugin --profile web add dsh-session-purge

by 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

Sessions & MessagesManifest valid

★ 0

MIT

JavaScript

Oct 16, 2026

dsh plugin --profile web add @mcf171/dsh-session-delete

by Yicijiuhaobala

Adds a "Delete session" item to the DSH session-row context menu (next to rename/fork/archive) — permanently removes session logs from disk, with live-session protection.

Sessions & MessagesManifest valid

★ 0

MIT

JavaScript

Aug 24, 2026

dsh plugin --profile web add dsh-session-delete

Session management for DSH: archive or delete one session, archive/delete all sessions in a workspace, and restore archived sessions from the settings page — archiving backs up workspace metadata and

Sessions & MessagesManifest valid

★ 0

↓ 283/wk

dsh plugin --profile web add dsh-session-delete

by Baboo-ming

Permanently delete a DSH session from the sidebar session row menu (danger-styled) with a confirm modal and a seven-stage, independently-degrading deletion pipeline (validate → running guard → workspace ledger → archive set → on-disk logs → in-memory drop → broadcast).

Terminal & ClientsSessions & MessagesManifest valid

★ 3

↓ 281/wk

MIT

JavaScript

Oct 17, 2026

dsh plugin --profile web add dsh-session-delete

by joyboy-yy

Keeps archived sessions out of the DSH conversation list and adds a panel to restore them or delete them permanently - session log, archive and pin records, and projection cache.

Sessions & MessagesManifest valid

★ 0

MIT

JavaScript

Oct 16, 2026

dsh plugin --profile web add dsh-archive-purge