MCPcopy Create free account
hub / github.com/Zoo-Code-Org/Zoo-Code / appendImages

Function appendImages

webview-ui/src/utils/imageUtils.ts:10–17  ·  view source on GitHub ↗
(currentImages: string[], newImages: string[] | undefined, maxImages: number)

Source from the content-addressed store, hash-verified

8 * @returns The updated images array
9 */
10export function appendImages(currentImages: string[], newImages: string[] | undefined, maxImages: number): string[] {
11 const imagesToAdd = newImages ?? []
12 if (imagesToAdd.length === 0) {
13 return currentImages
14 }
15
16 return [...currentImages, ...imagesToAdd].slice(0, maxImages)
17}

Callers 2

handleMessageFunction · 0.90
ChatViewComponentFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected