Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
microsoft
GitHub Repository: microsoft/vscode
Path: blob/main/src/vs/workbench/contrib/mcp/test/common/testMcpService.ts
5310 views
1
/*---------------------------------------------------------------------------------------------
2
* Copyright (c) Microsoft Corporation. All rights reserved.
3
* Licensed under the MIT License. See License.txt in the project root for license information.
4
*--------------------------------------------------------------------------------------------*/
5
6
import { observableValue } from '../../../../../base/common/observable.js';
7
import { IAutostartResult, IMcpServer, IMcpService, LazyCollectionState } from '../../common/mcpTypes.js';
8
9
export class TestMcpService implements IMcpService {
10
declare readonly _serviceBrand: undefined;
11
public servers = observableValue<readonly IMcpServer[]>(this, []);
12
resetCaches(): void {
13
14
}
15
resetTrust(): void {
16
17
}
18
19
cancelAutostart(): void {
20
21
}
22
23
autostart() {
24
return observableValue<IAutostartResult>(this, { working: false, starting: [], serversRequiringInteraction: [] });
25
}
26
27
public lazyCollectionState = observableValue(this, { state: LazyCollectionState.AllKnown, collections: [] });
28
29
activateCollections(): Promise<void> {
30
return Promise.resolve();
31
}
32
}
33
34