MCPcopy Index your code
hub / github.com/CodebuffAI/codebuff / getAgentStatusInfo

Function getAgentStatusInfo

cli/src/utils/agent-helpers.ts:11–27  ·  view source on GitHub ↗
(
  status: AgentContentBlock['status'],
  theme: { primary: string; foreground: string; muted: string },
)

Source from the content-addressed store, hash-verified

9
10/** Get status indicator, label, color, and formatted text based on agent status */
11export 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}

Callers 2

Calls

no outgoing calls

Tested by

no test coverage detected