@@ -190,6 +190,7 @@ export type LaunchpadItem = LaunchpadPullRequest & {
190190 codeSuggestionsCount : number ;
191191 codeSuggestions ?: TimedResult < Draft [ ] > ;
192192 isNew : boolean ;
193+ isSearched : boolean ;
193194 actionableCategory : LaunchpadActionCategory ;
194195 suggestedActions : LaunchpadAction [ ] ;
195196 openRepository ?: OpenRepository ;
@@ -659,8 +660,9 @@ export class LaunchpadProvider implements Disposable {
659660 cancellation ?: CancellationToken ,
660661 ) : Promise < LaunchpadCategorizedResult > {
661662 const scope = getLogScope ( ) ;
663+ const isSearching = ( ( o ?: { search ?: string } ) : o is { search : string } => Boolean ( o ?. search ) ) ( options ) ;
662664
663- const fireRefresh = ! options ?. search && ( options ?. force || this . _prs == null ) ;
665+ const fireRefresh = ! isSearching && ( options ?. force || this . _prs == null ) ;
664666
665667 const ignoredRepositories = new Set (
666668 ( configuration . get ( 'launchpad.ignoredRepositories' ) ?? [ ] ) . map ( r => r . toLowerCase ( ) ) ,
@@ -681,7 +683,7 @@ export class LaunchpadProvider implements Disposable {
681683 const [ _ , enrichedItemsResult , prsWithCountsResult ] = await Promise . allSettled ( [
682684 this . container . git . isDiscoveringRepositories ,
683685 this . getEnrichedItems ( { force : options ?. force , cancellation : cancellation } ) ,
684- options ?. search
686+ isSearching
685687 ? this . getSearchedPullRequests ( options . search , cancellation )
686688 : this . getPullRequestsWithSuggestionCounts ( { force : options ?. force , cancellation : cancellation } ) ,
687689 ] ) ;
@@ -815,6 +817,7 @@ export class LaunchpadProvider implements Disposable {
815817 currentViewer : myAccounts . get ( item . provider . id ) ! ,
816818 codeSuggestionsCount : codeSuggestionsCount ,
817819 isNew : this . isItemNewInGroup ( item , actionableCategory ) ,
820+ isSearched : isSearching ,
818821 actionableCategory : actionableCategory ,
819822 suggestedActions : suggestedActions ,
820823 openRepository : openRepository ,
0 commit comments