MCPcopy Create free account
hub / github.com/codeaashu/claude-code / ViewHookMode

Function ViewHookMode

src/components/hooks/ViewHookMode.tsx:17–161  ·  view source on GitHub ↗
(t0)

Source from the content-addressed store, hash-verified

15 onCancel: () => void;
16};
17export function ViewHookMode(t0) {
18 const $ = _c(40);
19 const {
20 selectedHook,
21 eventSupportsMatcher,
22 onCancel
23 } = t0;
24 let t1;
25 if ($[0] !== selectedHook.event) {
26 t1 = <Text>Event: <Text bold={true}>{selectedHook.event}</Text></Text>;
27 $[0] = selectedHook.event;
28 $[1] = t1;
29 } else {
30 t1 = $[1];
31 }
32 let t2;
33 if ($[2] !== eventSupportsMatcher || $[3] !== selectedHook.matcher) {
34 t2 = eventSupportsMatcher && <Text>Matcher: <Text bold={true}>{selectedHook.matcher || "(all)"}</Text></Text>;
35 $[2] = eventSupportsMatcher;
36 $[3] = selectedHook.matcher;
37 $[4] = t2;
38 } else {
39 t2 = $[4];
40 }
41 let t3;
42 if ($[5] !== selectedHook.config.type) {
43 t3 = <Text>Type: <Text bold={true}>{selectedHook.config.type}</Text></Text>;
44 $[5] = selectedHook.config.type;
45 $[6] = t3;
46 } else {
47 t3 = $[6];
48 }
49 let t4;
50 if ($[7] !== selectedHook.source) {
51 t4 = hookSourceDescriptionDisplayString(selectedHook.source);
52 $[7] = selectedHook.source;
53 $[8] = t4;
54 } else {
55 t4 = $[8];
56 }
57 let t5;
58 if ($[9] !== t4) {
59 t5 = <Text>Source:{" "}<Text dimColor={true}>{t4}</Text></Text>;
60 $[9] = t4;
61 $[10] = t5;
62 } else {
63 t5 = $[10];
64 }
65 let t6;
66 if ($[11] !== selectedHook.pluginName) {
67 t6 = selectedHook.pluginName && <Text>Plugin: <Text dimColor={true}>{selectedHook.pluginName}</Text></Text>;
68 $[11] = selectedHook.pluginName;
69 $[12] = t6;
70 } else {
71 t6 = $[12];
72 }
73 let t7;
74 if ($[13] !== t1 || $[14] !== t2 || $[15] !== t3 || $[16] !== t5 || $[17] !== t6) {

Callers

nothing calls this directly

Calls 3

getContentFieldLabelFunction · 0.85
getContentFieldValueFunction · 0.85

Tested by

no test coverage detected