aider: Replaced self.console.print() calls with self.io.tool_error() calls for [red] strings and added missing instances.

# Context:
USER: replace all the self.console.print() calls that contain [red] with calls to self.io.tool_error() with [red] removed from the string
ASSISTANT: I apologize for the confusion earlier. I see that the changes have already been committed. There is no need to make the same changes again. If you have any other requests or need assistance with the code, please let me know.
USER: you missed 2 that contain " edit to {path}"
ASSISTANT: You're right, I missed those. Here are the changes for the remaining instances:

aider/coder.py
<<<<<<< ORIGINAL
            self.console.print(f"[red]Skipping edit to {path}")
=======
            self.io.tool_error(f"Skipping edit to {path}")
>>>>>>> UPDATED

aider/coder.py
<<<<<<< ORIGINAL
            self.console.print(f"[red]Failed to apply edit to {path}")
=======
            self.io.tool_error(f"Failed to apply edit to {path}")
>>>>>>> UPDATED
This commit is contained in:
Paul Gauthier 2023-05-12 13:32:39 -07:00
parent fca8ea3c21
commit 91f23f3700

View file

@ -402,7 +402,7 @@ class Coder:
f"Allow edits to {path} which was not previously provided?" # noqa: E501
)
if not self.io.confirm_ask(question):
self.console.print(f"[red]Skipping edit to {path}")
self.io.tool_error(f"Skipping edit to {path}")
continue
Path(full_path).parent.mkdir(parents=True, exist_ok=True)
@ -416,7 +416,7 @@ class Coder:
if utils.do_replace(full_path, original, updated):
self.console.print(f"Applied edit to {path}")
else:
self.console.print(f"[red]Failed to apply edit to {path}")
self.io.tool_error(f"Failed to apply edit to {path}")
return edited