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

Function toolUseIDsInMessage

agent/normalize.go:342–352  ·  view source on GitHub ↗
(msg map[string]any)

Source from the content-addressed store, hash-verified

340}
341
342func toolUseIDsInMessage(msg map[string]any) []string {
343 var ids []string
344 for _, block := range contentBlocks(msg["content"]) {
345 if block["type"] == "tool_use" {
346 if id := stringFromAny(block["id"]); id != "" {
347 ids = append(ids, id)
348 }
349 }
350 }
351 return ids
352}
353
354func NormalizeMessages(messages []map[string]any, modelFamily string, recentErrors []string) []map[string]any {
355 normalized := ReorderAttachments(messages)

Callers 1

Calls 2

contentBlocksFunction · 0.70
stringFromAnyFunction · 0.70

Tested by

no test coverage detected