Files
cc-switch/src-tauri
Jason 4aaafb8f41 fix(exit): point clients back to direct when macOS quits the app
Cmd+Q, Dock "Quit" and logout/shutdown go through applicationWillTerminate,
which Tauri reports only as RunEvent::Exit, never as ExitRequested. The
exit handler only ran the cleanup on ExitRequested, so quitting this way
left Claude Code / Codex / Gemini / Grok Build pointed at the stopped local
proxy until CC Switch was started again.

Run the same cleanup on RunEvent::Exit: it is spawned onto the async
runtime and the main thread waits for it with an 8 s cap, so a step that
needs the main thread cannot hang the quit. Restart requests also end in
RunEvent::Exit; they are flagged and skipped so the restart keeps Tauri's
default path.
2026-10-03 23:29:00 +08:00
..
2026-09-22 22:17:05 +08:00
2026-09-22 22:17:05 +08:00