refactor: optimize file mention checking logic

This commit is contained in:
Paul Gauthier 2024-08-28 17:52:25 -07:00 committed by Paul Gauthier (aider)
parent 5d2a930f69
commit b9c5a7cdab

View file

@ -1320,10 +1320,11 @@ class Coder:
def check_for_file_mentions(self, content):
mentioned_rel_fnames = self.get_file_mentions(content)
if not mentioned_rel_fnames:
new_mentions = mentioned_rel_fnames - self.ignore_mentions
if not new_mentions:
return
new_mentions = mentioned_rel_fnames - self.ignore_mentions
added_fnames = []
group = ConfirmGroup(new_mentions)
for rel_fname in new_mentions: