v0.0.1
dsh-diff-stat v0.0.1
First release. Inline
+N −Mdiff badges onedit/writetool rows, a per-turn file change summary card with review / undo / open-with actions, scroll-windowed diffs with LCS context folding, and an optional frosted-glass integration withdeepseek-harness-background.
Install / 安装
# from npm / 从 npm 安装
dsh plugin --profile web add dsh-diff-stat
# or from GitHub / 或从 GitHub 安装
dsh plugin --profile web add github:HaoyueQin/dsh-diff-statUninstall:
dsh plugin --profile web remove dsh-diff-statHighlights / 亮点
- R1 — Inline diff badges: takes over the stock
edit/writerows (keyed lower-priority shadow; uninstall restores stock automatically). Running rows show an argument-derived estimate; settled rows switch to exact result-view hunks. Click a row to expand a scroll-windowed unified diff. - R2 — Per-turn summary card: a collapsible "N files changed +X −Y" bar at each turn tail; expands to per-file rows with per-type icons, ±lines, review / open | ▾ split button, and an inline height-capped file preview. Same-file edits merge within a turn.
- PTC / Code Dispatch fallback: nested sub-calls carry no wire diff views; the plugin derives call-time diffs from the tools' own
presentCallsemantics.rootCallId+subCallIddedup keeps replays from double-counting. - Undo: reverts a turn's files to their pre-turn state via reverse uniqueness-checked hunk peeling; deletes files the turn created; rejects drifted files atomically.
- Context folding: each hunk's sides are LCS-aligned before rendering — shared lines become ±3 context around the change and untouched runs fold into
⋯. Badge and footer totals stay full-scope. - Frosted glass (optional): when
deepseek-harness-backgroundis installed, every plugin surface joins its unified glass recipe (diff window / file preview / row IN-OUT card in token mode, turn summary card in fill mode). Without it the stock opaque look is untouched — graceful degradation, zero dependencies. - Host half (optional): a same-origin fenced API serves
files.read/undo/open-withwith realpath containment, symlink rejection, UTF-8 round-trip validation and atomic writes. Absent host half hides the dependent buttons.
Fixes / 修复
- Publish turn
Locationdata under the definition's ownkind, so history replay no longer stalls the conversation pipe. - Claim the
conversation.chat.turnTailchain ahead ofui-deliverables(priority −1, first-wins). - Render the open menu through a portal out of the card's
overflow: hiddenclip. - Re-register glass surfaces on bridge hot reload (persistent
dsh-background-glass:readysubscription).
Infrastructure / 基建
lib/committed forgithub:direct installs;prepackrebuilds host + client beforenpm pack.- CI (
ci.yml): push/PR builds a pinneddeepseek-harnesscheckout, then typecheck / diff-alignment / committed-libfreshness gate. - Release (
release.yml): pushing av*tag runs the same verification, packs, and attaches both a versioned tarball and a fixed-namedsh-diff-stat.tgzto the GitHub Release.
中文说明
首个版本。核心能力:
- 行内 +N −M 徽标(R1):接管 stock 的
edit/write工具行,运行中用参数推导预估、结算后切换为 resultView 精确值;点击行展开限高滚动的 unified diff。 - 轮末汇总卡(R2):每轮尾部折叠条「N 个文件已更改 +X −Y」,展开逐文件行(分类型图标 · ±行数 · 审查 · 打开|▾),点「打开」内嵌限高文件预览;同文件多次编辑合并。
- PTC / Code Dispatch 兜底:嵌套子调用没有 wire diff 视图,插件按工具自身语义从参数推导调用时 diff,
rootCallId+subCallId去重防重放双计。 - 撤销:hunk 链倒序唯一性回剥,删除本轮新建文件,漂移拒绝写入,原子提交。
- 上下文折叠:展开前 hunk 两侧做行级 LCS 对齐,共同行作 ±3 上下文、更远未变更折叠为
⋯;徽标与页脚统计保持全量口径。 - 可选毛玻璃:安装
deepseek-harness-background后全部表面并入其共享玻璃配方(diff 窗 / 文件预览 / IN-OUT 卡 token 模式,轮末卡 fill 模式);未安装时保持原样,零依赖优雅降级。 - 可选 host 半:同源围栏 API 提供
files.read/undo/open-with(realpath 包含、拒绝符号链接、UTF-8 回环校验、原子写);缺席时相关按钮自动隐藏。
修复:turn Location 数据按定义自身 kind 发布(历史回放不再卡住);turnTail 链以 priority −1 先于 ui-deliverables 认领;打开菜单经 portal 渲染避免被卡片裁剪;毛玻璃桥热重载后自动重新注册。
基建:lib/ 入库支持 GitHub 直装,prepack 保证发布前重建;CI 校验 typecheck / diff 对齐 / lib 与源码一致;推 v* tag 自动构建并把版本号 tarball 与固定名 dsh-diff-stat.tgz 附到 GitHub Release。