feat: add special file filtering to RepoMap ranking

This commit is contained in:
Paul Gauthier 2024-08-30 15:06:52 -07:00 committed by Paul Gauthier (aider)
parent 20e7e549f5
commit b228ba3dc5

View file

@ -17,6 +17,7 @@ from pygments.token import Token
from tqdm import tqdm from tqdm import tqdm
from aider.dump import dump from aider.dump import dump
from aider.special import filter_important_files
from aider.utils import Spinner from aider.utils import Spinner
# tree_sitter is throwing a FutureWarning # tree_sitter is throwing a FutureWarning
@ -501,6 +502,12 @@ class RepoMap:
progress=spin.step, progress=spin.step,
) )
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 = [(fn,) for fn in special_fnames]
ranked_tags = special_fnames + ranked_tags
spin.step() spin.step()
num_tags = len(ranked_tags) num_tags = len(ranked_tags)