Skip to content

A cross-platform desktop All-in-One assistant for Claude Code, Codex, OpenCode,DeepSeek Harness and more. Only official website: ccswitch.io

fix(windows): keep Antigravity quota refresh in the background (#10124)

Sao Furrya5dd0c042f60
diff --git a/src-tauri/Cargo.lock b/src-tauri/Cargo.lock
index f01d0412b..1fcd54870 100644
--- a/src-tauri/Cargo.lock
+++ b/src-tauri/Cargo.lock
@@ -841,7 +841,7 @@ dependencies = [
"webkit2gtk",
"webpki-roots 0.26.11",
"webview2-com",
- "windows",
+ "windows 0.61.3",
"windows-sys 0.61.2",
"winreg 0.52.0",
"zip 2.4.2",
@@ -892,9 +892,9 @@ checksum = "9330f8b2ff13f34540b44e946ef35111825727b38d33286ef986142615121801"
[[package]]
name = "cfg_aliases"
-version = "0.2.1"
+version = "0.2.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "613afe47fcd5fac7ccf1db93babcb082c5994d996f20b8b159f2ad1658eb5724"
+checksum = "f079e83a288787bcd14a6aea84cee5c87a67c5a3e660c30f557a3d24761b3527"
[[package]]
name = "chrono"
@@ -2904,9 +2904,9 @@ dependencies = [
[[package]]
name = "libc"
-version = "0.2.183"
+version = "0.2.191"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b5b646652bf6661599e1da8901b3b9522896f01e736bad5f723fe7a3a27f899d"
+checksum = "65cd87c9a6d60536580b316ad985726104730a5151c99845f2490428ef91240a"
[[package]]
name = "libloading"
@@ -3208,9 +3208,9 @@ checksum = "650eef8c711430f1a879fdd01d4745a7deea475becfb90269c06775983bbf086"
[[package]]
name = "nix"
-version = "0.30.1"
+version = "0.31.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "74523f3a35e05aba87a1d978330aef40f67b0304ac79c1c00b294c9830543db6"
+checksum = "2bc81ce8148d3b4f3274da811f11cdd824ae661ee4ef732cdb229825cf5be7f7"
dependencies = [
"bitflags 2.11.0",
"cfg-if",
@@ -4091,16 +4091,16 @@ dependencies = [
[[package]]
name = "process-wrap"
-version = "8.2.2"
+version = "10.0.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e9b56899ac93a78fc49e57d51ca29ceffaa6213ee51af2f8a01b1021ec3b4804"
+checksum = "89291549ac1d51b93677833a3de18d4ad0bc97b25cbea8a7b3dc5377c3990dab"
dependencies = [
"futures",
"indexmap 2.13.0",
"nix",
"tokio",
"tracing",
- "windows",
+ "windows 0.62.2",
]
[[package]]
@@ -5652,7 +5652,7 @@ dependencies = [
"tao-macros",
"unicode-segmentation",
"url",
- "windows",
+ "windows 0.61.3",
"windows-core 0.61.2",
"windows-version",
"x11-dl",
@@ -5742,7 +5742,7 @@ dependencies = [
"webkit2gtk",
"webview2-com",
"window-vibrancy",
- "windows",
+ "windows 0.61.3",
]
[[package]]
@@ -5926,7 +5926,7 @@ dependencies = [
"tauri-plugin",
"thiserror 2.0.18",
"url",
- "windows",
+ "windows 0.61.3",
"zbus",
]
@@ -6041,7 +6041,7 @@ dependencies = [
"url",
"webkit2gtk",
"webview2-com",
- "windows",
+ "windows 0.61.3",
]
[[package]]
@@ -6066,7 +6066,7 @@ dependencies = [
"url",
"webkit2gtk",
"webview2-com",
- "windows",
+ "windows 0.61.3",
"wry",
]
@@ -7059,7 +7059,7 @@ checksum = "7130243a7a5b33c54a444e54842e6a9e133de08b5ad7b5861cd8ed9a6a5bc96a"
dependencies = [
"webview2-com-macros",
"webview2-com-sys",
- "windows",
+ "windows 0.61.3",
"windows-core 0.61.2",
"windows-implement",
"windows-interface",
@@ -7083,7 +7083,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "381336cfffd772377d291702245447a5251a2ffa5bad679c99e61bc48bacbf9c"
dependencies = [
"thiserror 2.0.18",
- "windows",
+ "windows 0.61.3",
"windows-core 0.61.2",
]
@@ -7157,11 +7157,23 @@ version = "0.61.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9babd3a767a4c1aef6900409f85f5d53ce2544ccdfaa86dad48c91782c6d6893"
dependencies = [
- "windows-collections",
+ "windows-collections 0.2.0",
"windows-core 0.61.2",
- "windows-future",
+ "windows-future 0.2.1",
"windows-link 0.1.3",
- "windows-numerics",
+ "windows-numerics 0.2.0",
+]
+
+[[package]]
+name = "windows"
+version = "0.62.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "527fadee13e0c05939a6a05d5bd6eec6cd2e3dbd648b9f8e447c6518133d8580"
+dependencies = [
+ "windows-collections 0.3.2",
+ "windows-core 0.62.2",
+ "windows-future 0.3.2",
+ "windows-numerics 0.3.1",
]
[[package]]
@@ -7173,6 +7185,15 @@ dependencies = [
"windows-core 0.61.2",
]
+[[package]]
+name = "windows-collections"
+version = "0.3.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "23b2d95af1a8a14a3c7367e1ed4fc9c20e0a26e79551b1454d72583c97cc6610"
+dependencies = [
+ "windows-core 0.62.2",
+]
+
[[package]]
name = "windows-core"
version = "0.61.2"
@@ -7207,7 +7228,18 @@ checksum = "fc6a41e98427b19fe4b73c550f060b59fa592d7d686537eebf9385621bfbad8e"
dependencies = [
"windows-core 0.61.2",
"windows-link 0.1.3",
- "windows-threading",
+ "windows-threading 0.1.0",
+]
+
+[[package]]
+name = "windows-future"
+version = "0.3.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e1d6f90251fe18a279739e78025bd6ddc52a7e22f921070ccdc67dde84c605cb"
+dependencies = [
+ "windows-core 0.62.2",
+ "windows-link 0.2.1",
+ "windows-threading 0.2.1",
]
[[package]]
@@ -7254,6 +7286,16 @@ dependencies = [
"windows-link 0.1.3",
]
+[[package]]
+name = "windows-numerics"
+version = "0.3.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6e2e40844ac143cdb44aead537bbf727de9b044e107a0f1220392177d15b0f26"
+dependencies = [
+ "windows-core 0.62.2",
+ "windows-link 0.2.1",
+]
+
[[package]]
name = "windows-registry"
version = "0.5.3"
@@ -7438,6 +7480,15 @@ dependencies = [
"windows-link 0.1.3",
]
+[[package]]
+name = "windows-threading"
+version = "0.2.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3949bd5b99cafdf1c7ca86b43ca564028dfe27d66958f2470940f73d86d75b37"
+dependencies = [
+ "windows-link 0.2.1",
+]
+
[[package]]
name = "windows-version"
version = "0.1.7"
@@ -7806,7 +7857,7 @@ dependencies = [
"webkit2gtk",
"webkit2gtk-sys",
"webview2-com",
- "windows",
+ "windows 0.61.3",
"windows-core 0.61.2",
"windows-version",
"x11-dl",
diff --git a/src-tauri/Cargo.toml b/src-tauri/Cargo.toml
index d968982dd..413e7d506 100644
--- a/src-tauri/Cargo.toml
+++ b/src-tauri/Cargo.toml
@@ -56,7 +56,7 @@ tokio = { version = "1", features = ["macros", "rt-multi-thread", "time", "sync"
futures = "0.3"
# Keep legacy SSE support alongside Streamable HTTP; newer SDKs removed SSE.
rmcp = { version = "0.8.5", features = ["client", "transport-async-rw", "transport-sse-client-reqwest", "transport-streamable-http-client-reqwest"] }
-process-wrap = { version = "8.2", features = ["tokio1"] }
+process-wrap = { version = "10.0.2", features = ["tokio1"] }
async-stream = "0.3"
bytes = "1.5"
prost = "0.14"
diff --git a/src-tauri/src/services/mcp_connectivity.rs b/src-tauri/src/services/mcp_connectivity.rs
index acebba280..b5fa59bdc 100644
--- a/src-tauri/src/services/mcp_connectivity.rs
+++ b/src-tauri/src/services/mcp_connectivity.rs
@@ -11,7 +11,7 @@ use std::{
use crate::sync_utils::MutexExt;
use futures::{future::AbortHandle, future::Abortable, stream, StreamExt};
-use process_wrap::tokio::{KillOnDrop, TokioChildWrapper, TokioCommandWrap};
+use process_wrap::tokio::{ChildWrapper, CommandWrap, KillOnDrop};
use rmcp::{
model::{ClientInfo, Implementation},
transport::{
@@ -165,7 +165,7 @@ async fn connect(
if let Some(cwd) = spec.cwd.as_deref().filter(|s| !s.is_empty()) {
command.current_dir(cwd);
}
- let mut command = TokioCommandWrap::from(command);
+ let mut command = CommandWrap::from(command);
command.wrap(KillOnDrop);
// Kill the entire process tree, including children of npx/uvx.
#[cfg(unix)]
@@ -177,7 +177,7 @@ async fn connect(
command.wrap(flags).wrap(process_wrap::tokio::JobObject);
}
let mut process = ProbeProcess(Some(command.spawn()?));
- let child = process.0.as_mut().unwrap().inner_mut();
+ let child = process.0.as_mut().unwrap();
let stdout = child.stdout().take().ok_or("Missing MCP stdout")?;
let stdin = child.stdin().take().ok_or("Missing MCP stdin")?;
let result = handshake(AsyncRwTransport::new_client(stdout, stdin)).await;
@@ -245,14 +245,14 @@ fn apply_login_shell_path(command: &mut Command, login_path: Option<&str>, inher
/// Always terminate the process group/job, even after a successful handshake.
/// A launcher can exit cleanly while its server child is still running.
-struct ProbeProcess(Option<Box<dyn TokioChildWrapper>>);
+struct ProbeProcess(Option<Box<dyn ChildWrapper>>);
impl Drop for ProbeProcess {
fn drop(&mut self) {
if let Some(mut child) = self.0.take() {
let _ = child.start_kill();
tokio::spawn(async move {
- let _ = Box::into_pin(child.wait()).await;
+ let _ = child.wait().await;
});
}
}
diff --git a/src-tauri/src/services/subscription_agy.rs b/src-tauri/src/services/subscription_agy.rs
index 873632a8e..6dd4211e1 100644
--- a/src-tauri/src/services/subscription_agy.rs
+++ b/src-tauri/src/services/subscription_agy.rs
@@ -8,7 +8,7 @@ use std::process::{Output, Stdio};
use std::time::{Duration, SystemTime, UNIX_EPOCH};
use futures::future::try_join3;
-use process_wrap::tokio::{KillOnDrop, TokioChildWrapper, TokioCommandWrap};
+use process_wrap::tokio::{ChildWrapper, CommandWrap, KillOnDrop};
use serde::Deserialize;
use tokio::io::{AsyncRead, AsyncReadExt};
@@ -122,7 +122,7 @@ enum CommandExecError {
Timeout,
}
-struct ChildTreeGuard(Option<Box<dyn TokioChildWrapper>>);
+struct ChildTreeGuard(Option<Box<dyn ChildWrapper>>);
impl Drop for ChildTreeGuard {
fn drop(&mut self) {
@@ -142,7 +142,7 @@ async fn run_command_output(
.stdout(Stdio::piped())
.stderr(Stdio::piped());
- let mut wrapped = TokioCommandWrap::from(command);
+ let mut wrapped = CommandWrap::from(command);
wrapped.wrap(KillOnDrop);
// 超时或被取消时清理整棵子进程树,避免 Windows/Unix 上残留子进程
#[cfg(unix)]
@@ -169,7 +169,7 @@ async fn run_command_output(
let child = guard.0.as_mut().expect("child present");
let (status, stdout, stderr) = try_join3(
- Box::into_pin(child.wait()),
+ child.wait(),
read_to_end(&mut stdout_pipe),
read_to_end(&mut stderr_pipe),
)