Skip to content

Commit 9128c67

Browse files
authored
fix: set scroll args back to required (#180)
1 parent e8d243e commit 9128c67

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

src/helpers/rpc/performAction.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ function createOperateTool(
140140
console.log("operateTool", action);
141141
switch (action.name) {
142142
case "scroll":
143-
await scroll(domActions, action?.args?.value ?? "down");
143+
await scroll(domActions, action.args.value);
144144
break;
145145
case "wait":
146146
await sleep(3000);

src/helpers/vision-agent/tools.ts

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -55,11 +55,9 @@ export const scrollSchema = z.object({
5555
'Scroll the page to see the other parts. Use "up" or "down" to scroll 2/3 of height of the window. Use "top" or "bottom" to quickly scroll to the top or bottom of the page.',
5656
)
5757
.optional(),
58-
args: z
59-
.object({
60-
value: z.string(),
61-
})
62-
.optional(),
58+
args: z.object({
59+
value: z.string(),
60+
}),
6361
});
6462

6563
export const waitSchema = z.object({

0 commit comments

Comments
 (0)