mirror of
https://github.com/n8n-io/n8n.git
synced 2024-11-12 15:44:06 -08:00
fix(core): Use the correct docs URL for regular nodes when used as tools (#11529)
Some checks are pending
Test Master / install-and-build (push) Waiting to run
Test Master / Unit tests (18.x) (push) Blocked by required conditions
Test Master / Unit tests (20.x) (push) Blocked by required conditions
Test Master / Unit tests (22.4) (push) Blocked by required conditions
Test Master / Lint (push) Blocked by required conditions
Test Master / Notify Slack on failure (push) Blocked by required conditions
Benchmark Docker Image CI / build (push) Waiting to run
Some checks are pending
Test Master / install-and-build (push) Waiting to run
Test Master / Unit tests (18.x) (push) Blocked by required conditions
Test Master / Unit tests (20.x) (push) Blocked by required conditions
Test Master / Unit tests (22.4) (push) Blocked by required conditions
Test Master / Lint (push) Blocked by required conditions
Test Master / Notify Slack on failure (push) Blocked by required conditions
Benchmark Docker Image CI / build (push) Waiting to run
This commit is contained in:
parent
097c2542d0
commit
a092b8e972
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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' }],
|
||||
},
|
||||
});
|
||||
});
|
||||
|
||||
|
|
Loading…
Reference in a new issue