feat(kon): add first-run hardware probe and model recommendation wizard

- New probe_system command: returns RAM, CPU, OS info
- New rank_models command: scores models against detected hardware
- FirstRunPage.svelte: hardware summary, ranked model list with
  "Recommended" badge on top pick, download progress bar, skip option
- First-run detection in layout: checks list_models + list_parakeet_models,
  shows wizard if both empty
- Sidebar hidden during first-run for clean wizard experience
- clippy clean

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
jake
2026-03-16 22:02:01 +00:00
parent 57eccaf373
commit 904d5fdb95
6 changed files with 266 additions and 4 deletions

View File

@@ -1,6 +1,7 @@
<script>
import "../app.css";
import { onDestroy } from "svelte";
import { onMount, onDestroy } from "svelte";
import { invoke } from "@tauri-apps/api/core";
import Sidebar from "$lib/Sidebar.svelte";
import TaskSidebar from "$lib/components/TaskSidebar.svelte";
import Titlebar from "$lib/components/Titlebar.svelte";
@@ -66,6 +67,19 @@
document.documentElement.style.setProperty("--font-size-transcript", `${settings.fontSize}px`);
});
// First-run detection: check if any models are downloaded
onMount(async () => {
try {
const whisper = await invoke("list_models");
const parakeet = await invoke("list_parakeet_models");
if (whisper.length === 0 && parakeet.length === 0) {
page.current = "first-run";
}
} catch {
// If commands fail, skip first-run check
}
});
onDestroy(() => {
if (registeredHotkey) {
import("@tauri-apps/plugin-global-shortcut")
@@ -87,11 +101,13 @@
<div class="flex flex-col h-screen w-screen overflow-hidden grain">
<Titlebar />
<div class="flex flex-1 min-h-0">
<Sidebar />
{#if page.current !== "first-run"}
<Sidebar />
{/if}
<div class="flex-1 overflow-hidden bg-bg">
{@render children()}
</div>
{#if page.taskSidebarOpen}
{#if page.taskSidebarOpen && page.current !== "first-run"}
<TaskSidebar />
{/if}
</div>