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

Function sessionHistoryBundle

internal/cli/session.go:1141–1178  ·  view source on GitHub ↗
(history []TurnHistoryRecord)

Source from the content-addressed store, hash-verified

1139}
1140
1141func 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
1180func agentEventsBundle(events []AgentEventRecord) outputBundle {
1181 return listBundle(

Callers 2

newSessionHistoryCommandFunction · 0.85

Calls 5

flattenHistoryFunction · 0.85
listBundleFunction · 0.85
stringOrDashFunction · 0.85
formatTimeFunction · 0.85
compactJSONFunction · 0.70

Tested by 1