In the DeepSeek Harness development workflow, observing an agent’s file modifications is a common pain point. Although tool calls (such as edit and write) record the operations, the interface usually only displays the original function signatures, lacking specific changed-line statistics and a summary of the affected file scope. This makes it difficult for developers to quickly assess the scale of code changes and inconvenient to review file modifications directly within the conversation.

haoyueqin/dsh-diff-stat is a DeepSeek Harness Web plugin. Maintained by HaoyueQin, it aims to improve the visibility of file changes through visualization. Its core value is displaying inline change badges (+N −M) on edit/write tool lines and providing a file-change summary card at the end of each conversation turn.

Core Features

The plugin covers native edit/write calls, opt-in str_replace_editor, and PTC dispatch subcalls. Below are its main capabilities:

  • Inline change badges: Takes over native modification tool lines and displays actual changed lines (+N −M). Statistics are based on real-time LCS (longest common subsequence) logic, yielding precise results.
  • Aligned Diff window: Clicking a line expands a height-limited scrolling view. The Diff view is aligned via LCS; shared lines are rendered as context, unchanged lines are collapsed, and the bottom precisely counts rendered lines.
  • Line-number guides: The file view displays line numbers 1..N, and the Diff window anchors code blocks to their real positions in the current file. If positioning is unavailable, the window still renders relative line numbers.
  • Turn summary card: At the end of each conversation turn, a collapsible summary bar (such as “N files changed +X −Y”) is displayed. Each line includes a file-type icon, directory, changed lines, Review button, and Undo button. Multiple edits to the same file are merged in the statistics.
  • PTC dispatch fallback: For PTC dispatch subcalls, due to the absence of a native Wire Diff, the plugin derives a Diff from call parameters and merges file information from the chat tool tree into the summary card.
  • Context enrichment: When expanding a Diff, the plugin attempts to read the file through the host API and adds ±3 lines of real file context around parameter snippets.
  • Undo support: Supports rolling back file modifications from the current turn to the state before that turn started. Atomic commits and uniqueness checks ensure safe rollbacks.
  • Multilingual support: The interface language follows the Web UI setting (Chinese and English are supported).

Installation and Enabled

Note: This plugin is retired and no longer maintained. Do not install it. Since version 0.1.6-alpha.2, DeepSeek Harness natively supports inline +N −M badges, end-of-turn file change cards, and per-file Review tags. The plugin’s main functionality has already been replaced by built-in features.

Typical Usage

Because the plugin has been replaced by official native features, the following only describes its original intended use:

  1. View inline statistics: In the conversation, when the agent calls edit, write, or the opt-in str_replace_editor, change statistics badges automatically appear next to the tool line.
  2. Expand the Diff: Click the line with the badge to expand the aligned Diff window and inspect the specific code modification details.
  3. Use the summary card: At the bottom of the conversation list, a summary card appears after each turn ends. Click a file line to expand a preview, or open the file via the dropdown menu.
  4. Undo changes: In a file line of the summary card, click the Undo button to restore files modified in that turn to their state before the turn started.

Applicable Scenarios and Notes

The plugin is suitable for scenarios where you need to intuitively track the scale of code changes and perform quick code review within the conversation flow. Given that the plugin has been retired, it is recommended to use Harness native features directly.

The plugin runs with the permissions of the current DSH process. Ensure that you review the source code and license (MIT) before installing. Because the plugin is no longer maintained and some features have compatibility issues on newer Harness versions, do not rely on its specific implementations in production environments.

Summary

dsh-diff-stat addresses the lack of intuitive file-change tracking in DSH through visualization. Although it has now been replaced by official native features, its undo support and specific Diff alignment logic remain valuable for reference.