插件目录 / UI & Skins / dsh-more-session-operations
dsh-more-session-operations
已验证 · 实测可装 Ruiming-cn
功能简介
DeepSeek Harness Web sidebar session-row menu enhancements: mark unread via the official completed-reminder dot, copy session ID, delete session with confirmation, archive confirmation, and recursive subagent-session deletion.
可用 — 实测通过,早期项目
DeepSeek Harness Web sidebar session-row menu enhancements: mark unread via the official completed-reminder dot, copy session ID, delete session with confirmation, archive confirmation, and recursive subagent-session deletion. 实测能干净安装、正常启动。早期项目,但功能可用。
「已验证」表示我们的自动化 CI 在干净 profile 里实际执行了 dsh plugin add 并启动成功——仅此而已。功能描述与版本兼容性均为作者声明。这不是安全审计,也不代表对第三方代码的背书。
README
dsh-more-session-operations
DeepSeek Harness Web 侧边栏会话行「…」菜单增强插件。
GitHub: https://github.com/Ruiming-cn/dsh-more-session-operations
功能
- 标为未读:在「复制会话 ID」上方新增「标为未读」操作(小眼睛图标)。点击后复用官方「已完成但未打开」的绿色提醒点;进入/选择该会话后自动清除,无需手动“标为已读”。未读标记与官方完成提醒一样是会话运行期状态,不额外落盘。
- 复制会话 ID:在会话行菜单中新增「复制会话 ID」,点击后把会话 ID 写入剪贴板,并在菜单项上短暂显示「已复制」。
- 删除会话:在会话行菜单中新增「删除会话」,点击后弹出二次确认弹窗;确认后通过宿主端
POST /__dsh-more-session-operations/delete物理删除会话(停止运行中的 agent、刷新/分离会话、删除日志目录与 projection/workspace 记账),并递归同步删除所有后代子代理会话(普通分叉会话保留)。 - 同源保护:删除端点校验
Origin/Sec-Fetch-Site,拒绝跨源浏览器请求。 - 归档会话二次确认:拦截官方「归档会话 / Archive session」菜单项,点击后先弹确认弹窗;确认后调用官方
__workspacesSvc.archiveSession(sessionId),取消则不操作。
使用
本地开发 / 运行时注入:
npm run build # 把 src/ 同步到 lib/
# 在已加载 dsh-super-injector 的 web 会话中:
# dev_inject_plugin {"dir": "<本仓库绝对路径>"}
打包 / 安装:
npm pack # prepack 会自动构建 lib/
# 然后通过 dsh plugin --profile web add <生成的 tgz> 安装
结构
src/index.js 宿主端源码:注册删除端点 POST /__dsh-more-session-operations/delete
src/client.js 客户端源码:DOM 注入菜单项、归档拦截、确认弹窗(shell.overlay)
lib/ 构建产物(由 scripts/build.mjs 从 src/ 复制生成)
scripts/ 构建脚本与只读冒烟测试
cordis.patch.yml 插件行插入配置
技术说明
- 宿主删除逻辑复用/裁剪自 lsz-asd/dsh-plugin-session-delete 的完整删除链路,仅保留 HTTP 端点,不注册模型工具。
- 客户端沿用已验证的
MutationObserver + [role=menu] + sessionRow.menuOpenDOM 注入方案;确认弹窗为自包含 plain-DOM 覆盖层,使用同一套 DSH 主题变量与官方 Menu 的 40px 高度/14px 字号,不依赖 React/UI primitives 的客户端模块表(便于免构建动态注入)。 - 中英文文案集中在
src/client.js的zhDict/enDict,优先通过locale服务注册,缺失时回退浏览器语言字典。 - 图标使用官方
IconCopyOutline16/IconTrashOutline16的 16×16currentColorSVG path。
License
MIT
安装
装一次目录插件,之后本站所有插件都能让 DeepSeek Harness 自动找、自动装:
dsh plugin add dshbase-catalog 然后对 agent 说「帮我装 dsh-more-session-operations」,它会在目录里找到并自动安装。文档:dshbase-catalog · 已验证场景包。
该插件是 GitHub 源码(未发 npm)——直接从仓库装:
Web profile:
dsh plugin --profile web add github:Ruiming-cn/dsh-more-session-operations Headless(CLI)profile:
dsh plugin --profile headless add github:Ruiming-cn/dsh-more-session-operations 实测报告
验证通过:从 GitHub 源码完成 L1 安装 + L2 加载 + L3 运行(dsh 0.1.0-rc.6)。