mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-20 19:32:15 +00:00
fix(editor): Hide $fromAI button for exact type matches only (#14996)
This commit is contained in:
@@ -47,10 +47,10 @@ function sanitizeFromAiParameterName(s: string) {
|
|||||||
|
|
||||||
// nodeName | [nodeName, highestUnsupportedVersion]
|
// nodeName | [nodeName, highestUnsupportedVersion]
|
||||||
const NODE_DENYLIST = [
|
const NODE_DENYLIST = [
|
||||||
'toolCode',
|
'@n8n/n8n-nodes-langchain.toolCode',
|
||||||
'toolHttpRequest',
|
'@n8n/n8n-nodes-langchain.toolHttpRequest',
|
||||||
'mcpClientTool',
|
'@n8n/n8n-nodes-langchain.mcpClientTool',
|
||||||
['toolWorkflow', 1.2],
|
['@n8n/n8n-nodes-langchain.toolWorkflow', 1.2],
|
||||||
] as const;
|
] as const;
|
||||||
|
|
||||||
const PATH_DENYLIST = [
|
const PATH_DENYLIST = [
|
||||||
@@ -192,10 +192,10 @@ export function parseOverrides(
|
|||||||
|
|
||||||
function isDeniedNode(nodeDenyData: string | readonly [string, number], node: INodeUi) {
|
function isDeniedNode(nodeDenyData: string | readonly [string, number], node: INodeUi) {
|
||||||
if (typeof nodeDenyData === 'string') {
|
if (typeof nodeDenyData === 'string') {
|
||||||
return node.type.endsWith(nodeDenyData);
|
return node.type === nodeDenyData;
|
||||||
} else {
|
} else {
|
||||||
const [name, version] = nodeDenyData;
|
const [typeName, version] = nodeDenyData;
|
||||||
return node.type.endsWith(name) && node.typeVersion <= version;
|
return node.type === typeName && node.typeVersion <= version;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user