From 445a7dfbd5bb55d5317676729c81dce641a0a920 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=84=E8=87=AA=E8=BE=BE?= <980324341@qq.com> Date: Sun, 25 Oct 2026 00:40:07 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E5=89=8D=E7=AB=AF):=20LLM=20=E5=AF=86?= =?UTF-8?q?=E9=92=A5=E5=85=B1=E7=94=A8=E4=B8=8D=E5=86=8D=E5=BC=B9=E7=AA=97?= =?UTF-8?q?=EF=BC=8C=E4=BB=85=E4=BB=A3=E7=90=86=20IP=20=E5=85=B1=E7=94=A8?= =?UTF-8?q?=E5=BC=B9=E9=80=9A=E7=9F=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend-vue/src/shared/components/CostGuardAlert.vue | 5 ++++- frontend-vue/tests/cost-guard-alert.test.ts | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/frontend-vue/src/shared/components/CostGuardAlert.vue b/frontend-vue/src/shared/components/CostGuardAlert.vue index e19b3cb70..395d4736e 100644 --- a/frontend-vue/src/shared/components/CostGuardAlert.vue +++ b/frontend-vue/src/shared/components/CostGuardAlert.vue @@ -4,7 +4,8 @@ * 异常时客户端立刻弹窗并暂停该账号的新任务;已跑完的任务与结果行不受影响。 * * - 暂停:红色不可忽略横幅 + 首次弹确认框,用户排查后点「继续任务」走 resume; - * - 共用密钥:只弹 ElMessage 通知(铃铛有服务端 secret_shared 推送),不再常驻界面; + * - 共用密钥:仅代理 IP 密钥共用弹 ElMessage 通知(铃铛有服务端 secret_shared 推送), + * LLM 密钥共用可接受、不弹窗;不再常驻界面; * - 轮询失败保留上一轮状态(与 ProxyBalanceAlert 同口径),不把网络抖动刷成误报。 */ import { onBeforeUnmount, onMounted, ref } from 'vue' @@ -62,6 +63,8 @@ async function refresh(): Promise { function notifySharedWarnings(warnings: SharedSecretWarning[]): void { for (const warning of warnings) { + // LLM 密钥共用可接受,不弹窗;只对代理 IP 密钥共用做通知 + if (warning.type !== 'proxy') continue const key = sharedWarningKey(warning) if (warnedSharedKeys.has(key)) continue warnedSharedKeys.add(key) diff --git a/frontend-vue/tests/cost-guard-alert.test.ts b/frontend-vue/tests/cost-guard-alert.test.ts index 7a3415587..e31f1980d 100644 --- a/frontend-vue/tests/cost-guard-alert.test.ts +++ b/frontend-vue/tests/cost-guard-alert.test.ts @@ -78,6 +78,7 @@ test('密钥共用提示只走通知,不再常驻界面', () => { assert.ok(component.includes('ElMessage.warning'), '共用密钥提示应通过 ElMessage 通知弹出') assert.ok(!component.includes('cost-guard-alert--shared'), '黄色常驻横幅已下线,样式类不得回流') assert.ok(!component.includes('密钥共用提示'), '界面模板不应再渲染「密钥共用提示」横幅') + assert.ok(component.includes("warning.type !== 'proxy'"), 'LLM 密钥共用可接受,弹窗只放行代理 IP 类型') }) test('全局挂载并在暂停时提供「继续任务」', () => {