mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-24 14:25:00 +00:00
info dict messages->content
This commit is contained in:
parent
c0fec1d6ac
commit
81b0415a90
1 changed files with 3 additions and 3 deletions
|
@ -284,7 +284,7 @@ class GUI:
|
||||||
if role == "edit":
|
if role == "edit":
|
||||||
self.show_edit_info(msg)
|
self.show_edit_info(msg)
|
||||||
elif role == "info":
|
elif role == "info":
|
||||||
st.info(msg["message"])
|
st.info(msg["content"])
|
||||||
elif role == "text":
|
elif role == "text":
|
||||||
text = msg["content"]
|
text = msg["content"]
|
||||||
line = text.splitlines()[0]
|
line = text.splitlines()[0]
|
||||||
|
@ -299,7 +299,7 @@ class GUI:
|
||||||
|
|
||||||
def initialize_state(self):
|
def initialize_state(self):
|
||||||
messages = [
|
messages = [
|
||||||
dict(role="text", content=self.announce()),
|
dict(role="info", content=self.announce()),
|
||||||
dict(role="assistant", content="How can I help you?"),
|
dict(role="assistant", content="How can I help you?"),
|
||||||
]
|
]
|
||||||
|
|
||||||
|
@ -417,7 +417,7 @@ class GUI:
|
||||||
st.rerun()
|
st.rerun()
|
||||||
|
|
||||||
def info(self, message, echo=True):
|
def info(self, message, echo=True):
|
||||||
info = dict(role="info", message=message)
|
info = dict(role="info", content=message)
|
||||||
self.state.messages.append(info)
|
self.state.messages.append(info)
|
||||||
|
|
||||||
# We will render the tail of the messages array after this call
|
# We will render the tail of the messages array after this call
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue