Introduction¶
In DeepSeek Harness, the official “Archive” operation for sidebar session management is typically just a logical cleanup, leaving disk logs intact. If you want to completely free up space or purge sensitive data, manual deletion can be cumbersome. The dsh-session-delete plugin solves this issue by providing a one-click session deletion entry in the sidebar. It prioritizes the official archiving workflow before deletion to ensure thorough cleanup of disk logs.
Plugin Overview¶
dsh-session-delete is a DeepSeek Harness client plugin developed by longhao666666. It is a zero-dependency, standard Cordis plugin consisting of pure JavaScript source code loaded directly. It requires no compilation, no Token/API Key, and no additional services. It is open-sourced under the MIT License.
Core Features¶
- Two Entry Points: Supports a trash can button when hovering over a session row, and a red “Delete Session…” item in the session row menu (positioned after “Archive”).
- Confirmation Dialog: The dialog explicitly warns that “The complete conversation history of ‘xxx’ (including disk logs) will be permanently deleted. This operation is irreversible,” preventing accidental touches.
- Safety Guardrails: Executes the official archiving workflow first; rejects deletion of running (live) sessions; validates the directory structure (
<root>/<project>/<session-id>two-level path) before deletion to ensure only the target session’s own directory is removed. - Precise Locate: Uses the
locate()position provided by the persistence layer; never manually concatenates paths. - Instant Feedback: Displays a toast notification “Session ‘xxx’ deleted” upon successful deletion, and the session list refreshes immediately.
Installation and Activation¶
Clone the repository locally and run the installation script:
git clone https://github.com/longhao666666/dsh-session-delete.git
cd dsh-session-delete
powershell -ExecutionPolicy Bypass -File .\install.ps1
After installation, you must restart DeepSeek Harness and confirm that @local/dsh-session-delete is enabled in the “Plugin Management” page.
Usage Instructions¶
- After restarting DSH, hover your mouse over any session row in the sidebar and click the trash can icon; or open the session row menu and select “Delete Session…”.
- Click “Delete” in the confirmation dialog.
- Once you see the “Session ‘xxx’ deleted” toast, the process is complete, and the corresponding log directory on the disk has been cleaned up.
Notes¶
- Zero Dependencies: A standard Cordis plugin with pure JS source loaded directly—no compilation, no Token/API Key, and no additional services required.
- Irreversible Deletion: This deletes the session’s complete record (including disk logs) and is unrecoverable. If you do not wish to delete so thoroughly, please continue to use the official “Archive” feature.
- Uninstall Command:
powershell -ExecutionPolicy Bypass -File .\install.ps1 -Uninstall.