This commit is contained in:
Siddharth Ganesan
2026-01-05 12:22:05 -08:00
parent 27c7bcf71d
commit c369e04189
4 changed files with 14 additions and 19 deletions

View File

@@ -8,11 +8,11 @@ import { useUpdateNodeInternals } from 'reactflow'
import {
Button,
Code,
Textarea,
calculateGutterWidth,
getCodeEditorProps,
highlight,
languages,
Textarea,
Tooltip,
} from '@/components/emcn'
import { Trash } from '@/components/emcn/icons/trash'
@@ -815,18 +815,16 @@ export function ConditionInput({
<Button
variant='ghost'
onClick={() => removeBlock(block.id)}
disabled={
isPreview ||
disabled ||
conditionalBlocks.length === 1
}
disabled={isPreview || disabled || conditionalBlocks.length === 1}
className='h-auto p-0 text-[var(--text-error)] hover:text-[var(--text-error)]'
>
<Trash className='h-[14px] w-[14px]' />
<span className='sr-only'>Delete Block</span>
</Button>
</Tooltip.Trigger>
<Tooltip.Content>{isRouterMode ? 'Delete Route' : 'Delete Condition'}</Tooltip.Content>
<Tooltip.Content>
{isRouterMode ? 'Delete Route' : 'Delete Condition'}
</Tooltip.Content>
</Tooltip.Root>
</div>
</div>
@@ -869,9 +867,7 @@ export function ConditionInput({
setTimeout(() => {
setConditionalBlocks((blocks) =>
blocks.map((b) =>
b.id === block.id
? { ...b, showTags: false, showEnvVars: false }
: b
b.id === block.id ? { ...b, showTags: false, showEnvVars: false } : b
)
)
}, 150)

View File

@@ -180,11 +180,7 @@ const getApiKeyCondition = () => {
}
: () => ({
field: 'model',
value: [
...getCurrentOllamaModels(),
...getCurrentVLLMModels(),
...providers.vertex.models,
],
value: [...getCurrentOllamaModels(), ...getCurrentVLLMModels(), ...providers.vertex.models],
not: true,
})
}

View File

@@ -1,5 +1,10 @@
import { createLogger } from '@sim/logger'
import { EDGE, isConditionBlockType, isRouterBlockType, isRouterV2BlockType } from '@/executor/constants'
import {
EDGE,
isConditionBlockType,
isRouterBlockType,
isRouterV2BlockType,
} from '@/executor/constants'
import type { DAG } from '@/executor/dag/builder'
import {
buildBranchNodeId,

View File

@@ -34,9 +34,7 @@ export class RouterBlockHandler implements BlockHandler {
constructor(private pathTracker?: any) {}
canHandle(block: SerializedBlock): boolean {
return (
block.metadata?.id === BlockType.ROUTER || block.metadata?.id === BlockType.ROUTER_V2
)
return block.metadata?.id === BlockType.ROUTER || block.metadata?.id === BlockType.ROUTER_V2
}
async execute(