Follow Discord
Sweep 22 Oct 2026 · 04:32Z Build v2.1.308 527 read Stable v2.1.308 Latest v2.1.308 Next v2.1.308 Feeds RSS JSON llms.txt llms-full.txt Unofficial
One change · api

browser-use-tool changedagents-and-tools/tool-use/browser-use-tool

Nearest release: v2.1.304, published 6 hours before this site recorded the change. Shown because the two are within 24 hours of each other. Nothing here says the release caused the edit.

Recorded here
Lines+16added
Lines−18removed
From line 341 where the diff opens
First seen 20 Aug 2026 this site's first read of the page
Recorded edits21to this page, all time

The whole hunk

from line 341, old and new numbered
/
lines
from line 341
341341 return [
342342 {
343343 "type": "image",
344 "source": {"type": "base64", "media_type": "image/png", "data": PLACEHOLDER_PNG},
344 "source": {
345 "type": "base64",
346 "media_type": "image/png",
347 "data": PLACEHOLDER_PNG,
348 },
345349 }
346350 ]
347351 
from line 367
363367 
364368 ```typescript TypeScript
365369 // Placeholder image data; a real executor captures the viewport as PNG bytes
366 const PLACEHOLDER_PNG = "iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNkYPhfDwAChwGA60e6kgAAAABJRU5ErkJggg==";
370 const PLACEHOLDER_PNG =
371 "iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNkYPhfDwAChwGA60e6kgAAAABJRU5ErkJggg==";
367372 
368373 function navigate(url: string): string {
369374 return `navigated to ${url}`;
from line 398
393398 source: {
394399 type: "base64",
395400 media_type: "image/png",
396 data: PLACEHOLDER_PNG,
397 },
398 },
401 data: PLACEHOLDER_PNG
402 }
403 }
399404 ];
400405 }
401406 
402407 function handleBrowserAction(
403408 action: string,
404 input: unknown,
409 input: unknown
405410 ): string | Anthropic.ImageBlockParam[] {
406 const params: object =
407 typeof input === "object" && input !== null ? input : {};
411 const params: object = typeof input === "object" && input !== null ? input : {};
408412 if (action === "navigate" && "url" in params) {
409413 return navigate(String(params.url));
410414 } else if (action === "read_page") {
from line 416
412416 } else if (action === "left_click" && "target" in params) {
413417 // target is an element reference from read_page or a viewport coordinate
414418 const target: object =
415 typeof params.target === "object" && params.target !== null
416 ? params.target
417 : {};
419 typeof params.target === "object" && params.target !== null ? params.target : {};
418420 if ("type" in target && target.type === "ref" && "ref" in target) {
419421 return clickElement(String(target.ref));
420422 } else if ("x" in target && "y" in target) {
from line 558
556558 // Reached when a member's input is missing a field or a field has the wrong type
557559 return nil, fmt.Errorf("invalid input for %s", action)
558560 }
559 
560561 ```
561562 
562563 ```java Java
from line 782
781782 function browserResult(
782783 toolUseId: string,
783784 content: string | Anthropic.ImageBlockParam[],
784 isError?: boolean,
785 isError?: boolean
785786 ): Anthropic.ToolResultBlockParam {
786787 return {
787788 type: "tool_result",
from line 789
788789 tool_use_id: toolUseId,
789790 toolset_name: "browser",
790791 content,
791 is_error: isError,
792 is_error: isError
792793 };
793794 }
794795 
795 function processToolCalls(
796 response: Anthropic.Message,
797 ): Anthropic.ToolResultBlockParam[] {
796 function processToolCalls(response: Anthropic.Message): Anthropic.ToolResultBlockParam[] {
798797 const toolResults: Anthropic.ToolResultBlockParam[] = [];
799798 let failed = false;
800799 for (const block of response.content) {
from line 936
937936 }
938937 return toolResults
939938 }
940 
941939 ```
942940 
943941 ```java Java
Feedback