import { useEffect, useState } from 'react'; import { X, Settings, CheckCircle2, XCircle, Loader2, Mic, Volume2, RotateCcw, Play } from 'lucide-react'; import { bridge } from '../../lib/bridge'; import { HermesClient } from '../../services/hermes/client'; import { listSystemVoices } from '../../services/voice/tts'; import { speech } from '../../services/voice/speech'; import { listMicrophones } from '../../services/voice/capture'; import { transcribeWav } from '../../services/voice/stt'; import { encodeWav } from '../../services/voice/wav'; import { useHermes } from '../../state/hermes'; import { DEFAULT_SETTINGS, useSettings, type HudTheme } from '../../state/settings'; import { useVoice } from '../../state/voice'; import { installedModels, useVoiceModels } from '../../state/voiceModels'; import { ModelsSection } from './ModelsSection'; type Section = 'general' | 'hermes' | 'voice' | 'speech' | 'models' | 'webhook' | 'ui'; interface Props { onClose: () => void; } function Toggle({ on, onChange, label, hint }: { on: boolean; onChange: (v: boolean) => void; label: string; hint?: string }) { return (