wuxiangru915/dsh-review-loop:给 DeepSeek Harness 增加增量 diff 审查

前言

在 DSH 里,智能体经常会在一个 git 工作区里连续修改多个文件。如果每次审查都看全量 diff,容易重复确认已经看过的改动,也会把注意力分散到尚未发生的变更上。DSH 的扩展方式强调「一切皆插件」,第三方插件可以围绕宿主能力做增量增强;社区目录是独立站点,与 DeepSeek、幻方没有官方从属关系。

下面介绍 wuxiangru915/dsh-review-loop。它是一个面向 DeepSeek Harness 的增量 diff reviewer,用来把“审查 agent 的改动”变成一个小循环:批准当前一批改动,记录 checkpoint;下一次审查只显示 checkpoint 之后的变更。

插件定位

wuxiangru915/dsh-review-loop 是一个纯 bundle 插件,使用 dsh.bundle patch layer 接入,不修改 DeepSeek Harness 的核心代码。它提供两个入口:Web UI 的 review panel 和 /review 命令,共享同一套 checkpoint 逻辑。

这个插件使用 MIT 许可证,仓库由 wuxiangru915 维护。

核心能力

1、增量审查:批准时会快照当前工作树为 checkpoint;下一次审查只 diff checkpoint -> current

2、两个入口:Web UI review panel(2 秒轮询)和 /review 命令。

3、反馈闭环:批准时可以携带 comment,并通过 agent.inject() 作为用户消息注入给 agent。

4、直接读取 git:不解析工具调用,因此能反映任何 on-disk change。

5、checkpoint 持久化:写入 $DSH_HOME/review-loop/<workspace-hash>.json,使用原子写,不污染 workspace 的 git status。

6、零核心修改:作为 bundle 插件运行,不改动宿主核心。

安装与启用

运行环境需要:

  • DeepSeek Harness >= 0.1.0-rc.5 (Cordis 4.x)
  • 一个 git 仓库(硬前提)
  • Node.js >= 22

git-source 安装:

dsh plugin --profile web add github:wuxiangru915/dsh-review-loop

这一步会从 git 仓库安装插件。仓库附带预构建的 lib/ 产物,因此这条安装方式不需要用户机器执行构建。

安装后执行一次:

1、重启 web server。

2、硬刷新页面。

本地开发安装:

pnpm install && pnpm build
dsh plugin --profile web add /path/to/dsh-review-loop

本地开发要求 ../deepseek-harness 同级检出。部分 @deepseek-ai/dsh-* 包未完全发布到 npm,devDependencies 会链接到 workspace;如果检出路径不同,需要调整 package.json 中的链接路径。

典型用法

Web UI

在一个 workspace 是 git 仓库的 DSH 会话中,composer 上方会出现 review panel。可以在这里打开审查、查看 diff、填写 feedback,并点击 Approve & checkpoint。

面板提供文件列表、可切换的 diff 展示和反馈输入。批准后记录 checkpoint;如果之后文件再次被修改,它会重新进入待审列表。

命令

/review

显示自上次 checkpoint 起的增量变更;如果没有 checkpoint,则显示 vs HEAD 的完整变更。

/review all

显示相对 HEAD 的完整工作树变更,忽略 checkpoint。

/review approve

记录 checkpoint。

/review approve <comment>

记录 checkpoint,并把 comment 注入给 agent。

适用场景与注意

适合在 git 仓库中使用 DSH Web 会话,并希望按批审查 agent 改动的场景。它适合把长任务拆成“审查、反馈、继续执行”的小步循环。

注意:

  • 插件依赖 git 仓库;没有 git 仓库时无法作为审查对象。
  • checkpoint 文件写在 $DSH_HOME/review-loop/<workspace-hash>.json,不会进入 workspace 的 git status
  • npm 发布(@dsh-plugin/dsh-review-loop)在 Roadmap 中尚未完成,当前安装以文档给出的 git-source 和本地路径方式为主。
  • 插件会以当前 dsh 进程权限运行。安装前应检查源码与许可证,确认其读取 git、写入 checkpoint 和注入消息的行为符合你的环境要求。

参考链接

  • 目录页:https://www.skillhub.cn/plugins/wuxiangru915/dsh-review-loop
  • GitHub:https://github.com/wuxiangru915/dsh-review-loop
羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

小夜