From eed7e0b6523fdf0dae74e9d47c7f426239dce822 Mon Sep 17 00:00:00 2001 From: Paul Gauthier Date: Tue, 27 Aug 2024 10:58:23 -0700 Subject: [PATCH] fix: Add missing utils import to base_coder.py feat: Improve prompt for adding tool output to chat --- aider/coders/base_coder.py | 2 +- aider/commands.py | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/aider/coders/base_coder.py b/aider/coders/base_coder.py index 4b5927b8c..c83c18a8c 100755 --- a/aider/coders/base_coder.py +++ b/aider/coders/base_coder.py @@ -22,7 +22,7 @@ import git from rich.console import Console, Text from rich.markdown import Markdown -from aider import __version__, models, prompts, urls +from aider import __version__, models, prompts, urls, utils from aider.commands import Commands from aider.history import ChatSummary from aider.io import ConfirmGroup, InputOutput diff --git a/aider/commands.py b/aider/commands.py index 7a5aab566..195afac56 100644 --- a/aider/commands.py +++ b/aider/commands.py @@ -729,14 +729,14 @@ class Commands: if combined_output is None: return - self.io.tool_output(combined_output) - if add_on_nonzero_exit: add = exit_status != 0 else: + self.io.tool_output() response = self.io.prompt_ask( - "Add the output to the chat?\n[Y/n/instructions]", + "Add the output to the chat?\n(Y)es/(n)o/message with instructions:", ).strip() + self.io.tool_output() if response.lower() in ["yes", "y"]: add = True