mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-31 17:55:01 +00:00
wip: Changed append_chat_history to use blockquote instead of italics.
This commit is contained in:
parent
da19845706
commit
06818156cf
1 changed files with 7 additions and 7 deletions
|
@ -170,7 +170,7 @@ class InputOutput:
|
|||
res = prompt(question + " ", default=default)
|
||||
|
||||
hist = f"{question.strip()} {res.strip()}"
|
||||
self.append_chat_history(hist, linebreak=True, italics=True)
|
||||
self.append_chat_history(hist, linebreak=True, blockquote=True)
|
||||
|
||||
if not res or not res.strip():
|
||||
return
|
||||
|
@ -183,14 +183,14 @@ class InputOutput:
|
|||
res = prompt(question + " ", default=default)
|
||||
|
||||
hist = f"{question.strip()} {res.strip()}"
|
||||
self.append_chat_history(hist, linebreak=True, italics=True)
|
||||
self.append_chat_history(hist, linebreak=True, blockquote=True)
|
||||
|
||||
return res
|
||||
|
||||
def tool_error(self, message):
|
||||
if message.strip():
|
||||
hist = f"{message.strip()}"
|
||||
self.append_chat_history(hist, linebreak=True, italics=True)
|
||||
self.append_chat_history(hist, linebreak=True, blockquote=True)
|
||||
|
||||
message = Text(message)
|
||||
self.console.print(message, style="red")
|
||||
|
@ -199,15 +199,15 @@ class InputOutput:
|
|||
if messages:
|
||||
hist = " ".join(messages)
|
||||
hist = f"{hist.strip()}"
|
||||
self.append_chat_history(hist, linebreak=True, italics=True)
|
||||
self.append_chat_history(hist, linebreak=True, blockquote=True)
|
||||
|
||||
messages = list(map(Text, messages))
|
||||
self.console.print(*messages)
|
||||
|
||||
def append_chat_history(self, text, linebreak=False, italics=False):
|
||||
if italics:
|
||||
def append_chat_history(self, text, linebreak=False, blockquote=False):
|
||||
if blockquote:
|
||||
text = text.strip()
|
||||
text = f'_{text}_'
|
||||
text = '> ' + text
|
||||
if linebreak:
|
||||
text = text.rstrip()
|
||||
text = text + " \n"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue