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

Function SearchResultSummary

src/tools/GrepTool/UI.tsx:16–118  ·  view source on GitHub ↗
(t0)

Source from the content-addressed store, hash-verified

14
15// Reusable component for search result summaries
16function SearchResultSummary(t0) {
17 const $ = _c(26);
18 const {
19 count,
20 countLabel,
21 secondaryCount,
22 secondaryLabel,
23 content,
24 verbose
25 } = t0;
26 let t1;
27 if ($[0] !== count) {
28 t1 = <Text bold={true}>{count} </Text>;
29 $[0] = count;
30 $[1] = t1;
31 } else {
32 t1 = $[1];
33 }
34 let t2;
35 if ($[2] !== count || $[3] !== countLabel) {
36 t2 = count === 0 || count > 1 ? countLabel : countLabel.slice(0, -1);
37 $[2] = count;
38 $[3] = countLabel;
39 $[4] = t2;
40 } else {
41 t2 = $[4];
42 }
43 let t3;
44 if ($[5] !== t1 || $[6] !== t2) {
45 t3 = <Text>Found {t1}{t2}</Text>;
46 $[5] = t1;
47 $[6] = t2;
48 $[7] = t3;
49 } else {
50 t3 = $[7];
51 }
52 const primaryText = t3;
53 let t4;
54 if ($[8] !== secondaryCount || $[9] !== secondaryLabel) {
55 t4 = secondaryCount !== undefined && secondaryLabel ? <Text>{" "}across <Text bold={true}>{secondaryCount} </Text>{secondaryCount === 0 || secondaryCount > 1 ? secondaryLabel : secondaryLabel.slice(0, -1)}</Text> : null;
56 $[8] = secondaryCount;
57 $[9] = secondaryLabel;
58 $[10] = t4;
59 } else {
60 t4 = $[10];
61 }
62 const secondaryText = t4;
63 if (verbose) {
64 let t5;
65 if ($[11] === Symbol.for("react.memo_cache_sentinel")) {
66 t5 = <Text dimColor={true}>  ⎿  </Text>;
67 $[11] = t5;
68 } else {
69 t5 = $[11];
70 }
71 let t6;
72 if ($[12] !== primaryText || $[13] !== secondaryText) {
73 t6 = <Box flexDirection="row"><Text>{t5}{primaryText}{secondaryText}</Text></Box>;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected