MCPcopy
hub / github.com/codeaashu/claude-code / BackgroundTaskStatus

Function BackgroundTaskStatus

src/components/tasks/BackgroundTaskStatus.tsx:25–234  ·  view source on GitHub ↗
(t0)

Source from the content-addressed store, hash-verified

23 onOpenDialog?: (taskId?: string) => void;
24};
25export function BackgroundTaskStatus(t0) {
26 const $ = _c(48);
27 const {
28 tasksSelected,
29 isViewingTeammate,
30 teammateFooterIndex: t1,
31 isLeaderIdle: t2,
32 onOpenDialog
33 } = t0;
34 const teammateFooterIndex = t1 === undefined ? 0 : t1;
35 const isLeaderIdle = t2 === undefined ? false : t2;
36 const setAppState = useSetAppState();
37 const {
38 columns
39 } = useTerminalSize();
40 const tasks = useAppState(_temp);
41 const viewingAgentTaskId = useAppState(_temp2);
42 let t3;
43 if ($[0] !== tasks) {
44 t3 = (Object.values(tasks ?? {}) as TaskState[]).filter(_temp3);
45 $[0] = tasks;
46 $[1] = t3;
47 } else {
48 t3 = $[1];
49 }
50 const runningTasks = t3;
51 const expandedView = useAppState(_temp4);
52 const showSpinnerTree = expandedView === "teammates";
53 const allTeammates = !showSpinnerTree && runningTasks.length > 0 && runningTasks.every(_temp5);
54 let t4;
55 if ($[2] !== runningTasks) {
56 t4 = runningTasks.filter(_temp6).sort(_temp7);
57 $[2] = runningTasks;
58 $[3] = t4;
59 } else {
60 t4 = $[3];
61 }
62 const teammateEntries = t4;
63 let t5;
64 if ($[4] !== isLeaderIdle) {
65 t5 = {
66 name: "main",
67 color: undefined as keyof Theme | undefined,
68 isIdle: isLeaderIdle,
69 taskId: undefined as string | undefined
70 };
71 $[4] = isLeaderIdle;
72 $[5] = t5;
73 } else {
74 t5 = $[5];
75 }
76 const mainPill = t5;
77 let t6;
78 if ($[6] !== mainPill || $[7] !== tasksSelected || $[8] !== teammateEntries) {
79 const teammatePills = teammateEntries.map(_temp8);
80 if (!tasksSelected) {
81 teammatePills.sort(_temp9);
82 }

Callers

nothing calls this directly

Calls 11

useSetAppStateFunction · 0.85
useTerminalSizeFunction · 0.85
useAppStateFunction · 0.85
enterTeammateViewFunction · 0.85
exitTeammateViewFunction · 0.85
shouldHideTasksFooterFunction · 0.85
getPillLabelFunction · 0.85
pillNeedsCtaFunction · 0.85
valuesMethod · 0.80
maxMethod · 0.80

Tested by

no test coverage detected