feat: add path in the results of use_skill

This commit is contained in:
Acbox
2026-04-16 13:48:18 +08:00
parent 61ccecc7be
commit 9a2f7a4766
9 changed files with 84 additions and 1 deletions
+5
View File
@@ -938,10 +938,15 @@ func (a *skillLoaderAdapter) LoadSkills(ctx context.Context, botID string) ([]fl
}
entries := make([]flow.SkillEntry, len(items))
for i, item := range items {
skillPath := ""
if item.SourcePath != "" {
skillPath = stdpath.Dir(item.SourcePath)
}
entries[i] = flow.SkillEntry{
Name: item.Name,
Description: item.Description,
Content: item.Content,
Path: skillPath,
Metadata: item.Metadata,
}
}