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 717
717
{
718
718
"command" : " codeQLQueryHistory.showEvalLog" ,
719
719
"group" : " 9_qlCommands" ,
720
- "when" : " viewItem == rawResultsItem || viewItem == interpretedResultsItem || viewItem == cancelledResultsItem"
720
+ "when" : " codeql.supportsEvalLog && ( viewItem == rawResultsItem || viewItem == interpretedResultsItem || viewItem == cancelledResultsItem) "
721
721
},
722
722
{
723
723
"command" : " codeQLQueryHistory.showEvalLogSummary" ,
724
724
"group" : " 9_qlCommands" ,
725
- "when" : " viewItem == rawResultsItem || viewItem == interpretedResultsItem || viewItem == cancelledResultsItem"
725
+ "when" : " codeql.supportsEvalLog && ( viewItem == rawResultsItem || viewItem == interpretedResultsItem || viewItem == cancelledResultsItem) "
726
726
},
727
727
{
728
728
"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