import type { LoadState } from '../client/useAgent'; import type { PendingSend } from '../client/useAgent'; import { formatBytes } from '../lib/format'; interface Props { pending: PendingSend | null; load: LoadState | null; loading: boolean; onConfirm: () => void; onCancel: () => void; } export function ModelDialog({ pending, load, loading, onConfirm, onCancel }: Props) { if (!pending) return null; const progress = load?.phase === 'download' ? load : null; return (
e.key === 'Escape' && onCancel()}>

Download model weights

Everything happens in your browser. Your prompts and files stay on this device.

About 1.84 GB on the first download Saved in this browser (OPFS) and SHA-256 verified, so next starts are fast.

Your message

{pending.text}
{loading && ( <>

{load?.phase === 'compile' ? 'Preparing GPU…' : load?.phase === 'warmup' ? 'Warming up…' : progress ? `${formatBytes(progress.loaded)} of ${formatBytes(progress.total)}` : 'Starting…'}

)} {pending.error &&

{pending.error}

}
); }