From 590e9042e8add02c872a86149530572c4db1cd22 Mon Sep 17 00:00:00 2001 From: zipg Date: Thu, 23 Jul 2026 12:51:11 +0800 Subject: [PATCH] fix(ai): support Windows Claude Code MCP config --- .../src/components/editor/AiAssistant.vue | 4 +- .../editor/EditorSettingsDialog.vue | 3 +- apps/desktop/src/i18n/backend-errors.ts | 23 ++++++ apps/desktop/src/i18n/locales/en.ts | 16 ++++ apps/desktop/src/i18n/locales/es.ts | 16 ++++ apps/desktop/src/i18n/locales/it.ts | 16 ++++ apps/desktop/src/i18n/locales/ja.ts | 16 ++++ apps/desktop/src/i18n/locales/pt-BR.ts | 16 ++++ apps/desktop/src/i18n/locales/zh-CN.ts | 16 ++++ apps/desktop/src/i18n/locales/zh-TW.ts | 16 ++++ crates/dbx-core/src/ai_claude_code_cli.rs | 81 +++++++++++++++---- packages/app-tests/aiCliErrorI18n.test.ts | 51 ++++++++++++ packages/app-tests/aiMessageLayout.test.ts | 19 +++++ src-tauri/src/commands/mcp.rs | 4 +- 14 files changed, 275 insertions(+), 22 deletions(-) create mode 100644 packages/app-tests/aiCliErrorI18n.test.ts diff --git a/apps/desktop/src/components/editor/AiAssistant.vue b/apps/desktop/src/components/editor/AiAssistant.vue index bd5df778d8..584aa2163a 100644 --- a/apps/desktop/src/components/editor/AiAssistant.vue +++ b/apps/desktop/src/components/editor/AiAssistant.vue @@ -1546,7 +1546,7 @@ async function send() { ); } catch (e: unknown) { const message = e instanceof Error ? e.message : String(e); - messages.value[assistantIdx].content = `Error: ${message}`; + messages.value[assistantIdx].content = `${t("ai.requestFailed")}\n\n${translateBackendError(t, message)}`; } finally { if (assistantDeltaFrame !== null) cancelAnimationFrame(assistantDeltaFrame); flushAssistantDeltas(); @@ -1948,7 +1948,7 @@ async function openExternalUrl(url: string) {
-
+