Introduction

In DSH, agents call edit, write, and str_replace_editor to modify files. Without a unified review entry point, developers need to manually confirm which changes to keep and which to revert across multiple files.

dsh-diff-approval provides a sidebar review panel: it aggregates successful file changes into a pending list, displays differences using an overall file diff, and supports executing Keep / Revert by block, range, file, or all.

Overview

dsh-diff-approval is a DeepSeek Harness (DSH) plugin, positioned as a pending-edit review: it automatically records successful edit, write, and str_replace_editor changes and aggregates them into a pending list in the sidebar.

The repository owner is 9087, and the license is MIT.

Core Features

Below are the verified capabilities.

Automatic Tracking and Pending List

When using the agent normally, successful edit, write, and str_replace_editor changes are automatically recorded and aggregated into the pending list in the sidebar.

Overall File Diff View

The panel provides an overall file diff view, including syntax highlighting, +/− counts, scrollbar overview, in-file search, and virtualized lines.

Keep / Revert

Supports jumping between change blocks and executing Keep or Revert on a single block.

Also supports dragging to select a row range and then executing Keep or Revert on the selected range.

Supports Keep/Revert by file, as well as Keep all / Revert all.

Undo, Redo, and Shortcuts

Provides Ctrl+Z / Ctrl+Y undo/redo.

Supports the following shortcuts:

Ctrl+D            Open review panel quickly
Esc               Close panel
Ctrl+Tab          Switch pending file
Ctrl+Shift+Tab    Switch pending file

Line References and Composer

Supports obtaining (file:line) or (file:start-end) line references by selecting text from the diff, and can be copied or automatically pasted into the composer according to settings.

Language Highlighting and Wrapping

Supports automatic detection of highlighting language, wrapping override by language, and automatic wrapping memory by language.

Comparison View

Supports an optional side-by-side split view comparison view.

Import Workspace Version Control Changes

Supports importing workspace Git/SVN/Perforce local modifications, deletions, and optional untracked files.

Persistence

Supports persisting pending status to workspace files and retaining them after restart.

Installation and Usage

First, confirm that the dsh command is available in the DSH environment. The following command adds the plugin to the web profile:

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

After installation, you can enter the review panel via the Pending changes action at the bottom of the sidebar.

Typical Usage

  1. When using the agent normally, successful edit / write / editor(str_replace_editor) calls are automatically recorded.
  2. Click the Pending changes action at the bottom of the sidebar to view the diff for each file and execute Keep / Revert.
  3. When the pending list is empty, use Import workspace changes to import local version control changes from Git/SVN/Perforce.

Applicable Scenarios and Notes

Suitable for reviewing file changes generated by agents in DSH, especially scenarios that require confirming changes one by one, keeping partial modifications, or reverting partial modifications. If the workspace uses Git, SVN, or Perforce, local version control changes can also be imported when the pending list is empty.

Notes to pay attention to:

  • Only automatically tracks successful edit, write, and str_replace_editor changes; deletions outside the tool will only show File is gone in tracked files; Revert can restore the file.
  • VCS import runs read-only Git/SVN/Perforce commands via shell executor; the relevant CLI must be in PATH.
  • Importing untracked files is disabled by default and scans the entire workspace; large directories may be slow.
  • Reverting a created file will delete the file because the fs seam does not have a delete API.
  • When reverting a file, line endings (LF/CRLF) are preserved as they are and written back.
  • Entries without a workspace session are only stored in memory; corrupted persistent files are rejected and can be deleted to reset.
  • The entry at the bottom of the sidebar stacks vertically with other plugins and yields to the dsh-footer-order plugin when present.
  • The plugin runs with the current dsh process permissions; check the source code and license before installing.

Conclusion

Following the steps above, dsh-diff-approval can aggregate file changes in DSH into a list that is reviewable, reversible, and batch-processable. The repository address is as follows:

https://github.com/9087/dsh-diff-approval