Add configurable Compose task terminal closing - #588
Open
Zhibo Lin (LE0-Lin) wants to merge 3 commits into
Open
Conversation
Author
|
@microsoft-github-policy-service agree |
Contributor
There was a problem hiding this comment.
Pull request overview
Adds an opt-in advanced setting to allow VS Code task terminals spawned by Compose lifecycle commands to auto-close on completion, while keeping streaming logs behavior unchanged. This fits into the extension’s task-based command execution path by threading a new close presentation option through the existing TaskCommandRunnerFactory.
Changes:
- Added
containers.closeComposeTaskTerminalsetting (advanced, defaultfalse) and localized description text. - Plumbed the setting into Compose commands (
compose.ts) and Compose group lifecycle actions (composeGroup.ts), leaving logs actions unaffected. - Extended
TaskCommandRunnerFactoryto supportpresentationOptions.closeand map focus/close options directly.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| extensions/vscode-containers/src/runtimes/runners/TaskCommandRunnerFactory.ts | Adds support for passing close (and adjusts how presentation options are applied to tasks). |
| extensions/vscode-containers/src/commands/containers/composeGroup.ts | Applies the new setting to compose group lifecycle actions (start/stop/restart/down). |
| extensions/vscode-containers/src/commands/compose/compose.ts | Applies the new setting to compose commands run via the compose command entry points. |
| extensions/vscode-containers/package.nls.json | Adds localized string for the new setting description. |
| extensions/vscode-containers/package.json | Contributes the new advanced configuration setting. |
💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
containers.closeComposeTaskTerminalsetting, disabled by defaultfalsevalues are preservedContext
This follows up on #363, which was closed due to inactivity, and incorporates the maintainer feedback from that review: make terminal closing opt-in, keep the default behavior unchanged, and avoid applying it to log streaming.
Closes #350
Testing
pnpm --filter vscode-containers lintpnpm --filter vscode-containers buildpnpm --filter vscode-containers test(158 passing)AI disclosure
Codex (GPT-5) assisted with implementation and validation. The contributor reviewed the changes and test results before submission.