nuwa-skill
alchaincyf
你想蒸馏的下一个员工,何必是同事。蒸馏任何人的思维方式——心智模型、决策启发式、表达DNA。Distill how anyone thinks.
SLZ2025/dsh-del-chat
Adds a Delete archive item to the DSH sidebar Session menu: permanently removes an archived Session JSONL log, projection cache and Workspace record from disk, then drops the row from the sidebar without a restart.
PROJECT TOPICS
INSTALL REFERENCE
dsh plugin --profile web add github:SLZ2025/dsh-del-chat
该命令指向仓库当前默认分支;尚无绑定当前 commit 的完整验证结果。
PROJECT README
Deleting an archived conversation in DeepSeek Harness, for real. Archiving a Session only hides it from the sidebar — the log stays on disk forever. This plugin adds a Delete archive item to the sidebar Session context menu and removes an archived Session's log, projection cache and Workspace record from disk.
| Before | After |
|---|---|
Session archived, still 2.3 MB of session.v4.jsonl.zstd under ~/.dsh/sessions/** |
Log slot and projection cache gone; the sidebar row disappears; the archived id is gone from workspace.json |
One item in the sidebar Session context menu — the menu that carries Rename, Fork Session, Copy Session ID and Unarchive — rendered in the danger style below a separator:
┌────────────────────────────┐
│ 重命名 Ctrl+Alt+G │
│ 分叉会话 Ctrl+Alt+F │
│ ────────────────────────── │
│ 复制 Session ID │
│ 在应用中打开 › │
│ 取消归档 │
│ ────────────────────────── │
│ 🗑 删除归档 │ ← this plugin
└────────────────────────────┘
The item only shows up for a Session that is already archived: an unarchived one may still be written to and must not be purged, while an archived one can no longer be opened, so the header "…" menu can never reach it.
Clicking it opens a confirmation dialog that reports the Session id, the size of
its log and whether a projection cache exists — then the Host half deletes it. The
Host keeps an independent guard: a Session that was never archived is refused
(409), so the flow is always archive → inspect → delete.
workspaceRegistry and sessionPersistence services — both ship with the
desktop profile.Request/Response).Ask DSH to install the bundle, or use the Plugins page. The bundle is a normal DSH bundle whose patch inserts one row:
- insert:
- id: dsh-del-chat
name: dsh-del-chat
Install it from npm:
dsh plugin add dsh-del-chat
Or straight from this repository, pinning a revision:
dsh plugin add git+https://github.com/SLZ2025/dsh-del-chat.git#<commit>
A local checkout installs the same way: dsh plugin add D:\path\to\dsh-del-chat.
Either way, quit DSH completely and start it again afterwards. A page refresh loads only the client half: the menu item shows up, but the Host routes stay unregistered and the dialog says the Host half is not loaded.
Ctrl+Shift+A shortcut on the open Session.The session-<id>/ directory is gone immediately, and the plugin then asks the
Client to pull the Host-authoritative Session catalog again, so the row leaves
the sidebar without a reload. (The sidebar draws from that catalog; nothing
else tells it the row is gone.)
$DSH_HOME/sessions/<workspace-key>/session-<id>/session.v4.jsonl.zstd deleted
$DSH_HOME/storages/session_projcache/sessions/session-<id>.json deleted
$DSH_HOME/attachments/v1/objects/<2hex>/<sha256> kept (content addressed, shared)
$DSH_HOME/storages/cost-meter/ledger.json kept (third-party ledger)
The Workspace record and the archive mark are removed through the registry's own
write chain, never by editing workspace.json.
See docs/DETAIL.md for the reasoning, the guard table and the
known costs. In short: the client half registers a data-only menu contribution for
session (it asks the status route once when the menu opens, and only offers the
item for an archived Session) plus one shell.overlay dialog; the Host half
exposes GET /plugin/dsh-del-chat/status and POST /plugin/dsh-del-chat/purge,
checks that the id is archived and that the slot directory really is that Session's
slot under the persistence root, then deletes. It detaches and unarchives only when
the Host has already released the Session; while the Session is still resident in
the Host's in-memory store (a plugin cannot drop that entry) the delete keeps the
archive mark and settles the workspace record on session/disposed instead, so the
ghost row never reappears under Ungrouped.
Ctrl+Shift+A), refresh the page so the client half is loaded, then
right-click the sidebar row.%TEMP%\dsh-del-chat.log should then contain [apply].log-locked (423) — the log is still open in another process. Restart DSH
and retry.delete-failed and the reported message.node --check index.js
node --check client.js
node test/purge-core.test.mjs
node test/host-routes.test.mjs
node test/smoke.mjs
test/purge-core.test.mjs exercises the filesystem helpers against temporary
trees; test/host-routes.test.mjs drives both routes with a stub Cordis context,
a stub registry and a temp DSH_HOME; test/smoke.mjs checks the manifest shape
and that every module imports.
CI runs the same commands on Ubuntu and Windows with Node 22 — see
.github/workflows/ci.yml.
MIT
CLASSIFICATION EVIDENCE
系统优先读取 GitHub Topics,再与站内分类词典和词根规则比对。当前命中: session。