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

Function BuildMemoryIndexMessage

memory/injection.go:16–26  ·  view source on GitHub ↗
(memoryDir string)

Source from the content-addressed store, hash-verified

14 return nil
15 }
16 parts := make([]string, 0, len(recalled))
17 filenames := make([]string, 0, len(recalled))
18 recallIDs := make([]string, 0, len(recalled))
19 seenRecallIDs := map[string]struct{}{}
20 for _, item := range recalled {
21 parts = append(parts, strings.TrimSpace(item.Content))
22 filenames = append(filenames, item.Filename)
23 itemIDs := item.RecallIDs
24 if len(itemIDs) == 0 {
25 itemIDs = []string{item.RecallID}
26 if item.RecallID == "" {
27 itemIDs[0] = item.Filename
28 }
29 }

Callers 1

InjectMemoryIndexContextFunction · 0.92

Calls 2

LoadMemoryIndexFunction · 0.85
BuildMetaUserMessageFunction · 0.85

Tested by

no test coverage detected