xiaoy616/dsh-conversation-cleaner

dsh-conversation-cleaner

Clean up conversations from the DSH sidebar: per-conversation file count and total memory, open/reveal/delete generated files, open the conversation workspace folder, and permanently delete conversations with their local session logs.

Uncategorizedconversation-managementdeepseek-harnessdsh

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

FilePurpose
index.jsHost-side plugin entry: file operations, deletion, workspace access
client.jsWeb client entry: sidebar UI
cordis.patch.ymlDSH bundle patch declaration
locale/en.json, locale/zh.jsonUI strings (English / Chinese)
icon.svgPlugin icon

Requirements

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

License

MIT