tui: only perform database updates for modified messages
This commit is contained in:
@@ -47,16 +47,6 @@ func (m *Model) cloneMessage(message conversation.Message, selected bool) tea.Cm
|
||||
}
|
||||
}
|
||||
|
||||
func (m *Model) updateMessageContent(message *conversation.Message) tea.Cmd {
|
||||
return func() tea.Msg {
|
||||
err := m.App.UpdateMessageContent(message)
|
||||
if err != nil {
|
||||
return shared.WrapError(err)
|
||||
}
|
||||
return msgMessageUpdated(message)
|
||||
}
|
||||
}
|
||||
|
||||
func (m *Model) cycleSelectedRoot(conv *conversation.Conversation, dir model.MessageCycleDirection) tea.Cmd {
|
||||
if len(conv.RootMessages) < 2 {
|
||||
return nil
|
||||
|
||||
Reference in New Issue
Block a user