(t0)
| 15 | maxActivityWidth?: number; |
| 16 | }; |
| 17 | export function BackgroundTask(t0) { |
| 18 | const $ = _c(92); |
| 19 | const { |
| 20 | task, |
| 21 | maxActivityWidth |
| 22 | } = t0; |
| 23 | const activityLimit = maxActivityWidth ?? 40; |
| 24 | switch (task.type) { |
| 25 | case "local_bash": |
| 26 | { |
| 27 | const t1 = task.kind === "monitor" ? task.description : task.command; |
| 28 | let t2; |
| 29 | if ($[0] !== activityLimit || $[1] !== t1) { |
| 30 | t2 = truncate(t1, activityLimit, true); |
| 31 | $[0] = activityLimit; |
| 32 | $[1] = t1; |
| 33 | $[2] = t2; |
| 34 | } else { |
| 35 | t2 = $[2]; |
| 36 | } |
| 37 | let t3; |
| 38 | if ($[3] !== task) { |
| 39 | t3 = <ShellProgress shell={task} />; |
| 40 | $[3] = task; |
| 41 | $[4] = t3; |
| 42 | } else { |
| 43 | t3 = $[4]; |
| 44 | } |
| 45 | let t4; |
| 46 | if ($[5] !== t2 || $[6] !== t3) { |
| 47 | t4 = <Text>{t2}{" "}{t3}</Text>; |
| 48 | $[5] = t2; |
| 49 | $[6] = t3; |
| 50 | $[7] = t4; |
| 51 | } else { |
| 52 | t4 = $[7]; |
| 53 | } |
| 54 | return t4; |
| 55 | } |
| 56 | case "remote_agent": |
| 57 | { |
| 58 | if (task.isRemoteReview) { |
| 59 | let t1; |
| 60 | if ($[8] !== task) { |
| 61 | t1 = <Text><RemoteSessionProgress session={task} /></Text>; |
| 62 | $[8] = task; |
| 63 | $[9] = t1; |
| 64 | } else { |
| 65 | t1 = $[9]; |
| 66 | } |
| 67 | return t1; |
| 68 | } |
| 69 | const running = task.status === "running" || task.status === "pending"; |
| 70 | const t1 = running ? DIAMOND_OPEN : DIAMOND_FILLED; |
| 71 | let t2; |
| 72 | if ($[10] !== t1) { |
| 73 | t2 = <Text dimColor={true}>{t1} </Text>; |
| 74 | $[10] = t1; |
nothing calls this directly
no test coverage detected