MCPcopy Create free account
hub / github.com/AnukarOP/claude-code-leaked / MessageTimestamp

Function MessageTimestamp

source code/components/MessageTimestamp.tsx:12–61  ·  view source on GitHub ↗
(t0)

Source from the content-addressed store, hash-verified

10 isTranscriptMode: boolean;
11};
12export function MessageTimestamp(t0) {
13 const $ = _c(10);
14 const {
15 message,
16 isTranscriptMode
17 } = t0;
18 const shouldShowTimestamp = isTranscriptMode && message.timestamp && message.type === "assistant" && message.message.content.some(_temp);
19 if (!shouldShowTimestamp) {
20 return null;
21 }
22 let T0;
23 let formattedTimestamp;
24 let t1;
25 if ($[0] !== message.timestamp) {
26 formattedTimestamp = new Date(message.timestamp).toLocaleTimeString("en-US", {
27 hour: "2-digit",
28 minute: "2-digit",
29 hour12: true
30 });
31 T0 = Box;
32 t1 = stringWidth(formattedTimestamp);
33 $[0] = message.timestamp;
34 $[1] = T0;
35 $[2] = formattedTimestamp;
36 $[3] = t1;
37 } else {
38 T0 = $[1];
39 formattedTimestamp = $[2];
40 t1 = $[3];
41 }
42 let t2;
43 if ($[4] !== formattedTimestamp) {
44 t2 = <Text dimColor={true}>{formattedTimestamp}</Text>;
45 $[4] = formattedTimestamp;
46 $[5] = t2;
47 } else {
48 t2 = $[5];
49 }
50 let t3;
51 if ($[6] !== T0 || $[7] !== t1 || $[8] !== t2) {
52 t3 = <T0 minWidth={t1}>{t2}</T0>;
53 $[6] = T0;
54 $[7] = t1;
55 $[8] = t2;
56 $[9] = t3;
57 } else {
58 t3 = $[9];
59 }
60 return t3;
61}
62function _temp(c) {
63 return c.type === "text";
64}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected