Fixed message loading
Root messages weren't being loaded since the refactor, and there was dead code
This commit is contained in:
@@ -47,6 +47,14 @@ func (m *AppModel) LoadConversations() (error, []LoadedConversation) {
|
||||
return nil, conversations
|
||||
}
|
||||
|
||||
func (a *AppModel) LoadConversationRootMessages() ([]api.Message, error) {
|
||||
messages, err := a.Ctx.Store.RootMessages(a.Conversation.ID)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("Could not load conversation root messages: %v %v", a.Conversation.SelectedRoot, err)
|
||||
}
|
||||
return messages, nil
|
||||
}
|
||||
|
||||
func (a *AppModel) LoadConversationMessages() ([]api.Message, error) {
|
||||
messages, err := a.Ctx.Store.PathToLeaf(a.Conversation.SelectedRoot)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user