List logic implemented at the nodes
This commit is contained in:
parent
590b9bdc09
commit
2a0547279c
9 changed files with 331 additions and 299 deletions
|
|
@ -1,7 +1,7 @@
|
|||
import { ChatBubbleBottomCenterTextIcon } from "@heroicons/react/24/outline";
|
||||
import { Handle, Position } from "reactflow";
|
||||
import Input from "../../components/inputComponent";
|
||||
import { snakeToNormalCase } from "../../utils";
|
||||
import { isValidConnection, snakeToNormalCase } from "../../utils";
|
||||
import Tooltip from "../../components/TooltipComponent";
|
||||
|
||||
export default function ChatOutputNode({ data }) {
|
||||
|
|
@ -10,13 +10,9 @@ export default function ChatOutputNode({ data }) {
|
|||
<Tooltip title="Message: str">
|
||||
<Handle
|
||||
type="source"
|
||||
isValidConnection={({ sourceHandle, targetHandle }) =>
|
||||
targetHandle === sourceHandle ||
|
||||
data.types[targetHandle] === sourceHandle ||
|
||||
sourceHandle === "str"
|
||||
}
|
||||
isValidConnection={(connection) => isValidConnection(data,connection)}
|
||||
position={Position.Left}
|
||||
id="str"
|
||||
id={"str|output|"+data.id}
|
||||
className="ml-1 bg-transparent border-solid border-l-8 border-l-white border-y-transparent border-y-8 border-r-0 rounded-none"
|
||||
></Handle>
|
||||
</Tooltip>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue