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

Function SelectMatcherMode

src/components/hooks/SelectMatcherMode.tsx:28–128  ·  view source on GitHub ↗
(t0)

Source from the content-addressed store, hash-verified

26 onCancel: () => void;
27};
28export function SelectMatcherMode(t0) {
29 const $ = _c(25);
30 const {
31 selectedEvent,
32 matchersForSelectedEvent,
33 hooksByEventAndMatcher,
34 eventDescription,
35 onSelect,
36 onCancel
37 } = t0;
38 let t1;
39 if ($[0] !== hooksByEventAndMatcher || $[1] !== matchersForSelectedEvent || $[2] !== selectedEvent) {
40 let t2;
41 if ($[4] !== hooksByEventAndMatcher || $[5] !== selectedEvent) {
42 t2 = matcher => {
43 const hooks = hooksByEventAndMatcher[selectedEvent]?.[matcher] || [];
44 const sources = Array.from(new Set(hooks.map(_temp)));
45 return {
46 matcher,
47 sources,
48 hookCount: hooks.length
49 };
50 };
51 $[4] = hooksByEventAndMatcher;
52 $[5] = selectedEvent;
53 $[6] = t2;
54 } else {
55 t2 = $[6];
56 }
57 t1 = matchersForSelectedEvent.map(t2);
58 $[0] = hooksByEventAndMatcher;
59 $[1] = matchersForSelectedEvent;
60 $[2] = selectedEvent;
61 $[3] = t1;
62 } else {
63 t1 = $[3];
64 }
65 const matchersWithSources = t1;
66 if (matchersForSelectedEvent.length === 0) {
67 const t2 = `${selectedEvent} - Matchers`;
68 let t3;
69 if ($[7] === Symbol.for("react.memo_cache_sentinel")) {
70 t3 = <Box flexDirection="column" gap={1}><Text dimColor={true}>No hooks configured for this event.</Text><Text dimColor={true}>To add hooks, edit settings.json directly or ask Claude.</Text></Box>;
71 $[7] = t3;
72 } else {
73 t3 = $[7];
74 }
75 let t4;
76 if ($[8] !== eventDescription || $[9] !== onCancel || $[10] !== t2) {
77 t4 = <Dialog title={t2} subtitle={eventDescription} onCancel={onCancel} inputGuide={_temp2}>{t3}</Dialog>;
78 $[8] = eventDescription;
79 $[9] = onCancel;
80 $[10] = t2;
81 $[11] = t4;
82 } else {
83 t4 = $[11];
84 }
85 return t4;

Callers

nothing calls this directly

Calls 1

onSelectFunction · 0.50

Tested by

no test coverage detected