feat(sidebar B.1 #31): visible LLM status chip with live state
The LLM runtime has been quiet since it shipped in Phase 3 — users had no surface-level signal that cleanup was loaded, warming, or actively generating. Settings has verbose status text internally, but a dictation-flow user never opens Settings during a run. New: a shared $state store drives a small chip in the sidebar that reflects the true LLM state in ≤500 ms of any transition (brief item #31 acceptance). Five states: off → hidden (user has aiTier === "off") warming → model download or first load in flight; amber pulse ready → loaded + idle; green dot generating → cleanup_transcript_text_cmd or extract_tasks_from_transcript_cmd in flight; accent pulse with Sparkles icon error → last operation failed; red dot with AlertTriangle The store exposes three calls: refreshLlmStatus(aiTier) (polls the backend), markGenerating(detail) / markGenerationDone(success). DictationPage wraps its cleanup + extract calls in mark-generating pairs. SettingsPage's LLM load / unload / delete / download paths also refresh the global store so Settings-initiated transitions surface in the sidebar immediately. The chip collapses to a dot-only compact form when the sidebar is collapsed. No backend changes — everything wires onto the existing `get_llm_status` Tauri command. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -22,6 +22,7 @@
|
||||
import { listen } from "@tauri-apps/api/event";
|
||||
import { toasts } from "$lib/stores/toasts.svelte.js";
|
||||
import { initI18n } from "$lib/i18n";
|
||||
import { refreshLlmStatus } from "$lib/stores/llmStatus.svelte.js";
|
||||
|
||||
import { page as sveltePage } from "$app/stores";
|
||||
|
||||
@@ -301,6 +302,12 @@
|
||||
})
|
||||
.catch(() => { /* update check failure must not affect the app */ });
|
||||
|
||||
// Seed the LLM status chip (sidebar) with whichever state the
|
||||
// backend is in right now. The chip also reacts to the $effect
|
||||
// on settings.aiTier below and to explicit mark-generating
|
||||
// calls from DictationPage around cleanup_transcript_text_cmd.
|
||||
refreshLlmStatus(settings.aiTier).catch(() => {});
|
||||
|
||||
// Meeting auto-capture: poll the process list and toast when a match
|
||||
// appears (edge-triggered — no repeat toasts until the app goes away
|
||||
// and comes back). We never start recording from this signal; the
|
||||
|
||||
Reference in New Issue
Block a user