From a7263f579b292e11ff594bafcc54d1c31e0a7482 Mon Sep 17 00:00:00 2001 From: Shuchang Zheng Date: Wed, 30 Apr 2025 22:13:50 -0700 Subject: [PATCH] anthropic CUA - support right_click (#2267) --- skyvern/webeye/actions/parse_actions.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/skyvern/webeye/actions/parse_actions.py b/skyvern/webeye/actions/parse_actions.py index d1240802..935104ab 100644 --- a/skyvern/webeye/actions/parse_actions.py +++ b/skyvern/webeye/actions/parse_actions.py @@ -420,7 +420,7 @@ async def parse_anthropic_actions( tool_call_id=tool_call_id, ) ) - elif action in ["left_click", "double_click", "triple_click"]: + elif action in ["left_click", "double_click", "triple_click", "right_click"]: coordinate = tool_call_input.get("coordinate") if not coordinate and idx - 1 >= 0: prev_tool_call = tool_calls[idx - 1] @@ -446,12 +446,15 @@ async def parse_anthropic_actions( response = f"Click at: ({x}, {y})" reasoning = reasoning or response + button = "left" + if action == "right_click": + button = "right" actions.append( ClickAction( element_id="", x=x, y=y, - button="left", + button=button, repeat=repeat, reasoning=reasoning, intention=reasoning,