From 43c07e7a0eb2da305e43560d79afbdadf3bd66f5 Mon Sep 17 00:00:00 2001 From: li <> Date: Wed, 30 Jul 2025 16:58:42 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20header=E6=B7=BB=E5=8A=A0comfyui=20?= =?UTF-8?q?=E8=AF=AD=E8=A8=80=E8=AE=BE=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ui/src/apis/workflowChatApi.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ui/src/apis/workflowChatApi.ts b/ui/src/apis/workflowChatApi.ts index 0a501e0..75b1991 100644 --- a/ui/src/apis/workflowChatApi.ts +++ b/ui/src/apis/workflowChatApi.ts @@ -105,7 +105,7 @@ export namespace WorkflowChatAPI { ): AsyncGenerator { try { const apiKey = getApiKey(); - const browserLanguage = getBrowserLanguage(); + const browserLanguage = app.extensionManager.setting.get('Comfy.Locale'); const { openaiApiKey, openaiBaseUrl, rsaPublicKey } = getOpenAiConfig(); // Generate a unique message ID for this chat request const messageId = generateUUID(); @@ -569,6 +569,7 @@ export namespace WorkflowChatAPI { ): AsyncGenerator { try { const { openaiApiKey, openaiBaseUrl } = getOpenAiConfig(); + const browserLanguage = app.extensionManager.setting.get('Comfy.Locale'); const session_id = localStorage.getItem("sessionId") || null; // Prepare headers @@ -576,6 +577,7 @@ export namespace WorkflowChatAPI { 'Content-Type': 'application/json', 'accept': 'application/json', 'trace-id': generateUUID(), + 'Accept-Language': browserLanguage, }; // Add OpenAI configuration headers if available