MCPcopy
hub / github.com/simstudioai/sim / isTriggerBlock

Method isTriggerBlock

apps/sim/lib/workflows/triggers/triggers.ts:263–274  ·  view source on GitHub ↗

* Check if a block is any kind of trigger

(block: { type: string; triggerMode?: boolean })

Source from the content-addressed store, hash-verified

261 * Check if a block is any kind of trigger
262 */
263 static isTriggerBlock(block: { type: string; triggerMode?: boolean }): boolean {
264 const blockConfig = getBlock(block.type)
265
266 return (
267 // New trigger blocks (explicit category)
268 blockConfig?.category === 'triggers' ||
269 // Blocks with trigger mode enabled
270 block.triggerMode === true ||
271 // Legacy starter block
272 block.type === TRIGGER_TYPES.STARTER
273 )
274 }
275
276 /**
277 * Check if a block is a specific trigger type

Callers 3

validateEdgesFunction · 0.45
workflow.tsxFile · 0.45
BlockMenuFunction · 0.45

Calls 1

getBlockFunction · 0.90

Tested by

no test coverage detected