source changed to target
This commit is contained in:
parent
c980a96005
commit
85c9a721ee
5 changed files with 17 additions and 17 deletions
|
|
@ -12,7 +12,7 @@ export default function ChatInputNode({ data }) {
|
|||
<div className="prompt-node relative rounded-lg solid border flex justify-center align-center py-3 px-6 bg-gray-50" style={{color: nodeColors[types[data.type]]}}>
|
||||
<Tooltip title="Prefix: str">
|
||||
<Handle
|
||||
type="source"
|
||||
type="target"
|
||||
position={Position.Left}
|
||||
id={"str|Prefix|" + data.id}
|
||||
isValidConnection={(connection) =>
|
||||
|
|
@ -24,7 +24,7 @@ export default function ChatInputNode({ data }) {
|
|||
</Tooltip>
|
||||
<Tooltip title={"Message: str"}>
|
||||
<Handle
|
||||
type="target"
|
||||
type="source"
|
||||
position={Position.Right}
|
||||
id={'str|str|'+data.id}
|
||||
isValidConnection={(connection) => isValidConnection(data,connection)}
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ export default function ChatOutputNode({ data }) {
|
|||
<div className="prompt-node relative rounded-lg solid border flex justify-center align-center py-3 px-6 bg-gray-50" style={{color: nodeColors[types[data.type]]}}>
|
||||
<Tooltip title="Message: str">
|
||||
<Handle
|
||||
type="source"
|
||||
type="target"
|
||||
isValidConnection={(connection) => isValidConnection(data,connection)}
|
||||
position={Position.Left}
|
||||
id={"str|output|"+data.id}
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@ export default function ParameterComponent({
|
|||
}, [data.id, position, updateNodeInternals]);
|
||||
|
||||
const [enabled, setEnabled] = useState(data.node.template[name]?.value ?? false);
|
||||
let disabled = data.reactFlowInstance.getEdges().some((e) => (e.sourceHandle === id));
|
||||
let disabled = data.reactFlowInstance.getEdges().some((e) => (e.targetHandle === id));
|
||||
|
||||
return (
|
||||
<div ref={ref} className="w-full flex flex-wrap justify-between items-center bg-gray-50 mt-1 px-5 py-2">
|
||||
|
|
@ -46,7 +46,7 @@ export default function ParameterComponent({
|
|||
<div className="text-sm truncate">{title}<span className="text-red-600">{required ? " *" : ""}</span></div>
|
||||
<Tooltip title={tooltipTitle + (required ? " (required)" : "")}>
|
||||
<Handle
|
||||
type={left ? "source" : "target"}
|
||||
type={left ? "target" : "source"}
|
||||
position={left ? Position.Left : Position.Right}
|
||||
id={id}
|
||||
isValidConnection={(connection) =>
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ export default function InputNode({ data }) {
|
|||
<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"
|
||||
type="target"
|
||||
position={Position.Left}
|
||||
id={"str|Prefix|" + data.id}
|
||||
isValidConnection={(connection) =>
|
||||
|
|
@ -56,7 +56,7 @@ export default function InputNode({ data }) {
|
|||
/>
|
||||
</div>
|
||||
<Handle
|
||||
type="target"
|
||||
type="source"
|
||||
position={Position.Right}
|
||||
id={data.type}
|
||||
isValidConnection={(connection) => isValidConnection(data, connection)}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue