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:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user