mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-18 02:21:13 +00:00
fix(core): Use the correct docs URL for regular nodes when used as tools (#11529)
This commit is contained in:
committed by
GitHub
parent
097c2542d0
commit
a092b8e972
@@ -432,12 +432,15 @@ export function convertNodeToAiTool<
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const resources = item.description.codex?.resources ?? {};
|
||||||
|
|
||||||
item.description.codex = {
|
item.description.codex = {
|
||||||
categories: ['AI'],
|
categories: ['AI'],
|
||||||
subcategories: {
|
subcategories: {
|
||||||
AI: ['Tools'],
|
AI: ['Tools'],
|
||||||
Tools: ['Other Tools'],
|
Tools: ['Other Tools'],
|
||||||
},
|
},
|
||||||
|
resources,
|
||||||
};
|
};
|
||||||
return item;
|
return item;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3693,6 +3693,7 @@ describe('NodeHelpers', () => {
|
|||||||
AI: ['Tools'],
|
AI: ['Tools'],
|
||||||
Tools: ['Other Tools'],
|
Tools: ['Other Tools'],
|
||||||
},
|
},
|
||||||
|
resources: {},
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -3775,6 +3776,9 @@ describe('NodeHelpers', () => {
|
|||||||
subcategories: {
|
subcategories: {
|
||||||
Existing: ['Category'],
|
Existing: ['Category'],
|
||||||
},
|
},
|
||||||
|
resources: {
|
||||||
|
primaryDocumentation: [{ url: 'https://example.com' }],
|
||||||
|
},
|
||||||
};
|
};
|
||||||
const result = convertNodeToAiTool(fullNodeWrapper);
|
const result = convertNodeToAiTool(fullNodeWrapper);
|
||||||
expect(result.description.codex).toEqual({
|
expect(result.description.codex).toEqual({
|
||||||
@@ -3783,6 +3787,9 @@ describe('NodeHelpers', () => {
|
|||||||
AI: ['Tools'],
|
AI: ['Tools'],
|
||||||
Tools: ['Other Tools'],
|
Tools: ['Other Tools'],
|
||||||
},
|
},
|
||||||
|
resources: {
|
||||||
|
primaryDocumentation: [{ url: 'https://example.com' }],
|
||||||
|
},
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user