MCPcopy Create free account
hub / github.com/codeaashu/claude-code / getTaskStatusIcon

Function getTaskStatusIcon

src/components/tasks/taskStatusUtils.tsx:23–45  ·  view source on GitHub ↗
(status: TaskStatus, options?: {
  isIdle?: boolean;
  awaitingApproval?: boolean;
  hasError?: boolean;
  shutdownRequested?: boolean;
})

Source from the content-addressed store, hash-verified

21 * Returns the appropriate icon for a task based on status and state flags.
22 */
23export function getTaskStatusIcon(status: TaskStatus, options?: {
24 isIdle?: boolean;
25 awaitingApproval?: boolean;
26 hasError?: boolean;
27 shutdownRequested?: boolean;
28}): string {
29 const {
30 isIdle,
31 awaitingApproval,
32 hasError,
33 shutdownRequested
34 } = options ?? {};
35 if (hasError) return figures.cross;
36 if (awaitingApproval) return figures.questionMarkPrefix;
37 if (shutdownRequested) return figures.warning;
38 if (status === 'running') {
39 if (isIdle) return figures.ellipsis;
40 return figures.play;
41 }
42 if (status === 'completed') return figures.tick;
43 if (status === 'failed' || status === 'killed') return figures.cross;
44 return figures.bullet;
45}
46
47/**
48 * Returns the appropriate semantic color for a task based on status and state flags.

Callers 1

AsyncAgentDetailDialogFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected