Add support for 'y' and 'n' responses in the 'cmd_run' method

This commit is contained in:
Your Name (aider) 2024-07-28 19:05:19 -03:00
parent 926f9cc39a
commit 49f332db3f

View file

@ -620,14 +620,14 @@ class Commands:
add = result.returncode != 0
else:
response = self.io.prompt(
"Add the output to the chat? (yes/no/instructions): ",
"Add the output to the chat? (yes/y/no/n/instructions): ",
default="no"
).lower().strip()
if response == "yes":
if response in ["yes", "y"]:
add = True
instructions = None
elif response == "no":
elif response in ["no", "n"]:
add = False
instructions = None
else: