add warning

This commit is contained in:
Seif Ghazi 2025-08-04 22:41:12 -04:00
parent cc6e1d80bf
commit b8bbcb38c5
No known key found for this signature in database
GPG key ID: 4519A4B1EEC1494E

View file

@ -134,6 +134,7 @@ func (r *ModelRouter) loadCustomAgents() {
fmt.Sprintf("%s/.claude/agents/%s.md", os.Getenv("HOME"), agentName),
}
found := false
for _, path := range paths {
content, err := os.ReadFile(path)
if err != nil {
@ -159,9 +160,18 @@ func (r *ModelRouter) loadCustomAgents() {
TargetProvider: providerName,
FullPrompt: staticPrompt,
}
found = true
break
}
}
// Log warning if subagent is mapped but definition not found
if !found {
r.logger.Printf("⚠️ Subagent '%s' is mapped to '%s' but definition file not found in:\n", agentName, targetModel)
for _, path := range paths {
r.logger.Printf(" - %s\n", path)
}
}
}
// Pretty print loaded subagents