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 1a7efd9..5b1edd5 100644 --- a/web/app/dashboard/ai-workflows/_components/node-config-panel.tsx +++ b/web/app/dashboard/ai-workflows/_components/node-config-panel.tsx @@ -1,6 +1,6 @@ "use client" -import { useEffect, useMemo, useState } from "react" +import { useMemo, useState } from "react" import { Trash2Icon } from "lucide-react" import { Button } from "@/components/ui/button" @@ -61,24 +61,6 @@ export function NodeConfigPanel({ onChange: (nodeId: string, data: AIWorkflowDefinition["nodes"][number]["data"]) => void onDelete?: (nodeId: string) => void }) { - const [configText, setConfigText] = useState("{}") - - useEffect(() => { - setConfigText(JSON.stringify(node?.data?.config ?? {}, null, 2)) - }, [node?.id, node?.data?.config]) - - const configError = useMemo(() => { - if (!node) { - return "" - } - try { - const parsed = JSON.parse(configText || "{}") - return parsed && typeof parsed === "object" && !Array.isArray(parsed) ? "" : "配置必须是 JSON 对象" - } catch { - return "JSON 格式错误" - } - }, [configText, node]) - if (!node) { return (