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

Function StripMessageMetadata

agent/message_injection.go:50–63  ·  view source on GitHub ↗
(messages []map[string]any)

Source from the content-addressed store, hash-verified

48 }
49 cleaned[key] = value
50 }
51 out = append(out, cleaned)
52 }
53 return out
54}
55
56func isSystemHintBlock(block map[string]any) bool {
57 if stringFromAny(block["type"]) != "text" {
58 return false
59 }
60 return strings.Contains(stringFromAny(block["text"]), "<system_hint>")
61}
62
63func isToolResultCarrierMessage(message map[string]any) bool {
64 if stringFromAny(message["role"]) != "user" {
65 return false
66 }

Calls

no outgoing calls