From 749de5e48d369a4cef34ee34f06d71a32d594d6b Mon Sep 17 00:00:00 2001 From: Charlie Kolb Date: Tue, 19 Nov 2024 09:38:01 +0100 Subject: [PATCH] add logs --- packages/editor-ui/src/utils/connectionNodeUtils.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packages/editor-ui/src/utils/connectionNodeUtils.ts b/packages/editor-ui/src/utils/connectionNodeUtils.ts index 46ba46f810e..41d94b202ad 100644 --- a/packages/editor-ui/src/utils/connectionNodeUtils.ts +++ b/packages/editor-ui/src/utils/connectionNodeUtils.ts @@ -11,6 +11,7 @@ export function adjustNewNodes( target: AddedNode, { sourceIsNew = true, targetIsNew = true } = {}, ) { + console.log('adjustNewNodes', source, target, sourceIsNew, targetIsNew); if (sourceIsNew) adjustNewSource(source, target); if (targetIsNew) adjustNewTarget(source, target); } @@ -28,7 +29,9 @@ function adjustNewTarget(source: AddedNode, target: AddedNode) { } function adjustNewSource(source: AddedNode, target: AddedNode) { + console.log('adjustNewSource', source, target); if (AI_MEMORY_NODE_TYPES.includes(source.type) && target.name) { + console.log('branch', AI_MEMORY_NODE_TYPES.includes(source.type), target.name); const { getCurrentWorkflow } = useWorkflowsStore(); const workflow = getCurrentWorkflow(); @@ -38,6 +41,7 @@ function adjustNewSource(source: AddedNode, target: AddedNode) { if ( !ps.some((x) => PROMPT_PROVIDER_NODE_NAMES.includes(workflow.getNode(x.name)?.type ?? '')) ) { + console.log('parents', ps); Object.assign>(source, { parameters: { ...source.parameters, sessionIdType: 'customKey' }, });