Introduction

DSH’s Web GUI collapses file edits into a single line by default. To view the changes, you must click the line. The dsh-inline-diff plugin replaces these lines with permanently expanded side-by-side diffs: the original code on the left and the new code on the right.

Installation

Install via CLI (recommended):

dsh plugin --profile web add github:JanEickholt/dsh-inline-diff

Manual installation:

  1. Add the dependency to the project’s package.json:
   "dsh-inline-diff": "github:JanEickholt/dsh-inline-diff"

Then run pnpm install in the project directory.

  1. Add the following configuration to the project’s cordis.patch.yml:
   - insert:
       - id: inline-diff
         name: 'dsh-inline-diff'
  1. Refresh the GUI page. Every edit and file write is rendered as an inline diff.

Core Features

The plugin provides a permanently expanded side-by-side diff view:

  • Side-by-side comparison: The original code is displayed on the left, and the new code is displayed on the right.
  • Visual indicators: Additions are shown in green, and deletions are shown in red. Each changed line has a colored edge bar.
  • Highlight details: By default, not only are lines highlighted, but changed words are also highlighted. Each file shows +N -N summary information.
  • Interaction: When hovering with the mouse, the highlight follows the line under the cursor. Collapsing long blocks is supported.
  • Code assistance: Includes line numbers, syntax highlighting (based on highlight.js), and the ability to collapse long blocks.

Configuration Options

After installation, you can adjust the display behavior in Settings:

  • Highlight mode: In Settings → Plugins → Inline diff, choose to highlight lines only or to highlight both lines and words.
  • Line numbers: Choose to show or hide line numbers.
  • Syntax highlighting: Choose to enable or disable code syntax highlighting.
  • Collapse long blocks: When enabled, blocks exceeding a certain number of lines are collapsed and can be expanded by clicking.
  • Wallpaper glass effect: If dsh-wallpaper-engine is installed and wallpaper is enabled, diff cards use a glassmorphism effect.

Notes

  • Theme compatibility: This plugin is compatible with dsh-stylevault, and color variables can be overridden through its Colors panel.
  • Line number accuracy: If an edit block cannot be located, line numbers may be inaccurate.
  • Language fallback: If a translation is missing, the interface falls back to English.
  • Client structure: The client is a self-contained file.
  • Development background: This plugin was written by an AI coding agent.

Ecosystem Context

The DSH philosophy is “everything is a plugin”. The community directory is an independent site and has no official affiliation with DeepSeek / Huanfang.

Links:
* GitHub repository: https://github.com/JanEickholt/dsh-inline-diff
* Community directory: https://www.skillhub.cn/plugins/JanEickholt/dsh-inline-diff