Preface¶
The built-in archive feature of DeepSeek Harness (DSH) only removes a session from the sidebar; it does not actually delete the underlying data. The log files on disk remain intact. As a result, archived sessions, though no longer visible, continue to consume storage space. The plugin introduced in this article adds true deletion capability to DSH, moving sessions to a local trash bin with support for restoration, bulk operations, and automatic expiration.
Plugin Scope¶
This is a DSH client plugin maintained by z664w4zps8-spec. It addresses the gap between “archive ≠ delete”: it allows you to delete sessions via a right-click menu and manage deleted sessions through a trash bin button at the bottom of the sidebar. It supports restoration, permanent deletion, bulk operations, and automatic expiration based on a retention policy.
Core Features¶
Right-Click Session Deletion¶
Right-click a session in the DSH workspace sidebar and select “Delete Session to Trash.”
- The session is archived via the built-in archive command, and its row in the sidebar disappears immediately—no restart required.
- The session’s storage directory is moved to
<DSH_HOME>/session-purge/trash/<trashId>/, accompanied by a JSON record storing the session ID, title, working directory, original path, byte size, and deletion timestamp.
Trash Bin Management¶
Click the “🗑 Trash” button at the bottom of the left sidebar to open the trash panel, which lists all deleted sessions along with their size and deletion time. The following operations are supported:
| Operation | Description |
|---|---|
| Restore | Move the session back to its original location; it reappears in the sidebar |
| Permanent Delete | Hand the session over to the OS trash (macOS: ~/.Trash, Linux: ~/.local/share/Trash, Windows: system Recycle Bin) |
| Empty Trash | Clear all entries at once (requires secondary confirmation) |
| Bulk | Check rows to restore or permanently delete selected items |
| Retention | Set a retention window; expired entries are automatically moved to the system trash. Set to Never to disable expiration |
Refresh Mechanism¶
A refresh button next to the trash search control re-fetches the session list and archive set, and removes entries whose files no longer exist. This ensures the sidebar stays in sync even if a session was deleted elsewhere.
Installation & Activation¶
The plugin requires DSH 0.2.2-alpha.3 or later, as well as a Node 24+ environment.
Install from the DSH plugin marketplace:
dsh plugin --profile desktop add z664w4zps8-spec/dsh-session-trash-box
The plugin activates automatically after installation—no additional configuration is needed.
Typical Usage¶
- Delete an unneeded session: Right-click the session in the workspace sidebar and select “Delete Session to Trash.”
- Restore an accidentally deleted session: Locate the corresponding entry in the trash and click “Restore.”
- Bulk cleanup: Select multiple entries and restore or permanently delete them in one go.
- Automatic cleanup: Set a retention period (e.g., 30 days); expired entries are automatically moved to the system trash.
- Permanent deletion: Select entries in the trash and click “Permanent Delete” to hand the files over to the operating system.
Use Cases & Cautions¶
Ideal for DSH users who need to genuinely clean up session logs and avoid unnecessary disk space consumption. The plugin runs with the privileges of the current DSH process; it is recommended to review the source code and license before installation.
The plugin does not handle session index rewriting. After restoration, the session log will be empty and must wait for the backend to regenerate it. Only sessions deleted through this plugin are placed in the trash; the built-in archive operation still only archives without deleting.
Value Summary¶
This plugin fills in the missing “delete” link in DSH’s session management workflow, allowing users to quickly hide unneeded sessions while retaining the ability to undo, batch-process, and perform long-term cleanup through the trash bin. Permanent deletion hands files over to the OS trash, providing a final safety net against accidental deletion.
- Plugin directory page: https://www.skillhub.cn/plugins/z664w4zps8-spec/dsh-session-trash-box
- GitHub: https://github.com/z664w4zps8-spec/dsh-session-trash-box