Skip to content

Build your personal knowledge base with Trilium Notes

fix(llm): history doesn't show last notes correctly

Elian Doranf2cd1be3af3f
diff --git a/apps/server/src/services/special_notes.ts b/apps/server/src/services/special_notes.ts
index 5ace38a479..23f2c95493 100644
--- a/apps/server/src/services/special_notes.ts
+++ b/apps/server/src/services/special_notes.ts
@@ -153,7 +153,7 @@ function getMostRecentLlmChat() {
new SearchContext({
ancestorNoteId: "_llmChat",
limit: 1,
- orderBy: "note.utcDateModified",
+ orderBy: "utcDateModified",
orderDirection: "desc"
})
);
@@ -185,7 +185,7 @@ function getRecentLlmChats(limit: number = 10) {
new SearchContext({
ancestorNoteId: "_llmChat",
limit,
- orderBy: "note.utcDateModified",
+ orderBy: "utcDateModified",
orderDirection: "desc"
})
);