Skip to content

Releases

v1.0.2 — 安装方式改为 Git 地址,装完不再依赖下载目录

Choose a tag to compare

@PanChengN PanChengN released this 26 Sep 05:08

本版仍是文档与安装方式变更,插件运行代码(index.js / client.js)与 v1.0.0 一致。

改了什么

安装方式改为以 Git 地址为主,装完之后不再依赖任何下载目录。

方式 Add plugin 里填 删掉那个目录后
A. Git 地址(现在推荐) github:PanChengN/dsh-plugin-session-delete ✅ 随便删,代码已经进 profile
B. 本地路径(仅开发用) /绝对路径/dsh-plugin-session-delete ❌ 悬空,启动异常

路径安装会把 profile 写成 link:<目录>,插件从此绑在那个目录上;Git 地址安装则由 pnpm 从
codeload.github.com 拉 tarball 解到 <profile>/node_modules/.pnpm/ 下,与任何本地目录无关。

用 DSH 自带的 pnpm 11.7.0 做的对照实验:

A) link:/tmp/my-download  →  删掉该目录后 existsSync(.../package.json) = False
B) github:PanChengN/...   →  依赖记录 github:PanChengN/dsh-plugin-session-delete
                             代码以真实文件落在 .pnpm/@local+dsh-bundle-session-delete@https+++codeload.github.com+.../
                             删任何下载目录均不影响

怎么用

侧栏 Plugins → Add plugin 填:

github:PanChengN/dsh-plugin-session-delete

锁版本就加 tag,例如 github:PanChengN/dsh-plugin-session-delete#v1.0.2。

从路径安装迁移过来

  1. 先在 Plugins 页面 Remove 掉路径安装的那份(目录已删就先跑 scripts/fix-stale-install.py)
  2. Add plugin 填上面的 Git 地址 → Enable now → 重启
  3. 之后那个 clone 目录随便删

README

安装章节重写为 A/B 对照 + B→A 迁移步骤;「卸载与换设备(必读)」按安装方式分别给出卸载方法,
并保留悬空引用的症状、救援脚本用法与手工救援步骤。

v1.0.1 — 卸载救援脚本与卸载文档

Choose a tag to compare

@PanChengN PanChengN released this 26 Sep 04:56

本版没有改动插件运行代码(index.js / client.js 与 v1.0.0 一致),修的是 path 安装的卸载陷阱。

修的问题

从 GitHub clone 后按 path 方式安装,DSH 会把绝对路径写进 profile。直接删掉 clone 出来的目录后,profile 里留下悬空引用:

位置 内容
profiles/<profile>/package.json dependencies 的 link:<已删路径> 与 dsh.profile.bundles 条目
profiles/<profile>/node_modules/@local/dsh-bundle-session-delete 指向已删目录的符号链接
profiles/<profile>/cordis.yml Loader 真正启动的 leaf 配置里那一行 - id: session-delete

症状:启动异常、插件清单出现失败条目、界面「加载失败;点击重试」、宿主报
dsh: cannot resolve profile bundle "@local/dsh-bundle-session-delete" ...。

机制补充:loadProfileDirectory() 对每个 bundle 逐个 try/catch,解析失败的 bundle 会被跳过并记入
skippedBundles,所以整个 profile 不会因此起不来;界面上看到的异常来自上述残留引用。

新增

  • scripts/fix-stale-install.py —— 救援脚本。默认 dry-run,--apply 才写入,每个被改动的文件先备份为
    *.bak-<时间戳>。会清理悬空 link: 依赖与对应的 dsh.profile.bundles 条目、profile 私有层的悬空符号链接、
    cordis.yml 的残留顶层行;锁文件只报告;profiles/node_modules 共享挂载层只统计不删。
    python3 scripts/fix-stale-install.py            # 只检查
    python3 scripts/fix-stale-install.py --apply    # 执行清理
  • README「卸载与换设备(必读)」 —— 正确顺序(先在 Plugins 里 Remove 再删目录)、症状与机制、
    脚本用法、不想跑脚本时的手工救援步骤,以及两条禁令:别直接 rm -rf 已启用的插件目录;
    别同时装两份(包名/行 id/路由都会撞)。

卸载的正确姿势

  1. 侧栏 Plugins 页面里 Disable / Remove 本插件
  2. 再删掉 clone 出来的目录

首次发布见 v1.0.0。

v1.0.0 — 侧栏「删除会话」

Choose a tag to compare

@PanChengN PanChengN released this 26 Sep 02:37

给 DeepSeek Harness Web UI 的侧栏会话菜单补上缺失的「删除会话」,并真正从磁盘移除会话。

功能

  • 侧栏会话右键菜单新增 「删除会话」(注册到 sidebar.workspaces.session.menu.item,order 500)
  • 主机端点 POST /api/dsh-session-delete,一次清理四处:
    1. sessions/<工作区>/<session-id>/ 会话正文与写锁
    2. storages/session_projcache/sessions/<id>.json 派生缓存
    3. storages/workspace.json 的 archivedSessionIds 与各工作区 sessionIds 引用
    4. zstd 可用时连带删除 header.parentSession 指向它的子智能体会话
  • 删除后主机发 api-session/removed,客户端把该 id 移出列表快照,侧栏那一行立刻消失,不做整页刷新
  • session-<uuid> 与裸 <uuid> 两种 id 落盘形式都识别
  • 中英文插件卡片文案(locale/{zh,en}.json)+ 图标

安装

git clone https://github.com/PanChengN/dsh-plugin-session-delete.git

侧栏 Plugins → Add plugin 粘贴 clone 后的绝对路径 → Enable now → 重启 DeepSeek Harness。
桌面版必须走 GUI:CLI 会以 profile "desktop" is managed exclusively by the Electron application 拒绝。

已知限制

  • 确认框使用浏览器原生 confirm(),样式不是 DSH 风格
  • 未硬性拦截删除「当前进行中的会话」,仅确认框内提示
  • 主机内存里的工作区成员关系需重启后彻底清理(界面表现不受影响)

说明

非官方社区插件,与 DeepSeek 官方无关。MIT 许可。

首次发布:插件源码 + MIT 许可 + 完整 README(含接口签名与返回体)。