Orca is the place for working with a fleet of agents (e.g. Grok Bot, Claude Code). Run any coding agent with your own subscription. Available on desktop, mobile and remote runtime.
TypeScript adeagent-ideai-agentsautomationbotclaude-codecodexghosttygrok-bothermes-agentmobile-appmuseopenclawopencodeorchestrationpiruntimeterminalworktreesyc-backed
import type { RuntimeWorktreeAgentRow } from '../shared/runtime-types'
import {
programStatusAttentionLabel,
resolveProgramStatusPresentation
} from '../shared/program-status/presentation'
/** A block takes precedence over progress. */
export function formatWorktreePsProgramStatus(
agents: readonly RuntimeWorktreeAgentRow[] | undefined
): string {
let progress: number | undefined
for (const agent of agents ?? []) {
const presentation = resolveProgramStatusPresentation({
state: agent.state,
programStatus: agent.programStatus,
toolName: agent.toolName ?? undefined
})
if (presentation.attention) {
return ` (${programStatusAttentionLabel(presentation.attention)})`
}
progress ??= presentation.progress
}
return progress === undefined ? '' : ` ${progress}%`
}