'use client'; import { Badge } from '@/components/ui/Primitives'; import { cn } from '@/lib/utils'; import { HERMES_INSTANCES, type HermesInstanceFilter, type HermesInstanceId } from '@/lib/hermes'; import { useHermesInstance } from '@/lib/hermes-instance-context'; const OPTIONS: Array<{ id: HermesInstanceFilter; label: string }> = [ { id: 'all', label: 'All' }, ...HERMES_INSTANCES.map((inst) => ({ id: inst.id, label: inst.label })), ]; interface HermesInstanceSwitcherProps { className?: string; } // Segmented control mounted in the Hermes layout header. Persists its // selection via `useHermesInstance` (localStorage-backed); every Mission // Control pane reads from the same hook. export function HermesInstanceSwitcher({ className }: HermesInstanceSwitcherProps) { const { selectedInstance, setSelectedInstance } = useHermesInstance(); return (