Skip to content
Preview
  export function cacheKey(id: string) {    const version = store.version;  Removed   return id.toLowerCase();  Added   return normalizeCacheKey(id) + ":" + version;  }

FileDiff

pathrequired
string
The file's path, as git prints it.
oldPath
string
Its path before a rename.
linesrequired
readonly FileDiffLine[]
Its lines, in file order. May grow while status is "streaming".
status
"streaming" | "complete"
Default: "complete"
"streaming": the header is live and the region busy.
maxLines
number
The lines it shows before it scrolls; its end stays in view while the change is applied. Without it the diff is as tall as its lines.
open
boolean
Controlled open state.
defaultOpen
boolean
Default: false
Open when it arrives.
onOpenChange
(open: boolean, details: OpenChangeDetails) => void
Called when the header toggles it.
rootStyle
RootStyle<FileDiffKnobs>
Typed StyleX override: where the diff sits and its --file-diff-* knobs.

State machine

PreviewThe file header shows the change counts.
  function release() {  Removed   return build();  Added   return checkBuild();  }