From 3e0c7fd2480e7030d171ff0ac571ef65d4e68c6a Mon Sep 17 00:00:00 2001 From: "Paul Gauthier (aider)" Date: Fri, 23 Aug 2024 16:25:05 -0700 Subject: [PATCH] build: build the list of valid responses in parallel to building question, but don't change the logic for question --- aider/io.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/aider/io.py b/aider/io.py index f3cd8bf47..3b6bc09e8 100644 --- a/aider/io.py +++ b/aider/io.py @@ -379,6 +379,10 @@ class InputOutput: ): self.num_user_asks += 1 + valid_responses = ["y", "n", ""] + if group and not explicit_yes_required: + valid_responses.extend(["a", "s"]) + question += " (Y)es/(N)o" if group: if not explicit_yes_required: @@ -404,11 +408,7 @@ class InputOutput: def is_valid_response(text): if not text: - return - if explicit_yes_required or group is None: - valid_responses = ["y", "n", ""] - else: - valid_responses = ["y", "n", "a", "s", ""] + return True return text.lower()[0] in valid_responses error_message = (