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

Function skillListItemsFromRecords

internal/cli/skill_workspace.go:168–190  ·  view source on GitHub ↗
(records []SkillRecord, sourceFilter string)

Source from the content-addressed store, hash-verified

166}
167
168func skillListItemsFromRecords(records []SkillRecord, sourceFilter string) ([]skillListItem, error) {
169 filter, err := normalizeSkillSourceFilter(sourceFilter)
170 if err != nil {
171 return nil, err
172 }
173
174 items := make([]skillListItem, 0, len(records))
175 for _, record := range records {
176 source := strings.TrimSpace(record.Source)
177 if filter != "" && source != filter {
178 continue
179 }
180
181 items = append(items, skillListItem{
182 Name: record.Name,
183 Description: record.Description,
184 Source: source,
185 Enabled: record.Enabled,
186 })
187 }
188
189 return items, nil
190}
191
192func skillInfoItemFromRecord(record SkillRecord) skillInfoItem {
193 return skillInfoItem{

Callers 1

newSkillListCommandFunction · 0.85

Calls 2

appendFunction · 0.85

Tested by

no test coverage detected