@@ -21,7 +21,6 @@ import {
2121} from "./markdown-generation" ;
2222import { pluralize } from "../pure/word" ;
2323import { VariantAnalysisManager } from "./variant-analysis-manager" ;
24- import { assertNever } from "../pure/helpers-pure" ;
2524import {
2625 VariantAnalysis ,
2726 VariantAnalysisScannedRepository ,
@@ -37,24 +36,20 @@ import { Credentials } from "../common/authentication";
3736/**
3837 * Exports the results of the currently-selected remote query or variant analysis.
3938 */
40- export async function exportSelectedRemoteQueryResults (
39+ export async function exportSelectedVariantAnalysisResults (
4140 queryHistoryManager : QueryHistoryManager ,
4241) : Promise < void > {
4342 const queryHistoryItem = queryHistoryManager . getCurrentQueryHistoryItem ( ) ;
44- if ( ! queryHistoryItem || queryHistoryItem . t === "local ") {
43+ if ( ! queryHistoryItem || queryHistoryItem . t !== "variant-analysis ") {
4544 throw new Error (
4645 "No variant analysis results currently open. To open results, click an item in the query history view." ,
4746 ) ;
4847 }
4948
50- if ( queryHistoryItem . t === "variant-analysis" ) {
51- return commands . executeCommand (
52- "codeQL.exportVariantAnalysisResults" ,
53- queryHistoryItem . variantAnalysis . id ,
54- ) ;
55- } else {
56- assertNever ( queryHistoryItem ) ;
57- }
49+ return commands . executeCommand (
50+ "codeQL.exportVariantAnalysisResults" ,
51+ queryHistoryItem . variantAnalysis . id ,
52+ ) ;
5853}
5954
6055const MAX_VARIANT_ANALYSIS_EXPORT_PROGRESS_STEPS = 2 ;
0 commit comments