consider server commands finished vs requesting user input when appropriate#284127
Merged
meganrogge merged 2 commits intomainfrom Dec 17, 2025
Merged
consider server commands finished vs requesting user input when appropriate#284127meganrogge merged 2 commits intomainfrom
meganrogge merged 2 commits intomainfrom
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR fixes an issue where the terminal command monitor would hang on non-interactive help prompts that don't actually require user input. The fix introduces a new pattern detection function to identify help prompts like "press h + enter to show help" and treats them as command completion rather than requesting user input.
Key changes:
- Added
detectsNonInteractiveHelpPatternfunction to identify non-interactive help messages - Integrated early checks in the monitoring pipeline to avoid unnecessary LLM consultations for help prompts
- Improved error handling when hiding prompt UI elements
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/monitoring/outputMonitor.ts | Implements the new detectsNonInteractiveHelpPattern function with regex patterns to detect help prompts, integrates checks in _waitForIdle, _handleIdleState, and _determineUserInputOptions to short-circuit on help messages, improves error handling for prompt hiding, and fixes output fallback logic |
| src/vs/workbench/contrib/terminalContrib/chatAgentTools/test/browser/outputMonitor.test.ts | Adds test case verifying help prompts complete without LLM consultation, adds comprehensive regex pattern tests for the new detection function, and exports the new function for testing |
amunger
approved these changes
Dec 17, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
fixes #283902
Note this only works when
isBackgroundistrueas we onlyawaitcommand finished in that case. cc @TyriarBefore, hanging or requesting input when we don't need it:
After: