browser: add window resize tool with chromedp

Co-Authored-By: sketch <hello@sketch.dev>
Change-ID: s68bdc7fb84309a7ck
diff --git a/loop/testdata/agent_loop.httprr b/loop/testdata/agent_loop.httprr
index fe631a1..81627b6 100644
--- a/loop/testdata/agent_loop.httprr
+++ b/loop/testdata/agent_loop.httprr
@@ -1,9 +1,9 @@
 httprr trace v1
-15608 2329
+16161 2332
 POST https://api.anthropic.com/v1/messages HTTP/1.1

 Host: api.anthropic.com

 User-Agent: Go-http-client/1.1

-Content-Length: 15410

+Content-Length: 15963

 Anthropic-Version: 2023-06-01

 Content-Type: application/json

 

@@ -390,6 +390,31 @@
    }
   },
   {
+   "name": "browser_resize",
+   "description": "Resize the browser window to a specific width and height",
+   "input_schema": {
+    "type": "object",
+    "properties": {
+     "width": {
+      "type": "integer",
+      "description": "Window width in pixels"
+     },
+     "height": {
+      "type": "integer",
+      "description": "Window height in pixels"
+     },
+     "timeout": {
+      "type": "string",
+      "description": "Timeout as a Go duration string (default: 5s)"
+     }
+    },
+    "required": [
+     "width",
+     "height"
+    ]
+   }
+  },
+  {
    "name": "browser_take_screenshot",
    "description": "Take a screenshot of the page or a specific element",
    "input_schema": {
@@ -496,24 +521,24 @@
 Anthropic-Organization-Id: 3c473a21-7208-450a-a9f8-80aebda45c1b

 Anthropic-Ratelimit-Input-Tokens-Limit: 200000

 Anthropic-Ratelimit-Input-Tokens-Remaining: 199000

-Anthropic-Ratelimit-Input-Tokens-Reset: 2025-05-11T01:21:43Z

+Anthropic-Ratelimit-Input-Tokens-Reset: 2025-05-11T01:26:00Z

 Anthropic-Ratelimit-Output-Tokens-Limit: 80000

 Anthropic-Ratelimit-Output-Tokens-Remaining: 80000

-Anthropic-Ratelimit-Output-Tokens-Reset: 2025-05-11T01:21:47Z

+Anthropic-Ratelimit-Output-Tokens-Reset: 2025-05-11T01:26:04Z

 Anthropic-Ratelimit-Requests-Limit: 4000

 Anthropic-Ratelimit-Requests-Remaining: 3999

-Anthropic-Ratelimit-Requests-Reset: 2025-05-11T01:21:42Z

+Anthropic-Ratelimit-Requests-Reset: 2025-05-11T01:25:59Z

 Anthropic-Ratelimit-Tokens-Limit: 280000

 Anthropic-Ratelimit-Tokens-Remaining: 279000

-Anthropic-Ratelimit-Tokens-Reset: 2025-05-11T01:21:43Z

+Anthropic-Ratelimit-Tokens-Reset: 2025-05-11T01:26:00Z

 Cf-Cache-Status: DYNAMIC

-Cf-Ray: 93dddc70ba53942c-SJC

+Cf-Ray: 93dde2b41c34cf2b-SJC

 Content-Type: application/json

-Date: Sun, 11 May 2025 01:21:47 GMT

-Request-Id: req_011CNzsCMP4tG7GTL8PrNTDw

+Date: Sun, 11 May 2025 01:26:04 GMT

+Request-Id: req_011CNzsXGD3jV7cnpYvABKN2

 Server: cloudflare

 Strict-Transport-Security: max-age=31536000; includeSubDomains; preload

 Via: 1.1 google

 X-Robots-Tag: none

 

-{"id":"msg_0152wEWVypxw8wDR31nYSXQd","type":"message","role":"assistant","model":"claude-3-7-sonnet-20250219","content":[{"type":"text","text":"Here are the tools available to me:\n\n1. bash - Execute shell commands\n2. keyword_search - Search for files based on keywords\n3. think - Record thoughts and plans\n4. title - Set conversation title\n5. precommit - Create a git branch for work\n6. done - Mark a task as complete with checklist\n7. codereview - Run automated code review\n8. multiplechoice - Present multiple choice options to user\n9. Browser tools:\n   - browser_navigate - Navigate to URLs\n   - browser_click - Click elements\n   - browser_type - Type into elements\n   - browser_wait_for - Wait for elements\n   - browser_get_text - Get text from elements\n   - browser_eval - Evaluate JavaScript\n   - browser_scroll_into_view - Scroll elements into view\n   - browser_take_screenshot - Take screenshots\n   - browser_read_image - Read image files\n10. patch - Make precise text edits to files\n\nThese tools allow me to execute commands, search codebases, plan, manage git branches, evaluate code, interact with web browsers, and make file modifications."}],"stop_reason":"end_turn","stop_sequence":null,"usage":{"input_tokens":4,"cache_creation_input_tokens":3609,"cache_read_input_tokens":0,"output_tokens":254}}
\ No newline at end of file
+{"id":"msg_01Q6jfLzpKJGDUmGXgP2w3FQ","type":"message","role":"assistant","model":"claude-3-7-sonnet-20250219","content":[{"type":"text","text":"Here's a brief list of the tools available to me:\n\n1. bash - Execute shell commands\n2. keyword_search - Search for files using keywords\n3. think - Record thoughts, notes, and plans\n4. title - Set conversation title\n5. precommit - Create a git branch for tracking work\n6. done - Mark completion of user's goal with checklist\n7. codereview - Run automated code review\n8. multiplechoice - Present user with quick answer options\n9. Browser tools:\n   - browser_navigate - Go to URL\n   - browser_click - Click element\n   - browser_type - Type text\n   - browser_wait_for - Wait for element\n   - browser_get_text - Get text from element\n   - browser_eval - Run JavaScript\n   - browser_scroll_into_view - Scroll element into view\n   - browser_resize - Resize browser window\n   - browser_take_screenshot - Take screenshot\n   - browser_read_image - Read image file\n10. patch - Make precise text edits to files\n\nThese tools allow me to explore, analyze, modify code, interact with web pages, and help complete your tasks."}],"stop_reason":"end_turn","stop_sequence":null,"usage":{"input_tokens":4,"cache_creation_input_tokens":3727,"cache_read_input_tokens":0,"output_tokens":262}}
\ No newline at end of file