diff --git a/src/lib/pages/FirstRunPage.svelte b/src/lib/pages/FirstRunPage.svelte index 55aab82..6b7cccc 100644 --- a/src/lib/pages/FirstRunPage.svelte +++ b/src/lib/pages/FirstRunPage.svelte @@ -3,6 +3,7 @@ import { listen } from "@tauri-apps/api/event"; import { page, settings } from "$lib/stores/page.svelte.js"; import UnicodeSpinner from "$lib/components/UnicodeSpinner.svelte"; + import { Download, CheckCircle } from 'lucide-svelte'; let systemInfo = $state(null); let models = $state([]); @@ -12,6 +13,16 @@ let downloadingModel = $state(""); let error = $state(""); let ready = $state(false); + let downloadStartedAt = $state(0); + + /** Estimated minutes remaining based on progress so far */ + let estimatedMinutes = $derived.by(() => { + if (!downloading || downloadProgress <= 0 || !downloadStartedAt) return 0; + const elapsed = (Date.now() - downloadStartedAt) / 1000; + const total = elapsed / (downloadProgress / 100); + const remaining = total - elapsed; + return remaining / 60; + }); async function probe() { try { @@ -28,6 +39,7 @@ downloading = true; downloadingModel = modelId; downloadProgress = 0; + downloadStartedAt = Date.now(); const unlisten = await listen("model-download-progress", (event) => { downloadProgress = event.payload.percent; @@ -80,37 +92,41 @@ {#if probing}
Detecting your hardware...
+One moment.
Starting Kon...
+Press the button. Start talking. That's it.
{downloadingModel}
{downloadProgress}%
+ {#if estimatedMinutes > 2} +Download in background — this may take a while
+ {/if}Think out loud
+Press the button. Start talking. That's it.
{#if error} -One tap — we handle the rest.