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

Function formatHistoricalToolResult

ui/runtime.go:728–737  ·  view source on GitHub ↗
(block map[string]any)

Source from the content-addressed store, hash-verified

726
727func appendTranscriptSnapshotEntry(entries []map[string]any, kind, text string) []map[string]any {
728 text = strings.TrimSpace(text)
729 if text == "" {
730 return entries
731 }
732 if kind == "user" && len(entries) > 0 {
733 last := entries[len(entries)-1]
734 if last["kind"] == kind && strings.TrimSpace(stringFromAny(last["text"])) == text {
735 return entries
736 }
737 }
738 return append(entries, map[string]any{"kind": kind, "text": text})
739}
740

Callers

nothing calls this directly

Calls 3

stringFromAnyFunction · 0.70
truncateStringFunction · 0.70

Tested by

no test coverage detected