Handle outputless commands #1416
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Context
One last terminal bug fix for behavior that bugs me.
If you execute a command that either doesn't produce output right away or doesn't flush its output to be visible to VSCode then the task hangs indefinitely. It's preferable to present the "Proceed While Running" action so that you can continue to the task while the command is running in the background.
This issue is easy to reproduce with the following prompt:
"Run the command
yes."Implementation
Screenshots
How to Test
Get in Touch
Important
Add handling for outputless terminal commands by emitting a
stream_stalledevent when no output is detected within a timeout, allowing tasks to proceed.stream_stalledevent inTerminalProcessto detect when no output is received within a specified timeout.Cline.ts, listens forstream_stalledto allow user to proceed while command runs in background.stallTimeoutparameter toTerminalProcessconstructor, defaulting to 5000ms.flushLine()when output is received.TerminalProcess.test.tsforstream_stalledevent emission and stall timer clearing behavior.This description was created by
for 710284c. It will automatically update as commits are pushed.