(entries []map[string]any, kind, text string)
| 704 | textParts = append(textParts, text) |
| 705 | } |
| 706 | } |
| 707 | } |
| 708 | if len(textParts) > 0 { |
| 709 | entries = appendTranscriptSnapshotEntry(entries, "user", formatUserTranscriptText(strings.Join(textParts, "\n\n"))) |
| 710 | } |
| 711 | return entries |
| 712 | } |
| 713 | |
| 714 | func appendAssistantTranscriptMessage(entries []map[string]any, content any) []map[string]any { |
| 715 | if text, ok := content.(string); ok { |
| 716 | return appendTranscriptSnapshotEntry(entries, "assistant", formatAssistantTranscriptText(text)) |
| 717 | } |
| 718 | for _, block := range transcriptContentBlocks(content) { |
| 719 | switch stringFromAny(block["type"]) { |
| 720 | case "text": |
| 721 | entries = appendTranscriptSnapshotEntry(entries, "assistant", formatAssistantTranscriptText(stringFromAny(block["text"]))) |
no test coverage detected