DeepSeek Harness Plugin Hub

Publish and manage complete Harness Profiles. Discover Plugins for your next setup.

Explore

PluginsPresetsDocsNews

Community

Publish a pluginContactReport an issue

Resources

Plugin Hub on GitHubDeepSeek HarnessSystem statusPrivacy notice
© 2026 DeepSeek Harness Plugin HubPowered byPaxTech

Independent and unofficial. Not affiliated with, authorized by, or endorsed by DeepSeek.

Diff Viewer — DSH Plugin for DeepSeek Harness
DeepSeek Harness Plugin Hub
ProfilesPluginsCategoriesNewsDocsSign inManage Profiles
ProfilesPluginsCategoriesNewsDocsSign in
← Plugins
D

@dsh-external/dsh-diff-viewer

Diff Viewer

DSH diff-viewer plugin: PiUI-style visual diff surface (split/unified, change bars, real file line numbers, word-level marks, collapsed context, windowed rendering) replacing the stock DiffBlock for write/edit tool calls. Registers into the ui-tool keyed toolview slots.

The plugin will be installed here. Keep web if you are unsure.

npx -y @deepseek-ai/dsh plugin --profile web add github:lehhair/dsh-diff-viewer#df5f55f721ed5a878767e2dd7e85616785a2ee11
READMECompatibilityVersions
Plugin screenshot

Compatibility and provenance

Diff Viewer is published as @dsh-external/dsh-diff-viewer and currently resolves to version 0.2.0. The Hub verifies its manifest and preserves the exact installation source for reproducible installs.

DSH compatibility
*
Runtime surfaces
web
Release source
github
Registry updated
9/6/2026

Versions

0.2.0stable
9/6/2026
0.1.1stable
8/21/2026

Related plugins

Loading related plugins…

Latest
0.2.0
DSH
*
HMR
Process restart
Tree shaking
Safe tree shaking not declared
Unpacked size
Unavailable
Files
Unavailable
Surface
web
License
BSD-3-Clause
Source
github
GitHub
★ 0
Weekly downloads
0
View source ↗
README badge

Click the badge to copy Markdown for your README.

Do you maintain this Plugin?Claim benefit · Priority security scan

Verify the GitHub repository declared in package.json to manage this listing. After you claim it, Hub will prioritize a security scan of the current version and publish the result when it passes.

Claim this Plugin →
Report an issue

Related plugins

More verified plugins in developer-tools.

Web App@deepseek-ai/dsh-web-appThe dsh browser-surface bundle: the web patch layer over dsh-base plus the runtime glue plugin (frontend dist serving, web-surface prompt, bash runtime variables, URL line)Sdk Minimal@deepseek-ai/dsh-sdk-minimalThe standalone minimal SDK profile bundle: JSON-RPC, one DeepSeek adapter, persistent shell, and JSONL sessionsSdk App@deepseek-ai/dsh-sdk-appThe dsh SDK profile bundle: stdio JSON-RPC serving and process lifecycle over dsh-baseSubagent Codex@deepseek-ai/dsh-subagent-codexOne-shot Codex subagent provider over the official app-server protocol

README

dshfind

dsh-diff-viewer

DSH Web GUI 的 PiUI 风格 diff 查看器插件:替换 write/edit 工具调用的 diff 渲染(原 DiffBlock)。

  • 统一/并排行号:unified 单栏默认(同一 gutter 并排显示旧/新行号),split 双栏可选(viewMode)
  • 真实文件行号:已完成的 edit/write 顶层调用,行号 gutter 显示文件中的真实行号(GitHub 式 @@ 位置),不是片段内 1..N 重新计数;新建文件(create)显示 1..N
  • 变更条:新增实心绿条、删除条纹红条;行背景色带统一延伸到最宽行
  • 词级高亮:行内改动叠加绿/红标记,shiki 语法着色(highlightLines)
  • 上下文折叠:长段未变更行折叠为"N 行未变更",向上/向下/全部展开
  • 窗口化渲染:固定行高窗口化,大 diff 不挂载全部行;sticky 横向滚动条(hover 显现)
  • 复制 + └ +A -R · N file(s) 页脚
  • edit 结果默认展开:settled 的 edit 结果卡展开即见替换 diff(write 保持默认收起)
  • PTC/Code 嵌套支持:Code Dispatch 内的 write/edit 子卡片同样接管——嵌套子调用核心短路 meta(exec.parent 时不执行 presentationMeta),插件按工具参数推导调用时 diff(edit 的 old_string→new_string、write 的整文件新增),错误子调用保持通用错误路径

机制

插件通过 keyed 接管替换 write/edit 的工具行渲染:ui-tool 的 tool.call.toolview 槽是开放 key 域,同一 key 以更低 priority 阴影(最低优先渲染)。插件注册 edit/write 键(priority -1),接管后的行完全复刻官方 FileMutationRow(复用官方 ToolRow 样式 + DisclosureRow/StateDot 等平台组件),只把展开后的 diff 卡换成 PiUI 风格 DiffViewer——不改任何核心,纯插件,卸载即还原官方行。

  • 真实行号机制:核心的 FileDiff 契约只有 { path, oldText, newText },工具执行时 hunk 的真实起始行(structuredPatch 的 oldStart/newStart)被核心丢弃。插件的 host 半(lib/index.js)监听 agent/created,在每个 agent 自己的 layer 上 re-register 一份 edit/write shadow 定义(官方 schedule 插件同款模式):schema/render/execute 全部原样复用原定义(...original),只替换 output.presentationMeta 为带行号的版本——用与核心相同的 structuredPatch(context 3)复算 hunk,把 oldStart/newStart 镌进 meta 的 diffs。零额外 diff 计算(同一次 structuredPatch 多带两个字段),文件读写语义不变(execute 引用原闭包)。
  • 行号透传:oldStart/newStart 随 tool/result 的 meta 落盘,穿过核心 diffsFromMeta 的窄化(只校验三个固定字段、额外字段原样保留)与插件自身的 narrowDiffs(畸形值拒绝),到达 DiffViewer 渲染真实行号。
  • 无锚点安全降级:老会话日志(meta 无行号)与 PTC 嵌套子调用(核心在 exec.parent 存在时短路 presentationMeta,meta 恒缺失)没有锚点 → 行号 gutter 隐藏(回到无行号的 diff 块),绝不显示编造的假行号。create(oldText: null)的 newText 即整个新文件,1..N 真实 → 显示。
  • 不限制高度:展开的 diff 直接撑开显示完整内容(不套滚动容器),窗口化渲染保证超大 diff 依然高效
  • diff 数据(dsh 0.1.2+ 契约):Host 的 presentCall/presentResult 视图不再进入 Client,diff 卡完全从原始事件字段派生——running 用参数推导的调用时 diff(edit 的 old_string→new_string、write 的整文件内容),settled 用 tool/result 落盘的 meta.diffs(应用后的 hunks,即行号所在的通道);执行错误走官方行的错误摘要 + IN/OUT 卡
  • 嵌套兜底:Code Dispatch 子调用(PTC 模式)的 meta 恒缺失(同上),插件回退到参数的调用时 diff——与官方行渲染同一调用的 running 态一致

效果

image

安装

方式一:GitHub 仓库直装(源码 + 构建产物)

lib/ 构建产物已提交进仓库,因此 github: 直装可直接工作(market 的 Install 按钮即走此路径):

dsh plugin --profile web add "github:lehhair/dsh-diff-viewer"

直装装的是仓库当前 commit 的构建产物。想要跟随最新 commit 请用 Release 资产(见下),它永远指向最新发版。

方式二:GitHub Release 构建产物(推荐,跟随发版)

每次发版后,GitHub Actions 自动构建并把 tarball 附加到 Releases 页。releases/latest 永远指向最新版本,安装链接不需要随版本改动:

# 直接用 latest 资产 URL(永远是最新版):
dsh plugin --profile web add "https://github.com/lehhair/dsh-diff-viewer/releases/latest/download/dsh-external-dsh-diff-viewer.tgz"

# 重启 dsh web 生效
dsh web

⚠️ 升级注意:pnpm 会按 URL 缓存 tarball——同一 latest 链接在出新版本后可能命中旧缓存。升级失败/装到旧版时,先 dsh plugin --profile web remove @dsh-external/dsh-diff-viewer,再 pnpm store prune(或删除 pnpm store path 输出目录中的对应缓存)后重新安装。

开发环境(从源码)

# devDependencies 用 link: 指向 ../dsh2026/deepseek-harness(本地 deepseek-harness checkout)
pnpm install && pnpm run check    # typecheck + test + build
# 直接安装本地目录,或 npm pack 后装 tarball:
dsh plugin --profile web add E:\dev\dsh-diff-viewer

Windows 注意:dsh plugin add <本地目录> 的 link: 绝对路径有 junction bug(pnpm 拼错目标)。用 tarball(npm pack 后 dsh plugin add *.tgz)可绕过。

发版注意:lib/ 已提交,源码改动必须同时重建并提交 lib/(CI 的 check 后会校验 lib/ 与源码一致,不一致即失败)。

卸载

dsh plugin --profile web remove @dsh-external/dsh-diff-viewer

开发

pnpm install && pnpm run check    # typecheck + test + build

测试需要 workspace 内的 @deepseek-ai/dsh-* 包(devDependencies 用 link: 指向 ../dsh2026/deepseek-harness,vitest alias 统一 react 单实例;接管行复用 ui-tool 的 ToolRow.module.css,经包导出的 src 子路径内联进 bundle)。

友情链接 / Friend Links

  • DSHFind — DeepSeek Harness 插件市场与学习社区