Per-task disk-space ledger in the sidebar with opt-in reclamation of unowned junk; session logs are never trimmed.
Install
# from GitHub (first run asks for allowBuilds approval — follow the hint, retry)
dsh plugin --profile web add github:wojiao42/dsh-space-optimizer
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
简体中文(完整版) · English (abridged)
This is an abridged English version. The Chinese README is the source of truth; details that change often (design notes, changelog, screenshots) live there.
A sidebar disk-space ledger for DSH: see what every task occupies, what part of it can be optimized, and the unowned junk that belongs to no task. Session logs are never trimmed.
What it does
- Per-task ledger. One row per session: occupied bytes, current session-log generation, on-disk tool spill, optimizable bytes, and referenced attachments (shared ones counted once).
- Unowned junk by category. Plugin-market cache, orphaned spill files, stale projection-cache rows, and attachments no session log references.
- You tick, it deletes. Unowned junk is pre-ticked; task-level items are never pre-ticked.
The panel shows
selected N · freeable Xand posts the reclaim request only after you confirm. - Read-only until confirmed. Scanning touches nothing; only explicitly listed targets are
deleted.
node tools/space-report.mjs [--json]is a read-only ledger that never deletes.
Quick start
GUI (desktop, recommended). Settings (Ctrl+,) → Plugin market → Custom install → enter
github:wojiao42/dsh-space-optimizer → restart DSH.
The desktop profile is managed by the app: running
dsh plugin --profile desktop adddirectly may be rejected. If it is, use the GUI step above.
CLI (Web profile).
dsh plugin --profile web add github:wojiao42/dsh-space-optimizer
Refresh the page and click Space at the bottom of the sidebar; the scan takes 1–2 s
(~170 ms for 9 tasks). Uninstall: dsh plugin --profile web remove dsh-space-optimizer.
Local source checkout. Use GUI custom install with this repo's absolute path; after editing, restart DSH or reinstall as described in the Chinese README.
Key limits
- Session logs are never trimmed. They are the canonical state read by usage, context and first-token-latency projections; the ledger only counts them.
- Only auxiliary artifacts are reclaimable: on-disk tool spill, superseded old-generation logs, and unreferenced attachments.
- No "delete everything". The reclaim endpoint requires an explicit target list; there is no omit-to-delete form.
- Conservative by design. If any session log cannot be read, attachment reclamation is skipped for that whole category; a failing newest generation keeps its older generations.
- Deleted files do not go to the trash and cannot be restored.
- No network requests. Everything is local filesystem work; results go only to the local page.
Compatibility
- DSH Desktop and DSH Web (client
platform: web). - Node: whatever the host DSH runtime provides. The ledger uses the built-in
zlib.zstdDecompressSync, the same API the official session-log writer uses; noenginesfield is set. - Temp paths follow
os.tmpdir()(%TEMP%on Windows); no OS-specific branches. - Offline tests, both must exit 0:
node tools/space-optimizer-test.mjs(30 assertions) andnode tools/client-panel-test.mjs(37 assertions).node tools/space-report.mjsis a read-only ledger that never deletes.
License
MIT. See LICENSE.
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.