INNER CODE UNIT · Go
generateRootAggregate
xataio/xata · gen/aiconfigs/main.go:263
func generateRootAggregate(aiFiles []AIMarkdownFile, toolConfig ToolConfig) string {
var rootFile *AIMarkdownFile
var otherFiles []AIMarkdownFile
for _, file := range aiFiles {
if file.IsRoot {
rootFile = &file
} else {
otherFiles = append(otherFiles, file)
}
}
var rootSection string
if rootFile != nil {
rootSection = toolConfig.Transform(rootFile.Content, rootFile.Path).Content
}
var otherSections []string
for _, file := range otherFiles {