fix: pass language param from floating AI chat to API so it uses localized system prompt
All checks were successful
Deploy to Production / Build and Deploy (push) Successful in 41s

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 <noreply@anthropic.com>
This commit is contained in:
2026-04-26 21:34:08 +02:00
parent 007835c9bf
commit b893b5ac34

View File

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