mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-29 16:54:59 +00:00
fix: change /edit to /add command for file changes
This commit is contained in:
parent
8e873e7450
commit
5a0d66141f
1 changed files with 4 additions and 3 deletions
|
@ -364,7 +364,7 @@ class InputOutput:
|
||||||
# Add a variable to store changed files and create stop event
|
# Add a variable to store changed files and create stop event
|
||||||
self.changed_files = None
|
self.changed_files = None
|
||||||
stop_event = threading.Event()
|
stop_event = threading.Event()
|
||||||
|
|
||||||
# Define the watcher thread function
|
# Define the watcher thread function
|
||||||
def watch_files():
|
def watch_files():
|
||||||
try:
|
try:
|
||||||
|
@ -379,6 +379,7 @@ class InputOutput:
|
||||||
# Start the watcher thread
|
# Start the watcher thread
|
||||||
watcher = threading.Thread(target=watch_files, daemon=True)
|
watcher = threading.Thread(target=watch_files, daemon=True)
|
||||||
watcher.start()
|
watcher.start()
|
||||||
|
dump(watcher)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
rel_fnames = list(rel_fnames)
|
rel_fnames = list(rel_fnames)
|
||||||
|
@ -441,7 +442,7 @@ class InputOutput:
|
||||||
if self.changed_files:
|
if self.changed_files:
|
||||||
changed = self.changed_files
|
changed = self.changed_files
|
||||||
self.changed_files = None
|
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 ""
|
return ""
|
||||||
except UnicodeEncodeError as err:
|
except UnicodeEncodeError as err:
|
||||||
self.tool_error(str(err))
|
self.tool_error(str(err))
|
||||||
|
@ -463,7 +464,7 @@ class InputOutput:
|
||||||
print()
|
print()
|
||||||
self.user_input(inp)
|
self.user_input(inp)
|
||||||
return inp
|
return inp
|
||||||
|
|
||||||
finally:
|
finally:
|
||||||
# Clean up the watcher thread
|
# Clean up the watcher thread
|
||||||
stop_event.set()
|
stop_event.set()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue