From c3a9c0545557f842063e77f439d3c8ce355700b6 Mon Sep 17 00:00:00 2001 From: "Paul Gauthier (aider)" Date: Wed, 27 Nov 2024 16:31:48 -0800 Subject: [PATCH] fix: convert absolute paths to relative paths in file watcher --- aider/watch.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/aider/watch.py b/aider/watch.py index 1ed8ecdde..66126c008 100644 --- a/aider/watch.py +++ b/aider/watch.py @@ -139,8 +139,9 @@ class FileWatcher: if VERBOSE: dump(result) if result: - # ai: they need to be rel_fnames! - self.coder.abs_fnames.update(changed_files) + # Convert to relative paths before updating + rel_files = {str(Path(f).relative_to(self.root)) for f in changed_files} + self.coder.abs_fnames.update(rel_files) self.coder.io.interrupt_input() return except Exception as e: