MCPcopy Create free account
hub / github.com/GongShichen/LuminaCode / BuildMemorySection

Function BuildMemorySection

agentContext/builder.go:859–872  ·  view source on GitHub ↗
(cfg *config.Config)

Source from the content-addressed store, hash-verified

857
858func AssemblePromptSections(sections []PromptSection) string {
859 var result []string
860 for _, section := range sections {
861 content := strings.TrimSpace(section.Content)
862 if content != "" {
863 result = append(result, content)
864 }
865 }
866 return strings.Join(result, "\n\n")
867}
868
869func BuildSystemPrompt(cwd, memorySection string) (string, error) {
870 sections, err := BuildSystemPromptSection(cwd, memorySection)
871 if err != nil {
872 return "", err
873 }
874 return AssemblePromptSections(sections), nil
875}

Calls 1

GetConfigPtrFunction · 0.92