From 098f94d38bd3a8fd9fb7bd6b0180afe5d531d963 Mon Sep 17 00:00:00 2001 From: "Paul Gauthier (aider)" Date: Tue, 3 Sep 2024 15:39:20 -0700 Subject: [PATCH] refactor: filter special_fnames to exclude existing ranked tags --- aider/repomap.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/aider/repomap.py b/aider/repomap.py index 67b1bb35a..45433fa0d 100644 --- a/aider/repomap.py +++ b/aider/repomap.py @@ -506,7 +506,9 @@ class RepoMap: other_rel_fnames = sorted(set(self.get_rel_fname(fname) for fname in other_fnames)) special_fnames = filter_important_files(other_rel_fnames) - special_fnames = [ # todo: only keep fnames which aren't in ranked_tags already + ranked_tags_fnames = set(tag[0] for tag in ranked_tags) + special_fnames = [ + fn for fn in special_fnames if fn not in ranked_tags_fnames ] special_fnames = [(fn,) for fn in special_fnames]