mirror of
https://github.com/microsoft/vscode-extension-samples.git
synced 2026-06-13 07:10:26 +08:00
mcp: adopt finalized api (#1185)
This commit is contained in:
@ -1,7 +1,4 @@
|
||||
{
|
||||
"enabledApiProposals": [
|
||||
"mcpConfigurationProvider"
|
||||
],
|
||||
"name": "mcp-extension-sample",
|
||||
"displayName": "mcp-extension-sample",
|
||||
"description": "Sample showing how to use Proposed API",
|
||||
@ -11,7 +8,7 @@
|
||||
"license": "MIT",
|
||||
"repository": "https://github.com/Microsoft/vscode-extension-samples",
|
||||
"engines": {
|
||||
"vscode": "^1.99.0"
|
||||
"vscode": "^1.101.0"
|
||||
},
|
||||
"categories": [
|
||||
"Other"
|
||||
@ -28,7 +25,7 @@
|
||||
"title": "MCP Extension Sample: Remove Gist Source"
|
||||
}
|
||||
],
|
||||
"modelContextServerCollections": [
|
||||
"mcpServerDefinitionProviders": [
|
||||
{
|
||||
"id": "exampleGist",
|
||||
"label": "Github Gists"
|
||||
|
||||
@ -31,7 +31,7 @@ export function activate(context: vscode.ExtensionContext) {
|
||||
}));
|
||||
|
||||
context.subscriptions.push(vscode.lm.registerMcpServerDefinitionProvider('exampleGist', {
|
||||
onDidChangeServerDefinitions: didChangeEmitter.event,
|
||||
onDidChangeMcpServerDefinitions: didChangeEmitter.event,
|
||||
provideMcpServerDefinitions: async () => {
|
||||
let output: vscode.McpServerDefinition[] = [];
|
||||
await Promise.all(gists.map(g => fetchGistContents(g).then(content => {
|
||||
|
||||
Reference in New Issue
Block a user