/** * A fixed colour per agent, keyed on the badge the daemon hands out. * * Labels are workspace basenames, so two agents working in the same repo read identically. * Colour plus #N is what makes a row in the overview, a line in the timeline and an approval * card recognisably the same agent without reading anything. * * Written as whole class names on purpose: Tailwind scans the source text, so a class * assembled from a template string at runtime would not survive the build. */ export interface SessionColor { dot: string; text: string; } const PALETTE: SessionColor[] = [ { dot: "bg-sky-500", text: "text-sky-600 dark:text-sky-400" }, { dot: "bg-violet-500", text: "text-violet-600 dark:text-violet-400" }, { dot: "bg-emerald-500", text: "text-emerald-600 dark:text-emerald-400" }, { dot: "bg-amber-500", text: "text-amber-600 dark:text-amber-400" }, { dot: "bg-rose-500", text: "text-rose-600 dark:text-rose-400" }, { dot: "bg-cyan-500", text: "text-cyan-600 dark:text-cyan-400" }, { dot: "bg-fuchsia-500", text: "text-fuchsia-600 dark:text-fuchsia-400" }, { dot: "bg-lime-500", text: "text-lime-600 dark:text-lime-400" }, ]; export function sessionColor(badge: number): SessionColor { const index = Math.max(0, Math.floor(badge) - 1) % PALETTE.length; return PALETTE[index]; }