Add Start Node to workflows (#1026)

This commit is contained in:
Shuchang Zheng
2024-10-22 10:02:24 -07:00
committed by GitHub
parent d571519a67
commit da92ccdc9f
9 changed files with 152 additions and 109 deletions

View File

@@ -1,6 +1,6 @@
import { useNodes } from "@xyflow/react";
import { useWorkflowParametersState } from "../editor/useWorkflowParametersState";
import { AppNode } from "../editor/nodes";
import { AppNode, isWorkflowBlockNode } from "../editor/nodes";
import { getOutputParameterKey } from "../editor/workflowEditorUtils";
import {
Select,
@@ -22,7 +22,7 @@ function SourceParameterKeySelector({ value, onChange }: Props) {
.filter((parameter) => parameter.parameterType !== "credential")
.map((parameter) => parameter.key);
const outputParameterKeys = nodes
.filter((node) => node.type !== "nodeAdder")
.filter(isWorkflowBlockNode)
.map((node) => getOutputParameterKey(node.data.label));
return (