From 014de0ec21936a7a2fd64db9d151e73c79bb44ad Mon Sep 17 00:00:00 2001
From: Patrick Barattin
Date: Sun, 11 Oct 2026 20:25:38 +0200
Subject: refactor: remove duplicate browser prompt instructions (#35)
Remove browser instruction text repeated across tool descriptions, parameter schemas, tool
guidelines and the global browser prompt. Tool names, schemas, handlers and concurrency are
unchanged; shared recovery and ownership guidance is now available before and after the browser
connects, and the prompt names which tools are serialized versus observations.
Co-Authored-By: Claude Fable 5.1
---
src/domains/click.ts | 5 -----
1 file changed, 5 deletions(-)
(limited to 'src/domains/click.ts')
diff --git a/src/domains/click.ts b/src/domains/click.ts
index 79bb5ee..47d6dc5 100644
--- a/src/domains/click.ts
+++ b/src/domains/click.ts
@@ -58,11 +58,6 @@ export const clickTool = defineBrowserTool({
"Click an element. PREFERRED: pass `ref` (e.g. 'e12') from browser_snapshot — it re-resolves the element's position at click time, so it works even after the page re-renders and moves things. Fallback: pass viewport CSS-pixel `x`/`y`. Compositor-level click works through iframes, shadow DOM, and cross-origin content. After clicking, a compact diff of page changes is appended.",
promptSnippet: "Click an element by ref (preferred) or pixel coordinates",
promptGuidelines: [
- "PREFER `ref` from browser_snapshot (the outline shows '[eN]' for every interactive element) — it survives re-renders, unlike coordinates which go stale after a save/edit reflows the page.",
- "Fallback: pass (x, y) from the snapshot's '@(x,y)' hint when there's no ref.",
- "A 'ref is stale' error means the page changed — re-run browser_snapshot to get fresh refs.",
- "After clicking, read the appended page-changes diff to confirm the action landed before moving on (no separate snapshot needed for a quick check).",
- "Coordinates are viewport CSS pixels (not device pixels). Compositor-level clicks pass through iframes, shadow DOM, and cross-origin content.",
"If a click doesn't register, run pi with --browser-debug-clicks (or set BH_DEBUG_CLICKS=1) to get annotated screenshots. For React/Vue components ignoring clicks, try browser_dispatch_key.",
],
parameters: ClickArgs,
--
cgit v1.2.3