Hmbown/CodeWhale · error
browser action "click" takes selector or point, not both —…
Error message
browser action "click" takes selector or point, not both — pick one target
What it means
resolveTool's browser click case: both a CSS selector and a point {x,y} were given; the two targeting modes are mutually exclusive, and silently picking one would hide an ambiguous call, so it is rejected.
Solutions
- Pass exactly one target: either selector (non-empty CSS string) or point {x,y} with finite coordinates.
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at crates/tui/plugins/computer-use/src/tools.mjs:843 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of Hmbown/CodeWhale@73e0f67d83 (2026-09-22).
Data as JSON: /api/errors/a3bbca3dd3857632.
Report an issue: GitHub.
Appendix: source
Thrown at crates/tui/plugins/computer-use/src/tools.mjs:843
if (repeat != null || target != null) throw bad("key with duration holds the key — repeat and target cannot be combined with it");
if (!Number.isFinite(duration) || duration < 0.05 || duration > 30) throw bad("duration must be 0.05..30 seconds");
return { name: "hold_key", args: { ...rest, duration } };
}
case "browser": {
const rest = { ...args };
delete rest.action;
switch (args.action) {
case "start":
if (rest.url != null && typeof rest.url !== "string") throw bad("browser start url must be a string");
return { name: "browser_start", args: rest };
case "status": return { name: "browser_status", args: rest };
case "navigate":
if (typeof rest.url !== "string" || !rest.url.trim()) throw bad('browser action "navigate" requires url');
return { name: "browser_navigate", args: rest };
case "click": {
const hasSelector = typeof rest.selector === "string" && rest.selector.trim();
const hasPoint = rest.point != null && Number.isFinite(rest.point?.x) && Number.isFinite(rest.point?.y);
if (hasSelector && hasPoint) throw bad('browser action "click" takes selector or point, not both — pick one target');
if (!hasSelector && !hasPoint) throw bad('browser action "click" needs selector (CSS) or point {x,y}');
if (!hasSelector) delete rest.selector;
if (!hasPoint) delete rest.point;
return { name: "browser_click", args: rest };
}
case "type":
if (typeof rest.text !== "string" || !rest.text.length) throw bad('browser action "type" requires text');
return { name: "browser_type", args: rest };
case "screenshot": return { name: "browser_screenshot", args: rest };
case "stop": return { name: "browser_stop", args: rest };
default:
throw bad(`browser action must be start, status, navigate, click, type, screenshot or stop (got ${JSON.stringify(args.action)})`);
}
}
case "trajectory": {
const rest = { ...args };
delete rest.action;
switch (args.action) {View on GitHub (pinned to 73e0f67d83)