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-sidebarand@deepseek-ai/dsh-client-ui-layoutclient packages.
License
MIT
No comments yet. Be the first to write one.