You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: packages/playwright-core/ThirdPartyNotices.txt
+3-3Lines changed: 3 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,7 @@ THIRD-PARTY SOFTWARE NOTICES AND INFORMATION
4
4
5
5
This project incorporates components from the projects listed below. The original copyright notices and the licenses under which Microsoft received such components are set forth below. Microsoft reserves all rights not expressly granted herein, whether by implication, estoppel or otherwise.
Copy file name to clipboardExpand all lines: packages/playwright-core/src/server/agent/tools.ts
+8-4Lines changed: 8 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -35,20 +35,24 @@ function defineTool<Input extends zod.Schema>(tool: ToolDefinition<Input>): Tool
35
35
returntool;
36
36
}
37
37
38
+
constbaseSchema=z.object({
39
+
thatShouldBeIt: z.boolean().describe('Indicates that this tool call is sufficient to complete the task. If false, the task will continue with the next tool call'),
40
+
});
41
+
38
42
constsnapshot=defineTool({
39
43
schema: {
40
44
name: 'browser_snapshot',
41
45
title: 'Page snapshot',
42
46
description: 'Capture accessibility snapshot of the current page, this is better than screenshot',
43
-
inputSchema: z.object({}),
47
+
inputSchema: baseSchema,
44
48
},
45
49
46
50
handle: async(context,params)=>{
47
51
returnawaitcontext.snapshotResult();
48
52
},
49
53
});
50
54
51
-
constelementSchema=z.object({
55
+
constelementSchema=baseSchema.extend({
52
56
element: z.string().describe('Human-readable element description used to obtain permission to interact with the element'),
53
57
ref: z.string().describe('Exact target element reference from the page snapshot'),
54
58
});
@@ -86,7 +90,7 @@ const drag = defineTool({
86
90
name: 'browser_drag',
87
91
title: 'Drag mouse',
88
92
description: 'Perform drag and drop between two elements',
89
-
inputSchema: z.object({
93
+
inputSchema: baseSchema.extend({
90
94
startElement: z.string().describe('Human-readable source element description used to obtain the permission to interact with the element'),
91
95
startRef: z.string().describe('Exact source element reference from the page snapshot'),
92
96
endElement: z.string().describe('Human-readable target element description used to obtain the permission to interact with the element'),
@@ -211,7 +215,7 @@ const fillForm = defineTool({
211
215
name: 'browser_fill_form',
212
216
title: 'Fill form',
213
217
description: 'Fill multiple form fields',
214
-
inputSchema: z.object({
218
+
inputSchema: baseSchema.extend({
215
219
fields: z.array(z.object({
216
220
name: z.string().describe('Human-readable field name'),
217
221
type: z.enum(['textbox','checkbox','radio','combobox','slider']).describe('Type of the field'),
Copy file name to clipboardExpand all lines: tests/library/perform-task.spec.ts-cache.json
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
{
2
2
"Enter x-secret-email into the email field": {
3
-
"timestamp": 1765318973255,
3
+
"timestamp": 1765340032886,
4
4
"actions": [
5
5
{
6
6
"method": "fill",
@@ -10,7 +10,7 @@
10
10
]
11
11
},
12
12
"Fill out the form with the following details:\nName: John Smith\nAddress: 1045 La Avenida St, Mountain View, CA 94043\nEmail: john.smith@at-microsoft.com": {
0 commit comments