Skip to content

Commit 8613521

Browse files
authored
fix(editor): Hide $fromAI button for exact type matches only (#14996)
1 parent 7e764ce commit 8613521

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

packages/frontend/editor-ui/src/utils/fromAIOverrideUtils.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,10 @@ function sanitizeFromAiParameterName(s: string) {
4747

4848
// nodeName | [nodeName, highestUnsupportedVersion]
4949
const NODE_DENYLIST = [
50-
'toolCode',
51-
'toolHttpRequest',
52-
'mcpClientTool',
53-
['toolWorkflow', 1.2],
50+
'@n8n/n8n-nodes-langchain.toolCode',
51+
'@n8n/n8n-nodes-langchain.toolHttpRequest',
52+
'@n8n/n8n-nodes-langchain.mcpClientTool',
53+
['@n8n/n8n-nodes-langchain.toolWorkflow', 1.2],
5454
] as const;
5555

5656
const PATH_DENYLIST = [
@@ -192,10 +192,10 @@ export function parseOverrides(
192192

193193
function isDeniedNode(nodeDenyData: string | readonly [string, number], node: INodeUi) {
194194
if (typeof nodeDenyData === 'string') {
195-
return node.type.endsWith(nodeDenyData);
195+
return node.type === nodeDenyData;
196196
} else {
197-
const [name, version] = nodeDenyData;
198-
return node.type.endsWith(name) && node.typeVersion <= version;
197+
const [typeName, version] = nodeDenyData;
198+
return node.type === typeName && node.typeVersion <= version;
199199
}
200200
}
201201

0 commit comments

Comments
 (0)