feat(transport): 暴露同格式 provider 的细分失败原因并在时间线展示

- claude_code/kiro/vertex policy 新增 transport_unsupported_reason_with_network 变体,返回具体失败码
- planner candidate_metadata 在 request_pair 写入同格式 provider 的细分 transport 原因
- 前端请求时间线优先展示 transport_diagnostics 的细分原因而非通用 transport_unsupported
This commit is contained in:
fawney19
2026-04-19 21:45:57 +08:00
parent 77aac74590
commit 1f74e660de
14 changed files with 440 additions and 52 deletions

View File

@@ -435,11 +435,11 @@
<!-- 跳过原因 -->
<div
v-if="currentAttempt.skip_reason"
v-if="currentAttemptSkipReasonDisplay"
class="skip-reason"
>
<span class="reason-label">跳过原因</span>
<span class="reason-value">{{ currentAttempt.skip_reason }}</span>
<span class="reason-value">{{ currentAttemptSkipReasonDisplay }}</span>
</div>
<!-- 错误信息 -->
@@ -1370,6 +1370,23 @@ const currentAttemptConversionInfo = computed<{
return { summary, hint }
})
const currentAttemptSkipReasonDisplay = computed(() => {
const attempt = currentAttempt.value
if (!attempt?.skip_reason) return ''
if (attempt.skip_reason !== 'transport_unsupported') {
return attempt.skip_reason
}
const transportDiagnostics = resolveTransportDiagnostics(attempt)
const requestPair = extractObject(transportDiagnostics?.request_pair)
const detailedReason = typeof requestPair?.transport_unsupported_reason === 'string'
? requestPair.transport_unsupported_reason.trim()
: ''
return detailedReason || attempt.skip_reason
})
// 计算当前尝试启用的能力标签(请求需要的能力)
const activeCapabilities = computed(() => {
if (!currentAttempt.value?.required_capabilities) return []