//! Tauri commands for profile switching. use serde::Serialize; #[derive(Serialize)] pub struct ProfileInfo { pub name: String, pub description: String, pub icon: String, pub greeting: String, } #[tauri::command] pub fn profile_list() -> Vec { jarvis_core::profiles::list() } #[tauri::command] pub fn profile_active() -> ProfileInfo { let p = jarvis_core::profiles::active(); ProfileInfo { name: p.name, description: p.description, icon: p.icon, greeting: p.greeting, } } #[tauri::command] pub fn profile_set(name: String) -> Result { let p = jarvis_core::profiles::set_active(&name)?; Ok(ProfileInfo { name: p.name, description: p.description, icon: p.icon, greeting: p.greeting, }) }