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:
@@ -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>
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
import TasksPage from "$lib/pages/TasksPage.svelte";
|
||||
import HistoryPage from "$lib/pages/HistoryPage.svelte";
|
||||
import SettingsPage from "$lib/pages/SettingsPage.svelte";
|
||||
import FirstRunPage from "$lib/pages/FirstRunPage.svelte";
|
||||
|
||||
// Redirect legacy "profiles" page to settings
|
||||
$effect(() => {
|
||||
@@ -13,7 +14,9 @@
|
||||
</script>
|
||||
|
||||
<div class="h-full overflow-hidden">
|
||||
{#if page.current === "dictation"}
|
||||
{#if page.current === "first-run"}
|
||||
<FirstRunPage />
|
||||
{:else if page.current === "dictation"}
|
||||
<DictationPage />
|
||||
{:else if page.current === "files"}
|
||||
<FilesPage />
|
||||
|
||||
Reference in New Issue
Block a user