Private
Public Access
1
0

Better handling of newly saved conversations

When a new conversation is created in the chat view's
`persistConversation`, we now set `rootMessages` appropriately.
This commit is contained in:
2024-06-09 18:42:17 +00:00
parent a2c860252f
commit a22119f738
3 changed files with 7 additions and 3 deletions

View File

@@ -166,6 +166,9 @@ func (m Model) Update(msg tea.Msg) (Model, tea.Cmd) {
case msgConversationPersisted:
m.conversation = msg.conversation
m.messages = msg.messages
if msg.isNew {
m.rootMessages = []models.Message{m.messages[0]}
}
m.rebuildMessageCache()
m.updateContent()
case msgMessageCloned: