DeepSeek Harness (DSH) stores substantial amounts of data locally, including session logs, caches, indexes, spill files, and attachments. Simply removing a session entry in the UI usually only deletes the reference without cleaning up these data copies from the disk. This plugin is designed to permanently delete sessions and all their local data copies.
Core Features¶
This plugin not only cleans up the session itself but also handles the following data cleanup logic:
- Comprehensive Data Cleanup: Deletes session log directories, projection cache records, workspace indexes, spill tool outputs, attachments, sub-agent sessions, and DeepSeek upload caches.
- Runtime Protection: Blocks deletion during session generation (returns
409 session-running). - Idle Session Confirmation: Requires dual confirmation for idle sessions (returns
409 session-live) to prevent accidental operations. - Attachment Deduplication Protection: Verifies that attachments are not referenced by other sessions before deletion to prevent accidental removal of shared files.
- Real-time UI Synchronization: Broadcasts the
api-session/removedevent to make sidebar entries disappear immediately without waiting for a refresh. - Flexible Installation: Supports installation from npm or local links.
Installation and Activation¶
Before installation, ensure the environment meets the requirements: DSH version must be greater than or equal to 0.2.1-rc.2, and Node.js version must be greater than or equal to 20.
Execute the following command to install the plugin:
install_bundle target: @fufu1437/dsh-delete-chat
Usage¶
- Hover over a session row in the sidebar and click
…to open the menu. - Select “Delete conversation…”.
- Confirm the deletion (the operation will be rejected if the session is currently generating).
- If the session is open and idle, the system will request a second confirmation.
- Once confirmed, deletion proceeds in the background, and the sidebar entry disappears immediately.
Precautions¶
- Irreversible Operation: Deletion is irreversible; please confirm with caution.
- Attachment Cleanup Rules: Only attachments not referenced by any session are deleted.
- Security Protection: Session IDs are escaped to prevent path traversal attacks.
- Permission Requirements: The plugin runs with the permissions of the current DSH process. Please review the source code and license before installation.