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
- 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
- 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
- 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 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`
Only changed rows, with inline character highlighting
Near-linear diff algorithm
very large diffs are rendered as coarse blocks instead of precise diffsCollapsed card, long-diff fold, copy and stats
the card shows a one-line summary until you expand ita diff past 14 changed rows opens the middle behind a second expandcopy output carries only the diff rows, each prefixed with `- ` or `+ `Native look, single file and multi-file
Taking over extra tools
a `write`-shaped tool call renders as all-added rows, because a whole-file overwrite has no old content to diff againstShadow mounting with live config
a settings change rebuilds the browser-side registrations for these keys
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.
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.
07Related DSH workflows
dsh-tui
by ccch1mneyyy
Claude Code 风格全屏终端 TUI:像素鲸鱼顶栏、双流光大字、实时工作状态行、思考流式展开、双击 Esc 时间回溯、上下文进度条 + TPS 仪表;接入 Agent preset(standard/code/minimal/cordis)、Skills、MCP、Goals、Todos、子代理,/ 命令注册表与随附技能(audit/bug/review/practice/pr_comments/release-notes/vuln-check);纯插件挂载零核心改动。
dsh-better-sidebar
by omdsh-dev
Full sidebar workbench with file rendering and editing, terminal, Git, and subagents; third-party plugins can register new tabs.
dsh-media-desk
by woniuniuniu
Capture ideas and generate scripts, titles, covers, images, storyboards, schedules, and review data in a sidebar media workspace.
dsh-drawai
by fourzkw
Create diagram artifacts and use Draw.io-oriented tools from a DSH profile.
08Data and sources
- 是**标准形态的 dsh client 插件**,声明 `dsh.client`,导出 `./client`。
- **UI 挂载点**:接管 keyed 槽位 `tool.call.toolview` 的 `edit` 与 `write` 两个 key,以及 `extraTools` 里声明的每个工具名。
接管 DSH 浏览器的 `edit` / `write` 工具卡片,用近线性行级 diff 做真正的差异展示,消除内置 DiffBlock 把「未变化的相同行」在删除区红 `-` 行和新增区绿 `+` 行各渲染一遍的重复。
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.
