@@ -124,6 +124,7 @@ export function getAllTriggerBlocks(): TriggerInfo[] {
124124 icon : block . icon ,
125125 color : block . bgColor ,
126126 category : 'core' ,
127+ enableTriggerMode : hasTriggerCapability ( block ) ,
127128 } )
128129 }
129130 // Check if it's a tool with trigger capability (has trigger-config subblock)
@@ -153,16 +154,20 @@ export function getAllTriggerBlocks(): TriggerInfo[] {
153154 * Check if a block has trigger capability (contains trigger mode subblocks)
154155 */
155156export function hasTriggerCapability ( block : BlockConfig ) : boolean {
156- // Pure trigger blocks (category === 'triggers') should NOT have trigger mode enabled
157- // They ARE triggers, not blocks that can optionally become triggers
157+ // Check if any subblocks have trigger mode
158+ const hasTriggerModeSubBlocks = block . subBlocks . some ( ( subBlock ) => subBlock . mode === 'trigger' )
159+
160+ // If this is a pure trigger block (category === 'triggers'), only enable trigger mode
161+ // if it has subblocks with mode: 'trigger' (e.g., webhook, schedule)
162+ // Pure input triggers like start_trigger don't have trigger mode subblocks
158163 if ( block . category === 'triggers' ) {
159- return false
164+ return hasTriggerModeSubBlocks
160165 }
161166
162- // Only non -trigger blocks that have trigger capability should enable trigger mode
167+ // Non -trigger blocks can have trigger capability
163168 return (
164169 ( block . triggers ?. enabled === true && block . triggers . available . length > 0 ) ||
165- block . subBlocks . some ( ( subBlock ) => subBlock . mode === 'trigger' )
170+ hasTriggerModeSubBlocks
166171 )
167172}
168173
0 commit comments