- tsconfig 排除 *.test.ts(生产构建不编译测试) - OutcomePanel TeamSideTag 导入路径 ../../ → ../../../ - AgentsPanel/OutcomePanel/ReasoningPanel types 导入 ../../ → ../ - MatchPredictPanel JSDoc 注释 **. → /** (P3-1 编辑损坏) 前端构建成功,容器 healthy。
35 lines
1.1 KiB
TypeScript
35 lines
1.1 KiB
TypeScript
/**
|
|
* ReasoningPanel: 终裁意见 / 降级原因 —— 预测的文本解释。
|
|
*
|
|
* P3-1: 从 MatchPredictPanel.PredictionPanel 拆出,渲染逻辑原样搬迁。
|
|
*/
|
|
import type { Prediction } from '../types'
|
|
|
|
export function ReasoningPanel({ prediction }: { prediction: Prediction }) {
|
|
const degraded = prediction.status === 'degraded' || prediction.status === 'failed'
|
|
|
|
if (!prediction.reasoning) return null
|
|
|
|
// 降级态:reasoning 展示为「降级原因」
|
|
if (degraded) {
|
|
return (
|
|
<section>
|
|
<h4 className="section-head mb-2">降级原因</h4>
|
|
<blockquote className="border-l-2 border-press pl-4">
|
|
<p className="whitespace-pre-wrap font-serif text-sm leading-loose text-ink-700">{prediction.reasoning}</p>
|
|
</blockquote>
|
|
</section>
|
|
)
|
|
}
|
|
|
|
// 成功态:reasoning 展示为「终裁意见」
|
|
return (
|
|
<section>
|
|
<h4 className="section-head mb-3">终裁意见</h4>
|
|
<blockquote className="border-l-2 border-press pl-4">
|
|
<p className="whitespace-pre-wrap font-serif text-sm leading-loose text-ink-700">{prediction.reasoning}</p>
|
|
</blockquote>
|
|
</section>
|
|
)
|
|
}
|