Inline +N −M badges on edit/write tool rows and a collapsible per-turn file-change summary card with aligned diffs, review and undo — covers native edit/write, str_replace_editor and Code Dispatch sub-calls, no git required.
Install
# from npm (prebuilt)
dsh plugin --profile web add dsh-diff-stat
# from GitHub (first run asks for allowBuilds approval — follow the hint, retry)
dsh plugin --profile web add github:HaoyueQin/dsh-diff-stat
Any plugin you install runs third-party code with your own permissions — it can read your files, use your credentials, and reach the network, and tool approvals don’t sandbox it. GitHub-sourced plugins also run build scripts at install time — pnpm blocks those until you allow them, so an install can stop with ERR_PNPM_GIT_DEP_PREPARE_NOT_ALLOWED or ERR_PNPM_IGNORED_BUILDS; dsh prints the exact key to add under allowBuilds in your profile’s pnpm-workspace.yaml, and the install works on the next run. Allowing a build is a trust decision: only install sources you trust, and pin a commit (github:owner/repo#sha).
README
[!IMPORTANT] Retired — do not install. DeepSeek Harness now ships inline
+N −Mdiff badges, a per-turn changed-files card and a per-file review tab natively (since0.1.6-alpha.2), so this plugin's main line is redundant; its turn summary card stopped working on0.1.6-alpha.2+becauseconversation.chat.turnTailchanged from achainslot to alistslot. Last published version:0.1.9(supports harness up to0.1.6-alpha.1; older kernels need0.1.8or earlier). Read docs/retirement.md for the feature-by-feature mapping, the uninstall steps, and the one capability the harness never shipped (undo a turn's file changes).已停止维护,请勿安装。 官方 harness 自
0.1.6-alpha.2起自带行内+N −M徽标、 轮末文件变更卡与逐文件 review tab;本插件主线因此冗余,且conversation.chat.turnTail由chain槽改为list槽后,轮末汇总卡在0.1.6-alpha.2+上已无法工作。 详见 docs/retirement.zh.md。
A DeepSeek Harness Web plugin that visualizes agent file changes: inline +N −M badges on mutation tool rows, a per-turn file-change summary card, and full aligned diffs on click. Covers native edit/write calls, the opt-in str_replace_editor, and PTC dispatch sub-calls end to end. No git dependency, no third-party plugin dependencies.
Features
- Kernel target: harness ≥ 0.1.5-rc.1 — one build for that line only: the
uiConversationevent registry,tool.call.toolviewkeyed slot andconversation.chat.turnTailchain carry their0.1.5-rc.1shapes, and diff hunks are read from the tools' persisted wiremeta. PTC dispatch arrives astool/ptc-dispatch(-start); the retiredtool/code-dispatch(-start)spelling is still matched so a session recorded before that rename keeps its card. Older kernels are NOT supported by this version — installdsh-diff-stat@0.1.8(or an older release that covers them) on those kernels - Inline +N −M badges — takes over the stock mutation rows for
edit,writeandstr_replace_editor(str_replace_editoris opt-in, off by default; keyed lower-priority shadow; uninstall restores stock). Counts are the real changed lines — the same LCS walk the diff renders — estimated from the arguments while running, exact once the result settles - Aligned diff window — expanding a row opens a height-capped scrollable unified view. Both sides are LCS-aligned first: shared lines render as up to ±3 lines of context around each change, untouched runs collapse into ⋯, and the footer counts exactly the rendered rows
- Line-number gutters — the file view numbers its lines 1..N and the diff window pins each hunk to its real position in the current file (one cached fenced read, uniqueness-checked): deleted rows read the old side, context/added rows the new side, with the changed rows' accent bars. A hunk that cannot be located (host absent, drifted file, over budget) numbers window-relatively 1..N, so the gutter always renders
- Per-turn summary card — a collapsible "N files changed +X −Y" bar at each turn's tail; per-file rows with type icons, directory, ±lines, review, open ▾ and undo. Same-file edits merge and accumulate in settlement order
- PTC dispatch, end to end — dispatch sub-calls carry no wire diff view: rows fall back to the argument-derived diff, and the summary card joins their files from the stock chat tool tree, so a pure PTC turn still gets its card.
callIddedup keeps replays from double-counting - File-context boost — bare argument fragments gain up to ±3 lines of real file context when expanded: the booster reads the file through the host's fenced API, locates the fragment's post-image and rebuilds the hunk (best-effort; unlocatable fragments keep their bare form)
- Undo — reverts the turn's files to their pre-turn state: reverse uniqueness-checked hunk peeling, turn-start snapshots prove a file was CREATED (not overwritten) before its deletion, drifted files rejected before any write, atomic commits. Insert-only and pure-deletion hunks are safely refused per file (no content to peel back to)
- Inline view & open-with — "open" expands a height-capped file preview below the row; the ▾ menu keeps system open, Explorer reveal, VS Code, and absolute/relative path copy
- Frosted glass (optional) — with deepseek-harness-background installed, every plugin surface joins its shared glass recipe; without it the stock opaque look stays untouched — graceful degradation, zero third-party runtime additions (peer modules come from the harness)
- zh / en — copy follows the Web UI language (locale service)
Screenshots
| Turn summary card | Taken-over row & aligned diff |
|---|---|
![]() |
![]() |
Per-turn card with review / open / undo per file (left); an inline badge with its aligned diff window (right), both under the optional background glass.
How it works
- Badges & diffs: registers the
edit/write/str_replace_editorkeys of thetool.call.toolviewkeyed slot at priority −1 (shadows the shipped rows;str_replace_editoris opt-in). Row diffs follow the applied wire meta (oldText/newText with ±3 file context) with the call-time argument fallback for PTC sub-calls, so a truncated window that dropped the call head still renders from the result meta. The turn accumulator counts the same way, including meta-only settlements - Turn summary card: a
ConversationNodeDefinitionaccumulator (turn/start,tool/call,tool/result(append),tool/ptc-dispatch— and the retiredtool/code-dispatchspelling — plus-startevidence) publishes Turn data; theconversation.chat.turnTailchain claims rendering — modeled on the officialui-deliverablesplugin. Dispatch files join from the stock chat tool tree, whosetool-callnodes already fold every dispatch into its root call'ssubCalls. A pure-computerun_codeturn with no file mutations still claims (first-wins) and renders null — accepted, the select cannot see the join result. Cold-opened pure-PTC turns may miss the card (dispatch records carry no turn coordinate; best-effort) - Context boost: argument-derived hunks are marked by object identity at construction; on expand the booster reads the file through the fenced API (LRU-cached), locates the fragment's post-image and rebuilds the hunk with shared lines. Anything unlocatable renders as-is
- Host half (optional): a same-origin prefix route serves a fenced API (files.read, capture-snapshot per turn, undo, open-with) — realpath containment checked before and after resolution, symlink rejection, UTF-8 round-trip validation, display reads capped at 512 KiB with a truncation flag, a 32 MiB undo gate, and atomic writes. The fence is checked before either opener runs: file-manager reveal then hands the resolved path to the harness's own
sessionControllerremote (action: 'reveal'), while VS Code — which the harness exposes no equivalent for — stays a local spawn. When the host half is absent the dependent actions hide themselves - Frosted glass bridge (optional): a zero-dependency consumer of the background plugin's
window.__DSH_BACKGROUND_GLASS__registry — subscribing to its ready event (both arrival orders + hot reload); the bridge never appearing leaves the ordinary UI untouched
Install
# from npm
dsh plugin --profile web add dsh-diff-stat
# or from GitHub
dsh plugin --profile web add github:HaoyueQin/dsh-diff-stat
# restart dsh web to take effect
dsh web
Uninstall:
dsh plugin --profile web remove dsh-diff-stat
Development
pnpm install # devDependencies; prepare builds lib/ automatically (runtime needs Node >= 22.18)
pnpm build # host half → lib/index.js + browser half → lib/client.js (one tsdown run)
pnpm typecheck # both halves via tsc
pnpm check:align # diff aligner & data-model assertions (needs Node >= 23.6)
pnpm check:join # tool-tree join fingerprint assertions (needs Node >= 23.6)
Kernel compatibility: this build targets harness
>= 0.1.5-rc.1only. Older kernels need an older plugin release — installdsh-diff-stat@0.1.8there.
Activity
License
MIT
Links
More in this category
zhu1090093659/dsh-web#packages/dsh-task-board★ 8597
Task board for the dsh web GUI: a sidebar multi-column kanban whose cards run in real DSH agent sessions and can also be scheduled with cron expressions, executed host-side even with the browser closed.
zhu1090093659/dsh-web#packages/dsh-web-all★ 8597
Plugin and skin collection for the DSH Web UI: task board, Git graph, right-side panel, remote mobile UI, pet, live token stats, and a skin center.
MeteorNOX/DeepSeek-Balance-Whale-Widget★ 4424
A fixed-corner whale widget for the DSH web GUI — balance, today's usage and per-turn cost with peak/off-peak pricing, editable balance-alert and daily-budget bubbles, a module-based custom bubble queue with A/B weighted choices and random lines or images, 30+ vendor templates (OpenAI, OpenRouter, Kimi, SiliconFlow, Ark, Zhipu, MiniMax and more) with per-model balance and subscription quota, plus task-end sound, imported audio, custom roles and a resource manager. Local-only, no telemetry.
ccch1mneyyy/dsh-TUI★ 4268
Claude Code-style full-screen terminal UI: pixel-whale header, live status line, and streaming thought expansion.
omdsh-dev/DSH-better-sidebar★ 4098
Full sidebar workbench with file rendering and editing, terminal, Git, and subagents; third-party plugins can register new tabs.
Devin-AXIS/deepseek-design#deepseek-idesign★ 1445
Visual design studio for websites, app prototypes, posters, cards, reports, and magazines, with templates, direct element editing, selection-aware AI draft handoff, and export.


Community comments
Comments are public GitHub Discussions. Loading them connects to GitHub and Giscus; a GitHub account is required to post.