J.A.R.V.I.S-rust/crates/jarvis-app/src
Bossiara13 a6a098de15 feat(ipc): SwitchLlm + ReloadLlm + QueryHealth — daemon hot-swap + state snapshot
Closes the "GUI shows GUI process state, not daemon's" gap. Now GUI can:
  1. Tell the daemon to swap LLM backend via IPC (so the running listener
     uses the new backend immediately, not just the GUI process).
  2. Tell the daemon to re-read llm_backend from settings DB after GUI persists
     a choice independently.
  3. Query the daemon's true runtime state (TTS/LLM/profile/memory/scheduler
     counts/language/version) for an honest footer + diagnostics view.

IpcAction (new variants)
  - SwitchLlm { backend: String }    — daemon calls llm::swap_to(parse(backend))
  - ReloadLlm                         — daemon calls llm::init_global() to re-read DB
  - QueryHealth                       — daemon responds with HealthSnapshot

IpcEvent (new variant)
  - HealthSnapshot { tts_backend, llm_backend, llm_model, active_profile,
                     memory_facts, scheduled_tasks, language, version }

jarvis-app main.rs
  - Imports IpcEvent (was only IpcAction before).
  - Three new match arms in ipc action handler — all use existing globals,
    no new state needed.

Next step (TODO): wire GUI's set_llm_backend Tauri command to ALSO fire
IpcAction::SwitchLlm so daemon stays in sync. And replace Footer.svelte's
get_active_backends call with QueryHealth over IPC.

Build: cargo build --release -p jarvis-app -p jarvis-gui green.
Tests: 62/62 pass (unchanged — IPC variants don't add testable logic).
2026-05-15 17:37:32 +03:00
..
tray AI models shared registry + Code cleanup + Better async handling + Some fixes, etc 2026-02-18 21:08:48 +05:00
_app.rs VAD fixes + some calibrations 2026-01-08 00:35:21 +05:00
_main.rs project restructure with Rust workspaces 2026-01-04 05:19:47 +05:00
app.rs feat(macros): IMBA-7 voice-recorded command sequences (VoiceAttack-style) 2026-05-15 17:12:32 +03:00
llm_fallback.rs feat: persist LLM/TTS backend choice + reset/repeat context + quick-search + diagnostics 2026-05-15 16:25:28 +03:00
llm_router.rs feat: hot-swap LLM backend + media keys + codebase Q&A + scheduler cancel-by-text + TTS pre-warm 2026-05-15 16:15:59 +03:00
log.rs project restructure with Rust workspaces 2026-01-04 05:19:47 +05:00
main.rs feat(ipc): SwitchLlm + ReloadLlm + QueryHealth — daemon hot-swap + state snapshot 2026-05-15 17:37:32 +03:00
tray.rs AI models shared registry + Code cleanup + Better async handling + Some fixes, etc 2026-02-18 21:08:48 +05:00