Tlyer233/dsh-vscode-review ↗★ 0
@dsn/dsh-review
dsh review plugin: journals every AI write/edit into a change-manifest store, opens the Trae diff view, exposes review_status / review_revert / review_open tools — no git involved.
安装
$
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:Tlyer233/dsh-vscode-review说明文档
阅读完整 README ↗@dsn/dsh-review
dsh 的 review 插件:AI 每次用 write / edit 修改文件时,自动记录改动并打开 Trae 的双文件 diff 视图;提供三个工具让模型(和你)审查、验证、撤回改动——全程不依赖 git。
dsh (write/edit) ─▶ review 插件 ─▶ 记录 before/after 快照 ($DSH_HOME/review/changes/)
└─▶ trae --diff (自动打开 diff)
├─ review_status 列出改动并验证磁盘内容是否与写入一致 (match/drifted/missing)
├─ review_revert 用 before 快照还原(版本守卫,防覆盖新改动;新建文件则删除)
└─ review_open 重新打开某个改动的 Trae diff
安装(web profile)
cd "/Volumes/SAMSUNG_1T/Documents/CodeBeach/project/dsn plugins"
dsh plugin --profile web add "$PWD/dsh-review" # pnpm add + 自动加入 bundles
dsh --profile web --dump-config | grep -A8 "id: review" # 确认行已合成
# 重启 dsh web 生效(重启后恢复会话即可)
- 包通过
link:指向源码目录,改代码即时生效(重启 dsh 后加载最新版)。 - 配置文件:插件自带
cordis.patch.ymlinsertid: review;如需覆盖,在~/.dsh/profiles/web/cordis.patch.yml里按 id 覆盖该行的 config。
配置项(row config)
| 键 | 默认 | 说明 |
|---|---|---|
enabled | true | 总开关 |
autoOpenDiff | true | 每次 write/edit 成功后自动打开 Trae diff |
openOnRevert | true | 撤回后打开 diff(左侧=改动前快照, 右侧=还原后文件) |
traeCommand | '' | 空=自动探测 /Applications/Trae.app/.../bin/trae 等;也可指向 VS Code CLI(code --diff 同接口) |
reuseWindow | true | 传 --reuse-window 复用已打开的 Trae 窗口 |
trackTools | ['write','edit'] | 监听哪些工具 |
maxSnapshotBytes | 10 MiB | before/after 快照上限;超出时 before 仅作预览、不可撤回 |
三个工具
review_status:参数file_path?/limit?/include_reverted?。逐条返回verified(match=磁盘内容==写入内容;drifted=之后被人改过;missing=文件没了;reverted=已撤回), 以及增删行数统计。review_revert:file_path(必填)+ (默认最新一条未撤回记录)。 用 before 快照写回,附:文件在 AI 写入之后又被改过则拒绝(), 避免覆盖你的手动修改。AI 新建的文件撤销 = 删除该文件。