@@ -49,6 +49,7 @@ import EvalLogTreeBuilder from './eval-log-tree-builder';
4949import { EvalLogData , parseViewerData } from './pure/log-summary-parser' ;
5050import { QueryWithResults } from './run-queries-shared' ;
5151import { QueryRunner } from './queryRunner' ;
52+ import { VariantAnalysisManager } from './remote-queries/variant-analysis-manager' ;
5253
5354/**
5455 * query-history.ts
@@ -342,6 +343,7 @@ export class QueryHistoryManager extends DisposableObject {
342343 private readonly dbm : DatabaseManager ,
343344 private readonly localQueriesResultsView : ResultsView ,
344345 private readonly remoteQueriesManager : RemoteQueriesManager ,
346+ private readonly variantAnalysisManager : VariantAnalysisManager ,
345347 private readonly evalLogViewer : EvalLogViewer ,
346348 private readonly queryStorageDir : string ,
347349 private readonly ctx : ExtensionContext ,
@@ -564,6 +566,7 @@ export class QueryHistoryManager extends DisposableObject {
564566
565567 this . registerQueryHistoryScrubber ( queryHistoryConfigListener , this , ctx ) ;
566568 this . registerToRemoteQueriesEvents ( ) ;
569+ this . registerToVariantAnalysisEvents ( ) ;
567570 }
568571
569572 public completeQuery ( info : LocalQueryInfo , results : QueryWithResults ) : void {
@@ -593,6 +596,21 @@ export class QueryHistoryManager extends DisposableObject {
593596 ) ;
594597 }
595598
599+ private registerToVariantAnalysisEvents ( ) {
600+ const variantAnalysisAddedSubscription = this . variantAnalysisManager . onVariantAnalysisAdded ( async ( variantAnalysis ) => {
601+ this . addQuery ( {
602+ t : 'variant-analysis' ,
603+ status : QueryStatus . InProgress ,
604+ completed : false ,
605+ variantAnalysis,
606+ } ) ;
607+
608+ await this . refreshTreeView ( ) ;
609+ } ) ;
610+
611+ this . push ( variantAnalysisAddedSubscription ) ;
612+ }
613+
596614 private registerToRemoteQueriesEvents ( ) {
597615 const queryAddedSubscription = this . remoteQueriesManager . onRemoteQueryAdded ( async ( event ) => {
598616 this . addQuery ( {
0 commit comments