fix(config): correct Task agent ID in SetupAgents (#2101)

M1xA created

Change summary

internal/config/agent_id_test.go | 29 +++++++++++++++++++++++++++++
internal/config/config.go        |  2 +-
2 files changed, 30 insertions(+), 1 deletion(-)

Detailed changes

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)
+	})
+}

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,