Back to directory

dsh-edit-diff

In a curated listMaintenance: Active

better-er/dsh-edit-diff

Renders concise edit/write diffs, supports PTC subcalls, and can cover configured remote edit/write tools.

View on GitHub
$ dsh plugin --profile web add github:better-er/dsh-edit-diff

14

stars

0

forks

TypeScript

Language

MIT

License

2026-08-28

Created

2026-11-14

Last push

MIT-licensed TypeScript DSH client plugin that replaces the built-in card for `edit` / `write` with a line-level diff of only the changed rows, inline character highlighting, long-diff folding, and `extraTools` coverage for remote edit/write tools.

DSH integration

Native runtime

Author-claimed

Safety audit

Unaudited

Last verified

2026-11-16

License

MIT

01What can it help you accomplish?

  • Read an `edit` / `write` result in a DSH web session and see the rows that actually changed instead of a red block and a green block that never line up

    A card that drops identical rows entirely — one changed line renders as one red `-` row plus one green `+` row, with the modified characters underlined inside the row

    Anyone reviewing DSH file edits in the browser who loses time to the built-in DiffBlock repeating context rows on both sides

  • Keep seeing the edit content when `edit` / `write` runs as a `run_code` subcall in PTC mode

    The same optimized diff inside the subcall, recognized by the `:code:` marker carried in `callId`

    Users who run file edits through `run_code` subcalls, where the default card only reports whether the call succeeded

  • Give remote edit/write tools the same diff view without writing a second plugin

    Optimized rendering for `edit_remote` and `write_remote`, already on by default in the bundled `cordis.patch.yml`, plus any other tool declared under `extraTools`

    Setups that write files through dsh-remote-file-system rather than the built-in tools

02How to install into DeepSeek Harness

Prerequisites

  • Install commands are written for the `web` profile (`--profile web`); the plugin also declares `dsh.bundle`, so whichever profile you add it to picks it up as a profile layer without a hand-written composition entry.
  • A restart of DSH web afterwards — the README states both install routes auto-mount and are enabled on restart, with no file edits required.
  • Installing from GitHub needs npm to run the `prepare` script and build on the spot, because `lib/` is not committed to the repository.

Installation steps

  1. 01

    From GitHub: run `dsh plugin --profile web add github:better-er/dsh-edit-diff` — npm triggers the `prepare` script and builds `lib/` during install.

    $ dsh plugin --profile web add github:better-er/dsh-edit-diff

  2. 02

    From npm: run `dsh plugin --profile web add dsh-edit-diff` — the package already ships `lib/index.js` and `lib/client.js`, so nothing is built.

    $ dsh plugin --profile web add dsh-edit-diff

  3. 03

    Restart DSH web: either route auto-mounts the plugin, with no manual file edits.

Verify the integration

Not specified by the author

Rollback

  • Run `dsh plugin --profile web remove dsh-edit-diff` and restart DSH web — the README says this removes it completely and it is no longer loaded.

03DSH integration and capability boundaries

DSH integrationNative runtime

DSH client plugin — declares `dsh.client` and exports `./client`, registers on the keyed slot `tool.call.toolview` for the `edit` / `write` keys plus every tool named in `extraTools`, and shadows the built-in `file-mutation-toolview` at `priority: -1`; installed with `dsh plugin --profile web add github:better-er/dsh-edit-diff`

04Who is it for? When not to use it?

Good for

  • Anyone reviewing DSH file edits in the browser who loses time to the built-in DiffBlock repeating context rows on both sides
  • Users who run file edits through `run_code` subcalls, where the default card only reports whether the call succeeded
  • Setups that write files through dsh-remote-file-system rather than the built-in tools

Not for

  • `write` is a whole-file overwrite with no old content, so its card can only show added rows; use `edit` when you need an exact diff.

05Compatibility, maintenance and safety notes

  • Rendering happens entirely in the browser bundle: the host half only turns config into the `dsh-edit-diff` settings namespace, and the card shadows the built-in renderer at a lower priority instead of patching DSH source.
  • `write` is a whole-file overwrite with no old content, so its card can only show added rows; use `edit` when you need an exact diff.
  • Two hard render limits: a line whose change region passes 512 characters stops being aligned per character, and a line-level diff past 600 rows degrades to one delete block plus one add block.
  • `extraTools` entries default to `file_path` / `old_string` / `new_string` / `content`; a tool that names these parameters differently needs `pathKey` / `oldKey` / `newKey` / `contentKey`, otherwise its content cannot be read.
2026-08-282026-11-03v0.4.5

MIT · latest release v0.4.5 (2026-11-14T11:26:34Z) · DSH web client plugin, no core patches

06Frequently asked questions

How do I install dsh-edit-diff into DeepSeek Harness?

Run `dsh plugin --profile web add github:better-er/dsh-edit-diff` to install from GitHub — npm then runs the `prepare` script and builds `lib/`, since `lib/` is not in the repo. Or run `dsh plugin --profile web add dsh-edit-diff` for the npm package, which already ships `lib/index.js` and `lib/client.js`. Both routes auto-mount; restart DSH web to enable the plugin.

Does it patch DSH or change the built-in renderer?

No. It is a standard client plugin (`dsh.client`, exports `./client`) that registers on the keyed slot `tool.call.toolview` with `priority: -1`, shadowing the built-in `file-mutation-toolview` instead of clashing with it at the same priority. All rendering runs in the browser; the host half only forwards config through the `dsh-edit-diff` settings namespace.

Can it render diffs for my own remote edit/write tools?

Yes — list them under `extraTools` with the tool name and, if they differ, which parameters hold the path, old text, new text and full content; omitted names fall back to `file_path`, `old_string`, `new_string` and `content`. The bundled `cordis.patch.yml` already covers `edit_remote` and `write_remote` from dsh-remote-file-system, and you override that default in your profile's `cordis.patch.yml` by id.

Why does a `write` card show only green lines?

`write` is a whole-file overwrite, so there is no old content to diff against and the card can only render the new file as added rows — use `edit` when you need a precise diff. In PTC mode a `run_code` subcall is recognized by the `:code:` marker in `callId`, and its `edit` / `write` calls get the same optimized view.

How big a diff can it render?

The algorithm shrinks the common prefix and suffix linearly and only runs Myers diff on the small middle band. Beyond that it trades precision: a change region over 512 characters is marked as changed as a whole instead of aligned per character, and a line-level diff over 600 rows falls back to one delete block plus one add block. Cards also start collapsed and fold anything past 14 changed rows behind a second expand.

08Data and sources

  • Author-claimedgithub.com96a431e6adf0…

    - 是**标准形态的 dsh client 插件**,声明 `dsh.client`,导出 `./client`。

  • Author-claimedgithub.com96a431e6adf0…

    - **UI 挂载点**:接管 keyed 槽位 `tool.call.toolview` 的 `edit` 与 `write` 两个 key,以及 `extraTools` 里声明的每个工具名。

  • Author-claimedgithub.com96a431e6adf0…

    接管 DSH 浏览器的 `edit` / `write` 工具卡片,用近线性行级 diff 做真正的差异展示,消除内置 DiffBlock 把「未变化的相同行」在删除区红 `-` 行和新增区绿 `+` 行各渲染一遍的重复。

  • Author-claimedgithub.com96a431e6adf0…

    dsh plugin --profile web add github:better-er/dsh-edit-diff

This page is generated from the project’s public documentation, repository metadata and a structured parse of DSH Plugins; last verified on 2026-11-16. Found an error? Submit a correction.

🏆

Best DeepSeek Harness Plugins

Twelve plugins worth installing first — picked from the whole catalog, across every category.

DSH Plugins is an independent community directory of DeepSeek Harness plugins. Not affiliated with or endorsed by DeepSeek. Third-party plugins are not security-audited — review the source before installing.

New DeepSeek Harness plugins, weekly. No spam.