Back to home

cirelir

dsh-change-review

DeepSeek Harness 会话修改审查插件:追踪会话内 write/edit,diff 对比展示,会话隔离/子代理聚合/SSE 实时推送/颜色自定义

Stars
0
Language
JavaScript
Created
Aug 15, 2026
Updated
Aug 15, 2026

Introduction

dsh-change-review

A session change-review plugin for DeepSeek Harness (DSH): automatically tracks file write/edit operations inside your session and renders them as line-level diffs with customizable colors — session-isolated, subagent-aggregated, and pushed live via SSE.

One package carries both the Host logic and the browser UI (dsh.bundle + dsh.client manifests).

中文说明

✨ Features

FeatureDescription
Auto trackingListens to write / edit tool calls, records before/after content and timestamps
Diff viewLCS line-level diff: added (green) / removed (red) / context (gray) lines with both-side line numbers
Session isolationEach session reviews only its own changes; switching sessions switches the review
Subagent aggregationChanges made by subagents are aggregated into the root parent session
Live updatesSSE server push — the badge and list refresh instantly when files change (zero polling)
Count badgeThe 「审查」(Review) tab shows the pending file count; badge background/text colors are customizable
Color customization8 colors configurable under Settings → 修改审查 (Review), persisted in localStorage
Clean sidebarHides the Cordis plugin run indicator (cordis-panel) from the left sidebar

📦 Install

Option A: dsh plugin add (after npm publish)

dsh plugin --profile web add dsh-change-review

Option B: manual deployment

  1. Make the package resolvable by the harness (e.g. place it in node_modules) and register it in the profile's cordis.patch.yml:
- insert:
    - id: diff-review
      name: 'dsh-change-review'
    - id: ui-diff-review
      name: 'dsh-change-review'
  1. Restart dsh web

This plugin targets the Web profile (dsh --profile web).

🚀 Usage

  1. Open a session and click the 「审查」(Review) view tab (after「对话」Chat, before「轨迹」Trajectory)
  2. Left: file list (write/edit counts, ~added/~removed stats); right: the selected file's diff
  3. The badge increments in real time when files change; top bar: refresh, 清空 clear the current session's records
  4. Colors: Settings → 修改审查 (8 items + light/dark presets + restore defaults), auto-saved, survives refresh

🎨 Color Configuration

ItemKeyLight defaultDark preset
Added line backgroundaddBg#e6ffec#10251c
Added line textaddFg#1a7f37#7ee787
Removed line backgrounddelBg#ffebe9#2d1415
Removed line textdelFg#cf222e#ffa198
Context backgroundctxBg#f6f8fa#161b22
Line numbers / markersgutter#57606a#8b949e
Badge backgroundbadgeBg#0969da#4493f8
Badge textbadgeFg#ffffff#0d1117

🧠 Behavior Notes

  • Scope: all write/edit tool calls in the current process, bucketed per session; subagent changes are aggregated up the owner chain to the root parent session
  • Real time: the Host pushes via SSE (/diff-review/events); the client only processes events for the current session
  • Persistence: colors persist (localStorage key dsh.diff-review.colors); review records are process-local and rebuild from new modifications after a restart
  • Capacity guards: max 100 ops per file; content truncated at 120KB per op; diff capped at 1500 lines per side

🗂 Architecture

Host (lib/index.js)
  · tools/result listener → per-session buckets
  · LCS line diff
  · HTTP routes: /diff-review/summary · /file · /clear (all with ?session=)
  · SSE: /diff-review/events
        │  HTTP + SSE (same origin)
Browser UI (lib/client.js, __ModuleLoader__ bundle)
  · hidden session probe syncs the current session
  · 「审查」view tab + badge
  · Settings page「修改审查」color customization
  · EventSource live subscription

⚖️ Disclaimer

Plugin code runs with the same privileges as your harness process. Review the source before installing; inclusion in community markets is not a security endorsement.

📄 License

MIT