dsh-approval-diff
Manifest validDSH plugin: replace file-change approval prompts with a real diff review (line diffs, word highlights, disk-sourced context, one file per card)
dsh-approval-diff
A DeepSeek Harness (DSH) plugin: install it into a profile alongside your own plugins.
See what you approve. When the model asks permission to change a file, the
native card shows the tool arguments: old_string and new_string as raw
text, no file context, no line numbers. This plugin replaces that ask with a
real diff review: red and green lines side by side, word-level highlights
inside changed lines, surrounding file content with true line numbers, and
exactly two buttons.
Plugin value proposition
| alternative | falls short |
|---|---|
| the native approval card | raw tool arguments; you reconstruct the diff in your head, every ask |
| reading the file yourself | you become the diff engine, and the model already read it once |
| auto-approve and hope | no review at all |
What you get
- The pending
editrendered as a real diff INSIDE the native approval card, through the card's ownconversation.approval.detailseat: disk- anchored line numbers, a context window around the change, and word-level highlights (via dsh-diff-view) - Split or Unified views (GitHub-style toggle, choice remembered); split pairs removals left with additions right, unified groups each change run as all removed lines then all added
writeshows the new content as additions, merged against the current file when one exists; deletion commands (rmand friends) render a review notice so the command text gets read before allowing- The diff is anchored to DISK TRUTH fetched at ask time from this package's host route; when the file cannot be read, the operands still render as an aligned diff with blank numbers, never lying numbers
- Stale-operand warning: when the edit's old text is no longer in the file, the card says so instead of showing a diff that cannot apply
- QUEUED SAME-FILE EDITS ARE ONE REVIEW: every pending (unsettled) edit to the same file that the model has already emitted joins one merged review. The card shows "N edits merged", the grid renders all changes merged against the disk copy (sequential anchors), and the native card's answer applies to the whole group. Later same-file asks auto-answer with the outcome the user already saw
- MULTI-FILE REQUESTS GET TABS: when one message touches several files, the card shows one tab per pending file, each with its own merged diff and its own Allow/Reject buttons; decide the files in any order. Nothing settles until every file has a decision, then the asks answer in schedule order with the decisions you made per file. The native card's bottom buttons step aside while the tabs own the ask
- The decision itself stays on the native card's own buttons (group decisions automate that exact answer, never wider)
How to install
Requires a DeepSeek Harness checkout and a profile, here web. Clone the
plugin into a plugins folder:
mkdir -p ~/dsh-plugins && cd ~/dsh-plugins
git clone https://github.com/joao-paulo-santos/dsh-approval-diff.git
# from the harness checkout
pnpm dsh plugin --profile web add ~/dsh-plugins/dsh-approval-diff
# verify the profile still composes
pnpm dsh --profile web --dump-config
Restart the harness after installing: the host half loads at boot. The client half hot-reloads once installed.
Limitations
- File-changing approvals only (
edit,write, deletion-onlybash). Everything else renders no detail and stays fully native. - Deletion review shows the command text, not the deleted content.
- Requires dsh 0.1.2+ (the pending-interaction approval model). The v0.20 composer takeover and its per-card buttons are retired: the native card owns the chrome and the buttons. Approvals arrive one at a time (the session queues them internally); arming replaces the old batch decision workflow for repeated edits to the same file.
Dependencies
- dsh-diff-view owns the diff engine and stylesheet this plugin renders its review cards with (required; the plugin does not activate without it)
Plugins dependent on this
(none yet)
Comments
Loading…
Similar plugins
by left0ver
dsh插件 - 立刻审查agent对文件的修改,查看diff,支持在dsh-better-sidebar中使用。a dsh plugin - review files that an agent just changed,you can see the diff,support dsh-better-sidebar
★ 43
↓ 1.5k/wk
MIT
TypeScript
Aug 23, 2026
dsh plugin --profile web add dsh-file-reviewby senyayume
DSH 插件:在文件变更工具卡片上重绘行级 diff(相同行只渲染一次 + 行内字符高亮),覆盖 run_code(PTC) 与 str_replace_editor,轮末给出改动汇总卡,并可在资源管理器中定位或复制路径。
★ 0
MIT
JavaScript
Sep 22, 2026
dsh plugin --profile web add dsh-edit-diffby WongYuYe
Per-turn file-change card for DSH Desktop: +N −M badges, aligned diffs, and Mac/Windows file open (system app, Finder/Explorer, VS Code).
★ 2
↓ 103/wk
MIT
TypeScript
Sep 15, 2026
dsh plugin --profile web add dsh-diff-cardby caly250
在 DSH 右侧文件预览工具栏加一个「复制整个文件内容」按钮 —— 走 Host 文件读取通道复制磁盘真实字节,写入后读回校验,二进制/超大/空文件有明确提示。
★ 0
MIT
JavaScript
Oct 21, 2026
dsh plugin --profile web add dsh-copy-file-buttonA file-view enhancement plugin that extends the official DSH sidebar, providing source view, in-place editing, line number display, search, and font zoom.
★ 2
↓ 206/wk
MIT
JavaScript
dsh plugin --profile web add dsh-sidebar-plusby caishengshuo
Every file, one version before it breaks. A DSH plugin: snapshots a file the instant before an agent rewrites it, with a per-session GUI timeline where any point can be restored in one click.
★ 0
MIT
JavaScript
Oct 24, 2026
dsh plugin --profile web add dsh-beforewrite