From 6345cd373470e03597a5b9bb5bed04e95110aba2 Mon Sep 17 00:00:00 2001 From: Paul Gauthier Date: Thu, 23 May 2024 13:43:35 -0700 Subject: [PATCH] cleanup --- HISTORY.md | 2 ++ aider/coders/base_coder.py | 2 +- aider/repomap.py | 4 +--- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/HISTORY.md b/HISTORY.md index 7aab4df7c..75cd0662f 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -4,6 +4,8 @@ ### main - Aider will notice if you paste a URL into the chat, and offer to scrape it. +- Performance improvements the repo map, especially in large repos. +- Aider will not offer to add bare filenames like `make` or `run` which may just be words. ### v0.36.0 diff --git a/aider/coders/base_coder.py b/aider/coders/base_coder.py index 93442c2ea..32c0d72b7 100755 --- a/aider/coders/base_coder.py +++ b/aider/coders/base_coder.py @@ -923,7 +923,7 @@ class Coder: fname = os.path.basename(rel_fname) # Don't add basenames that could be plain words like "run" or "make" - if "/" in fname or "." in fname: + if "/" in fname or "." in fname or "_" in fname or "-" in fname: if fname not in fname_to_rel_fnames: fname_to_rel_fnames[fname] = [] fname_to_rel_fnames[fname].append(rel_fname) diff --git a/aider/repomap.py b/aider/repomap.py index 820d26d0f..2e7169f01 100644 --- a/aider/repomap.py +++ b/aider/repomap.py @@ -76,8 +76,6 @@ class RepoMap: if not chat_files and self.max_context_window and target > 0: max_map_tokens = target - dump(max_map_tokens) - try: files_listing = self.get_ranked_tags_map( chat_files, other_files, max_map_tokens, mentioned_fnames, mentioned_idents @@ -243,7 +241,7 @@ class RepoMap: # https://networkx.org/documentation/stable/_modules/networkx/algorithms/link_analysis/pagerank_alg.html#pagerank personalize = 10 / len(fnames) - if self.cache_missing or True: + if self.cache_missing: fnames = tqdm(fnames) self.cache_missing = False