@@ -767,13 +767,15 @@ export class QueryHistoryManager extends DisposableObject {
767767 singleItem : QueryHistoryInfo ,
768768 multiSelect : QueryHistoryInfo [ ]
769769 ) {
770- // Local queries only
771- if ( ! this . assertSingleQuery ( multiSelect ) || singleItem ?. t !== 'local' ) {
770+ const { finalSingleItem, finalMultiSelect } = this . determineSelection ( singleItem , multiSelect ) ;
771+
772+ // Only applicable to an individual local query
773+ if ( ! this . assertSingleQuery ( finalMultiSelect ) || ! finalSingleItem || finalSingleItem . t !== 'local' ) {
772774 return ;
773775 }
774776
775- if ( singleItem . evalLogLocation ) {
776- await this . tryOpenExternalFile ( singleItem . evalLogLocation ) ;
777+ if ( finalSingleItem . evalLogLocation ) {
778+ await this . tryOpenExternalFile ( finalSingleItem . evalLogLocation ) ;
777779 } else {
778780 this . warnNoEvalLog ( ) ;
779781 }
@@ -783,17 +785,18 @@ export class QueryHistoryManager extends DisposableObject {
783785 singleItem : QueryHistoryInfo ,
784786 multiSelect : QueryHistoryInfo [ ]
785787 ) {
786- // Local queries only
787- if ( ! this . assertSingleQuery ( multiSelect ) || singleItem ?. t !== 'local' ) {
788+ const { finalSingleItem, finalMultiSelect } = this . determineSelection ( singleItem , multiSelect ) ;
789+
790+ // Only applicable to an individual local query
791+ if ( ! this . assertSingleQuery ( finalMultiSelect ) || ! finalSingleItem || finalSingleItem . t !== 'local' ) {
788792 return ;
789793 }
790794
791- if ( singleItem . evalLogLocation ) {
792- const summaryLocation = singleItem . evalLogLocation + '.summary' ;
793- if ( ! fs . existsSync ( summaryLocation ) ) {
794- await this . qs . cliServer . generateLogSummary ( singleItem . evalLogLocation , summaryLocation ) ;
795+ if ( finalSingleItem . evalLogLocation ) {
796+ if ( ! fs . existsSync ( finalSingleItem . evalLogSummaryLocation ) ) {
797+ await this . qs . cliServer . generateLogSummary ( finalSingleItem . evalLogLocation , finalSingleItem . evalLogSummaryLocation ) ;
795798 }
796- await this . tryOpenExternalFile ( summaryLocation ) ;
799+ await this . tryOpenExternalFile ( finalSingleItem . evalLogSummaryLocation ) ;
797800 } else {
798801 this . warnNoEvalLog ( ) ;
799802 }
0 commit comments