import { motion } from 'framer-motion'; import { Cpu, Loader2, Check } from 'lucide-react'; import { fadeSlide } from './constants'; import { ModelGate } from '@/components/os/model-gate/ModelGate'; import { useHasWorkingModel } from '@/hooks/useHasWorkingModel'; import type { ModelGateStepProps } from './types'; /** * Onboarding step 3 — the HARD model gate (PR5 D2). Continue stays disabled until * ≥1 working model exists (a cloud key live-validated → Vault, OR a detected/pulled * local model). One soft escape — "I'll do this later" — dismisses onboarding to * Home, where the NoModelBanner persists until a model is set up. A zero-model first * task instantly errors; the gate prevents that cold-start dead-end (DESIGN_POV §2). * * Reuses the shared ModelGate (same component as Settings → Models) so the gate and * the permanent home of model setup can never drift. */ const ModelGateStep = ({ onContinue, onLater }: ModelGateStepProps) => { const { hasWorkingModel, cloudReady, localReady, loading, refresh } = useHasWorkingModel(); return (

Connect a model

Waggle needs one model to think with. Bring your own provider key (stored encrypted in your Vault) or run a model locally. Nothing leaves your machine without your key.

{hasWorkingModel && localReady && !cloudReady ? (

Model ready

{cloudReady ? 'Your provider key is in Vault. You can tune models later in Settings.' : localReady ? 'A local model is available. You can tune models later in Settings.' : 'A model is available. You can tune models later in Settings.'}

) : null}
); }; export default ModelGateStep;