paul-gauthier / aider

aider is AI pair programming in your terminal
https://aider.chat/
Apache License 2.0
19.48k stars 1.79k forks source link

/commit not rebuilding repo map #729

Closed ErykCh closed 2 months ago

ErykCh commented 3 months ago

Issue

Hi,

I added files to the project, requested in #728 and I did /commit.

But it seems that /commit is not updating repo map because I'm not able to add new files using /add

/ls also not display them

Version and model info

No response

ErykCh commented 3 months ago

I use Visual Studio to preview code. And I did one refactoring outside Aider. And it looks like VS didn't add these files to the metadata kept in the .git directory

Because it looks like Aider uses data saved in .git and not actual files in the system.

It helped to do: git update-index --really-refresh

so it looks like doing /commit in Aider after doing refactoring in an external tool doesn't update all files

paul-gauthier commented 3 months ago

Thanks for trying aider and filing this issue.

Aider can only work with files that are part of your git repo. If you create new files, you need to git add them before aider can work with them.

ErykCh commented 3 months ago

I think it would be helpful if Aider verified the state of the repository before sending a query to the model.

It should say that in the meantime someone has modified the files and its status is not up to date.

It's best if /commit not only commits, but also adds all new files to the project. Then you can change it to some /sync command and then the description that if you make modifications outside the aider, you must synchronize the Aider before you start asking further questions.

paul-gauthier commented 3 months ago

Aider always uses the current state of the repo.

ErykCh commented 3 months ago

Yes, but the question is if Aider can check if current state of the repo is synchronized with file system?

paul-gauthier commented 3 months ago

I'm not sure I understand your question.

ErykCh commented 3 months ago

yeah, bots still need to evolve a bit as they respond to issues added by users on github.

Can you tell me your bot's name?

paul-gauthier commented 2 months ago

This tool is called aider.

ErykCh commented 2 months ago

Nice. Well, I will say that he handles tickets quite well, he rarely gets lost. Unless you or the bot respond alternately :-)

paul-gauthier commented 2 months ago

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