add warning
This commit is contained in:
parent
cc6e1d80bf
commit
b8bbcb38c5
1 changed files with 10 additions and 0 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue