1- import { ViewColumn } from "vscode" ;
1+ import { Uri , ViewColumn } from "vscode" ;
22import type { WebviewPanelConfig } from "../../common/vscode/abstract-webview" ;
33import { AbstractWebview } from "../../common/vscode/abstract-webview" ;
44import { assertNever } from "../../common/helpers-pure" ;
@@ -15,6 +15,7 @@ import type { ModelingEvents } from "../modeling-events";
1515import type { ModelingStore } from "../modeling-store" ;
1616import type { DatabaseItem } from "../../databases/local-databases" ;
1717import type { ExtensionPack } from "../shared/extension-pack" ;
18+ import type { VariantAnalysis } from "../../variant-analysis/shared/variant-analysis" ;
1819
1920export class ModelAlertsView extends AbstractWebview <
2021 ToModelAlertsMessage ,
@@ -34,12 +35,17 @@ export class ModelAlertsView extends AbstractWebview<
3435 this . registerToModelingEvents ( ) ;
3536 }
3637
37- public async showView ( ) {
38+ public async showView ( variantAnalysis : VariantAnalysis ) {
3839 const panel = await this . getPanel ( ) ;
3940 panel . reveal ( undefined , true ) ;
4041
4142 await this . waitForPanelLoaded ( ) ;
4243 await this . setViewState ( ) ;
44+
45+ await this . postMessage ( {
46+ t : "setVariantAnalysis" ,
47+ variantAnalysis,
48+ } ) ;
4349 }
4450
4551 protected async getPanelConfig ( ) : Promise < WebviewPanelConfig > {
@@ -73,6 +79,9 @@ export class ModelAlertsView extends AbstractWebview<
7379 ) `Unhandled error in model alerts view: ${ msg . error . message } ` ,
7480 ) ;
7581 break ;
82+ case "openModelPack" :
83+ await this . app . commands . execute ( "revealInExplorer" , Uri . file ( msg . path ) ) ;
84+ break ;
7685 default :
7786 assertNever ( msg ) ;
7887 }
0 commit comments