diff --git a/space_flow/src/CustomNodes/ChatInputNode/index.tsx b/space_flow/src/CustomNodes/ChatInputNode/index.tsx index bcc837733..1e5a27c65 100644 --- a/space_flow/src/CustomNodes/ChatInputNode/index.tsx +++ b/space_flow/src/CustomNodes/ChatInputNode/index.tsx @@ -9,7 +9,8 @@ export default function ChatInputNode({ data }) { (targetHandle === sourceHandle || data.types[targetHandle] === sourceHandle || sourceHandle === 'str')} className="-mr-1 bg-transparent border-solid border-l-8 border-l-blue-600 border-y-transparent border-y-8 border-r-0 rounded-none" >
diff --git a/space_flow/src/CustomNodes/ChatOutputNode/index.tsx b/space_flow/src/CustomNodes/ChatOutputNode/index.tsx index ecf8a652d..069308f96 100644 --- a/space_flow/src/CustomNodes/ChatOutputNode/index.tsx +++ b/space_flow/src/CustomNodes/ChatOutputNode/index.tsx @@ -9,8 +9,9 @@ export default function ChatOutputNode({ data }) {
diff --git a/space_flow/src/CustomNodes/GenericNode/index.tsx b/space_flow/src/CustomNodes/GenericNode/index.tsx index ae39d7675..0f155e423 100644 --- a/space_flow/src/CustomNodes/GenericNode/index.tsx +++ b/space_flow/src/CustomNodes/GenericNode/index.tsx @@ -13,16 +13,6 @@ export default function GenericNode({ data }) { const Icon = nodeIcons[data.type]; return (
- - -
{Object.keys(data.node.template).map((t, idx) => (
- {data.node.template[t].type === "dropdown" ? ( - {}} - /> - ) : data.node.template[t].type === "str" ? ( - <> - ) : ( - <> - )} + + +
))}
@@ -64,7 +51,8 @@ export default function GenericNode({ data }) { (targetHandle === sourceHandle || data.types[targetHandle] === sourceHandle || sourceHandle === 'str')} className="-mr-1 bg-transparent border-solid border-l-8 border-y-transparent border-y-8 border-r-0 rounded-none" style={{borderLeftColor: nodeColors[data.type]}} > diff --git a/space_flow/src/CustomNodes/InputNode/index.tsx b/space_flow/src/CustomNodes/InputNode/index.tsx index d921d559a..5af605001 100644 --- a/space_flow/src/CustomNodes/InputNode/index.tsx +++ b/space_flow/src/CustomNodes/InputNode/index.tsx @@ -32,7 +32,8 @@ export default function InputNode({ data }) { (targetHandle === sourceHandle || data.types[targetHandle] === sourceHandle || sourceHandle === 'str')} className="-mr-1 bg-transparent border-solid border-l-8 border-y-transparent border-y-8 border-r-0 rounded-none" style={{borderLeftColor: nodeColors[data.type]}} > diff --git a/space_flow/src/pages/FlowPage/index.tsx b/space_flow/src/pages/FlowPage/index.tsx index 6893e53a0..93fe2b29b 100644 --- a/space_flow/src/pages/FlowPage/index.tsx +++ b/space_flow/src/pages/FlowPage/index.tsx @@ -44,9 +44,9 @@ export default function FlowPage() { const [reactFlowInstance, setReactFlowInstance] = useState(null); const onConnect = useCallback( (params) => { - console.log(params) + /* console.log(params) console.log(reactFlowInstance.getNodes()) - console.log(getConnectedNodes(params,reactFlowInstance.getNodes())) + console.log(getConnectedNodes(params,reactFlowInstance.getNodes())) */ setEdges((eds) => addEdge({...params}, eds)) }, [reactFlowInstance] @@ -72,7 +72,7 @@ export default function FlowPage() { id: newId, type: data.name === 'str' ? 'inputNode' : (data.name === 'chatInput' ? 'chatInputNode' : (data.name === 'chatOutput' ? 'chatOutputNode' : 'genericNode')), position, - data: { ...data, onDelete: () => {setNodes(reactFlowInstance.getNodes().filter((n)=>n.id !== newId))} }, + data: { ...data, instance: reactFlowInstance, onDelete: () => {setNodes(reactFlowInstance.getNodes().filter((n)=>n.id !== newId))} }, }; setNodes((nds) => nds.concat(newNode)); },