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

This commit is contained in:
bherbruck authored and GitHub committed 2026-10-15 21:11:49 -04:00
1 parent af771b9ceb
commit 067f2642c2
1 file changed
+6
@@ -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 {