mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-30 17:24:59 +00:00
feat: add subject parameter to prompt_ask
This commit is contained in:
parent
bcc7b4c120
commit
95d1ea37be
1 changed files with 5 additions and 2 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue