From e2dcfde867f10c6dfec331dd2b7e7354cc4c077e Mon Sep 17 00:00:00 2001 From: webbrain-one <295484252+webbrain-one@users.noreply.github.com> Date: Sat, 8 Aug 2026 21:02:42 +0300 Subject: [PATCH] Fix click execution logic in ActionDecision Resolves issue where the AI agent fails to click on elements like Ant Forest after successfully locating them. Improves click handling to ensure the action is performed correctly on the target UI component. --- .../src/main/java/com/silentauto/shell/ActionDecision.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/android-shell/src/main/java/com/silentauto/shell/ActionDecision.java b/android-shell/src/main/java/com/silentauto/shell/ActionDecision.java index af7b4e0..ed779aa 100644 --- a/android-shell/src/main/java/com/silentauto/shell/ActionDecision.java +++ b/android-shell/src/main/java/com/silentauto/shell/ActionDecision.java @@ -72,7 +72,7 @@ static ActionDecision fromTool(AiClient.ToolCall call) { } else if ("tap_target".equals(name)) { decision.action = "tap_target"; decision.targetIndex = integer(args, "targetIndex", 0); - } else if ("tap".equals(name)) { + } else if ("tap".equals(name) || "click".equals(name)) { decision.action = "tap"; decision.x = integer(args, "x", 0); decision.y = integer(args, "y", 0); @@ -153,6 +153,8 @@ static ActionDecision from(String raw) { decision.action = "key"; } else if ("finish".equals(decision.action)) { decision.action = "done"; + } else if ("click".equals(decision.action)) { + decision.action = "tap"; } decision.reason = string(object, "reason"); decision.text = string(object, "text");