Use unified timeout setting under shell integration in runCommand #272369
Merged
Use unified timeout setting under shell integration in runCommand #272369
Conversation
anthonykim1
commented
Oct 21, 2025
src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/toolTerminalCreator.ts
Outdated
Show resolved
Hide resolved
anthonykim1
commented
Oct 21, 2025
...rkbench/contrib/terminalContrib/chatAgentTools/common/terminalChatAgentToolsConfiguration.ts
Outdated
Show resolved
Hide resolved
anthonykim1
commented
Oct 21, 2025
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR unifies shell integration timeout configuration by introducing a new general terminal setting terminal.integrated.shellIntegration.timeout that replaces the chat-specific setting. The change allows this timeout to be used more broadly across terminal features, including the runCommand API.
Key Changes:
- Adds new unified
terminal.integrated.shellIntegration.timeoutsetting - Updates chat agent tools to prefer the new setting with fallback to deprecated setting
- Modifies
runCommandto use the unified timeout with adjusted wait logic based on process ready time
Reviewed Changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
src/vs/platform/terminal/common/terminal.ts |
Adds ShellIntegrationTimeout enum value for the new unified setting |
src/vs/workbench/contrib/terminal/common/terminalConfiguration.ts |
Defines the new terminal.integrated.shellIntegration.timeout configuration property |
src/vs/workbench/contrib/terminalContrib/chatAgentTools/common/terminalChatAgentToolsConfiguration.ts |
Marks the chat-specific timeout setting as deprecated and references the new unified setting |
src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/toolTerminalCreator.ts |
Updates to prefer the new unified timeout setting with fallback to deprecated chat setting |
src/vs/workbench/contrib/terminal/common/terminal.ts |
Adds processReadyTime property to track when terminal process becomes ready |
src/vs/workbench/contrib/terminal/browser/terminalProcessManager.ts |
Implements tracking of process ready time |
src/vs/workbench/contrib/terminal/browser/terminalInstance.ts |
Refactors runCommand to use unified timeout with elapsed time calculation |
src/vs/workbench/contrib/terminal/browser/terminalCommands.ts |
Adds temporary test command for validating the runCommand timeout behavior |
...rkbench/contrib/terminalContrib/chatAgentTools/common/terminalChatAgentToolsConfiguration.ts
Outdated
Show resolved
Hide resolved
src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/toolTerminalCreator.ts
Outdated
Show resolved
Hide resolved
Tyriar
requested changes
Oct 21, 2025
...rkbench/contrib/terminalContrib/chatAgentTools/common/terminalChatAgentToolsConfiguration.ts
Outdated
Show resolved
Hide resolved
src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/toolTerminalCreator.ts
Outdated
Show resolved
Hide resolved
...rkbench/contrib/terminalContrib/chatAgentTools/common/terminalChatAgentToolsConfiguration.ts
Outdated
Show resolved
Hide resolved
src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/toolTerminalCreator.ts
Outdated
Show resolved
Hide resolved
…ering processReadytime
anthonykim1
commented
Oct 22, 2025
src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/toolTerminalCreator.ts
Show resolved
Hide resolved
Tyriar
requested changes
Oct 22, 2025
src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/toolTerminalCreator.ts
Show resolved
Hide resolved
...bench/contrib/terminalContrib/chatAgentTools/browser/terminal.chatAgentTools.contribution.ts
Outdated
Show resolved
Hide resolved
...bench/contrib/terminalContrib/chatAgentTools/browser/terminal.chatAgentTools.contribution.ts
Outdated
Show resolved
Hide resolved
src/vs/workbench/contrib/terminal/common/terminalConfiguration.ts
Outdated
Show resolved
Hide resolved
Co-authored-by: Daniel Imms <2193314+Tyriar@users.noreply.github.com>
platform should be small, it's not used there
Tyriar
approved these changes
Oct 24, 2025
DonJayamanne
approved these changes
Oct 24, 2025
anthonykim1
added a commit
to microsoft/vscode-python-environments
that referenced
this pull request
Oct 26, 2025
Resolves: microsoft/vscode#273017 * Coming from: microsoft/vscode#272369 * Further ensure so that pwsh command activation does not hang. * Took the regex from: https://github.com/microsoft/vscode/blob/e1f78f13a11e6a1f20dfacbe03f8c7b64b031ac2/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/executeStrategy.ts#L53-L97 * Already updated distro to enable onTerminalDataWrite proposed api. --------- Co-authored-by: Daniel Imms <2193314+Tyriar@users.noreply.github.com>
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.
Resolves: #270813
Main points from: #272369 (comment)