@@ -190,6 +190,7 @@ export type LaunchpadItem = LaunchpadPullRequest & {
190
190
codeSuggestionsCount : number ;
191
191
codeSuggestions ?: TimedResult < Draft [ ] > ;
192
192
isNew : boolean ;
193
+ isSearched : boolean ;
193
194
actionableCategory : LaunchpadActionCategory ;
194
195
suggestedActions : LaunchpadAction [ ] ;
195
196
openRepository ?: OpenRepository ;
@@ -665,8 +666,9 @@ export class LaunchpadProvider implements Disposable {
665
666
cancellation ?: CancellationToken ,
666
667
) : Promise < LaunchpadCategorizedResult > {
667
668
const scope = getLogScope ( ) ;
669
+ const isSearching = ( ( o ?: { search ?: string } ) : o is { search : string } => Boolean ( o ?. search ) ) ( options ) ;
668
670
669
- const fireRefresh = ! options ?. search && ( options ?. force || this . _prs == null ) ;
671
+ const fireRefresh = ! isSearching && ( options ?. force || this . _prs == null ) ;
670
672
671
673
const ignoredRepositories = new Set (
672
674
( configuration . get ( 'launchpad.ignoredRepositories' ) ?? [ ] ) . map ( r => r . toLowerCase ( ) ) ,
@@ -687,7 +689,7 @@ export class LaunchpadProvider implements Disposable {
687
689
const [ _ , enrichedItemsResult , prsWithCountsResult ] = await Promise . allSettled ( [
688
690
this . container . git . isDiscoveringRepositories ,
689
691
this . getEnrichedItems ( { force : options ?. force , cancellation : cancellation } ) ,
690
- options ?. search
692
+ isSearching
691
693
? this . getSearchedPullRequests ( options . search , cancellation )
692
694
: this . getPullRequestsWithSuggestionCounts ( { force : options ?. force , cancellation : cancellation } ) ,
693
695
] ) ;
@@ -821,6 +823,7 @@ export class LaunchpadProvider implements Disposable {
821
823
currentViewer : myAccounts . get ( item . provider . id ) ! ,
822
824
codeSuggestionsCount : codeSuggestionsCount ,
823
825
isNew : this . isItemNewInGroup ( item , actionableCategory ) ,
826
+ isSearched : isSearching ,
824
827
actionableCategory : actionableCategory ,
825
828
suggestedActions : suggestedActions ,
826
829
openRepository : openRepository ,
0 commit comments