@atom8n/n8n-editor-ui 2.2.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/.stylelintcache +1 -0
- package/README.md +59 -0
- package/biome.jsonc +8 -0
- package/build.log +55 -0
- package/data/node-popularity.json +3998 -0
- package/dist/assets/AddDataTableModal-UINkk54_.js +1555 -0
- package/dist/assets/AgentEditorModal-CVww87TJ.js +358 -0
- package/dist/assets/Alert-Dy86dyOr.js +102 -0
- package/dist/assets/AnimatedSpinner-DmPN4poP.js +15 -0
- package/dist/assets/AnnotationTagsDropdown.ee-BJ7N9lek.js +71 -0
- package/dist/assets/AuthView-D2LWHrMp.js +106 -0
- package/dist/assets/BottomMenu-CIQiK_dJ.js +532 -0
- package/dist/assets/CalendarDate-DgQUMbNo.js +875 -0
- package/dist/assets/ChangePasswordView-Z6tUkw0u.js +133 -0
- package/dist/assets/ChatAgentAvatar-50YBnv3N.js +67 -0
- package/dist/assets/ChatFile-xZxmc2nV.js +146 -0
- package/dist/assets/ChatLayout-CTE_5SiM.js +96 -0
- package/dist/assets/ChatPersonalAgentsView-BGpHk03K.js +149 -0
- package/dist/assets/ChatSidebar-BkVwIypC.js +528 -0
- package/dist/assets/ChatView-BbbdeU9x.js +1559 -0
- package/dist/assets/ChatWorkflowAgentsView-BtunOxlC.js +116 -0
- package/dist/assets/CollectionParameter-BdcPG1lu.js +52 -0
- package/dist/assets/CommitMonoVariable-ytizKI8U.woff2 +0 -0
- package/dist/assets/CommunityNodeUpdateInfo-C37kca4W.js +273 -0
- package/dist/assets/CopyInput-DDZVu2iU.js +74 -0
- package/dist/assets/CredentialIcon-8YdTTFZ1.js +80 -0
- package/dist/assets/CredentialPicker-DWtj314o.js +293 -0
- package/dist/assets/CredentialSelectorModal-DTW2fKh0.js +138 -0
- package/dist/assets/CredentialsView-BjUchcCu.js +480 -0
- package/dist/assets/DataTableActions-DpAkoxg_.js +95 -0
- package/dist/assets/DataTableDetailsView-Coq7zdW5.js +41922 -0
- package/dist/assets/DataTableView-Cs-BIkzw.js +293 -0
- package/dist/assets/DemoFooter-Cga3jvi-.js +65 -0
- package/dist/assets/Draggable-vfvXl9Sp.js +105 -0
- package/dist/assets/EmptySharedSectionActionBox-DOXZtTCv.js +36 -0
- package/dist/assets/EnterpriseEdition.ee-D_rCFexM.js +15 -0
- package/dist/assets/EntityNotFound-3dhTRWsE.js +85 -0
- package/dist/assets/EntityUnAuthorised-ChJYZakE.js +66 -0
- package/dist/assets/ErrorView-zT9cX76a.js +61 -0
- package/dist/assets/EvaluationsRootView-C-OVWYnY.js +523 -0
- package/dist/assets/EvaluationsView-CJwJTruc.js +469 -0
- package/dist/assets/ExecutionsTime-DEQiyozR.js +573 -0
- package/dist/assets/ExecutionsView-Bd5Oh8TH.js +791 -0
- package/dist/assets/ExternalSecretsProviderConnectionSwitch.ee-C7Ih-uRo.js +191 -0
- package/dist/assets/FixedCollectionParameter-CYuTDW9t.js +496 -0
- package/dist/assets/ForgotMyPasswordView-Bs_L9P27.js +102 -0
- package/dist/assets/InsightsChartAverageRuntime-Bp3VA8_7.js +62 -0
- package/dist/assets/InsightsChartFailed-KPaNWoEr.js +52 -0
- package/dist/assets/InsightsChartFailureRate-DE6kE3FM.js +54 -0
- package/dist/assets/InsightsChartTimeSaved-auABNZlc.js +68 -0
- package/dist/assets/InsightsChartTotal-BKzYRKE7.js +56 -0
- package/dist/assets/InsightsDashboard-JWx4W6Db.js +473 -0
- package/dist/assets/InsightsPaywall-C8zLLKe8.js +63 -0
- package/dist/assets/InsightsSummary-cmN1lHDm.js +210 -0
- package/dist/assets/InsightsTableWorkflows-CqcC3IbQ.js +203 -0
- package/dist/assets/InterVariable-DiVDrmQJ.woff2 +0 -0
- package/dist/assets/InterVariable-Italic-FCBEiFp6.woff2 +0 -0
- package/dist/assets/ItemsRenderer-DC8WVyMv.js +922 -0
- package/dist/assets/KeyboardShortcutTooltip-D8PAK5JP.js +31 -0
- package/dist/assets/LogsPanel-BR06u9RK.js +52 -0
- package/dist/assets/LogsPanel-C-_acMHp.js +2325 -0
- package/dist/assets/MCPConnectWorkflowsModal-3g8_iUa4.js +303 -0
- package/dist/assets/MainHeader-DiQc1edn.js +2153 -0
- package/dist/assets/MainSidebar-CoPGG5Ea.js +804 -0
- package/dist/assets/MigrationRuleDetail-BAxk1Pvl.js +295 -0
- package/dist/assets/MigrationRules-IW9lZMpE.js +285 -0
- package/dist/assets/Modal-CIzXlZdZ.js +204 -0
- package/dist/assets/ModelByIdSelectorModal-DLvBjzJO.js +115 -0
- package/dist/assets/NDVEmptyState-33UoX00I.js +19743 -0
- package/dist/assets/NodeCreation-BNzbSWSB.js +240 -0
- package/dist/assets/NodeCreator-BftgCKx7.js +1288 -0
- package/dist/assets/NodeDetailsView-CsoQCpcF.js +1075 -0
- package/dist/assets/NodeDetailsViewV2-C_wNQR_3.js +981 -0
- package/dist/assets/NodeIcon-B9VW6tX6.js +87 -0
- package/dist/assets/NodeSettings-ZwVip6VR.js +1872 -0
- package/dist/assets/NodeView-D4WUEvLB.js +2452 -0
- package/dist/assets/OAuthConsentView-DlrUqZbT.js +230 -0
- package/dist/assets/PageViewLayout-NT1KPFgy.js +12 -0
- package/dist/assets/ParameterInputList-sG2nz-Jo.js +38091 -0
- package/dist/assets/PrebuiltAgentTemplatesView-Csi5U8dc.js +154 -0
- package/dist/assets/ProjectBreadcrumb-C_XiY7sc.js +98 -0
- package/dist/assets/ProjectCardBadge-t_hs7vzx.js +209 -0
- package/dist/assets/ProjectHeader-Dq5Ihb26.js +549 -0
- package/dist/assets/ProjectIcon-DY8gGuHX.js +64 -0
- package/dist/assets/ProjectRoleView-Du-KTrAC.js +435 -0
- package/dist/assets/ProjectRolesView-DjxM_y4u.js +239 -0
- package/dist/assets/ProjectSettings-C6kWuV21.js +966 -0
- package/dist/assets/ProjectSharing-CVUgNWAY.js +262 -0
- package/dist/assets/ProjectVariables-CJlAo3dv.js +467 -0
- package/dist/assets/ProviderSettingsModal-BUFC2ZLv.js +307 -0
- package/dist/assets/PushConnectionTracker-DPBnGV0v.js +27 -0
- package/dist/assets/ResolversView-3BdkvvYA.js +209 -0
- package/dist/assets/ResourceFiltersDropdown-dgyXpcEX.js +159 -0
- package/dist/assets/ResourcesListLayout-qBLtomK6.js +631 -0
- package/dist/assets/RunDataHtml-BrW0OQra.js +7 -0
- package/dist/assets/RunDataHtml-Cleia4Cj.js +40 -0
- package/dist/assets/RunDataJson-uxkrhYRK.js +227 -0
- package/dist/assets/RunDataJsonActions-DkPk7E8d.js +5007 -0
- package/dist/assets/RunDataParsedAiContent-CtPRjig-.js +26 -0
- package/dist/assets/RunDataParsedAiContent-WAuqLQ5M.js +192 -0
- package/dist/assets/RunDataSearch-YBWUr93C.js +141 -0
- package/dist/assets/RunDataTable-DcXaBynW.js +631 -0
- package/dist/assets/SamlOnboarding-BTdQ_hr3.js +78 -0
- package/dist/assets/SaveButton-D5sQSxIk.js +89 -0
- package/dist/assets/SelectedItemsInfo-BHZ-NvF5.js +58 -0
- package/dist/assets/SettingsApiView-IfZTMXx1.js +313 -0
- package/dist/assets/SettingsChatHubView-gWh2X6vX.js +285 -0
- package/dist/assets/SettingsCommunityNodesView-D8VQtpGY.js +349 -0
- package/dist/assets/SettingsExternalSecrets-CpMc7mkW.js +233 -0
- package/dist/assets/SettingsLdapView-CU5a2MAy.js +2553 -0
- package/dist/assets/SettingsLogStreamingView-uojTe-oX.js +375 -0
- package/dist/assets/SettingsMCPView-B5Swp1C_.js +1214 -0
- package/dist/assets/SettingsPersonalView-Cr3aGood.js +402 -0
- package/dist/assets/SettingsSourceControl-DXOvFDEY.js +547 -0
- package/dist/assets/SettingsSso-27MfU1HV.js +1032 -0
- package/dist/assets/SettingsUsageAndPlan-DqIO-G46.js +419 -0
- package/dist/assets/SettingsUsersView-DfHB4_Kh.js +833 -0
- package/dist/assets/SettingsView-C4sA7Uny.js +90 -0
- package/dist/assets/SetupTemplateFormStep-BmiSzZin.js +258 -0
- package/dist/assets/SetupView-VORZ-L_u.js +112 -0
- package/dist/assets/SetupWorkflowCredentialsButton-DTmkOAW5.js +73 -0
- package/dist/assets/SetupWorkflowFromTemplateView-B9NupdJE.js +286 -0
- package/dist/assets/SeverityTag-CX1qTTNA.js +45 -0
- package/dist/assets/SigninView-D9_Pm16j.js +358 -0
- package/dist/assets/SignoutView-BFsjEAGz.js +19 -0
- package/dist/assets/SignupView-Am4ot0QZ.js +137 -0
- package/dist/assets/SkeletonAgentCard-C5TL-h8F.js +191 -0
- package/dist/assets/TagsDropdown-Bvx_Hd6Q.js +230 -0
- package/dist/assets/TemplateCard-CyQ1GuVz.js +105 -0
- package/dist/assets/TemplateDetails-CZRusTxE.js +124 -0
- package/dist/assets/TemplateList-DKvbwuiY.js +333 -0
- package/dist/assets/TemplatesCollectionView-D8dxU8By.js +184 -0
- package/dist/assets/TemplatesSearchView-CebC_GLs.js +1230 -0
- package/dist/assets/TemplatesView-025CcmIY.js +57 -0
- package/dist/assets/TemplatesWorkflowView-C2JfwJAn.js +170 -0
- package/dist/assets/TestRunDetailView-Ck78TTWO.js +395 -0
- package/dist/assets/TextWithHighlights-BxumwGnv.js +57 -0
- package/dist/assets/TimeAgo-C6EN4lCs.js +123 -0
- package/dist/assets/ToolsSelectorModal-8QJoUvRL.js +368 -0
- package/dist/assets/TriggerPanel-B6pacLkk.js +1225 -0
- package/dist/assets/VirtualSchema-B3zGe_8b.js +2402 -0
- package/dist/assets/VirtualSchema-Dkh0Cu5z.js +37 -0
- package/dist/assets/VueMarkdown-CQqJL9vK.js +28 -0
- package/dist/assets/WorkerView-Caznsljo.js +563 -0
- package/dist/assets/WorkflowActivationErrorMessage-CGrfPi9O.js +17 -0
- package/dist/assets/WorkflowActivator-BINnz0f7.js +362 -0
- package/dist/assets/WorkflowExecutionsInfoAccordion-Dg37yEfT.js +166 -0
- package/dist/assets/WorkflowExecutionsLandingPage-V2wdubhK.js +93 -0
- package/dist/assets/WorkflowExecutionsPreview-DdJaqYV6.js +616 -0
- package/dist/assets/WorkflowExecutionsView-DV8ySTfn.js +808 -0
- package/dist/assets/WorkflowHistory-GtaBMzIM.js +973 -0
- package/dist/assets/WorkflowLocation-CQ9Sq-2y.js +164 -0
- package/dist/assets/WorkflowOnboardingView-C49gt0Jr.js +61 -0
- package/dist/assets/WorkflowPreview-CXdvv4Nq.js +186 -0
- package/dist/assets/WorkflowTagsDropdown-QwbICWjN.js +71 -0
- package/dist/assets/WorkflowsView-B-MWIECO.js +3253 -0
- package/dist/assets/_MapCache-CcdIl4Ae.js +363 -0
- package/dist/assets/_baseOrderBy-N8Be_6z6.js +2989 -0
- package/dist/assets/_initCloneObject-viQQyT6o.js +80 -0
- package/dist/assets/_plugin-vue_export-helper-BwBpWJRZ.js +6 -0
- package/dist/assets/aiTemplatesStarterCollection.store-nL9nePkK.js +656 -0
- package/dist/assets/apiKeys.store-BhOFmP2j.js +51 -0
- package/dist/assets/assistant.store-CNywgN4S.js +518 -0
- package/dist/assets/auth.eventBus-CWXS0Qp7.js +5 -0
- package/dist/assets/banners.store-CGEcBTDn.js +195 -0
- package/dist/assets/builder.store-Czk2ipDE.js +31417 -0
- package/dist/assets/buttons.esm-yintpW2E.js +364 -0
- package/dist/assets/chart-CNvyywtJ.js +10958 -0
- package/dist/assets/chartjs.utils-BAE52Cv9.js +155 -0
- package/dist/assets/chat.store-290YeyrQ.js +865 -0
- package/dist/assets/chatPanel.store-NDaawEZL.js +118 -0
- package/dist/assets/chunk-6z4oVpB-.js +36 -0
- package/dist/assets/col-Cmt4cmuS.js +158 -0
- package/dist/assets/constants-C8OH4tTq.js +106256 -0
- package/dist/assets/constants-DMrsrpD7.js +32 -0
- package/dist/assets/core-B9gt_4yk.js +4 -0
- package/dist/assets/core-CP5FY4aX.js +1202 -0
- package/dist/assets/core-CRbPymLT.js +9741 -0
- package/dist/assets/dataTable.store-DmipQsol.js +207 -0
- package/dist/assets/date-picker-2IDsBs2n.js +4115 -0
- package/dist/assets/dateFormatter-ik4-9_9r.js +33 -0
- package/dist/assets/dateformat-hG8NERse.js +181 -0
- package/dist/assets/dialog-lMho1TD8.js +425 -0
- package/dist/assets/dist-Cw46Is-h.js +151 -0
- package/dist/assets/doppler-B__k0MeW.webp +0 -0
- package/dist/assets/element-icons-B-tDfklg.woff +0 -0
- package/dist/assets/element-icons-_lZGOqcG.ttf +0 -0
- package/dist/assets/empty-BuGRxzl4.js +2210 -0
- package/dist/assets/en-CF30SCh2.js +95 -0
- package/dist/assets/en-DyO2pPiC.js +2 -0
- package/dist/assets/es-BkUFJVtD.js +43338 -0
- package/dist/assets/evaluation.constants-GYAwmJnh.js +284 -0
- package/dist/assets/executions.store-B9uRYwgv.js +205 -0
- package/dist/assets/exports-Crx_gvt_.js +1799 -0
- package/dist/assets/externalSecrets.ee.store-BJh4a_6G.js +118 -0
- package/dist/assets/fileUtils-CRWqOQje.js +20 -0
- package/dist/assets/folders.store-yAFj-5Vl.js +235 -0
- package/dist/assets/get-BcEmeOxn.js +2781 -0
- package/dist/assets/index-SL8542zQ.js +28372 -0
- package/dist/assets/insights.constants-BkJCYJTL.js +55 -0
- package/dist/assets/insights.store-BFc3kDUo.js +61 -0
- package/dist/assets/insights.utils-CcLXdrrz.js +77 -0
- package/dist/assets/isEmpty-C3XXoHqJ.js +35216 -0
- package/dist/assets/languageModules-9LyndCqU.js +13862 -0
- package/dist/assets/logStreaming.store-IZhWe_VK.js +190 -0
- package/dist/assets/mcp.constants-_Jcn7fPq.js +10 -0
- package/dist/assets/mcp.store-B9yfcAN9.js +116 -0
- package/dist/assets/merge-DhuTk1HM.js +564 -0
- package/dist/assets/nodeCreator.store-Bpnrwp2l.js +5444 -0
- package/dist/assets/nodeIcon-D6X-ENYt.js +102 -0
- package/dist/assets/nodeTransforms-RzcOM0v2.js +42 -0
- package/dist/assets/orderBy-Cu9F9DU_.js +15 -0
- package/dist/assets/path-browserify-RUt2u7iT.js +328 -0
- package/dist/assets/personalizedTemplatesV3.store-BGYp0YBN.js +334 -0
- package/dist/assets/pickBy-UI0Jt4wC.js +18 -0
- package/dist/assets/preload-helper-dyVz7ck7.js +59 -0
- package/dist/assets/radio-CSce3UT0.js +262 -0
- package/dist/assets/readyToRun.store-YEMvPUqo.js +626 -0
- package/dist/assets/readyToRunWorkflows.store-G3srgIze.js +1319 -0
- package/dist/assets/retry-BgHaYzbB.js +23 -0
- package/dist/assets/roles.store-CRf_zJTb.js +51 -0
- package/dist/assets/router-DNpzz3GH.js +2631 -0
- package/dist/assets/sanitize-html-CbW56HUN.js +10758 -0
- package/dist/assets/schemaPreview.store-DUgN1yVE.js +113 -0
- package/dist/assets/semver-Bk6DGseV.js +1306 -0
- package/dist/assets/smartDecimal-DAZl4HKA.js +6 -0
- package/dist/assets/sortByProperty-Cn7iGKYu.js +8 -0
- package/dist/assets/sourceControl.eventBus-D47xXSc_.js +3 -0
- package/dist/assets/sqlite3-DBpDb1lf.wasm +0 -0
- package/dist/assets/sqlite3-opfs-async-proxy-vVtmDGHX.js +461 -0
- package/dist/assets/sqlite3-worker1-bundler-friendly-DLarOZDL.js +9405 -0
- package/dist/assets/src-jviYSG25.js +55454 -0
- package/dist/assets/sso.store-DyApJwhx.js +139 -0
- package/dist/assets/style-E3CrYFV8.css +111829 -0
- package/dist/assets/table-we1DjFMV.js +3944 -0
- package/dist/assets/templateActions-bEDSARw2.js +65 -0
- package/dist/assets/templateTransforms-BHWiRbtR.js +43 -0
- package/dist/assets/truncate-C0KYt7i3.js +4176 -0
- package/dist/assets/typescript.worker-CYqLvLHh.js +152048 -0
- package/dist/assets/uniqBy-xDyuCRP0.js +10 -0
- package/dist/assets/usage.store-CU5J_nGm.js +100 -0
- package/dist/assets/useActions-B1JckIRj.js +255 -0
- package/dist/assets/useBeforeUnload-DiDkvI8p.js +40 -0
- package/dist/assets/useCanvasMapping-BXT7rGhC.js +12570 -0
- package/dist/assets/useCanvasOperations-8ULLtMkY.js +1765 -0
- package/dist/assets/useClipboard-DvjhVHqJ.js +39 -0
- package/dist/assets/useCommandBar-C4tLJbKt.js +2425 -0
- package/dist/assets/useCredentialResolvers-BKeFGJnY.js +78 -0
- package/dist/assets/useCustomAgent-DpILEt5e.js +471 -0
- package/dist/assets/useDebounce-Br5_1ug-.js +147 -0
- package/dist/assets/useExecutionData-M5iKsX6z.js +23 -0
- package/dist/assets/useExecutionDebugging-8azMzbnd.js +191 -0
- package/dist/assets/useExecutionHelpers-BgRRhpBM.js +91 -0
- package/dist/assets/useImportCurlCommand-CKiEmX5P.js +8891 -0
- package/dist/assets/useIntersectionObserver-BWMwOueh.js +33 -0
- package/dist/assets/useKeybindings-B2jfN6rd.js +62 -0
- package/dist/assets/useLogsTreeExpand-sZViUfdM.js +843 -0
- package/dist/assets/useMcp-DoMOIfqT.js +27 -0
- package/dist/assets/usePageRedirectionHelper-DjkznpX6.js +51 -0
- package/dist/assets/usePinnedData-BhZkqttf.js +203 -0
- package/dist/assets/usePushConnection-DMS-F_IW.js +513 -0
- package/dist/assets/useRecentResources-BVORr7eM.js +118 -0
- package/dist/assets/useRunWorkflow-LO7ffLp9.js +950 -0
- package/dist/assets/useSettingsItems-BhZXwMZn.js +144 -0
- package/dist/assets/useTelemetryContext-V6bv4YRq.js +34 -0
- package/dist/assets/useWorkflowActivate-DeSmDXjI.js +152 -0
- package/dist/assets/useWorkflowsCache-DtcEEAIR.js +179 -0
- package/dist/assets/userRoleProvisioning.store-kkSIdeTo.js +33 -0
- package/dist/assets/utils-DI7dLldp.js +54 -0
- package/dist/assets/versions.store-B1z2OrLE.js +191 -0
- package/dist/assets/vue-CydWIhxN.js +4378 -0
- package/dist/assets/vue-json-pretty-CsGX66mG.js +1130 -0
- package/dist/assets/vue.runtime.esm-bundler-tP5dCd7J.js +7325 -0
- package/dist/assets/xml-B_oj6Mle.js +2060 -0
- package/dist/favicon.ico +0 -0
- package/dist/index.html +157 -0
- package/dist/static/base-path.js +1 -0
- package/dist/static/community_package_tooltip_img.png +0 -0
- package/dist/static/data-mapping-gif.gif +0 -0
- package/dist/static/form-grey.svg +1 -0
- package/dist/static/google-auth/disabled.dark.png +0 -0
- package/dist/static/google-auth/disabled.png +0 -0
- package/dist/static/google-auth/focus.dark.png +0 -0
- package/dist/static/google-auth/focus.png +0 -0
- package/dist/static/google-auth/normal.dark.png +0 -0
- package/dist/static/google-auth/normal.png +0 -0
- package/dist/static/google-auth/pressed.dark.png +0 -0
- package/dist/static/google-auth/pressed.png +0 -0
- package/dist/static/n8n-logo.png +0 -0
- package/dist/static/og_image.png +0 -0
- package/dist/static/open-ai.svg +1 -0
- package/dist/static/openChat.png +0 -0
- package/dist/static/posthog.init.js +41 -0
- package/dist/static/prefers-color-scheme.css +5 -0
- package/dist/static/webhook-icon.svg +1 -0
- package/dist/tree-sitter-bash.wasm +0 -0
- package/dist/tree-sitter.wasm +0 -0
- package/eslint.config.mjs +59 -0
- package/index.html +45 -0
- package/index.js +0 -0
- package/package.json +147 -0
- package/postcss.config.cjs +6 -0
- package/scripts/fetch-node-popularity.mjs +102 -0
- package/stylelint.config.mjs +9 -0
- package/tailwind.config.js +8 -0
- package/tsconfig.json +36 -0
- package/vite/i18n-locales-hmr-helpers.ts +19 -0
- package/vite/source-map-js-shim.ts +1 -0
- package/vite/vite-plugin-node-popularity.mts +32 -0
- package/vite.config.mts +304 -0
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
import { E as createCommentVNode, It as ref, P as defineComponent, T as createBlock, Z as onMounted, et as openBlock } from "./vue.runtime.esm-bundler-tP5dCd7J.js";
|
|
2
|
+
import { rt as useI18n } from "./core-CRbPymLT.js";
|
|
3
|
+
import "./src-jviYSG25.js";
|
|
4
|
+
import "./en-CF30SCh2.js";
|
|
5
|
+
import "./preload-helper-dyVz7ck7.js";
|
|
6
|
+
import "./_plugin-vue_export-helper-BwBpWJRZ.js";
|
|
7
|
+
import "./truncate-C0KYt7i3.js";
|
|
8
|
+
import { Er as useUsersStore, y as useToast } from "./builder.store-Czk2ipDE.js";
|
|
9
|
+
import "./empty-BuGRxzl4.js";
|
|
10
|
+
import { v as useRouter } from "./get-BcEmeOxn.js";
|
|
11
|
+
import "./sanitize-html-CbW56HUN.js";
|
|
12
|
+
import "./CalendarDate-DgQUMbNo.js";
|
|
13
|
+
import "./path-browserify-RUt2u7iT.js";
|
|
14
|
+
import "./_MapCache-CcdIl4Ae.js";
|
|
15
|
+
import { Ro as VIEWS, jc as MFA_AUTHENTICATION_CODE_INPUT_MAX_LENGTH } from "./constants-C8OH4tTq.js";
|
|
16
|
+
import "./merge-DhuTk1HM.js";
|
|
17
|
+
import "./_baseOrderBy-N8Be_6z6.js";
|
|
18
|
+
import "./dateformat-hG8NERse.js";
|
|
19
|
+
import "./useDebounce-Br5_1ug-.js";
|
|
20
|
+
import "./sso.store-DyApJwhx.js";
|
|
21
|
+
import { t as AuthView_default } from "./AuthView-D2LWHrMp.js";
|
|
22
|
+
var ChangePasswordView_default = /* @__PURE__ */ defineComponent({
|
|
23
|
+
__name: "ChangePasswordView",
|
|
24
|
+
setup(__props) {
|
|
25
|
+
const usersStore = useUsersStore();
|
|
26
|
+
const locale = useI18n();
|
|
27
|
+
const toast = useToast();
|
|
28
|
+
const router = useRouter();
|
|
29
|
+
const password = ref("");
|
|
30
|
+
const loading = ref(false);
|
|
31
|
+
const config = ref(null);
|
|
32
|
+
const passwordsMatch = (value) => {
|
|
33
|
+
if (typeof value !== "string") return false;
|
|
34
|
+
if (value !== password.value) return { messageKey: "auth.changePassword.passwordsMustMatchError" };
|
|
35
|
+
return false;
|
|
36
|
+
};
|
|
37
|
+
const getResetToken = () => {
|
|
38
|
+
return !router.currentRoute.value.query.token || typeof router.currentRoute.value.query.token !== "string" ? null : router.currentRoute.value.query.token;
|
|
39
|
+
};
|
|
40
|
+
const getMfaEnabled = () => {
|
|
41
|
+
if (!router.currentRoute.value.query.mfaEnabled) return null;
|
|
42
|
+
return router.currentRoute.value.query.mfaEnabled === "true" ? true : false;
|
|
43
|
+
};
|
|
44
|
+
const onSubmit = async (values) => {
|
|
45
|
+
try {
|
|
46
|
+
loading.value = true;
|
|
47
|
+
const token = getResetToken();
|
|
48
|
+
if (token) {
|
|
49
|
+
const changePasswordParameters = {
|
|
50
|
+
token,
|
|
51
|
+
password: password.value,
|
|
52
|
+
...values.mfaCode && { mfaCode: values.mfaCode }
|
|
53
|
+
};
|
|
54
|
+
await usersStore.changePassword(changePasswordParameters);
|
|
55
|
+
toast.showMessage({
|
|
56
|
+
type: "success",
|
|
57
|
+
title: locale.baseText("auth.changePassword.passwordUpdated"),
|
|
58
|
+
message: locale.baseText("auth.changePassword.passwordUpdatedMessage")
|
|
59
|
+
});
|
|
60
|
+
await router.push({ name: VIEWS.SIGNIN });
|
|
61
|
+
} else toast.showError(new Error(locale.baseText("auth.validation.missingParameters")), locale.baseText("auth.changePassword.error"));
|
|
62
|
+
} catch (error) {
|
|
63
|
+
toast.showError(error, locale.baseText("auth.changePassword.error"));
|
|
64
|
+
}
|
|
65
|
+
loading.value = false;
|
|
66
|
+
};
|
|
67
|
+
const onInput = (e) => {
|
|
68
|
+
if (e.name === "password" && typeof e.value === "string") password.value = e.value;
|
|
69
|
+
};
|
|
70
|
+
onMounted(async () => {
|
|
71
|
+
const form = {
|
|
72
|
+
title: locale.baseText("auth.changePassword"),
|
|
73
|
+
buttonText: locale.baseText("auth.changePassword"),
|
|
74
|
+
redirectText: locale.baseText("auth.signin"),
|
|
75
|
+
redirectLink: "/signin",
|
|
76
|
+
inputs: [{
|
|
77
|
+
name: "password",
|
|
78
|
+
properties: {
|
|
79
|
+
label: locale.baseText("auth.newPassword"),
|
|
80
|
+
type: "password",
|
|
81
|
+
required: true,
|
|
82
|
+
validationRules: [{ name: "DEFAULT_PASSWORD_RULES" }],
|
|
83
|
+
infoText: locale.baseText("auth.defaultPasswordRequirements"),
|
|
84
|
+
autocomplete: "new-password",
|
|
85
|
+
capitalize: true
|
|
86
|
+
}
|
|
87
|
+
}, {
|
|
88
|
+
name: "password2",
|
|
89
|
+
properties: {
|
|
90
|
+
label: locale.baseText("auth.changePassword.reenterNewPassword"),
|
|
91
|
+
type: "password",
|
|
92
|
+
required: true,
|
|
93
|
+
validators: { TWO_PASSWORDS_MATCH: { validate: passwordsMatch } },
|
|
94
|
+
validationRules: [{ name: "TWO_PASSWORDS_MATCH" }],
|
|
95
|
+
autocomplete: "new-password",
|
|
96
|
+
capitalize: true
|
|
97
|
+
}
|
|
98
|
+
}]
|
|
99
|
+
};
|
|
100
|
+
const token = getResetToken();
|
|
101
|
+
if (getMfaEnabled()) form.inputs.push({
|
|
102
|
+
name: "mfaCode",
|
|
103
|
+
initialValue: "",
|
|
104
|
+
properties: {
|
|
105
|
+
required: true,
|
|
106
|
+
label: locale.baseText("mfa.code.input.label"),
|
|
107
|
+
placeholder: locale.baseText("mfa.code.input.placeholder"),
|
|
108
|
+
maxlength: 6,
|
|
109
|
+
capitalize: true,
|
|
110
|
+
validateOnBlur: true
|
|
111
|
+
}
|
|
112
|
+
});
|
|
113
|
+
config.value = form;
|
|
114
|
+
try {
|
|
115
|
+
if (!token) throw new Error(locale.baseText("auth.changePassword.missingTokenError"));
|
|
116
|
+
await usersStore.validatePasswordToken({ token });
|
|
117
|
+
} catch (e) {
|
|
118
|
+
toast.showError(e, locale.baseText("auth.changePassword.tokenValidationError"));
|
|
119
|
+
router.replace({ name: VIEWS.SIGNIN });
|
|
120
|
+
}
|
|
121
|
+
});
|
|
122
|
+
return (_ctx, _cache) => {
|
|
123
|
+
return config.value ? (openBlock(), createBlock(AuthView_default, {
|
|
124
|
+
key: 0,
|
|
125
|
+
form: config.value,
|
|
126
|
+
"form-loading": loading.value,
|
|
127
|
+
onSubmit,
|
|
128
|
+
onUpdate: onInput
|
|
129
|
+
}, null, 8, ["form", "form-loading"])) : createCommentVNode("", true);
|
|
130
|
+
};
|
|
131
|
+
}
|
|
132
|
+
});
|
|
133
|
+
export { ChangePasswordView_default as default };
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { C as computed, Cn as toDisplayString, D as createElementBlock, Gt as unref, P as defineComponent, T as createBlock, bt as withCtx, et as openBlock, j as createTextVNode, vn as normalizeClass, w as createBaseVNode } from "./vue.runtime.esm-bundler-tP5dCd7J.js";
|
|
2
|
+
import { rt as useI18n } from "./core-CRbPymLT.js";
|
|
3
|
+
import { Cn as N8nIcon_default, ht as N8nTooltip_default } from "./src-jviYSG25.js";
|
|
4
|
+
import { t as __plugin_vue_export_helper_default } from "./_plugin-vue_export-helper-BwBpWJRZ.js";
|
|
5
|
+
import { _n as useCredentialsStore } from "./builder.store-Czk2ipDE.js";
|
|
6
|
+
import { Yr as PROVIDER_CREDENTIAL_TYPE_MAP } from "./constants-C8OH4tTq.js";
|
|
7
|
+
import { t as CredentialIcon_default } from "./CredentialIcon-8YdTTFZ1.js";
|
|
8
|
+
import { d as personalAgentDefaultIcon, m as workflowAgentDefaultIcon, u as isLlmProviderModel } from "./chat.store-290YeyrQ.js";
|
|
9
|
+
var ChatAgentAvatar_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
|
|
10
|
+
__name: "ChatAgentAvatar",
|
|
11
|
+
props: {
|
|
12
|
+
agent: {},
|
|
13
|
+
size: {},
|
|
14
|
+
tooltip: { type: Boolean }
|
|
15
|
+
},
|
|
16
|
+
setup(__props) {
|
|
17
|
+
const credentialsStore = useCredentialsStore();
|
|
18
|
+
const isCredentialsIconReady = computed(() => credentialsStore.allCredentialTypes.length > 0);
|
|
19
|
+
const i18n = useI18n();
|
|
20
|
+
return (_ctx, _cache) => {
|
|
21
|
+
return openBlock(), createBlock(unref(N8nTooltip_default), {
|
|
22
|
+
"show-after": 100,
|
|
23
|
+
placement: "left",
|
|
24
|
+
disabled: !_ctx.tooltip
|
|
25
|
+
}, {
|
|
26
|
+
content: withCtx(() => [createTextVNode(toDisplayString(_ctx.agent?.name || unref(i18n).baseText("chatHub.agent.unavailableAgent")), 1)]),
|
|
27
|
+
default: withCtx(() => [createBaseVNode("div", { class: normalizeClass(_ctx.$style.container) }, [_ctx.agent?.icon?.type === "emoji" ? (openBlock(), createElementBlock("span", {
|
|
28
|
+
key: 0,
|
|
29
|
+
class: normalizeClass([_ctx.$style.emoji, _ctx.$style[_ctx.size]])
|
|
30
|
+
}, toDisplayString(_ctx.agent.icon.value), 3)) : !_ctx.agent || !unref(isLlmProviderModel)(_ctx.agent.model) ? (openBlock(), createBlock(unref(N8nIcon_default), {
|
|
31
|
+
key: 1,
|
|
32
|
+
color: _ctx.size === "sm" ? "text-base" : "text-light",
|
|
33
|
+
class: normalizeClass([_ctx.$style.n8nIcon, _ctx.$style[_ctx.size]]),
|
|
34
|
+
icon: _ctx.agent?.icon?.value ?? (_ctx.agent?.model.provider === "n8n" ? unref(workflowAgentDefaultIcon) : unref(personalAgentDefaultIcon)).value,
|
|
35
|
+
size: _ctx.size === "lg" ? "xxlarge" : _ctx.size === "sm" ? "large" : "xlarge"
|
|
36
|
+
}, null, 8, [
|
|
37
|
+
"color",
|
|
38
|
+
"class",
|
|
39
|
+
"icon",
|
|
40
|
+
"size"
|
|
41
|
+
])) : (openBlock(), createBlock(CredentialIcon_default, {
|
|
42
|
+
key: 2,
|
|
43
|
+
class: normalizeClass([_ctx.$style.credentialsIcon, { [_ctx.$style.isReady]: isCredentialsIconReady.value }]),
|
|
44
|
+
"credential-type-name": unref(PROVIDER_CREDENTIAL_TYPE_MAP)[_ctx.agent.model.provider],
|
|
45
|
+
size: _ctx.size === "sm" ? 16 : _ctx.size === "lg" ? 40 : 20
|
|
46
|
+
}, null, 8, [
|
|
47
|
+
"class",
|
|
48
|
+
"credential-type-name",
|
|
49
|
+
"size"
|
|
50
|
+
]))], 2)]),
|
|
51
|
+
_: 1
|
|
52
|
+
}, 8, ["disabled"]);
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
});
|
|
56
|
+
var ChatAgentAvatar_vue_vue_type_style_index_0_lang_module_default = {
|
|
57
|
+
container: "_container_6zc6p_123",
|
|
58
|
+
n8nIcon: "_n8nIcon_6zc6p_133",
|
|
59
|
+
lg: "_lg_6zc6p_136",
|
|
60
|
+
emoji: "_emoji_6zc6p_144",
|
|
61
|
+
sm: "_sm_6zc6p_149",
|
|
62
|
+
md: "_md_6zc6p_153",
|
|
63
|
+
credentialsIcon: "_credentialsIcon_6zc6p_164",
|
|
64
|
+
isReady: "_isReady_6zc6p_167"
|
|
65
|
+
};
|
|
66
|
+
var ChatAgentAvatar_default = /* @__PURE__ */ __plugin_vue_export_helper_default(ChatAgentAvatar_vue_vue_type_script_setup_true_lang_default, [["__cssModules", { "$style": ChatAgentAvatar_vue_vue_type_style_index_0_lang_module_default }]]);
|
|
67
|
+
export { ChatAgentAvatar_default as t };
|
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
import { C as computed, Cn as toDisplayString, D as createElementBlock, E as createCommentVNode, Gt as unref, M as createVNode, P as defineComponent, T as createBlock, et as openBlock, h as withModifiers, w as createBaseVNode } from "./vue.runtime.esm-bundler-tP5dCd7J.js";
|
|
2
|
+
import { t as __plugin_vue_export_helper_default } from "./_plugin-vue_export-helper-BwBpWJRZ.js";
|
|
3
|
+
var _hoisted_1$6 = {
|
|
4
|
+
viewBox: "0 0 24 24",
|
|
5
|
+
width: "1.2em",
|
|
6
|
+
height: "1.2em"
|
|
7
|
+
};
|
|
8
|
+
function render$5(_ctx, _cache) {
|
|
9
|
+
return openBlock(), createElementBlock("svg", _hoisted_1$6, _cache[0] || (_cache[0] = [createBaseVNode("path", {
|
|
10
|
+
fill: "currentColor",
|
|
11
|
+
d: "M20 6.91L17.09 4L12 9.09L6.91 4L4 6.91L9.09 12L4 17.09L6.91 20L12 14.91L17.09 20L20 17.09L14.91 12z"
|
|
12
|
+
}, null, -1)]));
|
|
13
|
+
}
|
|
14
|
+
var closeThick_default = {
|
|
15
|
+
name: "mdi-closeThick",
|
|
16
|
+
render: render$5
|
|
17
|
+
};
|
|
18
|
+
var _hoisted_1$5 = {
|
|
19
|
+
viewBox: "0 0 24 24",
|
|
20
|
+
width: "1.2em",
|
|
21
|
+
height: "1.2em"
|
|
22
|
+
};
|
|
23
|
+
function render$4(_ctx, _cache) {
|
|
24
|
+
return openBlock(), createElementBlock("svg", _hoisted_1$5, _cache[0] || (_cache[0] = [createBaseVNode("path", {
|
|
25
|
+
fill: "currentColor",
|
|
26
|
+
d: "M13 9h5.5L13 3.5zM6 2h8l6 6v12a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V4c0-1.11.89-2 2-2m0 18h12v-8l-4 4l-2-2zM8 9a2 2 0 0 0-2 2a2 2 0 0 0 2 2a2 2 0 0 0 2-2a2 2 0 0 0-2-2"
|
|
27
|
+
}, null, -1)]));
|
|
28
|
+
}
|
|
29
|
+
var fileImage_default = {
|
|
30
|
+
name: "mdi-fileImage",
|
|
31
|
+
render: render$4
|
|
32
|
+
};
|
|
33
|
+
var _hoisted_1$4 = {
|
|
34
|
+
viewBox: "0 0 24 24",
|
|
35
|
+
width: "1.2em",
|
|
36
|
+
height: "1.2em"
|
|
37
|
+
};
|
|
38
|
+
function render$3(_ctx, _cache) {
|
|
39
|
+
return openBlock(), createElementBlock("svg", _hoisted_1$4, _cache[0] || (_cache[0] = [createBaseVNode("path", {
|
|
40
|
+
fill: "currentColor",
|
|
41
|
+
d: "M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8zm-1 11h-2v5a2 2 0 0 1-2 2a2 2 0 0 1-2-2a2 2 0 0 1 2-2c.4 0 .7.1 1 .3V11h3zm0-4V3.5L18.5 9z"
|
|
42
|
+
}, null, -1)]));
|
|
43
|
+
}
|
|
44
|
+
var fileMusic_default = {
|
|
45
|
+
name: "mdi-fileMusic",
|
|
46
|
+
render: render$3
|
|
47
|
+
};
|
|
48
|
+
var _hoisted_1$3 = {
|
|
49
|
+
viewBox: "0 0 24 24",
|
|
50
|
+
width: "1.2em",
|
|
51
|
+
height: "1.2em"
|
|
52
|
+
};
|
|
53
|
+
function render$2(_ctx, _cache) {
|
|
54
|
+
return openBlock(), createElementBlock("svg", _hoisted_1$3, _cache[0] || (_cache[0] = [createBaseVNode("path", {
|
|
55
|
+
fill: "currentColor",
|
|
56
|
+
d: "M13 9h5.5L13 3.5zM6 2h8l6 6v12a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V4c0-1.11.89-2 2-2m9 16v-2H6v2zm3-4v-2H6v2z"
|
|
57
|
+
}, null, -1)]));
|
|
58
|
+
}
|
|
59
|
+
var fileText_default = {
|
|
60
|
+
name: "mdi-fileText",
|
|
61
|
+
render: render$2
|
|
62
|
+
};
|
|
63
|
+
var _hoisted_1$2 = {
|
|
64
|
+
viewBox: "0 0 24 24",
|
|
65
|
+
width: "1.2em",
|
|
66
|
+
height: "1.2em"
|
|
67
|
+
};
|
|
68
|
+
function render$1(_ctx, _cache) {
|
|
69
|
+
return openBlock(), createElementBlock("svg", _hoisted_1$2, _cache[0] || (_cache[0] = [createBaseVNode("path", {
|
|
70
|
+
fill: "currentColor",
|
|
71
|
+
d: "M13 9h5.5L13 3.5zM6 2h8l6 6v12a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V4c0-1.11.89-2 2-2m11 17v-6l-3 2.2V13H7v6h7v-2.2z"
|
|
72
|
+
}, null, -1)]));
|
|
73
|
+
}
|
|
74
|
+
var fileVideo_default = {
|
|
75
|
+
name: "mdi-fileVideo",
|
|
76
|
+
render: render$1
|
|
77
|
+
};
|
|
78
|
+
var _hoisted_1$1 = {
|
|
79
|
+
viewBox: "0 0 24 24",
|
|
80
|
+
width: "1.2em",
|
|
81
|
+
height: "1.2em"
|
|
82
|
+
};
|
|
83
|
+
function render(_ctx, _cache) {
|
|
84
|
+
return openBlock(), createElementBlock("svg", _hoisted_1$1, _cache[0] || (_cache[0] = [createBaseVNode("path", {
|
|
85
|
+
fill: "currentColor",
|
|
86
|
+
d: "M14 3v2h3.59l-9.83 9.83l1.41 1.41L19 6.41V10h2V3m-2 16H5V5h7V3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7h-2z"
|
|
87
|
+
}, null, -1)]));
|
|
88
|
+
}
|
|
89
|
+
var openInNew_default = {
|
|
90
|
+
name: "mdi-openInNew",
|
|
91
|
+
render
|
|
92
|
+
};
|
|
93
|
+
var _hoisted_1 = { class: "chat-file-name" };
|
|
94
|
+
var ChatFile_default = /* @__PURE__ */ __plugin_vue_export_helper_default(/* @__PURE__ */ defineComponent({
|
|
95
|
+
__name: "ChatFile",
|
|
96
|
+
props: {
|
|
97
|
+
file: {},
|
|
98
|
+
isRemovable: { type: Boolean },
|
|
99
|
+
isPreviewable: { type: Boolean },
|
|
100
|
+
href: {}
|
|
101
|
+
},
|
|
102
|
+
emits: ["remove"],
|
|
103
|
+
setup(__props, { emit: __emit }) {
|
|
104
|
+
const props = __props;
|
|
105
|
+
const emit = __emit;
|
|
106
|
+
const iconMapper = {
|
|
107
|
+
document: fileText_default,
|
|
108
|
+
audio: fileMusic_default,
|
|
109
|
+
image: fileImage_default,
|
|
110
|
+
video: fileVideo_default
|
|
111
|
+
};
|
|
112
|
+
const TypeIcon = computed(() => {
|
|
113
|
+
return iconMapper[props.file?.type.split("/")[0]] || fileText_default;
|
|
114
|
+
});
|
|
115
|
+
function onClick() {
|
|
116
|
+
if (props.href) {
|
|
117
|
+
window.open(props.href, "_blank", "noopener noreferrer");
|
|
118
|
+
return;
|
|
119
|
+
}
|
|
120
|
+
if (props.isPreviewable) window.open(URL.createObjectURL(props.file));
|
|
121
|
+
}
|
|
122
|
+
function onDelete() {
|
|
123
|
+
emit("remove", props.file);
|
|
124
|
+
}
|
|
125
|
+
return (_ctx, _cache) => {
|
|
126
|
+
return openBlock(), createElementBlock("div", {
|
|
127
|
+
class: "chat-file",
|
|
128
|
+
"data-test-id": "chat-file",
|
|
129
|
+
onClick
|
|
130
|
+
}, [
|
|
131
|
+
createVNode(unref(TypeIcon), { class: "chat-icon" }),
|
|
132
|
+
createBaseVNode("p", _hoisted_1, toDisplayString(_ctx.file.name), 1),
|
|
133
|
+
_ctx.isRemovable ? (openBlock(), createElementBlock("span", {
|
|
134
|
+
key: 0,
|
|
135
|
+
class: "chat-file-delete",
|
|
136
|
+
"data-test-id": "chat-file-remove",
|
|
137
|
+
onClick: withModifiers(onDelete, ["stop"])
|
|
138
|
+
}, [createVNode(unref(closeThick_default))])) : _ctx.isPreviewable || _ctx.href ? (openBlock(), createBlock(unref(openInNew_default), {
|
|
139
|
+
key: 1,
|
|
140
|
+
class: "chat-file-preview"
|
|
141
|
+
})) : createCommentVNode("", true)
|
|
142
|
+
]);
|
|
143
|
+
};
|
|
144
|
+
}
|
|
145
|
+
}), [["__scopeId", "data-v-06c7b5c1"]]);
|
|
146
|
+
export { ChatFile_default as t };
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import { C as computed, D as createElementBlock, Gt as unref, It as ref, P as defineComponent, _t as watch, at as renderSlot, et as openBlock, vn as normalizeClass } from "./vue.runtime.esm-bundler-tP5dCd7J.js";
|
|
2
|
+
import { m as useEventListener, v as useLocalStorage, y as useMediaQuery } from "./core-CRbPymLT.js";
|
|
3
|
+
import { ct as useDeviceSupport } from "./src-jviYSG25.js";
|
|
4
|
+
import { t as __plugin_vue_export_helper_default } from "./_plugin-vue_export-helper-BwBpWJRZ.js";
|
|
5
|
+
import { Zn as useProjectsStore, _n as useCredentialsStore, aa as useUIStore, ms as useSettingsStore } from "./builder.store-Czk2ipDE.js";
|
|
6
|
+
import { v as useRouter } from "./get-BcEmeOxn.js";
|
|
7
|
+
import { $r as chatHubProviderSchema, Fo as stringType, Mo as nullType, No as objectType, Po as recordType, Xr as agentIconOrEmojiSchema, Yr as PROVIDER_CREDENTIAL_TYPE_MAP, Zr as chatHubConversationModelSchema, ws as LOCAL_STORAGE_CHAT_HUB_CREDENTIALS } from "./constants-C8OH4tTq.js";
|
|
8
|
+
import { f as MOBILE_MEDIA_QUERY, u as CHAT_VIEW } from "./constants-DMrsrpD7.js";
|
|
9
|
+
import { l as isLlmProvider, u as isLlmProviderModel } from "./chat.store-290YeyrQ.js";
|
|
10
|
+
const credentialsMapSchema = recordType(chatHubProviderSchema, stringType().or(nullType()));
|
|
11
|
+
const chatHubConversationModelWithCachedDisplayNameSchema = chatHubConversationModelSchema.and(objectType({
|
|
12
|
+
cachedDisplayName: stringType().optional(),
|
|
13
|
+
cachedIcon: agentIconOrEmojiSchema.optional()
|
|
14
|
+
})).transform((value) => ({
|
|
15
|
+
...value,
|
|
16
|
+
cachedDisplayName: value.cachedDisplayName || (isLlmProviderModel(value) ? value.model : "")
|
|
17
|
+
}));
|
|
18
|
+
function useChatCredentials(userId) {
|
|
19
|
+
const isInitialized = ref(false);
|
|
20
|
+
const credentialsStore = useCredentialsStore();
|
|
21
|
+
const settingsStore = useSettingsStore();
|
|
22
|
+
const projectStore = useProjectsStore();
|
|
23
|
+
const selectedCredentials = useLocalStorage(LOCAL_STORAGE_CHAT_HUB_CREDENTIALS(userId), {}, {
|
|
24
|
+
writeDefaults: false,
|
|
25
|
+
shallow: true,
|
|
26
|
+
serializer: {
|
|
27
|
+
read: (value) => {
|
|
28
|
+
try {
|
|
29
|
+
return credentialsMapSchema.parse(JSON.parse(value));
|
|
30
|
+
} catch (error) {
|
|
31
|
+
return {};
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
write: (value) => JSON.stringify(value)
|
|
35
|
+
}
|
|
36
|
+
});
|
|
37
|
+
const isCredentialsReady = computed(() => isInitialized.value || credentialsStore.allCredentials.length > 0);
|
|
38
|
+
const autoSelectCredentials = computed(() => Object.fromEntries(chatHubProviderSchema.options.map((provider) => {
|
|
39
|
+
if (!isLlmProvider(provider)) return [provider, null];
|
|
40
|
+
const credentialType = PROVIDER_CREDENTIAL_TYPE_MAP[provider];
|
|
41
|
+
if (!credentialType) return [provider, null];
|
|
42
|
+
const availableCredentials = credentialsStore.getCredentialsByType(credentialType);
|
|
43
|
+
const settings = settingsStore.moduleSettings?.["chat-hub"]?.providers[provider];
|
|
44
|
+
if (settings?.credentialId && availableCredentials.some((c) => c.id === settings.credentialId)) return [provider, settings.credentialId];
|
|
45
|
+
return [provider, availableCredentials.toSorted((a, b) => +new Date(b.createdAt) - +new Date(a.createdAt))[0]?.id ?? null];
|
|
46
|
+
})));
|
|
47
|
+
const credentialsByProvider = computed(() => isCredentialsReady.value ? chatHubProviderSchema.options.reduce((acc, provider) => {
|
|
48
|
+
const cred = selectedCredentials.value[provider] ?? null;
|
|
49
|
+
acc[provider] = cred && credentialsStore.allCredentials.some((c) => c.id === cred) ? cred : autoSelectCredentials.value[provider];
|
|
50
|
+
return acc;
|
|
51
|
+
}, {}) : null);
|
|
52
|
+
function selectCredential(provider, id) {
|
|
53
|
+
selectedCredentials.value = {
|
|
54
|
+
...selectedCredentials.value,
|
|
55
|
+
[provider]: id
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
watch(() => projectStore.personalProject, async (personalProject) => {
|
|
59
|
+
if (personalProject) {
|
|
60
|
+
await Promise.all([credentialsStore.fetchCredentialTypes(false), credentialsStore.fetchAllCredentialsForWorkflow({ projectId: personalProject.id })]);
|
|
61
|
+
isInitialized.value = true;
|
|
62
|
+
}
|
|
63
|
+
}, { immediate: true });
|
|
64
|
+
return {
|
|
65
|
+
credentialsByProvider,
|
|
66
|
+
selectCredential
|
|
67
|
+
};
|
|
68
|
+
}
|
|
69
|
+
var ChatLayout_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
|
|
70
|
+
__name: "ChatLayout",
|
|
71
|
+
setup(__props) {
|
|
72
|
+
const isMobileDevice$1 = useMediaQuery(MOBILE_MEDIA_QUERY);
|
|
73
|
+
const router = useRouter();
|
|
74
|
+
const uiStore = useUIStore();
|
|
75
|
+
const { isCtrlKeyPressed } = useDeviceSupport();
|
|
76
|
+
useEventListener(document, "keydown", (event) => {
|
|
77
|
+
if (event.key.toLowerCase() === "o" && isCtrlKeyPressed(event) && event.shiftKey && !uiStore.isAnyModalOpen) {
|
|
78
|
+
event.preventDefault();
|
|
79
|
+
event.stopPropagation();
|
|
80
|
+
router.push({
|
|
81
|
+
name: CHAT_VIEW,
|
|
82
|
+
force: true
|
|
83
|
+
});
|
|
84
|
+
}
|
|
85
|
+
});
|
|
86
|
+
return (_ctx, _cache) => {
|
|
87
|
+
return openBlock(), createElementBlock("div", { class: normalizeClass([_ctx.$style.component, { [_ctx.$style.isMobileDevice]: unref(isMobileDevice$1) }]) }, [renderSlot(_ctx.$slots, "default")], 2);
|
|
88
|
+
};
|
|
89
|
+
}
|
|
90
|
+
});
|
|
91
|
+
var ChatLayout_vue_vue_type_style_index_0_lang_module_default = {
|
|
92
|
+
component: "_component_gldft_123",
|
|
93
|
+
isMobileDevice: "_isMobileDevice_gldft_134"
|
|
94
|
+
};
|
|
95
|
+
var ChatLayout_default = /* @__PURE__ */ __plugin_vue_export_helper_default(ChatLayout_vue_vue_type_script_setup_true_lang_default, [["__cssModules", { "$style": ChatLayout_vue_vue_type_style_index_0_lang_module_default }]]);
|
|
96
|
+
export { useChatCredentials as n, chatHubConversationModelWithCachedDisplayNameSchema as r, ChatLayout_default as t };
|
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
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, _ as Fragment, _t as watch, bt as withCtx, et as openBlock, it as renderList, j as createTextVNode, vn as normalizeClass, w as createBaseVNode } from "./vue.runtime.esm-bundler-tP5dCd7J.js";
|
|
2
|
+
import { rt as useI18n, y as useMediaQuery } from "./core-CRbPymLT.js";
|
|
3
|
+
import { bn as N8nText_default, xn as N8nButton_default } from "./src-jviYSG25.js";
|
|
4
|
+
import "./en-CF30SCh2.js";
|
|
5
|
+
import "./preload-helper-dyVz7ck7.js";
|
|
6
|
+
import { t as __plugin_vue_export_helper_default } from "./_plugin-vue_export-helper-BwBpWJRZ.js";
|
|
7
|
+
import "./truncate-C0KYt7i3.js";
|
|
8
|
+
import { Er as useUsersStore, aa as useUIStore, h as useMessage, y as useToast } from "./builder.store-Czk2ipDE.js";
|
|
9
|
+
import "./empty-BuGRxzl4.js";
|
|
10
|
+
import "./get-BcEmeOxn.js";
|
|
11
|
+
import "./sanitize-html-CbW56HUN.js";
|
|
12
|
+
import "./CalendarDate-DgQUMbNo.js";
|
|
13
|
+
import "./path-browserify-RUt2u7iT.js";
|
|
14
|
+
import "./_MapCache-CcdIl4Ae.js";
|
|
15
|
+
import { rs as MODAL_CONFIRM } from "./constants-C8OH4tTq.js";
|
|
16
|
+
import "./merge-DhuTk1HM.js";
|
|
17
|
+
import "./_baseOrderBy-N8Be_6z6.js";
|
|
18
|
+
import "./dateformat-hG8NERse.js";
|
|
19
|
+
import "./useDebounce-Br5_1ug-.js";
|
|
20
|
+
import "./retry-BgHaYzbB.js";
|
|
21
|
+
import "./CredentialIcon-8YdTTFZ1.js";
|
|
22
|
+
import { f as MOBILE_MEDIA_QUERY, t as AGENT_EDITOR_MODAL_KEY } from "./constants-DMrsrpD7.js";
|
|
23
|
+
import { f as stringifyModel, r as filterAndSortAgents, t as useChatStore } from "./chat.store-290YeyrQ.js";
|
|
24
|
+
import "./fileUtils-CRWqOQje.js";
|
|
25
|
+
import "./ChatAgentAvatar-50YBnv3N.js";
|
|
26
|
+
import { n as ChatAgentSearchSort_default, r as ChatAgentCard_default, t as SkeletonAgentCard_default } from "./SkeletonAgentCard-C5TL-h8F.js";
|
|
27
|
+
import { n as useChatCredentials, t as ChatLayout_default } from "./ChatLayout-CTE_5SiM.js";
|
|
28
|
+
var ChatPersonalAgentsView_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
|
|
29
|
+
__name: "ChatPersonalAgentsView",
|
|
30
|
+
setup(__props) {
|
|
31
|
+
const chatStore = useChatStore();
|
|
32
|
+
const uiStore = useUIStore();
|
|
33
|
+
const toast = useToast();
|
|
34
|
+
const message = useMessage();
|
|
35
|
+
const usersStore = useUsersStore();
|
|
36
|
+
const isMobileDevice = useMediaQuery(MOBILE_MEDIA_QUERY);
|
|
37
|
+
const i18n = useI18n();
|
|
38
|
+
const agentFilter = ref({
|
|
39
|
+
search: "",
|
|
40
|
+
sortBy: "updatedAt"
|
|
41
|
+
});
|
|
42
|
+
const { credentialsByProvider } = useChatCredentials(usersStore.currentUserId ?? "anonymous");
|
|
43
|
+
const readyToShowList = computed(() => chatStore.agentsReady);
|
|
44
|
+
const allModels = computed(() => chatStore.agents["custom-agent"].models);
|
|
45
|
+
const agents = computed(() => filterAndSortAgents(allModels.value, agentFilter.value));
|
|
46
|
+
function handleCreateAgent() {
|
|
47
|
+
uiStore.openModalWithData({
|
|
48
|
+
name: AGENT_EDITOR_MODAL_KEY,
|
|
49
|
+
data: { credentials: credentialsByProvider }
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
async function handleEditAgent(model) {
|
|
53
|
+
if (model.provider === "custom-agent") uiStore.openModalWithData({
|
|
54
|
+
name: AGENT_EDITOR_MODAL_KEY,
|
|
55
|
+
data: {
|
|
56
|
+
agentId: model.agentId,
|
|
57
|
+
credentials: credentialsByProvider
|
|
58
|
+
}
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
async function handleDeleteAgent(agentId) {
|
|
62
|
+
if (await message.confirm(i18n.baseText("chatHub.agents.delete.confirm.message"), i18n.baseText("chatHub.agents.delete.confirm.title"), {
|
|
63
|
+
confirmButtonText: i18n.baseText("chatHub.agents.delete.confirm.button"),
|
|
64
|
+
cancelButtonText: i18n.baseText("chatHub.agents.delete.cancel.button")
|
|
65
|
+
}) !== "confirm" || !credentialsByProvider.value) return;
|
|
66
|
+
try {
|
|
67
|
+
await chatStore.deleteCustomAgent(agentId, credentialsByProvider.value);
|
|
68
|
+
toast.showMessage({
|
|
69
|
+
type: "success",
|
|
70
|
+
title: i18n.baseText("chatHub.agents.delete.success")
|
|
71
|
+
});
|
|
72
|
+
} catch (error) {
|
|
73
|
+
toast.showError(error, i18n.baseText("chatHub.agents.delete.error"));
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
watch(credentialsByProvider, (credentials) => {
|
|
77
|
+
if (credentials) chatStore.fetchAgents(credentials, { minLoadingTime: 250 });
|
|
78
|
+
}, { immediate: true });
|
|
79
|
+
return (_ctx, _cache) => {
|
|
80
|
+
return openBlock(), createBlock(ChatLayout_default, null, {
|
|
81
|
+
default: withCtx(() => [createBaseVNode("div", { class: normalizeClass([_ctx.$style.container, { [_ctx.$style.isMobileDevice]: unref(isMobileDevice) }]) }, [
|
|
82
|
+
createBaseVNode("div", { class: normalizeClass(_ctx.$style.header) }, [createBaseVNode("div", { class: normalizeClass(_ctx.$style.headerContent) }, [createVNode(unref(N8nText_default), {
|
|
83
|
+
tag: "h1",
|
|
84
|
+
size: "xlarge",
|
|
85
|
+
bold: ""
|
|
86
|
+
}, {
|
|
87
|
+
default: withCtx(() => [createTextVNode(toDisplayString(unref(i18n).baseText("chatHub.personalAgents.title")), 1)]),
|
|
88
|
+
_: 1
|
|
89
|
+
}), createVNode(unref(N8nText_default), { color: "text-light" }, {
|
|
90
|
+
default: withCtx(() => [createTextVNode(toDisplayString(unref(i18n).baseText("chatHub.personalAgents.description")), 1)]),
|
|
91
|
+
_: 1
|
|
92
|
+
})], 2), createVNode(unref(N8nButton_default), {
|
|
93
|
+
icon: "plus",
|
|
94
|
+
type: "primary",
|
|
95
|
+
size: "medium",
|
|
96
|
+
onClick: handleCreateAgent
|
|
97
|
+
}, {
|
|
98
|
+
default: withCtx(() => [createTextVNode(toDisplayString(unref(i18n).baseText("chatHub.agents.button.newAgent")), 1)]),
|
|
99
|
+
_: 1
|
|
100
|
+
})], 2),
|
|
101
|
+
readyToShowList.value && allModels.value.length > 0 ? (openBlock(), createBlock(ChatAgentSearchSort_default, {
|
|
102
|
+
key: 0,
|
|
103
|
+
modelValue: agentFilter.value,
|
|
104
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => agentFilter.value = $event)
|
|
105
|
+
}, null, 8, ["modelValue"])) : createCommentVNode("", true),
|
|
106
|
+
!readyToShowList.value ? (openBlock(), createElementBlock("div", {
|
|
107
|
+
key: 1,
|
|
108
|
+
class: normalizeClass(_ctx.$style.agentsGrid)
|
|
109
|
+
}, [(openBlock(), createElementBlock(Fragment, null, renderList(5, (i) => {
|
|
110
|
+
return createVNode(SkeletonAgentCard_default, { key: i });
|
|
111
|
+
}), 64))], 2)) : agents.value.length === 0 ? (openBlock(), createElementBlock("div", {
|
|
112
|
+
key: 2,
|
|
113
|
+
class: normalizeClass(_ctx.$style.empty)
|
|
114
|
+
}, [createVNode(unref(N8nText_default), {
|
|
115
|
+
color: "text-light",
|
|
116
|
+
size: "medium"
|
|
117
|
+
}, {
|
|
118
|
+
default: withCtx(() => [createTextVNode(toDisplayString(allModels.value.length === 0 ? unref(i18n).baseText("chatHub.personalAgents.empty.noAgents") : unref(i18n).baseText("chatHub.personalAgents.empty.noMatch")), 1)]),
|
|
119
|
+
_: 1
|
|
120
|
+
})], 2)) : (openBlock(), createElementBlock("div", {
|
|
121
|
+
key: 3,
|
|
122
|
+
class: normalizeClass(_ctx.$style.agentsGrid)
|
|
123
|
+
}, [(openBlock(true), createElementBlock(Fragment, null, renderList(agents.value, (agent) => {
|
|
124
|
+
return openBlock(), createElementBlock(Fragment, { key: unref(stringifyModel)(agent.model) }, [agent.model.provider === "custom-agent" ? (openBlock(), createBlock(ChatAgentCard_default, {
|
|
125
|
+
key: 0,
|
|
126
|
+
agent,
|
|
127
|
+
onEdit: ($event) => handleEditAgent(agent.model),
|
|
128
|
+
onDelete: ($event) => handleDeleteAgent(agent.model.agentId)
|
|
129
|
+
}, null, 8, [
|
|
130
|
+
"agent",
|
|
131
|
+
"onEdit",
|
|
132
|
+
"onDelete"
|
|
133
|
+
])) : createCommentVNode("", true)], 64);
|
|
134
|
+
}), 128))], 2))
|
|
135
|
+
], 2)]),
|
|
136
|
+
_: 1
|
|
137
|
+
});
|
|
138
|
+
};
|
|
139
|
+
}
|
|
140
|
+
});
|
|
141
|
+
var ChatPersonalAgentsView_vue_vue_type_style_index_0_lang_module_default = {
|
|
142
|
+
container: "_container_1m2yx_123",
|
|
143
|
+
header: "_header_1m2yx_136",
|
|
144
|
+
headerContent: "_headerContent_1m2yx_144",
|
|
145
|
+
empty: "_empty_1m2yx_150",
|
|
146
|
+
agentsGrid: "_agentsGrid_1m2yx_159"
|
|
147
|
+
};
|
|
148
|
+
var ChatPersonalAgentsView_default = /* @__PURE__ */ __plugin_vue_export_helper_default(ChatPersonalAgentsView_vue_vue_type_script_setup_true_lang_default, [["__cssModules", { "$style": ChatPersonalAgentsView_vue_vue_type_style_index_0_lang_module_default }]]);
|
|
149
|
+
export { ChatPersonalAgentsView_default as default };
|