mirror of
https://github.com/Aider-AI/aider.git
synced 2025-06-02 02:34:59 +00:00
refactor: Update repo map token handling and improve warning message
This commit is contained in:
parent
a9cf438100
commit
d48008e13d
4 changed files with 15 additions and 6 deletions
|
@ -231,10 +231,10 @@ class Coder:
|
|||
if map_tokens > 0:
|
||||
refresh = self.repo_map.refresh
|
||||
lines.append(f"Repo-map: using {map_tokens} tokens, {refresh} refresh")
|
||||
max_map_tokens = 2048
|
||||
max_map_tokens = self.main_model.get_repo_map_tokens() * 2
|
||||
if map_tokens > max_map_tokens:
|
||||
lines.append(
|
||||
f"Warning: map-tokens > {max_map_tokens} is not recommended as too much"
|
||||
f"Warning: map-tokens > {max_map_tokens} is not recommended. Too much"
|
||||
" irrelevant code can confuse LLMs."
|
||||
)
|
||||
else:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue