#[cfg(windows)] use tauri::Manager; #[cfg(windows)] mod windows_appbar; #[cfg_attr(mobile, tauri::mobile_entry_point)] pub fn run() { tauri::Builder::default() .plugin(tauri_plugin_opener::init()) .setup(|app| { #[cfg(windows)] { let window = app .get_webview_window("main") .expect("main window must be configured"); windows_appbar::register_right_edge(window.hwnd()?)?; } Ok(()) }) .build(tauri::generate_context!()) .expect("failed to build SenlinAI desktop app") .run(|_, event| { #[cfg(windows)] if matches!(event, tauri::RunEvent::ExitRequested { .. }) { windows_appbar::unregister(); } }); }