mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-31 09:44:59 +00:00
refactor: move bang checking logic earlier in file processing flow
This commit is contained in:
parent
2eb7f78248
commit
8b7fa6f845
1 changed files with 4 additions and 2 deletions
|
@ -162,8 +162,11 @@ class FileWatcher:
|
|||
def process_changes(self):
|
||||
"""Get any detected file changes"""
|
||||
|
||||
has_bangs = False
|
||||
for fname in self.changed_files:
|
||||
# ai actually, check for bangs up here, not down below!
|
||||
_, _, has_bang = self.get_ai_comments(fname)
|
||||
has_bangs |= has_bang
|
||||
|
||||
if fname in self.coder.abs_fnames:
|
||||
continue
|
||||
self.coder.abs_fnames.add(fname)
|
||||
|
@ -173,7 +176,6 @@ class FileWatcher:
|
|||
|
||||
# Refresh all AI comments from tracked files
|
||||
ai_comments = {}
|
||||
has_bangs = False
|
||||
for fname in self.coder.abs_fnames:
|
||||
line_nums, comments, has_bang = self.get_ai_comments(fname)
|
||||
if line_nums:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue