mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-24 14:25:00 +00:00
Can force repo-map on with: --map-tokens 1024
This commit is contained in:
parent
f8e76bcb88
commit
617b1bdee2
9 changed files with 17 additions and 7 deletions
|
@ -6,6 +6,7 @@
|
|||
- Added `--subtree-only` to limit aider to current directory subtree.
|
||||
- Should help with large/mono repo performance.
|
||||
- New `/add-clipboard-image` to add images to the chat from your clipboard.
|
||||
- Use `--map-tokens 1024` to use repo map with any model.
|
||||
- Support for Sonnet's 8k output window.
|
||||
- [Aider already supported infinite output from Sonnet.](https://aider.chat/2024/07/01/sonnet-not-lazy.html)
|
||||
- Performance improvements for large repos.
|
||||
|
|
|
@ -181,7 +181,7 @@ def get_parser(default_config_files, git_root):
|
|||
group.add_argument(
|
||||
"--map-tokens",
|
||||
type=int,
|
||||
default=1024,
|
||||
default=None,
|
||||
help="Max number of tokens to use for repo map, use 0 to disable (default: 1024)",
|
||||
)
|
||||
group.add_argument(
|
||||
|
|
|
@ -311,8 +311,17 @@ class Coder:
|
|||
if not self.repo:
|
||||
self.find_common_root()
|
||||
|
||||
if map_tokens is None:
|
||||
use_repo_map = main_model.use_repo_map
|
||||
map_tokens = 1024
|
||||
else:
|
||||
use_repo_map = True
|
||||
|
||||
max_inp_tokens = self.main_model.info.get("max_input_tokens") or 0
|
||||
if main_model.use_repo_map and self.repo and self.gpt_prompts.repo_content_prefix:
|
||||
|
||||
has_map_prompt = hasattr(self, "gpt_prompts") and self.gpt_prompts.repo_content_prefix
|
||||
|
||||
if use_repo_map and self.repo and has_map_prompt:
|
||||
self.repo_map = RepoMap(
|
||||
map_tokens,
|
||||
self.root,
|
||||
|
|
|
@ -21,6 +21,7 @@ cog.out(text)
|
|||
- Added `--subtree-only` to limit aider to current directory subtree.
|
||||
- Should help with large/mono repo performance.
|
||||
- New `/add-clipboard-image` to add images to the chat from your clipboard.
|
||||
- Use `--map-tokens 1024` to use repo map with any model.
|
||||
- Support for Sonnet's 8k output window.
|
||||
- [Aider already supported infinite output from Sonnet.](https://aider.chat/2024/07/01/sonnet-not-lazy.html)
|
||||
- Performance improvements for large repos.
|
||||
|
|
|
@ -84,7 +84,7 @@
|
|||
#show-model-warnings: true
|
||||
|
||||
## Max number of tokens to use for repo map, use 0 to disable (default: 1024)
|
||||
#map-tokens: true
|
||||
#map-tokens:
|
||||
|
||||
## Maximum number of tokens to use for chat history. If not specified, uses the model's max_chat_history_tokens.
|
||||
#max-chat-history-tokens:
|
||||
|
|
|
@ -88,7 +88,7 @@
|
|||
#AIDER_SHOW_MODEL_WARNINGS=true
|
||||
|
||||
## Max number of tokens to use for repo map, use 0 to disable (default: 1024)
|
||||
#AIDER_MAP_TOKENS=true
|
||||
#AIDER_MAP_TOKENS=
|
||||
|
||||
## Maximum number of tokens to use for chat history. If not specified, uses the model's max_chat_history_tokens.
|
||||
#AIDER_MAX_CHAT_HISTORY_TOKENS=
|
||||
|
|
|
@ -123,7 +123,7 @@ cog.outl("```")
|
|||
#show-model-warnings: true
|
||||
|
||||
## Max number of tokens to use for repo map, use 0 to disable (default: 1024)
|
||||
#map-tokens: true
|
||||
#map-tokens:
|
||||
|
||||
## Maximum number of tokens to use for chat history. If not specified, uses the model's max_chat_history_tokens.
|
||||
#max-chat-history-tokens:
|
||||
|
|
|
@ -130,7 +130,7 @@ cog.outl("```")
|
|||
#AIDER_SHOW_MODEL_WARNINGS=true
|
||||
|
||||
## Max number of tokens to use for repo map, use 0 to disable (default: 1024)
|
||||
#AIDER_MAP_TOKENS=true
|
||||
#AIDER_MAP_TOKENS=
|
||||
|
||||
## Maximum number of tokens to use for chat history. If not specified, uses the model's max_chat_history_tokens.
|
||||
#AIDER_MAX_CHAT_HISTORY_TOKENS=
|
||||
|
|
|
@ -175,7 +175,6 @@ Aliases:
|
|||
|
||||
### `--map-tokens VALUE`
|
||||
Max number of tokens to use for repo map, use 0 to disable (default: 1024)
|
||||
Default: 1024
|
||||
Environment variable: `AIDER_MAP_TOKENS`
|
||||
|
||||
### `--max-chat-history-tokens VALUE`
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue