@trilogy-data/trilogy-studio-components 0.1.25 → 0.1.27
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/AssetAutoImporter-OHphsfW9.js +403 -0
- package/dist/ChatCreatorModal-CuXha6Dg.js +218 -0
- package/dist/ChatModelSelect-Cz7axWjP.js +40 -0
- package/dist/{CodeBlock-PT4no49I.js → CodeBlock-BBsaC6hX.js} +4 -4
- package/dist/{CommunityModels-D7zWnHgG.js → CommunityModels-CIQQhO-y.js} +106 -75
- package/dist/{ConnectionErrorPopup-FSs7U-Yl.js → ConnectionErrorPopup-7vpqgF0s.js} +1 -1
- package/dist/{ConnectionView-COnTTuA4.js → ConnectionView-7Jj_Ggdi.js} +49 -49
- package/dist/{CreateEditorFromDatasourcePopup-snOh1d5h.js → CreateEditorFromDatasourcePopup-CrVHUWFl.js} +4 -4
- package/dist/{Dashboard-D1ZCTw5r.js → Dashboard-DxSi9W6Q.js} +276 -280
- package/dist/{DashboardImportSelector-CNxibXlS.js → DashboardImportSelector-kuDRDYi8.js} +2 -2
- package/dist/{DashboardMobile-D_m0xv17.js → DashboardMobile-CZEgTb0R.js} +39 -39
- package/dist/{DrilldownPane-CBs5ZojS.js → DrilldownPane-BheRHJMs.js} +5 -7
- package/dist/{Editor-DhsP18KE.js → Editor-D6tdutTm.js} +106 -104
- package/dist/{ErrorMessage-XMn_08gJ.js → ErrorMessage-D5JeF3Iz.js} +4 -4
- package/dist/{GlobalChatPanel-DFx9A4yP.js → GlobalChatPanel-BXZh0sdD.js} +169 -134
- package/dist/{IDE-BRMLxTfP.js → IDE-T8PmyAQ_.js} +200 -203
- package/dist/{JobsView-C9PYS6pZ.js → JobsView-Ca97MiSd.js} +12 -13
- package/dist/{LLMChat-Cqg6pTgC.js → LLMChat-Cch33Yd_.js} +3 -3
- package/dist/{LLMView-VkJpP-49.js → LLMView-BDb6wD74.js} +26 -26
- package/dist/{LoadingView-s1uznGwG.js → LoadingView-B-xFwd2N.js} +2 -2
- package/dist/{MarkdownRenderer-BNDuEyG-.js → MarkdownRenderer-BWvdx0k3.js} +531 -430
- package/dist/MobileIDE-DpdEQEqc.js +783 -0
- package/dist/{ModelCard-D8tKkK9-.js → ModelCard-DkAMP4X9.js} +19 -20
- package/dist/{ModelView-rAurf9n8.js → ModelView-DomyhN8g.js} +7 -7
- package/dist/PageLoading-BAvKGo9h.js +5937 -0
- package/dist/{ResultComponent-_-1qZCfv.js → ResultComponent-zoOSoRLe.js} +8 -8
- package/dist/{Results-CQGpFmPQ.js → Results-dq-SlJbU.js} +17 -19
- package/dist/{StatusIcon-BylPx2EO.js → StatusIcon-AbxNvJ6p.js} +2 -2
- package/dist/{StoreTokenModal-zCSYhfrw.js → StoreTokenModal-CM8WXdu1.js} +2 -2
- package/dist/{SymbolsPane-BpmL___H.js → SymbolsPane-DfaxeaPS.js} +6 -3
- package/dist/{TrilogyEmbedProvider-WA_dlv9e.js → TrilogyEmbedProvider-D3h0gYnX.js} +9 -9
- package/dist/{TutorialPage-CZGBRJdq.js → TutorialPage-BtEJG7cT.js} +27 -28
- package/dist/{VegaLiteChart-CmkOw6yD.js → VegaLiteChart-BVyAab-o.js} +12191 -10975
- package/dist/{WelcomePage-CLKvAvk-.js → WelcomePage-BoqzYBLr.js} +5 -5
- package/dist/{embedTheme-Bub46ILG.js → _plugin-vue_export-helper-f9Rw-Il4.js} +14 -6
- package/dist/assets/{css.worker-9aDGcEUy.js → css.worker-niORQtzO.js} +14 -14
- package/dist/assets/{html.worker-D2LKDpnG.js → html.worker-CO5LvJpF.js} +17 -17
- package/dist/assets/json.worker-BezHzWUV.js +58 -0
- package/dist/assets/{ts.worker-Bz0-EaKK.js → ts.worker-CYhxGg0r.js} +107 -107
- package/dist/{results-DTgAKr5j.js → base-DuKnVD-A.js} +216 -45
- package/dist/components/AssetAutoImporter.vue.d.ts.map +1 -1
- package/dist/components/FeedbackBanner.vue.d.ts +4 -0
- package/dist/components/FeedbackBanner.vue.d.ts.map +1 -0
- package/dist/components/TipsCTA.vue.d.ts +1 -1
- package/dist/components/VegaLiteChart.vue.d.ts.map +1 -1
- package/dist/components/chartHelpers.d.ts +9 -1
- package/dist/components/chartHelpers.d.ts.map +1 -1
- package/dist/components/chartRenderManager.d.ts +4 -1
- package/dist/components/chartRenderManager.d.ts.map +1 -1
- package/dist/components/community/AddStoreModal.vue.d.ts +1 -1
- package/dist/components/community/AddStoreModal.vue.d.ts.map +1 -1
- package/dist/components/community/CommunityModelCard.vue.d.ts.map +1 -1
- package/dist/components/dashboard/DashboardCreatorIcon.vue.d.ts +54 -0
- package/dist/components/dashboard/DashboardCreatorIcon.vue.d.ts.map +1 -0
- package/dist/components/dashboard/DashboardProvenance.vue.d.ts +30 -0
- package/dist/components/dashboard/DashboardProvenance.vue.d.ts.map +1 -0
- package/dist/components/dashboard/ReportLayout.vue.d.ts +19 -0
- package/dist/components/dashboard/ReportLayout.vue.d.ts.map +1 -0
- package/dist/components/editor/Editor.vue.d.ts +3 -3
- package/dist/components/editor/Editor.vue.d.ts.map +1 -1
- package/dist/components/editor/EditorCreatorIcon.vue.d.ts +62 -0
- package/dist/components/editor/EditorCreatorIcon.vue.d.ts.map +1 -0
- package/dist/components/editor/ValidationComponent.vue.d.ts +50 -0
- package/dist/components/editor/ValidationComponent.vue.d.ts.map +1 -0
- package/dist/components/jobs/JobsAddStoreModal.vue.d.ts.map +1 -1
- package/dist/components/llm/ChatCreatorModal.vue.d.ts +17 -1
- package/dist/components/llm/ChatCreatorModal.vue.d.ts.map +1 -1
- package/dist/components/llm/ChatModelSelect.vue.d.ts +13 -0
- package/dist/components/llm/ChatModelSelect.vue.d.ts.map +1 -0
- package/dist/components/llm/GlobalChatPanel.vue.d.ts.map +1 -1
- package/dist/components/model/ModelCard.vue.d.ts +3 -3
- package/dist/components/sidebar/CommunityModelList.vue.d.ts +33 -50
- package/dist/components/sidebar/CommunityModelList.vue.d.ts.map +1 -1
- package/dist/components/sidebar/CommunityModelListItem.vue.d.ts.map +1 -1
- package/dist/components/sidebar/EditorList.vue.d.ts +32 -49
- package/dist/components/sidebar/EditorList.vue.d.ts.map +1 -1
- package/dist/components/sidebar/LLMConnectionList.vue.d.ts.map +1 -1
- package/dist/components/sidebar/Sidebar.vue.d.ts +65 -99
- package/dist/components/sidebar/Sidebar.vue.d.ts.map +1 -1
- package/dist/components/tutorial/TutorialPrompt.vue.d.ts +3 -3
- package/dist/components/tutorial/TutorialPrompt.vue.d.ts.map +1 -1
- package/dist/{remoteWorker-Dkv3TJ0j.js → connections-CWH3zwH2.js} +4544 -4126
- package/dist/connections.js +3 -4
- package/dist/{cssMode-D4Rzr1Cu.js → cssMode-zpO2ap2B.js} +5 -6
- package/dist/dashboard.js +54 -57
- package/dist/dashboards/layerSpec.d.ts +38 -4
- package/dist/dashboards/layerSpec.d.ts.map +1 -1
- package/dist/dashboards/lineAreaSpec.d.ts +8 -80
- package/dist/dashboards/lineAreaSpec.d.ts.map +1 -1
- package/dist/dashboards/mapSpec.d.ts +1 -0
- package/dist/dashboards/mapSpec.d.ts.map +1 -1
- package/dist/dashboards/spec.d.ts.map +1 -1
- package/dist/data/tutorial/documentation.d.ts.map +1 -1
- package/dist/data/tutorial/startupScripts.d.ts +3 -0
- package/dist/data/tutorial/startupScripts.d.ts.map +1 -0
- package/dist/{dist-CXoL8kXK.js → dist-1z5KURzS.js} +55 -50
- package/dist/{dist-DKkuvbPb.js → dist-Bv3D2p5A.js} +20 -18
- package/dist/{editor.main-Cl8i7rHY.js → editor.main-BQh6DxDB.js} +33 -33
- package/dist/{editorRefinementRuntime-C_YmXRy4.js → editorStore-CAlMJftt.js} +2084 -946
- package/dist/embed.js +2 -2
- package/dist/entry.dashboard.d.ts +1 -0
- package/dist/entry.dashboard.d.ts.map +1 -1
- package/dist/{freemarker2-fW5NBILf.js → freemarker2-DQBqlEXc.js} +1 -1
- package/dist/{globalChatRuntime-oMLiPLNC.js → globalChatRuntime-CyS7vH51.js} +18 -18
- package/dist/{handlebars-dG4w8UUY.js → handlebars-tgYxaM70.js} +1 -1
- package/dist/{helpers-DcWCa6bX.js → helpers-BbVlA3Pf.js} +39 -39
- package/dist/{html-1Dq70BdU.js → html-jJahD3Mi.js} +1 -1
- package/dist/{htmlMode--IQmLBeh.js → htmlMode-BA1-8l2e.js} +5 -6
- package/dist/{javascript-CTzBM4sF.js → javascript-Cypfo7va.js} +1 -1
- package/dist/{jsonMode-DzeJjIEH.js → jsonMode-xJye8PWS.js} +25 -25
- package/dist/{liquid-DlHThiki.js → liquid-BGDrv5da.js} +1 -1
- package/dist/llm/data/constants.d.ts +1 -1
- package/dist/llm/data/constants.d.ts.map +1 -1
- package/dist/llm/data/trilogySyntax.generated.d.ts +7 -1
- package/dist/llm/data/trilogySyntax.generated.d.ts.map +1 -1
- package/dist/llm/docsIndex.d.ts.map +1 -1
- package/dist/llm/openai.d.ts +2 -1
- package/dist/llm/openai.d.ts.map +1 -1
- package/dist/llm-ClU-2rgk.js +18493 -0
- package/dist/llm.js +2 -3
- package/dist/{localStorage-CSuYS7QE.js → localStorage-CGQ1iJXt.js} +39 -42
- package/dist/{lspLanguageFeatures-Cdfs3EKq.js → lspLanguageFeatures-V3e_p9oN.js} +32 -32
- package/dist/{mdx-fn3g4PH5.js → mdx-BUR1aImW.js} +1 -1
- package/dist/models/helpers.d.ts.map +1 -1
- package/dist/monaco.js +3 -3
- package/dist/{python-CCVj0pFt.js → python-YLkl0pc6.js} +1 -1
- package/dist/{razor-Cj3flYnk.js → razor-BP8TRMDY.js} +1 -1
- package/dist/{reconcile-Bk7M797_.js → reconcile-DXIvGwBk.js} +1 -1
- package/dist/{remoteStoreSync-CLvZJrTK.js → remoteStoreSync-CuQBWpWf.js} +3 -3
- package/dist/remotes/displayHelpers.d.ts.map +1 -1
- package/dist/remotes/genericStoreMetadata.d.ts +1 -0
- package/dist/remotes/genericStoreMetadata.d.ts.map +1 -1
- package/dist/remotes/models.d.ts +37 -5
- package/dist/remotes/models.d.ts.map +1 -1
- package/dist/remotes/staticStorePresets.d.ts +22 -0
- package/dist/remotes/staticStorePresets.d.ts.map +1 -0
- package/dist/remotes/storeService.d.ts +25 -4
- package/dist/remotes/storeService.d.ts.map +1 -1
- package/dist/{rolldown-runtime-Dqa2HsxW.js → rolldown-runtime-B0aSnxlc.js} +2 -2
- package/dist/static/test_import.vue.d.ts +4 -0
- package/dist/static/test_import.vue.d.ts.map +1 -0
- package/dist/stores/communityApiStore.d.ts +32 -60
- package/dist/stores/communityApiStore.d.ts.map +1 -1
- package/dist/stores/connectionStore.d.ts.map +1 -1
- package/dist/stores/resolver.d.ts +5 -0
- package/dist/stores/resolver.d.ts.map +1 -1
- package/dist/stores/urlStore.d.ts +1 -0
- package/dist/stores/urlStore.d.ts.map +1 -1
- package/dist/stores-LlyiwSbK.js +2604 -0
- package/dist/stores.js +4 -7
- package/dist/trilogy-studio-components.css +1 -1
- package/dist/{tsMode-GI4xMYAl.js → tsMode-BH9HS_sH.js} +64 -66
- package/dist/{typescript-CPibXi3J.js → typescript-BM-ynfk9.js} +1 -1
- package/dist/{useChatWithTools-GV1ufcqw.js → useChatWithTools-m3Jn_SV-.js} +11 -11
- package/dist/{useDashboard-OoBKkkuQ.js → useDashboard-BOAuvVEw.js} +1013 -1021
- package/dist/{tabulator_esm-CxLvGDp8.js → useGlobalChatPanel-DuP1q7_f.js} +1729 -711
- package/dist/{useResizableDialog-B0ePSts4.js → useResizableDialog-Cs90WJdF.js} +2 -2
- package/dist/views/MobileIDE.vue.d.ts.map +1 -1
- package/dist/views/ModelView.vue.d.ts +6 -6
- package/dist/views/ModelView.vue.d.ts.map +1 -1
- package/dist/views/TutorialPage.vue.d.ts +41 -58
- package/dist/views/TutorialPage.vue.d.ts.map +1 -1
- package/dist/views.js +193 -195
- package/dist/{editor.api2-ClD5pp8H.js → workers-B9Eybl-M.js} +16252 -15926
- package/dist/{xml-BNyphceI.js → xml-M5WFPSpA.js} +1 -1
- package/dist/{yaml-DE5Vz0PH.js → yaml-CEeFwjz9.js} +1 -1
- package/package.json +29 -20
- package/dist/AssetAutoImporter-DfMd_DSk.js +0 -403
- package/dist/ChatCreatorModal-BTqY06B6.js +0 -177
- package/dist/DashboardCreatorInline-LWvf--2x.js +0 -129
- package/dist/DataTable-DoRDynP1.js +0 -365
- package/dist/EditorCreatorInline-D6_y1H_h.js +0 -125
- package/dist/LoadingButton-OH3frQuO.js +0 -138
- package/dist/MobileIDE-CHGJoh05.js +0 -781
- package/dist/ModalDialog-D1EOG4rl.js +0 -42
- package/dist/ModelCreator-DrxLxeyH.js +0 -253
- package/dist/PageLoading-I6mr-7NB.js +0 -2666
- package/dist/Tooltip-Dihir4zs.js +0 -103
- package/dist/_plugin-vue_export-helper-B3ysoDQm.js +0 -8
- package/dist/assets/json.worker-CJ5MmO5Q.js +0 -58
- package/dist/base-C8IuZWqY.js +0 -164
- package/dist/connectionHistoryStorage-DKJHiKJY.js +0 -111
- package/dist/connectionHistoryStore-DQeBvStZ.js +0 -61
- package/dist/connections-CJSb1TZl.js +0 -229
- package/dist/constants-DgFEYN2b.js +0 -7
- package/dist/dashboardStore-CNkWQ4r7.js +0 -641
- package/dist/demoSetup-DiW3ROFQ.js +0 -2941
- package/dist/editorRefinementToolExecutor-mX8ClQ63.js +0 -4498
- package/dist/editorStore-Ch7k-gse.js +0 -972
- package/dist/formatting-BbJ5ICgh.js +0 -6
- package/dist/llm-_807I79k.js +0 -11965
- package/dist/llmStore-CSzM1IZd.js +0 -153
- package/dist/monaco.contribution-ikesdolO.js +0 -128
- package/dist/stores-C1wUWiFm.js +0 -1708
- package/dist/trilogy-BroD2Qmp.js +0 -4
- package/dist/urlStore-Dgmwx1YI.js +0 -54
- package/dist/useGlobalChatPanel-CIeUyZba.js +0 -85
- package/dist/useIsMobile-CNpUQAvk.js +0 -8
- package/dist/usePrismHighlight-DVyDiDAL.js +0 -183
- package/dist/workers-Br7ThUKL.js +0 -47
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { p as e } from "./workers-B9Eybl-M.js";
|
|
2
2
|
//#region node_modules/.pnpm/monaco-editor@0.55.1/node_modules/monaco-editor/esm/vs/basic-languages/xml/xml.js
|
|
3
3
|
var t = {
|
|
4
4
|
comments: { blockComment: ["<!--", "-->"] },
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@trilogy-data/trilogy-studio-components",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.27",
|
|
4
4
|
"private": false,
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -66,42 +66,51 @@
|
|
|
66
66
|
},
|
|
67
67
|
"devDependencies": {
|
|
68
68
|
"@trilogy-data/prism-trilogy": "link:../prism-trilogy",
|
|
69
|
-
"@types/luxon": "^3.7.
|
|
69
|
+
"@types/luxon": "^3.7.5",
|
|
70
70
|
"@types/prismjs": "^1.26.6",
|
|
71
71
|
"@types/tabulator-tables": "^6.3.6",
|
|
72
|
-
"@vitejs/plugin-vue": "^6.0.
|
|
73
|
-
"@vitest/ui": "^4.1.
|
|
74
|
-
"@vue/test-utils": "^2.
|
|
72
|
+
"@vitejs/plugin-vue": "^6.0.9",
|
|
73
|
+
"@vitest/ui": "^4.1.11",
|
|
74
|
+
"@vue/test-utils": "^2.5.1",
|
|
75
75
|
"@vue/tsconfig": "^0.9.1",
|
|
76
76
|
"jsdom": "^29.1.1",
|
|
77
|
-
"pinia": "^4.0.
|
|
78
|
-
"prettier": "^3.9.
|
|
77
|
+
"pinia": "^4.0.3",
|
|
78
|
+
"prettier": "^3.9.9",
|
|
79
79
|
"prismjs": "^1.30.0",
|
|
80
80
|
"typescript": "~5.9.3",
|
|
81
|
-
"vite": "^8.1
|
|
82
|
-
"vite-plugin-dts": "^5.
|
|
81
|
+
"vite": "^8.3.1",
|
|
82
|
+
"vite-plugin-dts": "^5.1.1",
|
|
83
83
|
"vite-plugin-node-polyfills": "^0.28.0",
|
|
84
|
-
"vitest": "^4.1.
|
|
85
|
-
"vue": "^3.5.
|
|
86
|
-
"vue-tsc": "^3.3.
|
|
84
|
+
"vitest": "^4.1.11",
|
|
85
|
+
"vue": "^3.5.43",
|
|
86
|
+
"vue-tsc": "^3.3.11"
|
|
87
87
|
},
|
|
88
88
|
"dependencies": {
|
|
89
89
|
"@duckdb/duckdb-wasm": "1.32.0",
|
|
90
|
-
"@google/genai": "^2.
|
|
90
|
+
"@google/genai": "^2.24.0",
|
|
91
91
|
"@mdi/js": "^7.4.47",
|
|
92
92
|
"@motherduck/wasm-client": "^0.8.1",
|
|
93
|
-
"apache-arrow": "^21.
|
|
94
|
-
"dompurify": "^3.4.
|
|
95
|
-
"jose": "^6.2.
|
|
93
|
+
"apache-arrow": "^21.2.0",
|
|
94
|
+
"dompurify": "^3.4.16",
|
|
95
|
+
"jose": "^6.2.12",
|
|
96
96
|
"luxon": "^3.7.2",
|
|
97
97
|
"modern-screenshot": "4.7.0",
|
|
98
98
|
"monaco-editor": "^0.55.1",
|
|
99
99
|
"split.js": "^1.6.5",
|
|
100
|
-
"sql.js": "^1.14.
|
|
101
|
-
"tabulator-tables": "^6.5.
|
|
102
|
-
"vega": "^6.
|
|
103
|
-
"vega-embed": "^7.
|
|
100
|
+
"sql.js": "^1.14.2",
|
|
101
|
+
"tabulator-tables": "^6.5.3",
|
|
102
|
+
"vega": "^6.4.0",
|
|
103
|
+
"vega-embed": "^7.3.0",
|
|
104
104
|
"vega-lite": "^6.4.3",
|
|
105
105
|
"vue3-grid-layout-next": "^1.0.7"
|
|
106
|
+
},
|
|
107
|
+
"pnpm": {
|
|
108
|
+
"overrides": {
|
|
109
|
+
"monaco-editor>dompurify": "^3.4.16",
|
|
110
|
+
"lodash": "^4.18.0",
|
|
111
|
+
"minimatch@>=10.0.0 <10.2.3": "^10.2.3",
|
|
112
|
+
"ajv@>=7.0.0 <8.18.0": "^8.18.0",
|
|
113
|
+
"rollup@>=4.0.0 <4.59.0": "^4.59.0"
|
|
114
|
+
}
|
|
106
115
|
}
|
|
107
116
|
}
|
|
@@ -1,403 +0,0 @@
|
|
|
1
|
-
import { n as e } from "./rolldown-runtime-Dqa2HsxW.js";
|
|
2
|
-
import { t } from "./_plugin-vue_export-helper-B3ysoDQm.js";
|
|
3
|
-
import { i as n } from "./stores-C1wUWiFm.js";
|
|
4
|
-
import { l as r, n as i, s as a, u as o } from "./editorStore-Ch7k-gse.js";
|
|
5
|
-
import "./dashboardStore-CNkWQ4r7.js";
|
|
6
|
-
import { i as s, n as c, t as l } from "./urlStore-Dgmwx1YI.js";
|
|
7
|
-
import { t as ee } from "./trilogy-BroD2Qmp.js";
|
|
8
|
-
import { t as te } from "./helpers-DcWCa6bX.js";
|
|
9
|
-
import { n as u, r as d } from "./remoteStoreSync-CLvZJrTK.js";
|
|
10
|
-
import { Fragment as f, computed as p, createCommentVNode as m, createElementBlock as h, createElementVNode as g, createTextVNode as _, createVNode as ne, defineComponent as re, inject as v, normalizeClass as y, onBeforeUnmount as ie, onMounted as ae, openBlock as b, ref as x, toDisplayString as S, unref as oe, vModelText as C, withDirectives as w } from "vue";
|
|
11
|
-
//#region components/AssetAutoImporter.vue?vue&type=script&setup=true&lang.ts
|
|
12
|
-
var se = { class: "auto-import-container" }, ce = {
|
|
13
|
-
key: 0,
|
|
14
|
-
class: "import-state error-state"
|
|
15
|
-
}, le = { class: "import-headline" }, ue = { class: "error-message" }, de = {
|
|
16
|
-
key: 1,
|
|
17
|
-
class: "import-state loading-state"
|
|
18
|
-
}, fe = { class: "loading-content" }, pe = ["src"], me = { class: "import-headline" }, he = { class: "step-indicator" }, ge = { class: "step-icon" }, _e = { key: 0 }, ve = { key: 1 }, ye = { class: "step-icon" }, be = { key: 0 }, xe = { key: 1 }, Se = { key: 2 }, Ce = { class: "step-icon" }, we = { key: 0 }, Te = { key: 1 }, Ee = { key: 2 }, De = { class: "step-icon" }, Oe = { key: 0 }, ke = { key: 1 }, Ae = { key: 2 }, je = { class: "step-text" }, Me = {
|
|
19
|
-
key: 2,
|
|
20
|
-
class: "import-form"
|
|
21
|
-
}, Ne = { class: "import-header" }, Pe = { class: "import-headline" }, Fe = { class: "import-details" }, Ie = {
|
|
22
|
-
key: 0,
|
|
23
|
-
class: "import-source"
|
|
24
|
-
}, Le = { class: "import-source" }, Re = { class: "connection-setup" }, ze = { class: "setup-description" }, Be = {
|
|
25
|
-
key: 0,
|
|
26
|
-
class: "form-group"
|
|
27
|
-
}, Ve = {
|
|
28
|
-
key: 1,
|
|
29
|
-
class: "form-group"
|
|
30
|
-
}, He = { class: "form-group" }, Ue = { class: "form-group" }, We = { class: "form-group" }, Ge = { class: "form-actions" }, Ke = ["disabled"], qe = 1500, T = /*@__PURE__*/ re({
|
|
31
|
-
__name: "AssetAutoImporter",
|
|
32
|
-
emits: ["importComplete", "fullScreen"],
|
|
33
|
-
setup(e, { emit: t }) {
|
|
34
|
-
let re = t, T = v("dashboardStore"), E = v("connectionStore"), D = v("editorStore"), O = v("modelStore"), k = v("communityApiStore"), A = v("queryExecutionService"), Je = v("saveDashboards"), Ye = v("saveAll"), Xe = v("storageSources", []), j = n(), Ze = p(() => Xe.find((e) => e.type === "remote"));
|
|
35
|
-
if (!T || !E || !D || !O || !Je || !A || !Ye) throw Error("Required stores not provided");
|
|
36
|
-
let M = x(!0), N = x(""), P = x(""), Qe = x(""), F = x(""), I = x(!1), L = x(""), R = x("dashboard"), z = x(""), B = x(""), V = x(null), H = x(!1), $e = x(""), U = x(!1), W = x("importing"), G = x(Date.now()), et = x(Date.now()), tt = x("0 ms"), K = null, q = x({
|
|
37
|
-
mdToken: "",
|
|
38
|
-
projectId: "",
|
|
39
|
-
username: "",
|
|
40
|
-
password: "",
|
|
41
|
-
account: "",
|
|
42
|
-
sshPrivateKey: ""
|
|
43
|
-
}), J = x(!0), Y = {
|
|
44
|
-
duckdb: {
|
|
45
|
-
fields: [],
|
|
46
|
-
autoImport: !0
|
|
47
|
-
},
|
|
48
|
-
motherduck: {
|
|
49
|
-
fields: ["mdToken"],
|
|
50
|
-
autoImport: !1
|
|
51
|
-
},
|
|
52
|
-
bigquery: {
|
|
53
|
-
fields: ["projectId"],
|
|
54
|
-
autoImport: !1
|
|
55
|
-
},
|
|
56
|
-
snowflake: {
|
|
57
|
-
fields: [
|
|
58
|
-
"username",
|
|
59
|
-
"account",
|
|
60
|
-
"sshPrivateKey"
|
|
61
|
-
],
|
|
62
|
-
autoImport: !1
|
|
63
|
-
}
|
|
64
|
-
}, nt = p(() => {
|
|
65
|
-
if (I.value) return !1;
|
|
66
|
-
let e = Y[B.value];
|
|
67
|
-
return !e || !e.autoImport;
|
|
68
|
-
}), rt = p(() => {
|
|
69
|
-
let e = Y[B.value];
|
|
70
|
-
return e ? e.fields : [];
|
|
71
|
-
}), it = p(() => {
|
|
72
|
-
let e = i.find((e) => e.value === B.value);
|
|
73
|
-
return e ? e.label : B.value;
|
|
74
|
-
}), X = p(() => {
|
|
75
|
-
switch (R.value) {
|
|
76
|
-
case "dashboard": return "Dashboard";
|
|
77
|
-
case "editor":
|
|
78
|
-
case "trilogy": return "Editor";
|
|
79
|
-
default: return "Asset";
|
|
80
|
-
}
|
|
81
|
-
}), at = p(() => `A model named "${z.value}" already exists. Overwriting will replace its imported sources. Continue?`), ot = p(() => {
|
|
82
|
-
switch (R.value) {
|
|
83
|
-
case "dashboard": return "Setting up your dashboard...";
|
|
84
|
-
case "editor":
|
|
85
|
-
case "trilogy": return "Setting up your editor...";
|
|
86
|
-
default: return "Setting up your asset...";
|
|
87
|
-
}
|
|
88
|
-
}), st = (e) => 100, Z = () => {
|
|
89
|
-
Q();
|
|
90
|
-
let e = Date.now() - et.value;
|
|
91
|
-
if (e < 1e3) tt.value = `${e} ms`;
|
|
92
|
-
else if (e < 6e4) {
|
|
93
|
-
let t = (e / 1e3).toFixed(1);
|
|
94
|
-
tt.value = `${t} sec`;
|
|
95
|
-
} else {
|
|
96
|
-
let t = Math.floor(e / 6e4), n = (e % 6e4 / 1e3).toFixed(1);
|
|
97
|
-
tt.value = n === "0.0" ? `${t} min` : `${t} min ${n} sec`;
|
|
98
|
-
}
|
|
99
|
-
if (!V.value && (M.value || H.value)) {
|
|
100
|
-
let t = st(e);
|
|
101
|
-
K = setTimeout(Z, t);
|
|
102
|
-
}
|
|
103
|
-
}, Q = () => {
|
|
104
|
-
K &&= (clearTimeout(K), null);
|
|
105
|
-
}, ct = async (e) => {
|
|
106
|
-
let t = Date.now() - G.value, n = Math.max(0, qe - t);
|
|
107
|
-
n > 0 && W.value !== "registering" && W.value !== "importing" && await new Promise((e) => setTimeout(e, n)), W.value = e, G.value = Date.now();
|
|
108
|
-
};
|
|
109
|
-
function $() {
|
|
110
|
-
if (!B.value) {
|
|
111
|
-
J.value = !1;
|
|
112
|
-
return;
|
|
113
|
-
}
|
|
114
|
-
let e = rt.value;
|
|
115
|
-
for (let t of e) if (!q.value[t]) {
|
|
116
|
-
J.value = !1;
|
|
117
|
-
return;
|
|
118
|
-
}
|
|
119
|
-
J.value = !0;
|
|
120
|
-
}
|
|
121
|
-
let lt = (e) => Qe.value || r(e), ut = async () => {
|
|
122
|
-
if (!P.value || !k) return;
|
|
123
|
-
let e = o(P.value), t = lt(e), n = k.stores.find((e) => e.id === t);
|
|
124
|
-
if (n) {
|
|
125
|
-
n.type === "generic" && (F.value && (n.token = F.value), I.value && z.value && (n.name = z.value)), console.log(`Store ${t} already registered`);
|
|
126
|
-
return;
|
|
127
|
-
}
|
|
128
|
-
let r = {
|
|
129
|
-
type: "generic",
|
|
130
|
-
id: t,
|
|
131
|
-
name: I.value && z.value ? z.value : `Auto-registered: ${e}`,
|
|
132
|
-
baseUrl: e,
|
|
133
|
-
token: F.value || void 0
|
|
134
|
-
};
|
|
135
|
-
try {
|
|
136
|
-
await k.addStore(r), console.log(`Store ${t} registered successfully`);
|
|
137
|
-
} catch (e) {
|
|
138
|
-
console.warn(`Failed to register store ${t}:`, e);
|
|
139
|
-
}
|
|
140
|
-
}, dt = () => {
|
|
141
|
-
if (!P.value || !k) return null;
|
|
142
|
-
let e = o(P.value), t = lt(e), n = k.stores.find((e) => e.id === t);
|
|
143
|
-
return n?.type === "generic" ? n : null;
|
|
144
|
-
}, ft = () => {
|
|
145
|
-
U.value = !1, V.value = `Import cancelled. Existing model "${z.value}" was not overwritten.`, M.value = !1, Q();
|
|
146
|
-
}, pt = async () => {
|
|
147
|
-
U.value = !1, V.value = null, await _t();
|
|
148
|
-
}, mt = async () => {
|
|
149
|
-
if (!I.value && O.models[z.value]) {
|
|
150
|
-
M.value = !1, Q(), U.value = !0;
|
|
151
|
-
return;
|
|
152
|
-
}
|
|
153
|
-
await _t();
|
|
154
|
-
}, ht = async () => {
|
|
155
|
-
if (!Ze.value) throw Error("Remote storage is not available in this context.");
|
|
156
|
-
let e = dt();
|
|
157
|
-
if (!e) throw Error("Remote imports require a valid store URL that can be registered.");
|
|
158
|
-
await u(Ze.value, e.id, D, E, O);
|
|
159
|
-
let t = a(e);
|
|
160
|
-
if (R.value === "dashboard") {
|
|
161
|
-
let e = Object.values(T.dashboards).find((e) => e.name === L.value && e.connection === t);
|
|
162
|
-
if (!e) throw Error(`Dashboard "${L.value}" is not part of the remote store. Remote stores don't serve dashboards — create one locally against this store's connection first.`);
|
|
163
|
-
return T.warmDashboardQueries(e.id, A, D), {
|
|
164
|
-
foundAssetId: e.id,
|
|
165
|
-
connectionName: t
|
|
166
|
-
};
|
|
167
|
-
}
|
|
168
|
-
let n = `remote:${e.id}:`, r = Object.values(D.editors).filter((e) => e.id.startsWith(n) && e.connection === t), i = (e) => e.replace(/\.[^.]+$/, ""), o = r.find((e) => e.name === L.value || i(e.name) === L.value);
|
|
169
|
-
if (!o) {
|
|
170
|
-
let e = r.map((e) => e.name).join(", ");
|
|
171
|
-
throw Error(`Editor "${L.value}" was not found in the remote store, have ${e}`);
|
|
172
|
-
}
|
|
173
|
-
return {
|
|
174
|
-
foundAssetId: o.id,
|
|
175
|
-
connectionName: t
|
|
176
|
-
};
|
|
177
|
-
}, gt = async () => {
|
|
178
|
-
let e = `${z.value}-connection`, t = new te(D, O, T);
|
|
179
|
-
O.models[z.value] || O.newModelConfig(z.value, !0), E.connectionByName(e) || E.newConnection(e, B.value, {
|
|
180
|
-
mdToken: q.value.mdToken,
|
|
181
|
-
projectId: q.value.projectId,
|
|
182
|
-
username: q.value.username,
|
|
183
|
-
password: q.value.password,
|
|
184
|
-
account: q.value.account,
|
|
185
|
-
privateKey: q.value.sshPrivateKey,
|
|
186
|
-
model: z.value
|
|
187
|
-
});
|
|
188
|
-
let n = dt(), r = await t.importModel(z.value, N.value, e, {
|
|
189
|
-
token: F.value || void 0,
|
|
190
|
-
remote: !1,
|
|
191
|
-
remoteStoreId: n?.id || null,
|
|
192
|
-
remoteBaseUrl: n?.baseUrl || P.value || null
|
|
193
|
-
});
|
|
194
|
-
if (E.connectionByName(e)?.setModel(z.value), R.value === "dashboard") {
|
|
195
|
-
let t = r?.dashboards.get(L.value), n = t ? T.dashboards[t] : void 0;
|
|
196
|
-
if (!n) {
|
|
197
|
-
let t = Object.values(T.dashboards).filter((t) => t.connection === e && t.storage !== "remote").map((e) => e.name).join(", ");
|
|
198
|
-
throw Error(`Dashboard "${L.value}" was not found in the imported model, have ${t}`);
|
|
199
|
-
}
|
|
200
|
-
return T.warmDashboardQueries(n.id, A, D), {
|
|
201
|
-
foundAssetId: n.id,
|
|
202
|
-
connectionName: e
|
|
203
|
-
};
|
|
204
|
-
}
|
|
205
|
-
let i = r?.trilogy.get(L.value) || r?.sql.get(L.value) || r?.python.get(L.value), a = i ? D.editors[i] : void 0;
|
|
206
|
-
if (!a) {
|
|
207
|
-
let t = Object.values(D.editors).filter((t) => t.connection === e && t.storage !== "remote").map((e) => e.name).join(", ");
|
|
208
|
-
throw Error(`Editor "${L.value}" was not found in the imported model, have ${t}`);
|
|
209
|
-
}
|
|
210
|
-
return {
|
|
211
|
-
foundAssetId: a.id,
|
|
212
|
-
connectionName: e
|
|
213
|
-
};
|
|
214
|
-
}, _t = async () => {
|
|
215
|
-
try {
|
|
216
|
-
if (!z.value || !L.value) {
|
|
217
|
-
V.value = "Missing required import parameters";
|
|
218
|
-
return;
|
|
219
|
-
}
|
|
220
|
-
if (!I.value && !N.value) {
|
|
221
|
-
V.value = "Missing required import parameters";
|
|
222
|
-
return;
|
|
223
|
-
}
|
|
224
|
-
et.value = Date.now(), G.value = Date.now(), M.value = !0, Z(), P.value ? (W.value = "registering", await ut(), await ct("importing")) : W.value = "importing";
|
|
225
|
-
let { foundAssetId: e, connectionName: t } = I.value ? await ht() : await gt();
|
|
226
|
-
await ct("connecting"), $e.value = e, I.value || await Ye();
|
|
227
|
-
let n = E.connectionByName(t);
|
|
228
|
-
n && await E.resetConnection(n.id), await ct("preparing"), M.value = !1, H.value = !0, K && clearTimeout(K), Z(), setTimeout(() => {
|
|
229
|
-
Q();
|
|
230
|
-
}, 2e3), re("importComplete", e, R.value), s(l.IMPORT), s(l.STORE), s(l.STORE_ID), s(l.TOKEN), s(l.ASSET_TYPE), s(l.ASSET_NAME), s(l.DASHBOARD), s(l.REMOTE), setTimeout(() => {
|
|
231
|
-
j.closeTab(null, "asset-import"), R.value === "dashboard" ? (j.openTab("dashboard", null, e), j.setActiveSidebarScreen("dashboard")) : (j.openTab("editors", null, e), j.setActiveSidebarScreen("editors"));
|
|
232
|
-
}, 500);
|
|
233
|
-
} catch (e) {
|
|
234
|
-
console.error("Import failed:", e), V.value = e instanceof Error ? e.message : "Import failed", M.value = !1, Q();
|
|
235
|
-
}
|
|
236
|
-
};
|
|
237
|
-
ae(async () => {
|
|
238
|
-
try {
|
|
239
|
-
et.value = Date.now(), G.value = Date.now(), Z();
|
|
240
|
-
let e = j.modelImport.value, t = c(l.STORE, ""), n = c(l.STORE_ID, ""), r = c(l.TOKEN, ""), i = c(l.REMOTE, ""), a = c(l.ASSET_TYPE, ""), o = c(l.ASSET_NAME, ""), s = c(l.DASHBOARD, ""), ee = c(l.MODEL_NAME, ""), te = c(l.CONNECTION, ""), u = "dashboard", d = "";
|
|
241
|
-
a && o ? (u = a, d = o) : s && (u = "dashboard", d = s);
|
|
242
|
-
let f = [
|
|
243
|
-
"true",
|
|
244
|
-
"1",
|
|
245
|
-
"yes"
|
|
246
|
-
].includes((i || "").toLowerCase());
|
|
247
|
-
if (!d || !ee || !f && (!e || !te) || f && !t) {
|
|
248
|
-
V.value = f ? "Missing required import parameters (store, assetName/dashboard, modelName)" : "Missing required import parameters (import, assetName/dashboard, modelName, connection)", M.value = !1, Q();
|
|
249
|
-
return;
|
|
250
|
-
}
|
|
251
|
-
if (N.value = e ? decodeURIComponent(e) : "", P.value = t ? decodeURIComponent(t) : "", Qe.value = n ? decodeURIComponent(n) : "", F.value = r ? decodeURIComponent(r) : "", I.value = f, L.value = decodeURIComponent(d), R.value = u, z.value = decodeURIComponent(ee), B.value = te, !I.value && !Y[B.value]) {
|
|
252
|
-
V.value = `Unsupported connection type: ${B.value}`, M.value = !1, Q();
|
|
253
|
-
return;
|
|
254
|
-
}
|
|
255
|
-
nt.value ? (M.value = !1, Q(), $()) : await mt();
|
|
256
|
-
} catch (e) {
|
|
257
|
-
console.error("Auto-import initialization failed:", e), V.value = e instanceof Error ? e.message : "Failed to initialize import", M.value = !1, Q();
|
|
258
|
-
}
|
|
259
|
-
}), ie(() => {
|
|
260
|
-
Q();
|
|
261
|
-
});
|
|
262
|
-
let vt = async () => {
|
|
263
|
-
if (M.value = !0, !J.value) throw Error("Form is not valid");
|
|
264
|
-
console.log("performing import"), await mt();
|
|
265
|
-
}, yt = () => {
|
|
266
|
-
R.value === "dashboard" ? (j.setActiveDashboard(null), j.setActiveScreen("dashboard")) : j.setActiveScreen("editors");
|
|
267
|
-
};
|
|
268
|
-
return (e, t) => (b(), h("div", se, [V.value ? (b(), h("div", ce, [
|
|
269
|
-
t[5] ||= g("div", { class: "error-icon" }, "⚠️", -1),
|
|
270
|
-
g("h2", le, S(X.value) + " Load Failed", 1),
|
|
271
|
-
g("p", ue, S(V.value), 1),
|
|
272
|
-
g("div", { class: "error-actions" }, [g("button", {
|
|
273
|
-
onClick: yt,
|
|
274
|
-
class: "manual-import-button"
|
|
275
|
-
}, " Try Manual Import ")])
|
|
276
|
-
])) : M.value || H.value ? (b(), h("div", de, [g("div", fe, [
|
|
277
|
-
g("img", {
|
|
278
|
-
src: oe(ee),
|
|
279
|
-
class: "trilogy-icon spinning",
|
|
280
|
-
alt: "Loading"
|
|
281
|
-
}, null, 8, pe),
|
|
282
|
-
g("h2", me, S(ot.value), 1),
|
|
283
|
-
g("div", he, [
|
|
284
|
-
P.value ? (b(), h("div", {
|
|
285
|
-
key: 0,
|
|
286
|
-
class: y(["step", {
|
|
287
|
-
active: W.value === "registering",
|
|
288
|
-
completed: W.value !== "registering"
|
|
289
|
-
}])
|
|
290
|
-
}, [g("div", ge, [W.value === "registering" ? (b(), h("span", _e, "⟳")) : (b(), h("span", ve, "✓"))]), t[6] ||= g("span", { class: "step-text" }, "Registering store", -1)], 2)) : m("", !0),
|
|
291
|
-
g("div", { class: y(["step", {
|
|
292
|
-
active: W.value === "importing",
|
|
293
|
-
completed: W.value !== "importing" && W.value !== "registering" && (W.value === "connecting" || W.value === "preparing" || H.value)
|
|
294
|
-
}]) }, [g("div", ye, [W.value === "importing" ? (b(), h("span", be, "⟳")) : W.value === "registering" ? (b(), h("span", xe, "○")) : (b(), h("span", Se, "✓"))]), t[7] ||= g("span", { class: "step-text" }, "Importing model", -1)], 2),
|
|
295
|
-
g("div", { class: y(["step", {
|
|
296
|
-
active: W.value === "connecting",
|
|
297
|
-
completed: W.value === "preparing" || H.value
|
|
298
|
-
}]) }, [g("div", Ce, [W.value === "connecting" ? (b(), h("span", we, "⟳")) : W.value === "preparing" || H.value ? (b(), h("span", Te, "✓")) : (b(), h("span", Ee, "○"))]), t[8] ||= g("span", { class: "step-text" }, "Establishing connection", -1)], 2),
|
|
299
|
-
g("div", { class: y(["step", {
|
|
300
|
-
active: W.value === "preparing" || H.value,
|
|
301
|
-
completed: H.value
|
|
302
|
-
}]) }, [g("div", De, [W.value === "preparing" ? (b(), h("span", Oe, "⟳")) : H.value ? (b(), h("span", ke, "✓")) : (b(), h("span", Ae, "○"))]), g("span", je, "Preparing " + S(X.value.toLowerCase()), 1)], 2)
|
|
303
|
-
]),
|
|
304
|
-
t[9] ||= g("p", { class: "import-details" }, "This may take a few seconds.", -1)
|
|
305
|
-
])])) : nt.value ? (b(), h("div", Me, [
|
|
306
|
-
g("div", Ne, [g("h2", Pe, "Import Model & " + S(X.value), 1), g("div", Fe, [
|
|
307
|
-
g("p", null, [t[10] ||= g("strong", null, "Model:", -1), _(" " + S(z.value), 1)]),
|
|
308
|
-
g("p", null, [g("strong", null, S(X.value) + ":", 1), _(" " + S(L.value), 1)]),
|
|
309
|
-
P.value ? (b(), h("p", Ie, [t[11] ||= g("strong", null, "Store:", -1), _(" " + S(P.value), 1)])) : m("", !0),
|
|
310
|
-
g("p", Le, [t[12] ||= g("strong", null, "From:", -1), _(" " + S(N.value), 1)])
|
|
311
|
-
])]),
|
|
312
|
-
g("div", Re, [
|
|
313
|
-
g("h3", null, S(it.value) + " Connection Setup", 1),
|
|
314
|
-
g("p", ze, " This model requires a " + S(B.value) + " connection. Please provide the required configuration: ", 1),
|
|
315
|
-
B.value === "motherduck" ? (b(), h("div", Be, [t[13] ||= g("label", { for: "md-token" }, "MotherDuck Token", -1), w(g("input", {
|
|
316
|
-
type: "text",
|
|
317
|
-
"onUpdate:modelValue": t[0] ||= (e) => q.value.mdToken = e,
|
|
318
|
-
id: "md-token",
|
|
319
|
-
placeholder: "Enter your MotherDuck token",
|
|
320
|
-
class: "connection-input",
|
|
321
|
-
onInput: $
|
|
322
|
-
}, null, 544), [[
|
|
323
|
-
C,
|
|
324
|
-
q.value.mdToken,
|
|
325
|
-
void 0,
|
|
326
|
-
{ trim: !0 }
|
|
327
|
-
]])])) : B.value === "bigquery" ? (b(), h("div", Ve, [t[14] ||= g("label", { for: "project-id" }, "BigQuery Project ID", -1), w(g("input", {
|
|
328
|
-
type: "text",
|
|
329
|
-
"onUpdate:modelValue": t[1] ||= (e) => q.value.projectId = e,
|
|
330
|
-
id: "project-id",
|
|
331
|
-
placeholder: "Enter your billing project ID",
|
|
332
|
-
class: "connection-input",
|
|
333
|
-
onInput: $
|
|
334
|
-
}, null, 544), [[
|
|
335
|
-
C,
|
|
336
|
-
q.value.projectId,
|
|
337
|
-
void 0,
|
|
338
|
-
{ trim: !0 }
|
|
339
|
-
]])])) : B.value === "snowflake" ? (b(), h(f, { key: 2 }, [
|
|
340
|
-
g("div", He, [t[15] ||= g("label", { for: "snowflake-username" }, "Username", -1), w(g("input", {
|
|
341
|
-
type: "text",
|
|
342
|
-
"onUpdate:modelValue": t[2] ||= (e) => q.value.username = e,
|
|
343
|
-
id: "snowflake-username",
|
|
344
|
-
placeholder: "Snowflake username",
|
|
345
|
-
class: "connection-input",
|
|
346
|
-
onInput: $
|
|
347
|
-
}, null, 544), [[
|
|
348
|
-
C,
|
|
349
|
-
q.value.username,
|
|
350
|
-
void 0,
|
|
351
|
-
{ trim: !0 }
|
|
352
|
-
]])]),
|
|
353
|
-
g("div", Ue, [t[16] ||= g("label", { for: "snowflake-account" }, "Account", -1), w(g("input", {
|
|
354
|
-
type: "text",
|
|
355
|
-
"onUpdate:modelValue": t[3] ||= (e) => q.value.account = e,
|
|
356
|
-
id: "snowflake-account",
|
|
357
|
-
placeholder: "Snowflake account identifier",
|
|
358
|
-
class: "connection-input",
|
|
359
|
-
onInput: $
|
|
360
|
-
}, null, 544), [[
|
|
361
|
-
C,
|
|
362
|
-
q.value.account,
|
|
363
|
-
void 0,
|
|
364
|
-
{ trim: !0 }
|
|
365
|
-
]])]),
|
|
366
|
-
g("div", We, [t[17] ||= g("label", { for: "snowflake-key" }, "Private Key", -1), w(g("input", {
|
|
367
|
-
type: "text",
|
|
368
|
-
"onUpdate:modelValue": t[4] ||= (e) => q.value.sshPrivateKey = e,
|
|
369
|
-
id: "snowflake-key",
|
|
370
|
-
placeholder: "Private key for authentication",
|
|
371
|
-
class: "connection-input",
|
|
372
|
-
onInput: $
|
|
373
|
-
}, null, 544), [[
|
|
374
|
-
C,
|
|
375
|
-
q.value.sshPrivateKey,
|
|
376
|
-
void 0,
|
|
377
|
-
{ trim: !0 }
|
|
378
|
-
]])])
|
|
379
|
-
], 64)) : m("", !0)
|
|
380
|
-
]),
|
|
381
|
-
g("div", Ge, [g("button", {
|
|
382
|
-
onClick: vt,
|
|
383
|
-
class: "import-button",
|
|
384
|
-
disabled: !J.value
|
|
385
|
-
}, " Import Model & " + S(X.value), 9, Ke), g("button", {
|
|
386
|
-
onClick: yt,
|
|
387
|
-
class: "cancel-button"
|
|
388
|
-
}, "Cancel")])
|
|
389
|
-
])) : m("", !0), ne(d, {
|
|
390
|
-
show: U.value,
|
|
391
|
-
title: "Overwrite Existing Model?",
|
|
392
|
-
message: at.value,
|
|
393
|
-
"confirm-label": "Overwrite",
|
|
394
|
-
"cancel-label": "Cancel",
|
|
395
|
-
"confirm-test-id": "confirm-overwrite-model",
|
|
396
|
-
"cancel-test-id": "cancel-overwrite-model",
|
|
397
|
-
onClose: ft,
|
|
398
|
-
onConfirm: pt
|
|
399
|
-
}, null, 8, ["show", "message"])]));
|
|
400
|
-
}
|
|
401
|
-
}), E = /* @__PURE__ */ e({ default: () => D }), D = /*#__PURE__*/ t(T, [["__scopeId", "data-v-708e13b8"]]);
|
|
402
|
-
//#endregion
|
|
403
|
-
export { E as n, D as t };
|
|
@@ -1,177 +0,0 @@
|
|
|
1
|
-
import { t as e } from "./_plugin-vue_export-helper-B3ysoDQm.js";
|
|
2
|
-
import { t } from "./StatusIcon-BylPx2EO.js";
|
|
3
|
-
import { Fragment as n, computed as r, createBlock as i, createCommentVNode as a, createElementBlock as o, createElementVNode as s, createTextVNode as c, defineComponent as l, inject as u, normalizeClass as d, openBlock as f, ref as p, renderList as m, resolveComponent as h, toDisplayString as g, vModelSelect as _, vModelText as v, watch as y, withDirectives as b, withModifiers as x } from "vue";
|
|
4
|
-
//#region components/llm/ChatCreatorModal.vue?vue&type=script&lang.ts
|
|
5
|
-
var S = l({
|
|
6
|
-
name: "ChatCreatorModal",
|
|
7
|
-
components: { StatusIcon: t },
|
|
8
|
-
props: {
|
|
9
|
-
visible: {
|
|
10
|
-
type: Boolean,
|
|
11
|
-
default: !1
|
|
12
|
-
},
|
|
13
|
-
preselectedConnection: {
|
|
14
|
-
type: String,
|
|
15
|
-
default: ""
|
|
16
|
-
},
|
|
17
|
-
activeDataConnection: {
|
|
18
|
-
type: String,
|
|
19
|
-
default: ""
|
|
20
|
-
}
|
|
21
|
-
},
|
|
22
|
-
emits: ["close", "chat-created"],
|
|
23
|
-
setup(e, { emit: t }) {
|
|
24
|
-
let n = u("llmConnectionStore"), i = u("connectionStore", null), a = u("chatStore", null), o = p(e.preselectedConnection || ""), s = p(""), c = p("");
|
|
25
|
-
y(() => e.preselectedConnection, (e) => {
|
|
26
|
-
e && (o.value = e);
|
|
27
|
-
}, { immediate: !0 }), y(() => e.visible, (t) => {
|
|
28
|
-
t && (e.preselectedConnection && (o.value = e.preselectedConnection), s.value = "", c.value = "");
|
|
29
|
-
});
|
|
30
|
-
let l = r(() => n ? Object.values(n.connections).filter((e) => !e.deleted).map((e) => ({
|
|
31
|
-
name: e.name,
|
|
32
|
-
model: e.model || "Unknown",
|
|
33
|
-
connected: e.connected === !0,
|
|
34
|
-
running: e.running === !0,
|
|
35
|
-
error: e.error || null
|
|
36
|
-
})) : []), d = r(() => [...l.value].sort((e, t) => e.connected && !t.connected ? -1 : !e.connected && t.connected ? 1 : e.name.localeCompare(t.name))), f = r(() => {
|
|
37
|
-
if (!o.value) return null;
|
|
38
|
-
let e = l.value.find((e) => e.name === o.value);
|
|
39
|
-
return e ? e.connected ? e.running ? {
|
|
40
|
-
status: "running",
|
|
41
|
-
message: "Running"
|
|
42
|
-
} : e.error ? {
|
|
43
|
-
status: "failed",
|
|
44
|
-
message: e.error
|
|
45
|
-
} : {
|
|
46
|
-
status: "connected",
|
|
47
|
-
message: "Connected"
|
|
48
|
-
} : {
|
|
49
|
-
status: "disabled",
|
|
50
|
-
message: "Disconnected"
|
|
51
|
-
} : null;
|
|
52
|
-
}), m = r(() => e.activeDataConnection ? e.activeDataConnection.split("+")[0] : ""), h = r(() => !m.value || !i ? "" : i.connectionByName(m.value)?.id || ""), g = r(() => i ? Object.values(i.connections).filter((e) => !e.deleted).map((e) => ({
|
|
53
|
-
id: e.id,
|
|
54
|
-
name: e.name,
|
|
55
|
-
connected: e.connected === !0,
|
|
56
|
-
running: e.running === !0,
|
|
57
|
-
error: e.error || null
|
|
58
|
-
})) : []);
|
|
59
|
-
return {
|
|
60
|
-
selectedLLMConnection: o,
|
|
61
|
-
selectedDataConnectionId: s,
|
|
62
|
-
chatName: c,
|
|
63
|
-
availableLLMConnections: l,
|
|
64
|
-
sortedLLMConnections: d,
|
|
65
|
-
selectedConnectionStatus: f,
|
|
66
|
-
availableDataConnections: g,
|
|
67
|
-
sortedDataConnections: r(() => [...g.value].sort((e, t) => e.connected && !t.connected ? -1 : !e.connected && t.connected ? 1 : e.name.localeCompare(t.name))),
|
|
68
|
-
selectedDataConnectionStatus: r(() => {
|
|
69
|
-
if (!s.value) return null;
|
|
70
|
-
let e = g.value.find((e) => e.id === s.value);
|
|
71
|
-
return e ? e.connected ? e.running ? {
|
|
72
|
-
status: "running",
|
|
73
|
-
message: "Running"
|
|
74
|
-
} : e.error ? {
|
|
75
|
-
status: "failed",
|
|
76
|
-
message: e.error
|
|
77
|
-
} : {
|
|
78
|
-
status: "connected",
|
|
79
|
-
message: "Connected"
|
|
80
|
-
} : {
|
|
81
|
-
status: "disabled",
|
|
82
|
-
message: "Disconnected"
|
|
83
|
-
} : null;
|
|
84
|
-
}),
|
|
85
|
-
activeDataConnectionName: m,
|
|
86
|
-
activeDataConnectionId: h,
|
|
87
|
-
createChat: () => {
|
|
88
|
-
if (!o.value || !a) return;
|
|
89
|
-
n && (n.activeConnection = o.value);
|
|
90
|
-
let e = s.value ? i?.connections[s.value] : null;
|
|
91
|
-
t("chat-created", a.newChat(o.value, e?.name || "", c.value || void 0, e?.id || "")), t("close");
|
|
92
|
-
}
|
|
93
|
-
};
|
|
94
|
-
}
|
|
95
|
-
}), C = { class: "chat-creator-form" }, w = { class: "form-group" }, T = { class: "select-with-status" }, E = ["disabled"], D = ["value", "disabled"], O = { key: 0 }, k = { class: "form-group" }, A = { class: "select-with-status" }, j = ["value"], M = { class: "form-group" }, N = { class: "button-container" }, P = ["disabled"];
|
|
96
|
-
function F(e, t, r, l, u, p) {
|
|
97
|
-
let y = h("status-icon");
|
|
98
|
-
return e.visible ? (f(), o("div", {
|
|
99
|
-
key: 0,
|
|
100
|
-
class: "confirmation-overlay",
|
|
101
|
-
onClick: t[6] ||= (t) => e.$emit("close")
|
|
102
|
-
}, [s("div", {
|
|
103
|
-
class: "confirmation-dialog",
|
|
104
|
-
"data-testid": "chat-creator-modal",
|
|
105
|
-
onClick: t[5] ||= x(() => {}, ["stop"])
|
|
106
|
-
}, [t[13] ||= s("h3", null, "Create New Chat", -1), s("div", C, [
|
|
107
|
-
s("div", w, [
|
|
108
|
-
t[8] ||= s("label", { for: "llm-connection" }, [c("LLM Connection: "), s("span", { class: "required" }, "*")], -1),
|
|
109
|
-
s("div", T, [b(s("select", {
|
|
110
|
-
id: "llm-connection",
|
|
111
|
-
"onUpdate:modelValue": t[0] ||= (t) => e.selectedLLMConnection = t,
|
|
112
|
-
required: "",
|
|
113
|
-
disabled: !!e.preselectedConnection,
|
|
114
|
-
"data-testid": "llm-connection-select"
|
|
115
|
-
}, [t[7] ||= s("option", {
|
|
116
|
-
value: "",
|
|
117
|
-
disabled: ""
|
|
118
|
-
}, "Select an LLM connection...", -1), (f(!0), o(n, null, m(e.sortedLLMConnections, (e) => (f(), o("option", {
|
|
119
|
-
key: e.name,
|
|
120
|
-
value: e.name,
|
|
121
|
-
disabled: !e.connected
|
|
122
|
-
}, g(e.name) + " (" + g(e.model) + ") ", 9, D))), 128))], 8, E), [[_, e.selectedLLMConnection]]), e.selectedConnectionStatus ? (f(), i(y, {
|
|
123
|
-
key: 0,
|
|
124
|
-
status: e.selectedConnectionStatus.status,
|
|
125
|
-
message: e.selectedConnectionStatus.message,
|
|
126
|
-
testName: e.selectedLLMConnection
|
|
127
|
-
}, null, 8, [
|
|
128
|
-
"status",
|
|
129
|
-
"message",
|
|
130
|
-
"testName"
|
|
131
|
-
])) : a("", !0)]),
|
|
132
|
-
e.selectedLLMConnection ? a("", !0) : (f(), o("small", O, " Required - Select which LLM to use for this chat "))
|
|
133
|
-
]),
|
|
134
|
-
s("div", k, [
|
|
135
|
-
t[10] ||= s("label", { for: "data-connection" }, "Data Connection:", -1),
|
|
136
|
-
s("div", A, [b(s("select", {
|
|
137
|
-
id: "data-connection",
|
|
138
|
-
"onUpdate:modelValue": t[1] ||= (t) => e.selectedDataConnectionId = t,
|
|
139
|
-
"data-testid": "data-connection-select"
|
|
140
|
-
}, [t[9] ||= s("option", { value: "" }, "None - Select later", -1), (f(!0), o(n, null, m(e.sortedDataConnections, (t) => (f(), o("option", {
|
|
141
|
-
key: t.id,
|
|
142
|
-
value: t.id,
|
|
143
|
-
class: d({ "active-connection": t.id === e.activeDataConnectionId })
|
|
144
|
-
}, g(t.name) + g(t.id === e.activeDataConnectionId ? " (active)" : ""), 11, j))), 128))], 512), [[_, e.selectedDataConnectionId]]), e.selectedDataConnectionStatus ? (f(), i(y, {
|
|
145
|
-
key: 0,
|
|
146
|
-
status: e.selectedDataConnectionStatus.status,
|
|
147
|
-
message: e.selectedDataConnectionStatus.message,
|
|
148
|
-
testName: "data-" + e.selectedDataConnectionId
|
|
149
|
-
}, null, 8, [
|
|
150
|
-
"status",
|
|
151
|
-
"message",
|
|
152
|
-
"testName"
|
|
153
|
-
])) : a("", !0)]),
|
|
154
|
-
t[11] ||= s("small", null, " Optional - Select a data source for running queries ", -1)
|
|
155
|
-
]),
|
|
156
|
-
s("div", M, [t[12] ||= s("label", { for: "chat-name" }, "Chat Name:", -1), b(s("input", {
|
|
157
|
-
id: "chat-name",
|
|
158
|
-
"onUpdate:modelValue": t[2] ||= (t) => e.chatName = t,
|
|
159
|
-
placeholder: "Auto-generated if empty",
|
|
160
|
-
maxlength: "100",
|
|
161
|
-
"data-testid": "chat-name-input"
|
|
162
|
-
}, null, 512), [[v, e.chatName]])]),
|
|
163
|
-
s("div", N, [s("button", {
|
|
164
|
-
class: "cancel-btn",
|
|
165
|
-
onClick: t[3] ||= (t) => e.$emit("close"),
|
|
166
|
-
"data-testid": "cancel-chat-create"
|
|
167
|
-
}, " Cancel "), s("button", {
|
|
168
|
-
class: "primary-button",
|
|
169
|
-
onClick: t[4] ||= (...t) => e.createChat && e.createChat(...t),
|
|
170
|
-
disabled: !e.selectedLLMConnection,
|
|
171
|
-
"data-testid": "create-chat-btn"
|
|
172
|
-
}, " Create Chat ", 8, P)])
|
|
173
|
-
])])])) : a("", !0);
|
|
174
|
-
}
|
|
175
|
-
var I = /*#__PURE__*/ e(S, [["render", F], ["__scopeId", "data-v-37d44aea"]]);
|
|
176
|
-
//#endregion
|
|
177
|
-
export { I as default };
|