@@ -2,7 +2,7 @@ import { env } from 'vscode';
22import * as path from 'path' ;
33import { QueryHistoryConfig } from './config' ;
44import { LocalQueryInfo } from './query-results' ;
5- import { getRawQueryName , QueryHistoryInfo } from './query-history-info' ;
5+ import { buildRepoLabel , getRawQueryName , QueryHistoryInfo } from './query-history-info' ;
66import { RemoteQueryHistoryItem } from './remote-queries/remote-query-history-item' ;
77import { pluralize } from './helpers' ;
88import { VariantAnalysisHistoryItem } from './remote-queries/variant-analysis-history-item' ;
@@ -79,23 +79,12 @@ export class HistoryItemLabelProvider {
7979 } ;
8080 }
8181
82- // Return the number of repositories queried if available. Otherwise, use the controller repository name.
83- private buildRepoLabel ( item : RemoteQueryHistoryItem ) : string {
84- const repositoryCount = item . remoteQuery . repositoryCount ;
85-
86- if ( repositoryCount ) {
87- return pluralize ( repositoryCount , 'repository' , 'repositories' ) ;
88- }
89-
90- return `${ item . remoteQuery . controllerRepository . owner } /${ item . remoteQuery . controllerRepository . name } ` ;
91- }
92-
9382 private getRemoteInterpolateReplacements ( item : RemoteQueryHistoryItem ) : InterpolateReplacements {
9483 const resultCount = item . resultCount ? `(${ pluralize ( item . resultCount , 'result' , 'results' ) } )` : '' ;
9584 return {
9685 t : new Date ( item . remoteQuery . executionStartTime ) . toLocaleString ( env . language ) ,
9786 q : `${ item . remoteQuery . queryName } (${ item . remoteQuery . language } )` ,
98- d : this . buildRepoLabel ( item ) ,
87+ d : buildRepoLabel ( item ) ,
9988 r : resultCount ,
10089 s : item . status ,
10190 f : path . basename ( item . remoteQuery . queryFilePath ) ,
@@ -108,7 +97,7 @@ export class HistoryItemLabelProvider {
10897 return {
10998 t : new Date ( item . variantAnalysis . executionStartTime ) . toLocaleString ( env . language ) ,
11099 q : `${ item . variantAnalysis . query . name } (${ item . variantAnalysis . query . language } )` ,
111- d : 'TODO' ,
100+ d : buildRepoLabel ( item ) ,
112101 r : resultCount ,
113102 s : item . status ,
114103 f : path . basename ( item . variantAnalysis . query . filePath ) ,
0 commit comments