fix(subflows): add loops/parallels to accessible list of blocks in the tag dropdown when contained withitn a subflow (#2047)

* fix(subflows): add loops/parallels to accessible list of blocks in the tag dropdown when contained withitn a subflow

* remove currentIteration in loop
This commit is contained in:
Waleed
2025-11-18 17:24:30 -08:00
committed by GitHub
parent a7fe1d3aea
commit 96207d85a7
8 changed files with 7 additions and 31 deletions

View File

@@ -521,7 +521,6 @@ export const createParallelExecutionState = (options?: {
completedExecutions?: number
executionResults?: Map<string, any>
activeIterations?: Set<number>
currentIteration?: number
parallelType?: 'count' | 'collection'
}) => ({
parallelCount: options?.parallelCount ?? 3,
@@ -530,7 +529,6 @@ export const createParallelExecutionState = (options?: {
completedExecutions: options?.completedExecutions ?? 0,
executionResults: options?.executionResults ?? new Map<string, any>(),
activeIterations: options?.activeIterations ?? new Set<number>(),
currentIteration: options?.currentIteration ?? 1,
parallelType: options?.parallelType,
})
@@ -555,7 +553,7 @@ export const createParallelManagerMock = (options?: {
}
const parallelState = context.parallelExecutions?.get(parallelId)
if (!parallelState || parallelState.currentIteration === 0) {
if (!parallelState) {
continue
}
@@ -667,7 +665,6 @@ export const createParallelBlockHandler = vi.fn().mockImplementation(() => {
completedExecutions: 0,
executionResults: new Map(),
activeIterations: new Set(),
currentIteration: 1,
}
context.parallelExecutions.set(parallelId, parallelState)

View File

@@ -23,7 +23,6 @@ export interface LoopContinuationResult {
shouldExit: boolean
selectedRoute: LoopRoute
aggregatedResults?: NormalizedBlockOutput[][]
currentIteration?: number
}
export class LoopOrchestrator {
@@ -149,7 +148,6 @@ export class LoopOrchestrator {
shouldContinue: true,
shouldExit: false,
selectedRoute: EDGE.LOOP_CONTINUE,
currentIteration: scope.iteration,
}
}
@@ -166,7 +164,6 @@ export class LoopOrchestrator {
shouldExit: true,
selectedRoute: EDGE.LOOP_EXIT,
aggregatedResults: results,
currentIteration: scope.iteration,
}
}

View File

@@ -94,7 +94,6 @@ export class NodeExecutionOrchestrator {
shouldContinue: true,
shouldExit: false,
selectedRoute: continuationResult.selectedRoute,
loopIteration: continuationResult.currentIteration,
}
}