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

Function FileItem

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

Source from the content-addressed store, hash-verified

152 return t6;
153}
154function FileItem(t0) {
155 const $ = _c(14);
156 const {
157 file,
158 isSelected,
159 maxPathWidth
160 } = t0;
161 let t1;
162 if ($[0] !== file.path || $[1] !== maxPathWidth) {
163 t1 = truncateStartToWidth(file.path, maxPathWidth);
164 $[0] = file.path;
165 $[1] = maxPathWidth;
166 $[2] = t1;
167 } else {
168 t1 = $[2];
169 }
170 const displayPath = t1;
171 const pointer = isSelected ? figures.pointer + " " : " ";
172 const line = `${pointer}${displayPath}`;
173 const t2 = isSelected ? "background" : undefined;
174 let t3;
175 if ($[3] !== isSelected || $[4] !== line || $[5] !== t2) {
176 t3 = <Text bold={isSelected} color={t2} inverse={isSelected}>{line}</Text>;
177 $[3] = isSelected;
178 $[4] = line;
179 $[5] = t2;
180 $[6] = t3;
181 } else {
182 t3 = $[6];
183 }
184 let t4;
185 if ($[7] === Symbol.for("react.memo_cache_sentinel")) {
186 t4 = <Box flexGrow={1} />;
187 $[7] = t4;
188 } else {
189 t4 = $[7];
190 }
191 let t5;
192 if ($[8] !== file || $[9] !== isSelected) {
193 t5 = <FileStats file={file} isSelected={isSelected} />;
194 $[8] = file;
195 $[9] = isSelected;
196 $[10] = t5;
197 } else {
198 t5 = $[10];
199 }
200 let t6;
201 if ($[11] !== t3 || $[12] !== t5) {
202 t6 = <Box flexDirection="row">{t3}{t4}{t5}</Box>;
203 $[11] = t3;
204 $[12] = t5;
205 $[13] = t6;
206 } else {
207 t6 = $[13];
208 }
209 return t6;
210}
211function FileStats(t0) {

Callers

nothing calls this directly

Calls 1

truncateStartToWidthFunction · 0.85

Tested by

no test coverage detected