11import { CancellationTokenSource , env } from "vscode" ;
22
33import * as messages from "./query-server/messages-shared" ;
4- import * as legacyMessages from "./query-server/legacy-messages" ;
54import * as cli from "./codeql-cli/cli" ;
65import { pathExists } from "fs-extra" ;
76import { basename } from "path" ;
@@ -23,7 +22,6 @@ import {
2322 QueryWithResults ,
2423} from "./run-queries-shared" ;
2524import { sarifParser } from "./common/sarif-parser" ;
26- import { formatLegacyMessage } from "./query-server/format-legacy-message" ;
2725
2826/**
2927 * query-results.ts
@@ -54,14 +52,9 @@ export interface InitialQueryInfo {
5452export class CompletedQueryInfo implements QueryWithResults {
5553 constructor (
5654 public readonly query : QueryEvaluationInfo ,
57-
58- /**
59- * The legacy result. This is only set when loading from the query history.
60- */
61- public readonly result : legacyMessages . EvaluationResult ,
6255 public readonly logFileLocation : string | undefined ,
63- public readonly successful : boolean | undefined ,
64- public readonly message : string | undefined ,
56+ public readonly successful : boolean ,
57+ public readonly message : string ,
6558 /**
6659 * How we're currently sorting alerts. This is not mere interface
6760 * state due to truncation; on re-sort, we want to read in the file
@@ -82,16 +75,6 @@ export class CompletedQueryInfo implements QueryWithResults {
8275 this . resultCount = value ;
8376 }
8477
85- get statusString ( ) : string {
86- if ( this . message ) {
87- return this . message ;
88- } else if ( this . result ) {
89- return formatLegacyMessage ( this . result ) ;
90- } else {
91- throw new Error ( "No status available" ) ;
92- }
93- }
94-
9578 getResultsPath ( selectedTable : string , useSorted = true ) : string {
9679 if ( ! useSorted ) {
9780 return this . query . resultsPaths . resultsPath ;
@@ -291,7 +274,6 @@ export class LocalQueryInfo {
291274 completeThisQuery ( info : QueryWithResults ) : void {
292275 this . completedQuery = new CompletedQueryInfo (
293276 info . query ,
294- info . result ,
295277 info . query . logPath ,
296278 info . successful ,
297279 info . message ,
0 commit comments