fix(workflow): enable source handle connector on End node

The End (Output) node had `availableNextBlocks` hardcoded to `[]`,
making `isConnectable = false` on its source handle. This hid the
"+" BlockSelector button entirely, preventing users from adding new
connections from the Output node — unlike every other regular node.

Remove `BlockEnum.End` from the empty-list guard in both the memo
and the `getAvailableBlocks` callback in `use-available-blocks.ts`.
The container-level filter (`availableBlocksFilter`) that prevents
End from being added inside Iteration/Loop containers is unchanged.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Chen Yefan 2026-03-23 18:24:40 +08:00
parent 1b1df37d23
commit 2b110159c1
1 changed files with 2 additions and 2 deletions

View File

@ -30,7 +30,7 @@ export const useAvailableBlocks = (nodeType?: BlockEnum, inContainer?: boolean)
return availableNodesType
}, [availableNodesType, nodeType])
const availableNextBlocks = useMemo(() => {
if (!nodeType || nodeType === BlockEnum.End || nodeType === BlockEnum.LoopEnd || nodeType === BlockEnum.KnowledgeBase)
if (!nodeType || nodeType === BlockEnum.LoopEnd || nodeType === BlockEnum.KnowledgeBase)
return []
return availableNodesType
@ -42,7 +42,7 @@ export const useAvailableBlocks = (nodeType?: BlockEnum, inContainer?: boolean)
availablePrevBlocks = []
let availableNextBlocks = availableNodesType
if (!nodeType || nodeType === BlockEnum.End || nodeType === BlockEnum.LoopEnd || nodeType === BlockEnum.KnowledgeBase)
if (!nodeType || nodeType === BlockEnum.LoopEnd || nodeType === BlockEnum.KnowledgeBase)
availableNextBlocks = []
return {