yycf1/dsh-plugin-delete-session ↗★ 0
dsh-plugin-delete-session
Delete DeepSeek Harness sessions with confirmation, undo, and a 7-day recycle bin. 适合需要安全删除会话并保留短期恢复余地的用户,需重启生效。
설치
$
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:yycf1/dsh-plugin-delete-session使用
- 在左侧会话列表找到目标对话,打开
...菜单; - 点击 删除对话,确认;
- 会话立即从列表消失,顶部出现带“撤销”的提示;
- 7 天内点击提示里的“撤销”,或打开侧栏底部的回收站点击“恢复”;
- 在回收站点击“彻底删除”可立即永久删除。
删除的是会话日志和它的投影缓存;全局附件库按内容寻址共享,不会被删除。
配置
默认配置在 cordis.patch.yml:
- insert:
- id: dsh-plugin-delete-session
name: 'dsh-plugin-delete-session'
config:
retentionDays: 7
| 字段 | 默认值 | 说明 |
|---|---|---|
retentionDays | 7 | 回收站保留天数(1–3650)。 |
trashRoot | $DSH_HOME/session-trash | 回收站目录。 |
sessionsRoot | session-persistence 的 root,否则 $DSH_HOME/sessions | 会话日志根目录。 |
projectionCacheDir | $DSH_HOME/storages/session_projcache/sessions | 投影缓存目录。 |
homeDir | $DSH_HOME,否则 ~/.dsh | 未显式给出路径时使用的数据目录。 |
purgeIntervalMs | 3600000 | 自动清理间隔(最小 60 秒)。 |
在 profile 的 cordis.patch.yml 中覆盖 config 可以修改保留天数;patch 会替换整行配置,因此请同时写出需要保留的其他字段。