Skip to content

Commit da58820

Browse files
committed
fix(chat): return empty slice instead of nil from DetectAgents
When no agents are installed (e.g., CI runners), DetectAgents returned nil which caused TestDetectAgents_Structure to fail with NotNil assert.
1 parent 4ab622e commit da58820

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

internal/chat/agent.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ type Agent struct {
3030
// DetectAgents scans the system for installed AI agents.
3131
// It checks for claude, codex, and ollama in $PATH.
3232
func DetectAgents() []Agent {
33-
var agents []Agent
33+
agents := []Agent{}
3434

3535
checks := []struct {
3636
name AgentType

0 commit comments

Comments
 (0)