From b893b5ac34dee4c21d2c46cc10fb1f54c50ca172 Mon Sep 17 00:00:00 2001 From: sepehr Date: Sun, 26 Apr 2026 21:34:08 +0200 Subject: [PATCH] fix: pass language param from floating AI chat to API so it uses localized system prompt The floating ai-chat.tsx was not sending the user's language to the /api/chat endpoint, causing it to always use the English system prompt. Now passes `language` from useLanguage() hook. Co-Authored-By: Claude Opus 4.7 --- memento-note/components/ai-chat.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/memento-note/components/ai-chat.tsx b/memento-note/components/ai-chat.tsx index 2a0d018..feacc52 100644 --- a/memento-note/components/ai-chat.tsx +++ b/memento-note/components/ai-chat.tsx @@ -60,13 +60,14 @@ export function AIChat() { setInput('') await sendMessage( { text }, - { + { body: { tone: selectedTone, chatScope, notebookId: chatScope !== 'all' ? chatScope : undefined, webSearch: webSearch && webSearchAvailable, - conversationId + conversationId, + language, } } )