diff --git a/packages/editor-ui/src/components/Node/NodeCreator/useActions.test.ts b/packages/editor-ui/src/components/Node/NodeCreator/useActions.test.ts index cf8fa94014..58588fea58 100644 --- a/packages/editor-ui/src/components/Node/NodeCreator/useActions.test.ts +++ b/packages/editor-ui/src/components/Node/NodeCreator/useActions.test.ts @@ -93,7 +93,14 @@ describe('useActions', () => { ], nodes: [ { type: CHAT_TRIGGER_NODE_TYPE, isAutoAdd: true }, - { type: AGENT_NODE_TYPE, openDetail: true }, + { + type: AGENT_NODE_TYPE, + parameters: { + promptType: 'auto', + text: '={{ $json.chatInput }}', + }, + openDetail: true, + }, ], }); }); @@ -123,7 +130,14 @@ describe('useActions', () => { ], nodes: [ { type: CHAT_TRIGGER_NODE_TYPE, isAutoAdd: true }, - { type: AGENT_NODE_TYPE, openDetail: true }, + { + type: AGENT_NODE_TYPE, + parameters: { + promptType: 'auto', + text: '={{ $json.chatInput }}', + }, + openDetail: true, + }, ], }); }); diff --git a/packages/editor-ui/src/utils/connectionNodeUtils.ts b/packages/editor-ui/src/utils/connectionNodeUtils.ts index 86d583f26f..3b3e9b9305 100644 --- a/packages/editor-ui/src/utils/connectionNodeUtils.ts +++ b/packages/editor-ui/src/utils/connectionNodeUtils.ts @@ -16,6 +16,7 @@ export function adjustNewNodes( function adjustNewChild(parent: AddedNode, child: AddedNode) { if (AI_ROOT_NODE_TYPES.includes(child.type) && PROMPT_PROVIDER_NODE_NAMES.includes(parent.type)) { + // Need to re-set text to support disabled parameter value for prompt text. Object.assign>(child, { parameters: { ...child.parameters, promptType: 'auto', text: '={{ $json.chatInput }}' }, });