Preface¶
The plugin ecosystem of DeepSeek Harness (DSH) enables developers to extend the conversation processing pipeline. When handling file operations, an Agent’s write or edit results are usually only output as text, lacking visualized history tracking and rollback mechanisms. The dsh-review-checkout plugin is designed to capture these operations, convert the modifications from each turn into a display similar to the official “Edited” cards, and provide a review view that supports syntax highlighting, real line numbers, and restore operations.
Core Features¶
The plugin mainly provides the following capabilities:
- Per-round “Edited” cards: Reproduces the official card style (16px rounded corners, icon block,
+N −Mstatistics), and supportsUndo(generates a diff sequence per round) andReview(jumps to the review tab) actions. - Review view: Supports dragging the divider to adjust the width of the file list and diff area, supports switching between dual views (list/detail), and provides syntax highlighting with real line numbers.
- Three-level opening chain: Clicking a file line can launch the selected editor and jump to the line number, or open it with the system default application, and finally fall back to the built-in preview.
- Runtime capsule: Displays the current session’s file change statistics above the input box.
- Theme and colors: Cards and capsules follow the DSH theme, and the diff color scheme can be customized.
Installation and Enablement¶
Run the installation command in the terminal:
dsh plugin add dsh-review-checkout
After installation, you need to register a bundle patch in the DSH profile configuration for it to take effect. Edit ~/.dsh/profiles/<profile>/cordis.patch.yml and add the following content:
- insert:
- id: diff-review
name: 'dsh-review-checkout'
Usage Instructions¶
- View changes: In the conversation stream, file modifications in each turn generate an “Edited” card. Hovering over a line in the card shows the diff context around that line.
- Review tab: Click “Review” on the card or click a line to enter the review tab. Here, you can view file changes across all turns or restore a single file.
- Undo operation: The “Undo” button on the card generates a reverse-ordered
diff_review_reverttool call sequence into the input box; the review view header also includes a single-file restore button. - Open file: Each line in the review view has an “Open line in editor” button on the left, supporting line positioning in editors such as VS Code and the JetBrains family.
Working Principle and Notes¶
The plugin listens to tools/result events to record operation snapshots for write/edit, and appends them per session to ~/.dsh/profiles/<profile>/diff-review-state/<session>.jsonl. The client polls every 5 seconds to rebuild the view.
* Permissions and restarts: Changes on the host side (lib/index.js) require restarting dsh web or Desktop; pure client-side changes only require a page refresh.
* Storage usage: The disk usage of this session (shards and snapshots) is displayed on the right side of the review tab toolbar. Clicking “Clear” deletes the session records and reclaims orphaned snapshots.
* Official cards: The official “Edited” cards are hidden by default, and the takeover can be disabled in settings.
* Line number positioning: Prefers the lineHint from an untruncated snapshot, then falls back to archived snapshots, and finally uses the current file on disk.
* Path safety: Opening files only accepts absolute paths that can be verified by the host (the workspace of the current session or the directory containing the file).
Compatibility¶
- dsh web: Supports version 0.1.6-alpha.2 and above.
- DSH Desktop: Supports all features.
- Older hosts: Supports versions ≤0.1.5 (compatible with the
turnTailsemantics).
Summary¶
This plugin maintains local operation snapshots and a review view, filling a gap in official DSH regarding file rollback and history tracking. It is suitable for developers who frequently perform file operations in long sessions and require precise control over change rollback.
Plugin Directory: DeepSeek Harness Plugin Marketplace
Source Code: GitHub