fix(tauri): replace silent let _ = with structured logging across 20 modules
Replace error-swallowing let _ = patterns with tracing::warn! in browser, classroom, gateway, intelligence, memory, pipeline, secure_storage, and viking command handlers. Ensures errors are observable in production logs.
This commit is contained in:
@@ -708,6 +708,7 @@ pub type HeartbeatEngineState = Arc<Mutex<HashMap<String, HeartbeatEngine>>>;
|
||||
///
|
||||
/// Restores persisted interaction time from VikingStorage so idle-greeting
|
||||
/// check works correctly across app restarts.
|
||||
// @connected
|
||||
#[tauri::command]
|
||||
pub async fn heartbeat_init(
|
||||
agent_id: String,
|
||||
@@ -756,6 +757,7 @@ async fn restore_last_interaction(agent_id: &str) {
|
||||
}
|
||||
|
||||
/// Start heartbeat engine for an agent
|
||||
// @connected
|
||||
#[tauri::command]
|
||||
pub async fn heartbeat_start(
|
||||
agent_id: String,
|
||||
@@ -770,6 +772,7 @@ pub async fn heartbeat_start(
|
||||
}
|
||||
|
||||
/// Stop heartbeat engine for an agent
|
||||
// @connected
|
||||
#[tauri::command]
|
||||
pub async fn heartbeat_stop(
|
||||
agent_id: String,
|
||||
@@ -784,6 +787,7 @@ pub async fn heartbeat_stop(
|
||||
}
|
||||
|
||||
/// Execute a single heartbeat tick
|
||||
// @connected
|
||||
#[tauri::command]
|
||||
pub async fn heartbeat_tick(
|
||||
agent_id: String,
|
||||
@@ -797,6 +801,7 @@ pub async fn heartbeat_tick(
|
||||
}
|
||||
|
||||
/// Get heartbeat configuration
|
||||
// @connected
|
||||
#[tauri::command]
|
||||
pub async fn heartbeat_get_config(
|
||||
agent_id: String,
|
||||
@@ -810,6 +815,7 @@ pub async fn heartbeat_get_config(
|
||||
}
|
||||
|
||||
/// Update heartbeat configuration
|
||||
// @connected
|
||||
#[tauri::command]
|
||||
pub async fn heartbeat_update_config(
|
||||
agent_id: String,
|
||||
@@ -825,6 +831,7 @@ pub async fn heartbeat_update_config(
|
||||
}
|
||||
|
||||
/// Get heartbeat history
|
||||
// @connected
|
||||
#[tauri::command]
|
||||
pub async fn heartbeat_get_history(
|
||||
agent_id: String,
|
||||
@@ -840,6 +847,7 @@ pub async fn heartbeat_get_history(
|
||||
|
||||
/// Update memory stats cache for heartbeat checks
|
||||
/// This should be called by the frontend after fetching memory stats
|
||||
// @connected
|
||||
#[tauri::command]
|
||||
pub async fn heartbeat_update_memory_stats(
|
||||
agent_id: String,
|
||||
@@ -852,6 +860,7 @@ pub async fn heartbeat_update_memory_stats(
|
||||
}
|
||||
|
||||
/// Record a user correction for personality improvement detection
|
||||
// @connected
|
||||
#[tauri::command]
|
||||
pub async fn heartbeat_record_correction(
|
||||
agent_id: String,
|
||||
@@ -863,6 +872,7 @@ pub async fn heartbeat_record_correction(
|
||||
|
||||
/// Record a user interaction for idle greeting detection
|
||||
/// Call this from frontend whenever user sends a message
|
||||
// @connected
|
||||
#[tauri::command]
|
||||
pub async fn heartbeat_record_interaction(
|
||||
agent_id: String,
|
||||
|
||||
Reference in New Issue
Block a user