CUA feature - support drag action (#2160)

This commit is contained in:
Shuchang Zheng
2025-04-15 19:07:37 -07:00
committed by GitHub
parent 5c73064638
commit f6d755da6b
3 changed files with 52 additions and 0 deletions

View File

@@ -32,6 +32,7 @@ class ActionType(StrEnum):
KEYPRESS = "keypress"
TYPE = "type"
MOVE = "move"
DRAG = "drag"
def is_web_action(self) -> bool:
return self in [
@@ -285,6 +286,13 @@ class MoveAction(Action):
y: int
class DragAction(Action):
action_type: ActionType = ActionType.DRAG
start_x: int
start_y: int
path: list[tuple[int, int]] = []
class ScrapeResult(BaseModel):
"""
Scraped response from a webpage, including: