Repository navigation
Add configurable Compose task terminal closing - #588
Zhibo Lin (LE0-Lin) wants to merge 3 commits into
Conversation
|
@microsoft-github-policy-service agree |
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.
044aaa6 to
9518c7d
Compare
|
Hi Brandon Waterloo (@bwateratmsft) — I’ve rebased this PR onto the current
The new fork workflow is awaiting maintainer approval. When you have a chance, could you approve it and take another look at the PR? Thanks! |
|
Hi Brandon Waterloo (@bwateratmsft), the workflows for this PR and #589 are still awaiting approval. The earlier review threads are resolved. Could you approve the runs when you have a chance? Thanks. |
Summary
containers.closeComposeTaskTerminalsetting, disabled by defaultcloseonly takes effect after the task ends and does not interrupt streaming outputfalsevalues 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 and keep the default behavior unchanged.
Closes #350
Testing
pnpm --filter vscode-containers lintpnpm --filter vscode-containers buildpnpm --filter vscode-containers test(161 passing on VS Code 1.136.0)The task presentation regression tests cover omitted options, explicit
falsevalues, and enabling terminal closing without changing focus.AI disclosure
Codex (GPT-5) assisted with implementation and validation. The contributor reviewed the changes and test results before submission.