(parsedFrontmatter *FrontmatterConfig, frontmatter map[string]any)
| 217 | } |
| 218 | |
| 219 | func extractFrontmatterSkillReferences(parsedFrontmatter *FrontmatterConfig, frontmatter map[string]any) []SkillReference { |
| 220 | if parsedFrontmatter != nil && len(parsedFrontmatter.SkillReferences) > 0 { |
| 221 | return append([]SkillReference(nil), parsedFrontmatter.SkillReferences...) |
| 222 | } |
| 223 | |
| 224 | // Fall back to raw frontmatter when ParseFrontmatterConfig failed for non-skills reasons |
| 225 | // (e.g. unrecognized tool shapes). Safe because validateFrontmatterSkills already ran |
| 226 | // and succeeded on this frontmatter before we reach this point. |
| 227 | rawSkills, ok := frontmatter["skills"].([]any) |
| 228 | if !ok || len(rawSkills) == 0 { |
| 229 | return nil |
| 230 | } |
| 231 | |
| 232 | return parseRawSkillReferences(rawSkills) |
| 233 | } |
| 234 | |
| 235 | func extractMainModelCostsOverlay(toolsResult *toolsProcessingResult, frontmatter map[string]any) map[string]any { |
| 236 | // Fall back to raw frontmatter when ParseFrontmatterConfig failed (e.g. due to unrecognized |
no test coverage detected