@trilogy-data/trilogy-studio-components 0.1.26 → 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.
Files changed (138) hide show
  1. package/dist/AssetAutoImporter-OHphsfW9.js +403 -0
  2. package/dist/{ChatCreatorModal-CL-jBnc3.js → ChatCreatorModal-CuXha6Dg.js} +3 -3
  3. package/dist/{ChatModelSelect-Do-VRUFc.js → ChatModelSelect-Cz7axWjP.js} +1 -1
  4. package/dist/{CodeBlock-PT4no49I.js → CodeBlock-BBsaC6hX.js} +4 -4
  5. package/dist/{CommunityModels-Cmro0hV3.js → CommunityModels-CIQQhO-y.js} +7 -7
  6. package/dist/{ConnectionErrorPopup-FSs7U-Yl.js → ConnectionErrorPopup-7vpqgF0s.js} +1 -1
  7. package/dist/{ConnectionView-COnTTuA4.js → ConnectionView-7Jj_Ggdi.js} +49 -49
  8. package/dist/{CreateEditorFromDatasourcePopup-snOh1d5h.js → CreateEditorFromDatasourcePopup-CrVHUWFl.js} +4 -4
  9. package/dist/{Dashboard-BH9ZwMVJ.js → Dashboard-DxSi9W6Q.js} +276 -280
  10. package/dist/{DashboardImportSelector-DQSvu9T-.js → DashboardImportSelector-kuDRDYi8.js} +2 -2
  11. package/dist/{DashboardMobile-BUPtdN2V.js → DashboardMobile-CZEgTb0R.js} +39 -39
  12. package/dist/{DrilldownPane-CBs5ZojS.js → DrilldownPane-BheRHJMs.js} +5 -7
  13. package/dist/{Editor-DQsYpkwl.js → Editor-D6tdutTm.js} +105 -103
  14. package/dist/{ErrorMessage-XMn_08gJ.js → ErrorMessage-D5JeF3Iz.js} +4 -4
  15. package/dist/{GlobalChatPanel-DhnOaige.js → GlobalChatPanel-BXZh0sdD.js} +20 -21
  16. package/dist/{IDE-HLa8vybk.js → IDE-T8PmyAQ_.js} +200 -203
  17. package/dist/{JobsView-B97HBoIE.js → JobsView-Ca97MiSd.js} +13 -14
  18. package/dist/{LLMChat-CxJcPLEG.js → LLMChat-Cch33Yd_.js} +3 -3
  19. package/dist/{LLMView-C1MUf0c2.js → LLMView-BDb6wD74.js} +23 -23
  20. package/dist/{LoadingView-s1uznGwG.js → LoadingView-B-xFwd2N.js} +2 -2
  21. package/dist/{MarkdownRenderer-BNDuEyG-.js → MarkdownRenderer-BWvdx0k3.js} +531 -430
  22. package/dist/{MobileIDE-BpqXoaMR.js → MobileIDE-DpdEQEqc.js} +179 -182
  23. package/dist/{ModelCard-BhN25jaV.js → ModelCard-DkAMP4X9.js} +12 -13
  24. package/dist/{ModelView-DUDA_PtZ.js → ModelView-DomyhN8g.js} +7 -7
  25. package/dist/PageLoading-BAvKGo9h.js +5937 -0
  26. package/dist/{ResultComponent-CAn_r3BL.js → ResultComponent-zoOSoRLe.js} +8 -8
  27. package/dist/{Results-BJtlwebY.js → Results-dq-SlJbU.js} +17 -19
  28. package/dist/{StatusIcon-BylPx2EO.js → StatusIcon-AbxNvJ6p.js} +2 -2
  29. package/dist/{StoreTokenModal-zCSYhfrw.js → StoreTokenModal-CM8WXdu1.js} +2 -2
  30. package/dist/{SymbolsPane-KYSwN9Sv.js → SymbolsPane-DfaxeaPS.js} +6 -3
  31. package/dist/{TrilogyEmbedProvider-WA_dlv9e.js → TrilogyEmbedProvider-D3h0gYnX.js} +9 -9
  32. package/dist/{TutorialPage-NRcee6Dx.js → TutorialPage-BtEJG7cT.js} +27 -28
  33. package/dist/{VegaLiteChart-D1slfOUY.js → VegaLiteChart-BVyAab-o.js} +12131 -10947
  34. package/dist/{WelcomePage-D5mU2x1L.js → WelcomePage-BoqzYBLr.js} +5 -5
  35. package/dist/{embedTheme-Bub46ILG.js → _plugin-vue_export-helper-f9Rw-Il4.js} +14 -6
  36. package/dist/assets/{css.worker-9aDGcEUy.js → css.worker-niORQtzO.js} +14 -14
  37. package/dist/assets/{html.worker-D2LKDpnG.js → html.worker-CO5LvJpF.js} +17 -17
  38. package/dist/assets/json.worker-BezHzWUV.js +58 -0
  39. package/dist/assets/{ts.worker-Bz0-EaKK.js → ts.worker-CYhxGg0r.js} +107 -107
  40. package/dist/{results-DTgAKr5j.js → base-DuKnVD-A.js} +216 -45
  41. package/dist/components/FeedbackBanner.vue.d.ts +4 -0
  42. package/dist/components/FeedbackBanner.vue.d.ts.map +1 -0
  43. package/dist/components/dashboard/DashboardCreatorIcon.vue.d.ts +54 -0
  44. package/dist/components/dashboard/DashboardCreatorIcon.vue.d.ts.map +1 -0
  45. package/dist/components/dashboard/DashboardProvenance.vue.d.ts +30 -0
  46. package/dist/components/dashboard/DashboardProvenance.vue.d.ts.map +1 -0
  47. package/dist/components/dashboard/ReportLayout.vue.d.ts +19 -0
  48. package/dist/components/dashboard/ReportLayout.vue.d.ts.map +1 -0
  49. package/dist/components/editor/Editor.vue.d.ts +3 -3
  50. package/dist/components/editor/EditorCreatorIcon.vue.d.ts +62 -0
  51. package/dist/components/editor/EditorCreatorIcon.vue.d.ts.map +1 -0
  52. package/dist/components/editor/ValidationComponent.vue.d.ts +50 -0
  53. package/dist/components/editor/ValidationComponent.vue.d.ts.map +1 -0
  54. package/dist/components/model/ModelCard.vue.d.ts +3 -3
  55. package/dist/components/sidebar/LLMConnectionList.vue.d.ts.map +1 -1
  56. package/dist/components/sidebar/Sidebar.vue.d.ts.map +1 -1
  57. package/dist/components/tutorial/TutorialPrompt.vue.d.ts +3 -3
  58. package/dist/components/tutorial/TutorialPrompt.vue.d.ts.map +1 -1
  59. package/dist/{remoteWorker-Dkv3TJ0j.js → connections-CWH3zwH2.js} +4544 -4126
  60. package/dist/connections.js +3 -4
  61. package/dist/{cssMode-D4Rzr1Cu.js → cssMode-zpO2ap2B.js} +5 -6
  62. package/dist/dashboard.js +28 -31
  63. package/dist/{dist-CXoL8kXK.js → dist-1z5KURzS.js} +55 -50
  64. package/dist/{dist-DKkuvbPb.js → dist-Bv3D2p5A.js} +20 -18
  65. package/dist/{editor.main-Cl8i7rHY.js → editor.main-BQh6DxDB.js} +33 -33
  66. package/dist/{editorRefinementRuntime-DoP9P5J2.js → editorStore-CAlMJftt.js} +1692 -575
  67. package/dist/embed.js +2 -2
  68. package/dist/{freemarker2-fW5NBILf.js → freemarker2-DQBqlEXc.js} +1 -1
  69. package/dist/{globalChatRuntime-DWZxeS57.js → globalChatRuntime-CyS7vH51.js} +16 -16
  70. package/dist/{handlebars-dG4w8UUY.js → handlebars-tgYxaM70.js} +1 -1
  71. package/dist/{helpers-BLQAgX3C.js → helpers-BbVlA3Pf.js} +34 -35
  72. package/dist/{html-1Dq70BdU.js → html-jJahD3Mi.js} +1 -1
  73. package/dist/{htmlMode--IQmLBeh.js → htmlMode-BA1-8l2e.js} +5 -6
  74. package/dist/{javascript-CTzBM4sF.js → javascript-Cypfo7va.js} +1 -1
  75. package/dist/{jsonMode-DzeJjIEH.js → jsonMode-xJye8PWS.js} +25 -25
  76. package/dist/{liquid-DlHThiki.js → liquid-BGDrv5da.js} +1 -1
  77. package/dist/llm-ClU-2rgk.js +18493 -0
  78. package/dist/llm.js +2 -3
  79. package/dist/{localStorage-D9uyOFEO.js → localStorage-CGQ1iJXt.js} +40 -43
  80. package/dist/{lspLanguageFeatures-Cdfs3EKq.js → lspLanguageFeatures-V3e_p9oN.js} +32 -32
  81. package/dist/{mdx-fn3g4PH5.js → mdx-BUR1aImW.js} +1 -1
  82. package/dist/monaco.js +3 -3
  83. package/dist/{python-CCVj0pFt.js → python-YLkl0pc6.js} +1 -1
  84. package/dist/{razor-Cj3flYnk.js → razor-BP8TRMDY.js} +1 -1
  85. package/dist/{reconcile-Dyf4UZmj.js → reconcile-DXIvGwBk.js} +1 -1
  86. package/dist/{remoteStoreSync-Z-yjlYtI.js → remoteStoreSync-CuQBWpWf.js} +3 -3
  87. package/dist/{rolldown-runtime-Dqa2HsxW.js → rolldown-runtime-B0aSnxlc.js} +2 -2
  88. package/dist/static/test_import.vue.d.ts +4 -0
  89. package/dist/static/test_import.vue.d.ts.map +1 -0
  90. package/dist/stores-LlyiwSbK.js +2604 -0
  91. package/dist/stores.js +4 -7
  92. package/dist/trilogy-studio-components.css +1 -1
  93. package/dist/{tsMode-GI4xMYAl.js → tsMode-BH9HS_sH.js} +64 -66
  94. package/dist/{typescript-CPibXi3J.js → typescript-BM-ynfk9.js} +1 -1
  95. package/dist/{useChatWithTools-B0HZ_DVh.js → useChatWithTools-m3Jn_SV-.js} +11 -11
  96. package/dist/{useDashboard-CdSnPe_6.js → useDashboard-BOAuvVEw.js} +1014 -1022
  97. package/dist/{tabulator_esm-CxLvGDp8.js → useGlobalChatPanel-DuP1q7_f.js} +1729 -711
  98. package/dist/{useResizableDialog-B0ePSts4.js → useResizableDialog-Cs90WJdF.js} +2 -2
  99. package/dist/views/ModelView.vue.d.ts +6 -6
  100. package/dist/views/ModelView.vue.d.ts.map +1 -1
  101. package/dist/views/TutorialPage.vue.d.ts +9 -9
  102. package/dist/views/TutorialPage.vue.d.ts.map +1 -1
  103. package/dist/views.js +192 -194
  104. package/dist/{editor.api2-ClD5pp8H.js → workers-B9Eybl-M.js} +16252 -15926
  105. package/dist/{xml-BNyphceI.js → xml-M5WFPSpA.js} +1 -1
  106. package/dist/{yaml-DE5Vz0PH.js → yaml-CEeFwjz9.js} +1 -1
  107. package/package.json +29 -20
  108. package/dist/AssetAutoImporter-CBzvBaOt.js +0 -405
  109. package/dist/DashboardCreatorInline-CDU7kLy3.js +0 -129
  110. package/dist/DataTable-DoRDynP1.js +0 -365
  111. package/dist/EditorCreatorInline-D6_y1H_h.js +0 -125
  112. package/dist/LoadingButton-OH3frQuO.js +0 -138
  113. package/dist/ModalDialog-D1EOG4rl.js +0 -42
  114. package/dist/ModelCreator-CCdC7EXt.js +0 -253
  115. package/dist/PageLoading-BzniJM0C.js +0 -2669
  116. package/dist/Tooltip-Dihir4zs.js +0 -103
  117. package/dist/_plugin-vue_export-helper-B3ysoDQm.js +0 -8
  118. package/dist/assets/json.worker-CJ5MmO5Q.js +0 -58
  119. package/dist/base-C8IuZWqY.js +0 -164
  120. package/dist/connectionHistoryStorage-DKJHiKJY.js +0 -111
  121. package/dist/connectionHistoryStore-DQeBvStZ.js +0 -61
  122. package/dist/connections-CJSb1TZl.js +0 -229
  123. package/dist/constants-DgFEYN2b.js +0 -7
  124. package/dist/dashboardStore-ppM6nGks.js +0 -641
  125. package/dist/demoSetup-mwa-RDC6.js +0 -2942
  126. package/dist/editorRefinementToolExecutor-CVY3FA7k.js +0 -4624
  127. package/dist/editorStore-BhhmXbi-.js +0 -1019
  128. package/dist/formatting-BbJ5ICgh.js +0 -6
  129. package/dist/llm-BBOVWb-F.js +0 -11967
  130. package/dist/llmStore-DJM2JhzY.js +0 -153
  131. package/dist/monaco.contribution-ikesdolO.js +0 -128
  132. package/dist/stores-BT9hTLny.js +0 -1708
  133. package/dist/trilogy-BroD2Qmp.js +0 -4
  134. package/dist/urlStore-52HG6lsX.js +0 -55
  135. package/dist/useGlobalChatPanel-D_0luajQ.js +0 -85
  136. package/dist/useIsMobile-CNpUQAvk.js +0 -8
  137. package/dist/usePrismHighlight-DVyDiDAL.js +0 -183
  138. package/dist/workers-Br7ThUKL.js +0 -47
@@ -0,0 +1,403 @@
1
+ import { n as e } from "./rolldown-runtime-B0aSnxlc.js";
2
+ import { t } from "./_plugin-vue_export-helper-f9Rw-Il4.js";
3
+ import { a as n, l as r, o as i, s as a } from "./stores-LlyiwSbK.js";
4
+ import { A as ee, M as te, T as o, j as s, x as c } from "./editorStore-CAlMJftt.js";
5
+ import { c as l } from "./useGlobalChatPanel-DuP1q7_f.js";
6
+ import { t as u } from "./helpers-BbVlA3Pf.js";
7
+ import { n as d, r as f } from "./remoteStoreSync-CuQBWpWf.js";
8
+ import { Fragment as p, computed as m, createCommentVNode as h, createElementBlock as g, createElementVNode as _, createTextVNode as v, createVNode as ne, defineComponent as re, inject as y, normalizeClass as b, onBeforeUnmount as ie, onMounted as ae, openBlock as x, ref as S, toDisplayString as C, unref as oe, vModelText as w, withDirectives as T } from "vue";
9
+ //#region components/AssetAutoImporter.vue?vue&type=script&setup=true&lang.ts
10
+ var se = { class: "auto-import-container" }, ce = {
11
+ key: 0,
12
+ class: "import-panel import-state error-state",
13
+ role: "alert"
14
+ }, le = { class: "import-headline" }, ue = { class: "error-message" }, de = {
15
+ key: 1,
16
+ class: "import-panel import-state loading-state",
17
+ role: "status"
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-panel 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, E = /*@__PURE__*/ re({
31
+ __name: "AssetAutoImporter",
32
+ emits: ["importComplete", "fullScreen"],
33
+ setup(e, { emit: t }) {
34
+ let re = t, E = y("dashboardStore"), D = y("connectionStore"), O = y("editorStore"), k = y("modelStore"), A = y("communityApiStore"), Je = y("queryExecutionService"), Ye = y("saveDashboards"), Xe = y("saveAll"), Ze = y("storageSources", []), j = n(), Qe = m(() => Ze.find((e) => e.type === "remote"));
35
+ if (!E || !D || !O || !k || !Ye || !Je || !Xe) throw Error("Required stores not provided");
36
+ let M = S(!0), N = S(""), P = S(""), $e = S(""), et = S("generic"), F = S(""), I = S(!1), L = S(""), R = S("dashboard"), z = S(""), B = S(""), V = S(null), H = S(!1), tt = S(""), U = S(!1), W = S("importing"), G = S(Date.now()), K = S(Date.now()), nt = S("0 ms"), q = null, J = S({
37
+ mdToken: "",
38
+ projectId: "",
39
+ username: "",
40
+ password: "",
41
+ account: "",
42
+ sshPrivateKey: ""
43
+ }), Y = S(!0), rt = {
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
+ }, it = m(() => {
65
+ if (I.value) return !1;
66
+ let e = rt[B.value];
67
+ return !e || !e.autoImport;
68
+ }), at = m(() => {
69
+ let e = rt[B.value];
70
+ return e ? e.fields : [];
71
+ }), ot = m(() => {
72
+ let e = c.find((e) => e.value === B.value);
73
+ return e ? e.label : B.value;
74
+ }), X = m(() => {
75
+ switch (R.value) {
76
+ case "dashboard": return "Dashboard";
77
+ case "editor":
78
+ case "trilogy": return "Editor";
79
+ default: return "Asset";
80
+ }
81
+ }), st = m(() => `A model named "${z.value}" already exists. Overwriting will replace its imported sources. Continue?`), ct = m(() => {
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
+ }), lt = (e) => 100, Z = () => {
89
+ Q();
90
+ let e = Date.now() - K.value;
91
+ if (e < 1e3) nt.value = `${e} ms`;
92
+ else if (e < 6e4) {
93
+ let t = (e / 1e3).toFixed(1);
94
+ nt.value = `${t} sec`;
95
+ } else {
96
+ let t = Math.floor(e / 6e4), n = (e % 6e4 / 1e3).toFixed(1);
97
+ nt.value = n === "0.0" ? `${t} min` : `${t} min ${n} sec`;
98
+ }
99
+ if (!V.value && (M.value || H.value)) {
100
+ let t = lt(e);
101
+ q = setTimeout(Z, t);
102
+ }
103
+ }, Q = () => {
104
+ q &&= (clearTimeout(q), null);
105
+ }, ut = 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
+ Y.value = !1;
112
+ return;
113
+ }
114
+ let e = at.value;
115
+ for (let t of e) if (!J.value[t]) {
116
+ Y.value = !1;
117
+ return;
118
+ }
119
+ Y.value = !0;
120
+ }
121
+ let dt = (e) => $e.value || s(e), ft = async () => {
122
+ if (!P.value || !A) return;
123
+ let e = te(P.value), t = dt(e), n = A.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 = et.value === "static" ? {
129
+ ...o(e),
130
+ id: t
131
+ } : {
132
+ type: "generic",
133
+ id: t,
134
+ name: I.value && z.value ? z.value : `Auto-registered: ${e}`,
135
+ baseUrl: e,
136
+ token: F.value || void 0
137
+ };
138
+ try {
139
+ await A.addStore(r), console.log(`Store ${t} registered successfully`);
140
+ } catch (e) {
141
+ console.warn(`Failed to register store ${t}:`, e);
142
+ }
143
+ }, pt = () => {
144
+ if (!P.value || !A) return null;
145
+ let e = te(P.value), t = dt(e), n = A.stores.find((e) => e.id === t);
146
+ return n?.type === "generic" ? n : null;
147
+ }, mt = () => {
148
+ U.value = !1, V.value = `Import cancelled. Existing model "${z.value}" was not overwritten.`, M.value = !1, Q();
149
+ }, ht = async () => {
150
+ U.value = !1, V.value = null, await yt();
151
+ }, gt = async () => {
152
+ if (!I.value && k.models[z.value]) {
153
+ M.value = !1, Q(), U.value = !0;
154
+ return;
155
+ }
156
+ await yt();
157
+ }, _t = async () => {
158
+ if (!Qe.value) throw Error("Remote storage is not available in this context.");
159
+ let e = pt();
160
+ if (!e) throw Error("Remote imports require a valid store URL that can be registered.");
161
+ await d(Qe.value, e.id, O, D, k);
162
+ let t = ee(e);
163
+ if (R.value === "dashboard") {
164
+ let e = Object.values(E.dashboards).find((e) => e.name === L.value && e.connection === t);
165
+ 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.`);
166
+ return E.warmDashboardQueries(e.id, Je, O), {
167
+ foundAssetId: e.id,
168
+ connectionName: t
169
+ };
170
+ }
171
+ let n = `remote:${e.id}:`, r = Object.values(O.editors).filter((e) => e.id.startsWith(n) && e.connection === t), i = (e) => e.replace(/\.[^.]+$/, ""), a = r.find((e) => e.name === L.value || i(e.name) === L.value);
172
+ if (!a) {
173
+ let e = r.map((e) => e.name).join(", ");
174
+ throw Error(`Editor "${L.value}" was not found in the remote store, have ${e}`);
175
+ }
176
+ return {
177
+ foundAssetId: a.id,
178
+ connectionName: t
179
+ };
180
+ }, vt = async () => {
181
+ let e = `${z.value}-connection`, t = new u(O, k, E);
182
+ k.models[z.value] || k.newModelConfig(z.value, !0), D.connectionByName(e) || D.newConnection(e, B.value, {
183
+ mdToken: J.value.mdToken,
184
+ projectId: J.value.projectId,
185
+ username: J.value.username,
186
+ password: J.value.password,
187
+ account: J.value.account,
188
+ privateKey: J.value.sshPrivateKey,
189
+ model: z.value
190
+ });
191
+ let n = pt(), r = await t.importModel(z.value, N.value, e, {
192
+ token: F.value || void 0,
193
+ remote: !1,
194
+ remoteStoreId: n?.id || null,
195
+ remoteBaseUrl: n?.baseUrl || P.value || null
196
+ });
197
+ if (D.connectionByName(e)?.setModel(z.value), R.value === "dashboard") {
198
+ let t = r?.dashboards.get(L.value), n = t ? E.dashboards[t] : void 0;
199
+ if (!n) {
200
+ let t = Object.values(E.dashboards).filter((t) => t.connection === e && t.storage !== "remote").map((e) => e.name).join(", ");
201
+ throw Error(`Dashboard "${L.value}" was not found in the imported model, have ${t}`);
202
+ }
203
+ return E.warmDashboardQueries(n.id, Je, O), {
204
+ foundAssetId: n.id,
205
+ connectionName: e
206
+ };
207
+ }
208
+ let i = r?.trilogy.get(L.value) || r?.sql.get(L.value) || r?.python.get(L.value), a = i ? O.editors[i] : void 0;
209
+ if (!a) {
210
+ let t = Object.values(O.editors).filter((t) => t.connection === e && t.storage !== "remote").map((e) => e.name).join(", ");
211
+ throw Error(`Editor "${L.value}" was not found in the imported model, have ${t}`);
212
+ }
213
+ return {
214
+ foundAssetId: a.id,
215
+ connectionName: e
216
+ };
217
+ }, yt = async () => {
218
+ try {
219
+ if (!z.value || !L.value) {
220
+ V.value = "Missing required import parameters";
221
+ return;
222
+ }
223
+ if (!I.value && !N.value) {
224
+ V.value = "Missing required import parameters";
225
+ return;
226
+ }
227
+ K.value = Date.now(), G.value = Date.now(), M.value = !0, Z(), P.value ? (W.value = "registering", await ft(), await ut("importing")) : W.value = "importing";
228
+ let { foundAssetId: e, connectionName: t } = I.value ? await _t() : await vt();
229
+ await ut("connecting"), tt.value = e, I.value || await Xe();
230
+ let n = D.connectionByName(t);
231
+ n && await D.resetConnection(n.id), await ut("preparing"), M.value = !1, H.value = !0, q && clearTimeout(q), Z(), setTimeout(() => {
232
+ Q();
233
+ }, 2e3), re("importComplete", e, R.value), r(i.IMPORT), r(i.STORE), r(i.STORE_ID), r(i.STORE_KIND), r(i.TOKEN), r(i.ASSET_TYPE), r(i.ASSET_NAME), r(i.DASHBOARD), r(i.REMOTE), setTimeout(() => {
234
+ j.closeTab(null, "asset-import"), R.value === "dashboard" ? (j.openTab("dashboard", null, e), j.setActiveSidebarScreen("dashboard")) : (j.openTab("editors", null, e), j.setActiveSidebarScreen("editors"));
235
+ }, 500);
236
+ } catch (e) {
237
+ console.error("Import failed:", e), V.value = e instanceof Error ? e.message : "Import failed", M.value = !1, Q();
238
+ }
239
+ };
240
+ ae(async () => {
241
+ try {
242
+ K.value = Date.now(), G.value = Date.now(), Z();
243
+ let e = j.modelImport.value, t = a(i.STORE, ""), n = a(i.STORE_ID, ""), r = a(i.STORE_KIND, ""), ee = a(i.TOKEN, ""), te = a(i.REMOTE, ""), o = a(i.ASSET_TYPE, ""), s = a(i.ASSET_NAME, ""), c = a(i.DASHBOARD, ""), l = a(i.MODEL_NAME, ""), u = a(i.CONNECTION, ""), d = "dashboard", f = "";
244
+ o && s ? (d = o, f = s) : c && (d = "dashboard", f = c);
245
+ let p = [
246
+ "true",
247
+ "1",
248
+ "yes"
249
+ ].includes((te || "").toLowerCase());
250
+ if (!f || !l || !p && (!e || !u) || p && !t) {
251
+ V.value = p ? "Missing required import parameters (store, assetName/dashboard, modelName)" : "Missing required import parameters (import, assetName/dashboard, modelName, connection)", M.value = !1, Q();
252
+ return;
253
+ }
254
+ if (N.value = e ? decodeURIComponent(e) : "", P.value = t ? decodeURIComponent(t) : "", $e.value = n ? decodeURIComponent(n) : "", et.value = r === "static" && !p ? "static" : "generic", F.value = ee ? decodeURIComponent(ee) : "", I.value = p, L.value = decodeURIComponent(f), R.value = d, z.value = decodeURIComponent(l), B.value = u, !I.value && !rt[B.value]) {
255
+ V.value = `Unsupported connection type: ${B.value}`, M.value = !1, Q();
256
+ return;
257
+ }
258
+ it.value ? (M.value = !1, Q(), $()) : await gt();
259
+ } catch (e) {
260
+ console.error("Auto-import initialization failed:", e), V.value = e instanceof Error ? e.message : "Failed to initialize import", M.value = !1, Q();
261
+ }
262
+ }), ie(() => {
263
+ Q();
264
+ });
265
+ let bt = async () => {
266
+ if (M.value = !0, !Y.value) throw Error("Form is not valid");
267
+ console.log("performing import"), await gt();
268
+ }, xt = () => {
269
+ R.value === "dashboard" ? (j.setActiveDashboard(null), j.setActiveScreen("dashboard")) : j.setActiveScreen("editors");
270
+ };
271
+ return (e, t) => (x(), g("div", se, [V.value ? (x(), g("div", ce, [
272
+ t[5] ||= _("div", { class: "error-icon" }, "⚠️", -1),
273
+ _("h2", le, C(X.value) + " Load Failed", 1),
274
+ _("p", ue, C(V.value), 1),
275
+ _("div", { class: "error-actions" }, [_("button", {
276
+ onClick: xt,
277
+ class: "import-action manual-import-button"
278
+ }, " Try Manual Import ")])
279
+ ])) : M.value || H.value ? (x(), g("div", de, [_("div", fe, [
280
+ _("img", {
281
+ src: oe(l),
282
+ class: "trilogy-icon spinning",
283
+ alt: "Loading"
284
+ }, null, 8, pe),
285
+ _("h2", me, C(ct.value), 1),
286
+ _("div", he, [
287
+ P.value ? (x(), g("div", {
288
+ key: 0,
289
+ class: b(["step", {
290
+ active: W.value === "registering",
291
+ completed: W.value !== "registering"
292
+ }])
293
+ }, [_("div", ge, [W.value === "registering" ? (x(), g("span", _e, "⟳")) : (x(), g("span", ve, "✓"))]), t[6] ||= _("span", { class: "step-text" }, "Registering store", -1)], 2)) : h("", !0),
294
+ _("div", { class: b(["step", {
295
+ active: W.value === "importing",
296
+ completed: W.value !== "importing" && W.value !== "registering" && (W.value === "connecting" || W.value === "preparing" || H.value)
297
+ }]) }, [_("div", ye, [W.value === "importing" ? (x(), g("span", be, "⟳")) : W.value === "registering" ? (x(), g("span", xe, "○")) : (x(), g("span", Se, "✓"))]), t[7] ||= _("span", { class: "step-text" }, "Importing model", -1)], 2),
298
+ _("div", { class: b(["step", {
299
+ active: W.value === "connecting",
300
+ completed: W.value === "preparing" || H.value
301
+ }]) }, [_("div", Ce, [W.value === "connecting" ? (x(), g("span", we, "⟳")) : W.value === "preparing" || H.value ? (x(), g("span", Te, "✓")) : (x(), g("span", Ee, "○"))]), t[8] ||= _("span", { class: "step-text" }, "Establishing connection", -1)], 2),
302
+ _("div", { class: b(["step", {
303
+ active: W.value === "preparing" || H.value,
304
+ completed: H.value
305
+ }]) }, [_("div", De, [W.value === "preparing" ? (x(), g("span", Oe, "⟳")) : H.value ? (x(), g("span", ke, "✓")) : (x(), g("span", Ae, "○"))]), _("span", je, "Preparing " + C(X.value.toLowerCase()), 1)], 2)
306
+ ]),
307
+ t[9] ||= _("p", { class: "import-details" }, "This may take a few seconds.", -1)
308
+ ])])) : it.value ? (x(), g("div", Me, [
309
+ _("div", Ne, [_("h2", Pe, "Import Model & " + C(X.value), 1), _("div", Fe, [
310
+ _("p", null, [t[10] ||= _("strong", null, "Model:", -1), v(" " + C(z.value), 1)]),
311
+ _("p", null, [_("strong", null, C(X.value) + ":", 1), v(" " + C(L.value), 1)]),
312
+ P.value ? (x(), g("p", Ie, [t[11] ||= _("strong", null, "Store:", -1), v(" " + C(P.value), 1)])) : h("", !0),
313
+ _("p", Le, [t[12] ||= _("strong", null, "From:", -1), v(" " + C(N.value), 1)])
314
+ ])]),
315
+ _("div", Re, [
316
+ _("h3", null, C(ot.value) + " Connection Setup", 1),
317
+ _("p", ze, " This model requires a " + C(B.value) + " connection. Please provide the required configuration: ", 1),
318
+ B.value === "motherduck" ? (x(), g("div", Be, [t[13] ||= _("label", { for: "md-token" }, "MotherDuck Token", -1), T(_("input", {
319
+ type: "text",
320
+ "onUpdate:modelValue": t[0] ||= (e) => J.value.mdToken = e,
321
+ id: "md-token",
322
+ placeholder: "Enter your MotherDuck token",
323
+ class: "sidebar-control-input connection-input",
324
+ onInput: $
325
+ }, null, 544), [[
326
+ w,
327
+ J.value.mdToken,
328
+ void 0,
329
+ { trim: !0 }
330
+ ]])])) : B.value === "bigquery" ? (x(), g("div", Ve, [t[14] ||= _("label", { for: "project-id" }, "BigQuery Project ID", -1), T(_("input", {
331
+ type: "text",
332
+ "onUpdate:modelValue": t[1] ||= (e) => J.value.projectId = e,
333
+ id: "project-id",
334
+ placeholder: "Enter your billing project ID",
335
+ class: "sidebar-control-input connection-input",
336
+ onInput: $
337
+ }, null, 544), [[
338
+ w,
339
+ J.value.projectId,
340
+ void 0,
341
+ { trim: !0 }
342
+ ]])])) : B.value === "snowflake" ? (x(), g(p, { key: 2 }, [
343
+ _("div", He, [t[15] ||= _("label", { for: "snowflake-username" }, "Username", -1), T(_("input", {
344
+ type: "text",
345
+ "onUpdate:modelValue": t[2] ||= (e) => J.value.username = e,
346
+ id: "snowflake-username",
347
+ placeholder: "Snowflake username",
348
+ class: "sidebar-control-input connection-input",
349
+ onInput: $
350
+ }, null, 544), [[
351
+ w,
352
+ J.value.username,
353
+ void 0,
354
+ { trim: !0 }
355
+ ]])]),
356
+ _("div", Ue, [t[16] ||= _("label", { for: "snowflake-account" }, "Account", -1), T(_("input", {
357
+ type: "text",
358
+ "onUpdate:modelValue": t[3] ||= (e) => J.value.account = e,
359
+ id: "snowflake-account",
360
+ placeholder: "Snowflake account identifier",
361
+ class: "sidebar-control-input connection-input",
362
+ onInput: $
363
+ }, null, 544), [[
364
+ w,
365
+ J.value.account,
366
+ void 0,
367
+ { trim: !0 }
368
+ ]])]),
369
+ _("div", We, [t[17] ||= _("label", { for: "snowflake-key" }, "Private Key", -1), T(_("input", {
370
+ type: "text",
371
+ "onUpdate:modelValue": t[4] ||= (e) => J.value.sshPrivateKey = e,
372
+ id: "snowflake-key",
373
+ placeholder: "Private key for authentication",
374
+ class: "sidebar-control-input connection-input",
375
+ onInput: $
376
+ }, null, 544), [[
377
+ w,
378
+ J.value.sshPrivateKey,
379
+ void 0,
380
+ { trim: !0 }
381
+ ]])])
382
+ ], 64)) : h("", !0)
383
+ ]),
384
+ _("div", Ge, [_("button", {
385
+ onClick: bt,
386
+ class: "import-action import-button",
387
+ disabled: !Y.value
388
+ }, " Import Model & " + C(X.value), 9, Ke), _("button", { onClick: xt }, "Cancel")])
389
+ ])) : h("", !0), ne(f, {
390
+ show: U.value,
391
+ title: "Overwrite Existing Model?",
392
+ message: st.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: mt,
398
+ onConfirm: ht
399
+ }, null, 8, ["show", "message"])]));
400
+ }
401
+ }), D = /* @__PURE__ */ e({ default: () => O }), O = /*#__PURE__*/ t(E, [["__scopeId", "data-v-331fa5ac"]]);
402
+ //#endregion
403
+ export { D as n, O as t };
@@ -1,6 +1,6 @@
1
- import { t as e } from "./_plugin-vue_export-helper-B3ysoDQm.js";
2
- import { t } from "./StatusIcon-BylPx2EO.js";
3
- import { t as n } from "./ChatModelSelect-Do-VRUFc.js";
1
+ import { t as e } from "./_plugin-vue_export-helper-f9Rw-Il4.js";
2
+ import { t } from "./StatusIcon-AbxNvJ6p.js";
3
+ import { t as n } from "./ChatModelSelect-Cz7axWjP.js";
4
4
  import { Fragment as r, computed as i, createBlock as a, createCommentVNode as o, createElementBlock as s, createElementVNode as c, createTextVNode as l, defineComponent as u, inject as d, normalizeClass as f, openBlock as p, ref as m, renderList as h, resolveComponent as g, toDisplayString as _, vModelSelect as v, vModelText as y, watch as b, withDirectives as x, withModifiers as S } from "vue";
5
5
  //#region components/llm/ChatCreatorModal.vue?vue&type=script&lang.ts
6
6
  var C = u({
@@ -1,4 +1,4 @@
1
- import { t as e } from "./_plugin-vue_export-helper-B3ysoDQm.js";
1
+ import { t as e } from "./_plugin-vue_export-helper-f9Rw-Il4.js";
2
2
  import { Fragment as t, computed as n, createCommentVNode as r, createElementBlock as i, createElementVNode as a, defineComponent as o, inject as s, openBlock as c, renderList as l, toDisplayString as u, unref as d, useId as f } from "vue";
3
3
  //#region components/llm/ChatModelSelect.vue?vue&type=script&setup=true&lang.ts
4
4
  var p = {
@@ -1,5 +1,5 @@
1
- import { t as e } from "./_plugin-vue_export-helper-B3ysoDQm.js";
2
- import { n as t, t as n } from "./usePrismHighlight-DVyDiDAL.js";
1
+ import { t as e } from "./_plugin-vue_export-helper-f9Rw-Il4.js";
2
+ import { o as t, s as n } from "./useGlobalChatPanel-DuP1q7_f.js";
3
3
  import { computed as r, createElementBlock as i, createElementVNode as a, defineComponent as o, normalizeClass as s, openBlock as c, ref as l, toDisplayString as u, toRef as d } from "vue";
4
4
  //#region components/CodeBlock.vue?vue&type=script&lang.ts
5
5
  var f = o({
@@ -20,8 +20,8 @@ var f = o({
20
20
  },
21
21
  emits: ["on-copy"],
22
22
  setup(e, { emit: i }) {
23
- let a = l(null), o = l(!1), s = r(() => `language-${t(e.language)}`);
24
- return n(a, {
23
+ let a = l(null), o = l(!1), s = r(() => `language-${n(e.language)}`);
24
+ return t(a, {
25
25
  languages: () => [e.language],
26
26
  watchSources: [d(e, "content"), d(e, "language")]
27
27
  }), {
@@ -1,10 +1,10 @@
1
- import { n as e } from "./rolldown-runtime-Dqa2HsxW.js";
2
- import { t } from "./_plugin-vue_export-helper-B3ysoDQm.js";
3
- import { j as n } from "./editorStore-BhhmXbi-.js";
4
- import { t as r } from "./ErrorMessage-XMn_08gJ.js";
5
- import { t as i } from "./MarkdownRenderer-BNDuEyG-.js";
6
- import { t as a } from "./ModelCreator-CCdC7EXt.js";
7
- import { t as o } from "./StoreTokenModal-zCSYhfrw.js";
1
+ import { n as e } from "./rolldown-runtime-B0aSnxlc.js";
2
+ import { t } from "./_plugin-vue_export-helper-f9Rw-Il4.js";
3
+ import { X as n } from "./editorStore-CAlMJftt.js";
4
+ import { t as r } from "./ErrorMessage-D5JeF3Iz.js";
5
+ import { t as i } from "./MarkdownRenderer-BWvdx0k3.js";
6
+ import { p as a } from "./PageLoading-BAvKGo9h.js";
7
+ import { t as o } from "./StoreTokenModal-CM8WXdu1.js";
8
8
  import { Fragment as s, computed as c, createBlock as l, createCommentVNode as u, createElementBlock as d, createElementVNode as f, createTextVNode as p, createVNode as m, defineComponent as h, inject as g, normalizeClass as _, onMounted as v, openBlock as y, ref as b, renderList as x, toDisplayString as S, unref as C, watch as w, withCtx as T } from "vue";
9
9
  //#region components/community/CommunityModelHeader.vue?vue&type=script&setup=true&lang.ts
10
10
  var E = { class: "section-header" }, D = { class: "header-actions" }, O = ["disabled"], k = { key: 0 }, A = { key: 1 }, j = { class: "filters my-4" }, M = { class: "filter-row flex gap-4 mb-2" }, N = { class: "search-box flex-grow" }, P = ["value"], F = { class: "engine-filter" }, I = ["value", "disabled"], L = ["value"], R = { class: "import-status-filter" }, z = ["value"], ee = /*#__PURE__*/ t(/* @__PURE__ */ h({
@@ -1,4 +1,4 @@
1
- import { t as e } from "./_plugin-vue_export-helper-B3ysoDQm.js";
1
+ import { t as e } from "./_plugin-vue_export-helper-f9Rw-Il4.js";
2
2
  import { Fragment as t, Teleport as n, computed as r, createBlock as i, createCommentVNode as a, createElementBlock as o, createElementVNode as s, defineComponent as c, inject as l, openBlock as u, ref as d, renderList as f, toDisplayString as p, watch as m } from "vue";
3
3
  //#region components/ConnectionErrorPopup.vue?vue&type=script&setup=true&lang.ts
4
4
  var h = {