mirror of
https://github.com/n8n-io/n8n.git
synced 2026-07-28 03:24:59 +02:00
fix(core): Hide sub-workflow tool from agent tool selection (no-changelog) (#34336)
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
parent
a871e2718f
commit
ccbfe94a49
|
|
@ -1,8 +1,14 @@
|
|||
import { AI_VENDOR_NODE_TYPES, CHAT_TOOL_NODE_TYPE } from 'n8n-workflow';
|
||||
import {
|
||||
AI_VENDOR_NODE_TYPES,
|
||||
CHAT_TOOL_NODE_TYPE,
|
||||
WORKFLOW_TOOL_LANGCHAIN_NODE_TYPE,
|
||||
} from 'n8n-workflow';
|
||||
|
||||
export const AGENT_BUILDER_HIDDEN_AVAILABLE_TOOL_NODE_TYPES: readonly string[] = [
|
||||
...AI_VENDOR_NODE_TYPES.map((nodeType) => `${nodeType}Tool`),
|
||||
CHAT_TOOL_NODE_TYPE,
|
||||
// Agents call workflows via native workflow tools, not the sub-workflow node
|
||||
WORKFLOW_TOOL_LANGCHAIN_NODE_TYPE,
|
||||
];
|
||||
|
||||
export const AGENT_BUILDER_AVAILABLE_AI_UTILITY_TOOL_NODE_TYPES = [
|
||||
|
|
|
|||
|
|
@ -157,6 +157,10 @@ describe('AgentsToolsService', () => {
|
|||
}
|
||||
});
|
||||
|
||||
it('rejects the sub-workflow tool node', () => {
|
||||
expect(isAgentToolNodeType('@n8n/n8n-nodes-langchain.toolWorkflow')).toBe(false);
|
||||
});
|
||||
|
||||
it('allows shared AI utility tool node IDs', () => {
|
||||
for (const nodeType of AGENT_BUILDER_AVAILABLE_AI_UTILITY_TOOL_NODE_TYPES) {
|
||||
expect(isAgentToolNodeType(nodeType)).toBe(true);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user