CI + comment

This commit is contained in:
Charlie Kolb 2024-11-18 11:37:53 +01:00
parent 175f630b1c
commit 4117b5298b
No known key found for this signature in database
2 changed files with 17 additions and 2 deletions

View file

@ -93,7 +93,14 @@ describe('useActions', () => {
], ],
nodes: [ nodes: [
{ type: CHAT_TRIGGER_NODE_TYPE, isAutoAdd: true }, { 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: [ nodes: [
{ type: CHAT_TRIGGER_NODE_TYPE, isAutoAdd: true }, { 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,
},
], ],
}); });
}); });

View file

@ -16,6 +16,7 @@ export function adjustNewNodes(
function adjustNewChild(parent: AddedNode, child: AddedNode) { function adjustNewChild(parent: AddedNode, child: AddedNode) {
if (AI_ROOT_NODE_TYPES.includes(child.type) && PROMPT_PROVIDER_NODE_NAMES.includes(parent.type)) { 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<AddedNode, Partial<INode>>(child, { Object.assign<AddedNode, Partial<INode>>(child, {
parameters: { ...child.parameters, promptType: 'auto', text: '={{ $json.chatInput }}' }, parameters: { ...child.parameters, promptType: 'auto', text: '={{ $json.chatInput }}' },
}); });