mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-29 00:35:00 +00:00
fix: Update cache threshold logic in RepoMap class
This commit is contained in:
parent
38d4da5416
commit
4d6bb2b1f1
1 changed files with 2 additions and 3 deletions
|
@ -29,7 +29,6 @@ class RepoMap:
|
|||
CACHE_VERSION = 3
|
||||
TAGS_CACHE_DIR = f".aider.tags.cache.v{CACHE_VERSION}"
|
||||
|
||||
cache_missing = False
|
||||
|
||||
warned_files = set()
|
||||
|
||||
|
@ -52,6 +51,7 @@ class RepoMap:
|
|||
self.root = root
|
||||
|
||||
self.load_tags_cache()
|
||||
self.cache_threshold = 0.95
|
||||
|
||||
self.max_map_tokens = map_tokens
|
||||
self.map_mul_no_files = map_mul_no_files
|
||||
|
@ -260,9 +260,8 @@ class RepoMap:
|
|||
# https://networkx.org/documentation/stable/_modules/networkx/algorithms/link_analysis/pagerank_alg.html#pagerank
|
||||
personalize = 100 / len(fnames)
|
||||
|
||||
if self.cache_missing:
|
||||
if len(self.TAGS_CACHE) < self.cache_threshold * len(fnames):
|
||||
fnames = tqdm(fnames)
|
||||
self.cache_missing = False
|
||||
|
||||
for fname in fnames:
|
||||
if progress:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue