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

Function hasTriggerCapability

apps/sim/lib/workflows/triggers/trigger-utils.ts:209–220  ·  view source on GitHub ↗
(block: BlockConfig)

Source from the content-addressed store, hash-verified

207 * Check if a block has trigger capability (contains trigger mode subblocks)
208 */
209export function hasTriggerCapability(block: BlockConfig): boolean {
210 const hasTriggerModeSubBlocks = block.subBlocks.some((subBlock) => subBlock.mode === 'trigger')
211
212 if (block.category === 'triggers') {
213 return hasTriggerModeSubBlocks
214 }
215
216 return (
217 (block.triggers?.enabled === true && block.triggers.available.length > 0) ||
218 hasTriggerModeSubBlocks
219 )
220}
221
222/**
223 * Get blocks that should appear in the triggers tab

Callers 12

prepareBlockStateFunction · 0.90
getBlockReferenceTagsFunction · 0.90
executeGetBlockOutputsFunction · 0.90
createBlockFromParamsFunction · 0.90
SearchModalFunction · 0.90
toolbar.tsxFile · 0.90
getOutputTypeForPathFunction · 0.90
useBlockConnectionsFunction · 0.90
useBlockOutputFieldsFunction · 0.90
getRegistrySchemaFunction · 0.90
getAllTriggerBlocksFunction · 0.85
getTriggersForSidebarFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected