mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-31 17:55:01 +00:00
copy
This commit is contained in:
parent
f12589fd74
commit
73f9b67761
3 changed files with 36 additions and 31 deletions
|
@ -12,23 +12,22 @@ Aider
|
|||
uses a **concise map of your whole git repository**
|
||||
that includes
|
||||
the most important classes and functions along with their types and call signatures.
|
||||
This helps the LLM understand the code it needs to change,
|
||||
This helps aider understand the code it's editing
|
||||
and how it relates to the other parts of the codebase.
|
||||
The repo map also helps the LLM write new code
|
||||
The repo map also helps aider write new code
|
||||
that respects and utilizes existing libraries, modules and abstractions
|
||||
found elsewhere in the codebase.
|
||||
|
||||
## Using a repo map to provide context
|
||||
|
||||
Aider sends a **repo map** to the LLM along with
|
||||
each request from the user to make a code change.
|
||||
The map contains a list of the files in the
|
||||
each change request from the user.
|
||||
The repo map contains a list of the files in the
|
||||
repo, along with the key symbols which are defined in each file.
|
||||
It shows how each of these symbols are defined in the
|
||||
source code, by including the critical lines of code for each definition.
|
||||
It shows how each of these symbols are defined, by including the critical lines of code for each definition.
|
||||
|
||||
Here's a
|
||||
sample of the map of the aider repo, just showing the maps of
|
||||
Here's a part of
|
||||
the repo map of aider's repo, for
|
||||
[base_coder.py](https://github.com/paul-gauthier/aider/blob/main/aider/coders/base_coder.py)
|
||||
and
|
||||
[commands.py](https://github.com/paul-gauthier/aider/blob/main/aider/commands.py)
|
||||
|
@ -71,7 +70,7 @@ aider/commands.py:
|
|||
Mapping out the repo like this provides some key benefits:
|
||||
|
||||
- The LLM can see classes, methods and function signatures from everywhere in the repo. This alone may give it enough context to solve many tasks. For example, it can probably figure out how to use the API exported from a module just based on the details shown in the map.
|
||||
- If it needs to see more code, the LLM can use the map to figure out by itself which files it needs to look at in more detail. The LLM will then ask to see these specific files, and aider will automatically add them to the chat context.
|
||||
- If it needs to see more code, the LLM can use the map to figure out which files it needs to look at. The LLM can ask to see these specific files, and aider will offer to add them to the chat context.
|
||||
|
||||
## Optimizing the map
|
||||
|
||||
|
|
|
@ -71,24 +71,26 @@ for more details.
|
|||
|
||||
## Features
|
||||
|
||||
- Chat with aider about your code: `aider <file1> <file2> ...`
|
||||
- Run aider with the files you want to edit: `aider <file1> <file2> ...`
|
||||
- Ask for changes:
|
||||
- New features, test cases, improvements.
|
||||
- Bug fixes, updated docs or code refactors.
|
||||
- Paste in a GitHub issue that needs to be solved.
|
||||
- Add new features or test cases.
|
||||
- Describe a bug.
|
||||
- Paste in an error message or or GitHub issue URL.
|
||||
- Refactor code.
|
||||
- Update docs.
|
||||
- Aider will edit your files to complete your request.
|
||||
- Aider [automatically git commits](https://aider.chat/docs/git.html) changes with a sensible commit message.
|
||||
- Aider works with [most popular languages](https://aider.chat/docs/languages.html): python, javascript, typescript, php, html, css, and more...
|
||||
- Aider works best with GPT-4o and Claude 3 Opus
|
||||
and can [connect to almost any LLM](https://aider.chat/docs/llms.html).
|
||||
- Aider can make coordinated changes across multiple files at once.
|
||||
- Aider can edit multiple files at once for complex requests.
|
||||
- Aider uses a [map of your entire git repo](https://aider.chat/docs/repomap.html), which helps it work well in larger codebases.
|
||||
- You can also edit files in your editor while chatting with aider.
|
||||
Aider will notice and always use the latest version.
|
||||
So you can bounce back and forth between aider and your editor, to collaboratively code with AI.
|
||||
- Images can be added to the chat (GPT-4o, GPT-4 Turbo, etc).
|
||||
- URLs can be added to the chat and aider will read their content.
|
||||
- [Code with your voice](https://aider.chat/docs/voice.html) using speech recognition.
|
||||
- Edit files in your editor while chatting with aider,
|
||||
and it will always use the latest version.
|
||||
Pair program with AI.
|
||||
- Add images to the chat (GPT-4o, GPT-4 Turbo, etc).
|
||||
- Add URLs to the chat and aider will read their content.
|
||||
- [Code with your voice](https://aider.chat/docs/voice.html).
|
||||
|
||||
|
||||
## State of the art
|
||||
|
@ -115,6 +117,7 @@ projects like django, scikitlearn, matplotlib, etc.
|
|||
- [Configuration](https://aider.chat/docs/config.html)
|
||||
- [Troubleshooting](https://aider.chat/docs/troubleshooting.html)
|
||||
- [LLM Leaderboards](https://aider.chat/docs/leaderboards/)
|
||||
- [GitHub](https://github.com/paul-gauthier/aider)
|
||||
- [Discord](https://discord.gg/Tv2uQnR88V)
|
||||
- [Blog](https://aider.chat/blog/)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue