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

Function copyMessages

agent/normalize.go:327–340  ·  view source on GitHub ↗
(messages []map[string]any)

Source from the content-addressed store, hash-verified

325}
326
327func copyMessages(messages []map[string]any) []map[string]any {
328 out := make([]map[string]any, len(messages))
329 for i, msg := range messages {
330 if msg == nil {
331 continue
332 }
333 cp := copyMap(msg)
334 if blocks := contentBlocks(msg["content"]); blocks != nil {
335 cp["content"] = append([]map[string]any{}, blocks...)
336 }
337 out[i] = cp
338 }
339 return out
340}
341
342func toolUseIDsInMessage(msg map[string]any) []string {
343 var ids []string

Callers 1

Calls 2

copyMapFunction · 0.70
contentBlocksFunction · 0.70

Tested by

no test coverage detected