MCPcopy Create free account
hub / github.com/compozy/agh / normalizeSkillSourceFilter

Function normalizeSkillSourceFilter

internal/cli/skill_workspace.go:302–317  ·  view source on GitHub ↗
(sourceFilter string)

Source from the content-addressed store, hash-verified

300}
301
302func normalizeSkillSourceFilter(sourceFilter string) (string, error) {
303 filter := strings.ToLower(strings.TrimSpace(sourceFilter))
304 switch filter {
305 case "":
306 return "", nil
307 case bundledSkillSource,
308 marketplaceSkillSource,
309 userSkillSource,
310 additionalSkillSource,
311 workspaceSkillSource,
312 agentLocalSkillSource:
313 return filter, nil
314 default:
315 return "", fmt.Errorf("cli: invalid skill source %q", sourceFilter)
316 }
317}
318
319func findSkillByName(allSkills []*skills.Skill, name string) (*skills.Skill, error) {
320 skillName := strings.TrimSpace(name)

Callers 3

skillListItemsFunction · 0.85

Calls

no outgoing calls

Tested by 1