nuwa-skill
alchaincyf
你想蒸馏的下一个员工,何必是同事。蒸馏任何人的思维方式——心智模型、决策启发式、表达DNA。Distill how anyone thinks.
PROJECT TOPICS
INSTALL REFERENCE
dsh plugin --profile web add github:WangShuangTong/dsh-chat-history-cleaner
该命令指向仓库当前默认分支;尚无绑定当前 commit 的完整验证结果。
PROJECT README
DSH 历史会话清理插件:在会话菜单删除单条会话,或在设置页按项目批量清理。删除先进入可恢复的回收站,确认后再彻底删除。
English — A DSH plugin to delete chat history safely. It adds a Session menu action and a Settings → Session history page with per-project filtering, a recoverable trash, restore, and permanent purge. See README.en.md.
全部项目、各项目、无项目目录);~/.dsh/trash/chat-history/,恢复时移回原项目目录。要求 DSH 0.2.2-rc.1 或更新的 0.2.x。发布物是自带构建产物的 Release tarball,不需要在安装时构建。
打开 DSH → 设置 → 插件 → Add plugin,粘贴当前版本的 Release 地址:
https://github.com/WangShuangTong/dsh-chat-history-cleaner/releases/latest/download/dsh-chat-history-cleaner.tgz
安装完成后按提示启用;如果提示需要重启,重启 DSH / Desktop 即可。
dsh plugin --profile <profile> add https://github.com/WangShuangTong/dsh-chat-history-cleaner/releases/latest/download/dsh-chat-history-cleaner.tgz
把 <profile> 换成 web、desktop 或你使用的 profile。
git clone https://github.com/WangShuangTong/dsh-chat-history-cleaner.git
cd dsh-chat-history-cleaner
pnpm install
pnpm run check
然后在插件页选择该目录,或使用 dsh plugin --profile <profile> add /absolute/path/to/dsh-chat-history-cleaner。源码安装需要本机有 pnpm 与 Node 24。
这份插件目前以 GitHub Release tarball 分发,未发布 npm 包。
在 profile 的 cordis.patch.yml 中按行 id 覆盖(patch 会整体替换 config,需写全要保留的键):
- id: chat-history-cleaner
config:
debug: false
maxBatch: 200
toastMs: 4000
# trashDir: D:\dsh-trash\chat-history # 可选,绝对路径
| 键 | 默认 | 说明 |
|---|---|---|
debug |
false |
客户端加载时输出诊断日志 |
maxBatch |
200 |
单次请求最多处理的会话 / 回收站条目数 |
toastMs |
4000 |
浏览器提示停留毫秒数 |
trashDir |
<DSH home>/trash/chat-history |
回收站根目录,必须为绝对路径,且不能与 sessions 目录重叠 |
sessionPersistence.list(),并用 stat.location.path 推导真实目录;只移动该会话目录,不删除项目目录或 sessions 根目录。meta.json 原子写入。x-dsh-chat-history-token),token 只注入页面;无 token 403,非法请求 400,超大请求体 413。storages/session_projcache)属于派生数据,移入回收站时尽力删除;恢复后由冷读自动重建。unsupported-storage。pnpm install
pnpm run typecheck
pnpm run test
pnpm run build
pnpm run check
src/host/:宿主半(配置、路径安全、回收站操作、HTTP 路由)。src/client/:浏览器半(菜单项、设置页、确认弹窗、Toast、API 封装)。src/shared/types.ts:两边共用的 wire 类型。scripts/build.mjs:esbuild 双产物;客户端包在 __ModuleLoader__.load 协议里,React / ReactDOM 保持平台模块。test/:node:test + tsx;覆盖移动、恢复、彻底删除、回滚、拒绝场景、路径穿越、软链、HTTP 校验和筛选逻辑。CLASSIFICATION EVIDENCE
系统优先读取 GitHub Topics,再与站内分类词典和词根规则比对。当前命中: session-management。