From a8f20196b2c19335f779f95d0ff63b36b5796c3c Mon Sep 17 00:00:00 2001 From: Paul Gauthier Date: Sun, 1 Dec 2024 08:11:07 -0800 Subject: [PATCH] feat: extend AI comment regex to match 'ai!' suffix --- aider/watch.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/aider/watch.py b/aider/watch.py index dbca84499..da21763a3 100644 --- a/aider/watch.py +++ b/aider/watch.py @@ -63,6 +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)