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

Function appendAssistantTranscriptMessage

ui/runtime.go:693–704  ·  view source on GitHub ↗
(entries []map[string]any, content any)

Source from the content-addressed store, hash-verified

691 if text, ok := content.(string); ok {
692 return appendTranscriptSnapshotEntry(entries, "user", formatUserTranscriptText(text))
693 }
694 blocks := transcriptContentBlocks(content)
695 if len(blocks) == 0 {
696 return entries
697 }
698 var textParts []string
699 for _, block := range blocks {
700 switch stringFromAny(block["type"]) {
701 case "text":
702 text := strings.TrimSpace(stringFromAny(block["text"]))
703 if text != "" && !strings.Contains(text, "<system_hint>") {
704 textParts = append(textParts, text)
705 }
706 }
707 }

Callers 1

Calls 4

transcriptContentBlocksFunction · 0.85
stringFromAnyFunction · 0.70

Tested by

no test coverage detected