fix(llm): prevent sent message duplication

This commit is contained in:
perf3ct 2025-06-02 22:47:30 +00:00
parent 0d305cd22c
commit aad92b57c7
No known key found for this signature in database
GPG Key ID: 569C4EEC436F5232

View File

@ -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,