2e14873f2d
Track application source and tests; exclude local env, user workspaces, and runtime data via .gitignore. Co-authored-by: Cursor <cursoragent@cursor.com>
772 B
772 B
name, description
| name | description |
|---|---|
| diff-viewer | 代码对比可视化技能:以高亮 diff 形式展示文件修改前后(需启用 diffviewer 扩展) |
Diff 查看器
使用 diffviewer MCP 扩展在聊天中渲染代码修改对比。
何时使用
- 用户要看代码改动前后对比
- 展示重构、bug 修复、配置变更的效果
- 比 markdown 代码块更直观地呈现变更
前提
Settings → Extensions 中启用 Diff Viewer 扩展。
工具
show_diff(title, old_content, new_content, language?) — 渲染带行号的 diff
规则
language填文件类型(rust、typescript、python等),用于语法提示- 内容太大时只截取关键改动部分,加说明
- 配合
git_diff工具使用效果最佳