The VS Code extension should show the same default selections as the CLI when aspire new or aspire init reaches the skill-location and skill Quick Picks. Users can still deselect them, but the default experience should be opt-out instead of opt-in.
Investigation
The CLI already owns and computes the correct defaults in AgentInitCommand; we do not need a second defaults API or a copied list in the extension.
Today AgentInitCommand passes those choices through IInteractionService.PromptForSelectionsAsync(..., preSelected: ...):
.agents/skills is the default skill location.
- Bundle-sourced Aspire skills that apply to the detected AppHost language are selected by default.
aspire new excludes the one-time aspireify setup skill because the template already created the AppHost.
aspire init includes aspireify because wiring the existing applications is the natural follow-up.
- CLI-defined skills such as
playwright-cli and dotnet-inspect remain opt-in.
- MCP configuration remains intentionally opt-in.
The values are lost only on the VS Code path: ExtensionInteractionService.PromptForSelectionsAsync explicitly drops preSelected before calling IExtensionBackchannel.PromptForSelectionsAsync. The extension endpoint then receives only string[] choices and calls showQuickPick with no picked items.
Implementation
- Extend
IExtensionBackchannel.PromptForSelectionsAsync and ExtensionBackchannel.PromptForSelectionsAsync to accept the CLI-computed preSelected values, format them with the same formatter as the choices, and send them as an optional trailing promptForSelections RPC argument.
- Forward
preSelected from ExtensionInteractionService.PromptForSelectionsAsync instead of dropping it.
- Update
extension/src/server/interactionService.ts so promptForSelections accepts an optional preselected-label array, creates QuickPickItem values with picked: true where appropriate, and maps the selected items back to their labels.
- Keep the RPC addition backwards compatible: an older CLI omits the optional argument, while an older extension ignores the extra trailing JavaScript argument. No capability gate should be necessary.
Tests
- Add CLI coverage in
ExtensionInteractionServiceTests/TestExtensionBackchannel proving formatted preselected values cross the backchannel.
- Add extension interaction-service coverage proving default items are picked, non-default items are not, deselection is honored, and calls from an older CLI without the new argument still work.
- Add focused VS Code E2E coverage for the
aspire new flow if the E2E Quick Pick helper can reliably inspect selected state; the existing fixture creation suppresses agent init, so this needs a purpose-built interaction flow rather than the current setup fixture.
Acceptance criteria
- VS Code presents the same defaults as the equivalent terminal CLI flow for both
aspire new and aspire init.
- Users can deselect any default or select an opt-in item.
- The extension contains no hardcoded skill names or default list.
- Older CLI versions continue to work with the updated extension.
cc Ella Hathaway (@ellahathaway)
The VS Code extension should show the same default selections as the CLI when
aspire neworaspire initreaches the skill-location and skill Quick Picks. Users can still deselect them, but the default experience should be opt-out instead of opt-in.Investigation
The CLI already owns and computes the correct defaults in
AgentInitCommand; we do not need a second defaults API or a copied list in the extension.Today
AgentInitCommandpasses those choices throughIInteractionService.PromptForSelectionsAsync(..., preSelected: ...):.agents/skillsis the default skill location.aspire newexcludes the one-timeaspireifysetup skill because the template already created the AppHost.aspire initincludesaspireifybecause wiring the existing applications is the natural follow-up.playwright-clianddotnet-inspectremain opt-in.The values are lost only on the VS Code path:
ExtensionInteractionService.PromptForSelectionsAsyncexplicitly dropspreSelectedbefore callingIExtensionBackchannel.PromptForSelectionsAsync. The extension endpoint then receives onlystring[] choicesand callsshowQuickPickwith no picked items.Implementation
IExtensionBackchannel.PromptForSelectionsAsyncandExtensionBackchannel.PromptForSelectionsAsyncto accept the CLI-computedpreSelectedvalues, format them with the same formatter as the choices, and send them as an optional trailingpromptForSelectionsRPC argument.preSelectedfromExtensionInteractionService.PromptForSelectionsAsyncinstead of dropping it.extension/src/server/interactionService.tssopromptForSelectionsaccepts an optional preselected-label array, createsQuickPickItemvalues withpicked: truewhere appropriate, and maps the selected items back to their labels.Tests
ExtensionInteractionServiceTests/TestExtensionBackchannelproving formatted preselected values cross the backchannel.aspire newflow if the E2E Quick Pick helper can reliably inspect selected state; the existing fixture creation suppresses agent init, so this needs a purpose-built interaction flow rather than the current setup fixture.Acceptance criteria
aspire newandaspire init.cc Ella Hathaway (@ellahathaway)