@@ -35,7 +35,6 @@ import { CodeQLCliServer } from "./cli";
3535import {
3636 CliConfigListener ,
3737 DistributionConfigListener ,
38- isCanary ,
3938 joinOrderWarningThreshold ,
4039 MAX_QUERIES ,
4140 QueryHistoryConfigListener ,
@@ -110,10 +109,7 @@ import {
110109 handleInstallPackDependencies ,
111110} from "./packaging" ;
112111import { HistoryItemLabelProvider } from "./query-history/history-item-label-provider" ;
113- import {
114- exportSelectedVariantAnalysisResults ,
115- exportVariantAnalysisResults ,
116- } from "./variant-analysis/export-results" ;
112+ import { exportSelectedVariantAnalysisResults } from "./variant-analysis/export-results" ;
117113import { EvalLogViewer } from "./eval-log-viewer" ;
118114import { SummaryLanguageSupport } from "./log-insights/summary-language-support" ;
119115import { JoinOrderScannerProvider } from "./log-insights/join-order" ;
@@ -651,7 +647,6 @@ async function activateWithInstalledDistribution(
651647 getContextStoragePath ( ctx ) ,
652648 ctx . extensionPath ,
653649 ) ;
654- databaseUI . init ( ) ;
655650 ctx . subscriptions . push ( databaseUI ) ;
656651
657652 void extLogger . log ( "Initializing evaluator log viewer." ) ;
@@ -1105,6 +1100,8 @@ async function activateWithInstalledDistribution(
11051100 ...getCommands ( ) ,
11061101 ...qhm . getCommands ( ) ,
11071102 ...variantAnalysisManager . getCommands ( ) ,
1103+ ...databaseUI . getCommands ( ) ,
1104+ ...dbModule . getCommands ( ) ,
11081105 } ;
11091106
11101107 for ( const [ commandName , command ] of Object . entries ( allCommands ) ) {
@@ -1157,35 +1154,10 @@ async function activateWithInstalledDistribution(
11571154
11581155 ctx . subscriptions . push (
11591156 commandRunner ( "codeQL.exportSelectedVariantAnalysisResults" , async ( ) => {
1160- await exportSelectedVariantAnalysisResults ( qhm ) ;
1157+ await exportSelectedVariantAnalysisResults ( variantAnalysisManager , qhm ) ;
11611158 } ) ,
11621159 ) ;
11631160
1164- ctx . subscriptions . push (
1165- commandRunnerWithProgress (
1166- "codeQL.exportVariantAnalysisResults" ,
1167- async (
1168- progress : ProgressCallback ,
1169- token : CancellationToken ,
1170- variantAnalysisId : number ,
1171- filterSort ?: RepositoriesFilterSortStateWithIds ,
1172- ) => {
1173- await exportVariantAnalysisResults (
1174- variantAnalysisManager ,
1175- variantAnalysisId ,
1176- filterSort ,
1177- app . credentials ,
1178- progress ,
1179- token ,
1180- ) ;
1181- } ,
1182- {
1183- title : "Exporting variant analysis results" ,
1184- cancellable : true ,
1185- } ,
1186- ) ,
1187- ) ;
1188-
11891161 ctx . subscriptions . push (
11901162 commandRunner (
11911163 "codeQL.loadVariantAnalysisRepoResults" ,
@@ -1261,7 +1233,7 @@ async function activateWithInstalledDistribution(
12611233 commandRunnerWithProgress (
12621234 "codeQL.chooseDatabaseFolder" ,
12631235 ( progress : ProgressCallback , token : CancellationToken ) =>
1264- databaseUI . handleChooseDatabaseFolder ( progress , token ) ,
1236+ databaseUI . chooseDatabaseFolder ( progress , token ) ,
12651237 {
12661238 title : "Choose a Database from a Folder" ,
12671239 } ,
@@ -1271,7 +1243,7 @@ async function activateWithInstalledDistribution(
12711243 commandRunnerWithProgress (
12721244 "codeQL.chooseDatabaseArchive" ,
12731245 ( progress : ProgressCallback , token : CancellationToken ) =>
1274- databaseUI . handleChooseDatabaseArchive ( progress , token ) ,
1246+ databaseUI . chooseDatabaseArchive ( progress , token ) ,
12751247 {
12761248 title : "Choose a Database from an Archive" ,
12771249 } ,
@@ -1281,12 +1253,7 @@ async function activateWithInstalledDistribution(
12811253 commandRunnerWithProgress (
12821254 "codeQL.chooseDatabaseGithub" ,
12831255 async ( progress : ProgressCallback , token : CancellationToken ) => {
1284- const credentials = isCanary ( ) ? app . credentials : undefined ;
1285- await databaseUI . handleChooseDatabaseGithub (
1286- credentials ,
1287- progress ,
1288- token ,
1289- ) ;
1256+ await databaseUI . chooseDatabaseGithub ( progress , token ) ;
12901257 } ,
12911258 {
12921259 title : "Adding database from GitHub" ,
@@ -1297,7 +1264,7 @@ async function activateWithInstalledDistribution(
12971264 commandRunnerWithProgress (
12981265 "codeQL.chooseDatabaseInternet" ,
12991266 ( progress : ProgressCallback , token : CancellationToken ) =>
1300- databaseUI . handleChooseDatabaseInternet ( progress , token ) ,
1267+ databaseUI . chooseDatabaseInternet ( progress , token ) ,
13011268
13021269 {
13031270 title : "Adding database from URL" ,
0 commit comments