@@ -635,7 +635,7 @@ export class QueryHistoryManager extends DisposableObject {
635635 const variantAnalysisRemovedSubscription = this . variantAnalysisManager . onVariantAnalysisRemoved ( async ( variantAnalysis ) => {
636636 const items = this . treeDataProvider . allHistory . filter ( i => i . t === 'variant-analysis' && i . variantAnalysis . id === variantAnalysis . id ) ;
637637 items . forEach ( async ( item ) => {
638- await this . removeRemoteQuery ( item as RemoteQueryHistoryItem ) ;
638+ await this . removeVariantAnalysis ( item as VariantAnalysisHistoryItem ) ;
639639 } ) ;
640640 } ) ;
641641
@@ -786,7 +786,7 @@ export class QueryHistoryManager extends DisposableObject {
786786 } else if ( item . t === 'remote' ) {
787787 await this . removeRemoteQuery ( item ) ;
788788 } else if ( item . t === 'variant-analysis' ) {
789- // TODO
789+ await this . removeVariantAnalysis ( item ) ;
790790 } else {
791791 assertNever ( item ) ;
792792 }
@@ -812,6 +812,18 @@ export class QueryHistoryManager extends DisposableObject {
812812 await this . remoteQueriesManager . removeRemoteQuery ( item . queryId ) ;
813813 }
814814
815+ private async removeVariantAnalysis ( item : VariantAnalysisHistoryItem ) : Promise < void > {
816+ // We can remove a Variant Analysis locally, but not remotely.
817+ // The user must cancel the query on GitHub Actions explicitly.
818+ this . treeDataProvider . remove ( item ) ;
819+ void logger . log ( `Deleted ${ this . labelProvider . getLabel ( item ) } .` ) ;
820+ if ( item . status === QueryStatus . InProgress ) {
821+ void logger . log ( 'The variant analysis is still running on GitHub Actions. To cancel there, you must go to the workflow run in your browser.' ) ;
822+ }
823+
824+ await this . variantAnalysisManager . removeVariantAnalysis ( item . variantAnalysis ) ;
825+ }
826+
815827 async handleSortByName ( ) {
816828 if ( this . treeDataProvider . sortOrder === SortOrder . NameAsc ) {
817829 this . treeDataProvider . sortOrder = SortOrder . NameDesc ;
0 commit comments