MCPcopy Index your code
hub / github.com/simstudioai/sim / extractInputFormat

Function extractInputFormat

apps/sim/executor/utils/start-block.ts:130–142  ·  view source on GitHub ↗
(block: SerializedBlock)

Source from the content-addressed store, hash-verified

128}
129
130function extractInputFormat(block: SerializedBlock): InputFormatField[] {
131 const fromMetadata = readMetadataSubBlockValue(block, 'inputFormat')
132 const fromParams = block.config?.params?.inputFormat
133 const source = fromMetadata ?? fromParams
134
135 if (!Array.isArray(source)) {
136 return []
137 }
138
139 return source
140 .filter((field): field is InputFormatField => isRecordLike(field))
141 .map((field) => field)
142}
143
144function normalizeLegacyStarterMode(modeValue: unknown): 'manual' | 'api' | 'chat' | null {
145 if (modeValue === 'chat') return 'chat'

Callers 1

buildStartBlockOutputFunction · 0.85

Calls 2

isRecordLikeFunction · 0.90

Tested by

no test coverage detected