Comments (7)
Thanks for trying aider and filing this issue.
The repo-map varies dynamically based on the state of the chat. Specifically, right now it depends on which files have been added to the chat. So it would be possible to cache it indexed on the set of added files. In the future the repo map is likely to be even more dynamic though.
Monorepos are definitely a challenge for aider, which hasn't been optimized to work with such a large number of files.
from aider.
Thanks for the fast response! Makes sense to me.
For us, aider
is really useful for automating repetitive refactor tasks, but the repo map building takes a large percentage of the working time.
If there's anything in the backlog we can do to improve monorepo functionality, we have some capacity to invest time.
from aider.
For anyone who wants a quick-ish fix, we've been using this script to 'focus' aider
in your current directory and add context manually outside that.
#!/bin/bash
# This is a wrapper for `https://aider.chat/`.
# Monorepo's can be too big for `aider` to handle the context.
# This script wraps `aider`, ignoring all directories except the directory you run it from.
# You can also add additional context manually using `--context`.
# Any arguments you provide will be passed through to `aider`.
# Recommend installing this in your own `/usr/local/bin` directory so you can call it from PATH.
# `sudo cp faider.sh /usr/local/bin/faider`
# Parse command line arguments
ARGS=("$@")
for index in "${!ARGS[@]}"; do
arg=${ARGS[index]}
case $arg in
--context=*)
CONTEXT="${arg#*=}"
unset 'ARGS[index]'
;;
esac
done
# Get the root directory of the git repository
GIT_ROOT=$(git rev-parse --show-toplevel)
# Create .aiderignore file in the root of the git repository
echo "*" > "$GIT_ROOT/.aiderignore"
echo "!$(basename "$PWD")" >> "$GIT_ROOT/.aiderignore"
# If context directories are provided, include them
if [ -n "$CONTEXT" ]; then
IFS=',' read -ra DIRS <<< "$CONTEXT"
for dir in "${DIRS[@]}"; do
echo "!$dir" >> "$GIT_ROOT/.aiderignore"
done
fi
# Run aider with remaining arguments
aider "${ARGS[@]}"
# Remove .aiderignore file
rm "$GIT_ROOT/.aiderignore"
Some people have anecdotally said they get better results from aider
by doing this, even outside big repos, but I don't really have any concrete data on that.
from aider.
FYI there's a ~2X performance improvement landing soon for the repo map.
from aider.
FYI there's a ~2X performance improvement landing soon for the repo map.
Cool! I'm guessing this won't improve the max size it can support though?
Although I guess it could, since GPT-4o context is much bigger.
from aider.
The main branch has the new performance improvements for the repo map, including caching components of the repo map.
You can get it by installing the latest version from github:
python -m pip install --upgrade git+https://github.com/paul-gauthier/aider.git
If you have a chance to try it, let me know if it works better for you.
from aider.
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.
from aider.
Related Issues (20)
- completion always adds backticks HOT 1
- azure/gpt-4-turbo-vision-preview only returns a few tokens before returning 'The chat session is larger than the context window!' HOT 4
- Aider support for hosted LLM (LLM gateway endpoint) HOT 4
- Let aider grok and configure the environment and run commands autonomously HOT 2
- Add option to force the AI to ask the user to confirm each change before doing it HOT 1
- Add support for WebStorm
- Renaming/moving files HOT 1
- aider: error: unrecognized arguments HOT 2
- tests folder is imported as separate package HOT 1
- .NET: Add a support of auto-installing new NuGet package into the project or solution HOT 2
- Aider benchmark results on quantized Codeqwen-8B, Codestral-22B, Qwen2-72B HOT 1
- .NET: Linter runner doesn't work HOT 2
- Question / contributing test cases. HOT 1
- Feature request: giving aider an example PR or commit HOT 2
- Configure aider to always add specific files to the chat (eg, conventions file) HOT 2
- Ugly crash during startup when `~/.gitconfig` is missing [user] HOT 2
- Running --commit --dry-run should not actually make the commit HOT 1
- Add an option to skip SSL verification for users behind firewalls
- Suggestion: Multi Agent (Supervisor/Reviewer agent)
- Sublime Text (or rather Sublime Merge Support)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from aider.