diff --git a/packages/desktop-electron/src/main/apps.ts b/packages/desktop-electron/src/main/apps.ts index 2b460378948..16a0783067c 100644 --- a/packages/desktop-electron/src/main/apps.ts +++ b/packages/desktop-electron/src/main/apps.ts @@ -21,11 +21,11 @@ export function wslPath(path: string, mode: "windows" | "linux" | null): string if (path.startsWith("~")) { const suffix = path.slice(1) const cmd = `wslpath ${flag} \"$HOME${suffix.replace(/\"/g, '\\"')}\"` - const output = execFileSync("wsl", ["-e", "sh", "-lc", cmd]) + const output = execFileSync("wsl", ["-e", "sh", "-lc", cmd], { windowsHide: true }) return output.toString().trim() } - const output = execFileSync("wsl", ["-e", "wslpath", flag, path]) + const output = execFileSync("wsl", ["-e", "wslpath", flag, path], { windowsHide: true }) return output.toString().trim() } catch (error) { throw new Error(`Failed to run wslpath: ${String(error)}`) @@ -51,7 +51,7 @@ function checkMacosApp(appName: string) { function resolveWindowsAppPath(appName: string): string | null { let output: string try { - output = execFileSync("where", [appName]).toString() + output = execFileSync("where", [appName], { windowsHide: true }).toString() } catch { return null } diff --git a/packages/desktop-electron/src/main/cli.ts b/packages/desktop-electron/src/main/cli.ts index e338d39138e..4b2d9447175 100644 --- a/packages/desktop-electron/src/main/cli.ts +++ b/packages/desktop-electron/src/main/cli.ts @@ -84,7 +84,7 @@ export async function installCli(): Promise { writeFileSync(tempScript, script, "utf8") chmodSync(tempScript, 0o755) - const cmd = spawn(tempScript, ["--binary", sidecar], { stdio: "pipe" }) + const cmd = spawn(tempScript, ["--binary", sidecar], { stdio: "pipe", windowsHide: true }) return await new Promise((resolve, reject) => { cmd.on("exit", (code: number | null) => { try { @@ -107,7 +107,7 @@ export function syncCli() { let version = "" try { - version = execFileSync(installPath, ["--version"]).toString().trim() + version = execFileSync(installPath, ["--version"], { windowsHide: true }).toString().trim() } catch { return } diff --git a/packages/desktop-electron/src/main/ipc.ts b/packages/desktop-electron/src/main/ipc.ts index bbb5379bb7a..a27302e4b73 100644 --- a/packages/desktop-electron/src/main/ipc.ts +++ b/packages/desktop-electron/src/main/ipc.ts @@ -123,7 +123,7 @@ export function registerIpcHandlers(deps: Deps) { await new Promise((resolve, reject) => { const [cmd, args] = process.platform === "darwin" ? (["open", ["-a", app, path]] as const) : ([app, [path]] as const) - execFile(cmd, args, (err) => (err ? reject(err) : resolve())) + execFile(cmd, args, { windowsHide: true }, (err) => (err ? reject(err) : resolve())) }) }) diff --git a/packages/opencode/src/cli/cmd/github.ts b/packages/opencode/src/cli/cmd/github.ts index df03d61b91a..bc0d83e9532 100644 --- a/packages/opencode/src/cli/cmd/github.ts +++ b/packages/opencode/src/cli/cmd/github.ts @@ -330,7 +330,7 @@ export const GithubInstallCommand = cmd({ ? `start "" "${url}"` : `xdg-open "${url}"` - exec(command, (error) => { + exec(command, { windowsHide: true }, (error) => { if (error) { prompts.log.warn(`Could not open browser. Please visit: ${url}`) } diff --git a/packages/opencode/src/kilocode/ts-check.ts b/packages/opencode/src/kilocode/ts-check.ts index 449609df830..9deb9506929 100644 --- a/packages/opencode/src/kilocode/ts-check.ts +++ b/packages/opencode/src/kilocode/ts-check.ts @@ -29,6 +29,7 @@ export namespace TsCheck { cwd: root, stdout: "pipe", stderr: "pipe", + windowsHide: true, env: { ...process.env }, }) diff --git a/packages/sdk/js/src/server.ts b/packages/sdk/js/src/server.ts index f878f832f9f..bace9a3b05d 100644 --- a/packages/sdk/js/src/server.ts +++ b/packages/sdk/js/src/server.ts @@ -68,6 +68,7 @@ export async function createKiloServer(options?: ServerOptions) { const proc = spawn(`kilo`, args, { // kilocode_change end signal: options.signal, + windowsHide: true, env: { ...process.env, KILO_CONFIG_CONTENT: buildConfigEnv(options.config), // kilocode_change @@ -148,6 +149,7 @@ export function createKiloTui(options?: TuiOptions) { // kilocode_change end signal: options?.signal, stdio: "inherit", + windowsHide: true, env: { ...process.env, KILO_CONFIG_CONTENT: buildConfigEnv(options?.config), // kilocode_change diff --git a/packages/sdk/js/src/v2/server.ts b/packages/sdk/js/src/v2/server.ts index f878f832f9f..bace9a3b05d 100644 --- a/packages/sdk/js/src/v2/server.ts +++ b/packages/sdk/js/src/v2/server.ts @@ -68,6 +68,7 @@ export async function createKiloServer(options?: ServerOptions) { const proc = spawn(`kilo`, args, { // kilocode_change end signal: options.signal, + windowsHide: true, env: { ...process.env, KILO_CONFIG_CONTENT: buildConfigEnv(options.config), // kilocode_change @@ -148,6 +149,7 @@ export function createKiloTui(options?: TuiOptions) { // kilocode_change end signal: options?.signal, stdio: "inherit", + windowsHide: true, env: { ...process.env, KILO_CONFIG_CONTENT: buildConfigEnv(options?.config), // kilocode_change