Mountain/IPC/StatusReporter/
mountain_attempt_recovery.rs1use tauri::Manager;
5
6use crate::{IPC::StatusReporter::Reporter::Struct as Reporter, dev_log};
7
8#[tauri::command]
9pub async fn mountain_attempt_recovery(app_handle:tauri::AppHandle) -> Result<(), String> {
10 dev_log!("lifecycle", "Tauri command: attempt_recovery");
11
12 if let Some(reporter) = app_handle.try_state::<Reporter>() {
13 reporter.attempt_recovery().await
14 } else {
15 Err("StatusReporter not found in application state".to_string())
16 }
17}