From 18ea9d3f1879fe537b0e4c8a7501a1ca83d3b1c1 Mon Sep 17 00:00:00 2001 From: zhsama Date: Tue, 23 Dec 2025 20:44:36 +0800 Subject: [PATCH] feat: Add GROUP node type and update node configuration filtering in Graph class --- api/core/workflow/enums.py | 1 + api/core/workflow/graph/graph.py | 9 ++++++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/api/core/workflow/enums.py b/api/core/workflow/enums.py index cf12d5ec1f..2d62b00ecf 100644 --- a/api/core/workflow/enums.py +++ b/api/core/workflow/enums.py @@ -63,6 +63,7 @@ class NodeType(StrEnum): TRIGGER_SCHEDULE = "trigger-schedule" TRIGGER_PLUGIN = "trigger-plugin" HUMAN_INPUT = "human-input" + GROUP = "group" @property def is_trigger_node(self) -> bool: diff --git a/api/core/workflow/graph/graph.py b/api/core/workflow/graph/graph.py index ba5a01fc94..38912c57b7 100644 --- a/api/core/workflow/graph/graph.py +++ b/api/core/workflow/graph/graph.py @@ -305,7 +305,14 @@ class Graph: if not node_configs: raise ValueError("Graph must have at least one node") - node_configs = [node_config for node_config in node_configs if node_config.get("type", "") != "custom-note"] + # Filter out UI-only node types: + # - custom-note: top-level type (node_config.type == "custom-note") + # - group: data-level type (node_config.data.type == "group") + node_configs = [ + node_config for node_config in node_configs + if node_config.get("type", "") != "custom-note" + and node_config.get("data", {}).get("type", "") != "group" + ] # Parse node configurations node_configs_map = cls._parse_node_configs(node_configs)