MCPcopy Create free account
hub / github.com/modem-dev/hunk / buildSourceCacheKey

Function buildSourceCacheKey

src/ui/diff/useHighlightedSource.ts:24–26  ·  view source on GitHub ↗

Cache key for full-source highlights used by expanded unchanged rows.

(theme: AppTheme, file: DiffFile, text: string)

Source from the content-addressed store, hash-verified

22
23/** Cache key for full-source highlights used by expanded unchanged rows. */
24function buildSourceCacheKey(theme: AppTheme, file: DiffFile, text: string) {
25 return `${theme.id}:${theme.syntaxTheme ?? theme.appearance}:${file.id}:${file.path}:${file.language ?? ""}:${sourceTextFingerprint(text)}`;
26}
27
28/** Resolve highlighted full-source content for expanded unchanged rows. */
29export function useHighlightedSource({

Callers 1

useHighlightedSourceFunction · 0.85

Calls 1

sourceTextFingerprintFunction · 0.70

Tested by

no test coverage detected