Skip to content

lehhair/dsh-diff-viewer

131Last commit Aug 15, 2026

dsh-diff-viewer DSH plugin

This plugin enhances the diff viewing experience in DSH Web GUI by replacing the default diff block with a PiUI-styled component. It supports unified and split view modes, word-level highlighting with syntax coloring, context folding, and windowed rendering for large diffs.

How to install the dsh-diff-viewer DSH plugin

dsh plugin --profile web add "https://github.com/lehhair/dsh-diff-viewer/releases/latest/download/dsh-external-dsh-diff-viewer.tgz

Copying does not run this command. Review the repository and version before installing the dsh-diff-viewer DSH plugin.

dsh-diff-viewer DSH plugin data source

dsh-diff-viewer DSH plugin snapshot date: Aug 16, 2026

discovered

What the dsh-diff-viewer DSH plugin can do

  • Unified and split diff view modes (configurable via viewMode)
  • Change bars: solid green for additions, striped red for deletions
  • Word-level highlighting with shiki syntax coloring
  • Context folding: collapse unchanged lines with expand buttons
  • Windowed rendering for large diffs to avoid DOM overload
  • Sticky horizontal scrollbar (appears on hover)
  • Copy button and footer showing +A -R · N file(s)

Where the dsh-diff-viewer DSH plugin fits

  • Reviewing code changes in a more visually appealing and informative way
  • Comparing file versions within the write/edit tool of DSH Web GUI
  • Collapsing large unchanged sections to focus on modified areas
  • Identifying word-level changes with syntax highlighting
  • Handling very large diffs efficiently without performance degradation

Who the dsh-diff-viewer DSH plugin is for

  • Developers using DSH Web GUI who frequently review diffs
  • Users of DeepSeek Harness who want an improved diff viewing experience

dsh-diff-viewer DSH plugin limitations

  • Only works within DSH Web GUI (not standalone or other editors)
  • Only replaces the diff block in write/edit tools; other diff views remain unchanged
  • Installation requires clearing pnpm cache when upgrading via the same URL
  • Source code installation is not supported without building locally

dsh-diff-viewer DSH plugin: from the repository README

Quoted from the lehhair/dsh-diff-viewer README, the upstream source of the dsh-diff-viewer DSH plugin. Copyright remains with the original authors.

DSH Web GUI 的 PiUI 风格 diff 查看器插件:替换 write/edit 工具调用的 diff 渲染(原 DiffBlock)。 - **unified 单栏默认**:同一 gutter 并排显示旧/新行号,无左右错位;split 双栏可选(`viewMode`) - **变更条**:新增实心绿条、删除条纹红条;行背景色带统一延伸到最宽行 - **词级高亮**:行内改动叠加绿/红标记,shiki 语法着色(`highlightLines`) - **上下文折叠**:长段未变更行折叠为"`N 行未变更`",向上/向下/全部展开 - **窗口化渲染**:固定行高窗口化,大 diff 不挂载全部行;sticky 横向滚动条(hover 显现) - **复制 + `└ +A -R · N file(s)` 页脚** ## 机制 插件通过 **keyed 接管**替换 write/edit 的工具行渲染:ui-tool 的 `tool.call.toolview` 槽是开放 key 域,同一 key 以**更低 priority 阴影**(最低优先渲染)。插件注册 `edit`/`write` 键(priority -1),接管后的行**完全复刻官方 FileMutationRow**(复用官方 ToolRow 样式 + DisclosureRow/StateDot 等平台组件),只把展开后的 diff 卡换成 PiUI 风格 DiffViewer——**不改任何核心,纯插件**,卸载即还原官方行。 - **不限制高度**:展开的 diff 直接撑开显示完整内容(不套滚动容器),窗口化渲染保证超大 diff 依然高效 - **diff 数据**:从工具调用的 `callView`/`resultView` 的 `card:'diff'` 意图提取(running 用调用时 diff,settled 用应用后的 hunks);执行错误(无 diff 卡)走官方行的错误摘要 + IN/OUT 卡 ## 效果 <img width="1740" height="1048" alt="image" src="https://github.com/user-attachments/assets/67b4db35-07e5-4fce-852d-bbe4ee33b695" /> ## 安装 ### 推荐:GitHub Release 构建产物(开箱即用) 每次发版后,GitHub Actions 自动构建并把 tarball 附加到 [Releases](https://github.com/lehhair/dsh-diff-viewer/releases) 页。`releases/latest` 永远指向最新版本,安装链接不需要随版本改动:

Read the full READMEThe repository declares no license. Check with the authors before using it.

dsh-diff-viewer DSH plugin questions

How do I install dsh-diff-viewer?

Run the command: `dsh plugin --profile web add "https://github.com/lehhair/dsh-diff-viewer/releases/latest/download/dsh-external-dsh-diff-viewer.tgz"`. Then restart the DSH web server with `dsh web`. This installs the pre-built tarball from the latest release.

How do I uninstall the plugin?

Use the command: `dsh plugin --profile web remove @dsh-external/dsh-diff-viewer`. This removes the plugin and restores the default diff block. No other files are affected.

Can I use it with split view by default?

Yes, set the `viewMode` option to `split`. The plugin reads the view mode from the tool call configuration. You can change it in the DSH Web GUI settings or programmatically.

Why does the diff look different from the default?

The plugin replaces the default diff block with a PiUI-styled viewer. It uses unified layout by default, adds change bars, word-level highlighting with syntax coloring, and supports context folding. If you prefer the original, just uninstall the plugin.

How do I update to the latest version?

First remove the plugin: `dsh plugin --profile web remove @dsh-external/dsh-diff-viewer`. Then clear pnpm store: `pnpm store prune`. Finally reinstall using the same URL. This ensures you get the latest build.