mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-30 01:04:59 +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)
|
||||
else:
|
||||
while True:
|
||||
res = prompt(
|
||||
question,
|
||||
style=Style.from_dict(style),
|
||||
)
|
||||
if self.prompt_session:
|
||||
res = self.prompt_session.prompt(
|
||||
question,
|
||||
style=Style.from_dict(style),
|
||||
)
|
||||
else:
|
||||
res = input(question)
|
||||
|
||||
if not res:
|
||||
res = "y" # Default to Yes if no input
|
||||
break
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue