Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -721,7 +721,7 @@ export const TagDropdown: React.FC<TagDropdownProps> = ({
if (currentLoop && isLoopBlock) {
containingLoopBlockId = blockId
const loopType = currentLoop.loopType || 'for'
const contextualTags: string[] = ['index', 'currentIteration']
const contextualTags: string[] = ['index']
if (loopType === 'forEach') {
contextualTags.push('currentItem')
contextualTags.push('items')
Expand All @@ -743,7 +743,7 @@ export const TagDropdown: React.FC<TagDropdownProps> = ({
const [loopId, loop] = containingLoop
containingLoopBlockId = loopId
const loopType = loop.loopType || 'for'
const contextualTags: string[] = ['index', 'currentIteration']
const contextualTags: string[] = ['index']
if (loopType === 'forEach') {
contextualTags.push('currentItem')
contextualTags.push('items')
Expand Down Expand Up @@ -1214,10 +1214,7 @@ export const TagDropdown: React.FC<TagDropdownProps> = ({
blockGroup &&
(blockGroup.blockType === 'loop' || blockGroup.blockType === 'parallel')
) {
if (
!tag.includes('.') &&
['index', 'currentItem', 'items', 'currentIteration'].includes(tag)
) {
if (!tag.includes('.') && ['index', 'currentItem', 'items'].includes(tag)) {
processedTag = `${blockGroup.blockType}.${tag}`
} else {
processedTag = tag
Expand Down Expand Up @@ -1500,9 +1497,6 @@ export const TagDropdown: React.FC<TagDropdownProps> = ({
} else if (nestedTag.key === 'items') {
displayIcon = 'I'
tagDescription = 'array'
} else if (nestedTag.key === 'currentIteration') {
displayIcon = '#'
tagDescription = 'number'
}
} else if (nestedTag.fullTag) {
const tagParts = nestedTag.fullTag.split('.')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ export function useAccessibleReferencePrefixes(blockId?: string | null): Set<str
loopValues.forEach((loop) => {
if (!loop?.nodes) return
if (loop.nodes.includes(blockId)) {
accessibleIds.add(loop.id) // Add the loop block itself
loop.nodes.forEach((nodeId) => accessibleIds.add(nodeId))
}
})
Expand All @@ -46,6 +47,7 @@ export function useAccessibleReferencePrefixes(blockId?: string | null): Set<str
parallelValues.forEach((parallel) => {
if (!parallel?.nodes) return
if (parallel.nodes.includes(blockId)) {
accessibleIds.add(parallel.id) // Add the parallel block itself
parallel.nodes.forEach((nodeId) => accessibleIds.add(nodeId))
}
})
Expand Down
5 changes: 1 addition & 4 deletions apps/sim/executor/__test-utils__/executor-mocks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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,
})

Expand All @@ -555,7 +553,7 @@ export const createParallelManagerMock = (options?: {
}

const parallelState = context.parallelExecutions?.get(parallelId)
if (!parallelState || parallelState.currentIteration === 0) {
if (!parallelState) {
continue
}

Expand Down Expand Up @@ -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)

Expand Down
3 changes: 0 additions & 3 deletions apps/sim/executor/orchestrators/loop.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ export interface LoopContinuationResult {
shouldExit: boolean
selectedRoute: LoopRoute
aggregatedResults?: NormalizedBlockOutput[][]
currentIteration?: number
}

export class LoopOrchestrator {
Expand Down Expand Up @@ -149,7 +148,6 @@ export class LoopOrchestrator {
shouldContinue: true,
shouldExit: false,
selectedRoute: EDGE.LOOP_CONTINUE,
currentIteration: scope.iteration,
}
}

Expand All @@ -166,7 +164,6 @@ export class LoopOrchestrator {
shouldExit: true,
selectedRoute: EDGE.LOOP_EXIT,
aggregatedResults: results,
currentIteration: scope.iteration,
}
}

Expand Down
1 change: 0 additions & 1 deletion apps/sim/executor/orchestrators/node.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,6 @@ export class NodeExecutionOrchestrator {
shouldContinue: true,
shouldExit: false,
selectedRoute: continuationResult.selectedRoute,
loopIteration: continuationResult.currentIteration,
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -912,7 +912,7 @@ const SPECIAL_BLOCKS_METADATA: Record<string, any> = {
type: 'string',
required: false,
description: "Condition to evaluate (for 'while' and 'doWhile' loopType)",
example: '<loop.currentIteration> < 10',
example: '<loop.index> < 10',
},
maxConcurrency: {
type: 'number',
Expand Down
12 changes: 0 additions & 12 deletions apps/sim/providers/utils.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -147,9 +147,6 @@ describe('Model Capabilities', () => {
'azure/model-router',
// GPT-5.1 models don't support temperature (removed in our implementation)
'gpt-5.1',
'gpt-5.1-mini',
'gpt-5.1-nano',
'gpt-5.1-codex',
'azure/gpt-5.1',
'azure/gpt-5.1-mini',
'azure/gpt-5.1-nano',
Expand Down Expand Up @@ -228,9 +225,6 @@ describe('Model Capabilities', () => {
expect(getMaxTemperature('deepseek-r1')).toBeUndefined()
// GPT-5.1 models don't support temperature
expect(getMaxTemperature('gpt-5.1')).toBeUndefined()
expect(getMaxTemperature('gpt-5.1-mini')).toBeUndefined()
expect(getMaxTemperature('gpt-5.1-nano')).toBeUndefined()
expect(getMaxTemperature('gpt-5.1-codex')).toBeUndefined()
expect(getMaxTemperature('azure/gpt-5.1')).toBeUndefined()
expect(getMaxTemperature('azure/gpt-5.1-mini')).toBeUndefined()
expect(getMaxTemperature('azure/gpt-5.1-nano')).toBeUndefined()
Expand Down Expand Up @@ -325,9 +319,6 @@ describe('Model Capabilities', () => {
it.concurrent('should have correct models in MODELS_WITH_REASONING_EFFORT', () => {
// Should contain GPT-5.1 models that support reasoning effort
expect(MODELS_WITH_REASONING_EFFORT).toContain('gpt-5.1')
expect(MODELS_WITH_REASONING_EFFORT).toContain('gpt-5.1-mini')
expect(MODELS_WITH_REASONING_EFFORT).toContain('gpt-5.1-nano')
expect(MODELS_WITH_REASONING_EFFORT).toContain('gpt-5.1-codex')
expect(MODELS_WITH_REASONING_EFFORT).toContain('azure/gpt-5.1')
expect(MODELS_WITH_REASONING_EFFORT).toContain('azure/gpt-5.1-mini')
expect(MODELS_WITH_REASONING_EFFORT).toContain('azure/gpt-5.1-nano')
Expand All @@ -354,9 +345,6 @@ describe('Model Capabilities', () => {
it.concurrent('should have correct models in MODELS_WITH_VERBOSITY', () => {
// Should contain GPT-5.1 models that support verbosity
expect(MODELS_WITH_VERBOSITY).toContain('gpt-5.1')
expect(MODELS_WITH_VERBOSITY).toContain('gpt-5.1-mini')
expect(MODELS_WITH_VERBOSITY).toContain('gpt-5.1-nano')
expect(MODELS_WITH_VERBOSITY).toContain('gpt-5.1-codex')
expect(MODELS_WITH_VERBOSITY).toContain('azure/gpt-5.1')
expect(MODELS_WITH_VERBOSITY).toContain('azure/gpt-5.1-mini')
expect(MODELS_WITH_VERBOSITY).toContain('azure/gpt-5.1-nano')
Expand Down
1 change: 0 additions & 1 deletion apps/sim/stores/workflows/workflow/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,6 @@ export interface LoopBlock {
width: number
height: number
executionState: {
currentIteration: number
isExecuting: boolean
startTime: null | number
endTime: null | number
Expand Down