diff --git a/src/terminal-manager.ts b/src/terminal-manager.ts index 0c902c43..816e4605 100644 --- a/src/terminal-manager.ts +++ b/src/terminal-manager.ts @@ -157,12 +157,14 @@ export class TerminalManager { // Use shell-specific configuration with login flags where appropriate spawnConfig = getShellSpawnArgs(shellToUse, enhancedCommand); spawnOptions = { + stdio: ['pipe', 'pipe', 'pipe'] as const, + windowsHide: true, // Prevent .NET-based shells (pwsh.exe) from allocating a new console env: { ...process.env, TERM: 'xterm-256color' // Better terminal compatibility } }; - + // Add shell option if needed (for unknown shells) if (spawnConfig.useShellOption) { spawnOptions.shell = spawnConfig.useShellOption; @@ -176,6 +178,8 @@ export class TerminalManager { }; spawnOptions = { shell: shellToUse, + stdio: ['pipe', 'pipe', 'pipe'] as const, + windowsHide: true, env: { ...process.env, TERM: 'xterm-256color'