Use Spectre.Console built-in choices for confirm prompt styling#15998
Merged
mitchdenny merged 1 commit intomainfrom Apr 9, 2026
Merged
Use Spectre.Console built-in choices for confirm prompt styling#15998mitchdenny merged 1 commit intomainfrom
mitchdenny merged 1 commit intomainfrom
Conversation
Contributor
|
🚀 Dogfood this PR with:
curl -fsSL https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 15998Or
iex "& { $(irm https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 15998" |
Member
Author
|
I didn't like how the earlier change lost the choice color. I think the color helps give an indication to the user that input is required. This is consistent with text inputs which display the default is custom color. |
Contributor
There was a problem hiding this comment.
Pull request overview
Updates Aspire CLI’s interactive confirm prompt to rely on Spectre.Console’s built-in ConfirmationPrompt choice rendering rather than manually embedding [Y/n] / [y/N] into the prompt text.
Changes:
- Switch
ConfirmAsyncto pass the rawpromptTexttoConfirmationPrompt. - Use
ConfirmationPrompt.Yes/Noto control[Y/n]vs[y/N]styling and remove the manual bracket-escaping approach.
Contributor
|
🎬 CLI E2E Test Recordings — 55 recordings uploaded (commit View recordings
📹 Recordings uploaded automatically from CI run #24175628539 |
mitchdenny
approved these changes
Apr 9, 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.
Description
Use Spectre.Console's built-in
YesandNoproperties onConfirmationPromptto control the confirm prompt choice styling (e.g.,[Y/n]or[y/N]), instead of manually formatting the choices into the prompt text with escaped brackets and hiding the built-in choices display.This simplifies the code and lets Spectre.Console handle rendering the choices consistently.
13.2:

main:

PR:

Checklist