MCPcopy Index your code
hub / github.com/deepnote/deepnote / addContentHashes

Function addContentHashes

packages/convert/src/snapshot/hash.ts:61–71  ·  view source on GitHub ↗
(file: DeepnoteFile)

Source from the content-addressed store, hash-verified

59 * @returns A new DeepnoteFile with content hashes added
60 */
61export function addContentHashes(file: DeepnoteFile): DeepnoteFile {
62 const result = structuredClone(file)
63 for (const notebook of result.project.notebooks) {
64 for (const block of notebook.blocks) {
65 if (!block.contentHash && block.content) {
66 ;(block as DeepnoteBlock & { contentHash?: string }).contentHash = computeContentHash(block.content)
67 }
68 }
69 }
70 return result
71}

Callers 2

splitDeepnoteFileFunction · 0.90
hash.test.tsFile · 0.90

Calls 1

computeContentHashFunction · 0.85

Tested by

no test coverage detected