From 389291143a23d290c44ea8759ce29d354b52bf9a Mon Sep 17 00:00:00 2001 From: mlogclub Date: Sun, 28 Jun 2026 15:12:56 +0800 Subject: [PATCH] feat: enhance FlowgramNodeForm and WorkflowNodeCard by removing unused spec prop and adding node description display --- .../_components/flowgram-node-registries.tsx | 4 ---- .../ai-workflows/_components/node-config-panel.tsx | 9 +++++++++ .../ai-workflows/_components/workflow-node-card.tsx | 8 -------- 3 files changed, 9 insertions(+), 12 deletions(-) diff --git a/web/app/dashboard/ai-workflows/_components/flowgram-node-registries.tsx b/web/app/dashboard/ai-workflows/_components/flowgram-node-registries.tsx index 0f6bfc7..d214197 100644 --- a/web/app/dashboard/ai-workflows/_components/flowgram-node-registries.tsx +++ b/web/app/dashboard/ai-workflows/_components/flowgram-node-registries.tsx @@ -49,7 +49,6 @@ export function buildFlowgramNodeRegistries(nodeSpecs: AIWorkflowNodeSpec[]): Wo ), }, @@ -59,11 +58,9 @@ export function buildFlowgramNodeRegistries(nodeSpecs: AIWorkflowNodeSpec[]): Wo function FlowgramNodeForm({ nodeType, fallbackTitle, - spec, }: { nodeType: string fallbackTitle: string - spec?: AIWorkflowNodeSpec }) { const { node, selected } = useNodeRender() const nodeId = String(node.id ?? "") @@ -74,7 +71,6 @@ function FlowgramNodeForm({ diff --git a/web/app/dashboard/ai-workflows/_components/node-config-panel.tsx b/web/app/dashboard/ai-workflows/_components/node-config-panel.tsx index 5b1edd5..148aebd 100644 --- a/web/app/dashboard/ai-workflows/_components/node-config-panel.tsx +++ b/web/app/dashboard/ai-workflows/_components/node-config-panel.tsx @@ -150,6 +150,15 @@ export function NodeConfigPanel({ /> + {nodeSpec?.description ? ( +
+ +
+ {nodeSpec.description} +
+
+ ) : null} + {inputSchema.length > 0 ? (
输入
diff --git a/web/app/dashboard/ai-workflows/_components/workflow-node-card.tsx b/web/app/dashboard/ai-workflows/_components/workflow-node-card.tsx index 4152b22..ed78b54 100644 --- a/web/app/dashboard/ai-workflows/_components/workflow-node-card.tsx +++ b/web/app/dashboard/ai-workflows/_components/workflow-node-card.tsx @@ -1,20 +1,17 @@ import type { ReactNode } from "react" import { cn } from "@/lib/utils" -import type { AIWorkflowNodeSpec } from "@/lib/api/admin" import { WorkflowNodeIcon } from "./workflow-node-icon" export function WorkflowNodeCard({ nodeType, title, - spec, selected, width = "normal", children, }: { nodeType: string title: string - spec?: AIWorkflowNodeSpec selected: boolean width?: "normal" | "wide" children?: ReactNode @@ -38,11 +35,6 @@ export function WorkflowNodeCard({
- {spec?.description ? ( -
- {spec.description} -
- ) : null} {children ?
{children}
: null}