Tighten agent validation gates

This commit is contained in:
2026-06-30 23:24:31 +08:00
parent 53b81dd04d
commit 5055084788
9 changed files with 87 additions and 20 deletions

View File

@@ -287,7 +287,13 @@ type AgentCheck = {
type EvaluationAgentPayload = {
agent: string;
passed: boolean;
score: number;
summary?: {
passed_checks: number;
total_checks: number;
missing_checks: string[];
};
checks: AgentCheck[];
suggestions: string[];
};
@@ -1203,11 +1209,11 @@ function App() {
<p className="eyebrow">Evaluation Agent</p>
<h2></h2>
</div>
<StatusPill status={(agentEvaluation?.score ?? 0) >= 1 ? "success" : "queued"} />
<StatusPill status={agentEvaluation?.passed ? "success" : "queued"} />
</div>
<div className="agentScore">
<strong>{Math.round((agentEvaluation?.score ?? 0) * 100)}%</strong>
<span>{agentEvaluation?.checks.filter((item) => item.passed).length ?? 0}/{agentEvaluation?.checks.length ?? 0} checks passed</span>
<span>{agentEvaluation?.summary ? `${agentEvaluation.summary.passed_checks}/${agentEvaluation.summary.total_checks}` : `${agentEvaluation?.checks.filter((item) => item.passed).length ?? 0}/${agentEvaluation?.checks.length ?? 0}`} checks passed</span>
</div>
<div className="suggestionList">
{(agentEvaluation?.suggestions ?? ["等待评价 agent 返回建议。"]).slice(0, 6).map((item, index) => (