mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-30 17:24:59 +00:00
feat: extend AI comment regex to match "ai!" suffix
This commit is contained in:
parent
a8f20196b2
commit
aac0c0f037
1 changed files with 1 additions and 3 deletions
|
@ -63,10 +63,8 @@ def load_gitignores(gitignore_paths: list[Path]) -> Optional[PathSpec]:
|
|||
class FileWatcher:
|
||||
"""Watches source files for changes and AI comments"""
|
||||
|
||||
# ai make this regex also match comments that end with "ai!"!
|
||||
# so this comment would match ai!
|
||||
# Compiled regex pattern for AI comments
|
||||
ai_comment_pattern = re.compile(r"(?:#|//) *(ai\b.*|ai)", re.IGNORECASE)
|
||||
ai_comment_pattern = re.compile(r"(?:#|//) *(ai\b.*|ai|.*ai!)", re.IGNORECASE)
|
||||
|
||||
def __init__(self, coder, gitignores=None, verbose=False):
|
||||
self.coder = coder
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue