#11
Edit tool?
Is there a plan to introduce an Edit tool as well anytime soon?
Activity
3There are 3 ways to go about the edit tool rn
- Line-Number based edits - path of file, start_line, end_line, replacement_text
- Git diff patch - one single git diff patch
- Str find and replace - path of file, old_str(must match exactly) , new_str, replace_all(optional)
I think that find and replace would be a better choice bcuz line numbers can change drastically and will change continuously as the agent makes edits. This would require re-reading the file again and again. Also there are chances of bad edits bcuz there is no failure point before the edit actually happens. In str_find_and_replace, there is a early failure point which is basically that the agent is supposed to write the exact old_str, if that doesnt happen, the edit fails.
I havent worked with git diff patch much, but researching around it. What do you think?
Ship it. Please send a PR
Sorry for the slow reply. Could be added for sure. I'd need to research the common signature. Is it basically content, starting line, number of lines?