fix(AI Agent Node): Exclude tools agent from unsupported node versions (#9728)

Signed-off-by: Oleg Ivaniv <me@olegivaniv.com>
This commit is contained in:
oleg 2024-06-13 12:37:30 +02:00 committed by GitHub
parent ceb7f074eb
commit 28d1a5d00d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -302,6 +302,9 @@ export class Agent implements INodeType {
// Make Conversational Agent the default agent for versions 1.5 and below
{
...agentTypeProperty,
options: agentTypeProperty?.options?.filter(
(o) => 'value' in o && o.value !== 'toolsAgent',
),
displayOptions: { show: { '@version': [{ _cnd: { lte: 1.5 } }] } },
default: 'conversationalAgent',
},