From 47ca98d0e29b0da47a6084bb0eaef132e1608369 Mon Sep 17 00:00:00 2001 From: M1xA Date: Tue, 10 Feb 2026 21:51:41 +0200 Subject: [PATCH] fix(config): correct Task agent ID in SetupAgents (#2101) --- internal/config/agent_id_test.go | 29 +++++++++++++++++++++++++++++ internal/config/config.go | 2 +- 2 files changed, 30 insertions(+), 1 deletion(-) create mode 100644 internal/config/agent_id_test.go diff --git a/internal/config/agent_id_test.go b/internal/config/agent_id_test.go new file mode 100644 index 0000000000000000000000000000000000000000..74bad7f563dd1aa4c5f535f43c2204aacb1930b0 --- /dev/null +++ b/internal/config/agent_id_test.go @@ -0,0 +1,29 @@ +package config + +import ( + "testing" + + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" +) + +func TestConfig_AgentIDs(t *testing.T) { + cfg := &Config{ + Options: &Options{ + DisabledTools: []string{}, + }, + } + cfg.SetupAgents() + + t.Run("Coder agent should have correct ID", func(t *testing.T) { + coderAgent, ok := cfg.Agents[AgentCoder] + require.True(t, ok) + assert.Equal(t, AgentCoder, coderAgent.ID, "Coder agent ID should be '%s'", AgentCoder) + }) + + t.Run("Task agent should have correct ID", func(t *testing.T) { + taskAgent, ok := cfg.Agents[AgentTask] + require.True(t, ok) + assert.Equal(t, AgentTask, taskAgent.ID, "Task agent ID should be '%s'", AgentTask) + }) +} diff --git a/internal/config/config.go b/internal/config/config.go index 1d0aba7522948263cfac8aa3ef185749cfcc425f..079c5fb4fbf7bd9814ac83a360af98c7dc404397 100644 --- a/internal/config/config.go +++ b/internal/config/config.go @@ -755,7 +755,7 @@ func (c *Config) SetupAgents() { }, AgentTask: { - ID: AgentCoder, + ID: AgentTask, Name: "Task", Description: "An agent that helps with searching for context and finding implementation details.", Model: SelectedModelTypeLarge,