MCPcopy Create free account
hub / github.com/simstudioai/sim / getLegacyStarterMode

Function getLegacyStarterMode

apps/sim/lib/workflows/triggers/triggers.ts:233–241  ·  view source on GitHub ↗
(block: {
  subBlocks?: Record<string, unknown>
})

Source from the content-addressed store, hash-verified

231}
232
233export function getLegacyStarterMode(block: {
234 subBlocks?: Record<string, unknown>
235}): 'manual' | 'api' | 'chat' | null {
236 const modeValue = readSubBlockValue(block.subBlocks, 'startWorkflow')
237 if (modeValue === 'chat') return 'chat'
238 if (modeValue === 'api' || modeValue === 'run') return 'api'
239 if (modeValue === undefined || modeValue === 'manual') return 'manual'
240 return null
241}
242
243/**
244 * Mapping from reference alias (used in inline refs like <api.*>, <chat.*>, etc.)

Callers 1

resolveInputKindFunction · 0.90

Calls 1

readSubBlockValueFunction · 0.70

Tested by

no test coverage detected