From fb68f9ebce3348368b0822f319f56f76d0418410 Mon Sep 17 00:00:00 2001 From: sinohqb Date: Thu, 20 Aug 2026 19:29:30 +0800 Subject: [PATCH] feat(ui): add grade labels and icons to dimension scores for better intuitiveness --- .../intelligent_eval/EvalReport.tsx | 45 +++++++++++-------- 1 file changed, 26 insertions(+), 19 deletions(-) diff --git a/frontend/web/src/components/intelligent_eval/EvalReport.tsx b/frontend/web/src/components/intelligent_eval/EvalReport.tsx index aea5cd3..9060e6f 100644 --- a/frontend/web/src/components/intelligent_eval/EvalReport.tsx +++ b/frontend/web/src/components/intelligent_eval/EvalReport.tsx @@ -3,7 +3,7 @@ import { Button, Card, Col, Collapse, Empty, Row, Space, Spin, Tag, message, } from 'antd' import { - BulbOutlined, DownloadOutlined, MessageOutlined, StarOutlined, WarningOutlined, + BulbOutlined, CheckCircleOutlined, CloseCircleOutlined, DownloadOutlined, MessageOutlined, StarOutlined, WarningOutlined, } from '@ant-design/icons' import ChatBubble from '../ChatBubble' import SectionHeader from '../SectionHeader' @@ -104,33 +104,40 @@ function SessionMessages({ evalId, sessionId, verdict }: { } function DimensionScoresCards({ dimScores }: { dimScores: [string, number][] }) { - const getScoreColor = (score: number) => { - if (score >= 0.8) return statusColors.completed - if (score >= 0.6) return colors.warning - return statusColors.failed + const getScoreMeta = (score: number) => { + if (score >= 0.8) return { color: statusColors.completed, label: '优秀', icon: } + if (score >= 0.6) return { color: colors.warning, label: '良好', icon: } + return { color: statusColors.failed, label: '待改进', icon: } } return (
{dimScores.map(([dimension, score]) => { const pct = Math.round(score * 100) - const color = getScoreColor(score) + const meta = getScoreMeta(score) return ( -
-
+
+
{dimension}
-
{pct}
+ + {meta.label} +
-
-
+
+
+
+
+
+ {pct} +
)