UNPKG

@kaifronsdal/transcript-viewer

Version:

A web-based viewer for AI conversation transcripts with rollback support

16 lines (15 loc) 505 B
// Utility functions for score-related operations import { SCORE_THRESHOLDS } from './constants'; export function getScoreColor(score: number): string { if (score >= SCORE_THRESHOLDS.HIGH_CONCERN) { return 'badge-error'; } else if (score >= SCORE_THRESHOLDS.MEDIUM_CONCERN) { return 'badge-warning'; } else if (score >= SCORE_THRESHOLDS.LOW_CONCERN) { return 'badge-info'; } else if (score >= SCORE_THRESHOLDS.MINIMAL_CONCERN) { return 'badge-neutral'; } else { return 'badge-ghost'; } }