MCPcopy Index your code
hub / github.com/modem-dev/hunk / getCachedSectionGeometry

Function getCachedSectionGeometry

src/ui/diff/diffSectionGeometry.ts:117–124  ·  view source on GitHub ↗

Read one cached geometry entry when the exact active variant is still retained.

(
  file: DiffFile,
  slot: keyof SectionGeometryCacheSlots,
  cacheKey: string,
)

Source from the content-addressed store, hash-verified

115
116/** Read one cached geometry entry when the exact active variant is still retained. */
117function getCachedSectionGeometry(
118 file: DiffFile,
119 slot: keyof SectionGeometryCacheSlots,
120 cacheKey: string,
121) {
122 const cached = SECTION_GEOMETRY_CACHE.get(file)?.[slot];
123 return cached?.key === cacheKey ? cached.geometry : null;
124}
125
126/** Store one geometry entry, replacing stale variants for the same slot. */
127function setCachedSectionGeometry(

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected