fix(editor): Fix opening of chat window when executing a child node (#8789)
Signed-off-by: Oleg Ivaniv <me@olegivaniv.com> Co-authored-by: Michael Kret <michael.k@radency.com>
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import {
|
||||
CHAT_TRIGGER_NODE_TYPE,
|
||||
DEFAULT_NEW_WORKFLOW_NAME,
|
||||
DUPLICATE_POSTFFIX,
|
||||
EnterpriseEditionFeature,
|
||||
@@ -1460,5 +1461,18 @@ export const useWorkflowsStore = defineStore(STORES.WORKFLOWS, {
|
||||
appendChatMessage(message: string): void {
|
||||
this.chatMessages.push(message);
|
||||
},
|
||||
|
||||
checkIfNodeHasChatParent(nodeName: string): boolean {
|
||||
const workflow = this.getCurrentWorkflow();
|
||||
const parents = workflow.getParentNodes(nodeName, 'main');
|
||||
|
||||
const matchedChatNode = parents.find((parent) => {
|
||||
const parentNodeType = this.getNodeByName(parent)?.type;
|
||||
|
||||
return parentNodeType === CHAT_TRIGGER_NODE_TYPE;
|
||||
});
|
||||
|
||||
return !!matchedChatNode;
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user