Tighten agent validation gates
This commit is contained in:
@@ -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) => (
|
||||
|
||||
Reference in New Issue
Block a user