Build your personal knowledge base with Trilium Notes
TypeScript electronelectron-appknowledge-baseknowledge-graphknowledge-managementknowledge-management-graphlocal-firstnote-managmentnote-takernote-takingnotebooknotesnotes-apppersonal-knowledge-basepersonal-wikiscriptableself-hostedself-hostingwiki
fix(llm): prevent sent message duplication
perf3ctaad92b57c783
diff --git a/apps/server/src/routes/api/llm.ts b/apps/server/src/routes/api/llm.tsindex 80bc368844..05e8ee8794 100644--- a/apps/server/src/routes/api/llm.ts+++ b/apps/server/src/routes/api/llm.ts@@ -858,15 +858,6 @@ async function streamMessage(req: Request, res: Response) {}}- // Add user message to the chat (without timestamp since Message interface doesn't support it)- chat.messages.push({- role: 'user',- content: enhancedContent- });-- // Save the updated chat- await chatStorageService.updateChat(chat.id, chat.messages, chat.title);-// Create request parameters for the pipelineconst requestParams = {chatNoteId: chatNoteId,