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

Function wakeStateSection

internal/cli/authored_context.go:1324–1336  ·  view source on GitHub ↗
(title string, state contract.HeartbeatWakeStatePayload)

Source from the content-addressed store, hash-verified

1322}
1323
1324func wakeStateSection(title string, state contract.HeartbeatWakeStatePayload) string {
1325 return renderHumanSection(title, []keyValue{
1326 {Label: authoredContextSessionValue, Value: stringOrDash(state.SessionID)},
1327 {Label: authoredContextAgentValue, Value: stringOrDash(state.AgentName)},
1328 {Label: "Policy Snapshot", Value: stringOrDash(state.PolicySnapshotID)},
1329 {Label: "Last Wake", Value: stringOrDash(formatTimePtr(state.LastWakeAt))},
1330 {Label: "Next Allowed", Value: stringOrDash(formatTimePtr(state.NextAllowedAt))},
1331 {Label: "Coalesced", Value: strconv.Itoa(state.CoalescedCount)},
1332 {Label: "Last Result", Value: stringOrDash(string(state.LastResult))},
1333 {Label: "Last Reason", Value: stringOrDash(string(state.LastReason))},
1334 {Label: authoredContextUpdatedValue, Value: stringOrDash(formatTime(state.UpdatedAt))},
1335 })
1336}
1337
1338func diagnosticsTable(items []contract.AuthoredContextDiagnosticPayload) string {
1339 if len(items) == 0 {

Callers 3

sessionStatusBundleFunction · 0.85
sessionInspectBundleFunction · 0.85

Calls 4

renderHumanSectionFunction · 0.85
stringOrDashFunction · 0.85
formatTimePtrFunction · 0.85
formatTimeFunction · 0.85

Tested by

no test coverage detected