n8n-editor-ui 1.85.2 → 1.87.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (120) hide show
  1. package/dist/assets/AnimatedSpinner-ChSRgyeI.css +39 -0
  2. package/dist/assets/AnimatedSpinner-urWn52iY.js +18 -0
  3. package/dist/assets/{AnnotationTagsDropdown.ee.vue_vue_type_script_setup_true_lang-B2Xk-4o2.js → AnnotationTagsDropdown.ee.vue_vue_type_script_setup_true_lang-DIbgkfAC.js} +1 -1
  4. package/dist/assets/{AuthView-Bhr2Ols-.js → AuthView-DIQI5asI.js} +2 -2
  5. package/dist/assets/{CanvasChatSwitch-BcSDHC-c.css → CanvasChatSwitch-0IWSu8RE.css} +488 -46
  6. package/dist/assets/{CanvasChatSwitch-E9vu2jW8.js → CanvasChatSwitch-BIpZuY-n.js} +697 -214
  7. package/dist/assets/{ChangePasswordView-BzAEcqVw.js → ChangePasswordView-D8Qv0tim.js} +3 -3
  8. package/dist/assets/CollectionParameter-DT1MnS63.js +4 -0
  9. package/dist/assets/{CredentialsView-CZiEXdjH.js → CredentialsView-tJ8-2RrO.js} +8 -8
  10. package/dist/assets/{ErrorView-C1QywuMY.js → ErrorView-CZEZD7LB.js} +1 -1
  11. package/dist/assets/{ExecutionsTime-BOPJEomw.css → ExecutionsTime-DZHUIJjP.css} +6 -6
  12. package/dist/assets/{ExecutionsTime.vue_vue_type_script_setup_true_lang-l5VZIkoy.js → ExecutionsTime.vue_vue_type_script_setup_true_lang-gcknFyjA.js} +23 -20
  13. package/dist/assets/{ExecutionsView-Bo0Nk8lV.js → ExecutionsView-BCfIz8EF.js} +49 -57
  14. package/dist/assets/{ExecutionsView-JCKikuIS.css → ExecutionsView-ByQf9yli.css} +13 -47
  15. package/dist/assets/{FileSaver.min-D3VgyjMF.js → FileSaver.min-Bs2qHlKb.js} +1 -1
  16. package/dist/assets/{FixedCollectionParameter-RpfOY9Ho.js → FixedCollectionParameter-E0LDqNW3.js} +1 -1
  17. package/dist/assets/{ForgotMyPasswordView-DPTddCxG.js → ForgotMyPasswordView-YOnrzvKJ.js} +3 -3
  18. package/dist/assets/InsightsChartAverageRuntime-DWrrriYN.js +61 -0
  19. package/dist/assets/InsightsChartFailed-DRi6JC3m.js +57 -0
  20. package/dist/assets/InsightsChartFailureRate-BdFNsMpg.js +57 -0
  21. package/dist/assets/InsightsChartTimeSaved-C12GZzSQ.js +71 -0
  22. package/dist/assets/InsightsChartTotal-Cn386HO4.js +59 -0
  23. package/dist/assets/InsightsDashboard-BawwZ0Oo.js +154 -0
  24. package/dist/assets/InsightsDashboard-CB4vHnBh.css +152 -0
  25. package/dist/assets/InsightsPaywall-OeXh6LeZ.css +133 -0
  26. package/dist/assets/InsightsPaywall-g3JcqAYL.js +58 -0
  27. package/dist/assets/{useOverview-DcRuPjLJ.css → InsightsSummary-W08OzElS.css} +57 -35
  28. package/dist/assets/InsightsSummary-vMmKUcie.js +185 -0
  29. package/dist/assets/InsightsTableWorkflows-DQQ1vvMz.js +129 -0
  30. package/dist/assets/InsightsTableWorkflows-Us3j4UTO.css +128 -0
  31. package/dist/assets/{Logo-CxllxUni.js → Logo-Vm92axlM.js} +1 -1
  32. package/dist/assets/{MainHeader-9gTxUJIR.js → MainHeader-BUhpvu2K.js} +9 -10
  33. package/dist/assets/{MainSidebar-CRJML8mh.js → MainSidebar-D5P5FSUQ.js} +11 -4
  34. package/dist/assets/{NodeCreation-zoYjBJl6.js → NodeCreation-BgW5u-Bc.js} +4 -4
  35. package/dist/assets/{NodeCreator-D-qBRyBy.js → NodeCreator-CFe2n6vJ.js} +10 -26
  36. package/dist/assets/{NodeDetailsView-C1z3N5z_.css → NodeDetailsView-BT-ro74o.css} +63 -70
  37. package/dist/assets/{NodeDetailsView-C1iBFaC1.js → NodeDetailsView-CmtK-rDD.js} +145 -482
  38. package/dist/assets/{NodeView-Bio-FnnF.js → NodeView-BqaNPfpx.js} +19 -21
  39. package/dist/assets/{ProjectCardBadge-BEflW6oP.js → ProjectCardBadge-BKgtzWr1.js} +69 -36
  40. package/dist/assets/{ProjectCardBadge-C78ap7Rc.css → ProjectCardBadge-t3v64i1e.css} +18 -13
  41. package/dist/assets/{ProjectHeader-DK3_g_D8.js → ProjectHeader-BWVSdavS.js} +33 -7
  42. package/dist/assets/{ProjectHeader-B-a6_GH6.css → ProjectHeader-BsBpG-Mj.css} +7 -7
  43. package/dist/assets/{ProjectSettings-CLMy_-YC.js → ProjectSettings-BL-2-uOg.js} +3 -3
  44. package/dist/assets/{PushConnectionTracker.vue_vue_type_script_setup_true_lang-CSazgsi8.js → PushConnectionTracker.vue_vue_type_script_setup_true_lang-BL-bMMgn.js} +1 -2
  45. package/dist/assets/{ResourcesListLayout-CBvvL0VM.js → ResourcesListLayout-CozpmfUY.js} +1 -1
  46. package/dist/assets/{RunDataAi-C-tu9GrI.js → RunDataAi-B_EadpzG.js} +188 -94
  47. package/dist/assets/{RunDataAi-CN9FrT9c.css → RunDataAi-CUUDqZRP.css} +128 -0
  48. package/dist/assets/{RunDataJson-ClpS_600.js → RunDataJson-CyNNCtyd.js} +11 -12
  49. package/dist/assets/{RunDataJsonActions-gWW8Qkt_.js → RunDataJsonActions-SQqaiBEP.js} +1 -2
  50. package/dist/assets/{RunDataSearch-Dgv5JYk-.js → RunDataSearch-BF9kshKq.js} +1 -1
  51. package/dist/assets/{RunDataTable-nsOk35pD.js → RunDataTable-DsW7wuc2.js} +10 -8
  52. package/dist/assets/{SamlOnboarding-C5TSdGcx.js → SamlOnboarding-BX7RiRJB.js} +3 -3
  53. package/dist/assets/{SettingsApiView-CzQG1ofR.js → SettingsApiView-CDIPYvaG.js} +1 -1
  54. package/dist/assets/{SettingsCommunityNodesView-D_F3n2NO.js → SettingsCommunityNodesView-BRSEkT73.js} +4 -5
  55. package/dist/assets/{SettingsExternalSecrets-BUgKlMoR.js → SettingsExternalSecrets-D7ASuAnS.js} +1 -1
  56. package/dist/assets/{SettingsLdapView-CAmuVErd.js → SettingsLdapView-DA5fZZ51.js} +1 -1
  57. package/dist/assets/{SettingsLogStreamingView-DLkHrsx5.js → SettingsLogStreamingView-C9qkYvCr.js} +1 -1
  58. package/dist/assets/{SettingsPersonalView-2elwsG0f.js → SettingsPersonalView-BnNOJcvO.js} +2 -2
  59. package/dist/assets/{SettingsSourceControl-BD426GUo.js → SettingsSourceControl--ozL4427.js} +1 -1
  60. package/dist/assets/{SettingsSso-B-7lLoTI.js → SettingsSso-Bfe_HRSr.js} +1 -1
  61. package/dist/assets/{SettingsUsageAndPlan-EUWVJYe2.js → SettingsUsageAndPlan-CzvMNudh.js} +1 -1
  62. package/dist/assets/{SettingsUsersView-C3GbTYvU.js → SettingsUsersView-DGu5ku48.js} +1 -1
  63. package/dist/assets/{SettingsView-DSMM_8SL.js → SettingsView-CvreVxXL.js} +1 -1
  64. package/dist/assets/{SetupView-CexY8Lic.js → SetupView-BJT6GtIA.js} +3 -3
  65. package/dist/assets/{SetupWorkflowCredentialsButton-BpLp754t.js → SetupWorkflowCredentialsButton-BEq2gs_-.js} +2 -4
  66. package/dist/assets/{SetupWorkflowFromTemplateView-CLvS9Kda.js → SetupWorkflowFromTemplateView-F9oCDWX8.js} +3 -12
  67. package/dist/assets/{SigninView-CYkcm3hG.js → SigninView-DyoDtCBc.js} +3 -3
  68. package/dist/assets/{SignoutView-C2HutrZm.js → SignoutView-DclBslYe.js} +1 -1
  69. package/dist/assets/{SignupView-B-o-ka0Z.js → SignupView-BhB0Hhj0.js} +3 -3
  70. package/dist/assets/{TemplateDetails-C20G_lj4.js → TemplateDetails-B3utdyMi.js} +1 -1
  71. package/dist/assets/{TemplateList-DQzcYS6n.js → TemplateList-Bgz1iiiH.js} +1 -1
  72. package/dist/assets/{TemplatesCollectionView-DEEMhmYZ.js → TemplatesCollectionView-CORzb8YZ.js} +7 -9
  73. package/dist/assets/{TemplatesSearchView-S6802uNr.js → TemplatesSearchView-DTuv4-5C.js} +3 -3
  74. package/dist/assets/{TemplatesView-CT7S5O4K.js → TemplatesView-CFV5SVF7.js} +1 -1
  75. package/dist/assets/{TemplatesWorkflowView-BMd9OmqA.js → TemplatesWorkflowView-CQVVdNty.js} +5 -7
  76. package/dist/assets/{TestDefinitionEditView-BXhOuJrU.css → TestDefinitionEditView-Cwkrz308.css} +12 -143
  77. package/dist/assets/{TestDefinitionEditView-5kDGEtaD.js → TestDefinitionEditView-DX6GIeq2.js} +179 -331
  78. package/dist/assets/{TestDefinitionListView-BM-hghAY.js → TestDefinitionListView-CLEkthYQ.js} +1 -1
  79. package/dist/assets/{TestDefinitionNewView-CNN-qAmL.js → TestDefinitionNewView-DWTTqvlN.js} +2 -2
  80. package/dist/assets/{TestDefinitionRootView-S8g84AaK.js → TestDefinitionRootView-D0yLW0V6.js} +1 -1
  81. package/dist/assets/{VariablesView-D90WCfYK.js → VariablesView-Dsr4pqth.js} +3 -3
  82. package/dist/assets/{WorkerView-BHVIRKm_.js → WorkerView-Bbu5wv-g.js} +6 -7
  83. package/dist/assets/{WorkflowActivator-BsceIfln.js → WorkflowActivator-C197X_D6.js} +2 -2
  84. package/dist/assets/{WorkflowExecutionsInfoAccordion-DxGIzmq4.js → WorkflowExecutionsInfoAccordion-CHPlRtMQ.js} +1 -1
  85. package/dist/assets/{WorkflowExecutionsLandingPage-czqJYUnQ.js → WorkflowExecutionsLandingPage-CnvMc3SA.js} +2 -2
  86. package/dist/assets/{WorkflowExecutionsPreview-BzCGXWj0.js → WorkflowExecutionsPreview-CJBM3Awe.js} +24 -256
  87. package/dist/assets/{WorkflowExecutionsPreview-CHu6M3Dh.css → WorkflowExecutionsPreview-D7jTJ8GL.css} +16 -48
  88. package/dist/assets/{WorkflowExecutionsView-syep-_N0.js → WorkflowExecutionsView-BwB6WS6M.js} +11 -17
  89. package/dist/assets/{WorkflowHistory-CmHn_hnX.js → WorkflowHistory-U5a4aYts.js} +4 -4
  90. package/dist/assets/{WorkflowOnboardingView-BmhaZBkH.js → WorkflowOnboardingView-DHUUTLOo.js} +1 -1
  91. package/dist/assets/{WorkflowPreview-BN13256Q.js → WorkflowPreview-D8pwehRe.js} +1 -1
  92. package/dist/assets/{WorkflowsView-r9qJOUEb.css → WorkflowsView-CJB9aI6A.css} +27 -41
  93. package/dist/assets/{WorkflowsView-6qbtftll.js → WorkflowsView-DIh7kqZk.js} +76 -141
  94. package/dist/assets/chartjs.utils-DTEY3u-V.js +193 -0
  95. package/dist/assets/dateFormatter-C7xnNKzY.js +21 -0
  96. package/dist/assets/{easyAiWorkflowUtils-C7LfXIgb.js → easyAiWorkflowUtils-V__OjFo9.js} +1 -1
  97. package/dist/assets/{global-link-actions-znEIb0N4.js → global-link-actions-vGpWr9Uz.js} +1 -1
  98. package/dist/assets/{import-curl-BsKs3fYs.js → import-curl-C6ERUxFe.js} +1 -1
  99. package/dist/assets/{index-Cjz62pAo.js → index-BrjPYODL.js} +3 -1
  100. package/dist/assets/{index-DZljH0cm.js → index-DD7Wuhk5.js} +11407 -5580
  101. package/dist/assets/{index-CgXKy7t-.css → index-DJ205bL0.css} +418 -92
  102. package/dist/assets/{pickBy-DlIFPp_M.js → pickBy-BILEJ4hg.js} +1 -1
  103. package/dist/assets/{templateActions-ClDjWPHA.js → templateActions-M3qRQiV6.js} +2 -7
  104. package/dist/assets/{useBeforeUnload-BFlrxvKb.js → useBeforeUnload-DTsj_abb.js} +1 -1
  105. package/dist/assets/{useCanvasMapping-CJcAsQmx.css → useCanvasMapping-BkGr1HdJ.css} +29 -28
  106. package/dist/assets/{useCanvasMapping-C0PMQVwg.js → useCanvasMapping-DJvMRP2s.js} +71 -56
  107. package/dist/assets/{useCanvasOperations-2Ca5hPmu.js → useCanvasOperations-DCaSrD1N.js} +26 -254
  108. package/dist/assets/{useClearExecutionButtonVisible-D8unhL-H.js → useClearExecutionButtonVisible-CVPKhr9F.js} +2 -2
  109. package/dist/assets/{useExecutionDebugging-MiAgkS54.js → useExecutionDebugging-yY2o_eNc.js} +1 -1
  110. package/dist/assets/{useExecutionHelpers-CgD9G_XU.js → useExecutionHelpers-BVY9xXbG.js} +2 -19
  111. package/dist/assets/{useImportCurlCommand-D6LUnncf.js → useImportCurlCommand-Chewi-_x.js} +2 -2
  112. package/dist/assets/{usePushConnection-DAhrfl2L.js → usePushConnection-9zsAnuvC.js} +13 -6
  113. package/dist/assets/{useTestDefinitionForm-TDiKTq9o.js → useTestDefinitionForm-CCVy0jKP.js} +1 -31
  114. package/dist/assets/{useWorkflowActivate-C_GRAYoC.js → useWorkflowActivate-DeEvbrsK.js} +1 -1
  115. package/dist/index.html +2 -2
  116. package/package.json +1 -1
  117. package/dist/assets/CollectionParameter-XKkHxrwX.js +0 -4
  118. package/dist/assets/pushConnection.store-DHLcz9cC.js +0 -238
  119. package/dist/assets/useOverview-BqIOGpWx.js +0 -161
  120. package/dist/assets/useRunWorkflow-sGIs6NeH.js +0 -521
@@ -1,10 +1,9 @@
1
- import { aY as inject, aZ as isRef, i as createElementBlock, g as openBlock, k as createBaseVNode, d as defineComponent, q as computed, j as createVNode, e as createBlock, f as createCommentVNode, m as unref, t as toDisplayString, J as withModifiers, _ as _export_sfc, a_ as toRefs, r as ref, o as onMounted, n as normalizeClass, x as renderSlot, a$ as normalizeProps, b0 as guardReactiveProps, b1 as resolveDynamicComponent, b2 as mergeProps, b3 as VueMarkdown, F as Fragment, D as renderList, b4 as markdownLink, b5 as useFileDialog, b6 as onUnmounted, B as normalizeStyle, aB as withDirectives, b7 as vModelText, H as withKeys, w as withCtx, I as watch, h as resolveComponent, l as createTextVNode, b8 as useClipboard, a as useToast, c as useI18n$1, aR as N8nTooltip, b9 as N8nButton, aT as _sfc_main$e, aV as createSlots, aK as useStorage, ba as watchEffect, y as onBeforeUnmount, K as useDebounce, bb as provide, bc as useProvideTooltipAppendTo, bd as IsInPiPWindowSymbol, be as NodeConnectionTypes, bf as get, bg as last, bh as isEmpty, aj as useMessage, ak as MODAL_CONFIRM, bi as v4, bj as MANUAL_CHAT_TRIGGER_NODE_TYPE, bk as CHAT_TRIGGER_NODE_TYPE, bl as CHAIN_SUMMARIZATION_LANGCHAIN_NODE_TYPE, bm as AI_SUBCATEGORY, bn as AI_CATEGORY_AGENTS, bo as AI_CATEGORY_CHAINS, bp as AI_CODE_NODE_TYPE, bq as getNodeInputs, br as getConnectionTypes, bs as getNodeOutputs, bt as CHAT_TRIGGER_NODE_TYPE$1, T as useWorkflowsStore, bu as useNodeTypesStore, a1 as useCanvasStore, b as useRouter, bv as useNodeHelpers, V as VIEWS, bw as useTemplateRef, bx as N8nResizeWrapper, ah as useTelemetry, by as N8nText, bz as useStyles, p as useSettingsStore } from "./index-DZljH0cm.js";
2
- import { H as HighlightJS, R as RunDataAi } from "./RunDataAi-C-tu9GrI.js";
3
- import { u as usePinnedData } from "./useCanvasOperations-2Ca5hPmu.js";
4
- import { u as useRunWorkflow } from "./useRunWorkflow-sGIs6NeH.js";
5
- import { u as useClearExecutionButtonVisible } from "./useClearExecutionButtonVisible-D8unhL-H.js";
6
- import "./useExecutionHelpers-CgD9G_XU.js";
7
- import "./pushConnection.store-DHLcz9cC.js";
1
+ import { aZ as inject, a_ as isRef, i as createElementBlock, g as openBlock, k as createBaseVNode, d as defineComponent, q as computed, j as createVNode, e as createBlock, f as createCommentVNode, m as unref, t as toDisplayString, J as withModifiers, _ as _export_sfc, a$ as toRefs, r as ref, o as onMounted, n as normalizeClass, x as renderSlot, b0 as normalizeProps, b1 as guardReactiveProps, b2 as resolveDynamicComponent, b3 as mergeProps, b4 as VueMarkdown, F as Fragment, D as renderList, b5 as markdownLink, b6 as useFileDialog, b7 as onUnmounted, B as normalizeStyle, aC as withDirectives, b8 as vModelText, H as withKeys, w as withCtx, I as watch, h as resolveComponent, l as createTextVNode, b9 as N8nText, ba as useClipboard, a as useToast, c as useI18n$1, aS as N8nTooltip, bb as N8nButton, aU as _sfc_main$i, aW as createSlots, aL as useStorage, bc as watchEffect, y as onBeforeUnmount, K as useDebounce, bd as provide, be as useProvideTooltipAppendTo, bf as IsInPiPWindowSymbol, bg as isEmpty, bh as get, bi as usePinnedData, ak as useMessage, al as MODAL_CONFIRM, bj as v4, bk as MANUAL_CHAT_TRIGGER_NODE_TYPE, bl as CHAT_TRIGGER_NODE_TYPE, bm as CHAIN_SUMMARIZATION_LANGCHAIN_NODE_TYPE, bn as AI_SUBCATEGORY, bo as AI_CATEGORY_AGENTS, bp as AI_CATEGORY_CHAINS, bq as AI_CODE_NODE_TYPE, br as getNodeInputs, bs as getConnectionTypes, bt as getNodeOutputs, bu as NodeConnectionTypes, bv as CHAT_TRIGGER_NODE_TYPE$1, U as useWorkflowsStore, bw as useNodeTypesStore, a2 as useCanvasStore, b as useRouter, bx as useNodeHelpers, by as useRunWorkflow, V as VIEWS, bz as LOGS_PANEL_STATE, bA as useTemplateRef, bB as N8nResizeWrapper, ai as useTelemetry, bC as _sfc_main$k, bD as I18nT, bE as N8nIcon, au as useNDVStore, bF as ElTree, bG as N8nRadioButtons, z as nextTick, bH as useStyles, p as useSettingsStore } from "./index-DD7Wuhk5.js";
2
+ import { H as HighlightJS, R as RunDataAi, f as formatTokenUsageCount, _ as _sfc_main$j, g as getSubtreeTotalConsumedTokens, a as getTreeNodeData, c as createAiData, b as getTotalConsumedTokens } from "./RunDataAi-B_EadpzG.js";
3
+ import { u as useClearExecutionButtonVisible } from "./useClearExecutionButtonVisible-CVPKhr9F.js";
4
+ import { t as toTime, a as toDayMonth } from "./dateFormatter-C7xnNKzY.js";
5
+ import { u as upperFirst } from "./useCanvasOperations-DCaSrD1N.js";
6
+ import "./useExecutionHelpers-BVY9xXbG.js";
8
7
  function bash(hljs) {
9
8
  const regex = hljs.regex;
10
9
  const VAR = {};
@@ -2605,7 +2604,7 @@ function render$2(_ctx, _cache) {
2605
2604
  }
2606
2605
  const IconPreview = { name: "mdi-openInNew", render: render$2 };
2607
2606
  const _hoisted_1$7 = { class: "chat-file-name" };
2608
- const _sfc_main$d = /* @__PURE__ */ defineComponent({
2607
+ const _sfc_main$h = /* @__PURE__ */ defineComponent({
2609
2608
  __name: "ChatFile",
2610
2609
  props: {
2611
2610
  file: {},
@@ -2655,7 +2654,7 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent({
2655
2654
  };
2656
2655
  }
2657
2656
  });
2658
- const ChatFile = /* @__PURE__ */ _export_sfc(_sfc_main$d, [["__scopeId", "data-v-70b9370d"]]);
2657
+ const ChatFile = /* @__PURE__ */ _export_sfc(_sfc_main$h, [["__scopeId", "data-v-70b9370d"]]);
2659
2658
  const _hoisted_1$6 = {
2660
2659
  key: 0,
2661
2660
  class: "chat-message-actions"
@@ -2664,7 +2663,7 @@ const _hoisted_2$3 = {
2664
2663
  key: 2,
2665
2664
  class: "chat-message-files"
2666
2665
  };
2667
- const _sfc_main$c = /* @__PURE__ */ defineComponent({
2666
+ const _sfc_main$g = /* @__PURE__ */ defineComponent({
2668
2667
  __name: "Message",
2669
2668
  props: {
2670
2669
  message: {}
@@ -2730,8 +2729,8 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
2730
2729
  try {
2731
2730
  const dataURL = await readFileAsDataURL(file);
2732
2731
  fileSources.value[file.name] = dataURL;
2733
- } catch (error) {
2734
- console.error("Error reading file:", error);
2732
+ } catch (error2) {
2733
+ console.error("Error reading file:", error2);
2735
2734
  }
2736
2735
  }
2737
2736
  }
@@ -2846,7 +2845,7 @@ const _hoisted_7 = {
2846
2845
  key: 0,
2847
2846
  class: "chat-files"
2848
2847
  };
2849
- const _sfc_main$b = /* @__PURE__ */ defineComponent({
2848
+ const _sfc_main$f = /* @__PURE__ */ defineComponent({
2850
2849
  __name: "Input",
2851
2850
  props: {
2852
2851
  placeholder: { default: "inputPlaceholder" }
@@ -3051,8 +3050,8 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
3051
3050
  };
3052
3051
  }
3053
3052
  });
3054
- const ChatInput = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["__scopeId", "data-v-9f775274"]]);
3055
- const _sfc_main$a = /* @__PURE__ */ defineComponent({
3053
+ const ChatInput = /* @__PURE__ */ _export_sfc(_sfc_main$f, [["__scopeId", "data-v-9f775274"]]);
3054
+ const _sfc_main$e = /* @__PURE__ */ defineComponent({
3056
3055
  __name: "MessageTyping",
3057
3056
  props: {
3058
3057
  animation: { default: "bouncing" }
@@ -3077,7 +3076,7 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
3077
3076
  messageContainer.value?.scrollToView();
3078
3077
  });
3079
3078
  return (_ctx, _cache) => {
3080
- return openBlock(), createBlock(unref(_sfc_main$c), {
3079
+ return openBlock(), createBlock(unref(_sfc_main$g), {
3081
3080
  ref_key: "messageContainer",
3082
3081
  ref: messageContainer,
3083
3082
  class: normalizeClass(classes.value),
@@ -3100,12 +3099,15 @@ const _hoisted_1$2 = {
3100
3099
  key: 0,
3101
3100
  class: "empty-container"
3102
3101
  };
3103
- const _hoisted_2$1 = { class: "empty" };
3102
+ const _hoisted_2$1 = {
3103
+ class: "empty",
3104
+ "data-test-id": "chat-messages-empty"
3105
+ };
3104
3106
  const _hoisted_3 = {
3105
3107
  key: 1,
3106
3108
  class: "chat-messages-list"
3107
3109
  };
3108
- const _sfc_main$9 = /* @__PURE__ */ defineComponent({
3110
+ const _sfc_main$d = /* @__PURE__ */ defineComponent({
3109
3111
  __name: "MessagesList",
3110
3112
  props: {
3111
3113
  messages: {},
@@ -3147,13 +3149,13 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
3147
3149
  ])
3148
3150
  ])) : (openBlock(), createElementBlock("div", _hoisted_3, [
3149
3151
  (openBlock(true), createElementBlock(Fragment, null, renderList(unref(initialMessages), (initialMessage) => {
3150
- return openBlock(), createBlock(_sfc_main$c, {
3152
+ return openBlock(), createBlock(_sfc_main$g, {
3151
3153
  key: initialMessage.id,
3152
3154
  message: initialMessage
3153
3155
  }, null, 8, ["message"]);
3154
3156
  }), 128)),
3155
3157
  (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.messages, (message) => {
3156
- return openBlock(), createBlock(_sfc_main$c, {
3158
+ return openBlock(), createBlock(_sfc_main$g, {
3157
3159
  key: message.id,
3158
3160
  ref_for: true,
3159
3161
  ref_key: "messageComponents",
@@ -3166,12 +3168,12 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
3166
3168
  _: 2
3167
3169
  }, 1032, ["message"]);
3168
3170
  }), 128)),
3169
- unref(waitingForResponse) ? (openBlock(), createBlock(_sfc_main$a, { key: 0 })) : createCommentVNode("", true)
3171
+ unref(waitingForResponse) ? (openBlock(), createBlock(_sfc_main$e, { key: 0 })) : createCommentVNode("", true)
3170
3172
  ]));
3171
3173
  };
3172
3174
  }
3173
3175
  });
3174
- const _sfc_main$8 = /* @__PURE__ */ defineComponent({
3176
+ const _sfc_main$c = /* @__PURE__ */ defineComponent({
3175
3177
  __name: "MessageOptionTooltip",
3176
3178
  props: {
3177
3179
  placement: {
@@ -3206,17 +3208,17 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
3206
3208
  };
3207
3209
  }
3208
3210
  });
3209
- const container$5 = "_container_pqtqf_123";
3210
- const icon$1 = "_icon_pqtqf_129";
3211
- const style0$7 = {
3212
- container: container$5,
3213
- icon: icon$1
3211
+ const container$7 = "_container_pqtqf_123";
3212
+ const icon$2 = "_icon_pqtqf_129";
3213
+ const style0$9 = {
3214
+ container: container$7,
3215
+ icon: icon$2
3214
3216
  };
3215
- const cssModules$7 = {
3216
- "$style": style0$7
3217
+ const cssModules$9 = {
3218
+ "$style": style0$9
3217
3219
  };
3218
- const MessageOptionTooltip = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["__cssModules", cssModules$7]]);
3219
- const _sfc_main$7 = /* @__PURE__ */ defineComponent({
3220
+ const MessageOptionTooltip = /* @__PURE__ */ _export_sfc(_sfc_main$c, [["__cssModules", cssModules$9]]);
3221
+ const _sfc_main$b = /* @__PURE__ */ defineComponent({
3220
3222
  __name: "MessageOptionAction",
3221
3223
  props: {
3222
3224
  label: {
@@ -3257,17 +3259,17 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
3257
3259
  };
3258
3260
  }
3259
3261
  });
3260
- const container$4 = "_container_u1r1u_123";
3261
- const icon = "_icon_u1r1u_129";
3262
- const style0$6 = {
3263
- container: container$4,
3264
- icon
3262
+ const container$6 = "_container_u1r1u_123";
3263
+ const icon$1 = "_icon_u1r1u_129";
3264
+ const style0$8 = {
3265
+ container: container$6,
3266
+ icon: icon$1
3265
3267
  };
3266
- const cssModules$6 = {
3267
- "$style": style0$6
3268
+ const cssModules$8 = {
3269
+ "$style": style0$8
3268
3270
  };
3269
- const MessageOptionAction = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["__cssModules", cssModules$6]]);
3270
- const _sfc_main$6 = /* @__PURE__ */ defineComponent({
3271
+ const MessageOptionAction = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["__cssModules", cssModules$8]]);
3272
+ const _sfc_main$a = /* @__PURE__ */ defineComponent({
3271
3273
  __name: "PanelHeader",
3272
3274
  props: {
3273
3275
  title: {}
@@ -3280,9 +3282,16 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
3280
3282
  class: normalizeClass(_ctx.$style.container),
3281
3283
  onClick: _cache[0] || (_cache[0] = ($event) => emit("click"))
3282
3284
  }, [
3283
- createBaseVNode("span", {
3284
- class: normalizeClass(_ctx.$style.title)
3285
- }, toDisplayString(_ctx.title), 3),
3285
+ createVNode(unref(N8nText), {
3286
+ class: normalizeClass(_ctx.$style.title),
3287
+ bold: true,
3288
+ size: "small"
3289
+ }, {
3290
+ default: withCtx(() => [
3291
+ createTextVNode(toDisplayString(_ctx.title), 1)
3292
+ ]),
3293
+ _: 1
3294
+ }, 8, ["class"]),
3286
3295
  createBaseVNode("div", {
3287
3296
  class: normalizeClass(_ctx.$style.actions)
3288
3297
  }, [
@@ -3292,20 +3301,20 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
3292
3301
  };
3293
3302
  }
3294
3303
  });
3295
- const container$3 = "_container_oxcgo_123";
3296
- const title = "_title_oxcgo_145";
3297
- const actions$1 = "_actions_oxcgo_151";
3298
- const style0$5 = {
3299
- container: container$3,
3304
+ const container$5 = "_container_u9nuz_123";
3305
+ const title = "_title_u9nuz_144";
3306
+ const actions$1 = "_actions_u9nuz_149";
3307
+ const style0$7 = {
3308
+ container: container$5,
3300
3309
  title,
3301
3310
  actions: actions$1
3302
3311
  };
3303
- const cssModules$5 = {
3304
- "$style": style0$5
3312
+ const cssModules$7 = {
3313
+ "$style": style0$7
3305
3314
  };
3306
- const PanelHeader = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["__cssModules", cssModules$5]]);
3315
+ const PanelHeader = /* @__PURE__ */ _export_sfc(_sfc_main$a, [["__cssModules", cssModules$7]]);
3307
3316
  const _hoisted_1$1 = ["onClick"];
3308
- const _sfc_main$5 = /* @__PURE__ */ defineComponent({
3317
+ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
3309
3318
  __name: "ChatMessagesPanel",
3310
3319
  props: {
3311
3320
  pastChatMessages: {},
@@ -3392,6 +3401,7 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
3392
3401
  }, [
3393
3402
  _ctx.isNewLogsEnabled ? (openBlock(), createBlock(PanelHeader, {
3394
3403
  key: 0,
3404
+ "data-test-id": "chat-header",
3395
3405
  title: unref(locale).baseText("chat.window.title"),
3396
3406
  onClick: _cache[0] || (_cache[0] = ($event) => emit("clickHeader"))
3397
3407
  }, {
@@ -3422,7 +3432,7 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
3422
3432
  content: unref(locale).baseText("chat.window.session.resetSession")
3423
3433
  }, {
3424
3434
  default: withCtx(() => [
3425
- createVNode(unref(_sfc_main$e), {
3435
+ createVNode(unref(_sfc_main$i), {
3426
3436
  class: normalizeClass(_ctx.$style.headerButton),
3427
3437
  "data-test-id": "refresh-session-button",
3428
3438
  outline: "",
@@ -3462,7 +3472,7 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
3462
3472
  ]),
3463
3473
  _: 1
3464
3474
  }),
3465
- createVNode(unref(_sfc_main$e), {
3475
+ createVNode(unref(_sfc_main$i), {
3466
3476
  class: normalizeClass(_ctx.$style.headerButton),
3467
3477
  "data-test-id": "refresh-session-button",
3468
3478
  outline: "",
@@ -3472,7 +3482,7 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
3472
3482
  title: unref(locale).baseText("chat.window.session.reset"),
3473
3483
  onClick: onRefreshSession
3474
3484
  }, null, 8, ["class", "title"]),
3475
- _ctx.showCloseButton ? (openBlock(), createBlock(unref(_sfc_main$e), {
3485
+ _ctx.showCloseButton ? (openBlock(), createBlock(unref(_sfc_main$i), {
3476
3486
  key: 0,
3477
3487
  class: normalizeClass(_ctx.$style.headerButton),
3478
3488
  outline: "",
@@ -3487,7 +3497,7 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
3487
3497
  key: 2,
3488
3498
  class: normalizeClass(_ctx.$style.chatBody)
3489
3499
  }, [
3490
- createVNode(_sfc_main$9, {
3500
+ createVNode(_sfc_main$d, {
3491
3501
  messages: _ctx.messages,
3492
3502
  class: normalizeClass(_ctx.$style.messages),
3493
3503
  "empty-text": _ctx.isNewLogsEnabled ? unref(locale).baseText("chat.window.chat.emptyChatMessage.v2") : void 0
@@ -3568,17 +3578,17 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
3568
3578
  };
3569
3579
  }
3570
3580
  });
3571
- const chat$2 = "_chat_fs224_123";
3572
- const chatHeader = "_chatHeader_fs224_148";
3573
- const chatTitle = "_chatTitle_fs224_161";
3574
- const session = "_session_fs224_165";
3575
- const sessionId = "_sessionId_fs224_173";
3576
- const copyable = "_copyable_fs224_179";
3577
- const headerButton = "_headerButton_fs224_183";
3578
- const chatBody = "_chatBody_fs224_188";
3579
- const messages = "_messages_fs224_197";
3580
- const messagesInput = "_messagesInput_fs224_208";
3581
- const style0$4 = {
3581
+ const chat$2 = "_chat_14fd2_123";
3582
+ const chatHeader = "_chatHeader_14fd2_148";
3583
+ const chatTitle = "_chatTitle_14fd2_161";
3584
+ const session = "_session_14fd2_165";
3585
+ const sessionId = "_sessionId_14fd2_173";
3586
+ const copyable = "_copyable_14fd2_179";
3587
+ const headerButton = "_headerButton_14fd2_183";
3588
+ const chatBody = "_chatBody_14fd2_188";
3589
+ const messages = "_messages_14fd2_197";
3590
+ const messagesInput = "_messagesInput_14fd2_208";
3591
+ const style0$6 = {
3582
3592
  chat: chat$2,
3583
3593
  chatHeader,
3584
3594
  chatTitle,
@@ -3590,13 +3600,13 @@ const style0$4 = {
3590
3600
  messages,
3591
3601
  messagesInput
3592
3602
  };
3593
- const cssModules$4 = {
3594
- "$style": style0$4
3603
+ const cssModules$6 = {
3604
+ "$style": style0$6
3595
3605
  };
3596
- const ChatMessagesPanel = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["__cssModules", cssModules$4]]);
3606
+ const ChatMessagesPanel = /* @__PURE__ */ _export_sfc(_sfc_main$9, [["__cssModules", cssModules$6]]);
3597
3607
  const _hoisted_1 = { class: "meta" };
3598
3608
  const _hoisted_2 = { key: 0 };
3599
- const _sfc_main$4 = /* @__PURE__ */ defineComponent({
3609
+ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
3600
3610
  __name: "ChatLogsPanel",
3601
3611
  props: {
3602
3612
  node: {},
@@ -3643,17 +3653,17 @@ const logsWrapper = "_logsWrapper_1n9n2_140";
3643
3653
  const logsTitle = "_logsTitle_1n9n2_149";
3644
3654
  const logs$1 = "_logs_1n9n2_123";
3645
3655
  const actions = "_actions_1n9n2_159";
3646
- const style0$3 = {
3656
+ const style0$5 = {
3647
3657
  logsHeader,
3648
3658
  logsWrapper,
3649
3659
  logsTitle,
3650
3660
  logs: logs$1,
3651
3661
  actions
3652
3662
  };
3653
- const cssModules$3 = {
3654
- "$style": style0$3
3663
+ const cssModules$5 = {
3664
+ "$style": style0$5
3655
3665
  };
3656
- const ChatLogsPanel = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["__cssModules", cssModules$3]]);
3666
+ const ChatLogsPanel = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["__cssModules", cssModules$5]]);
3657
3667
  const LOCAL_STORAGE_PANEL_HEIGHT = "N8N_CANVAS_CHAT_HEIGHT";
3658
3668
  const LOCAL_STORAGE_PANEL_WIDTH = "N8N_CANVAS_CHAT_WIDTH";
3659
3669
  const MAX_WIDTH_PERCENTAGE = 0.8;
@@ -3809,12 +3819,9 @@ function usePiPWindow({
3809
3819
  }
3810
3820
  function useChatMessaging({
3811
3821
  chatTrigger,
3812
- connectedNode,
3813
3822
  messages: messages2,
3814
3823
  sessionId: sessionId2,
3815
- workflow,
3816
3824
  executionResultData,
3817
- getWorkflowResultDataByNodeName,
3818
3825
  onRunChatWorkflow
3819
3826
  }) {
3820
3827
  const locale = useI18n$1();
@@ -3975,31 +3982,11 @@ function useChatMessaging({
3975
3982
  messages2.value.push(newMessage);
3976
3983
  await startWorkflowWithMessage(newMessage.text, files);
3977
3984
  }
3978
- function getChatMessages() {
3979
- if (!connectedNode.value) return [];
3980
- const connectedMemoryInputs = workflow.value.connectionsByDestinationNode?.[connectedNode.value.name]?.[NodeConnectionTypes.AiMemory];
3981
- if (!connectedMemoryInputs) return [];
3982
- const memoryConnection = (connectedMemoryInputs ?? []).find((i) => (i ?? []).length > 0)?.[0];
3983
- if (!memoryConnection) return [];
3984
- const nodeResultData = getWorkflowResultDataByNodeName(memoryConnection.node);
3985
- const memoryOutputData = (nodeResultData ?? []).map(
3986
- (data) => get(data, ["data", NodeConnectionTypes.AiMemory, 0, 0, "json"])
3987
- ).find((data) => data && data.action === "saveContext");
3988
- return (memoryOutputData?.chatHistory ?? []).map((message, index) => {
3989
- return {
3990
- createdAt: (/* @__PURE__ */ new Date()).toISOString(),
3991
- text: message.kwargs.content,
3992
- id: `preload__${index}`,
3993
- sender: last(message.id) === "HumanMessage" ? "user" : "bot"
3994
- };
3995
- });
3996
- }
3997
3985
  return {
3998
3986
  previousMessageIndex,
3999
3987
  isLoading: computed(() => isLoading.value),
4000
3988
  sendMessage,
4001
- extractResponseMessage,
4002
- getChatMessages
3989
+ extractResponseMessage
4003
3990
  };
4004
3991
  }
4005
3992
  function useChatTrigger({
@@ -4080,7 +4067,7 @@ function useChatState(isDisabled, onWindowResize) {
4080
4067
  const currentSessionId = ref(v4().replace(/-/g, ""));
4081
4068
  const canvasNodes = computed(() => workflowsStore.allNodes);
4082
4069
  const allConnections = computed(() => workflowsStore.allConnections);
4083
- const chatPanelState = computed(() => workflowsStore.chatPanelState);
4070
+ const logsPanelState = computed(() => workflowsStore.logsPanelState);
4084
4071
  const workflow = computed(() => workflowsStore.getCurrentWorkflow());
4085
4072
  const {
4086
4073
  chatTriggerNode,
@@ -4095,14 +4082,11 @@ function useChatState(isDisabled, onWindowResize) {
4095
4082
  getNodeByName: workflowsStore.getNodeByName,
4096
4083
  getNodeType: nodeTypesStore.getNodeType
4097
4084
  });
4098
- const { sendMessage, getChatMessages, isLoading } = useChatMessaging({
4085
+ const { sendMessage, isLoading } = useChatMessaging({
4099
4086
  chatTrigger: chatTriggerNode,
4100
- connectedNode,
4101
4087
  messages: messages2,
4102
4088
  sessionId: currentSessionId,
4103
- workflow,
4104
4089
  executionResultData: computed(() => workflowsStore.getWorkflowExecution?.data?.resultData),
4105
- getWorkflowResultDataByNodeName: workflowsStore.getWorkflowResultDataByNodeName,
4106
4090
  onRunChatWorkflow
4107
4091
  });
4108
4092
  function createChatConfig(params) {
@@ -4145,14 +4129,11 @@ function useChatState(isDisabled, onWindowResize) {
4145
4129
  provide(ChatSymbol, chatConfig);
4146
4130
  provide(ChatOptionsSymbol, chatOptions);
4147
4131
  watch(
4148
- () => chatPanelState.value,
4132
+ () => logsPanelState.value,
4149
4133
  (state) => {
4150
- if (state !== "closed") {
4134
+ if (state !== LOGS_PANEL_STATE.CLOSED) {
4151
4135
  setChatTriggerNode();
4152
4136
  setConnectedNode();
4153
- if (messages2.value.length === 0) {
4154
- messages2.value = getChatMessages();
4155
- }
4156
4137
  setTimeout(() => {
4157
4138
  onWindowResize();
4158
4139
  chatEventBus.emit("focusInput");
@@ -4227,7 +4208,7 @@ function useChatState(isDisabled, onWindowResize) {
4227
4208
  displayExecution
4228
4209
  };
4229
4210
  }
4230
- const _sfc_main$3 = /* @__PURE__ */ defineComponent({
4211
+ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
4231
4212
  __name: "CanvasChat",
4232
4213
  setup(__props, { expose: __expose }) {
4233
4214
  const workflowsStore = useWorkflowsStore();
@@ -4237,7 +4218,7 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
4237
4218
  const pipContainer = useTemplateRef("pipContainer");
4238
4219
  const pipContent2 = useTemplateRef("pipContent");
4239
4220
  const workflow = computed(() => workflowsStore.getCurrentWorkflow());
4240
- const chatPanelState = computed(() => workflowsStore.chatPanelState);
4221
+ const chatPanelState = computed(() => workflowsStore.logsPanelState);
4241
4222
  const previousChatMessages = computed(() => workflowsStore.getPastChatMessages);
4242
4223
  const resultData = computed(() => workflowsStore.getWorkflowRunData);
4243
4224
  const telemetry = useTelemetry();
@@ -4255,13 +4236,13 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
4255
4236
  initialWidth: window.document.body.offsetWidth * 0.8,
4256
4237
  container: pipContainer,
4257
4238
  content: pipContent2,
4258
- shouldPopOut: computed(() => chatPanelState.value === "floating"),
4239
+ shouldPopOut: computed(() => chatPanelState.value === LOGS_PANEL_STATE.FLOATING),
4259
4240
  onRequestClose: () => {
4260
- if (chatPanelState.value === "closed") {
4241
+ if (chatPanelState.value === LOGS_PANEL_STATE.CLOSED) {
4261
4242
  return;
4262
4243
  }
4263
4244
  telemetry.track("User toggled log view", { new_state: "attached" });
4264
- workflowsStore.setPanelState("attached");
4245
+ workflowsStore.setPreferPoppedOutLogsView(false);
4265
4246
  }
4266
4247
  });
4267
4248
  const {
@@ -4280,14 +4261,15 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
4280
4261
  workflow
4281
4262
  });
4282
4263
  const closePanel = () => {
4283
- workflowsStore.setPanelState("closed");
4264
+ workflowsStore.toggleLogsPanelOpen(false);
4284
4265
  };
4285
4266
  function onPopOut() {
4286
4267
  telemetry.track("User toggled log view", { new_state: "floating" });
4287
- workflowsStore.setPanelState("floating");
4268
+ workflowsStore.toggleLogsPanelOpen(true);
4269
+ workflowsStore.setPreferPoppedOutLogsView(true);
4288
4270
  }
4289
4271
  watchEffect(() => {
4290
- canvasStore.setPanelHeight(chatPanelState.value === "attached" ? height.value : 0);
4272
+ canvasStore.setPanelHeight(chatPanelState.value === LOGS_PANEL_STATE.ATTACHED ? height.value : 0);
4291
4273
  });
4292
4274
  return (_ctx, _cache) => {
4293
4275
  const _component_n8n_icon_button = resolveComponent("n8n-icon-button");
@@ -4302,9 +4284,9 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
4302
4284
  }, [
4303
4285
  unref(chatTriggerNode) ? (openBlock(), createBlock(unref(N8nResizeWrapper), {
4304
4286
  key: 0,
4305
- "is-resizing-enabled": !unref(isPoppedOut) && chatPanelState.value === "attached",
4287
+ "is-resizing-enabled": !unref(isPoppedOut) && chatPanelState.value === unref(LOGS_PANEL_STATE).ATTACHED,
4306
4288
  "supported-directions": ["top"],
4307
- class: normalizeClass([_ctx.$style.resizeWrapper, chatPanelState.value === "closed" && _ctx.$style.empty]),
4289
+ class: normalizeClass([_ctx.$style.resizeWrapper, chatPanelState.value === unref(LOGS_PANEL_STATE).CLOSED && _ctx.$style.empty]),
4308
4290
  height: unref(height),
4309
4291
  style: normalizeStyle(unref(rootStyles)),
4310
4292
  onResize: unref(onResizeDebounced)
@@ -4316,7 +4298,7 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
4316
4298
  class: normalizeClass([_ctx.$style.container, "ignore-key-press-canvas"]),
4317
4299
  tabindex: "0"
4318
4300
  }, [
4319
- chatPanelState.value !== "closed" ? (openBlock(), createElementBlock("div", {
4301
+ chatPanelState.value !== unref(LOGS_PANEL_STATE).CLOSED ? (openBlock(), createElementBlock("div", {
4320
4302
  key: 0,
4321
4303
  class: normalizeClass(_ctx.$style.chatResizer)
4322
4304
  }, [
@@ -4390,49 +4372,398 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
4390
4372
  const resizeWrapper$1 = "_resizeWrapper_1aajp_124";
4391
4373
  const pipContent$1 = "_pipContent_1aajp_129";
4392
4374
  const empty$1 = "_empty_1aajp_140";
4393
- const container$2 = "_container_1aajp_146";
4375
+ const container$4 = "_container_1aajp_146";
4394
4376
  const chatResizer = "_chatResizer_1aajp_154";
4395
4377
  const footer = "_footer_1aajp_161";
4396
4378
  const chat$1 = "_chat_1aajp_154";
4397
4379
  const inner = "_inner_1aajp_180";
4398
4380
  const logs = "_logs_1aajp_188";
4399
- const style0$2 = {
4381
+ const style0$4 = {
4400
4382
  resizeWrapper: resizeWrapper$1,
4401
4383
  pipContent: pipContent$1,
4402
4384
  empty: empty$1,
4403
- container: container$2,
4385
+ container: container$4,
4404
4386
  chatResizer,
4405
4387
  footer,
4406
4388
  chat: chat$1,
4407
4389
  inner,
4408
4390
  logs
4409
4391
  };
4410
- const cssModules$2 = {
4411
- "$style": style0$2
4392
+ const cssModules$4 = {
4393
+ "$style": style0$4
4412
4394
  };
4413
- const __unplugin_components_0 = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["__cssModules", cssModules$2]]);
4414
- const _sfc_main$2 = /* @__PURE__ */ defineComponent({
4395
+ const __unplugin_components_0 = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["__cssModules", cssModules$4]]);
4396
+ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
4397
+ __name: "ConsumedTokenCountText",
4398
+ props: {
4399
+ consumedTokens: {}
4400
+ },
4401
+ setup(__props) {
4402
+ const locale = useI18n$1();
4403
+ return (_ctx, _cache) => {
4404
+ const _component_ConsumedTokensDetails = _sfc_main$j;
4405
+ return _ctx.consumedTokens !== void 0 ? (openBlock(), createBlock(unref(N8nTooltip), {
4406
+ key: 0,
4407
+ enterable: false
4408
+ }, {
4409
+ content: withCtx(() => [
4410
+ createVNode(_component_ConsumedTokensDetails, { "consumed-tokens": _ctx.consumedTokens }, null, 8, ["consumed-tokens"])
4411
+ ]),
4412
+ default: withCtx(() => [
4413
+ createBaseVNode("span", null, toDisplayString(unref(locale).baseText("runData.aiContentBlock.tokens", {
4414
+ interpolate: {
4415
+ count: unref(formatTokenUsageCount)(_ctx.consumedTokens, "total")
4416
+ }
4417
+ })), 1)
4418
+ ]),
4419
+ _: 1
4420
+ })) : createCommentVNode("", true);
4421
+ };
4422
+ }
4423
+ });
4424
+ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
4425
+ __name: "LogsOverviewRow",
4426
+ props: {
4427
+ data: {},
4428
+ node: {},
4429
+ isSelected: { type: Boolean },
4430
+ shouldShowConsumedTokens: { type: Boolean },
4431
+ isCompact: { type: Boolean }
4432
+ },
4433
+ emits: ["toggleExpanded", "triggerPartialExecution", "openNdv"],
4434
+ setup(__props, { emit: __emit }) {
4435
+ const props = __props;
4436
+ const emit = __emit;
4437
+ const locale = useI18n$1();
4438
+ const workflowsStore = useWorkflowsStore();
4439
+ const nodeTypeStore = useNodeTypesStore();
4440
+ const node = computed(() => workflowsStore.nodesByName[props.data.node]);
4441
+ const runData = computed(
4442
+ () => node.value ? workflowsStore.workflowExecutionData?.data?.resultData.runData[node.value.name]?.[props.data.runIndex] : void 0
4443
+ );
4444
+ const type = computed(() => node.value ? nodeTypeStore.getNodeType(node.value.type) : void 0);
4445
+ const depth = computed(() => (props.node.level ?? 1) - 1);
4446
+ const isSettled = computed(
4447
+ () => runData.value?.executionStatus && ["crashed", "error", "success"].includes(runData.value.executionStatus)
4448
+ );
4449
+ const isError = computed(() => !!runData.value?.error);
4450
+ const startedAtText = computed(() => {
4451
+ const time = new Date(runData.value?.startTime ?? 0);
4452
+ return locale.baseText("logs.overview.body.started", {
4453
+ interpolate: {
4454
+ time: `${toTime(time, true)}, ${toDayMonth(time)}`
4455
+ }
4456
+ });
4457
+ });
4458
+ const subtreeConsumedTokens = computed(
4459
+ () => props.shouldShowConsumedTokens ? getSubtreeTotalConsumedTokens(props.data) : void 0
4460
+ );
4461
+ function isLastChild(level) {
4462
+ let parent = props.data.parent;
4463
+ let data = props.data;
4464
+ for (let i = 0; i < depth.value - level; i++) {
4465
+ data = parent;
4466
+ parent = parent?.parent;
4467
+ }
4468
+ const siblings = parent?.children ?? [];
4469
+ return data === siblings[siblings.length - 1];
4470
+ }
4471
+ return (_ctx, _cache) => {
4472
+ const _component_NodeIcon = _sfc_main$k;
4473
+ return node.value !== void 0 ? (openBlock(), createElementBlock("div", {
4474
+ key: 0,
4475
+ class: normalizeClass({
4476
+ [_ctx.$style.container]: true,
4477
+ [_ctx.$style.compact]: props.isCompact,
4478
+ [_ctx.$style.error]: isError.value,
4479
+ [_ctx.$style.selected]: props.isSelected
4480
+ })
4481
+ }, [
4482
+ (openBlock(true), createElementBlock(Fragment, null, renderList(depth.value, (level) => {
4483
+ return openBlock(), createElementBlock("div", {
4484
+ key: level,
4485
+ class: normalizeClass({
4486
+ [_ctx.$style.indent]: true,
4487
+ [_ctx.$style.connectorCurved]: level === depth.value,
4488
+ [_ctx.$style.connectorStraight]: !isLastChild(level)
4489
+ })
4490
+ }, null, 2);
4491
+ }), 128)),
4492
+ createBaseVNode("div", {
4493
+ class: normalizeClass(_ctx.$style.background),
4494
+ style: normalizeStyle({ "--indent-depth": depth.value })
4495
+ }, null, 6),
4496
+ createVNode(_component_NodeIcon, {
4497
+ "node-type": type.value,
4498
+ size: 16,
4499
+ class: normalizeClass(_ctx.$style.icon)
4500
+ }, null, 8, ["node-type", "class"]),
4501
+ createVNode(unref(N8nText), {
4502
+ tag: "div",
4503
+ bold: true,
4504
+ size: "small",
4505
+ class: normalizeClass(_ctx.$style.name),
4506
+ color: isError.value ? "danger" : void 0
4507
+ }, {
4508
+ default: withCtx(() => [
4509
+ createTextVNode(toDisplayString(node.value.name), 1)
4510
+ ]),
4511
+ _: 1
4512
+ }, 8, ["class", "color"]),
4513
+ createVNode(unref(N8nText), {
4514
+ tag: "div",
4515
+ color: "text-light",
4516
+ size: "small",
4517
+ class: normalizeClass(_ctx.$style.timeTook)
4518
+ }, {
4519
+ default: withCtx(() => [
4520
+ isSettled.value && runData.value ? (openBlock(), createBlock(unref(I18nT), {
4521
+ key: 0,
4522
+ keypath: "logs.overview.body.summaryText"
4523
+ }, {
4524
+ status: withCtx(() => [
4525
+ isError.value ? (openBlock(), createBlock(unref(N8nText), {
4526
+ key: 0,
4527
+ color: "danger",
4528
+ bold: true,
4529
+ size: "small"
4530
+ }, {
4531
+ default: withCtx(() => [
4532
+ createVNode(unref(N8nIcon), {
4533
+ icon: "exclamation-triangle",
4534
+ class: normalizeClass(_ctx.$style.errorIcon)
4535
+ }, null, 8, ["class"]),
4536
+ createTextVNode(toDisplayString(unref(upperFirst)(runData.value.executionStatus)), 1)
4537
+ ]),
4538
+ _: 1
4539
+ })) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
4540
+ createTextVNode(toDisplayString(unref(upperFirst)(runData.value.executionStatus)), 1)
4541
+ ], 64))
4542
+ ]),
4543
+ time: withCtx(() => [
4544
+ createTextVNode(toDisplayString(unref(locale).displayTimer(runData.value.executionTime, true)), 1)
4545
+ ]),
4546
+ _: 1
4547
+ })) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
4548
+ createTextVNode(toDisplayString(unref(upperFirst)(runData.value?.executionStatus)), 1)
4549
+ ], 64))
4550
+ ]),
4551
+ _: 1
4552
+ }, 8, ["class"]),
4553
+ createVNode(unref(N8nText), {
4554
+ tag: "div",
4555
+ color: "text-light",
4556
+ size: "small",
4557
+ class: normalizeClass(_ctx.$style.startedAt)
4558
+ }, {
4559
+ default: withCtx(() => [
4560
+ createTextVNode(toDisplayString(startedAtText.value), 1)
4561
+ ]),
4562
+ _: 1
4563
+ }, 8, ["class"]),
4564
+ subtreeConsumedTokens.value !== void 0 ? (openBlock(), createBlock(unref(N8nText), {
4565
+ key: 0,
4566
+ tag: "div",
4567
+ color: "text-light",
4568
+ size: "small",
4569
+ class: normalizeClass(_ctx.$style.consumedTokens)
4570
+ }, {
4571
+ default: withCtx(() => [
4572
+ subtreeConsumedTokens.value.totalTokens > 0 && (props.data.children.length === 0 || !props.node.expanded) ? (openBlock(), createBlock(_sfc_main$6, {
4573
+ key: 0,
4574
+ "consumed-tokens": subtreeConsumedTokens.value
4575
+ }, null, 8, ["consumed-tokens"])) : createCommentVNode("", true)
4576
+ ]),
4577
+ _: 1
4578
+ }, 8, ["class"])) : createCommentVNode("", true),
4579
+ isError.value && _ctx.isCompact ? (openBlock(), createBlock(unref(N8nIcon), {
4580
+ key: 1,
4581
+ size: "medium",
4582
+ color: "danger",
4583
+ icon: "exclamation-triangle",
4584
+ class: normalizeClass(_ctx.$style.compactErrorIcon)
4585
+ }, null, 8, ["class"])) : createCommentVNode("", true),
4586
+ createVNode(unref(_sfc_main$i), {
4587
+ type: "secondary",
4588
+ size: "small",
4589
+ icon: "play",
4590
+ style: { "color": "var(--color-text-base)" },
4591
+ "aria-label": unref(locale).baseText("logs.overview.body.run"),
4592
+ class: normalizeClass([_ctx.$style.partialExecutionButton, depth.value > 0 ? _ctx.$style.unavailable : ""]),
4593
+ onClick: _cache[0] || (_cache[0] = withModifiers(($event) => emit("triggerPartialExecution", props.data), ["stop"]))
4594
+ }, null, 8, ["aria-label", "class"]),
4595
+ createVNode(unref(_sfc_main$i), {
4596
+ type: "secondary",
4597
+ size: "small",
4598
+ icon: "external-link-alt",
4599
+ style: { "color": "var(--color-text-base)" },
4600
+ class: normalizeClass(_ctx.$style.openNdvButton),
4601
+ "aria-label": unref(locale).baseText("logs.overview.body.open"),
4602
+ onClick: _cache[1] || (_cache[1] = withModifiers(($event) => emit("openNdv", props.data), ["stop"]))
4603
+ }, null, 8, ["class", "aria-label"]),
4604
+ !_ctx.isCompact || props.data.children.length > 0 ? (openBlock(), createBlock(unref(N8nButton), {
4605
+ key: 2,
4606
+ type: "secondary",
4607
+ size: "small",
4608
+ square: true,
4609
+ style: normalizeStyle({
4610
+ visibility: props.data.children.length === 0 ? "hidden" : "",
4611
+ color: "var(--color-text-base)"
4612
+ // give higher specificity than the style from the component itself
4613
+ }),
4614
+ class: normalizeClass(_ctx.$style.toggleButton),
4615
+ "aria-label": unref(locale).baseText("logs.overview.body.toggleRow"),
4616
+ onClick: _cache[2] || (_cache[2] = withModifiers(($event) => emit("toggleExpanded", props.node), ["stop"]))
4617
+ }, {
4618
+ default: withCtx(() => [
4619
+ createVNode(unref(N8nIcon), {
4620
+ size: "medium",
4621
+ icon: props.node.expanded ? "chevron-down" : "chevron-up"
4622
+ }, null, 8, ["icon"])
4623
+ ]),
4624
+ _: 1
4625
+ }, 8, ["style", "class", "aria-label"])) : createCommentVNode("", true)
4626
+ ], 2)) : createCommentVNode("", true);
4627
+ };
4628
+ }
4629
+ });
4630
+ const container$3 = "_container_1jepl_123";
4631
+ const background = "_background_1jepl_140";
4632
+ const selected = "_selected_1jepl_149";
4633
+ const error = "_error_1jepl_152";
4634
+ const indent = "_indent_1jepl_156";
4635
+ const connectorCurved = "_connectorCurved_1jepl_165";
4636
+ const connectorStraight = "_connectorStraight_1jepl_175";
4637
+ const icon = "_icon_1jepl_184";
4638
+ const name = "_name_1jepl_190";
4639
+ const timeTook = "_timeTook_1jepl_195";
4640
+ const errorIcon = "_errorIcon_1jepl_200";
4641
+ const compact = "_compact_1jepl_204";
4642
+ const startedAt = "_startedAt_1jepl_211";
4643
+ const consumedTokens = "_consumedTokens_1jepl_220";
4644
+ const compactErrorIcon = "_compactErrorIcon_1jepl_233";
4645
+ const partialExecutionButton = "_partialExecutionButton_1jepl_241";
4646
+ const openNdvButton = "_openNdvButton_1jepl_242";
4647
+ const unavailable = "_unavailable_1jepl_252";
4648
+ const toggleButton = "_toggleButton_1jepl_260";
4649
+ const style0$3 = {
4650
+ container: container$3,
4651
+ background,
4652
+ selected,
4653
+ error,
4654
+ indent,
4655
+ connectorCurved,
4656
+ connectorStraight,
4657
+ icon,
4658
+ name,
4659
+ timeTook,
4660
+ errorIcon,
4661
+ compact,
4662
+ startedAt,
4663
+ consumedTokens,
4664
+ compactErrorIcon,
4665
+ partialExecutionButton,
4666
+ openNdvButton,
4667
+ unavailable,
4668
+ toggleButton
4669
+ };
4670
+ const cssModules$3 = {
4671
+ "$style": style0$3
4672
+ };
4673
+ const LogsOverviewRow = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["__cssModules", cssModules$3]]);
4674
+ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
4415
4675
  __name: "LogsOverviewPanel",
4416
4676
  props: {
4417
- isOpen: { type: Boolean }
4677
+ isOpen: { type: Boolean },
4678
+ node: {},
4679
+ selected: {}
4418
4680
  },
4419
- emits: ["clickHeader"],
4681
+ emits: ["clickHeader", "select"],
4420
4682
  setup(__props, { emit: __emit }) {
4421
4683
  const emit = __emit;
4422
4684
  const locale = useI18n$1();
4685
+ const telemetry = useTelemetry();
4423
4686
  const workflowsStore = useWorkflowsStore();
4687
+ const router = useRouter();
4688
+ const runWorkflow = useRunWorkflow({ router });
4689
+ const ndvStore = useNDVStore();
4424
4690
  const nodeHelpers = useNodeHelpers();
4425
4691
  const isClearExecutionButtonVisible = useClearExecutionButtonVisible();
4692
+ const workflow = computed(() => workflowsStore.getCurrentWorkflow());
4693
+ const executionTree = computed(
4694
+ () => __props.node ? getTreeNodeData(
4695
+ __props.node.name,
4696
+ workflow.value,
4697
+ createAiData(__props.node.name, workflow.value, workflowsStore.getWorkflowResultDataByNodeName)
4698
+ ) : []
4699
+ );
4700
+ const isEmpty2 = computed(() => workflowsStore.workflowExecutionData === null);
4701
+ const switchViewOptions = computed(() => [
4702
+ { label: locale.baseText("logs.overview.header.switch.details"), value: "details" },
4703
+ { label: locale.baseText("logs.overview.header.switch.overview"), value: "overview" }
4704
+ ]);
4705
+ const executionStatusText = computed(() => {
4706
+ const execution = workflowsStore.workflowExecutionData;
4707
+ if (!execution) {
4708
+ return void 0;
4709
+ }
4710
+ if (execution.startedAt && execution.stoppedAt) {
4711
+ return locale.baseText("logs.overview.body.summaryText", {
4712
+ interpolate: {
4713
+ status: upperFirst(execution.status),
4714
+ time: locale.displayTimer(
4715
+ +new Date(execution.stoppedAt) - +new Date(execution.startedAt),
4716
+ true
4717
+ )
4718
+ }
4719
+ });
4720
+ }
4721
+ return upperFirst(execution.status);
4722
+ });
4723
+ const consumedTokens2 = computed(
4724
+ () => getTotalConsumedTokens(...executionTree.value.map(getSubtreeTotalConsumedTokens))
4725
+ );
4426
4726
  function onClearExecutionData() {
4427
4727
  workflowsStore.setWorkflowExecutionData(null);
4428
4728
  nodeHelpers.updateNodesExecutionIssues();
4429
4729
  }
4730
+ function handleClickNode(clicked) {
4731
+ if (__props.selected?.node === clicked.node && __props.selected.runIndex === clicked.runIndex) {
4732
+ emit("select", void 0);
4733
+ return;
4734
+ }
4735
+ emit("select", { node: clicked.node, runIndex: clicked.runIndex });
4736
+ telemetry.track("User selected node in log view", {
4737
+ node_type: workflowsStore.nodesByName[clicked.node].type,
4738
+ node_id: workflowsStore.nodesByName[clicked.node].id,
4739
+ execution_id: workflowsStore.workflowExecutionData?.id,
4740
+ workflow_id: workflow.value.id
4741
+ });
4742
+ }
4743
+ function handleSwitchView(value) {
4744
+ emit(
4745
+ "select",
4746
+ value === "overview" || executionTree.value.length === 0 ? void 0 : executionTree.value[0]
4747
+ );
4748
+ }
4749
+ function handleToggleExpanded(treeNode) {
4750
+ treeNode.expanded = !treeNode.expanded;
4751
+ }
4752
+ async function handleOpenNdv(treeNode) {
4753
+ ndvStore.setActiveNodeName(treeNode.node);
4754
+ await nextTick(() => ndvStore.setOutputRunIndex(treeNode.runIndex));
4755
+ }
4756
+ async function handleTriggerPartialExecution(treeNode) {
4757
+ await runWorkflow.runWorkflow({ destinationNode: treeNode.node });
4758
+ }
4430
4759
  return (_ctx, _cache) => {
4431
4760
  return openBlock(), createElementBlock("div", {
4432
- class: normalizeClass(_ctx.$style.container)
4761
+ class: normalizeClass(_ctx.$style.container),
4762
+ "data-test-id": "logs-overview"
4433
4763
  }, [
4434
4764
  createVNode(PanelHeader, {
4435
4765
  title: unref(locale).baseText("logs.overview.header.title"),
4766
+ "data-test-id": "logs-overview-header",
4436
4767
  onClick: _cache[0] || (_cache[0] = ($event) => emit("clickHeader"))
4437
4768
  }, {
4438
4769
  actions: withCtx(() => [
@@ -4462,45 +4793,209 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
4462
4793
  }, 8, ["title"]),
4463
4794
  _ctx.isOpen ? (openBlock(), createElementBlock("div", {
4464
4795
  key: 0,
4465
- class: normalizeClass([_ctx.$style.content, _ctx.$style.empty])
4796
+ class: normalizeClass([_ctx.$style.content, isEmpty2.value ? _ctx.$style.empty : ""]),
4797
+ "data-test-id": "logs-overview-body"
4466
4798
  }, [
4467
- createVNode(unref(N8nText), {
4799
+ isEmpty2.value ? (openBlock(), createBlock(unref(N8nText), {
4800
+ key: 0,
4468
4801
  tag: "p",
4469
4802
  size: "medium",
4470
4803
  color: "text-base",
4471
- class: normalizeClass(_ctx.$style.emptyText)
4804
+ class: normalizeClass(_ctx.$style.emptyText),
4805
+ "data-test-id": "logs-overview-empty"
4472
4806
  }, {
4473
4807
  default: withCtx(() => [
4474
4808
  createTextVNode(toDisplayString(unref(locale).baseText("logs.overview.body.empty.message")), 1)
4475
4809
  ]),
4476
4810
  _: 1
4477
- }, 8, ["class"])
4811
+ }, 8, ["class"])) : (openBlock(), createElementBlock("div", {
4812
+ key: 1,
4813
+ class: normalizeClass(_ctx.$style.scrollable)
4814
+ }, [
4815
+ executionStatusText.value !== void 0 ? (openBlock(), createBlock(unref(N8nText), {
4816
+ key: 0,
4817
+ tag: "div",
4818
+ color: "text-light",
4819
+ size: "small",
4820
+ class: normalizeClass(_ctx.$style.summary)
4821
+ }, {
4822
+ default: withCtx(() => [
4823
+ createBaseVNode("span", null, toDisplayString(executionStatusText.value), 1),
4824
+ consumedTokens2.value.totalTokens > 0 ? (openBlock(), createBlock(_sfc_main$6, {
4825
+ key: 0,
4826
+ "consumed-tokens": consumedTokens2.value
4827
+ }, null, 8, ["consumed-tokens"])) : createCommentVNode("", true)
4828
+ ]),
4829
+ _: 1
4830
+ }, 8, ["class"])) : createCommentVNode("", true),
4831
+ executionTree.value.length > 0 ? (openBlock(), createBlock(unref(ElTree), {
4832
+ key: 1,
4833
+ "node-key": "id",
4834
+ class: normalizeClass(_ctx.$style.tree),
4835
+ indent: 0,
4836
+ data: executionTree.value,
4837
+ "expand-on-click-node": false,
4838
+ "default-expand-all": true,
4839
+ onNodeClick: handleClickNode
4840
+ }, {
4841
+ default: withCtx(({ node: elTreeNode, data }) => [
4842
+ createVNode(LogsOverviewRow, {
4843
+ data,
4844
+ node: elTreeNode,
4845
+ "is-selected": data.node === _ctx.selected?.node && data.runIndex === _ctx.selected?.runIndex,
4846
+ "is-compact": _ctx.selected !== void 0,
4847
+ "should-show-consumed-tokens": consumedTokens2.value.totalTokens > 0,
4848
+ onToggleExpanded: handleToggleExpanded,
4849
+ onOpenNdv: handleOpenNdv,
4850
+ onTriggerPartialExecution: handleTriggerPartialExecution
4851
+ }, null, 8, ["data", "node", "is-selected", "is-compact", "should-show-consumed-tokens"])
4852
+ ]),
4853
+ _: 1
4854
+ }, 8, ["class", "data"])) : createCommentVNode("", true),
4855
+ createVNode(unref(N8nRadioButtons), {
4856
+ size: "medium",
4857
+ class: normalizeClass(_ctx.$style.switchViewButtons),
4858
+ "model-value": _ctx.selected ? "details" : "overview",
4859
+ options: switchViewOptions.value,
4860
+ "onUpdate:modelValue": handleSwitchView
4861
+ }, null, 8, ["class", "model-value", "options"])
4862
+ ], 2))
4478
4863
  ], 2)) : createCommentVNode("", true)
4479
4864
  ], 2);
4480
4865
  };
4481
4866
  }
4482
4867
  });
4483
- const container$1 = "_container_wrmwc_123";
4484
- const content = "_content_wrmwc_131";
4485
- const empty = "_empty_wrmwc_135";
4486
- const emptyText = "_emptyText_wrmwc_141";
4868
+ const container$2 = "_container_1xpvq_123";
4869
+ const content$1 = "_content_1xpvq_133";
4870
+ const empty = "_empty_1xpvq_142";
4871
+ const emptyText = "_emptyText_1xpvq_147";
4872
+ const scrollable = "_scrollable_1xpvq_152";
4873
+ const summary = "_summary_1xpvq_159";
4874
+ const tree = "_tree_1xpvq_171";
4875
+ const switchViewButtons = "_switchViewButtons_1xpvq_178";
4876
+ const style0$2 = {
4877
+ container: container$2,
4878
+ content: content$1,
4879
+ empty,
4880
+ emptyText,
4881
+ scrollable,
4882
+ summary,
4883
+ tree,
4884
+ switchViewButtons
4885
+ };
4886
+ const cssModules$2 = {
4887
+ "$style": style0$2
4888
+ };
4889
+ const LogsOverviewPanel = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["__cssModules", cssModules$2]]);
4890
+ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
4891
+ __name: "LogDetailsPanel",
4892
+ props: {
4893
+ isOpen: { type: Boolean }
4894
+ },
4895
+ emits: ["clickHeader"],
4896
+ setup(__props, { emit: __emit }) {
4897
+ const emit = __emit;
4898
+ return (_ctx, _cache) => {
4899
+ return openBlock(), createElementBlock("div", {
4900
+ class: normalizeClass(_ctx.$style.container),
4901
+ "data-test-id": "log-details"
4902
+ }, [
4903
+ createVNode(PanelHeader, {
4904
+ title: "Log details",
4905
+ "data-test-id": "logs-details-header",
4906
+ onClick: _cache[0] || (_cache[0] = ($event) => emit("clickHeader"))
4907
+ }, {
4908
+ actions: withCtx(() => [
4909
+ renderSlot(_ctx.$slots, "actions")
4910
+ ]),
4911
+ _: 3
4912
+ }),
4913
+ _ctx.isOpen ? (openBlock(), createElementBlock("div", {
4914
+ key: 0,
4915
+ class: normalizeClass(_ctx.$style.content),
4916
+ "data-test-id": "logs-details-body"
4917
+ }, null, 2)) : createCommentVNode("", true)
4918
+ ], 2);
4919
+ };
4920
+ }
4921
+ });
4922
+ const container$1 = "_container_q8l5j_123";
4923
+ const content = "_content_q8l5j_133";
4487
4924
  const style0$1 = {
4488
4925
  container: container$1,
4489
- content,
4490
- empty,
4491
- emptyText
4926
+ content
4492
4927
  };
4493
4928
  const cssModules$1 = {
4494
4929
  "$style": style0$1
4495
4930
  };
4496
- const LogsOverviewPanel = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__cssModules", cssModules$1]]);
4931
+ const LogsDetailsPanel = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["__cssModules", cssModules$1]]);
4932
+ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
4933
+ __name: "LogsPanelActions",
4934
+ props: {
4935
+ panelState: {},
4936
+ showPopOutButton: { type: Boolean }
4937
+ },
4938
+ emits: ["popOut", "toggleOpen"],
4939
+ setup(__props, { emit: __emit }) {
4940
+ const emit = __emit;
4941
+ const appStyles = useStyles();
4942
+ const locales = useI18n$1();
4943
+ const tooltipZIndex = computed(() => appStyles.APP_Z_INDEXES.ASK_ASSISTANT_FLOATING_BUTTON + 100);
4944
+ const popOutButtonText = computed(() => locales.baseText("runData.panel.actions.popOut"));
4945
+ const toggleButtonText = computed(
4946
+ () => locales.baseText(
4947
+ __props.panelState === LOGS_PANEL_STATE.ATTACHED ? "runData.panel.actions.collapse" : "runData.panel.actions.open"
4948
+ )
4949
+ );
4950
+ return (_ctx, _cache) => {
4951
+ return openBlock(), createElementBlock("div", null, [
4952
+ _ctx.showPopOutButton ? (openBlock(), createBlock(unref(N8nTooltip), {
4953
+ key: 0,
4954
+ "z-index": tooltipZIndex.value,
4955
+ content: popOutButtonText.value
4956
+ }, {
4957
+ default: withCtx(() => [
4958
+ createVNode(unref(_sfc_main$i), {
4959
+ icon: "pop-out",
4960
+ type: "secondary",
4961
+ size: "small",
4962
+ "icon-size": "medium",
4963
+ "aria-label": popOutButtonText.value,
4964
+ onClick: _cache[0] || (_cache[0] = withModifiers(($event) => emit("popOut"), ["stop"]))
4965
+ }, null, 8, ["aria-label"])
4966
+ ]),
4967
+ _: 1
4968
+ }, 8, ["z-index", "content"])) : createCommentVNode("", true),
4969
+ _ctx.panelState !== unref(LOGS_PANEL_STATE).FLOATING ? (openBlock(), createBlock(unref(N8nTooltip), {
4970
+ key: 1,
4971
+ "z-index": tooltipZIndex.value,
4972
+ content: toggleButtonText.value
4973
+ }, {
4974
+ default: withCtx(() => [
4975
+ createVNode(unref(_sfc_main$i), {
4976
+ type: "secondary",
4977
+ size: "small",
4978
+ "icon-size": "medium",
4979
+ icon: _ctx.panelState === unref(LOGS_PANEL_STATE).ATTACHED ? "chevron-down" : "chevron-up",
4980
+ "aria-label": toggleButtonText.value,
4981
+ style: { "color": "var(--color-text-base)" },
4982
+ onClick: _cache[1] || (_cache[1] = withModifiers(($event) => emit("toggleOpen"), ["stop"]))
4983
+ }, null, 8, ["icon", "aria-label"])
4984
+ ]),
4985
+ _: 1
4986
+ }, 8, ["z-index", "content"])) : createCommentVNode("", true)
4987
+ ]);
4988
+ };
4989
+ }
4990
+ });
4497
4991
  const _sfc_main$1 = /* @__PURE__ */ defineComponent({
4498
4992
  __name: "LogsPanel",
4499
4993
  setup(__props) {
4500
4994
  const workflowsStore = useWorkflowsStore();
4501
4995
  const canvasStore = useCanvasStore();
4502
- const panelState = computed(() => workflowsStore.chatPanelState);
4996
+ const panelState = computed(() => workflowsStore.logsPanelState);
4503
4997
  const container2 = ref();
4998
+ const selectedLogEntry = ref(void 0);
4504
4999
  const pipContainer = useTemplateRef("pipContainer");
4505
5000
  const pipContent2 = useTemplateRef("pipContent");
4506
5001
  const previousChatMessages = computed(() => workflowsStore.getPastChatMessages);
@@ -4509,51 +5004,53 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
4509
5004
  (node) => [CHAT_TRIGGER_NODE_TYPE$1, MANUAL_CHAT_TRIGGER_NODE_TYPE].includes(node.type)
4510
5005
  )
4511
5006
  );
4512
- const locales = useI18n$1();
4513
5007
  const telemetry = useTelemetry();
4514
5008
  const { rootStyles, height, chatWidth, onWindowResize, onResizeDebounced, onResizeChatDebounced } = useResize(container2);
4515
- const { currentSessionId, messages: messages2, sendMessage, refreshSession, displayExecution } = useChatState(
4516
- ref(false),
4517
- onWindowResize
4518
- );
4519
- const appStyles = useStyles();
4520
- const tooltipZIndex = computed(() => appStyles.APP_Z_INDEXES.ASK_ASSISTANT_FLOATING_BUTTON + 100);
5009
+ const { currentSessionId, messages: messages2, connectedNode, sendMessage, refreshSession, displayExecution } = useChatState(ref(false), onWindowResize);
5010
+ const isLogDetailsOpen = computed(() => selectedLogEntry.value !== void 0);
4521
5011
  const { canPopOut, isPoppedOut, pipWindow } = usePiPWindow({
4522
5012
  initialHeight: 400,
4523
5013
  initialWidth: window.document.body.offsetWidth * 0.8,
4524
5014
  container: pipContainer,
4525
5015
  content: pipContent2,
4526
- shouldPopOut: computed(() => panelState.value === "floating"),
5016
+ shouldPopOut: computed(() => panelState.value === LOGS_PANEL_STATE.FLOATING),
4527
5017
  onRequestClose: () => {
4528
- if (panelState.value === "closed") {
5018
+ if (panelState.value === LOGS_PANEL_STATE.CLOSED) {
4529
5019
  return;
4530
5020
  }
4531
5021
  telemetry.track("User toggled log view", { new_state: "attached" });
4532
- workflowsStore.setPanelState("attached");
5022
+ workflowsStore.setPreferPoppedOutLogsView(false);
4533
5023
  }
4534
5024
  });
4535
- function handleToggleOpen() {
4536
- if (panelState.value === "closed") {
4537
- telemetry.track("User toggled log view", { new_state: "attached" });
4538
- workflowsStore.setPanelState("attached");
4539
- } else {
4540
- telemetry.track("User toggled log view", { new_state: "collapsed" });
4541
- workflowsStore.setPanelState("closed");
4542
- }
5025
+ const logsPanelActionsProps = computed(() => ({
5026
+ panelState: panelState.value,
5027
+ showPopOutButton: canPopOut.value && !isPoppedOut.value,
5028
+ onPopOut,
5029
+ onToggleOpen
5030
+ }));
5031
+ function onToggleOpen() {
5032
+ workflowsStore.toggleLogsPanelOpen();
5033
+ telemetry.track("User toggled log view", {
5034
+ new_state: panelState.value === LOGS_PANEL_STATE.CLOSED ? "attached" : "collapsed"
5035
+ });
4543
5036
  }
4544
5037
  function handleClickHeader() {
4545
- if (panelState.value === "closed") {
5038
+ if (panelState.value === LOGS_PANEL_STATE.CLOSED) {
4546
5039
  telemetry.track("User toggled log view", { new_state: "attached" });
4547
- workflowsStore.setPanelState("attached");
5040
+ workflowsStore.toggleLogsPanelOpen(true);
4548
5041
  }
4549
5042
  }
5043
+ function handleSelectLogEntry(selected2) {
5044
+ selectedLogEntry.value = selected2;
5045
+ }
4550
5046
  function onPopOut() {
4551
5047
  telemetry.track("User toggled log view", { new_state: "floating" });
4552
- workflowsStore.setPanelState("floating");
5048
+ workflowsStore.toggleLogsPanelOpen(true);
5049
+ workflowsStore.setPreferPoppedOutLogsView(true);
4553
5050
  }
4554
5051
  watch([panelState, height], ([state, h]) => {
4555
5052
  canvasStore.setPanelHeight(
4556
- state === "floating" ? 0 : state === "attached" ? h : 32
5053
+ state === LOGS_PANEL_STATE.FLOATING ? 0 : state === LOGS_PANEL_STATE.ATTACHED ? h : 32
4557
5054
  );
4558
5055
  });
4559
5056
  return (_ctx, _cache) => {
@@ -4569,21 +5066,22 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
4569
5066
  createVNode(unref(N8nResizeWrapper), {
4570
5067
  height: unref(height),
4571
5068
  "supported-directions": ["top"],
4572
- "is-resizing-enabled": panelState.value === "attached",
5069
+ "is-resizing-enabled": panelState.value === unref(LOGS_PANEL_STATE).ATTACHED,
4573
5070
  style: normalizeStyle(unref(rootStyles)),
4574
- class: normalizeClass([_ctx.$style.resizeWrapper, panelState.value === "closed" ? "" : _ctx.$style.isOpen]),
5071
+ class: normalizeClass([_ctx.$style.resizeWrapper, panelState.value === unref(LOGS_PANEL_STATE).CLOSED ? "" : _ctx.$style.isOpen]),
4575
5072
  onResize: unref(onResizeDebounced)
4576
5073
  }, {
4577
5074
  default: withCtx(() => [
4578
5075
  createBaseVNode("div", {
4579
5076
  ref_key: "container",
4580
5077
  ref: container2,
4581
- class: normalizeClass(_ctx.$style.container)
5078
+ class: normalizeClass([_ctx.$style.container, "ignore-key-press-canvas"]),
5079
+ tabindex: "0"
4582
5080
  }, [
4583
5081
  hasChat.value ? (openBlock(), createBlock(unref(N8nResizeWrapper), {
4584
5082
  key: 0,
4585
5083
  "supported-directions": ["right"],
4586
- "is-resizing-enabled": panelState.value !== "closed",
5084
+ "is-resizing-enabled": panelState.value !== unref(LOGS_PANEL_STATE).CLOSED,
4587
5085
  width: unref(chatWidth),
4588
5086
  class: normalizeClass(_ctx.$style.chat),
4589
5087
  window: unref(pipWindow),
@@ -4592,13 +5090,13 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
4592
5090
  default: withCtx(() => [
4593
5091
  createVNode(ChatMessagesPanel, {
4594
5092
  "data-test-id": "canvas-chat",
4595
- "is-open": panelState.value !== "closed",
5093
+ "is-open": panelState.value !== unref(LOGS_PANEL_STATE).CLOSED,
4596
5094
  messages: unref(messages2),
4597
5095
  "session-id": unref(currentSessionId),
4598
5096
  "past-chat-messages": previousChatMessages.value,
4599
5097
  "show-close-button": false,
4600
5098
  "is-new-logs-enabled": true,
4601
- onClose: handleToggleOpen,
5099
+ onClose: onToggleOpen,
4602
5100
  onRefreshSession: unref(refreshSession),
4603
5101
  onDisplayExecution: unref(displayExecution),
4604
5102
  onSendMessage: unref(sendMessage),
@@ -4608,48 +5106,29 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
4608
5106
  _: 1
4609
5107
  }, 8, ["is-resizing-enabled", "width", "class", "window", "onResize"])) : createCommentVNode("", true),
4610
5108
  createVNode(LogsOverviewPanel, {
4611
- "is-open": panelState.value !== "closed",
5109
+ class: normalizeClass(_ctx.$style.logsOverview),
5110
+ "is-open": panelState.value !== unref(LOGS_PANEL_STATE).CLOSED,
5111
+ node: unref(connectedNode),
5112
+ selected: selectedLogEntry.value,
5113
+ onClickHeader: handleClickHeader,
5114
+ onSelect: handleSelectLogEntry
5115
+ }, {
5116
+ actions: withCtx(() => [
5117
+ !isLogDetailsOpen.value ? (openBlock(), createBlock(_sfc_main$2, normalizeProps(mergeProps({ key: 0 }, logsPanelActionsProps.value)), null, 16)) : createCommentVNode("", true)
5118
+ ]),
5119
+ _: 1
5120
+ }, 8, ["class", "is-open", "node", "selected"]),
5121
+ selectedLogEntry.value ? (openBlock(), createBlock(LogsDetailsPanel, {
5122
+ key: 1,
5123
+ class: normalizeClass(_ctx.$style.logDetails),
5124
+ "is-open": panelState.value !== unref(LOGS_PANEL_STATE).CLOSED,
4612
5125
  onClickHeader: handleClickHeader
4613
5126
  }, {
4614
5127
  actions: withCtx(() => [
4615
- unref(canPopOut) && !unref(isPoppedOut) ? (openBlock(), createBlock(unref(N8nTooltip), {
4616
- key: 0,
4617
- "z-index": tooltipZIndex.value,
4618
- content: unref(locales).baseText("runData.panel.actions.popOut")
4619
- }, {
4620
- default: withCtx(() => [
4621
- createVNode(unref(_sfc_main$e), {
4622
- icon: "pop-out",
4623
- type: "secondary",
4624
- size: "small",
4625
- "icon-size": "medium",
4626
- onClick: onPopOut
4627
- })
4628
- ]),
4629
- _: 1
4630
- }, 8, ["z-index", "content"])) : createCommentVNode("", true),
4631
- panelState.value !== "floating" ? (openBlock(), createBlock(unref(N8nTooltip), {
4632
- key: 1,
4633
- "z-index": tooltipZIndex.value,
4634
- content: unref(locales).baseText(
4635
- panelState.value === "attached" ? "runData.panel.actions.collapse" : "runData.panel.actions.open"
4636
- )
4637
- }, {
4638
- default: withCtx(() => [
4639
- createVNode(unref(_sfc_main$e), {
4640
- type: "secondary",
4641
- size: "small",
4642
- "icon-size": "medium",
4643
- icon: panelState.value === "attached" ? "chevron-down" : "chevron-up",
4644
- style: { "color": "var(--color-text-base)" },
4645
- onClick: withModifiers(handleToggleOpen, ["stop"])
4646
- }, null, 8, ["icon"])
4647
- ]),
4648
- _: 1
4649
- }, 8, ["z-index", "content"])) : createCommentVNode("", true)
5128
+ isLogDetailsOpen.value ? (openBlock(), createBlock(_sfc_main$2, normalizeProps(mergeProps({ key: 0 }, logsPanelActionsProps.value)), null, 16)) : createCommentVNode("", true)
4650
5129
  ]),
4651
5130
  _: 1
4652
- }, 8, ["is-open"])
5131
+ }, 8, ["class", "is-open"])) : createCommentVNode("", true)
4653
5132
  ], 2)
4654
5133
  ]),
4655
5134
  _: 1
@@ -4659,17 +5138,21 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
4659
5138
  };
4660
5139
  }
4661
5140
  });
4662
- const resizeWrapper = "_resizeWrapper_1brak_124";
4663
- const pipContent = "_pipContent_1brak_129";
4664
- const isOpen = "_isOpen_1brak_145";
4665
- const container = "_container_1brak_152";
4666
- const chat = "_chat_1brak_160";
5141
+ const resizeWrapper = "_resizeWrapper_1zlbj_124";
5142
+ const pipContent = "_pipContent_1zlbj_129";
5143
+ const isOpen = "_isOpen_1zlbj_142";
5144
+ const container = "_container_1zlbj_149";
5145
+ const chat = "_chat_1zlbj_158";
5146
+ const logsOverview = "_logsOverview_1zlbj_164";
5147
+ const logDetails = "_logDetails_1zlbj_171";
4667
5148
  const style0 = {
4668
5149
  resizeWrapper,
4669
5150
  pipContent,
4670
5151
  isOpen,
4671
5152
  container,
4672
- chat
5153
+ chat,
5154
+ logsOverview,
5155
+ logDetails
4673
5156
  };
4674
5157
  const cssModules = {
4675
5158
  "$style": style0