aider icon indicating copy to clipboard operation
aider copied to clipboard

Feature request: play nice with external editing

Open jbellis opened this issue 1 year ago • 5 comments

Issue

My aider workflow is

  1. Ask aider to make a change
  2. Review changes, often I make changes to what Claude came up with
  3. Repeat

Currently I have to /drop and re-/add files that I changed in my IDE. Could aider automatically reload files that changed on disk since its last edit? I'm happy to take a stab at this.

Version and model info

Aider v0.56.0

jbellis avatar Sep 14 '24 22:09 jbellis

That should already be unnecessary. aider loads all files that are part of the context before sending them to the LLM fresh from the disk. They do not get stored in memory. So if you make changes outside aider, they will be reflected the next time you send a prompt to the LLM.

fry69 avatar Sep 14 '24 22:09 fry69

I guess it needs to check earlier then, because the changes are definitely not visible for tab completion unless I manually drop and add.

jbellis avatar Sep 15 '24 00:09 jbellis

The changes may not be visible to autocomplete, but the files get read from disk before they get sent to the LLM. You definitely do not need to /drop and /add before sending a new prompt to the LLM.

As long as the files are part of the repository, aider will see and know them. If possible, commit your changes after editing them from outside before you switch to aider again.

fry69 avatar Sep 15 '24 00:09 fry69

You're right, it's reloading before sending to the LLM. Only autocomplete gets confused.

jbellis avatar Sep 15 '24 00:09 jbellis

You could also just press ENTER in aider to start a new blank prompt. That will refresh the autocompleter.

paul-gauthier avatar Sep 22 '24 01:09 paul-gauthier

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 Oct 07 '24 20:10 paul-gauthier