/** * WorthDoing.ai * Author: Simon-Pierre Boucher * Contact: contact@spboucher.ai * File: src/components/wd/ConfidenceBar.tsx * Description: Thin animated confidence bar — width transitions on real confidence changes. */ import { cn } from "@/lib/utils"; export function ConfidenceBar({ value, tone = "auto", className, }: { value: number; // 0..1 tone?: "auto" | "verdict" | "signal" | "rust" | "tele" | "ink"; className?: string; }) { const resolved = tone === "auto" ? (value >= 0.65 ? "verdict" : value >= 0.4 ? "signal" : "rust") : tone; const toneClass: Record = { verdict: "bg-verdict", signal: "bg-signal", rust: "bg-rust", tele: "bg-tele", ink: "bg-ink", }; return (
); }