chore: turn vision into capability (#679)

Fixes https://github.com/microsoft/playwright-mcp/issues/420
This commit is contained in:
Pavel Feldman 2025-07-16 16:40:00 -07:00 committed by GitHub
parent 012c906500
commit d61aa16fee
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
23 changed files with 366 additions and 575 deletions

View file

@ -15,9 +15,9 @@
*/
import { z } from 'zod';
import { defineTool, type ToolFactory } from './tool.js';
import { defineTool } from './tool.js';
const handleDialog: ToolFactory = captureSnapshot => defineTool({
const handleDialog = defineTool({
capability: 'core',
schema: {
@ -49,7 +49,7 @@ const handleDialog: ToolFactory = captureSnapshot => defineTool({
return {
code,
captureSnapshot,
captureSnapshot: true,
waitForNetwork: false,
};
},
@ -57,6 +57,6 @@ const handleDialog: ToolFactory = captureSnapshot => defineTool({
clearsModalState: 'dialog',
});
export default (captureSnapshot: boolean) => [
handleDialog(captureSnapshot),
export default [
handleDialog,
];