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

Function extractValidInputFieldNames

apps/sim/executor/utils/lazy-cleanup.ts:15–24  ·  view source on GitHub ↗

* Extract valid field names from a child workflow's start block inputFormat * * @param childWorkflowBlocks - The blocks from the child workflow state * @returns Set of valid field names defined in the child's inputFormat

(childWorkflowBlocks: Record<string, any>)

Source from the content-addressed store, hash-verified

13 * @returns Set of valid field names defined in the child's inputFormat
14 */
15function extractValidInputFieldNames(childWorkflowBlocks: Record<string, any>): Set<string> | null {
16 const fields = extractInputFieldsFromBlocks(childWorkflowBlocks)
17
18 if (fields.length === 0) {
19 logger.debug('No inputFormat fields found in child workflow')
20 return null
21 }
22
23 return new Set(fields.map((field) => field.name))
24}
25
26/**
27 * Clean up orphaned inputMapping fields that don't exist in child workflow's inputFormat.

Callers 1

lazyCleanupInputMappingFunction · 0.85

Calls 2

debugMethod · 0.80

Tested by

no test coverage detected