Introduction¶
DeepSeek Harness (DSH) uses a plugin-based architecture. In daily use, cleaning up invalid sessions or remediating incorrect AI responses are common requirements. The dsh-session-delete plugin extends the sidebar menu and message interactions, providing thorough session deletion (cleaning up logs, workspace ownership, host in-memory instances, and UI rows) and message retry functionality.
Core Features¶
The plugin provides the following main capabilities:
- Sidebar session deletion: Adds a “Delete this session” option to the “…” menu on sidebar session rows, supporting permanent removal of the session log directory, workspace ownership, host in-memory instance, and client list row.
- Message retry: Adds a “Retry” button to the right of the copy button on user messages and AI replies; clicking it resubmits the input to the model.
- Bulk cleanup: Supports bulk session deletion (up to 200 sessions per operation) and supports sweeping stale rows.
- Running-session protection: Applies dual rejection (server-side and client-side) to running sessions to prevent accidental deletion.
- Recycle bin configuration: Supports controlling the deletion mode via the
trashModeconfiguration item, allowing either direct permanent deletion or moving to the recycle bin.
Installation and Enablement¶
This plugin requires DSH 0.2.x or later. Place the plugin directory into the workspace, then run the following command:
install_bundle target: <本目录绝对路径>
After execution, the plugin bundles itself into the current profile and loads automatically. If the plugin does not take effect automatically, restart DSH.
Usage¶
Delete a Session¶
Click “…” on a sidebar session row, select “Delete this session”, and confirm in the dialog. Running sessions cannot be deleted.
Bulk Delete¶
- Click “Bulk delete” to the right of the “Workspace” title in the sidebar to enter bulk mode.
- Select the session rows to delete (official search and group filtering are supported).
- Click “Confirm deletion” to perform permanent deletion.
Retry a Message¶
To the right of the copy button on a user message or AI reply, click the refresh icon to retry. This action resends only the text content, not attachments.
Configuration¶
The plugin supports the optional trashMode configuration item to control deletion behavior:
- insert:
- id: session-delete
name: dsh-session-delete
config:
trashMode: purge
purge(default): Directly and permanently deletes session artifacts; unrecoverable.recycle: Prefers the system recycle bin; falls back to the plugin recycle area on failure.
Notes¶
- Unrecoverable: In the default
purgemode, deletion is unrecoverable. If restoration is required, settrashMode: recycleand use tools such as@mzzsfy/dsh-session-managerto recover deleted items. - Running-session protection: Running sessions cannot be deleted due to dual restrictions on both server and client.
- No peer dependencies: It does not declare any
@deepseek-ai/dsh-*peerDependencies; compatibility detection relies only on the DSH version. - Non-running sessions only: The
sweepfeature only cleans the list for sessions whose artifacts no longer exist.