Merge branches of multiple nodes and sidebars

This commit is contained in:
Lucas Oliveira 2023-02-10 16:28:48 -03:00
commit 12283981b9
8 changed files with 85 additions and 10 deletions

View file

@ -0,0 +1,17 @@
import { Handle, Position } from "reactflow";
export default function AgentNode({ data }) {
console.log(data)
return (
<div onClick={data.delete} className="agent-node relative bg-white h-16 w-40 border rounded-sm solid border-black flex flex-col justify-center">
<Handle type="source" position={Position.Left}></Handle>
<label className="absolute cursor-grab text-sm -top-3 left-1 bg-white w-14 text-center">
Agent
</label>
<div className="w-full h-min text-xs text-center">
Agent data
</div>
<Handle type="target" position={Position.Right}></Handle>
</div>
);
}

View file

@ -0,0 +1,17 @@
import { Handle, Position } from "reactflow";
export default function ChainNode({ data }) {
console.log(data)
return (
<div onClick={data.delete} className="chain-node relative bg-white h-16 w-40 border rounded-sm solid border-black flex flex-col justify-center">
<Handle type="source" position={Position.Left}></Handle>
<label className="absolute cursor-grab text-sm -top-3 left-1 bg-white w-14 text-center">
Chain
</label>
<div className="w-full h-min text-xs text-center">
Chain data
</div>
<Handle type="target" position={Position.Right}></Handle>
</div>
);
}

View file

@ -3,7 +3,7 @@ import { Handle, Position } from "reactflow";
export default function ModelNode({ data }) {
console.log(data)
return (
<div onClick={data.delete} className="model-Node relative bg-white h-16 w-40 border rounded-sm solid border-black flex flex-col justify-center">
<div onClick={data.delete} className="model-node relative bg-white h-16 w-40 border rounded-sm solid border-black flex flex-col justify-center">
<Handle type="source" position={Position.Left}></Handle>
<label className="absolute cursor-grab text-sm -top-3 left-1 bg-white w-14 text-center">
Model

View file

@ -8,7 +8,7 @@ export default function PromptNode({ data }) {
return (
<div
onClick={()=>openPopUp(<div className="absolute top-1/2 left-1/2">teste</div>)}
className="prompt-Node relative bg-white h-16 w-40 border rounded-sm solid border-black flex flex-col justify-center"
className="prompt-node relative bg-white h-16 w-40 border rounded-sm solid border-black flex flex-col justify-center"
>
<Handle type="source" position={Position.Left}></Handle>
<label className="absolute cursor-grab text-sm -top-3 left-1 bg-white w-14 text-center">

View file

@ -0,0 +1,17 @@
import { Handle, Position } from "reactflow";
export default function ValidatorNode({ data }) {
console.log(data)
return (
<div onClick={data.delete} className="validator-node relative bg-white h-16 w-40 border rounded-sm solid border-black flex flex-col justify-center">
<Handle type="source" position={Position.Left}></Handle>
<label className="absolute cursor-grab text-sm -top-3 left-1 bg-white w-14 text-center">
Validator
</label>
<div className="w-full h-min text-xs text-center">
validator data
</div>
<Handle type="target" position={Position.Right}></Handle>
</div>
);
}