MCPcopy
hub / github.com/codeaashu/claude-code / storeImages

Function storeImages

src/utils/imageStore.ts:84–99  ·  view source on GitHub ↗
(
  pastedContents: Record<number, PastedContent>,
)

Source from the content-addressed store, hash-verified

82 * Store all images from pastedContents to disk.
83 */
84export async function storeImages(
85 pastedContents: Record<number, PastedContent>,
86): Promise<Map<number, string>> {
87 const pathMap = new Map<number, string>()
88
89 for (const [id, content] of Object.entries(pastedContents)) {
90 if (content.type === 'image') {
91 const path = await storeImage(content)
92 if (path) {
93 pathMap.set(Number(id), path)
94 }
95 }
96 }
97
98 return pathMap
99}
100
101/**
102 * Get the file path for a stored image by ID.

Callers 1

processUserInputBaseFunction · 0.85

Calls 3

storeImageFunction · 0.85
entriesMethod · 0.80
setMethod · 0.45

Tested by

no test coverage detected