From 1570988b9895a7aa1986fa3227f865be9cef7105 Mon Sep 17 00:00:00 2001 From: Matt Low Date: Mon, 16 Sep 2024 00:37:42 +0000 Subject: [PATCH] Fix LatestConversationMessages preload Load the conversation's selected root as well --- pkg/lmcli/store.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/lmcli/store.go b/pkg/lmcli/store.go index 1fd815e..b21eacb 100644 --- a/pkg/lmcli/store.go +++ b/pkg/lmcli/store.go @@ -422,7 +422,7 @@ func (s *SQLStore) LatestConversationMessages() ([]api.Message, error) { Joins("JOIN (?) as sub on messages.conversation_id = sub.conversation_id AND messages.created_at = sub.max_created_at", subQuery). Group("messages.conversation_id"). Order("created_at DESC"). - Preload("Conversation"). + Preload("Conversation.SelectedRoot"). Find(&latestMessages).Error if err != nil {