@@ -4,7 +4,6 @@ import type { DatabaseItem } from "../databases/local-databases";
44import type { ModelEvaluationRun } from "./model-evaluation-run" ;
55import { DisposableObject } from "../common/disposable-object" ;
66import type { ModelEvaluationRunState } from "./shared/model-evaluation-run-state" ;
7- import type { BaseLogger } from "../common/logging" ;
87import type { CodeQLCliServer } from "../codeql-cli/cli" ;
98import type { VariantAnalysisManager } from "../variant-analysis/variant-analysis-manager" ;
109import type { QueryLanguage } from "../common/query-language" ;
@@ -18,6 +17,8 @@ import type { VariantAnalysis } from "../variant-analysis/shared/variant-analysi
1817import type { CancellationToken } from "vscode" ;
1918import { CancellationTokenSource } from "vscode" ;
2019import type { QlPackDetails } from "../variant-analysis/ql-pack-details" ;
20+ import type { App } from "../common/app" ;
21+ import { ModelAlertsView } from "./model-alerts/model-alerts-view" ;
2122
2223export class ModelEvaluator extends DisposableObject {
2324 // Cancellation token source to allow cancelling of the current run
@@ -26,7 +27,7 @@ export class ModelEvaluator extends DisposableObject {
2627 private cancellationSource : CancellationTokenSource ;
2728
2829 public constructor (
29- private readonly logger : BaseLogger ,
30+ private readonly app : App ,
3031 private readonly cliServer : CodeQLCliServer ,
3132 private readonly modelingStore : ModelingStore ,
3233 private readonly modelingEvents : ModelingEvents ,
@@ -54,7 +55,7 @@ export class ModelEvaluator extends DisposableObject {
5455
5556 // Build pack
5657 const qlPack = await resolveCodeScanningQueryPack (
57- this . logger ,
58+ this . app . logger ,
5859 this . cliServer ,
5960 this . language ,
6061 ) ;
@@ -82,7 +83,7 @@ export class ModelEvaluator extends DisposableObject {
8283 public async stopEvaluation ( ) {
8384 const evaluationRun = this . modelingStore . getModelEvaluationRun ( this . dbItem ) ;
8485 if ( ! evaluationRun ) {
85- void this . logger . log ( "No active evaluation run to stop" ) ;
86+ void this . app . logger . log ( "No active evaluation run to stop" ) ;
8687 return ;
8788 }
8889
@@ -105,6 +106,11 @@ export class ModelEvaluator extends DisposableObject {
105106 }
106107 }
107108
109+ public async openModelAlertsView ( ) {
110+ const view = new ModelAlertsView ( this . app ) ;
111+ await view . showView ( ) ;
112+ }
113+
108114 private registerToModelingEvents ( ) {
109115 this . push (
110116 this . modelingEvents . onModelEvaluationRunChanged ( async ( event ) => {
0 commit comments