MCPcopy Index your code
hub / github.com/ZenNotes/zennotes / readNoteContent

Function readNoteContent

packages/app-core/src/store.ts:2871–2881  ·  view source on GitHub ↗
(relPath: string, state: Store)

Source from the content-addressed store, hash-verified

2869}
2870
2871function readNoteContent(relPath: string, state: Store): Promise<NoteContent> {
2872 const cacheKey = noteReadCacheKey(state, relPath)
2873 const pending = noteReadPromises.get(cacheKey)
2874 if (pending) return pending
2875
2876 const next = window.zen.readNote(relPath).finally(() => {
2877 noteReadPromises.delete(cacheKey)
2878 })
2879 noteReadPromises.set(cacheKey, next)
2880 return next
2881}
2882
2883function rememberPrefetchedPath(path: string): void {
2884 const existing = prefetchedNotePaths.indexOf(path)

Callers 4

selectNoteImplFunction · 0.85
jumpThroughNoteHistoryFunction · 0.85
restoreWorkspaceForVaultFunction · 0.85
store.tsFile · 0.85

Calls 3

noteReadCacheKeyFunction · 0.85
deleteMethod · 0.80
readNoteMethod · 0.65

Tested by

no test coverage detected