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:
Bohdan Triapitsyn
2026-02-06 02:50:08 +02:00
parent 282d675a85
commit fd08cc4e5d
8 changed files with 238 additions and 10 deletions
+8
View File
@@ -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,