@@ -161,7 +161,6 @@ export class StartWorkCommand extends QuickCommand<State> {
161161 }
162162 }
163163
164- await updateContextItems ( this . container , context ) ;
165164 if ( this . container . telemetry . enabled ) {
166165 this . container . telemetry . sendEvent (
167166 opened ? 'startWork/steps/issue' : 'startWork/opened' ,
@@ -470,14 +469,25 @@ export class StartWorkCommand extends QuickCommand<State> {
470469 } ;
471470 }
472471
473- const { items, placeholder } = getItemsAndPlaceholder ( ) ;
472+ const updateItems = async ( quickpick : QuickPick < any > ) => {
473+ quickpick . busy = true ;
474+ try {
475+ await updateContextItems ( this . container , context ) ;
476+ const { items, placeholder } = getItemsAndPlaceholder ( ) ;
477+ quickpick . placeholder = placeholder ;
478+ quickpick . items = items ;
479+ } finally {
480+ quickpick . busy = false ;
481+ }
482+ } ;
474483
475- const step = createPickStep < ( typeof items ) [ 0 ] > ( {
484+ const step = createPickStep < QuickPickItemOfT < StartWorkItem | StartWorkTypeItem > > ( {
476485 title : context . title ,
477- placeholder : placeholder ,
486+ placeholder : 'Loading...' ,
478487 matchOnDescription : true ,
479488 matchOnDetail : true ,
480- items : items ,
489+ items : [ ] ,
490+ onDidActivate : updateItems ,
481491 onDidClickItemButton : ( _quickpick , button , { item } ) => {
482492 if ( button === OpenOnGitHubQuickInputButton && ! isStartWorkTypeItem ( item ) ) {
483493 this . open ( item ) ;
0 commit comments