(
status: AgentContentBlock['status'],
theme: { primary: string; foreground: string; muted: string },
)
| 9 | |
| 10 | /** Get status indicator, label, color, and formatted text based on agent status */ |
| 11 | export function getAgentStatusInfo( |
| 12 | status: AgentContentBlock['status'], |
| 13 | theme: { primary: string; foreground: string; muted: string }, |
| 14 | ): StatusInfo { |
| 15 | switch (status) { |
| 16 | case 'running': |
| 17 | return { indicator: '●', label: 'running', color: theme.primary, text: '● running' } |
| 18 | case 'failed': |
| 19 | return { indicator: '✗', label: 'failed', color: 'red', text: '✗ failed' } |
| 20 | case 'complete': |
| 21 | return { indicator: '✓', label: 'completed', color: theme.foreground, text: 'completed ✓' } |
| 22 | case 'cancelled': |
| 23 | return { indicator: '⊘', label: 'cancelled', color: 'red', text: '⊘ cancelled' } |
| 24 | default: |
| 25 | return { indicator: '○', label: 'waiting', color: theme.muted, text: '○ waiting' } |
| 26 | } |
| 27 | } |
no outgoing calls
no test coverage detected