File tree Expand file tree Collapse file tree
extensions/ql-vscode/src/query-history Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -284,7 +284,10 @@ export class QueryHistoryManager extends DisposableObject {
284284 this . handleViewCsvResults . bind ( this ) ,
285285 "query" ,
286286 ) ,
287- "codeQLQueryHistory.viewCsvAlerts" : this . handleViewCsvAlerts . bind ( this ) ,
287+ "codeQLQueryHistory.viewCsvAlerts" : createSingleSelectionCommand (
288+ this . handleViewCsvAlerts . bind ( this ) ,
289+ "query" ,
290+ ) ,
288291 "codeQLQueryHistory.viewSarifAlerts" : createSingleSelectionCommand (
289292 this . handleViewSarifAlerts . bind ( this ) ,
290293 "query" ,
@@ -873,22 +876,14 @@ export class QueryHistoryManager extends DisposableObject {
873876 }
874877 }
875878
876- async handleViewCsvAlerts (
877- singleItem : QueryHistoryInfo ,
878- multiSelect : QueryHistoryInfo [ ] | undefined ,
879- ) {
880- // Local queries only
881- if (
882- ! this . assertSingleQuery ( multiSelect ) ||
883- singleItem . t !== "local" ||
884- ! singleItem . completedQuery
885- ) {
879+ async handleViewCsvAlerts ( item : QueryHistoryInfo ) {
880+ if ( item . t !== "local" || ! item . completedQuery ) {
886881 return ;
887882 }
888883
889884 await tryOpenExternalFile (
890885 this . app . commands ,
891- await singleItem . completedQuery . query . ensureCsvAlerts (
886+ await item . completedQuery . query . ensureCsvAlerts (
892887 this . qs . cliServer ,
893888 this . dbm ,
894889 ) ,
You can’t perform that action at this time.
0 commit comments