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

Function DiffFileList

source code/components/diff/DiffFileList.tsx:16–153  ·  view source on GitHub ↗
(t0)

Source from the content-addressed store, hash-verified

14 selectedIndex: number;
15};
16export function DiffFileList(t0) {
17 const $ = _c(36);
18 const {
19 files,
20 selectedIndex
21 } = t0;
22 const {
23 columns
24 } = useTerminalSize();
25 let t1;
26 bb0: {
27 if (files.length === 0 || files.length <= MAX_VISIBLE_FILES) {
28 let t2;
29 if ($[0] !== files.length) {
30 t2 = {
31 startIndex: 0,
32 endIndex: files.length
33 };
34 $[0] = files.length;
35 $[1] = t2;
36 } else {
37 t2 = $[1];
38 }
39 t1 = t2;
40 break bb0;
41 }
42 let start = Math.max(0, selectedIndex - Math.floor(MAX_VISIBLE_FILES / 2));
43 let end = start + MAX_VISIBLE_FILES;
44 if (end > files.length) {
45 end = files.length;
46 start = Math.max(0, end - MAX_VISIBLE_FILES);
47 }
48 let t2;
49 if ($[2] !== end || $[3] !== start) {
50 t2 = {
51 startIndex: start,
52 endIndex: end
53 };
54 $[2] = end;
55 $[3] = start;
56 $[4] = t2;
57 } else {
58 t2 = $[4];
59 }
60 t1 = t2;
61 }
62 const {
63 startIndex,
64 endIndex
65 } = t1;
66 if (files.length === 0) {
67 let t2;
68 if ($[5] === Symbol.for("react.memo_cache_sentinel")) {
69 t2 = <Text dimColor={true}>No changed files</Text>;
70 $[5] = t2;
71 } else {
72 t2 = $[5];
73 }

Callers

nothing calls this directly

Calls 3

useTerminalSizeFunction · 0.85
pluralFunction · 0.85
maxMethod · 0.80

Tested by

no test coverage detected