From 95d1ea37bebd2cabcb916ba2dd4600c468fbb0bb Mon Sep 17 00:00:00 2001 From: "Paul Gauthier (aider)" Date: Wed, 21 Aug 2024 05:20:44 -0700 Subject: [PATCH] feat: add subject parameter to prompt_ask --- aider/io.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/aider/io.py b/aider/io.py index 6405c5666..8396543b1 100644 --- a/aider/io.py +++ b/aider/io.py @@ -371,9 +371,12 @@ class InputOutput: return is_yes - def prompt_ask(self, question, default=None): + def prompt_ask(self, question, default=None, subject=None): self.num_user_asks += 1 + if subject: + self.tool_output(subject, bold=True) + if self.yes is True: res = "yes" elif self.yes is False: @@ -381,7 +384,7 @@ class InputOutput: else: res = prompt(question + " ", default=default) - hist = f"{question.strip()} {res.strip()}" + hist = f"{subject + ': ' if subject else ''}{question.strip()} {res.strip()}" self.append_chat_history(hist, linebreak=True, blockquote=True) if self.yes in (True, False): self.tool_output(hist)