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