feat(skill): refactor candidateLoader and update loadCandidateSkills to use getSkillByID

This commit is contained in:
mlogclub
2026-04-17 17:23:29 +08:00
parent a601fa707f
commit c396a4a5e3
3 changed files with 9 additions and 9 deletions
-6
View File
@@ -53,12 +53,6 @@ func MatchSkill(execCtx context.Context, ctx RuntimeContext, aiAgent *models.AIA
}
}
if len(candidates) == 1 {
trace.Status = "single_candidate"
trace.SelectedSkillCode = candidates[0].Code
return &candidates[0], "single_candidate", trace, nil
}
selected, routeTrace, err := routeSkillWithLLM(execCtx, aiConfig, ctx.UserMessage, candidates)
if routeTrace != nil {
trace.Status = routeTrace.Status