File tree Expand file tree Collapse file tree 4 files changed +32
-1
lines changed Expand file tree Collapse file tree 4 files changed +32
-1
lines changed Original file line number Diff line number Diff line change 958
958
"command" : " codeQLQueryHistory.copyRepoList" ,
959
959
"title" : " Copy Repository List"
960
960
},
961
+ {
962
+ "command" : " codeQLQueryHistory.viewAutofixes" ,
963
+ "title" : " View Autofixes"
964
+ },
961
965
{
962
966
"command" : " codeQLQueryResults.down" ,
963
967
"title" : " CodeQL: Navigate Down in Local Result Viewer"
1296
1300
"group" : " 1_queryHistory@1" ,
1297
1301
"when" : " viewItem == remoteResultsItem"
1298
1302
},
1303
+ {
1304
+ "command" : " codeQLQueryHistory.viewAutofixes" ,
1305
+ "group" : " 1_queryHistory@2" ,
1306
+ "when" : " viewItem == remoteResultsItem"
1307
+ },
1299
1308
{
1300
1309
"command" : " codeQLQueries.runLocalQueryFromQueriesPanel" ,
1301
1310
"group" : " inline" ,
1706
1715
"command" : " codeQLQueryHistory.copyRepoList" ,
1707
1716
"when" : " false"
1708
1717
},
1718
+ {
1719
+ "command" : " codeQLQueryHistory.viewAutofixes" ,
1720
+ "when" : " false"
1721
+ },
1709
1722
{
1710
1723
"command" : " codeQLQueryHistory.showQueryText" ,
1711
1724
"when" : " false"
Original file line number Diff line number Diff line change @@ -197,6 +197,7 @@ export type QueryHistoryCommands = {
197
197
"codeQLQueryHistory.itemClicked" : TreeViewContextMultiSelectionCommandFunction < QueryHistoryInfo > ;
198
198
"codeQLQueryHistory.openOnGithub" : TreeViewContextMultiSelectionCommandFunction < QueryHistoryInfo > ;
199
199
"codeQLQueryHistory.copyRepoList" : TreeViewContextMultiSelectionCommandFunction < QueryHistoryInfo > ;
200
+ "codeQLQueryHistory.viewAutofixes" : TreeViewContextMultiSelectionCommandFunction < QueryHistoryInfo > ;
200
201
201
202
// Commands in the command palette
202
203
"codeQL.exportSelectedVariantAnalysisResults" : ( ) => Promise < void > ;
Original file line number Diff line number Diff line change @@ -338,6 +338,11 @@ export class QueryHistoryManager extends DisposableObject {
338
338
this . handleOpenOnGithub . bind ( this ) ,
339
339
"query" ,
340
340
) ,
341
+ "codeQLQueryHistory.viewAutofixes" : createSingleSelectionCommand (
342
+ this . app . logger ,
343
+ this . handleViewAutofixes . bind ( this ) ,
344
+ "query" ,
345
+ ) ,
341
346
"codeQLQueryHistory.copyRepoList" : createSingleSelectionCommand (
342
347
this . app . logger ,
343
348
this . handleCopyRepoList . bind ( this ) ,
@@ -1052,6 +1057,14 @@ export class QueryHistoryManager extends DisposableObject {
1052
1057
) ;
1053
1058
}
1054
1059
1060
+ async handleViewAutofixes ( item : QueryHistoryInfo ) {
1061
+ if ( item . t !== "variant-analysis" ) {
1062
+ return ;
1063
+ }
1064
+
1065
+ await this . variantAnalysisManager . viewAutofixes ( item . variantAnalysis . id ) ;
1066
+ }
1067
+
1055
1068
async handleCopyRepoList ( item : QueryHistoryInfo ) {
1056
1069
if ( item . t !== "variant-analysis" ) {
1057
1070
return ;
Original file line number Diff line number Diff line change @@ -967,7 +967,11 @@ export class VariantAnalysisManager
967
967
) ;
968
968
}
969
969
970
- public async viewAutofixes ( ) {
970
+ public async viewAutofixes ( variantAnalysisId : number ) {
971
+ const variantAnalysis = this . variantAnalyses . get ( variantAnalysisId ) ;
972
+ if ( ! variantAnalysis ) {
973
+ throw new Error ( `No variant analysis with id: ${ variantAnalysisId } ` ) ;
974
+ }
971
975
// TODO
972
976
}
973
977
You can’t perform that action at this time.
0 commit comments