Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
microsoft
GitHub Repository: microsoft/vscode
Path: blob/main/test/mcp/src/automationTools/keybindings.ts
3520 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 { McpServer, RegisteredTool } from '@modelcontextprotocol/sdk/server/mcp.js';
7
import { ApplicationService } from '../application';
8
9
/**
10
* Keybindings Editor Tools
11
*/
12
export function applyKeybindingsTools(server: McpServer, appService: ApplicationService): RegisteredTool[] {
13
const tools: RegisteredTool[] = [];
14
15
// Seems too niche
16
// server.tool(
17
// 'vscode_automation_keybindings_update',
18
// 'Update a keybinding for a specific command',
19
// {
20
// command: z.string().describe('Command ID to update keybinding for'),
21
// commandName: z.string().optional().describe('Optional command display name'),
22
// keybinding: z.string().describe('New keybinding (e.g., "ctrl+k ctrl+c")'),
23
// keybindingTitle: z.string().describe('Display title for the keybinding')
24
// },
25
// async (args) => {
26
// const { command, commandName, keybinding, keybindingTitle } = args;
27
// await app.workbench.keybindingsEditor.updateKeybinding(command, commandName, keybinding, keybindingTitle);
28
// return {
29
// content: [{
30
// type: 'text' as const,
31
// text: `Updated keybinding for "${command}"${commandName ? ` (${commandName})` : ''}: ${keybinding} (${keybindingTitle})`
32
// }]
33
// };
34
// }
35
// );
36
37
return tools;
38
}
39
40