Foreword¶
When running agent conversations in DeepSeek Harness (DSH), the model modifies files through write and edit tools. After a round of dialogue, changes are often scattered across multiple paths. Relying solely on terminal logs or post-hoc git diff makes it difficult to review “what changed in this round.”
The dsh-change-review plugin introduced below (maintained by cirelir) is a client-side plugin in the DSH community directory that automatically tracks file writes and edits within conversations in the web interface. It displays line-level diffs with customizable colors, supports session isolation, subagent aggregation, and SSE real-time push. The current version is v0.3.0, with approximately 9 stars and 2 forks on GitHub, licensed under MIT.
What Is This¶
In one sentence: a conversation-level modification review plugin—monitors write/edit tool calls, saves content before and after with timestamps, and renders customizable line-level diffs in the browser.
A single npm package contains both Host logic and browser UI (dsh.bundle + dsh.client manifest), designed for the dsh --profile web configuration and not suitable for pure CLI scenarios.
Core Features¶
Automatic Tracking and Diff Display¶
The plugin monitors write and edit calls in conversations, recording before-and-after snapshots for each operation. The display layer uses LCS line-level diffs: added lines (green), deleted lines (red), and context lines (gray), with line numbers on both sides.
Session Isolation and Subagent Aggregation¶
Each session only reviews its own changes; switching sessions switches the review scope. Changes made by subagents are aggregated along the owner chain to the root parent session, preventing missed file modifications in sub-sessions.
SSE Real-Time Push¶
The Host pushes events via SSE (/diff-review/events), and the client only processes updates for the current session. The pending file count on the “Review” tab increments in real-time as changes occur, without polling.
Session-Level and Turn-Level Review¶
The “Review” tab (located between “Conversation” and “Trace”) provides a session-wide file list and diff preview. The left side lists files grouped by directory (including write/edit counts and approximate lines added/deleted), while the right side displays the diff for the selected file; scrolling is independent on both sides. A top toggle can limit the view to this session or the latest turn.
After each round of dialogue, a “Review Changes This Turn” card appears at the end, listing files modified in that round. Expanding it shows diffs with per-operation rollback. Cumulative session changes remain in the “Review” tab; the two views are complementary, not mutually exclusive.
Rollback Modifications¶
All rollback operations require confirmation and write directly to disk:
- Rollback this item: Restores the content before a specific write/edit operation. Non-overlapping subsequent changes are preserved; overlapping changes are rejected with a prompt.
- Rollback all changes: Restores the file to its state before the first recorded change in this session. If the file was created during the session, it is deleted.
Records created before the upgrade, which lack saved content snapshots, cannot be rolled back (the rollback button is not displayed in the UI).
Color Customization¶
Under Settings → Modification Review, you can configure 12 color items (including added/deleted line background/text, context, line numbers, badges, turn cards, etc.), each with an RGBA transparency slider. Presets for light/dark themes and default restoration are supported. Configuration is saved in localStorage (key: dsh.diff-review.colors).
Other Interface Behaviors¶
The plugin hides the Cordis plugin running indicator (cordis-panel) in the left sidebar to reduce visual clutter.
Installation and Enabling¶
Install via dsh command (Recommended)¶
After the plugin is published to npm, execute the following under the Web configuration:
dsh plugin --profile web add dsh-change-review
Restart dsh web after installation.
Manual Deployment¶
- Place the package in a location resolvable by the harness (e.g.,
node_modules) and register it in the profile’scordis.patch.yml:
- insert:
- id: diff-review
name: 'dsh-change-review'
- id: ui-diff-review
name: 'dsh-change-review'
- Restart
dsh web.
Community directory page: SkillHub — dsh-change-review. SkillHub is an independent community site with no official affiliation to DeepSeek or幻方.
Typical Usage¶
- Open a conversation and click the “Review” view tab.
- Select a target file in the file list; view the diff on the right side. Use the top toggle to switch between “This session” and “Latest turn.”
- When a file is modified, the tab badge updates in real-time. Use ↻ to refresh or Clear to remove current session records.
- To roll back, click Rollback this item in the diff block header, or Rollback all changes at the top of the details.
- After each round of dialogue, view the “Review Changes This Turn” card at the end of the conversation. Click a filename to expand the diff and roll back items individually.
- Adjust diff colors: Go to Settings → Modification Review; changes are saved automatically and persist after page refresh.
Review records are persisted to ~/.dsh/profiles/web/diff-review-state.json (with debounced auto-saving and synchronous disk flushing on exit) and automatically restored after restarting dsh web. Deleting this file clears all history.
Behavioral Boundaries and Notes¶
Capacity Limits (from README behavior description):
- Each file records up to 100 operations
- Single operation content exceeding 120KB is truncated
- Diff display shows up to 1500 lines per side
- Three-way merge used for single rollback supports up to 2000 lines per side
Upgrade Notes: Host-side changes require restarting dsh web; browser-side changes only need a page refresh. Old records without turn information do not appear in turn cards but can still be viewed in the “Review” tab.
Permissions and Security: The plugin runs with the current dsh process permissions, and rollback operations write directly to disk. Before installation, it is recommended to read the source code and confirm the MIT license. Do not enable it blindly in production environments without review.
Target Audience: Developers who need to see in real-time which files AI modified in DSH web sessions, roll back by turn or operation, and review subagent changes in a unified view. If you only care about the final git state and don’t need in-session visual review, installation is optional.
Summary¶
dsh-change-review transforms write/edit changes in DSH conversations into a browsable, diffable, and rollable review flow. It adapts to complex multi-turn, multi-agent sessions through session isolation, subagent aggregation, and SSE push. Installation is just one command under the Web profile.
- Community directory: https://www.skillhub.cn/plugins/cirelir/dsh-change-review
- Source code and documentation: https://github.com/cirelir/dsh-change-review