MCPcopy Create free account
hub / github.com/anomalyco/opencode / cacheKey

Function cacheKey

packages/session-ui/src/components/file.tsx:1087–1090  ·  view source on GitHub ↗
(contents: string)

Source from the content-addressed store, hash-verified

1085 onCleanup(done)
1086
1087 const cacheKey = (contents: string) => {
1088 if (!large()) return sampledChecksum(contents, contents.length)
1089 return sampledChecksum(contents)
1090 }
1091
1092 const before = local.before
1093 ? { ...local.before, contents: beforeContents, cacheKey: cacheKey(beforeContents) }

Callers 1

DiffViewerFunction · 0.70

Calls 1

sampledChecksumFunction · 0.90

Tested by

no test coverage detected