Add prompt to add command output to chat with instructions

This commit is contained in:
Your Name 2024-07-28 19:11:06 -03:00 committed by Your Name (aider)
parent 49f332db3f
commit 5b50eadae3

View file

@ -619,15 +619,15 @@ class Commands:
if add_on_nonzero_exit: if add_on_nonzero_exit:
add = result.returncode != 0 add = result.returncode != 0
else: else:
response = self.io.prompt( response = self.io.prompt_ask(
"Add the output to the chat? (yes/y/no/n/instructions): ", "Add the output to the chat? (y/n/instructions): ",
default="no" default="y"
).lower().strip() ).strip()
if response in ["yes", "y"]: if response.lower() in ["yes", "y"]:
add = True add = True
instructions = None instructions = None
elif response in ["no", "n"]: elif response.lower() in ["no", "n"]:
add = False add = False
instructions = None instructions = None
else: else:
@ -644,7 +644,7 @@ class Commands:
) )
if instructions: if instructions:
msg += f"\n\nAdditional instructions: {instructions}" msg += f"\n\n{instructions}"
return msg return msg