add edit tool usage notes to AGENTS.md

This commit is contained in:
tian 2026-05-30 19:17:30 +08:00
parent 56a1ef55f4
commit 378bb6264c

View File

@ -146,3 +146,22 @@ var rotation = new Rotation3D(qx, qy, qz, qw);
4. `doc/design/2026/NavisworksAPI使用方法.md`
5. `.agents/skills/geometry-transform/SKILL.md`(几何/变换/姿态/坐标)
6. `.agents/skills/nw-api/SKILL.md`
---
## 9. 工具使用提示
### edit 工具的正确格式
```json
{
"path": "src/.../File.cs",
"edits": [
{ "oldText": "原文本(必须完全匹配)", "newText": "新文本" }
]
}
```
- `path` 是顶层字段,不在 `edits` 数组内
- `oldText` 不能有歧义(匹配多个时提供更多上下文)
- 多个不重叠的编辑可以放在同一个 `edits` 数组中