mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-31 01:35:00 +00:00
refactor: use get_ai_comments() instead of duplicating pattern matching
This commit is contained in:
parent
e001b7fb46
commit
791cbab6f6
1 changed files with 2 additions and 5 deletions
|
@ -108,11 +108,8 @@ class FileWatcher:
|
|||
|
||||
# Check if file contains AI markers
|
||||
try:
|
||||
# TODO: use get_ai_comments() for this
|
||||
with open(str(path_abs), "r", encoding=self.io.encoding) as f:
|
||||
content = f.read()
|
||||
match = self.ai_comment_pattern.search(content)
|
||||
return bool(match)
|
||||
_, _, has_match = self.get_ai_comments(str(path_abs))
|
||||
return has_match
|
||||
except Exception:
|
||||
return
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue