feat(pool,trace): 账号封禁原因细分与请求追踪 attempted_only 过滤

- 将账号封禁原因从笼统的"账号异常"细分为封禁/停用/需要验证三类,
  前后端关键词组同步拆分,号池管理页面展示对应分类标签
- trace API 新增 attempted_only 参数,支持仅返回实际尝试过的候选,
  前端时间线组件默认启用过滤,排除 available/unused/skipped 记录
This commit is contained in:
fawney19
2026-03-05 17:32:21 +08:00
parent a7697032a4
commit 694167f78f
8 changed files with 226 additions and 52 deletions

View File

@@ -1186,7 +1186,7 @@ import KeyFormDialog from '@/features/providers/components/KeyFormDialog.vue'
import OAuthKeyEditDialog from '@/features/providers/components/OAuthKeyEditDialog.vue'
import OAuthAccountDialog from '@/features/providers/components/OAuthAccountDialog.vue'
import ProxyNodeSelect from '@/features/providers/components/ProxyNodeSelect.vue'
import { isAccountLevelBlockReason, cleanAccountBlockReason } from '@/utils/accountBlock'
import { isAccountLevelBlockReason, classifyAccountBlockLabel, cleanAccountBlockReason } from '@/utils/accountBlock'
const { success, error: showError, warning: showWarning } = useToast()
const { confirm } = useConfirm()
@@ -2339,7 +2339,11 @@ function getAccountAlertLabel(key: PoolKeyDetail): string | null {
// 后端 _build_account_quota 返回的确切文本: "账号已封禁" / "访问受限"
if (quotaText === '账号已封禁' || quotaText === '封禁') result = '账号封禁'
else if (quotaText === '访问受限') result = '访问受限'
else if (isAccountLevelBlockReason(key.oauth_invalid_reason)) result = '账号异常'
else if (isAccountLevelBlockReason(key.oauth_invalid_reason)) {
const reason = String(key.oauth_invalid_reason || '').trim()
const cleaned = cleanAccountBlockReason(reason)
result = classifyAccountBlockLabel(cleaned || reason)
}
_accountAlertCache.set(key, result)
return result