MCPcopy Index your code
hub / github.com/codeaashu/claude-code / TeammateViewHeader

Function TeammateViewHeader

src/components/TeammateViewHeader.tsx:14–78  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

12 * Displays teammate name (colored), task description, and exit hint.
13 */
14export function TeammateViewHeader() {
15 const $ = _c(14);
16 const viewedTeammate = useAppState(_temp);
17 if (!viewedTeammate) {
18 return null;
19 }
20 let t0;
21 if ($[0] !== viewedTeammate.identity.color) {
22 t0 = toInkColor(viewedTeammate.identity.color);
23 $[0] = viewedTeammate.identity.color;
24 $[1] = t0;
25 } else {
26 t0 = $[1];
27 }
28 const nameColor = t0;
29 let t1;
30 if ($[2] === Symbol.for("react.memo_cache_sentinel")) {
31 t1 = <Text>Viewing </Text>;
32 $[2] = t1;
33 } else {
34 t1 = $[2];
35 }
36 let t2;
37 if ($[3] !== nameColor || $[4] !== viewedTeammate.identity.agentName) {
38 t2 = <Text color={nameColor} bold={true}>@{viewedTeammate.identity.agentName}</Text>;
39 $[3] = nameColor;
40 $[4] = viewedTeammate.identity.agentName;
41 $[5] = t2;
42 } else {
43 t2 = $[5];
44 }
45 let t3;
46 if ($[6] === Symbol.for("react.memo_cache_sentinel")) {
47 t3 = <Text dimColor={true}>{" \xB7 "}<KeyboardShortcutHint shortcut="esc" action="return" /></Text>;
48 $[6] = t3;
49 } else {
50 t3 = $[6];
51 }
52 let t4;
53 if ($[7] !== t2) {
54 t4 = <Box>{t1}{t2}{t3}</Box>;
55 $[7] = t2;
56 $[8] = t4;
57 } else {
58 t4 = $[8];
59 }
60 let t5;
61 if ($[9] !== viewedTeammate.prompt) {
62 t5 = <Text dimColor={true}>{viewedTeammate.prompt}</Text>;
63 $[9] = viewedTeammate.prompt;
64 $[10] = t5;
65 } else {
66 t5 = $[10];
67 }
68 let t6;
69 if ($[11] !== t4 || $[12] !== t5) {
70 t6 = <OffscreenFreeze><Box flexDirection="column" marginBottom={1}>{t4}{t5}</Box></OffscreenFreeze>;
71 $[11] = t4;

Callers

nothing calls this directly

Calls 2

useAppStateFunction · 0.85
toInkColorFunction · 0.85

Tested by

no test coverage detected