Skip to content

Commit 9533227

Browse files
committed
Scroll has coordinate
1 parent 2d869fc commit 9533227

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

src/generalagents/action.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,7 @@ class ActionDrag:
105105
class ActionScroll:
106106
kind: Literal["scroll"]
107107
scroll_delta: int
108+
coordinate: Coordinate
108109

109110

110111
@dataclass

src/generalagents/macos/computer.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,8 @@ def _execute_action(self, action: Action) -> None:
7676
pyautogui.moveTo(*self._scaled(start))
7777
pyautogui.dragTo(*self._scaled(end), duration=0.5)
7878

79-
case ActionScroll(kind="scroll", scroll_delta=delta):
79+
case ActionScroll(kind="scroll", scroll_delta=delta, coordinate=coord):
80+
pyautogui.moveTo(*self._scaled(coord))
8081
pyautogui.scroll(float(delta * self.scale_factor))
8182

8283
case ActionWait(kind="wait"):

0 commit comments

Comments
 (0)