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 (
Everything happens in your browser. Your prompts and files stay on this device.
Your message
{load?.phase === 'compile' ? 'Preparing GPU…' : load?.phase === 'warmup' ? 'Warming up…' : progress ? `${formatBytes(progress.loaded)} of ${formatBytes(progress.total)}` : 'Starting…'}
> )} {pending.error &&{pending.error}
}