From 4e01668054f28e17c44456f6c8a3d905f7ad1702 Mon Sep 17 00:00:00 2001 From: "Paul Gauthier (aider)" Date: Fri, 9 Aug 2024 17:35:07 -0400 Subject: [PATCH] feat: replace confirm() with prompt() in confirm_ask method --- aider/io.py | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/aider/io.py b/aider/io.py index 7e18a4482..5015d08ce 100644 --- a/aider/io.py +++ b/aider/io.py @@ -341,20 +341,19 @@ class InputOutput: self.num_user_asks += 1 if self.yes is True: - res = True + res = "y" elif self.yes is False: - res = False + res = "n" else: - res = confirm(question) + res = prompt(question + " ", default=default) - if res: - hist = f"{question.strip()} y" - else: - hist = f"{question.strip()} n" + res = res.lower().strip() + is_yes = res in ("y", "yes") + hist = f"{question.strip()} {'y' if is_yes else 'n'}" self.append_chat_history(hist, linebreak=True, blockquote=True) - return res + return is_yes def prompt_ask(self, question, default=None): self.num_user_asks += 1