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

Function DiffDetailView

src/components/diff/DiffDetailView.tsx:25–280  ·  view source on GitHub ↗
(t0)

Source from the content-addressed store, hash-verified

23 * No scrolling - renders all lines (max 400 due to parsing limits).
24 */
25export function DiffDetailView(t0) {
26 const $ = _c(53);
27 const {
28 filePath,
29 hunks,
30 isLargeFile,
31 isBinary,
32 isTruncated,
33 isUntracked
34 } = t0;
35 const {
36 columns
37 } = useTerminalSize();
38 let t1;
39 bb0: {
40 if (!filePath) {
41 let t2;
42 if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
43 t2 = {
44 firstLine: null,
45 fileContent: undefined
46 };
47 $[0] = t2;
48 } else {
49 t2 = $[0];
50 }
51 t1 = t2;
52 break bb0;
53 }
54 let content;
55 let t2;
56 if ($[1] !== filePath) {
57 const fullPath = resolve(getCwd(), filePath);
58 content = readFileSafe(fullPath);
59 t2 = content?.split("\n")[0] ?? null;
60 $[1] = filePath;
61 $[2] = content;
62 $[3] = t2;
63 } else {
64 content = $[2];
65 t2 = $[3];
66 }
67 const t3 = content ?? undefined;
68 let t4;
69 if ($[4] !== t2 || $[5] !== t3) {
70 t4 = {
71 firstLine: t2,
72 fileContent: t3
73 };
74 $[4] = t2;
75 $[5] = t3;
76 $[6] = t4;
77 } else {
78 t4 = $[6];
79 }
80 t1 = t4;
81 }
82 const {

Callers

nothing calls this directly

Calls 4

useTerminalSizeFunction · 0.85
getCwdFunction · 0.85
readFileSafeFunction · 0.85
resolveFunction · 0.50

Tested by

no test coverage detected