Skip to content

Commit 48baa41

Browse files
committed
remove comments
1 parent d0f1f32 commit 48baa41

File tree

2 files changed

+0
-13
lines changed

2 files changed

+0
-13
lines changed

apps/sim/executor/handlers/condition/condition-handler.ts

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -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
*/
2924
export 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)) {

apps/sim/executor/utils/block-data.ts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -99,22 +99,17 @@ export function collectBlockData(
9999
const blockNameMapping: Record<string, string> = {}
100100
const blockOutputSchemas: Record<string, OutputSchema> = {}
101101

102-
// Determine if we're in a parallel branch context
103102
const branchIndex =
104103
currentNodeId && isBranchNodeId(currentNodeId) ? extractBranchIndex(currentNodeId) : null
105104

106105
for (const [id, state] of ctx.blockStates.entries()) {
107106
if (state.output !== undefined) {
108107
blockData[id] = state.output
109108

110-
// If we're in a parallel branch and this state is from the same branch,
111-
// also map it under the base block ID so references like <BlockName.field>
112-
// resolve correctly within the same branch context
113109
if (branchIndex !== null && isBranchNodeId(id)) {
114110
const stateBranchIndex = extractBranchIndex(id)
115111
if (stateBranchIndex === branchIndex) {
116112
const baseId = extractBaseBlockId(id)
117-
// Only set if not already set (prefer branch-specific data)
118113
if (blockData[baseId] === undefined) {
119114
blockData[baseId] = state.output
120115
}

0 commit comments

Comments
 (0)