MCPcopy Create free account
hub / github.com/AnukarOP/claude-code-leaked / cacheImagePath

Function cacheImagePath

source code/utils/imageStore.ts:43–51  ·  view source on GitHub ↗
(content: PastedContent)

Source from the content-addressed store, hash-verified

41 * Cache the image path immediately (fast, no file I/O).
42 */
43export function cacheImagePath(content: PastedContent): string | null {
44 if (content.type !== 'image') {
45 return null
46 }
47 const imagePath = getImagePath(content.id, content.mediaType || 'image/png')
48 evictOldestIfAtCap()
49 storedImagePaths.set(content.id, imagePath)
50 return imagePath
51}
52
53/**
54 * Store an image from pastedContents to disk.

Callers 3

onImagePasteFunction · 0.85
onImagePasteFunction · 0.85

Calls 3

getImagePathFunction · 0.85
evictOldestIfAtCapFunction · 0.85
setMethod · 0.80

Tested by

no test coverage detected