Skip to content

SolidCraft: an open-source parametric 3D CAD application built in pure Rust. Desktop, web, and automation through MCP.

Agent chat on Windows: no terminal window flashes when agents are detected

bherbruck067f2642c27f
diff --git a/crates/ui-egui/src/agent_chat/discover.rs b/crates/ui-egui/src/agent_chat/discover.rs
index 24fffffafd..bdbf280995 100644
--- a/crates/ui-egui/src/agent_chat/discover.rs
+++ b/crates/ui-egui/src/agent_chat/discover.rs
@@ -217,6 +217,12 @@ fn version(program: &Path, limit: Duration) -> Option<String> {
} else {
Command::new(program)
};
+ #[cfg(windows)]
+ {
+ use std::os::windows::process::CommandExt;
+ // CREATE_NO_WINDOW: probing a console agent doesn't flash a terminal window.
+ cmd.creation_flags(0x0800_0000);
+ }
let mut child = cmd.arg("--version").stdin(Stdio::null()).stdout(Stdio::piped()).stderr(Stdio::null()).spawn().ok()?;
let start = Instant::now();
loop {