From 91f23f370060af844b4f1deeb794a239704fb37a Mon Sep 17 00:00:00 2001 From: Paul Gauthier Date: Fri, 12 May 2023 13:32:39 -0700 Subject: [PATCH] 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 --- aider/coder.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/aider/coder.py b/aider/coder.py index 57cf53ec8..514c8a34c 100755 --- a/aider/coder.py +++ b/aider/coder.py @@ -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