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

Function normalizeLegacyStarterMode

apps/sim/executor/utils/start-block.ts:144–149  ·  view source on GitHub ↗
(modeValue: unknown)

Source from the content-addressed store, hash-verified

142}
143
144function normalizeLegacyStarterMode(modeValue: unknown): 'manual' | 'api' | 'chat' | null {
145 if (modeValue === 'chat') return 'chat'
146 if (modeValue === 'api' || modeValue === 'run') return 'api'
147 if (modeValue === undefined || modeValue === 'manual') return 'manual'
148 return null
149}
150
151function getSerializedLegacyStarterMode(block: SerializedBlock): 'manual' | 'api' | 'chat' | null {
152 const fromMetadata = readMetadataSubBlockValue(block, 'startWorkflow')

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected