Adds Delete conversation and Batch delete to the sidebar session menu; a deleted conversation and its subagent sessions are moved to the Windows recycle bin, from where they can be restored.
Install
# from npm (prebuilt)
dsh plugin --profile web add dsh-session-remover
# from a prebuilt release tarball
dsh plugin --profile web add -w "https://github.com/sailoumili/dsh-session-remover/releases/download/v1.0.0/dsh-session-remover-1.0.0.tgz"
# from GitHub (first run asks for allowBuilds approval — follow the hint, retry)
dsh plugin --profile web add github:sailoumili/dsh-session-remover
Any plugin you install runs third-party code with your own permissions — it can read your files, use your credentials, and reach the network, and tool approvals don’t sandbox it. GitHub-sourced plugins also run build scripts at install time — pnpm blocks those until you allow them, so an install can stop with ERR_PNPM_GIT_DEP_PREPARE_NOT_ALLOWED or ERR_PNPM_IGNORED_BUILDS; dsh prints the exact key to add under allowBuilds in your profile’s pnpm-workspace.yaml, and the install works on the next run. Allowing a build is a trust decision: only install sources you trust, and pin a commit (github:owner/repo#sha).
README
Adds "Delete conversation" and "Batch delete…" to the sidebar session row "…" menu, moving a conversation and its subagent sessions into the Windows recycle bin, from which they can be restored.
- Package:
dsh-session-remover - Version:
1.0.2 - Repository: https://github.com/sailoumili/dsh-session-remover
- Compatible with DSH 0.1.7 and later; available for the web and desktop editions
- Interface text follows the DSH interface language; Chinese and English are both provided
- Windows only; no third-party runtime dependencies
Installation
Click Plugins in the left sidebar.
Click Add plugin.
Enter the following in the package field:
dsh-session-removerClick Install and wait for the installation to complete.
Enable the plugin on its page.
Restart DSH.
Usage
- Move the pointer over any sidebar session row and click the "…" at the end of the row.
- The last two menu items are "Delete conversation" and "Batch delete…".
- Single delete: click "Delete conversation", click OK in the confirmation dialog; the page reloads automatically and the row disappears.
- Batch delete: click "Batch delete…", tick the target conversations in the panel (select all / select none are available), tick the acknowledgement, click the delete button, and confirm once more; deletion then proceeds row by row.
- Leaving batch delete: "Cancel", "Close", clicking outside the panel, or pressing
Escall work. While a deletion is in progress, closing is not honoured until it finishes. - Restore: open the recycle bin in File Explorer, right-click the session folder, choose Restore, then restart DSH.
Notes
- Deletion moves the data to the recycle bin; it does not erase it. The move stays on the same volume, so no data is copied and nothing is left behind in
.dsh. Before deleting, the plugin checks two things on the volume that holds the session (Windows stores the recycle-bin setting per drive): whether the recycle bin has been disabled, and whether the volume has a usable recycle bin at all; if either check fails the plugin refuses to delete rather than falling back to permanent deletion. Afterwards each item is verified by original location and name; the verification reads the local recycle bin index directly (listing file names only, not reading each entry), so its cost is essentially independent of how many items the bin already holds. - Subagent sessions are removed together. Subagent sessions are not shown in the sidebar or search, so they accumulate unless removed together. Forked conversations are independent and are never deleted along with their source.
- The session directory is located by session id. The id recorded in the session log header is authoritative. If one id maps to more than one session directory (for example a bare id and a directory with the
session-prefix side by side), the directory whose name equals the requested id exactly is deleted; when a unique target cannot be determined, the plugin refuses to delete and reports an error without changing any data. - Three records are cleaned: the projection cache, the workspace registry, and the archived set. The projection cache is derived data that DSH rebuilds after a restore; the other two are cleared to avoid leaving traces locally, at the cost of a restored conversation being filed under "Ungrouped" in the sidebar.
- Deleting the currently open conversation is supported. Its running task is stopped and flushed to disk first, and no DSH restart is required.
Known limitations
- Windows only. Moving to the recycle bin relies on the system script host
cscript.exe, which ships with Windows; on other systems the plugin refuses to delete and reports an error rather than falling back to permanent deletion. - Deletion is refused when the volume has no recycle bin. If the session directory sits on a network drive, a USB stick, or a volume with no usable recycle bin (such as FAT/exFAT), moving it to the recycle bin would degrade into permanent deletion, so the plugin always refuses. To proceed, move the session directory to a local disk, or delete any file on that volume once to initialise its recycle bin, and try again.
- An emptied recycle bin cannot be restored. The plugin only moves the files into the bin; whether to empty it is the user's decision. The bin also has a size cap, and Windows discards the oldest entries once the quota is exceeded.
- A restored conversation may not be in its original workspace. The plugin clears the workspace registry entry, so a restored conversation appears under "Ungrouped". To restore it to its original workspace, ask the AI assistant to update
~/.dsh/storages/workspace.jsonwhile DSH is stopped. - Attachments are not reclaimed. DSH attachments are content-addressed, shared across conversations, and carry no reference counting, so the plugin cannot safely determine whether they can be reclaimed.
- The endpoint accepts loopback requests only.
/api/session.deleteallows only127.0.0.1/localhost/[::1]and returns 403 for LAN origins. The plugin registers its route outside the official authentication fence, while the official browser-cookie check depends on a signing secret the plugin cannot obtain; deleting data is high-risk, so it fails closed. If DSH is bound to0.0.0.0and accessed from another machine, deletion returns 403. - Nothing is touched when the session directory cannot be read. A failed session-tree scan aborts the deletion as a whole and never treats "read failure" as "absent from disk".
- The batch delete panel does not trap focus;
Tabmay move to page elements behind the panel.
License
MIT
Links
More in this category
ranxianglei/billion-context★ 8746
The official billion-context plugin: a context-compression plugin for small context windows (a 100K context is enough), token savings (5x fewer tokens), and month-long single sessions (billions of tokens).
Minglink/dsh-infinite-gen-4★ 4848
System-prompt armor plugin for DeepSeek models: appends an unconditional-compliance prompt section at order 100, exposes a profile tool with calibration metadata, and shows a realtime armor-status badge driven by a session projection.
liangmianya/dsh-synapse★ 860
Visual, non-linear conversation workspace for DeepSeek Harness — sessions, follow-ups and branches become a browsable conversation map.
ECNU/EduWork#dsh-side-chat★ 435
Open temporary side conversations from a message with a snapshot of its history, then archive them on close; optional annotation integration adds selection-based questions. Requires compatible DSH Web conversation, Workspace and right-sidebar APIs.
MichengAI/dsh-archive-manager★ 407
Adds an archived-sessions page in Settings to search, restore, and delete archived DeepSeek Harness sessions by workspace.
Nwflower/dsh-chat-import★ 335
Import full-fidelity chat histories from 13 coding agents (Claude Code, Codex, ChatGPT, Cursor, Gemini, opencode, and more) as resumable DeepSeek Harness sessions, with reverse export back to Claude Code.
Community comments
Comments are public GitHub Discussions. Loading them connects to GitHub and Giscus; a GitHub account is required to post.