@@ -5,15 +5,14 @@ import { SYSTEM_REFERENCE_PREFIXES } from '@/lib/workflows/sanitization/referenc
55import { isInputDefinitionTrigger } from '@/lib/workflows/triggers/input-definition-triggers'
66import { normalizeName } from '@/executor/constants'
77import { useWorkflowStore } from '@/stores/workflows/workflow/store'
8- import type { Loop , Parallel } from '@/stores/workflows/workflow/types'
8+ import type { Loop } from '@/stores/workflows/workflow/types'
99
1010export function useAccessibleReferencePrefixes ( blockId ?: string | null ) : Set < string > | undefined {
11- const { blocks, edges, loops, parallels } = useWorkflowStore (
11+ const { blocks, edges, loops } = useWorkflowStore (
1212 useShallow ( ( state ) => ( {
1313 blocks : state . blocks ,
1414 edges : state . edges ,
1515 loops : state . loops || { } ,
16- parallels : state . parallels || { } ,
1716 } ) )
1817 )
1918
@@ -40,14 +39,6 @@ export function useAccessibleReferencePrefixes(blockId?: string | null): Set<str
4039 }
4140 } )
4241
43- const parallelValues = Object . values ( parallels as Record < string , Parallel > )
44- parallelValues . forEach ( ( parallel ) => {
45- if ( ! parallel ?. nodes ) return
46- if ( parallel . nodes . includes ( blockId ) ) {
47- accessibleIds . add ( parallel . id )
48- }
49- } )
50-
5142 const prefixes = new Set < string > ( )
5243 accessibleIds . forEach ( ( id ) => {
5344 prefixes . add ( normalizeName ( id ) )
@@ -60,5 +51,5 @@ export function useAccessibleReferencePrefixes(blockId?: string | null): Set<str
6051 SYSTEM_REFERENCE_PREFIXES . forEach ( ( prefix ) => prefixes . add ( prefix ) )
6152
6253 return prefixes
63- } , [ blockId , blocks , edges , loops , parallels ] )
54+ } , [ blockId , blocks , edges , loops ] )
6455}
0 commit comments