Skip to content

Add kill_terminal tool#290590

Merged
Tyriar merged 1 commit intomainfrom
tyriar/288564
Jan 26, 2026
Merged

Add kill_terminal tool#290590
Tyriar merged 1 commit intomainfrom
tyriar/288564

Conversation

@Tyriar
Copy link
Copy Markdown
Contributor

@Tyriar Tyriar commented Jan 26, 2026

Fixes #288564

@Tyriar Tyriar added this to the January 2026 milestone Jan 26, 2026
@Tyriar Tyriar self-assigned this Jan 26, 2026
Copilot AI review requested due to automatic review settings January 26, 2026 22:37
@Tyriar Tyriar enabled auto-merge January 26, 2026 22:37
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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_terminal tool (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.

@Tyriar Tyriar merged commit 2426703 into main Jan 26, 2026
27 of 28 checks passed
@Tyriar Tyriar deleted the tyriar/288564 branch January 26, 2026 23:10
@OrenMe
Copy link
Copy Markdown

OrenMe commented Jan 26, 2026

Finally, yes yes yes, thank you!

@vs-code-engineering vs-code-engineering bot locked and limited conversation to collaborators Mar 12, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add tool for killing background terminals

4 participants