n8n-editor-ui 1.118.1 → 1.119.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.build/cache-marker +1 -1
- package/.build/node-popularity.json +1987 -1987
- package/README.md +1 -1
- package/dist/assets/{AddDataTableModal-i8GQtKYX.js → AddDataTableModal-78UiDOZ6.js} +20 -20
- package/dist/assets/AnimatedSpinner-CoP6Lyme.css +39 -0
- package/dist/assets/{AnimatedSpinner-DRB4A7Dx.js → AnimatedSpinner-Dd4F9nQ8.js} +2 -2
- package/dist/assets/{AnnotationTagsDropdown.ee-DV_Mobmt.js → AnnotationTagsDropdown.ee-B5SGfmxY.js} +2 -3
- package/dist/assets/{AuthView-BucJoBVs.js → AuthView-CaCXt20h.js} +6 -6
- package/dist/assets/{ChangePasswordView-mVWAZ3kL.js → ChangePasswordView-sh87mWR6.js} +12 -12
- package/dist/assets/ChatAgentsView-4SiYQ9YJ.js +339 -0
- package/dist/assets/{SettingsUsageAndPlan-pptm91gP.css → ChatAgentsView-Be_TXcAc.css} +94 -68
- package/dist/assets/{ChatSidebar-CXnF23Sm.js → ChatSidebar-C0XXqw3v.js} +38 -31
- package/dist/assets/{ChatView-BOWzOn2x.js → ChatView-BlkLzP1X.js} +345 -502
- package/dist/assets/{ChatView-tcBlz_g5.css → ChatView-DHznMgQO.css} +60 -349
- package/dist/assets/CollectionParameter-C5ROyrxR.js +58 -0
- package/dist/assets/{CommunityNodeUpdateInfo-Bk-rYnfU.js → CommunityNodeUpdateInfo-rHUGLO4H.js} +9 -9
- package/dist/assets/{CopyInput-CwgZTYF4.css → CopyInput-BiDmlr9B.css} +12 -10
- package/dist/assets/{CopyInput-DQBVF_BG.js → CopyInput-DX-FL085.js} +11 -11
- package/dist/assets/{CredentialIcon-BmzfYSyO.js → CredentialIcon-DS3l06t2.js} +2 -2
- package/dist/assets/{CredentialsView-VSMpVIfN.js → CredentialsView-C3SKDwtI.js} +33 -34
- package/dist/assets/{DataTableActions-CLoVJ5kV.js → DataTableActions-lgRuMb9F.js} +7 -7
- package/dist/assets/{DataTableDetailsView-B8wQLLu_.js → DataTableDetailsView-CoWw-4gy.js} +24 -24
- package/dist/assets/{DataTableDetailsView-CxS46D7a.css → DataTableDetailsView-D4DdqXoL.css} +46 -49
- package/dist/assets/{DataTableView-D2eeWDUi.js → DataTableView-hUsgVnZS.js} +30 -31
- package/dist/assets/DemoFooter-C4xOK61v.js +71 -0
- package/dist/assets/{Draggable-BSa80qci.js → Draggable-DFf4aD-Y.js} +1 -1
- package/dist/assets/{EmptySharedSectionActionBox-32M48kPX.js → EmptySharedSectionActionBox-BkPu0yI0.js} +4 -4
- package/dist/assets/{EnterpriseEdition.ee-B_ZSY4rl.js → EnterpriseEdition.ee-BoNEV-MB.js} +1 -1
- package/dist/assets/{EntityNotFound-CKlXW1IL.js → EntityNotFound-Bs-aLs3W.js} +5 -5
- package/dist/assets/{EntityNotFound-DfstTvbZ.css → EntityNotFound-D6gi5ngN.css} +2 -2
- package/dist/assets/{EntityUnAuthorised-DB0HgLOM.js → EntityUnAuthorised-BwhGn6eD.js} +5 -5
- package/dist/assets/{EntityUnAuthorised-C6EIQ1Pq.css → EntityUnAuthorised-D3XTbU6Y.css} +2 -2
- package/dist/assets/{ErrorView-DAsa-PS_.js → ErrorView-Cvlb8nm0.js} +6 -6
- package/dist/assets/{EvaluationsRootView-CcJipqTv.js → EvaluationsRootView-BoWo5n7U.js} +23 -23
- package/dist/assets/{EvaluationsView-DsfXDJ-U.css → EvaluationsView-CmcDUAS_.css} +6 -6
- package/dist/assets/{EvaluationsView-Dr4m1cGH.js → EvaluationsView-DxiPOlGL.js} +22 -22
- package/dist/assets/{ExecutionsTime-qhi9xQEs.css → ExecutionsTime-BpajgDjV.css} +6 -6
- package/dist/assets/{ExecutionsTime-DQ0lKlTn.js → ExecutionsTime-DwXL-TY4.js} +10 -10
- package/dist/assets/{ExecutionsView-D4k3uqTy.js → ExecutionsView-B4XGhWmY.js} +52 -42
- package/dist/assets/{ExecutionsView-f-kKRR2k.css → ExecutionsView-DP5OXlS4.css} +6 -6
- package/dist/assets/{ExternalSecretsProviderConnectionSwitch-Df3YK0La.css → ExternalSecretsProviderConnectionSwitch-dpp96SMy.css} +2 -2
- package/dist/assets/{ExternalSecretsProviderConnectionSwitch.ee-ps4K4bOK.js → ExternalSecretsProviderConnectionSwitch.ee-DCTg0mdX.js} +5 -5
- package/dist/assets/{FixedCollectionParameter-C8Nz7bot.js → FixedCollectionParameter-CbrkbI18.js} +49 -49
- package/dist/assets/{FixedCollectionParameter-BkEju_IA.css → FixedCollectionParameter-CgkIJeik.css} +19 -19
- package/dist/assets/{ForgotMyPasswordView-B9XpVVQb.js → ForgotMyPasswordView-KkAVBYit.js} +12 -12
- package/dist/assets/{InsightsChartAverageRuntime-B9_qwMgO.js → InsightsChartAverageRuntime-D5Gh8Rz5.js} +8 -8
- package/dist/assets/{InsightsChartFailed-D8rDUthj.js → InsightsChartFailed-D7PZ_ctV.js} +7 -7
- package/dist/assets/{InsightsChartFailureRate-D7MEDAWL.js → InsightsChartFailureRate-CpPU5Kwd.js} +8 -8
- package/dist/assets/{InsightsChartTimeSaved-BjEX9cpj.js → InsightsChartTimeSaved-DYrv2t2N.js} +8 -8
- package/dist/assets/{InsightsChartTotal-f6iwgPv4.js → InsightsChartTotal-CNqL-Qn3.js} +7 -7
- package/dist/assets/{InsightsDashboard-CXRybzGm.css → InsightsDashboard-B5vBl-U6.css} +24 -24
- package/dist/assets/{InsightsDashboard-DgPTPhXD.js → InsightsDashboard-CrJZtNDS.js} +54 -49
- package/dist/assets/{InsightsPaywall-C_Osp3Xn.js → InsightsPaywall-DxgcxZ5z.js} +13 -13
- package/dist/assets/{InsightsSummary-CAapTcha.js → InsightsSummary-Bew3_p6D.js} +18 -18
- package/dist/assets/{InsightsSummary-BazqPYQ0.css → InsightsSummary-D4HBxG4I.css} +26 -26
- package/dist/assets/{InsightsTableWorkflows-BY4sevh1.js → InsightsTableWorkflows-TAIASHgR.js} +13 -13
- package/dist/assets/{ItemsRenderer-CTbNG2s3.js → ItemsRenderer-CDnrNwFM.js} +21 -25
- package/dist/assets/{ItemsRenderer-B89wKDHQ.css → ItemsRenderer-Cr6c6uYy.css} +21 -21
- package/dist/assets/{KeyboardShortcutTooltip-CXKgjDIT.js → KeyboardShortcutTooltip-y1pBqAge.js} +1 -1
- package/dist/assets/LogsPanel-DO45i29S.js +58 -0
- package/dist/assets/{LogsPanel-BSFP3TRR.js → LogsPanel-DjqKF4Sg.js} +35 -35
- package/dist/assets/{LogsPanel-K1M_gOCT.css → LogsPanel-GVBE8bfm.css} +17 -17
- package/dist/assets/{MainHeader-Dwzc_Fak.js → MainHeader-BSUhbWAN.js} +53 -53
- package/dist/assets/{MainHeader-QMv9Ba5g.css → MainHeader-Dz9UViYg.css} +22 -22
- package/dist/assets/{MainSidebar-BqoiqeXY.css → MainSidebar-BBUhoceu.css} +15 -15
- package/dist/assets/{MainSidebar-fP7bVKd-.js → MainSidebar-DIKtZSUX.js} +50 -43
- package/dist/assets/{MainSidebarUserArea-DZmO7pT1.js → MainSidebarUserArea-UHX8ACa4.js} +5 -5
- package/dist/assets/{Modal-C6HnfA6j.css → Modal-DNkRJkUt.css} +5 -5
- package/dist/assets/{Modal-B8k7lYVM.js → Modal-DwutFKNY.js} +12 -12
- package/dist/assets/{ModalDrawer-K2QDXW8H.js → ModalDrawer-B2sNzJVm.js} +6 -6
- package/dist/assets/{NDVEmptyState-CFiiknri.js → NDVEmptyState-DdpBamQ9.js} +1 -1
- package/dist/assets/{NodeCreation-Bbr4mTby.js → NodeCreation-C1Hw9qFl.js} +44 -44
- package/dist/assets/{NodeCreator-C-oYFkbs.css → NodeCreator-JpUhf2LN.css} +63 -52
- package/dist/assets/{NodeCreator-CE-6q5bn.js → NodeCreator-ZjTzj0ie.js} +63 -61
- package/dist/assets/{NodeDetailsView-CTnk_X5i.js → NodeDetailsView-CvvoyhiW.js} +64 -64
- package/dist/assets/{NodeDetailsViewV2-rAVfbsOa.css → NodeDetailsViewV2-Ckt2LIo-.css} +19 -19
- package/dist/assets/{NodeDetailsViewV2-REUcA-GA.js → NodeDetailsViewV2-yMKVDJ3k.js} +77 -77
- package/dist/assets/{NodeIcon-Bbl9Jpsi.js → NodeIcon-C-rkj6sB.js} +7 -6
- package/dist/assets/{NodeIcon-C-Ise6x6.css → NodeIcon-eaW3atZy.css} +2 -2
- package/dist/assets/{NodeSettings-B50suDD9.css → NodeSettings-DKlYbu9E.css} +80 -77
- package/dist/assets/{NodeSettings-BKd6Pbpi.js → NodeSettings-Dr-l_1nO.js} +35 -35
- package/dist/assets/{NodeView-KpAB56Z3.css → NodeView-CnbgHMAv.css} +25 -26
- package/dist/assets/{NodeView-BjGTiM1O.js → NodeView-DUcpE7do.js} +97 -97
- package/dist/assets/{PageViewLayout-CCwb27rd.js → PageViewLayout-Ccqeja5V.js} +2 -2
- package/dist/assets/{PageViewLayout-BIiboMgG.css → PageViewLayout-Cn6FD0Wt.css} +4 -4
- package/dist/assets/{ParameterInputList-CtoyrDjR.js → ParameterInputList-BzN5Xx73.js} +175 -171
- package/dist/assets/{ParameterInputList-aGPYvt18.css → ParameterInputList-D18bFGrO.css} +265 -265
- package/dist/assets/{PrebuiltAgentTemplatesView-C6IbTjn9.js → PrebuiltAgentTemplatesView-BTy_QfVt.js} +15 -15
- package/dist/assets/{ProjectBreadcrumb-CmmsF90D.js → ProjectBreadcrumb-scGlGqYf.js} +4 -4
- package/dist/assets/{ProjectCardBadge-SSY0HK9w.js → ProjectCardBadge-p4AY0ubu.js} +5 -5
- package/dist/assets/{ProjectHeader-BRHPT2Gf.js → ProjectHeader-BZeiGuD6.js} +34 -11
- package/dist/assets/{ProjectIcon-Doey-RQc.js → ProjectIcon-DqKjDNbR.js} +1 -1
- package/dist/assets/{ProjectRoleView-Dz82Hr5N.js → ProjectRoleView-ByzrSQP-.js} +22 -22
- package/dist/assets/{ProjectRoleView-Cewy9KCA.css → ProjectRoleView-Ds9qdhh9.css} +12 -12
- package/dist/assets/{ProjectRolesView-JblQF33a.js → ProjectRolesView-DclD8eEm.js} +16 -16
- package/dist/assets/{ProjectSettings-1ZQGH61x.js → ProjectSettings-4wa93sE4.js} +36 -37
- package/dist/assets/{ProjectSettings-BQOluc3A.css → ProjectSettings-vir6puPd.css} +23 -23
- package/dist/assets/{ProjectSharing-CRwSdefc.js → ProjectSharing-BVPUxo_M.js} +5 -5
- package/dist/assets/ProjectVariables-eH7fm87s.css +421 -0
- package/dist/assets/{ProjectVariables-BKV1_OBU.js → ProjectVariables-x9spBaqX.js} +86 -79
- package/dist/assets/{PushConnectionTracker-V3T3vpnB.js → PushConnectionTracker-DYamPLyc.js} +3 -3
- package/dist/assets/{ResourcesListLayout-B8d0Asrt.css → ResourcesListLayout-BXBf2iZI.css} +8 -8
- package/dist/assets/{ResourcesListLayout-BYno1UYD.js → ResourcesListLayout-UXbxK1S7.js} +11 -11
- package/dist/assets/{RunDataHtml-DCb1Egc3.js → RunDataHtml-X9lzUZaX.js} +1 -1
- package/dist/assets/{RunDataJson-7ml4EtqQ.js → RunDataJson-CxLotBq-.js} +14 -14
- package/dist/assets/{RunDataJsonActions-D534H82r.js → RunDataJsonActions-qylVa2u8.js} +12 -12
- package/dist/assets/{RunDataParsedAiContent-FqLolSOE.js → RunDataParsedAiContent-Cs80jq_q.js} +8 -8
- package/dist/assets/RunDataParsedAiContent-DBP5JHe4.js +25 -0
- package/dist/assets/{RunDataSearch-DYsCHxYY.js → RunDataSearch-BvoYWH8W.js} +7 -7
- package/dist/assets/{RunDataTable-CnUH-sL_.css → RunDataTable-HBCyaP8o.css} +54 -54
- package/dist/assets/{RunDataTable-D5O-BPg9.js → RunDataTable-d3eXUdSg.js} +44 -44
- package/dist/assets/{SamlOnboarding-EExl-EAp.js → SamlOnboarding-CRtDDWqf.js} +12 -12
- package/dist/assets/{SaveButton-C2Gkwcd6.js → SaveButton-D1iDaopV.js} +3 -3
- package/dist/assets/{SelectedItemsInfo-BO9w2ntq.js → SelectedItemsInfo-CSzniBOD.js} +2 -2
- package/dist/assets/{SettingsApiView-DHCr1LrA.js → SettingsApiView-DqnHEaAj.js} +17 -17
- package/dist/assets/{SettingsCommunityNodesView-3swLF8oI.js → SettingsCommunityNodesView-BzheuUxN.js} +31 -32
- package/dist/assets/{SettingsExternalSecrets-Czm8izQh.js → SettingsExternalSecrets-CqTHs6zk.js} +15 -15
- package/dist/assets/{SettingsLdapView-KgMO_1GA.css → SettingsLdapView-BuamZyhu.css} +11 -11
- package/dist/assets/{SettingsLdapView-DOse-1bN.js → SettingsLdapView-zifHhZKy.js} +25 -25
- package/dist/assets/{SettingsLogStreamingView-BVSln3cm.js → SettingsLogStreamingView-CQwuqSl8.js} +17 -17
- package/dist/assets/{SettingsMCPView-B9w3XrA9.js → SettingsMCPView-3CpNrA5D.js} +36 -35
- package/dist/assets/{SettingsPersonalView-DWGs5wge.js → SettingsPersonalView-C1NF8zuk.js} +22 -22
- package/dist/assets/{SettingsPersonalView-D6LtKnaF.css → SettingsPersonalView-DEpYU3TT.css} +14 -17
- package/dist/assets/{SettingsProvisioningView-Bd7_e49M.js → SettingsProvisioningView-BFUB6c2Z.js} +10 -10
- package/dist/assets/{SettingsSourceControl-BmJrrMbt.js → SettingsSourceControl-CZryQCqT.js} +17 -17
- package/dist/assets/{SettingsSso-LCXnYtLn.js → SettingsSso-CeeFO_Pv.js} +18 -18
- package/dist/assets/SettingsUsageAndPlan-DLcBOCSU.css +462 -0
- package/dist/assets/{SettingsUsageAndPlan-BcyB9_cH.js → SettingsUsageAndPlan-M1DF8QfE.js} +139 -22
- package/dist/assets/{SettingsUsersView-8_Y7zQMz.js → SettingsUsersView-DWVyE4hY.js} +23 -18
- package/dist/assets/{SettingsView-BdM6C-Pa.js → SettingsView-trF6L-tM.js} +8 -8
- package/dist/assets/{SetupTemplateFormStep-vegHZ86T.js → SetupTemplateFormStep-BsgzR5CN.js} +6 -6
- package/dist/assets/{SetupView-DXmGJi1C.js → SetupView-Bx4ZLcja.js} +12 -12
- package/dist/assets/{SetupWorkflowCredentialsButton-Gbq-mJNZ.js → SetupWorkflowCredentialsButton-DR_aufFd.js} +9 -9
- package/dist/assets/{SetupWorkflowFromTemplateView-B77sQQ6O.js → SetupWorkflowFromTemplateView-Ded77Ph-.js} +18 -18
- package/dist/assets/{SigninView-Di3btl9A.js → SigninView-DXPofyPm.js} +13 -13
- package/dist/assets/{SignoutView-WKs5gvAj.js → SignoutView-B7H_dRJO.js} +9 -9
- package/dist/assets/{SignupView-BM4OXX-x.js → SignupView-BHWVvwh8.js} +12 -12
- package/dist/assets/{TagsDropdown-B9w42ULo.js → TagsDropdown-D6CYk5R8.js} +4 -5
- package/dist/assets/{TemplateDetails-DNyPiFTw.js → TemplateDetails-ezK9JOOl.js} +7 -7
- package/dist/assets/{TemplateList-C7Gtb7cW.js → TemplateList-DztR2yKa.js} +5 -5
- package/dist/assets/{TemplatesCollectionView-DdMjHvDQ.js → TemplatesCollectionView-Bu_YRd84.js} +20 -20
- package/dist/assets/{TemplatesSearchView-BtUlSZXh.js → TemplatesSearchView-C7zBEV2b.js} +18 -18
- package/dist/assets/{TemplatesView-FCDPW2Yq.js → TemplatesView-BnozPkTX.js} +7 -7
- package/dist/assets/{TemplatesView-BgdyYmrL.css → TemplatesView-iSPzXjQB.css} +6 -6
- package/dist/assets/{TemplatesWorkflowView-B8_w-yL7.js → TemplatesWorkflowView-BTyHc3MG.js} +22 -22
- package/dist/assets/{TestRunDetailView-CEE1M2hn.js → TestRunDetailView-B76TM9u8.js} +36 -36
- package/dist/assets/{TestRunDetailView-DkQcfFP4.css → TestRunDetailView-CVGty0j0.css} +28 -28
- package/dist/assets/{TimeAgo-FvYQex-v.js → TimeAgo-Gv5h1Utx.js} +2 -2
- package/dist/assets/{TriggerPanel-DqHc-mXl.js → TriggerPanel-BD9WuZSq.js} +28 -28
- package/dist/assets/{TriggerPanel-D5WejHyJ.css → TriggerPanel-BQveVt6Q.css} +19 -19
- package/dist/assets/{VirtualSchema-CSh2c6Ec.css → VirtualSchema-BJ-Q30Fz.css} +51 -49
- package/dist/assets/{VirtualSchema-CC3sIZuJ.js → VirtualSchema-BwIrkOUg.js} +21 -21
- package/dist/assets/VirtualSchema-ksNVivg3.js +43 -0
- package/dist/assets/{VueMarkdown-70GnkI0W.js → VueMarkdown-CiR4a0gO.js} +1 -1
- package/dist/assets/{WorkerView-a-85mW7s.js → WorkerView-DNyW9R8a.js} +36 -39
- package/dist/assets/{WorkflowActivator-BNp0duVE.css → WorkflowActivator-DSgMORP6.css} +2 -2
- package/dist/assets/{WorkflowActivator-FQDQyW1o.js → WorkflowActivator-k3HTYXbc.js} +9 -9
- package/dist/assets/{WorkflowExecutionsInfoAccordion-JHl30LoQ.js → WorkflowExecutionsInfoAccordion-DL5cBkbK.js} +7 -7
- package/dist/assets/{WorkflowExecutionsLandingPage-CcJ9U18X.js → WorkflowExecutionsLandingPage-DlXz9Jry.js} +18 -18
- package/dist/assets/{WorkflowExecutionsPreview-BYWh0GBH.js → WorkflowExecutionsPreview-DJWD2i74.js} +22 -22
- package/dist/assets/{WorkflowExecutionsView-FCkyyfKq.js → WorkflowExecutionsView-4l7hfPcb.js} +71 -71
- package/dist/assets/{WorkflowExecutionsView-9RB5OO5c.css → WorkflowExecutionsView-J4lWGYW8.css} +36 -36
- package/dist/assets/{WorkflowHistory-BDm1H5BL.js → WorkflowHistory-Cb-ZoRBp.js} +26 -35
- package/dist/assets/{WorkflowOnboardingView-BZP0l2UH.js → WorkflowOnboardingView-CguOMlib.js} +8 -8
- package/dist/assets/{WorkflowPreview-Bt03akXc.css → WorkflowPreview-CYpzxJej.css} +8 -8
- package/dist/assets/{WorkflowPreview-CQzIuWsu.js → WorkflowPreview-DY79uYFw.js} +12 -12
- package/dist/assets/{WorkflowTagsDropdown-C4m2b8q6.js → WorkflowTagsDropdown-CdEFZM1A.js} +2 -3
- package/dist/assets/{WorkflowsView-CUeNwQmg.js → WorkflowsView-DIavWNuQ.js} +53 -49
- package/dist/assets/{_MapCache-BGBKpT5S.js → _MapCache-Byd-DTfo.js} +50 -12
- package/dist/assets/{apiKeys.store-CHTKph22.js → apiKeys.store-CPsBJKkq.js} +1 -1
- package/dist/assets/{assistant.store-D6Fihh2i.js → assistant.store-DvuxtpS4.js} +16 -8
- package/dist/assets/{auth.eventBus-CUpasXbj.js → auth.eventBus-YsWbuB84.js} +1 -1
- package/dist/assets/{VariablesView-PPP4k5c3.css → banners-UK5wWFEI.css} +21 -25
- package/dist/assets/banners.store-BQPwuqhn.js +192 -0
- package/dist/assets/{chartjs.utils-DrHDj0Lr.js → chartjs.utils-Bf07Y-P-.js} +3 -3
- package/dist/assets/{chatPanel.store-Dt9ypdvG.js → chatPanel.store-fM-8PK9i.js} +4 -4
- package/dist/assets/{cloudPlan.store-x1IpiElw.js → cloudPlan.store-DrraBpZJ.js} +18 -3
- package/dist/assets/{col-b1w4xo57.js → col-DK_GtMhM.js} +3 -3
- package/dist/assets/{constants-DlQs6Cav.js → constants-CPQyU8WO.js} +4 -2
- package/dist/assets/{constants-B1JYxPAR.js → constants-DvlTm3U4.js} +402 -313
- package/dist/assets/{core-CGHB7oTc.js → core-6lPsS9S5.js} +1 -1
- package/dist/assets/{dataTable.store-Bgg7dsRy.js → dataTable.store-u9fGWest.js} +2 -2
- package/dist/assets/{date-picker-YLC0sjSf.js → date-picker-CVSd-BRt.js} +3 -3
- package/dist/assets/{dateFormatter-jkly8a5N.js → dateFormatter-BD73Za8B.js} +1 -1
- package/dist/assets/{dialog-B1U4ND70.js → dialog-BMoy5MDa.js} +4 -4
- package/dist/assets/{dist-BCqe3G7U.js → dist-CWw8iddm.js} +1 -1
- package/dist/assets/{es-BO7MlKL2.js → es-BazDU8Wd.js} +1 -1
- package/dist/assets/{evaluation.constants-BLT71nuf.js → evaluation.constants-CIiAC2dT.js} +3 -3
- package/dist/assets/{executions.store-DmR1JjSC.js → executions.store-IU9p1s46.js} +1 -1
- package/dist/assets/{externalSecrets.ee.store-px6HohWF.js → externalSecrets.ee.store-1z63wMHN.js} +2 -2
- package/dist/assets/{focusPanel.store-Pqc2v-Ms.js → focusPanel.store-BJpwjMIG.js} +4 -4
- package/dist/assets/{folders.store-x8KuYpUo.js → folders.store-Db975T-w.js} +2 -2
- package/dist/assets/{icon-C8yfF1LY.js → icon-DhADuA9N.js} +1 -1
- package/dist/assets/{index-D9KM9gTZ.css → index-C8erHZ_Y.css} +492 -321
- package/dist/assets/{index-C4u3WVDF.js → index-Dqdzxupj.js} +615 -519
- package/dist/assets/{insights.store-LOsCbJQU.js → insights.store-DC_enAA-.js} +16 -8
- package/dist/assets/{insights.utils-7zZgNSKk.js → insights.utils-ClJRVRAK.js} +2 -2
- package/dist/assets/{isEmpty-CRyMT0C3.js → isEmpty-BLwDER56.js} +144 -120
- package/dist/assets/{isEmpty-B-mcFJ04.css → isEmpty-CAtRkxE7.css} +101 -101
- package/dist/assets/{languageModules-B8UNBljm.js → languageModules-CNluY7w0.js} +1 -1
- package/dist/assets/{logStreaming.store-DUt3HvR4.js → logStreaming.store-CPvxjcQB.js} +1 -1
- package/dist/assets/{mcp.store-Cwt_hzwD.js → mcp.store-YGfe2oZU.js} +2 -2
- package/dist/assets/{merge-Db6rb1_m.js → merge-CKEa8BM2.js} +1 -1
- package/dist/assets/{nodeCreator.store-DDUlc1Wi.js → nodeCreator.store-Cxxl141g.js} +1995 -1995
- package/dist/assets/nodeIcon-ry_JIpAT.js +98 -0
- package/dist/assets/{nodeTransforms-CJd0FLm1.js → nodeTransforms-PeZUYiCs.js} +2 -2
- package/dist/assets/{npsSurvey.store-DTTUiGq9.js → npsSurvey.store-BTpA4Bdf.js} +2 -2
- package/dist/assets/{orderBy-CanHuORU.js → orderBy-CMVxNao4.js} +2 -2
- package/dist/assets/{overlay-DeoWJ8oB.js → overlay-B8MMvNgs.js} +2 -2
- package/dist/assets/{personalizedTemplatesV3.store-CJ9Bfy5u.js → personalizedTemplatesV3.store-C0D2WZuq.js} +4 -4
- package/dist/assets/{pickBy-DoRblpyg.js → pickBy-DWZbVA0W.js} +2 -3
- package/dist/assets/{radio-j4rSUoao.js → radio-5XOrKEP7.js} +3 -3
- package/dist/assets/{readyToRunWorkflows.store-CjgkGuJy.js → readyToRunWorkflows.store-C23cIyhu.js} +5 -5
- package/dist/assets/{readyToRunWorkflowsV2.store-6CMdkLg0.js → readyToRunWorkflowsV2.store-BxZUJyXQ.js} +18 -10
- package/dist/assets/{roles.store-D2mgfxDv.js → roles.store-Bk6Eo7y8.js} +2 -2
- package/dist/assets/{router-Ebv1qMhT.js → router-CSYdJor8.js} +118 -115
- package/dist/assets/{schemaPreview.store-BdP1Rtj4.js → schemaPreview.store-BVhugjbw.js} +2 -2
- package/dist/assets/{semver-C8_oAvi8.js → semver-lN9oCZPq.js} +1 -1
- package/dist/assets/{sourceControl.eventBus-B10rpVhp.js → sourceControl.eventBus-BkPwCZw_.js} +1 -1
- package/dist/assets/{src-Cl0xZtCE.js → src-D6S9Khji.js} +38 -24
- package/dist/assets/{src-C5a_PFvg.css → src-sI-DsSQQ.css} +10 -9
- package/dist/assets/{sso.store-BSJgAn6v.js → sso.store-qzj82Xj4.js} +1 -1
- package/dist/assets/{table-B9oFv7WW.js → table-s-zqHExs.js} +3 -3
- package/dist/assets/{templateActions-CAMtj2SG.js → templateActions-BeIpzgaa.js} +4 -4
- package/dist/assets/{templateTransforms-ClSZtrME.js → templateTransforms-Cgy40V1P.js} +1 -1
- package/dist/assets/templates.store-COjIpQaS.js +3907 -0
- package/dist/assets/{truncate-Dc79aML5.js → truncate-DGRsht-H.js} +1 -1
- package/dist/assets/{uniqBy-C2OAfwKy.js → uniqBy-BUNHbbw3.js} +1 -1
- package/dist/assets/{usage.store-DXgdlM1s.js → usage.store-EBmhHKPv.js} +6 -3
- package/dist/assets/{useActions-CYE2yaOW.js → useActions-BATfRxpg.js} +5 -5
- package/dist/assets/useAgent-BHJHCfap.js +10 -0
- package/dist/assets/{useBeforeUnload-BDgq2LXA.js → useBeforeUnload-BPhnlPrH.js} +3 -3
- package/dist/assets/{useBugReporting-C4eU8DLn.js → useBugReporting-oDEHgPM1.js} +9 -9
- package/dist/assets/{Canvas-Bn6gWZ4a.css → useCanvasMapping-Bldjj0CO.css} +154 -133
- package/dist/assets/{Canvas-Td0SIV0U.js → useCanvasMapping-D6tov6XL.js} +2385 -2379
- package/dist/assets/{useCanvasOperations-BxV5Dc21.js → useCanvasOperations-DTN9RbNQ.js} +13 -13
- package/dist/assets/useChatCredentials-AjXB38tk.css +442 -0
- package/dist/assets/useChatCredentials-CMV_NA0l.js +591 -0
- package/dist/assets/useChatHubSidebarState-CM9tokIj.js +640 -0
- package/dist/assets/{useClipboard-BPg-srt1.js → useClipboard-fRnZpGbX.js} +2 -2
- package/dist/assets/{useCommandBar-CLraT-A2.js → useCommandBar-BqWmMYs4.js} +108 -115
- package/dist/assets/{useDebounce-BRhQZVIC.js → useDebounce-BgcdaJ78.js} +2 -2
- package/dist/assets/{useExecutionData-B4rCxtFJ.js → useExecutionData-Bk540rxU.js} +1 -1
- package/dist/assets/{useExecutionDebugging-B-lTq5hU.js → useExecutionDebugging-BNrxsZTN.js} +7 -7
- package/dist/assets/{useExecutionHelpers-5AFgT_t7.js → useExecutionHelpers-DrFWi6u7.js} +5 -5
- package/dist/assets/{useExternalHooks-ChElZw8W.js → useExternalHooks-SxBXYVNW.js} +1 -1
- package/dist/assets/{useImportCurlCommand-BW8wZKLy.js → useImportCurlCommand-obipPNWg.js} +9 -9
- package/dist/assets/useIntersectionObserver-BkAtQAzK.js +33 -0
- package/dist/assets/{useKeybindings-fJZrJyDB.js → useKeybindings-Ds1QlWW4.js} +4 -4
- package/dist/assets/{useLogsTreeExpand-DbXAJb89.js → useLogsTreeExpand-BWca4dLp.js} +32 -32
- package/dist/assets/{useLogsTreeExpand-BT6XJR8J.css → useLogsTreeExpand-nZMKe2ps.css} +38 -35
- package/dist/assets/{useMcp-ClSG_eXg.js → useMcp-_gyuyL1x.js} +2 -2
- package/dist/assets/{useMessage-CVZHrsoz.js → useMessage-Ceo97RRX.js} +5 -5
- package/dist/assets/{usePageRedirectionHelper-Cn-LYQLi.js → usePageRedirectionHelper-C_ctyI4O.js} +4 -4
- package/dist/assets/{usePinnedData-_-i0LUdd.js → usePinnedData-Csij2qN3.js} +5 -5
- package/dist/assets/{usePushConnection-BHaxo8fR.js → usePushConnection-30v29qWj.js} +16 -15
- package/dist/assets/{useRecentResources-D_WnXWIZ.js → useRecentResources-BRKdroHL.js} +9 -9
- package/dist/assets/{useRunWorkflow-D5rKvgfC.js → useRunWorkflow-hT6C_xWD.js} +10 -10
- package/dist/assets/{useTelemetry-BxbCYDca.js → useTelemetry-EOV0Llso.js} +52 -157
- package/dist/assets/{useTelemetryContext-55FklHQh.js → useTelemetryContext-CSMUQPEW.js} +1 -1
- package/dist/assets/{useToast-CKD06lpn.js → useToast-BlMNYwds.js} +7 -7
- package/dist/assets/{useWorkflowActivate-B2RbrKj9.js → useWorkflowActivate-OfPMIBJ5.js} +8 -8
- package/dist/assets/{useWorkflowSaving-DOwP3C1n.js → useWorkflowSaving-CWyt929n.js} +9 -9
- package/dist/assets/{useWorkflowsCache-4ARgZCpO.js → useWorkflowsCache-BSXTJC8C.js} +1 -1
- package/dist/assets/{versions.store-DyddKRXT.js → versions.store-Dx98n6R_.js} +3 -3
- package/dist/assets/{vue-json-pretty-DiH9ZFoW.js → vue-json-pretty-BltKoWq2.js} +1 -1
- package/dist/index.html +116 -114
- package/package.json +1 -1
- package/scripts/fetch-node-popularity.mjs +1 -1
- package/stylelint.config.mjs +7 -1
- package/dist/assets/AnimatedSpinner-ChSRgyeI.css +0 -39
- package/dist/assets/CollectionParameter-Dr2sbWu0.js +0 -58
- package/dist/assets/DemoFooter-CWdsp2am.js +0 -71
- package/dist/assets/LogsPanel-mv855bJ4.js +0 -58
- package/dist/assets/ProjectVariables-Cw92ZPKE.css +0 -293
- package/dist/assets/RunDataParsedAiContent-D30b0eQs.js +0 -25
- package/dist/assets/VariablesUsageBadge-CEu0Fi7I.js +0 -35
- package/dist/assets/VariablesUsageBadge-CQU1F9NU.css +0 -129
- package/dist/assets/VariablesView-CnlNqt-I.js +0 -456
- package/dist/assets/VirtualSchema-BXzJEXJR.js +0 -43
- package/dist/assets/nodeIcon-CyGsA5TL.js +0 -75
- package/dist/assets/templates.store-pF0jvUy0.js +0 -337
- package/dist/assets/useChatHubSidebarState-CTFhoZRQ.js +0 -383
- package/dist/assets/useProjectPages-DrIHs-hv.js +0 -13
- /package/dist/assets/{FileSaver.min-CR_3Le5x.js → FileSaver.min-DaytN8ae.js} +0 -0
- /package/dist/assets/{RunDataHtml-DOQ0pkg3.js → RunDataHtml-DdtrEw19.js} +0 -0
- /package/dist/assets/{TextWithHighlights-B8mQwCVK.js → TextWithHighlights-CxxIad3D.js} +0 -0
- /package/dist/assets/{buttons.esm-CnepylvE.js → buttons.esm-Euf82NbC.js} +0 -0
- /package/dist/assets/{chart-inxSB4fp.js → chart-BI8B7UPV.js} +0 -0
- /package/dist/assets/{core-BfCr8skN.js → core-CIkXL_1D.js} +0 -0
- /package/dist/assets/{exports-RJH1xso1.js → exports-D2D_Xd3F.js} +0 -0
- /package/dist/assets/{insights.constants-DK2g3nnD.js → insights.constants-NogjFJ3a.js} +0 -0
- /package/dist/assets/{smartDecimal-BitNC0jz.js → smartDecimal-5rgLDM96.js} +0 -0
- /package/dist/assets/{sortByProperty-CUhVU03p.js → sortByProperty-0UtqPmvJ.js} +0 -0
- /package/dist/assets/{typescript.worker-CkR7RUha.js → typescript.worker-DK2Qdfu7.js} +0 -0
- /package/dist/assets/{vue-B27A1Apg.js → vue-LyXhKoPx.js} +0 -0
- /package/dist/assets/{worker-DYbBH4SI.js → worker-CIvWfg3a.js} +0 -0
- /package/dist/assets/{xml-CcxXd9zY.js → xml-F7krcG3E.js} +0 -0
|
@@ -0,0 +1,640 @@
|
|
|
1
|
+
import { C as computed, Gt as unref, It as ref, P as defineComponent, Sn as toDisplayString, T as createBlock, bt as withCtx, et as openBlock, j as createTextVNode, k as createSlots } from "./vue.runtime.esm-bundler-DDuXT-9r.js";
|
|
2
|
+
import { M as useMediaQuery, j as useLocalStorage } from "./_MapCache-Byd-DTfo.js";
|
|
3
|
+
import { St as N8nAvatar_default, vt as N8nTooltip_default, zn as N8nIcon_default } from "./src-D6S9Khji.js";
|
|
4
|
+
import { Ni as useUIStore, Ys as useRootStore, dc as streamRequest, er as useUsersStore, lc as makeRestApiRequest, vc as defineStore, xc as v4_default } from "./useTelemetry-EOV0Llso.js";
|
|
5
|
+
import { Qo as LOCAL_STORAGE_CHAT_HUB_STATIC_SIDEBAR, cr as PROVIDER_CREDENTIAL_TYPE_MAP, dr as chatHubProviderSchema, fr as emptyChatModelsResponse, vo as CHAT_HUB_SIDE_MENU_DRAWER_MODAL_KEY } from "./constants-DvlTm3U4.js";
|
|
6
|
+
import { t as retry } from "./retry-sDkwzrPY.js";
|
|
7
|
+
import { t as CredentialIcon_default } from "./CredentialIcon-DS3l06t2.js";
|
|
8
|
+
import { a as MOBILE_MEDIA_QUERY, i as CHAT_VIEW, r as CHAT_STORE } from "./constants-CPQyU8WO.js";
|
|
9
|
+
var STREAM_SEPARATOR = "\n";
|
|
10
|
+
const fetchChatModelsApi = async (context, payload) => {
|
|
11
|
+
return await makeRestApiRequest(context, "POST", "/chat/models", payload);
|
|
12
|
+
};
|
|
13
|
+
function sendMessageApi(ctx, payload, onMessageUpdated, onDone, onError) {
|
|
14
|
+
streamRequest(ctx, "/chat/conversations/send", payload, onMessageUpdated, onDone, onError, STREAM_SEPARATOR);
|
|
15
|
+
}
|
|
16
|
+
function editMessageApi(ctx, sessionId, editId, payload, onMessageUpdated, onDone, onError) {
|
|
17
|
+
streamRequest(ctx, `/chat/conversations/${sessionId}/messages/${editId}/edit`, payload, onMessageUpdated, onDone, onError, STREAM_SEPARATOR);
|
|
18
|
+
}
|
|
19
|
+
function regenerateMessageApi(ctx, sessionId, retryId, payload, onMessageUpdated, onDone, onError) {
|
|
20
|
+
streamRequest(ctx, `/chat/conversations/${sessionId}/messages/${retryId}/regenerate`, payload, onMessageUpdated, onDone, onError, STREAM_SEPARATOR);
|
|
21
|
+
}
|
|
22
|
+
const stopGenerationApi = async (context, sessionId, messageId) => {
|
|
23
|
+
await makeRestApiRequest(context, "POST", `/chat/conversations/${sessionId}/messages/${messageId}/stop`);
|
|
24
|
+
};
|
|
25
|
+
const fetchConversationsApi = async (context) => {
|
|
26
|
+
return await makeRestApiRequest(context, "GET", "/chat/conversations");
|
|
27
|
+
};
|
|
28
|
+
const updateConversationApi = async (context, sessionId, updates) => {
|
|
29
|
+
return await makeRestApiRequest(context, "PATCH", `/chat/conversations/${sessionId}`, updates);
|
|
30
|
+
};
|
|
31
|
+
const updateConversationTitleApi = async (context, sessionId, title) => {
|
|
32
|
+
return await updateConversationApi(context, sessionId, { title });
|
|
33
|
+
};
|
|
34
|
+
const deleteConversationApi = async (context, sessionId) => {
|
|
35
|
+
await makeRestApiRequest(context, "DELETE", `/chat/conversations/${sessionId}`);
|
|
36
|
+
};
|
|
37
|
+
const fetchSingleConversationApi = async (context, sessionId) => {
|
|
38
|
+
return await makeRestApiRequest(context, "GET", `/chat/conversations/${sessionId}`);
|
|
39
|
+
};
|
|
40
|
+
const fetchAgentApi = async (context, agentId) => {
|
|
41
|
+
return await makeRestApiRequest(context, "GET", `/chat/agents/${agentId}`);
|
|
42
|
+
};
|
|
43
|
+
const createAgentApi = async (context, payload) => {
|
|
44
|
+
return await makeRestApiRequest(context, "POST", "/chat/agents", payload);
|
|
45
|
+
};
|
|
46
|
+
const updateAgentApi = async (context, agentId, payload) => {
|
|
47
|
+
return await makeRestApiRequest(context, "POST", `/chat/agents/${agentId}`, payload);
|
|
48
|
+
};
|
|
49
|
+
const deleteAgentApi = async (context, agentId) => {
|
|
50
|
+
await makeRestApiRequest(context, "DELETE", `/chat/agents/${agentId}`);
|
|
51
|
+
};
|
|
52
|
+
function findOneFromModelsResponse(response) {
|
|
53
|
+
for (const provider of chatHubProviderSchema.options) if (response[provider].models.length > 0) return response[provider].models[0];
|
|
54
|
+
}
|
|
55
|
+
function getRelativeDate(now, dateString) {
|
|
56
|
+
const date = new Date(dateString);
|
|
57
|
+
const today = new Date(now.getFullYear(), now.getMonth(), now.getDate());
|
|
58
|
+
const yesterday = new Date(today);
|
|
59
|
+
yesterday.setDate(yesterday.getDate() - 1);
|
|
60
|
+
const lastWeek = new Date(today);
|
|
61
|
+
lastWeek.setDate(lastWeek.getDate() - 7);
|
|
62
|
+
const conversationDate = new Date(date.getFullYear(), date.getMonth(), date.getDate());
|
|
63
|
+
if (conversationDate.getTime() === today.getTime()) return "Today";
|
|
64
|
+
else if (conversationDate.getTime() === yesterday.getTime()) return "Yesterday";
|
|
65
|
+
else if (conversationDate >= lastWeek) return "This week";
|
|
66
|
+
else return "Older";
|
|
67
|
+
}
|
|
68
|
+
function groupConversationsByDate(sessions) {
|
|
69
|
+
const now = /* @__PURE__ */ new Date();
|
|
70
|
+
const groups = /* @__PURE__ */ new Map();
|
|
71
|
+
for (const session of sessions) {
|
|
72
|
+
const group = getRelativeDate(now, session.lastMessageAt ?? session.updatedAt);
|
|
73
|
+
if (!groups.has(group)) groups.set(group, []);
|
|
74
|
+
groups.get(group).push(session);
|
|
75
|
+
}
|
|
76
|
+
return [
|
|
77
|
+
"Today",
|
|
78
|
+
"Yesterday",
|
|
79
|
+
"This week",
|
|
80
|
+
"Older"
|
|
81
|
+
].flatMap((groupName) => {
|
|
82
|
+
const sessions$1 = groups.get(groupName) ?? [];
|
|
83
|
+
return sessions$1.length > 0 ? [{
|
|
84
|
+
group: groupName,
|
|
85
|
+
sessions: sessions$1.sort((a, b) => Date.parse(b.lastMessageAt ?? b.updatedAt) - Date.parse(a.lastMessageAt ?? a.updatedAt))
|
|
86
|
+
}] : [];
|
|
87
|
+
});
|
|
88
|
+
}
|
|
89
|
+
function getAgentRoute(model) {
|
|
90
|
+
if (model.provider === "n8n") return {
|
|
91
|
+
name: CHAT_VIEW,
|
|
92
|
+
query: { workflowId: model.workflowId }
|
|
93
|
+
};
|
|
94
|
+
if (model.provider === "custom-agent") return {
|
|
95
|
+
name: CHAT_VIEW,
|
|
96
|
+
query: { agentId: model.agentId }
|
|
97
|
+
};
|
|
98
|
+
return { name: CHAT_VIEW };
|
|
99
|
+
}
|
|
100
|
+
function flattenModel(model) {
|
|
101
|
+
return {
|
|
102
|
+
provider: model.provider,
|
|
103
|
+
model: model?.provider === "n8n" || model?.provider === "custom-agent" ? null : model?.model ?? null,
|
|
104
|
+
workflowId: model?.provider === "n8n" ? model.workflowId : null,
|
|
105
|
+
agentId: model?.provider === "custom-agent" ? model.agentId : null
|
|
106
|
+
};
|
|
107
|
+
}
|
|
108
|
+
function unflattenModel(messageOrSession) {
|
|
109
|
+
if (messageOrSession.provider === null) return null;
|
|
110
|
+
switch (messageOrSession.provider) {
|
|
111
|
+
case "custom-agent":
|
|
112
|
+
if (!messageOrSession.agentId) return null;
|
|
113
|
+
return {
|
|
114
|
+
provider: "custom-agent",
|
|
115
|
+
agentId: messageOrSession.agentId
|
|
116
|
+
};
|
|
117
|
+
case "n8n":
|
|
118
|
+
if (!messageOrSession.workflowId) return null;
|
|
119
|
+
return {
|
|
120
|
+
provider: "n8n",
|
|
121
|
+
workflowId: messageOrSession.workflowId
|
|
122
|
+
};
|
|
123
|
+
default:
|
|
124
|
+
if (messageOrSession.model === null) return null;
|
|
125
|
+
return {
|
|
126
|
+
provider: messageOrSession.provider,
|
|
127
|
+
model: messageOrSession.model
|
|
128
|
+
};
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
function filterAndSortAgents(models, filter) {
|
|
132
|
+
let filtered = models;
|
|
133
|
+
if (filter.search.trim()) {
|
|
134
|
+
const query = filter.search.toLowerCase();
|
|
135
|
+
filtered = filtered.filter((model) => model.name.toLowerCase().includes(query));
|
|
136
|
+
}
|
|
137
|
+
if (filter.provider !== "") filtered = filtered.filter((model) => model.model.provider === filter.provider);
|
|
138
|
+
filtered = [...filtered].sort((a, b) => {
|
|
139
|
+
const dateAStr = a[filter.sortBy];
|
|
140
|
+
const dateBStr = b[filter.sortBy];
|
|
141
|
+
const dateA = dateAStr ? Date.parse(dateAStr) : void 0;
|
|
142
|
+
const dateB = dateBStr ? Date.parse(dateBStr) : void 0;
|
|
143
|
+
if (dateA && dateB) return dateB - dateA;
|
|
144
|
+
if (dateA && !dateB) return -1;
|
|
145
|
+
if (!dateA && dateB) return 1;
|
|
146
|
+
return 0;
|
|
147
|
+
});
|
|
148
|
+
return filtered;
|
|
149
|
+
}
|
|
150
|
+
function stringifyModel(model) {
|
|
151
|
+
return `${model.provider}::${model.provider === "custom-agent" ? model.agentId : model.provider === "n8n" ? model.workflowId : model.model}`;
|
|
152
|
+
}
|
|
153
|
+
function fromStringToModel(value) {
|
|
154
|
+
const [provider, identifier] = value.split("::");
|
|
155
|
+
const parsedProvider = chatHubProviderSchema.safeParse(provider).data;
|
|
156
|
+
if (!parsedProvider) return;
|
|
157
|
+
return parsedProvider === "n8n" ? {
|
|
158
|
+
provider: "n8n",
|
|
159
|
+
workflowId: identifier
|
|
160
|
+
} : parsedProvider === "custom-agent" ? {
|
|
161
|
+
provider: "custom-agent",
|
|
162
|
+
agentId: identifier
|
|
163
|
+
} : {
|
|
164
|
+
provider: parsedProvider,
|
|
165
|
+
model: identifier
|
|
166
|
+
};
|
|
167
|
+
}
|
|
168
|
+
function isMatchedAgent(agent, model) {
|
|
169
|
+
if (model.provider === "n8n") return agent.model.provider === "n8n" && agent.model.workflowId === model.workflowId;
|
|
170
|
+
if (model.provider === "custom-agent") return agent.model.provider === "custom-agent" && agent.model.agentId === model.agentId;
|
|
171
|
+
return agent.model.provider === model.provider && agent.model.model === model.model;
|
|
172
|
+
}
|
|
173
|
+
function createAiMessageFromStreamingState(sessionId, messageId, streaming) {
|
|
174
|
+
return {
|
|
175
|
+
id: messageId,
|
|
176
|
+
sessionId,
|
|
177
|
+
type: "ai",
|
|
178
|
+
name: "AI",
|
|
179
|
+
content: "",
|
|
180
|
+
executionId: streaming?.executionId ?? null,
|
|
181
|
+
status: "running",
|
|
182
|
+
createdAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
183
|
+
updatedAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
184
|
+
previousMessageId: streaming?.previousMessageId ?? null,
|
|
185
|
+
retryOfMessageId: streaming?.retryOfMessageId ?? null,
|
|
186
|
+
revisionOfMessageId: null,
|
|
187
|
+
responses: [],
|
|
188
|
+
alternatives: [],
|
|
189
|
+
...streaming?.model ? flattenModel(streaming.model) : {
|
|
190
|
+
provider: null,
|
|
191
|
+
model: null,
|
|
192
|
+
workflowId: null,
|
|
193
|
+
agentId: null
|
|
194
|
+
}
|
|
195
|
+
};
|
|
196
|
+
}
|
|
197
|
+
const useChatStore = defineStore(CHAT_STORE, () => {
|
|
198
|
+
const rootStore = useRootStore();
|
|
199
|
+
const agents = ref();
|
|
200
|
+
const sessions = ref();
|
|
201
|
+
const currentEditingAgent = ref(null);
|
|
202
|
+
const streaming = ref();
|
|
203
|
+
const conversationsBySession = ref(/* @__PURE__ */ new Map());
|
|
204
|
+
const getConversation = (sessionId) => conversationsBySession.value.get(sessionId);
|
|
205
|
+
const getActiveMessages = (sessionId) => {
|
|
206
|
+
const conversation = getConversation(sessionId);
|
|
207
|
+
if (!conversation) return [];
|
|
208
|
+
return conversation.activeMessageChain.map((id) => conversation.messages[id]).filter(Boolean);
|
|
209
|
+
};
|
|
210
|
+
function ensureConversation(sessionId) {
|
|
211
|
+
if (!conversationsBySession.value.has(sessionId)) conversationsBySession.value.set(sessionId, {
|
|
212
|
+
messages: {},
|
|
213
|
+
activeMessageChain: []
|
|
214
|
+
});
|
|
215
|
+
const conversation = conversationsBySession.value.get(sessionId);
|
|
216
|
+
if (!conversation) throw new Error(`Conversation for session ID ${sessionId} not found`);
|
|
217
|
+
return conversation;
|
|
218
|
+
}
|
|
219
|
+
function lastMessage(sessionId) {
|
|
220
|
+
const conversation = getConversation(sessionId);
|
|
221
|
+
if (!conversation || conversation.activeMessageChain.length === 0) return null;
|
|
222
|
+
const messageId = conversation.activeMessageChain[conversation.activeMessageChain.length - 1];
|
|
223
|
+
return conversation.messages[messageId] ?? null;
|
|
224
|
+
}
|
|
225
|
+
function isResponding(sessionId) {
|
|
226
|
+
return lastMessage(sessionId)?.status === "running";
|
|
227
|
+
}
|
|
228
|
+
function computeActiveChain(messages, messageId) {
|
|
229
|
+
const chain = [];
|
|
230
|
+
if (!messageId) return chain;
|
|
231
|
+
let id;
|
|
232
|
+
const stack = [messageId];
|
|
233
|
+
let latest = null;
|
|
234
|
+
while (id = stack.pop()) {
|
|
235
|
+
const message = messages[id];
|
|
236
|
+
if (!latest || message.createdAt > messages[latest].createdAt) latest = id;
|
|
237
|
+
for (const responseId of message.responses) stack.push(responseId);
|
|
238
|
+
}
|
|
239
|
+
if (!latest) return chain;
|
|
240
|
+
let current = latest;
|
|
241
|
+
const visited = /* @__PURE__ */ new Set();
|
|
242
|
+
while (current && !visited.has(current)) {
|
|
243
|
+
chain.unshift(current);
|
|
244
|
+
visited.add(current);
|
|
245
|
+
current = messages[current]?.previousMessageId ?? null;
|
|
246
|
+
}
|
|
247
|
+
return chain;
|
|
248
|
+
}
|
|
249
|
+
function linkMessages(messages) {
|
|
250
|
+
const messagesGraph = {};
|
|
251
|
+
for (const message of messages) messagesGraph[message.id] = {
|
|
252
|
+
...message,
|
|
253
|
+
responses: [],
|
|
254
|
+
alternatives: []
|
|
255
|
+
};
|
|
256
|
+
for (const node of Object.values(messagesGraph)) {
|
|
257
|
+
if (node.previousMessageId && messagesGraph[node.previousMessageId]) messagesGraph[node.previousMessageId].responses.push(node.id);
|
|
258
|
+
if (node.retryOfMessageId && messagesGraph[node.retryOfMessageId]) messagesGraph[node.retryOfMessageId].alternatives.push(node.id);
|
|
259
|
+
if (node.revisionOfMessageId && messagesGraph[node.revisionOfMessageId]) messagesGraph[node.revisionOfMessageId].alternatives.push(node.id);
|
|
260
|
+
}
|
|
261
|
+
const sortByRunThenTime = (first, second) => {
|
|
262
|
+
const a = messagesGraph[first];
|
|
263
|
+
const b = messagesGraph[second];
|
|
264
|
+
if (a.createdAt !== b.createdAt) return a.createdAt < b.createdAt ? -1 : 1;
|
|
265
|
+
return a.id < b.id ? -1 : 1;
|
|
266
|
+
};
|
|
267
|
+
for (const node of Object.values(messagesGraph)) {
|
|
268
|
+
if (!node.alternatives.includes(node.id)) node.alternatives.push(node.id);
|
|
269
|
+
if (node.retryOfMessageId && messagesGraph[node.retryOfMessageId]) {
|
|
270
|
+
node.alternatives.push(node.retryOfMessageId);
|
|
271
|
+
for (const other of messagesGraph[node.retryOfMessageId].alternatives) if (other !== node.id && !node.alternatives.includes(other)) node.alternatives.push(other);
|
|
272
|
+
}
|
|
273
|
+
if (node.revisionOfMessageId && messagesGraph[node.revisionOfMessageId]) {
|
|
274
|
+
node.alternatives.push(node.revisionOfMessageId);
|
|
275
|
+
for (const other of messagesGraph[node.revisionOfMessageId].alternatives) if (other !== node.id && !node.alternatives.includes(other)) node.alternatives.push(other);
|
|
276
|
+
}
|
|
277
|
+
node.responses.sort(sortByRunThenTime);
|
|
278
|
+
node.alternatives.sort(sortByRunThenTime);
|
|
279
|
+
}
|
|
280
|
+
return messagesGraph;
|
|
281
|
+
}
|
|
282
|
+
function addMessage(sessionId, message) {
|
|
283
|
+
const conversation = ensureConversation(sessionId);
|
|
284
|
+
conversation.messages[message.id] = message;
|
|
285
|
+
conversation.messages = linkMessages(Object.values(conversation.messages));
|
|
286
|
+
conversation.activeMessageChain = computeActiveChain(conversation.messages, message.id);
|
|
287
|
+
return message;
|
|
288
|
+
}
|
|
289
|
+
function replaceMessageContent(sessionId, messageId, content) {
|
|
290
|
+
const message = ensureConversation(sessionId).messages[messageId];
|
|
291
|
+
if (!message) throw new Error(`Message with ID ${messageId} not found in session ${sessionId}`);
|
|
292
|
+
message.content = content;
|
|
293
|
+
}
|
|
294
|
+
function appendMessage(sessionId, messageId, chunk) {
|
|
295
|
+
const message = ensureConversation(sessionId).messages[messageId];
|
|
296
|
+
if (!message) throw new Error(`Message with ID ${messageId} not found in session ${sessionId}`);
|
|
297
|
+
message.content += chunk;
|
|
298
|
+
}
|
|
299
|
+
function updateMessage(sessionId, messageId, status) {
|
|
300
|
+
const message = ensureConversation(sessionId).messages[messageId];
|
|
301
|
+
if (!message) throw new Error(`Message with ID ${messageId} not found in session ${sessionId}`);
|
|
302
|
+
message.status = status;
|
|
303
|
+
message.updatedAt = (/* @__PURE__ */ new Date()).toISOString();
|
|
304
|
+
}
|
|
305
|
+
async function fetchAgents(credentialMap) {
|
|
306
|
+
agents.value = await fetchChatModelsApi(rootStore.restApiContext, { credentials: credentialMap });
|
|
307
|
+
return agents.value;
|
|
308
|
+
}
|
|
309
|
+
async function fetchSessions() {
|
|
310
|
+
sessions.value = await fetchConversationsApi(rootStore.restApiContext);
|
|
311
|
+
}
|
|
312
|
+
async function fetchMessages(sessionId) {
|
|
313
|
+
const { conversation } = await fetchSingleConversationApi(rootStore.restApiContext, sessionId);
|
|
314
|
+
const messages = linkMessages(Object.values(conversation.messages));
|
|
315
|
+
const latestMessage = Object.values(messages).sort((a, b) => a.createdAt < b.createdAt ? -1 : 1).pop();
|
|
316
|
+
conversationsBySession.value.set(sessionId, {
|
|
317
|
+
messages,
|
|
318
|
+
activeMessageChain: computeActiveChain(messages, latestMessage?.id ?? null)
|
|
319
|
+
});
|
|
320
|
+
}
|
|
321
|
+
function onBeginMessage() {
|
|
322
|
+
if (!streaming.value?.messageId) return;
|
|
323
|
+
const message = createAiMessageFromStreamingState(streaming.value.sessionId, streaming.value.messageId, streaming.value);
|
|
324
|
+
addMessage(streaming.value.sessionId, message);
|
|
325
|
+
if (sessions.value?.some((session) => session.id === streaming.value?.sessionId)) return;
|
|
326
|
+
sessions.value = [...sessions.value ?? [], {
|
|
327
|
+
id: streaming.value.sessionId,
|
|
328
|
+
title: "New Chat",
|
|
329
|
+
ownerId: "",
|
|
330
|
+
lastMessageAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
331
|
+
credentialId: null,
|
|
332
|
+
agentName: null,
|
|
333
|
+
createdAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
334
|
+
updatedAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
335
|
+
...flattenModel(streaming.value.model)
|
|
336
|
+
}];
|
|
337
|
+
}
|
|
338
|
+
function ensureMessage(sessionId, messageId) {
|
|
339
|
+
const message = ensureConversation(sessionId).messages[messageId];
|
|
340
|
+
if (message) return message;
|
|
341
|
+
return addMessage(sessionId, createAiMessageFromStreamingState(sessionId, messageId, streaming.value));
|
|
342
|
+
}
|
|
343
|
+
function onChunk(chunk) {
|
|
344
|
+
if (streaming.value?.messageId) appendMessage(streaming.value.sessionId, streaming.value.messageId, chunk);
|
|
345
|
+
}
|
|
346
|
+
function onEndMessage() {
|
|
347
|
+
if (streaming.value?.messageId) updateMessage(streaming.value.sessionId, streaming.value.messageId, "success");
|
|
348
|
+
}
|
|
349
|
+
function onStreamMessage(chunk) {
|
|
350
|
+
if (!streaming.value) return;
|
|
351
|
+
const { sessionId } = streaming.value;
|
|
352
|
+
streaming.value = {
|
|
353
|
+
...streaming.value,
|
|
354
|
+
...chunk.metadata
|
|
355
|
+
};
|
|
356
|
+
switch (chunk.type) {
|
|
357
|
+
case "begin":
|
|
358
|
+
onBeginMessage();
|
|
359
|
+
break;
|
|
360
|
+
case "item":
|
|
361
|
+
onChunk(chunk.content ?? "");
|
|
362
|
+
break;
|
|
363
|
+
case "end":
|
|
364
|
+
onEndMessage();
|
|
365
|
+
break;
|
|
366
|
+
case "error": {
|
|
367
|
+
const message = ensureMessage(sessionId, chunk.metadata.messageId);
|
|
368
|
+
if (message.status === "cancelled") return;
|
|
369
|
+
updateMessage(sessionId, chunk.metadata.messageId, "error");
|
|
370
|
+
onChunk(message.content ?? "");
|
|
371
|
+
break;
|
|
372
|
+
}
|
|
373
|
+
}
|
|
374
|
+
}
|
|
375
|
+
async function onStreamDone() {
|
|
376
|
+
if (!streaming.value) return;
|
|
377
|
+
const { sessionId } = streaming.value;
|
|
378
|
+
streaming.value = void 0;
|
|
379
|
+
await retry(async () => {
|
|
380
|
+
return (await fetchSingleConversationApi(rootStore.restApiContext, sessionId)).session.title !== "New Chat";
|
|
381
|
+
}, 1e3, 3);
|
|
382
|
+
await fetchSessions();
|
|
383
|
+
}
|
|
384
|
+
function onStreamError() {
|
|
385
|
+
if (!streaming.value) return;
|
|
386
|
+
const { sessionId } = streaming.value;
|
|
387
|
+
streaming.value = void 0;
|
|
388
|
+
const conversation = getConversation(sessionId);
|
|
389
|
+
if (!conversation) return;
|
|
390
|
+
for (const messageId of conversation.activeMessageChain) if (conversation.messages[messageId].status === "running") updateMessage(sessionId, messageId, "error");
|
|
391
|
+
}
|
|
392
|
+
function sendMessage(sessionId, message, model, credentials) {
|
|
393
|
+
const messageId = v4_default();
|
|
394
|
+
const conversation = ensureConversation(sessionId);
|
|
395
|
+
const previousMessageId = conversation.activeMessageChain.length ? conversation.activeMessageChain[conversation.activeMessageChain.length - 1] : null;
|
|
396
|
+
addMessage(sessionId, {
|
|
397
|
+
id: messageId,
|
|
398
|
+
sessionId,
|
|
399
|
+
type: "human",
|
|
400
|
+
name: "User",
|
|
401
|
+
content: message,
|
|
402
|
+
provider: null,
|
|
403
|
+
model: model.provider === "n8n" || model.provider === "custom-agent" ? null : model.model,
|
|
404
|
+
workflowId: null,
|
|
405
|
+
executionId: null,
|
|
406
|
+
agentId: null,
|
|
407
|
+
status: "success",
|
|
408
|
+
createdAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
409
|
+
updatedAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
410
|
+
previousMessageId,
|
|
411
|
+
retryOfMessageId: null,
|
|
412
|
+
revisionOfMessageId: null,
|
|
413
|
+
responses: [],
|
|
414
|
+
alternatives: []
|
|
415
|
+
});
|
|
416
|
+
streaming.value = {
|
|
417
|
+
promptId: messageId,
|
|
418
|
+
sessionId,
|
|
419
|
+
model
|
|
420
|
+
};
|
|
421
|
+
sendMessageApi(rootStore.restApiContext, {
|
|
422
|
+
model,
|
|
423
|
+
messageId,
|
|
424
|
+
sessionId,
|
|
425
|
+
message,
|
|
426
|
+
credentials,
|
|
427
|
+
previousMessageId
|
|
428
|
+
}, onStreamMessage, onStreamDone, onStreamError);
|
|
429
|
+
}
|
|
430
|
+
function editMessage(sessionId, editId, content, model, credentials) {
|
|
431
|
+
const promptId = v4_default();
|
|
432
|
+
const message = ensureConversation(sessionId).messages[editId];
|
|
433
|
+
const previousMessageId = message?.previousMessageId ?? null;
|
|
434
|
+
if (message?.type === "human") addMessage(sessionId, {
|
|
435
|
+
id: promptId,
|
|
436
|
+
sessionId,
|
|
437
|
+
type: "human",
|
|
438
|
+
name: message.name ?? "User",
|
|
439
|
+
content,
|
|
440
|
+
provider: null,
|
|
441
|
+
model: null,
|
|
442
|
+
workflowId: null,
|
|
443
|
+
executionId: null,
|
|
444
|
+
agentId: null,
|
|
445
|
+
status: "success",
|
|
446
|
+
createdAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
447
|
+
updatedAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
448
|
+
previousMessageId,
|
|
449
|
+
retryOfMessageId: null,
|
|
450
|
+
revisionOfMessageId: editId,
|
|
451
|
+
responses: [],
|
|
452
|
+
alternatives: []
|
|
453
|
+
});
|
|
454
|
+
else if (message?.type === "ai") replaceMessageContent(sessionId, editId, content);
|
|
455
|
+
streaming.value = {
|
|
456
|
+
promptId,
|
|
457
|
+
sessionId,
|
|
458
|
+
model
|
|
459
|
+
};
|
|
460
|
+
editMessageApi(rootStore.restApiContext, sessionId, editId, {
|
|
461
|
+
model,
|
|
462
|
+
messageId: promptId,
|
|
463
|
+
message: content,
|
|
464
|
+
credentials
|
|
465
|
+
}, onStreamMessage, onStreamDone, onStreamError);
|
|
466
|
+
}
|
|
467
|
+
function regenerateMessage(sessionId, retryId, model, credentials) {
|
|
468
|
+
if (!(ensureConversation(sessionId).messages[retryId]?.previousMessageId ?? null)) throw new Error("No previous message to base regeneration on");
|
|
469
|
+
streaming.value = {
|
|
470
|
+
promptId: retryId,
|
|
471
|
+
sessionId,
|
|
472
|
+
model
|
|
473
|
+
};
|
|
474
|
+
regenerateMessageApi(rootStore.restApiContext, sessionId, retryId, {
|
|
475
|
+
model,
|
|
476
|
+
credentials
|
|
477
|
+
}, onStreamMessage, onStreamDone, onStreamError);
|
|
478
|
+
}
|
|
479
|
+
async function stopStreamingMessage(sessionId) {
|
|
480
|
+
const currentMessage = lastMessage(sessionId);
|
|
481
|
+
if (currentMessage && currentMessage.status === "running") {
|
|
482
|
+
updateMessage(sessionId, currentMessage.id, "cancelled");
|
|
483
|
+
await stopGenerationApi(rootStore.restApiContext, sessionId, currentMessage.id);
|
|
484
|
+
streaming.value = void 0;
|
|
485
|
+
}
|
|
486
|
+
}
|
|
487
|
+
function updateSession(sessionId, toUpdate) {
|
|
488
|
+
sessions.value = sessions.value?.map((session) => session.id === sessionId ? {
|
|
489
|
+
...session,
|
|
490
|
+
...toUpdate
|
|
491
|
+
} : session);
|
|
492
|
+
}
|
|
493
|
+
async function renameSession(sessionId, title) {
|
|
494
|
+
updateSession(sessionId, (await updateConversationTitleApi(rootStore.restApiContext, sessionId, title)).session);
|
|
495
|
+
}
|
|
496
|
+
async function updateSessionModel(sessionId, model) {
|
|
497
|
+
await updateConversationApi(rootStore.restApiContext, sessionId, model);
|
|
498
|
+
updateSession(sessionId, model);
|
|
499
|
+
}
|
|
500
|
+
async function deleteSession(sessionId) {
|
|
501
|
+
await deleteConversationApi(rootStore.restApiContext, sessionId);
|
|
502
|
+
sessions.value = sessions.value?.filter((session) => session.id !== sessionId);
|
|
503
|
+
}
|
|
504
|
+
function switchAlternative(sessionId, messageId) {
|
|
505
|
+
const conversation = getConversation(sessionId);
|
|
506
|
+
if (!conversation?.messages[messageId]) throw new Error(`Message with ID ${messageId} not found in session ${sessionId}`);
|
|
507
|
+
conversation.activeMessageChain = computeActiveChain(conversation.messages, messageId);
|
|
508
|
+
}
|
|
509
|
+
async function fetchCustomAgent(agentId) {
|
|
510
|
+
const agent = await fetchAgentApi(rootStore.restApiContext, agentId);
|
|
511
|
+
currentEditingAgent.value = agent;
|
|
512
|
+
return agent;
|
|
513
|
+
}
|
|
514
|
+
function getCustomAgent(agentId) {
|
|
515
|
+
return agents.value?.["custom-agent"].models.find((model) => "agentId" in model && model.agentId === agentId);
|
|
516
|
+
}
|
|
517
|
+
async function createCustomAgent(payload, credentials) {
|
|
518
|
+
const agent = await createAgentApi(rootStore.restApiContext, payload);
|
|
519
|
+
const agentModel = {
|
|
520
|
+
model: {
|
|
521
|
+
provider: "custom-agent",
|
|
522
|
+
agentId: agent.id
|
|
523
|
+
},
|
|
524
|
+
name: agent.name,
|
|
525
|
+
description: agent.description ?? null,
|
|
526
|
+
createdAt: agent.createdAt,
|
|
527
|
+
updatedAt: agent.updatedAt
|
|
528
|
+
};
|
|
529
|
+
agents.value?.["custom-agent"].models.push(agentModel);
|
|
530
|
+
await fetchAgents(credentials);
|
|
531
|
+
return agentModel;
|
|
532
|
+
}
|
|
533
|
+
async function updateCustomAgent(agentId, payload, credentials) {
|
|
534
|
+
const agent = await updateAgentApi(rootStore.restApiContext, agentId, payload);
|
|
535
|
+
if (agents.value?.["custom-agent"]) agents.value["custom-agent"].models = agents.value["custom-agent"].models.map((model) => "agentId" in model && model.agentId === agentId ? {
|
|
536
|
+
...model,
|
|
537
|
+
name: agent.name
|
|
538
|
+
} : model);
|
|
539
|
+
await fetchAgents(credentials);
|
|
540
|
+
return agent;
|
|
541
|
+
}
|
|
542
|
+
async function deleteCustomAgent(agentId, credentials) {
|
|
543
|
+
await deleteAgentApi(rootStore.restApiContext, agentId);
|
|
544
|
+
if (agents.value?.["custom-agent"]) agents.value["custom-agent"].models = agents.value["custom-agent"].models.filter((model) => !("agentId" in model) || model.agentId !== agentId);
|
|
545
|
+
await fetchAgents(credentials);
|
|
546
|
+
}
|
|
547
|
+
function getAgent(model) {
|
|
548
|
+
if (!agents.value) return;
|
|
549
|
+
return agents.value[model.provider].models.find((agent) => isMatchedAgent(agent, model));
|
|
550
|
+
}
|
|
551
|
+
return {
|
|
552
|
+
agents: computed(() => agents.value ?? emptyChatModelsResponse),
|
|
553
|
+
agentsReady: computed(() => agents.value !== void 0),
|
|
554
|
+
currentEditingAgent,
|
|
555
|
+
getAgent,
|
|
556
|
+
fetchAgents,
|
|
557
|
+
getCustomAgent,
|
|
558
|
+
fetchCustomAgent,
|
|
559
|
+
createCustomAgent,
|
|
560
|
+
updateCustomAgent,
|
|
561
|
+
deleteCustomAgent,
|
|
562
|
+
sessions: computed(() => sessions.value ?? []),
|
|
563
|
+
sessionsReady: computed(() => sessions.value !== void 0),
|
|
564
|
+
fetchSessions,
|
|
565
|
+
renameSession,
|
|
566
|
+
updateSessionModel,
|
|
567
|
+
deleteSession,
|
|
568
|
+
getConversation,
|
|
569
|
+
fetchMessages,
|
|
570
|
+
getActiveMessages,
|
|
571
|
+
switchAlternative,
|
|
572
|
+
lastMessage,
|
|
573
|
+
streaming,
|
|
574
|
+
isResponding,
|
|
575
|
+
sendMessage,
|
|
576
|
+
editMessage,
|
|
577
|
+
regenerateMessage,
|
|
578
|
+
stopStreamingMessage
|
|
579
|
+
};
|
|
580
|
+
});
|
|
581
|
+
var ChatAgentAvatar_default = /* @__PURE__ */ defineComponent({
|
|
582
|
+
__name: "ChatAgentAvatar",
|
|
583
|
+
props: {
|
|
584
|
+
agent: {},
|
|
585
|
+
size: {},
|
|
586
|
+
tooltip: { type: Boolean }
|
|
587
|
+
},
|
|
588
|
+
setup(__props) {
|
|
589
|
+
return (_ctx, _cache) => {
|
|
590
|
+
return openBlock(), createBlock(unref(N8nTooltip_default), {
|
|
591
|
+
"show-after": 100,
|
|
592
|
+
placement: "left",
|
|
593
|
+
disabled: !_ctx.tooltip
|
|
594
|
+
}, createSlots({
|
|
595
|
+
default: withCtx(() => [!_ctx.agent ? (openBlock(), createBlock(unref(N8nIcon_default), {
|
|
596
|
+
key: 0,
|
|
597
|
+
icon: "messages-square",
|
|
598
|
+
size: _ctx.size === "lg" ? "xxlarge" : _ctx.size === "sm" ? "large" : "xlarge"
|
|
599
|
+
}, null, 8, ["size"])) : _ctx.agent.model.provider === "custom-agent" || _ctx.agent.model.provider === "n8n" ? (openBlock(), createBlock(unref(N8nAvatar_default), {
|
|
600
|
+
key: 1,
|
|
601
|
+
"first-name": _ctx.agent.name,
|
|
602
|
+
size: _ctx.size === "lg" ? "medium" : _ctx.size === "sm" ? "xxsmall" : "xsmall"
|
|
603
|
+
}, null, 8, ["first-name", "size"])) : (openBlock(), createBlock(CredentialIcon_default, {
|
|
604
|
+
key: 2,
|
|
605
|
+
"credential-type-name": unref(PROVIDER_CREDENTIAL_TYPE_MAP)[_ctx.agent.model.provider],
|
|
606
|
+
size: _ctx.size === "sm" ? 16 : _ctx.size === "lg" ? 40 : 20
|
|
607
|
+
}, null, 8, ["credential-type-name", "size"]))]),
|
|
608
|
+
_: 2
|
|
609
|
+
}, [_ctx.agent ? {
|
|
610
|
+
name: "content",
|
|
611
|
+
fn: withCtx(() => [createTextVNode(toDisplayString(_ctx.agent.name), 1)]),
|
|
612
|
+
key: "0"
|
|
613
|
+
} : void 0]), 1032, ["disabled"]);
|
|
614
|
+
};
|
|
615
|
+
}
|
|
616
|
+
});
|
|
617
|
+
function useChatHubSidebarState() {
|
|
618
|
+
const isMobileDevice = useMediaQuery(MOBILE_MEDIA_QUERY);
|
|
619
|
+
const uiStore = useUIStore();
|
|
620
|
+
const isStatic = useLocalStorage(LOCAL_STORAGE_CHAT_HUB_STATIC_SIDEBAR(useUsersStore().currentUserId ?? "anonymous"), !isMobileDevice.value, { writeDefaults: false });
|
|
621
|
+
const canBeStatic = computed(() => !isMobileDevice.value);
|
|
622
|
+
function toggleOpen(value) {
|
|
623
|
+
const isOpen = !!uiStore.isModalActiveById[CHAT_HUB_SIDE_MENU_DRAWER_MODAL_KEY];
|
|
624
|
+
if (value ?? !isOpen) uiStore.openModal(CHAT_HUB_SIDE_MENU_DRAWER_MODAL_KEY);
|
|
625
|
+
else uiStore.closeModal(CHAT_HUB_SIDE_MENU_DRAWER_MODAL_KEY);
|
|
626
|
+
}
|
|
627
|
+
function toggleStatic(value) {
|
|
628
|
+
const newValue = value ?? !isStatic.value;
|
|
629
|
+
isStatic.value = newValue;
|
|
630
|
+
toggleOpen(newValue);
|
|
631
|
+
}
|
|
632
|
+
return {
|
|
633
|
+
canBeStatic,
|
|
634
|
+
isStatic: computed(() => canBeStatic.value && isStatic.value),
|
|
635
|
+
isCollapsed: computed(() => !isStatic.value && uiStore.isModalActiveById["chatHubSideMenuDrawer"] !== true),
|
|
636
|
+
toggleOpen,
|
|
637
|
+
toggleStatic
|
|
638
|
+
};
|
|
639
|
+
}
|
|
640
|
+
export { findOneFromModelsResponse as a, groupConversationsByDate as c, unflattenModel as d, fetchChatModelsApi as f, filterAndSortAgents as i, isMatchedAgent as l, ChatAgentAvatar_default as n, fromStringToModel as o, useChatStore as r, getAgentRoute as s, useChatHubSidebarState as t, stringifyModel as u };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { It as ref, J as onBeforeUnmount, Z as onMounted, z as inject } from "./vue.runtime.esm-bundler-DDuXT-9r.js";
|
|
2
|
-
import { S as useClipboard, it as useThrottleFn } from "./_MapCache-
|
|
3
|
-
import {
|
|
2
|
+
import { S as useClipboard, it as useThrottleFn } from "./_MapCache-Byd-DTfo.js";
|
|
3
|
+
import { ws as PopOutWindowKey } from "./constants-DvlTm3U4.js";
|
|
4
4
|
function useClipboard$1({ onPaste: onPasteFn = () => {} } = {}) {
|
|
5
5
|
const { copy, copied, isSupported, text } = useClipboard({
|
|
6
6
|
navigator: inject(PopOutWindowKey, ref())?.value?.navigator ?? window.navigator,
|