chore: update frontend tooling and Chinese copy

This commit is contained in:
2026-04-28 14:52:18 +08:00
parent 55ca0985eb
commit 0ccfd00a23
12 changed files with 1000 additions and 614 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -18,11 +18,11 @@
},
"devDependencies": {
"@vitejs/plugin-vue": "^5.1.0",
"autoprefixer": "^10.4.0",
"autoprefixer": "^10.5.0",
"postcss": "^8.4.0",
"tailwindcss": "^3.4.0",
"typescript": "^5.6.0",
"vite": "^5.4.0",
"vite": "^6.4.2",
"vue-tsc": "^2.1.0"
}
}
}

View File

@@ -57,7 +57,7 @@ const props = withDefaults(
{
tone: 'light',
title: '生成轨迹',
description: '查看生成、资源补全和 Provider 调用事件,便于演示时解释状态来源与失败恢复。',
description: '查看生成、资源补全和供应商调用事件,便于演示时解释状态来源与失败恢复。',
},
)
@@ -123,9 +123,9 @@ function eventLabel(eventType: string) {
context_prepared: '上下文准备',
narrative_generated: '正文生成',
story_saved: '故事保存',
provider_call_started: 'Provider 调用',
provider_call_succeeded: 'Provider 成功',
provider_call_failed: 'Provider 失败',
provider_call_started: '供应商调用',
provider_call_succeeded: '供应商成功',
provider_call_failed: '供应商失败',
cover_image_started: '封面开始',
cover_image_succeeded: '封面就绪',
cover_image_failed: '封面失败',
@@ -314,7 +314,7 @@ defineExpose({ refresh })
class="grid gap-3 md:grid-cols-4"
>
<div class="rounded-lg border p-3" :class="panelClass">
<div class="text-xs" :class="mutedClass">Provider 成功率</div>
<div class="text-xs" :class="mutedClass">供应商成功率</div>
<div class="mt-1 text-xl font-semibold">{{ providerSuccessRate }}%</div>
</div>
<div class="rounded-lg border p-3" :class="panelClass">

View File

@@ -18,7 +18,7 @@
<header class="flex flex-col md:flex-row md:items-center justify-between gap-4 bg-white p-6 rounded-2xl shadow-sm border border-gray-100">
<div>
<h1 class="text-3xl font-bold gradient-text">引擎调度中心</h1>
<p class="text-sm text-gray-500 mt-1">Provider Orchestration & Strategy</p>
<p class="text-sm text-gray-500 mt-1">供应商编排与策略</p>
</div>
<div class="flex items-center gap-3">
<div class="bg-blue-50 text-blue-700 px-3 py-1 rounded-full text-xs font-medium flex items-center gap-1">
@@ -33,13 +33,13 @@
<div class="flex flex-col gap-5 xl:flex-row xl:items-start xl:justify-between">
<div class="max-w-2xl">
<div class="flex flex-wrap items-center gap-3">
<h2 class="text-xl font-bold text-gray-900">当前环境 Provider 运营摘要</h2>
<h2 class="text-xl font-bold text-gray-900">当前环境供应商运营摘要</h2>
<span class="rounded-full bg-emerald-50 px-3 py-1 text-xs font-medium text-emerald-700">
跨用户 / 当前环境
</span>
</div>
<p class="mt-2 text-sm leading-6 text-gray-500">
这里展示的是当前部署环境内所有生成任务留下的 Provider 调用轨迹便于运营和排障
这里展示的是当前部署环境内所有生成任务留下的供应商调用轨迹便于运营和排障
跨环境对比仍需要后续独立汇聚层
</p>
<div class="mt-4 flex flex-wrap gap-2">
@@ -169,7 +169,7 @@
<div class="mt-1 text-lg font-semibold text-gray-900">{{ formatLatency(analytics.avg_latency_ms) }}</div>
</div>
<div class="rounded-xl border border-gray-100 bg-white px-4 py-3">
<div class="text-xs text-gray-500">配置中 Provider</div>
<div class="text-xs text-gray-500">配置中供应商</div>
<div class="mt-1 text-lg font-semibold text-gray-900">{{ enabledProviderCount }}/{{ providers.length }}</div>
</div>
</div>
@@ -178,8 +178,8 @@
<div class="rounded-2xl border border-gray-100 bg-white">
<div class="flex items-center justify-between border-b border-gray-100 px-5 py-4">
<div>
<h3 class="font-semibold text-gray-900">Provider 调用明细</h3>
<p class="mt-1 text-xs text-gray-500">按能力和 adapter 聚合的当前环境视图</p>
<h3 class="font-semibold text-gray-900">供应商调用明细</h3>
<p class="mt-1 text-xs text-gray-500">按能力和驱动聚合的当前环境视图</p>
</div>
<span class="text-xs text-gray-400">{{ analyticsProviderRows.length }} 个组合</span>
</div>
@@ -217,7 +217,7 @@
</div>
</div>
<div v-if="analyticsProviderRows.length === 0" class="px-5 py-8 text-sm text-gray-500">
当前筛选条件下还没有 Provider 调用样本
当前筛选条件下还没有供应商调用样本
</div>
</div>
</div>
@@ -308,7 +308,7 @@
</div>
</BaseCard>
<BaseCard padding="md" title="可用驱动 (Adapters)">
<BaseCard padding="md" title="可用驱动">
<div class="flex flex-wrap gap-2">
<span v-for="adapter in availableAdapters" :key="adapter"
class="px-2 py-1 text-xs bg-indigo-50 text-indigo-700 rounded-full border border-indigo-100">
@@ -410,21 +410,21 @@
<BaseSelect
v-model="form.adapter"
label="驱动程序 (Adapter)"
label="驱动程序"
:options="adapterOptions"
required
description="选择底层的 API 驱动协议"
/>
<BaseInput v-model="form.model" label="模型名称 (Model)" placeholder="如: gpt-4o, minimax-v2" description="具体调用的模型ID" />
<BaseInput v-model="form.model" label="模型名称" placeholder="如: gpt-4o, minimax-v2" description="具体调用的模型 ID" />
<BaseInput v-model.number="form.priority" label="优先级 (0-100)" type="number" description="数字越大越优先" />
<div class="md:col-span-2 p-4 bg-gray-50 rounded-xl border border-gray-100 space-y-4">
<h3 class="text-sm font-bold text-gray-700">密钥与连接</h3>
<BaseInput v-model="form.api_key" label="API Key" type="password" placeholder="留空则使用 .env 配置" :required="!form.id && !form.config_ref" />
<BaseInput v-model="form.api_base" label="API Endpoint / Group ID" placeholder="https://... 或 Group ID" />
<BaseInput v-model="form.config_ref" label="Fallback Env Var" placeholder="如: OPENAI_API_KEY (高级)" />
<BaseInput v-model="form.api_key" label="API 密钥" type="password" placeholder="留空则使用 .env 配置" :required="!form.id && !form.config_ref" />
<BaseInput v-model="form.api_base" label="API 地址 / 分组 ID" placeholder="https://... 或 Group ID" />
<BaseInput v-model="form.config_ref" label="兜底环境变量" placeholder="如: OPENAI_API_KEY (高级)" />
</div>
<!-- MiniMax Specific Config -->

View File

@@ -280,7 +280,7 @@ watch([selectedWindow, selectedCapability], () => {
>
<div class="flex flex-col gap-5 lg:flex-row lg:items-center lg:justify-between">
<div>
<h2 class="text-xl font-bold text-gray-800">Provider 运营摘要</h2>
<h2 class="text-xl font-bold text-gray-800">供应商运营摘要</h2>
<p class="mt-2 text-sm leading-6 text-gray-500">
生成资源补全和失败恢复留下的供应商调用轨迹
</p>