feat(workflow): enhance group node availability checks

- Updated `checkMakeGroupAvailability` to include a check for existing group nodes, preventing group creation if a group node is already selected.
- Modified `useMakeGroupAvailability` and `useNodesInteractions` hooks to incorporate the new group node check, ensuring accurate group creation logic.
- Adjusted UI rendering logic in the workflow panel to conditionally display elements based on node type, specifically for group nodes.
This commit is contained in:
zhsama
2026-01-06 02:07:13 +08:00
parent 9012dced6a
commit d92c476388
3 changed files with 21 additions and 17 deletions

View File

@ -594,7 +594,7 @@ const BasePanel: FC<BasePanelProps> = ({
)
}
{
!needsToolAuth && !currentDataSource && !currentTriggerPlugin && (
!needsToolAuth && !currentDataSource && !currentTriggerPlugin && data.type !== BlockEnum.Group && (
<div className="flex items-center justify-between pl-4 pr-3">
<Tab
value={tabType}
@ -603,9 +603,9 @@ const BasePanel: FC<BasePanelProps> = ({
</div>
)
}
<Split />
{data.type !== BlockEnum.Group && <Split />}
</div>
{tabType === TabType.settings && (
{(tabType === TabType.settings || data.type === BlockEnum.Group) && (
<div className="flex flex-1 flex-col overflow-y-auto">
<div>
{cloneElement(children as any, {