nuwa-skill
alchaincyf
你想蒸馏的下一个员工,何必是同事。蒸馏任何人的思维方式——心智模型、决策启发式、表达DNA。Distill how anyone thinks.
PROJECT TOPICS
INSTALL REFERENCE
dsh plugin --profile web add github:longsunny6/dsh-session-delete
该命令指向仓库当前默认分支;尚无绑定当前 commit 的完整验证结果。
PROJECT README
A DeepSeek Harness (DSH) plugin that adds Delete this conversation… to the session right‑click menu. Deletion is deferred until DSH quits (the Host keeps the session log open while it runs), and the session is moved into a recycle bin instead of being erased. Pending deletions can be undone, and recycle-bin entries can be restored or purged from a sidebar panel.
Community plugin. Not affiliated with DeepSeek.
⋯ menu)session*.jsonl(.zstd) log are moved; the move is verified and rolled back on failure%USERPROFILE%\.dsh\sessions; backup files are never deleted, so sessions removed later remain recoverableClone this repository anywhere:
git clone https://github.com/longsunny6/dsh-session-delete.git
In DSH Desktop, open Plugins → Add plugin… and choose the cloned folder (local directory installation links the checkout, so git pull updates the plugin files).
If the bundle row is not enabled, enable it.
Fully quit and reopen DSH Desktop so the Host half loads, then the page reloads with the client plugin.
Ctrl+R) to see the session in the list againDelete %USERPROFILE%\.dsh\session-delete-queue.json. The waiting helper notices the file is gone and exits.
| Piece | Role |
|---|---|
index.js |
Host plugin. Registers authenticated routes on the DSH connection fetch channel: GET/POST/DELETE /api/session-delete (pending list, queue, cancel) and GET/POST /api/session-recycle-bin (list, restore, purge, empty). |
client.js |
Browser module. Adds the session-row menu entry through the sidebar.workspaces.session.menu.item slot, a sidebar panel icon, and a main panel page. |
lib/recycle.js |
Queue file and recycle-bin storage: move into <DSH_HOME>/session-recycle-bin/<timestamp>_<sessionId>/, with meta.json recording the original absolute paths, plus list/restore/purge. |
scripts/delete-sessions.ps1 |
Detached PowerShell helper. Waits for the Host PID to exit, then moves queued sessions into the recycle bin. Single-instance lock; failed entries stay queued. |
Data locations (default DSH_HOME is %USERPROFILE%\.dsh):
session-delete-queue.jsonsession-recycle-bin/<entry>/log-0/, projection-cache.json, meta.jsonsession-backups/<timestamp>_<sessionId>/ (copy made when queued) and session-backups/mirror/ (daily additive mirror)session-delete.logThe recycle bin never overwrites existing files on restore: if the original path is occupied, restore fails and the entry is kept.
Two independent layers protect the logs:
<backup root>/<timestamp>_<sessionId>/. This happens before anything is moved, so even a crash between queueing and quitting leaves a full copy.<DSH_HOME>/sessions into <backup root>/mirror/. New and changed files are copied; files already in the mirror are never deleted, so a session deleted later can still be recovered from the mirror. The recycle-bin panel shows the last run and provides Back up now.The backup root defaults to %USERPROFILE%\.dsh\session-backups (same drive). Set the environment variable DSH_SESSION_BACKUP_ROOT to a path on another drive before starting DSH, for example:
setx DSH_SESSION_BACKUP_ROOT "E:\dsh-session-backups"
Then restart DSH. Logs are copied byte-for-byte (.jsonl.zstd files are self-contained), and copies are never removed by the plugin; delete old folders yourself if disk usage matters.
DSH_HOME. Point DSH_SESSION_BACKUP_ROOT at another drive to survive drive failure.storages/workspace.json); stale session ids there are ignored by the session list and are harmless.npm test # node --test; exercises lib/recycle.js against a temporary DSH_HOME
The unit tests do not need a DSH installation. The Host and client halves are loaded by DSH itself; installing the bundle is the integration test.
CI: .github/workflows/test.yml runs the unit tests on every push and pull request.
这是一个给 DeepSeek Harness 的社区插件:会话右键菜单新增 删除此对话…。因为 DSH 运行时一直占用会话日志的写入句柄,插件把删除推迟到进程退出之后,并且移入回收站而不是直接抹掉。
session*.jsonl(.zstd) 的目录才会被移动,移动后还会校验,失败自动回滚。%USERPROFILE%\.dsh\sessions 增量镜像到备份目录,备份文件永不删除,之后被删除的会话仍可从镜像恢复。设置环境变量 DSH_SESSION_BACKUP_ROOT 可把备份放到其他盘。%USERPROFILE%\.dsh\session-delete-queue.json,回收站 %USERPROFILE%\.dsh\session-recycle-bin\,备份 %USERPROFILE%\.dsh\session-backups\,日志 %USERPROFILE%\.dsh\session-delete.log。CLASSIFICATION EVIDENCE
系统优先读取 GitHub Topics,再与站内分类词典和词根规则比对。当前命中: session-management。