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

Function classifyStartBlock

apps/sim/lib/workflows/triggers/triggers.ts:110–125  ·  view source on GitHub ↗
(block: T)

Source from the content-addressed store, hash-verified

108}
109
110export function classifyStartBlock<T extends MinimalBlock>(block: T): StartBlockPath | null {
111 const blockState = block as Partial<BlockState>
112
113 // Try to get metadata from the block itself first
114 let category: string | undefined
115 const triggerModeEnabled = Boolean(blockState.triggerMode)
116
117 // If not available on the block, fetch from registry
118 const blockConfig = getBlock(block.type)
119
120 if (blockConfig) {
121 category = blockConfig.category
122 }
123
124 return classifyStartBlockType(block.type, { category, triggerModeEnabled })
125}
126
127export function isLegacyStartPath(path: StartBlockPath): boolean {
128 return path !== StartBlockPath.UNIFIED

Callers 1

resolveStartCandidatesFunction · 0.85

Calls 2

getBlockFunction · 0.90
classifyStartBlockTypeFunction · 0.85

Tested by

no test coverage detected