seonglae's picture
Agent State Graph dashboard — 12-dataset FSM explorer (sharded data via LFS)
7572a96
Raw
History Blame Contribute Delete
576 Bytes
import { type ClassValue, clsx } from 'clsx'
import { twMerge } from 'tailwind-merge'
export function cn(...inputs: ClassValue[]) {
return twMerge(clsx(inputs))
}
export function fmt(n: number, d = 3): string {
if (n === 0) return '0'
return n.toFixed(d)
}
export function fmtInt(n: number): string {
return n.toLocaleString()
}
export function pct(n: number): string {
return (n * 100).toFixed(1) + '%'
}
export function compression(ours: number, theirs: number): string {
if (theirs <= 0 || ours <= 0) return '--'
return Math.round(theirs / ours) + 'x'
}