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:
oleg
2024-03-21 09:23:15 +01:00
committed by GitHub
parent 5e84c2ab89
commit 5f53d76e39
11 changed files with 97 additions and 25 deletions

View File

@@ -126,6 +126,9 @@ export default defineComponent({
isChatNode(): boolean {
return Boolean(this.nodeType && this.nodeType.name === CHAT_TRIGGER_NODE_TYPE);
},
isChatChild(): boolean {
return this.workflowsStore.checkIfNodeHasChatParent(this.nodeName);
},
isFormTriggerNode(): boolean {
return Boolean(this.nodeType && this.nodeType.name === FORM_TRIGGER_NODE_TYPE);
},
@@ -226,7 +229,8 @@ export default defineComponent({
},
async onClick() {
if (this.isChatNode) {
// Show chat if it's a chat node or a child of a chat node with no input data
if (this.isChatNode || (this.isChatChild && this.ndvStore.isDNVDataEmpty('input'))) {
this.ndvStore.setActiveNodeName(null);
nodeViewEventBus.emit('openChat');
} else if (this.isListeningForEvents) {