DeepSeek Harness Plugin

sailoumili/dsh-session-remover

Stars ★ 4 Downloads (30d) 1,900 Category Sessions & Messages Added 2026-10-16 npm dsh-session-remover

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

  1. Click Plugins in the left sidebar.

  2. Click Add plugin.

  3. Enter the following in the package field:

    dsh-session-remover
    
  4. Click Install and wait for the installation to complete.

  5. Enable the plugin on its page.

  6. Restart DSH.

Usage

  1. Move the pointer over any sidebar session row and click the "…" at the end of the row.
  2. The last two menu items are "Delete conversation" and "Batch delete…".
  3. Single delete: click "Delete conversation", click OK in the confirmation dialog; the page reloads automatically and the row disappears.
  4. 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.
  5. Leaving batch delete: "Cancel", "Close", clicking outside the panel, or pressing Esc all work. While a deletion is in progress, closing is not honoured until it finishes.
  6. 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.json while 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.delete allows only 127.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 to 0.0.0.0 and 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; Tab may move to page elements behind the panel.

License

MIT

Content from the project README on GitHub ↗

Links

More in this category

View the whole category →

Community comments

Comments are public GitHub Discussions. Loading them connects to GitHub and Giscus; a GitHub account is required to post.