mirror of
https://github.com/microsoft/vscode.git
synced 2025-12-20 02:08:47 +00:00
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:
committed by
GitHub
parent
92fe345bb1
commit
b01211dec2
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user