aider icon indicating copy to clipboard operation
aider copied to clipboard

Feature Request: Adding multiple repos to chat

Open cranyy opened this issue 1 year ago • 12 comments

With the addition of the new 128k model, it would be nice to have the option to add multiple repos to the chat so that we can compare them and add/modify functions from one to the other.

Also, a bit of a side note - it would be very nice to add a "/add all " command, that just adds every single file from the repo to the chat or something like that to make the process easier, as it much easier now to just add every single file instead of relying on the repo map, since you dont even get close to the max tokens most of the time.

cranyy avatar Nov 10 '23 14:11 cranyy

You should be able to do /add * to add an entire repo.

I'll be curious to hear how this works for you. Typically it's best to just add relevant information to the context. Adding a lot of irrelevant content tends to confuse LLMs. So the best thing may still be to /add just the files that are relevant to your task and let the repo map provide a lightweight amount of additional code context.

But this is a brand new model, so we'll have to see what works best! I'm hoping to do some experimenting on this topic soon.

paul-gauthier avatar Nov 10 '23 14:11 paul-gauthier

My understanding of @cranyy's request was to have the ability to add a separate repository (such as a dependency) to aider's tree-sitter repository map, not to /add * the project repository. For instance, since GPT-4's knowledge cutoff is April 2013, I've found that aider is quite unable to help with projects that have dependencies which have changed significantly since then, such as projects where I use LangChain's new LCEL syntax. It would be amazing if there was a command like /map https://github.com/langchain-ai/langchain and aider would construct the syntax tree of that dependency.

brendancsmith avatar Dec 31 '23 08:12 brendancsmith

You should be able to do /add * to add an entire repo.

I guess this means ONE entire repo? Or adding an entire second repo?

YosuCadilla avatar Jun 23 '24 06:06 YosuCadilla

You should be able to do /add * to add an entire repo.

I guess this means ONE entire repo? Or adding an entire second repo?

The original question was about adding additional repos for RAG (right now Aider only indexes a single repo at a time). Using /add adds files to the chat which is a different thing. I've tried using git submodules but they don't get indexed afaict.

jimwhite avatar Jun 23 '24 08:06 jimwhite

Understood, thanks @jimwhite I'll have to monorepo microservices, snif.

YosuCadilla avatar Jun 24 '24 15:06 YosuCadilla

How about copying all the repos you want to work with in a single folder and then do /add * from there ?

corridordigital avatar Jul 18 '24 15:07 corridordigital

How about copying all the repos you want to work with in a single folder and then do /add * from there ?

It isn't /add that we need, it is the repo index search used for the in-context RAG. Making one repo out of multiple projects is not really a practical workflow. I think the way to approach this is for Aider to take a list of repos, not just one. With that in place then it would be simple to add git submodule support.

jimwhite avatar Jul 18 '24 16:07 jimwhite

Understood, thanks @jimwhite I'll have to monorepo microservices, snif.

I did exactly that - But isn't there another way ? My front-end and my back-end are two different repositories but I can only use Aider in one of them at a time

raversa001 avatar Jul 24 '24 07:07 raversa001

I'm using an obscure python library and claude isn't doing too well. How can i add context about this to Aider?

lockmeister avatar Jul 26 '24 13:07 lockmeister