MCPcopy Create free account
hub / github.com/compozy/agh / renderMemoryTranscript

Function renderMemoryTranscript

internal/daemon/memory_runtime.go:706–725  ·  view source on GitHub ↗
(snapshot memcontract.TranscriptSnapshot)

Source from the content-addressed store, hash-verified

704}
705
706func renderMemoryTranscript(snapshot memcontract.TranscriptSnapshot) string {
707 var buf strings.Builder
708 for _, message := range snapshot.Messages {
709 role := strings.TrimSpace(message.Role)
710 if role == "" {
711 role = "unknown"
712 }
713 if _, err := fmt.Fprintf(
714 &buf,
715 "- sequence=%d role=%s at=%s\n%s\n",
716 message.Sequence,
717 role,
718 message.At.UTC().Format(time.RFC3339Nano),
719 strings.TrimSpace(message.Content),
720 ); err != nil {
721 return buf.String()
722 }
723 }
724 return buf.String()
725}
726
727func memoryExtractorOverlay() string {
728 return strings.TrimSpace(`

Callers 1

Calls 1

StringMethod · 0.45

Tested by

no test coverage detected