(flows: AutonomyFlowRecord[])
| 1017 | } |
| 1018 | |
| 1019 | export function formatAutonomyFlowsStatus(flows: AutonomyFlowRecord[]): string { |
| 1020 | const counts = { |
| 1021 | queued: 0, |
| 1022 | running: 0, |
| 1023 | waiting: 0, |
| 1024 | blocked: 0, |
| 1025 | succeeded: 0, |
| 1026 | failed: 0, |
| 1027 | cancelled: 0, |
| 1028 | lost: 0, |
| 1029 | } |
| 1030 | for (const flow of flows) { |
| 1031 | counts[flow.status] += 1 |
| 1032 | } |
| 1033 | return [ |
| 1034 | `Autonomy flows: ${flows.length}`, |
| 1035 | `Queued: ${counts.queued}`, |
| 1036 | `Running: ${counts.running}`, |
| 1037 | `Waiting: ${counts.waiting}`, |
| 1038 | `Blocked: ${counts.blocked}`, |
| 1039 | `Succeeded: ${counts.succeeded}`, |
| 1040 | `Failed: ${counts.failed}`, |
| 1041 | `Cancelled: ${counts.cancelled}`, |
| 1042 | ].join('\n') |
| 1043 | } |
| 1044 | |
| 1045 | export function formatAutonomyFlowsList( |
| 1046 | flows: AutonomyFlowRecord[], |
no outgoing calls
no test coverage detected