diff --git a/aider/io.py b/aider/io.py index a0c4d19b2..6e71e65f9 100644 --- a/aider/io.py +++ b/aider/io.py @@ -392,7 +392,7 @@ class InputOutput: ): self.rule() - # Add a variable to store changed files and create stop event + # ai refactor this chunk ... self.changed_files = None stop_event = threading.Event() @@ -413,6 +413,7 @@ class InputOutput: # Start the watcher thread watcher = threading.Thread(target=watch_files, daemon=True) watcher.start() + # ... to here rel_fnames = list(rel_fnames) show = "" @@ -488,7 +489,7 @@ class InputOutput: self.tool_error(str(err)) return "" finally: - # Clean up the watcher thread + # ai: we'll need to adjust this too stop_event.set() watcher.join() # Thread should exit quickly due to stop_event diff --git a/aider/watch.py b/aider/watch.py index 457ecc785..0e4ab1f72 100644 --- a/aider/watch.py +++ b/aider/watch.py @@ -61,6 +61,7 @@ def load_gitignores(gitignore_paths: list[Path]) -> Optional[PathSpec]: return PathSpec.from_lines(GitWildMatchPattern, patterns) if patterns else None +# ai: make a class for this that includes the code from io! def watch_source_files( directory: str, stop_event=None,