Introduction

In the DeepSeek Harness (DSH) Web interface, edit / write tool calls appear in the conversation flow. If you only see the tool results, you usually need to compare “Before” and “After” to confirm the scope of changes.

dsh-code-diff-viewer is a third-party client plugin for the DSH Web interface. It renders these tool calls as collapsible “Before / After” code panels for viewing code changes in the conversation.

What is this

kelai141/dsh-code-diff-viewer is a third-party plugin for DSH, maintained by kelai141, with an MIT license. It is used to extend the display of edit / write tool calls in the DSH Web interface, without creating new modes or saving any files to disk.

This plugin is not an official DSH component.

Core Features

Before and After Comparison

The plugin selects the display format based on the change type:

  • Mixed additions/deletions: A left-right double-column display of “Before / After”
  • Pure additions: A single column displaying green-added content
  • Pure deletions: A single column displaying red-deleted content

Absolute Line Numbers

The plugin infers the absolute starting line for each hunk via the Host /cdv-locate endpoint and displays the real line numbers in the panel. This allows you to locate changes even if they occur in the middle of the file.

Syntax Highlighting

The plugin includes a lightweight tokenizer for syntax highlighting. Supported languages include JS/TS, Python, CSS, HTML, Shell, JSON, YAML, etc.

Card Folding

Tool call cards support collapsing. The most recent modification is automatically expanded, while older cards remain collapsed, making it easy to view recent changes in the conversation flow.

Injection Method

The plugin injects into the DSH conversation flow in a purely visual manner, without creating new modes or saving any files to disk. It is mounted as a static bundle layer and becomes active after dsh starts, requiring no approval.

Installation and Usage

First, confirm that the environment meets the following requirements:

  • DeepSeek Harness (DSH CLI) is installed
  • pnpm is installed
  • The web profile is being used
  • Node.js ≥ 22

Use the following command to install the plugin:

dsh plugin --profile web add github:kelai141/dsh-code-diff-viewer

After installation, you need to stop the old web process and restart the DSH Web:

dsh web

Then refresh your browser. This plugin does not support hot reload, so you need to restart the dsh web process after installation.

If pnpm prompts that the build script was intercepted, follow the instructions to add the corresponding key to allowBuilds in profiles/web/pnpm-workspace.yaml and retry. Since dsh-code-diff-viewer has no build script, this situation is generally not triggered.

Verification

After completing the above steps, you can check if the plugin has entered the composition tree of the current web profile:

dsh --profile web --dump-config | grep code-diff-viewer

You can also check if the client package is accessible:

http://127.0.0.1:3080/plugins/dsh-code-diff-viewer/client.js

If the command line can retrieve code-diff-viewer and the browser can access the client package path above, it means the plugin’s Web resources have been mounted.

Uninstallation

If you need to remove the plugin, execute:

dsh plugin --profile web remove dsh-code-diff-viewer

Afterwards, restart the dsh web process, and the interface will revert to the factory tool cards.

Use Cases and Notes

This plugin is suitable for developers who frequently view edit / write tool calls in the DSH Web conversation flow. It presents code changes as comparison panels and displays real line numbers, making it suitable for quickly confirming the scope of modifications.

Note a few points before use:

  • It is a third-party plugin and not an official DSH component.
  • The plugin runs under the permissions of the current dsh process; it is recommended to check the source code and license before installing.
  • The client depends on DSH’s built-in react seed module and the slots service.
  • The plugin has no third-party runtime dependencies.
  • The dsh web process must be restarted after installation or uninstallation; there is no hot reload.

Conclusion

The value of dsh-code-diff-viewer lies in transforming the edit / write tool calls in DSH Web into collapsible code comparison panels, facilitating the view of “before”, “after”, addition/deletion types, and real line numbers.

GitHub repository:

https://github.com/kelai141/dsh-code-diff-viewer

The directory page address has not been verified in this article, so it is not listed here.