Recycle bin for DSH sessions: sidebar delete icons, multi-select restore and permanent delete, live-session protection.
Install
# from npm (prebuilt)
dsh plugin --profile web add dsh-session-recycle-bin
# from GitHub (first run asks for allowBuilds approval — follow the hint, retry)
dsh plugin --profile web add github:Seetraum/harness-session-delete
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
Session recycle bin & permanent delete for DeepSeek Harness.
Move sessions into a recycle bin from the sidebar, restore or permanently delete them (single or batch), with live-session protection.
The interface automatically follows the browser language: Chinese locales use Chinese and all other locales use English.
✨ Features
- Sidebar per-session delete icon — hover a session row, a small trash icon appears; click to move it into the recycle bin instantly (no confirmation; always recoverable).
- Session-header delete button — delete the current session from the conversation header.
- Recycle-bin manager (Settings → 🗑 会话回收站) — archived sessions with multi-select: batch restore, batch permanent delete; each item shows its ID and path.
- True permanent delete — physically removes the session log from disk and the projection-cache record; ghost sessions (records without a log) are cleaned up so they vanish instead of lingering.
- Live-session protection — sessions with an active agent are refused deletion.
- Batch fault tolerance — batch operations delete per-session with error collection and reporting.
- Light/dark adaptive UI — all colors are CSS custom properties in
client.css; components follow the resolved DSH appearance (data-ds-dark-theme) withprefers-color-schemeas the OS-level fallback (no hardcoded palette). UI and code text follow the app font too (--dsw-font-family/--ds-font-family-code), so the Settings → 字体 choice applies here as well.
📦 Install
One-click from the plugin market (dsh-market)
Once listed in the awesome-dsh-plugin registry: open Settings → Plugin Market → search dsh-session-recycle-bin → install.
Manual
dsh plugin --profile web add dsh-session-recycle-bin
Then restart the web app (stop the dsh web process and run dsh web again).
Local development install
dsh plugin --profile web add link:/absolute/path/to/harness-session-delete
Uninstall
dsh plugin --profile web remove dsh-session-recycle-bin
🚀 Usage
- Sidebar delete — hover a session in the left sidebar, click the trash icon: the session moves into the recycle bin and the row disappears immediately.
- Settings recycle bin — open Settings ⚙️ → 🗑 会话回收站:
- Checkbox multi-select → Restore (batch unarchive) or Permanent delete (batch purge).
- Each entry shows the session name, ID and working path (hover for full details).
- Permanent delete physically removes the log and projection cache; live sessions are protected.
- Undo — restoring shows an undo toast that re-archives the session.
🛠 Development
pnpm test # run the test suite (host logic + HTTP routes)
Repo layout:
harness-session-delete/
├── package.json # single bundle manifest (dsh.bundle.patch + dsh.client)
├── cordis.patch.yml # bundle patch: one insert mounting the host row
├── index.js # node half: host entry (inject + apply)
├── client.js # browser half: sidebar icons + settings recycle bin
├── client.css # plugin stylesheet: design tokens + light/dark adaptive components
└── packages/
└── session-trash-host/ # host implementation (persistence/workspace/cache patches, HTTP routes)
🔌 How it works
- A single npm bundle covers both halves, same as other published plugins: the host row mounts via
cordis.patch.yml; the browser half joins automatically throughdsh.client+exports["./client"]. - The browser talks to the host over the plugin's own
/api/session-trash/*HTTP routes (registered on the webserver; non-GET requests carry anx-dsh-pluginCSRF header).
📄 License
Links
More in this category
Minglink/dsh-infinite-gen-4★ 2587
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.
ranxianglei/billion-context★ 793
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).
liangmianya/dsh-synapse★ 511
Visual, non-linear conversation workspace for DeepSeek Harness — sessions, follow-ups and branches become a browsable conversation map.
Nwflower/dsh-chat-import★ 223
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.
Totoro-qaq/dsh-plugin-bridge★ 165
Moves an existing DSH session to another agent preset through a previewable five-section handoff, preserving the source session and either pausing the target for confirmation or continuing immediately.
Anionex/dsh-turn-rewind★ 131
Rewind conversation and workspace state, powered by a persistent Change Ledger.
Community comments
Comments are public GitHub Discussions. Loading them connects to GitHub and Giscus; a GitHub account is required to post.