Replies: 2 comments
-
|
https://github.com/umijs/takumi/blob/70aa2cc/src/utils/applyEdit.ts#L34 whole 是全文替换,更多模式参考 https://aider.chat/docs/more/edit-formats.html#whole |
Beta Was this translation helpful? Give feedback.
0 replies
-
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment

Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
现状梳理
1)prompt 解释
src/tools/FileEditTool.ts这段
description文本是在说明一个“文件编辑”工具的使用规范和注意事项,核心内容可以归纳为:功能定位
mv命令。使用前的准备
发起一次替换操作时需要提供
file_path:要改的文件的绝对路径(不能是相对路径)。old_string:要替换掉的原始文本,要求在文件中唯一且完全匹配(包括空格、缩进)。new_string:替换后的新文本。每次调用工具,只会替换一次
old_string出现的位置。新建文件
file_path指向一个不存在的完整路径。old_string为空字符串,new_string填入整个文件的初始内容。多次修改同一文件
src/utils/applyEdit.ts现在是 search & replace 的形式。
任务确认
看明白要加个 e,但不知道还要给 FileEditTool 增加啥能力?
Beta Was this translation helpful? Give feedback.
All reactions