BrambleXu/dsh-revdiff 预览 preview

BrambleXu/dsh-revdiff

插件Plugin 原生Native ⭐ 3 MIT 编程Coding

Native interactive Git diff review for DeepSeek Harness with structured annotations sent back to the current Agent session. 深度求索工具链原生交互式 Git diff 审查,支持结构化批注回传至当前 Agent 会话。

项目介绍Project Overview

dsh-revdiff 是 DeepSeek Harness 的原生交互式 diff 审查插件。它读取 Git unified diff,解析为文件、hunk 与行位置,呈现自有终端审查界面,并把提交的注释通过 agent.followup() 队列为该 Agent 的下一轮持久跟进。适用于希望在同一会话内完成 diff 浏览、注释与反馈下发的场景。注意:仅审查 git diff 已表达的文本变更,不支持未跟踪文件、二进制补丁、鼠标操作或浏览器界面,且需 Harness 进程拥有交互式终端。

dsh-revdiff is a native interactive diff review plugin for DeepSeek Harness. It reads a Git unified diff, parses it into files, hunks, and line locations, presents its own terminal review interface, and queues submitted annotations as the Agent's next durable follow-up turn via agent.followup(). Use it when reviewing changes inside Harness without switching to an external tool. Caveat: version 0.1 only reviews textual changes already expressed by git diff; untracked files, binary patches, mouse input, and a browser-hosted review surface are not included, and the Harness process must own an interactive terminal.

或使用命令行安装(适合开发者)Or use CLI install (for developers)

命令行安装CLI Install

dsh plugin --profile web add github:BrambleXu/dsh-revdiff

BrambleXu/dsh-revdiff 加入你的 DSH 配置(web profile)即可启用。

READMEREADME

dsh-revdiff

dsh-revdiff hero

MIT license Node.js ^22.19 or >=24 TypeScript 5.9 Tests with Vitest

awesome · DSH plugin · development

English | 中文

Native interactive diff review for DeepSeek Harness. The plugin reads a Git unified diff, parses it into files, hunks, and line locations, presents its own terminal review interface, and queues submitted annotations as the Agent's next durable follow-up turn.

Why this exists 💡

Reviewing a diff in a separate tool breaks the connection between the change, the review context, and the Agent that will act on the feedback. dsh-revdiff keeps review inside Harness, so annotations are created against the actual Git diff and returned to the same durable session.

Features ✨

  • Review tracked working-tree, staged, unstaged, or base-revision changes with optional path filters.
  • Navigate between files, hunks, and diff lines from an interactive terminal.
  • Add, edit, and delete issue, suggestion, question, or praise annotations.
  • Submit structured annotations to the current Agent through agent.followup() with message provenance.
  • Configure Git execution, diff context, size and time limits, terminal grace period, and comment length.

Install 📦

Add this checkout to a Harness profile:

dsh plugin --profile demo add ./dsh-revdiff

The only external runtime requirement is Git in the same execution world as Harness.

Use 🚀

/revdiff
/revdiff --staged
/revdiff --unstaged
/revdiff main
/revdiff --base main -- src/index.ts README.md

The default reviews all tracked working-tree changes against HEAD, including staged and unstaged changes. --staged reviews the index, --unstaged reviews only worktree changes relative to the index, and a base revision reviews the working tree against that revision. Put path filters after --.

The Harness process must own an interactive terminal. The review interface supports:

  • / or k/j: move between diff lines
  • n/p: move between hunks
  • ]/[ or /: move between files
  • a: add an issue, suggestion, question, or praise annotation
  • e: edit the selected line's annotation
  • d: delete the selected line's annotation
  • s: submit annotations to the current Agent
  • q, Escape, or Ctrl-C: cancel without sending a message

Annotations retain the file, old/new side, line number, selected code, kind, and comment. They are sent through agent.followup() with dsh-revdiff message provenance, so the review enters the same Harness session rather than an external side channel.

Configure ⚙️

Override the inserted row in a later Harness patch layer:

- id: dsh-revdiff
  name: dsh-revdiff
  config:
    gitBinary: git
    contextLines: 3
    maxDiffBytes: 2097152
    diffTimeoutMs: 30000
    graceMs: 2000
    maxCommentLength: 4000

Develop 🧑‍💻

pnpm install
pnpm run check

Scope 🎯

Version 0.1 reviews textual changes already represented by git diff. Untracked files, binary patches, side-by-side rendering, mouse input, and a browser-hosted review surface are not included yet. The review engine and annotation model are owned by this project so those capabilities can evolve for Harness without following another review tool's interface.

License 📄

MIT

Credits 🙏

The product idea is informed by pi-diff-review and revdiff, but this is an independent implementation built specifically around Harness commands, managed subprocesses, Agent lifecycle, and message provenance. It does not install, execute, wrap, or parse output from revdiff.

上一个 Prev deepseek-harness-plugin-mcp 下一个 Next dsh-testgen