mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-29 00:35:00 +00:00
expand repomap even in smaller context windows
This commit is contained in:
parent
27948cafa6
commit
56f5e7e10c
1 changed files with 4 additions and 6 deletions
|
@ -71,12 +71,10 @@ class RepoMap:
|
|||
|
||||
# With no files in the chat, give a bigger view of the entire repo
|
||||
MUL = 16
|
||||
if (
|
||||
not chat_files
|
||||
and self.max_context_window
|
||||
and max_map_tokens * MUL < (self.max_context_window - 2048)
|
||||
):
|
||||
max_map_tokens *= MUL
|
||||
padding = 4096
|
||||
target = min(max_map_tokens * MUL, self.max_context_window - padding)
|
||||
if not chat_files and self.max_context_window and target > 0:
|
||||
max_map_tokens = target
|
||||
|
||||
dump(max_map_tokens)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue