Path: blob/main/src/vs/workbench/contrib/mcp/test/common/testMcpService.ts
5310 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 { observableValue } from '../../../../../base/common/observable.js';6import { IAutostartResult, IMcpServer, IMcpService, LazyCollectionState } from '../../common/mcpTypes.js';78export class TestMcpService implements IMcpService {9declare readonly _serviceBrand: undefined;10public servers = observableValue<readonly IMcpServer[]>(this, []);11resetCaches(): void {1213}14resetTrust(): void {1516}1718cancelAutostart(): void {1920}2122autostart() {23return observableValue<IAutostartResult>(this, { working: false, starting: [], serversRequiringInteraction: [] });24}2526public lazyCollectionState = observableValue(this, { state: LazyCollectionState.AllKnown, collections: [] });2728activateCollections(): Promise<void> {29return Promise.resolve();30}31}323334