diff --git a/web/src/components/table/usage-logs/UsageLogsColumnDefs.jsx b/web/src/components/table/usage-logs/UsageLogsColumnDefs.jsx index 61104d22..d5243afc 100644 --- a/web/src/components/table/usage-logs/UsageLogsColumnDefs.jsx +++ b/web/src/components/table/usage-logs/UsageLogsColumnDefs.jsx @@ -35,7 +35,7 @@ import { renderModelPriceSimple, } from '../../../helpers'; import { IconHelpCircle } from '@douyinfe/semi-icons'; -import { Route, Sparkles } from 'lucide-react'; +import { CircleAlert, Route, Sparkles } from 'lucide-react'; const colors = [ 'amber', @@ -141,12 +141,58 @@ function renderType(type, t) { } } -function renderIsStream(bool, t) { +function buildStreamStatusTooltip(ss, t) { + if (!ss) return null; + const lines = [ + t('流状态') + ':' + t('异常'), + (ss.end_reason || 'unknown'), + ]; + if (ss.error_count > 0) { + lines.push(`${t('软错误')}: ${ss.error_count}`); + } + if (ss.end_error) { + lines.push(ss.end_error); + } + return ( +