dsh-session-delete
Manifest validPermanently delete DSH sessions from the sidebar with a themed confirmation dialog and no page reload.
Session Delete for DSH
Permanently delete a DeepSeek Harness (dsh) session from the sidebar — with a proper confirmation dialog and no full-page reload.
DSH ships archive, not delete. This plugin fills that gap: it removes the session record, detaches it from every workspace, closes any live handle, and deletes the on-disk log directory.

Features
- Delete session entry in the sidebar session menu, right after the built-in actions.
- A confirmation modal in the Claude / OpenCode visual language, built from the DSH
Modalprimitive and design tokens.- Light and dark themes.
- Red danger action, session title, “cannot be undone” copy.
Esc, backdrop click, and an explicit close button.- Inline error message when the host rejects the request.
- Busy state while the request is in flight.
- No page reload. After a successful delete the sidebar refreshes in place through
sessions.refresh(). - Deleting the active session clears the main view, keeps the workspace selected, and returns to the home screen. Deleting a background session keeps the current view untouched.
- The host broadcasts
api-session/removed, so other open tabs drop the row as well.
| Light | Dark |
|---|---|
![]() | ![]() |
Install
# from npm (once published)
dsh plugin add dsh-plugin-session-delete
# directly from GitHub
dsh plugin add github:wooxi/dsh-session-delete
Restart the DSH web service after installing. The package declares a dsh.bundle patch and ships client.js prebuilt, so no build step or build approval is required.
To uninstall:
dsh plugin remove dsh-plugin-session-delete
Compatibility
- DSH
>=0.2.1-rc.1 <0.3.0-0 - Web client only (
dsh.client.platform: "web") - Node.js
>=20
How it works
Host (index.js) registers POST /api/dsh/session-delete. The route:
- Validates the session id (
/^session-[A-Za-z0-9._-]+$/) and confirms the session exists. - If the session is live, detaches it from the session controller — this closes write handles and emits
session/disposed, so the projection cache and search index follow. - Detaches the id from every workspace that references it, and clears archive/pin state.
- Removes the session's log directory under the dsh sessions root. The resolved path is checked to stay inside that root.
- Rebuilds the stored-session header index and emits
api-session/removed.
Client (src/client.jsx) adds the menu item and renders the dialog through the shell.overlay slot. The menu closes before the dialog opens, so the dialog is owned by the overlay and survives menu unmounting. After a successful delete it calls ctx.sessions.refresh(), then either keeps the workspace (via uiWorkspace.openWorkspace) or clears the main view.
Security and data
- Deletion is permanent: messages, attachments metadata, and the session log directory are removed from this machine.
- The route is
POST-only, same-origin, and uses the host's existing cookie authentication. No token is stored by the plugin. - Session ids are validated before any path is built, and the delete path must stay under the sessions root.
- The plugin makes no network requests.
Development
npm install
npm run build
npm run build bundles src/client.jsx into the browser module envelope dsh expects (client.js). The host entry is plain ESM and is not bundled.
License
MIT
Comments
Loading…
Similar plugins
by DDDMUC
Delete sessions from the DSH Web sidebar: adds a Delete action to the session row menu with a risk-consent dialog, then removes the session log, workspace accounting and live session state.
★ 16
↓ 229/wk
MIT
JavaScript
Oct 22, 2026
dsh plugin --profile web add dsh-delete-sessionby txlznbzsdj-collab
Adds a "Delete" item to the sidebar session menu with a confirmation dialog, then hard-deletes the session.
★ 0
↓ 283/wk
JavaScript
Aug 18, 2026
dsh plugin --profile web add dsh-session-deleteby shuiqian520
DSH plugin: permanently delete a session from the sidebar menu, and retry a user message or an assistant reply.
★ 3
↓ 246/wk
MIT
JavaScript
Oct 17, 2026
dsh plugin --profile web add dsh-session-deleteby Baboo-ming
Permanently delete a DSH session from the sidebar session row menu (danger-styled) with a confirm modal and a seven-stage, independently-degrading deletion pipeline (validate → running guard → workspace ledger → archive set → on-disk logs → in-memory drop → broadcast).
★ 3
↓ 320/wk
MIT
JavaScript
Oct 17, 2026
dsh plugin --profile web add dsh-session-deleteby akira399
Permanently delete DSH sessions from the file system, right from the sidebar conversation menu (真正的物理删除,不是归档隐藏).
★ 3
↓ 320/wk
MIT
JavaScript
Aug 15, 2026
dsh plugin --profile web add dsh-session-deleteby lvzhiyuan0308
A DSH plugin for deleting a sidebar conversation after confirmation
★ 0
JavaScript
Oct 4, 2026
dsh plugin --profile web add dsh_session_delete
