From 4077e5c50fe631825b9f503dbf6418c62a9a0d6a Mon Sep 17 00:00:00 2001 From: Thorsten Sommer Date: Wed, 25 Nov 2026 12:30:47 +0100 Subject: [PATCH] Fixed Qdrant Edge which did not stop when you quit AI Studio on macOS --- runtime/src/app_window.rs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/runtime/src/app_window.rs b/runtime/src/app_window.rs index 8a3675c94..c94f9efba 100644 --- a/runtime/src/app_window.rs +++ b/runtime/src/app_window.rs @@ -325,9 +325,14 @@ pub fn start_tauri(tauri_context: tauri::Context) { info!(Source = "Tauri"; "Run event: Tauri app is ready."); } - // When AI Studio restarts itself, Tauri would start the new instance in the background next: - #[cfg(target_os = "macos")] RunEvent::Exit => { + // Quitting through the menu of macOS, e.g., with Cmd+Q, skips RunEvent::ExitRequested. + // Qdrant Edge has to stop anyway, so that it unloads its stores. When it already + // stopped, this does nothing. + stop_qdrant_edge_database(); + + // When AI Studio restarts itself, Tauri would start the new instance in the background next: + #[cfg(target_os = "macos")] crate::own_restart::start_new_instance_in_front(); }