@@ -61,7 +61,6 @@ import {
6161} from '@/app/workspace/[workspaceId]/w/[workflowId]/utils'
6262import { useSocket } from '@/app/workspace/providers/socket-provider'
6363import { getBlock } from '@/blocks'
64- import { isAnnotationOnlyBlock } from '@/executor/constants'
6564import { useWorkspaceEnvironment } from '@/hooks/queries/environment'
6665import { useAutoConnect , useSnapToGridSize } from '@/hooks/queries/general-settings'
6766import { useCanvasViewport } from '@/hooks/use-canvas-viewport'
@@ -1100,7 +1099,6 @@ const WorkflowContent = React.memo(() => {
11001099 const isAutoConnectSourceCandidate = useCallback ( ( block : BlockState ) : boolean => {
11011100 if ( ! block . enabled ) return false
11021101 if ( block . type === 'response' ) return false
1103- if ( isAnnotationOnlyBlock ( block . type ) ) return false
11041102 return true
11051103 } , [ ] )
11061104
@@ -1248,26 +1246,13 @@ const WorkflowContent = React.memo(() => {
12481246 position : { x : number ; y : number } ,
12491247 targetBlockId : string ,
12501248 options : {
1251- blockType : string
1252- enableTriggerMode ?: boolean
12531249 targetParentId ?: string | null
12541250 existingChildBlocks ?: { id : string ; type : string ; position : { x : number ; y : number } } [ ]
12551251 containerId ?: string
12561252 }
12571253 ) : Edge | undefined => {
12581254 if ( ! autoConnectRef . current ) return undefined
12591255
1260- // Don't auto-connect starter or annotation-only blocks
1261- if ( options . blockType === 'starter' || isAnnotationOnlyBlock ( options . blockType ) ) {
1262- return undefined
1263- }
1264-
1265- // Check if target is a trigger block
1266- const targetBlockConfig = getBlock ( options . blockType )
1267- const isTargetTrigger =
1268- options . enableTriggerMode || targetBlockConfig ?. category === 'triggers'
1269- if ( isTargetTrigger ) return undefined
1270-
12711256 // Case 1: Adding block inside a container with existing children
12721257 if ( options . existingChildBlocks && options . existingChildBlocks . length > 0 ) {
12731258 const closestBlock = findClosestBlockInSet ( options . existingChildBlocks , position )
@@ -1375,7 +1360,6 @@ const WorkflowContent = React.memo(() => {
13751360 const name = getUniqueBlockName ( baseName , blocks )
13761361
13771362 const autoConnectEdge = tryCreateAutoConnectEdge ( position , id , {
1378- blockType : data . type ,
13791363 targetParentId : null ,
13801364 } )
13811365
@@ -1446,8 +1430,6 @@ const WorkflowContent = React.memo(() => {
14461430 . map ( ( b ) => ( { id : b . id , type : b . type , position : b . position } ) )
14471431
14481432 const autoConnectEdge = tryCreateAutoConnectEdge ( relativePosition , id , {
1449- blockType : data . type ,
1450- enableTriggerMode : data . enableTriggerMode ,
14511433 targetParentId : containerInfo . loopId ,
14521434 existingChildBlocks,
14531435 containerId : containerInfo . loopId ,
@@ -1476,8 +1458,6 @@ const WorkflowContent = React.memo(() => {
14761458 if ( checkTriggerConstraints ( data . type ) ) return
14771459
14781460 const autoConnectEdge = tryCreateAutoConnectEdge ( position , id , {
1479- blockType : data . type ,
1480- enableTriggerMode : data . enableTriggerMode ,
14811461 targetParentId : null ,
14821462 } )
14831463
@@ -1533,7 +1513,6 @@ const WorkflowContent = React.memo(() => {
15331513 const name = getUniqueBlockName ( baseName , blocks )
15341514
15351515 const autoConnectEdge = tryCreateAutoConnectEdge ( basePosition , id , {
1536- blockType : type ,
15371516 targetParentId : null ,
15381517 } )
15391518
@@ -1569,8 +1548,6 @@ const WorkflowContent = React.memo(() => {
15691548 const name = getUniqueBlockName ( baseName , blocks )
15701549
15711550 const autoConnectEdge = tryCreateAutoConnectEdge ( basePosition , id , {
1572- blockType : type ,
1573- enableTriggerMode,
15741551 targetParentId : null ,
15751552 } )
15761553
@@ -2371,18 +2348,6 @@ const WorkflowContent = React.memo(() => {
23712348
23722349 if ( ! sourceNode || ! targetNode ) return
23732350
2374- if (
2375- isAnnotationOnlyBlock ( sourceNode . data ?. type ) ||
2376- isAnnotationOnlyBlock ( targetNode . data ?. type )
2377- ) {
2378- return
2379- }
2380-
2381- const targetBlock = blocks [ targetNode . id ]
2382- if ( targetBlock && TriggerUtils . isTriggerBlock ( targetBlock ) ) {
2383- return
2384- }
2385-
23862351 // Get parent information (handle container start node case)
23872352 const sourceParentId =
23882353 blocks [ sourceNode . id ] ?. data ?. parentId ||
@@ -2788,7 +2753,6 @@ const WorkflowContent = React.memo(() => {
27882753 . map ( ( b ) => ( { id : b . id , type : b . type , position : b . position } ) )
27892754
27902755 const autoConnectEdge = tryCreateAutoConnectEdge ( relativePositionBefore , node . id , {
2791- blockType : node . data ?. type || '' ,
27922756 targetParentId : potentialParentId ,
27932757 existingChildBlocks,
27942758 containerId : potentialParentId ,
0 commit comments