MCPcopy Index your code
hub / github.com/claude-code-best/claude-code / FileEditToolDiff

Function FileEditToolDiff

src/components/FileEditToolDiff.tsx:25–35  ·  view source on GitHub ↗
(props: Props)

Source from the content-addressed store, hash-verified

23};
24
25export function FileEditToolDiff(props: Props): React.ReactNode {
26 // Snapshot on mount — the diff must stay consistent even if the file changes
27 // while the dialog is open. useMemo on props.edits would re-read the file on
28 // every render because callers pass fresh array literals.
29 const [dataPromise] = useState(() => loadDiffData(props.file_path, props.edits));
30 return (
31 <Suspense fallback={<DiffFrame placeholder />}>
32 <DiffBody promise={dataPromise} file_path={props.file_path} />
33 </Suspense>
34 );
35}
36
37function DiffBody({ promise, file_path }: { promise: Promise<DiffData>; file_path: string }): React.ReactNode {
38 const { patch, firstLine, fileContent } = use(promise);

Callers

nothing calls this directly

Calls 1

loadDiffDataFunction · 0.70

Tested by

no test coverage detected