feat(agent): resolve visual targets to semantic refs before coordinate fallback - #2747
feat(agent): resolve visual targets to semantic refs before coordinate fallback#2747feiniao87968492 wants to merge 1 commit into
Conversation
Co-Authored-By: Claude <noreply@anthropic.com>
|
@feiniao87968492 is attempting to deploy a commit to the esokullu's projects Team on Vercel. A member of the Team first needs to authorize it. |
|
thank you. here's the inspection results: It genuinely helps when a visual point lands on an SVG/icon inside a button or inside open shadow DOM. Converting that point into a stable But exposing it as another LLM tool creates avoidable overhead:
The extra inference turn is the real cost—not the schema tokens. There are also limits hidden by the wording: it does not find the “nearest” target. It only checks the exact hit element and its composed ancestors. It won’t semantically recover many near misses, associated label/input siblings, iframe contents, or canvas controls. The existing coordinate-click path already performs screenshot scaling, form/select handling, label/input redirection, trusted CDP dispatch, and progress verification in agent.js (line 16800). My recommendation:
That gets almost all the benefit with no new tool choice and no additional LLM round trip. If internal integration proves too invasive, second-best is exposing the resolver only dynamically after a visual inspection—not in every Act tool catalog. The fixtures are good mechanical tests, but I’d also want a small model-level evaluation comparing success rate, latency, tool calls, and tokens across nested SVG, shadow DOM, canvas, iframe, label/input, and dynamic rerender cases. |
|
Thank you for your guidance!I'll make corrections in this direction |
Summary
resolve_visual_target({ x, y, from_screenshot })agent toolTesting
node test/run.js— 1622 passed, 0 failednpm test— passed before rebasing onto the latest upstream maingit diff --check— passed🤖 Generated with Claude Code