mirror of
https://github.com/Aider-AI/aider.git
synced 2025-06-02 02:34:59 +00:00
feat: Add autocomplete support for /read-only command
This commit is contained in:
parent
d1ee3644ec
commit
97ddcb2ae6
3 changed files with 21 additions and 9 deletions
15
aider/io.py
15
aider/io.py
|
@ -488,11 +488,15 @@ class InputOutput:
|
|||
):
|
||||
self.num_user_asks += 1
|
||||
|
||||
if question in self.never_prompts:
|
||||
question_id = (question, subject)
|
||||
|
||||
if question_id in self.never_prompts:
|
||||
return False
|
||||
|
||||
if group and not group.show_group:
|
||||
group = None
|
||||
if group:
|
||||
allow_never = True
|
||||
|
||||
valid_responses = ["yes", "no"]
|
||||
options = " (Y)es/(N)o"
|
||||
|
@ -503,8 +507,9 @@ class InputOutput:
|
|||
options += "/(S)kip all"
|
||||
valid_responses.append("skip")
|
||||
if allow_never:
|
||||
options += "/(X)Never"
|
||||
valid_responses.append("never")
|
||||
options += "/(D)on't ask again"
|
||||
valid_responses.append("don't")
|
||||
|
||||
question += options + " [Yes]: "
|
||||
|
||||
if subject:
|
||||
|
@ -555,8 +560,8 @@ class InputOutput:
|
|||
|
||||
res = res.lower()[0]
|
||||
|
||||
if res == "x" and allow_never:
|
||||
self.never_prompts.add(question)
|
||||
if res == "d" and allow_never:
|
||||
self.never_prompts.add(question_id)
|
||||
hist = f"{question.strip()} {res}"
|
||||
self.append_chat_history(hist, linebreak=True, blockquote=True)
|
||||
return False
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue