DDDMUC/dsh-delete-session 预览 preview

DDDMUC/dsh-delete-session

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

Project Overview项目介绍

dsh-delete-session is a native plugin built exclusively for DeepSeek Harness (DSH) Web, packaging a single DSH-specific bundle that targets the sidebar session ... menu and adds a new "Delete session" item. The session id is read directly from the menu's React fiber (props.node.id), so the action always operates on the row you clicked and never switches the active conversation away. It is installed with dsh plugin --profile web add dsh-delete-session (or github:DDDMUC/dsh-delete-session) and activated after restarting dsh web; the package declares no DSH SDK dependency, instead resolving sessions, sessionPersistence, agents, workspaceRegistry, and webServer through the cordis context at call time.

The intended workflow starts by hovering a sidebar session row, opening the ... menu, and choosing "Delete session" at the bottom. On the very first delete a confirmation dialog appears showing the session title and id, and the confirm button only unlocks once the user ticks "I understand - delete permanently"; ticking "Don't ask again" in the same dialog turns later deletes into one-click operations, with a Shift-click forcing the dialog back temporarily. A separate "Select multiple" entry enters batch selection mode with a bottom action bar showing selected counts, executing deletes with optimistic hiding and a 6-way client concurrency, and cleanly auto-switching to a fresh session when the currently open conversation is the one being removed. It targets DSH Web users who want to prune archived conversations without digging through the deeper Settings pages.

Dependencies are zero at runtime: the host registers a single loopback-only route POST /dsh-delete-session/delete constrained by loopback socket, loopback Host header, and same-origin checks, while sessions still held open by DSH are refused with 409 instead of racing the active writer. Verified against DSH 0.1.5-rc.1 and 0.1.7-alpha.2, and on older builds missing those services the pipeline gracefully degrades to raw filesystem cleanup. Documented limits include permanent deletion with no trash bin, no undo, and a DOM-shim menu injection that may stop working if DSH restructures the row fiber (other features are unaffected); batch deletes keep workspace accounting serialized to avoid interleaved writes. License is MIT.

dsh-delete-session 是面向 DeepSeek Harness (DSH) Web 端的原生插件,仅打包 DSH 一种产物。它在侧边栏会话 ... 菜单里追加「删除会话」项,会话 ID 沿 React fiber 链从菜单节点读取,确保只删你点的那一行而不会切换当前会话。安装通过 dsh plugin --profile web add dsh-delete-session(或 github:DDDMUC/dsh-delete-session)完成,重启 dsh web 生效;运行时无需 DSH SDK,所有服务(sessions / sessionPersistence / agents / workspaceRegistry / webServer)通过 cordis 上下文动态解析。

典型流程是把鼠标悬停到侧边栏会话行,点 ... 后选择底部新增的「删除会话」,首次会弹出确认对话框并要求勾选「我已了解,永久删除」才能确认;勾选「不再询问」后即可一键直删(Shift 点击可临时唤回弹窗)。它还提供「多选」批量删除:进入选择模式后底部出现「已选 N 个 / 取消 / 删除」操作条,客户端以 6 路并发请求宿主,逐行乐观隐藏并实时刷新进度;若删掉的恰好是当前会话,会自动切到一个全新页面。它适合需要清理大量归档会话、又不想在设置深处翻找归档管理界面的 DSH Web 用户。

依赖上零运行时依赖,宿主路由限定本机回环(回环 socket + 回环 Host 头 + 同源校验),被 DSH 当前打开的会话会以 409 拒绝而非与活跃写者竞争。实测版本为 DSH 0.1.5-rc.1 与 0.1.7-alpha.2;旧版本缺服务时会降级为纯文件系统清理。已知限制:删除不可逆、无回收站;菜单注入为 DOM shim,若 DSH 调整菜单结构或行 fiber 形态可能失效但不影响其他功能;批量删除工作区记账仍保持串行。许可证为 MIT。

Pre-install check安装前体检Compatibility · Security兼容性 · 安全性 1 warning1 项注意
  • Only 3 stars - very few users, little community feedback星标只有 3,几乎没人在用,遇到问题缺少社区反馈
DSH walks through these 9 checksDSH 会逐条核对这 9 项

Compatibility兼容性

  • DSH, Node, OS and profile requirementsDSH 版本 / Node 版本 / 操作系统 / profile 是否满足要求
  • External dependencies and runtimes (Electron / Python / Docker, ...)外部依赖与运行时(Electron / Python / Docker 等)是否齐备
  • Conflicts with installed plugins: command names, skill / tool names, ports, duplicate MCP registration与已装插件是否冲突:命令名、skill / tool 重名、端口占用、重复 MCP 注册

Security安全性

  • Repo matches the facts registered here; archived or abandoned?仓库是否与页面登记一致,是否归档或长期停更
  • Safety of preinstall / install / postinstall and install.sh / setup.ps1preinstall / install / postinstall 与 install.sh、setup.ps1 是否安全
  • curl|bash, download-then-execute, obfuscation, unrelated domains → stop immediatelycurl|bash、下载即执行、混淆代码、无关域名 → 立刻停止
  • Typosquatting or unmaintained packages among the new dependencies新增依赖里有没有 typosquatting 或无人维护的包
  • Requested permissions vs. what the feature actually needs申请了哪些权限、是否超出功能所需(filesystem / network / shell / clipboard)
  • Any sudo / admin requirement, plus uninstall and rollback是否要求 sudo / 管理员权限,以及卸载与回滚方式

Anything uncertain must be marked unknown with a note on how to confirm it. This site's signal screen is a static snapshot, not a security audit.拿不准的必须标「未知」并说明要我怎么确认。本站的信号筛查是静态快照,不能替代安全审计。

Or use CLI install (for developers)或使用命令行安装(适合开发者)

CLI Install命令行安装

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

把 DDDMUC/dsh-delete-session 加入你的 DSH 配置(web profile)即可启用。

READMEREADME

dsh-delete-session

DeepSeek Harness 会话删除插件 —— 在侧边栏会话菜单里直接删除会话。 给 DeepSeek Harness (dsh) Web 侧边栏的会话 ... 菜单(重命名 / 分叉 / 归档)补上「删除会话」:确认一次后可直接删除,真正删除会话日志、工作区记账与宿主内存中的会话状态。

中文 · English


中文

侧边栏会话菜单里的删除会话
▲ 侧边栏会话菜单里的「删除会话」(红色)

为什么需要它

DSH 侧边栏的会话菜单只有重命名 / 分叉 / 归档——归档只是把会话藏起来,不删数据;而插件dsh-web里的全家桶里的「会话归档管理」在设置深处,删一个会话要跳好几个界面。

这个插件把「删除」放回你最常点的位置:会话行的 ... 菜单。

特性

  • 菜单内删除 —— 侧边栏会话 ... 菜单直接多出「删除会话」;会话 ID 从菜单的 React fiber 读取,永远作用于你点的那一行,不会切换当前会话
  • 风险确认 —— 首次删除弹出确认对话框:显示会话标题与 ID,勾选「我已了解,永久删除」后确认按钮才可用
  • 确认一次后可跳过 —— 对话框里勾选「不再询问,以后直接删除」,之后点菜单项直接删除(左下角 toast 提示);按住 Shift 点击可临时恢复弹窗;清除 localStorage['dsh-delete-session:skip-confirm'] 可永久恢复
  • 多选批量删除 —— 会话菜单里的「多选」进入选择模式:每行左侧出现勾选圈,点整行即勾选(不会打开会话),底部操作条显示「已选 N 个 / 取消 / 删除」;点删除立即批量执行(无确认弹窗、无全选、所有行都可选):被选中的行乐观隐藏、操作条实时显示「正在删除 x/N…」、客户端以 6 路并发请求宿主(不同会话并行、工作区记账串行),完成后 toast 汇总并刷新列表;失败的行立即恢复显示并保持选中,方便直接重试;Esc 或「取消」退出
  • 真正的删除 —— 停止运行中的 agent(cancel + 等待空闲)→ flush / detach 活跃会话 → 删除磁盘会话目录(原始 ID 与 session- 前缀两种写法)→ 持久化服务复核 → 清理工作区记账,侧栏不会残留「未分组」孤儿,并连带清理项目缓存行($DSH_HOME/storages/*/sessions/<id>.json),不留无法再显示的幽灵记录
  • 删除后回到新会话 —— 若删除的正是当前打开的会话,自动切到一个全新会话(不再落到已不可用的邻居页——那种页面 composer 会被禁用、侧栏也列不出来,看起来像「没删掉」)
  • 默认安全 —— 宿主路由仅限本机回环(回环 socket + 回环 Host 头 + 同源校验);被 DSH 打开占用的会话会被明确拒绝(409),绝不与活跃写者竞争
  • 中英双语 —— 菜单项与对话框跟随 DSH 界面语言(zh / en)
  • 零依赖 —— 不引入任何 DSH SDK,所有服务(sessions / sessionPersistence / agents / workspaceRegistry / webServer)都在调用时通过 cordis 上下文获取

安装

npm(推荐):

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

或从 GitHub 仓库直接安装:

dsh plugin --profile web add github:DDDMUC/dsh-delete-session

重启 dsh web 后生效。

使用

  1. 把鼠标移到侧边栏的会话行,点 ...(会话操作)
  2. 选择底部的「删除会话」
  3. 首次:勾选「我已了解,永久删除」(想省事可同时勾选「不再询问,以后直接删除」)→ 点「删除」
  4. 之后:直接删除,左下角出现 toast 提示
  5. 批量删除:会话菜单 →「多选」→ 勾选多个会话 → 底部「删除」;Esc 或「取消」退出选择模式
删除确认对话框
▲ 删除确认对话框(首次删除)

Showing the opening section of the README — the full document lives in the repository以上为 README 开头摘要,完整文档在仓库内 · View the full README on GitHub →在 GitHub 查看完整 README →

← 上一个 Prev dsh-jev-decide 下一个 Next dsh-web-restart →