diff --git a/desktop/src-tauri/src/kernel_commands/agent.rs b/desktop/src-tauri/src/kernel_commands/agent.rs index 7cdc8a2..9faa4ac 100644 --- a/desktop/src-tauri/src/kernel_commands/agent.rs +++ b/desktop/src-tauri/src/kernel_commands/agent.rs @@ -187,7 +187,10 @@ pub async fn agent_get( if let Ok(storage) = crate::viking_commands::get_storage().await { let profile_store = zclaw_memory::UserProfileStore::new(storage.pool().clone()); if let Ok(Some(profile)) = profile_store.get(&agent_id).await { - agent_info.user_profile = Some(serde_json::to_value(profile).unwrap_or_default()); + match serde_json::to_value(&profile) { + Ok(val) => agent_info.user_profile = Some(val), + Err(e) => tracing::warn!("[agent_get] Failed to serialize UserProfile: {}", e), + } } } }