DSH Plugins Marketplace

DSH Plugins

Plugins

/

Sessions & Messages

/

dsh-session-delete

t

dsh-session-delete

Manifest valid

Adds a "Delete" item to the sidebar session menu with a confirmation dialog, then hard-deletes the session.

UI (client)hasBundlePatch

dsh-session-delete

在 DSH Web 侧边栏「会话列表」中,给每个会话的三点下拉菜单底部新增一个 「删除」 按钮,点击后弹出二次确认对话框,确认后硬删除该会话(内存会话 + 磁盘持久化数据一并移除)。

功能

  • 会话三点菜单底部新增「删除」项(危险样式,红色)。
  • 点击「删除」→ 弹窗确认「此操作会永久删除该会话,无法恢复」。
  • 确认后调用 host 端点硬删除:
    1. dispose 内存中的 live 会话(触发 session/disposed → host/session-removed,所有客户端列表即时移除);
    2. 删除磁盘上的持久化 jsonl 会话目录,确保重启后不再出现。
  • 删除成功/失败有轻量 toast 提示。

安装(注册到 web profile)

  1. 把本目录放到任意插件目录,例如: E:\桌面\dshGUI_install\plugins\dsh-session-delete
  2. 编辑 C:\Users\<用户>\.dsh\profiles\web\package.json:
    • 在 dependencies 增加:
      "dsh-session-delete": "link:E:/桌面/dshGUI_install/plugins/dsh-session-delete"
      
    • 在 dsh.profile.bundles 数组加入:"dsh-session-delete"
  3. 在 C:\Users\<用户>\.dsh\profiles\web 下执行:
    pnpm install
    
  4. 重启 DSH Web GUI(dsh web),刷新浏览器。

说明与限制

  • 客户端用 DOM 注入:监听 [role="menu"] 会话菜单出现,克隆现有菜单项样式并追加「删除」。菜单类名是哈希的,因此采用“克隆现有项”而非硬编码类名,具备一定的版本韧性。
  • 会话 id 通过 React fiber(__reactFiber$… 链上的 memoizedProps.node.id)读取,不依赖 DOM data 属性。
  • host 端点 /plugins/dsh-session-delete/delete 仅允许本机回环地址访问,并校验 Origin,防止跨站调用。
  • 依赖 DSH 内部会话存储(ctx.sessions.store)与持久化服务(ctx.sessionPersistence)。若 DSH 后续升级改变这些内部结构,可能需要相应适配。
  • 「删除」是硬删除,不可恢复,请谨慎使用。

开发 / 验证

本地改完 client.js 后无需重启 GUI(host 端 index.js 不变时),浏览器硬刷新(Ctrl+Shift+R)即加载新版。

端到端验证用 verify/ 下的 CDP 脚本:

# 用 --remote-debugging-port=9222 启动 Chrome 并打开 GUI,然后:
npm run verify

提交到 awesome-dsh-plugin

本插件符合 awesome-dsh-plugin 收录要求:仓库 package.json 声明了 dsh.bundle manifest,cordis.patch.yml 提供了 loader 注入项,且为真实可用代码。

Compatibility

DSH 0.1.6-alpha.2: failedDSH 0.2.0-rc.2: failedDSH 0.2.1-alpha.4: failed

Versions

Latest versionPublishedSize
0.1.0——

Comments

Loading…

Similar plugins

dsh-delete-sessions

A plugin for DeepSeek Harness (DSH) that adds a permanent "Delete session" action to the sidebar session menu

Sessions & MessagesManifest valid

★ 0

Apache-2.0

JavaScript

dsh plugin --profile web add dsh-delete-sessions

A DeepSeek Harness Web plugin for quickly and thoroughly deleting sessions. 快速彻底删除会话的 DeepSeek Harness Web 插件。

Sessions & MessagesManifest valid

★ 0

MIT

JavaScript

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

by ljp888

Adds a Delete session action to the sidebar session menu that permanently deletes the local records of that session, while refusing sessions that are running.

Sessions & MessagesManifest valid

★ 0

MIT

JavaScript

Oct 12, 2026

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

by shuiqian520

DSH plugin: permanently delete a session from the sidebar menu, and retry a user message or an assistant reply.

Sessions & MessagesManifest valid

★ 3

↓ 466/wk

MIT

JavaScript

Oct 17, 2026

dsh plugin --profile web add 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

by DDDMUC

Delete sessions from the DSH Web sidebar: adds a Delete action to the session row menu with a risk-consent dialog, then removes the session log, workspace accounting and live session state.

Terminal & ClientsManifest valid

★ 18

↓ 229/wk

MIT

JavaScript

Oct 28, 2026

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