chat input validation removed
This commit is contained in:
parent
ad7e975310
commit
912dff60ec
2 changed files with 3 additions and 2 deletions
|
|
@ -34,7 +34,7 @@ export default function Chat({ reactFlowInstance }) {
|
|||
return true;
|
||||
}
|
||||
function validateChatNodes(){
|
||||
if(!reactFlowInstance.getNodes().some((n)=> (n.type === 'chatOutputNode')) || !reactFlowInstance.getNodes().some((n)=> (n.type === 'chatInputNode'))){
|
||||
if(!reactFlowInstance.getNodes().some((n)=> (n.type === 'chatOutputNode'))){
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
|
|
|
|||
|
|
@ -52,6 +52,7 @@ export default function FlowPage({ flow }) {
|
|||
const [edges, setEdges, onEdgesChange] = useEdgesState(
|
||||
flow.data?.edges ?? []
|
||||
);
|
||||
const {setViewport} = useReactFlow()
|
||||
|
||||
useEffect(() => {
|
||||
if (reactFlowInstance && flow) {
|
||||
|
|
@ -64,7 +65,7 @@ export default function FlowPage({ flow }) {
|
|||
setNodes(flow?.data?.nodes ?? []);
|
||||
setEdges(flow?.data?.edges ?? []);
|
||||
if (reactFlowInstance) {
|
||||
reactFlowInstance.setViewport(
|
||||
setViewport(
|
||||
flow?.data?.viewport ?? { x: 1, y: 0, zoom: 1 }
|
||||
);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue