From 5a0d66141fcb24dad9ca0868c49aa3d5fdaca2f8 Mon Sep 17 00:00:00 2001 From: Paul Gauthier Date: Fri, 25 Oct 2024 12:48:53 -0700 Subject: [PATCH] fix: change /edit to /add command for file changes --- aider/io.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/aider/io.py b/aider/io.py index 68812303f..3e26be20d 100644 --- a/aider/io.py +++ b/aider/io.py @@ -364,7 +364,7 @@ class InputOutput: # Add a variable to store changed files and create stop event self.changed_files = None stop_event = threading.Event() - + # Define the watcher thread function def watch_files(): try: @@ -379,6 +379,7 @@ class InputOutput: # Start the watcher thread watcher = threading.Thread(target=watch_files, daemon=True) watcher.start() + dump(watcher) try: rel_fnames = list(rel_fnames) @@ -441,7 +442,7 @@ class InputOutput: if self.changed_files: changed = self.changed_files self.changed_files = None - return f"/edit {changed}" # Return an edit command for the changed file + return f"/add {changed}" # Return an edit command for the changed file return "" except UnicodeEncodeError as err: self.tool_error(str(err)) @@ -463,7 +464,7 @@ class InputOutput: print() self.user_input(inp) return inp - + finally: # Clean up the watcher thread stop_event.set()