Idle filter: suppress when watched process (claude) is running in distro

Probes wsl.exe -d <distro> -- pgrep -x claude before flagging a WSL pane
idle, with a 3s per-distro cache on the Rust side. If claude is running
anywhere in the distro, all panes in that distro stay out of the idle set
(per-pane granularity is out of scope — PIDs aren't observable from
Windows). PowerShell + SSH panes skip the probe and keep the legacy
always-notify behaviour.
This commit is contained in:
megaproxy 2026-05-26 17:24:46 +01:00
parent 5b970f8b48
commit f51033a142
7 changed files with 352 additions and 11 deletions

View file

@ -457,6 +457,13 @@ fn looks_like_password_prompt(buf: &[u8]) -> bool {
/// Run a process without flashing a console window on Windows.
fn quiet_command(program: &str) -> std::process::Command {
quiet_command_pub(program)
}
/// Public variant for cross-module callers (currently {@link crate::probe}).
/// Same behaviour as the in-module `quiet_command`; the wrapper exists so
/// other modules don't each re-implement the CREATE_NO_WINDOW dance.
pub fn quiet_command_pub(program: &str) -> std::process::Command {
let mut c = std::process::Command::new(program);
#[cfg(windows)]
{