mirror of
https://github.com/simstudioai/sim.git
synced 2026-02-17 01:42:43 -05:00
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:
@@ -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)
|
||||
|
||||
|
||||
@@ -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,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -94,7 +94,6 @@ export class NodeExecutionOrchestrator {
|
||||
shouldContinue: true,
|
||||
shouldExit: false,
|
||||
selectedRoute: continuationResult.selectedRoute,
|
||||
loopIteration: continuationResult.currentIteration,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user