| 1139 | } |
| 1140 | |
| 1141 | func sessionHistoryBundle(history []TurnHistoryRecord) outputBundle { |
| 1142 | flattened := flattenHistory(history) |
| 1143 | return listBundle( |
| 1144 | history, |
| 1145 | flattened, |
| 1146 | "Session History", |
| 1147 | []string{"Turn", "Seq", sessionTypeValue, sessionAgentValue, sessionTimestampValue, "Content"}, |
| 1148 | "history", |
| 1149 | []string{ |
| 1150 | sessionTurnIDKey, |
| 1151 | sessionSequenceKey, |
| 1152 | extensionTypeKey, |
| 1153 | sessionAgentNameKey, |
| 1154 | networkTimestampKey, |
| 1155 | memoryContentKey, |
| 1156 | }, |
| 1157 | func(event SessionEventRecord) []string { |
| 1158 | return []string{ |
| 1159 | stringOrDash(event.TurnID), |
| 1160 | strconv.FormatInt(event.Sequence, 10), |
| 1161 | stringOrDash(event.Type), |
| 1162 | stringOrDash(event.AgentName), |
| 1163 | stringOrDash(formatTime(event.Timestamp)), |
| 1164 | stringOrDash(compactJSON(event.Content)), |
| 1165 | } |
| 1166 | }, |
| 1167 | func(event SessionEventRecord) []string { |
| 1168 | return []string{ |
| 1169 | event.TurnID, |
| 1170 | strconv.FormatInt(event.Sequence, 10), |
| 1171 | event.Type, |
| 1172 | event.AgentName, |
| 1173 | formatTime(event.Timestamp), |
| 1174 | compactJSON(event.Content), |
| 1175 | } |
| 1176 | }, |
| 1177 | ) |
| 1178 | } |
| 1179 | |
| 1180 | func agentEventsBundle(events []AgentEventRecord) outputBundle { |
| 1181 | return listBundle( |