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
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:
@@ -60,13 +60,14 @@ export function AIChat() {
|
|||||||
setInput('')
|
setInput('')
|
||||||
await sendMessage(
|
await sendMessage(
|
||||||
{ text },
|
{ text },
|
||||||
{
|
{
|
||||||
body: {
|
body: {
|
||||||
tone: selectedTone,
|
tone: selectedTone,
|
||||||
chatScope,
|
chatScope,
|
||||||
notebookId: chatScope !== 'all' ? chatScope : undefined,
|
notebookId: chatScope !== 'all' ? chatScope : undefined,
|
||||||
webSearch: webSearch && webSearchAvailable,
|
webSearch: webSearch && webSearchAvailable,
|
||||||
conversationId
|
conversationId,
|
||||||
|
language,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user