mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-30 17:24:59 +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
|
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"
|
question += " (Y)es/(N)o"
|
||||||
if group:
|
if group:
|
||||||
if not explicit_yes_required:
|
if not explicit_yes_required:
|
||||||
|
@ -404,11 +408,7 @@ class InputOutput:
|
||||||
|
|
||||||
def is_valid_response(text):
|
def is_valid_response(text):
|
||||||
if not text:
|
if not text:
|
||||||
return
|
return True
|
||||||
if explicit_yes_required or group is None:
|
|
||||||
valid_responses = ["y", "n", ""]
|
|
||||||
else:
|
|
||||||
valid_responses = ["y", "n", "a", "s", ""]
|
|
||||||
return text.lower()[0] in valid_responses
|
return text.lower()[0] in valid_responses
|
||||||
|
|
||||||
error_message = (
|
error_message = (
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue