mirror of
https://github.com/farion1231/cc-switch.git
synced 2026-07-24 12:44:18 +08:00
3bc828aecc
Switching providers or toggling proxy takeover on Windows flashed a transient cmd window and froze the UI for up to a couple of seconds. Three fixes: - Spawn `codex debug models --bundled` with CREATE_NO_WINDOW so the console child of the GUI-subsystem app (npm's codex.cmd runs via cmd.exe) no longer opens a visible window. - Cache the ProxyChat model catalog template in a process-wide OnceCell: only successful loads are cached, failures stay retryable, so the Codex CLI starts at most once per app run instead of on every switch. - Run switch_provider via spawn_blocking: sync Tauri commands execute on the main thread, so the blocking catalog generation (and the block_on'd per-app switch lock) froze the UI. Concurrency is already serialized by ProxyService::lock_switch_for_app.