import type { OrchestratorState } from '../lib/types' interface OrchestratorAvatarProps { state: OrchestratorState size?: 'sm' | 'md' | 'lg' } const SIZES = { sm: { svg: 32, font: 'text-xs' }, md: { svg: 48, font: 'text-sm' }, lg: { svg: 64, font: 'text-base' }, } // Maestro color scheme - Deep violet const MAESTRO_COLORS = { primary: '#7C3AED', // Violet-600 secondary: '#A78BFA', // Violet-400 accent: '#EDE9FE', // Violet-100 baton: '#FBBF24', // Amber-400 for the baton gold: '#F59E0B', // Amber-500 for accents } // Maestro SVG - Robot conductor with baton function MaestroSVG({ size, state }: { size: number; state: OrchestratorState }) { // Animation transform based on state const batonAnimation = state === 'spawning' ? 'animate-conducting' : state === 'scheduling' ? 'animate-baton-tap' : '' return ( {/* Conductor's podium hint */} {/* Robot body - formal conductor style */} {/* Tuxedo front / formal vest */} {/* Bow tie */} {/* Robot head */} {/* Conductor's cap */} {/* Eyes */} {/* Smile */} {/* Arms */} {/* Hand holding baton */} {/* Baton */} {/* Subtle music notes when active */} {(state === 'spawning' || state === 'monitoring') && ( <> )} ) } // Animation classes based on orchestrator state function getStateAnimation(state: OrchestratorState): string { switch (state) { case 'idle': return 'animate-bounce-gentle' case 'initializing': return 'animate-thinking' case 'scheduling': return 'animate-thinking' case 'spawning': return 'animate-working' case 'monitoring': return 'animate-bounce-gentle' case 'complete': return 'animate-celebrate' default: return '' } } // Glow effect based on state function getStateGlow(state: OrchestratorState): string { switch (state) { case 'initializing': return 'shadow-[0_0_12px_rgba(124,58,237,0.4)]' case 'scheduling': return 'shadow-[0_0_10px_rgba(167,139,250,0.5)]' case 'spawning': return 'shadow-[0_0_16px_rgba(124,58,237,0.6)]' case 'monitoring': return 'shadow-[0_0_8px_rgba(167,139,250,0.4)]' case 'complete': return 'shadow-[0_0_20px_rgba(112,224,0,0.6)]' default: return '' } } // Get human-readable state description for accessibility function getStateDescription(state: OrchestratorState): string { switch (state) { case 'idle': return 'waiting' case 'initializing': return 'initializing features' case 'scheduling': return 'selecting next features' case 'spawning': return 'spawning agents' case 'monitoring': return 'monitoring progress' case 'complete': return 'all features complete' default: return state } } export function OrchestratorAvatar({ state, size = 'md' }: OrchestratorAvatarProps) { const { svg: svgSize } = SIZES[size] const stateDesc = getStateDescription(state) const ariaLabel = `Orchestrator Maestro is ${stateDesc}` return (
) }