aider icon indicating copy to clipboard operation
aider copied to clipboard

Optimize move or remove file -- use command line instead of SEARCH/REPLACE

Open dat-lequoc opened this issue 1 year ago • 2 comments

Issue

Currently, aider uses SEARCH/REPLACE to move or remove files. Which is very slow an unoptimized. We may prompt engineer to suggest rm or mv instead.

Version and model info

Aider v0.56.0 Main model: claude-3-5-sonnet-20240620 with diff edit format, infinite output Weak model: claude-3-haiku-20240307 Git repo: .git with 77 files Repo-map: using 1024 tokens, auto refresh

dat-lequoc avatar Sep 16 '24 08:09 dat-lequoc

Currently, aider uses SEARCH/REPLACE to move or remove files. Which is very slow an unoptimized. We may prompt engineer to suggest rm or mv instead.

LLMs work in not very intuitive ways. More tokens help them think and less/shorter tokens make prompts more ambiguous and create problems. So your suggestions to "optimize" may actually backfire. But feel free to test this out and prove me wrong. LLMs are still probabilistic machines and sometimes results can be surprising.

The relevant code is here: https://github.com/paul-gauthier/aider/blob/main/aider/coders/editblock_coder.py https://github.com/paul-gauthier/aider/blob/main/aider/coders/editblock_prompts.py

If you mean by rm/mv to replace whole files, there is already the whole coder/edit format. See also -> https://aider.chat/docs/usage/modes.html

fry69 avatar Sep 16 '24 08:09 fry69

@fry69 I see you point, thank you 🤗!

dat-lequoc avatar Sep 16 '24 13:09 dat-lequoc

I'm going to close this issue for now, but feel free to add a comment here and I will re-open. Or feel free to file a new issue any time.

paul-gauthier avatar Sep 20 '24 19:09 paul-gauthier