@trilogy-data/trilogy-studio-components 0.1.28 → 0.1.30
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/README.md +1 -0
- package/dist/AssetAutoImporter-BA8C4p09.js +403 -0
- package/dist/{ChatCreatorModal-Cd40SvdM.js → ChatCreatorModal-94gZ9D-y.js} +1 -1
- package/dist/{CodeBlock-Dj-GfTbW.js → CodeBlock-C9o09ipr.js} +1 -1
- package/dist/{CommunityModels-lX2RhHCG.js → CommunityModels-D48H9Bqt.js} +6 -6
- package/dist/{ConnectionView-CZ06qjjE.js → ConnectionView-sEXGE8Vs.js} +5 -5
- package/dist/{CreateEditorFromDatasourcePopup-DwA938kf.js → CreateEditorFromDatasourcePopup-BUoegyem.js} +2 -2
- package/dist/{Dashboard-CQsIqWZC.js → Dashboard-C6adKZ7q.js} +202 -203
- package/dist/{DashboardImportSelector-CkqH52FX.js → DashboardImportSelector-CQqXshDj.js} +1 -1
- package/dist/{DashboardMobile-DWFlel5p.js → DashboardMobile-BU1nDLQv.js} +42 -42
- package/dist/{Editor-DQ66Vp6v.js → Editor-DO4VRvek.js} +9 -10
- package/dist/{ErrorMessage-D5JeF3Iz.js → ErrorMessage-Cz7q7vJI.js} +1 -1
- package/dist/{GlobalChatPanel-B_s3COHE.js → GlobalChatPanel-Ct6oSj_A.js} +20 -20
- package/dist/{IDE-4-Jg6gsM.js → IDE-kdaEhA4g.js} +19 -20
- package/dist/{JobsView-B5NWDUgP.js → JobsView-BcyWrDRf.js} +11 -11
- package/dist/{LLMChat-eKgEc-I3.js → LLMChat-Dg8VvTIP.js} +19 -19
- package/dist/{LLMView-CdTwMLVV.js → LLMView-CZNNYXC1.js} +61 -61
- package/dist/{LoadingView-Bu3wLJ7J.js → LoadingView-k2CIKiN7.js} +1 -1
- package/dist/{MarkdownRenderer-B6lqdkgc.js → MarkdownRenderer-Dlb_KGmk.js} +1 -1
- package/dist/{MobileIDE-CZlg20oa.js → MobileIDE-BQcdjWUT.js} +26 -27
- package/dist/{ModelCard-Bs_d7Jis.js → ModelCard-Dn2b5WLs.js} +5 -5
- package/dist/{ModelView-BP5yyecx.js → ModelView-BEi83zrX.js} +6 -6
- package/dist/{PageLoading-DKFeqkmK.js → PageLoading-C7H6q6U6.js} +248 -248
- package/dist/{ResultComponent-BaDheojB.js → ResultComponent-DW9Q9tp9.js} +5 -5
- package/dist/{Results-CrpHB101.js → Results-N2OttUlb.js} +19 -19
- package/dist/{StatusIcon-Clfyy-Yn.js → StatusIcon-B21tjIXx.js} +1 -1
- package/dist/{StoreTokenModal-CO5hXMs3.js → StoreTokenModal-CHgvjLGl.js} +1 -1
- package/dist/{SymbolsPane-XFVErDFb.js → SymbolsPane-DUrLpSSw.js} +11 -11
- package/dist/{TutorialPage-CMcTYDOV.js → TutorialPage-DHgPuFN0.js} +11 -11
- package/dist/{VegaLiteChart-DX_LbF3g.js → VegaLiteChart-BqHLSptG.js} +11116 -11067
- package/dist/{WelcomePage-B6E35FUa.js → WelcomePage-CN6ptsoF.js} +3 -3
- package/dist/agent.js +1349 -0
- package/dist/components/VegaLiteChart.vue.d.ts.map +1 -1
- package/dist/components/chartControlsManager.d.ts +0 -1
- package/dist/components/chartControlsManager.d.ts.map +1 -1
- package/dist/{cssMode-zpO2ap2B.js → cssMode-DW4OByy3.js} +2 -2
- package/dist/dashboard.js +63 -63
- package/dist/dashboards/chartTheme.d.ts +68 -0
- package/dist/dashboards/chartTheme.d.ts.map +1 -0
- package/dist/dashboards/donutSpec.d.ts +2 -1
- package/dist/dashboards/donutSpec.d.ts.map +1 -1
- package/dist/dashboards/headlineSpec.d.ts +2 -1
- package/dist/dashboards/headlineSpec.d.ts.map +1 -1
- package/dist/dashboards/helpers.d.ts +23 -0
- package/dist/dashboards/helpers.d.ts.map +1 -1
- package/dist/dashboards/index.d.ts +2 -0
- package/dist/dashboards/index.d.ts.map +1 -1
- package/dist/dashboards/layerSpec.d.ts +4 -1
- package/dist/dashboards/layerSpec.d.ts.map +1 -1
- package/dist/dashboards/pointSpec.d.ts +2 -1
- package/dist/dashboards/pointSpec.d.ts.map +1 -1
- package/dist/dashboards/spec.d.ts +8 -1
- package/dist/dashboards/spec.d.ts.map +1 -1
- package/dist/{editor.main-BQh6DxDB.js → editor.main-TuTbSVcN.js} +22 -22
- package/dist/{editorStore-CiWH_nGN.js → editorStore-Czhpct1j.js} +1751 -1181
- package/dist/entry.agent.d.ts +12 -0
- package/dist/entry.agent.d.ts.map +1 -0
- package/dist/entry.llm.d.ts +1 -1
- package/dist/entry.llm.d.ts.map +1 -1
- package/dist/{freemarker2-DQBqlEXc.js → freemarker2-ZGcKAI8o.js} +1 -1
- package/dist/{globalChatRuntime-DAERmOdu.js → globalChatRuntime-BnMYNYqe.js} +35 -35
- package/dist/{handlebars-tgYxaM70.js → handlebars-B3s0Qrrb.js} +1 -1
- package/dist/{helpers-C2pARJoZ.js → helpers-B3tq3RZK.js} +17 -17
- package/dist/{html-jJahD3Mi.js → html-DM1koKCG.js} +1 -1
- package/dist/{htmlMode-BA1-8l2e.js → htmlMode-CpPImbDh.js} +2 -2
- package/dist/{javascript-Cypfo7va.js → javascript-jClqu73w.js} +1 -1
- package/dist/{jsonMode-xJye8PWS.js → jsonMode-CwFYTPO9.js} +2 -2
- package/dist/{liquid-BGDrv5da.js → liquid-C6l-UINC.js} +1 -1
- package/dist/llm/chatAgentPrompt.d.ts +4 -16
- package/dist/llm/chatAgentPrompt.d.ts.map +1 -1
- package/dist/llm/dashboardAgentRuntime.d.ts +10 -10
- package/dist/llm/dashboardAgentTools.d.ts +10 -10
- package/dist/llm/data/prompts.d.ts +1 -1
- package/dist/llm/data/prompts.d.ts.map +1 -1
- package/dist/llm/data/trilogySyntax.generated.d.ts +3 -3
- package/dist/llm/data/trilogySyntax.generated.d.ts.map +1 -1
- package/dist/llm/returnToUserTool.d.ts +20 -0
- package/dist/llm/returnToUserTool.d.ts.map +1 -0
- package/dist/llm/toolLoopCore.d.ts +7 -0
- package/dist/llm/toolLoopCore.d.ts.map +1 -1
- package/dist/llm/utils.d.ts.map +1 -1
- package/dist/{llm-Wf4Etiu9.js → llm-Bc1CfjOE.js} +2203 -2722
- package/dist/llm.js +3 -3
- package/dist/{localStorage-C3xms-ab.js → localStorage-Cy0sHlT0.js} +19 -19
- package/dist/{lspLanguageFeatures-V3e_p9oN.js → lspLanguageFeatures-GDtuGOTD.js} +1 -1
- package/dist/{mdx-BUR1aImW.js → mdx-BQEQ0k1f.js} +1 -1
- package/dist/monaco.js +3 -3
- package/dist/{python-YLkl0pc6.js → python-USoVCfWY.js} +1 -1
- package/dist/{razor-BP8TRMDY.js → razor-BxmgiR-q.js} +1 -1
- package/dist/{reconcile-BH_ReGDR.js → reconcile-DtPcgEjQ.js} +1 -1
- package/dist/{remoteStoreSync-B0K8QScO.js → remoteStoreSync-CscErZ-I.js} +2 -2
- package/dist/{stores-DTGQZ4_B.js → stores-DgdADCiH.js} +323 -323
- package/dist/stores.js +3 -4
- package/dist/trilogy-studio-components.css +1 -1
- package/dist/{tsMode-BH9HS_sH.js → tsMode-BEQ7aXX4.js} +1 -1
- package/dist/{typescript-BM-ynfk9.js → typescript-CzBSjjfY.js} +1 -1
- package/dist/{useChatWithTools-BSrzJtYI.js → useChatWithTools-CMhGxdyr.js} +14 -14
- package/dist/{useDashboard-CGeIdDuX.js → useDashboard-CjZgjmgb.js} +553 -553
- package/dist/{useGlobalChatPanel-D9kMZLeF.js → useGlobalChatPanel-Doeilj18.js} +69 -70
- package/dist/views/LLMView.vue.d.ts +23 -23
- package/dist/views/TutorialPage.vue.d.ts +10 -10
- package/dist/views.js +147 -148
- package/dist/vite.agent.config.d.ts +3 -0
- package/dist/vite.agent.config.d.ts.map +1 -0
- package/dist/{workers-B9Eybl-M.js → workers-CHvkad0r.js} +2 -2
- package/dist/{xml-M5WFPSpA.js → xml-ODdyS0gX.js} +1 -1
- package/dist/{yaml-CEeFwjz9.js → yaml-PCBTA2qD.js} +1 -1
- package/package.json +7 -2
- package/dist/AssetAutoImporter-C_7Ms9xe.js +0 -403
- package/dist/rolldown-runtime-B0aSnxlc.js +0 -20
package/README.md
CHANGED
|
@@ -29,6 +29,7 @@ Available public subpaths:
|
|
|
29
29
|
- `@trilogy-data/trilogy-studio-components/stores`
|
|
30
30
|
- `@trilogy-data/trilogy-studio-components/connections`
|
|
31
31
|
- `@trilogy-data/trilogy-studio-components/llm`
|
|
32
|
+
- `@trilogy-data/trilogy-studio-components/agent` — providers + `runToolLoop` only; no vue/pinia/DuckDB. For apps that drive their own tools.
|
|
32
33
|
|
|
33
34
|
There is no root package export. Import one of the explicit subpaths above so bundle-splitting stays predictable.
|
|
34
35
|
|
|
@@ -0,0 +1,403 @@
|
|
|
1
|
+
import { pn as e } from "./llm-Bc1CfjOE.js";
|
|
2
|
+
import { t } from "./_plugin-vue_export-helper-f9Rw-Il4.js";
|
|
3
|
+
import { A as n, M as r, T as i, j as a, x as o } from "./editorStore-Czhpct1j.js";
|
|
4
|
+
import { a as s, l as c, o as l, s as u } from "./stores-DgdADCiH.js";
|
|
5
|
+
import { c as d } from "./useGlobalChatPanel-Doeilj18.js";
|
|
6
|
+
import { t as ee } from "./helpers-B3tq3RZK.js";
|
|
7
|
+
import { n as f, r as p } from "./remoteStoreSync-CscErZ-I.js";
|
|
8
|
+
import { Fragment as m, computed as h, createCommentVNode as g, createElementBlock as _, createElementVNode as v, createTextVNode as y, createVNode as te, defineComponent as ne, inject as b, normalizeClass as x, onBeforeUnmount as re, onMounted as ie, openBlock as S, ref as C, toDisplayString as w, unref as ae, vModelText as T, withDirectives as E } from "vue";
|
|
9
|
+
//#region components/AssetAutoImporter.vue?vue&type=script&setup=true&lang.ts
|
|
10
|
+
var oe = { class: "auto-import-container" }, se = {
|
|
11
|
+
key: 0,
|
|
12
|
+
class: "import-panel import-state error-state",
|
|
13
|
+
role: "alert"
|
|
14
|
+
}, ce = { class: "import-headline" }, le = { class: "error-message" }, ue = {
|
|
15
|
+
key: 1,
|
|
16
|
+
class: "import-panel import-state loading-state",
|
|
17
|
+
role: "status"
|
|
18
|
+
}, de = { class: "loading-content" }, fe = ["src"], pe = { class: "import-headline" }, me = { class: "step-indicator" }, he = { class: "step-icon" }, ge = { key: 0 }, _e = { key: 1 }, ve = { class: "step-icon" }, ye = { key: 0 }, be = { key: 1 }, xe = { key: 2 }, Se = { class: "step-icon" }, Ce = { key: 0 }, we = { key: 1 }, Te = { key: 2 }, Ee = { class: "step-icon" }, De = { key: 0 }, Oe = { key: 1 }, ke = { key: 2 }, Ae = { class: "step-text" }, je = {
|
|
19
|
+
key: 2,
|
|
20
|
+
class: "import-panel import-form"
|
|
21
|
+
}, Me = { class: "import-header" }, Ne = { class: "import-headline" }, Pe = { class: "import-details" }, Fe = {
|
|
22
|
+
key: 0,
|
|
23
|
+
class: "import-source"
|
|
24
|
+
}, Ie = { class: "import-source" }, Le = { class: "connection-setup" }, Re = { class: "setup-description" }, ze = {
|
|
25
|
+
key: 0,
|
|
26
|
+
class: "form-group"
|
|
27
|
+
}, Be = {
|
|
28
|
+
key: 1,
|
|
29
|
+
class: "form-group"
|
|
30
|
+
}, Ve = { class: "form-group" }, He = { class: "form-group" }, Ue = { class: "form-group" }, We = { class: "form-actions" }, Ge = ["disabled"], Ke = 1500, D = /*@__PURE__*/ ne({
|
|
31
|
+
__name: "AssetAutoImporter",
|
|
32
|
+
emits: ["importComplete", "fullScreen"],
|
|
33
|
+
setup(e, { emit: t }) {
|
|
34
|
+
let ne = t, D = b("dashboardStore"), O = b("connectionStore"), k = b("editorStore"), A = b("modelStore"), j = b("communityApiStore"), qe = b("queryExecutionService"), Je = b("saveDashboards"), Ye = b("saveAll"), Xe = b("storageSources", []), M = s(), Ze = h(() => Xe.find((e) => e.type === "remote"));
|
|
35
|
+
if (!D || !O || !k || !A || !Je || !qe || !Ye) throw Error("Required stores not provided");
|
|
36
|
+
let N = C(!0), P = C(""), F = C(""), Qe = C(""), $e = C("generic"), I = C(""), L = C(!1), R = C(""), z = C("dashboard"), B = C(""), V = C(""), H = C(null), U = C(!1), et = C(""), W = C(!1), G = C("importing"), K = C(Date.now()), tt = C(Date.now()), nt = C("0 ms"), q = null, J = C({
|
|
37
|
+
mdToken: "",
|
|
38
|
+
projectId: "",
|
|
39
|
+
username: "",
|
|
40
|
+
password: "",
|
|
41
|
+
account: "",
|
|
42
|
+
sshPrivateKey: ""
|
|
43
|
+
}), Y = C(!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 = h(() => {
|
|
65
|
+
if (L.value) return !1;
|
|
66
|
+
let e = rt[V.value];
|
|
67
|
+
return !e || !e.autoImport;
|
|
68
|
+
}), at = h(() => {
|
|
69
|
+
let e = rt[V.value];
|
|
70
|
+
return e ? e.fields : [];
|
|
71
|
+
}), ot = h(() => {
|
|
72
|
+
let e = o.find((e) => e.value === V.value);
|
|
73
|
+
return e ? e.label : V.value;
|
|
74
|
+
}), X = h(() => {
|
|
75
|
+
switch (z.value) {
|
|
76
|
+
case "dashboard": return "Dashboard";
|
|
77
|
+
case "editor":
|
|
78
|
+
case "trilogy": return "Editor";
|
|
79
|
+
default: return "Asset";
|
|
80
|
+
}
|
|
81
|
+
}), st = h(() => `A model named "${B.value}" already exists. Overwriting will replace its imported sources. Continue?`), ct = h(() => {
|
|
82
|
+
switch (z.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() - tt.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 (!H.value && (N.value || U.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() - K.value, n = Math.max(0, Ke - t);
|
|
107
|
+
n > 0 && G.value !== "registering" && G.value !== "importing" && await new Promise((e) => setTimeout(e, n)), G.value = e, K.value = Date.now();
|
|
108
|
+
};
|
|
109
|
+
function $() {
|
|
110
|
+
if (!V.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) => Qe.value || a(e), ft = async () => {
|
|
122
|
+
if (!F.value || !j) return;
|
|
123
|
+
let e = r(F.value), t = dt(e), n = j.stores.find((e) => e.id === t);
|
|
124
|
+
if (n) {
|
|
125
|
+
n.type === "generic" && (I.value && (n.token = I.value), L.value && B.value && (n.name = B.value)), console.log(`Store ${t} already registered`);
|
|
126
|
+
return;
|
|
127
|
+
}
|
|
128
|
+
let a = $e.value === "static" ? {
|
|
129
|
+
...i(e),
|
|
130
|
+
id: t
|
|
131
|
+
} : {
|
|
132
|
+
type: "generic",
|
|
133
|
+
id: t,
|
|
134
|
+
name: L.value && B.value ? B.value : `Auto-registered: ${e}`,
|
|
135
|
+
baseUrl: e,
|
|
136
|
+
token: I.value || void 0
|
|
137
|
+
};
|
|
138
|
+
try {
|
|
139
|
+
await j.addStore(a), console.log(`Store ${t} registered successfully`);
|
|
140
|
+
} catch (e) {
|
|
141
|
+
console.warn(`Failed to register store ${t}:`, e);
|
|
142
|
+
}
|
|
143
|
+
}, pt = () => {
|
|
144
|
+
if (!F.value || !j) return null;
|
|
145
|
+
let e = r(F.value), t = dt(e), n = j.stores.find((e) => e.id === t);
|
|
146
|
+
return n?.type === "generic" ? n : null;
|
|
147
|
+
}, mt = () => {
|
|
148
|
+
W.value = !1, H.value = `Import cancelled. Existing model "${B.value}" was not overwritten.`, N.value = !1, Q();
|
|
149
|
+
}, ht = async () => {
|
|
150
|
+
W.value = !1, H.value = null, await yt();
|
|
151
|
+
}, gt = async () => {
|
|
152
|
+
if (!L.value && A.models[B.value]) {
|
|
153
|
+
N.value = !1, Q(), W.value = !0;
|
|
154
|
+
return;
|
|
155
|
+
}
|
|
156
|
+
await yt();
|
|
157
|
+
}, _t = async () => {
|
|
158
|
+
if (!Ze.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 f(Ze.value, e.id, k, O, A);
|
|
162
|
+
let t = n(e);
|
|
163
|
+
if (z.value === "dashboard") {
|
|
164
|
+
let e = Object.values(D.dashboards).find((e) => e.name === R.value && e.connection === t);
|
|
165
|
+
if (!e) throw Error(`Dashboard "${R.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 D.warmDashboardQueries(e.id, qe, k), {
|
|
167
|
+
foundAssetId: e.id,
|
|
168
|
+
connectionName: t
|
|
169
|
+
};
|
|
170
|
+
}
|
|
171
|
+
let r = `remote:${e.id}:`, i = Object.values(k.editors).filter((e) => e.id.startsWith(r) && e.connection === t), a = (e) => e.replace(/\.[^.]+$/, ""), o = i.find((e) => e.name === R.value || a(e.name) === R.value);
|
|
172
|
+
if (!o) {
|
|
173
|
+
let e = i.map((e) => e.name).join(", ");
|
|
174
|
+
throw Error(`Editor "${R.value}" was not found in the remote store, have ${e}`);
|
|
175
|
+
}
|
|
176
|
+
return {
|
|
177
|
+
foundAssetId: o.id,
|
|
178
|
+
connectionName: t
|
|
179
|
+
};
|
|
180
|
+
}, vt = async () => {
|
|
181
|
+
let e = `${B.value}-connection`, t = new ee(k, A, D);
|
|
182
|
+
A.models[B.value] || A.newModelConfig(B.value, !0), O.connectionByName(e) || O.newConnection(e, V.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: B.value
|
|
190
|
+
});
|
|
191
|
+
let n = pt(), r = await t.importModel(B.value, P.value, e, {
|
|
192
|
+
token: I.value || void 0,
|
|
193
|
+
remote: !1,
|
|
194
|
+
remoteStoreId: n?.id || null,
|
|
195
|
+
remoteBaseUrl: n?.baseUrl || F.value || null
|
|
196
|
+
});
|
|
197
|
+
if (O.connectionByName(e)?.setModel(B.value), z.value === "dashboard") {
|
|
198
|
+
let t = r?.dashboards.get(R.value), n = t ? D.dashboards[t] : void 0;
|
|
199
|
+
if (!n) {
|
|
200
|
+
let t = Object.values(D.dashboards).filter((t) => t.connection === e && t.storage !== "remote").map((e) => e.name).join(", ");
|
|
201
|
+
throw Error(`Dashboard "${R.value}" was not found in the imported model, have ${t}`);
|
|
202
|
+
}
|
|
203
|
+
return D.warmDashboardQueries(n.id, qe, k), {
|
|
204
|
+
foundAssetId: n.id,
|
|
205
|
+
connectionName: e
|
|
206
|
+
};
|
|
207
|
+
}
|
|
208
|
+
let i = r?.trilogy.get(R.value) || r?.sql.get(R.value) || r?.python.get(R.value), a = i ? k.editors[i] : void 0;
|
|
209
|
+
if (!a) {
|
|
210
|
+
let t = Object.values(k.editors).filter((t) => t.connection === e && t.storage !== "remote").map((e) => e.name).join(", ");
|
|
211
|
+
throw Error(`Editor "${R.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 (!B.value || !R.value) {
|
|
220
|
+
H.value = "Missing required import parameters";
|
|
221
|
+
return;
|
|
222
|
+
}
|
|
223
|
+
if (!L.value && !P.value) {
|
|
224
|
+
H.value = "Missing required import parameters";
|
|
225
|
+
return;
|
|
226
|
+
}
|
|
227
|
+
tt.value = Date.now(), K.value = Date.now(), N.value = !0, Z(), F.value ? (G.value = "registering", await ft(), await ut("importing")) : G.value = "importing";
|
|
228
|
+
let { foundAssetId: e, connectionName: t } = L.value ? await _t() : await vt();
|
|
229
|
+
await ut("connecting"), et.value = e, L.value || await Ye();
|
|
230
|
+
let n = O.connectionByName(t);
|
|
231
|
+
n && await O.resetConnection(n.id), await ut("preparing"), N.value = !1, U.value = !0, q && clearTimeout(q), Z(), setTimeout(() => {
|
|
232
|
+
Q();
|
|
233
|
+
}, 2e3), ne("importComplete", e, z.value), c(l.IMPORT), c(l.STORE), c(l.STORE_ID), c(l.STORE_KIND), c(l.TOKEN), c(l.ASSET_TYPE), c(l.ASSET_NAME), c(l.DASHBOARD), c(l.REMOTE), setTimeout(() => {
|
|
234
|
+
M.closeTab(null, "asset-import"), z.value === "dashboard" ? (M.openTab("dashboard", null, e), M.setActiveSidebarScreen("dashboard")) : (M.openTab("editors", null, e), M.setActiveSidebarScreen("editors"));
|
|
235
|
+
}, 500);
|
|
236
|
+
} catch (e) {
|
|
237
|
+
console.error("Import failed:", e), H.value = e instanceof Error ? e.message : "Import failed", N.value = !1, Q();
|
|
238
|
+
}
|
|
239
|
+
};
|
|
240
|
+
ie(async () => {
|
|
241
|
+
try {
|
|
242
|
+
tt.value = Date.now(), K.value = Date.now(), Z();
|
|
243
|
+
let e = M.modelImport.value, t = u(l.STORE, ""), n = u(l.STORE_ID, ""), r = u(l.STORE_KIND, ""), i = u(l.TOKEN, ""), a = u(l.REMOTE, ""), o = u(l.ASSET_TYPE, ""), s = u(l.ASSET_NAME, ""), c = u(l.DASHBOARD, ""), d = u(l.MODEL_NAME, ""), ee = u(l.CONNECTION, ""), f = "dashboard", p = "";
|
|
244
|
+
o && s ? (f = o, p = s) : c && (f = "dashboard", p = c);
|
|
245
|
+
let m = [
|
|
246
|
+
"true",
|
|
247
|
+
"1",
|
|
248
|
+
"yes"
|
|
249
|
+
].includes((a || "").toLowerCase());
|
|
250
|
+
if (!p || !d || !m && (!e || !ee) || m && !t) {
|
|
251
|
+
H.value = m ? "Missing required import parameters (store, assetName/dashboard, modelName)" : "Missing required import parameters (import, assetName/dashboard, modelName, connection)", N.value = !1, Q();
|
|
252
|
+
return;
|
|
253
|
+
}
|
|
254
|
+
if (P.value = e ? decodeURIComponent(e) : "", F.value = t ? decodeURIComponent(t) : "", Qe.value = n ? decodeURIComponent(n) : "", $e.value = r === "static" && !m ? "static" : "generic", I.value = i ? decodeURIComponent(i) : "", L.value = m, R.value = decodeURIComponent(p), z.value = f, B.value = decodeURIComponent(d), V.value = ee, !L.value && !rt[V.value]) {
|
|
255
|
+
H.value = `Unsupported connection type: ${V.value}`, N.value = !1, Q();
|
|
256
|
+
return;
|
|
257
|
+
}
|
|
258
|
+
it.value ? (N.value = !1, Q(), $()) : await gt();
|
|
259
|
+
} catch (e) {
|
|
260
|
+
console.error("Auto-import initialization failed:", e), H.value = e instanceof Error ? e.message : "Failed to initialize import", N.value = !1, Q();
|
|
261
|
+
}
|
|
262
|
+
}), re(() => {
|
|
263
|
+
Q();
|
|
264
|
+
});
|
|
265
|
+
let bt = async () => {
|
|
266
|
+
if (N.value = !0, !Y.value) throw Error("Form is not valid");
|
|
267
|
+
console.log("performing import"), await gt();
|
|
268
|
+
}, xt = () => {
|
|
269
|
+
z.value === "dashboard" ? (M.setActiveDashboard(null), M.setActiveScreen("dashboard")) : M.setActiveScreen("editors");
|
|
270
|
+
};
|
|
271
|
+
return (e, t) => (S(), _("div", oe, [H.value ? (S(), _("div", se, [
|
|
272
|
+
t[5] ||= v("div", { class: "error-icon" }, "⚠️", -1),
|
|
273
|
+
v("h2", ce, w(X.value) + " Load Failed", 1),
|
|
274
|
+
v("p", le, w(H.value), 1),
|
|
275
|
+
v("div", { class: "error-actions" }, [v("button", {
|
|
276
|
+
onClick: xt,
|
|
277
|
+
class: "import-action manual-import-button"
|
|
278
|
+
}, " Try Manual Import ")])
|
|
279
|
+
])) : N.value || U.value ? (S(), _("div", ue, [v("div", de, [
|
|
280
|
+
v("img", {
|
|
281
|
+
src: ae(d),
|
|
282
|
+
class: "trilogy-icon spinning",
|
|
283
|
+
alt: "Loading"
|
|
284
|
+
}, null, 8, fe),
|
|
285
|
+
v("h2", pe, w(ct.value), 1),
|
|
286
|
+
v("div", me, [
|
|
287
|
+
F.value ? (S(), _("div", {
|
|
288
|
+
key: 0,
|
|
289
|
+
class: x(["step", {
|
|
290
|
+
active: G.value === "registering",
|
|
291
|
+
completed: G.value !== "registering"
|
|
292
|
+
}])
|
|
293
|
+
}, [v("div", he, [G.value === "registering" ? (S(), _("span", ge, "⟳")) : (S(), _("span", _e, "✓"))]), t[6] ||= v("span", { class: "step-text" }, "Registering store", -1)], 2)) : g("", !0),
|
|
294
|
+
v("div", { class: x(["step", {
|
|
295
|
+
active: G.value === "importing",
|
|
296
|
+
completed: G.value !== "importing" && G.value !== "registering" && (G.value === "connecting" || G.value === "preparing" || U.value)
|
|
297
|
+
}]) }, [v("div", ve, [G.value === "importing" ? (S(), _("span", ye, "⟳")) : G.value === "registering" ? (S(), _("span", be, "○")) : (S(), _("span", xe, "✓"))]), t[7] ||= v("span", { class: "step-text" }, "Importing model", -1)], 2),
|
|
298
|
+
v("div", { class: x(["step", {
|
|
299
|
+
active: G.value === "connecting",
|
|
300
|
+
completed: G.value === "preparing" || U.value
|
|
301
|
+
}]) }, [v("div", Se, [G.value === "connecting" ? (S(), _("span", Ce, "⟳")) : G.value === "preparing" || U.value ? (S(), _("span", we, "✓")) : (S(), _("span", Te, "○"))]), t[8] ||= v("span", { class: "step-text" }, "Establishing connection", -1)], 2),
|
|
302
|
+
v("div", { class: x(["step", {
|
|
303
|
+
active: G.value === "preparing" || U.value,
|
|
304
|
+
completed: U.value
|
|
305
|
+
}]) }, [v("div", Ee, [G.value === "preparing" ? (S(), _("span", De, "⟳")) : U.value ? (S(), _("span", Oe, "✓")) : (S(), _("span", ke, "○"))]), v("span", Ae, "Preparing " + w(X.value.toLowerCase()), 1)], 2)
|
|
306
|
+
]),
|
|
307
|
+
t[9] ||= v("p", { class: "import-details" }, "This may take a few seconds.", -1)
|
|
308
|
+
])])) : it.value ? (S(), _("div", je, [
|
|
309
|
+
v("div", Me, [v("h2", Ne, "Import Model & " + w(X.value), 1), v("div", Pe, [
|
|
310
|
+
v("p", null, [t[10] ||= v("strong", null, "Model:", -1), y(" " + w(B.value), 1)]),
|
|
311
|
+
v("p", null, [v("strong", null, w(X.value) + ":", 1), y(" " + w(R.value), 1)]),
|
|
312
|
+
F.value ? (S(), _("p", Fe, [t[11] ||= v("strong", null, "Store:", -1), y(" " + w(F.value), 1)])) : g("", !0),
|
|
313
|
+
v("p", Ie, [t[12] ||= v("strong", null, "From:", -1), y(" " + w(P.value), 1)])
|
|
314
|
+
])]),
|
|
315
|
+
v("div", Le, [
|
|
316
|
+
v("h3", null, w(ot.value) + " Connection Setup", 1),
|
|
317
|
+
v("p", Re, " This model requires a " + w(V.value) + " connection. Please provide the required configuration: ", 1),
|
|
318
|
+
V.value === "motherduck" ? (S(), _("div", ze, [t[13] ||= v("label", { for: "md-token" }, "MotherDuck Token", -1), E(v("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
|
+
T,
|
|
327
|
+
J.value.mdToken,
|
|
328
|
+
void 0,
|
|
329
|
+
{ trim: !0 }
|
|
330
|
+
]])])) : V.value === "bigquery" ? (S(), _("div", Be, [t[14] ||= v("label", { for: "project-id" }, "BigQuery Project ID", -1), E(v("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
|
+
T,
|
|
339
|
+
J.value.projectId,
|
|
340
|
+
void 0,
|
|
341
|
+
{ trim: !0 }
|
|
342
|
+
]])])) : V.value === "snowflake" ? (S(), _(m, { key: 2 }, [
|
|
343
|
+
v("div", Ve, [t[15] ||= v("label", { for: "snowflake-username" }, "Username", -1), E(v("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
|
+
T,
|
|
352
|
+
J.value.username,
|
|
353
|
+
void 0,
|
|
354
|
+
{ trim: !0 }
|
|
355
|
+
]])]),
|
|
356
|
+
v("div", He, [t[16] ||= v("label", { for: "snowflake-account" }, "Account", -1), E(v("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
|
+
T,
|
|
365
|
+
J.value.account,
|
|
366
|
+
void 0,
|
|
367
|
+
{ trim: !0 }
|
|
368
|
+
]])]),
|
|
369
|
+
v("div", Ue, [t[17] ||= v("label", { for: "snowflake-key" }, "Private Key", -1), E(v("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
|
+
T,
|
|
378
|
+
J.value.sshPrivateKey,
|
|
379
|
+
void 0,
|
|
380
|
+
{ trim: !0 }
|
|
381
|
+
]])])
|
|
382
|
+
], 64)) : g("", !0)
|
|
383
|
+
]),
|
|
384
|
+
v("div", We, [v("button", {
|
|
385
|
+
onClick: bt,
|
|
386
|
+
class: "import-action import-button",
|
|
387
|
+
disabled: !Y.value
|
|
388
|
+
}, " Import Model & " + w(X.value), 9, Ge), v("button", { onClick: xt }, "Cancel")])
|
|
389
|
+
])) : g("", !0), te(p, {
|
|
390
|
+
show: W.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
|
+
}), O = /* @__PURE__ */ e({ default: () => k }), k = /*#__PURE__*/ t(D, [["__scopeId", "data-v-331fa5ac"]]);
|
|
402
|
+
//#endregion
|
|
403
|
+
export { O as n, k as t };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as e } from "./_plugin-vue_export-helper-f9Rw-Il4.js";
|
|
2
|
-
import { t } from "./StatusIcon-
|
|
2
|
+
import { t } from "./StatusIcon-B21tjIXx.js";
|
|
3
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
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as e } from "./_plugin-vue_export-helper-f9Rw-Il4.js";
|
|
2
|
-
import { o as t, s as n } from "./useGlobalChatPanel-
|
|
2
|
+
import { o as t, s as n } from "./useGlobalChatPanel-Doeilj18.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({
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { pn as e } from "./llm-Bc1CfjOE.js";
|
|
2
2
|
import { t } from "./_plugin-vue_export-helper-f9Rw-Il4.js";
|
|
3
|
-
import { X as n } from "./editorStore-
|
|
4
|
-
import { t as r } from "./ErrorMessage-
|
|
5
|
-
import { t as i } from "./MarkdownRenderer-
|
|
6
|
-
import { p as a } from "./PageLoading-
|
|
7
|
-
import { t as o } from "./StoreTokenModal-
|
|
3
|
+
import { X as n } from "./editorStore-Czhpct1j.js";
|
|
4
|
+
import { t as r } from "./ErrorMessage-Cz7q7vJI.js";
|
|
5
|
+
import { t as i } from "./MarkdownRenderer-Dlb_KGmk.js";
|
|
6
|
+
import { p as a } from "./PageLoading-C7H6q6U6.js";
|
|
7
|
+
import { t as o } from "./StoreTokenModal-CHgvjLGl.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,11 +1,11 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { pn as e } from "./llm-Bc1CfjOE.js";
|
|
2
2
|
import { t } from "./_plugin-vue_export-helper-f9Rw-Il4.js";
|
|
3
3
|
import { t as n, u as r } from "./base-DuKnVD-A.js";
|
|
4
|
-
import { r as i } from "./stores-
|
|
4
|
+
import { r as i } from "./stores-DgdADCiH.js";
|
|
5
5
|
import "./connections-CWH3zwH2.js";
|
|
6
|
-
import { r as a, u as o } from "./useGlobalChatPanel-
|
|
7
|
-
import { t as s } from "./CodeBlock-
|
|
8
|
-
import { t as c } from "./CreateEditorFromDatasourcePopup-
|
|
6
|
+
import { r as a, u as o } from "./useGlobalChatPanel-Doeilj18.js";
|
|
7
|
+
import { t as s } from "./CodeBlock-C9o09ipr.js";
|
|
8
|
+
import { t as c } from "./CreateEditorFromDatasourcePopup-BUoegyem.js";
|
|
9
9
|
import { Fragment as l, computed as u, createBlock as d, createCommentVNode as f, createElementBlock as p, createElementVNode as m, createTextVNode as h, createVNode as g, defineComponent as _, inject as v, nextTick as y, normalizeClass as b, onMounted as x, onUnmounted as S, openBlock as C, ref as w, renderList as T, resolveComponent as E, toDisplayString as D, vModelText as O, watch as k, withCtx as A, withDirectives as j } from "vue";
|
|
10
10
|
//#region components/connection/ConnectionTable.vue?vue&type=script&lang.ts
|
|
11
11
|
var ee = _({
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { t as e } from "./_plugin-vue_export-helper-f9Rw-Il4.js";
|
|
2
2
|
import { u as t } from "./base-DuKnVD-A.js";
|
|
3
|
-
import { r as n } from "./useGlobalChatPanel-
|
|
4
|
-
import { t as r } from "./CodeBlock-
|
|
3
|
+
import { r as n } from "./useGlobalChatPanel-Doeilj18.js";
|
|
4
|
+
import { t as r } from "./CodeBlock-C9o09ipr.js";
|
|
5
5
|
import { Fragment as i, Teleport as a, computed as o, createBlock as ee, createCommentVNode as s, createElementBlock as c, createElementVNode as l, createTextVNode as u, createVNode as d, defineComponent as f, inject as p, nextTick as te, onMounted as ne, onUnmounted as re, openBlock as m, ref as h, renderList as ie, toDisplayString as g, vModelCheckbox as ae, vModelText as oe, watch as se, withDirectives as _, withKeys as v, withModifiers as y } from "vue";
|
|
6
6
|
//#region components/sidebar/CreateEditorFromDatasourcePopup.vue?vue&type=script&setup=true&lang.ts
|
|
7
7
|
var ce = ["data-testid"], le = ["data-testid"], ue = {
|