Skip to content

Commit

Permalink
fix: set scroll args back to required (#180)
Browse files Browse the repository at this point in the history
  • Loading branch information
mondaychen authored May 28, 2024
1 parent e8d243e commit 9128c67
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/helpers/rpc/performAction.ts
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ function createOperateTool(
console.log("operateTool", action);
switch (action.name) {
case "scroll":
await scroll(domActions, action?.args?.value ?? "down");
await scroll(domActions, action.args.value);
break;
case "wait":
await sleep(3000);
Expand Down
8 changes: 3 additions & 5 deletions src/helpers/vision-agent/tools.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,9 @@ export const scrollSchema = z.object({
'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.',
)
.optional(),
args: z
.object({
value: z.string(),
})
.optional(),
args: z.object({
value: z.string(),
}),
});

export const waitSchema = z.object({
Expand Down

0 comments on commit 9128c67

Please sign in to comment.