mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-22 17:48:56 +01:00
mcp: expose MCP server definitions to ext host (#288798)
* Expose MCP server definitions to ext host * Fixes * Update src/vs/workbench/api/common/extHostTypeConverters.ts Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update src/vs/workbench/api/browser/mainThreadMcp.ts Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Address review comments * address review comments * Reuse McpServerDefinition.Serialized instead of custom DTOs (#289165) * Initial plan * Reuse McpServerDefinition.Serialized instead of custom DTO interfaces Co-authored-by: DonJayamanne <1948812+DonJayamanne@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: DonJayamanne <1948812+DonJayamanne@users.noreply.github.com> --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com>
This commit is contained in:
31
src/vscode-dts/vscode.proposed.mcpServerDefinitions.d.ts
vendored
Normal file
31
src/vscode-dts/vscode.proposed.mcpServerDefinitions.d.ts
vendored
Normal file
@@ -0,0 +1,31 @@
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
declare module 'vscode' {
|
||||
|
||||
// https://github.com/microsoft/vscode/issues/288777 @DonJayamanne
|
||||
|
||||
/**
|
||||
* Namespace for language model related functionality.
|
||||
*/
|
||||
export namespace lm {
|
||||
/**
|
||||
* All MCP server definitions known to the editor. This includes
|
||||
* servers defined in user and workspace mcp.json files as well as those
|
||||
* provided by extensions.
|
||||
*
|
||||
* Consumers should listen to {@link onDidChangeMcpServerDefinitions} and
|
||||
* re-read this property when it fires.
|
||||
*/
|
||||
export const mcpServerDefinitions: readonly McpServerDefinition[];
|
||||
|
||||
/**
|
||||
* Event that fires when the set of MCP server definitions changes.
|
||||
* This can be due to additions, deletions, or modifications of server
|
||||
* definitions from any source.
|
||||
*/
|
||||
export const onDidChangeMcpServerDefinitions: Event<void>;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user