From 6622277f11ca1dee03e868b064fb1851e5598b77 Mon Sep 17 00:00:00 2001 From: godlin Date: Fri, 15 May 2026 13:01:14 +0800 Subject: [PATCH] fix ACP start events for polished tools --- acp_adapter/tools.py | 1 - tests/acp/test_tools.py | 10 ++++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/acp_adapter/tools.py b/acp_adapter/tools.py index 31ae943a056..77a62e243bc 100644 --- a/acp_adapter/tools.py +++ b/acp_adapter/tools.py @@ -1123,7 +1123,6 @@ def build_tool_start( ) # Generic fallback - import json try: args_text = json.dumps(arguments, indent=2, default=str) except (TypeError, ValueError): diff --git a/tests/acp/test_tools.py b/tests/acp/test_tools.py index f9b0dac6d66..dc62b296c69 100644 --- a/tests/acp/test_tools.py +++ b/tests/acp/test_tools.py @@ -207,6 +207,16 @@ class TestBuildToolStart: assert result.content is None assert result.raw_input is None + def test_build_tool_start_for_browser_navigate(self): + """browser_navigate should emit a polished start event.""" + args = {"url": "https://x.com"} + result = build_tool_start("tc-browser-start", "browser_navigate", args) + assert isinstance(result, ToolCallStart) + assert result.title == "navigate: https://x.com" + assert result.kind == "fetch" + assert result.content[0].content.text == '{\n "url": "https://x.com"\n}' + assert result.raw_input is None + def test_build_tool_start_for_search(self): """search_files should include pattern in content.""" args = {"pattern": "TODO", "target": "content"}