@trilogy-data/trilogy-studio-components 0.1.13 → 0.1.14
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/dist/{ChatCreatorModal-CGYVd4b5.js → ChatCreatorModal-D-CByWEF.js} +12 -12
- package/dist/{Dashboard-BzU5l0J1.js → Dashboard-CCWjUVBq.js} +347 -348
- package/dist/{DashboardCreatorInline-szUAhl3C.js → DashboardCreatorInline-DRlxDEBN.js} +1 -1
- package/dist/{DashboardMobile-cUHQPGAT.js → DashboardMobile-GOPaxc9_.js} +104 -103
- package/dist/{LLMConnectionList-egIna8uh.js → LLMConnectionList-ByLjIXLO.js} +1168 -1213
- package/dist/{LLMView-BXlHVvci.js → LLMView-B7XLbzBx.js} +53 -51
- package/dist/Manager-B2wTf-lw.js +4 -0
- package/dist/{ResultComponent-Dqzd51fk.js → ResultComponent-BKuWOt_p.js} +37 -34
- package/dist/Sidebar-CMy9ptnW.js +2188 -0
- package/dist/TutorialPage-9YzXa97t.js +509 -0
- package/dist/{WelcomePage-CKUubkCt.js → WelcomePage-BMcBpSQ7.js} +4 -4
- package/dist/components/AssetAutoImporter.vue.d.ts.map +1 -1
- package/dist/components/ChartControlPanel.vue.d.ts.map +1 -1
- package/dist/components/CodeBlock.vue.d.ts.map +1 -1
- package/dist/components/ConfirmDialog.vue.d.ts +25 -0
- package/dist/components/ConfirmDialog.vue.d.ts.map +1 -0
- package/dist/components/ContextMenu.vue.d.ts +4 -2
- package/dist/components/ContextMenu.vue.d.ts.map +1 -1
- package/dist/components/DataTable.vue.d.ts +9 -0
- package/dist/components/DataTable.vue.d.ts.map +1 -1
- package/dist/components/EditableTitle.vue.d.ts.map +1 -1
- package/dist/components/HintComponent.vue.d.ts +1 -1
- package/dist/components/HintComponent.vue.d.ts.map +1 -1
- package/dist/components/LoadingButton.vue.d.ts.map +1 -1
- package/dist/components/MarkdownRenderer.vue.d.ts +1 -0
- package/dist/components/MarkdownRenderer.vue.d.ts.map +1 -1
- package/dist/components/ModalDialog.vue.d.ts +36 -0
- package/dist/components/ModalDialog.vue.d.ts.map +1 -0
- package/dist/components/PopupModal.vue.d.ts.map +1 -1
- package/dist/components/SimpleEditor.vue.d.ts +117 -0
- package/dist/components/SimpleEditor.vue.d.ts.map +1 -1
- package/dist/components/StatusIcon.vue.d.ts +3 -3
- package/dist/components/StatusIcon.vue.d.ts.map +1 -1
- package/dist/components/StoreTokenModal.vue.d.ts +18 -0
- package/dist/components/StoreTokenModal.vue.d.ts.map +1 -0
- package/dist/components/SymbolsPane.vue.d.ts.map +1 -1
- package/dist/components/VegaLiteChart.vue.d.ts.map +1 -1
- package/dist/components/chartRenderManager.d.ts +2 -0
- package/dist/components/chartRenderManager.d.ts.map +1 -1
- package/dist/components/community/AddStoreModal.vue.d.ts +46 -1
- package/dist/components/community/AddStoreModal.vue.d.ts.map +1 -1
- package/dist/components/community/CommunityModelCard.vue.d.ts +3 -3
- package/dist/components/community/CommunityModelCard.vue.d.ts.map +1 -1
- package/dist/components/community/CommunityModelHeader.vue.d.ts +7 -4
- package/dist/components/community/CommunityModelHeader.vue.d.ts.map +1 -1
- package/dist/components/community/CommunityModels.vue.d.ts +4 -4
- package/dist/components/community/CommunityModels.vue.d.ts.map +1 -1
- package/dist/components/community/CommunityRemote.vue.d.ts.map +1 -1
- package/dist/components/connection/ConnectionDatabase.vue.d.ts.map +1 -1
- package/dist/components/connection/ConnectionSchema.vue.d.ts.map +1 -1
- package/dist/components/connection/ConnectionTable.vue.d.ts +9 -0
- package/dist/components/connection/ConnectionTable.vue.d.ts.map +1 -1
- package/dist/components/dashboard/Dashboard.vue.d.ts +4 -4
- package/dist/components/dashboard/Dashboard.vue.d.ts.map +1 -1
- package/dist/components/dashboard/DashboardAddItemModal.vue.d.ts +4 -4
- package/dist/components/dashboard/DashboardAddItemModal.vue.d.ts.map +1 -1
- package/dist/components/dashboard/DashboardCTA.vue.d.ts +4 -4
- package/dist/components/dashboard/DashboardCTA.vue.d.ts.map +1 -1
- package/dist/components/dashboard/DashboardChart.vue.d.ts +1 -1
- package/dist/components/dashboard/DashboardChart.vue.d.ts.map +1 -1
- package/dist/components/dashboard/DashboardChartEditor.vue.d.ts +234 -2
- package/dist/components/dashboard/DashboardChartEditor.vue.d.ts.map +1 -1
- package/dist/components/dashboard/DashboardDataSelector.vue.d.ts.map +1 -1
- package/dist/components/dashboard/DashboardEditorDialog.vue.d.ts +42 -0
- package/dist/components/dashboard/DashboardEditorDialog.vue.d.ts.map +1 -0
- package/dist/components/dashboard/DashboardFilter.vue.d.ts +0 -1
- package/dist/components/dashboard/DashboardFilter.vue.d.ts.map +1 -1
- package/dist/components/dashboard/DashboardFilterAutocomplete.vue.d.ts.map +1 -1
- package/dist/components/dashboard/DashboardGridItem.vue.d.ts +4 -4
- package/dist/components/dashboard/DashboardGridItem.vue.d.ts.map +1 -1
- package/dist/components/dashboard/DashboardHeader.vue.d.ts.map +1 -1
- package/dist/components/dashboard/DashboardHeaderFilterInput.vue.d.ts +1 -0
- package/dist/components/dashboard/DashboardHeaderFilterInput.vue.d.ts.map +1 -1
- package/dist/components/dashboard/DashboardImportPopup.vue.d.ts +5 -7
- package/dist/components/dashboard/DashboardImportPopup.vue.d.ts.map +1 -1
- package/dist/components/dashboard/DashboardImportSelector.vue.d.ts +4 -1
- package/dist/components/dashboard/DashboardImportSelector.vue.d.ts.map +1 -1
- package/dist/components/dashboard/DashboardMarkdown.vue.d.ts +1 -20
- package/dist/components/dashboard/DashboardMarkdown.vue.d.ts.map +1 -1
- package/dist/components/dashboard/DashboardMarkdownEditor.vue.d.ts +234 -1
- package/dist/components/dashboard/DashboardMarkdownEditor.vue.d.ts.map +1 -1
- package/dist/components/dashboard/DashboardMobile.vue.d.ts +3 -3
- package/dist/components/dashboard/DashboardMobile.vue.d.ts.map +1 -1
- package/dist/components/dashboard/DashboardSharePopup.vue.d.ts +5 -7
- package/dist/components/dashboard/DashboardSharePopup.vue.d.ts.map +1 -1
- package/dist/components/dashboard/DashboardTable.vue.d.ts +9 -1
- package/dist/components/dashboard/DashboardTable.vue.d.ts.map +1 -1
- package/dist/components/dashboard/useDashboard.d.ts.map +1 -1
- package/dist/components/dashboard/useDashboardItemShell.d.ts +28 -0
- package/dist/components/dashboard/useDashboardItemShell.d.ts.map +1 -0
- package/dist/components/editor/Editor.vue.d.ts +20 -6
- package/dist/components/editor/Editor.vue.d.ts.map +1 -1
- package/dist/components/editor/EditorCreatorInline.vue.d.ts.map +1 -1
- package/dist/components/editor/EditorHeader.vue.d.ts +10 -3
- package/dist/components/editor/EditorHeader.vue.d.ts.map +1 -1
- package/dist/components/editor/ResultComponent.vue.d.ts +75 -181
- package/dist/components/editor/ResultComponent.vue.d.ts.map +1 -1
- package/dist/components/editor/Results.vue.d.ts +9 -0
- package/dist/components/editor/Results.vue.d.ts.map +1 -1
- package/dist/components/editor/editorHelpers.d.ts +1 -1
- package/dist/components/editor/editorHelpers.d.ts.map +1 -1
- package/dist/components/jobs/JobsAddStoreModal.vue.d.ts +14 -0
- package/dist/components/jobs/JobsAddStoreModal.vue.d.ts.map +1 -0
- package/dist/components/jobs/JobsView.vue.d.ts +6 -0
- package/dist/components/jobs/JobsView.vue.d.ts.map +1 -0
- package/dist/components/layout/MobileSidebarLayout.vue.d.ts.map +1 -1
- package/dist/components/layout/SidebarLayout.vue.d.ts.map +1 -1
- package/dist/components/layout/TabbedBrowser.vue.d.ts +1 -12
- package/dist/components/layout/TabbedBrowser.vue.d.ts.map +1 -1
- package/dist/components/layout/TabbedLayout.vue.d.ts.map +1 -1
- package/dist/components/llm/ArtifactsPane.vue.d.ts +11 -2
- package/dist/components/llm/ArtifactsPane.vue.d.ts.map +1 -1
- package/dist/components/llm/ChatArtifact.vue.d.ts +10 -0
- package/dist/components/llm/ChatArtifact.vue.d.ts.map +1 -1
- package/dist/components/llm/ChatCreatorModal.vue.d.ts +1 -9
- package/dist/components/llm/ChatCreatorModal.vue.d.ts.map +1 -1
- package/dist/components/llm/LLMChat.vue.d.ts +9 -36
- package/dist/components/llm/LLMChat.vue.d.ts.map +1 -1
- package/dist/components/llm/LLMChatSplitView.vue.d.ts +55 -185
- package/dist/components/llm/LLMChatSplitView.vue.d.ts.map +1 -1
- package/dist/components/llm/LLMEditorRefinement.vue.d.ts +47 -180
- package/dist/components/llm/LLMEditorRefinement.vue.d.ts.map +1 -1
- package/dist/components/llm/toolCallDisplay.d.ts +13 -0
- package/dist/components/llm/toolCallDisplay.d.ts.map +1 -0
- package/dist/components/model/ModelCard.vue.d.ts +22 -5
- package/dist/components/model/ModelCard.vue.d.ts.map +1 -1
- package/dist/components/model/ModelConcept.vue.d.ts.map +1 -1
- package/dist/components/model/ModelCreator.vue.d.ts +3 -0
- package/dist/components/model/ModelCreator.vue.d.ts.map +1 -1
- package/dist/components/model/ModelSelector.vue.d.ts.map +1 -1
- package/dist/components/sidebar/CommunityModelList.vue.d.ts +284 -0
- package/dist/components/sidebar/CommunityModelList.vue.d.ts.map +1 -0
- package/dist/components/sidebar/CommunityModelListItem.vue.d.ts +7 -7
- package/dist/components/sidebar/CommunityModelListItem.vue.d.ts.map +1 -1
- package/dist/components/sidebar/ConnectionCreatorInline.vue.d.ts.map +1 -1
- package/dist/components/sidebar/ConnectionIcon.vue.d.ts.map +1 -1
- package/dist/components/sidebar/ConnectionList.vue.d.ts +21 -71
- package/dist/components/sidebar/ConnectionList.vue.d.ts.map +1 -1
- package/dist/components/sidebar/ConnectionListItem.vue.d.ts +15 -61
- package/dist/components/sidebar/ConnectionListItem.vue.d.ts.map +1 -1
- package/dist/components/sidebar/ConnectionRefresh.vue.d.ts.map +1 -1
- package/dist/components/sidebar/CreateEditorFromDatasourcePopup.vue.d.ts.map +1 -1
- package/dist/components/sidebar/DashboardList.vue.d.ts +33 -75
- package/dist/components/sidebar/DashboardList.vue.d.ts.map +1 -1
- package/dist/components/sidebar/DashboardListItem.vue.d.ts +13 -59
- package/dist/components/sidebar/DashboardListItem.vue.d.ts.map +1 -1
- package/dist/components/sidebar/DuckDBImporter.vue.d.ts +1 -0
- package/dist/components/sidebar/DuckDBImporter.vue.d.ts.map +1 -1
- package/dist/components/sidebar/EditorList.vue.d.ts +190 -67
- package/dist/components/sidebar/EditorList.vue.d.ts.map +1 -1
- package/dist/components/sidebar/EditorListItem.vue.d.ts +16 -59
- package/dist/components/sidebar/EditorListItem.vue.d.ts.map +1 -1
- package/dist/components/sidebar/GenericSidebarItem.vue.d.ts.map +1 -1
- package/dist/components/sidebar/JobsList.vue.d.ts +12 -0
- package/dist/components/sidebar/JobsList.vue.d.ts.map +1 -0
- package/dist/components/sidebar/JobsListItem.vue.d.ts +25 -0
- package/dist/components/sidebar/JobsListItem.vue.d.ts.map +1 -0
- package/dist/components/sidebar/LLMConnectionCreator.vue.d.ts.map +1 -1
- package/dist/components/sidebar/LLMConnectionList.vue.d.ts +14 -356
- package/dist/components/sidebar/LLMConnectionList.vue.d.ts.map +1 -1
- package/dist/components/sidebar/LLMConnectionListItem.vue.d.ts +15 -190
- package/dist/components/sidebar/LLMConnectionListItem.vue.d.ts.map +1 -1
- package/dist/components/sidebar/ModelSidebar.vue.d.ts +15 -0
- package/dist/components/sidebar/ModelSidebar.vue.d.ts.map +1 -1
- package/dist/components/sidebar/Sidebar.vue.d.ts +3966 -0
- package/dist/components/sidebar/Sidebar.vue.d.ts.map +1 -0
- package/dist/components/sidebar/SidebarList.vue.d.ts.map +1 -1
- package/dist/components/sidebar/SidebarOverflowMenu.vue.d.ts +19 -0
- package/dist/components/sidebar/SidebarOverflowMenu.vue.d.ts.map +1 -0
- package/dist/components/sidebar/SidebarTagChip.vue.d.ts +6 -0
- package/dist/components/sidebar/SidebarTagChip.vue.d.ts.map +1 -0
- package/dist/components/tutorial/TutorialPrompt.vue.d.ts +97 -186
- package/dist/components/tutorial/TutorialPrompt.vue.d.ts.map +1 -1
- package/dist/components/useConfirmationState.d.ts +10 -0
- package/dist/components/useConfirmationState.d.ts.map +1 -0
- package/dist/composables/useClickOutside.d.ts +12 -0
- package/dist/composables/useClickOutside.d.ts.map +1 -0
- package/dist/connections/index.d.ts +1 -0
- package/dist/connections/index.d.ts.map +1 -1
- package/dist/connections/remoteProject.d.ts +23 -0
- package/dist/connections/remoteProject.d.ts.map +1 -0
- package/dist/{cssMode-CTNpWCFn.js → cssMode-Cfy3yIk-.js} +1 -1
- package/dist/dashboards/base.d.ts +2 -1
- package/dist/dashboards/base.d.ts.map +1 -1
- package/dist/dashboards/prompts.d.ts +1 -1
- package/dist/dashboards/prompts.d.ts.map +1 -1
- package/dist/dashboards/spec.d.ts +4 -0
- package/dist/dashboards/spec.d.ts.map +1 -1
- package/dist/data/index.d.ts +1 -0
- package/dist/data/index.d.ts.map +1 -1
- package/dist/data/localStorage.d.ts +3 -3
- package/dist/data/localStorage.d.ts.map +1 -1
- package/dist/data/remoteStoreStorage.d.ts +46 -0
- package/dist/data/remoteStoreStorage.d.ts.map +1 -0
- package/dist/data/storage.d.ts +6 -6
- package/dist/data/storage.d.ts.map +1 -1
- package/dist/data/tutorial/reference.d.ts.map +1 -1
- package/dist/editors/editor.d.ts +19 -5
- package/dist/editors/editor.d.ts.map +1 -1
- package/dist/editors/fileTypes.d.ts +12 -0
- package/dist/editors/fileTypes.d.ts.map +1 -0
- package/dist/editors/helpers.d.ts +2 -0
- package/dist/editors/helpers.d.ts.map +1 -1
- package/dist/{freemarker2-Cc0GWdmq.js → freemarker2-Dy8u-XQv.js} +1 -1
- package/dist/{handlebars-BpAJzwKQ.js → handlebars-BDrD8h_c.js} +1 -1
- package/dist/{html-C4cOr6Q2.js → html-CKz7V4Cn.js} +1 -1
- package/dist/{htmlMode-4GTCH2de.js → htmlMode-BZE5C9QD.js} +1 -1
- package/dist/{javascript-eCxY6C4t.js → javascript-Cav2mApM.js} +1 -1
- package/dist/{jsonMode-P2zF1eXm.js → jsonMode-B6434NZu.js} +1 -1
- package/dist/{liquid-CHf82yU1.js → liquid-Cq-Omf5B.js} +1 -1
- package/dist/llm/chatToolExecutor.d.ts.map +1 -1
- package/dist/llm/editorRefinementToolExecutor.d.ts.map +1 -1
- package/dist/llm/toolLoopCore.d.ts.map +1 -1
- package/dist/{main-B49yDSSL.js → main-C-6acy1R.js} +57734 -55586
- package/dist/main.css +1 -1
- package/dist/main.js +16 -16
- package/dist/main.umd.cjs +580 -559
- package/dist/{mdx-DhkaMLCX.js → mdx-DYvw7-lF.js} +1 -1
- package/dist/models/helpers.d.ts +16 -4
- package/dist/models/helpers.d.ts.map +1 -1
- package/dist/models/model.d.ts +1 -0
- package/dist/models/model.d.ts.map +1 -1
- package/dist/monaco/editorHelpers.d.ts.map +1 -1
- package/dist/prism-clike-SH1s-yiH.js +31 -0
- package/dist/prism-javascript-CLux6jF8.js +137 -0
- package/dist/prism-json-iVb7He6L.js +25 -0
- package/dist/prism-markdown-tjNeCMi3.js +300 -0
- package/dist/prism-markup-BNGj0Tvm.js +173 -0
- package/dist/prism-python-DBk-6kcY.js +71 -0
- package/dist/prism-typescript-Crma_dEX.js +55 -0
- package/dist/{python-BPlpgFwf.js → python-BTTSwl4o.js} +1 -1
- package/dist/{razor-Bw_qWSSk.js → razor-BVBhJqGl.js} +1 -1
- package/dist/remotes/genericStoreMetadata.d.ts +8 -0
- package/dist/remotes/genericStoreMetadata.d.ts.map +1 -0
- package/dist/remotes/jobs.d.ts +38 -0
- package/dist/remotes/jobs.d.ts.map +1 -0
- package/dist/remotes/jobsService.d.ts +15 -0
- package/dist/remotes/jobsService.d.ts.map +1 -0
- package/dist/remotes/models.d.ts +2 -1
- package/dist/remotes/models.d.ts.map +1 -1
- package/dist/remotes/remoteStoreSync.d.ts +7 -0
- package/dist/remotes/remoteStoreSync.d.ts.map +1 -0
- package/dist/remotes/storeService.d.ts +2 -1
- package/dist/remotes/storeService.d.ts.map +1 -1
- package/dist/stores/Manager.vue.d.ts +9 -0
- package/dist/stores/Manager.vue.d.ts.map +1 -1
- package/dist/stores/communityApiStore.d.ts +6 -0
- package/dist/stores/communityApiStore.d.ts.map +1 -1
- package/dist/stores/editorStore.d.ts +7 -2
- package/dist/stores/editorStore.d.ts.map +1 -1
- package/dist/stores/index.d.ts +1 -0
- package/dist/stores/index.d.ts.map +1 -1
- package/dist/stores/jobsApiStore.d.ts +45 -0
- package/dist/stores/jobsApiStore.d.ts.map +1 -0
- package/dist/stores/modelStore.d.ts.map +1 -1
- package/dist/stores/queryExecutionService.d.ts +6 -4
- package/dist/stores/queryExecutionService.d.ts.map +1 -1
- package/dist/stores/resolver.d.ts +4 -4
- package/dist/stores/resolver.d.ts.map +1 -1
- package/dist/stores/useScreenNavigation.d.ts +3 -1
- package/dist/stores/useScreenNavigation.d.ts.map +1 -1
- package/dist/stores/userSettingsStore.d.ts.map +1 -1
- package/dist/{tsMode-B4G-3v3r.js → tsMode-z99lZ8eT.js} +1 -1
- package/dist/{typescript-CxjsldWX.js → typescript-BXQnMlGm.js} +1 -1
- package/dist/useDashboard-3deVRse_.js +3502 -0
- package/dist/utility/markdownRenderer.d.ts.map +1 -1
- package/dist/utility/prism.d.ts +5 -0
- package/dist/utility/prism.d.ts.map +1 -0
- package/dist/utils/terminalOutput.d.ts +3 -0
- package/dist/utils/terminalOutput.d.ts.map +1 -0
- package/dist/views/ConnectionView.vue.d.ts +9 -0
- package/dist/views/ConnectionView.vue.d.ts.map +1 -1
- package/dist/views/IDE.vue.d.ts +7 -0
- package/dist/views/IDE.vue.d.ts.map +1 -0
- package/dist/views/LLMView.vue.d.ts +232 -846
- package/dist/views/LLMView.vue.d.ts.map +1 -1
- package/dist/views/MobileIDE.vue.d.ts +6 -0
- package/dist/views/MobileIDE.vue.d.ts.map +1 -0
- package/dist/views/ModelView.vue.d.ts +46 -10
- package/dist/views/ModelView.vue.d.ts.map +1 -1
- package/dist/views/ResponsiveIDE.vue.d.ts.map +1 -1
- package/dist/views/TutorialPage.vue.d.ts +465 -907
- package/dist/views/TutorialPage.vue.d.ts.map +1 -1
- package/dist/{xml-DWqiAUCc.js → xml-Ci-UOFva.js} +1 -1
- package/dist/{yaml-BfqSAZW1.js → yaml-XEOisXAU.js} +1 -1
- package/package.json +1 -1
- package/dist/Manager-CWERTb_Q.js +0 -4
- package/dist/Sidebar-DNAHF4lz.js +0 -1862
- package/dist/TutorialPage-CqGb6CEf.js +0 -482
- package/dist/components/dashboard/DashboardCreatorIcon.vue.d.ts +0 -52
- package/dist/components/dashboard/DashboardCreatorIcon.vue.d.ts.map +0 -1
- package/dist/components/editor/EditorCreatorIcon.vue.d.ts +0 -61
- package/dist/components/editor/EditorCreatorIcon.vue.d.ts.map +0 -1
- package/dist/useDashboard-BrcAKpuC.js +0 -3352
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
import { defineComponent as
|
|
5
|
-
import { K as
|
|
6
|
-
function
|
|
1
|
+
var Ye = Object.defineProperty;
|
|
2
|
+
var Ge = (t, e, o) => e in t ? Ye(t, e, { enumerable: !0, configurable: !0, writable: !0, value: o }) : t[e] = o;
|
|
3
|
+
var te = (t, e, o) => Ge(t, typeof e != "symbol" ? e + "" : e, o);
|
|
4
|
+
import { defineComponent as ce, ref as C, inject as _, createElementBlock as u, createCommentVNode as M, openBlock as l, createElementVNode as s, withModifiers as R, withDirectives as D, vModelText as B, vModelSelect as Ce, vModelCheckbox as Me, Fragment as pe, computed as z, createBlock as W, withCtx as q, unref as Ke, normalizeClass as me, toDisplayString as F, renderList as we, resolveComponent as x, createVNode as G, Transition as ge, createTextVNode as be, onMounted as Le, watch as Pe, vModelDynamic as je, createStaticVNode as Qe } from "vue";
|
|
5
|
+
import { K as L, a as Z, T as Ae, L as Re, z as Ve, f as De, A as He, B as _e, S as Ne, j as We, e as qe, F as Ue, O as Oe, G as xe, H as ze, I as Xe, u as Je, g as Ze } from "./main-C-6acy1R.js";
|
|
6
|
+
function $e(t, e, o, i) {
|
|
7
7
|
const c = [];
|
|
8
|
-
return Object.values(t).sort((a,
|
|
8
|
+
return Object.values(t).sort((a, p) => a.connected && !p.connected ? -1 : !a.connected && p.connected ? 1 : a.name.localeCompare(p.name)).forEach((a) => {
|
|
9
9
|
if (a.deleted)
|
|
10
10
|
return;
|
|
11
|
-
let
|
|
11
|
+
let p = a.databases ? a.databases : [];
|
|
12
12
|
c.push({
|
|
13
13
|
id: a.name,
|
|
14
14
|
name: a.name,
|
|
15
15
|
indent: 0,
|
|
16
|
-
count:
|
|
16
|
+
count: p.length,
|
|
17
17
|
type: "connection",
|
|
18
18
|
searchPath: a.name,
|
|
19
19
|
connection: a
|
|
@@ -105,90 +105,90 @@ function Je(t, e, o, i) {
|
|
|
105
105
|
type: "error",
|
|
106
106
|
searchPath: a.name,
|
|
107
107
|
connection: a
|
|
108
|
-
}),
|
|
109
|
-
const
|
|
108
|
+
}), p.forEach((w) => {
|
|
109
|
+
const d = `${a.name}${L}${w.name}`;
|
|
110
110
|
c.push({
|
|
111
|
-
id:
|
|
112
|
-
name:
|
|
111
|
+
id: d,
|
|
112
|
+
name: w.name,
|
|
113
113
|
indent: 1,
|
|
114
|
-
count:
|
|
114
|
+
count: w.schemas.length,
|
|
115
115
|
type: "database",
|
|
116
|
-
searchPath: `${
|
|
116
|
+
searchPath: `${w.name}`,
|
|
117
117
|
connection: a
|
|
118
|
-
}), e[
|
|
119
|
-
id: `${
|
|
118
|
+
}), e[d] || (o[d] && c.push({
|
|
119
|
+
id: `${d}-loading`,
|
|
120
120
|
name: "Loading...",
|
|
121
121
|
indent: 1,
|
|
122
122
|
count: 0,
|
|
123
123
|
type: "loading",
|
|
124
|
-
searchPath: `${
|
|
124
|
+
searchPath: `${w.name}`,
|
|
125
125
|
connection: a
|
|
126
|
-
}),
|
|
127
|
-
const
|
|
126
|
+
}), w.schemas.forEach((S) => {
|
|
127
|
+
const f = `${d}${L}${S.name}`;
|
|
128
128
|
c.push({
|
|
129
|
-
id:
|
|
130
|
-
name:
|
|
129
|
+
id: f,
|
|
130
|
+
name: S.name,
|
|
131
131
|
indent: 2,
|
|
132
|
-
count:
|
|
132
|
+
count: S.tables.length,
|
|
133
133
|
type: "schema",
|
|
134
|
-
searchPath: `${
|
|
134
|
+
searchPath: `${w.name}.${S.name}`,
|
|
135
135
|
connection: a
|
|
136
|
-
}), e[
|
|
137
|
-
id: `${
|
|
136
|
+
}), e[f] || (o[f] && c.push({
|
|
137
|
+
id: `${f}-loading`,
|
|
138
138
|
name: "Loading...",
|
|
139
139
|
indent: 2,
|
|
140
140
|
count: 0,
|
|
141
141
|
type: "loading",
|
|
142
|
-
searchPath: `${
|
|
142
|
+
searchPath: `${w.name}.${S.name}`,
|
|
143
143
|
connection: a
|
|
144
|
-
}),
|
|
145
|
-
const
|
|
144
|
+
}), S.tables.forEach((N) => {
|
|
145
|
+
const A = `${d}${L}${S.name}${L}${N.name}`;
|
|
146
146
|
c.push({
|
|
147
|
-
id:
|
|
148
|
-
name:
|
|
147
|
+
id: A,
|
|
148
|
+
name: N.name,
|
|
149
149
|
indent: 3,
|
|
150
150
|
count: 0,
|
|
151
151
|
type: "table",
|
|
152
|
-
searchPath: `${
|
|
152
|
+
searchPath: `${w.name}.${S.name}.${N.name}`,
|
|
153
153
|
connection: a,
|
|
154
|
-
object:
|
|
154
|
+
object: N
|
|
155
155
|
});
|
|
156
156
|
}));
|
|
157
157
|
}));
|
|
158
158
|
}));
|
|
159
159
|
}), c;
|
|
160
160
|
}
|
|
161
|
-
function
|
|
161
|
+
function et(t, e) {
|
|
162
162
|
if (!e || e.trim() === "")
|
|
163
163
|
return t;
|
|
164
164
|
const o = e.toLowerCase().trim(), i = /* @__PURE__ */ new Set();
|
|
165
|
-
t.forEach((
|
|
166
|
-
(
|
|
165
|
+
t.forEach((p) => {
|
|
166
|
+
(p.type === "view-queries" || p.searchPath.toLowerCase().includes(o)) && i.add(p.id);
|
|
167
167
|
});
|
|
168
168
|
const c = /* @__PURE__ */ new Map();
|
|
169
|
-
for (let
|
|
170
|
-
const
|
|
171
|
-
let
|
|
172
|
-
for (let
|
|
173
|
-
const
|
|
174
|
-
if (
|
|
175
|
-
|
|
169
|
+
for (let p = 0; p < t.length; p++) {
|
|
170
|
+
const w = t[p];
|
|
171
|
+
let d = null;
|
|
172
|
+
for (let S = p - 1; S >= 0; S--) {
|
|
173
|
+
const f = t[S];
|
|
174
|
+
if (f.indent < w.indent) {
|
|
175
|
+
d = f.id;
|
|
176
176
|
break;
|
|
177
177
|
}
|
|
178
178
|
}
|
|
179
|
-
|
|
179
|
+
d && (c.has(w.id) || c.set(w.id, /* @__PURE__ */ new Set()), c.get(w.id).add(d));
|
|
180
180
|
}
|
|
181
|
-
const y = new Set(i), a = (
|
|
182
|
-
const
|
|
183
|
-
if (
|
|
184
|
-
for (const
|
|
185
|
-
y.has(
|
|
181
|
+
const y = new Set(i), a = (p) => {
|
|
182
|
+
const w = c.get(p);
|
|
183
|
+
if (w)
|
|
184
|
+
for (const d of w)
|
|
185
|
+
y.has(d) || (y.add(d), a(d));
|
|
186
186
|
};
|
|
187
|
-
return i.forEach((
|
|
188
|
-
a(
|
|
189
|
-
}), t.filter((
|
|
187
|
+
return i.forEach((p) => {
|
|
188
|
+
a(p);
|
|
189
|
+
}), t.filter((p) => y.has(p.id));
|
|
190
190
|
}
|
|
191
|
-
const
|
|
191
|
+
const tt = ce({
|
|
192
192
|
name: "ConnectionCreator",
|
|
193
193
|
props: {
|
|
194
194
|
visible: {
|
|
@@ -207,7 +207,7 @@ const $e = ae({
|
|
|
207
207
|
}
|
|
208
208
|
},
|
|
209
209
|
setup(t, { emit: e }) {
|
|
210
|
-
const o =
|
|
210
|
+
const o = C({
|
|
211
211
|
name: "",
|
|
212
212
|
type: "duckdb",
|
|
213
213
|
options: {
|
|
@@ -219,7 +219,7 @@ const $e = ae({
|
|
|
219
219
|
privateKey: "",
|
|
220
220
|
saveCredential: !1
|
|
221
221
|
}
|
|
222
|
-
}), i =
|
|
222
|
+
}), i = _("connectionStore"), c = _("saveConnections"), y = _("saveAll");
|
|
223
223
|
if (!i || !c || !y)
|
|
224
224
|
throw new Error("must inject connectionStore to ConnectionCreator");
|
|
225
225
|
const a = i.connections;
|
|
@@ -246,40 +246,42 @@ const $e = ae({
|
|
|
246
246
|
}
|
|
247
247
|
};
|
|
248
248
|
}
|
|
249
|
-
}),
|
|
249
|
+
}), nt = {
|
|
250
250
|
key: 0,
|
|
251
251
|
class: "creator-container"
|
|
252
|
-
},
|
|
252
|
+
}, ot = { class: "form-row" }, it = { class: "form-row" }, at = {
|
|
253
253
|
key: 0,
|
|
254
254
|
class: "form-row"
|
|
255
|
-
},
|
|
255
|
+
}, st = {
|
|
256
256
|
key: 1,
|
|
257
257
|
class: "form-row"
|
|
258
|
-
},
|
|
258
|
+
}, rt = {
|
|
259
259
|
key: 2,
|
|
260
260
|
class: "form-row"
|
|
261
|
-
},
|
|
262
|
-
function
|
|
263
|
-
return t.visible ? (
|
|
261
|
+
}, lt = { class: "form-row" }, ct = { class: "form-row" }, ut = { class: "form-row" }, dt = { class: "button-row" };
|
|
262
|
+
function pt(t, e, o, i, c, y) {
|
|
263
|
+
return t.visible ? (l(), u("div", nt, [
|
|
264
264
|
s("form", {
|
|
265
|
-
onSubmit: e[11] || (e[11] =
|
|
265
|
+
onSubmit: e[11] || (e[11] = R((...a) => t.submitConnectionCreation && t.submitConnectionCreation(...a), ["prevent"]))
|
|
266
266
|
}, [
|
|
267
|
-
s("div",
|
|
267
|
+
s("div", ot, [
|
|
268
268
|
e[12] || (e[12] = s("label", { for: "connection-name" }, "Name", -1)),
|
|
269
|
-
|
|
269
|
+
D(s("input", {
|
|
270
270
|
"data-testid": "connection-creator-name",
|
|
271
271
|
type: "text",
|
|
272
272
|
"onUpdate:modelValue": e[0] || (e[0] = (a) => t.connectionDetails.name = a),
|
|
273
|
+
class: "sidebar-control-input",
|
|
273
274
|
id: "connection-name",
|
|
274
275
|
required: ""
|
|
275
276
|
}, null, 512), [
|
|
276
|
-
[
|
|
277
|
+
[B, t.connectionDetails.name]
|
|
277
278
|
])
|
|
278
279
|
]),
|
|
279
|
-
s("div",
|
|
280
|
+
s("div", it, [
|
|
280
281
|
e[14] || (e[14] = s("label", { for: "connection-type" }, "Type", -1)),
|
|
281
|
-
|
|
282
|
+
D(s("select", {
|
|
282
283
|
"onUpdate:modelValue": e[1] || (e[1] = (a) => t.connectionDetails.type = a),
|
|
284
|
+
class: "sidebar-control-select",
|
|
283
285
|
id: "connection-type",
|
|
284
286
|
required: ""
|
|
285
287
|
}, [...e[13] || (e[13] = [
|
|
@@ -287,98 +289,105 @@ function ut(t, e, o, i, c, y) {
|
|
|
287
289
|
s("option", { value: "bigquery" }, "Bigquery Oauth", -1),
|
|
288
290
|
s("option", { value: "snowflake" }, "Snowflake", -1)
|
|
289
291
|
])], 512), [
|
|
290
|
-
[
|
|
292
|
+
[Ce, t.connectionDetails.type]
|
|
291
293
|
])
|
|
292
294
|
]),
|
|
293
|
-
t.connectionDetails.type === "motherduck" ? (
|
|
295
|
+
t.connectionDetails.type === "motherduck" ? (l(), u("div", at, [
|
|
294
296
|
e[15] || (e[15] = s("label", { for: "md-token" }, "MotherDuck Token", -1)),
|
|
295
|
-
|
|
297
|
+
D(s("input", {
|
|
296
298
|
type: "password",
|
|
297
299
|
"onUpdate:modelValue": e[2] || (e[2] = (a) => t.connectionDetails.options.mdToken = a),
|
|
300
|
+
class: "sidebar-control-input",
|
|
298
301
|
id: "md-token",
|
|
299
302
|
placeholder: "MotherDuck Token",
|
|
300
303
|
required: ""
|
|
301
304
|
}, null, 512), [
|
|
302
|
-
[
|
|
305
|
+
[B, t.connectionDetails.options.mdToken]
|
|
303
306
|
]),
|
|
304
307
|
e[16] || (e[16] = s("label", { for: "save-credential" }, "Save Credential?", -1)),
|
|
305
|
-
|
|
308
|
+
D(s("input", {
|
|
306
309
|
type: "checkbox",
|
|
307
310
|
id: "save-credential",
|
|
308
311
|
"onUpdate:modelValue": e[3] || (e[3] = (a) => t.connectionDetails.options.saveCredential = a),
|
|
309
312
|
label: "Save Credential?"
|
|
310
313
|
}, null, 512), [
|
|
311
|
-
[
|
|
314
|
+
[Me, t.connectionDetails.options.saveCredential]
|
|
312
315
|
])
|
|
313
|
-
])) :
|
|
314
|
-
t.connectionDetails.type === "bigquery" ? (
|
|
316
|
+
])) : M("", !0),
|
|
317
|
+
t.connectionDetails.type === "bigquery" ? (l(), u("div", st, [
|
|
315
318
|
e[17] || (e[17] = s("label", { for: "project-id" }, "BigQuery Project ID", -1)),
|
|
316
|
-
|
|
319
|
+
D(s("input", {
|
|
317
320
|
type: "text",
|
|
318
321
|
"onUpdate:modelValue": e[4] || (e[4] = (a) => t.connectionDetails.options.projectId = a),
|
|
322
|
+
class: "sidebar-control-input",
|
|
319
323
|
id: "project-id",
|
|
320
324
|
placeholder: "Billing Project ID",
|
|
321
325
|
required: ""
|
|
322
326
|
}, null, 512), [
|
|
323
|
-
[
|
|
327
|
+
[B, t.connectionDetails.options.projectId]
|
|
324
328
|
])
|
|
325
|
-
])) :
|
|
326
|
-
t.connectionDetails.type === "sqlserver" ? (
|
|
329
|
+
])) : M("", !0),
|
|
330
|
+
t.connectionDetails.type === "sqlserver" ? (l(), u("div", rt, [
|
|
327
331
|
e[18] || (e[18] = s("label", { for: "username" }, "Username", -1)),
|
|
328
|
-
|
|
332
|
+
D(s("input", {
|
|
329
333
|
type: "text",
|
|
330
334
|
"onUpdate:modelValue": e[5] || (e[5] = (a) => t.connectionDetails.options.username = a),
|
|
335
|
+
class: "sidebar-control-input",
|
|
331
336
|
id: "username",
|
|
332
337
|
required: ""
|
|
333
338
|
}, null, 512), [
|
|
334
|
-
[
|
|
339
|
+
[B, t.connectionDetails.options.username]
|
|
335
340
|
]),
|
|
336
341
|
e[19] || (e[19] = s("label", { for: "password" }, "Password", -1)),
|
|
337
|
-
|
|
342
|
+
D(s("input", {
|
|
338
343
|
type: "password",
|
|
339
344
|
"onUpdate:modelValue": e[6] || (e[6] = (a) => t.connectionDetails.options.password = a),
|
|
345
|
+
class: "sidebar-control-input",
|
|
340
346
|
id: "username",
|
|
341
347
|
required: ""
|
|
342
348
|
}, null, 512), [
|
|
343
|
-
[
|
|
349
|
+
[B, t.connectionDetails.options.password]
|
|
344
350
|
])
|
|
345
|
-
])) :
|
|
346
|
-
t.connectionDetails.type === "snowflake" ? (
|
|
347
|
-
s("div",
|
|
351
|
+
])) : M("", !0),
|
|
352
|
+
t.connectionDetails.type === "snowflake" ? (l(), u(pe, { key: 3 }, [
|
|
353
|
+
s("div", lt, [
|
|
348
354
|
e[20] || (e[20] = s("label", { for: "account" }, "Account", -1)),
|
|
349
|
-
|
|
355
|
+
D(s("input", {
|
|
350
356
|
type: "text",
|
|
351
357
|
"onUpdate:modelValue": e[7] || (e[7] = (a) => t.connectionDetails.options.account = a),
|
|
358
|
+
class: "sidebar-control-input",
|
|
352
359
|
id: "account",
|
|
353
360
|
required: ""
|
|
354
361
|
}, null, 512), [
|
|
355
|
-
[
|
|
362
|
+
[B, t.connectionDetails.options.account]
|
|
356
363
|
])
|
|
357
364
|
]),
|
|
358
|
-
s("div",
|
|
365
|
+
s("div", ct, [
|
|
359
366
|
e[21] || (e[21] = s("label", { for: "username" }, "Username", -1)),
|
|
360
|
-
|
|
367
|
+
D(s("input", {
|
|
361
368
|
type: "text",
|
|
362
369
|
"onUpdate:modelValue": e[8] || (e[8] = (a) => t.connectionDetails.options.username = a),
|
|
370
|
+
class: "sidebar-control-input",
|
|
363
371
|
id: "username",
|
|
364
372
|
required: ""
|
|
365
373
|
}, null, 512), [
|
|
366
|
-
[
|
|
374
|
+
[B, t.connectionDetails.options.username]
|
|
367
375
|
])
|
|
368
376
|
]),
|
|
369
|
-
s("div",
|
|
377
|
+
s("div", ut, [
|
|
370
378
|
e[22] || (e[22] = s("label", { for: "privateKey" }, "Private Key", -1)),
|
|
371
|
-
|
|
379
|
+
D(s("input", {
|
|
372
380
|
type: "password",
|
|
373
381
|
"onUpdate:modelValue": e[9] || (e[9] = (a) => t.connectionDetails.options.privateKey = a),
|
|
382
|
+
class: "sidebar-control-input",
|
|
374
383
|
id: "privateKey",
|
|
375
384
|
required: ""
|
|
376
385
|
}, null, 512), [
|
|
377
|
-
[
|
|
386
|
+
[B, t.connectionDetails.options.privateKey]
|
|
378
387
|
])
|
|
379
388
|
])
|
|
380
|
-
], 64)) :
|
|
381
|
-
s("div",
|
|
389
|
+
], 64)) : M("", !0),
|
|
390
|
+
s("div", dt, [
|
|
382
391
|
e[23] || (e[23] = s("button", {
|
|
383
392
|
"data-testid": "connection-creator-submit",
|
|
384
393
|
type: "submit"
|
|
@@ -389,46 +398,47 @@ function ut(t, e, o, i, c, y) {
|
|
|
389
398
|
}, "Cancel")
|
|
390
399
|
])
|
|
391
400
|
], 32)
|
|
392
|
-
])) :
|
|
401
|
+
])) : M("", !0);
|
|
393
402
|
}
|
|
394
|
-
const
|
|
403
|
+
const mt = /* @__PURE__ */ Z(tt, [["render", pt], ["__scopeId", "data-v-891a9edb"]]), ht = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFgAAABYCAIAAAD+96djAAAAIGNIUk0AAHomAACAhAAA+gAAAIDoAAB1MAAA6mAAADqYAAAXcJy6UTwAAAAGYktHRAD/AP8A/6C9p5MAAAAHdElNRQfnBRMXJzJGoqCLAAANmElEQVR42u2be4xdxX3HPzNzzn3u3r3s2qy9rLFZxS4E7CA1dVDjBnDclAANbXEgaUpbVIFSqa2UqK1UqfmnaVPURmlUqSRqJKIIQwg1hEDlypaJISIBnFiE+IEfGLxmvX7tw/f9OOfM9I8z997dZV93927vUu1Pd6XV3bNzZj5n5vt7zBxxyy23sGIg292B5WIrIKytgLC2AsLaCghrKyCsrYCw5rS7A4syY3+sCfEBB2HM1G/mM6Twv4RACgBtMAYBLAjHsgABSIESINCaIBzSrOMJL3AElYC8j4CEiyPxNcz1v9N3oL3jNwZjcCSVgAtFzufJezgSIaaZJlMoAOfyGPhwDxu7KfpcLKCkvaBZa/+MUJILBfo6+PR1xBxeHeatUdYkQUw/L+pfjhT50kf54s24cYBsjkde4wcnWJMk0M13o7+/vy3jDx+aI7lY4PM38Pg9bL+eTwzwhc1ENHvPkI5hZni2UcVgln+9jQdvRXrgQUAsxic3U8rxkyHSUYKagix3ECGFsTLbruGbvw9V/BK6Cpqt15PP8j/v0JucdL0QKElUcWqc+6/nS7fjjyNqEyTwkR7bNvDccXIersQ0A6I9GlF/zBWfB7aAj+fhKBwFBnOFv9/Ow1s4OUa2YpE5EiBX5cQYOzfxjTuggJJIiRAIgaPwfYjy8XXkKqgm9bJNGmGsHDqSVQkIrAs0BikwBlPmq3ew/Vr+/Q1OjlEOAKKKgS6+9lvcvRnKGG0bmfTYDd1RtGnaibYJhMAYpMTTnL3CTdc0ggJTY6Tz3H4Dt2/iwhiDWbRhXSf9PeCiCwimowDA6jj6g+I1BBgw4EheHOTOmxrjqQ9PgF9ACdZcxZpVAAQYj6CMktNTEAJ8PtaHI5tm0c44Qhs6Ixw8T1BEqYaDsMMTVhd0haCIXySogMFR9oL3zwUpMBU29fEbaxktEam1aYx1QO//LBcQcYfhHL+4ANHpn6EQSImSONJOhFlMCLQBzT/fRqDJe0RU7W+1pedIXIWrpoZebQMx8am+eAbUQsLBqWZQkqDE+qt54jOUPIbzVpJdiSMxhtESQzmGcmQqk0LYdsYRYHOkKxW+cAOSuVOMOZsLNTiosu5q7t/I+RynrjBaIlslVwXYdg0P3Mit6yh4HB+jw62FsG0s59dFcazMCzvZeLUVwkW1CcKAINCoKLhkxjg8wniZVISbVtHTAxIMSL7zCo8ctCF5O3MNG0ooKj4vnWXjNZjSotsEI2prpAIVupJsS9cclY8uoA0GlOShT/DGJX58llXxdmefgDYkXA4MQoCSLVCKMMQIWSiJ9vGL+Hn8ItqzMair0Bqq3P9hvADanoaHIDoiHB3h8jjCZfGK2eABgBQ4EkfhSKSYFLCg6UngyHChtNcExhBRZCu8MgQRdPMZdLMWTrpAQ4QTo3gaKdoNQtR6FlXsHwRs0rGkFITAD4jEocS3DpGKEuh2gwhNGzqiHDpPJYd0FpIpzAvBBApOAt/j3t0M5elw0aYdIBoR7gQQMcWlIq+fh8iSgAjrupZCB2NZfvv7HB5hdQJfIxa5NEzz1cF6lhkKez2CCovR+8+Aaq7B+VIQAH6Ak+LtYXZ8n0sl1iTxAvunBYKwGYtp/D4fIMbYrCEsvbvKVh+AQNMZ4WfnoITTknB7MgVj8AOcNK+e5M7dGOiOUQ0aTmQhIMKmXWULR+F45iQRxvz5KsN5fE3RYyiLp20pyUDCZTDD4UutXB2N6obBSfPDX/C5F0hHSbqNuRBa05Fl+FR9zXAOBAICTTpG0rWLbRYKY2Wu7eTbn+KmVVQC9g/yL69T1CQcgjBHMPx4kM3rWzMjQgpag0R18ujL/NNrrE8hmKarzeUaIYV8FQN/ciPb+okojlzmscMM57k6ORXzRAq5Kr0J9n0e4lAGAUnOvsc9z9ikWAqyFTZ28+x9UGmu9DoThUCjHIjylb08doTrumbcPWoi+zQGJSj4pCLsuZcdW+jvYm0XH1nPn97IG+f51WVWxe2dJt1DAlzI893fZU03lQwSjKaap2ctXokDg3TFCAwRxXCOzwzQ1YHxFw7CUghQMZA89By7TzGQxp95D22+GmEXGxSr/MfvsLqX6jh+kaCEdwXgsXv4aC+nxpGCSF0+JBFF2ef0OF+7lZuvxc8TdZECKXAUlNnaZ5dxOHGKHi+/B+4CZSLcFg7dpEpQqXLPU7x4loEuqsFsaX4TYhlO3a19bFlHkCXi2KqR6xBUQfNfO/mzzVwq8F6OyyVGS1woMpjFley6mwe2ovM2sG90WlD1GzPIGOIOLw6CaTiU5iYCEAYLnVwcZ8eTHB+nv5NKUPPZM1gTYikF5YCN3SAmuYhQOLSHUPzDHTz8EV44zVujlHxWxfnNPu7aiIwT5Ow2L/VauwHJ0RF0TQ4CQ0eUNy+SydAVR/tNFOXrDiLQOF0cO8PnnsdAb2KSm2wBiHDKVX2YvGkganUhrdE5+nv487WgaeR0ZYIJ27OT8j84Nkqkln2HScflAq8McdeN6CpyfvFVg4LBSXPgCA/tJRUl6cyLAguII8KlO2XOWhbClkP8LEEBHVYBcpgAJRvl03rXlYQqb48TcyatDlex/wyI+YqldZMGDU4XT77GH++hJ07cwdPzbaSZGSHwAwbSTENiwgjrtTZjcCbNnMm9B6EYz3M+T8yhnnxrQyrCwfP4BRwHM9fzrAcLQiETfH0//3aIDV12jSzJ3qc2KMnt62F+jm3OAeBw+gq5qq0v1+8Sczif5/VhiNhN7dkpBAHSRUT58vN88xADabRBN1kHboCYaQsk/MQchvN86jo+1Icut6BqYAwojo0SaNtaXdXDBGzfGVAzRu4Tc2oVB8MfPs0zpxhI483qJmcyZ2Lb4SIPexlWOEVtU+Rcnr4kX98OlSZW7yxmlXIE932jDROwnw41ErApt7Pf1HLqTIadP+TdDBtSVIJG4wsBEQYzJZ9MEW2IKhIuSqANJZ9MhV/v5bt3k4ijy0i52A2IMEjF5+Q4McWU6lxYzj2T4ZeXuPkadAk1wenaWxt8jZPinXPc9yOKPn0dNlhYmDl1CpeLrEnyB5vodDkywrFRSj5Rxa9189lN/N5mMK2hQDgoh0KBoSzRySUpu7sLSvC9N7l5AFNEm8ZitA7C4KT52XEe3EPcpSc+Xzc5I4iQwqUiO9bz6KchBkCAKZGrknRQSZCYIka3hgI1gXg3w5UKqxPTRNO+ZlWCH73Ntp9z78cwGXx/QqddZJKnD/I3L9GbJKKmT/aaAyEFBY91HTx6Jwi8jNUqqUglwKBLaG3PprSEAjWXcXwUL0CKqX6uXkHoTfK3LzGc4y+34qRqUiKgyFf38p9vsq7TUlt8rxwlyVZ4cAtE8TK4ju2o0Rht7+vUwruWULCNwtGRGTf46scfepN84xC7T7JjAx9Kow0nxtg/yMUi61PzOpE5XxCAgb5O0Ihat6wba9Gop5hVyoDjY8TUjFmm3acW9HeS8/jeERtTKEE6Sl8STze62hoQUnB6HBxbzFlqMyAVXomz2UnB9UwsvICYIplspGqBaSJ2nqfJQHNVjN1vMT5KJIXnN/KfpQJhwGEwWzvUMuvFonbO2tN4AV6ApxdyVmxuENoQUZQDdj7L8EXcMD6tHVhbKhCK46NUAlRt/s/OYppPq3slw8JeV5TLJW57iqd/jupEugQ1h7QkOCRHR5BYBEu8yzfPHoX7P5pUhO4YXz7AF5+l6qE68YNGnt8qCysXBLw1StRZwgW4EBB1FkIwkGb/IB/fxeuncNIY2VwyO69bSijzbobYkm1zLhwENYmuBqztQBs++zyP7EO6qLidGrRimWgDDmezXC4SnUsp2wOCmix5AVHFtSm+9SZ3PcnQCE5XyxTUAA4nxij5OPNQyvaAqOPQBl+zPsVglu1P8dRBVCcygr94Ba0VbOvvHC0PDjPET+HUqAako3TH+OuXePgZyhWcxSloWNdEc2yUaEt3epcKRB1HXUEPnGXbLl49uVgFlQoqnL6yvJSSOSPquoKu6cDAfS/wj3uRzgIVNAylhnNcLCwvpZwbBJMVdH2K7/yKO55g8BJOF5rmFFQDDifHKHqTCrbLweabY01U0HN5PvkDHn8NlWxSQQ0ojly2DdLCvP7/DAQTFLQryuoEf/cTHtxNoYyTwg9s+Xy2dxSxSnlkpPECwfKxprPuUEGBgTQ/Pce2Xbx8DKcLIRvpyfSr31ilfHuc+DJTyoWAYIKC9iZRgj/aw1f2ICQqWVPQ6aZGqJRDObu1tcw4LLQOU1fQiGJDil3H2P4EJ87hpNFieufqa4iz711Kfk0pl41AsMj3NepV1u4442UeO0zUY+t1SIVftRsRBrQhCIh0MjrGX+0jGamdDfh/A4La1Ag0MYcOl/9+h1cHua2PzlXIcKNMIl1UJ2Mj3Pcc2SpJl6BFFddlBKKOIyyf9cQ5k+Hxo5gKfQniCq0ZzvDkL/mL/RQ8uqKtqb633Fr5Bk94fsmReJpLRWKK7jgYxsqUA1bHcVXrqxutsla+wWPPL2mkoL+TQFPxAa6K2aOZy5ZCi0FYHLUavBD2bUODfUtm2VJYEhD1AU88oL2cESwhiA/K4CfasnhxZTnYCghrKyCsrYCwtgLC2goIaysgrK2AsLYCwtoKCGv/C38vfvTP3ug8AAAAJXRFWHRkYXRlOmNyZWF0ZQAyMDIzLTA1LTE5VDIzOjM5OjQ5KzAwOjAweTItFAAAACV0RVh0ZGF0ZTptb2RpZnkAMjAyMy0wNS0xOVQyMzozOTo0OSswMDowMAhvlagAAAAodEVYdGRhdGU6dGltZXN0YW1wADE5NzAtMDEtMDFUMDA6MDA6MDArMDA6MDCutErVAAAAAElFTkSuQmCC", yt = {
|
|
395
404
|
key: 0,
|
|
396
405
|
class: "mdi mdi-duck"
|
|
397
|
-
},
|
|
406
|
+
}, gt = ["src"], ft = {
|
|
398
407
|
key: 2,
|
|
399
408
|
class: "mdi mdi-google"
|
|
400
|
-
},
|
|
409
|
+
}, wt = {
|
|
401
410
|
key: 3,
|
|
402
411
|
class: "mdi mdi-google"
|
|
403
|
-
},
|
|
412
|
+
}, bt = {
|
|
404
413
|
key: 4,
|
|
405
414
|
class: "mdi mdi-database"
|
|
406
|
-
},
|
|
415
|
+
}, Tt = /* @__PURE__ */ ce({
|
|
407
416
|
__name: "ConnectionIcon",
|
|
408
417
|
props: {
|
|
409
418
|
connectionType: {}
|
|
410
419
|
},
|
|
411
420
|
setup(t) {
|
|
412
|
-
const e = t, o =
|
|
421
|
+
const e = t, o = z(() => ({
|
|
413
422
|
duckdb: "DuckDB",
|
|
414
423
|
motherduck: "MotherDuck",
|
|
415
424
|
"bigquery-oauth": "BigQuery",
|
|
416
425
|
snowflake: "Snowflake",
|
|
426
|
+
remote: "Remote Project",
|
|
417
427
|
default: "Database Connection"
|
|
418
428
|
})[e.connectionType || "default"] || e.connectionType || "");
|
|
419
|
-
return (i, c) => (
|
|
429
|
+
return (i, c) => (l(), W(Ae, { content: o.value }, {
|
|
420
430
|
default: q(() => [
|
|
421
|
-
t.connectionType === "duckdb" ? (
|
|
431
|
+
t.connectionType === "duckdb" ? (l(), u("i", yt)) : t.connectionType === "motherduck" ? (l(), u("img", {
|
|
422
432
|
key: 1,
|
|
423
|
-
src:
|
|
433
|
+
src: Ke(ht),
|
|
424
434
|
class: "motherduck-icon",
|
|
425
435
|
alt: "MotherDuck"
|
|
426
|
-
}, null, 8,
|
|
436
|
+
}, null, 8, gt)) : t.connectionType === "bigquery-oauth" ? (l(), u("i", ft)) : t.connectionType === "bigquery" ? (l(), u("i", wt)) : (l(), u("i", bt))
|
|
427
437
|
]),
|
|
428
438
|
_: 1
|
|
429
439
|
}, 8, ["content"]));
|
|
430
440
|
}
|
|
431
|
-
}),
|
|
441
|
+
}), vt = /* @__PURE__ */ Z(Tt, [["__scopeId", "data-v-d7a85282"]]), Et = "sidebar-icon-button", St = /* @__PURE__ */ ce({
|
|
432
442
|
__name: "ConnectionRefresh",
|
|
433
443
|
props: {
|
|
434
444
|
connection: {},
|
|
@@ -439,24 +449,26 @@ const dt = /* @__PURE__ */ z($e, [["render", ut], ["__scopeId", "data-v-bd6e19a1
|
|
|
439
449
|
setup(t, { emit: e }) {
|
|
440
450
|
const o = t, i = e;
|
|
441
451
|
let c;
|
|
442
|
-
if (o.type === "llm" ? c =
|
|
452
|
+
if (o.type === "llm" ? c = _("llmConnectionStore") : c = _("connectionStore"), !c)
|
|
443
453
|
throw new Error("Connection store is not provided!");
|
|
444
|
-
const y =
|
|
445
|
-
() => o.connection.connected ? "mdi mdi-refresh" : "mdi mdi-
|
|
446
|
-
), a =
|
|
454
|
+
const y = z(
|
|
455
|
+
() => o.connection.connected ? "mdi mdi-refresh" : "mdi mdi-power-plug-outline"
|
|
456
|
+
), a = z(
|
|
457
|
+
() => o.connection.connected ? `refresh-connection-${o.connection.name}` : `connect-connection-${o.connection.name}`
|
|
458
|
+
), p = async () => {
|
|
447
459
|
try {
|
|
448
460
|
await c.resetConnection(o.connection.name), i("refresh", o.connection.name);
|
|
449
|
-
} catch (
|
|
450
|
-
throw console.error("Refresh failed:",
|
|
461
|
+
} catch (w) {
|
|
462
|
+
throw console.error("Refresh failed:", w), w;
|
|
451
463
|
}
|
|
452
464
|
};
|
|
453
|
-
return (
|
|
454
|
-
class: "refresh-button",
|
|
455
|
-
action:
|
|
456
|
-
"data-testid":
|
|
465
|
+
return (w, d) => (l(), W(Re, {
|
|
466
|
+
class: me(["refresh-button", Et]),
|
|
467
|
+
action: p,
|
|
468
|
+
"data-testid": a.value,
|
|
457
469
|
useDefaultStyle: !1,
|
|
458
|
-
testId:
|
|
459
|
-
onClick:
|
|
470
|
+
testId: a.value,
|
|
471
|
+
onClick: d[0] || (d[0] = R(() => {
|
|
460
472
|
}, ["stop"]))
|
|
461
473
|
}, {
|
|
462
474
|
default: q(() => [
|
|
@@ -467,7 +479,7 @@ const dt = /* @__PURE__ */ z($e, [["render", ut], ["__scopeId", "data-v-bd6e19a1
|
|
|
467
479
|
_: 1
|
|
468
480
|
}, 8, ["data-testid", "testId"]));
|
|
469
481
|
}
|
|
470
|
-
}),
|
|
482
|
+
}), Ct = /* @__PURE__ */ Z(St, [["__scopeId", "data-v-11056d75"]]), kt = ce({
|
|
471
483
|
name: "FileUpload",
|
|
472
484
|
props: {
|
|
473
485
|
connection: {
|
|
@@ -476,31 +488,34 @@ const dt = /* @__PURE__ */ z($e, [["render", ut], ["__scopeId", "data-v-bd6e19a1
|
|
|
476
488
|
}
|
|
477
489
|
},
|
|
478
490
|
setup(t) {
|
|
479
|
-
const e =
|
|
491
|
+
const e = C(!1), o = C(!1), i = C("Processing file..."), c = C(""), y = C(null), a = () => {
|
|
480
492
|
e.value = !0;
|
|
481
|
-
},
|
|
493
|
+
}, p = () => {
|
|
482
494
|
e.value = !1;
|
|
483
|
-
},
|
|
484
|
-
const
|
|
485
|
-
|
|
486
|
-
},
|
|
487
|
-
var
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
495
|
+
}, w = async (A) => {
|
|
496
|
+
const m = A.target;
|
|
497
|
+
m.files && m.files.length > 0 && await N(m.files[0]);
|
|
498
|
+
}, d = () => {
|
|
499
|
+
var A;
|
|
500
|
+
(A = y.value) == null || A.click();
|
|
501
|
+
}, S = async (A) => {
|
|
502
|
+
var m;
|
|
503
|
+
if (e.value = !1, (m = A.dataTransfer) != null && m.files && A.dataTransfer.files.length > 0) {
|
|
504
|
+
const Q = A.dataTransfer.files[0];
|
|
505
|
+
f(Q) ? await N(Q) : alert("Please drop a CSV, Parquet, or DuckDB file");
|
|
491
506
|
}
|
|
492
|
-
},
|
|
507
|
+
}, f = (A) => A.type === "text/csv" || A.name.endsWith(".csv") || A.type === "application/octet-stream" || A.name.endsWith(".parquet") || A.name.endsWith(".db"), N = async (A) => {
|
|
493
508
|
try {
|
|
494
|
-
o.value = !0, i.value = `Processing ${
|
|
495
|
-
const
|
|
496
|
-
i.value =
|
|
509
|
+
o.value = !0, i.value = `Processing ${A.name}...`;
|
|
510
|
+
const m = await t.connection.importFile(A, (Q) => {
|
|
511
|
+
i.value = Q;
|
|
497
512
|
});
|
|
498
|
-
|
|
513
|
+
m.type === "database" ? c.value = `Successfully attached database ${m.name}` : c.value = `Successfully imported ${m.name}`, o.value = !1, setTimeout(() => {
|
|
499
514
|
c.value = "";
|
|
500
515
|
}, 5e3), y.value && (y.value.value = "");
|
|
501
|
-
} catch (
|
|
502
|
-
o.value = !1, console.error(`Error processing ${
|
|
503
|
-
`Error processing ${
|
|
516
|
+
} catch (m) {
|
|
517
|
+
o.value = !1, console.error(`Error processing ${A.name}:`, m), alert(
|
|
518
|
+
`Error processing ${A.name}: ${m instanceof Error ? m.message : "Unknown error"}`
|
|
504
519
|
);
|
|
505
520
|
}
|
|
506
521
|
};
|
|
@@ -510,129 +525,118 @@ const dt = /* @__PURE__ */ z($e, [["render", ut], ["__scopeId", "data-v-bd6e19a1
|
|
|
510
525
|
loadingMessage: i,
|
|
511
526
|
successMessage: c,
|
|
512
527
|
fileInput: y,
|
|
528
|
+
openFilePicker: d,
|
|
513
529
|
handleDragOver: a,
|
|
514
|
-
handleDragLeave:
|
|
515
|
-
handleDrop:
|
|
516
|
-
handleFileInput:
|
|
530
|
+
handleDragLeave: p,
|
|
531
|
+
handleDrop: S,
|
|
532
|
+
handleFileInput: w
|
|
517
533
|
};
|
|
518
534
|
}
|
|
519
|
-
}),
|
|
520
|
-
key:
|
|
521
|
-
class: "
|
|
522
|
-
},
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
onDragover: e[
|
|
530
|
-
onDragleave: e[
|
|
531
|
-
onDrop: e[
|
|
535
|
+
}), At = ["data-testid"], It = ["data-testid"], Pt = { class: "upload-copy truncate-text" }, Rt = {
|
|
536
|
+
key: 1,
|
|
537
|
+
class: "upload-row"
|
|
538
|
+
}, Mt = ["data-testid"], Lt = { class: "upload-copy truncate-text" };
|
|
539
|
+
function Dt(t, e, o, i, c, y) {
|
|
540
|
+
return l(), u("button", {
|
|
541
|
+
type: "button",
|
|
542
|
+
class: me(["file-upload-container", { "drag-active": t.isDragging, loading: t.isLoading }]),
|
|
543
|
+
"data-testid": `duckdb-importer-${t.connection.name}`,
|
|
544
|
+
onClick: e[1] || (e[1] = (...a) => t.openFilePicker && t.openFilePicker(...a)),
|
|
545
|
+
onDragover: e[2] || (e[2] = R((...a) => t.handleDragOver && t.handleDragOver(...a), ["prevent"])),
|
|
546
|
+
onDragleave: e[3] || (e[3] = R((...a) => t.handleDragLeave && t.handleDragLeave(...a), ["prevent"])),
|
|
547
|
+
onDrop: e[4] || (e[4] = R((...a) => t.handleDrop && t.handleDrop(...a), ["prevent"]))
|
|
532
548
|
}, [
|
|
533
|
-
s("
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
])
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
549
|
+
s("input", {
|
|
550
|
+
type: "file",
|
|
551
|
+
accept: ".csv,.parquet,.db",
|
|
552
|
+
onChange: e[0] || (e[0] = (...a) => t.handleFileInput && t.handleFileInput(...a)),
|
|
553
|
+
ref: "fileInput",
|
|
554
|
+
class: "hidden-input"
|
|
555
|
+
}, null, 544),
|
|
556
|
+
t.successMessage && !t.isLoading ? (l(), u("div", {
|
|
557
|
+
key: 0,
|
|
558
|
+
class: "upload-row upload-success",
|
|
559
|
+
"data-testid": `duckdb-import-success-${t.connection.name}`
|
|
560
|
+
}, [
|
|
561
|
+
e[5] || (e[5] = s("i", { class: "mdi mdi-check-circle-outline upload-icon" }, null, -1)),
|
|
562
|
+
s("span", Pt, F(t.successMessage), 1)
|
|
563
|
+
], 8, It)) : t.isLoading ? (l(), u("div", {
|
|
564
|
+
key: 2,
|
|
565
|
+
class: "upload-row loading-container",
|
|
566
|
+
"data-testid": `duckdb-import-loading-${t.connection.name}`
|
|
567
|
+
}, [
|
|
568
|
+
e[7] || (e[7] = s("span", { class: "spinner" }, null, -1)),
|
|
569
|
+
s("span", Lt, F(t.loadingMessage), 1)
|
|
570
|
+
], 8, Mt)) : (l(), u("div", Rt, [...e[6] || (e[6] = [
|
|
571
|
+
s("i", { class: "mdi mdi-plus upload-icon" }, null, -1),
|
|
572
|
+
s("span", { class: "upload-copy" }, [
|
|
573
|
+
s("span", { class: "upload-label" }, "Import data..."),
|
|
574
|
+
s("span", { class: "upload-subtitle" }, "CSV, Parquet, DuckDB")
|
|
575
|
+
], -1)
|
|
576
|
+
])]))
|
|
577
|
+
], 42, At);
|
|
557
578
|
}
|
|
558
|
-
const
|
|
579
|
+
const _t = /* @__PURE__ */ Z(kt, [["render", Dt], ["__scopeId", "data-v-daeb30e9"]]), Nt = { class: "model-anchor" }, qt = { class: "model-trigger-text truncate-text" }, Ut = {
|
|
559
580
|
key: 0,
|
|
560
581
|
class: "model-form"
|
|
561
|
-
},
|
|
582
|
+
}, Ot = ["onClick"], xt = /* @__PURE__ */ ce({
|
|
562
583
|
__name: "ModelSelector",
|
|
563
584
|
props: {
|
|
564
585
|
connection: {}
|
|
565
586
|
},
|
|
566
587
|
setup(t) {
|
|
567
|
-
const e = t, o =
|
|
568
|
-
}), y =
|
|
588
|
+
const e = t, o = _("modelStore"), i = _("connectionStore"), c = _("saveConnections", () => {
|
|
589
|
+
}), y = C(!1), a = z(() => o ? Object.keys(o.models) : []), p = () => {
|
|
569
590
|
y.value = !y.value;
|
|
570
|
-
},
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
))), i.connections[e.connection.name].model = P;
|
|
583
|
-
}
|
|
584
|
-
c(), y.value = !1;
|
|
591
|
+
}, w = async (d) => {
|
|
592
|
+
if (!i)
|
|
593
|
+
return;
|
|
594
|
+
let S = d;
|
|
595
|
+
S === "~new-model" && (S = e.connection.name, await (o == null ? void 0 : o.addModelConfig(
|
|
596
|
+
new Ve({
|
|
597
|
+
name: e.connection.name,
|
|
598
|
+
sources: [],
|
|
599
|
+
storage: "local",
|
|
600
|
+
description: ""
|
|
601
|
+
})
|
|
602
|
+
))), i.connections[e.connection.name].model = S, await c(), y.value = !1;
|
|
585
603
|
};
|
|
586
|
-
return (
|
|
604
|
+
return (d, S) => (l(), u("div", Nt, [
|
|
587
605
|
s("button", {
|
|
588
|
-
class: "
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
s("
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
},
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
class: "model-select-item"
|
|
609
|
-
}, " Create New Model ", -1))
|
|
610
|
-
], 512), [
|
|
611
|
-
[Ee, a.value]
|
|
612
|
-
]),
|
|
613
|
-
s("div", { class: "model-form-actions" }, [
|
|
614
|
-
g[2] || (g[2] = s("button", { type: "submit" }, "Submit", -1)),
|
|
615
|
-
s("button", {
|
|
616
|
-
type: "button",
|
|
617
|
-
onClick: m
|
|
618
|
-
}, "Close")
|
|
619
|
-
])
|
|
620
|
-
], 32)
|
|
621
|
-
])) : A("", !0)
|
|
606
|
+
class: "model-trigger truncate-text",
|
|
607
|
+
type: "button",
|
|
608
|
+
onClick: p
|
|
609
|
+
}, [
|
|
610
|
+
s("span", qt, F(t.connection.model || "Set model"), 1),
|
|
611
|
+
S[1] || (S[1] = s("i", { class: "mdi mdi-chevron-down model-trigger-icon" }, null, -1))
|
|
612
|
+
]),
|
|
613
|
+
y.value ? (l(), u("div", Ut, [
|
|
614
|
+
(l(!0), u(pe, null, we(a.value, (f) => (l(), u("button", {
|
|
615
|
+
key: f,
|
|
616
|
+
type: "button",
|
|
617
|
+
class: me(["model-option", { active: f === t.connection.model }]),
|
|
618
|
+
onClick: (N) => w(f)
|
|
619
|
+
}, F(f), 11, Ot))), 128)),
|
|
620
|
+
s("button", {
|
|
621
|
+
type: "button",
|
|
622
|
+
class: "model-option",
|
|
623
|
+
onClick: S[0] || (S[0] = (f) => w("~new-model"))
|
|
624
|
+
}, " Create New Model ")
|
|
625
|
+
])) : M("", !0)
|
|
622
626
|
]));
|
|
623
627
|
}
|
|
624
|
-
}),
|
|
628
|
+
}), Bt = /* @__PURE__ */ Z(xt, [["__scopeId", "data-v-fb7779b2"]]), Ft = {
|
|
625
629
|
name: "ConnectionListItem",
|
|
626
630
|
components: {
|
|
627
|
-
SidebarItem:
|
|
628
|
-
ConnectionIcon:
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
631
|
+
SidebarItem: Ne,
|
|
632
|
+
ConnectionIcon: vt,
|
|
633
|
+
ConnectionStatusIcon: _e,
|
|
634
|
+
ConnectionRefresh: Ct,
|
|
635
|
+
CreateEditorFromDatasourcePopup: He,
|
|
636
|
+
DuckDBImporter: _t,
|
|
637
|
+
ModelSelector: Bt,
|
|
638
|
+
Tooltip: Ae,
|
|
639
|
+
SidebarOverflowMenu: De
|
|
636
640
|
},
|
|
637
641
|
props: {
|
|
638
642
|
item: {
|
|
@@ -667,12 +671,15 @@ const Rt = /* @__PURE__ */ z(vt, [["render", Pt], ["__scopeId", "data-v-d7832089
|
|
|
667
671
|
"toggleMobileMenu"
|
|
668
672
|
],
|
|
669
673
|
setup(t, { emit: e }) {
|
|
670
|
-
var
|
|
671
|
-
const o =
|
|
674
|
+
var ae, ee, se;
|
|
675
|
+
const o = _("isMobile", !1), i = _("editorStore"), c = _("saveEditors"), y = _("setActiveScreen"), a = _("setActiveEditor");
|
|
676
|
+
if (!i || !c || !y || !a)
|
|
677
|
+
throw new Error("Editor store is not provided!");
|
|
678
|
+
const p = z(
|
|
672
679
|
() => ["connection", "database", "schema"].includes(t.item.type)
|
|
673
|
-
),
|
|
680
|
+
), w = z(
|
|
674
681
|
() => ["connection", "database", "schema", "table", "schema"].includes(t.item.type)
|
|
675
|
-
),
|
|
682
|
+
), d = () => [
|
|
676
683
|
"refresh-connection",
|
|
677
684
|
"refresh-database",
|
|
678
685
|
"refresh-schema",
|
|
@@ -685,140 +692,192 @@ const Rt = /* @__PURE__ */ z(vt, [["render", Pt], ["__scopeId", "data-v-d7832089
|
|
|
685
692
|
"snowflake-account",
|
|
686
693
|
"snowflake-username",
|
|
687
694
|
"toggle-save-credential"
|
|
688
|
-
].includes(t.item.type) ? "" : t.item.name,
|
|
689
|
-
var
|
|
690
|
-
|
|
691
|
-
},
|
|
692
|
-
var
|
|
693
|
-
|
|
694
|
-
},
|
|
695
|
+
].includes(t.item.type) ? "" : t.item.name, S = () => {
|
|
696
|
+
var E;
|
|
697
|
+
w.value && e("click", t.item.id, ((E = t.item.connection) == null ? void 0 : E.name) || "", t.item.type);
|
|
698
|
+
}, f = () => {
|
|
699
|
+
var E;
|
|
700
|
+
w.value && e("toggle", t.item.id, ((E = t.item.connection) == null ? void 0 : E.name) || "", t.item.type);
|
|
701
|
+
}, N = () => {
|
|
695
702
|
e("toggleMobileMenu");
|
|
703
|
+
}, A = async (E) => {
|
|
704
|
+
try {
|
|
705
|
+
const ye = `new-editor-${Date.now()}`, Se = t.item.connection, Be = Se.storage === "remote", Fe = i.newEditor(
|
|
706
|
+
ye,
|
|
707
|
+
E === "trilogy" ? "preql" : "sql",
|
|
708
|
+
t.item.connection.name,
|
|
709
|
+
void 0,
|
|
710
|
+
Be ? {
|
|
711
|
+
storage: "remote",
|
|
712
|
+
remoteStoreId: Se.remoteStoreId || null,
|
|
713
|
+
remotePath: ye
|
|
714
|
+
} : void 0
|
|
715
|
+
);
|
|
716
|
+
await c(), a(Fe.id), y("editors");
|
|
717
|
+
} catch (re) {
|
|
718
|
+
console.error("Failed to create new editor:", re);
|
|
719
|
+
}
|
|
696
720
|
}, m = () => {
|
|
697
|
-
var
|
|
698
|
-
e("refresh", (
|
|
699
|
-
},
|
|
700
|
-
var
|
|
701
|
-
e("refresh", t.item.id, ((
|
|
702
|
-
},
|
|
703
|
-
var
|
|
704
|
-
e("refresh", t.item.id, ((
|
|
705
|
-
},
|
|
706
|
-
e("deleteConnection",
|
|
707
|
-
},
|
|
721
|
+
var E, re;
|
|
722
|
+
e("refresh", (E = t.item.connection) == null ? void 0 : E.name, ((re = t.item.connection) == null ? void 0 : re.name) || "", "connection");
|
|
723
|
+
}, Q = () => {
|
|
724
|
+
var E;
|
|
725
|
+
e("refresh", t.item.id, ((E = t.item.connection) == null ? void 0 : E.name) || "", "database");
|
|
726
|
+
}, ue = () => {
|
|
727
|
+
var E;
|
|
728
|
+
e("refresh", t.item.id, ((E = t.item.connection) == null ? void 0 : E.name) || "", "schema");
|
|
729
|
+
}, le = (E) => {
|
|
730
|
+
e("deleteConnection", E);
|
|
731
|
+
}, g = z(() => {
|
|
732
|
+
if (t.item.type !== "connection")
|
|
733
|
+
return [];
|
|
734
|
+
const E = [];
|
|
735
|
+
return o && E.push({ id: "query-history", label: "Query history", icon: "mdi-history" }), E.push(
|
|
736
|
+
{ id: "new-sql", label: "New SQL editor", icon: "mdi-file-document-plus-outline" },
|
|
737
|
+
{
|
|
738
|
+
id: "new-trilogy",
|
|
739
|
+
label: "New Trilogy editor",
|
|
740
|
+
icon: "mdi-file-document-plus-outline"
|
|
741
|
+
},
|
|
742
|
+
{ id: "refresh", label: "Refresh connection", icon: "mdi-refresh" },
|
|
743
|
+
{ id: "delete-separator", kind: "separator" },
|
|
744
|
+
{ id: "delete", label: "Delete connection", icon: "mdi-trash-can-outline", danger: !0 }
|
|
745
|
+
), E;
|
|
746
|
+
}), P = (E) => {
|
|
747
|
+
switch (E.id) {
|
|
748
|
+
case "query-history":
|
|
749
|
+
N();
|
|
750
|
+
break;
|
|
751
|
+
case "new-sql":
|
|
752
|
+
A("sql");
|
|
753
|
+
break;
|
|
754
|
+
case "new-trilogy":
|
|
755
|
+
A("trilogy");
|
|
756
|
+
break;
|
|
757
|
+
case "refresh":
|
|
758
|
+
m();
|
|
759
|
+
break;
|
|
760
|
+
case "delete":
|
|
761
|
+
le(t.item.connection);
|
|
762
|
+
break;
|
|
763
|
+
}
|
|
764
|
+
}, v = C(
|
|
708
765
|
t.item.connection.projectId || ""
|
|
709
|
-
),
|
|
766
|
+
), b = C(
|
|
710
767
|
t.item.connection.browsingProjectId || ""
|
|
711
|
-
),
|
|
712
|
-
((
|
|
713
|
-
),
|
|
714
|
-
((
|
|
715
|
-
),
|
|
716
|
-
((
|
|
717
|
-
),
|
|
718
|
-
|
|
719
|
-
|
|
768
|
+
), k = C(t.item.connection.mdToken || ""), ne = C(
|
|
769
|
+
((ae = t.item.connection.config) == null ? void 0 : ae.privateKey) || ""
|
|
770
|
+
), X = C(
|
|
771
|
+
((ee = t.item.connection.config) == null ? void 0 : ee.account) || ""
|
|
772
|
+
), V = C(
|
|
773
|
+
((se = t.item.connection.config) == null ? void 0 : se.username) || ""
|
|
774
|
+
), J = C(!1), h = C(!1), r = C(!1), T = C(!1), U = C(!1), K = (E) => {
|
|
775
|
+
E.value = !0, setTimeout(() => {
|
|
776
|
+
E.value = !1;
|
|
720
777
|
}, 1500);
|
|
721
|
-
},
|
|
722
|
-
let
|
|
723
|
-
return (...
|
|
724
|
-
clearTimeout(
|
|
778
|
+
}, Y = (E, re) => {
|
|
779
|
+
let ye;
|
|
780
|
+
return (...Se) => {
|
|
781
|
+
clearTimeout(ye), ye = setTimeout(() => E(...Se), re);
|
|
725
782
|
};
|
|
726
|
-
},
|
|
727
|
-
e("updateBigqueryProject", t.item.connection,
|
|
728
|
-
},
|
|
729
|
-
e("updateBigqueryBrowsingProject", t.item.connection,
|
|
730
|
-
},
|
|
731
|
-
e("updateSnowflakePrivateKey", t.item.connection,
|
|
732
|
-
},
|
|
733
|
-
e("updateSnowflakeAccount", t.item.connection,
|
|
734
|
-
},
|
|
735
|
-
e("updateSnowflakeUsername", t.item.connection,
|
|
736
|
-
},
|
|
737
|
-
|
|
783
|
+
}, $ = () => {
|
|
784
|
+
e("updateBigqueryProject", t.item.connection, v.value), K(J);
|
|
785
|
+
}, oe = () => {
|
|
786
|
+
e("updateBigqueryBrowsingProject", t.item.connection, b.value), K(h);
|
|
787
|
+
}, O = () => {
|
|
788
|
+
e("updateSnowflakePrivateKey", t.item.connection, ne.value), K(r);
|
|
789
|
+
}, j = () => {
|
|
790
|
+
e("updateSnowflakeAccount", t.item.connection, X.value), K(T);
|
|
791
|
+
}, ie = () => {
|
|
792
|
+
e("updateSnowflakeUsername", t.item.connection, V.value), K(U);
|
|
793
|
+
}, de = Y($, 500), H = Y(
|
|
794
|
+
oe,
|
|
738
795
|
500
|
|
739
|
-
),
|
|
796
|
+
), Te = Y(O, 500), ve = Y(j, 500), Ee = Y(ie, 500);
|
|
740
797
|
return {
|
|
741
798
|
isMobile: o,
|
|
742
|
-
isExpandable:
|
|
743
|
-
getItemName:
|
|
744
|
-
handleItemClick:
|
|
745
|
-
handleToggle:
|
|
746
|
-
toggleMobileMenu:
|
|
799
|
+
isExpandable: p,
|
|
800
|
+
getItemName: d,
|
|
801
|
+
handleItemClick: S,
|
|
802
|
+
handleToggle: f,
|
|
803
|
+
toggleMobileMenu: N,
|
|
747
804
|
handleRefreshConnectionClick: m,
|
|
748
|
-
handleRefreshDatabaseClick:
|
|
749
|
-
handleRefreshSchemaClick:
|
|
750
|
-
deleteConnection:
|
|
805
|
+
handleRefreshDatabaseClick: Q,
|
|
806
|
+
handleRefreshSchemaClick: ue,
|
|
807
|
+
deleteConnection: le,
|
|
808
|
+
contextMenuItems: g,
|
|
809
|
+
handleContextMenuItemClick: P,
|
|
751
810
|
// Config variables
|
|
752
|
-
bigqueryProject:
|
|
753
|
-
bigqueryBrowsingProject:
|
|
754
|
-
mdToken:
|
|
755
|
-
snowflakePrivateKey:
|
|
756
|
-
snowflakeAccount:
|
|
757
|
-
snowflakeUsername:
|
|
811
|
+
bigqueryProject: v,
|
|
812
|
+
bigqueryBrowsingProject: b,
|
|
813
|
+
mdToken: k,
|
|
814
|
+
snowflakePrivateKey: ne,
|
|
815
|
+
snowflakeAccount: X,
|
|
816
|
+
snowflakeUsername: V,
|
|
758
817
|
// Success indicators
|
|
759
|
-
showBillingSuccess:
|
|
760
|
-
showBrowsingSuccess:
|
|
761
|
-
showPrivateKeySuccess:
|
|
762
|
-
showAccountSuccess:
|
|
763
|
-
showUsernameSuccess:
|
|
818
|
+
showBillingSuccess: J,
|
|
819
|
+
showBrowsingSuccess: h,
|
|
820
|
+
showPrivateKeySuccess: r,
|
|
821
|
+
showAccountSuccess: T,
|
|
822
|
+
showUsernameSuccess: U,
|
|
764
823
|
// Update functions
|
|
765
|
-
debouncedUpdateBigqueryProject:
|
|
766
|
-
debouncedUpdateBigqueryBrowsingProject:
|
|
767
|
-
debouncedUpdateSnowflakePrivateKey:
|
|
768
|
-
debouncedUpdateSnowflakeAccount:
|
|
769
|
-
debouncedUpdateSnowflakeUsername:
|
|
770
|
-
updateMotherDuckToken: (
|
|
771
|
-
e("updateMotherDuckToken",
|
|
824
|
+
debouncedUpdateBigqueryProject: de,
|
|
825
|
+
debouncedUpdateBigqueryBrowsingProject: H,
|
|
826
|
+
debouncedUpdateSnowflakePrivateKey: Te,
|
|
827
|
+
debouncedUpdateSnowflakeAccount: ve,
|
|
828
|
+
debouncedUpdateSnowflakeUsername: Ee,
|
|
829
|
+
updateMotherDuckToken: (E, re) => {
|
|
830
|
+
e("updateMotherDuckToken", E, re);
|
|
772
831
|
},
|
|
773
|
-
toggleSaveCredential: (
|
|
774
|
-
e("toggleSaveCredential",
|
|
832
|
+
toggleSaveCredential: (E) => {
|
|
833
|
+
e("toggleSaveCredential", E);
|
|
775
834
|
}
|
|
776
835
|
};
|
|
777
836
|
}
|
|
778
|
-
},
|
|
837
|
+
}, Yt = {
|
|
779
838
|
key: 1,
|
|
780
839
|
class: "mdi mdi-database node-icon"
|
|
781
|
-
},
|
|
840
|
+
}, Gt = {
|
|
782
841
|
key: 2,
|
|
783
842
|
class: "mdi mdi-folder-outline node-icon"
|
|
784
|
-
},
|
|
843
|
+
}, Kt = {
|
|
785
844
|
key: 3,
|
|
786
845
|
class: "mdi mdi-table node-icon"
|
|
787
|
-
},
|
|
846
|
+
}, jt = {
|
|
788
847
|
key: 4,
|
|
789
848
|
class: "mdi mdi-alert-circle node-icon"
|
|
790
|
-
},
|
|
849
|
+
}, Qt = {
|
|
791
850
|
key: 5,
|
|
792
851
|
class: "mdi mdi-loading mdi-spin node-icon"
|
|
793
|
-
},
|
|
852
|
+
}, Vt = {
|
|
794
853
|
key: 6,
|
|
795
854
|
class: "mdi mdi-table-column node-icon"
|
|
796
|
-
},
|
|
855
|
+
}, Ht = {
|
|
797
856
|
key: 0,
|
|
798
857
|
class: "mdi mdi-check-circle success-icon"
|
|
799
|
-
},
|
|
858
|
+
}, Wt = {
|
|
800
859
|
key: 0,
|
|
801
860
|
class: "mdi mdi-check-circle success-icon"
|
|
802
|
-
},
|
|
861
|
+
}, zt = {
|
|
803
862
|
key: 0,
|
|
804
863
|
class: "mdi mdi-check-circle success-icon"
|
|
805
|
-
},
|
|
864
|
+
}, Xt = {
|
|
806
865
|
key: 0,
|
|
807
866
|
class: "mdi mdi-check-circle success-icon"
|
|
808
|
-
},
|
|
867
|
+
}, Jt = {
|
|
809
868
|
key: 0,
|
|
810
869
|
class: "mdi mdi-check-circle success-icon"
|
|
811
|
-
},
|
|
870
|
+
}, Zt = { class: "save-credential-toggle sidebar-toggle-row" }, $t = ["checked"], en = { key: 0 }, tn = {
|
|
812
871
|
key: 0,
|
|
813
872
|
class: "connection-actions"
|
|
814
|
-
},
|
|
873
|
+
}, nn = {
|
|
815
874
|
key: 1,
|
|
816
875
|
class: "connection-actions"
|
|
817
|
-
}
|
|
818
|
-
function
|
|
819
|
-
const a =
|
|
820
|
-
return
|
|
821
|
-
|
|
876
|
+
};
|
|
877
|
+
function on(t, e, o, i, c, y) {
|
|
878
|
+
const a = x("connection-icon"), p = x("DuckDBImporter"), w = x("model-selector"), d = x("CreateEditorFromDatasourcePopup"), S = x("connection-refresh"), f = x("connection-status-icon"), N = x("sidebar-overflow-menu"), A = x("sidebar-item");
|
|
879
|
+
return l(), u("div", null, [
|
|
880
|
+
G(A, {
|
|
822
881
|
"item-id": o.item.id,
|
|
823
882
|
name: i.getItemName(),
|
|
824
883
|
indent: o.item.indent,
|
|
@@ -830,285 +889,252 @@ function $t(t, e, o, i, c, y) {
|
|
|
830
889
|
onToggle: i.handleToggle
|
|
831
890
|
}, {
|
|
832
891
|
icon: q(() => {
|
|
833
|
-
var
|
|
892
|
+
var m;
|
|
834
893
|
return [
|
|
835
|
-
o.item.type === "connection" ? (
|
|
894
|
+
o.item.type === "connection" ? (l(), W(a, {
|
|
836
895
|
key: 0,
|
|
837
|
-
"connection-type": (
|
|
838
|
-
}, null, 8, ["connection-type"])) : o.item.type === "database" ? (
|
|
896
|
+
"connection-type": (m = o.item.connection) == null ? void 0 : m.type
|
|
897
|
+
}, null, 8, ["connection-type"])) : o.item.type === "database" ? (l(), u("i", Yt)) : o.item.type === "schema" ? (l(), u("i", Gt)) : o.item.type === "table" ? (l(), u("i", Kt)) : o.item.type === "error" ? (l(), u("i", jt)) : o.item.type === "loading" ? (l(), u("i", Qt)) : o.item.type === "column" ? (l(), u("i", Vt)) : M("", !0)
|
|
839
898
|
];
|
|
840
899
|
}),
|
|
841
900
|
name: q(() => [
|
|
842
|
-
o.item.type === "refresh-connection" ? (
|
|
901
|
+
o.item.type === "refresh-connection" ? (l(), u("div", {
|
|
843
902
|
key: 0,
|
|
844
903
|
class: "refresh title-pad-left truncate-text sidebar-sub-item",
|
|
845
|
-
onClick: e[0] || (e[0] = (...
|
|
846
|
-
},
|
|
904
|
+
onClick: e[0] || (e[0] = (...m) => i.handleRefreshConnectionClick && i.handleRefreshConnectionClick(...m))
|
|
905
|
+
}, F(o.item.name), 1)) : o.item.type === "refresh-database" ? (l(), u("div", {
|
|
847
906
|
key: 1,
|
|
848
907
|
class: "refresh title-pad-left truncate-text sidebar-sub-item",
|
|
849
|
-
onClick: e[1] || (e[1] = (...
|
|
850
|
-
},
|
|
908
|
+
onClick: e[1] || (e[1] = (...m) => i.handleRefreshDatabaseClick && i.handleRefreshDatabaseClick(...m))
|
|
909
|
+
}, F(o.item.name), 1)) : o.item.type === "refresh-schema" ? (l(), u("div", {
|
|
851
910
|
key: 2,
|
|
852
911
|
class: "refresh title-pad-left truncate-text sidebar-sub-item",
|
|
853
|
-
onClick: e[2] || (e[2] = (...
|
|
854
|
-
},
|
|
912
|
+
onClick: e[2] || (e[2] = (...m) => i.handleRefreshSchemaClick && i.handleRefreshSchemaClick(...m))
|
|
913
|
+
}, F(o.item.name), 1)) : o.item.type === "duckdb-upload" ? (l(), W(p, {
|
|
855
914
|
key: 3,
|
|
856
915
|
db: o.item.connection.db,
|
|
857
916
|
connection: o.item.connection
|
|
858
|
-
}, null, 8, ["db", "connection"])) : o.item.type === "model" ? (
|
|
917
|
+
}, null, 8, ["db", "connection"])) : o.item.type === "model" ? (l(), u("div", {
|
|
859
918
|
key: 4,
|
|
860
|
-
class: "
|
|
861
|
-
onClick: e[3] || (e[3] =
|
|
919
|
+
class: "connection-meta-row",
|
|
920
|
+
onClick: e[3] || (e[3] = R(() => {
|
|
862
921
|
}, ["stop"]))
|
|
863
922
|
}, [
|
|
864
|
-
e[
|
|
865
|
-
|
|
923
|
+
e[26] || (e[26] = s("span", { class: "meta-label" }, "Model:", -1)),
|
|
924
|
+
G(w, {
|
|
866
925
|
connection: o.item.connection
|
|
867
926
|
}, null, 8, ["connection"])
|
|
868
|
-
])) : o.item.type === "bigquery-project" ? (
|
|
927
|
+
])) : o.item.type === "bigquery-project" ? (l(), u("div", {
|
|
869
928
|
key: 5,
|
|
870
929
|
class: "bq-project-container",
|
|
871
|
-
onClick: e[6] || (e[6] =
|
|
930
|
+
onClick: e[6] || (e[6] = R(() => {
|
|
872
931
|
}, ["stop"]))
|
|
873
932
|
}, [
|
|
874
|
-
e[
|
|
933
|
+
e[27] || (e[27] = s("label", { class: "input-label" }, "Billing", -1)),
|
|
875
934
|
s("span", null, [
|
|
876
|
-
|
|
935
|
+
G(ge, { name: "fade" }, {
|
|
877
936
|
default: q(() => [
|
|
878
|
-
i.showBillingSuccess ? (
|
|
937
|
+
i.showBillingSuccess ? (l(), u("i", Ht)) : M("", !0)
|
|
879
938
|
]),
|
|
880
939
|
_: 1
|
|
881
940
|
}),
|
|
882
|
-
|
|
941
|
+
D(s("input", {
|
|
883
942
|
type: "text",
|
|
884
|
-
"onUpdate:modelValue": e[4] || (e[4] = (
|
|
943
|
+
"onUpdate:modelValue": e[4] || (e[4] = (m) => i.bigqueryProject = m),
|
|
885
944
|
placeholder: "Billing Project",
|
|
886
|
-
class: "bq-project-input",
|
|
887
|
-
onInput: e[5] || (e[5] = (...
|
|
945
|
+
class: "bq-project-input sidebar-control-input",
|
|
946
|
+
onInput: e[5] || (e[5] = (...m) => i.debouncedUpdateBigqueryProject && i.debouncedUpdateBigqueryProject(...m))
|
|
888
947
|
}, null, 544), [
|
|
889
|
-
[
|
|
948
|
+
[B, i.bigqueryProject]
|
|
890
949
|
])
|
|
891
950
|
])
|
|
892
|
-
])) : o.item.type === "bigquery-browsing-project" ? (
|
|
951
|
+
])) : o.item.type === "bigquery-browsing-project" ? (l(), u("div", {
|
|
893
952
|
key: 6,
|
|
894
953
|
class: "bq-project-container",
|
|
895
|
-
onClick: e[9] || (e[9] =
|
|
954
|
+
onClick: e[9] || (e[9] = R(() => {
|
|
896
955
|
}, ["stop"]))
|
|
897
956
|
}, [
|
|
898
|
-
e[
|
|
957
|
+
e[28] || (e[28] = s("label", { class: "input-label" }, "Browsing", -1)),
|
|
899
958
|
s("span", null, [
|
|
900
|
-
|
|
959
|
+
G(ge, { name: "fade" }, {
|
|
901
960
|
default: q(() => [
|
|
902
|
-
i.showBrowsingSuccess ? (
|
|
961
|
+
i.showBrowsingSuccess ? (l(), u("i", Wt)) : M("", !0)
|
|
903
962
|
]),
|
|
904
963
|
_: 1
|
|
905
964
|
}),
|
|
906
|
-
|
|
965
|
+
D(s("input", {
|
|
907
966
|
type: "text",
|
|
908
|
-
"onUpdate:modelValue": e[7] || (e[7] = (
|
|
967
|
+
"onUpdate:modelValue": e[7] || (e[7] = (m) => i.bigqueryBrowsingProject = m),
|
|
909
968
|
placeholder: "Browsing Project",
|
|
910
|
-
class: "bq-project-input",
|
|
911
|
-
onInput: e[8] || (e[8] = (...
|
|
969
|
+
class: "bq-project-input sidebar-control-input",
|
|
970
|
+
onInput: e[8] || (e[8] = (...m) => i.debouncedUpdateBigqueryBrowsingProject && i.debouncedUpdateBigqueryBrowsingProject(...m))
|
|
912
971
|
}, null, 544), [
|
|
913
|
-
[
|
|
972
|
+
[B, i.bigqueryBrowsingProject]
|
|
914
973
|
])
|
|
915
974
|
])
|
|
916
|
-
])) : o.item.type === "motherduck-token" ? (
|
|
975
|
+
])) : o.item.type === "motherduck-token" ? (l(), u("div", {
|
|
917
976
|
key: 7,
|
|
918
977
|
class: "md-token-container",
|
|
919
|
-
onClick: e[12] || (e[12] =
|
|
978
|
+
onClick: e[12] || (e[12] = R(() => {
|
|
920
979
|
}, ["stop"]))
|
|
921
980
|
}, [
|
|
922
981
|
s("form", {
|
|
923
|
-
onSubmit: e[11] || (e[11] =
|
|
982
|
+
onSubmit: e[11] || (e[11] = R((m) => i.updateMotherDuckToken(o.item.connection, i.mdToken), ["prevent"]))
|
|
924
983
|
}, [
|
|
925
|
-
e[
|
|
984
|
+
e[29] || (e[29] = s("button", {
|
|
926
985
|
type: "submit",
|
|
927
|
-
class: "customize-button"
|
|
928
|
-
}, "Update Token", -1)),
|
|
929
|
-
|
|
986
|
+
class: "customize-button sidebar-control-button"
|
|
987
|
+
}, " Update Token ", -1)),
|
|
988
|
+
D(s("input", {
|
|
930
989
|
type: "password",
|
|
931
|
-
"onUpdate:modelValue": e[10] || (e[10] = (
|
|
990
|
+
"onUpdate:modelValue": e[10] || (e[10] = (m) => i.mdToken = m),
|
|
932
991
|
placeholder: "mdToken",
|
|
933
|
-
class: "connection-customize"
|
|
992
|
+
class: "connection-customize sidebar-control-input"
|
|
934
993
|
}, null, 512), [
|
|
935
|
-
[
|
|
994
|
+
[B, i.mdToken]
|
|
936
995
|
])
|
|
937
996
|
], 32)
|
|
938
|
-
])) : o.item.type === "snowflake-private-key" ? (
|
|
997
|
+
])) : o.item.type === "snowflake-private-key" ? (l(), u("div", {
|
|
939
998
|
key: 8,
|
|
940
999
|
class: "bq-project-container",
|
|
941
|
-
onClick: e[15] || (e[15] =
|
|
1000
|
+
onClick: e[15] || (e[15] = R(() => {
|
|
942
1001
|
}, ["stop"]))
|
|
943
1002
|
}, [
|
|
944
|
-
e[
|
|
1003
|
+
e[30] || (e[30] = s("label", { class: "input-label" }, "Private Key", -1)),
|
|
945
1004
|
s("span", null, [
|
|
946
|
-
|
|
1005
|
+
G(ge, { name: "fade" }, {
|
|
947
1006
|
default: q(() => [
|
|
948
|
-
i.showPrivateKeySuccess ? (
|
|
1007
|
+
i.showPrivateKeySuccess ? (l(), u("i", zt)) : M("", !0)
|
|
949
1008
|
]),
|
|
950
1009
|
_: 1
|
|
951
1010
|
}),
|
|
952
|
-
|
|
1011
|
+
D(s("input", {
|
|
953
1012
|
type: "password",
|
|
954
|
-
"onUpdate:modelValue": e[13] || (e[13] = (
|
|
1013
|
+
"onUpdate:modelValue": e[13] || (e[13] = (m) => i.snowflakePrivateKey = m),
|
|
955
1014
|
placeholder: "Private Key",
|
|
956
|
-
class: "bq-project-input",
|
|
957
|
-
onInput: e[14] || (e[14] = (...
|
|
1015
|
+
class: "bq-project-input sidebar-control-input",
|
|
1016
|
+
onInput: e[14] || (e[14] = (...m) => i.debouncedUpdateSnowflakePrivateKey && i.debouncedUpdateSnowflakePrivateKey(...m))
|
|
958
1017
|
}, null, 544), [
|
|
959
|
-
[
|
|
1018
|
+
[B, i.snowflakePrivateKey]
|
|
960
1019
|
])
|
|
961
1020
|
])
|
|
962
|
-
])) : o.item.type === "snowflake-account" ? (
|
|
1021
|
+
])) : o.item.type === "snowflake-account" ? (l(), u("div", {
|
|
963
1022
|
key: 9,
|
|
964
1023
|
class: "bq-project-container",
|
|
965
|
-
onClick: e[18] || (e[18] =
|
|
1024
|
+
onClick: e[18] || (e[18] = R(() => {
|
|
966
1025
|
}, ["stop"]))
|
|
967
1026
|
}, [
|
|
968
|
-
e[
|
|
1027
|
+
e[31] || (e[31] = s("label", { class: "input-label" }, "Account", -1)),
|
|
969
1028
|
s("span", null, [
|
|
970
|
-
|
|
1029
|
+
G(ge, { name: "fade" }, {
|
|
971
1030
|
default: q(() => [
|
|
972
|
-
i.showAccountSuccess ? (
|
|
1031
|
+
i.showAccountSuccess ? (l(), u("i", Xt)) : M("", !0)
|
|
973
1032
|
]),
|
|
974
1033
|
_: 1
|
|
975
1034
|
}),
|
|
976
|
-
|
|
1035
|
+
D(s("input", {
|
|
977
1036
|
type: "text",
|
|
978
|
-
"onUpdate:modelValue": e[16] || (e[16] = (
|
|
1037
|
+
"onUpdate:modelValue": e[16] || (e[16] = (m) => i.snowflakeAccount = m),
|
|
979
1038
|
placeholder: "Account",
|
|
980
|
-
class: "bq-project-input",
|
|
981
|
-
onInput: e[17] || (e[17] = (...
|
|
1039
|
+
class: "bq-project-input sidebar-control-input",
|
|
1040
|
+
onInput: e[17] || (e[17] = (...m) => i.debouncedUpdateSnowflakeAccount && i.debouncedUpdateSnowflakeAccount(...m))
|
|
982
1041
|
}, null, 544), [
|
|
983
|
-
[
|
|
1042
|
+
[B, i.snowflakeAccount]
|
|
984
1043
|
])
|
|
985
1044
|
])
|
|
986
|
-
])) : o.item.type === "snowflake-username" ? (
|
|
1045
|
+
])) : o.item.type === "snowflake-username" ? (l(), u("div", {
|
|
987
1046
|
key: 10,
|
|
988
1047
|
class: "bq-project-container",
|
|
989
|
-
onClick: e[21] || (e[21] =
|
|
1048
|
+
onClick: e[21] || (e[21] = R(() => {
|
|
990
1049
|
}, ["stop"]))
|
|
991
1050
|
}, [
|
|
992
|
-
e[
|
|
1051
|
+
e[32] || (e[32] = s("label", { class: "input-label" }, "Username", -1)),
|
|
993
1052
|
s("span", null, [
|
|
994
|
-
|
|
1053
|
+
G(ge, { name: "fade" }, {
|
|
995
1054
|
default: q(() => [
|
|
996
|
-
i.showUsernameSuccess ? (
|
|
1055
|
+
i.showUsernameSuccess ? (l(), u("i", Jt)) : M("", !0)
|
|
997
1056
|
]),
|
|
998
1057
|
_: 1
|
|
999
1058
|
}),
|
|
1000
|
-
|
|
1059
|
+
D(s("input", {
|
|
1001
1060
|
type: "text",
|
|
1002
|
-
"onUpdate:modelValue": e[19] || (e[19] = (
|
|
1061
|
+
"onUpdate:modelValue": e[19] || (e[19] = (m) => i.snowflakeUsername = m),
|
|
1003
1062
|
placeholder: "Username",
|
|
1004
|
-
class: "bq-project-input",
|
|
1005
|
-
onInput: e[20] || (e[20] = (...
|
|
1063
|
+
class: "bq-project-input sidebar-control-input",
|
|
1064
|
+
onInput: e[20] || (e[20] = (...m) => i.debouncedUpdateSnowflakeUsername && i.debouncedUpdateSnowflakeUsername(...m))
|
|
1006
1065
|
}, null, 544), [
|
|
1007
|
-
[
|
|
1066
|
+
[B, i.snowflakeUsername]
|
|
1008
1067
|
])
|
|
1009
1068
|
])
|
|
1010
|
-
])) : o.item.type === "toggle-save-credential" ? (
|
|
1069
|
+
])) : o.item.type === "toggle-save-credential" ? (l(), u("div", {
|
|
1011
1070
|
key: 11,
|
|
1012
1071
|
class: "md-token-container",
|
|
1013
|
-
onClick: e[23] || (e[23] =
|
|
1072
|
+
onClick: e[23] || (e[23] = R(() => {
|
|
1014
1073
|
}, ["stop"]))
|
|
1015
1074
|
}, [
|
|
1016
|
-
s("label",
|
|
1075
|
+
s("label", Zt, [
|
|
1017
1076
|
s("input", {
|
|
1018
1077
|
type: "checkbox",
|
|
1019
1078
|
checked: o.item.connection.saveCredential,
|
|
1020
|
-
onChange: e[22] || (e[22] = (
|
|
1021
|
-
}, null, 40,
|
|
1022
|
-
e[
|
|
1079
|
+
onChange: e[22] || (e[22] = (m) => i.toggleSaveCredential(o.item.connection))
|
|
1080
|
+
}, null, 40, $t),
|
|
1081
|
+
e[33] || (e[33] = s("span", { class: "checkbox-label" }, "Save Credentials", -1))
|
|
1023
1082
|
])
|
|
1024
|
-
])) : (
|
|
1083
|
+
])) : (l(), u("span", {
|
|
1025
1084
|
key: 12,
|
|
1026
1085
|
class: me(["title-pad-left truncate-text", { "error-indicator": o.item.type === "error" }])
|
|
1027
1086
|
}, [
|
|
1028
|
-
|
|
1029
|
-
o.item.count !== void 0 && o.item.count > 0 ? (
|
|
1030
|
-
o.item.type === "
|
|
1087
|
+
be(F(o.item.name) + " ", 1),
|
|
1088
|
+
o.item.count !== void 0 && o.item.count > 0 ? (l(), u("span", en, " (" + F(o.item.count) + ") ", 1)) : M("", !0),
|
|
1089
|
+
o.item.type === "database" ? (l(), u("span", {
|
|
1031
1090
|
key: 1,
|
|
1032
1091
|
class: "hover-icon",
|
|
1033
|
-
onClick: e[24] || (e[24] =
|
|
1034
|
-
}, [...e[
|
|
1092
|
+
onClick: e[24] || (e[24] = R((...m) => i.handleRefreshDatabaseClick && i.handleRefreshDatabaseClick(...m), ["stop"]))
|
|
1093
|
+
}, [...e[34] || (e[34] = [
|
|
1035
1094
|
s("i", { class: "mdi mdi-refresh" }, null, -1)
|
|
1036
|
-
])])) :
|
|
1037
|
-
o.item.type === "
|
|
1095
|
+
])])) : M("", !0),
|
|
1096
|
+
o.item.type === "schema" ? (l(), u("span", {
|
|
1038
1097
|
key: 2,
|
|
1039
1098
|
class: "hover-icon",
|
|
1040
|
-
onClick: e[25] || (e[25] =
|
|
1041
|
-
}, [...e[
|
|
1099
|
+
onClick: e[25] || (e[25] = R((...m) => i.handleRefreshSchemaClick && i.handleRefreshSchemaClick(...m), ["stop"]))
|
|
1100
|
+
}, [...e[35] || (e[35] = [
|
|
1042
1101
|
s("i", { class: "mdi mdi-refresh" }, null, -1)
|
|
1043
|
-
])])) :
|
|
1044
|
-
o.item.type === "schema" ? (r(), l("span", {
|
|
1045
|
-
key: 3,
|
|
1046
|
-
class: "hover-icon",
|
|
1047
|
-
onClick: e[26] || (e[26] = k((...w) => i.handleRefreshSchemaClick && i.handleRefreshSchemaClick(...w), ["stop"]))
|
|
1048
|
-
}, [...e[39] || (e[39] = [
|
|
1049
|
-
s("i", { class: "mdi mdi-refresh" }, null, -1)
|
|
1050
|
-
])])) : A("", !0)
|
|
1102
|
+
])])) : M("", !0)
|
|
1051
1103
|
], 2))
|
|
1052
1104
|
]),
|
|
1053
|
-
"extra-content": q(() =>
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
}, null, 8, ["connection", "data-testid"]),
|
|
1082
|
-
O(P, {
|
|
1083
|
-
class: "tacticle-button hover-icon",
|
|
1084
|
-
connection: o.item.connection,
|
|
1085
|
-
"is-connected": o.item.connection.connected
|
|
1086
|
-
}, null, 8, ["connection", "is-connected"]),
|
|
1087
|
-
O(g, {
|
|
1088
|
-
class: "tacticle-button hover-icon",
|
|
1089
|
-
content: "Delete Connection",
|
|
1090
|
-
position: "left"
|
|
1091
|
-
}, {
|
|
1092
|
-
default: q(() => [
|
|
1093
|
-
s("span", {
|
|
1094
|
-
class: "remove-btn",
|
|
1095
|
-
onClick: e[28] || (e[28] = k((w) => i.deleteConnection(o.item.connection), ["stop"]))
|
|
1096
|
-
}, [...e[40] || (e[40] = [
|
|
1097
|
-
s("i", { class: "mdi mdi-trash-can-outline" }, null, -1)
|
|
1098
|
-
])])
|
|
1099
|
-
]),
|
|
1100
|
-
_: 1
|
|
1101
|
-
}),
|
|
1102
|
-
O(h, {
|
|
1103
|
-
connection: o.item.connection
|
|
1104
|
-
}, null, 8, ["connection"])
|
|
1105
|
-
])) : A("", !0)
|
|
1106
|
-
]),
|
|
1105
|
+
"extra-content": q(() => {
|
|
1106
|
+
var m;
|
|
1107
|
+
return [
|
|
1108
|
+
o.item.type === "table" ? (l(), u("div", tn, [
|
|
1109
|
+
G(d, {
|
|
1110
|
+
class: "hover-icon",
|
|
1111
|
+
connection: o.item.connection,
|
|
1112
|
+
table: o.item.object,
|
|
1113
|
+
mode: "icon"
|
|
1114
|
+
}, null, 8, ["connection", "table"])
|
|
1115
|
+
])) : o.item.type === "connection" ? (l(), u("div", nn, [
|
|
1116
|
+
(m = o.item.connection) != null && m.connected ? (l(), W(f, {
|
|
1117
|
+
key: 1,
|
|
1118
|
+
connection: o.item.connection
|
|
1119
|
+
}, null, 8, ["connection"])) : (l(), W(S, {
|
|
1120
|
+
key: 0,
|
|
1121
|
+
connection: o.item.connection,
|
|
1122
|
+
onRefresh: i.handleRefreshConnectionClick
|
|
1123
|
+
}, null, 8, ["connection", "onRefresh"])),
|
|
1124
|
+
G(N, {
|
|
1125
|
+
items: i.contextMenuItems,
|
|
1126
|
+
tooltip: "Connection actions",
|
|
1127
|
+
"test-id-base": `connection-actions-${o.item.id}`,
|
|
1128
|
+
onSelect: i.handleContextMenuItemClick
|
|
1129
|
+
}, null, 8, ["items", "test-id-base", "onSelect"])
|
|
1130
|
+
])) : M("", !0)
|
|
1131
|
+
];
|
|
1132
|
+
}),
|
|
1107
1133
|
_: 1
|
|
1108
1134
|
}, 8, ["item-id", "name", "indent", "is-selected", "is-collapsible", "is-collapsed", "itemType", "onClick", "onToggle"])
|
|
1109
1135
|
]);
|
|
1110
1136
|
}
|
|
1111
|
-
const
|
|
1137
|
+
const an = /* @__PURE__ */ Z(Ft, [["render", on], ["__scopeId", "data-v-36a1a62a"]]), sn = {
|
|
1112
1138
|
name: "ConnectionList",
|
|
1113
1139
|
props: {
|
|
1114
1140
|
activeConnectionKey: {
|
|
@@ -1128,146 +1154,146 @@ const en = /* @__PURE__ */ z(qt, [["render", $t], ["__scopeId", "data-v-fce665fc
|
|
|
1128
1154
|
};
|
|
1129
1155
|
},
|
|
1130
1156
|
setup(t, { emit: e }) {
|
|
1131
|
-
const o =
|
|
1157
|
+
const o = _("connectionStore"), i = _("saveConnections"), c = _("modelStore"), y = _("editorStore"), a = _("isMobile", C(!1));
|
|
1132
1158
|
if (!o || !i || !c || !y)
|
|
1133
1159
|
throw new Error("Connection store is not provided!");
|
|
1134
|
-
const
|
|
1135
|
-
|
|
1136
|
-
},
|
|
1137
|
-
|
|
1138
|
-
},
|
|
1139
|
-
|
|
1140
|
-
},
|
|
1141
|
-
|
|
1142
|
-
},
|
|
1143
|
-
|
|
1144
|
-
},
|
|
1145
|
-
|
|
1146
|
-
},
|
|
1147
|
-
|
|
1148
|
-
},
|
|
1149
|
-
|
|
1160
|
+
const p = C({}), w = C({}), d = C({}), S = C(!1), f = C(""), N = () => {
|
|
1161
|
+
f.value = "";
|
|
1162
|
+
}, A = (r, T) => {
|
|
1163
|
+
r.type === "motherduck" && (r.setAttribute("mdToken", T), o.resetConnection(r.name));
|
|
1164
|
+
}, m = async (r, T) => {
|
|
1165
|
+
r.type === "snowflake" && (r.setPrivateKey(T), await i(), await o.resetConnection(r.name));
|
|
1166
|
+
}, Q = async (r, T) => {
|
|
1167
|
+
r.type === "snowflake" && (r.setAccount(T), await i(), o.resetConnection(r.name));
|
|
1168
|
+
}, ue = async (r, T) => {
|
|
1169
|
+
r.type === "snowflake" && (r.setUsername(T), await i(), o.resetConnection(r.name));
|
|
1170
|
+
}, le = async (r, T) => {
|
|
1171
|
+
r.type === "bigquery-oauth" && (r.setAttribute("projectId", T), await i(), o.resetConnection(r.name));
|
|
1172
|
+
}, g = async (r, T) => {
|
|
1173
|
+
r.type === "bigquery-oauth" && (r.setAttribute("browsingProjectId", T), await i(), r.databases = [], await r.getDatabases());
|
|
1174
|
+
}, P = (r) => {
|
|
1175
|
+
r.saveCredential = !r.saveCredential, o.resetConnection(r.name);
|
|
1150
1176
|
}, v = () => {
|
|
1151
1177
|
e("toggle-mobile-menu");
|
|
1152
|
-
}, b =
|
|
1153
|
-
var
|
|
1178
|
+
}, b = C({}), k = async (r, T, U) => {
|
|
1179
|
+
var K, Y, $, oe;
|
|
1154
1180
|
try {
|
|
1155
|
-
if (
|
|
1181
|
+
if (w.value[r] = !0, (K = o.connections[T]) != null && K.connected || await o.resetConnection(T), U === "connection") {
|
|
1156
1182
|
console.log("getting databases");
|
|
1157
|
-
let
|
|
1158
|
-
for (let
|
|
1159
|
-
let
|
|
1160
|
-
b.value[
|
|
1183
|
+
let O = await o.connections[T].getDatabases();
|
|
1184
|
+
for (let j of O) {
|
|
1185
|
+
let ie = `${T}${L}${j.name}`;
|
|
1186
|
+
b.value[ie] = !0;
|
|
1161
1187
|
}
|
|
1162
1188
|
}
|
|
1163
|
-
if (
|
|
1189
|
+
if (U === "database") {
|
|
1164
1190
|
console.log("getting schemas");
|
|
1165
|
-
let
|
|
1166
|
-
await o.connections[
|
|
1191
|
+
let O = r.split(L)[1];
|
|
1192
|
+
await o.connections[T].refreshDatabase(O);
|
|
1167
1193
|
}
|
|
1168
|
-
if (
|
|
1169
|
-
let
|
|
1170
|
-
await o.connections[
|
|
1194
|
+
if (U === "schema") {
|
|
1195
|
+
let O = r.split(L)[1], j = r.split(L)[2];
|
|
1196
|
+
await o.connections[T].refreshSchema(O, j);
|
|
1171
1197
|
}
|
|
1172
|
-
if (
|
|
1173
|
-
let
|
|
1174
|
-
if (
|
|
1175
|
-
let
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1198
|
+
if (U === "table") {
|
|
1199
|
+
let O = r.split(L)[1], j = r.split(L)[2], ie = r.split(L)[3], de = (oe = ($ = (Y = o.connections[T].databases) == null ? void 0 : Y.find((H) => H.name === O)) == null ? void 0 : $.schemas.find((H) => H.name === j)) == null ? void 0 : oe.tables.find((H) => H.name === ie);
|
|
1200
|
+
if (de) {
|
|
1201
|
+
let H = await o.connections[T].getColumns(
|
|
1202
|
+
O,
|
|
1203
|
+
j,
|
|
1204
|
+
ie
|
|
1179
1205
|
);
|
|
1180
|
-
|
|
1206
|
+
de.columns = H;
|
|
1181
1207
|
}
|
|
1182
1208
|
}
|
|
1183
|
-
delete
|
|
1184
|
-
} catch (
|
|
1185
|
-
console.error(
|
|
1209
|
+
delete d.value[r];
|
|
1210
|
+
} catch (O) {
|
|
1211
|
+
console.error(O), O instanceof Error ? d.value[r] = O.message : d.value[r] = "An error occurred";
|
|
1186
1212
|
}
|
|
1187
|
-
delete
|
|
1188
|
-
},
|
|
1189
|
-
console.log("emitting connection key selected:",
|
|
1190
|
-
},
|
|
1191
|
-
var
|
|
1192
|
-
if (
|
|
1193
|
-
b.value[
|
|
1194
|
-
else if (
|
|
1195
|
-
b.value[
|
|
1196
|
-
let
|
|
1197
|
-
|
|
1198
|
-
} else if (
|
|
1199
|
-
b.value[
|
|
1200
|
-
let
|
|
1201
|
-
|
|
1202
|
-
} else if (
|
|
1203
|
-
let
|
|
1204
|
-
if (
|
|
1205
|
-
let
|
|
1206
|
-
if (
|
|
1207
|
-
await
|
|
1213
|
+
delete w.value[r];
|
|
1214
|
+
}, ne = async (r, T, U) => {
|
|
1215
|
+
console.log("emitting connection key selected:", r), e("connection-key-selected", r);
|
|
1216
|
+
}, X = async (r, T, U) => {
|
|
1217
|
+
var K, Y, $, oe, O, j, ie, de, H, Te, ve, Ee, Ie;
|
|
1218
|
+
if (U === "connection" && (b.value[r] === void 0 || b.value[r] === !0))
|
|
1219
|
+
b.value[r] = !1, (((K = o.connections[T].databases) == null ? void 0 : K.length) === 0 || ((Y = o.connections[T].databases) == null ? void 0 : Y.length) === void 0) && await k(r, T, U);
|
|
1220
|
+
else if (U === "database" && b.value[r] !== !1) {
|
|
1221
|
+
b.value[r] = !1;
|
|
1222
|
+
let he = r.split(L)[1], ae = ($ = o.connections[T].databases) == null ? void 0 : $.find((ee) => ee.name === he);
|
|
1223
|
+
ae && ((oe = ae.schemas) == null ? void 0 : oe.length) === 0 && await k(r, T, U);
|
|
1224
|
+
} else if (U === "schema" && b.value[r] !== !1) {
|
|
1225
|
+
b.value[r] = !1;
|
|
1226
|
+
let he = r.split(L)[1], ae = r.split(L)[2], ee = (ie = (j = (O = o.connections[T].databases) == null ? void 0 : O.find((se) => se.name === he)) == null ? void 0 : j.schemas) == null ? void 0 : ie.find((se) => se.name === ae);
|
|
1227
|
+
ee && ((de = ee.tables) == null ? void 0 : de.length) === 0 && await k(r, T, U);
|
|
1228
|
+
} else if (U === "table" && b.value[r] !== !1) {
|
|
1229
|
+
let he = r.split(L)[1], ae = r.split(L)[3], ee = r.split(L)[2];
|
|
1230
|
+
if (ee) {
|
|
1231
|
+
let se = await ((Ie = (Ee = (ve = (Te = (H = o.connections[T].databases) == null ? void 0 : H.find((E) => E.name === he)) == null ? void 0 : Te.schemas) == null ? void 0 : ve.find((E) => E.name === ee)) == null ? void 0 : Ee.tables) == null ? void 0 : Ie.find((E) => E.name === ae));
|
|
1232
|
+
if (se && se.columns.length === 0) {
|
|
1233
|
+
await k(r, T, U);
|
|
1208
1234
|
return;
|
|
1209
1235
|
}
|
|
1210
1236
|
}
|
|
1211
|
-
} else b.value[
|
|
1237
|
+
} else b.value[r] === void 0 ? b.value[r] = !1 : b.value[r] = !b.value[r];
|
|
1212
1238
|
};
|
|
1213
|
-
Object.values(o.connections).forEach((
|
|
1214
|
-
var
|
|
1215
|
-
let
|
|
1216
|
-
b.value[
|
|
1217
|
-
let
|
|
1218
|
-
b.value[
|
|
1219
|
-
let
|
|
1220
|
-
b.value[
|
|
1221
|
-
for (let
|
|
1222
|
-
let
|
|
1223
|
-
b.value[
|
|
1239
|
+
Object.values(o.connections).forEach((r) => {
|
|
1240
|
+
var U;
|
|
1241
|
+
let T = `${r.name}`;
|
|
1242
|
+
b.value[T] = !0, (U = r.databases) == null || U.forEach((K) => {
|
|
1243
|
+
let Y = `${T}${L}${K.name}`;
|
|
1244
|
+
b.value[Y] = !0, K.schemas.forEach(($) => {
|
|
1245
|
+
let oe = `${Y}${L}${$.name}`;
|
|
1246
|
+
b.value[oe] = !0;
|
|
1247
|
+
for (let O of $.tables) {
|
|
1248
|
+
let j = `${Y}${L}${O.schema}${L}${O.name}`;
|
|
1249
|
+
b.value[j] = !0;
|
|
1224
1250
|
}
|
|
1225
1251
|
});
|
|
1226
1252
|
});
|
|
1227
1253
|
});
|
|
1228
|
-
const
|
|
1254
|
+
const V = z(() => $e(
|
|
1229
1255
|
Object.values(o.connections),
|
|
1230
1256
|
b.value,
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
)),
|
|
1257
|
+
w.value,
|
|
1258
|
+
d.value
|
|
1259
|
+
)), J = z(() => et(V.value, f.value));
|
|
1234
1260
|
return {
|
|
1235
1261
|
connectionStore: o,
|
|
1236
1262
|
editorStore: y,
|
|
1237
|
-
contentList:
|
|
1238
|
-
filteredContentList:
|
|
1239
|
-
toggleCollapse:
|
|
1240
|
-
handleItemClick:
|
|
1263
|
+
contentList: V,
|
|
1264
|
+
filteredContentList: J,
|
|
1265
|
+
toggleCollapse: X,
|
|
1266
|
+
handleItemClick: ne,
|
|
1241
1267
|
toggleMobileMenu: v,
|
|
1242
1268
|
collapsed: b,
|
|
1243
1269
|
saveConnections: i,
|
|
1244
1270
|
modelStore: c,
|
|
1245
|
-
connectionModelVisible:
|
|
1246
|
-
updateMotherDuckToken:
|
|
1247
|
-
updateSnowflakePrivateKey:
|
|
1248
|
-
updateSnowflakeAccount:
|
|
1249
|
-
updateSnowflakeUsername:
|
|
1250
|
-
toggleSaveCredential:
|
|
1251
|
-
updateBigqueryProject:
|
|
1252
|
-
updateBigqueryBrowsingProject:
|
|
1253
|
-
refreshId:
|
|
1254
|
-
rightSplit: (
|
|
1255
|
-
const
|
|
1256
|
-
return
|
|
1271
|
+
connectionModelVisible: p,
|
|
1272
|
+
updateMotherDuckToken: A,
|
|
1273
|
+
updateSnowflakePrivateKey: m,
|
|
1274
|
+
updateSnowflakeAccount: Q,
|
|
1275
|
+
updateSnowflakeUsername: ue,
|
|
1276
|
+
toggleSaveCredential: P,
|
|
1277
|
+
updateBigqueryProject: le,
|
|
1278
|
+
updateBigqueryBrowsingProject: g,
|
|
1279
|
+
refreshId: k,
|
|
1280
|
+
rightSplit: (r) => {
|
|
1281
|
+
const T = r.lastIndexOf(L);
|
|
1282
|
+
return T !== -1 ? r.substring(0, T) : r;
|
|
1257
1283
|
},
|
|
1258
|
-
creatorVisible:
|
|
1284
|
+
creatorVisible: S,
|
|
1259
1285
|
isMobile: a,
|
|
1260
|
-
searchTerm:
|
|
1261
|
-
clearSearch:
|
|
1286
|
+
searchTerm: f,
|
|
1287
|
+
clearSearch: N
|
|
1262
1288
|
};
|
|
1263
1289
|
},
|
|
1264
1290
|
components: {
|
|
1265
|
-
SidebarList:
|
|
1266
|
-
ConnectionCreatorInline:
|
|
1267
|
-
LoadingButton:
|
|
1268
|
-
StatusIcon:
|
|
1269
|
-
Tooltip:
|
|
1270
|
-
ConnectionListItem:
|
|
1291
|
+
SidebarList: qe,
|
|
1292
|
+
ConnectionCreatorInline: mt,
|
|
1293
|
+
LoadingButton: Re,
|
|
1294
|
+
StatusIcon: We,
|
|
1295
|
+
Tooltip: Ae,
|
|
1296
|
+
ConnectionListItem: an
|
|
1271
1297
|
},
|
|
1272
1298
|
methods: {
|
|
1273
1299
|
resetConnection(t) {
|
|
@@ -1300,51 +1326,52 @@ const en = /* @__PURE__ */ z(qt, [["render", $t], ["__scopeId", "data-v-fce665fc
|
|
|
1300
1326
|
return Object.keys(this.modelStore.models);
|
|
1301
1327
|
}
|
|
1302
1328
|
}
|
|
1303
|
-
},
|
|
1304
|
-
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
actions: q(() => [
|
|
1311
|
-
s("div", nn, [
|
|
1329
|
+
}, rn = { class: "connections-header" }, ln = ["data-testid"], cn = { class: "search-container" }, un = ["data-testid"], dn = ["data-testid"], pn = { class: "confirmation-dialog" }, mn = { class: "dialog-actions" };
|
|
1330
|
+
function hn(t, e, o, i, c, y) {
|
|
1331
|
+
const a = x("connection-creator-inline"), p = x("connection-list-item"), w = x("sidebar-list");
|
|
1332
|
+
return l(), W(w, { title: "Connections" }, {
|
|
1333
|
+
header: q(() => [
|
|
1334
|
+
s("div", rn, [
|
|
1335
|
+
e[8] || (e[8] = s("h3", { class: "font-sans sidebar-header" }, "Connections", -1)),
|
|
1312
1336
|
s("button", {
|
|
1313
|
-
|
|
1337
|
+
class: "sidebar-control-button sidebar-header-action connections-new-btn",
|
|
1338
|
+
onClick: e[0] || (e[0] = (d) => i.creatorVisible = !i.creatorVisible),
|
|
1314
1339
|
"data-testid": o.testTag ? `connection-creator-add-${o.testTag}` : "connection-creator-add"
|
|
1315
1340
|
}, [
|
|
1316
|
-
|
|
1317
|
-
|
|
1318
|
-
], 8,
|
|
1319
|
-
])
|
|
1320
|
-
|
|
1341
|
+
e[7] || (e[7] = s("i", { class: "mdi mdi-plus" }, null, -1)),
|
|
1342
|
+
be(" " + F(i.creatorVisible ? "Close" : "New"), 1)
|
|
1343
|
+
], 8, ln)
|
|
1344
|
+
])
|
|
1345
|
+
]),
|
|
1346
|
+
actions: q(() => [
|
|
1347
|
+
G(a, {
|
|
1321
1348
|
visible: i.creatorVisible,
|
|
1322
|
-
onClose: e[1] || (e[1] = (
|
|
1349
|
+
onClose: e[1] || (e[1] = (d) => i.creatorVisible = !i.creatorVisible)
|
|
1323
1350
|
}, null, 8, ["visible"]),
|
|
1324
|
-
s("div",
|
|
1325
|
-
|
|
1351
|
+
s("div", cn, [
|
|
1352
|
+
D(s("input", {
|
|
1326
1353
|
type: "text",
|
|
1327
|
-
"onUpdate:modelValue": e[2] || (e[2] = (
|
|
1354
|
+
"onUpdate:modelValue": e[2] || (e[2] = (d) => i.searchTerm = d),
|
|
1328
1355
|
placeholder: "Search objects...",
|
|
1329
1356
|
class: "search-input",
|
|
1330
1357
|
"data-testid": o.testTag ? `connection-search-${o.testTag}` : "connection-search"
|
|
1331
|
-
}, null, 8,
|
|
1332
|
-
[
|
|
1358
|
+
}, null, 8, un), [
|
|
1359
|
+
[B, i.searchTerm]
|
|
1333
1360
|
]),
|
|
1334
|
-
i.searchTerm ? (
|
|
1361
|
+
i.searchTerm ? (l(), u("button", {
|
|
1335
1362
|
key: 0,
|
|
1336
|
-
onClick: e[3] || (e[3] = (...
|
|
1337
|
-
class: "clear-search-btn",
|
|
1363
|
+
onClick: e[3] || (e[3] = (...d) => i.clearSearch && i.clearSearch(...d)),
|
|
1364
|
+
class: "clear-search-btn sidebar-icon-button",
|
|
1338
1365
|
"data-testid": o.testTag ? `connection-search-clear-${o.testTag}` : "connection-search-clear"
|
|
1339
|
-
}, " ✕ ", 8,
|
|
1366
|
+
}, " ✕ ", 8, dn)) : M("", !0)
|
|
1340
1367
|
])
|
|
1341
1368
|
]),
|
|
1342
1369
|
default: q(() => [
|
|
1343
|
-
(
|
|
1344
|
-
key:
|
|
1345
|
-
item:
|
|
1346
|
-
"is-collapsed": i.collapsed[
|
|
1347
|
-
isSelected:
|
|
1370
|
+
(l(!0), u(pe, null, we(i.filteredContentList, (d) => (l(), W(p, {
|
|
1371
|
+
key: d.id,
|
|
1372
|
+
item: d,
|
|
1373
|
+
"is-collapsed": i.collapsed[d.id],
|
|
1374
|
+
isSelected: d.id === o.activeConnectionKey,
|
|
1348
1375
|
isMobile: i.isMobile,
|
|
1349
1376
|
testTag: o.testTag,
|
|
1350
1377
|
onToggle: i.toggleCollapse,
|
|
@@ -1360,56 +1387,56 @@ function dn(t, e, o, i, c, y) {
|
|
|
1360
1387
|
onToggleMobileMenu: i.toggleMobileMenu,
|
|
1361
1388
|
"delete-connection": y.deleteConnection
|
|
1362
1389
|
}, null, 8, ["item", "is-collapsed", "isSelected", "isMobile", "testTag", "onToggle", "onClick", "onRefresh", "onUpdateMotherduckToken", "onUpdateBigqueryProject", "onUpdateBigqueryBrowsingProject", "onUpdateSnowflakePrivateKey", "onUpdateSnowflakeAccount", "onUpdateSnowflakeUsername", "onToggleSaveCredential", "onToggleMobileMenu", "delete-connection"]))), 128)),
|
|
1363
|
-
c.showDeleteConfirmationState ? (
|
|
1390
|
+
c.showDeleteConfirmationState ? (l(), u("div", {
|
|
1364
1391
|
key: 0,
|
|
1365
1392
|
class: "confirmation-overlay",
|
|
1366
|
-
onClick: e[6] || (e[6] =
|
|
1393
|
+
onClick: e[6] || (e[6] = R((...d) => y.cancelDelete && y.cancelDelete(...d), ["self"]))
|
|
1367
1394
|
}, [
|
|
1368
|
-
s("div",
|
|
1369
|
-
e[
|
|
1370
|
-
e[
|
|
1371
|
-
s("div",
|
|
1395
|
+
s("div", pn, [
|
|
1396
|
+
e[9] || (e[9] = s("h3", null, "Confirm Deletion", -1)),
|
|
1397
|
+
e[10] || (e[10] = s("p", null, " Are you sure you want to delete this connection? All associated editors will be deleted. ", -1)),
|
|
1398
|
+
s("div", mn, [
|
|
1372
1399
|
s("button", {
|
|
1373
1400
|
class: "cancel-btn",
|
|
1374
|
-
onClick: e[4] || (e[4] = (...
|
|
1401
|
+
onClick: e[4] || (e[4] = (...d) => y.cancelDelete && y.cancelDelete(...d))
|
|
1375
1402
|
}, "Cancel"),
|
|
1376
1403
|
s("button", {
|
|
1377
1404
|
class: "confirm-btn",
|
|
1378
|
-
onClick: e[5] || (e[5] = (...
|
|
1405
|
+
onClick: e[5] || (e[5] = (...d) => y.confirmDelete && y.confirmDelete(...d))
|
|
1379
1406
|
}, "Delete")
|
|
1380
1407
|
])
|
|
1381
1408
|
])
|
|
1382
|
-
])) :
|
|
1409
|
+
])) : M("", !0)
|
|
1383
1410
|
]),
|
|
1384
1411
|
_: 1
|
|
1385
1412
|
});
|
|
1386
1413
|
}
|
|
1387
|
-
const
|
|
1414
|
+
const Eo = /* @__PURE__ */ Z(sn, [["render", hn], ["__scopeId", "data-v-d32fa84c"]]);
|
|
1388
1415
|
class n {
|
|
1389
1416
|
constructor(e, o, i = null, c = null) {
|
|
1390
|
-
|
|
1391
|
-
|
|
1392
|
-
|
|
1393
|
-
|
|
1417
|
+
te(this, "title");
|
|
1418
|
+
te(this, "content");
|
|
1419
|
+
te(this, "type");
|
|
1420
|
+
te(this, "data");
|
|
1394
1421
|
this.title = e, this.content = o, this.type = i, this.data = c || {};
|
|
1395
1422
|
}
|
|
1396
1423
|
}
|
|
1397
|
-
class
|
|
1424
|
+
class I {
|
|
1398
1425
|
constructor(e, o, i = void 0) {
|
|
1399
|
-
|
|
1400
|
-
|
|
1401
|
-
|
|
1426
|
+
te(this, "title");
|
|
1427
|
+
te(this, "paragraphs");
|
|
1428
|
+
te(this, "displayName");
|
|
1402
1429
|
this.title = e, this.paragraphs = o, this.displayName = i;
|
|
1403
1430
|
}
|
|
1404
1431
|
}
|
|
1405
1432
|
class ke {
|
|
1406
1433
|
constructor(e, o) {
|
|
1407
|
-
|
|
1408
|
-
|
|
1434
|
+
te(this, "title");
|
|
1435
|
+
te(this, "articles");
|
|
1409
1436
|
this.title = e, this.articles = o;
|
|
1410
1437
|
}
|
|
1411
1438
|
}
|
|
1412
|
-
const
|
|
1439
|
+
const yn = new I(
|
|
1413
1440
|
"Dashboards",
|
|
1414
1441
|
[
|
|
1415
1442
|
new n(
|
|
@@ -1468,7 +1495,7 @@ const pn = new L(
|
|
|
1468
1495
|
)
|
|
1469
1496
|
],
|
|
1470
1497
|
"Dashboard Tutorial"
|
|
1471
|
-
),
|
|
1498
|
+
), gn = new I(
|
|
1472
1499
|
"Model Tutorial",
|
|
1473
1500
|
[
|
|
1474
1501
|
new n(
|
|
@@ -1522,8 +1549,8 @@ order by
|
|
|
1522
1549
|
"Make sure the state output is named state and you've ordered properly."
|
|
1523
1550
|
],
|
|
1524
1551
|
validationFn: (t) => {
|
|
1525
|
-
var e, o, i, c, y, a,
|
|
1526
|
-
return ((e = t.data) == null ? void 0 : e.length) === 3 && ((i = (o = t.data) == null ? void 0 : o[0]) == null ? void 0 : i.state) === "CA" && ((y = (c = t.data) == null ? void 0 : c[1]) == null ? void 0 : y.state) === "NY" && ((
|
|
1552
|
+
var e, o, i, c, y, a, p;
|
|
1553
|
+
return ((e = t.data) == null ? void 0 : e.length) === 3 && ((i = (o = t.data) == null ? void 0 : o[0]) == null ? void 0 : i.state) === "CA" && ((y = (c = t.data) == null ? void 0 : c[1]) == null ? void 0 : y.state) === "NY" && ((p = (a = t.data) == null ? void 0 : a[2]) == null ? void 0 : p.state) === "TX";
|
|
1527
1554
|
}
|
|
1528
1555
|
},
|
|
1529
1556
|
{
|
|
@@ -1681,7 +1708,7 @@ select
|
|
|
1681
1708
|
)
|
|
1682
1709
|
],
|
|
1683
1710
|
"Model Tutorial"
|
|
1684
|
-
),
|
|
1711
|
+
), fn = new I(
|
|
1685
1712
|
"Welcome",
|
|
1686
1713
|
[
|
|
1687
1714
|
new n(
|
|
@@ -1703,7 +1730,7 @@ select
|
|
|
1703
1730
|
),
|
|
1704
1731
|
new n(
|
|
1705
1732
|
"Purpose",
|
|
1706
|
-
`Trilogy Studio has a built in model "store", containing a set of public models hosted on github. The demo model is one of those options. Let's get started! Search below for the demo-model, and click the import button to add it. You want to import it to a duckdb connection. Select
|
|
1733
|
+
`Trilogy Studio has a built in model "store", containing a set of public models hosted on github. The demo model is one of those options. Let's get started! Search below for the demo-model, and click the import button to add it. You want to import it to a duckdb connection. Select "New DuckDB" and keep the default connection name.`
|
|
1707
1734
|
),
|
|
1708
1735
|
new n("Purpose", "<PLACEHOLDER>", "community-models"),
|
|
1709
1736
|
new n("ModelList", "", "model-validator"),
|
|
@@ -1730,7 +1757,7 @@ select
|
|
|
1730
1757
|
),
|
|
1731
1758
|
new n(
|
|
1732
1759
|
"Purpose",
|
|
1733
|
-
'Now that you have a connection and model set up, you can start querying in an editor. Editors are grouped by their storage, then by connection. `Local` represents local storage in your browser. [Other storage, like Github, will be available in the future] Your imported model will have populated some default editors, but
|
|
1760
|
+
'Now that you have a connection and model set up, you can start querying in an editor. Editors are grouped by their storage, then by connection. `Local` represents local storage in your browser. [Other storage, like Github, will be available in the future] Your imported model will have populated some default editors, but let\'s start with a new one. In the sidebar, click the "..." menu next to the demo-model-connection to expand its options, then create a new Trilogy editor named "my-first-editor".'
|
|
1734
1761
|
),
|
|
1735
1762
|
new n("Purpose", "", "editors"),
|
|
1736
1763
|
new n("Purpose", "", "editor-validator"),
|
|
@@ -1802,7 +1829,7 @@ order by
|
|
|
1802
1829
|
)
|
|
1803
1830
|
],
|
|
1804
1831
|
"Welcome and Query Tutorial"
|
|
1805
|
-
),
|
|
1832
|
+
), wn = new I("LLM Tutorial", [
|
|
1806
1833
|
new n(
|
|
1807
1834
|
"Connections",
|
|
1808
1835
|
"LLMs can optionally be used to enhance the studio experience. The LLM screen is accessible on the left-hand nav and provides some basic validation that your LLM will work. LLMs is not required, but we aim to make the best use of them when available."
|
|
@@ -1902,7 +1929,7 @@ auto state.population <- random(state)*10000;
|
|
|
1902
1929
|
"LLMs operate on the imported concept context. Make sure you have a datasource selected on a dashboard, or add imports to an editor before typing your comment. Ctrl-shift-enter is the default LLM activation shortcut; typically you will highlight text and then run this.",
|
|
1903
1930
|
"tip"
|
|
1904
1931
|
)
|
|
1905
|
-
]),
|
|
1932
|
+
]), bn = new I("Functions", [
|
|
1906
1933
|
new n(
|
|
1907
1934
|
"Trilogy Built-in Functions",
|
|
1908
1935
|
"Trilogy provides a comprehensive set of built-in functions that closely map to standard SQL functions. These functions enable data transformation, aggregation, and manipulation within your queries. They are categorized into aggregate, date/time, string, numeric, collection, and utility functions."
|
|
@@ -2789,7 +2816,7 @@ auto state.population <- random(state)*10000;
|
|
|
2789
2816
|
}
|
|
2790
2817
|
}
|
|
2791
2818
|
)
|
|
2792
|
-
]),
|
|
2819
|
+
]), Tn = new I("Window Functions", [
|
|
2793
2820
|
new n(
|
|
2794
2821
|
"Trilogy Built-in Functions",
|
|
2795
2822
|
"Window functions are a set of built-in functions in the Trilogy query language that allow you to perform calculations across a set of rows related to the current row. These functions are essential for data analysis, reporting, and complex aggregations."
|
|
@@ -2875,7 +2902,7 @@ auto state.population <- random(state)*10000;
|
|
|
2875
2902
|
}
|
|
2876
2903
|
}
|
|
2877
2904
|
)
|
|
2878
|
-
]),
|
|
2905
|
+
]), vn = new I(
|
|
2879
2906
|
"Modeling",
|
|
2880
2907
|
// Article Title
|
|
2881
2908
|
[
|
|
@@ -3105,8 +3132,8 @@ select pi * 2 as circumference_ratio;`,
|
|
|
3105
3132
|
)
|
|
3106
3133
|
],
|
|
3107
3134
|
"Modeling"
|
|
3108
|
-
),
|
|
3109
|
-
new
|
|
3135
|
+
), En = new ke("Trilogy Reference", [
|
|
3136
|
+
new I("Overview/Goals", [
|
|
3110
3137
|
new n(
|
|
3111
3138
|
"Introduction",
|
|
3112
3139
|
"Trilogy is a new, SQL-derived language that compiles to SQL. Trilogy Studio provides you with both native Trilogy and SQL editors, allowing you to query your data in a way that is more expressive and easier to maintain than traditional SQL."
|
|
@@ -3191,7 +3218,7 @@ ORDER BY
|
|
|
3191
3218
|
"Explore the rest of the reference documentation for more details on how Trilogy works and explore these concepts in more detail."
|
|
3192
3219
|
)
|
|
3193
3220
|
]),
|
|
3194
|
-
new
|
|
3221
|
+
new I("Code", [
|
|
3195
3222
|
new n(
|
|
3196
3223
|
"How Trilogy Works",
|
|
3197
3224
|
`Studio and dependent code is open-source under the MIT license. The code is available on GitHub at the following locations:
|
|
@@ -3204,7 +3231,7 @@ ORDER BY
|
|
|
3204
3231
|
`
|
|
3205
3232
|
)
|
|
3206
3233
|
]),
|
|
3207
|
-
new
|
|
3234
|
+
new I("Querying Data", [
|
|
3208
3235
|
new n(
|
|
3209
3236
|
"SELECT Without FROM, JOIN, or GROUP BY",
|
|
3210
3237
|
"In Trilogy, you write queries without explicitly specifying tables, joins, or grouping."
|
|
@@ -3249,7 +3276,7 @@ LIMIT 10;`,
|
|
|
3249
3276
|
"All concepts and outputs must be explicitly named, using AS to bind any transformation. The having clause and order clause can only reference fields in the select list, while the where clause can reference any field in the model."
|
|
3250
3277
|
)
|
|
3251
3278
|
]),
|
|
3252
|
-
new
|
|
3279
|
+
new I("Syntax", [
|
|
3253
3280
|
new n(
|
|
3254
3281
|
"Basic SELECT Statement",
|
|
3255
3282
|
"A Trilogy statement consists of one or more lines ending in a semicolon. Trilogy follows SQL syntax closely but removes redundant features like explicit joins and the FROM clause. A basic select could look like this:"
|
|
@@ -3338,7 +3365,7 @@ complete_for_clause?
|
|
|
3338
3365
|
"code"
|
|
3339
3366
|
)
|
|
3340
3367
|
]),
|
|
3341
|
-
new
|
|
3368
|
+
new I("Concepts", [
|
|
3342
3369
|
new n(
|
|
3343
3370
|
"What Are Concepts?",
|
|
3344
3371
|
"Concepts are core semantic building blocks in Trilogy. They represent keys, properties, or metrics: Keys (unique identifiers), Properties (additional values), and Metrics (aggregatable values)."
|
|
@@ -3392,7 +3419,7 @@ metric product_count <-count(product.id); # the count of products`,
|
|
|
3392
3419
|
"A metric can be created by an aggregation with a defined grain, ex: `metric product_count <-count(product_id) by store;`, in which case it behaves similar to a property. However, where conditions for a select will still be pushed inside these aggregates."
|
|
3393
3420
|
)
|
|
3394
3421
|
]),
|
|
3395
|
-
new
|
|
3422
|
+
new I("Datasources and Joins", [
|
|
3396
3423
|
new n(
|
|
3397
3424
|
"Defining Datasources",
|
|
3398
3425
|
"A table in a warehouse is defined as a dataset with each column bound to a concept. When datasources share a common key, trilogy can join between them. Not all joins are equal; some are 1-1, 1-many, or many-1. Trilogy handles these by looking at the grain of each datasource involved. If a join is on a key other than the grain of the sources, the output may need to be grouped up to avoid duplication. "
|
|
@@ -3419,12 +3446,39 @@ grain (customers.id)
|
|
|
3419
3446
|
address warehouse.customers;`,
|
|
3420
3447
|
"code"
|
|
3421
3448
|
),
|
|
3449
|
+
new n(
|
|
3450
|
+
"Partial Data",
|
|
3451
|
+
"Sometimes partial data is all we need. For example, imagine a recent and archive table. When you query the last 7 days, and the last 30 are in recent - we can prune the archive."
|
|
3452
|
+
),
|
|
3453
|
+
new n(
|
|
3454
|
+
"Example",
|
|
3455
|
+
`partial datasource recent_sales (
|
|
3456
|
+
order_id: orders.id,
|
|
3457
|
+
cu_id: customers.id,
|
|
3458
|
+
revenue: orders.revenue,
|
|
3459
|
+
date: orders.date
|
|
3460
|
+
)
|
|
3461
|
+
grain (orders.id)
|
|
3462
|
+
complete where orders.date > current_date - 30
|
|
3463
|
+
address warehouse.sales;
|
|
3464
|
+
|
|
3465
|
+
partial datasource archive_sales (
|
|
3466
|
+
order_id: orders.id,
|
|
3467
|
+
cu_id: customers.id,
|
|
3468
|
+
revenue: orders.revenue,
|
|
3469
|
+
date: orders.date
|
|
3470
|
+
)
|
|
3471
|
+
grain (orders.id)
|
|
3472
|
+
complete where orders.date <= current_date - 30
|
|
3473
|
+
address warehouse.sales_archive;`,
|
|
3474
|
+
"code"
|
|
3475
|
+
),
|
|
3422
3476
|
new n(
|
|
3423
3477
|
"Partial Keys",
|
|
3424
|
-
|
|
3478
|
+
"A query of the form `where orders.date > current_date -7 can safely resolve to just our recent. This lets us efficiently prune and select relevant datasources."
|
|
3425
3479
|
)
|
|
3426
3480
|
]),
|
|
3427
|
-
new
|
|
3481
|
+
new I("Grains and Aggregation", [
|
|
3428
3482
|
new n(
|
|
3429
3483
|
"What Is a Grain?",
|
|
3430
3484
|
"A grain represents the unique combination of keys. Tables and aggregations both have grains, which determine the minimum keys required to uniquely identify a row of data. For example, finding the total sales by customer id, anme, and address would be an aggregation to the grain of a customer id, no matter how many other customer properties are included. Properties of a key are implicitly dropped from any grain that includes that key, though a grain without the key associated with a property will include that property in the grain."
|
|
@@ -3442,9 +3496,9 @@ address warehouse.customers;`,
|
|
|
3442
3496
|
"This query would aggregate revenue to the grain of order_date, as order year is a property of order date."
|
|
3443
3497
|
)
|
|
3444
3498
|
]),
|
|
3445
|
-
|
|
3446
|
-
|
|
3447
|
-
new
|
|
3499
|
+
bn,
|
|
3500
|
+
Tn,
|
|
3501
|
+
new I("Custom Functions", [
|
|
3448
3502
|
new n(
|
|
3449
3503
|
"Defining Functions",
|
|
3450
3504
|
"Custom functions can be used to extend the language with reusable code macros. Functions are defined using the def keyword and have a list of arguments and are mapped to an expression. Any argument alias will be locally scoped within the function, but external concepts can be referenced as well."
|
|
@@ -3482,9 +3536,9 @@ SELECT
|
|
|
3482
3536
|
"code"
|
|
3483
3537
|
)
|
|
3484
3538
|
]),
|
|
3485
|
-
|
|
3486
|
-
]),
|
|
3487
|
-
new
|
|
3539
|
+
vn
|
|
3540
|
+
]), Sn = new ke("Terms of Service", [
|
|
3541
|
+
new I("Terms of Service", [
|
|
3488
3542
|
new n("Last Updated", "February 22, 2025"),
|
|
3489
3543
|
new n(
|
|
3490
3544
|
"Service Description",
|
|
@@ -3558,13 +3612,13 @@ SELECT
|
|
|
3558
3612
|
"conclusion"
|
|
3559
3613
|
)
|
|
3560
3614
|
])
|
|
3561
|
-
]),
|
|
3615
|
+
]), So = [
|
|
3562
3616
|
new ke("Studio", [
|
|
3563
|
-
|
|
3564
|
-
pn,
|
|
3565
|
-
mn,
|
|
3617
|
+
fn,
|
|
3566
3618
|
yn,
|
|
3567
|
-
|
|
3619
|
+
gn,
|
|
3620
|
+
wn,
|
|
3621
|
+
new I("Functionality", [
|
|
3568
3622
|
new n(
|
|
3569
3623
|
"Tip",
|
|
3570
3624
|
"Trilogy Studio is a statically hosted website that uses a mix of precompiled scripts and dynamic imports for some connections to reduce bundle size."
|
|
@@ -3579,7 +3633,7 @@ SELECT
|
|
|
3579
3633
|
"tip"
|
|
3580
3634
|
)
|
|
3581
3635
|
]),
|
|
3582
|
-
new
|
|
3636
|
+
new I("Navigation", [
|
|
3583
3637
|
new n(
|
|
3584
3638
|
"Navigation",
|
|
3585
3639
|
"On desktop, Trilogy Studio uses a left-hand navigation bar, a sidebar with context, and a main pane (which may be split) to present information. The sidebar is further split into sections; the first icons change the sidebar for the query editor, while the next section configures entirely new main screen experiences. Configuration/profile are accessible at the bottom. On mobile, Trilogy will instead use a top menu to access a navigation screen, and the main display will show only one particular field at a time."
|
|
@@ -3590,7 +3644,7 @@ SELECT
|
|
|
3590
3644
|
"tip"
|
|
3591
3645
|
)
|
|
3592
3646
|
]),
|
|
3593
|
-
new
|
|
3647
|
+
new I("Querying", [
|
|
3594
3648
|
new n(
|
|
3595
3649
|
"Querying",
|
|
3596
3650
|
"A core goal of Trilogy Studio is to enable seamless running of Trilogy against backends. Raw SQL is fully supported as well to help with debugging, diagnostics, and other development tasks."
|
|
@@ -3604,7 +3658,7 @@ SELECT
|
|
|
3604
3658
|
"When running Trilogy queries, your command will first go to a backend server to be parsed/type-checked, then the output SQL will be returned to the editor to be run as a normal SQL query. SQL editors will submit directly to the configured connection without the first parsing pass."
|
|
3605
3659
|
)
|
|
3606
3660
|
]),
|
|
3607
|
-
new
|
|
3661
|
+
new I("Connections", [
|
|
3608
3662
|
new n(
|
|
3609
3663
|
"Connections",
|
|
3610
3664
|
"Editors must be associated with a connection. A connection represents a particular underlying backend database resource. Many IDEs can share one connection, but only a single query can be executed on a connection at a single point in time. Connections are also associated with a model, which enables configuration of additional editors as semantic sources."
|
|
@@ -3615,34 +3669,34 @@ SELECT
|
|
|
3615
3669
|
),
|
|
3616
3670
|
new n("ConnectionList", "", "connections")
|
|
3617
3671
|
]),
|
|
3618
|
-
new
|
|
3672
|
+
new I("DuckDB", [
|
|
3619
3673
|
new n(
|
|
3620
3674
|
"DuckDB",
|
|
3621
3675
|
"DuckDB is always available as an in-browser database using the DuckDB WASM integration. No authentication is required. DuckDB also natively supports csv uploads through a widget available on the connection view. Most community duckdb models will reference publically available CSV or parquet files."
|
|
3622
3676
|
)
|
|
3623
3677
|
]),
|
|
3624
|
-
new
|
|
3678
|
+
new I("Bigquery", [
|
|
3625
3679
|
new n(
|
|
3626
3680
|
"Connections",
|
|
3627
3681
|
'Bigquery is supported through Oauth authentication as your identity. If you wish to use a service key file, please upvote this github issue: <a href="https://github.com/trilogy-data/trilogy-studio-core/issues/33" target="_blank">BQ Service Account Support</a>.'
|
|
3628
3682
|
)
|
|
3629
3683
|
]),
|
|
3630
|
-
new
|
|
3684
|
+
new I("Snowflake", [
|
|
3631
3685
|
new n(
|
|
3632
3686
|
"Connections",
|
|
3633
3687
|
'Snowflake is supported with private key authentication. Read more at this link: <a href="https://docs.snowflake.com/en/user-guide/key-pair-auth" target="_blank">Snowflake Private Key Pairs</a>. You will need to provide the private key to connect after configuring your user with the public key portion. The rest of the authentication header can be derived from this. Remember to use caution of saving this key.'
|
|
3634
3688
|
)
|
|
3635
3689
|
]),
|
|
3636
|
-
new
|
|
3690
|
+
new I("Scheduling", [
|
|
3637
3691
|
new n(
|
|
3638
3692
|
"Scheduling",
|
|
3639
3693
|
'Scheduling dashboards/scripts is a future feature. Please upvote this github issue: <a href="https://github.com/trilogy-data/trilogy-studio-core/issues/75" target="_blank">Scheduling</a>.'
|
|
3640
3694
|
)
|
|
3641
3695
|
])
|
|
3642
3696
|
]),
|
|
3643
|
-
|
|
3697
|
+
En,
|
|
3644
3698
|
new ke("Privacy And Data", [
|
|
3645
|
-
new
|
|
3699
|
+
new I("Privacy Policy", [
|
|
3646
3700
|
new n("Last Updated", "February 22, 2025"),
|
|
3647
3701
|
new n(
|
|
3648
3702
|
"Introduction",
|
|
@@ -3709,7 +3763,7 @@ SELECT
|
|
|
3709
3763
|
"conclusion"
|
|
3710
3764
|
)
|
|
3711
3765
|
]),
|
|
3712
|
-
new
|
|
3766
|
+
new I("Stored Info", [
|
|
3713
3767
|
new n(
|
|
3714
3768
|
"Local Data",
|
|
3715
3769
|
"Trilogy Studio uses browser local storage for your editors and models. These do not leave your browser (except when a model is sent in to generate a query)."
|
|
@@ -3729,19 +3783,19 @@ SELECT
|
|
|
3729
3783
|
"tip"
|
|
3730
3784
|
)
|
|
3731
3785
|
]),
|
|
3732
|
-
new
|
|
3786
|
+
new I("Google", [
|
|
3733
3787
|
new n(
|
|
3734
3788
|
"Google Account",
|
|
3735
3789
|
"Trilogy Studio uses Google OAuth to authenticate users when using a Google Bigquery connection. Trilogy Studio uses a token provided by Google to authenticate your account through the interactive sign-in flow. Trilogy Studio only requests scopes required for Bigquery read/write access, and the token never leaves your browser. This token is only used to communicate directly with BigQuery with the standard google javascript client library."
|
|
3736
3790
|
)
|
|
3737
3791
|
]),
|
|
3738
|
-
new
|
|
3792
|
+
new I("Snowflake", [
|
|
3739
3793
|
new n(
|
|
3740
3794
|
"Google Account",
|
|
3741
3795
|
"Trilogy Studio supports private key authentication for Snowflake. You will need to provide the private key to connect after configuring your user with the public key portion in Snowflake directly. The rest of the authentication header can be derived from this."
|
|
3742
3796
|
)
|
|
3743
3797
|
]),
|
|
3744
|
-
new
|
|
3798
|
+
new I("Telemetry Details", [
|
|
3745
3799
|
new n(
|
|
3746
3800
|
"Telemetry",
|
|
3747
3801
|
`<a href="https://www.goatcounter.com/">GoatCounter</a> is used to collect anonymized
|
|
@@ -3749,8 +3803,8 @@ SELECT
|
|
|
3749
3803
|
)
|
|
3750
3804
|
])
|
|
3751
3805
|
]),
|
|
3752
|
-
|
|
3753
|
-
],
|
|
3806
|
+
Sn
|
|
3807
|
+
], Cn = ce({
|
|
3754
3808
|
name: "LLMProviderIcon",
|
|
3755
3809
|
props: {
|
|
3756
3810
|
providerType: {
|
|
@@ -3758,107 +3812,44 @@ SELECT
|
|
|
3758
3812
|
required: !0
|
|
3759
3813
|
}
|
|
3760
3814
|
}
|
|
3761
|
-
}),
|
|
3815
|
+
}), kn = { class: "provider-icon-container" }, An = {
|
|
3762
3816
|
key: 0,
|
|
3763
3817
|
class: "mdi mdi-alpha-c-circle",
|
|
3764
3818
|
title: "Anthropic"
|
|
3765
|
-
},
|
|
3819
|
+
}, In = {
|
|
3766
3820
|
key: 1,
|
|
3767
3821
|
class: "mdi mdi-flash",
|
|
3768
3822
|
title: "OpenAI"
|
|
3769
|
-
},
|
|
3823
|
+
}, Pn = {
|
|
3770
3824
|
key: 2,
|
|
3771
3825
|
class: "mdi mdi-google",
|
|
3772
3826
|
title: "Google"
|
|
3773
|
-
},
|
|
3827
|
+
}, Rn = {
|
|
3774
3828
|
key: 3,
|
|
3775
3829
|
class: "mdi mdi-robot",
|
|
3776
3830
|
title: "OpenRouter"
|
|
3777
|
-
},
|
|
3831
|
+
}, Mn = {
|
|
3778
3832
|
key: 4,
|
|
3779
3833
|
class: "mdi mdi-history demo-icon",
|
|
3780
3834
|
title: "Demo"
|
|
3781
|
-
},
|
|
3835
|
+
}, Ln = {
|
|
3782
3836
|
key: 5,
|
|
3783
3837
|
class: "mdi mdi-robot",
|
|
3784
3838
|
title: "LLM Provider"
|
|
3785
3839
|
};
|
|
3786
|
-
function
|
|
3787
|
-
return
|
|
3788
|
-
t.providerType === "anthropic" ? (
|
|
3840
|
+
function Dn(t, e, o, i, c, y) {
|
|
3841
|
+
return l(), u("div", kn, [
|
|
3842
|
+
t.providerType === "anthropic" ? (l(), u("i", An)) : t.providerType === "openai" ? (l(), u("i", In)) : t.providerType === "google" ? (l(), u("i", Pn)) : t.providerType === "openrouter" ? (l(), u("i", Rn)) : t.providerType === "demo" ? (l(), u("i", Mn)) : (l(), u("i", Ln))
|
|
3789
3843
|
]);
|
|
3790
3844
|
}
|
|
3791
|
-
const
|
|
3792
|
-
name: "ContextMenu",
|
|
3793
|
-
props: {
|
|
3794
|
-
items: {
|
|
3795
|
-
type: Array,
|
|
3796
|
-
required: !0
|
|
3797
|
-
},
|
|
3798
|
-
position: {
|
|
3799
|
-
type: Object,
|
|
3800
|
-
default: () => ({ x: 0, y: 0 })
|
|
3801
|
-
},
|
|
3802
|
-
isVisible: {
|
|
3803
|
-
type: Boolean,
|
|
3804
|
-
default: !1
|
|
3805
|
-
},
|
|
3806
|
-
id: {
|
|
3807
|
-
type: String,
|
|
3808
|
-
default: ""
|
|
3809
|
-
}
|
|
3810
|
-
},
|
|
3811
|
-
emits: ["item-click", "close"],
|
|
3812
|
-
setup(t, { emit: e }) {
|
|
3813
|
-
const o = J(() => ({
|
|
3814
|
-
left: `${t.position.x}px`,
|
|
3815
|
-
top: `${t.position.y}px`
|
|
3816
|
-
})), i = (y) => {
|
|
3817
|
-
e("item-click", y), e("close");
|
|
3818
|
-
}, c = (y) => {
|
|
3819
|
-
t.isVisible && e("close");
|
|
3820
|
-
};
|
|
3821
|
-
return Ie(() => {
|
|
3822
|
-
setTimeout(() => {
|
|
3823
|
-
document.addEventListener("click", c);
|
|
3824
|
-
}, 300);
|
|
3825
|
-
}), Ye(() => {
|
|
3826
|
-
document.removeEventListener("click", c);
|
|
3827
|
-
}), {
|
|
3828
|
-
positionStyle: o,
|
|
3829
|
-
handleItemClick: i
|
|
3830
|
-
};
|
|
3831
|
-
}
|
|
3832
|
-
}), Dn = ["onClick"];
|
|
3833
|
-
function _n(t, e, o, i, c, y) {
|
|
3834
|
-
return t.isVisible ? (r(), l("div", {
|
|
3835
|
-
key: 0,
|
|
3836
|
-
style: Fe(t.positionStyle),
|
|
3837
|
-
class: "context-menu"
|
|
3838
|
-
}, [
|
|
3839
|
-
(r(!0), l(le, null, fe(t.items, (a) => (r(), l("div", {
|
|
3840
|
-
key: a.id,
|
|
3841
|
-
class: me(["context-menu-item", { danger: a.danger }]),
|
|
3842
|
-
onClick: (d) => t.handleItemClick(a)
|
|
3843
|
-
}, [
|
|
3844
|
-
a.icon ? (r(), l("i", {
|
|
3845
|
-
key: 0,
|
|
3846
|
-
class: me(`mdi ${a.icon}`)
|
|
3847
|
-
}, null, 2)) : A("", !0),
|
|
3848
|
-
s("span", null, j(a.label), 1)
|
|
3849
|
-
], 10, Dn))), 128))
|
|
3850
|
-
], 4)) : A("", !0);
|
|
3851
|
-
}
|
|
3852
|
-
const Nn = /* @__PURE__ */ z(Ln, [["render", _n], ["__scopeId", "data-v-48938153"]]), qn = ae({
|
|
3845
|
+
const _n = /* @__PURE__ */ Z(Cn, [["render", Dn], ["__scopeId", "data-v-66f81112"]]), Nn = ce({
|
|
3853
3846
|
name: "LLMConnectionListItem",
|
|
3854
3847
|
components: {
|
|
3855
|
-
SidebarItem:
|
|
3856
|
-
LLMProviderIcon:
|
|
3857
|
-
|
|
3858
|
-
|
|
3859
|
-
|
|
3860
|
-
ContextMenu: Nn,
|
|
3861
|
-
Tooltip: Se
|
|
3848
|
+
SidebarItem: Ne,
|
|
3849
|
+
LLMProviderIcon: _n,
|
|
3850
|
+
ConnectionStatusIcon: _e,
|
|
3851
|
+
Tooltip: Ae,
|
|
3852
|
+
SidebarOverflowMenu: De
|
|
3862
3853
|
},
|
|
3863
3854
|
props: {
|
|
3864
3855
|
item: {
|
|
@@ -3886,116 +3877,132 @@ const Nn = /* @__PURE__ */ z(Ln, [["render", _n], ["__scopeId", "data-v-48938153
|
|
|
3886
3877
|
"deleteChat"
|
|
3887
3878
|
],
|
|
3888
3879
|
setup(t, { emit: e }) {
|
|
3889
|
-
const o =
|
|
3890
|
-
|
|
3891
|
-
|
|
3892
|
-
|
|
3893
|
-
|
|
3880
|
+
const o = C(""), i = C(!1), c = C(""), y = C("");
|
|
3881
|
+
let a = null;
|
|
3882
|
+
Le(() => {
|
|
3883
|
+
var h, r, T;
|
|
3884
|
+
t.item.type === "api-key" && ((h = t.item.connection) != null && h.getApiKey()) && (o.value = t.item.connection.getApiKey()), t.item.type === "model" && ((r = t.item.connection) != null && r.model) && (c.value = t.item.connection.model), t.item.type === "fast-model" && (y.value = ((T = t.item.connection) == null ? void 0 : T.fastModel) || "");
|
|
3885
|
+
}), Pe(
|
|
3894
3886
|
// @ts-ignore
|
|
3895
3887
|
() => {
|
|
3896
|
-
var
|
|
3897
|
-
return (
|
|
3888
|
+
var h;
|
|
3889
|
+
return (h = t.item.connection) == null ? void 0 : h.apiKey;
|
|
3898
3890
|
},
|
|
3899
|
-
(
|
|
3900
|
-
t.item.type === "api-key" &&
|
|
3891
|
+
(h) => {
|
|
3892
|
+
t.item.type === "api-key" && h && (o.value = h);
|
|
3901
3893
|
}
|
|
3902
|
-
),
|
|
3894
|
+
), Pe(
|
|
3903
3895
|
() => {
|
|
3904
|
-
var
|
|
3905
|
-
return (
|
|
3896
|
+
var h;
|
|
3897
|
+
return (h = t.item.connection) == null ? void 0 : h.model;
|
|
3906
3898
|
},
|
|
3907
|
-
(
|
|
3908
|
-
t.item.type === "model" &&
|
|
3899
|
+
(h) => {
|
|
3900
|
+
t.item.type === "model" && h && (c.value = h);
|
|
3909
3901
|
},
|
|
3910
3902
|
{ immediate: !0 }
|
|
3911
|
-
),
|
|
3903
|
+
), Pe(
|
|
3912
3904
|
() => {
|
|
3913
|
-
var
|
|
3914
|
-
return (
|
|
3905
|
+
var h;
|
|
3906
|
+
return (h = t.item.connection) == null ? void 0 : h.fastModel;
|
|
3915
3907
|
},
|
|
3916
|
-
(
|
|
3917
|
-
t.item.type === "fast-model" && (y.value =
|
|
3908
|
+
(h) => {
|
|
3909
|
+
t.item.type === "fast-model" && (y.value = h || "");
|
|
3918
3910
|
},
|
|
3919
3911
|
{ immediate: !0 }
|
|
3920
3912
|
);
|
|
3921
|
-
const
|
|
3922
|
-
|
|
3923
|
-
|
|
3924
|
-
|
|
3913
|
+
const p = z(() => {
|
|
3914
|
+
var r;
|
|
3915
|
+
const h = [];
|
|
3916
|
+
return t.item.type === "connection" && ((r = t.item.connection) != null && r.isDefault || h.push({
|
|
3917
|
+
id: "set-default",
|
|
3918
|
+
label: "Set as default",
|
|
3919
|
+
icon: "mdi-star-outline"
|
|
3920
|
+
}), h.push(
|
|
3925
3921
|
{ id: "refresh", label: "Refresh Connection", icon: "mdi-refresh" },
|
|
3926
|
-
{ id: "delete",
|
|
3927
|
-
|
|
3928
|
-
|
|
3929
|
-
|
|
3930
|
-
|
|
3931
|
-
|
|
3932
|
-
}, a.value = !0);
|
|
3933
|
-
}, R = (p) => {
|
|
3934
|
-
var D;
|
|
3935
|
-
switch (p.id) {
|
|
3922
|
+
{ id: "delete-separator", kind: "separator" },
|
|
3923
|
+
{ id: "delete", label: "Delete connection", icon: "mdi-trash-can-outline", danger: !0 }
|
|
3924
|
+
)), h;
|
|
3925
|
+
}), w = (h) => {
|
|
3926
|
+
var r;
|
|
3927
|
+
switch (h.id) {
|
|
3936
3928
|
case "delete":
|
|
3937
|
-
|
|
3929
|
+
g(t.item.id);
|
|
3938
3930
|
break;
|
|
3939
3931
|
case "set-default":
|
|
3940
|
-
|
|
3932
|
+
le(t.item.id);
|
|
3941
3933
|
break;
|
|
3942
3934
|
case "refresh":
|
|
3943
|
-
e("refresh", t.item.id, ((
|
|
3935
|
+
e("refresh", t.item.id, ((r = t.item.connection) == null ? void 0 : r.name) || "", "connection");
|
|
3944
3936
|
break;
|
|
3945
3937
|
}
|
|
3946
|
-
},
|
|
3947
|
-
|
|
3948
|
-
|
|
3949
|
-
|
|
3950
|
-
|
|
3951
|
-
|
|
3952
|
-
|
|
3953
|
-
|
|
3954
|
-
|
|
3955
|
-
|
|
3956
|
-
|
|
3957
|
-
|
|
3958
|
-
e("
|
|
3959
|
-
},
|
|
3960
|
-
var
|
|
3961
|
-
e("
|
|
3962
|
-
},
|
|
3963
|
-
|
|
3964
|
-
|
|
3938
|
+
}, d = z(() => ["connection", "settings-group"].includes(t.item.type)), S = () => [
|
|
3939
|
+
"api-key",
|
|
3940
|
+
"model",
|
|
3941
|
+
"fast-model",
|
|
3942
|
+
"settings-group",
|
|
3943
|
+
"toggle-save-credential",
|
|
3944
|
+
"refresh-connection"
|
|
3945
|
+
].includes(t.item.type) ? "" : t.item.name, f = () => {
|
|
3946
|
+
(d.value || t.item.type === "open-chat" || t.item.type === "open-validation" || t.item.type === "new-chat" || t.item.type === "chat-item") && N(t.item.id);
|
|
3947
|
+
}, N = (h) => {
|
|
3948
|
+
var T;
|
|
3949
|
+
const r = t.item.type === "chat-item" ? { chatId: t.item.chatId } : void 0;
|
|
3950
|
+
e("toggle", h, ((T = t.item.connection) == null ? void 0 : T.name) || "", t.item.type, r);
|
|
3951
|
+
}, A = (h) => {
|
|
3952
|
+
var r;
|
|
3953
|
+
h.stopPropagation(), e("refresh", t.item.id, ((r = t.item.connection) == null ? void 0 : r.name) || "", "connection");
|
|
3954
|
+
}, m = (h) => {
|
|
3955
|
+
e("toggleSaveCredential", h);
|
|
3956
|
+
}, Q = (h) => h instanceof Ue ? "anthropic" : h instanceof Oe ? "openai" : h instanceof xe ? "google" : h.type || "unknown", ue = (h) => h && h.connected === !0, le = (h) => {
|
|
3957
|
+
var r;
|
|
3958
|
+
e("setActive", h, ((r = t.item.connection) == null ? void 0 : r.name) || "", "connection");
|
|
3959
|
+
}, g = (h) => {
|
|
3960
|
+
var r;
|
|
3961
|
+
e("deleteConnection", h, ((r = t.item.connection) == null ? void 0 : r.name) || "");
|
|
3962
|
+
}, P = (h) => {
|
|
3963
|
+
var r;
|
|
3964
|
+
h && e("deleteChat", h, ((r = t.item.connection) == null ? void 0 : r.name) || "");
|
|
3965
|
+
}, v = (h, r) => {
|
|
3966
|
+
e("updateApiKey", h, r);
|
|
3967
|
+
}, b = (h, r) => {
|
|
3968
|
+
e("updateModel", h, r);
|
|
3969
|
+
}, k = (h, r) => {
|
|
3970
|
+
e("updateFastModel", h, r);
|
|
3965
3971
|
};
|
|
3966
3972
|
return {
|
|
3967
3973
|
apiKeyInput: o,
|
|
3968
3974
|
selectedModel: c,
|
|
3969
3975
|
selectedFastModel: y,
|
|
3970
|
-
isExpandable:
|
|
3971
|
-
getItemName:
|
|
3972
|
-
handleItemClick:
|
|
3973
|
-
handleRefreshConnectionClick:
|
|
3974
|
-
getProviderType:
|
|
3975
|
-
isConnected:
|
|
3976
|
-
setAsActive:
|
|
3977
|
-
updateApiKey:
|
|
3978
|
-
|
|
3976
|
+
isExpandable: d,
|
|
3977
|
+
getItemName: S,
|
|
3978
|
+
handleItemClick: f,
|
|
3979
|
+
handleRefreshConnectionClick: A,
|
|
3980
|
+
getProviderType: Q,
|
|
3981
|
+
isConnected: ue,
|
|
3982
|
+
setAsActive: le,
|
|
3983
|
+
updateApiKey: v,
|
|
3984
|
+
updateModel: b,
|
|
3985
|
+
updateFastModel: k,
|
|
3986
|
+
handleApiKeyInput: () => {
|
|
3987
|
+
t.item.type !== "api-key" || !t.item.connection || o.value !== (t.item.connection.getApiKey() || "") && (a && clearTimeout(a), a = setTimeout(() => {
|
|
3988
|
+
v(t.item.connection, o.value);
|
|
3989
|
+
}, 500));
|
|
3979
3990
|
},
|
|
3980
|
-
|
|
3981
|
-
|
|
3991
|
+
handleModelChange: () => {
|
|
3992
|
+
t.item.type !== "model" || !t.item.connection || !c.value || c.value === t.item.connection.model || b(t.item.connection, c.value);
|
|
3982
3993
|
},
|
|
3983
|
-
|
|
3984
|
-
|
|
3985
|
-
|
|
3986
|
-
|
|
3987
|
-
|
|
3988
|
-
deleteChat: (p) => {
|
|
3989
|
-
var D;
|
|
3990
|
-
p && e("deleteChat", p, ((D = t.item.connection) == null ? void 0 : D.name) || "");
|
|
3994
|
+
handleFastModelChange: () => {
|
|
3995
|
+
if (t.item.type !== "fast-model" || !t.item.connection)
|
|
3996
|
+
return;
|
|
3997
|
+
const h = y.value || null;
|
|
3998
|
+
h !== (t.item.connection.fastModel || null) && k(t.item.connection, h);
|
|
3991
3999
|
},
|
|
3992
|
-
|
|
3993
|
-
|
|
3994
|
-
|
|
3995
|
-
contextMenuItems:
|
|
3996
|
-
|
|
3997
|
-
|
|
3998
|
-
toggleCollapse: F,
|
|
4000
|
+
toggleSaveCredential: m,
|
|
4001
|
+
deleteConnection: g,
|
|
4002
|
+
deleteChat: P,
|
|
4003
|
+
contextMenuItems: p,
|
|
4004
|
+
handleContextMenuItemClick: w,
|
|
4005
|
+
toggleCollapse: N,
|
|
3999
4006
|
// API key visibility
|
|
4000
4007
|
showApiKey: i,
|
|
4001
4008
|
toggleApiKeyVisibility: () => {
|
|
@@ -4003,38 +4010,38 @@ const Nn = /* @__PURE__ */ z(Ln, [["render", _n], ["__scopeId", "data-v-48938153
|
|
|
4003
4010
|
}
|
|
4004
4011
|
};
|
|
4005
4012
|
}
|
|
4006
|
-
}),
|
|
4013
|
+
}), qn = {
|
|
4007
4014
|
key: 1,
|
|
4015
|
+
class: "mdi mdi-tune-vertical node-icon"
|
|
4016
|
+
}, Un = {
|
|
4017
|
+
key: 2,
|
|
4008
4018
|
class: "mdi mdi-alert-circle node-icon"
|
|
4009
4019
|
}, On = {
|
|
4010
|
-
key: 2,
|
|
4011
|
-
class: "mdi mdi-chat-outline node-icon"
|
|
4012
|
-
}, Bn = {
|
|
4013
4020
|
key: 3,
|
|
4014
|
-
class: "mdi mdi-
|
|
4021
|
+
class: "mdi mdi-chat-outline node-icon"
|
|
4015
4022
|
}, xn = {
|
|
4016
4023
|
key: 4,
|
|
4017
|
-
class: "mdi mdi-
|
|
4018
|
-
},
|
|
4024
|
+
class: "mdi mdi-test-tube node-icon"
|
|
4025
|
+
}, Bn = {
|
|
4019
4026
|
key: 5,
|
|
4020
|
-
class: "mdi mdi-chat node-icon"
|
|
4027
|
+
class: "mdi mdi-chat-plus-outline node-icon"
|
|
4021
4028
|
}, Fn = {
|
|
4022
4029
|
key: 6,
|
|
4030
|
+
class: "mdi mdi-chat node-icon"
|
|
4031
|
+
}, Yn = {
|
|
4032
|
+
key: 7,
|
|
4023
4033
|
class: "mdi mdi-folder-outline node-icon"
|
|
4024
|
-
}, Gn = { class: "api-key-input-wrapper" },
|
|
4034
|
+
}, Gn = { class: "api-key-input-wrapper" }, Kn = ["type", "data-testid"], jn = ["data-testid", "title"], Qn = ["data-testid"], Vn = ["data-testid"], Hn = ["value", "data-testid"], Wn = ["data-testid"], zn = ["data-testid"], Xn = ["value", "data-testid"], Jn = { class: "save-credential-toggle sidebar-toggle-row" }, Zn = ["checked"], $n = { key: 0 }, eo = {
|
|
4025
4035
|
key: 0,
|
|
4026
|
-
class: "chat-actions"
|
|
4036
|
+
class: "connection-actions chat-actions"
|
|
4027
4037
|
}, to = {
|
|
4028
4038
|
key: 1,
|
|
4029
4039
|
class: "connection-actions"
|
|
4030
|
-
}, no = {
|
|
4031
|
-
key: 0,
|
|
4032
|
-
class: "mdi mdi-star loading-button is-active"
|
|
4033
4040
|
};
|
|
4034
|
-
function
|
|
4035
|
-
const a =
|
|
4036
|
-
return
|
|
4037
|
-
|
|
4041
|
+
function no(t, e, o, i, c, y) {
|
|
4042
|
+
const a = x("LLMProviderIcon"), p = x("tooltip"), w = x("connection-status-icon"), d = x("sidebar-overflow-menu"), S = x("sidebar-item");
|
|
4043
|
+
return l(), u("div", null, [
|
|
4044
|
+
G(S, {
|
|
4038
4045
|
"item-id": t.item.id,
|
|
4039
4046
|
name: t.getItemName(),
|
|
4040
4047
|
indent: t.item.indent,
|
|
@@ -4043,237 +4050,176 @@ function oo(t, e, o, i, c, y) {
|
|
|
4043
4050
|
"is-collapsed": t.isCollapsed,
|
|
4044
4051
|
itemType: "llm-connection",
|
|
4045
4052
|
onClick: t.handleItemClick,
|
|
4046
|
-
onToggle: t.toggleCollapse
|
|
4047
|
-
onContextmenu: k(t.showContextMenu, ["prevent"])
|
|
4053
|
+
onToggle: t.toggleCollapse
|
|
4048
4054
|
}, {
|
|
4049
4055
|
icon: q(() => [
|
|
4050
|
-
t.item.type === "connection" ? (
|
|
4056
|
+
t.item.type === "connection" ? (l(), W(a, {
|
|
4051
4057
|
key: 0,
|
|
4052
4058
|
"provider-type": t.getProviderType(t.item.connection)
|
|
4053
|
-
}, null, 8, ["provider-type"])) : t.item.type === "
|
|
4059
|
+
}, null, 8, ["provider-type"])) : t.item.type === "settings-group" ? (l(), u("i", qn)) : t.item.type === "error" ? (l(), u("i", Un)) : t.item.type === "open-chat" ? (l(), u("i", On)) : t.item.type === "open-validation" ? (l(), u("i", xn)) : t.item.type === "new-chat" ? (l(), u("i", Bn)) : t.item.type === "chat-item" ? (l(), u("i", Fn)) : t.item.type === "chats-header" ? (l(), u("i", Yn)) : M("", !0)
|
|
4054
4060
|
]),
|
|
4055
4061
|
name: q(() => [
|
|
4056
|
-
t.item.type === "refresh-connection" ? (
|
|
4062
|
+
t.item.type === "refresh-connection" ? (l(), u("div", {
|
|
4057
4063
|
key: 0,
|
|
4058
4064
|
class: "refresh title-pad-left truncate-text sidebar-sub-item",
|
|
4059
|
-
onClick: e[
|
|
4060
|
-
},
|
|
4065
|
+
onClick: e[0] || (e[0] = (...f) => t.handleRefreshConnectionClick && t.handleRefreshConnectionClick(...f))
|
|
4066
|
+
}, F(t.item.name), 1)) : t.item.type === "api-key" ? (l(), u("div", {
|
|
4061
4067
|
key: 1,
|
|
4062
4068
|
class: "api-key-container",
|
|
4063
|
-
onClick: e[5] || (e[5] =
|
|
4069
|
+
onClick: e[5] || (e[5] = R(() => {
|
|
4064
4070
|
}, ["stop"]))
|
|
4065
4071
|
}, [
|
|
4066
4072
|
s("form", {
|
|
4067
|
-
onSubmit: e[4] || (e[4] =
|
|
4073
|
+
onSubmit: e[4] || (e[4] = R(() => {
|
|
4074
|
+
}, ["prevent"]))
|
|
4068
4075
|
}, [
|
|
4069
|
-
e[17] || (e[17] = s("button", {
|
|
4070
|
-
type: "submit",
|
|
4071
|
-
class: "customize-button"
|
|
4072
|
-
}, "Update API Key", -1)),
|
|
4073
4076
|
s("div", Gn, [
|
|
4074
|
-
|
|
4077
|
+
D(s("input", {
|
|
4075
4078
|
type: t.showApiKey ? "text" : "password",
|
|
4076
4079
|
id: "api-key",
|
|
4077
|
-
"onUpdate:modelValue": e[
|
|
4080
|
+
"onUpdate:modelValue": e[1] || (e[1] = (f) => t.apiKeyInput = f),
|
|
4081
|
+
onInput: e[2] || (e[2] = (...f) => t.handleApiKeyInput && t.handleApiKeyInput(...f)),
|
|
4078
4082
|
placeholder: "API Key",
|
|
4079
|
-
class: "connection-customize",
|
|
4083
|
+
class: "connection-customize sidebar-control-input",
|
|
4080
4084
|
"data-testid": `api-key-input-${t.item.connection.name}`
|
|
4081
|
-
}, null,
|
|
4082
|
-
[
|
|
4085
|
+
}, null, 40, Kn), [
|
|
4086
|
+
[je, t.apiKeyInput]
|
|
4083
4087
|
]),
|
|
4084
4088
|
s("button", {
|
|
4085
4089
|
type: "button",
|
|
4086
|
-
class: "visibility-toggle",
|
|
4087
|
-
onClick: e[3] || (e[3] = (...
|
|
4090
|
+
class: "visibility-toggle sidebar-icon-button",
|
|
4091
|
+
onClick: e[3] || (e[3] = (...f) => t.toggleApiKeyVisibility && t.toggleApiKeyVisibility(...f)),
|
|
4088
4092
|
"data-testid": `toggle-api-key-visibility-${t.item.connection.name}`,
|
|
4089
4093
|
title: t.showApiKey ? "Hide API Key" : "Show API Key"
|
|
4090
4094
|
}, [
|
|
4091
4095
|
s("i", {
|
|
4092
4096
|
class: me(t.showApiKey ? "mdi mdi-eye-off" : "mdi mdi-eye")
|
|
4093
4097
|
}, null, 2)
|
|
4094
|
-
], 8,
|
|
4098
|
+
], 8, jn)
|
|
4095
4099
|
])
|
|
4096
4100
|
], 32)
|
|
4097
|
-
])) : t.item.type === "model" ? (
|
|
4101
|
+
])) : t.item.type === "model" ? (l(), u("div", {
|
|
4098
4102
|
key: 2,
|
|
4099
4103
|
class: "api-key-container",
|
|
4100
|
-
onClick: e[
|
|
4104
|
+
onClick: e[9] || (e[9] = R(() => {
|
|
4101
4105
|
}, ["stop"]))
|
|
4102
4106
|
}, [
|
|
4103
4107
|
s("form", {
|
|
4104
|
-
onSubmit: e[
|
|
4108
|
+
onSubmit: e[8] || (e[8] = R(() => {
|
|
4105
4109
|
}, ["prevent"])),
|
|
4106
4110
|
"data-testid": `model-update-form-${t.item.connection.name}`
|
|
4107
4111
|
}, [
|
|
4108
|
-
|
|
4109
|
-
|
|
4110
|
-
|
|
4111
|
-
class: "customize-button",
|
|
4112
|
-
"data-testid": `update-model-${t.item.connection.name}`
|
|
4113
|
-
}, {
|
|
4114
|
-
default: q(() => [...e[18] || (e[18] = [
|
|
4115
|
-
ie(" Update Model ", -1)
|
|
4116
|
-
])]),
|
|
4117
|
-
_: 1
|
|
4118
|
-
}, 8, ["action", "data-testid"]),
|
|
4119
|
-
N(s("select", {
|
|
4120
|
-
"onUpdate:modelValue": e[6] || (e[6] = (h) => t.selectedModel = h),
|
|
4112
|
+
D(s("select", {
|
|
4113
|
+
"onUpdate:modelValue": e[6] || (e[6] = (f) => t.selectedModel = f),
|
|
4114
|
+
onChange: e[7] || (e[7] = (...f) => t.handleModelChange && t.handleModelChange(...f)),
|
|
4121
4115
|
id: "connection-type",
|
|
4122
4116
|
required: "",
|
|
4123
|
-
class: "connection-customize",
|
|
4117
|
+
class: "connection-customize sidebar-control-select",
|
|
4124
4118
|
"data-testid": `model-select-${t.item.connection.name}`
|
|
4125
4119
|
}, [
|
|
4126
|
-
(
|
|
4127
|
-
value:
|
|
4128
|
-
key:
|
|
4129
|
-
"data-testid": `model-option-${
|
|
4130
|
-
},
|
|
4131
|
-
],
|
|
4132
|
-
[
|
|
4120
|
+
(l(!0), u(pe, null, we(t.item.connection.models, (f) => (l(), u("option", {
|
|
4121
|
+
value: f,
|
|
4122
|
+
key: f,
|
|
4123
|
+
"data-testid": `model-option-${f}`
|
|
4124
|
+
}, F(f), 9, Hn))), 128))
|
|
4125
|
+
], 40, Vn), [
|
|
4126
|
+
[Ce, t.selectedModel]
|
|
4133
4127
|
])
|
|
4134
4128
|
], 40, Qn)
|
|
4135
|
-
])) : t.item.type === "fast-model" ? (
|
|
4129
|
+
])) : t.item.type === "fast-model" ? (l(), u("div", {
|
|
4136
4130
|
key: 3,
|
|
4137
4131
|
class: "api-key-container",
|
|
4138
|
-
onClick: e[
|
|
4132
|
+
onClick: e[13] || (e[13] = R(() => {
|
|
4139
4133
|
}, ["stop"]))
|
|
4140
4134
|
}, [
|
|
4141
4135
|
s("form", {
|
|
4142
|
-
onSubmit: e[
|
|
4136
|
+
onSubmit: e[12] || (e[12] = R(() => {
|
|
4143
4137
|
}, ["prevent"])),
|
|
4144
4138
|
"data-testid": `fast-model-update-form-${t.item.connection.name}`
|
|
4145
4139
|
}, [
|
|
4146
|
-
|
|
4147
|
-
|
|
4148
|
-
|
|
4149
|
-
class: "customize-
|
|
4150
|
-
"data-testid": `update-fast-model-${t.item.connection.name}`
|
|
4151
|
-
}, {
|
|
4152
|
-
default: q(() => [...e[19] || (e[19] = [
|
|
4153
|
-
ie(" Update Fast Model ", -1)
|
|
4154
|
-
])]),
|
|
4155
|
-
_: 1
|
|
4156
|
-
}, 8, ["action", "data-testid"]),
|
|
4157
|
-
N(s("select", {
|
|
4158
|
-
"onUpdate:modelValue": e[9] || (e[9] = (h) => t.selectedFastModel = h),
|
|
4159
|
-
class: "connection-customize",
|
|
4140
|
+
D(s("select", {
|
|
4141
|
+
"onUpdate:modelValue": e[10] || (e[10] = (f) => t.selectedFastModel = f),
|
|
4142
|
+
onChange: e[11] || (e[11] = (...f) => t.handleFastModelChange && t.handleFastModelChange(...f)),
|
|
4143
|
+
class: "connection-customize sidebar-control-select",
|
|
4160
4144
|
"data-testid": `fast-model-select-${t.item.connection.name}`
|
|
4161
4145
|
}, [
|
|
4162
|
-
e[
|
|
4146
|
+
e[17] || (e[17] = s("option", {
|
|
4163
4147
|
value: "",
|
|
4164
4148
|
"data-testid": "fast-model-option-none"
|
|
4165
4149
|
}, "(Use primary model)", -1)),
|
|
4166
|
-
(
|
|
4167
|
-
value:
|
|
4168
|
-
key:
|
|
4169
|
-
"data-testid": `fast-model-option-${
|
|
4170
|
-
},
|
|
4171
|
-
],
|
|
4172
|
-
[
|
|
4150
|
+
(l(!0), u(pe, null, we(t.item.connection.models, (f) => (l(), u("option", {
|
|
4151
|
+
value: f,
|
|
4152
|
+
key: f,
|
|
4153
|
+
"data-testid": `fast-model-option-${f}`
|
|
4154
|
+
}, F(f), 9, Xn))), 128))
|
|
4155
|
+
], 40, zn), [
|
|
4156
|
+
[Ce, t.selectedFastModel]
|
|
4173
4157
|
])
|
|
4174
4158
|
], 40, Wn)
|
|
4175
|
-
])) : t.item.type === "toggle-save-credential" ? (
|
|
4159
|
+
])) : t.item.type === "toggle-save-credential" ? (l(), u("div", {
|
|
4176
4160
|
key: 4,
|
|
4177
4161
|
class: "md-token-container",
|
|
4178
|
-
onClick: e[
|
|
4162
|
+
onClick: e[15] || (e[15] = R(() => {
|
|
4179
4163
|
}, ["stop"]))
|
|
4180
4164
|
}, [
|
|
4181
4165
|
s("label", Jn, [
|
|
4182
4166
|
s("input", {
|
|
4183
4167
|
type: "checkbox",
|
|
4184
4168
|
checked: t.item.connection.saveCredential,
|
|
4185
|
-
onChange: e[
|
|
4169
|
+
onChange: e[14] || (e[14] = (f) => t.toggleSaveCredential(t.item.connection))
|
|
4186
4170
|
}, null, 40, Zn),
|
|
4187
|
-
e[
|
|
4171
|
+
e[18] || (e[18] = s("span", { class: "checkbox-label" }, "Save credentials", -1))
|
|
4188
4172
|
])
|
|
4189
|
-
])) : (
|
|
4173
|
+
])) : (l(), u("span", {
|
|
4190
4174
|
key: 5,
|
|
4191
4175
|
class: me(["title-pad-left truncate-text", { "error-indicator": t.item.type === "error" }])
|
|
4192
4176
|
}, [
|
|
4193
|
-
|
|
4194
|
-
t.item.count !== void 0 && t.item.count > 0 ? (
|
|
4177
|
+
be(F(t.item.name) + " ", 1),
|
|
4178
|
+
t.item.count !== void 0 && t.item.count > 0 ? (l(), u("span", $n, " (" + F(t.item.count) + ") ", 1)) : M("", !0)
|
|
4195
4179
|
], 2))
|
|
4196
4180
|
]),
|
|
4197
4181
|
"extra-content": q(() => [
|
|
4198
|
-
t.item.type === "chat-item" ? (
|
|
4199
|
-
|
|
4182
|
+
t.item.type === "chat-item" ? (l(), u("div", eo, [
|
|
4183
|
+
G(p, {
|
|
4200
4184
|
class: "tactile-button",
|
|
4201
4185
|
content: "Delete Chat",
|
|
4202
4186
|
position: "left"
|
|
4203
4187
|
}, {
|
|
4204
4188
|
default: q(() => [
|
|
4205
4189
|
s("span", {
|
|
4206
|
-
class: "remove-btn hover-icon",
|
|
4207
|
-
onClick: e[
|
|
4208
|
-
}, [...e[
|
|
4190
|
+
class: "remove-btn hover-icon sidebar-icon-button danger",
|
|
4191
|
+
onClick: e[16] || (e[16] = R((f) => t.deleteChat(t.item.chatId), ["stop"]))
|
|
4192
|
+
}, [...e[19] || (e[19] = [
|
|
4209
4193
|
s("i", { class: "mdi mdi-trash-can-outline" }, null, -1)
|
|
4210
4194
|
])])
|
|
4211
4195
|
]),
|
|
4212
4196
|
_: 1
|
|
4213
4197
|
})
|
|
4214
|
-
])) :
|
|
4215
|
-
t.item.type === "connection" ? (
|
|
4216
|
-
t.item.connection
|
|
4217
|
-
key:
|
|
4218
|
-
class: "loading-button",
|
|
4219
|
-
onClick: e[15] || (e[15] = k(() => {
|
|
4220
|
-
}, ["stop"])),
|
|
4221
|
-
action: () => t.setAsActive(t.item.id),
|
|
4222
|
-
title: "Set as default"
|
|
4223
|
-
}, {
|
|
4224
|
-
default: q(() => [...e[23] || (e[23] = [
|
|
4225
|
-
s("i", { class: "mdi mdi-star-outline" }, null, -1)
|
|
4226
|
-
])]),
|
|
4227
|
-
_: 1
|
|
4228
|
-
}, 8, ["action"])),
|
|
4229
|
-
t.item.connection ? (r(), W(R, {
|
|
4230
|
-
key: 2,
|
|
4231
|
-
connection: t.item.connection,
|
|
4232
|
-
type: "llm",
|
|
4233
|
-
"is-connected": t.isConnected(t.item.connection),
|
|
4234
|
-
"data-testid": `refresh-llm-connection-${t.item.connection.name}`
|
|
4235
|
-
}, null, 8, ["connection", "is-connected", "data-testid"])) : A("", !0),
|
|
4236
|
-
O(m, {
|
|
4237
|
-
class: "tacticle-button",
|
|
4238
|
-
content: "Delete Connection",
|
|
4239
|
-
position: "left"
|
|
4240
|
-
}, {
|
|
4241
|
-
default: q(() => [
|
|
4242
|
-
s("span", {
|
|
4243
|
-
class: "remove-btn",
|
|
4244
|
-
onClick: e[16] || (e[16] = k((h) => t.deleteConnection(t.item.id), ["stop"]))
|
|
4245
|
-
}, [...e[24] || (e[24] = [
|
|
4246
|
-
s("i", { class: "mdi mdi-trash-can-outline tactile-button" }, null, -1)
|
|
4247
|
-
])])
|
|
4248
|
-
]),
|
|
4249
|
-
_: 1
|
|
4250
|
-
}),
|
|
4251
|
-
t.item.connection ? (r(), W(P, {
|
|
4252
|
-
key: 3,
|
|
4198
|
+
])) : M("", !0),
|
|
4199
|
+
t.item.type === "connection" ? (l(), u("div", to, [
|
|
4200
|
+
t.item.connection ? (l(), W(w, {
|
|
4201
|
+
key: 0,
|
|
4253
4202
|
connection: t.item.connection
|
|
4254
|
-
}, null, 8, ["connection"])) :
|
|
4255
|
-
|
|
4256
|
-
|
|
4257
|
-
|
|
4258
|
-
|
|
4259
|
-
|
|
4260
|
-
|
|
4261
|
-
|
|
4262
|
-
onItemClick: t.handleContextMenuItemClick,
|
|
4263
|
-
onClose: e[0] || (e[0] = (h) => t.contextMenuVisible = !1)
|
|
4264
|
-
}, null, 8, ["items", "position", "is-visible", "onItemClick"])
|
|
4203
|
+
}, null, 8, ["connection"])) : M("", !0),
|
|
4204
|
+
G(d, {
|
|
4205
|
+
items: t.contextMenuItems,
|
|
4206
|
+
tooltip: "Connection actions",
|
|
4207
|
+
"test-id-base": `llm-connection-actions-${t.item.id}`,
|
|
4208
|
+
onSelect: t.handleContextMenuItemClick
|
|
4209
|
+
}, null, 8, ["items", "test-id-base", "onSelect"])
|
|
4210
|
+
])) : M("", !0)
|
|
4265
4211
|
]),
|
|
4266
4212
|
_: 1
|
|
4267
|
-
}, 8, ["item-id", "name", "indent", "is-selected", "is-collapsible", "is-collapsed", "onClick", "onToggle"
|
|
4213
|
+
}, 8, ["item-id", "name", "indent", "is-selected", "is-collapsible", "is-collapsed", "onClick", "onToggle"])
|
|
4268
4214
|
]);
|
|
4269
4215
|
}
|
|
4270
|
-
const
|
|
4216
|
+
const oo = /* @__PURE__ */ Z(Nn, [["render", no], ["__scopeId", "data-v-9af9356c"]]), fe = {
|
|
4271
4217
|
openai: ["gpt-5.3", "gpt-5.2", "gpt-5.2-mini"],
|
|
4272
4218
|
anthropic: ["claude-opus-4-6-20260514", "claude-opus-4-20250514", "claude-sonnet-4-20250514"],
|
|
4273
4219
|
google: ["models/gemini-2.5-pro", "models/gemini-2.5-flash"],
|
|
4274
4220
|
openrouter: ["anthropic/claude-sonnet-4", "openai/gpt-4o", "google/gemini-2.5-pro"],
|
|
4275
4221
|
demo: ["deepseek/deepseek-v3.2"]
|
|
4276
|
-
},
|
|
4222
|
+
}, io = ce({
|
|
4277
4223
|
name: "LLMConnectionCreator",
|
|
4278
4224
|
props: {
|
|
4279
4225
|
visible: {
|
|
@@ -4292,10 +4238,10 @@ const io = /* @__PURE__ */ z(qn, [["render", oo], ["__scopeId", "data-v-45d1389b
|
|
|
4292
4238
|
}
|
|
4293
4239
|
},
|
|
4294
4240
|
components: {
|
|
4295
|
-
LoadingButton:
|
|
4241
|
+
LoadingButton: Re
|
|
4296
4242
|
},
|
|
4297
4243
|
setup(t, { emit: e }) {
|
|
4298
|
-
const o =
|
|
4244
|
+
const o = C({
|
|
4299
4245
|
name: "",
|
|
4300
4246
|
type: "demo",
|
|
4301
4247
|
options: {
|
|
@@ -4303,7 +4249,7 @@ const io = /* @__PURE__ */ z(qn, [["render", oo], ["__scopeId", "data-v-45d1389b
|
|
|
4303
4249
|
model: "deepseek/deepseek-v3.2",
|
|
4304
4250
|
saveCredential: !1
|
|
4305
4251
|
}
|
|
4306
|
-
}), i =
|
|
4252
|
+
}), i = _("llmConnectionStore");
|
|
4307
4253
|
if (!i)
|
|
4308
4254
|
throw new Error("must inject llmConnectionStore to LLMConnectionCreator");
|
|
4309
4255
|
const c = i.connections, y = () => {
|
|
@@ -4312,37 +4258,37 @@ const io = /* @__PURE__ */ z(qn, [["render", oo], ["__scopeId", "data-v-45d1389b
|
|
|
4312
4258
|
model: "",
|
|
4313
4259
|
saveCredential: !1
|
|
4314
4260
|
}, a("demo");
|
|
4315
|
-
}, a = (
|
|
4316
|
-
switch (
|
|
4261
|
+
}, a = (d) => {
|
|
4262
|
+
switch (d) {
|
|
4317
4263
|
case "openai":
|
|
4318
|
-
o.value.options.model =
|
|
4319
|
-
|
|
4264
|
+
o.value.options.model = Oe.getDefaultModel(
|
|
4265
|
+
fe.openai
|
|
4320
4266
|
);
|
|
4321
4267
|
break;
|
|
4322
4268
|
case "anthropic":
|
|
4323
|
-
o.value.options.model =
|
|
4324
|
-
|
|
4269
|
+
o.value.options.model = Ue.getDefaultModel(
|
|
4270
|
+
fe.anthropic
|
|
4325
4271
|
);
|
|
4326
4272
|
break;
|
|
4327
4273
|
case "google":
|
|
4328
|
-
o.value.options.model =
|
|
4329
|
-
|
|
4274
|
+
o.value.options.model = xe.getDefaultModel(
|
|
4275
|
+
fe.google
|
|
4330
4276
|
);
|
|
4331
4277
|
break;
|
|
4332
4278
|
case "demo":
|
|
4333
|
-
o.value.options.model =
|
|
4279
|
+
o.value.options.model = Xe.getDefaultModel(fe.demo);
|
|
4334
4280
|
break;
|
|
4335
4281
|
case "openrouter":
|
|
4336
|
-
o.value.options.model =
|
|
4337
|
-
|
|
4282
|
+
o.value.options.model = ze.getDefaultModel(
|
|
4283
|
+
fe.openrouter
|
|
4338
4284
|
);
|
|
4339
4285
|
break;
|
|
4340
4286
|
default:
|
|
4341
4287
|
o.value.options.model = "";
|
|
4342
4288
|
}
|
|
4343
|
-
},
|
|
4344
|
-
await
|
|
4345
|
-
},
|
|
4289
|
+
}, p = async () => {
|
|
4290
|
+
await w();
|
|
4291
|
+
}, w = async () => {
|
|
4346
4292
|
if (!o.value.name)
|
|
4347
4293
|
throw new Error("Connection name is required");
|
|
4348
4294
|
if (!o.value.type)
|
|
@@ -4359,8 +4305,8 @@ const io = /* @__PURE__ */ z(qn, [["render", oo], ["__scopeId", "data-v-45d1389b
|
|
|
4359
4305
|
connectionDetails: o,
|
|
4360
4306
|
connections: c,
|
|
4361
4307
|
createConnection: y,
|
|
4362
|
-
handleSubmitConnection:
|
|
4363
|
-
submitConnectionCreation:
|
|
4308
|
+
handleSubmitConnection: w,
|
|
4309
|
+
submitConnectionCreation: p,
|
|
4364
4310
|
updateDefaultModel: a
|
|
4365
4311
|
};
|
|
4366
4312
|
},
|
|
@@ -4371,94 +4317,97 @@ const io = /* @__PURE__ */ z(qn, [["render", oo], ["__scopeId", "data-v-45d1389b
|
|
|
4371
4317
|
}
|
|
4372
4318
|
}
|
|
4373
4319
|
}
|
|
4374
|
-
}),
|
|
4320
|
+
}), ao = {
|
|
4375
4321
|
key: 0,
|
|
4376
4322
|
class: "creator-container"
|
|
4377
|
-
},
|
|
4323
|
+
}, so = { class: "form-row" }, ro = { class: "form-row" }, lo = {
|
|
4378
4324
|
key: 0,
|
|
4379
4325
|
class: "form-row demo-info"
|
|
4380
|
-
},
|
|
4381
|
-
function
|
|
4382
|
-
const a =
|
|
4383
|
-
return t.visible ? (
|
|
4326
|
+
}, co = { class: "form-row" }, uo = { class: "form-row" }, po = { class: "button-row" };
|
|
4327
|
+
function mo(t, e, o, i, c, y) {
|
|
4328
|
+
const a = x("loading-button");
|
|
4329
|
+
return t.visible ? (l(), u("div", ao, [
|
|
4384
4330
|
s("form", {
|
|
4385
|
-
onSubmit: e[5] || (e[5] =
|
|
4331
|
+
onSubmit: e[5] || (e[5] = R((...p) => t.submitConnectionCreation && t.submitConnectionCreation(...p), ["prevent"]))
|
|
4386
4332
|
}, [
|
|
4387
|
-
s("div",
|
|
4333
|
+
s("div", so, [
|
|
4388
4334
|
e[6] || (e[6] = s("label", { for: "llm-connection-name" }, "Name", -1)),
|
|
4389
|
-
|
|
4335
|
+
D(s("input", {
|
|
4390
4336
|
type: "text",
|
|
4391
|
-
"onUpdate:modelValue": e[0] || (e[0] = (
|
|
4337
|
+
"onUpdate:modelValue": e[0] || (e[0] = (p) => t.connectionDetails.name = p),
|
|
4338
|
+
class: "sidebar-control-input",
|
|
4392
4339
|
id: "llm-connection-name",
|
|
4393
4340
|
required: "",
|
|
4394
4341
|
"data-testid": "llm-connection-creator-name",
|
|
4395
4342
|
placeholder: "Connection Name"
|
|
4396
4343
|
}, null, 512), [
|
|
4397
|
-
[
|
|
4344
|
+
[B, t.connectionDetails.name]
|
|
4398
4345
|
])
|
|
4399
4346
|
]),
|
|
4400
|
-
s("div",
|
|
4347
|
+
s("div", ro, [
|
|
4401
4348
|
e[8] || (e[8] = s("label", { for: "llm-provider-type" }, "Provider", -1)),
|
|
4402
|
-
|
|
4403
|
-
"onUpdate:modelValue": e[1] || (e[1] = (
|
|
4349
|
+
D(s("select", {
|
|
4350
|
+
"onUpdate:modelValue": e[1] || (e[1] = (p) => t.connectionDetails.type = p),
|
|
4351
|
+
class: "sidebar-control-select",
|
|
4404
4352
|
id: "llm-provider-type",
|
|
4405
4353
|
required: "",
|
|
4406
4354
|
"data-testid": "llm-connection-creator-type"
|
|
4407
4355
|
}, [...e[7] || (e[7] = [
|
|
4408
|
-
|
|
4356
|
+
Qe('<option value="demo" data-testid="llm-connection-creator-demo" data-v-bb0a7bcc>Demo (Free Trial)</option><option value="openai" data-testid="llm-connection-creator-openai" data-v-bb0a7bcc>OpenAI</option><option value="anthropic" data-testid="llm-connection-creator-anthropic" data-v-bb0a7bcc> Anthropic </option><option value="google" data-testid="llm-connection-creator-google" data-v-bb0a7bcc>Google</option><option value="openrouter" data-testid="llm-connection-creator-openrouter" data-v-bb0a7bcc> OpenRouter </option>', 5)
|
|
4409
4357
|
])], 512), [
|
|
4410
|
-
[
|
|
4358
|
+
[Ce, t.connectionDetails.type]
|
|
4411
4359
|
])
|
|
4412
4360
|
]),
|
|
4413
|
-
t.connectionDetails.type === "demo" ? (
|
|
4361
|
+
t.connectionDetails.type === "demo" ? (l(), u("div", lo, [...e[9] || (e[9] = [
|
|
4414
4362
|
s("span", { class: "demo-label" }, "A limited free API key will be issued automatically.", -1)
|
|
4415
|
-
])])) :
|
|
4416
|
-
t.connectionDetails.type !== "demo" ? (
|
|
4417
|
-
s("div",
|
|
4363
|
+
])])) : M("", !0),
|
|
4364
|
+
t.connectionDetails.type !== "demo" ? (l(), u(pe, { key: 1 }, [
|
|
4365
|
+
s("div", co, [
|
|
4418
4366
|
e[10] || (e[10] = s("label", { for: "llm-api-key" }, "API Key", -1)),
|
|
4419
|
-
|
|
4367
|
+
D(s("input", {
|
|
4420
4368
|
type: "password",
|
|
4421
|
-
"onUpdate:modelValue": e[2] || (e[2] = (
|
|
4369
|
+
"onUpdate:modelValue": e[2] || (e[2] = (p) => t.connectionDetails.options.apiKey = p),
|
|
4370
|
+
class: "sidebar-control-input",
|
|
4422
4371
|
id: "llm-api-key",
|
|
4423
4372
|
placeholder: "API Key",
|
|
4424
4373
|
required: "",
|
|
4425
4374
|
"data-testid": "llm-connection-creator-api-key"
|
|
4426
4375
|
}, null, 512), [
|
|
4427
|
-
[
|
|
4376
|
+
[B, t.connectionDetails.options.apiKey]
|
|
4428
4377
|
])
|
|
4429
4378
|
]),
|
|
4430
|
-
s("div",
|
|
4379
|
+
s("div", uo, [
|
|
4431
4380
|
e[11] || (e[11] = s("label", { for: "save-credential" }, "Save Credential?", -1)),
|
|
4432
|
-
|
|
4381
|
+
D(s("input", {
|
|
4433
4382
|
type: "checkbox",
|
|
4434
4383
|
id: "save-credential",
|
|
4435
|
-
"onUpdate:modelValue": e[3] || (e[3] = (
|
|
4384
|
+
"onUpdate:modelValue": e[3] || (e[3] = (p) => t.connectionDetails.options.saveCredential = p),
|
|
4436
4385
|
"data-testid": "llm-connection-creator-save-credential"
|
|
4437
4386
|
}, null, 512), [
|
|
4438
|
-
[
|
|
4387
|
+
[Me, t.connectionDetails.options.saveCredential]
|
|
4439
4388
|
])
|
|
4440
4389
|
])
|
|
4441
|
-
], 64)) :
|
|
4442
|
-
s("div",
|
|
4443
|
-
|
|
4390
|
+
], 64)) : M("", !0),
|
|
4391
|
+
s("div", po, [
|
|
4392
|
+
G(a, {
|
|
4444
4393
|
"data-testid": "llm-connection-creator-submit",
|
|
4445
4394
|
action: t.handleSubmitConnection,
|
|
4446
4395
|
class: "submit-button"
|
|
4447
4396
|
}, {
|
|
4448
4397
|
default: q(() => [...e[12] || (e[12] = [
|
|
4449
|
-
|
|
4398
|
+
be(" Submit ", -1)
|
|
4450
4399
|
])]),
|
|
4451
4400
|
_: 1
|
|
4452
4401
|
}, 8, ["action"]),
|
|
4453
4402
|
s("button", {
|
|
4454
4403
|
type: "button",
|
|
4455
|
-
onClick: e[4] || (e[4] = (
|
|
4404
|
+
onClick: e[4] || (e[4] = (p) => t.close())
|
|
4456
4405
|
}, "Cancel")
|
|
4457
4406
|
])
|
|
4458
4407
|
], 32)
|
|
4459
|
-
])) :
|
|
4408
|
+
])) : M("", !0);
|
|
4460
4409
|
}
|
|
4461
|
-
const
|
|
4410
|
+
const ho = /* @__PURE__ */ Z(io, [["render", mo], ["__scopeId", "data-v-bb0a7bcc"]]), yo = {
|
|
4462
4411
|
name: "LLMConnectionList",
|
|
4463
4412
|
props: {
|
|
4464
4413
|
activeLLMKey: {
|
|
@@ -4474,184 +4423,183 @@ const yo = /* @__PURE__ */ z(ao, [["render", ho], ["__scopeId", "data-v-56d82681
|
|
|
4474
4423
|
},
|
|
4475
4424
|
emits: ["llm-open-view", "create-new-chat", "open-chat"],
|
|
4476
4425
|
setup(t, { emit: e }) {
|
|
4477
|
-
const o =
|
|
4426
|
+
const o = _("llmConnectionStore"), i = _("saveLLMConnections"), c = _("chatStore", null);
|
|
4478
4427
|
if (!o || !i)
|
|
4479
4428
|
throw new Error("LLM connection store is not provided!");
|
|
4480
|
-
const y =
|
|
4481
|
-
|
|
4482
|
-
},
|
|
4483
|
-
|
|
4484
|
-
},
|
|
4485
|
-
o.connections[
|
|
4486
|
-
},
|
|
4487
|
-
if (!o.connections[
|
|
4488
|
-
|
|
4429
|
+
const y = Je(), a = C({}), p = C({}), w = C(!1), d = C({}), S = (g) => `${g}-settings`, f = async (g, P) => {
|
|
4430
|
+
P && (await o.connections[g.name].setApiKey(P), o.resetConnection(g.name), await i());
|
|
4431
|
+
}, N = (g, P) => {
|
|
4432
|
+
P && (o.connections[g.name].setModel(P), o.resetConnection(g.name), i());
|
|
4433
|
+
}, A = (g, P) => {
|
|
4434
|
+
o.connections[g.name].setFastModel(P), i();
|
|
4435
|
+
}, m = async (g, P, v) => {
|
|
4436
|
+
if (!o.connections[P]) {
|
|
4437
|
+
p.value[g] = "Connection not found";
|
|
4489
4438
|
return;
|
|
4490
4439
|
}
|
|
4491
4440
|
try {
|
|
4492
|
-
if (a.value[
|
|
4493
|
-
const b = o.connections[
|
|
4441
|
+
if (a.value[g] = !0, v === "connection") {
|
|
4442
|
+
const b = o.connections[P];
|
|
4494
4443
|
b.testConnection && await b.testConnection();
|
|
4495
4444
|
}
|
|
4496
|
-
delete
|
|
4445
|
+
delete p.value[g];
|
|
4497
4446
|
} catch (b) {
|
|
4498
|
-
b instanceof Error ?
|
|
4447
|
+
b instanceof Error ? p.value[g] = b.message : p.value[g] = "An error occurred";
|
|
4499
4448
|
}
|
|
4500
|
-
delete a.value[
|
|
4501
|
-
},
|
|
4449
|
+
delete a.value[g];
|
|
4450
|
+
}, Q = async (g, P, v, b) => {
|
|
4502
4451
|
if (v === "new-chat") {
|
|
4503
|
-
e("create-new-chat",
|
|
4452
|
+
e("create-new-chat", P);
|
|
4504
4453
|
return;
|
|
4505
4454
|
}
|
|
4506
4455
|
if (v === "chat-item") {
|
|
4507
|
-
c && (b != null && b.chatId) && (c.setActiveChat(b.chatId), o.activeConnection =
|
|
4456
|
+
c && (b != null && b.chatId) && (c.setActiveChat(b.chatId), o.activeConnection = P), e("llm-open-view", P, "chat", b == null ? void 0 : b.chatId);
|
|
4508
4457
|
return;
|
|
4509
4458
|
}
|
|
4510
4459
|
if (v === "open-chat") {
|
|
4511
|
-
e("llm-open-view",
|
|
4460
|
+
e("llm-open-view", P, "chat");
|
|
4512
4461
|
return;
|
|
4513
4462
|
}
|
|
4514
4463
|
if (v === "open-validation") {
|
|
4515
|
-
e("llm-open-view",
|
|
4464
|
+
e("llm-open-view", P, "validation");
|
|
4516
4465
|
return;
|
|
4517
4466
|
}
|
|
4518
|
-
if (v === "connection" && (
|
|
4519
|
-
const
|
|
4520
|
-
if (!
|
|
4521
|
-
console.log(`Connection not found ${
|
|
4467
|
+
if (v === "connection" && (d.value[g] === void 0 || d.value[g] === !0)) {
|
|
4468
|
+
const k = o.connections[P];
|
|
4469
|
+
if (!k) {
|
|
4470
|
+
console.log(`Connection not found ${k}`);
|
|
4522
4471
|
return;
|
|
4523
4472
|
}
|
|
4524
|
-
(!
|
|
4473
|
+
(!k.models || k.models.length === 0) && await m(g, P, "models");
|
|
4525
4474
|
}
|
|
4526
|
-
|
|
4475
|
+
d.value[g] === void 0 ? d.value[g] = !1 : d.value[g] = !d.value[g];
|
|
4527
4476
|
};
|
|
4528
|
-
Object.entries(o.connections).forEach(([
|
|
4529
|
-
|
|
4530
|
-
|
|
4531
|
-
|
|
4532
|
-
|
|
4533
|
-
|
|
4534
|
-
|
|
4535
|
-
|
|
4536
|
-
}
|
|
4477
|
+
Object.entries(o.connections).forEach(([g]) => {
|
|
4478
|
+
d.value[g] = !0, d.value[S(g)] = !0;
|
|
4479
|
+
}), Le(() => {
|
|
4480
|
+
const g = Ze("llm-key", "");
|
|
4481
|
+
if (!g)
|
|
4482
|
+
return;
|
|
4483
|
+
const P = g.split(L), v = P[0], b = P[1];
|
|
4484
|
+
v && o.connections[v] && (d.value[v] = !1, o.activeConnection = v, b && c && c.setActiveChat(b));
|
|
4537
4485
|
});
|
|
4538
|
-
const
|
|
4539
|
-
const
|
|
4486
|
+
const ue = z(() => {
|
|
4487
|
+
const g = [];
|
|
4540
4488
|
return Object.entries(o.connections).sort(
|
|
4541
|
-
([v, b], [
|
|
4542
|
-
const
|
|
4543
|
-
return
|
|
4489
|
+
([v, b], [k, ne]) => {
|
|
4490
|
+
const X = b, V = ne;
|
|
4491
|
+
return X.connected && !V.connected ? -1 : !X.connected && V.connected ? 1 : v.localeCompare(k);
|
|
4544
4492
|
}
|
|
4545
4493
|
).forEach(([v, b]) => {
|
|
4546
|
-
var
|
|
4547
|
-
const
|
|
4548
|
-
if (
|
|
4494
|
+
var V;
|
|
4495
|
+
const k = b, ne = ((V = k.availableModels) == null ? void 0 : V.length) || 0;
|
|
4496
|
+
if (k.deleted || (g.push({
|
|
4549
4497
|
id: v,
|
|
4550
4498
|
name: v,
|
|
4551
4499
|
indent: 0,
|
|
4552
|
-
count:
|
|
4500
|
+
count: ne,
|
|
4553
4501
|
type: "connection",
|
|
4554
|
-
connection:
|
|
4555
|
-
}),
|
|
4556
|
-
|
|
4557
|
-
|
|
4558
|
-
|
|
4559
|
-
|
|
4560
|
-
|
|
4561
|
-
|
|
4562
|
-
|
|
4563
|
-
|
|
4564
|
-
|
|
4565
|
-
|
|
4566
|
-
|
|
4567
|
-
|
|
4568
|
-
|
|
4569
|
-
|
|
4570
|
-
|
|
4571
|
-
|
|
4572
|
-
|
|
4573
|
-
|
|
4574
|
-
|
|
4575
|
-
}), f.push({
|
|
4576
|
-
id: `${v}-open-validation`,
|
|
4577
|
-
name: "Validation Tests",
|
|
4578
|
-
indent: 1,
|
|
4579
|
-
count: 0,
|
|
4580
|
-
type: "open-validation",
|
|
4581
|
-
connection: I
|
|
4582
|
-
}), I.type !== "demo" && f.push({
|
|
4583
|
-
id: `${v}-api-key`,
|
|
4584
|
-
name: "API Key",
|
|
4585
|
-
indent: 1,
|
|
4586
|
-
count: 0,
|
|
4587
|
-
type: "api-key",
|
|
4588
|
-
connection: I
|
|
4589
|
-
}), f.push({
|
|
4590
|
-
id: `${v}-model`,
|
|
4591
|
-
name: "Model",
|
|
4592
|
-
indent: 1,
|
|
4593
|
-
count: 0,
|
|
4594
|
-
type: "model",
|
|
4595
|
-
connection: I
|
|
4596
|
-
}), f.push({
|
|
4597
|
-
id: `${v}-fast-model`,
|
|
4598
|
-
name: "Fast Model",
|
|
4599
|
-
indent: 1,
|
|
4600
|
-
count: 0,
|
|
4601
|
-
type: "fast-model",
|
|
4602
|
-
connection: I
|
|
4603
|
-
}), I.type !== "demo" && f.push({
|
|
4604
|
-
id: `${v}-toggle-save-credential`,
|
|
4605
|
-
name: "Toggle Save Credential",
|
|
4606
|
-
indent: 1,
|
|
4607
|
-
count: 0,
|
|
4608
|
-
type: "toggle-save-credential",
|
|
4609
|
-
connection: I
|
|
4610
|
-
}), a.value[v] && f.push({
|
|
4611
|
-
id: `${v}-loading`,
|
|
4612
|
-
name: "Loading...",
|
|
4613
|
-
indent: 1,
|
|
4614
|
-
count: 0,
|
|
4615
|
-
type: "loading",
|
|
4616
|
-
connection: I
|
|
4617
|
-
}), d.value[v] && f.push({
|
|
4618
|
-
id: `${v}-error`,
|
|
4619
|
-
name: d.value[v],
|
|
4620
|
-
indent: 1,
|
|
4621
|
-
count: 0,
|
|
4622
|
-
type: "error",
|
|
4623
|
-
connection: I
|
|
4502
|
+
connection: k
|
|
4503
|
+
}), d.value[v] !== !1))
|
|
4504
|
+
return;
|
|
4505
|
+
const X = c ? c.getConnectionChats(v) : [];
|
|
4506
|
+
g.push({
|
|
4507
|
+
id: `${v}-new-chat`,
|
|
4508
|
+
name: "New Chat",
|
|
4509
|
+
indent: 1,
|
|
4510
|
+
count: X.length,
|
|
4511
|
+
type: "new-chat",
|
|
4512
|
+
connection: k
|
|
4513
|
+
}), X.forEach((J) => {
|
|
4514
|
+
g.push({
|
|
4515
|
+
id: `${v}-chat-${J.id}`,
|
|
4516
|
+
name: J.name,
|
|
4517
|
+
indent: 2,
|
|
4518
|
+
count: J.messages.length,
|
|
4519
|
+
type: "chat-item",
|
|
4520
|
+
connection: k,
|
|
4521
|
+
chat: J,
|
|
4522
|
+
chatId: J.id
|
|
4624
4523
|
});
|
|
4625
|
-
}
|
|
4626
|
-
|
|
4524
|
+
}), g.push({
|
|
4525
|
+
id: `${v}-open-validation`,
|
|
4526
|
+
name: "Validation Tests",
|
|
4527
|
+
indent: 1,
|
|
4528
|
+
count: 0,
|
|
4529
|
+
type: "open-validation",
|
|
4530
|
+
connection: k
|
|
4531
|
+
}), g.push({
|
|
4532
|
+
id: S(v),
|
|
4533
|
+
name: "Settings",
|
|
4534
|
+
indent: 1,
|
|
4535
|
+
count: 0,
|
|
4536
|
+
type: "settings-group",
|
|
4537
|
+
connection: k
|
|
4538
|
+
}), d.value[S(v)] === !1 && (k.type !== "demo" && g.push({
|
|
4539
|
+
id: `${v}-api-key`,
|
|
4540
|
+
name: "API Key",
|
|
4541
|
+
indent: 2,
|
|
4542
|
+
count: 0,
|
|
4543
|
+
type: "api-key",
|
|
4544
|
+
connection: k
|
|
4545
|
+
}), g.push({
|
|
4546
|
+
id: `${v}-model`,
|
|
4547
|
+
name: "Model",
|
|
4548
|
+
indent: 2,
|
|
4549
|
+
count: 0,
|
|
4550
|
+
type: "model",
|
|
4551
|
+
connection: k
|
|
4552
|
+
}), g.push({
|
|
4553
|
+
id: `${v}-fast-model`,
|
|
4554
|
+
name: "Fast Model",
|
|
4555
|
+
indent: 2,
|
|
4556
|
+
count: 0,
|
|
4557
|
+
type: "fast-model",
|
|
4558
|
+
connection: k
|
|
4559
|
+
}), k.type !== "demo" && g.push({
|
|
4560
|
+
id: `${v}-toggle-save-credential`,
|
|
4561
|
+
name: "Toggle Save Credential",
|
|
4562
|
+
indent: 2,
|
|
4563
|
+
count: 0,
|
|
4564
|
+
type: "toggle-save-credential",
|
|
4565
|
+
connection: k
|
|
4566
|
+
})), a.value[v] && g.push({
|
|
4567
|
+
id: `${v}-loading`,
|
|
4568
|
+
name: "Loading...",
|
|
4569
|
+
indent: 1,
|
|
4570
|
+
count: 0,
|
|
4571
|
+
type: "loading",
|
|
4572
|
+
connection: k
|
|
4573
|
+
}), p.value[v] && g.push({
|
|
4574
|
+
id: `${v}-error`,
|
|
4575
|
+
name: p.value[v],
|
|
4576
|
+
indent: 1,
|
|
4577
|
+
count: 0,
|
|
4578
|
+
type: "error",
|
|
4579
|
+
connection: k
|
|
4580
|
+
});
|
|
4581
|
+
}), g;
|
|
4627
4582
|
});
|
|
4628
4583
|
return {
|
|
4629
4584
|
llmConnectionStore: o,
|
|
4630
4585
|
chatStore: c,
|
|
4631
|
-
contentList:
|
|
4632
|
-
toggleCollapse:
|
|
4633
|
-
collapsed:
|
|
4586
|
+
contentList: ue,
|
|
4587
|
+
toggleCollapse: Q,
|
|
4588
|
+
collapsed: d,
|
|
4634
4589
|
saveConnections: i,
|
|
4635
|
-
updateApiKey:
|
|
4636
|
-
updateModel:
|
|
4637
|
-
updateFastModel:
|
|
4638
|
-
refreshId:
|
|
4639
|
-
|
|
4640
|
-
|
|
4641
|
-
return C !== -1 ? f.substring(0, C) : f;
|
|
4642
|
-
},
|
|
4643
|
-
creatorVisible: T,
|
|
4644
|
-
isItemSelected: (f) => f.type === "chat-item" && f.chatId && c ? f.chatId === c.activeChatId : f.type === "connection" ? f.id === o.activeConnection : !1,
|
|
4590
|
+
updateApiKey: f,
|
|
4591
|
+
updateModel: N,
|
|
4592
|
+
updateFastModel: A,
|
|
4593
|
+
refreshId: m,
|
|
4594
|
+
creatorVisible: w,
|
|
4595
|
+
isItemSelected: (g) => g.type === "chat-item" && g.chatId && c ? g.chatId === c.activeChatId : g.type === "connection" ? g.id === o.activeConnection : !1,
|
|
4645
4596
|
screenNavigation: y
|
|
4646
4597
|
};
|
|
4647
4598
|
},
|
|
4648
4599
|
components: {
|
|
4649
|
-
SidebarList:
|
|
4650
|
-
LLMConnectionListItem:
|
|
4651
|
-
LLMConnectionCreator:
|
|
4652
|
-
LoadingButton: Ce,
|
|
4653
|
-
StatusIcon: Le,
|
|
4654
|
-
Tooltip: Se
|
|
4600
|
+
SidebarList: qe,
|
|
4601
|
+
LLMConnectionListItem: oo,
|
|
4602
|
+
LLMConnectionCreator: ho
|
|
4655
4603
|
},
|
|
4656
4604
|
methods: {
|
|
4657
4605
|
resetConnection(t) {
|
|
@@ -4664,7 +4612,7 @@ const yo = /* @__PURE__ */ z(ao, [["render", ho], ["__scopeId", "data-v-56d82681
|
|
|
4664
4612
|
},
|
|
4665
4613
|
deleteConnection(t, e) {
|
|
4666
4614
|
confirm(`Are you sure you want to delete the connection "${e}"?`) && (this.chatStore && this.chatStore.getConnectionChats(e).forEach((i) => {
|
|
4667
|
-
this.screenNavigation.closeTab(null, `${e}${
|
|
4615
|
+
this.screenNavigation.closeTab(null, `${e}${L}${i.id}`), this.chatStore.removeChat(i.id);
|
|
4668
4616
|
}), this.screenNavigation.closeTab(null, e), this.llmConnectionStore.connections[e].delete(), this.llmConnectionStore.activeConnection === t && (this.llmConnectionStore.activeConnection = ""));
|
|
4669
4617
|
},
|
|
4670
4618
|
deleteChat(t, e) {
|
|
@@ -4679,28 +4627,35 @@ const yo = /* @__PURE__ */ z(ao, [["render", ho], ["__scopeId", "data-v-56d82681
|
|
|
4679
4627
|
return Object.values(this.llmConnectionStore.connections);
|
|
4680
4628
|
}
|
|
4681
4629
|
}
|
|
4682
|
-
}, go = { class: "
|
|
4683
|
-
function
|
|
4684
|
-
const a =
|
|
4685
|
-
return
|
|
4686
|
-
|
|
4630
|
+
}, go = { class: "llm-header" }, fo = ["data-testid"];
|
|
4631
|
+
function wo(t, e, o, i, c, y) {
|
|
4632
|
+
const a = x("LLMConnectionCreator"), p = x("LLMConnectionListItem"), w = x("sidebar-list");
|
|
4633
|
+
return l(), W(w, { title: "AI & Agents" }, {
|
|
4634
|
+
header: q(() => [
|
|
4687
4635
|
s("div", go, [
|
|
4636
|
+
e[3] || (e[3] = s("h3", { class: "font-sans sidebar-header" }, "AI & Agents", -1)),
|
|
4688
4637
|
s("button", {
|
|
4689
|
-
|
|
4638
|
+
class: "sidebar-control-button sidebar-header-action llm-new-button",
|
|
4639
|
+
onClick: e[0] || (e[0] = (d) => i.creatorVisible = !i.creatorVisible),
|
|
4690
4640
|
"data-testid": o.testTag ? `llm-connection-creator-add-${o.testTag}` : "llm-connection-creator-add"
|
|
4691
|
-
},
|
|
4692
|
-
|
|
4693
|
-
|
|
4641
|
+
}, [
|
|
4642
|
+
e[2] || (e[2] = s("i", { class: "mdi mdi-plus" }, null, -1)),
|
|
4643
|
+
be(" " + F(i.creatorVisible ? "Close" : "New"), 1)
|
|
4644
|
+
], 8, fo)
|
|
4645
|
+
])
|
|
4646
|
+
]),
|
|
4647
|
+
actions: q(() => [
|
|
4648
|
+
G(a, {
|
|
4694
4649
|
visible: i.creatorVisible,
|
|
4695
|
-
onClose: e[1] || (e[1] = (
|
|
4650
|
+
onClose: e[1] || (e[1] = (d) => i.creatorVisible = !i.creatorVisible)
|
|
4696
4651
|
}, null, 8, ["visible"])
|
|
4697
4652
|
]),
|
|
4698
4653
|
default: q(() => [
|
|
4699
|
-
(
|
|
4700
|
-
key:
|
|
4701
|
-
item:
|
|
4702
|
-
"is-collapsed": i.collapsed[
|
|
4703
|
-
isSelected: i.isItemSelected(
|
|
4654
|
+
(l(!0), u(pe, null, we(i.contentList, (d) => (l(), W(p, {
|
|
4655
|
+
key: d.id,
|
|
4656
|
+
item: d,
|
|
4657
|
+
"is-collapsed": i.collapsed[d.id],
|
|
4658
|
+
isSelected: i.isItemSelected(d),
|
|
4704
4659
|
onToggle: i.toggleCollapse,
|
|
4705
4660
|
onRefresh: i.refreshId,
|
|
4706
4661
|
onUpdateApiKey: i.updateApiKey,
|
|
@@ -4715,10 +4670,10 @@ function To(t, e, o, i, c, y) {
|
|
|
4715
4670
|
_: 1
|
|
4716
4671
|
});
|
|
4717
4672
|
}
|
|
4718
|
-
const
|
|
4673
|
+
const Co = /* @__PURE__ */ Z(yo, [["render", wo], ["__scopeId", "data-v-be74feb0"]]);
|
|
4719
4674
|
export {
|
|
4720
|
-
|
|
4721
|
-
|
|
4722
|
-
|
|
4723
|
-
|
|
4675
|
+
Eo as C,
|
|
4676
|
+
Co as L,
|
|
4677
|
+
vt as a,
|
|
4678
|
+
So as d
|
|
4724
4679
|
};
|