Path: blob/main/extensions/copilot/test/simulation/workbench/stores/runnerOptions.ts
13399 views
/*---------------------------------------------------------------------------------------------1* Copyright (c) Microsoft Corporation. All rights reserved.2* Licensed under the MIT License. See License.txt in the project root for license information.3*--------------------------------------------------------------------------------------------*/45import * as mobx from 'mobx';6import { SimulationStorage, SimulationStorageValue } from './simulationStorage';78export enum CacheMode {9Disable = 'disable', // never use the cache, don't update the cache10Require = 'require', // always use the cache, and fail if it's not available11Default = 'default', // use cache of available, but don't require it12Regenerate = 'regenerate', // regenerate the cache even if cache files are available13}1415export class RunnerOptions {16public readonly grep: SimulationStorageValue<string>;1718public readonly cacheMode: SimulationStorageValue<CacheMode>;1920public readonly noFetch: SimulationStorageValue<boolean>;2122public readonly n: SimulationStorageValue<string>;2324public readonly additionalArgs: SimulationStorageValue<string>;2526constructor(storage: SimulationStorage) {27this.grep = new SimulationStorageValue(storage, 'grep', '');28this.cacheMode = new SimulationStorageValue(storage, 'cacheMode', CacheMode.Default);29this.noFetch = new SimulationStorageValue(storage, 'noFetch', false);30this.n = new SimulationStorageValue(storage, 'n', '');31this.additionalArgs = new SimulationStorageValue(storage, 'additionalArgs', '');32mobx.makeObservable(this);33}34}353637