From 457edd99bb853d8ccf3014605d5823933f3c0bc6 Mon Sep 17 00:00:00 2001 From: Tomi Turtiainen <10324676+tomi@users.noreply.github.com> Date: Wed, 15 Jan 2025 16:07:24 +0200 Subject: [PATCH] fix(editor): Open chat when executing agent node in canvas v2 (#12617) --- cypress/composables/modals/credential-modal.ts | 3 +++ packages/editor-ui/src/views/NodeView.v2.vue | 2 ++ 2 files changed, 5 insertions(+) diff --git a/cypress/composables/modals/credential-modal.ts b/cypress/composables/modals/credential-modal.ts index 53ba0c3a28e30..4e6533300ae3f 100644 --- a/cypress/composables/modals/credential-modal.ts +++ b/cypress/composables/modals/credential-modal.ts @@ -2,6 +2,8 @@ * Getters */ +import { clearNotifications } from '../../pages/notifications'; + export function getCredentialConnectionParameterInputs() { return cy.getByTestId('credential-connection-parameter'); } @@ -55,5 +57,6 @@ export function setCredentialValues(values: Record, save = true) if (save) { saveCredential(); closeCredentialModal(); + clearNotifications(); } } diff --git a/packages/editor-ui/src/views/NodeView.v2.vue b/packages/editor-ui/src/views/NodeView.v2.vue index 8ea44cc3a1110..76e1009c6a4e1 100644 --- a/packages/editor-ui/src/views/NodeView.v2.vue +++ b/packages/editor-ui/src/views/NodeView.v2.vue @@ -924,11 +924,13 @@ async function onImportWorkflowUrlEvent(data: IDataObject) { function addImportEventBindings() { nodeViewEventBus.on('importWorkflowData', onImportWorkflowDataEvent); nodeViewEventBus.on('importWorkflowUrl', onImportWorkflowUrlEvent); + nodeViewEventBus.on('openChat', onOpenChat); } function removeImportEventBindings() { nodeViewEventBus.off('importWorkflowData', onImportWorkflowDataEvent); nodeViewEventBus.off('importWorkflowUrl', onImportWorkflowUrlEvent); + nodeViewEventBus.off('openChat', onOpenChat); } /**