From aad92b57c783f571c15a8fc9cdf90fcdd72db91c Mon Sep 17 00:00:00 2001 From: perf3ct Date: Mon, 2 Jun 2025 22:47:30 +0000 Subject: [PATCH] fix(llm): prevent sent message duplication --- apps/server/src/routes/api/llm.ts | 9 --------- 1 file changed, 9 deletions(-) diff --git a/apps/server/src/routes/api/llm.ts b/apps/server/src/routes/api/llm.ts index 80bc36884..05e8ee879 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 pipeline const requestParams = { chatNoteId: chatNoteId,