Skip to content

armgit / cua

Public Imported from GitHub
0

Scale computer-use 2.0 with open-source drivers, cross-OS sandboxes, and benchmarks for training, evaluation, and data generation.

Change anthropic predict_click logic

Dillon DuPontc892f4ecea80
diff --git a/libs/python/agent/agent/loops/anthropic.py b/libs/python/agent/agent/loops/anthropic.py
index cd616d385f..ec25250e12 100644
--- a/libs/python/agent/agent/loops/anthropic.py
+++ b/libs/python/agent/agent/loops/anthropic.py
@@ -1577,11 +1577,10 @@ Task: Click {instruction}. Output ONLY a click action on the target element."""
isinstance(item.get("action"), dict)):
action = item["action"]
- if action.get("type") == "click":
+ if action.get("x") and action.get("y"):
x = action.get("x")
y = action.get("y")
- if x is not None and y is not None:
- return (int(x), int(y))
+ return (int(x), int(y))
return None