longhao666666/dsh-session-delete
DeepSeek Harness 插件:侧栏一键删除会话(先归档再清理磁盘日志,运行中的会话受保护)
Project Overview项目介绍
dsh-session-delete is a native Cordis plugin built exclusively for the DeepSeek Harness (DSH) desktop application, designed to permanently erase chat sessions and their on-disk logs from the sidebar. It ships as @local/dsh-session-delete, mounted into ~/.dsh/profiles/desktop/node_modules/@local, and registered via the dsh.profile.bundles field in the profile's package.json so the DSH bundle manifest loader picks it up. The current release is 0.1.0, validated on Windows against DSH 0.2.0-rc.2, with zero runtime dependencies, no tokens, no API keys, and no compilation step required.
The typical workflow begins by restarting DeepSeek Harness so the newly mounted bundle is discovered, then opening the Plugins management page to confirm @local/dsh-session-delete is enabled. Users hover over any session row in the sidebar and click the trash-can icon, or alternatively pick the red "Delete Session…" entry in the row menu; a confirmation dialog warns that the action is irreversible and the disk log directory will be removed as well. The host-side code first invokes the official archive flow, uses the persistence layer's locate() to pinpoint the exact directory, validates its <root>/<project>/<session-id> shape, refuses deletion on live sessions to prevent torn logs, emits api-session/removed, and finally shows a "Deleted session 'xxx'" toast that triggers an immediate list refresh.
Dependencies are minimal: a Windows host with DSH Desktop installed and launched at least once is enough, and pure JavaScript sources are loaded directly. Installation is handled by either a one-shot install.ps1 PowerShell script (which auto-detects DSH, creates the @local link folder, and writes the profile configuration) or a manual Junction-based mount, while uninstallation reuses the same script with the -Uninstall flag, leaving the cloned repository files intact. The plugin targets power users who genuinely need to reclaim disk space rather than merely hide conversations; anyone preferring soft removal should stick with the built-in archive action. It is released under the MIT license, and the deletion it performs is permanent and cannot be undone through DSH's own recovery tools.
dsh-session-delete 是一个面向 DeepSeek Harness(DSH)桌面版的原生 Cordis 插件,专门用于在侧栏一键永久删除会话记录(含磁盘日志)。它以 @local/dsh-session-delete 的形式挂载到 ~/.dsh/profiles/desktop/node_modules/@local,并在 profile 的 package.json 中通过 dsh.profile.bundles 字段注册,由 DSH 的 bundle manifest 机制加载。当前版本 0.1.0,开发时基于 Windows + DSH 0.2.0-rc.2 验证,零依赖、无需 Token 或 API Key。
典型使用流程是:先重启 DeepSeek Harness,进入「插件管理」确认插件已启用;然后在侧栏会话行悬停点击垃圾桶图标,或在会话行菜单中选择红色「删除会话…」。插件会先调用官方归档流程,再通过持久化层的 locate() 定位日志目录,校验目录形状后执行物理删除,运行中的会话会被拒绝以防日志撕裂,完成后弹出「已删除会话「xxx」」toast 并触发 api-session/removed 事件刷新列表。该插件适合需要清理占盘会话或整理历史记录的重度用户。
依赖方面仅要求 Windows 与已至少启动过一次的 DSH 桌面版,常规 JS 源码直接加载,无需编译。提供 install.ps1 一键脚本与手动 Junction 软链两种安装方式,卸载通过同脚本的 -Uninstall 参数完成,但克隆下来的仓库文件不会被删除。删除操作不可恢复,若只想隐藏会话应继续使用官方归档功能;插件以 MIT 协议开源。
请帮我安装这个 DSH 插件。安装前先完成【兼容性检查 + 安全性检查】,检查通过再动手。
插件:dsh-session-delete(longhao666666/dsh-session-delete)
仓库:https://github.com/longhao666666/dsh-session-delete
本站详情页:https://www.yhbd.top/plugins/longhao666666-dsh-session-delete/
本站登记:类型 plugin · 归类 原生 DSH 插件 · 许可证 MIT · ⭐ 2 · 最近提交 2026-09-30 · 主语言 JavaScript
按下面顺序执行,每步先把结论告诉我,再进入下一步:
【1 兼容性检查】
① 我这边:DSH 版本、Node 版本、操作系统、当前 profile(web / desktop)。
② 读它的 README、package.json、插件 manifest,列出它要求的 DSH 版本 / Node 版本 / 操作系统 / 外部依赖 / 需要另外先装的运行时。
③ 逐条比对,结论只写「满足 / 不满足 / 未知」三种;不满足的给出可行替代方案。
④ 检查是否和我已装的插件冲突:命令名重复、skill / tool 重名、端口占用、重复注册的 MCP server。
【2 安全性检查】
① 仓库可信度:和上面「本站登记」是否一致;star / fork 数、创建时间、最近提交,是否归档或长期停更。
② 安装脚本:逐行看 package.json 的 preinstall / install / postinstall,以及 install.sh、setup.ps1 之类脚本。出现 curl|bash、下载后直接执行、混淆代码、访问与插件功能无关的域名,立刻停下来告诉我,不要继续装。
③ 依赖:列出新增依赖,标出无人维护、或与知名包拼写近似的可疑包(typosquatting)。
④ 权限与副作用:它会读写哪些目录、访问哪些域名、需要哪些 DSH 权限(filesystem / network / shell / clipboard 等),以及怎么卸载和回滚。
⑤ 如果它要求 sudo / 管理员权限,或权限明显超出功能所需,先停下来问我。
【3 安装】
上面两步没有「不满足」和「高危项」时才执行;用官方推荐方式安装,不要自行提权。
【4 汇报】
用表格输出:检查项 / 结论 / 依据 / 是否需要我决策。拿不准的一律写「未知」并说明要我怎么确认——不要猜,也不要替我决定。
Send this message to DSH in your current session: it verifies compatibility and security first (answering met / not met / unknown item by item) and only installs once everything checks out — it will stop and ask you if it finds a high-risk item. The box scrolls; the copy is the full prompt. CLI install commands may not be accurate across systems, so DSH is the safer route.把上面这条消息直接发给当前会话里的 DSH:它会先核对兼容性与安全性(逐条给「满足 / 不满足 / 未知」),确认没问题再安装,有高危项会停下来问你。框内可滚动,复制到的是完整提示词;安装命令不一定准确,发给 DSH 更稳。
- Only 2 stars - very few users, little community feedback星标只有 2,几乎没人在用,遇到问题缺少社区反馈
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 github:longhao666666/dsh-session-delete
把 longhao666666/dsh-session-delete 加入你的 DSH 配置(web profile)即可启用。
READMEREADME
零依赖:常规 Cordis 插件,纯 JS 源码直接加载——无需编译、无需 Token / API Key、无需额外服务。
删除的是会话的完整记录(含磁盘日志),且不可恢复——不想这么彻底的话,请继续用官方的「归档」。
功能特性
| 能力 | 说明 |
|---|---|
| 两个入口 | 会话行悬停时的垃圾桶按钮;会话行菜单里的红色「删除会话…」项(排在「归档」之后) |
| 确认弹窗 | 明确提示「将永久删除「xxx」的完整对话记录(含磁盘日志),此操作不可恢复」,防止误触 |
| 安全围栏 | 先走官方归档流程;运行中的会话(live session)直接拒绝删除,防止撕裂日志产生残影;删除前校验目录形状(<root>/<project>/<session-id> 两级),只删目标会话自己的目录 |
| 精确定位 | 使用持久化层提供的 locate() 位置,绝不自行拼接路径 |
| 即时反馈 | 删除成功后 toast 提示「已删除会话「xxx」」,会话列表立即刷新 |
环境要求
- Windows
- DeepSeek Harness 桌面版已安装,并至少启动过一次(开发时基于 0.2.0-rc.2 验证)
安装
一键脚本(自动检测 DSH、建立 node_modules/@local 链接、写入 profile 配置):
git clone https://github.com/longhao666666/dsh-session-delete.git
cd dsh-session-delete
powershell -ExecutionPolicy Bypass -File .\install.ps1
方式二:手动挂载(点开查看)
$profile = "$env:USERPROFILE\.dsh\profiles\desktop"
$repo = "<你的克隆路径>" # 例如 "$HOME\code\dsh-session-delete"
New-Item -ItemType Directory -Force "$profile\node_modules\@local" | Out-Null
New-Item -ItemType Junction -Path "$profile\node_modules\@local\dsh-session-delete" -Target $repo
然后编辑 $profile\package.json,合并以下字段(已存在的字段里追加即可):
{
"dependencies": {
"@local/dsh-session-delete": "link:C:/Users/you/code/dsh-session-delete"
},
"dsh": {
"profile": {
"bundles": ["@local/dsh-session-delete"]
}
}
}
两种方式完成后都需重启 DeepSeek Harness,并在「插件管理」页确认 @local/dsh-session-delete 已启用。
使用说明
- 重启 DSH 后,把鼠标悬停在侧栏任意会话行上,点击垃圾桶图标;或打开会话行菜单,选择「删除会话…」。
- 在确认弹窗中点击「删除」。
- 看到「已删除会话「xxx」」toast 即完成,磁盘上的日志目录同时被清理。
卸载
powershell -ExecutionPolicy Bypass -File .\install.ps1 -Uninstall
重启 DSH 后生效;克隆下来的仓库文件不会被删除。
工作原理(点开查看)
host.js(Node 侧):归档 → 通过持久化层定位日志目录 → 校验目录形状 → 删除 → 从工作区脱离 → 发出api-session/removed事件让客户端刷新列表;所有安全围栏都在这一侧。client.js(浏览器侧):向sidebar.workspaces.session.menu.item(行菜单)、sidebar.workspaces.session.row.action(悬停按钮)、shell.overlay(确认弹窗 + toast)三个扩展槽注入 UI,只负责发起请求与展示。
相关插件
- dsh-element-context — 对话中圈选 UI 元素注入上下文
- dsh-ask-mode — 会话内一键切换「咨询模式」
gjj-star/dsh-conversation-navigator
masknull/dsh-qoder-connect
HuanLinOTO/dsh-plugin-ya-workspace-sidebar
Aik358/dsh-anchored-monitor
EugeneVl/dsh_session_folders
lw-storm/dsh-plugin-masterprompt
Yiheng-guo/dsh-boot-animation-pro