Ruiming-cn/dsh-more-session-operations
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.
项目介绍Project Overview
这是 DSH Web 侧边栏会话菜单增强插件,提供标为未读、复制会话 ID、删除会话及归档二次确认;删除会经宿主端点物理移除会话并递归删除后代子代理,含同源校验。适合需要快速管理会话、保留未读提醒或清理代理链路时使用。注意未读标记仅为运行期状态,不落盘;删除不可恢复,普通分叉会话保留。
This DSH plugin enhances the Web sidebar session row menu with mark-as-unread, copy session ID, delete session, and archive confirmation. Deletion calls a host endpoint to physically remove the session and recursively delete descendant child-agent sessions, with same-origin protection. Use it when managing sessions, keeping unread reminders, or cleaning agent chains. Note: unread state is runtime-only and not persisted; deletion is irreversible, while normal forked sessions are retained.
请帮我了解并安装插件:【dsh-more-session-operations】【https://github.com/Ruiming-cn/dsh-more-session-operations】
把上面这条消息直接发给当前会话里的 DSH,让它帮你了解并安装。安装命令不一定准确,发给 DSH 更稳。Send this message to DSH in your current session. CLI install commands may not be accurate across systems — DSH will figure it out for you.
或使用命令行安装(适合开发者)Or use CLI install (for developers)
命令行安装CLI Install
dsh plugin --profile web add github:Ruiming-cn/dsh-more-session-operations
把 Ruiming-cn/dsh-more-session-operations 加入你的 DSH 配置(web profile)即可启用。
READMEREADME
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
nexu-io/open-design
freestylefly/awesome-gpt-image-2
anywhere-labs/dsh-desktop
walkinglabs/learn-harness-engineering
awesome-dsh-plugin/awesome-dsh-plugin
MemTensor/MemOS