fix(desktop): terminate sidecar on main window close
- Terminate the sidecar when the macOS main window is closed - Update opencode-ai/sdk to v1.1.53 across all packages
This commit is contained in:
@@ -1482,6 +1482,14 @@ fn main() {
|
||||
*state.focused.lock().expect("focus mutex") = *focused;
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(target_os = "macos")]
|
||||
if let tauri::WindowEvent::CloseRequested { .. } = event {
|
||||
// Ensure sidecar is not left running when users close the main window.
|
||||
let app = window.app_handle();
|
||||
kill_sidecar(app.clone());
|
||||
app.exit(0);
|
||||
}
|
||||
})
|
||||
.invoke_handler(tauri::generate_handler![
|
||||
desktop_notify,
|
||||
|
||||
Reference in New Issue
Block a user