From 24d8ef91ce9395ea3ffa52832b501b2954c7921c Mon Sep 17 00:00:00 2001 From: Eric Wheeler Date: Fri, 7 Mar 2025 09:41:51 -0800 Subject: [PATCH] fix: emit line event when command output starts This fixes an issue where commands that wait for input (like 'cat' without arguments) would hang indefinitely because no 'line' event was emitted. The terminal would receive the VSCode shell integration marker indicating command output has started, but since there was no actual output yet, the UI would not proceed. By emitting an empty line event when command output starts, we ensure the UI can proceed even when a command is waiting for input, preventing the task from hanging. Thank you @cte for pointing this out in the PR development process. Signed-off-by: Eric Wheeler --- src/integrations/terminal/TerminalProcess.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/integrations/terminal/TerminalProcess.ts b/src/integrations/terminal/TerminalProcess.ts index f0a0e5ea6d..cc36b08b78 100644 --- a/src/integrations/terminal/TerminalProcess.ts +++ b/src/integrations/terminal/TerminalProcess.ts @@ -206,6 +206,7 @@ export class TerminalProcess extends EventEmitter { commandOutputStarted = true data = match this.fullOutput = "" // Reset fullOutput when command actually starts + this.emit("line", "") // Trigger UI to proceed } else { continue }