File tree Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Original file line number Diff line number Diff line change 736
736
{
737
737
"command" : " codeQLQueryHistory.showEvalLog" ,
738
738
"group" : " 9_qlCommands" ,
739
- "when" : " viewItem == rawResultsItem || viewItem == interpretedResultsItem || viewItem == cancelledResultsItem"
739
+ "when" : " codeql.supportsEvalLog && ( viewItem == rawResultsItem || viewItem == interpretedResultsItem || viewItem == cancelledResultsItem) "
740
740
},
741
741
{
742
742
"command" : " codeQLQueryHistory.showEvalLogSummary" ,
743
743
"group" : " 9_qlCommands" ,
744
- "when" : " viewItem == rawResultsItem || viewItem == interpretedResultsItem || viewItem == cancelledResultsItem"
744
+ "when" : " codeql.supportsEvalLog && ( viewItem == rawResultsItem || viewItem == interpretedResultsItem || viewItem == cancelledResultsItem) "
745
745
},
746
746
{
747
747
"command" : " codeQLQueryHistory.showQueryText" ,
Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ import { Readable } from 'stream';
8
8
import { StringDecoder } from 'string_decoder' ;
9
9
import * as tk from 'tree-kill' ;
10
10
import { promisify } from 'util' ;
11
- import { CancellationToken , Disposable , Uri } from 'vscode' ;
11
+ import { CancellationToken , commands , Disposable , Uri } from 'vscode' ;
12
12
13
13
import { BQRSInfo , DecodedBqrsChunk } from './pure/bqrs-cli-types' ;
14
14
import { CliConfig } from './config' ;
@@ -957,6 +957,10 @@ export class CodeQLCliServer implements Disposable {
957
957
public async getVersion ( ) {
958
958
if ( ! this . _version ) {
959
959
this . _version = await this . refreshVersion ( ) ;
960
+ // this._version is only undefined upon config change, so we reset CLI-based context key only when necessary.
961
+ await commands . executeCommand (
962
+ 'setContext' , 'codeql.supportsEvalLog' , await this . cliConstraints . supportsPerQueryEvalLog ( )
963
+ ) ;
960
964
}
961
965
return this . _version ;
962
966
}
You can’t perform that action at this time.
0 commit comments