Conversation
The select commands (selectConfigurePreset, selectBuildPreset,
selectTestPreset, selectPackagePreset, selectWorkflowPreset, selectKit)
now return the selected preset/kit name as a string instead of a boolean.
This allows them to work correctly as ${command:...} variables in
tasks.json, which require a string result.
Empty string is returned on cancellation (falsy), so all existing
callers that check truthiness continue to work correctly.
Fixes #4239
Co-authored-by: Omotola <8052624+Omotola@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix error when selecting already active configuration
Fix select preset/kit commands to return strings for task variable substitution
Mar 17, 2026
Contributor
Omotola
approved these changes
Mar 18, 2026
Contributor
|
@copilot fix the CHANGELOG.md as it was not rebased/merged properly against main, do not change the PR description |
Co-authored-by: hanniavalera <90047725+hanniavalera@users.noreply.github.com> Agent-Logs-Url: https://github.com/microsoft/vscode-cmake-tools/sessions/7e265975-65ca-40bf-87fc-2d06d58ae0a5
Contributor
Author
snehara99
approved these changes
Mar 20, 2026
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.


This change addresses item #4239
This changes visible behavior of preset and kit selection commands when used as
${command:...}variablesThe following changes are proposed:
selectConfigurePreset,selectBuildPreset,selectTestPreset,selectPackagePreset,selectWorkflowPreset, andselectKitinExtensionManagerto returnPromise<string>(selected name) instead ofPromise<boolean>The purpose of this change
Using
${command:cmake.selectConfigurePreset}intasks.jsonfails with:VS Code's command variable substitution requires a
stringreturn value. These commands returnedboolean.Other Notes/Information
The change is backward-compatible: all internal callers use truthiness checks (
!didChoosePreset), and empty string is falsy / non-empty string is truthy — identical semantics tofalse/true.Original prompt
📱 Kick off Copilot coding agent tasks wherever you are with GitHub Mobile, available on iOS and Android.