Lightpanda: the headless browser designed for AI and automation
agent: drop dated prompt patterns
Adrià Arrufatff6a54ba2240
diff --git a/src/agent/Agent.zig b/src/agent/Agent.zigindex 5207605ec..14bbfbcbf 100644--- a/src/agent/Agent.zig+++ b/src/agent/Agent.zig@@ -118,16 +118,12 @@ fn savePrompt(revision: bool) []const u8 {const synthesis_prompt =\\You have used your tool budget or cannot finish the exploration.- \\Give your best final answer NOW based ONLY on what you actually observed- \\via tool calls in this conversation. Do NOT fall back to prior knowledge —- \\if your snapshots show only cookie banners, 403/access-denied pages,- \\blocked search results, or empty bodies, say that explicitly- \\(e.g. "the page was blocked by a cookie wall and I could not extract X").- \\Do not invent details that are not visible in the tool outputs above.- \\Do not call any more tools.- \\Respond with ONLY the answer — one word, one number, one short phrase,- \\or a brief honest explanation of why the page could not be read.- \\No prefix, no markdown.+ \\Give your best final answer using only what the tool outputs above+ \\show, not prior knowledge. If they show only cookie banners,+ \\403/access-denied pages, blocked search results, or empty bodies, say+ \\so plainly (e.g. "the page was blocked by a cookie wall and I could not+ \\extract X") rather than filling the gap. Answer at the length the+ \\question needs.;allocator: std.mem.Allocator,diff --git a/src/browser/tools.zig b/src/browser/tools.zigindex 9b8d31e52..87ca0cd7c 100644--- a/src/browser/tools.zig+++ b/src/browser/tools.zig@@ -106,9 +106,7 @@ pub const driver_guidance =\\- Triage from `search` snippets before opening links; open only the few\\ most promising. Don't re-run a search you already ran, and skip\\ near-duplicate sources that repeat the same announcement verbatim.- \\- Stop once the gathered material answers the question. For opinion or- \\ discussion questions, a couple of high-signal threads (e.g. Hacker- \\ News, Reddit) usually beat scraping a dozen news sites.+ \\- Stop once the gathered material answers the question.\\\\Selector rules:\\- NEVER pass backendNodeId to click/fill/hover/selectOption/setChecked.@@ -179,9 +177,8 @@ pub const save_synthesis_prompt =\\list, fan out to detail pages, aggregate, return) stating what that block\\accomplishes toward the goal — NOT restating the API call. One comment per\\step, not per line; skip self-evident lines.- \\Output ONLY JavaScript source — no markdown fences and no prose outside the- \\code, but DO annotate the script with the `//` intent comments described- \\above.+ \\Output the JavaScript source alone, with no markdown fences or prose+ \\around it.;/// Script-language rules for consumers that never see the full@@ -345,7 +342,7 @@ pub const Tool = enum {pub fn definition(self: Tool) Definition {return switch (self) {.goto => .{- .description = "Navigate to a specified URL and load the page in memory so it can be reused later for info extraction.",+ .description = "Navigate the current page to a URL. Returns a short status once `waitUntil` fires (default `load`), or a timeout notice; content rendered by post-load JavaScript may not be there yet (see `waitForState`). The page stays loaded for later reads and actions. To navigate and read in one call, pass `url` to `markdown`, `tree` or `html` instead; use `goto` when the next step is an action or `extract`.",.summary = "Open a URL and keep the page in memory",.input_schema = minify(\\{