Tighten subagent prompt file workflow

This commit is contained in:
lpf
2026-03-06 14:12:01 +08:00
parent 49352612ea
commit 5e421bb730
15 changed files with 542 additions and 58 deletions

View File

@@ -61,6 +61,10 @@ func resolveAutoRouteTarget(cfg *config.Config, raw string) (string, string) {
if content == "" || len(cfg.Agents.Subagents) == 0 {
return "", ""
}
maxChars := cfg.Agents.Router.Policy.IntentMaxInputChars
if maxChars > 0 && len([]rune(content)) > maxChars {
return "", ""
}
lower := strings.ToLower(content)
for agentID, subcfg := range cfg.Agents.Subagents {
if !subcfg.Enabled {