mirror of
https://github.com/microsoft/vscode.git
synced 2026-05-20 23:29:57 +01:00
333d9a4053
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
32 lines
1.1 KiB
TypeScript
32 lines
1.1 KiB
TypeScript
/*---------------------------------------------------------------------------------------------
|
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
* Licensed under the MIT License. See License.txt in the project root for license information.
|
|
*--------------------------------------------------------------------------------------------*/
|
|
|
|
import * as mobx from 'mobx';
|
|
import { ObservablePromise } from '../utils/utils';
|
|
import { SimulationRunsProvider } from './simulationBaseline';
|
|
import { SimulationRunner, TestRuns } from './simulationRunner';
|
|
|
|
/**
|
|
* Provides the current selected baseline (resolved with test runs info)
|
|
*/
|
|
|
|
export class ResolvedSimulationRun {
|
|
|
|
@mobx.computed
|
|
public get runs(): ObservablePromise<TestRuns[]> {
|
|
const outputFolderName = this.simulationRunsProvider.selectedBaselineRun?.name ?? '';
|
|
if (!outputFolderName) {
|
|
return ObservablePromise.resolve([]);
|
|
}
|
|
return new ObservablePromise(SimulationRunner.readFromPreviousRun(outputFolderName), []);
|
|
}
|
|
|
|
constructor(
|
|
private readonly simulationRunsProvider: SimulationRunsProvider
|
|
) {
|
|
mobx.makeObservable(this);
|
|
}
|
|
}
|