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

Function ShellTimeDisplay

src/components/shell/ShellTimeDisplay.tsx:9–73  ·  view source on GitHub ↗
(t0)

Source from the content-addressed store, hash-verified

7 timeoutMs?: number;
8};
9export function ShellTimeDisplay(t0) {
10 const $ = _c(10);
11 const {
12 elapsedTimeSeconds,
13 timeoutMs
14 } = t0;
15 if (elapsedTimeSeconds === undefined && !timeoutMs) {
16 return null;
17 }
18 let t1;
19 if ($[0] !== timeoutMs) {
20 t1 = timeoutMs ? formatDuration(timeoutMs, {
21 hideTrailingZeros: true
22 }) : undefined;
23 $[0] = timeoutMs;
24 $[1] = t1;
25 } else {
26 t1 = $[1];
27 }
28 const timeout = t1;
29 if (elapsedTimeSeconds === undefined) {
30 const t2 = `(timeout ${timeout})`;
31 let t3;
32 if ($[2] !== t2) {
33 t3 = <Text dimColor={true}>{t2}</Text>;
34 $[2] = t2;
35 $[3] = t3;
36 } else {
37 t3 = $[3];
38 }
39 return t3;
40 }
41 const t2 = elapsedTimeSeconds * 1000;
42 let t3;
43 if ($[4] !== t2) {
44 t3 = formatDuration(t2);
45 $[4] = t2;
46 $[5] = t3;
47 } else {
48 t3 = $[5];
49 }
50 const elapsed = t3;
51 if (timeout) {
52 const t4 = `(${elapsed} · timeout ${timeout})`;
53 let t5;
54 if ($[6] !== t4) {
55 t5 = <Text dimColor={true}>{t4}</Text>;
56 $[6] = t4;
57 $[7] = t5;
58 } else {
59 t5 = $[7];
60 }
61 return t5;
62 }
63 const t4 = `(${elapsed})`;
64 let t5;
65 if ($[8] !== t4) {
66 t5 = <Text dimColor={true}>{t4}</Text>;

Callers

nothing calls this directly

Calls 1

formatDurationFunction · 0.50

Tested by

no test coverage detected