Path: blob/main/test/mcp/src/automationTools/keybindings.ts
3520 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 { McpServer, RegisteredTool } from '@modelcontextprotocol/sdk/server/mcp.js';6import { ApplicationService } from '../application';78/**9* Keybindings Editor Tools10*/11export function applyKeybindingsTools(server: McpServer, appService: ApplicationService): RegisteredTool[] {12const tools: RegisteredTool[] = [];1314// Seems too niche15// server.tool(16// 'vscode_automation_keybindings_update',17// 'Update a keybinding for a specific command',18// {19// command: z.string().describe('Command ID to update keybinding for'),20// commandName: z.string().optional().describe('Optional command display name'),21// keybinding: z.string().describe('New keybinding (e.g., "ctrl+k ctrl+c")'),22// keybindingTitle: z.string().describe('Display title for the keybinding')23// },24// async (args) => {25// const { command, commandName, keybinding, keybindingTitle } = args;26// await app.workbench.keybindingsEditor.updateKeybinding(command, commandName, keybinding, keybindingTitle);27// return {28// content: [{29// type: 'text' as const,30// text: `Updated keybinding for "${command}"${commandName ? ` (${commandName})` : ''}: ${keybinding} (${keybindingTitle})`31// }]32// };33// }34// );3536return tools;37}383940