fix(Call n8n Workflow Tool Node): Support concurrent invocations of the tool (#13526)

Co-authored-by: Oleg Ivaniv <me@olegivaniv.com>
This commit is contained in:
Charlie Kolb
2025-02-26 16:23:31 +01:00
committed by GitHub
parent 24a38b99a1
commit 5334661b76
15 changed files with 171 additions and 86 deletions

View File

@@ -1,7 +1,7 @@
import { DynamicTool, type Tool } from '@langchain/core/tools';
import { createMockExecuteFunction } from 'n8n-nodes-base/test/nodes/Helpers';
import { NodeOperationError } from 'n8n-workflow';
import type { IExecuteFunctions, INode } from 'n8n-workflow';
import type { ISupplyDataFunctions, IExecuteFunctions, INode } from 'n8n-workflow';
import { z } from 'zod';
import { escapeSingleCurlyBrackets, getConnectedTools } from '../helpers';
@@ -171,7 +171,7 @@ describe('getConnectedTools', () => {
mockExecuteFunctions = createMockExecuteFunction({}, mockNode);
mockN8nTool = new N8nTool(mockExecuteFunctions, {
mockN8nTool = new N8nTool(mockExecuteFunctions as unknown as ISupplyDataFunctions, {
name: 'Dummy Tool',
description: 'A dummy tool for testing',
func: jest.fn(),