fixed things during meeting
This commit is contained in:
parent
f347d6cb9f
commit
d34e7890c3
2 changed files with 35 additions and 4 deletions
|
|
@ -1,12 +1,24 @@
|
|||
import { ChatBubbleBottomCenterTextIcon } from "@heroicons/react/24/outline";
|
||||
import Input from "../../components/inputComponent";
|
||||
import { isValidConnection, snakeToNormalCase } from "../../utils";
|
||||
import { isValidConnection, nodeColors, snakeToNormalCase } from "../../utils";
|
||||
import { Handle, Position } from "reactflow";
|
||||
import Tooltip from "../../components/TooltipComponent";
|
||||
|
||||
export default function ChatInputNode({ data }) {
|
||||
return (
|
||||
<div className="prompt-node relative rounded-lg solid border flex justify-center align-center py-3 px-6 bg-blue-600">
|
||||
<Tooltip title="Prefix: str">
|
||||
<Handle
|
||||
type="source"
|
||||
position={Position.Left}
|
||||
id={"str|Prefix|" + data.id}
|
||||
isValidConnection={(connection) =>
|
||||
isValidConnection(data, connection)
|
||||
}
|
||||
className="ml-1 bg-transparent border-solid border-l-8 border-y-transparent border-y-8 border-r-0 rounded-none"
|
||||
style={{ borderLeftColor: 'white' }}
|
||||
></Handle>
|
||||
</Tooltip>
|
||||
<Tooltip title={"Message: str"}>
|
||||
<Handle
|
||||
type="target"
|
||||
|
|
|
|||
|
|
@ -1,12 +1,31 @@
|
|||
import { Bars3CenterLeftIcon, TrashIcon } from "@heroicons/react/24/outline";
|
||||
import Input from "../../components/inputComponent";
|
||||
import { isValidConnection, nodeColors, nodeIcons, snakeToNormalCase } from "../../utils";
|
||||
import {
|
||||
isValidConnection,
|
||||
nodeColors,
|
||||
nodeIcons,
|
||||
snakeToNormalCase,
|
||||
} from "../../utils";
|
||||
import { Handle, Position } from "reactflow";
|
||||
import { useEffect } from "react";
|
||||
import Tooltip from "../../components/TooltipComponent";
|
||||
|
||||
export default function InputNode({ data }) {
|
||||
return (
|
||||
<div className="prompt-node relative bg-white w-96 rounded-lg solid border flex flex-col justify-center">
|
||||
<Tooltip title="Prefix: str">
|
||||
<Handle
|
||||
type="source"
|
||||
position={Position.Left}
|
||||
id={"str|Prefix|" + data.id}
|
||||
isValidConnection={(connection) =>
|
||||
isValidConnection(data, connection)
|
||||
}
|
||||
className="ml-1 bg-transparent border-solid border-l-8 border-y-transparent border-y-8 border-r-0 rounded-none"
|
||||
style={{ borderLeftColor: nodeColors[data.type] }}
|
||||
></Handle>
|
||||
</Tooltip>
|
||||
|
||||
<div className="w-full flex items-center justify-between p-4 gap-8 bg-gray-50 border-b ">
|
||||
<div className="flex items-center gap-4 text-lg">
|
||||
<Bars3CenterLeftIcon
|
||||
|
|
@ -34,9 +53,9 @@ export default function InputNode({ data }) {
|
|||
type="target"
|
||||
position={Position.Right}
|
||||
id={data.name}
|
||||
isValidConnection={(connection) => isValidConnection(data,connection)}
|
||||
isValidConnection={(connection) => isValidConnection(data, connection)}
|
||||
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]}}
|
||||
style={{ borderLeftColor: nodeColors[data.type] }}
|
||||
></Handle>
|
||||
</div>
|
||||
);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue