diff --git a/aider/watch.py b/aider/watch.py index 130d4463a..c810e9ea1 100644 --- a/aider/watch.py +++ b/aider/watch.py @@ -12,59 +12,6 @@ from aider.dump import dump # noqa from aider.watch_prompts import watch_ask_prompt, watch_code_prompt -def is_source_file(path: Path) -> bool: - """ - Check if a file is a source file that uses # or // style comments. - This includes Python, JavaScript, TypeScript, C, C++, etc. - """ - COMMENT_STYLE_EXTENSIONS = { - # # style comments - ".py", - ".r", - ".rb", - ".pl", - ".pm", - ".sh", - ".bash", - ".zsh", - ".bashrc", - ".bash_profile", - ".bash_login", - ".bash_logout", - ".zshrc", - ".zprofile", - ".zlogin", - ".zlogout", - ".profile", - ".yaml", - ".yml", - # // style comments - ".js", - ".ts", - ".jsx", - ".tsx", - ".cpp", - ".c", - ".h", - ".hpp", - ".java", - ".swift", - ".kt", - ".cs", - ".go", - ".rs", - ".php", - # -- style comments - ".sql", - ".hs", # Haskell - ".lua", - ".elm", - ".vhd", # VHDL - ".vhdl", - } - return path.suffix.lower() in COMMENT_STYLE_EXTENSIONS - - def load_gitignores(gitignore_paths: list[Path]) -> Optional[PathSpec]: """Load and parse multiple .gitignore files into a single PathSpec""" if not gitignore_paths: @@ -151,9 +98,6 @@ class FileWatcher: if self.gitignore_spec and self.gitignore_spec.match_file(str(rel_path)): return False - if not is_source_file(path_obj): - return False - if self.verbose: dump("ok", rel_path)