在侧栏会话菜单中加入「删除会话」,删除会话日志,并把这条对话从工作区列表里移除。
安装
# GitHub 源码(首次需按提示配置 allowBuilds 构建授权后重试)
dsh plugin --profile web add github:joinGitHub01/dsh-session-delete
装任何插件都等于在你的机器上跑第三方代码,权限和你本人一样大——能读你的文件、用你的凭据、访问网络,工具审批管不到它。GitHub 来源的插件还会在安装时执行构建脚本——pnpm 默认拦截,所以安装可能停在 ERR_PNPM_GIT_DEP_PREPARE_NOT_ALLOWED 或 ERR_PNPM_IGNORED_BUILDS;dsh 会打印出需要添加的确切键名,把它加进该 profile 的 pnpm-workspace.yaml 的 allowBuilds 下,重跑一次即可装上。放行构建本身就是一次信任判断:请只安装可信来源,并尽量锁定 commit(github:owner/repo#sha)。
README
English | 中文
Delete a conversation from DeepSeek Harness for good: the sidebar session menu gains Delete conversation, which removes the session's stored log and its workspace entry.
Install
dsh plugin --profile web add github:joinGitHub01/dsh-session-delete
Restart DSH after installing, because the plugin registers a Host route.
Use
- Right-click a conversation in the left sidebar (or open it and use the ⋯ action at the top right).
- Choose Delete conversation.
- Confirm with the red Delete permanently button.
What it removes
- The session's own log files:
session.jsonl,session.vN.jsonl, and their.zstdversions. - The session's entry in the workspace list, plus its pin.
- The session directory when it becomes empty.
Workspace files and attachments mentioned in the conversation are untouched.
Two deletion timings
- Not resident in the current process (never opened this run): the log is deleted immediately and the row disappears at once.
- Resident (opened this run but idle): unlinking would fight the live write handle, so the row is removed from the list immediately and the session is recorded as pending. Its files are deleted on the next DSH start, before anything can attach to it again.
- Running (the agent is still working): refused; stop it first.
Leftover rows
A row whose log is already gone (deleted earlier, or cleared outside DSH) can be removed with the same menu: with nothing on disk to unlink, the plugin only clears the workspace entry and reports success instead of failing.
Safety
Deletion runs on the Host, behind DSH's authenticated same-origin /api connection. Before unlinking, the plugin checks that the target path is the session's own directory, never a project directory or the storage root.
Notes
- The pending queue lives in
$DSH_HOME/session-delete-pending.json(a plain JSON array). - The plugin targets DSH 0.2.2 and later (it uses
ctx.contextMenusandshell.overlay).
License
MIT
中文
把一条对话从 DeepSeek Harness 里彻底删掉:侧栏会话菜单会多出 删除会话,删除磁盘上的会话日志,并把这条会话从工作区列表里移除。
安装
dsh plugin --profile web add github:joinGitHub01/dsh-session-delete
插件会注册 Host 路由,安装后需要重启 DSH。
使用
- 在左侧会话列表里右键一条对话(或打开会话后点右上角的「更多操作」)。
- 选择 删除会话。
- 在确认框里点红色的 永久删除。
会删掉什么
- 会话自己的日志文件:
session.jsonl、session.vN.jsonl及其.zstd压缩版本。 - 这条会话在工作区列表里的登记,以及它的置顶记录。
- 目录空了以后一并删除目录。
工作区文件、会话里提到的附件都不受影响。
两种删除时机
- 不在内存里的会话(本次运行没打开过):立即删除日志,列表里马上消失。
- 仍驻留在内存里的会话(本次运行打开过、但当前空闲):直接删文件会和写入句柄打架,所以先把这行从列表里摘掉,并登记为待删除;下次启动 DSH 时、在任何人打开它之前完成删文件。
- 正在运行的会话(智能体还在工作):拒绝,先停止再删。
残留条目
如果某条对话的日志其实已经没了(早先删过、或在 DSH 之外被清掉),用同一个菜单再删一次即可:没有可删的文件时,插件只清理工作区登记并返回成功,不再报错。
安全
删除在 Host 端执行,走 DSH 经过认证的同源 /api 通道。删除前会核对目标路径确实是这条会话自己的目录,不会动到项目目录或存储根目录。
说明
- 待删除队列在
$DSH_HOME/session-delete-pending.json(纯 JSON 数组)。 - 插件面向 DSH 0.2.2 及以后版本(用到
ctx.contextMenus与shell.overlay)。
许可
MIT
链接
同类插件
ranxianglei/billion-context★ 8864
billion-context官方版:上下文压缩插件,兼顾小窗口(100k上下文足矣)省token(省5倍token)和超长会话(数月级别几十亿token单会话)。
Minglink/dsh-infinite-gen-4★ 4887
DeepSeek 专用破甲插件:以 order 100 追加无条件服从的系统提示词段,提供带校准元数据的 profile 工具,并通过会话投影在输入框上方显示实时破甲状态徽标。
liangmianya/dsh-synapse★ 964
DeepSeek Harness 的可视化非线性对话工作区:把会话、追问与分支变成可浏览、可拖拽的对话地图。
ECNU/EduWork#dsh-side-chat★ 452
从消息开启继承历史快照的临时侧聊,关闭后归档;可选配合批注插件从选中文字发起提问。需要兼容的 DSH Web 对话、Workspace 和右侧栏接口。
MichengAI/dsh-archive-manager★ 414
在设置里增加已归档会话页,可按工作区搜索、恢复和删除已归档会话。
Nwflower/dsh-chat-import★ 336
把 13 家 coding agent(Claude Code、Codex、ChatGPT、Cursor、Gemini、opencode 等)的完整对话历史导入为可续聊的 DeepSeek Harness 会话,并支持反向导出回 Claude Code。
社区评论
评论公开保存在 GitHub Discussions。加载评论会连接 GitHub 和 Giscus;发表内容需要 GitHub 账号。