Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a new chat agent terminal tool to allow cleaning up background terminals created by run_in_terminal, addressing the need to prevent agent-owned terminals from stacking up.
Changes:
- Introduces a new
kill_terminaltool (data + implementation) and wires it into the terminal chat agent tools contribution. - Extends active terminal execution tracking to expose the terminal instance and adds a helper to remove tracked executions.
- Updates terminal UI refresh behavior and adjusts existing tests to reflect the new execution shape.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| src/vs/workbench/contrib/terminalContrib/chatAgentTools/test/browser/awaitTerminalTool.test.ts | Updates mock active execution shape to include a terminal instance. |
| src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/toolIds.ts | Adds the kill_terminal tool ID. |
| src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/runInTerminalTool.ts | Adds instance to active execution interface and introduces removeExecution helper. |
| src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/killTerminalTool.ts | Implements the new kill_terminal tool to dispose a background terminal and remove tracking. |
| src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/terminal.chatAgentTools.contribution.ts | Registers the new kill tool in the execute tool set. |
| src/vs/workbench/contrib/terminal/browser/terminalTabbedView.ts | Refreshes tabs/chat terminals entry also on terminal instance disposal. |
connor4312
approved these changes
Jan 26, 2026
|
Finally, yes yes yes, thank you! |
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 #288564