fix: call to NewBrowserSearchTool() signature mismatch
This commit is contained in:
parent
c953c1629d
commit
8058f38abb
2 changed files with 6 additions and 6 deletions
|
|
@ -86,7 +86,7 @@ func createToolRegistry(workspace string, restrict bool, cfg *config.Config, msg
|
||||||
|
|
||||||
// Browser automation tools (ActionBook)
|
// Browser automation tools (ActionBook)
|
||||||
if cfg.Tools.Browser.Enabled {
|
if cfg.Tools.Browser.Enabled {
|
||||||
registry.Register(tools.NewBrowserSearchTool(cfg.Tools.Browser.Headless))
|
registry.Register(tools.NewBrowserSearchTool())
|
||||||
registry.Register(tools.NewBrowserGetTool())
|
registry.Register(tools.NewBrowserGetTool())
|
||||||
registry.Register(tools.NewBrowserTool(cfg.Tools.Browser.Headless))
|
registry.Register(tools.NewBrowserTool(cfg.Tools.Browser.Headless))
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@ import (
|
||||||
|
|
||||||
// TestBrowserSearchTool_Name verifies tool name
|
// TestBrowserSearchTool_Name verifies tool name
|
||||||
func TestBrowserSearchTool_Name(t *testing.T) {
|
func TestBrowserSearchTool_Name(t *testing.T) {
|
||||||
tool := NewBrowserSearchTool(true)
|
tool := NewBrowserSearchTool()
|
||||||
if tool.Name() != "browser_search" {
|
if tool.Name() != "browser_search" {
|
||||||
t.Errorf("expected name 'browser_search', got '%s'", tool.Name())
|
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
|
// TestBrowserSearchTool_Description verifies description is non-empty
|
||||||
func TestBrowserSearchTool_Description(t *testing.T) {
|
func TestBrowserSearchTool_Description(t *testing.T) {
|
||||||
tool := NewBrowserSearchTool(true)
|
tool := NewBrowserSearchTool()
|
||||||
if tool.Description() == "" {
|
if tool.Description() == "" {
|
||||||
t.Error("expected non-empty description")
|
t.Error("expected non-empty description")
|
||||||
}
|
}
|
||||||
|
|
@ -25,7 +25,7 @@ func TestBrowserSearchTool_Description(t *testing.T) {
|
||||||
|
|
||||||
// TestBrowserSearchTool_Parameters verifies parameter schema
|
// TestBrowserSearchTool_Parameters verifies parameter schema
|
||||||
func TestBrowserSearchTool_Parameters(t *testing.T) {
|
func TestBrowserSearchTool_Parameters(t *testing.T) {
|
||||||
tool := NewBrowserSearchTool(true)
|
tool := NewBrowserSearchTool()
|
||||||
params := tool.Parameters()
|
params := tool.Parameters()
|
||||||
props, ok := params["properties"].(map[string]interface{})
|
props, ok := params["properties"].(map[string]interface{})
|
||||||
if !ok {
|
if !ok {
|
||||||
|
|
@ -45,7 +45,7 @@ func TestBrowserSearchTool_Parameters(t *testing.T) {
|
||||||
|
|
||||||
// TestBrowserSearchTool_MissingQuery verifies error when query is missing
|
// TestBrowserSearchTool_MissingQuery verifies error when query is missing
|
||||||
func TestBrowserSearchTool_MissingQuery(t *testing.T) {
|
func TestBrowserSearchTool_MissingQuery(t *testing.T) {
|
||||||
tool := NewBrowserSearchTool(true)
|
tool := NewBrowserSearchTool()
|
||||||
result := tool.Execute(context.Background(), map[string]interface{}{})
|
result := tool.Execute(context.Background(), map[string]interface{}{})
|
||||||
if !result.IsError {
|
if !result.IsError {
|
||||||
t.Error("expected error when query is missing")
|
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")
|
t.Skip("actionbook not in PATH, skipping integration test")
|
||||||
}
|
}
|
||||||
|
|
||||||
tool := NewBrowserSearchTool(true)
|
tool := NewBrowserSearchTool()
|
||||||
result := tool.Execute(context.Background(), map[string]interface{}{
|
result := tool.Execute(context.Background(), map[string]interface{}{
|
||||||
"query": "google search",
|
"query": "google search",
|
||||||
})
|
})
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue