需要把RagTraceDetailPage.tsx的
const getStatusColors = (status?: string | null) => { const normalized = normalizeStatus(status) as StatusType | null; return STATUS_COLORS[normalized || "default"]; };
改为
const getStatusColors = (status?: string | null) => { const normalized = normalizeStatus(status); if (normalized === "success" || normalized === "failed" || normalized === "running") { return STATUS_COLORS[normalized]; } return STATUS_COLORS.default; };
因为STATUS_COLORS没有对应的键 返回undefined
需要把RagTraceDetailPage.tsx的
const getStatusColors = (status?: string | null) => { const normalized = normalizeStatus(status) as StatusType | null; return STATUS_COLORS[normalized || "default"]; };改为
const getStatusColors = (status?: string | null) => { const normalized = normalizeStatus(status); if (normalized === "success" || normalized === "failed" || normalized === "running") { return STATUS_COLORS[normalized]; } return STATUS_COLORS.default; };因为STATUS_COLORS没有对应的键 返回undefined