dsh-conversation-cleaner
其他 活跃维护

dsh-conversation-cleaner

xiaoy616/dsh-conversation-cleaner

支持逐条查看对话文件数与内存占用,一键打开、定位或删除生成的文件,直接打开工作区目录并永久清除,让杂乱的对话环境恢复清爽。

0
Stars 标星
0
Forks 分支
0
Watchers 关注
0
Open Issues
JavaScript
主要语言
MIT
开源协议
45 KB
仓库大小
1 个月前
最后推送
一键安装扩展 / 插件指令
dsh plugin --profile web add github:xiaoy616/dsh-conversation-cleaner
git clone https://github.com/xiaoy616/dsh-conversation-cleaner.git
git clone git@github.com:xiaoy616/dsh-conversation-cleaner.git
README.md main

dsh-conversation-cleaner

A DeepSeek Harness sidebar plugin for managing conversations and their generated files.

Features

  • Conversation overview — total memory usage and file count for the current conversation, shown in the sidebar.
  • File actions — open, reveal in Finder, or delete files generated by a conversation.
  • Workspace access — open the conversation workspace folder directly.
  • Conversation cleanup — permanently delete a conversation together with its local session logs.
  • Cascade delete — a conversation's delegated subagent sessions are deleted with it, deepest first, so no orphan log outlives its parent.
  • Hidden-state sweeper — storage no sidebar row can show is reclaimed automatically: subagent logs whose parent is gone, message-less session shells older than ten minutes, and project folders left empty. Live and freshly created sessions are never touched.

Install

From npm:

dsh plugin add dsh-conversation-cleaner

Or from a local checkout:

dsh plugin add /path/to/dsh-conversation-cleaner

The plugin is declared through cordis.patch.yml and exposes both a host entry (index.js) and a web client entry (client.js).

Maintenance

The hidden-state sweep runs once, one minute after the plugin loads. It can also be triggered on demand:

curl -X POST http://127.0.0.1:<port>/.dsh-conversation-cleaner/sweep \
  -H 'content-type: application/json' -d '{}'

Pass {"minAgeMs": 0} to include shells created moments ago. The response lists what was removed.

A session counts as an empty shell only when its log is under 8 KB and the projection cache reports zero messages for it — a conversation with any message is never eligible, and a session without a cache row is left alone.

Package layout

File Purpose
index.js Host-side plugin entry: file operations, deletion, workspace access
client.js Web client entry: sidebar UI
cordis.patch.yml DSH bundle patch declaration
locale/en.json, locale/zh.json UI strings (English / Chinese)
icon.svg Plugin icon

Requirements

  • DeepSeek Harness with the @deepseek-ai/dsh-client-ui-sidebar and @deepseek-ai/dsh-client-ui-layout client packages.

License

MIT