From 926f9cc39a6df99d9db6f3fec7ea2c37226bc5be Mon Sep 17 00:00:00 2001 From: "Your Name (aider)" Date: Sun, 28 Jul 2024 19:04:44 -0300 Subject: [PATCH] Update the run command to ask the user to add the output with possible responses: yes, no or provide additional instructions to accompany the output. --- aider/commands.py | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/aider/commands.py b/aider/commands.py index c4951fe71..b8efc02d4 100644 --- a/aider/commands.py +++ b/aider/commands.py @@ -619,7 +619,20 @@ class Commands: if add_on_nonzero_exit: add = result.returncode != 0 else: - add = self.io.confirm_ask("Add the output to the chat?", default="y") + response = self.io.prompt( + "Add the output to the chat? (yes/no/instructions): ", + default="no" + ).lower().strip() + + if response == "yes": + add = True + instructions = None + elif response == "no": + add = False + instructions = None + else: + add = True + instructions = response if add: for line in combined_output.splitlines(): @@ -629,6 +642,10 @@ class Commands: command=args, output=combined_output, ) + + if instructions: + msg += f"\n\nAdditional instructions: {instructions}" + return msg def cmd_exit(self, args):