使用结构化补丁格式来应用文件更改。这非常适合多文件 或多块编辑,因为单次Documentation Index
Fetch the complete documentation index at: https://openclaw.zhcndoc.com/llms.txt
Use this file to discover all available pages before exploring further.
edit 调用可能不够稳健。
该工具接受一个单独的 input 字符串,其中包含一个或多个文件操作:
参数
input(必填):完整的补丁内容,包括*** Begin Patch和*** End Patch。
注意事项
- 补丁路径支持相对路径(从工作区目录起)和绝对路径。
tools.exec.applyPatch.workspaceOnly默认值为true(仅限工作区内)。只有在你有意让apply_patch在工作区目录之外写入/删除时,才将其设为false。- 在
*** Update File:的 hunk 中使用*** Move to:可重命名文件。 *** End of File在需要时表示仅 EOF 插入。- 默认对 OpenAI 和 OpenAI Codex 模型可用。可设置
tools.exec.applyPatch.enabled: false来禁用它。 - 也可按模型进行限制:
tools.exec.applyPatch.allowModels。 - 配置仅位于
tools.exec下。