mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-18 10:31:15 +00:00
feat: Add nodeAsTool description overrides for tool version (no-changelog) (#14048)
This commit is contained in:
@@ -312,10 +312,16 @@ export class LoadNodesAndCredentials {
|
||||
*/
|
||||
createAiTools() {
|
||||
const usableNodes: Array<INodeTypeBaseDescription | INodeTypeDescription> =
|
||||
this.types.nodes.filter((nodetype) => nodetype.usableAsTool === true);
|
||||
this.types.nodes.filter((nodeType) => nodeType.usableAsTool);
|
||||
|
||||
for (const usableNode of usableNodes) {
|
||||
const description = deepCopy(usableNode);
|
||||
const description =
|
||||
typeof usableNode.usableAsTool === 'object'
|
||||
? ({
|
||||
...deepCopy(usableNode),
|
||||
...usableNode.usableAsTool?.replacements,
|
||||
} as INodeTypeBaseDescription)
|
||||
: deepCopy(usableNode);
|
||||
const wrapped = this.convertNodeToAiTool({ description }).description;
|
||||
|
||||
this.types.nodes.push(wrapped);
|
||||
@@ -505,7 +511,7 @@ export class LoadNodesAndCredentials {
|
||||
categories: ['AI'],
|
||||
subcategories: {
|
||||
AI: ['Tools'],
|
||||
Tools: ['Other Tools'],
|
||||
Tools: item.description.codex?.subcategories?.Tools ?? ['Other Tools'],
|
||||
},
|
||||
resources,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user