fix: ensure integer indices for list slicing in repomap.py

This commit is contained in:
Paul Gauthier (aider) 2025-01-11 15:49:58 -08:00
parent e94b05851f
commit 392fb21946

View file

@ -605,7 +605,7 @@ class RepoMap:
self.tree_cache = dict() self.tree_cache = dict()
middle = min(max_map_tokens // 25, num_tags) middle = min(int(max_map_tokens // 25), num_tags)
while lower_bound <= upper_bound: while lower_bound <= upper_bound:
# dump(lower_bound, middle, upper_bound) # dump(lower_bound, middle, upper_bound)
@ -628,7 +628,7 @@ class RepoMap:
else: else:
upper_bound = middle - 1 upper_bound = middle - 1
middle = (lower_bound + upper_bound) // 2 middle = int((lower_bound + upper_bound) // 2)
spin.end() spin.end()
return best_tree return best_tree