mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-28 16:25:00 +00:00
build: build the list of valid responses in parallel to building question, but don't change the logic for question
This commit is contained in:
parent
2dc2b45d15
commit
3e0c7fd248
1 changed files with 5 additions and 5 deletions
10
aider/io.py
10
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 = (
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue