refactor: use pre-initialized PromptSession in prompt_ask function

This commit is contained in:
Paul Gauthier (aider) 2024-09-10 10:00:00 -07:00
parent bf3a165961
commit 43eaf91e8d

View file

@ -519,7 +519,11 @@ class InputOutput:
elif self.yes is False:
res = "no"
else:
res = prompt(question + " ", default=default, style=style)
res = self.prompt_session.prompt(
question + " ",
default=default,
style=style
)
hist = f"{question.strip()} {res.strip()}"
self.append_chat_history(hist, linebreak=True, blockquote=True)