From 8058f38abbba3667189675805657e256c54e8a89 Mon Sep 17 00:00:00 2001 From: Danieldd28 Date: Mon, 16 Feb 2026 20:41:55 +0700 Subject: [PATCH] fix: call to NewBrowserSearchTool() signature mismatch --- pkg/agent/loop.go | 2 +- pkg/tools/browser_test.go | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/pkg/agent/loop.go b/pkg/agent/loop.go index 2600e4476..f8afecac2 100644 --- a/pkg/agent/loop.go +++ b/pkg/agent/loop.go @@ -86,7 +86,7 @@ func createToolRegistry(workspace string, restrict bool, cfg *config.Config, msg // Browser automation tools (ActionBook) if cfg.Tools.Browser.Enabled { - registry.Register(tools.NewBrowserSearchTool(cfg.Tools.Browser.Headless)) + registry.Register(tools.NewBrowserSearchTool()) registry.Register(tools.NewBrowserGetTool()) registry.Register(tools.NewBrowserTool(cfg.Tools.Browser.Headless)) } diff --git a/pkg/tools/browser_test.go b/pkg/tools/browser_test.go index 0b30ba9da..70adf6e3d 100644 --- a/pkg/tools/browser_test.go +++ b/pkg/tools/browser_test.go @@ -9,7 +9,7 @@ import ( // TestBrowserSearchTool_Name verifies tool name func TestBrowserSearchTool_Name(t *testing.T) { - tool := NewBrowserSearchTool(true) + tool := NewBrowserSearchTool() if tool.Name() != "browser_search" { t.Errorf("expected name 'browser_search', got '%s'", tool.Name()) } @@ -17,7 +17,7 @@ func TestBrowserSearchTool_Name(t *testing.T) { // TestBrowserSearchTool_Description verifies description is non-empty func TestBrowserSearchTool_Description(t *testing.T) { - tool := NewBrowserSearchTool(true) + tool := NewBrowserSearchTool() if tool.Description() == "" { t.Error("expected non-empty description") } @@ -25,7 +25,7 @@ func TestBrowserSearchTool_Description(t *testing.T) { // TestBrowserSearchTool_Parameters verifies parameter schema func TestBrowserSearchTool_Parameters(t *testing.T) { - tool := NewBrowserSearchTool(true) + tool := NewBrowserSearchTool() params := tool.Parameters() props, ok := params["properties"].(map[string]interface{}) if !ok { @@ -45,7 +45,7 @@ func TestBrowserSearchTool_Parameters(t *testing.T) { // TestBrowserSearchTool_MissingQuery verifies error when query is missing func TestBrowserSearchTool_MissingQuery(t *testing.T) { - tool := NewBrowserSearchTool(true) + tool := NewBrowserSearchTool() result := tool.Execute(context.Background(), map[string]interface{}{}) if !result.IsError { t.Error("expected error when query is missing") @@ -251,7 +251,7 @@ func TestBrowserSearchTool_Integration(t *testing.T) { t.Skip("actionbook not in PATH, skipping integration test") } - tool := NewBrowserSearchTool(true) + tool := NewBrowserSearchTool() result := tool.Execute(context.Background(), map[string]interface{}{ "query": "google search", })