MCPcopy Create free account
hub / github.com/github/gh-aw / ProcessImportsFromFrontmatterWithSource

Function ProcessImportsFromFrontmatterWithSource

pkg/parser/import_processor.go:106–117  ·  view source on GitHub ↗

ProcessImportsFromFrontmatterWithSource processes imports field from frontmatter with source tracking This version includes the workflow file path and YAML content for better error reporting

(frontmatter map[string]any, baseDir string, cache *ImportCache, workflowFilePath string, yamlContent string)

Source from the content-addressed store, hash-verified

104// ProcessImportsFromFrontmatterWithSource processes imports field from frontmatter with source tracking
105// This version includes the workflow file path and YAML content for better error reporting
106func ProcessImportsFromFrontmatterWithSource(frontmatter map[string]any, baseDir string, cache *ImportCache, workflowFilePath string, yamlContent string) (*ImportsResult, error) {
107 importLog.Printf("Processing imports: workflowFile=%s, baseDir=%s", workflowFilePath, baseDir)
108 result, err := processImportsFromFrontmatterWithManifestAndSource(frontmatter, baseDir, cache, workflowFilePath, yamlContent)
109 if err != nil {
110 importLog.Printf("Import processing failed for %s: %v", workflowFilePath, err)
111 return result, err
112 }
113 if result != nil {
114 importLog.Printf("Import processing complete: importedFiles=%d, mergedTools=%d bytes", len(result.ImportedFiles), len(result.MergedTools))
115 }
116 return result, nil
117}