@@ -53,8 +53,6 @@ import {
5353import { pathExists } from "fs-extra" ;
5454import { CliVersionConstraint } from "../cli" ;
5555import { HistoryItemLabelProvider } from "./history-item-label-provider" ;
56- import { cancelRemoteQuery } from "../remote-queries/gh-api/gh-actions-api-client" ;
57- import { RemoteQueryHistoryItem } from "../remote-queries/remote-query-history-item" ;
5856import { ResultsView } from "../interface" ;
5957import { WebviewReveal } from "../interface-utils" ;
6058import { EvalLogViewer } from "../eval-log-viewer" ;
@@ -65,7 +63,6 @@ import { QueryRunner } from "../queryRunner";
6563import { VariantAnalysisManager } from "../remote-queries/variant-analysis-manager" ;
6664import { VariantAnalysisHistoryItem } from "./variant-analysis-history-item" ;
6765import { getTotalResultCount } from "../remote-queries/shared/variant-analysis" ;
68- import { App } from "../common/app" ;
6966import { HistoryTreeDataProvider } from "./history-tree-data-provider" ;
7067import { redactableError } from "../pure/errors" ;
7168
@@ -137,7 +134,6 @@ export class QueryHistoryManager extends DisposableObject {
137134 readonly onDidCompleteQuery = this . _onDidCompleteQuery . event ;
138135
139136 constructor (
140- private readonly app : App ,
141137 private readonly qs : QueryRunner ,
142138 private readonly dbm : DatabaseManager ,
143139 private readonly localQueriesResultsView : ResultsView ,
@@ -525,9 +521,6 @@ export class QueryHistoryManager extends DisposableObject {
525521 case "local" :
526522 queryPath = finalSingleItem . initialInfo . queryPath ;
527523 break ;
528- case "remote" :
529- queryPath = finalSingleItem . remoteQuery . queryFilePath ;
530- break ;
531524 default :
532525 assertNever ( finalSingleItem ) ;
533526 }
@@ -553,12 +546,6 @@ export class QueryHistoryManager extends DisposableObject {
553546 return this . treeDataProvider . getCurrent ( ) ;
554547 }
555548
556- getRemoteQueryById ( queryId : string ) : RemoteQueryHistoryItem | undefined {
557- return this . treeDataProvider . allHistory . find (
558- ( i ) => i . t === "remote" && i . queryId === queryId ,
559- ) as RemoteQueryHistoryItem ;
560- }
561-
562549 async removeDeletedQueries ( ) {
563550 await Promise . all (
564551 this . treeDataProvider . allHistory . map ( async ( item ) => {
@@ -595,8 +582,6 @@ export class QueryHistoryManager extends DisposableObject {
595582 // We need to delete it from disk as well.
596583 await item . completedQuery ?. query . deleteQuery ( ) ;
597584 }
598- } else if ( item . t === "remote" ) {
599- // Do nothing. TODO: Remove once remote queries are no longer supported.
600585 } else if ( item . t === "variant-analysis" ) {
601586 await this . removeVariantAnalysis ( item ) ;
602587 } else {
@@ -808,8 +793,6 @@ export class QueryHistoryManager extends DisposableObject {
808793 if ( queryHistoryItem . completedQuery ) {
809794 return queryHistoryItem . completedQuery . query . querySaveDir ;
810795 }
811- } else if ( queryHistoryItem . t === "remote" ) {
812- return join ( this . queryStorageDir , queryHistoryItem . queryId ) ;
813796 } else if ( queryHistoryItem . t === "variant-analysis" ) {
814797 return this . variantAnalysisManager . getVariantAnalysisStorageLocation (
815798 queryHistoryItem . variantAnalysis . id ,
@@ -840,12 +823,6 @@ export class QueryHistoryManager extends DisposableObject {
840823 "timestamp" ,
841824 ) ;
842825 }
843- } else if ( finalSingleItem . t === "remote" ) {
844- externalFilePath = join (
845- this . queryStorageDir ,
846- finalSingleItem . queryId ,
847- "timestamp" ,
848- ) ;
849826 } else if ( finalSingleItem . t === "variant-analysis" ) {
850827 externalFilePath = join (
851828 this . variantAnalysisManager . getVariantAnalysisStorageLocation (
@@ -1012,11 +989,6 @@ export class QueryHistoryManager extends DisposableObject {
1012989 if ( item . status === QueryStatus . InProgress ) {
1013990 if ( item . t === "local" ) {
1014991 item . cancel ( ) ;
1015- } else if ( item . t === "remote" ) {
1016- void showAndLogInformationMessage (
1017- "Cancelling variant analysis. This may take a while." ,
1018- ) ;
1019- await cancelRemoteQuery ( this . app . credentials , item . remoteQuery ) ;
1020992 } else if ( item . t === "variant-analysis" ) {
1021993 await commands . executeCommand (
1022994 "codeQL.cancelVariantAnalysis" ,
@@ -1239,10 +1211,8 @@ export class QueryHistoryManager extends DisposableObject {
12391211 return ;
12401212 }
12411213
1242- // Remote queries and variant analysis only
1243- if ( finalSingleItem . t === "remote" ) {
1244- // Do nothing. TODO: Remove this case once remote queries are removed.
1245- } else if ( finalSingleItem . t === "variant-analysis" ) {
1214+ // Variant analysis only
1215+ if ( finalSingleItem . t === "variant-analysis" ) {
12461216 await commands . executeCommand (
12471217 "codeQL.exportVariantAnalysisResults" ,
12481218 finalSingleItem . variantAnalysis . id ,
@@ -1475,8 +1445,6 @@ the file in the file explorer and dragging it into the workspace.`,
14751445 WebviewReveal . Forced ,
14761446 false ,
14771447 ) ;
1478- } else if ( item . t === "remote" ) {
1479- // Do nothing. TODO: Remove when remote queries is no longer supported.
14801448 } else if ( item . t === "variant-analysis" ) {
14811449 await this . variantAnalysisManager . showView ( item . variantAnalysis . id ) ;
14821450 } else {
0 commit comments