Skip to content

v0.1.3

Choose a tag to compare

@github-actions github-actions released this 28 Aug 09:54
· 42 commits to main since this release

dsh-diff-stat v0.1.3

Fifth release. One built bundle now serves two harness kernel generations — 0.1.1-rc.2 and 0.1.2-alpha.1. The alpha release deleted the client-runtime package, dropped the presentation view envelope, and renamed the conversation event service; the plugin rebased its data sources onto the wire layer (the tools' persisted result meta), so every feature — inline badges, the aligned diff window, the per-turn summary card, PTC joins, undo — keeps working unchanged on both, verified against a live instance of each generation.

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-stat

Uninstall:

dsh plugin --profile web remove dsh-diff-stat

Highlights / 亮点

  • One build, two kernel generations: the built bundle is down to exactly one kernel module dependency (@deepseek-ai/dsh-client-ui-primitives, present in both kernels' static platform table). The append-surface predicate is inlined (byte-identical in both cores), settled diff hunks are read from the wire meta that both generations persist on the tool/result event (FsDiffMeta, byte-identical), and the conversation event registry / chat-snapshot hook resolve either generation's shape at runtime — waiting on cordis's internal/service event when the provider has not applied yet.
  • PTC stays first-class: the newer kernel stopped rendering diff cards for dispatch sub-calls entirely; this plugin keeps the argument-fallback diff and the chat tool-tree join, so Code Dispatch turns still get inline badges and the summary card on both generations.
  • Verified on both generations: live instances of each kernel (npm CLI on 0.1.1-rc.2, source CLI on 0.1.2-alpha.1) — inline badges (+19 −0, +1 −0), the summary card (2 files changed +20 −0 with undo), diff windows and the host fenced API all pass with zero plugin console errors. On 0.1.1-rc.2 the settled data source was verified identical by kernel source (the old resultView was itself derived from the same meta, so replayed history agrees).

Fixes / 修复

  • peerDependencies repaired: the runtime entry's range satisfied neither target prerelease (semver admits a prerelease only under a same-tuple comparator — both 0.1.1-rc.2 and 0.1.2-alpha.1 evaluated false) while the package no longer exists in 0.1.2-alpha.1 and the bundle stopped importing it. The entry is dropped; the remaining dsh peers carry prerelease-aware bounds anchored at 0.1.1-rc.1 / 0.1.2, verified with semver against both generations and future stable releases.
  • One-line diagnostic while waiting: if the host roster contains neither conversation-event provider, the wait logs once instead of leaving a silently missing turn summary card.
  • Docs: the README states the compile-time type baseline (0.1.1-rc.2 devDependencies) and that newer-kernel compatibility rests on runtime shape checks — a future wire-field rename cannot pass tsc unnoticed. Stale result-view wording replaced by the wire-meta data source.

Infrastructure / 基建

  • lib consistency gate unchanged: the committed lib/ still builds byte-identical on CI (git diff --exit-code -- lib/), so github: installs keep shipping exactly what the sources build.
  • Vendored ToolRow stylesheet refreshed to the 0.1.2-alpha.1 chrome (content font-size axis with fixed fallbacks that degrade gracefully on 0.1.1-rc.2).
  • Known upstream issue (not this plugin): on 0.1.2-alpha.1 the stock client's rewindMarkedSeqsOfChat crashes on long legacy sessions (input dock error). Reproduced with this plugin removed — a kernel-side projection bug on old session data; inline badges and the summary card are unaffected. Worth an upstream report.

Full Changelog: v0.1.2...v0.1.3


中文说明

第五个版本。本版核心是同一构建产物同时适配两个内核世代:harness 0.1.2-alpha.1 删除了 client-runtime 包、废弃了呈现视图信封(callView/resultView)、把会话事件服务从 conversationEvents 改名 uiConversation,并将工具卡改为从原始事件派生。插件把数据源整体下移到 wire 层——两版内核的 edit/write 工具都会把应用后 hunk(FsDiffMeta)持久化在 tool/result 事件的 meta 上且该结构逐字节一致——因此徽标、对齐 diff 窗、轮末汇总卡、PTC join 与撤销在两版上行为完全一致。

实现要点:①追加面谓词本地内联(两版 core 实现逐字节相同),产物对内核动态模块表的依赖收敛到两版静态平台表共有的 @deepseek-ai/dsh-client-ui-primitives;②会话事件注册表运行时双探测(uiConversation.events / conversationEvents),提供方未就绪时挂 cordis internal/service 事件等待——不能把另一代不存在的服务名写进 inject,那会 pending 整个 fiber;③turnTail 组件同时接受新版 useChat 与旧版 useSession 标准prop,快照探测兼容旧版 .chat 嵌套与新版直达形态;④PTC 子调用在 0.1.2-alpha.1 的 stock 行为是不再渲染 diff 卡,本插件的参数兜底 diff 与工具树 join 成为独有能力,两版均保留。

验证:两个内核世代各起真实实例(0.1.1-rc.2 用 npm CLI、0.1.2-alpha.1 用内核源码 CLI)实测——行内徽标(+19 −0 / +1 −0)、轮末卡(「2 个文件已更改 +20 −0」含撤销)、diff 窗展开、host 围栏 API 全部通过,插件相关 console 错误为零。0.1.1-rc.2 侧的 settled 数据源同一性经内核源码核对(旧版 resultView 本就派生自同一 meta),历史回放同样成立。

已知边界0.1.2-alpha.1 的 stock 客户端对长历史会话存在 rewindMarkedSeqsOfChat 自身崩溃(输入坞报错)——已做无插件对照实验确认与插件无关,属内核对旧会话数据的投影 bug,建议向上游反馈;徽标与轮末卡不受影响。