From 085fa925c117cd24d2bb095cdcfa400a2e96ec7c Mon Sep 17 00:00:00 2001 From: HybridTalentComputing <1316645276@qq.com> Date: Mon, 25 May 2026 01:01:34 +0800 Subject: [PATCH] bugfix --- .../settings/providers/ZAiProvider.tsx | 3 +- webview-ui/src/locales/en/settings.json | 36 ++++++++++++++++--- webview-ui/src/locales/zh-CN/settings.json | 36 ++++++++++++++++--- 3 files changed, 63 insertions(+), 12 deletions(-) diff --git a/webview-ui/src/components/settings/providers/ZAiProvider.tsx b/webview-ui/src/components/settings/providers/ZAiProvider.tsx index 7c86f154..8ac9b97a 100644 --- a/webview-ui/src/components/settings/providers/ZAiProvider.tsx +++ b/webview-ui/src/components/settings/providers/ZAiProvider.tsx @@ -60,8 +60,7 @@ export const ZAiProvider = ({ showModelOptions, isPopup, currentMode }: ZAiProvi marginTop: 3, color: "var(--vscode-descriptionForeground)", }}> - Please select the appropriate API entrypoint based on your location. If you are in China, choose open.bigmodel.cn - . Otherwise, choose api.z.ai. + {t("providers.zai.entrypointDescription")}

.authentication.sap.hana.ondemand.com", + "resourceGroup": "Resource Group", + "enterResourceGroup": "Enter your SAP AI Core Resource Group", + "fetchModelsFailed": "Failed to fetch models from SAP AI Core", + "loadingModels": "Loading models...", + "orchestrationDescription": "Orchestration mode allows the SAP AI Core to orchestrate multiple models and tools in a single request.", + "orchestrationDisabled": "Orchestration mode is only available when your SAP AI Core service instance supports it.", + "retry": "Retry", + "unableToFetchModels": "Unable to fetch models from SAP AI Core service instance. Please check your SAP AI Core configuration or ensure your deployments are deployed and running in the service instance." }, "vercelAiGateway": { "apiKey": "Vercel AI Gateway API Key", @@ -497,7 +520,8 @@ }, "openAiCodex": { "signedIn": "Signed in to OpenAI Codex", - "signIn": "Sign in to OpenAI Codex" + "signIn": "Sign in to OpenAI Codex", + "signInDescription": "Sign in to use OpenAI Codex (ChatGPT Plus/Pro subscription required)" }, "oca": { "signedIn": "Signed in", @@ -519,7 +543,9 @@ "name": "Wandb" }, "zai": { - "name": "Z AI" + "name": "Z AI", + "entrypoint": "API Entrypoint", + "entrypointDescription": "Please select the appropriate API entrypoint based on your location. If you are in China, choose open.bigmodel.cn. Otherwise, choose api.z.ai." }, "lmStudio": { "name": "LM Studio" diff --git a/webview-ui/src/locales/zh-CN/settings.json b/webview-ui/src/locales/zh-CN/settings.json index 786ddd84..a3bae6ce 100644 --- a/webview-ui/src/locales/zh-CN/settings.json +++ b/webview-ui/src/locales/zh-CN/settings.json @@ -67,7 +67,8 @@ "planMode": "计划模式", "actMode": "执行模式", "useDifferentModels": "为计划和执行模式使用不同的模型", - "useDifferentModelsDescription": "在计划和执行模式之间切换时,将保留之前模式使用的 API 和模型。这在使用强推理模型为更便宜的编码模型制定计划时可能会有帮助。" + "useDifferentModelsDescription": "在计划和执行模式之间切换时,将保留之前模式使用的 API 和模型。这在使用强推理模型为更便宜的编码模型制定计划时可能会有帮助。", + "modeSwitchPersistDescription": "在计划和执行模式之间切换时,将保留上一模式使用的 API 和模型。例如,这在使用强推理模型为更便宜的编码模型制定计划时很有帮助。" }, "settingsSections": { "allowErrorReporting": "允许错误和使用数据报告", @@ -256,7 +257,8 @@ "remove": "移除", "addHeader": "添加请求头", "headerName": "请求头名称", - "headerValue": "请求头值" + "headerValue": "请求头值", + "addHeaderButton": "添加请求头" }, "providers": { "anthropic": { @@ -484,7 +486,28 @@ "recommendedModel": "时效果最佳。" }, "sapaicore": { - "orchestrationMode": "编排模式" + "orchestrationMode": "编排模式", + "credentialsStoredLocally": "您的凭证存储在本地,仅用于从此扩展发起 API 请求。", + "moreInfoLink": "更多信息", + "configureCredentials": "请先配置您的 SAP AI Core 凭证。", + "clientId": "客户端 ID", + "clientIdSet": "客户端 ID 已设置", + "enterClientId": "输入您的 SAP AI Core 客户端 ID", + "clientSecret": "客户端密钥", + "clientSecretSet": "客户端密钥已设置", + "enterClientSecret": "输入您的 SAP AI Core 客户端密钥", + "baseUrl": "基础 URL", + "enterBaseUrl": "例如,https://api.ai.prod.eu-central-1.aws.ml.hana.ondemand.com", + "authUrl": "认证 URL", + "enterAuthUrl": "例如,https://.authentication.sap.hana.ondemand.com", + "resourceGroup": "资源组", + "enterResourceGroup": "输入您的 SAP AI Core 资源组", + "fetchModelsFailed": "从 SAP AI Core 获取模型失败", + "loadingModels": "正在加载模型...", + "orchestrationDescription": "编排模式允许 SAP AI Core 在单个请求中编排多个模型和工具。", + "orchestrationDisabled": "编排模式仅在您的 SAP AI Core 服务实例支持时可用。", + "retry": "重试", + "unableToFetchModels": "无法从 SAP AI Core 服务实例获取模型。请检查您的 SAP AI Core 配置,或确保您的部署已在服务实例中部署并运行。" }, "vercelAiGateway": { "apiKey": "Vercel AI Gateway API 密钥", @@ -497,7 +520,8 @@ }, "openAiCodex": { "signedIn": "已登录 OpenAI Codex", - "signIn": "登录 OpenAI Codex" + "signIn": "登录 OpenAI Codex", + "signInDescription": "登录以使用 OpenAI Codex(需要 ChatGPT Plus/Pro 订阅)" }, "oca": { "signedIn": "已登录", @@ -519,7 +543,9 @@ "name": "Wandb" }, "zai": { - "name": "Z AI" + "name": "Z AI", + "entrypoint": "API 入口", + "entrypointDescription": "请根据您所在地区选择合适的 API 入口。如果您在中国大陆,请选择 open.bigmodel.cn。否则,请选择 api.z.ai。" }, "lmStudio": { "name": "LM Studio"