mirror of
https://github.com/Aider-AI/aider.git
synced 2025-06-02 02:34:59 +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)
|
res = prompt(question + " ", default=default)
|
||||||
|
|
||||||
hist = f"{question.strip()} {res.strip()}"
|
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():
|
if not res or not res.strip():
|
||||||
return
|
return
|
||||||
|
@ -183,14 +183,14 @@ class InputOutput:
|
||||||
res = prompt(question + " ", default=default)
|
res = prompt(question + " ", default=default)
|
||||||
|
|
||||||
hist = f"{question.strip()} {res.strip()}"
|
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
|
return res
|
||||||
|
|
||||||
def tool_error(self, message):
|
def tool_error(self, message):
|
||||||
if message.strip():
|
if message.strip():
|
||||||
hist = f"{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)
|
message = Text(message)
|
||||||
self.console.print(message, style="red")
|
self.console.print(message, style="red")
|
||||||
|
@ -199,15 +199,15 @@ class InputOutput:
|
||||||
if messages:
|
if messages:
|
||||||
hist = " ".join(messages)
|
hist = " ".join(messages)
|
||||||
hist = f"{hist.strip()}"
|
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))
|
messages = list(map(Text, messages))
|
||||||
self.console.print(*messages)
|
self.console.print(*messages)
|
||||||
|
|
||||||
def append_chat_history(self, text, linebreak=False, italics=False):
|
def append_chat_history(self, text, linebreak=False, blockquote=False):
|
||||||
if italics:
|
if blockquote:
|
||||||
text = text.strip()
|
text = text.strip()
|
||||||
text = f'_{text}_'
|
text = '> ' + text
|
||||||
if linebreak:
|
if linebreak:
|
||||||
text = text.rstrip()
|
text = text.rstrip()
|
||||||
text = text + " \n"
|
text = text + " \n"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue