File tree Expand file tree Collapse file tree 4 files changed +18
-0
lines changed Expand file tree Collapse file tree 4 files changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -49,6 +49,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p
4949### Changed
5050
5151- Changes the _ Search & Compare_ view to be separate (detached) from the new grouped _ GitLens_ view
52+ - API search in the _ Launchpad_ is activated only when nothing is found locally
5253
5354### Fixed
5455
Original file line number Diff line number Diff line change @@ -73,6 +73,7 @@ export interface QuickPickStep<T extends QuickPickItem = QuickPickItem> {
7373 onDidActivate ?( quickpick : QuickPick < DirectiveQuickPickItem | T > ) : void ;
7474
7575 onDidAccept ?( quickpick : QuickPick < DirectiveQuickPickItem | T > ) : boolean | Promise < boolean > ;
76+ onDidChangeActive ?( quickpick : QuickPick < DirectiveQuickPickItem | T > ) : boolean | Promise < boolean > ;
7677 onDidChangeValue ?( quickpick : QuickPick < DirectiveQuickPickItem | T > ) : boolean | Promise < boolean > ;
7778 onDidChangeSelection ?( quickpick : QuickPick < DirectiveQuickPickItem | T > , selection : readonly T [ ] ) : void ;
7879 onDidClickButton ?(
Original file line number Diff line number Diff line change @@ -621,6 +621,11 @@ export abstract class QuickWizardCommandBase extends GlCommandBase {
621621 firstActiveChange = false ;
622622 }
623623
624+ if ( step . onDidChangeActive != null ) {
625+ const cancel = step . onDidChangeActive ( quickpick ) ;
626+ if ( cancel ) return ;
627+ }
628+
624629 if ( rootStep . command != null || quickpick . activeItems . length === 0 ) return ;
625630
626631 const command = quickpick . activeItems [ 0 ] ;
Original file line number Diff line number Diff line change @@ -744,6 +744,17 @@ export class LaunchpadCommand extends QuickCommand<State> {
744744
745745 this . savedSearch = undefined ;
746746 } ,
747+
748+ onDidChangeActive : quickpick => {
749+ const hasActiveLaunchpadItems = quickpick . activeItems . find ( i => 'item' in i ) ;
750+ if ( hasActiveLaunchpadItems ) {
751+ context . updateItemsDebouncer . cancel ( ) ;
752+ return true ;
753+ }
754+
755+ return false ;
756+ } ,
757+
747758 onDidChangeValue : async quickpick => {
748759 const { value } = quickpick ;
749760 this . savedSearch = value ;
You can’t perform that action at this time.
0 commit comments