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

Function agentEventsBundle

internal/cli/session.go:1180–1205  ·  view source on GitHub ↗
(events []AgentEventRecord)

Source from the content-addressed store, hash-verified

1178}
1179
1180func agentEventsBundle(events []AgentEventRecord) outputBundle {
1181 return listBundle(
1182 events,
1183 events,
1184 "Prompt Events",
1185 []string{sessionTimestampValue, sessionTypeValue, "Detail", "Stop"},
1186 "prompt_events",
1187 []string{networkTimestampKey, extensionTypeKey, "detail", "stop_reason"},
1188 func(event AgentEventRecord) []string {
1189 return []string{
1190 stringOrDash(formatTime(event.Timestamp)),
1191 stringOrDash(event.Type),
1192 stringOrDash(firstNonEmpty(event.Text, event.Title, event.Error, compactJSON(event.Raw))),
1193 stringOrDash(event.StopReason),
1194 }
1195 },
1196 func(event AgentEventRecord) []string {
1197 return []string{
1198 formatTime(event.Timestamp),
1199 event.Type,
1200 firstNonEmpty(event.Text, event.Title, event.Error, compactJSON(event.Raw)),
1201 event.StopReason,
1202 }
1203 },
1204 )
1205}
1206
1207func sessionPromptBundle(record SessionPromptRecord) outputBundle {
1208 if record.Prompt.Status == "" && len(record.Events) > 0 {

Callers 2

sessionPromptBundleFunction · 0.85

Calls 5

listBundleFunction · 0.85
stringOrDashFunction · 0.85
formatTimeFunction · 0.85
firstNonEmptyFunction · 0.70
compactJSONFunction · 0.70

Tested by 1