MCPcopy Create free account
hub / github.com/claude-code-best/claude-code / formatAutonomyRunsStatus

Function formatAutonomyRunsStatus

src/utils/autonomyRuns.ts:1105–1129  ·  view source on GitHub ↗
(runs: AutonomyRunRecord[])

Source from the content-addressed store, hash-verified

1103}
1104
1105export function formatAutonomyRunsStatus(runs: AutonomyRunRecord[]): string {
1106 const counts = {
1107 queued: 0,
1108 running: 0,
1109 completed: 0,
1110 failed: 0,
1111 cancelled: 0,
1112 }
1113 for (const run of runs) {
1114 counts[run.status] += 1
1115 }
1116 const latest = runs[0]
1117 const latestLine = latest
1118 ? `Latest: ${latest.trigger} ${latest.status} (${new Date(latest.createdAt).toLocaleString()})`
1119 : 'Latest: none'
1120 return [
1121 `Autonomy runs: ${runs.length}`,
1122 `Queued: ${counts.queued}`,
1123 `Running: ${counts.running}`,
1124 `Completed: ${counts.completed}`,
1125 `Failed: ${counts.failed}`,
1126 `Cancelled: ${counts.cancelled}`,
1127 latestLine,
1128 ].join('\n')
1129}
1130
1131export function formatAutonomyRunsList(
1132 runs: AutonomyRunRecord[],

Callers 3

getAutonomyStatusTextFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected