MCPcopy
hub / github.com/simstudioai/sim / collectInputFormatFiles

Function collectInputFormatFiles

apps/sim/lib/workflows/input-format.ts:129–138  ·  view source on GitHub ↗
(inputFormatValue: unknown)

Source from the content-addressed store, hash-verified

127 * them straight to the executor's file channel without a re-upload.
128 */
129export function collectInputFormatFiles(inputFormatValue: unknown): InputFormatFile[] {
130 if (!Array.isArray(inputFormatValue)) return []
131 return inputFormatValue.flatMap((field) =>
132 field &&
133 typeof field === 'object' &&
134 isFileFieldType((field as { type?: unknown }).type as string)
135 ? parseInputFormatFiles((field as { value?: unknown }).value)
136 : []
137 )
138}
139
140/**
141 * Extracts input fields from workflow blocks.

Callers 2

buildInputFormatInputFunction · 0.90

Calls 2

isFileFieldTypeFunction · 0.85
parseInputFormatFilesFunction · 0.85

Tested by

no test coverage detected