diff --git a/packages/workflow/src/NodeHelpers.ts b/packages/workflow/src/NodeHelpers.ts index 85431c6897fdb..e21f2b7e1a700 100644 --- a/packages/workflow/src/NodeHelpers.ts +++ b/packages/workflow/src/NodeHelpers.ts @@ -432,12 +432,15 @@ export function convertNodeToAiTool< } } + const resources = item.description.codex?.resources ?? {}; + item.description.codex = { categories: ['AI'], subcategories: { AI: ['Tools'], Tools: ['Other Tools'], }, + resources, }; return item; } diff --git a/packages/workflow/test/NodeHelpers.test.ts b/packages/workflow/test/NodeHelpers.test.ts index 81b7af5de6524..09e036fc94607 100644 --- a/packages/workflow/test/NodeHelpers.test.ts +++ b/packages/workflow/test/NodeHelpers.test.ts @@ -3693,6 +3693,7 @@ describe('NodeHelpers', () => { AI: ['Tools'], Tools: ['Other Tools'], }, + resources: {}, }); }); @@ -3775,6 +3776,9 @@ describe('NodeHelpers', () => { subcategories: { Existing: ['Category'], }, + resources: { + primaryDocumentation: [{ url: 'https://example.com' }], + }, }; const result = convertNodeToAiTool(fullNodeWrapper); expect(result.description.codex).toEqual({ @@ -3783,6 +3787,9 @@ describe('NodeHelpers', () => { AI: ['Tools'], Tools: ['Other Tools'], }, + resources: { + primaryDocumentation: [{ url: 'https://example.com' }], + }, }); });