From 6e214445c9d5cd0f372a998790afbaeb9cecd819 Mon Sep 17 00:00:00 2001 From: mlogclub Date: Tue, 23 Jun 2026 10:40:01 +0800 Subject: [PATCH] Add rendering logic for condition nodes in WorkflowCanvasNode component --- .../_components/workflow-editor.tsx | 33 +++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/web/app/dashboard/ai-workflows/_components/workflow-editor.tsx b/web/app/dashboard/ai-workflows/_components/workflow-editor.tsx index 641205f..a7324f4 100644 --- a/web/app/dashboard/ai-workflows/_components/workflow-editor.tsx +++ b/web/app/dashboard/ai-workflows/_components/workflow-editor.tsx @@ -805,6 +805,39 @@ function normalizeConditionRight(value: string) { function WorkflowCanvasNode({ data, selected }: NodeProps) { const missingInputs = data.missingInputs ?? [] const hasIssue = missingInputs.length > 0 + const isConditionNode = data.nodeType === "condition" + if (isConditionNode) { + return ( +
+
+ +
+ {hasIssue ? ( + + ) : ( + + )} +
{data.name ?? data.title}
+
分支
+
+ +
+ ) + } return (