From 6c9589869e6bb8cef937b807d0d49bf35e4e6bc3 Mon Sep 17 00:00:00 2001 From: lxowalle Date: Wed, 4 Mar 2026 18:38:48 +0800 Subject: [PATCH] delete unused bug and fix review issue --- config/config.example.json | 3 --- pkg/agent/loop.go | 18 ++++++++++-------- pkg/config/config.go | 1 - 3 files changed, 10 insertions(+), 12 deletions(-) diff --git a/config/config.example.json b/config/config.example.json index 455e5ae1b..daeaddb92 100644 --- a/config/config.example.json +++ b/config/config.example.json @@ -365,9 +365,6 @@ "edit_file": { "enabled": true }, - "exec_tool": { - "enabled": true - }, "find_skills": { "enabled": true }, diff --git a/pkg/agent/loop.go b/pkg/agent/loop.go index 85bdae7d3..d37620e0e 100644 --- a/pkg/agent/loop.go +++ b/pkg/agent/loop.go @@ -105,7 +105,7 @@ func registerSharedTools( } // Web tools - if cfg.Tools.IsToolEnabled("web_search") { + if cfg.Tools.IsToolEnabled("web") { searchTool, err := tools.NewWebSearchTool(tools.WebSearchToolOptions{ BraveAPIKey: cfg.Tools.Web.Brave.APIKey, BraveMaxResults: cfg.Tools.Web.Brave.MaxResults, @@ -181,15 +181,17 @@ func registerSharedTools( } // Spawn tool with allowlist checker - if cfg.Tools.IsToolEnabled("spawn") { + if cfg.Tools.IsToolEnabled("subagent") { subagentManager := tools.NewSubagentManager(provider, agent.Model, agent.Workspace, msgBus) subagentManager.SetLLMOptions(agent.MaxTokens, agent.Temperature) - spawnTool := tools.NewSpawnTool(subagentManager) - currentAgentID := agentID - spawnTool.SetAllowlistChecker(func(targetAgentID string) bool { - return registry.CanSpawnSubagent(currentAgentID, targetAgentID) - }) - agent.Tools.Register(spawnTool) + if cfg.Tools.IsToolEnabled("spawn") { + spawnTool := tools.NewSpawnTool(subagentManager) + currentAgentID := agentID + spawnTool.SetAllowlistChecker(func(targetAgentID string) bool { + return registry.CanSpawnSubagent(currentAgentID, targetAgentID) + }) + agent.Tools.Register(spawnTool) + } } } } diff --git a/pkg/config/config.go b/pkg/config/config.go index 0c51349d0..5daaa0cab 100644 --- a/pkg/config/config.go +++ b/pkg/config/config.go @@ -610,7 +610,6 @@ type ToolsConfig struct { MCP MCPConfig `json:"mcp"` AppendFile ToolConfig `json:"append_file"` EditFile ToolConfig `json:"edit_file"` - ExecTool ToolConfig `json:"exec_tool"` FindSkills ToolConfig `json:"find_skills"` I2C ToolConfig `json:"i2c"` InstallSkill ToolConfig `json:"install_skill"`