dsh-session-delete
joingithub01/dsh-session-delete
Adds Delete conversation to the sidebar session menu; it removes the stored session log and the conversation's workspace entry.
설치
dsh plugin --profile web add github:joingithub01/dsh-session-deleteREADME
dsh-session-delete
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