@@ -20,11 +20,6 @@ const CONDITION_TIMEOUT_MS = 5000
2020 * Evaluates a single condition expression.
2121 * Variable resolution is handled consistently with the function block via the function_execute tool.
2222 * Returns true if condition is met, false otherwise.
23- *
24- * @param ctx - Execution context
25- * @param conditionExpression - The condition expression to evaluate
26- * @param providedEvalContext - Optional evaluation context with variables
27- * @param currentNodeId - Optional current node ID for parallel branch context resolution
2823 */
2924export async function evaluateConditionExpression (
3025 ctx : ExecutionContext ,
@@ -95,15 +90,12 @@ export class ConditionBlockHandler implements BlockHandler {
9590 ) : Promise < BlockOutput > {
9691 const conditions = this . parseConditions ( inputs . conditions )
9792
98- // In parallel branches, block.id is virtual (e.g., "condition₍0₎") but connections
99- // use original IDs (e.g., "condition"). Extract the base ID for connection lookups.
10093 const baseBlockId = extractBaseBlockId ( block . id )
10194 const branchIndex = isBranchNodeId ( block . id ) ? extractBranchIndex ( block . id ) : null
10295
10396 const sourceConnection = ctx . workflow ?. connections . find ( ( conn ) => conn . target === baseBlockId )
10497 let sourceBlockId = sourceConnection ?. source
10598
106- // If we're in a parallel branch, look up the virtual source block ID for the same branch
10799 if ( sourceBlockId && branchIndex !== null ) {
108100 const virtualSourceId = buildBranchNodeId ( sourceBlockId , branchIndex )
109101 if ( ctx . blockStates . has ( virtualSourceId ) ) {
0 commit comments