@@ -12,7 +12,8 @@ import * as helpers from './helpers';
1212import { spawnIdeServer } from './ide-server' ;
1313import { InterfaceManager , WebviewReveal } from './interface' ;
1414import { ideServerLogger , logger , queryServerLogger } from './logging' ;
15- import { compileAndRunQueryAgainstDatabase , EvaluationInfo , tmpDirDisposal , UserCancellationException } from './queries' ;
15+ import { compileAndRunQueryAgainstDatabase , tmpDirDisposal , UserCancellationException } from './run-queries' ;
16+ import { CompletedQuery } from './query-results' ;
1617import { QueryHistoryManager } from './query-history' ;
1718import * as qsClient from './queryserver-client' ;
1819import { CodeQLCliServer } from './cli' ;
@@ -254,14 +255,14 @@ async function activateWithInstalledDistribution(ctx: ExtensionContext, distribu
254255 const qhm = new QueryHistoryManager (
255256 ctx ,
256257 queryHistoryConfigurationListener ,
257- async item => showResultsForInfo ( item . info , WebviewReveal . Forced )
258+ async item => showResultsForCompletedQuery ( item , WebviewReveal . Forced )
258259 ) ;
259260 const intm = new InterfaceManager ( ctx , dbm , cliServer , queryServerLogger ) ;
260261 ctx . subscriptions . push ( intm ) ;
261262 archiveFilesystemProvider . activate ( ctx ) ;
262263
263- async function showResultsForInfo ( info : EvaluationInfo , forceReveal : WebviewReveal ) : Promise < void > {
264- await intm . showResults ( info , forceReveal , false ) ;
264+ async function showResultsForCompletedQuery ( query : CompletedQuery , forceReveal : WebviewReveal ) : Promise < void > {
265+ await intm . showResults ( query , forceReveal , false ) ;
265266 }
266267
267268 async function compileAndRunQuery ( quickEval : boolean , selectedQuery : Uri | undefined ) {
@@ -272,8 +273,8 @@ async function activateWithInstalledDistribution(ctx: ExtensionContext, distribu
272273 throw new Error ( 'Can\'t run query without a selected database' ) ;
273274 }
274275 const info = await compileAndRunQueryAgainstDatabase ( cliServer , qs , dbItem , quickEval , selectedQuery ) ;
275- await showResultsForInfo ( info , WebviewReveal . NotForced ) ;
276- qhm . push ( info ) ;
276+ const item = qhm . addQuery ( info ) ;
277+ await showResultsForCompletedQuery ( item , WebviewReveal . NotForced ) ;
277278 }
278279 catch ( e ) {
279280 if ( e instanceof UserCancellationException ) {
0 commit comments