mirror of
https://github.com/Aider-AI/aider.git
synced 2025-06-06 04:35:00 +00:00
refactor: update confirm_ask to use prompt_session or input
This commit is contained in:
parent
79a424bc10
commit
d4e47bc7e7
1 changed files with 8 additions and 4 deletions
12
aider/io.py
12
aider/io.py
|
@ -471,10 +471,14 @@ class InputOutput:
|
||||||
self.user_input(f"{question}{res}", log_only=False)
|
self.user_input(f"{question}{res}", log_only=False)
|
||||||
else:
|
else:
|
||||||
while True:
|
while True:
|
||||||
res = prompt(
|
if self.prompt_session:
|
||||||
question,
|
res = self.prompt_session.prompt(
|
||||||
style=Style.from_dict(style),
|
question,
|
||||||
)
|
style=Style.from_dict(style),
|
||||||
|
)
|
||||||
|
else:
|
||||||
|
res = input(question)
|
||||||
|
|
||||||
if not res:
|
if not res:
|
||||||
res = "y" # Default to Yes if no input
|
res = "y" # Default to Yes if no input
|
||||||
break
|
break
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue