Skip to content

v1.0.0 — 侧栏「删除会话」

Choose a tag to compare

@PanChengN PanChengN released this 26 Sep 02:37
· 2 commits to main since this release

给 DeepSeek Harness Web UI 的侧栏会话菜单补上缺失的「删除会话」,并真正从磁盘移除会话。

功能

  • 侧栏会话右键菜单新增 「删除会话」(注册到 sidebar.workspaces.session.menu.item,order 500)
  • 主机端点 POST /api/dsh-session-delete,一次清理四处:
    1. sessions/<工作区>/<session-id>/ 会话正文与写锁
    2. storages/session_projcache/sessions/<id>.json 派生缓存
    3. storages/workspace.json 的 archivedSessionIds 与各工作区 sessionIds 引用
    4. zstd 可用时连带删除 header.parentSession 指向它的子智能体会话
  • 删除后主机发 api-session/removed,客户端把该 id 移出列表快照,侧栏那一行立刻消失,不做整页刷新
  • session-<uuid> 与裸 <uuid> 两种 id 落盘形式都识别
  • 中英文插件卡片文案(locale/{zh,en}.json)+ 图标

安装

git clone https://github.com/PanChengN/dsh-plugin-session-delete.git

侧栏 Plugins → Add plugin 粘贴 clone 后的绝对路径 → Enable now → 重启 DeepSeek Harness。
桌面版必须走 GUI:CLI 会以 profile "desktop" is managed exclusively by the Electron application 拒绝。

已知限制

  • 确认框使用浏览器原生 confirm(),样式不是 DSH 风格
  • 未硬性拦截删除「当前进行中的会话」,仅确认框内提示
  • 主机内存里的工作区成员关系需重启后彻底清理(界面表现不受影响)

说明

非官方社区插件,与 DeepSeek 官方无关。MIT 许可。

首次发布:插件源码 + MIT 许可 + 完整 README(含接口签名与返回体)。