Add tool for searching settings UI (#274920)

* Add tool for searching settings UI

Since the input box is a monaco editor, it struggles.

* push
This commit is contained in:
Tyler James Leonhardt
2025-11-03 16:28:26 -08:00
committed by GitHub
parent 92fe345bb1
commit b01211dec2

View File

@@ -97,24 +97,24 @@ export function applySettingsTools(server: McpServer, appService: ApplicationSer
// }
// );
// Playwright can probably figure this one out
// server.tool(
// 'vscode_automation_settings_search_ui',
// 'Search for settings in the settings UI',
// {
// query: z.string().describe('Search query for settings')
// },
// async (args) => {
// const { query } = args;
// await app.workbench.settingsEditor.searchSettingsUI(query);
// return {
// content: [{
// type: 'text' as const,
// text: `Searched settings UI for: "${query}"`
// }]
// };
// }
// );
tools.push(server.tool(
'vscode_automation_settings_search_ui',
'Search for settings in the settings UI',
{
query: z.string().describe('Search query for settings')
},
async (args) => {
const { query } = args;
const app = await appService.getOrCreateApplication();
await app.workbench.settingsEditor.searchSettingsUI(query);
return {
content: [{
type: 'text' as const,
text: `Searched settings UI for: "${query}"`
}]
};
}
));
return tools;
}