edit-diff-pro
Manifest validedit-diff-pro
安装(Install)
需要 DSH(DeepSeek Harness)与 web profile(dsh web):
# 1. 安装插件(pnpm git 依赖)
dsh plugin --profile web add github:lzxcs/edit-diff-pro
# 2. 在 ~/.dsh/profiles/web/cordis.patch.yml 末尾追加注入块:
- insert:
- id: edit-diff-pro
name: 'edit-diff-pro'
# 3. 重启 DSH Web(托盘菜单 → DSH Web 重启),浏览器 Ctrl+F5 刷新页面
卸载:dsh plugin --profile web remove edit-diff-pro,并删掉 cordis.patch.yml 中的注入块。
Web GUI 插件:把 edit / write 工具调用的 diff 卡片替换为 Claude Code 风格视图。
功能
- 可配置默认展开:新卡片默认折叠(与内置卡片一致),设置页(设置 → 插件 → "Diff 卡片")可切换为默认展开;点击卡片头部随时手动折叠/展开。
- 上下文 + 行号:结果 hunk 本身携带 ±3 行上下文;本插件按行对齐渲染(LCS),上下文行中性色、删除行红色
-、新增行绿色+,每行显示文件中的绝对行号(新增行显示新行号,其余显示旧行号)。 - 可定制颜色:设置页(设置 → 插件 → "Diff 卡片")提供删除/新增行的背景色与文字色四个取色器;保存后所有 diff 卡片即时更新,
重置默认恢复主题淡色样式、默认折叠阈值与默认折叠。颜色经 settings 服务持久化到$DSH_HOME/settings.yaml的edit-diff-pro:段(留空 = 未自定义)。 - 自动折叠:hunk 行数超过折叠阈值(设置页可调,默认 100 行)时自动折叠中间内容,保留头尾各一半行数;点击分界行"⋯ 已折叠 N 行 · 点击展开本段"只展开当前 hunk,卡片底部"全部展开 N 处折叠"一键展开全部。至少隐藏 10 行才折叠,避免一两个行的无意义折叠。阈值持久化在
edit-diff-pro:段的foldThreshold(20–5000,默认 100)。 - 优雅降级:文件已删除、被后续修改、超过 4MB 或读取失败时,退化为不带行号的对齐视图;运行中的调用按参数视图渲染。
结构
lib/index.js— Node half:通过ctx.inject注册回环路由与 settings 命名空间。GET /__edit-diff-pro/read?path=<path>[&cwd=<root>]→{ content }(LF 归一化);GET/POST /__edit-diff-pro/settings→ 读取/写入{ colors, foldThreshold, defaultExpanded },经 settings 服务落到$DSH_HOME/settings.yaml的edit-diff-pro:段;settings.register('edit-diff-pro', passThrough, { base }):让设置页能分发我们的卡片 (modlens 同款 pass-through schema)。
lib/client.js— Browser half:window.__ModuleLoader__.load惰性 CJS 工厂,require('react'),注册tool.call.toolview的edit/write两个 key (priority: -1影遮内置行),及settings.plugin.item的edit-diff-pro设置卡片; 颜色经共享 store 广播给所有 diff 卡片,以 CSS 变量--dshdc-*落到卡片根节点。
安装(本 profile)
package.jsondependencies 加"edit-diff-pro": "file:./edit-diff-pro"。cordis.patch.ymlinsert 行{ id: edit-diff-pro, name: 'edit-diff-pro' }。pnpm-workspace.yamlpackages加入edit-diff-pro。pnpm install后重启dsh web。
维护提示:pnpm 的 hoisted 链接器对
file:依赖会拷贝进 store 而不是软链, 且不会自动重建被删除的链接。本 profile 中node_modules\edit-diff-pro是指向 源码目录的 junction(New-Item -ItemType Junction),因此改lib/client.js后刷新页面即生效(服务端按请求读文件)。若某次pnpm install把它清掉了, 重新执行:New-Item -ItemType Junction -Path "node_modules\edit-diff-pro" -Target "~/.dsh\profiles\web\edit-diff-pro"
安全说明
读取路由绑定在 dsh 自带的回环 web 服务器上(默认 127.0.0.1),无鉴权;它只读文件, 大小上限 4MB。与内置 fs 工具同一权限面(本机用户可读路径),不额外放开写权限。
Comments
Loading…
From the same category
by anywhere-labs
为 DeepSeek Harness (DSH) 插件生态打造的现代化桌面端解决方案。万物皆「插件」,桌面本身也是「插件」。
★ 30.4k
↓ 108/wk
MIT
TypeScript
Oct 10, 2026
dsh plugin --profile web add dsh-plugin-desktopby zhu1090093659
DeepSeek Harness (DSH) Web Plugin Aggregation Ecosystem · Everything is a plugin, distributed via the Creative Workshop
★ 8.6k
↓ 119/wk
Apache-2.0
TypeScript
Oct 10, 2026
dsh plugin --profile web add dsh-webA collection of independent Web UI plugins and skins, including task boards, Git graphs, mobile access, and live token stats.
★ 7.6k
↓ 119/wk
Apache-2.0
TypeScript
dsh plugin --profile web add dsh-webby omdsh-dev
开放的侧边栏底座,支持三方拓展注册新侧边栏页面。内置文件渲染编辑/终端/侧边对话/Git/子代理页面 | Open sidebar foundation, supports third-party extensions to register new sidebar pages. Built-in file rendering/editing, terminal, side chat, Git,
★ 4.1k
↓ 35.2k/wk
MIT
TypeScript
Oct 9, 2026
dsh plugin --profile web add dsh-better-sidebarby bowenliang123
The best DeepSeek Harness plugin for context insight and management, with context dashboard / browser / sidebar and context command, for context statistics, composition, breakdown, evolution details,
★ 2k
↓ 29.4k/wk
Apache-2.0
TypeScript
Oct 11, 2026
dsh plugin --profile web add dsh-contextby shaobeichen
把 DeepSeek Harness 装进你的口袋:电脑上跑 dsh web,手机扫码即同步访问(局域网 + 公网,实时同屏)Put DeepSeek Harness in your pocket: run dsh web on your computer and access it synchronously by scanning a QR code on your phone (LAN +
★ 1.6k
↓ 3.1k/wk
GPL-2.0
JavaScript
Sep 16, 2026
dsh plugin --profile web add dsh-pocket