DSH HUB
HomePlugin StorePlugin PacksCommunityRankingsResourcesPublish Guide
Plugin source
Back to catalog

tayunchuan /

tayunchuan/dsh-session-delete

Verified

DeepSeek Harness plugin: a DeepSeek-web-style red Delete row in the sidebar session menu.

★ 0 Stars0 Forks0 IssuesN/A Community rating0 Confirmed installs
View on GitHub
READMESource: main@dcd8525e

dsh-session-delete

给 DeepSeek Harness 的侧边栏会话菜单添加一个**红色「删除」**项,样式对齐 DeepSeek 网页版会话菜单中的删除操作(垃圾桶图标 + 红色文字)。

点击后先弹出确认框;确认后会话从侧边栏移除,正在运行的工作会先被停止。删除使用 Harness 的归档能力,因此之后仍可通过侧边栏「全部对话(显示已归档)」筛选恢复。

非官方插件,与 DeepSeek 官方无关。

功能

  • 在每个会话的「…」菜单末尾新增红色的「删除 / Delete」一行(排在 Harness 自带的置顶、重命名、分叉、归档、复制 ID 之后)。
  • 垃圾桶轮廓图标 + 红色文字,hover 时浅红背景,与 DeepSeek 网页版截图样式一致。
  • 确认对话框:标题、会话名、说明、取消 / 删除按钮;支持 Esc 关闭、遮罩点击关闭、Tab 焦点循环。
  • 中英文界面文案,跟随 Harness 当前语言。
  • 只使用 Harness 主题 token(--dsw-alias-*),自动适配浅色 / 深色主题。
  • 已归档的会话不再显示该行,避免重复操作。

安装

本仓库本身就是一个 DSH bundle 目录(package.json 里包含 dsh.bundle 与 dsh.client)。

  1. 把仓库放到本地任意目录。
  2. 在 DeepSeek Harness 中打开 设置 → 插件,使用插件管理器的本地目录安装入口,选择本仓库根目录。
  3. 启用 Session Delete,刷新页面。

安装后,把鼠标移到侧边栏任意会话行,点击行尾的「…」菜单,即可看到最下方的红色「删除」。

已在 DeepSeek Harness 0.2.1-rc.2(Windows 桌面版)安装并验证菜单项与确认框注册成功。

使用与恢复

  • 点击「删除」→ 确认框 → 「删除」:会话从侧边栏移除,当前正在进行的回合 / 子智能体 / 后台任务会先被停止。
  • 误删恢复:在侧边栏「视图选项」中把归档筛选切换为「全部对话(显示已归档)」,找到该会话并使用「取消归档」。

结构

.
├── package.json          # bundle 清单(dsh.bundle + dsh.client)
├── cordis.patch.yml      # 插入 session-delete 这一行
├── index.js              # Host 半:空 apply(本插件全部是客户端 UI)
├── client.js             # Client 半:菜单项 + 确认对话框 + 样式
├── locale/
│   ├── en.json           # 插件管理器展示用元数据
│   └── zh.json
└── icon.svg              # 插件图标

实现要点:

  • 菜单项注册在 sidebar.workspaces.session.menu.item(order: 500)。
  • 确认框注册在 shell.overlay,因此不会被侧边栏或菜单裁剪。
  • 删除调用 ctx.uiWorkspace.archiveSession(sessionId, { stopActivity: true })。
  • 通过 ctx.slots.inject(...) 绑定 slot 生命周期,插件卸载时自动清理。

开发

client.js 是 Harness 浏览器模块加载器格式(window.__ModuleLoader__.load),无需构建步骤;修改后重新安装 bundle 并刷新页面即可。

node --check client.js
node --check index.js

许可

MIT

—/ 5

No ratings yet

Verified DSH bundle

Commit dcd8525e0684

Community comments

No comments yet. Be the first to write one.

DSH HUB

A community index for DSH plugins. Not an official GitHub or DeepSeek AI product.

CommunityResourcesAPIAbout