@@ -201,16 +201,15 @@ export const add = new Command('add')
201201
202202 common . runCommand ( async ( ) => {
203203 const selectedAddonIds = selectedAddons . map ( ( { id } ) => id ) ;
204- const { nextSteps } = await runAddCommand ( options , selectedAddonIds , 'add' ) ;
204+ const { nextSteps } = await runAddCommand ( options , selectedAddonIds ) ;
205205 if ( nextSteps ) p . note ( nextSteps , 'Next steps' , { format : ( line : string ) => line } ) ;
206206 } ) ;
207207 } ) ;
208208
209209type SelectedAddon = { type : 'official' | 'community' ; addon : AddonWithoutExplicitArgs } ;
210210export async function runAddCommand (
211211 options : Options ,
212- selectedAddonIds : string [ ] ,
213- from : 'create' | 'add'
212+ selectedAddonIds : string [ ]
214213) : Promise < { nextSteps ?: string ; packageManager ?: AgentName | null } > {
215214 const selectedAddons : SelectedAddon [ ] = selectedAddonIds . map ( ( id ) => ( {
216215 type : 'official' ,
@@ -391,11 +390,6 @@ export async function runAddCommand(
391390 const setups = selectedAddons . length ? selectedAddons . map ( ( { addon } ) => addon ) : officialAddons ;
392391 const addonSetupResults = setupAddons ( setups , workspace ) ;
393392
394- // get all addons that have been marked to be preselected
395- const initialValues = Object . entries ( addonSetupResults )
396- . filter ( ( [ _ , value ] ) => value . defaultSelection [ from ] === true )
397- . map ( ( [ key ] ) => key ) ;
398-
399393 // prompt which addons to apply
400394 if ( selectedAddons . length === 0 ) {
401395 const addonOptions = officialAddons
@@ -410,8 +404,7 @@ export async function runAddCommand(
410404 const selected = await p . multiselect ( {
411405 message : `What would you like to add to your project? ${ pc . dim ( '(use arrow keys / space bar)' ) } ` ,
412406 options : addonOptions ,
413- required : false ,
414- initialValues
407+ required : false
415408 } ) ;
416409 if ( p . isCancel ( selected ) ) {
417410 p . cancel ( 'Operation cancelled.' ) ;
0 commit comments