Preface

DeepSeek Harness (referred to as dsh for short) is an Agent runtime open-sourced by DeepSeek. Its core philosophy is “Everything is a plugin”: models, tools, sessions, sandboxes, scheduling, and UI can all be replaced or extended at the configuration layer without modifying the Harness core source code. When using the web interface daily, once an agent calls write / edit to modify files, a default Diff card (the official component is called DiffBlock) will appear in the conversation. It is still manageable when the file is small; but when there are many changes, line number mismatches, unclear word-level changes, and overly long contexts filling the page will significantly increase the review cost.

Community maintainer lehhair developed an interface enhancement plugin dsh-diff-viewer specifically to take over the diff rendering of these two tool calls. It does not modify the Harness core: after installation, it replaces the expanded diff card with a PiUI-style viewer, and restores the official behavior when uninstalled. Below is an explanation of what it is, how to install it, and how to use it, verified against both the directory page and the GitHub repository.

Two background points need to be clarified first. First, DeepSeek Harness is still in developer preview, and core plugins and APIs are subject to change. Second, the DeepSeek Harness Plugin Repository is an independent community directory for retrieving and comparing installation commands, and has no official affiliation with DeepSeek / HyperMind. It should not be treated as an official app store.

What is it

dsh-diff-viewer is an interface enhancement plugin for the DSH web interface, maintained by lehhair, with the repository at lehhair/dsh-diff-viewer. Its npm package name is @dsh-external/dsh-diff-viewer, current version 0.1.0, and the main language is TypeScript. The community directory categorizes it under “Interface Enhancement”, and the GitHub repository has the dsh-plugin topic. As of 2026-08-17, the GitHub repo shows 17 stars; the numbers on the directory page may lag behind, so refer to the repository page for accurate data.

One-sentence positioning: It replaces the default DiffBlock in write / edit tool calls via the diff-card chain slot of the ui-tool, swapping the expanded diff card for a PiUI-style DiffViewer. The “Private” in the GitHub README corresponds to "private": true in package.json (not published to the public npm registry), and the repository itself is public.

The problem it solves is very specific: it retains the official tool row shell and only replaces the middle diff card. The folding, status dots, and error summary of the tool row still follow the official FileMutationRow workflow; the actual changes to view, word-level highlighting, context folding, and large file rendering are handled by the plugin’s own viewer.

Working Mechanism

The plugin uses keyed takeover instead of modifying Harness source code.

The tool.call.toolview slot of ui-tool is an open key domain. On the same key, lower priority will shadow the registered implementation (rendered with the lowest priority). The plugin registers two keys, edit and write, on the client side with a priority of -1, thereby taking over the official FileMutationRow. The taken over row reuses the official ToolRow style, as well as platform components such as DisclosureRow and StateDot, and only replaces the expanded diff card with the PiUI-style DiffViewer.

This aligns with the repository source code:
- The client entry src/client/index.tsx injects the two aforementioned keys into tool.call.toolview.
- The host entry src/index.ts has an empty apply() function, with comments stating that the interface is entirely browser-side and the host has no additional behavior.
- In package.json, dsh.client.platform is web, and it injects @deepseek-ai/dsh-client-runtime.
- cordis.patch.yml only inserts @dsh-external/dsh-diff-viewer into the current profile’s layer stack, which is the host patch mentioned in the README: it is a bundle layer insertion, not a core patch for Harness.

Therefore, the official tool row will return after uninstallation. The source code comments also mention that this keyed slot appeared around rc.5; since Harness is still in preview, if the slot semantics are adjusted in the future, the repository README will need to be consulted again.

The diff data is extracted from the card: 'diff' intent in the tool call’s callView / resultView: the diff from the call is used during execution, and the applied hunks are used after completion. If execution fails and there is no diff card at all, the plugin will not forcibly draw an empty view, but will fall back to the official error summary and IN/OUT cards of the official tool row.

Core Features

The following capabilities are from the repository README and package.json description, not subjective impressions from the demo environment.

  1. Unified single-column layout is the default. The old and new line numbers are displayed side by side in the same gutter to avoid left-right column mismatching. You can also switch to the split double-column layout (viewMode in the source code). When the container is wide enough, the layout will automatically adjust based on width: the source code uses approximately 800px as the threshold, keeping unified layout for narrow columns and switching to left-right split for wide columns. The official default message column of about 748px will remain single-column; if you also use the maintainer’s dsh-home-ui and widen the information flow, the diff will automatically switch to split layout. Pure additions or pure deletions will force unified layout to avoid completely blank side columns.
  2. Change bars and line backgrounds. Additions are marked with solid green bars, and deletions are marked with striped red bars; the line background will extend to the widest row in the current view, making it clearer when scanning block changes.
  3. Word-level highlighting. In-line changes are overlaid with green/red markers, and syntax coloring is done using Shiki (referred to as highlightLines in the README). shiki, @shikijs/langs, and diff can be seen in the dependencies.
  4. Context folding. Consecutive unchanged lines will be collapsed into “N unchanged lines”, which can be expanded upwards, downwards, or fully, without having to render the entire file.
  5. Windowed rendering. Fixed line heights are used for windowed rendering, so large diffs will not mount all rows at once. The expanded diff does not have a height limit and is not wrapped in a scroll container, and the content will directly expand the view; the horizontal scrollbar is sticky and only appears when hovered.
  6. Copy and footer statistics. Copy support is available, and the footer format is └ +A -R · N file(s), which shows the number of added and deleted lines and the number of involved files.

Installation and Activation

The installation command given on the community directory page is:

dsh plugin add github:lehhair/dsh-diff-viewer

The directory page also notes that for reproducible installations, it can be written as dsh plugin add github:lehhair/dsh-diff-viewer#commit. This command reflects the general写法 of the directory site, do not use it directly to install this plugin.

The maintainer’s README clearly states: there is no build artifact lib/ in the GitHub source code (it is ignored by .gitignore), and the package entry points to lib/index.js. Installing the source code using github:lehhair/dsh-diff-viewer will throw a file not found error on startup. This is the same issue as the official documentation “Packaging and Installing Plugins” which states that “git installation pulls source code and will not automatically run build”. This repository also does not have a prepare build script ready for git installation, and the development environment also relies on a local deepseek-harness checkout next to it, making it unsuitable as a regular installation path.

Recommendation: Install the GitHub Release build artifacts

The README recommends the tarball built by GitHub Actions after each release. releases/latest always points to the latest version, and the currently released version is v0.1.0 (2026-08-15, note: devDeps stripped from tarball). The plugin declares platform: web, so it should be installed into the web profile:

# Use the latest asset URL directly (always the latest version):
dsh plugin --profile web add "https://github.com/lehhair/dsh-diff-viewer/releases/latest/download/dsh-external-dsh-diff-viewer.tgz"

# Restart dsh web for changes to take effect
dsh web

If you want a reproducible installation and do not want to follow the latest floating version, replace the URL with a versioned asset, such as the current v0.1.0:

dsh plugin --profile web add "https://github.com/lehhair/dsh-diff-viewer/releases/download/v0.1.0/dsh-external-dsh-diff-viewer.tgz"

After installation, you can use the following command to confirm that the combination package has appeared in the configuration layer, then restart the running Web service. Refreshing the browser alone is usually not enough, because both the host code and browser code are loaded at startup:

dsh --profile web --dump-config

Cache issues during upgrades

The README has a practical limitation: pnpm caches tarballs by URL. If you always use the same latest link, after the repository releases a new version, the local machine may still hit the old package. If the upgrade fails or you find that an old version is installed, follow the repository’s instructions to uninstall, clear the cache, and reinstall:

dsh plugin --profile web remove @dsh-external/dsh-diff-viewer
pnpm store prune
dsh plugin --profile web add "https://github.com/lehhair/dsh-diff-viewer/releases/latest/download/dsh-external-dsh-diff-viewer.tgz"

pnpm store prune acts on the local pnpm store. On Windows, the README also mentions that you can delete the corresponding cache in %LOCALAPPDATA%\pnpm\store, and for Linux / macOS, refer to the local pnpm store path.

Uninstallation

dsh plugin --profile web remove @dsh-external/dsh-diff-viewer

After uninstalling, restart the web profile, and the write / edit tool rows will return to the official DiffBlock.

Development environment (from source code)

Only use this path if you are modifying the plugin locally. The README requires devDependencies to use link: pointing to the adjacent deepseek-harness checkout, then:

pnpm install && pnpm run check    # typecheck + test + build
dsh plugin --profile web add /path/to/dsh-diff-viewer

On Windows, dsh plugin add <local directory> may encounter pnpm link: junction issues, and the README recommends first npm pack and then dsh plugin add *.tgz. This path is not necessary for regular use.

Typical Usage

After installing and restarting dsh web, there are no additional configuration items to fill in. In the web conversation, ask the agent to modify or write a file, expand the corresponding write / edit tool row, and the default DiffBlock should be replaced with the PiUI-style DiffViewer.

You can perform a self-check in the following order:
1. Ask the agent to make an inline modification to a small file (for example, only change the function name or string). After expanding the tool row, you should see word-level red and green markers instead of a solid color block for the entire line.
2. Ask it to modify a longer file with a large section of unchanged code in the middle. The unchanged areas should be collapsed into “N unchanged lines”, which can be expanded as needed.
3. Widen your browser window or information flow (or use the wide-screen mode of dsh-home-ui). When the container is wide enough, the same diff will switch from unified to split layout; shrink it back and it will return to single-column layout.
4. Intentionally create a failed edit (for example, a non-existent path). When there is no diff card, the official error summary should still be displayed instead of the plugin’s empty viewer.

In the description of the same maintainer’s dsh-home-ui, the combination of “dsh-home-ui wide-screen mode + dsh-diff-viewer” is recommended for desktop wide screens: after the information flow is widened, the diff automatically splits into columns based on the container width. This is an optional combination, not a prerequisite for installing this plugin.

Applicable Scenarios and Notes

Who it is suitable for: Users who are already using the DeepSeek Harness web interface and need to frequently review the results of agent write / edit operations. Especially suitable for scenarios where large files are modified, only word-level differences are cared about, or left-right comparison in wide-screen mode is desired.

What it does not cover:
- It only takes over the two tool keys edit / write that produce diff cards, it is not a general Git diff browser, nor does it replace git diff in the terminal.
- dsh.client.platform is web, so installing it on headless / pure terminal profiles will not display this interface.
- The engines.dsh field in dsh.plugin.json is written as >=0.0.1, which has a very wide range and does not mean that it has been verified on every preview build. Since Harness is still in developer preview, if the slot and official FileMutationRow change, the plugin may need to be upgraded accordingly.

Be sure to review the source code and license before installing. The plugin runs with the permissions of the current dsh process, and may execute code during installation, and is not in the agent sandbox. The repository package.json declares the license as BSD-3-Clause; there is currently no separate LICENSE file on the GitHub repository page, and the API license field is empty. Do not skip verification just because the directory page says “community open-source, free to install”.

In addition, "private": true in package.json means that the author did not publish it to the public npm registry, so do not run dsh plugin add @dsh-external/dsh-diff-viewer expecting to pull the package from the registry. Use the Release tarball as instructed in the README.

Summary

dsh-diff-viewer has a very focused function: on the DSH web interface, it replaces the default DiffBlock of write / edit with a PiUI-style DiffViewer, retains the official tool row shell, and adds single-column / double-column layout, word-level highlighting, context folding, and windowed rendering. It is a community plugin, not an official DeepSeek component; the community directory can be used as a retrieval entry, and the official installation method should refer to the repository README — install the Release build artifact, do not directly pull the source code via github:.

Directory page: https://deepseek-harness-plugin.com/zh-CN/plugins/dsh-diff-viewer/

GitHub: https://github.com/lehhair/dsh-diff-viewer