dsh-edit-diff
「DSH·质量 diff」:接管 edit/write 及 extraTools 配置的其他工具卡片:行级去重与行内高亮,消除相同内容在删除与新增两区的重复;兼容 PTC 模式,标准可安装的 dsh 客户端插件 适合需要清晰对比文件修改、减少差异卡片中重复展示内容的用户。
Other repositories with this package name
Install
$
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:better-er/dsh-edit-diffREADME
Read the full README ↗配置
extraTools 列出 edit 与 write 之外要接管的工具。每条写工具名和读取参数用的参数名,参数名省略时按 file_path、old_string、new_string、content 取值。
插件自带的 cordis.patch.yml 已经默认接管 dsh-remote-file-system 的这两个远程工具:
- insert:
- id: dsh-edit-diff
name: dsh-edit-diff
config:
extraTools:
- name: edit_remote
- name: write_remote
它们的参数名和原生一致,只写名字即可。参数名不同的工具再补:
extraTools:
- name: some_tool
pathKey: target
oldKey: before
newKey: after
contentKey: body
要改这份默认,在 profile 的 cordis.patch.yml 里按 id 覆盖:
- id: dsh-edit-diff
config:
extraTools:
- name: some_tool
判断规则:参数里同时有旧文本与新文本就按 edit 型渲染,否则有整文件内容就按 write 型渲染。
配置经 settings 命名空间 dsh-edit-diff 送到浏览器端,settings 变化会让浏览器端重建这批 key 的注册。