import React from "react"; import { Box, Chip, Paper, Typography } from "@mui/material"; import { getModelLabel } from "../utils/modelLabels"; interface TCSScoreDisplayProps { score: number; label: string; summary: string; nClaims: number; nInconsistencies: number; coherenceFactor: number; pipeline: string; model?: string; processingTimeMs: number; } function getScoreColor(score: number): string { if (score < 0.2) return "#ef4444"; if (score < 0.5) return "#f97316"; if (score < 0.8) return "#eab308"; return "#22c55e"; } function formatPipeline(pipeline: string, model?: string): string { if (model) return getModelLabel(model); if (pipeline === "spacy") return "SpaCy"; if (pipeline === "llm") return "LLM"; return pipeline; } function TCSScoreDisplay({ score, label, summary, nClaims, nInconsistencies, coherenceFactor, pipeline, model, processingTimeMs, }: TCSScoreDisplayProps): React.ReactElement { const color = getScoreColor(score); return ( {score.toFixed(3)} {label} {summary} ); } export default TCSScoreDisplay;