Files
oh-my-pi/packages/coding-agent/src/launch/spawn-options.ts
T
roboomp 5b6e8db2d7 fix(launch): hid daemon broker window on Windows
Applied the console-aware launch policy in the original OMP process before spawning the broker. The broker now inherits the caller's console state instead of probing a detached console it created itself.
2026-07-18 21:42:58 +00:00

18 lines
537 B
TypeScript

/** Platform-specific options for the launch broker and its non-PTY children. */
export interface DaemonSpawnOptions {
detached: boolean;
windowsHide?: boolean;
}
/** Keep launch processes headless without discarding an inheritable Windows console. */
export function resolveDaemonSpawnOptions(opts: {
platform: NodeJS.Platform;
hostHasInheritableConsole: boolean;
}): DaemonSpawnOptions {
if (opts.platform !== "win32") return { detached: true };
return {
detached: false,
windowsHide: !opts.hostHasInheritableConsole,
};
}