mirror of
https://github.com/Aider-AI/aider.git
synced 2025-06-01 02:05:00 +00:00
fix: Adjust the starting number for the binary search in the RepoMap class
This commit is contained in:
parent
a85ccc26bc
commit
b19795228f
1 changed files with 5 additions and 1 deletions
|
@ -395,12 +395,16 @@ class RepoMap:
|
||||||
|
|
||||||
chat_rel_fnames = [self.get_rel_fname(fname) for fname in chat_fnames]
|
chat_rel_fnames = [self.get_rel_fname(fname) for fname in chat_fnames]
|
||||||
|
|
||||||
|
dump(max_map_tokens)
|
||||||
|
|
||||||
# Guess a small starting number to help with giant repos
|
# Guess a small starting number to help with giant repos
|
||||||
middle = min(max_map_tokens // 25, num_tags)
|
middle = min(max_map_tokens // 50, num_tags)
|
||||||
|
|
||||||
self.tree_cache = dict()
|
self.tree_cache = dict()
|
||||||
|
|
||||||
while lower_bound <= upper_bound:
|
while lower_bound <= upper_bound:
|
||||||
|
dump(lower_bound, middle, upper_bound)
|
||||||
|
|
||||||
tree = self.to_tree(ranked_tags[:middle], chat_rel_fnames)
|
tree = self.to_tree(ranked_tags[:middle], chat_rel_fnames)
|
||||||
num_tokens = self.token_count(tree)
|
num_tokens = self.token_count(tree)
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue