dshbase

插件目录 / Developer / dsh-diff-approval

dsh-diff-approval

未验证 9087

✓ 持续维护 基于 14 个官方 DSH 包

查看 GitHub ↗ ← 返回插件目录

1Stars
0Forks
0未关闭 issue
语言
2026-08-20最近推送
跨平台平台

功能简介

Pending-change review for DeepSeek Harness: whole-file diffs with per-file Keep/Revert, create/delete tracking, and restart-safe persistence.

我们的评价
未验证 — 尚未实测

Pending-change review for DeepSeek Harness: whole-file diffs with per-file Keep/Revert, create/delete tracking, and restart-safe persistence. 尚未验证——请自行安装测试。

「未验证」表示我们的自动化 CI 尚未安装过该插件。功能描述与版本兼容性均为作者声明。这不是安全审计,也不代表对第三方代码的背书。

你是插件作者? 想拿到「已验证」标签——提交你自己的验证证据(截图、日志或短视频),我们审核通过后即改为「已验证」。

提交验证证据 ↗

README

dsh-diff-approval

English | 中文

npm version
CI

A DeepSeek Harness (DSH) plugin for pending-change review: it automatically tracks every successful edit, write, and editor (str_replace_editor) mutation, folds them into a single pending list in the sidebar where each file's diff can be reviewed and kept/reverted — and it can also import the workspace's version-control repository's local changes (Git / SVN / Perforce) in one click.

Pending changes panel

The numbered markers (① – ⑧) in the screenshot point to the matching details described below.

✨ Features

  • Diff view: syntax-highlighted whole-file diff ⑤ with +/− counts, an overview ruler ④ on the scrollbar showing where changes sit, and an in-file search (Ctrl+F). Rows are virtualized, so huge files stay smooth.
  • Block navigation & decisions: jump between change blocks with Ctrl+↑/↓ (or the previous/next buttons) — the focused block flashes. Hover a block to Keep or Revert just that block from a small actions frame ③ that also shows its position (e.g. "2/5").
  • Per-file and bulk decisions: the files in the file list ② can be kept / reverted one at a time, or Keep all / Revert all from its footer ⑦.
  • Undo / Redo: every keep, revert, and import is undoable with Ctrl+Z / Ctrl+Y (active while the panel is open; text inputs keep their own editing).
  • Line references: select text in the diff — the status bar shows its file:start-end reference; click it (or press Ctrl+L) to copy, and with the setting on it auto-pastes into the composer ⑥ and focuses it.
  • Highlight language: auto-detected from the file extension, or overridden from a dropdown ⑧.
  • Auto-wrap: a "Wrap lines" toggle beside the language selector ⑧ wraps long lines for that language (CJK breaks between characters, Latin words stay whole), remembered per language.
  • External changes: files already in the pending list are monitored — if one is later modified outside the reviewed edits (another tool, an editor), the panel adopts the new content and flags the divergence.
  • Open / Reveal: while reviewing a file's diff, open it in its default app or reveal it in the system file manager with one click.
  • Import workspace changes: when the list is empty, click the button to import the workspace's local changes from Git / SVN / Perforce — modified, deleted, and (opt-in) untracked files. The VCS root is found by walking up from the workspace, so a workspace inside a subdirectory works too.
  • Settings: a "Diff Approval" section in DeepSeek Harness settings with the preferences for auto-paste on copy, whether untracked files are included when importing, and the diff's tab width (2 / 4 / 8 spaces).
  • Persistence: pending state is stored per workspace at <dshHome>/diff-approval/workspaces/<workspaceId>.json and survives restarts — unhandled changes are still there when you come back, even in a fresh session.

📦 Install

If dsh is on your PATH:

dsh plugin --profile web add dsh-diff-approval

Or, if you run the harness through npx (e.g. npx @deepseek-ai/dsh web):

npx @deepseek-ai/dsh plugin --profile web add dsh-diff-approval

or manually: add the package to your profile's package.json dependencies and insert this row into the profile's cordis.patch.yml:

- insert:
    - id: diff-approval
      name: dsh-diff-approval
      # Optional: relocate durable pending state (defaults to
      # <dshHome>/diff-approval/workspaces).
      # config:
      #   storageDir: ~/dsh-pending

Then restart dsh web.

🚀 Usage

  1. Work with the agent as usual — successful edit / write / editor (str_replace_editor) calls are recorded automatically.
  2. Click the Pending changes action ① at the sidebar footer, review each file's diff, and Keep / Revert.
  3. When the list is empty, Import workspace changes pulls in the workspace's local Git/SVN/Perforce changes.

📝 Notes

  • Only tracked mutations (edit, write, and str_replace_editor editor calls) are recorded automatically. Deletions made outside these tools (e.g. shell rm) are sensed only for tracked files: the entry turns "File is gone" and its Revert restores the file.
  • The VCS import runs read-only Git/SVN/Perforce commands through the deployment's shell executor, so the respective CLI must be on PATH. Importing untracked files (default off) scans the whole workspace, which can be slow on large trees.
  • Reverting a created file deletes it (the fs seam has no delete API).
  • Sessions with no workspace keep their entries memory-only; corrupt persistence files are rejected and can be deleted to reset.

🛠 Development

corepack pnpm install
pnpm run typecheck   # tsc over both faces
pnpm run build       # emits lib/index.js and lib/client.js
pnpm test

安装

🧩 让 Agent 自动装(推荐)

装一次目录插件,之后本站所有插件都能让 DeepSeek Harness 自动找、自动装:

dsh plugin add dshbase-catalog

然后对 agent 说「帮我装 dsh-diff-approval」,它会在目录里找到并自动安装。文档:dshbase-catalog · 已验证场景包

该插件是 GitHub 源码(未发 npm)——直接从仓库装:

Web profile:

dsh plugin --profile web add github:9087/dsh-diff-approval

Headless(CLI)profile:

dsh plugin --profile headless add github:9087/dsh-diff-approval

实测报告

尚未 L3 验证——若已跑过,见下方失败备注。

状态:pending · 最近测试 2026-08-26 · 标记 webonly
备注:验证: web-only;待 L4 web CDP;L4 web CDP runtime-fail on dsh 0.1.0-rc.8. 浏览全部待验证失败 →
安全:尚未扫描——我们的每日静态扫描将很快覆盖它。

分享徽章

Developer 里更多

浏览全部 7795 个插件 →