n8n-editor-ui 2.3.3 → 2.4.1
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.
- package/data/node-popularity.json +1920 -1916
- package/dist/assets/{AddDataTableModal-BYsEOjtf.js → AddDataTableModal-BWxuL_U1.js} +18 -21
- package/dist/assets/{AgentEditorModal-CnYw6elM.css → AgentEditorModal-9v5_7c4M.css} +11 -7
- package/dist/assets/{AgentEditorModal-CdUKcN7b.js → AgentEditorModal-ClIVB6be.js} +34 -37
- package/dist/assets/{Alert-BSiQ7W4W.js → Alert-C0sX2MmC.js} +9 -9
- package/dist/assets/AnimatedSpinner-B25lpnvb.js +15 -0
- package/dist/assets/{AnnotationTagsDropdown.ee-CPHqM0oA.js → AnnotationTagsDropdown.ee-bqrzcFvD.js} +6 -6
- package/dist/assets/{MainHeader-KNrtVK1m.js → AppHeader-Bk2_Gkdr.js} +359 -528
- package/dist/assets/{MainHeader-CSaAWCWj.css → AppHeader-CiEVBSe4.css} +42 -160
- package/dist/assets/{MainSidebar-BvZcZjNQ.js → AppSidebar-DVQtWhNG.js} +107 -83
- package/dist/assets/{MainSidebar-CEsQ8o1Y.css → AppSidebar-qYnACKTG.css} +13 -4
- package/dist/assets/{AuthView-DBipI9XX.js → AuthView-B70yKQIj.js} +12 -12
- package/dist/assets/{SettingsView-6sirGv9l.css → BottomMenu-CYgiV90C.css} +57 -37
- package/dist/assets/{BottomMenu-n6wDMblT.js → BottomMenu-Zsty8SFw.js} +70 -168
- package/dist/assets/{useCanvasMapping-BLB5IFnL.js → CanvasRunWorkflowButton-D05EeNT9.js} +268 -262
- package/dist/assets/{useCanvasMapping-CyDAqgNV.css → CanvasRunWorkflowButton-D_Rqnskj.css} +203 -203
- package/dist/assets/{ChangePasswordView-N8tRCxXS.js → ChangePasswordView-B5SZMMPu.js} +14 -18
- package/dist/assets/{ChatAgentAvatar-B68ZZ295.css → ChatAgentAvatar-D94COYC_.css} +10 -13
- package/dist/assets/ChatAgentAvatar-lJduQjSM.js +67 -0
- package/dist/assets/{ChatFile-B6hcldJk.js → ChatFile-DGN9Z6P_.js} +17 -17
- package/dist/assets/{ChatLayout-ZIIWLYox.js → ChatLayout-B3HCEtmF.js} +11 -15
- package/dist/assets/{ChatLayout-CxM-3LAt.css → ChatLayout-C5Cltxb6.css} +1 -8
- package/dist/assets/{ChatPersonalAgentsView-CHjVJlH9.js → ChatPersonalAgentsView-CfuU16Wx.js} +19 -24
- package/dist/assets/{ChatSidebar-DcNxY7Pt.css → ChatSidebar-D-hWKn7w.css} +126 -0
- package/dist/assets/{ChatSidebar-D1wzPLte.js → ChatSidebar-DxXP8jvn.js} +56 -71
- package/dist/assets/{ChatView-CEdaGOiq.js → ChatView-DGO5M0-j.js} +113 -112
- package/dist/assets/{ChatView-DrZ9gYjI.css → ChatView-DjGNW1KJ.css} +58 -50
- package/dist/assets/{ChatWorkflowAgentsView-DDoSKFjL.js → ChatWorkflowAgentsView-BDUzYR0a.js} +19 -24
- package/dist/assets/CollectionParameter-CX0d0ppe.js +42 -0
- package/dist/assets/{CommunityNodeUpdateInfo-D_fpxg7T.js → CommunityNodeUpdateInfo-BzF3To7U.js} +13 -13
- package/dist/assets/{CopyInput-CkRSExvb.js → CopyInput-B3eGtGOr.js} +15 -15
- package/dist/assets/{CredentialIcon-CsmA8n5q.js → CredentialIcon-Co-DgDkv.js} +6 -6
- package/dist/assets/{CredentialPicker-Dc9_fQqB.js → CredentialPicker-xUgsLzd_.js} +8 -8
- package/dist/assets/{CredentialSelectorModal-CrHTSX3D.js → CredentialSelectorModal-te4cxLHY.js} +22 -26
- package/dist/assets/{CredentialsView-BHjKX7p7.js → CredentialsView-CSMNv5Qi.js} +46 -51
- package/dist/assets/{DataTableActions-Baa_gpFk.js → DataTableActions-BkI1G_w4.js} +6 -6
- package/dist/assets/{DataTableDetailsView-Csre5EoG.js → DataTableDetailsView-D5XYBEVr.js} +27 -30
- package/dist/assets/{DataTableView-DvZt7cVh.js → DataTableView-U-FAWXix.js} +31 -36
- package/dist/assets/DemoFooter-uIyuy9UT.js +53 -0
- package/dist/assets/{Draggable-wlu-YKYh.js → Draggable-0gyx_CsY.js} +5 -5
- package/dist/assets/{EmptySharedSectionActionBox-BoAVktyy.js → EmptySharedSectionActionBox-DtGMtVsp.js} +5 -5
- package/dist/assets/{EnterpriseEdition.ee-CvUo0Y3B.js → EnterpriseEdition.ee-UhVkBS4f.js} +2 -2
- package/dist/assets/{EntityNotFound-Dk9s3CwF.js → EntityNotFound-qBJJDr9S.js} +9 -12
- package/dist/assets/{EntityUnAuthorised-h6YriaK9.js → EntityUnAuthorised-Ci980jH0.js} +8 -11
- package/dist/assets/{ErrorView-BGXVjv22.js → ErrorView-CPQg7TDd.js} +13 -16
- package/dist/assets/{EvaluationsRootView-CEJYrCEy.js → EvaluationsRootView-CzP9JGh2.js} +34 -36
- package/dist/assets/{EvaluationsView-DmaEZ7wK.js → EvaluationsView-ikx3LyQf.js} +28 -33
- package/dist/assets/{ExecutionsTime-K-nIEY55.js → ExecutionsTime-D5RuLFMY.js} +16 -15
- package/dist/assets/{ExecutionsView-BC4uwKPS.js → ExecutionsView-cMwfmY4W.js} +62 -65
- package/dist/assets/{ExternalSecretsProviderConnectionSwitch.ee-DYabADwO.js → ExternalSecretsProviderConnectionSwitch.ee-BglbvOQG.js} +18 -17
- package/dist/assets/FixedCollectionParameter-COuGvpZ8.css +642 -0
- package/dist/assets/FixedCollectionParameter-rO9blroR.js +1571 -0
- package/dist/assets/FolderBreadcrumbs-DegmC04u.js +187 -0
- package/dist/assets/{SaveButton-Dc01Y2MA.css → FolderBreadcrumbs-eBFopiOp.css} +7 -14
- package/dist/assets/{ForgotMyPasswordView-BxFjt7yf.js → ForgotMyPasswordView-CKDZcZP9.js} +14 -18
- package/dist/assets/{InsightsChartAverageRuntime-mcy8IMaN.js → InsightsChartAverageRuntime-69U4sUmH.js} +10 -11
- package/dist/assets/{InsightsChartFailed-iXvqlU_7.js → InsightsChartFailed-Ct64T5GJ.js} +8 -9
- package/dist/assets/{InsightsChartFailureRate-DzWy07B4.js → InsightsChartFailureRate-BOdV-Q3d.js} +9 -11
- package/dist/assets/{InsightsChartTimeSaved-Db1u-o2U.js → InsightsChartTimeSaved-B83s59mL.js} +9 -11
- package/dist/assets/{InsightsChartTotal-Bge4JSj-.js → InsightsChartTotal-1A5vqW4E.js} +7 -9
- package/dist/assets/{InsightsDashboard-BgxCUZWd.js → InsightsDashboard-Dpwy8q6a.js} +37 -38
- package/dist/assets/{InsightsPaywall-DJIAsFUW.js → InsightsPaywall-iaN7Yt1s.js} +15 -18
- package/dist/assets/{InsightsSummary-uZyetR3b.js → InsightsSummary-UGkz-k9w.js} +11 -11
- package/dist/assets/{InsightsTableWorkflows-9h4pU1WK.js → InsightsTableWorkflows-AP6ddx9D.js} +22 -24
- package/dist/assets/{KeyboardShortcutTooltip-Bpb4SkjE.js → KeyboardShortcutTooltip-Dwz4Hv8g.js} +6 -6
- package/dist/assets/LogsPanel-Cz9qV0gc.js +40 -0
- package/dist/assets/{LogsPanel-BG48JZqa.js → LogsPanel-DuiKN1Na.js} +100 -100
- package/dist/assets/{MCPConnectWorkflowsModal-CWg0xros.js → MCPConnectWorkflowsModal-CrhdbX54.js} +36 -41
- package/dist/assets/{MigrationRuleDetail-Dj4iZ8em.js → MigrationRuleDetail-BXj7ghDO.js} +23 -26
- package/dist/assets/{MigrationRules-CMk4HuMV.js → MigrationRules-CWeHH-jb.js} +21 -24
- package/dist/assets/{Modal-BNJXVsfA.js → Modal-CLJXjbTN.js} +27 -26
- package/dist/assets/{ModelByIdSelectorModal-BwhmTdU4.js → ModelByIdSelectorModal-_Q2e43WD.js} +18 -22
- package/dist/assets/{NDVEmptyState-D9V46oIb.js → NDVEmptyState-CJWa4Aka.js} +15 -12
- package/dist/assets/{NodeCreation-DiAqT9SN.js → NodeCreation-BKxsZGAf.js} +30 -52
- package/dist/assets/{ItemsRenderer-DkobJF9f.css → NodeCreator-039HRrqJ.css} +1525 -6
- package/dist/assets/{NodeCreator-Bjt6BI9v.js → NodeCreator-CRhdWp9N.js} +978 -87
- package/dist/assets/{NodeDetailsView-Ct9i-rTh.js → NodeDetailsView-Cm52jG-U.js} +72 -86
- package/dist/assets/{NodeDetailsViewV2-Dh4gzwFe.js → NodeDetailsViewV2-CqGBXjHp.js} +69 -85
- package/dist/assets/{NodeIcon-t97i3ntx.js → NodeIcon-SaoWBT_U.js} +10 -10
- package/dist/assets/{NodeIcon-BDxr0f30.css → NodeIcon-zqTc5h-V.css} +1 -1
- package/dist/assets/{NodeSettings-Cz9vhjW-.js → NodeSettings-BWWEo77y.js} +73 -73
- package/dist/assets/{NodeView-AuBajxDh.css → NodeView-Xwcu11Wh.css} +11 -11
- package/dist/assets/{NodeView-3Y-9RowK.js → NodeView-xEYRJxA0.js} +171 -148
- package/dist/assets/{OAuthConsentView-Bg5-jLUL.js → OAuthConsentView-D6mfPIJI.js} +14 -17
- package/dist/assets/{ParameterInputList-C1BdtAjc.css → ParameterInputList-BUZ33Aem.css} +717 -208
- package/dist/assets/{ParameterInputList-D3pQ9DPD.js → ParameterInputList-Cb2_SQfz.js} +1864 -1039
- package/dist/assets/{ProjectBreadcrumb-CwG4u83J.js → ProjectBreadcrumb-2BEX5IDD.js} +8 -8
- package/dist/assets/{ProjectCardBadge-DEF5xaop.js → ProjectCardBadge-CTVSam44.js} +10 -10
- package/dist/assets/{ProjectHeader-Ftxgilbl.js → ProjectHeader-BagblRFt.js} +14 -14
- package/dist/assets/{ProjectIcon-CBV14vRK.js → ProjectIcon-gwTM9uPG.js} +8 -8
- package/dist/assets/{ProjectRoleView-DxR_UDnr.js → ProjectRoleView-B5mhpgJj.js} +19 -22
- package/dist/assets/{ProjectRolesView-D5UGjI0u.js → ProjectRolesView-CO-fdyVV.js} +18 -21
- package/dist/assets/{ProjectSettings-DjmRzWiu.js → ProjectSettings-CpdJ0QXS.js} +31 -33
- package/dist/assets/{ProjectSharing-CXtVcK-7.js → ProjectSharing-CgRKQQe4.js} +16 -16
- package/dist/assets/{ProjectVariables-xB0qVBxe.js → ProjectVariables-B7LU3SGS.js} +40 -45
- package/dist/assets/{ProviderSettingsModal-BqKcWfeR.js → ProviderSettingsModal-RmJC0Qwe.js} +20 -25
- package/dist/assets/{PushConnectionTracker-Cwk4a7eu.js → PushConnectionTracker-v1yU_xFk.js} +4 -4
- package/dist/assets/{ResolversView-CnNl-Auj.js → ResolversView-OeI_dYci.js} +20 -23
- package/dist/assets/{ResourceFiltersDropdown-CRkQSQvs.js → ResourceFiltersDropdown-bH--4wBS.js} +12 -12
- package/dist/assets/{ResourcesListLayout-DLAMdJD5.css → ResourcesListLayout-BhnhvHiw.css} +140 -0
- package/dist/assets/{ResourcesListLayout-CreZ1Su6.js → ResourcesListLayout-CS0nUJNt.js} +32 -23
- package/dist/assets/{RunData-Ti8dstr8.js → RunData-B_Vlvf1V.js} +20367 -28266
- package/dist/assets/{RunData-CGWkR8tE.css → RunData-xpRgLK8S.css} +2 -2
- package/dist/assets/{RunDataHtml-S_j2pLRX.js → RunDataHtml-BMxc-zRm.js} +5 -5
- package/dist/assets/RunDataHtml-wQh8fACG.js +5 -0
- package/dist/assets/{RunDataJson-C9RYDf3k.js → RunDataJson-D23jdsWY.js} +31 -31
- package/dist/assets/{RunDataJsonActions-CVkDV_4I.js → RunDataJsonActions-DFa7pezf.js} +19 -22
- package/dist/assets/{RunDataParsedAiContent-B6PgQw1V.js → RunDataParsedAiContent-BCprT0E8.js} +15 -16
- package/dist/assets/RunDataParsedAiContent-o_QkeE0L.js +15 -0
- package/dist/assets/{RunDataSearch-DHw36qjO.js → RunDataSearch-BU2qi4nP.js} +10 -13
- package/dist/assets/{RunDataTable-Co9VAMrg.js → RunDataTable-BDrFzGfU.js} +32 -35
- package/dist/assets/{SamlOnboarding-CpWUC0gl.js → SamlOnboarding-DPYTM0tb.js} +14 -18
- package/dist/assets/{SelectedItemsInfo-wq6nTjan.js → SelectedItemsInfo-CKmcAObD.js} +5 -5
- package/dist/assets/{SettingsApiView-eiQOdjgq.js → SettingsApiView-BowYRtTk.js} +24 -26
- package/dist/assets/{SettingsChatHubView-D4WEo9L3.js → SettingsChatHubView-CObWHU09.js} +18 -23
- package/dist/assets/{SettingsCommunityNodesView-C0AaNOEN.js → SettingsCommunityNodesView-wk9JxXqL.js} +38 -41
- package/dist/assets/{SettingsExternalSecrets-y47selKn.js → SettingsExternalSecrets-C41eND_Y.js} +18 -21
- package/dist/assets/{SettingsLdapView-YMVYMnzw.js → SettingsLdapView-D1L1iyvE.js} +22 -25
- package/dist/assets/{SettingsLogStreamingView-BSzLdWpE.js → SettingsLogStreamingView-BqlK3i3Z.js} +21 -23
- package/dist/assets/{SettingsMCPView-BU0f3ymz.js → SettingsMCPView-CoTmbtV_.js} +42 -45
- package/dist/assets/{SettingsPersonalView-BAfYDXor.js → SettingsPersonalView-BMGG66o5.js} +15 -18
- package/dist/assets/SettingsSidebar-RZssT7t8.js +58 -0
- package/dist/assets/{useCommandBar-eK4Fv9lH.css → SettingsSidebar-hr5ASDKX.css} +22 -24
- package/dist/assets/{SettingsSourceControl-DiTdqVc2.js → SettingsSourceControl-C_XOb728.js} +19 -22
- package/dist/assets/{SettingsSso-D9mWYb6m.js → SettingsSso-DkvVZOSA.js} +26 -28
- package/dist/assets/{SettingsUsageAndPlan-Bhhz0N_R.js → SettingsUsageAndPlan-Cnxx5J_k.js} +20 -22
- package/dist/assets/{SettingsUsersView-Cyv_ZTSa.js → SettingsUsersView-DRFHlEG_.js} +50 -27
- package/dist/assets/{SetupTemplateFormStep-B-OXuIEU.js → SetupTemplateFormStep-DTl-SQ5_.js} +15 -15
- package/dist/assets/{SetupView-BvYO_h_-.js → SetupView-BfCKw7tL.js} +14 -18
- package/dist/assets/{SetupWorkflowCredentialsButton-29sPlZ15.js → SetupWorkflowCredentialsButton-BDNBEpgH.js} +21 -19
- package/dist/assets/{SetupWorkflowFromTemplateView-wGZJlu_v.js → SetupWorkflowFromTemplateView-zNitmbxd.js} +21 -24
- package/dist/assets/{SeverityTag-DiRdnrHj.js → SeverityTag-R-mbBDWg.js} +6 -6
- package/dist/assets/{SigninView-CZmSlJU4.js → SigninView-CspSfYWl.js} +16 -19
- package/dist/assets/{SignoutView-BUsJauew.js → SignoutView-CbmvjLhS.js} +10 -10
- package/dist/assets/{SignupView-CBmZdEUa.js → SignupView-D088WMnK.js} +27 -26
- package/dist/assets/{SkeletonAgentCard-felAhV_j.js → SkeletonAgentCard-DNUy88vs.js} +12 -12
- package/dist/assets/{PageViewLayout-Cn6FD0Wt.css → SlideTransition-Bv5Vx35L.css} +6 -17
- package/dist/assets/SlideTransition-CWSKQ4XI.js +11 -0
- package/dist/assets/{TagsDropdown-B3TllM9L.js → TagsDropdown-998vpfi2.js} +9 -9
- package/dist/assets/{TemplateCard-SxL2lAcu.js → TemplateCard-OCtSSObW.js} +9 -9
- package/dist/assets/{TemplateDetails-joifuvuq.js → TemplateDetails-CExTaNmN.js} +20 -20
- package/dist/assets/{TemplateList-Cr8NzldM.js → TemplateList-CYVIQLBo.js} +44 -44
- package/dist/assets/{TemplatesCollectionView-KlTGNZvL.js → TemplatesCollectionView-J4-MsKaR.js} +22 -25
- package/dist/assets/{TemplatesSearchView-R9w7J_qa.js → TemplatesSearchView-FeOl_F9u.js} +49 -52
- package/dist/assets/{TemplatesView-Cva7ybP0.js → TemplatesView-B2WxZgCT.js} +6 -6
- package/dist/assets/{TemplatesWorkflowView-cZBhTHOi.js → TemplatesWorkflowView-pgmIBnml.js} +23 -26
- package/dist/assets/{TestRunDetailView-C1Pcw196.js → TestRunDetailView-We9DOF3E.js} +20 -24
- package/dist/assets/{TextWithHighlights-CgDEugGZ.js → TextWithHighlights-CH5Zsswa.js} +2 -2
- package/dist/assets/{TimeAgo-D971QnHO.js → TimeAgo-DbbBIULe.js} +4 -4
- package/dist/assets/{ToolsSelectorModal-D4oxUUCF.js → ToolsSelectorModal-D0fzbH8I.js} +20 -23
- package/dist/assets/{TriggerPanel-BkdktrEp.js → TriggerPanel-B3wcn8yr.js} +51 -51
- package/dist/assets/VirtualSchema-C4mYgt95.js +28 -0
- package/dist/assets/{VirtualSchema-Brq3RG-a.js → VirtualSchema-DTit75Ni.js} +60 -61
- package/dist/assets/{VirtualSchema-CwutU4vj.css → VirtualSchema-pdpcVEq9.css} +1 -1
- package/dist/assets/{VueMarkdown-BlVr51fL.js → VueMarkdown-D0Ufjusy.js} +3 -3
- package/dist/assets/{WorkerView-CT6vkOh0.js → WorkerView-BaJG1lYK.js} +38 -42
- package/dist/assets/{WorkflowExecutionsInfoAccordion-DSc_InaM.js → WorkflowExecutionsInfoAccordion-BAgAw-VZ.js} +7 -7
- package/dist/assets/{WorkflowExecutionsLandingPage-CuGCweH0.js → WorkflowExecutionsLandingPage-B5M2M_XO.js} +14 -17
- package/dist/assets/{WorkflowExecutionsPreview-DWGuXXJq.js → WorkflowExecutionsPreview-CGtRdwNt.js} +44 -46
- package/dist/assets/{WorkflowExecutionsView-B4v9ie53.js → WorkflowExecutionsView-R_7zX3VU.js} +60 -61
- package/dist/assets/{WorkflowHistory-BLC1cUoO.js → WorkflowHistory-BS71EB0y.js} +198 -196
- package/dist/assets/{WorkflowHistory-BBHdNsOb.css → WorkflowHistory-dUpsKg3Z.css} +42 -75
- package/dist/assets/{WorkflowLocation-X2ZVBc96.js → WorkflowLocation-CTPWi5M9.js} +18 -18
- package/dist/assets/{WorkflowOnboardingView-CmVI0XDf.js → WorkflowOnboardingView-BroupQUz.js} +10 -10
- package/dist/assets/{WorkflowPreview-CZAcz1Na.js → WorkflowPreview-DLbWDX-7.js} +9 -9
- package/dist/assets/{WorkflowTagsDropdown-DlKqZzjZ.js → WorkflowTagsDropdown-DMBpcKR1.js} +6 -6
- package/dist/assets/{WorkflowsView-C-PD10oe.css → WorkflowsView-0_qNZeIx.css} +32 -42
- package/dist/assets/{WorkflowsView-BDhK0stx.js → WorkflowsView-Bdslfqgx.js} +128 -238
- package/dist/assets/{_MapCache-ficiegRb.js → _MapCache-DkLivSSb.js} +46 -38
- package/dist/assets/{_baseOrderBy-DwurmLcj.js → _baseOrderBy-Cy5MGJv_.js} +8 -13
- package/dist/assets/{_initCloneObject-DPuE6hiH.js → _initCloneObject-DiO9tORE.js} +2 -2
- package/dist/assets/{aiTemplatesStarterCollection.store-B-exu89T.js → aiTemplatesStarterCollection.store-C5UvSRtb.js} +6 -6
- package/dist/assets/{apiKeys.store-DW3qN7-W.js → apiKeys.store-tF_8Mh4s.js} +4 -4
- package/dist/assets/{assistant.store-BWyMPD4R.js → assistant.store-BsyT2BFh.js} +8 -8
- package/dist/assets/{auth.eventBus-BQKtqsAd.js → auth.eventBus-Ce2KL2L4.js} +1 -1
- package/dist/assets/{banners.store-NV1mJdSo.js → banners.store-De4swlHn.js} +7 -7
- package/dist/assets/{buttons.esm-Euf82NbC.js → buttons.esm-DHCtg4os.js} +0 -5
- package/dist/assets/canvas.utils-6yT3qDz5.js +138 -0
- package/dist/assets/{chart-BI8B7UPV.js → chart-BpBZvUkM.js} +0 -6
- package/dist/assets/{chartjs.utils-CZqhhNLn.js → chartjs.utils-B8F_iMP1.js} +5 -5
- package/dist/assets/{chat.store-CIFGQpTZ.js → chat.store-DIrG4eKT.js} +34 -29
- package/dist/assets/{chatPanel.store-gj4bbTwF.js → chatPanel.store-XTtvoDW8.js} +6 -6
- package/dist/assets/{chunk-6z4oVpB-.js → chunk-r2Y0G7H8.js} +3 -2
- package/dist/assets/{col-Cd5kWzv_.js → col-gWKpvp-j.js} +2 -2
- package/dist/assets/collaboration.store-DuCY-6U-.js +287 -0
- package/dist/assets/{constants-vjryKFt3.js → constants-Bgby4me8.js} +12 -3
- package/dist/assets/{constants-B5yiZflE.js → constants-CRdXn3zB.js} +290 -301
- package/dist/assets/core-CKLPLCBJ.js +4 -0
- package/dist/assets/{core-BMwklDiH.js → core-DDiavqSm.js} +1 -1
- package/dist/assets/{dataTable.store-CigyhC-U.js → dataTable.store-DepEpEQf.js} +4 -4
- package/dist/assets/{date-picker-BjmPe_fb.js → date-picker-CutzRF4i.js} +13 -4
- package/dist/assets/{dateFormatter-DjYPheeb.js → dateFormatter-BiQ9pMrA.js} +4 -4
- package/dist/assets/{dateformat-BlfbK1ki.js → dateformat-BeHi9sF4.js} +2 -1
- package/dist/assets/{dialog-CFy8vuwh.js → dialog-ZxkAulrV.js} +4 -4
- package/dist/assets/{dist-BQ7E1jLN.js → dist-C4hPgTYg.js} +3 -3
- package/dist/assets/empty-nq5-pHAR.js +895 -0
- package/dist/assets/en-C4tPMX0d.js +2 -0
- package/dist/assets/{en-CF30SCh2.js → en-PrU4QUr7.js} +10 -2
- package/dist/assets/{es-C2DNxuAa.js → es-347rbIb-.js} +2 -2
- package/dist/assets/{evaluation.constants-CaU1Jek8.js → evaluation.constants-COHKT500.js} +12 -15
- package/dist/assets/{executions.store-BjQUzT_w.js → executions.store-D1BMCixf.js} +4 -4
- package/dist/assets/{exports-C5ncBo9h.js → exports-DwuuoPh-.js} +1 -3
- package/dist/assets/{externalSecrets.ee.store-DS-4lnXS.js → externalSecrets.ee.store-CClIdWWb.js} +4 -4
- package/dist/assets/{folders.store-BqKf5TBS.js → folders.store-DHmLGEYl.js} +4 -4
- package/dist/assets/{index-U6fZiFvz.css → index-BhFfa3xu.css} +3083 -2437
- package/dist/assets/{index-BFqYZQt_.js → index-CZ0ShzXs.js} +4327 -1864
- package/dist/assets/{insights.constants-D63-x9pu.js → insights.constants-98xWnZQu.js} +3 -3
- package/dist/assets/{insights.store-BwsFg9pQ.js → insights.store-B6MSLVpS.js} +7 -7
- package/dist/assets/{insights.utils-CWK5jWpE.js → insights.utils-B0txVt0Q.js} +6 -6
- package/dist/assets/{languageModules-DDJUl1h8.js → languageModules-DyQaii5v.js} +1 -1
- package/dist/assets/{logStreaming.store-BxM1T1ZK.js → logStreaming.store-3rdm0k17.js} +3 -3
- package/dist/assets/{mcp.store-ChjN6nuV.js → mcp.store--DVpfZPc.js} +4 -4
- package/dist/assets/{merge-DjI8TA-7.js → merge-B0-p153C.js} +2 -2
- package/dist/assets/{nodeCreator.store-CXJtK_5o.js → nodeCreator.store-BL_XgPCV.js} +1932 -2216
- package/dist/assets/{nodeIcon-CIlNGIQ6.js → nodeIcon-G45tSifH.js} +3 -3
- package/dist/assets/{nodeTransforms-yL73Ok-c.js → nodeTransforms-CjgwHZte.js} +2 -2
- package/dist/assets/{orderBy-DLgDRKnZ.js → orderBy-CI4ht8Wh.js} +3 -3
- package/dist/assets/{personalizedTemplatesV3.store-Bs_2J_OQ.js → personalizedTemplatesV3.store-EQdiv-tM.js} +4 -4
- package/dist/assets/{pickBy-DYW-ATsL.js → pickBy-CS854Y6u.js} +3 -3
- package/dist/assets/pushConnection.store-Rp8-mZo7.js +496 -0
- package/dist/assets/{radio-BeejvdFG.js → radio-I_Y35sEo.js} +2 -2
- package/dist/assets/{readyToRun.store-DX00OlhN.js → readyToRun.store-i9gaUDlh.js} +17 -8
- package/dist/assets/{readyToRunWorkflows.store-CR7Yn6At.js → readyToRunWorkflows.store-gcTSDf1M.js} +6 -6
- package/dist/assets/{roles.store-DeGSYcWL.js → roles.store-ByEYbWMb.js} +4 -4
- package/dist/assets/{router-CFnjpqoZ.js → router-CmCiJkA0.js} +316 -304
- package/dist/assets/{sanitize-html-BkT1y0bJ.js → sanitize-html-DeDnsMgc.js} +17 -17
- package/dist/assets/{semver-CjLBiqOi.js → semver-DkHAUe3T.js} +6 -8
- package/dist/assets/{sourceControl.eventBus-BlFJV1yj.js → sourceControl.eventBus-l-XuMGfW.js} +1 -1
- package/dist/assets/{sqlite3-worker1-bundler-friendly-BOYmhhGN.js → sqlite3-worker1-bundler-friendly-BvaOkVlV.js} +9 -2
- package/dist/assets/{src-CMoPZtHv.css → src-CUiJtOrW.css} +5070 -4059
- package/dist/assets/{src-BiuB4CZc.js → src-DpZSuyLC.js} +5805 -2547
- package/dist/assets/{sso.store-CgVzmGCn.js → sso.store-B0NxuXiJ.js} +3 -3
- package/dist/assets/{table-fp187Rky.js → table-C3aerURh.js} +5 -5
- package/dist/assets/{templateActions-Dn6PNjyj.js → templateActions-BGHev3SN.js} +5 -5
- package/dist/assets/{templateTransforms-BtbIlupE.js → templateTransforms-B0n1tACx.js} +1 -1
- package/dist/assets/{truncate-B1HVeveJ.js → truncate-BrM_9cme.js} +5 -5
- package/dist/assets/{typescript.worker-CYqLvLHh.js → typescript.worker-DZR6qltN.js} +224 -176
- package/dist/assets/{usage.store-DI2Rilu6.js → usage.store-3GYv6IW-.js} +3 -3
- package/dist/assets/{useActions-B3Tgqfk-.js → useActions-Buaifc4L.js} +5 -5
- package/dist/assets/useBugReporting-D6SXeO6B.js +130 -0
- package/dist/assets/useCalloutHelpers-Cwtyxtsm.js +80 -0
- package/dist/assets/{useCanvasOperations-BttAaAbZ.js → useCanvasOperations-DY9_Vcrs.js} +36 -32
- package/dist/assets/{useClipboard-CurFa2Dj.js → useClipboard-B8OKhRbY.js} +3 -3
- package/dist/assets/{useCredentialResolvers-CJPbKnJV.js → useCredentialResolvers-CCUEZ5V2.js} +5 -5
- package/dist/assets/{useCustomAgent-tUoLIUar.css → useCustomAgent-D8Sw5vcC.css} +32 -9
- package/dist/assets/useCustomAgent-h_FKujBQ.js +630 -0
- package/dist/assets/{useDebounce-BjcMkTu4.js → useDebounce-C4ttil9E.js} +12 -12
- package/dist/assets/{useExecutionData-B5c3pMYr.js → useExecutionData-CAzGOYWw.js} +2 -2
- package/dist/assets/{useExecutionDebugging-BAm9HytR.js → useExecutionDebugging-DQI5yARq.js} +7 -7
- package/dist/assets/{useExecutionHelpers-ClAdmv-B.js → useExecutionHelpers-DWZYR0dg.js} +5 -5
- package/dist/assets/useGlobalEntityCreation-BwX8UUSv.js +192 -0
- package/dist/assets/{useImportCurlCommand-L4oAG6dd.js → useImportCurlCommand-DRS2-Amm.js} +41 -36
- package/dist/assets/{useIntersectionObserver-Bb8gFEHX.js → useIntersectionObserver-CGg561I6.js} +1 -1
- package/dist/assets/{useKeybindings-30WRTvmG.js → useKeybindings-MR6cNtmK.js} +5 -5
- package/dist/assets/{useLogsTreeExpand-6_x7FouR.js → useLogsTreeExpand-CvDEwlbf.js} +41 -41
- package/dist/assets/{useMcp-T0ZvziGl.js → useMcp-BIeH6n02.js} +2 -2
- package/dist/assets/{usePageRedirectionHelper-BJH0h6XA.js → usePageRedirectionHelper-DPAtaAXY.js} +3 -3
- package/dist/assets/{usePinnedData-B88__knO.js → usePinnedData-BFTyeyJG.js} +6 -6
- package/dist/assets/{usePushConnection-O_Sg_NLA.js → usePushConnection-CcijHMYv.js} +12 -16
- package/dist/assets/{useRunWorkflow-BK9B9ALV.js → useRunWorkflow-wOjZEWNr.js} +106 -486
- package/dist/assets/{useSettingsItems-aqm5JSTf.js → useSettingsItems-CaNtH9v0.js} +5 -5
- package/dist/assets/{useTelemetryContext-DoX4HWmg.js → useTelemetryContext-CE5phjaX.js} +4 -4
- package/dist/assets/{useWorkflowsCache-CsbESieM.js → useWorkflowsCache-BBhvuqqB.js} +2 -2
- package/dist/assets/{userRoleProvisioning.store-CK7bojX8.js → userRoleProvisioning.store-COPddaUL.js} +3 -3
- package/dist/assets/{builder.store-CgMqPgnW.js → users.store-KBMG-745.js} +22801 -23949
- package/dist/assets/utils-BCX2a8sC.js +133 -0
- package/dist/assets/{versions.store-CzvzmERa.js → versions.store-BnGZ_WOG.js} +4 -4
- package/dist/assets/{vue-Dd77OcSb.js → vue-atn33zIp.js} +255 -213
- package/dist/assets/{vue-json-pretty-DF-vJpHf.js → vue-json-pretty-CTqCbq0T.js} +1 -1
- package/dist/assets/{vue.runtime.esm-bundler-tP5dCd7J.js → vue.runtime.esm-bundler-XtMkEjzB.js} +703 -538
- package/dist/assets/{worker-CIvWfg3a.js → worker-BnP12nj7.js} +10 -3
- package/dist/index.html +116 -119
- package/package.json +1 -1
- package/tsconfig.json +1 -1
- package/dist/assets/AnimatedSpinner-DBPcagVq.js +0 -15
- package/dist/assets/BottomMenu-CRVyIu-B.css +0 -474
- package/dist/assets/ChatAgentAvatar-DoN0Vr4x.js +0 -67
- package/dist/assets/CollectionParameter-ByVUPeYR.js +0 -49
- package/dist/assets/DemoFooter-u1dOP76h.js +0 -62
- package/dist/assets/FixedCollectionParameter-CkTQ2epJ.js +0 -493
- package/dist/assets/FixedCollectionParameter-DT3ELzS9.css +0 -202
- package/dist/assets/ItemsRenderer-z7cKER1f.js +0 -922
- package/dist/assets/LogsPanel-B9QiohHK.js +0 -49
- package/dist/assets/NodeCreator-OSIpRI6S.css +0 -1649
- package/dist/assets/PageViewLayout-XiCAnPXE.js +0 -12
- package/dist/assets/PrebuiltAgentTemplatesView-B7uXEamJ.js +0 -151
- package/dist/assets/PrebuiltAgentTemplatesView-jF7HvWnL.css +0 -166
- package/dist/assets/RunDataHtml-CMYh4fix.js +0 -6
- package/dist/assets/RunDataParsedAiContent-DI_kumKV.js +0 -23
- package/dist/assets/SaveButton-DFMQz4OO.js +0 -89
- package/dist/assets/SettingsView-Ccz6LsAi.js +0 -87
- package/dist/assets/VirtualSchema-BOm-odEw.js +0 -33
- package/dist/assets/WorkflowActivationErrorMessage-CkxW6ZtU.js +0 -17
- package/dist/assets/WorkflowActivator-BGcCOUCH.css +0 -391
- package/dist/assets/WorkflowActivator-CisdBXpp.js +0 -362
- package/dist/assets/core-DeR-PV8K.js +0 -4
- package/dist/assets/empty-BUjCyq3U.js +0 -2450
- package/dist/assets/en-DyO2pPiC.js +0 -2
- package/dist/assets/schemaPreview.store-Bs_OZUsM.js +0 -113
- package/dist/assets/uniqBy-6k_SZ3dM.js +0 -10
- package/dist/assets/useBeforeUnload-dAltrwFm.js +0 -40
- package/dist/assets/useCommandBar-CXSPJjOq.js +0 -2425
- package/dist/assets/useCustomAgent-CSvOuB6K.js +0 -471
- package/dist/assets/useRecentResources-Dy5vqIyg.js +0 -118
- package/dist/assets/useWorkflowActivate-i3WAlo0M.js +0 -152
- package/dist/assets/utils-CnShVJFh.js +0 -54
- /package/dist/assets/{CalendarDate-zWqgZMlk.js → CalendarDate-CogIFc4_.js} +0 -0
- /package/dist/assets/{_plugin-vue_export-helper-BwBpWJRZ.js → _plugin-vue_export-helper-fRq25RGE.js} +0 -0
- /package/dist/assets/{fileUtils-Bt1vr1SC.js → fileUtils-C-Bxka0b.js} +0 -0
- /package/dist/assets/{mcp.constants-1HQX33wO.js → mcp.constants-Djm5lWYR.js} +0 -0
- /package/dist/assets/{preload-helper-CR0ecmWK.js → preload-helper-D8n1yiy9.js} +0 -0
- /package/dist/assets/{retry-B-tGcWte.js → retry-BLsJRFf0.js} +0 -0
- /package/dist/assets/{smartDecimal-gA9wGEba.js → smartDecimal-D3Shg2YQ.js} +0 -0
- /package/dist/assets/{sortByProperty-C6sPingU.js → sortByProperty-Dip6DXbv.js} +0 -0
- /package/dist/assets/{sqlite3-opfs-async-proxy-vVtmDGHX.js → sqlite3-opfs-async-proxy-BrtqH9Si.js} +0 -0
- /package/dist/assets/{xml-DDfXMqo8.js → xml-Cf0o4TxQ.js} +0 -0
|
@@ -1,2425 +0,0 @@
|
|
|
1
|
-
import { o as __toESM } from "./chunk-6z4oVpB-.js";
|
|
2
|
-
import { C as computed, Cn as toDisplayString, D as createElementBlock, E as createCommentVNode, Gt as unref, It as ref, M as createVNode, P as defineComponent, T as createBlock, et as openBlock, j as createTextVNode, vn as normalizeClass, w as createBaseVNode } from "./vue.runtime.esm-bundler-tP5dCd7J.js";
|
|
3
|
-
import { _t as useI18n } from "./_MapCache-ficiegRb.js";
|
|
4
|
-
import { Tn as updatedIconSet, ct as useDeviceSupport, st as N8nKeyboardShortcut_default, wn as N8nIcon_default } from "./src-BiuB4CZc.js";
|
|
5
|
-
import { t as __plugin_vue_export_helper_default } from "./_plugin-vue_export-helper-BwBpWJRZ.js";
|
|
6
|
-
import { v as useRoute, y as useRouter } from "./truncate-B1HVeveJ.js";
|
|
7
|
-
import { $i as nodeViewEventBus, Et as executionRetryMessage, N as useWorkflowsStore, Nt as useNodeTypesStore, O as useTelemetry, Pt as useActionsGenerator, Qn as ProjectTypes, Rn as useWorkflowHelpers, Vn as useTagsStore, Xn as useProjectsStore, Zn as useSourceControlStore, _ as require_FileSaver_min, gn as useCredentialsStore, gs as useSettingsStore, j as usePostHog, m as useMessage, n as useWorkflowSaving, oa as useUIStore, p as useCloudPlanStore, v as useToast } from "./builder.store-CgMqPgnW.js";
|
|
8
|
-
import { Ao as getResourcePermissions, Bo as VIEWS, Gr as PROJECT_DATA_TABLES, Nr as DATA_TABLE_VIEW, Or as DATA_TABLE_DETAILS, Sc as EnterpriseEditionFeature, Vo as ABOUT_MODAL_KEY, an as EXECUTE_WORKFLOW_NODE_TYPE, as as MODAL_CONFIRM, ba as isResourceLocatorValue, es as IMPORT_WORKFLOW_URL_MODAL_KEY, ms as WHATS_NEW_MODAL_KEY, qo as DUPLICATE_MODAL_KEY, uc as COMMAND_BAR_EXPERIMENT, ws as WORKFLOW_SETTINGS_MODAL_KEY } from "./constants-B5yiZflE.js";
|
|
9
|
-
import { r as useRootStore } from "./_baseOrderBy-DwurmLcj.js";
|
|
10
|
-
import { n as require_debounce } from "./useDebounce-BjcMkTu4.js";
|
|
11
|
-
import { t as useExecutionsStore } from "./executions.store-BjQUzT_w.js";
|
|
12
|
-
import { t as useRunWorkflow } from "./useRunWorkflow-BK9B9ALV.js";
|
|
13
|
-
import { r as canvasEventBus, t as useCanvasOperations } from "./useCanvasOperations-BttAaAbZ.js";
|
|
14
|
-
import { t as useFoldersStore } from "./folders.store-BqKf5TBS.js";
|
|
15
|
-
import { t as NodeIcon_default } from "./NodeIcon-t97i3ntx.js";
|
|
16
|
-
import { t as usePageRedirectionHelper } from "./usePageRedirectionHelper-BJH0h6XA.js";
|
|
17
|
-
import { t as useDataTableStore } from "./dataTable.store-CigyhC-U.js";
|
|
18
|
-
import { t as require_uniqBy } from "./uniqBy-6k_SZ3dM.js";
|
|
19
|
-
import { n as isIconOrEmoji, t as ProjectIcon_default } from "./ProjectIcon-CBV14vRK.js";
|
|
20
|
-
import { t as CredentialIcon_default } from "./CredentialIcon-CsmA8n5q.js";
|
|
21
|
-
import { t as sortByProperty } from "./sortByProperty-C6sPingU.js";
|
|
22
|
-
import { a as CHAT_PERSONAL_AGENTS_VIEW, d as CHAT_WORKFLOW_AGENTS_VIEW, m as providerDisplayNames, n as CHAT_CONVERSATION_VIEW, u as CHAT_VIEW } from "./constants-vjryKFt3.js";
|
|
23
|
-
import { t as useRecentResources } from "./useRecentResources-Dy5vqIyg.js";
|
|
24
|
-
import { f as stringifyModel, l as isLlmProvider, s as getAgentRoute, t as useChatStore } from "./chat.store-CIFGQpTZ.js";
|
|
25
|
-
function useDebugInfo() {
|
|
26
|
-
const settingsStore = useSettingsStore();
|
|
27
|
-
const rootStore = useRootStore();
|
|
28
|
-
const { isTouchDevice, userAgent } = useDeviceSupport();
|
|
29
|
-
const coreInfo = (skipSensitive) => {
|
|
30
|
-
const info = {
|
|
31
|
-
n8nVersion: rootStore.versionCli,
|
|
32
|
-
platform: settingsStore.isDocker && settingsStore.deploymentType === "cloud" ? "docker (cloud)" : settingsStore.isDocker ? "docker (self-hosted)" : "npm",
|
|
33
|
-
nodeJsVersion: settingsStore.nodeJsVersion,
|
|
34
|
-
nodeEnv: settingsStore.nodeEnv,
|
|
35
|
-
database: settingsStore.databaseType === "postgresdb" ? "postgres" : settingsStore.databaseType === "mysqldb" ? "mysql" : settingsStore.databaseType,
|
|
36
|
-
executionMode: settingsStore.isQueueModeEnabled ? settingsStore.isMultiMain ? "scaling (multi-main)" : "scaling (single-main)" : "regular",
|
|
37
|
-
concurrency: settingsStore.settings.concurrency,
|
|
38
|
-
license: settingsStore.isCommunityPlan || !settingsStore.settings.license ? "community" : settingsStore.settings.license.environment === "production" ? "enterprise (production)" : "enterprise (sandbox)"
|
|
39
|
-
};
|
|
40
|
-
if (!skipSensitive) return {
|
|
41
|
-
...info,
|
|
42
|
-
consumerId: !skipSensitive ? settingsStore.consumerId : void 0
|
|
43
|
-
};
|
|
44
|
-
return info;
|
|
45
|
-
};
|
|
46
|
-
const storageInfo = () => {
|
|
47
|
-
return {
|
|
48
|
-
success: settingsStore.saveDataSuccessExecution,
|
|
49
|
-
error: settingsStore.saveDataErrorExecution,
|
|
50
|
-
progress: settingsStore.saveDataProgressExecution,
|
|
51
|
-
manual: settingsStore.saveManualExecutions,
|
|
52
|
-
binaryMode: settingsStore.binaryDataMode === "default" ? "memory" : settingsStore.binaryDataMode
|
|
53
|
-
};
|
|
54
|
-
};
|
|
55
|
-
const pruningInfo = () => {
|
|
56
|
-
if (!settingsStore.pruning?.isEnabled) return { enabled: false };
|
|
57
|
-
return {
|
|
58
|
-
enabled: true,
|
|
59
|
-
maxAge: `${settingsStore.pruning?.maxAge} hours`,
|
|
60
|
-
maxCount: `${settingsStore.pruning?.maxCount} executions`
|
|
61
|
-
};
|
|
62
|
-
};
|
|
63
|
-
const securityInfo = () => {
|
|
64
|
-
const info = {};
|
|
65
|
-
if (!settingsStore.security.blockFileAccessToN8nFiles) info.blockFileAccessToN8nFiles = false;
|
|
66
|
-
if (!settingsStore.security.secureCookie) info.secureCookie = false;
|
|
67
|
-
if (Object.keys(info).length === 0) return;
|
|
68
|
-
return info;
|
|
69
|
-
};
|
|
70
|
-
const client = () => {
|
|
71
|
-
return {
|
|
72
|
-
userAgent,
|
|
73
|
-
isTouchDevice
|
|
74
|
-
};
|
|
75
|
-
};
|
|
76
|
-
const gatherDebugInfo = (skipSensitive) => {
|
|
77
|
-
const debugInfo = {
|
|
78
|
-
core: coreInfo(skipSensitive),
|
|
79
|
-
storage: storageInfo(),
|
|
80
|
-
pruning: pruningInfo(),
|
|
81
|
-
client: client()
|
|
82
|
-
};
|
|
83
|
-
const security = securityInfo();
|
|
84
|
-
if (security) debugInfo.security = security;
|
|
85
|
-
return debugInfo;
|
|
86
|
-
};
|
|
87
|
-
const toMarkdown = (debugInfo, { secondaryHeader }) => {
|
|
88
|
-
const extraLevel = secondaryHeader ? "#" : "";
|
|
89
|
-
let markdown = `${extraLevel}# Debug info\n\n`;
|
|
90
|
-
for (const sectionKey in debugInfo) {
|
|
91
|
-
markdown += `${extraLevel}## ${sectionKey}\n\n`;
|
|
92
|
-
const section = debugInfo[sectionKey];
|
|
93
|
-
if (!section) continue;
|
|
94
|
-
for (const itemKey in section) {
|
|
95
|
-
const itemValue = section[itemKey];
|
|
96
|
-
markdown += `- ${itemKey}: ${itemValue}\n`;
|
|
97
|
-
}
|
|
98
|
-
markdown += "\n";
|
|
99
|
-
}
|
|
100
|
-
return markdown;
|
|
101
|
-
};
|
|
102
|
-
const appendTimestamp = (markdown) => {
|
|
103
|
-
return `${markdown}Generated at: ${(/* @__PURE__ */ new Date()).toISOString()}`;
|
|
104
|
-
};
|
|
105
|
-
const generateDebugInfo = ({ skipSensitive, secondaryHeader } = {}) => {
|
|
106
|
-
return appendTimestamp(toMarkdown(gatherDebugInfo(skipSensitive), { secondaryHeader }));
|
|
107
|
-
};
|
|
108
|
-
return { generateDebugInfo };
|
|
109
|
-
}
|
|
110
|
-
var CommandBarItemTitle_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
|
|
111
|
-
__name: "CommandBarItemTitle",
|
|
112
|
-
props: {
|
|
113
|
-
title: {},
|
|
114
|
-
suffix: {},
|
|
115
|
-
suffixIcon: {},
|
|
116
|
-
actionText: {},
|
|
117
|
-
shortcut: {},
|
|
118
|
-
isSelected: { type: Boolean },
|
|
119
|
-
isHovered: { type: Boolean }
|
|
120
|
-
},
|
|
121
|
-
setup(__props) {
|
|
122
|
-
return (_ctx, _cache) => {
|
|
123
|
-
return openBlock(), createElementBlock("span", { class: normalizeClass(_ctx.$style.container) }, [
|
|
124
|
-
createBaseVNode("span", { class: normalizeClass(_ctx.$style.title) }, toDisplayString(_ctx.title), 3),
|
|
125
|
-
_ctx.suffix ? (openBlock(), createElementBlock("span", {
|
|
126
|
-
key: 0,
|
|
127
|
-
class: normalizeClass(_ctx.$style.suffix)
|
|
128
|
-
}, [_ctx.suffixIcon ? (openBlock(), createBlock(ProjectIcon_default, {
|
|
129
|
-
key: 0,
|
|
130
|
-
icon: _ctx.suffixIcon,
|
|
131
|
-
size: "mini",
|
|
132
|
-
"border-less": true
|
|
133
|
-
}, null, 8, ["icon"])) : createCommentVNode("", true), createTextVNode(" " + toDisplayString(_ctx.suffix), 1)], 2)) : createCommentVNode("", true),
|
|
134
|
-
_ctx.actionText && (_ctx.isSelected || _ctx.isHovered) ? (openBlock(), createElementBlock("span", {
|
|
135
|
-
key: 1,
|
|
136
|
-
class: normalizeClass(_ctx.$style.action)
|
|
137
|
-
}, toDisplayString(_ctx.actionText), 3)) : createCommentVNode("", true),
|
|
138
|
-
_ctx.shortcut ? (openBlock(), createElementBlock("span", {
|
|
139
|
-
key: 2,
|
|
140
|
-
class: normalizeClass(_ctx.$style.shortcut)
|
|
141
|
-
}, [createVNode(unref(N8nKeyboardShortcut_default), {
|
|
142
|
-
keys: _ctx.shortcut.keys,
|
|
143
|
-
"meta-key": _ctx.shortcut.metaKey,
|
|
144
|
-
"alt-key": _ctx.shortcut.altKey,
|
|
145
|
-
"shift-key": _ctx.shortcut.shiftKey
|
|
146
|
-
}, null, 8, [
|
|
147
|
-
"keys",
|
|
148
|
-
"meta-key",
|
|
149
|
-
"alt-key",
|
|
150
|
-
"shift-key"
|
|
151
|
-
])], 2)) : createCommentVNode("", true)
|
|
152
|
-
], 2);
|
|
153
|
-
};
|
|
154
|
-
}
|
|
155
|
-
});
|
|
156
|
-
var CommandBarItemTitle_vue_vue_type_style_index_0_lang_module_default = {
|
|
157
|
-
container: "_container_16jtl_123",
|
|
158
|
-
title: "_title_16jtl_130",
|
|
159
|
-
suffix: "_suffix_16jtl_139",
|
|
160
|
-
action: "_action_16jtl_150",
|
|
161
|
-
shortcut: "_shortcut_16jtl_156"
|
|
162
|
-
};
|
|
163
|
-
var CommandBarItemTitle_default = /* @__PURE__ */ __plugin_vue_export_helper_default(CommandBarItemTitle_vue_vue_type_script_setup_true_lang_default, [["__cssModules", { "$style": CommandBarItemTitle_vue_vue_type_style_index_0_lang_module_default }]]);
|
|
164
|
-
var ITEM_ID$8 = {
|
|
165
|
-
ADD_NODE: "add-node",
|
|
166
|
-
OPEN_NODE: "open-node",
|
|
167
|
-
ADD_STICKY: "add-sticky"
|
|
168
|
-
};
|
|
169
|
-
function useNodeCommands(options) {
|
|
170
|
-
const i18n = useI18n();
|
|
171
|
-
const { lastQuery } = options;
|
|
172
|
-
const { addNodes, setNodeActive, editableWorkflow } = useCanvasOperations();
|
|
173
|
-
const nodeTypesStore = useNodeTypesStore();
|
|
174
|
-
const credentialsStore = useCredentialsStore();
|
|
175
|
-
const sourceControlStore = useSourceControlStore();
|
|
176
|
-
const workflowsStore = useWorkflowsStore();
|
|
177
|
-
const { generateMergedNodesAndActions } = useActionsGenerator();
|
|
178
|
-
const isReadOnly = computed(() => sourceControlStore.preferences.branchReadOnly);
|
|
179
|
-
const isArchived = computed(() => workflowsStore.workflow.isArchived);
|
|
180
|
-
const workflowPermissions = computed(() => getResourcePermissions(workflowsStore.workflow.scopes).workflow);
|
|
181
|
-
const hasPermission = (permission) => workflowPermissions.value[permission] === true && !isReadOnly.value && !isArchived.value || !workflowsStore.isWorkflowSaved[workflowsStore.workflowId];
|
|
182
|
-
const mergedNodes = computed(() => {
|
|
183
|
-
const httpOnlyCredentials = credentialsStore.httpOnlyCredentialTypes;
|
|
184
|
-
const nodeTypes = nodeTypesStore.visibleNodeTypes;
|
|
185
|
-
return generateMergedNodesAndActions(nodeTypes, httpOnlyCredentials).mergedNodes;
|
|
186
|
-
});
|
|
187
|
-
const buildAddNodeCommand = (node, isRoot) => {
|
|
188
|
-
const { name, displayName } = node;
|
|
189
|
-
return {
|
|
190
|
-
id: name,
|
|
191
|
-
title: isRoot ? `${i18n.baseText("generic.add")} ${displayName}` : displayName,
|
|
192
|
-
section: isRoot ? i18n.baseText("commandBar.sections.nodes") : i18n.baseText("commandBar.nodes.addNode"),
|
|
193
|
-
keywords: [displayName],
|
|
194
|
-
icon: {
|
|
195
|
-
component: NodeIcon_default,
|
|
196
|
-
props: {
|
|
197
|
-
nodeType: node,
|
|
198
|
-
size: 16
|
|
199
|
-
}
|
|
200
|
-
},
|
|
201
|
-
handler: async () => {
|
|
202
|
-
const nodes = await addNodes([{ type: name }]);
|
|
203
|
-
if (nodes && nodes.length > 0) canvasEventBus.emit("nodes:select", { ids: [nodes[0].id] });
|
|
204
|
-
}
|
|
205
|
-
};
|
|
206
|
-
};
|
|
207
|
-
const addNodeCommands = computed(() => {
|
|
208
|
-
if (!hasPermission("update")) return [];
|
|
209
|
-
return mergedNodes.value.map((node) => buildAddNodeCommand(node, false));
|
|
210
|
-
});
|
|
211
|
-
const rootAddNodeCommandItems = computed(() => {
|
|
212
|
-
if (lastQuery.value.length <= 2 || !hasPermission("update")) return [];
|
|
213
|
-
return mergedNodes.value.map((node) => buildAddNodeCommand(node, true));
|
|
214
|
-
});
|
|
215
|
-
const buildOpenNodeCommand = (node, isRoot) => {
|
|
216
|
-
const { id, name, type } = node;
|
|
217
|
-
const nodeType = nodeTypesStore.getNodeType(node.type, node.typeVersion);
|
|
218
|
-
return {
|
|
219
|
-
id,
|
|
220
|
-
title: isRoot ? i18n.baseText("generic.openResource", { interpolate: { resource: name } }) : name,
|
|
221
|
-
section: isRoot ? i18n.baseText("commandBar.sections.nodes") : i18n.baseText("commandBar.nodes.openNode"),
|
|
222
|
-
keywords: [name, type],
|
|
223
|
-
icon: {
|
|
224
|
-
component: NodeIcon_default,
|
|
225
|
-
props: {
|
|
226
|
-
nodeType,
|
|
227
|
-
size: 16
|
|
228
|
-
}
|
|
229
|
-
},
|
|
230
|
-
handler: () => {
|
|
231
|
-
setNodeActive(id, "command_bar");
|
|
232
|
-
},
|
|
233
|
-
placeholder: i18n.baseText("commandBar.nodes.searchPlaceholder")
|
|
234
|
-
};
|
|
235
|
-
};
|
|
236
|
-
const openNodeCommands = computed(() => {
|
|
237
|
-
return editableWorkflow.value.nodes.map((node) => buildOpenNodeCommand(node, false));
|
|
238
|
-
});
|
|
239
|
-
const rootOpenNodeCommandItems = computed(() => {
|
|
240
|
-
if (lastQuery.value.length <= 2) return [];
|
|
241
|
-
return editableWorkflow.value.nodes.map((node) => buildOpenNodeCommand(node, true));
|
|
242
|
-
});
|
|
243
|
-
return { commands: computed(() => {
|
|
244
|
-
return [
|
|
245
|
-
...hasPermission("update") ? [{
|
|
246
|
-
id: ITEM_ID$8.ADD_NODE,
|
|
247
|
-
title: {
|
|
248
|
-
component: CommandBarItemTitle_default,
|
|
249
|
-
props: {
|
|
250
|
-
title: i18n.baseText("commandBar.nodes.addNode"),
|
|
251
|
-
shortcut: { keys: ["tab"] }
|
|
252
|
-
}
|
|
253
|
-
},
|
|
254
|
-
keywords: [i18n.baseText("commandBar.nodes.addNode")],
|
|
255
|
-
section: i18n.baseText("commandBar.sections.nodes"),
|
|
256
|
-
placeholder: i18n.baseText("commandBar.nodes.searchPlaceholder"),
|
|
257
|
-
children: [...addNodeCommands.value],
|
|
258
|
-
icon: {
|
|
259
|
-
component: N8nIcon_default,
|
|
260
|
-
props: { icon: "plus" }
|
|
261
|
-
}
|
|
262
|
-
}] : [],
|
|
263
|
-
...rootAddNodeCommandItems.value,
|
|
264
|
-
{
|
|
265
|
-
id: ITEM_ID$8.OPEN_NODE,
|
|
266
|
-
title: i18n.baseText("commandBar.nodes.openNode"),
|
|
267
|
-
section: i18n.baseText("commandBar.sections.nodes"),
|
|
268
|
-
children: [...openNodeCommands.value],
|
|
269
|
-
placeholder: i18n.baseText("commandBar.nodes.searchPlaceholder"),
|
|
270
|
-
icon: {
|
|
271
|
-
component: N8nIcon_default,
|
|
272
|
-
props: { icon: "columns-3-cog" }
|
|
273
|
-
}
|
|
274
|
-
},
|
|
275
|
-
...rootOpenNodeCommandItems.value,
|
|
276
|
-
...hasPermission("update") ? [{
|
|
277
|
-
id: ITEM_ID$8.ADD_STICKY,
|
|
278
|
-
title: {
|
|
279
|
-
component: CommandBarItemTitle_default,
|
|
280
|
-
props: {
|
|
281
|
-
title: i18n.baseText("commandBar.nodes.addStickyNote"),
|
|
282
|
-
shortcut: {
|
|
283
|
-
shiftKey: true,
|
|
284
|
-
keys: ["s"]
|
|
285
|
-
}
|
|
286
|
-
}
|
|
287
|
-
},
|
|
288
|
-
section: i18n.baseText("commandBar.sections.nodes"),
|
|
289
|
-
handler: () => {
|
|
290
|
-
canvasEventBus.emit("create:sticky");
|
|
291
|
-
},
|
|
292
|
-
icon: {
|
|
293
|
-
component: N8nIcon_default,
|
|
294
|
-
props: { icon: "sticky-note" }
|
|
295
|
-
}
|
|
296
|
-
}] : []
|
|
297
|
-
];
|
|
298
|
-
}) };
|
|
299
|
-
}
|
|
300
|
-
var import_FileSaver_min = /* @__PURE__ */ __toESM(require_FileSaver_min());
|
|
301
|
-
var import_uniqBy = /* @__PURE__ */ __toESM(require_uniqBy());
|
|
302
|
-
var ITEM_ID$7 = {
|
|
303
|
-
OPEN_CREDENTIAL: "open-credential",
|
|
304
|
-
OPEN_SUB_WORKFLOW: "open-sub-workflow",
|
|
305
|
-
TEST_WORKFLOW: "test-workflow",
|
|
306
|
-
SAVE_WORKFLOW: "save-workflow",
|
|
307
|
-
SELECT_ALL: "select-all",
|
|
308
|
-
OPEN_WORKFLOW_SETTINGS: "open-workflow-settings",
|
|
309
|
-
TIDY_UP_WORKFLOW: "tidy-up-workflow",
|
|
310
|
-
RENAME_WORKFLOW: "rename-workflow",
|
|
311
|
-
ADD_TAG: "add-tag",
|
|
312
|
-
DUPLICATE_WORKFLOW: "duplicate-workflow",
|
|
313
|
-
DOWNLOAD_WORKFLOW: "download-workflow",
|
|
314
|
-
IMPORT_WORKFLOW_FROM_URL: "import-workflow-from-url",
|
|
315
|
-
IMPORT_WORKFLOW_FROM_FILE: "import-workflow-from-file",
|
|
316
|
-
ARCHIVE_WORKFLOW: "archive-workflow",
|
|
317
|
-
UNARCHIVE_WORKFLOW: "unarchive-workflow",
|
|
318
|
-
DELETE_WORKFLOW: "delete-workflow",
|
|
319
|
-
PUBLISH_WORKFLOW: "publish-workflow",
|
|
320
|
-
UNPUBLISH_WORKFLOW: "unpublish-workflow"
|
|
321
|
-
};
|
|
322
|
-
function useWorkflowCommands() {
|
|
323
|
-
const i18n = useI18n();
|
|
324
|
-
const { editableWorkflow } = useCanvasOperations();
|
|
325
|
-
const rootStore = useRootStore();
|
|
326
|
-
const uiStore = useUIStore();
|
|
327
|
-
const tagsStore = useTagsStore();
|
|
328
|
-
const workflowsStore = useWorkflowsStore();
|
|
329
|
-
const sourceControlStore = useSourceControlStore();
|
|
330
|
-
const router = useRouter();
|
|
331
|
-
const runWorkflow = useRunWorkflow({ router });
|
|
332
|
-
const workflowHelpers = useWorkflowHelpers();
|
|
333
|
-
const telemetry = useTelemetry();
|
|
334
|
-
const workflowSaving = useWorkflowSaving({ router });
|
|
335
|
-
const isReadOnly = computed(() => sourceControlStore.preferences.branchReadOnly);
|
|
336
|
-
const isWorkflowSaving = computed(() => uiStore.isActionActive.workflowSaving);
|
|
337
|
-
const isArchived = computed(() => workflowsStore.workflow.isArchived);
|
|
338
|
-
const workflowPermissions = computed(() => getResourcePermissions(workflowsStore.workflow.scopes).workflow);
|
|
339
|
-
const hasPermission = (permission) => workflowPermissions.value[permission] === true && !isReadOnly.value || !workflowsStore.isWorkflowSaved[workflowsStore.workflowId];
|
|
340
|
-
const credentialCommands = computed(() => {
|
|
341
|
-
const credentials = (0, import_uniqBy.default)(editableWorkflow.value.nodes.map((node) => Object.values(node.credentials ?? {})).flat(), (cred) => cred.id);
|
|
342
|
-
if (credentials.length === 0) return [];
|
|
343
|
-
return [{
|
|
344
|
-
id: ITEM_ID$7.OPEN_CREDENTIAL,
|
|
345
|
-
title: i18n.baseText("commandBar.workflow.openCredential"),
|
|
346
|
-
section: i18n.baseText("commandBar.sections.credentials"),
|
|
347
|
-
children: [...credentials.map((credential) => ({
|
|
348
|
-
id: credential.id,
|
|
349
|
-
title: credential.name,
|
|
350
|
-
handler: () => {
|
|
351
|
-
if (typeof credential.id === "string") uiStore.openExistingCredential(credential.id);
|
|
352
|
-
}
|
|
353
|
-
}))],
|
|
354
|
-
icon: {
|
|
355
|
-
component: N8nIcon_default,
|
|
356
|
-
props: { icon: "arrow-right" }
|
|
357
|
-
}
|
|
358
|
-
}];
|
|
359
|
-
});
|
|
360
|
-
const canvasActions = computed(() => [
|
|
361
|
-
...hasPermission("update") && !isArchived.value ? [
|
|
362
|
-
...!isWorkflowSaving.value ? [{
|
|
363
|
-
id: ITEM_ID$7.SAVE_WORKFLOW,
|
|
364
|
-
title: {
|
|
365
|
-
component: CommandBarItemTitle_default,
|
|
366
|
-
props: {
|
|
367
|
-
title: i18n.baseText("commandBar.workflow.save"),
|
|
368
|
-
shortcut: {
|
|
369
|
-
metaKey: true,
|
|
370
|
-
keys: ["s"]
|
|
371
|
-
}
|
|
372
|
-
}
|
|
373
|
-
},
|
|
374
|
-
keywords: [i18n.baseText("commandBar.workflow.save")],
|
|
375
|
-
section: i18n.baseText("commandBar.sections.workflow"),
|
|
376
|
-
handler: async () => {
|
|
377
|
-
if (await workflowSaving.saveCurrentWorkflow()) canvasEventBus.emit("saved:workflow");
|
|
378
|
-
},
|
|
379
|
-
icon: {
|
|
380
|
-
component: N8nIcon_default,
|
|
381
|
-
props: { icon: "save" }
|
|
382
|
-
}
|
|
383
|
-
}] : [],
|
|
384
|
-
{
|
|
385
|
-
id: ITEM_ID$7.PUBLISH_WORKFLOW,
|
|
386
|
-
title: i18n.baseText("commandBar.workflow.publish"),
|
|
387
|
-
section: i18n.baseText("commandBar.sections.workflow"),
|
|
388
|
-
handler: () => {
|
|
389
|
-
nodeViewEventBus.emit("publishWorkflow");
|
|
390
|
-
},
|
|
391
|
-
icon: {
|
|
392
|
-
component: N8nIcon_default,
|
|
393
|
-
props: { icon: "circle-check" }
|
|
394
|
-
}
|
|
395
|
-
},
|
|
396
|
-
{
|
|
397
|
-
id: ITEM_ID$7.UNPUBLISH_WORKFLOW,
|
|
398
|
-
title: i18n.baseText("commandBar.workflow.unpublish"),
|
|
399
|
-
section: i18n.baseText("commandBar.sections.workflow"),
|
|
400
|
-
handler: () => {
|
|
401
|
-
nodeViewEventBus.emit("unpublishWorkflow");
|
|
402
|
-
},
|
|
403
|
-
icon: {
|
|
404
|
-
component: N8nIcon_default,
|
|
405
|
-
props: { icon: "circle-minus" }
|
|
406
|
-
}
|
|
407
|
-
},
|
|
408
|
-
{
|
|
409
|
-
id: ITEM_ID$7.TEST_WORKFLOW,
|
|
410
|
-
title: {
|
|
411
|
-
component: CommandBarItemTitle_default,
|
|
412
|
-
props: {
|
|
413
|
-
title: i18n.baseText("commandBar.workflow.test"),
|
|
414
|
-
shortcut: {
|
|
415
|
-
metaKey: true,
|
|
416
|
-
keys: ["enter"]
|
|
417
|
-
}
|
|
418
|
-
}
|
|
419
|
-
},
|
|
420
|
-
section: i18n.baseText("commandBar.sections.workflow"),
|
|
421
|
-
keywords: [
|
|
422
|
-
i18n.baseText("commandBar.workflow.test"),
|
|
423
|
-
i18n.baseText("commandBar.workflow.keywords.test"),
|
|
424
|
-
i18n.baseText("commandBar.workflow.keywords.execute"),
|
|
425
|
-
i18n.baseText("commandBar.workflow.keywords.run"),
|
|
426
|
-
i18n.baseText("commandBar.workflow.keywords.workflow")
|
|
427
|
-
],
|
|
428
|
-
handler: () => {
|
|
429
|
-
runWorkflow.runEntireWorkflow("main");
|
|
430
|
-
},
|
|
431
|
-
icon: {
|
|
432
|
-
component: N8nIcon_default,
|
|
433
|
-
props: { icon: "flask-conical" }
|
|
434
|
-
}
|
|
435
|
-
},
|
|
436
|
-
{
|
|
437
|
-
id: ITEM_ID$7.TIDY_UP_WORKFLOW,
|
|
438
|
-
title: {
|
|
439
|
-
component: CommandBarItemTitle_default,
|
|
440
|
-
props: {
|
|
441
|
-
title: i18n.baseText("commandBar.workflow.tidyUp"),
|
|
442
|
-
shortcut: {
|
|
443
|
-
shiftKey: true,
|
|
444
|
-
altKey: true,
|
|
445
|
-
keys: ["t"]
|
|
446
|
-
}
|
|
447
|
-
}
|
|
448
|
-
},
|
|
449
|
-
keywords: [i18n.baseText("commandBar.workflow.tidyUp")],
|
|
450
|
-
section: i18n.baseText("commandBar.sections.workflow"),
|
|
451
|
-
handler: () => {
|
|
452
|
-
canvasEventBus.emit("tidyUp", { source: "command-bar" });
|
|
453
|
-
},
|
|
454
|
-
icon: {
|
|
455
|
-
component: N8nIcon_default,
|
|
456
|
-
props: { icon: "wand-sparkles" }
|
|
457
|
-
}
|
|
458
|
-
},
|
|
459
|
-
{
|
|
460
|
-
id: ITEM_ID$7.RENAME_WORKFLOW,
|
|
461
|
-
title: i18n.baseText("commandBar.workflow.rename"),
|
|
462
|
-
section: i18n.baseText("commandBar.sections.workflow"),
|
|
463
|
-
handler: () => {
|
|
464
|
-
nodeViewEventBus.emit("renameWorkflow");
|
|
465
|
-
},
|
|
466
|
-
icon: {
|
|
467
|
-
component: N8nIcon_default,
|
|
468
|
-
props: { icon: "pencil-alt" }
|
|
469
|
-
}
|
|
470
|
-
},
|
|
471
|
-
{
|
|
472
|
-
id: ITEM_ID$7.ADD_TAG,
|
|
473
|
-
title: i18n.baseText("workflowDetails.addTag"),
|
|
474
|
-
section: i18n.baseText("commandBar.sections.workflow"),
|
|
475
|
-
handler: () => {
|
|
476
|
-
nodeViewEventBus.emit("addTag");
|
|
477
|
-
},
|
|
478
|
-
icon: {
|
|
479
|
-
component: N8nIcon_default,
|
|
480
|
-
props: { icon: "tags" }
|
|
481
|
-
}
|
|
482
|
-
}
|
|
483
|
-
] : [],
|
|
484
|
-
{
|
|
485
|
-
id: ITEM_ID$7.SELECT_ALL,
|
|
486
|
-
title: {
|
|
487
|
-
component: CommandBarItemTitle_default,
|
|
488
|
-
props: {
|
|
489
|
-
title: i18n.baseText("commandBar.workflow.selectAll"),
|
|
490
|
-
shortcut: {
|
|
491
|
-
metaKey: true,
|
|
492
|
-
keys: ["a"]
|
|
493
|
-
}
|
|
494
|
-
}
|
|
495
|
-
},
|
|
496
|
-
section: i18n.baseText("commandBar.sections.workflow"),
|
|
497
|
-
keywords: [i18n.baseText("commandBar.workflow.selectAll")],
|
|
498
|
-
handler: () => {
|
|
499
|
-
canvasEventBus.emit("nodes:selectAll");
|
|
500
|
-
},
|
|
501
|
-
icon: {
|
|
502
|
-
component: N8nIcon_default,
|
|
503
|
-
props: { icon: "list-checks" }
|
|
504
|
-
}
|
|
505
|
-
},
|
|
506
|
-
{
|
|
507
|
-
id: ITEM_ID$7.OPEN_WORKFLOW_SETTINGS,
|
|
508
|
-
title: i18n.baseText("commandBar.workflow.openSettings"),
|
|
509
|
-
section: i18n.baseText("commandBar.sections.workflow"),
|
|
510
|
-
handler: () => {
|
|
511
|
-
uiStore.openModal(WORKFLOW_SETTINGS_MODAL_KEY);
|
|
512
|
-
},
|
|
513
|
-
icon: {
|
|
514
|
-
component: N8nIcon_default,
|
|
515
|
-
props: { icon: "cog" }
|
|
516
|
-
}
|
|
517
|
-
},
|
|
518
|
-
...hasPermission("create") ? [{
|
|
519
|
-
id: ITEM_ID$7.DUPLICATE_WORKFLOW,
|
|
520
|
-
title: i18n.baseText("commandBar.workflow.duplicate"),
|
|
521
|
-
section: i18n.baseText("commandBar.sections.workflow"),
|
|
522
|
-
handler: () => {
|
|
523
|
-
uiStore.openModalWithData({
|
|
524
|
-
name: DUPLICATE_MODAL_KEY,
|
|
525
|
-
data: {
|
|
526
|
-
id: workflowsStore.workflowId,
|
|
527
|
-
name: editableWorkflow.value.name,
|
|
528
|
-
tags: editableWorkflow.value.tags
|
|
529
|
-
}
|
|
530
|
-
});
|
|
531
|
-
},
|
|
532
|
-
icon: {
|
|
533
|
-
component: N8nIcon_default,
|
|
534
|
-
props: { icon: "copy" }
|
|
535
|
-
}
|
|
536
|
-
}] : []
|
|
537
|
-
]);
|
|
538
|
-
const subworkflowCommands = computed(() => {
|
|
539
|
-
const subworkflows = editableWorkflow.value.nodes.filter((node) => node.type === EXECUTE_WORKFLOW_NODE_TYPE).map((node) => node?.parameters?.workflowId).filter((rlValue) => isResourceLocatorValue(rlValue) && typeof rlValue.value === "string" && typeof rlValue.cachedResultName === "string").map(({ value, cachedResultName }) => ({
|
|
540
|
-
id: value,
|
|
541
|
-
name: cachedResultName
|
|
542
|
-
}));
|
|
543
|
-
if (subworkflows.length === 0) return [];
|
|
544
|
-
return [{
|
|
545
|
-
id: ITEM_ID$7.OPEN_SUB_WORKFLOW,
|
|
546
|
-
title: i18n.baseText("commandBar.workflow.openSubworkflow"),
|
|
547
|
-
section: i18n.baseText("commandBar.sections.workflow"),
|
|
548
|
-
children: [...subworkflows.map((workflow) => ({
|
|
549
|
-
id: workflow.id,
|
|
550
|
-
title: workflow.name,
|
|
551
|
-
handler: () => {
|
|
552
|
-
const { href } = router.resolve({
|
|
553
|
-
name: VIEWS.WORKFLOW,
|
|
554
|
-
params: { name: workflow.id }
|
|
555
|
-
});
|
|
556
|
-
window.open(href, "_blank", "noreferrer");
|
|
557
|
-
}
|
|
558
|
-
}))],
|
|
559
|
-
icon: {
|
|
560
|
-
component: N8nIcon_default,
|
|
561
|
-
props: { icon: "sign-in-alt" }
|
|
562
|
-
}
|
|
563
|
-
}];
|
|
564
|
-
});
|
|
565
|
-
const exportCommands = computed(() => {
|
|
566
|
-
return [{
|
|
567
|
-
id: ITEM_ID$7.DOWNLOAD_WORKFLOW,
|
|
568
|
-
title: i18n.baseText("commandBar.workflow.download"),
|
|
569
|
-
section: i18n.baseText("commandBar.sections.workflow"),
|
|
570
|
-
handler: async () => {
|
|
571
|
-
const workflowData = await workflowHelpers.getWorkflowDataToSave();
|
|
572
|
-
const { tags,...data } = workflowData;
|
|
573
|
-
const exportData = {
|
|
574
|
-
...data,
|
|
575
|
-
meta: {
|
|
576
|
-
...workflowData.meta,
|
|
577
|
-
instanceId: rootStore.instanceId
|
|
578
|
-
},
|
|
579
|
-
tags: (tags ?? []).map((tagId) => {
|
|
580
|
-
return tagsStore.tagsById[tagId];
|
|
581
|
-
})
|
|
582
|
-
};
|
|
583
|
-
const blob = new Blob([JSON.stringify(exportData, null, 2)], { type: "application/json;charset=utf-8" });
|
|
584
|
-
let name = editableWorkflow.value.name || "unsaved_workflow";
|
|
585
|
-
name = name.replace(/[^a-z0-9]/gi, "_");
|
|
586
|
-
telemetry.track("User exported workflow", { workflow_id: workflowData.id });
|
|
587
|
-
(0, import_FileSaver_min.saveAs)(blob, name + ".json");
|
|
588
|
-
},
|
|
589
|
-
icon: {
|
|
590
|
-
component: N8nIcon_default,
|
|
591
|
-
props: { icon: "download" }
|
|
592
|
-
},
|
|
593
|
-
keywords: [i18n.baseText("commandBar.workflow.keywords.download"), i18n.baseText("commandBar.workflow.keywords.export")]
|
|
594
|
-
}];
|
|
595
|
-
});
|
|
596
|
-
const importCommands = computed(() => {
|
|
597
|
-
return [{
|
|
598
|
-
id: ITEM_ID$7.IMPORT_WORKFLOW_FROM_URL,
|
|
599
|
-
title: i18n.baseText("commandBar.workflow.importFromURL"),
|
|
600
|
-
section: i18n.baseText("commandBar.sections.workflow"),
|
|
601
|
-
icon: {
|
|
602
|
-
component: N8nIcon_default,
|
|
603
|
-
props: { icon: "link" }
|
|
604
|
-
},
|
|
605
|
-
handler: () => {
|
|
606
|
-
uiStore.openModal(IMPORT_WORKFLOW_URL_MODAL_KEY);
|
|
607
|
-
}
|
|
608
|
-
}, {
|
|
609
|
-
id: ITEM_ID$7.IMPORT_WORKFLOW_FROM_FILE,
|
|
610
|
-
title: i18n.baseText("commandBar.workflow.importFromFile"),
|
|
611
|
-
section: i18n.baseText("commandBar.sections.workflow"),
|
|
612
|
-
icon: {
|
|
613
|
-
component: N8nIcon_default,
|
|
614
|
-
props: { icon: "file-import" }
|
|
615
|
-
},
|
|
616
|
-
handler: () => {
|
|
617
|
-
nodeViewEventBus.emit("importWorkflowFromFile");
|
|
618
|
-
}
|
|
619
|
-
}];
|
|
620
|
-
});
|
|
621
|
-
const lifecycleCommands = computed(() => {
|
|
622
|
-
if (!hasPermission("delete")) return [];
|
|
623
|
-
return !isArchived.value ? [{
|
|
624
|
-
id: ITEM_ID$7.ARCHIVE_WORKFLOW,
|
|
625
|
-
title: i18n.baseText("commandBar.workflow.archive"),
|
|
626
|
-
section: i18n.baseText("commandBar.sections.workflow"),
|
|
627
|
-
keywords: [i18n.baseText("commandBar.workflow.keywords.delete")],
|
|
628
|
-
icon: {
|
|
629
|
-
component: N8nIcon_default,
|
|
630
|
-
props: { icon: "trash" }
|
|
631
|
-
},
|
|
632
|
-
handler: () => {
|
|
633
|
-
nodeViewEventBus.emit("archiveWorkflow");
|
|
634
|
-
}
|
|
635
|
-
}] : [{
|
|
636
|
-
id: ITEM_ID$7.UNARCHIVE_WORKFLOW,
|
|
637
|
-
title: i18n.baseText("commandBar.workflow.unarchive"),
|
|
638
|
-
section: i18n.baseText("commandBar.sections.workflow"),
|
|
639
|
-
keywords: [i18n.baseText("commandBar.workflow.keywords.restore")],
|
|
640
|
-
icon: {
|
|
641
|
-
component: N8nIcon_default,
|
|
642
|
-
props: { icon: "archive-restore" }
|
|
643
|
-
},
|
|
644
|
-
handler: () => {
|
|
645
|
-
nodeViewEventBus.emit("unarchiveWorkflow");
|
|
646
|
-
}
|
|
647
|
-
}, {
|
|
648
|
-
id: ITEM_ID$7.DELETE_WORKFLOW,
|
|
649
|
-
title: i18n.baseText("commandBar.workflow.delete"),
|
|
650
|
-
section: i18n.baseText("commandBar.sections.workflow"),
|
|
651
|
-
icon: {
|
|
652
|
-
component: N8nIcon_default,
|
|
653
|
-
props: { icon: "trash" }
|
|
654
|
-
},
|
|
655
|
-
handler: () => {
|
|
656
|
-
nodeViewEventBus.emit("deleteWorkflow");
|
|
657
|
-
}
|
|
658
|
-
}];
|
|
659
|
-
});
|
|
660
|
-
const workflowCommands = computed(() => {
|
|
661
|
-
return [
|
|
662
|
-
...canvasActions.value,
|
|
663
|
-
...subworkflowCommands.value,
|
|
664
|
-
...exportCommands.value,
|
|
665
|
-
...importCommands.value,
|
|
666
|
-
...lifecycleCommands.value
|
|
667
|
-
];
|
|
668
|
-
});
|
|
669
|
-
return { commands: computed(() => [...workflowCommands.value, ...credentialCommands.value]) };
|
|
670
|
-
}
|
|
671
|
-
var import_debounce$2 = /* @__PURE__ */ __toESM(require_debounce());
|
|
672
|
-
var ITEM_ID$6 = {
|
|
673
|
-
CREATE_WORKFLOW: "create-workflow",
|
|
674
|
-
OPEN_WORKFLOW: "open-workflow"
|
|
675
|
-
};
|
|
676
|
-
function useWorkflowNavigationCommands(options) {
|
|
677
|
-
const i18n = useI18n();
|
|
678
|
-
const { lastQuery, activeNodeId, currentProjectName } = options;
|
|
679
|
-
const nodeTypesStore = useNodeTypesStore();
|
|
680
|
-
const credentialsStore = useCredentialsStore();
|
|
681
|
-
const workflowsStore = useWorkflowsStore();
|
|
682
|
-
const projectsStore = useProjectsStore();
|
|
683
|
-
const tagsStore = useTagsStore();
|
|
684
|
-
const sourceControlStore = useSourceControlStore();
|
|
685
|
-
const foldersStore = useFoldersStore();
|
|
686
|
-
const router = useRouter();
|
|
687
|
-
const route = useRoute();
|
|
688
|
-
const { generateMergedNodesAndActions } = useActionsGenerator();
|
|
689
|
-
const workflowResults = ref([]);
|
|
690
|
-
const workflowKeywords = ref(/* @__PURE__ */ new Map());
|
|
691
|
-
const workflowMatchedNodeTypes = ref(/* @__PURE__ */ new Map());
|
|
692
|
-
const isLoading = ref(false);
|
|
693
|
-
const homeProject = computed(() => projectsStore.currentProject ?? projectsStore.personalProject);
|
|
694
|
-
function orderResultByCurrentProjectFirst(results) {
|
|
695
|
-
return results.sort((a, b) => {
|
|
696
|
-
if (a.homeProject?.id === projectsStore.currentProjectId) return -1;
|
|
697
|
-
if (b.homeProject?.id === projectsStore.currentProjectId) return 1;
|
|
698
|
-
return 0;
|
|
699
|
-
});
|
|
700
|
-
}
|
|
701
|
-
const fetchWorkflowsImpl = async (query) => {
|
|
702
|
-
try {
|
|
703
|
-
const trimmed = (query || "").trim();
|
|
704
|
-
const trimmedLower = trimmed.toLowerCase();
|
|
705
|
-
const httpOnlyCredentials = credentialsStore.httpOnlyCredentialTypes;
|
|
706
|
-
const visibleNodeTypes = nodeTypesStore.allNodeTypes;
|
|
707
|
-
const { mergedNodes } = generateMergedNodesAndActions(visibleNodeTypes, httpOnlyCredentials);
|
|
708
|
-
const matchedNodes = mergedNodes.filter((node) => node.displayName?.toLowerCase() === trimmedLower);
|
|
709
|
-
const matchedNodeTypeNames = Array.from(new Set(matchedNodes.map((node) => node.name)));
|
|
710
|
-
const matchedTag = tagsStore.allTags.find((tag) => tag.name.toLowerCase() === trimmedLower);
|
|
711
|
-
const nameSearchPromise = workflowsStore.searchWorkflows({
|
|
712
|
-
query: trimmed,
|
|
713
|
-
select: [
|
|
714
|
-
"id",
|
|
715
|
-
"name",
|
|
716
|
-
"active",
|
|
717
|
-
"ownedBy",
|
|
718
|
-
"parentFolder",
|
|
719
|
-
"isArchived",
|
|
720
|
-
"description"
|
|
721
|
-
]
|
|
722
|
-
});
|
|
723
|
-
const nodeTypeSearchPromise = matchedNodeTypeNames.length > 0 ? workflowsStore.searchWorkflows({
|
|
724
|
-
nodeTypes: matchedNodeTypeNames,
|
|
725
|
-
select: [
|
|
726
|
-
"id",
|
|
727
|
-
"name",
|
|
728
|
-
"active",
|
|
729
|
-
"nodes",
|
|
730
|
-
"ownedBy",
|
|
731
|
-
"parentFolder",
|
|
732
|
-
"isArchived",
|
|
733
|
-
"description"
|
|
734
|
-
]
|
|
735
|
-
}) : Promise.resolve([]);
|
|
736
|
-
const tagSearchPromise = matchedTag ? workflowsStore.searchWorkflows({
|
|
737
|
-
tags: [matchedTag.name],
|
|
738
|
-
select: [
|
|
739
|
-
"id",
|
|
740
|
-
"name",
|
|
741
|
-
"active",
|
|
742
|
-
"ownedBy",
|
|
743
|
-
"tags",
|
|
744
|
-
"parentFolder",
|
|
745
|
-
"isArchived",
|
|
746
|
-
"description"
|
|
747
|
-
]
|
|
748
|
-
}) : Promise.resolve([]);
|
|
749
|
-
const [byName, byNodeTypes, byTags] = await Promise.all([
|
|
750
|
-
nameSearchPromise,
|
|
751
|
-
nodeTypeSearchPromise,
|
|
752
|
-
tagSearchPromise
|
|
753
|
-
]);
|
|
754
|
-
const keywordsMap = /* @__PURE__ */ new Map();
|
|
755
|
-
const nodeTypesMap = /* @__PURE__ */ new Map();
|
|
756
|
-
const matchedNodeDisplayNames = new Map(matchedNodes.map((node) => [node.name, node.displayName]));
|
|
757
|
-
byNodeTypes.forEach((workflow) => {
|
|
758
|
-
if (!workflow.nodes) return;
|
|
759
|
-
const matchedWorkflowNodes = workflow.nodes.filter((node) => matchedNodeTypeNames.includes(node.type));
|
|
760
|
-
if (matchedWorkflowNodes.length === 0) return;
|
|
761
|
-
nodeTypesMap.set(workflow.id, matchedWorkflowNodes[0].type);
|
|
762
|
-
const matchedDisplayNames = matchedWorkflowNodes.map((node) => matchedNodeDisplayNames.get(node.type)).filter((name) => !!name);
|
|
763
|
-
if (matchedDisplayNames.length > 0) keywordsMap.set(workflow.id, matchedDisplayNames);
|
|
764
|
-
});
|
|
765
|
-
workflowKeywords.value = keywordsMap;
|
|
766
|
-
workflowMatchedNodeTypes.value = nodeTypesMap;
|
|
767
|
-
const merged = [
|
|
768
|
-
...byName,
|
|
769
|
-
...byNodeTypes,
|
|
770
|
-
...byTags
|
|
771
|
-
];
|
|
772
|
-
const nonArchivedWorkflows = Array.from(new Map(merged.map((w) => [w.id, w])).values()).filter((w) => !w.isArchived);
|
|
773
|
-
workflowResults.value = orderResultByCurrentProjectFirst(nonArchivedWorkflows);
|
|
774
|
-
const parentFolders = nonArchivedWorkflows.map((w) => w.parentFolder).filter((pf) => pf !== void 0 && pf !== null);
|
|
775
|
-
if (parentFolders.length > 0) foldersStore.cacheFolders(parentFolders.map((pf) => ({
|
|
776
|
-
id: pf.id,
|
|
777
|
-
name: pf.name,
|
|
778
|
-
parentFolder: void 0
|
|
779
|
-
})));
|
|
780
|
-
} catch {
|
|
781
|
-
workflowResults.value = [];
|
|
782
|
-
workflowKeywords.value.clear();
|
|
783
|
-
workflowMatchedNodeTypes.value.clear();
|
|
784
|
-
} finally {
|
|
785
|
-
isLoading.value = false;
|
|
786
|
-
}
|
|
787
|
-
};
|
|
788
|
-
const fetchWorkflowsDebounced = (0, import_debounce$2.default)(fetchWorkflowsImpl, 300);
|
|
789
|
-
const buildFolderPath = (folderId) => {
|
|
790
|
-
const path = [];
|
|
791
|
-
let currentFolderId = folderId;
|
|
792
|
-
while (currentFolderId) {
|
|
793
|
-
const folder = foldersStore.getCachedFolder(currentFolderId);
|
|
794
|
-
if (!folder) break;
|
|
795
|
-
path.unshift(folder.name);
|
|
796
|
-
currentFolderId = folder.parentFolder;
|
|
797
|
-
}
|
|
798
|
-
return path;
|
|
799
|
-
};
|
|
800
|
-
const getProjectIcon = (workflow) => {
|
|
801
|
-
if (workflow.homeProject?.type === ProjectTypes.Personal) return {
|
|
802
|
-
type: "icon",
|
|
803
|
-
value: "user"
|
|
804
|
-
};
|
|
805
|
-
if (workflow.homeProject?.name) return isIconOrEmoji(workflow.homeProject.icon) ? workflow.homeProject.icon : {
|
|
806
|
-
type: "icon",
|
|
807
|
-
value: "layers"
|
|
808
|
-
};
|
|
809
|
-
return {
|
|
810
|
-
type: "icon",
|
|
811
|
-
value: "house"
|
|
812
|
-
};
|
|
813
|
-
};
|
|
814
|
-
const getWorkflowProjectSuffix = (workflow) => {
|
|
815
|
-
const parts = [];
|
|
816
|
-
if (workflow.homeProject && workflow.homeProject.type === ProjectTypes.Personal) parts.push(i18n.baseText("projects.menu.personal"));
|
|
817
|
-
else if (workflow.homeProject?.name) parts.push(workflow.homeProject.name);
|
|
818
|
-
if (workflow.parentFolder?.id) {
|
|
819
|
-
const folderPath = buildFolderPath(workflow.parentFolder.id);
|
|
820
|
-
if (folderPath.length > 2) parts.push(folderPath[0], "...", folderPath[folderPath.length - 1]);
|
|
821
|
-
else parts.push(...folderPath);
|
|
822
|
-
}
|
|
823
|
-
return parts.join(" / ");
|
|
824
|
-
};
|
|
825
|
-
const openWorkflowCommand = (workflow, isRoot) => {
|
|
826
|
-
let keywords = workflowKeywords.value.get(workflow.id) ?? [];
|
|
827
|
-
const matchedNodeType = workflowMatchedNodeTypes.value.get(workflow.id);
|
|
828
|
-
let icon;
|
|
829
|
-
if (matchedNodeType) {
|
|
830
|
-
const nodeType = nodeTypesStore.getNodeType(matchedNodeType);
|
|
831
|
-
if (nodeType) icon = {
|
|
832
|
-
component: NodeIcon_default,
|
|
833
|
-
props: {
|
|
834
|
-
nodeType,
|
|
835
|
-
size: 24
|
|
836
|
-
}
|
|
837
|
-
};
|
|
838
|
-
}
|
|
839
|
-
const workflowName = workflow.name;
|
|
840
|
-
keywords = [...keywords, workflowName];
|
|
841
|
-
if (workflow.description) keywords = [...keywords, workflow.description];
|
|
842
|
-
if (workflow.tags && workflow.tags.length > 0) keywords = [...keywords, ...workflow.tags.map((tag) => typeof tag === "string" ? tag : tag.name)];
|
|
843
|
-
const suffix$1 = getWorkflowProjectSuffix(workflow);
|
|
844
|
-
const name = workflow.name || i18n.baseText("commandBar.workflows.unnamed");
|
|
845
|
-
const title$1 = isRoot ? i18n.baseText("generic.openResource", { interpolate: { resource: name } }) : name;
|
|
846
|
-
const section = isRoot ? i18n.baseText("commandBar.sections.workflows") : i18n.baseText("commandBar.workflows.open");
|
|
847
|
-
return {
|
|
848
|
-
id: workflow.id,
|
|
849
|
-
matchAnySearchTerm: !isRoot,
|
|
850
|
-
title: {
|
|
851
|
-
component: CommandBarItemTitle_default,
|
|
852
|
-
props: {
|
|
853
|
-
title: title$1,
|
|
854
|
-
suffix: suffix$1,
|
|
855
|
-
...suffix$1 ? { suffixIcon: getProjectIcon(workflow) } : {}
|
|
856
|
-
}
|
|
857
|
-
},
|
|
858
|
-
section,
|
|
859
|
-
...keywords.length > 0 ? { keywords } : {},
|
|
860
|
-
...icon ? { icon } : {},
|
|
861
|
-
handler: () => {
|
|
862
|
-
const targetRoute = router.resolve({
|
|
863
|
-
name: VIEWS.WORKFLOW,
|
|
864
|
-
params: { name: workflow.id }
|
|
865
|
-
});
|
|
866
|
-
window.location.href = targetRoute.fullPath;
|
|
867
|
-
}
|
|
868
|
-
};
|
|
869
|
-
};
|
|
870
|
-
const openWorkflowCommands = computed(() => {
|
|
871
|
-
return workflowResults.value.map((workflow) => openWorkflowCommand(workflow, false));
|
|
872
|
-
});
|
|
873
|
-
const rootWorkflowItems = computed(() => {
|
|
874
|
-
if (lastQuery.value.length <= 2 || !workflowsStore.canViewWorkflows) return [];
|
|
875
|
-
return workflowResults.value.map((workflow) => openWorkflowCommand(workflow, true));
|
|
876
|
-
});
|
|
877
|
-
const workflowNavigationCommands = computed(() => {
|
|
878
|
-
const hasCreatePermission = !sourceControlStore.preferences.branchReadOnly && getResourcePermissions(homeProject.value?.scopes).workflow.create;
|
|
879
|
-
const newWorkflowCommand = {
|
|
880
|
-
id: ITEM_ID$6.CREATE_WORKFLOW,
|
|
881
|
-
title: i18n.baseText("commandBar.workflows.create", { interpolate: { projectName: currentProjectName.value } }),
|
|
882
|
-
keywords: [i18n.baseText("workflows.add")],
|
|
883
|
-
section: i18n.baseText("commandBar.sections.workflows"),
|
|
884
|
-
icon: {
|
|
885
|
-
component: N8nIcon_default,
|
|
886
|
-
props: {
|
|
887
|
-
icon: "plus",
|
|
888
|
-
color: "text-light"
|
|
889
|
-
}
|
|
890
|
-
},
|
|
891
|
-
handler: () => {
|
|
892
|
-
const targetRoute = router.resolve({
|
|
893
|
-
name: VIEWS.NEW_WORKFLOW,
|
|
894
|
-
query: {
|
|
895
|
-
projectId: projectsStore.currentProjectId,
|
|
896
|
-
parentFolderId: route.params.folderId
|
|
897
|
-
}
|
|
898
|
-
});
|
|
899
|
-
window.location.href = targetRoute.fullPath;
|
|
900
|
-
}
|
|
901
|
-
};
|
|
902
|
-
return [
|
|
903
|
-
...hasCreatePermission ? [newWorkflowCommand] : [],
|
|
904
|
-
...workflowsStore.canViewWorkflows ? [{
|
|
905
|
-
id: ITEM_ID$6.OPEN_WORKFLOW,
|
|
906
|
-
title: i18n.baseText("commandBar.workflows.open"),
|
|
907
|
-
section: i18n.baseText("commandBar.sections.workflows"),
|
|
908
|
-
placeholder: i18n.baseText("commandBar.workflows.searchPlaceholder"),
|
|
909
|
-
children: openWorkflowCommands.value,
|
|
910
|
-
icon: {
|
|
911
|
-
component: N8nIcon_default,
|
|
912
|
-
props: {
|
|
913
|
-
icon: "arrow-right",
|
|
914
|
-
color: "text-light"
|
|
915
|
-
}
|
|
916
|
-
}
|
|
917
|
-
}] : [],
|
|
918
|
-
...rootWorkflowItems.value
|
|
919
|
-
];
|
|
920
|
-
});
|
|
921
|
-
function onCommandBarChange(query) {
|
|
922
|
-
const trimmed = query.trim();
|
|
923
|
-
const isInWorkflowParent = activeNodeId.value === ITEM_ID$6.OPEN_WORKFLOW;
|
|
924
|
-
const isRootWithQuery = activeNodeId.value === null && trimmed.length > 2;
|
|
925
|
-
if (isInWorkflowParent || isRootWithQuery) {
|
|
926
|
-
isLoading.value = isInWorkflowParent;
|
|
927
|
-
fetchWorkflowsDebounced(trimmed);
|
|
928
|
-
}
|
|
929
|
-
}
|
|
930
|
-
function onCommandBarNavigateTo(to) {
|
|
931
|
-
activeNodeId.value = to;
|
|
932
|
-
if (to === ITEM_ID$6.OPEN_WORKFLOW) {
|
|
933
|
-
isLoading.value = true;
|
|
934
|
-
fetchWorkflowsImpl("");
|
|
935
|
-
} else if (to === null) {
|
|
936
|
-
workflowResults.value = [];
|
|
937
|
-
workflowKeywords.value.clear();
|
|
938
|
-
workflowMatchedNodeTypes.value.clear();
|
|
939
|
-
}
|
|
940
|
-
}
|
|
941
|
-
async function initialize() {
|
|
942
|
-
await tagsStore.fetchAll();
|
|
943
|
-
}
|
|
944
|
-
return {
|
|
945
|
-
commands: workflowNavigationCommands,
|
|
946
|
-
handlers: {
|
|
947
|
-
onCommandBarChange,
|
|
948
|
-
onCommandBarNavigateTo
|
|
949
|
-
},
|
|
950
|
-
isLoading,
|
|
951
|
-
initialize
|
|
952
|
-
};
|
|
953
|
-
}
|
|
954
|
-
var import_debounce$1 = /* @__PURE__ */ __toESM(require_debounce());
|
|
955
|
-
var ITEM_ID$5 = {
|
|
956
|
-
OPEN_DATA_TABLE: "open-data-table",
|
|
957
|
-
CREATE_DATA_TABLE: "create-data-table"
|
|
958
|
-
};
|
|
959
|
-
function useDataTableNavigationCommands(options) {
|
|
960
|
-
const i18n = useI18n();
|
|
961
|
-
const { lastQuery, activeNodeId, currentProjectName } = options;
|
|
962
|
-
const dataTableStore = useDataTableStore();
|
|
963
|
-
const projectsStore = useProjectsStore();
|
|
964
|
-
const sourceControlStore = useSourceControlStore();
|
|
965
|
-
const router = useRouter();
|
|
966
|
-
const route = useRoute();
|
|
967
|
-
const dataTableResults = ref([]);
|
|
968
|
-
const isLoading = ref(false);
|
|
969
|
-
const hasDataFetched = ref(false);
|
|
970
|
-
const currentProjectId = computed(() => {
|
|
971
|
-
return typeof route.params.projectId === "string" ? route.params.projectId : personalProjectId.value;
|
|
972
|
-
});
|
|
973
|
-
const homeProject = computed(() => projectsStore.currentProject ?? projectsStore.personalProject);
|
|
974
|
-
const personalProjectId = computed(() => {
|
|
975
|
-
return projectsStore.myProjects.find((p) => p.type === "personal")?.id;
|
|
976
|
-
});
|
|
977
|
-
function orderResultByCurrentProjectFirst(results) {
|
|
978
|
-
return results.sort((a, b) => {
|
|
979
|
-
if (a.project?.id === currentProjectId.value) return -1;
|
|
980
|
-
if (b.project?.id === currentProjectId.value) return 1;
|
|
981
|
-
return 0;
|
|
982
|
-
});
|
|
983
|
-
}
|
|
984
|
-
const fetchDataTablesImpl = async (query) => {
|
|
985
|
-
try {
|
|
986
|
-
const trimmed = (query || "").trim();
|
|
987
|
-
if (!hasDataFetched.value) {
|
|
988
|
-
await dataTableStore.fetchDataTables("", 1, 1e3);
|
|
989
|
-
hasDataFetched.value = true;
|
|
990
|
-
}
|
|
991
|
-
const trimmedLower = trimmed.toLowerCase();
|
|
992
|
-
dataTableResults.value = orderResultByCurrentProjectFirst(dataTableStore.dataTables.filter((dataTable) => dataTable.name.toLowerCase().includes(trimmedLower)));
|
|
993
|
-
} catch {
|
|
994
|
-
dataTableResults.value = [];
|
|
995
|
-
} finally {
|
|
996
|
-
isLoading.value = false;
|
|
997
|
-
}
|
|
998
|
-
};
|
|
999
|
-
const fetchDataTablesDebounced = (0, import_debounce$1.default)(fetchDataTablesImpl, 300);
|
|
1000
|
-
const getDataTableProjectSuffix = (dataTable) => {
|
|
1001
|
-
if (dataTable.project && dataTable.project.type === "personal") return i18n.baseText("projects.menu.personal");
|
|
1002
|
-
return dataTable.project?.name ?? "";
|
|
1003
|
-
};
|
|
1004
|
-
const createDataTableCommand = (dataTable, isRoot) => {
|
|
1005
|
-
const keywords = [dataTable.name];
|
|
1006
|
-
const title$1 = isRoot ? i18n.baseText("generic.openResource", { interpolate: { resource: dataTable.name } }) : dataTable.name;
|
|
1007
|
-
const section = isRoot ? i18n.baseText("commandBar.sections.dataTables") : i18n.baseText("commandBar.dataTables.open");
|
|
1008
|
-
return {
|
|
1009
|
-
id: dataTable.id,
|
|
1010
|
-
title: {
|
|
1011
|
-
component: CommandBarItemTitle_default,
|
|
1012
|
-
props: {
|
|
1013
|
-
title: title$1,
|
|
1014
|
-
suffix: getDataTableProjectSuffix(dataTable)
|
|
1015
|
-
}
|
|
1016
|
-
},
|
|
1017
|
-
section,
|
|
1018
|
-
keywords,
|
|
1019
|
-
handler: () => {
|
|
1020
|
-
router.push({
|
|
1021
|
-
name: DATA_TABLE_DETAILS,
|
|
1022
|
-
params: {
|
|
1023
|
-
projectId: dataTable.projectId,
|
|
1024
|
-
id: dataTable.id
|
|
1025
|
-
}
|
|
1026
|
-
});
|
|
1027
|
-
}
|
|
1028
|
-
};
|
|
1029
|
-
};
|
|
1030
|
-
const openDataTableCommands = computed(() => {
|
|
1031
|
-
return dataTableResults.value.map((dataTable) => createDataTableCommand(dataTable, false));
|
|
1032
|
-
});
|
|
1033
|
-
const rootDataTableItems = computed(() => {
|
|
1034
|
-
if (lastQuery.value.length <= 2 || !dataTableStore.canViewDataTables) return [];
|
|
1035
|
-
return dataTableResults.value.map((dataTable) => createDataTableCommand(dataTable, true));
|
|
1036
|
-
});
|
|
1037
|
-
const dataTableNavigationCommands = computed(() => {
|
|
1038
|
-
const hasCreatePermission = !sourceControlStore.preferences.branchReadOnly && getResourcePermissions(homeProject.value?.scopes).dataTable.create;
|
|
1039
|
-
const newDataTableCommand = {
|
|
1040
|
-
id: ITEM_ID$5.CREATE_DATA_TABLE,
|
|
1041
|
-
title: i18n.baseText("commandBar.dataTables.create", { interpolate: { projectName: currentProjectName.value } }),
|
|
1042
|
-
section: i18n.baseText("commandBar.sections.dataTables"),
|
|
1043
|
-
icon: {
|
|
1044
|
-
component: N8nIcon_default,
|
|
1045
|
-
props: {
|
|
1046
|
-
icon: "table",
|
|
1047
|
-
color: "text-light"
|
|
1048
|
-
}
|
|
1049
|
-
},
|
|
1050
|
-
handler: () => {
|
|
1051
|
-
if (!currentProjectId.value) return;
|
|
1052
|
-
router.push({
|
|
1053
|
-
name: PROJECT_DATA_TABLES,
|
|
1054
|
-
params: {
|
|
1055
|
-
projectId: currentProjectId.value,
|
|
1056
|
-
new: "new"
|
|
1057
|
-
}
|
|
1058
|
-
});
|
|
1059
|
-
}
|
|
1060
|
-
};
|
|
1061
|
-
return [
|
|
1062
|
-
...hasCreatePermission ? [newDataTableCommand] : [],
|
|
1063
|
-
...dataTableStore.canViewDataTables ? [{
|
|
1064
|
-
id: ITEM_ID$5.OPEN_DATA_TABLE,
|
|
1065
|
-
title: i18n.baseText("commandBar.dataTables.open"),
|
|
1066
|
-
section: i18n.baseText("commandBar.sections.dataTables"),
|
|
1067
|
-
placeholder: i18n.baseText("commandBar.dataTables.searchPlaceholder"),
|
|
1068
|
-
icon: {
|
|
1069
|
-
component: N8nIcon_default,
|
|
1070
|
-
props: {
|
|
1071
|
-
icon: "table",
|
|
1072
|
-
color: "text-light"
|
|
1073
|
-
}
|
|
1074
|
-
},
|
|
1075
|
-
children: openDataTableCommands.value
|
|
1076
|
-
}] : [],
|
|
1077
|
-
...rootDataTableItems.value
|
|
1078
|
-
];
|
|
1079
|
-
});
|
|
1080
|
-
function onCommandBarChange(query) {
|
|
1081
|
-
if (!dataTableStore.canViewDataTables) return;
|
|
1082
|
-
const trimmed = query.trim();
|
|
1083
|
-
const isInDataTableParent = activeNodeId.value === ITEM_ID$5.OPEN_DATA_TABLE;
|
|
1084
|
-
const isRootWithQuery = activeNodeId.value === null && trimmed.length > 2;
|
|
1085
|
-
if (isInDataTableParent || isRootWithQuery) {
|
|
1086
|
-
isLoading.value = isInDataTableParent;
|
|
1087
|
-
fetchDataTablesDebounced(trimmed);
|
|
1088
|
-
}
|
|
1089
|
-
}
|
|
1090
|
-
function onCommandBarNavigateTo(to) {
|
|
1091
|
-
activeNodeId.value = to;
|
|
1092
|
-
if (to === ITEM_ID$5.OPEN_DATA_TABLE) {
|
|
1093
|
-
isLoading.value = true;
|
|
1094
|
-
fetchDataTablesImpl("");
|
|
1095
|
-
} else if (to === null) {
|
|
1096
|
-
dataTableResults.value = [];
|
|
1097
|
-
hasDataFetched.value = false;
|
|
1098
|
-
}
|
|
1099
|
-
}
|
|
1100
|
-
return {
|
|
1101
|
-
commands: dataTableNavigationCommands,
|
|
1102
|
-
handlers: {
|
|
1103
|
-
onCommandBarChange,
|
|
1104
|
-
onCommandBarNavigateTo
|
|
1105
|
-
},
|
|
1106
|
-
isLoading
|
|
1107
|
-
};
|
|
1108
|
-
}
|
|
1109
|
-
var import_debounce = /* @__PURE__ */ __toESM(require_debounce());
|
|
1110
|
-
var ITEM_ID$4 = {
|
|
1111
|
-
CREATE_CREDENTIAL: "create-credential",
|
|
1112
|
-
OPEN_CREDENTIAL: "open-credential"
|
|
1113
|
-
};
|
|
1114
|
-
function useCredentialNavigationCommands(options) {
|
|
1115
|
-
const i18n = useI18n();
|
|
1116
|
-
const { lastQuery, activeNodeId, currentProjectName } = options;
|
|
1117
|
-
const credentialsStore = useCredentialsStore();
|
|
1118
|
-
const projectsStore = useProjectsStore();
|
|
1119
|
-
const uiStore = useUIStore();
|
|
1120
|
-
const sourceControlStore = useSourceControlStore();
|
|
1121
|
-
const route = useRoute();
|
|
1122
|
-
const router = useRouter();
|
|
1123
|
-
const credentialResults = ref([]);
|
|
1124
|
-
const isLoading = ref(false);
|
|
1125
|
-
const personalProjectId = computed(() => {
|
|
1126
|
-
return projectsStore.myProjects.find((p) => p.type === "personal")?.id;
|
|
1127
|
-
});
|
|
1128
|
-
const homeProject = computed(() => projectsStore.currentProject ?? projectsStore.personalProject);
|
|
1129
|
-
function orderResultByCurrentProjectFirst(results) {
|
|
1130
|
-
const currentProjectId = typeof route.params.projectId === "string" ? route.params.projectId : personalProjectId.value;
|
|
1131
|
-
return results.sort((a, b) => {
|
|
1132
|
-
if (a.homeProject?.id === currentProjectId) return -1;
|
|
1133
|
-
if (b.homeProject?.id === currentProjectId) return 1;
|
|
1134
|
-
return 0;
|
|
1135
|
-
});
|
|
1136
|
-
}
|
|
1137
|
-
const fetchCredentialsImpl = async (query) => {
|
|
1138
|
-
try {
|
|
1139
|
-
const trimmed = (query || "").trim();
|
|
1140
|
-
await credentialsStore.fetchAllCredentials();
|
|
1141
|
-
const trimmedLower = trimmed.toLowerCase();
|
|
1142
|
-
credentialResults.value = orderResultByCurrentProjectFirst(credentialsStore.allCredentials.filter((credential) => credential.name.toLowerCase().includes(trimmedLower)));
|
|
1143
|
-
} catch {
|
|
1144
|
-
credentialResults.value = [];
|
|
1145
|
-
} finally {
|
|
1146
|
-
isLoading.value = false;
|
|
1147
|
-
}
|
|
1148
|
-
};
|
|
1149
|
-
const fetchCredentialsDebounced = (0, import_debounce.default)(fetchCredentialsImpl, 300);
|
|
1150
|
-
const getCredentialProjectSuffix = (credential) => {
|
|
1151
|
-
if (credential.homeProject && credential.homeProject.type === "personal") return i18n.baseText("projects.menu.personal");
|
|
1152
|
-
return credential.homeProject?.name ?? "";
|
|
1153
|
-
};
|
|
1154
|
-
const createCredentialCommand = (credential, isRoot) => {
|
|
1155
|
-
const keywords = [credential.name];
|
|
1156
|
-
const title$1 = isRoot ? i18n.baseText("generic.openResource", { interpolate: { resource: credential.name } }) : credential.name;
|
|
1157
|
-
const section = isRoot ? i18n.baseText("commandBar.sections.credentials") : i18n.baseText("commandBar.credentials.open");
|
|
1158
|
-
return {
|
|
1159
|
-
id: credential.id,
|
|
1160
|
-
title: {
|
|
1161
|
-
component: CommandBarItemTitle_default,
|
|
1162
|
-
props: {
|
|
1163
|
-
title: title$1,
|
|
1164
|
-
suffix: getCredentialProjectSuffix(credential)
|
|
1165
|
-
}
|
|
1166
|
-
},
|
|
1167
|
-
section,
|
|
1168
|
-
keywords,
|
|
1169
|
-
icon: {
|
|
1170
|
-
component: CredentialIcon_default,
|
|
1171
|
-
props: { credentialTypeName: credential.type }
|
|
1172
|
-
},
|
|
1173
|
-
handler: () => {
|
|
1174
|
-
uiStore.openExistingCredential(credential.id);
|
|
1175
|
-
}
|
|
1176
|
-
};
|
|
1177
|
-
};
|
|
1178
|
-
const openCredentialCommands = computed(() => {
|
|
1179
|
-
return credentialResults.value.map((credential) => createCredentialCommand(credential, false));
|
|
1180
|
-
});
|
|
1181
|
-
const rootCredentialItems = computed(() => {
|
|
1182
|
-
if (lastQuery.value.length <= 2) return [];
|
|
1183
|
-
return credentialResults.value.map((credential) => createCredentialCommand(credential, true));
|
|
1184
|
-
});
|
|
1185
|
-
const credentialNavigationCommands = computed(() => {
|
|
1186
|
-
const hasCreatePermission = !sourceControlStore.preferences.branchReadOnly && getResourcePermissions(homeProject.value?.scopes).credential.create;
|
|
1187
|
-
const newCredentialCommand = {
|
|
1188
|
-
id: ITEM_ID$4.CREATE_CREDENTIAL,
|
|
1189
|
-
title: i18n.baseText("commandBar.credentials.create", { interpolate: { projectName: currentProjectName.value } }),
|
|
1190
|
-
section: i18n.baseText("commandBar.sections.credentials"),
|
|
1191
|
-
keywords: [i18n.baseText("credentials.add")],
|
|
1192
|
-
icon: {
|
|
1193
|
-
component: N8nIcon_default,
|
|
1194
|
-
props: {
|
|
1195
|
-
icon: "lock",
|
|
1196
|
-
color: "text-light"
|
|
1197
|
-
}
|
|
1198
|
-
},
|
|
1199
|
-
handler: () => {
|
|
1200
|
-
const currentProjectId = typeof route.params.projectId === "string" ? route.params.projectId : personalProjectId.value;
|
|
1201
|
-
const routeName = route.name === VIEWS.SHARED_CREDENTIALS ? VIEWS.SHARED_CREDENTIALS : route.name === VIEWS.CREDENTIALS ? VIEWS.CREDENTIALS : VIEWS.PROJECTS_CREDENTIALS;
|
|
1202
|
-
router.push({
|
|
1203
|
-
name: routeName,
|
|
1204
|
-
params: {
|
|
1205
|
-
projectId: currentProjectId,
|
|
1206
|
-
credentialId: "create"
|
|
1207
|
-
}
|
|
1208
|
-
});
|
|
1209
|
-
}
|
|
1210
|
-
};
|
|
1211
|
-
return [
|
|
1212
|
-
...hasCreatePermission ? [newCredentialCommand] : [],
|
|
1213
|
-
{
|
|
1214
|
-
id: ITEM_ID$4.OPEN_CREDENTIAL,
|
|
1215
|
-
title: i18n.baseText("commandBar.credentials.open"),
|
|
1216
|
-
section: i18n.baseText("commandBar.sections.credentials"),
|
|
1217
|
-
placeholder: i18n.baseText("commandBar.credentials.searchPlaceholder"),
|
|
1218
|
-
children: openCredentialCommands.value,
|
|
1219
|
-
icon: {
|
|
1220
|
-
component: N8nIcon_default,
|
|
1221
|
-
props: {
|
|
1222
|
-
icon: "lock",
|
|
1223
|
-
color: "text-light"
|
|
1224
|
-
}
|
|
1225
|
-
}
|
|
1226
|
-
},
|
|
1227
|
-
...rootCredentialItems.value
|
|
1228
|
-
];
|
|
1229
|
-
});
|
|
1230
|
-
function onCommandBarChange(query) {
|
|
1231
|
-
const trimmed = query.trim();
|
|
1232
|
-
const isInCredentialParent = activeNodeId.value === ITEM_ID$4.OPEN_CREDENTIAL;
|
|
1233
|
-
const isRootWithQuery = activeNodeId.value === null && trimmed.length > 2;
|
|
1234
|
-
if (isInCredentialParent || isRootWithQuery) {
|
|
1235
|
-
isLoading.value = isInCredentialParent;
|
|
1236
|
-
fetchCredentialsDebounced(trimmed);
|
|
1237
|
-
}
|
|
1238
|
-
}
|
|
1239
|
-
function onCommandBarNavigateTo(to) {
|
|
1240
|
-
activeNodeId.value = to;
|
|
1241
|
-
if (to === ITEM_ID$4.OPEN_CREDENTIAL) {
|
|
1242
|
-
isLoading.value = true;
|
|
1243
|
-
fetchCredentialsImpl("");
|
|
1244
|
-
} else if (to === null) credentialResults.value = [];
|
|
1245
|
-
}
|
|
1246
|
-
async function initialize() {
|
|
1247
|
-
await credentialsStore.fetchCredentialTypes(false);
|
|
1248
|
-
}
|
|
1249
|
-
return {
|
|
1250
|
-
commands: credentialNavigationCommands,
|
|
1251
|
-
handlers: {
|
|
1252
|
-
onCommandBarChange,
|
|
1253
|
-
onCommandBarNavigateTo
|
|
1254
|
-
},
|
|
1255
|
-
isLoading,
|
|
1256
|
-
initialize
|
|
1257
|
-
};
|
|
1258
|
-
}
|
|
1259
|
-
function useExecutionNavigationCommands() {
|
|
1260
|
-
const i18n = useI18n();
|
|
1261
|
-
const projectsStore = useProjectsStore();
|
|
1262
|
-
const workflowsStore = useWorkflowsStore();
|
|
1263
|
-
const router = useRouter();
|
|
1264
|
-
const route = useRoute();
|
|
1265
|
-
const personalProjectId = computed(() => {
|
|
1266
|
-
return projectsStore.myProjects.find((p) => p.type === "personal")?.id;
|
|
1267
|
-
});
|
|
1268
|
-
const currentProjectId = computed(() => {
|
|
1269
|
-
return typeof route.params.projectId === "string" ? route.params.projectId : personalProjectId.value;
|
|
1270
|
-
});
|
|
1271
|
-
return { commands: computed(() => {
|
|
1272
|
-
if (!workflowsStore.canViewWorkflows) return [];
|
|
1273
|
-
return [{
|
|
1274
|
-
id: "open-executions",
|
|
1275
|
-
title: i18n.baseText("commandBar.executions.open"),
|
|
1276
|
-
section: i18n.baseText("commandBar.sections.executions"),
|
|
1277
|
-
icon: {
|
|
1278
|
-
component: N8nIcon_default,
|
|
1279
|
-
props: { icon: "arrow-right" }
|
|
1280
|
-
},
|
|
1281
|
-
handler: () => {
|
|
1282
|
-
if (currentProjectId.value === personalProjectId.value) router.push({ name: VIEWS.EXECUTIONS });
|
|
1283
|
-
else router.push({
|
|
1284
|
-
name: VIEWS.PROJECTS_EXECUTIONS,
|
|
1285
|
-
params: { projectId: currentProjectId.value }
|
|
1286
|
-
});
|
|
1287
|
-
}
|
|
1288
|
-
}];
|
|
1289
|
-
}) };
|
|
1290
|
-
}
|
|
1291
|
-
var isIconName = (icon) => typeof icon === "string" && Object.keys(updatedIconSet).includes(icon);
|
|
1292
|
-
var isProjectIcon = (icon) => isIconName(icon) || typeof icon === "object" && icon !== null && "value" in icon && typeof icon.value === "string" && "type" in icon && (icon.type === "emoji" || icon.type === "icon" && isIconName(icon.value));
|
|
1293
|
-
const useGlobalEntityCreation = () => {
|
|
1294
|
-
const CREATE_PROJECT_ID = "create-project";
|
|
1295
|
-
const WORKFLOWS_MENU_ID = "workflow";
|
|
1296
|
-
const CREDENTIALS_MENU_ID = "credential";
|
|
1297
|
-
const DEFAULT_ICON = "layers";
|
|
1298
|
-
const settingsStore = useSettingsStore();
|
|
1299
|
-
const cloudPlanStore = useCloudPlanStore();
|
|
1300
|
-
const projectsStore = useProjectsStore();
|
|
1301
|
-
const sourceControlStore = useSourceControlStore();
|
|
1302
|
-
const router = useRouter();
|
|
1303
|
-
const i18n = useI18n();
|
|
1304
|
-
const toast = useToast();
|
|
1305
|
-
const isCreatingProject = ref(false);
|
|
1306
|
-
const displayProjects = computed(() => sortByProperty("name", projectsStore.myProjects.filter((p) => p.type === "team")));
|
|
1307
|
-
const disabledWorkflow = (scopes = []) => sourceControlStore.preferences.branchReadOnly || !getResourcePermissions(scopes).workflow.create;
|
|
1308
|
-
const disabledCredential = (scopes = []) => sourceControlStore.preferences.branchReadOnly || !getResourcePermissions(scopes).credential.create;
|
|
1309
|
-
const menu = computed(() => {
|
|
1310
|
-
if (!projectsStore.isTeamProjectFeatureEnabled) return [
|
|
1311
|
-
{
|
|
1312
|
-
id: "workflow",
|
|
1313
|
-
title: "Workflow",
|
|
1314
|
-
route: {
|
|
1315
|
-
name: VIEWS.NEW_WORKFLOW,
|
|
1316
|
-
query: { projectId: projectsStore.personalProject?.id }
|
|
1317
|
-
}
|
|
1318
|
-
},
|
|
1319
|
-
{
|
|
1320
|
-
id: "credential",
|
|
1321
|
-
title: "Credential",
|
|
1322
|
-
route: {
|
|
1323
|
-
name: VIEWS.CREDENTIALS,
|
|
1324
|
-
params: {
|
|
1325
|
-
projectId: projectsStore.personalProject?.id,
|
|
1326
|
-
credentialId: "create"
|
|
1327
|
-
}
|
|
1328
|
-
}
|
|
1329
|
-
},
|
|
1330
|
-
{
|
|
1331
|
-
id: CREATE_PROJECT_ID,
|
|
1332
|
-
title: "Project",
|
|
1333
|
-
disabled: true
|
|
1334
|
-
}
|
|
1335
|
-
];
|
|
1336
|
-
return [
|
|
1337
|
-
{
|
|
1338
|
-
id: WORKFLOWS_MENU_ID,
|
|
1339
|
-
title: "Workflow",
|
|
1340
|
-
disabled: sourceControlStore.preferences.branchReadOnly,
|
|
1341
|
-
...!sourceControlStore.preferences.branchReadOnly && { submenu: [
|
|
1342
|
-
{
|
|
1343
|
-
id: "workflow-title",
|
|
1344
|
-
title: "Create in",
|
|
1345
|
-
disabled: true
|
|
1346
|
-
},
|
|
1347
|
-
{
|
|
1348
|
-
id: "workflow-personal",
|
|
1349
|
-
title: i18n.baseText("projects.menu.personal"),
|
|
1350
|
-
icon: "user",
|
|
1351
|
-
disabled: disabledWorkflow(projectsStore.personalProject?.scopes),
|
|
1352
|
-
route: {
|
|
1353
|
-
name: VIEWS.NEW_WORKFLOW,
|
|
1354
|
-
query: { projectId: projectsStore.personalProject?.id }
|
|
1355
|
-
}
|
|
1356
|
-
},
|
|
1357
|
-
...displayProjects.value.map((project) => ({
|
|
1358
|
-
id: `workflow-${project.id}`,
|
|
1359
|
-
title: project.name,
|
|
1360
|
-
icon: isProjectIcon(project.icon) ? project.icon : DEFAULT_ICON,
|
|
1361
|
-
disabled: disabledWorkflow(project.scopes),
|
|
1362
|
-
route: {
|
|
1363
|
-
name: VIEWS.NEW_WORKFLOW,
|
|
1364
|
-
query: { projectId: project.id }
|
|
1365
|
-
}
|
|
1366
|
-
}))
|
|
1367
|
-
] }
|
|
1368
|
-
},
|
|
1369
|
-
{
|
|
1370
|
-
id: CREDENTIALS_MENU_ID,
|
|
1371
|
-
title: "Credential",
|
|
1372
|
-
disabled: sourceControlStore.preferences.branchReadOnly,
|
|
1373
|
-
...!sourceControlStore.preferences.branchReadOnly && { submenu: [
|
|
1374
|
-
{
|
|
1375
|
-
id: "credential-title",
|
|
1376
|
-
title: "Create in",
|
|
1377
|
-
disabled: true
|
|
1378
|
-
},
|
|
1379
|
-
{
|
|
1380
|
-
id: "credential-personal",
|
|
1381
|
-
title: i18n.baseText("projects.menu.personal"),
|
|
1382
|
-
icon: "user",
|
|
1383
|
-
disabled: disabledCredential(projectsStore.personalProject?.scopes),
|
|
1384
|
-
route: {
|
|
1385
|
-
name: VIEWS.PROJECTS_CREDENTIALS,
|
|
1386
|
-
params: {
|
|
1387
|
-
projectId: projectsStore.personalProject?.id,
|
|
1388
|
-
credentialId: "create"
|
|
1389
|
-
}
|
|
1390
|
-
}
|
|
1391
|
-
},
|
|
1392
|
-
...displayProjects.value.map((project) => ({
|
|
1393
|
-
id: `credential-${project.id}`,
|
|
1394
|
-
title: project.name,
|
|
1395
|
-
icon: isProjectIcon(project.icon) ? project.icon : DEFAULT_ICON,
|
|
1396
|
-
disabled: disabledCredential(project.scopes),
|
|
1397
|
-
route: {
|
|
1398
|
-
name: VIEWS.PROJECTS_CREDENTIALS,
|
|
1399
|
-
params: {
|
|
1400
|
-
projectId: project.id,
|
|
1401
|
-
credentialId: "create"
|
|
1402
|
-
}
|
|
1403
|
-
}
|
|
1404
|
-
}))
|
|
1405
|
-
] }
|
|
1406
|
-
},
|
|
1407
|
-
{
|
|
1408
|
-
id: CREATE_PROJECT_ID,
|
|
1409
|
-
title: "Project",
|
|
1410
|
-
disabled: !projectsStore.canCreateProjects || !projectsStore.hasPermissionToCreateProjects
|
|
1411
|
-
}
|
|
1412
|
-
];
|
|
1413
|
-
});
|
|
1414
|
-
const createProject = async (uiContext) => {
|
|
1415
|
-
isCreatingProject.value = true;
|
|
1416
|
-
try {
|
|
1417
|
-
const newProject = await projectsStore.createProject({
|
|
1418
|
-
name: i18n.baseText("projects.settings.newProjectName"),
|
|
1419
|
-
icon: {
|
|
1420
|
-
type: "icon",
|
|
1421
|
-
value: DEFAULT_ICON
|
|
1422
|
-
},
|
|
1423
|
-
uiContext
|
|
1424
|
-
});
|
|
1425
|
-
await router.push({
|
|
1426
|
-
name: VIEWS.PROJECT_SETTINGS,
|
|
1427
|
-
params: { projectId: newProject.id }
|
|
1428
|
-
});
|
|
1429
|
-
toast.showMessage({
|
|
1430
|
-
title: i18n.baseText("projects.settings.save.successful.title", { interpolate: { projectName: newProject.name } }),
|
|
1431
|
-
type: "success"
|
|
1432
|
-
});
|
|
1433
|
-
} catch (error) {
|
|
1434
|
-
toast.showError(error, i18n.baseText("projects.error.title"));
|
|
1435
|
-
} finally {
|
|
1436
|
-
isCreatingProject.value = false;
|
|
1437
|
-
}
|
|
1438
|
-
};
|
|
1439
|
-
const handleSelect = (id) => {
|
|
1440
|
-
if (id !== CREATE_PROJECT_ID) return;
|
|
1441
|
-
if (projectsStore.canCreateProjects && projectsStore.hasPermissionToCreateProjects) {
|
|
1442
|
-
createProject("universal_button");
|
|
1443
|
-
return;
|
|
1444
|
-
}
|
|
1445
|
-
usePageRedirectionHelper().goToUpgrade("rbac", "upgrade-rbac");
|
|
1446
|
-
};
|
|
1447
|
-
const projectsLimitReachedMessage = computed(() => {
|
|
1448
|
-
if (settingsStore.isCloudDeployment) return i18n.baseText("projects.create.limitReached.cloud", { interpolate: {
|
|
1449
|
-
planName: cloudPlanStore.currentPlanData?.displayName ?? "",
|
|
1450
|
-
limit: projectsStore.teamProjectsLimit
|
|
1451
|
-
} });
|
|
1452
|
-
if (!projectsStore.isTeamProjectFeatureEnabled) return i18n.baseText("projects.create.limitReached.self");
|
|
1453
|
-
if (!projectsStore.hasPermissionToCreateProjects) return i18n.baseText("projects.create.permissionDenied");
|
|
1454
|
-
return i18n.baseText("projects.create.limitReached", { interpolate: { limit: projectsStore.teamProjectsLimit } });
|
|
1455
|
-
});
|
|
1456
|
-
return {
|
|
1457
|
-
menu,
|
|
1458
|
-
handleSelect,
|
|
1459
|
-
createProjectAppendSlotName: computed(() => `item.append.${CREATE_PROJECT_ID}`),
|
|
1460
|
-
createWorkflowsAppendSlotName: computed(() => `item.append.${WORKFLOWS_MENU_ID}`),
|
|
1461
|
-
createCredentialsAppendSlotName: computed(() => `item.append.${CREDENTIALS_MENU_ID}`),
|
|
1462
|
-
projectsLimitReachedMessage,
|
|
1463
|
-
hasPermissionToCreateProjects: projectsStore.hasPermissionToCreateProjects,
|
|
1464
|
-
upgradeLabel: computed(() => {
|
|
1465
|
-
if (settingsStore.isCloudDeployment) return i18n.baseText("generic.upgrade");
|
|
1466
|
-
if (!projectsStore.isTeamProjectFeatureEnabled) return i18n.baseText("generic.enterprise");
|
|
1467
|
-
return i18n.baseText("generic.upgrade");
|
|
1468
|
-
}),
|
|
1469
|
-
createProject,
|
|
1470
|
-
isCreatingProject,
|
|
1471
|
-
displayProjects
|
|
1472
|
-
};
|
|
1473
|
-
};
|
|
1474
|
-
var ITEM_ID$3 = {
|
|
1475
|
-
CREATE_PROJECT: "create-project",
|
|
1476
|
-
OPEN_PROJECT: "open-project"
|
|
1477
|
-
};
|
|
1478
|
-
function useProjectNavigationCommands(options) {
|
|
1479
|
-
const i18n = useI18n();
|
|
1480
|
-
const { lastQuery, activeNodeId } = options;
|
|
1481
|
-
const projectsStore = useProjectsStore();
|
|
1482
|
-
const globalEntityCreation = useGlobalEntityCreation();
|
|
1483
|
-
const router = useRouter();
|
|
1484
|
-
const filteredProjects = computed(() => {
|
|
1485
|
-
const trimmed = (lastQuery.value || "").trim().toLowerCase();
|
|
1486
|
-
const allProjects = projectsStore.availableProjects;
|
|
1487
|
-
if (!trimmed) return allProjects;
|
|
1488
|
-
return allProjects.filter((project) => project.name?.toLowerCase().includes(trimmed) || project.id?.toLowerCase().includes(trimmed));
|
|
1489
|
-
});
|
|
1490
|
-
const openProjectCommand = (project, isRoot) => {
|
|
1491
|
-
let title$1 = project.type === "personal" ? i18n.baseText("projects.menu.personal") : project.name ? project.name : i18n.baseText("commandBar.projects.unnamed");
|
|
1492
|
-
if (isRoot) title$1 = i18n.baseText("generic.openResource", { interpolate: { resource: title$1 } });
|
|
1493
|
-
const section = isRoot ? i18n.baseText("commandBar.sections.projects") : i18n.baseText("commandBar.projects.open");
|
|
1494
|
-
return {
|
|
1495
|
-
id: project.id,
|
|
1496
|
-
title: title$1,
|
|
1497
|
-
section,
|
|
1498
|
-
keywords: [title$1],
|
|
1499
|
-
handler: () => {
|
|
1500
|
-
router.push({
|
|
1501
|
-
name: VIEWS.PROJECTS_WORKFLOWS,
|
|
1502
|
-
params: { projectId: project.id }
|
|
1503
|
-
});
|
|
1504
|
-
}
|
|
1505
|
-
};
|
|
1506
|
-
};
|
|
1507
|
-
const openProjectCommands = computed(() => {
|
|
1508
|
-
if (!(activeNodeId.value === ITEM_ID$3.OPEN_PROJECT)) return [];
|
|
1509
|
-
return filteredProjects.value.map((project) => openProjectCommand(project, false));
|
|
1510
|
-
});
|
|
1511
|
-
const rootProjectItems = computed(() => {
|
|
1512
|
-
if (!(activeNodeId.value === null && lastQuery.value.trim().length > 2) || !projectsStore.canViewProjects) return [];
|
|
1513
|
-
return filteredProjects.value.map((project) => openProjectCommand(project, true));
|
|
1514
|
-
});
|
|
1515
|
-
const projectNavigationCommands = computed(() => {
|
|
1516
|
-
const commands = [];
|
|
1517
|
-
if (projectsStore.hasPermissionToCreateProjects && projectsStore.canCreateProjects) commands.push({
|
|
1518
|
-
id: ITEM_ID$3.CREATE_PROJECT,
|
|
1519
|
-
title: i18n.baseText("commandBar.projects.create"),
|
|
1520
|
-
section: i18n.baseText("commandBar.sections.projects"),
|
|
1521
|
-
icon: {
|
|
1522
|
-
component: N8nIcon_default,
|
|
1523
|
-
props: {
|
|
1524
|
-
icon: "layers",
|
|
1525
|
-
color: "text-light"
|
|
1526
|
-
}
|
|
1527
|
-
},
|
|
1528
|
-
handler: () => {
|
|
1529
|
-
globalEntityCreation.createProject("command_bar");
|
|
1530
|
-
}
|
|
1531
|
-
});
|
|
1532
|
-
if (projectsStore.availableProjects.length > 0 && projectsStore.canViewProjects) commands.push({
|
|
1533
|
-
id: ITEM_ID$3.OPEN_PROJECT,
|
|
1534
|
-
title: i18n.baseText("commandBar.projects.open"),
|
|
1535
|
-
section: i18n.baseText("commandBar.sections.projects"),
|
|
1536
|
-
placeholder: i18n.baseText("commandBar.projects.searchPlaceholder"),
|
|
1537
|
-
children: openProjectCommands.value,
|
|
1538
|
-
icon: {
|
|
1539
|
-
component: N8nIcon_default,
|
|
1540
|
-
props: {
|
|
1541
|
-
icon: "layers",
|
|
1542
|
-
color: "text-light"
|
|
1543
|
-
}
|
|
1544
|
-
}
|
|
1545
|
-
});
|
|
1546
|
-
return [...commands, ...rootProjectItems.value];
|
|
1547
|
-
});
|
|
1548
|
-
function onCommandBarChange(query) {
|
|
1549
|
-
lastQuery.value = query;
|
|
1550
|
-
}
|
|
1551
|
-
function onCommandBarNavigateTo(to) {
|
|
1552
|
-
activeNodeId.value = to;
|
|
1553
|
-
}
|
|
1554
|
-
return {
|
|
1555
|
-
commands: projectNavigationCommands,
|
|
1556
|
-
handlers: {
|
|
1557
|
-
onCommandBarChange,
|
|
1558
|
-
onCommandBarNavigateTo
|
|
1559
|
-
}
|
|
1560
|
-
};
|
|
1561
|
-
}
|
|
1562
|
-
var ITEM_ID$2 = {
|
|
1563
|
-
DELETE_EXECUTION: "delete-execution",
|
|
1564
|
-
RETRY_CURRENT_WORKFLOW: "retry-current-workflow",
|
|
1565
|
-
RETRY_ORIGINAL_WORKFLOW: "retry-original-workflow",
|
|
1566
|
-
STOP_EXECUTION: "stop-execution",
|
|
1567
|
-
DEBUG_EXECUTION: "debug-execution",
|
|
1568
|
-
VOTE_UP: "vote-up",
|
|
1569
|
-
VOTE_DOWN: "vote-down"
|
|
1570
|
-
};
|
|
1571
|
-
function useExecutionCommands() {
|
|
1572
|
-
const i18n = useI18n();
|
|
1573
|
-
const router = useRouter();
|
|
1574
|
-
const route = useRoute();
|
|
1575
|
-
const executionsStore = useExecutionsStore();
|
|
1576
|
-
const workflowsStore = useWorkflowsStore();
|
|
1577
|
-
const settingsStore = useSettingsStore();
|
|
1578
|
-
const toast = useToast();
|
|
1579
|
-
const message = useMessage();
|
|
1580
|
-
const telemetry = useTelemetry();
|
|
1581
|
-
const workflowId = computed(() => route.params.name);
|
|
1582
|
-
const activeExecution = computed(() => {
|
|
1583
|
-
return executionsStore.activeExecution;
|
|
1584
|
-
});
|
|
1585
|
-
const workflowPermissions = computed(() => getResourcePermissions(workflowsStore.getWorkflowById(workflowId.value)?.scopes).workflow);
|
|
1586
|
-
const isAnnotationEnabled = computed(() => settingsStore.isEnterpriseFeatureEnabled[EnterpriseEditionFeature.AdvancedExecutionFilters]);
|
|
1587
|
-
const hasAnnotation = computed(() => !!activeExecution.value?.annotation && (activeExecution.value?.annotation.vote || activeExecution.value?.annotation.tags.length > 0));
|
|
1588
|
-
const vote = computed(() => activeExecution.value?.annotation?.vote || null);
|
|
1589
|
-
const executions = computed(() => workflowId.value ? [...executionsStore.currentExecutionsByWorkflowId[workflowId.value] ?? [], ...executionsStore.executionsByWorkflowId[workflowId.value] ?? []] : []);
|
|
1590
|
-
const isRetriable = computed(() => {
|
|
1591
|
-
if (!activeExecution.value) return false;
|
|
1592
|
-
const status = activeExecution.value.status;
|
|
1593
|
-
return status === "error" || status === "crashed" || status === "canceled";
|
|
1594
|
-
});
|
|
1595
|
-
const isRunning = computed(() => {
|
|
1596
|
-
if (!activeExecution.value) return false;
|
|
1597
|
-
return activeExecution.value.status === "running" || activeExecution.value.status === "new";
|
|
1598
|
-
});
|
|
1599
|
-
async function handleDeleteExecution() {
|
|
1600
|
-
const confirmationText = [hasAnnotation.value && i18n.baseText("executionDetails.confirmMessage.annotationsNote"), i18n.baseText("executionDetails.confirmMessage.message")].filter(Boolean).join(" ");
|
|
1601
|
-
if (await message.confirm(confirmationText, i18n.baseText("executionDetails.confirmMessage.headline"), {
|
|
1602
|
-
type: "warning",
|
|
1603
|
-
confirmButtonText: i18n.baseText("executionDetails.confirmMessage.confirmButtonText"),
|
|
1604
|
-
cancelButtonText: ""
|
|
1605
|
-
}) !== "confirm") return;
|
|
1606
|
-
try {
|
|
1607
|
-
const executionId = activeExecution.value.id;
|
|
1608
|
-
const executionIndex = executions.value.findIndex((e) => e.id === executionId);
|
|
1609
|
-
const nextExecution = executions.value[executionIndex + 1] || executions.value[executionIndex - 1] || executions.value[0];
|
|
1610
|
-
await executionsStore.deleteExecutions({ ids: [executionId] });
|
|
1611
|
-
if (executions.value.length > 0) await router.replace({
|
|
1612
|
-
name: VIEWS.EXECUTION_PREVIEW,
|
|
1613
|
-
params: {
|
|
1614
|
-
name: workflowId.value,
|
|
1615
|
-
executionId: nextExecution.id
|
|
1616
|
-
}
|
|
1617
|
-
}).catch(() => {});
|
|
1618
|
-
else await router.replace({
|
|
1619
|
-
name: VIEWS.EXECUTION_HOME,
|
|
1620
|
-
params: { name: workflowId.value }
|
|
1621
|
-
});
|
|
1622
|
-
toast.showMessage({
|
|
1623
|
-
title: i18n.baseText("executionsList.showMessage.handleDeleteSelected.title"),
|
|
1624
|
-
type: "success"
|
|
1625
|
-
});
|
|
1626
|
-
} catch (error) {
|
|
1627
|
-
toast.showError(error, i18n.baseText("executionsList.showError.handleDeleteSelected.title"));
|
|
1628
|
-
}
|
|
1629
|
-
}
|
|
1630
|
-
async function handleRetryExecution(loadWorkflow) {
|
|
1631
|
-
toast.showMessage({
|
|
1632
|
-
title: i18n.baseText("executionDetails.runningMessage"),
|
|
1633
|
-
type: "info",
|
|
1634
|
-
duration: 2e3
|
|
1635
|
-
});
|
|
1636
|
-
try {
|
|
1637
|
-
const retryMessage = executionRetryMessage((await executionsStore.retryExecution(activeExecution.value.id, loadWorkflow)).status);
|
|
1638
|
-
if (retryMessage) toast.showMessage(retryMessage);
|
|
1639
|
-
telemetry.track("User clicked retry execution button", {
|
|
1640
|
-
workflow_id: workflowId.value,
|
|
1641
|
-
execution_id: activeExecution.value.id,
|
|
1642
|
-
retry_type: loadWorkflow ? "current" : "original"
|
|
1643
|
-
});
|
|
1644
|
-
} catch (error) {
|
|
1645
|
-
toast.showError(error, i18n.baseText("executionsList.showError.retryExecution.title"));
|
|
1646
|
-
}
|
|
1647
|
-
}
|
|
1648
|
-
async function handleStopExecution() {
|
|
1649
|
-
try {
|
|
1650
|
-
await executionsStore.stopCurrentExecution(activeExecution.value.id);
|
|
1651
|
-
toast.showMessage({
|
|
1652
|
-
title: i18n.baseText("executionsList.showMessage.stopExecution.title"),
|
|
1653
|
-
message: i18n.baseText("executionsList.showMessage.stopExecution.message", { interpolate: { activeExecutionId: activeExecution.value.id } }),
|
|
1654
|
-
type: "success"
|
|
1655
|
-
});
|
|
1656
|
-
} catch (error) {
|
|
1657
|
-
toast.showError(error, i18n.baseText("executionsList.showError.stopExecution.title"));
|
|
1658
|
-
}
|
|
1659
|
-
}
|
|
1660
|
-
function handleDebugExecution() {
|
|
1661
|
-
router.push({
|
|
1662
|
-
name: VIEWS.EXECUTION_DEBUG,
|
|
1663
|
-
params: {
|
|
1664
|
-
name: activeExecution.value.workflowId,
|
|
1665
|
-
executionId: activeExecution.value.id
|
|
1666
|
-
}
|
|
1667
|
-
});
|
|
1668
|
-
}
|
|
1669
|
-
async function handleVoteClick(voteValue) {
|
|
1670
|
-
const voteToSet = voteValue === vote.value ? null : voteValue;
|
|
1671
|
-
try {
|
|
1672
|
-
await executionsStore.annotateExecution(activeExecution.value.id, { vote: voteToSet });
|
|
1673
|
-
} catch (e) {
|
|
1674
|
-
toast.showError(e, "executionAnnotationView.vote.error");
|
|
1675
|
-
}
|
|
1676
|
-
}
|
|
1677
|
-
return { commands: computed(() => {
|
|
1678
|
-
if (!activeExecution.value) return [];
|
|
1679
|
-
const commands = [];
|
|
1680
|
-
if (workflowPermissions.value.update) {
|
|
1681
|
-
const isSuccess = activeExecution.value.status === "success";
|
|
1682
|
-
commands.push({
|
|
1683
|
-
id: ITEM_ID$2.DEBUG_EXECUTION,
|
|
1684
|
-
title: isSuccess ? i18n.baseText("executionsList.debug.button.copyToEditor") : i18n.baseText("executionsList.debug.button.debugInEditor"),
|
|
1685
|
-
section: i18n.baseText("commandBar.sections.execution"),
|
|
1686
|
-
handler: handleDebugExecution,
|
|
1687
|
-
icon: {
|
|
1688
|
-
component: N8nIcon_default,
|
|
1689
|
-
props: { icon: isSuccess ? "copy" : "bug" }
|
|
1690
|
-
}
|
|
1691
|
-
});
|
|
1692
|
-
}
|
|
1693
|
-
if (isRetriable.value && workflowPermissions.value.update) {
|
|
1694
|
-
commands.push({
|
|
1695
|
-
id: ITEM_ID$2.RETRY_CURRENT_WORKFLOW,
|
|
1696
|
-
title: i18n.baseText("executionsList.retryWithCurrentlySavedWorkflow"),
|
|
1697
|
-
section: i18n.baseText("commandBar.sections.execution"),
|
|
1698
|
-
handler: async () => await handleRetryExecution(true),
|
|
1699
|
-
icon: {
|
|
1700
|
-
component: N8nIcon_default,
|
|
1701
|
-
props: { icon: "redo-2" }
|
|
1702
|
-
}
|
|
1703
|
-
});
|
|
1704
|
-
commands.push({
|
|
1705
|
-
id: ITEM_ID$2.RETRY_ORIGINAL_WORKFLOW,
|
|
1706
|
-
title: i18n.baseText("executionsList.retryWithOriginalWorkflow"),
|
|
1707
|
-
section: i18n.baseText("commandBar.sections.execution"),
|
|
1708
|
-
handler: async () => await handleRetryExecution(false),
|
|
1709
|
-
icon: {
|
|
1710
|
-
component: N8nIcon_default,
|
|
1711
|
-
props: { icon: "redo" }
|
|
1712
|
-
}
|
|
1713
|
-
});
|
|
1714
|
-
}
|
|
1715
|
-
if (isRunning.value && workflowPermissions.value.execute) commands.push({
|
|
1716
|
-
id: ITEM_ID$2.STOP_EXECUTION,
|
|
1717
|
-
title: i18n.baseText("executionsList.stopExecution"),
|
|
1718
|
-
section: i18n.baseText("commandBar.sections.execution"),
|
|
1719
|
-
handler: handleStopExecution,
|
|
1720
|
-
icon: {
|
|
1721
|
-
component: N8nIcon_default,
|
|
1722
|
-
props: { icon: "stop" }
|
|
1723
|
-
}
|
|
1724
|
-
});
|
|
1725
|
-
if (isAnnotationEnabled.value) {
|
|
1726
|
-
commands.push({
|
|
1727
|
-
id: ITEM_ID$2.VOTE_UP,
|
|
1728
|
-
title: vote.value === "up" ? i18n.baseText("executionAnnotationView.vote.removeUp") : i18n.baseText("executionAnnotationView.vote.up"),
|
|
1729
|
-
section: i18n.baseText("commandBar.sections.execution"),
|
|
1730
|
-
handler: async () => await handleVoteClick("up"),
|
|
1731
|
-
icon: {
|
|
1732
|
-
component: N8nIcon_default,
|
|
1733
|
-
props: { icon: "thumbs-up" }
|
|
1734
|
-
}
|
|
1735
|
-
});
|
|
1736
|
-
commands.push({
|
|
1737
|
-
id: ITEM_ID$2.VOTE_DOWN,
|
|
1738
|
-
title: vote.value === "down" ? i18n.baseText("executionAnnotationView.vote.removeDown") : i18n.baseText("executionAnnotationView.vote.down"),
|
|
1739
|
-
section: i18n.baseText("commandBar.sections.execution"),
|
|
1740
|
-
handler: async () => await handleVoteClick("down"),
|
|
1741
|
-
icon: {
|
|
1742
|
-
component: N8nIcon_default,
|
|
1743
|
-
props: { icon: "thumbs-down" }
|
|
1744
|
-
}
|
|
1745
|
-
});
|
|
1746
|
-
}
|
|
1747
|
-
if (workflowPermissions.value.update) commands.push({
|
|
1748
|
-
id: ITEM_ID$2.DELETE_EXECUTION,
|
|
1749
|
-
title: i18n.baseText("executionDetails.deleteExecution"),
|
|
1750
|
-
section: i18n.baseText("commandBar.sections.execution"),
|
|
1751
|
-
handler: handleDeleteExecution,
|
|
1752
|
-
icon: {
|
|
1753
|
-
component: N8nIcon_default,
|
|
1754
|
-
props: { icon: "trash-2" }
|
|
1755
|
-
}
|
|
1756
|
-
});
|
|
1757
|
-
return commands;
|
|
1758
|
-
}) };
|
|
1759
|
-
}
|
|
1760
|
-
const EXTERNAL_LINKS = {
|
|
1761
|
-
QUICKSTART_VIDEO: "https://www.youtube.com/watch?v=4cQWJViybAQ",
|
|
1762
|
-
DOCUMENTATION: "https://docs.n8n.io?utm_source=n8n_app&utm_medium=app_sidebar",
|
|
1763
|
-
FORUM: "https://community.n8n.io?utm_source=n8n_app&utm_medium=app_sidebar",
|
|
1764
|
-
COURSES: "https://docs.n8n.io/courses/"
|
|
1765
|
-
};
|
|
1766
|
-
var BASE_FORUM_URL = "https://github.com/n8n-io/n8n/issues/new?labels=bug-report";
|
|
1767
|
-
var REPORT_TEMPLATE = `
|
|
1768
|
-
<!-- Please follow the template below. Skip the questions that are not relevant to you. -->
|
|
1769
|
-
|
|
1770
|
-
## Describe the problem/error/question
|
|
1771
|
-
|
|
1772
|
-
|
|
1773
|
-
## What is the error message (if any)?
|
|
1774
|
-
|
|
1775
|
-
|
|
1776
|
-
## Please share your workflow/screenshots/recording
|
|
1777
|
-
|
|
1778
|
-
\`\`\`
|
|
1779
|
-
(Select the nodes on your canvas and use the keyboard shortcuts CMD+C/CTRL+C and CMD+V/CTRL+V to copy and paste the workflow.)
|
|
1780
|
-
⚠️ WARNING ⚠️ If you have sensitive data in your workflow (like API keys), please remove it before sharing.
|
|
1781
|
-
\`\`\`
|
|
1782
|
-
|
|
1783
|
-
|
|
1784
|
-
## Share the output returned by the last node
|
|
1785
|
-
<!-- If you need help with data transformations, please also share your expected output. -->
|
|
1786
|
-
|
|
1787
|
-
`;
|
|
1788
|
-
function useBugReporting() {
|
|
1789
|
-
const debugInfo = useDebugInfo();
|
|
1790
|
-
const getReportingURL = () => {
|
|
1791
|
-
const url = new URL(BASE_FORUM_URL);
|
|
1792
|
-
const report = `${REPORT_TEMPLATE}\n${debugInfo.generateDebugInfo({
|
|
1793
|
-
skipSensitive: true,
|
|
1794
|
-
secondaryHeader: true
|
|
1795
|
-
})}}`;
|
|
1796
|
-
url.searchParams.append("body", report);
|
|
1797
|
-
return url.toString();
|
|
1798
|
-
};
|
|
1799
|
-
return { getReportingURL };
|
|
1800
|
-
}
|
|
1801
|
-
var ITEM_ID$1 = {
|
|
1802
|
-
CHAT_HUB: "chat-hub",
|
|
1803
|
-
WHATS_NEW: "whats-new",
|
|
1804
|
-
SETTINGS: "settings",
|
|
1805
|
-
SIGN_OUT: "sign-out",
|
|
1806
|
-
TEMPLATES: "templates",
|
|
1807
|
-
VARIABLES: "variables",
|
|
1808
|
-
INSIGHTS: "insights",
|
|
1809
|
-
QUICKSTART: "quickstart",
|
|
1810
|
-
DOCUMENTATION: "documentation",
|
|
1811
|
-
FORUM: "forum",
|
|
1812
|
-
COURSE: "course",
|
|
1813
|
-
REPORT_BUG: "report-bug",
|
|
1814
|
-
ABOUT: "about"
|
|
1815
|
-
};
|
|
1816
|
-
function useGenericCommands() {
|
|
1817
|
-
const i18n = useI18n();
|
|
1818
|
-
const uiStore = useUIStore();
|
|
1819
|
-
const router = useRouter();
|
|
1820
|
-
const settingsStore = useSettingsStore();
|
|
1821
|
-
const projectsStore = useProjectsStore();
|
|
1822
|
-
const { getReportingURL } = useBugReporting();
|
|
1823
|
-
return { commands: computed(() => [
|
|
1824
|
-
{
|
|
1825
|
-
id: ITEM_ID$1.WHATS_NEW,
|
|
1826
|
-
title: i18n.baseText("mainSidebar.whatsNew"),
|
|
1827
|
-
section: i18n.baseText("commandBar.sections.general"),
|
|
1828
|
-
handler: () => {
|
|
1829
|
-
uiStore.openModal(WHATS_NEW_MODAL_KEY);
|
|
1830
|
-
},
|
|
1831
|
-
icon: {
|
|
1832
|
-
component: N8nIcon_default,
|
|
1833
|
-
props: { icon: "bell" }
|
|
1834
|
-
},
|
|
1835
|
-
keywords: [i18n.baseText("mainSidebar.whatsNew").toLowerCase(), i18n.baseText("mainSidebar.whatsNew.fullChangelog").toLowerCase()]
|
|
1836
|
-
},
|
|
1837
|
-
...settingsStore.isChatFeatureEnabled ? [{
|
|
1838
|
-
id: ITEM_ID$1.CHAT_HUB,
|
|
1839
|
-
title: i18n.baseText("projects.menu.chat"),
|
|
1840
|
-
section: i18n.baseText("commandBar.sections.general"),
|
|
1841
|
-
handler: () => {
|
|
1842
|
-
router.push({
|
|
1843
|
-
name: CHAT_VIEW,
|
|
1844
|
-
force: true
|
|
1845
|
-
});
|
|
1846
|
-
},
|
|
1847
|
-
icon: {
|
|
1848
|
-
component: N8nIcon_default,
|
|
1849
|
-
props: { icon: "message-circle" }
|
|
1850
|
-
},
|
|
1851
|
-
keywords: [
|
|
1852
|
-
"chat",
|
|
1853
|
-
"open chat",
|
|
1854
|
-
i18n.baseText("projects.menu.chat").toLowerCase()
|
|
1855
|
-
]
|
|
1856
|
-
}] : [],
|
|
1857
|
-
...projectsStore.canViewProjects ? [{
|
|
1858
|
-
id: ITEM_ID$1.TEMPLATES,
|
|
1859
|
-
title: i18n.baseText("generic.templates"),
|
|
1860
|
-
section: i18n.baseText("commandBar.sections.general"),
|
|
1861
|
-
handler: () => {
|
|
1862
|
-
router.push({ name: VIEWS.PRE_BUILT_AGENT_TEMPLATES });
|
|
1863
|
-
},
|
|
1864
|
-
icon: {
|
|
1865
|
-
component: N8nIcon_default,
|
|
1866
|
-
props: { icon: "package-open" }
|
|
1867
|
-
},
|
|
1868
|
-
keywords: [i18n.baseText("generic.templates").toLowerCase()]
|
|
1869
|
-
}] : [],
|
|
1870
|
-
...projectsStore.canViewProjects ? [{
|
|
1871
|
-
id: ITEM_ID$1.VARIABLES,
|
|
1872
|
-
title: i18n.baseText("mainSidebar.variables"),
|
|
1873
|
-
section: i18n.baseText("commandBar.sections.general"),
|
|
1874
|
-
handler: () => {
|
|
1875
|
-
router.push({ name: VIEWS.HOME_VARIABLES });
|
|
1876
|
-
},
|
|
1877
|
-
icon: {
|
|
1878
|
-
component: N8nIcon_default,
|
|
1879
|
-
props: { icon: "variable" }
|
|
1880
|
-
},
|
|
1881
|
-
keywords: [i18n.baseText("mainSidebar.variables").toLowerCase()]
|
|
1882
|
-
}] : [],
|
|
1883
|
-
...projectsStore.canViewProjects ? [{
|
|
1884
|
-
id: ITEM_ID$1.INSIGHTS,
|
|
1885
|
-
title: "Insights",
|
|
1886
|
-
section: i18n.baseText("commandBar.sections.general"),
|
|
1887
|
-
handler: () => {
|
|
1888
|
-
router.push({ name: VIEWS.INSIGHTS });
|
|
1889
|
-
},
|
|
1890
|
-
icon: {
|
|
1891
|
-
component: N8nIcon_default,
|
|
1892
|
-
props: { icon: "chart-column-decreasing" }
|
|
1893
|
-
},
|
|
1894
|
-
keywords: ["insights"]
|
|
1895
|
-
}] : [],
|
|
1896
|
-
{
|
|
1897
|
-
id: ITEM_ID$1.QUICKSTART,
|
|
1898
|
-
title: i18n.baseText("mainSidebar.helpMenuItems.quickstart"),
|
|
1899
|
-
section: i18n.baseText("mainSidebar.help"),
|
|
1900
|
-
handler: () => {
|
|
1901
|
-
window.open(EXTERNAL_LINKS.QUICKSTART_VIDEO, "_blank", "noreferrer");
|
|
1902
|
-
},
|
|
1903
|
-
icon: {
|
|
1904
|
-
component: N8nIcon_default,
|
|
1905
|
-
props: { icon: "video" }
|
|
1906
|
-
},
|
|
1907
|
-
keywords: [i18n.baseText("mainSidebar.helpMenuItems.quickstart").toLowerCase()]
|
|
1908
|
-
},
|
|
1909
|
-
{
|
|
1910
|
-
id: ITEM_ID$1.DOCUMENTATION,
|
|
1911
|
-
title: i18n.baseText("mainSidebar.helpMenuItems.documentation"),
|
|
1912
|
-
section: i18n.baseText("mainSidebar.help"),
|
|
1913
|
-
handler: () => {
|
|
1914
|
-
window.open(EXTERNAL_LINKS.DOCUMENTATION, "_blank", "noreferrer");
|
|
1915
|
-
},
|
|
1916
|
-
icon: {
|
|
1917
|
-
component: N8nIcon_default,
|
|
1918
|
-
props: { icon: "book" }
|
|
1919
|
-
},
|
|
1920
|
-
keywords: [i18n.baseText("mainSidebar.helpMenuItems.documentation").toLowerCase()]
|
|
1921
|
-
},
|
|
1922
|
-
{
|
|
1923
|
-
id: ITEM_ID$1.FORUM,
|
|
1924
|
-
title: i18n.baseText("mainSidebar.helpMenuItems.forum"),
|
|
1925
|
-
section: i18n.baseText("mainSidebar.help"),
|
|
1926
|
-
handler: () => {
|
|
1927
|
-
window.open(EXTERNAL_LINKS.FORUM, "_blank", "noreferrer");
|
|
1928
|
-
},
|
|
1929
|
-
icon: {
|
|
1930
|
-
component: N8nIcon_default,
|
|
1931
|
-
props: { icon: "users" }
|
|
1932
|
-
},
|
|
1933
|
-
keywords: [i18n.baseText("mainSidebar.helpMenuItems.forum").toLowerCase()]
|
|
1934
|
-
},
|
|
1935
|
-
{
|
|
1936
|
-
id: ITEM_ID$1.COURSE,
|
|
1937
|
-
title: i18n.baseText("mainSidebar.helpMenuItems.course"),
|
|
1938
|
-
section: i18n.baseText("mainSidebar.help"),
|
|
1939
|
-
handler: () => {
|
|
1940
|
-
window.open(EXTERNAL_LINKS.COURSES, "_blank", "noreferrer");
|
|
1941
|
-
},
|
|
1942
|
-
icon: {
|
|
1943
|
-
component: N8nIcon_default,
|
|
1944
|
-
props: { icon: "graduation-cap" }
|
|
1945
|
-
},
|
|
1946
|
-
keywords: [i18n.baseText("mainSidebar.helpMenuItems.course").toLowerCase()]
|
|
1947
|
-
},
|
|
1948
|
-
{
|
|
1949
|
-
id: ITEM_ID$1.REPORT_BUG,
|
|
1950
|
-
title: i18n.baseText("mainSidebar.helpMenuItems.reportBug"),
|
|
1951
|
-
section: i18n.baseText("mainSidebar.help"),
|
|
1952
|
-
handler: () => {
|
|
1953
|
-
window.open(getReportingURL(), "_blank", "noreferrer");
|
|
1954
|
-
},
|
|
1955
|
-
icon: {
|
|
1956
|
-
component: N8nIcon_default,
|
|
1957
|
-
props: { icon: "bug" }
|
|
1958
|
-
},
|
|
1959
|
-
keywords: [i18n.baseText("mainSidebar.helpMenuItems.reportBug").toLowerCase()]
|
|
1960
|
-
},
|
|
1961
|
-
{
|
|
1962
|
-
id: ITEM_ID$1.ABOUT,
|
|
1963
|
-
title: i18n.baseText("mainSidebar.aboutN8n"),
|
|
1964
|
-
section: i18n.baseText("mainSidebar.help"),
|
|
1965
|
-
handler: () => {
|
|
1966
|
-
uiStore.openModal(ABOUT_MODAL_KEY);
|
|
1967
|
-
},
|
|
1968
|
-
icon: {
|
|
1969
|
-
component: N8nIcon_default,
|
|
1970
|
-
props: { icon: "info" }
|
|
1971
|
-
},
|
|
1972
|
-
keywords: [i18n.baseText("mainSidebar.aboutN8n").toLowerCase()]
|
|
1973
|
-
},
|
|
1974
|
-
{
|
|
1975
|
-
id: ITEM_ID$1.SETTINGS,
|
|
1976
|
-
title: i18n.baseText("settings"),
|
|
1977
|
-
section: i18n.baseText("commandBar.sections.general"),
|
|
1978
|
-
handler: () => {
|
|
1979
|
-
router.push({ name: VIEWS.SETTINGS });
|
|
1980
|
-
},
|
|
1981
|
-
icon: {
|
|
1982
|
-
component: N8nIcon_default,
|
|
1983
|
-
props: { icon: "cog" }
|
|
1984
|
-
},
|
|
1985
|
-
keywords: [i18n.baseText("settings").toLowerCase()]
|
|
1986
|
-
},
|
|
1987
|
-
{
|
|
1988
|
-
id: ITEM_ID$1.SIGN_OUT,
|
|
1989
|
-
title: i18n.baseText("auth.signout"),
|
|
1990
|
-
section: i18n.baseText("commandBar.sections.general"),
|
|
1991
|
-
handler: () => {
|
|
1992
|
-
router.push({ name: VIEWS.SIGNOUT });
|
|
1993
|
-
},
|
|
1994
|
-
icon: {
|
|
1995
|
-
component: N8nIcon_default,
|
|
1996
|
-
props: { icon: "sign-out-alt" }
|
|
1997
|
-
},
|
|
1998
|
-
keywords: [i18n.baseText("auth.signout").toLowerCase()]
|
|
1999
|
-
}
|
|
2000
|
-
]) };
|
|
2001
|
-
}
|
|
2002
|
-
var ITEM_ID = {
|
|
2003
|
-
NEW_SESSION: "new-session",
|
|
2004
|
-
NEW_SESSION_WITH_MODEL: "new-session-with-model",
|
|
2005
|
-
OPEN_SESSION: "open-session",
|
|
2006
|
-
DELETE_SESSION: "delete-session",
|
|
2007
|
-
STOP_MESSAGE_GENERATION: "stop-message-generation"
|
|
2008
|
-
};
|
|
2009
|
-
function useChatHubCommands(options) {
|
|
2010
|
-
const i18n = useI18n();
|
|
2011
|
-
const { lastQuery } = options;
|
|
2012
|
-
const router = useRouter();
|
|
2013
|
-
const route = useRoute();
|
|
2014
|
-
const chatStore = useChatStore();
|
|
2015
|
-
const settingsStore = useSettingsStore();
|
|
2016
|
-
const toast = useToast();
|
|
2017
|
-
const message = useMessage();
|
|
2018
|
-
const currentSessionId = computed(() => (route.name === "chat" || route.name === "chat-conversation") && typeof route.params.id === "string" ? route.params.id : null);
|
|
2019
|
-
const isResponding = computed(() => {
|
|
2020
|
-
if (!currentSessionId.value) return false;
|
|
2021
|
-
return chatStore.isResponding(currentSessionId.value);
|
|
2022
|
-
});
|
|
2023
|
-
async function handleDeleteSession(sessionId) {
|
|
2024
|
-
if (await message.confirm(i18n.baseText("chatHub.session.delete.confirm.message"), i18n.baseText("chatHub.session.delete.confirm.title"), {
|
|
2025
|
-
confirmButtonText: i18n.baseText("chatHub.session.delete.confirm.button"),
|
|
2026
|
-
cancelButtonText: i18n.baseText("chatHub.session.delete.cancel.button")
|
|
2027
|
-
}) !== "confirm") return;
|
|
2028
|
-
try {
|
|
2029
|
-
await chatStore.deleteSession(sessionId);
|
|
2030
|
-
toast.showMessage({
|
|
2031
|
-
type: "success",
|
|
2032
|
-
title: i18n.baseText("chatHub.session.delete.success")
|
|
2033
|
-
});
|
|
2034
|
-
if (sessionId === currentSessionId.value) router.push({ name: CHAT_VIEW });
|
|
2035
|
-
} catch (error) {
|
|
2036
|
-
toast.showError(error, i18n.baseText("chatHub.session.delete.error"));
|
|
2037
|
-
}
|
|
2038
|
-
}
|
|
2039
|
-
const filteredSesssions = computed(() => {
|
|
2040
|
-
const trimmed = (lastQuery.value || "").trim().toLowerCase();
|
|
2041
|
-
const allSesssions = Object.values(chatStore.sessions.byId) ?? [];
|
|
2042
|
-
if (!trimmed) return allSesssions.filter((session) => !!session);
|
|
2043
|
-
return allSesssions.filter((session) => !!session && (session.title?.toLowerCase().includes(trimmed) ?? false));
|
|
2044
|
-
});
|
|
2045
|
-
const filteredModels = computed(() => {
|
|
2046
|
-
const trimmed = (lastQuery.value || "").trim().toLowerCase();
|
|
2047
|
-
const allModels = Object.values(chatStore.agents).flatMap((available) => available.models);
|
|
2048
|
-
if (!trimmed) return allModels;
|
|
2049
|
-
return allModels.filter((model) => {
|
|
2050
|
-
if (!model.metadata.available) return false;
|
|
2051
|
-
const provider = model.model.provider;
|
|
2052
|
-
if (isLlmProvider(provider)) {
|
|
2053
|
-
const settings = settingsStore.moduleSettings?.["chat-hub"]?.providers[provider];
|
|
2054
|
-
if (settings && !settings.enabled) return false;
|
|
2055
|
-
}
|
|
2056
|
-
return model.name?.toLowerCase().includes(trimmed) || model.model.provider?.toLowerCase().includes(trimmed) || providerDisplayNames[model.model.provider]?.toLowerCase().includes(trimmed);
|
|
2057
|
-
});
|
|
2058
|
-
});
|
|
2059
|
-
const openSessionCommand = (session, isRoot) => {
|
|
2060
|
-
let title$1 = session.title;
|
|
2061
|
-
if (isRoot) title$1 = i18n.baseText("generic.openResource", { interpolate: { resource: title$1 } });
|
|
2062
|
-
const section = isRoot ? i18n.baseText("commandBar.sections.chat") : i18n.baseText("commandBar.chat.open");
|
|
2063
|
-
return {
|
|
2064
|
-
id: session.id,
|
|
2065
|
-
title: title$1,
|
|
2066
|
-
section,
|
|
2067
|
-
keywords: [title$1],
|
|
2068
|
-
handler: () => {
|
|
2069
|
-
router.push({
|
|
2070
|
-
name: CHAT_CONVERSATION_VIEW,
|
|
2071
|
-
params: { id: session.id }
|
|
2072
|
-
});
|
|
2073
|
-
}
|
|
2074
|
-
};
|
|
2075
|
-
};
|
|
2076
|
-
const openSessionCommands = computed(() => {
|
|
2077
|
-
return filteredSesssions.value.map((session) => openSessionCommand(session, false));
|
|
2078
|
-
});
|
|
2079
|
-
const deleteSessionCommand = (session, isRoot) => {
|
|
2080
|
-
let title$1 = session.title;
|
|
2081
|
-
if (isRoot) title$1 = i18n.baseText("commandBar.chat.deleteSession", { interpolate: { title: title$1 } });
|
|
2082
|
-
const section = isRoot ? i18n.baseText("commandBar.sections.chat") : i18n.baseText("commandBar.chat.delete");
|
|
2083
|
-
return {
|
|
2084
|
-
id: session.id,
|
|
2085
|
-
title: title$1,
|
|
2086
|
-
section,
|
|
2087
|
-
handler: () => {
|
|
2088
|
-
handleDeleteSession(session.id);
|
|
2089
|
-
}
|
|
2090
|
-
};
|
|
2091
|
-
};
|
|
2092
|
-
const deleteSessionCommands = computed(() => {
|
|
2093
|
-
return filteredSesssions.value.map((session) => deleteSessionCommand(session, false));
|
|
2094
|
-
});
|
|
2095
|
-
const newSessionWithModelCommand = (model) => {
|
|
2096
|
-
return {
|
|
2097
|
-
id: stringifyModel(model.model),
|
|
2098
|
-
title: {
|
|
2099
|
-
component: CommandBarItemTitle_default,
|
|
2100
|
-
props: {
|
|
2101
|
-
title: providerDisplayNames[model.model.provider],
|
|
2102
|
-
suffix: model.name
|
|
2103
|
-
}
|
|
2104
|
-
},
|
|
2105
|
-
section: i18n.baseText("commandBar.chat.newWithModel"),
|
|
2106
|
-
keywords: [model.name, providerDisplayNames[model.model.provider]],
|
|
2107
|
-
handler: () => {
|
|
2108
|
-
router.push({
|
|
2109
|
-
...getAgentRoute(model.model),
|
|
2110
|
-
force: true
|
|
2111
|
-
});
|
|
2112
|
-
}
|
|
2113
|
-
};
|
|
2114
|
-
};
|
|
2115
|
-
const newSessionWithCommands = computed(() => {
|
|
2116
|
-
return filteredModels.value.map((model) => newSessionWithModelCommand(model));
|
|
2117
|
-
});
|
|
2118
|
-
return { commands: computed(() => {
|
|
2119
|
-
const commands = [
|
|
2120
|
-
{
|
|
2121
|
-
id: ITEM_ID.NEW_SESSION,
|
|
2122
|
-
title: i18n.baseText("commandBar.chat.new"),
|
|
2123
|
-
section: i18n.baseText("commandBar.sections.chat"),
|
|
2124
|
-
handler: () => {
|
|
2125
|
-
router.push({
|
|
2126
|
-
name: CHAT_VIEW,
|
|
2127
|
-
force: true
|
|
2128
|
-
});
|
|
2129
|
-
},
|
|
2130
|
-
icon: {
|
|
2131
|
-
component: N8nIcon_default,
|
|
2132
|
-
props: { icon: "plus" }
|
|
2133
|
-
},
|
|
2134
|
-
keywords: [
|
|
2135
|
-
i18n.baseText("commandBar.chat.new"),
|
|
2136
|
-
i18n.baseText("commandBar.sections.chat"),
|
|
2137
|
-
i18n.baseText("generic.create"),
|
|
2138
|
-
i18n.baseText("generic.start")
|
|
2139
|
-
]
|
|
2140
|
-
},
|
|
2141
|
-
{
|
|
2142
|
-
id: ITEM_ID.NEW_SESSION_WITH_MODEL,
|
|
2143
|
-
title: i18n.baseText("commandBar.chat.newWithModel"),
|
|
2144
|
-
section: i18n.baseText("commandBar.sections.chat"),
|
|
2145
|
-
children: newSessionWithCommands.value,
|
|
2146
|
-
icon: {
|
|
2147
|
-
component: N8nIcon_default,
|
|
2148
|
-
props: { icon: "message-square-plus" }
|
|
2149
|
-
},
|
|
2150
|
-
keywords: [
|
|
2151
|
-
i18n.baseText("commandBar.chat.new"),
|
|
2152
|
-
i18n.baseText("commandBar.sections.chat"),
|
|
2153
|
-
i18n.baseText("generic.create"),
|
|
2154
|
-
i18n.baseText("generic.start")
|
|
2155
|
-
]
|
|
2156
|
-
},
|
|
2157
|
-
{
|
|
2158
|
-
id: ITEM_ID.OPEN_SESSION,
|
|
2159
|
-
title: i18n.baseText("commandBar.chat.open"),
|
|
2160
|
-
section: i18n.baseText("commandBar.sections.chat"),
|
|
2161
|
-
placeholder: i18n.baseText("commandBar.chat.open.searchPlaceholder"),
|
|
2162
|
-
children: openSessionCommands.value,
|
|
2163
|
-
icon: {
|
|
2164
|
-
component: N8nIcon_default,
|
|
2165
|
-
props: {
|
|
2166
|
-
icon: "message-square",
|
|
2167
|
-
color: "text-light"
|
|
2168
|
-
}
|
|
2169
|
-
}
|
|
2170
|
-
},
|
|
2171
|
-
{
|
|
2172
|
-
id: ITEM_ID.DELETE_SESSION,
|
|
2173
|
-
title: i18n.baseText("commandBar.chat.delete"),
|
|
2174
|
-
section: i18n.baseText("commandBar.sections.chat"),
|
|
2175
|
-
placeholder: i18n.baseText("commandBar.chat.open.searchPlaceholder"),
|
|
2176
|
-
children: deleteSessionCommands.value,
|
|
2177
|
-
icon: {
|
|
2178
|
-
component: N8nIcon_default,
|
|
2179
|
-
props: {
|
|
2180
|
-
icon: "trash-2",
|
|
2181
|
-
color: "text-light"
|
|
2182
|
-
}
|
|
2183
|
-
}
|
|
2184
|
-
}
|
|
2185
|
-
];
|
|
2186
|
-
if (isResponding.value && currentSessionId.value) commands.push({
|
|
2187
|
-
id: ITEM_ID.STOP_MESSAGE_GENERATION,
|
|
2188
|
-
title: i18n.baseText("commandBar.chat.stop"),
|
|
2189
|
-
section: i18n.baseText("commandBar.sections.chat"),
|
|
2190
|
-
handler: async () => {
|
|
2191
|
-
if (!currentSessionId.value) return;
|
|
2192
|
-
await chatStore.stopStreamingMessage(currentSessionId.value);
|
|
2193
|
-
}
|
|
2194
|
-
});
|
|
2195
|
-
return commands;
|
|
2196
|
-
}) };
|
|
2197
|
-
}
|
|
2198
|
-
function useCommandBar() {
|
|
2199
|
-
const nodeTypesStore = useNodeTypesStore();
|
|
2200
|
-
const projectsStore = useProjectsStore();
|
|
2201
|
-
const workflowStore = useWorkflowsStore();
|
|
2202
|
-
const router = useRouter();
|
|
2203
|
-
const route = useRoute();
|
|
2204
|
-
const postHog = usePostHog();
|
|
2205
|
-
const i18n = useI18n();
|
|
2206
|
-
const telemetry = useTelemetry();
|
|
2207
|
-
const placeholder = i18n.baseText("commandBar.placeholder");
|
|
2208
|
-
const isEnabled = computed(() => postHog.isVariantEnabled(COMMAND_BAR_EXPERIMENT.name, COMMAND_BAR_EXPERIMENT.variant));
|
|
2209
|
-
const activeNodeId = ref(null);
|
|
2210
|
-
const lastQuery = ref("");
|
|
2211
|
-
const currentProjectName = computed(() => {
|
|
2212
|
-
const projectId = route.params.projectId || projectsStore.currentProjectId;
|
|
2213
|
-
if (projectId === projectsStore.personalProject?.id) return "Personal";
|
|
2214
|
-
return projectsStore.myProjects.find((p) => p.id === projectId)?.name ?? "Personal";
|
|
2215
|
-
});
|
|
2216
|
-
const nodeCommandGroup = useNodeCommands({
|
|
2217
|
-
lastQuery,
|
|
2218
|
-
activeNodeId
|
|
2219
|
-
});
|
|
2220
|
-
const workflowCommandGroup = useWorkflowCommands();
|
|
2221
|
-
const executionCommandGroup = useExecutionCommands();
|
|
2222
|
-
const workflowNavigationGroup = useWorkflowNavigationCommands({
|
|
2223
|
-
lastQuery,
|
|
2224
|
-
activeNodeId,
|
|
2225
|
-
currentProjectName
|
|
2226
|
-
});
|
|
2227
|
-
const dataTableNavigationGroup = useDataTableNavigationCommands({
|
|
2228
|
-
lastQuery,
|
|
2229
|
-
activeNodeId,
|
|
2230
|
-
currentProjectName
|
|
2231
|
-
});
|
|
2232
|
-
const credentialNavigationGroup = useCredentialNavigationCommands({
|
|
2233
|
-
lastQuery,
|
|
2234
|
-
activeNodeId,
|
|
2235
|
-
currentProjectName
|
|
2236
|
-
});
|
|
2237
|
-
const executionNavigationGroup = useExecutionNavigationCommands();
|
|
2238
|
-
const projectNavigationGroup = useProjectNavigationCommands({
|
|
2239
|
-
lastQuery,
|
|
2240
|
-
activeNodeId
|
|
2241
|
-
});
|
|
2242
|
-
const genericCommandGroup = useGenericCommands();
|
|
2243
|
-
const recentResourcesGroup = useRecentResources();
|
|
2244
|
-
const chatHubCommandGroup = useChatHubCommands({ lastQuery });
|
|
2245
|
-
const canvasViewGroups = [
|
|
2246
|
-
recentResourcesGroup,
|
|
2247
|
-
nodeCommandGroup,
|
|
2248
|
-
workflowCommandGroup,
|
|
2249
|
-
workflowNavigationGroup,
|
|
2250
|
-
genericCommandGroup
|
|
2251
|
-
];
|
|
2252
|
-
const executionViewGroups = [
|
|
2253
|
-
recentResourcesGroup,
|
|
2254
|
-
executionCommandGroup,
|
|
2255
|
-
workflowNavigationGroup,
|
|
2256
|
-
projectNavigationGroup,
|
|
2257
|
-
credentialNavigationGroup,
|
|
2258
|
-
dataTableNavigationGroup,
|
|
2259
|
-
executionNavigationGroup,
|
|
2260
|
-
genericCommandGroup
|
|
2261
|
-
];
|
|
2262
|
-
const workflowsListViewGroups = [
|
|
2263
|
-
recentResourcesGroup,
|
|
2264
|
-
workflowNavigationGroup,
|
|
2265
|
-
projectNavigationGroup,
|
|
2266
|
-
credentialNavigationGroup,
|
|
2267
|
-
dataTableNavigationGroup,
|
|
2268
|
-
executionNavigationGroup,
|
|
2269
|
-
genericCommandGroup
|
|
2270
|
-
];
|
|
2271
|
-
const credentialsListViewGroups = [
|
|
2272
|
-
recentResourcesGroup,
|
|
2273
|
-
credentialNavigationGroup,
|
|
2274
|
-
projectNavigationGroup,
|
|
2275
|
-
workflowNavigationGroup,
|
|
2276
|
-
dataTableNavigationGroup,
|
|
2277
|
-
executionNavigationGroup,
|
|
2278
|
-
genericCommandGroup
|
|
2279
|
-
];
|
|
2280
|
-
const executionsListViewGroups = [
|
|
2281
|
-
recentResourcesGroup,
|
|
2282
|
-
workflowNavigationGroup,
|
|
2283
|
-
projectNavigationGroup,
|
|
2284
|
-
credentialNavigationGroup,
|
|
2285
|
-
dataTableNavigationGroup,
|
|
2286
|
-
genericCommandGroup
|
|
2287
|
-
];
|
|
2288
|
-
const dataStoresListViewGroups = [
|
|
2289
|
-
recentResourcesGroup,
|
|
2290
|
-
dataTableNavigationGroup,
|
|
2291
|
-
projectNavigationGroup,
|
|
2292
|
-
workflowNavigationGroup,
|
|
2293
|
-
credentialNavigationGroup,
|
|
2294
|
-
executionNavigationGroup,
|
|
2295
|
-
genericCommandGroup
|
|
2296
|
-
];
|
|
2297
|
-
const evaluationViewGroups = [
|
|
2298
|
-
recentResourcesGroup,
|
|
2299
|
-
workflowNavigationGroup,
|
|
2300
|
-
projectNavigationGroup,
|
|
2301
|
-
credentialNavigationGroup,
|
|
2302
|
-
dataTableNavigationGroup,
|
|
2303
|
-
executionNavigationGroup,
|
|
2304
|
-
genericCommandGroup
|
|
2305
|
-
];
|
|
2306
|
-
const chatHubViewGroups = [
|
|
2307
|
-
chatHubCommandGroup,
|
|
2308
|
-
recentResourcesGroup,
|
|
2309
|
-
genericCommandGroup,
|
|
2310
|
-
projectNavigationGroup,
|
|
2311
|
-
workflowNavigationGroup,
|
|
2312
|
-
credentialNavigationGroup,
|
|
2313
|
-
dataTableNavigationGroup,
|
|
2314
|
-
executionNavigationGroup
|
|
2315
|
-
];
|
|
2316
|
-
const fallbackViewCommands = [
|
|
2317
|
-
recentResourcesGroup,
|
|
2318
|
-
projectNavigationGroup,
|
|
2319
|
-
workflowNavigationGroup,
|
|
2320
|
-
credentialNavigationGroup,
|
|
2321
|
-
dataTableNavigationGroup,
|
|
2322
|
-
executionNavigationGroup,
|
|
2323
|
-
genericCommandGroup
|
|
2324
|
-
];
|
|
2325
|
-
const activeCommandGroups = computed(() => {
|
|
2326
|
-
switch (router.currentRoute.value.name) {
|
|
2327
|
-
case VIEWS.WORKFLOW:
|
|
2328
|
-
case VIEWS.NEW_WORKFLOW: return canvasViewGroups;
|
|
2329
|
-
case VIEWS.EXECUTION_PREVIEW:
|
|
2330
|
-
case VIEWS.EXECUTION_DEBUG: return executionViewGroups;
|
|
2331
|
-
case VIEWS.WORKFLOWS:
|
|
2332
|
-
case VIEWS.PROJECTS_WORKFLOWS: return workflowsListViewGroups;
|
|
2333
|
-
case VIEWS.CREDENTIALS:
|
|
2334
|
-
case VIEWS.PROJECTS_CREDENTIALS: return credentialsListViewGroups;
|
|
2335
|
-
case VIEWS.EXECUTIONS:
|
|
2336
|
-
case VIEWS.PROJECTS_EXECUTIONS: return executionsListViewGroups;
|
|
2337
|
-
case PROJECT_DATA_TABLES:
|
|
2338
|
-
case DATA_TABLE_VIEW: return dataStoresListViewGroups;
|
|
2339
|
-
case VIEWS.EVALUATION:
|
|
2340
|
-
case VIEWS.EVALUATION_EDIT:
|
|
2341
|
-
case VIEWS.EVALUATION_RUNS_DETAIL: return evaluationViewGroups;
|
|
2342
|
-
case CHAT_VIEW:
|
|
2343
|
-
case CHAT_CONVERSATION_VIEW:
|
|
2344
|
-
case CHAT_PERSONAL_AGENTS_VIEW:
|
|
2345
|
-
case CHAT_WORKFLOW_AGENTS_VIEW: return chatHubViewGroups;
|
|
2346
|
-
default: return fallbackViewCommands;
|
|
2347
|
-
}
|
|
2348
|
-
});
|
|
2349
|
-
const context = computed(() => {
|
|
2350
|
-
switch (router.currentRoute.value.name) {
|
|
2351
|
-
case VIEWS.WORKFLOW:
|
|
2352
|
-
case VIEWS.NEW_WORKFLOW: return workflowStore.workflow.name ? i18n.baseText("commandBar.sections.workflow") + " ⋅ " + workflowStore.workflow.name : "";
|
|
2353
|
-
case VIEWS.EXECUTION_PREVIEW:
|
|
2354
|
-
case VIEWS.EXECUTION_DEBUG: return workflowStore.workflow.name ? i18n.baseText("commandBar.sections.execution") + " ⋅ " + workflowStore.workflow.name : "";
|
|
2355
|
-
case VIEWS.EVALUATION:
|
|
2356
|
-
case VIEWS.EVALUATION_EDIT:
|
|
2357
|
-
case VIEWS.EVALUATION_RUNS_DETAIL: return workflowStore.workflow.name ? " ⋅ " + workflowStore.workflow.name : "";
|
|
2358
|
-
default: return "";
|
|
2359
|
-
}
|
|
2360
|
-
});
|
|
2361
|
-
const trackCommand = (item, view, parentItem) => {
|
|
2362
|
-
telemetry.track("User executed command bar command", {
|
|
2363
|
-
command_id: item.id,
|
|
2364
|
-
command_section: item.section,
|
|
2365
|
-
view,
|
|
2366
|
-
parent_command_id: parentItem?.id
|
|
2367
|
-
});
|
|
2368
|
-
};
|
|
2369
|
-
const wrapItemWithTelemetry = (item) => {
|
|
2370
|
-
const wrappedItem = { ...item };
|
|
2371
|
-
const routeName = (router.currentRoute.value.name ?? "").toString();
|
|
2372
|
-
if (item.handler) {
|
|
2373
|
-
const originalHandler = item.handler;
|
|
2374
|
-
wrappedItem.handler = async () => {
|
|
2375
|
-
trackCommand(item, routeName);
|
|
2376
|
-
return await originalHandler();
|
|
2377
|
-
};
|
|
2378
|
-
}
|
|
2379
|
-
if (item.children) wrappedItem.children = item.children.map((child) => {
|
|
2380
|
-
if (child.handler) {
|
|
2381
|
-
const originalChildHandler = child.handler;
|
|
2382
|
-
return {
|
|
2383
|
-
...child,
|
|
2384
|
-
handler: async () => {
|
|
2385
|
-
trackCommand(child, routeName, item);
|
|
2386
|
-
return await originalChildHandler();
|
|
2387
|
-
}
|
|
2388
|
-
};
|
|
2389
|
-
}
|
|
2390
|
-
return child;
|
|
2391
|
-
});
|
|
2392
|
-
return wrappedItem;
|
|
2393
|
-
};
|
|
2394
|
-
const items = computed(() => {
|
|
2395
|
-
return activeCommandGroups.value.flatMap((group) => group.commands.value).map(wrapItemWithTelemetry);
|
|
2396
|
-
});
|
|
2397
|
-
const isLoading = computed(() => {
|
|
2398
|
-
return activeCommandGroups.value.some((group) => group.isLoading?.value === true);
|
|
2399
|
-
});
|
|
2400
|
-
function onCommandBarChange(query) {
|
|
2401
|
-
lastQuery.value = query;
|
|
2402
|
-
for (const group of activeCommandGroups.value) if (group.handlers?.onCommandBarChange) group.handlers.onCommandBarChange(query);
|
|
2403
|
-
}
|
|
2404
|
-
function onCommandBarNavigateTo(to) {
|
|
2405
|
-
for (const group of activeCommandGroups.value) if (group.handlers?.onCommandBarNavigateTo) group.handlers.onCommandBarNavigateTo(to);
|
|
2406
|
-
}
|
|
2407
|
-
async function initialize() {
|
|
2408
|
-
await nodeTypesStore.loadNodeTypesIfNotLoaded();
|
|
2409
|
-
const initPromises = activeCommandGroups.value.map(async (group) => {
|
|
2410
|
-
if (group.initialize) await group.initialize();
|
|
2411
|
-
});
|
|
2412
|
-
await Promise.all(initPromises);
|
|
2413
|
-
}
|
|
2414
|
-
return {
|
|
2415
|
-
isEnabled,
|
|
2416
|
-
items,
|
|
2417
|
-
initialize,
|
|
2418
|
-
onCommandBarChange,
|
|
2419
|
-
onCommandBarNavigateTo,
|
|
2420
|
-
placeholder,
|
|
2421
|
-
context,
|
|
2422
|
-
isLoading
|
|
2423
|
-
};
|
|
2424
|
-
}
|
|
2425
|
-
export { useDebugInfo as a, useGlobalEntityCreation as i, useBugReporting as n, EXTERNAL_LINKS as r, useCommandBar as t };
|