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 { ChatBubbleBottomCenterTextIcon } from "@heroicons/react/24/outline";
|
||||||
import Input from "../../components/inputComponent";
|
import Input from "../../components/inputComponent";
|
||||||
import { isValidConnection, snakeToNormalCase } from "../../utils";
|
import { isValidConnection, nodeColors, snakeToNormalCase } from "../../utils";
|
||||||
import { Handle, Position } from "reactflow";
|
import { Handle, Position } from "reactflow";
|
||||||
import Tooltip from "../../components/TooltipComponent";
|
import Tooltip from "../../components/TooltipComponent";
|
||||||
|
|
||||||
export default function ChatInputNode({ data }) {
|
export default function ChatInputNode({ data }) {
|
||||||
return (
|
return (
|
||||||
<div className="prompt-node relative rounded-lg solid border flex justify-center align-center py-3 px-6 bg-blue-600">
|
<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"}>
|
<Tooltip title={"Message: str"}>
|
||||||
<Handle
|
<Handle
|
||||||
type="target"
|
type="target"
|
||||||
|
|
|
||||||
|
|
@ -1,12 +1,31 @@
|
||||||
import { Bars3CenterLeftIcon, TrashIcon } from "@heroicons/react/24/outline";
|
import { Bars3CenterLeftIcon, TrashIcon } from "@heroicons/react/24/outline";
|
||||||
import Input from "../../components/inputComponent";
|
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 { Handle, Position } from "reactflow";
|
||||||
import { useEffect } from "react";
|
import { useEffect } from "react";
|
||||||
|
import Tooltip from "../../components/TooltipComponent";
|
||||||
|
|
||||||
export default function InputNode({ data }) {
|
export default function InputNode({ data }) {
|
||||||
return (
|
return (
|
||||||
<div className="prompt-node relative bg-white w-96 rounded-lg solid border flex flex-col justify-center">
|
<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="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">
|
<div className="flex items-center gap-4 text-lg">
|
||||||
<Bars3CenterLeftIcon
|
<Bars3CenterLeftIcon
|
||||||
|
|
@ -34,9 +53,9 @@ export default function InputNode({ data }) {
|
||||||
type="target"
|
type="target"
|
||||||
position={Position.Right}
|
position={Position.Right}
|
||||||
id={data.name}
|
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"
|
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>
|
></Handle>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue