修复前端调试与基础交互问题

This commit is contained in:
MMEXA
2026-07-04 05:24:40 +08:00
parent b86d4e1f0c
commit 242081433e
33 changed files with 525 additions and 320 deletions
@@ -54,8 +54,12 @@
<div class="flex items-start gap-2">
<AlertTriangle class="mt-0.5 h-4 w-4 flex-shrink-0" />
<div class="min-w-0">
<p class="font-medium">关联健康加载失败</p>
<p class="mt-1 text-xs">{{ errorMessage }}</p>
<p class="font-medium">
关联健康加载失败
</p>
<p class="mt-1 text-xs">
{{ errorMessage }}
</p>
</div>
</div>
<Button
@@ -56,6 +56,11 @@ const props = withDefaults(defineProps<{
entityLabel?: string
entityName?: string | null
}>(), {
timeline: null,
timelineDetails: null,
timeRangeStart: null,
timeRangeEnd: null,
generatedAt: null,
lookbackHours: 6,
fallbackSegments: 60,
entityLabel: '',
@@ -1,5 +1,8 @@
<template>
<Card variant="default" class="overflow-hidden">
<Card
variant="default"
class="overflow-hidden"
>
<HealthMonitorHeader
v-model:lookback-hours="lookbackHours"
:title="title"
@@ -23,10 +26,15 @@
>
<Bot class="w-12 h-12 mb-3 opacity-30" />
<p>暂无模型健康监控数据</p>
<p class="text-xs mt-1">模型尚未产生请求记录</p>
<p class="text-xs mt-1">
模型尚未产生请求记录
</p>
</div>
<div v-else class="grid grid-cols-1 md:grid-cols-2 xl:grid-cols-3 gap-4">
<div
v-else
class="grid grid-cols-1 md:grid-cols-2 xl:grid-cols-3 gap-4"
>
<div
v-for="monitor in monitors"
:key="monitor.model"
@@ -46,7 +54,10 @@
{{ monitor.display_name || monitor.model }}
</h4>
</div>
<Badge :variant="getHealthBadgeVariant(monitor)" class="shrink-0">
<Badge
:variant="getHealthBadgeVariant(monitor)"
class="shrink-0"
>
{{ getHealthLabel(monitor) }}
</Badge>
</div>
@@ -597,9 +597,9 @@
: 'text-muted-foreground hover:text-foreground'"
:disabled="importing"
@click="setWindsurfImportMethod(method.key)"
>
{{ legacyT(method.label) }}
</button>
>
{{ legacyT(method.label) }}
</button>
</div>
<div
@@ -135,8 +135,6 @@ import { formatBillingType } from '@/utils/format'
import type { BalanceExtraItem } from '@/features/providers/auth-templates'
import { useI18n } from '@/i18n'
const { legacyT } = useI18n()
defineProps<{
provider: ProviderWithEndpointsSummary
isBalanceLoading: (providerId: string) => boolean
@@ -150,4 +148,6 @@ defineProps<{
formatResetCountdown: (resetsAt: number) => string
getQuotaUsedColorClass: (provider: ProviderWithEndpointsSummary) => string
}>()
const { legacyT } = useI18n()
</script>
@@ -948,7 +948,6 @@ import {
canExportOAuthCredential,
canRefreshOAuthCredential,
isOAuthManagedCredential,
isServiceAccountCredential,
getProviderMaskedSecretLabel,
shouldShowOAuthRefreshControl,
} from '@/utils/providerKeyAuth'
@@ -1302,14 +1301,6 @@ async function toggleFormatConversion() {
}
}
// Provider 级别代理配置
function handleProviderProxyPopoverToggle(open: boolean) {
providerProxyPopoverOpen.value = open
if (open) {
proxyNodesStore.ensureLoaded()
}
}
function getProviderProxyNodeName(): string {
const nodeId = provider.value?.proxy?.node_id
if (!nodeId) return legacyT('未知节点')
@@ -124,7 +124,7 @@ import {
summarizeHealthMonitorItems
} from './health-monitor-utils'
const props = withDefaults(defineProps<{
withDefaults(defineProps<{
title?: string
}>(), {
title: '提供商健康监控'
@@ -1,4 +1,3 @@
/* eslint-disable vue/one-component-per-file, vue/require-default-prop */
import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest'
import { createApp, nextTick, type App } from 'vue'
import OAuthAccountDialog from '@/features/providers/components/OAuthAccountDialog.vue'