@trilogy-data/trilogy-studio-components 0.1.26 → 0.1.28
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/AssetAutoImporter-C_7Ms9xe.js +403 -0
- package/dist/{ChatCreatorModal-CL-jBnc3.js → ChatCreatorModal-Cd40SvdM.js} +3 -3
- package/dist/{ChatModelSelect-Do-VRUFc.js → ChatModelSelect-Cz7axWjP.js} +1 -1
- package/dist/{CodeBlock-PT4no49I.js → CodeBlock-Dj-GfTbW.js} +4 -4
- package/dist/{CommunityModels-Cmro0hV3.js → CommunityModels-lX2RhHCG.js} +7 -7
- package/dist/{ConnectionErrorPopup-FSs7U-Yl.js → ConnectionErrorPopup-7vpqgF0s.js} +1 -1
- package/dist/{ConnectionView-COnTTuA4.js → ConnectionView-CZ06qjjE.js} +49 -49
- package/dist/{CreateEditorFromDatasourcePopup-snOh1d5h.js → CreateEditorFromDatasourcePopup-DwA938kf.js} +4 -4
- package/dist/{Dashboard-BH9ZwMVJ.js → Dashboard-CQsIqWZC.js} +276 -280
- package/dist/{DashboardImportSelector-DQSvu9T-.js → DashboardImportSelector-CkqH52FX.js} +2 -2
- package/dist/{DashboardMobile-BUPtdN2V.js → DashboardMobile-DWFlel5p.js} +39 -39
- package/dist/{DrilldownPane-CBs5ZojS.js → DrilldownPane-BheRHJMs.js} +5 -7
- package/dist/{Editor-DQsYpkwl.js → Editor-DQ66Vp6v.js} +105 -103
- package/dist/{ErrorMessage-XMn_08gJ.js → ErrorMessage-D5JeF3Iz.js} +4 -4
- package/dist/{GlobalChatPanel-DhnOaige.js → GlobalChatPanel-B_s3COHE.js} +20 -21
- package/dist/{IDE-HLa8vybk.js → IDE-4-Jg6gsM.js} +200 -203
- package/dist/{JobsView-B97HBoIE.js → JobsView-B5NWDUgP.js} +13 -14
- package/dist/{LLMChat-CxJcPLEG.js → LLMChat-eKgEc-I3.js} +3 -3
- package/dist/{LLMView-C1MUf0c2.js → LLMView-CdTwMLVV.js} +23 -23
- package/dist/{LoadingView-s1uznGwG.js → LoadingView-Bu3wLJ7J.js} +2 -2
- package/dist/{MarkdownRenderer-BNDuEyG-.js → MarkdownRenderer-B6lqdkgc.js} +531 -430
- package/dist/{MobileIDE-BpqXoaMR.js → MobileIDE-CZlg20oa.js} +179 -182
- package/dist/{ModelCard-BhN25jaV.js → ModelCard-Bs_d7Jis.js} +12 -13
- package/dist/{ModelView-DUDA_PtZ.js → ModelView-BP5yyecx.js} +7 -7
- package/dist/PageLoading-DKFeqkmK.js +5937 -0
- package/dist/{ResultComponent-CAn_r3BL.js → ResultComponent-BaDheojB.js} +8 -8
- package/dist/{Results-BJtlwebY.js → Results-CrpHB101.js} +17 -19
- package/dist/{StatusIcon-BylPx2EO.js → StatusIcon-Clfyy-Yn.js} +2 -2
- package/dist/{StoreTokenModal-zCSYhfrw.js → StoreTokenModal-CO5hXMs3.js} +2 -2
- package/dist/{SymbolsPane-KYSwN9Sv.js → SymbolsPane-XFVErDFb.js} +6 -3
- package/dist/{TrilogyEmbedProvider-WA_dlv9e.js → TrilogyEmbedProvider-D3h0gYnX.js} +9 -9
- package/dist/{TutorialPage-NRcee6Dx.js → TutorialPage-CMcTYDOV.js} +27 -28
- package/dist/{VegaLiteChart-D1slfOUY.js → VegaLiteChart-DX_LbF3g.js} +12131 -10947
- package/dist/{WelcomePage-D5mU2x1L.js → WelcomePage-B6E35FUa.js} +5 -5
- package/dist/{embedTheme-Bub46ILG.js → _plugin-vue_export-helper-f9Rw-Il4.js} +14 -6
- package/dist/assets/{css.worker-9aDGcEUy.js → css.worker-niORQtzO.js} +14 -14
- package/dist/assets/{html.worker-D2LKDpnG.js → html.worker-CO5LvJpF.js} +17 -17
- package/dist/assets/json.worker-BezHzWUV.js +58 -0
- package/dist/assets/{ts.worker-Bz0-EaKK.js → ts.worker-CYhxGg0r.js} +107 -107
- package/dist/{results-DTgAKr5j.js → base-DuKnVD-A.js} +216 -45
- package/dist/components/FeedbackBanner.vue.d.ts +4 -0
- package/dist/components/FeedbackBanner.vue.d.ts.map +1 -0
- package/dist/components/dashboard/DashboardCreatorIcon.vue.d.ts +54 -0
- package/dist/components/dashboard/DashboardCreatorIcon.vue.d.ts.map +1 -0
- package/dist/components/dashboard/DashboardProvenance.vue.d.ts +30 -0
- package/dist/components/dashboard/DashboardProvenance.vue.d.ts.map +1 -0
- package/dist/components/dashboard/ReportLayout.vue.d.ts +19 -0
- package/dist/components/dashboard/ReportLayout.vue.d.ts.map +1 -0
- package/dist/components/editor/Editor.vue.d.ts +3 -3
- package/dist/components/editor/EditorCreatorIcon.vue.d.ts +62 -0
- package/dist/components/editor/EditorCreatorIcon.vue.d.ts.map +1 -0
- package/dist/components/editor/ValidationComponent.vue.d.ts +50 -0
- package/dist/components/editor/ValidationComponent.vue.d.ts.map +1 -0
- package/dist/components/model/ModelCard.vue.d.ts +3 -3
- package/dist/components/sidebar/LLMConnectionList.vue.d.ts.map +1 -1
- package/dist/components/sidebar/Sidebar.vue.d.ts.map +1 -1
- package/dist/components/tutorial/TutorialPrompt.vue.d.ts +3 -3
- package/dist/components/tutorial/TutorialPrompt.vue.d.ts.map +1 -1
- package/dist/{remoteWorker-Dkv3TJ0j.js → connections-CWH3zwH2.js} +4544 -4126
- package/dist/connections.js +3 -4
- package/dist/{cssMode-D4Rzr1Cu.js → cssMode-zpO2ap2B.js} +5 -6
- package/dist/dashboard.js +28 -31
- package/dist/dashboards/dashboardQueryExecutor.d.ts +9 -0
- package/dist/dashboards/dashboardQueryExecutor.d.ts.map +1 -1
- package/dist/{dist-CXoL8kXK.js → dist-1z5KURzS.js} +55 -50
- package/dist/{dist-DKkuvbPb.js → dist-Bv3D2p5A.js} +20 -18
- package/dist/{editor.main-Cl8i7rHY.js → editor.main-BQh6DxDB.js} +33 -33
- package/dist/{editorRefinementRuntime-DoP9P5J2.js → editorStore-CiWH_nGN.js} +1692 -575
- package/dist/embed.js +2 -2
- package/dist/{freemarker2-fW5NBILf.js → freemarker2-DQBqlEXc.js} +1 -1
- package/dist/{globalChatRuntime-DWZxeS57.js → globalChatRuntime-DAERmOdu.js} +16 -16
- package/dist/{handlebars-dG4w8UUY.js → handlebars-tgYxaM70.js} +1 -1
- package/dist/{helpers-BLQAgX3C.js → helpers-C2pARJoZ.js} +34 -35
- package/dist/{html-1Dq70BdU.js → html-jJahD3Mi.js} +1 -1
- package/dist/{htmlMode--IQmLBeh.js → htmlMode-BA1-8l2e.js} +5 -6
- package/dist/{javascript-CTzBM4sF.js → javascript-Cypfo7va.js} +1 -1
- package/dist/{jsonMode-DzeJjIEH.js → jsonMode-xJye8PWS.js} +25 -25
- package/dist/{liquid-DlHThiki.js → liquid-BGDrv5da.js} +1 -1
- package/dist/llm/data/prompts.d.ts +1 -1
- package/dist/llm/data/prompts.d.ts.map +1 -1
- package/dist/llm/data/trilogySyntax.generated.d.ts +3 -3
- package/dist/llm/data/trilogySyntax.generated.d.ts.map +1 -1
- package/dist/llm-Wf4Etiu9.js +18493 -0
- package/dist/llm.js +2 -3
- package/dist/{localStorage-D9uyOFEO.js → localStorage-C3xms-ab.js} +40 -43
- package/dist/{lspLanguageFeatures-Cdfs3EKq.js → lspLanguageFeatures-V3e_p9oN.js} +32 -32
- package/dist/{mdx-fn3g4PH5.js → mdx-BUR1aImW.js} +1 -1
- package/dist/monaco.js +4 -4
- package/dist/{python-CCVj0pFt.js → python-YLkl0pc6.js} +1 -1
- package/dist/{razor-Cj3flYnk.js → razor-BP8TRMDY.js} +1 -1
- package/dist/{reconcile-Dyf4UZmj.js → reconcile-BH_ReGDR.js} +1 -1
- package/dist/{remoteStoreSync-Z-yjlYtI.js → remoteStoreSync-B0K8QScO.js} +3 -3
- package/dist/{rolldown-runtime-Dqa2HsxW.js → rolldown-runtime-B0aSnxlc.js} +2 -2
- package/dist/static/test_import.vue.d.ts +4 -0
- package/dist/static/test_import.vue.d.ts.map +1 -0
- package/dist/stores-DTGQZ4_B.js +2612 -0
- package/dist/stores.js +4 -7
- package/dist/trilogy-studio-components.css +1 -1
- package/dist/{tsMode-GI4xMYAl.js → tsMode-BH9HS_sH.js} +64 -66
- package/dist/{typescript-CPibXi3J.js → typescript-BM-ynfk9.js} +1 -1
- package/dist/{useChatWithTools-B0HZ_DVh.js → useChatWithTools-BSrzJtYI.js} +11 -11
- package/dist/{useDashboard-CdSnPe_6.js → useDashboard-CGeIdDuX.js} +1014 -1022
- package/dist/{tabulator_esm-CxLvGDp8.js → useGlobalChatPanel-D9kMZLeF.js} +1729 -711
- package/dist/{useResizableDialog-B0ePSts4.js → useResizableDialog-Cs90WJdF.js} +2 -2
- package/dist/views/ModelView.vue.d.ts +6 -6
- package/dist/views/ModelView.vue.d.ts.map +1 -1
- package/dist/views/TutorialPage.vue.d.ts +9 -9
- package/dist/views/TutorialPage.vue.d.ts.map +1 -1
- package/dist/views.js +192 -194
- package/dist/{vocabulary-CKLGILtR.js → vocabulary-DQK5jB7m.js} +3 -1
- package/dist/{editor.api2-ClD5pp8H.js → workers-B9Eybl-M.js} +16252 -15926
- package/dist/{xml-BNyphceI.js → xml-M5WFPSpA.js} +1 -1
- package/dist/{yaml-DE5Vz0PH.js → yaml-CEeFwjz9.js} +1 -1
- package/package.json +29 -20
- package/dist/AssetAutoImporter-CBzvBaOt.js +0 -405
- package/dist/DashboardCreatorInline-CDU7kLy3.js +0 -129
- package/dist/DataTable-DoRDynP1.js +0 -365
- package/dist/EditorCreatorInline-D6_y1H_h.js +0 -125
- package/dist/LoadingButton-OH3frQuO.js +0 -138
- package/dist/ModalDialog-D1EOG4rl.js +0 -42
- package/dist/ModelCreator-CCdC7EXt.js +0 -253
- package/dist/PageLoading-BzniJM0C.js +0 -2669
- package/dist/Tooltip-Dihir4zs.js +0 -103
- package/dist/_plugin-vue_export-helper-B3ysoDQm.js +0 -8
- package/dist/assets/json.worker-CJ5MmO5Q.js +0 -58
- package/dist/base-C8IuZWqY.js +0 -164
- package/dist/connectionHistoryStorage-DKJHiKJY.js +0 -111
- package/dist/connectionHistoryStore-DQeBvStZ.js +0 -61
- package/dist/connections-CJSb1TZl.js +0 -229
- package/dist/constants-DgFEYN2b.js +0 -7
- package/dist/dashboardStore-ppM6nGks.js +0 -641
- package/dist/demoSetup-mwa-RDC6.js +0 -2942
- package/dist/editorRefinementToolExecutor-CVY3FA7k.js +0 -4624
- package/dist/editorStore-BhhmXbi-.js +0 -1019
- package/dist/formatting-BbJ5ICgh.js +0 -6
- package/dist/llm-BBOVWb-F.js +0 -11967
- package/dist/llmStore-DJM2JhzY.js +0 -153
- package/dist/monaco.contribution-ikesdolO.js +0 -128
- package/dist/stores-BT9hTLny.js +0 -1708
- package/dist/trilogy-BroD2Qmp.js +0 -4
- package/dist/urlStore-52HG6lsX.js +0 -55
- package/dist/useGlobalChatPanel-D_0luajQ.js +0 -85
- package/dist/useIsMobile-CNpUQAvk.js +0 -8
- package/dist/usePrismHighlight-DVyDiDAL.js +0 -183
- package/dist/workers-Br7ThUKL.js +0 -47
|
@@ -1,17 +1,16 @@
|
|
|
1
|
-
import { n as e } from "./rolldown-runtime-
|
|
2
|
-
import { t } from "./_plugin-vue_export-helper-
|
|
3
|
-
import {
|
|
4
|
-
import "./
|
|
5
|
-
import "./stores-
|
|
6
|
-
import {
|
|
7
|
-
import { n as u } from "./globalChatRuntime-
|
|
8
|
-
import {
|
|
9
|
-
import { t as
|
|
10
|
-
import {
|
|
11
|
-
import
|
|
12
|
-
import "./editor.main-Cl8i7rHY.js";
|
|
1
|
+
import { n as e } from "./rolldown-runtime-B0aSnxlc.js";
|
|
2
|
+
import { t } from "./_plugin-vue_export-helper-f9Rw-Il4.js";
|
|
3
|
+
import { u as n } from "./base-DuKnVD-A.js";
|
|
4
|
+
import "./llm-Wf4Etiu9.js";
|
|
5
|
+
import "./stores-DTGQZ4_B.js";
|
|
6
|
+
import { ct as r, dt as i, lt as a, rt as o, st as s, tt as c, ut as l } from "./editorStore-CiWH_nGN.js";
|
|
7
|
+
import { n as u } from "./globalChatRuntime-DAERmOdu.js";
|
|
8
|
+
import { l as d, u as f } from "./useGlobalChatPanel-D9kMZLeF.js";
|
|
9
|
+
import { t as p } from "./ErrorMessage-D5JeF3Iz.js";
|
|
10
|
+
import { a as m, d as h, l as ee, o as g, p as te } from "./workers-B9Eybl-M.js";
|
|
11
|
+
import "./editor.main-BQh6DxDB.js";
|
|
13
12
|
import { t as _ } from "./tokenTheme-DBbeCrCg.js";
|
|
14
|
-
import { t as ne } from "./SymbolsPane-
|
|
13
|
+
import { t as ne } from "./SymbolsPane-XFVErDFb.js";
|
|
15
14
|
import { Fragment as re, computed as ie, createBlock as v, createCommentVNode as y, createElementBlock as b, createElementVNode as x, createTextVNode as S, createVNode as C, defineComponent as w, inject as T, mergeProps as E, nextTick as D, normalizeClass as O, normalizeStyle as ae, onMounted as oe, onUnmounted as se, openBlock as k, ref as A, resolveComponent as j, toDisplayString as M, unref as N, vModelText as P, watch as F, withCtx as I, withDirectives as L, withKeys as R } from "vue";
|
|
16
15
|
//#region components/editor/EditorToolbarActions.vue?vue&type=script&setup=true&lang.ts
|
|
17
16
|
var z = { class: "action-group action-group-scope" }, B = ["aria-pressed"], V = {
|
|
@@ -69,27 +68,27 @@ var z = { class: "action-group action-group-scope" }, B = ["aria-pressed"], V =
|
|
|
69
68
|
"generate"
|
|
70
69
|
],
|
|
71
70
|
setup(e) {
|
|
72
|
-
let t = e, n = ie(() => t.editorType === "sql" ||
|
|
73
|
-
return (t,
|
|
71
|
+
let t = e, n = ie(() => t.editorType === "sql" || l(t.editorType) && t.connectionHasModel);
|
|
72
|
+
return (t, o) => (k(), b("div", { class: O(["editor-actions", `editor-actions-${e.variant}`]) }, [
|
|
74
73
|
x("div", z, [e.editorType === "sql" ? (k(), b("button", {
|
|
75
74
|
key: 0,
|
|
76
|
-
class: O(["toggle-button action-item action-item-scope", { "toggle-on": e.tags.includes(N(
|
|
77
|
-
"aria-pressed": e.tags.includes(N(
|
|
75
|
+
class: O(["toggle-button action-item action-item-scope", { "toggle-on": e.tags.includes(N(c).STARTUP_SCRIPT) }]),
|
|
76
|
+
"aria-pressed": e.tags.includes(N(c).STARTUP_SCRIPT),
|
|
78
77
|
"data-testid": "editor-set-startup-script",
|
|
79
78
|
title: "Run this script on connection startup",
|
|
80
79
|
"aria-label": "Toggle startup script",
|
|
81
|
-
onClick:
|
|
82
|
-
}, [...
|
|
80
|
+
onClick: o[0] ||= (e) => t.$emit("toggle-tag", N(c).STARTUP_SCRIPT)
|
|
81
|
+
}, [...o[4] ||= [x("span", { class: "toggle-indicator" }, null, -1), x("span", { class: "action-label" }, "Startup", -1)]], 10, B)) : y("", !0), N(l)(e.editorType) && e.connectionHasModel ? (k(), v(f, {
|
|
83
82
|
key: 1,
|
|
84
83
|
useDefaultStyle: !1,
|
|
85
|
-
class: O(["toggle-button action-item action-item-scope", { "toggle-on": e.tags.includes(N(
|
|
86
|
-
"aria-pressed": e.tags.includes(N(
|
|
87
|
-
action: () => t.$emit("toggle-tag", N(
|
|
84
|
+
class: O(["toggle-button action-item action-item-scope", { "toggle-on": e.tags.includes(N(c).SOURCE) }]),
|
|
85
|
+
"aria-pressed": e.tags.includes(N(c).SOURCE),
|
|
86
|
+
action: () => t.$emit("toggle-tag", N(c).SOURCE),
|
|
88
87
|
testId: "editor-set-source",
|
|
89
88
|
title: "Include this editor as a source model",
|
|
90
89
|
"aria-label": "Toggle source model"
|
|
91
90
|
}, {
|
|
92
|
-
default: I(() => [...
|
|
91
|
+
default: I(() => [...o[5] ||= [x("span", { class: "toggle-indicator" }, null, -1), x("span", { class: "action-label" }, "Source", -1)]]),
|
|
93
92
|
_: 1
|
|
94
93
|
}, 8, [
|
|
95
94
|
"class",
|
|
@@ -103,9 +102,9 @@ var z = { class: "action-group action-group-scope" }, B = ["aria-pressed"], V =
|
|
|
103
102
|
"data-testid": "editor-save-button",
|
|
104
103
|
title: "Save editor",
|
|
105
104
|
"aria-label": "Save editor",
|
|
106
|
-
onClick:
|
|
107
|
-
}, [...
|
|
108
|
-
N(
|
|
105
|
+
onClick: o[1] ||= (e) => t.$emit("save")
|
|
106
|
+
}, [...o[6] ||= [x("i", { class: "mdi mdi-content-save-outline icon" }, null, -1), x("span", { class: "action-label" }, "Save", -1)]]),
|
|
107
|
+
N(i)(e.editorType) ? (k(), v(f, {
|
|
109
108
|
key: 0,
|
|
110
109
|
useDefaultStyle: !1,
|
|
111
110
|
class: "action-item action-item-compact",
|
|
@@ -114,7 +113,7 @@ var z = { class: "action-group action-group-scope" }, B = ["aria-pressed"], V =
|
|
|
114
113
|
title: "Parse editor",
|
|
115
114
|
"aria-label": "Parse editor"
|
|
116
115
|
}, {
|
|
117
|
-
default: I(() => [...
|
|
116
|
+
default: I(() => [...o[7] ||= [x("i", { class: "mdi mdi-code-braces icon" }, null, -1), x("span", { class: "action-label" }, "Parse", -1)]]),
|
|
118
117
|
_: 1
|
|
119
118
|
}, 8, ["action"])) : y("", !0),
|
|
120
119
|
N(r)(e.editorType) ? (k(), b("button", {
|
|
@@ -123,11 +122,11 @@ var z = { class: "action-group action-group-scope" }, B = ["aria-pressed"], V =
|
|
|
123
122
|
"data-testid": "editor-format-button",
|
|
124
123
|
title: "Format editor",
|
|
125
124
|
"aria-label": "Format editor",
|
|
126
|
-
onClick:
|
|
127
|
-
}, [...
|
|
125
|
+
onClick: o[2] ||= (e) => t.$emit("format")
|
|
126
|
+
}, [...o[8] ||= [x("i", { class: "mdi mdi-format-align-left icon" }, null, -1), x("span", { class: "action-label" }, "Format", -1)]])) : y("", !0)
|
|
128
127
|
]),
|
|
129
|
-
N(
|
|
130
|
-
N(
|
|
128
|
+
N(s)(e.editorType) ? (k(), b("div", U)) : y("", !0),
|
|
129
|
+
N(s)(e.editorType) ? (k(), b("div", W, [C(f, {
|
|
131
130
|
useDefaultStyle: !1,
|
|
132
131
|
class: "action-item action-item-ai action-item-compact",
|
|
133
132
|
action: () => t.$emit("generate"),
|
|
@@ -135,11 +134,11 @@ var z = { class: "action-group action-group-scope" }, B = ["aria-pressed"], V =
|
|
|
135
134
|
title: "Open AI assistant",
|
|
136
135
|
"aria-label": "Open AI assistant"
|
|
137
136
|
}, {
|
|
138
|
-
default: I(() => [...
|
|
137
|
+
default: I(() => [...o[9] ||= [x("i", { class: "mdi mdi-creation-outline icon" }, null, -1), x("span", { class: "action-label" }, "AI", -1)]]),
|
|
139
138
|
_: 1
|
|
140
139
|
}, 8, ["action"])])) : y("", !0),
|
|
141
|
-
N(
|
|
142
|
-
N(
|
|
140
|
+
N(a)(e.editorType) ? (k(), b("div", G)) : y("", !0),
|
|
141
|
+
N(a)(e.editorType) ? (k(), b("div", K, [x("button", {
|
|
143
142
|
class: O(["action-item", {
|
|
144
143
|
"button-cancel": e.loading,
|
|
145
144
|
"button-run": !e.loading
|
|
@@ -147,7 +146,7 @@ var z = { class: "action-group action-group-scope" }, B = ["aria-pressed"], V =
|
|
|
147
146
|
"data-testid": "editor-run-button",
|
|
148
147
|
title: e.loading ? "Cancel query" : "Run query",
|
|
149
148
|
"aria-label": e.loading ? "Cancel query" : "Run query",
|
|
150
|
-
onClick:
|
|
149
|
+
onClick: o[3] ||= (n) => e.loading ? t.$emit("cancel") : t.$emit("run")
|
|
151
150
|
}, [e.loading ? (k(), b("i", le)) : (k(), b("i", ue)), x("span", de, M(e.loading ? "Cancel" : "Run"), 1)], 10, ce)])) : y("", !0)
|
|
152
151
|
], 2));
|
|
153
152
|
}
|
|
@@ -279,13 +278,13 @@ var z = { class: "action-group action-group-scope" }, B = ["aria-pressed"], V =
|
|
|
279
278
|
}), [["__scopeId", "data-v-f04cb0f3"]]), J = /* @__PURE__ */ new Map(), Y = /* @__PURE__ */ new Map(), ve = (e, t) => {
|
|
280
279
|
let n = J.get(e);
|
|
281
280
|
if (!n) return t;
|
|
282
|
-
let r = n.getSelection(), i = r &&
|
|
281
|
+
let r = n.getSelection(), i = r && (r.startColumn !== r.endColumn || r.startLineNumber !== r.endLineNumber) ? n.getModel()?.getValueInRange(r) : n.getValue();
|
|
283
282
|
return i ||= t, i;
|
|
284
283
|
}, ye = (e) => {
|
|
285
284
|
let t = J.get(e);
|
|
286
285
|
if (!t) return null;
|
|
287
286
|
let n = t.getSelection();
|
|
288
|
-
return n &&
|
|
287
|
+
return n && (n.startColumn !== n.endColumn || n.startLineNumber !== n.endLineNumber) ? {
|
|
289
288
|
startLineNumber: n.startLineNumber,
|
|
290
289
|
startColumn: n.startColumn,
|
|
291
290
|
endLineNumber: n.endLineNumber,
|
|
@@ -331,8 +330,8 @@ var z = { class: "action-group action-group-scope" }, B = ["aria-pressed"], V =
|
|
|
331
330
|
range: a
|
|
332
331
|
}), !0) : (console.log("No import path found for word:", i), !1);
|
|
333
332
|
}, xe = (e, t, n, r, i) => (X(e, t, null), null), Se = (e, t, n, r) => {
|
|
334
|
-
if (r.forEach((e) => e.dispose()), r.length = 0, !e.getModel() || (console.log("Setting up go-to-definition provider for language:",
|
|
335
|
-
let i = te.registerDefinitionProvider(
|
|
333
|
+
if (r.forEach((e) => e.dispose()), r.length = 0, !e.getModel() || (console.log("Setting up go-to-definition provider for language:", o(t)), t === "python")) return;
|
|
334
|
+
let i = te.registerDefinitionProvider(o(t), { provideDefinition: (t, r, i) => xe(t, r, i, e, n) });
|
|
336
335
|
r.push(i);
|
|
337
336
|
}, Ce = (e, t, n, r) => {
|
|
338
337
|
let i = e.getModel();
|
|
@@ -345,7 +344,7 @@ var z = { class: "action-group action-group-scope" }, B = ["aria-pressed"], V =
|
|
|
345
344
|
});
|
|
346
345
|
r.push(a);
|
|
347
346
|
}, we = () => {
|
|
348
|
-
for (let e of ["light", "dark"])
|
|
347
|
+
for (let e of ["light", "dark"]) h.defineTheme(`trilogyStudio${e}`, {
|
|
349
348
|
base: e === "light" ? "vs" : "vs-dark",
|
|
350
349
|
inherit: !0,
|
|
351
350
|
rules: _,
|
|
@@ -362,32 +361,33 @@ var z = { class: "action-group action-group-scope" }, B = ["aria-pressed"], V =
|
|
|
362
361
|
if (J.has(t.context) && Y.get(t.context)) {
|
|
363
362
|
console.log("Editor already mounted, checking validity");
|
|
364
363
|
let n = J.get(t.context);
|
|
365
|
-
if (n && n.getModel())
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
364
|
+
if (n && n.getModel()) {
|
|
365
|
+
if (n.getContainerDomNode() === e) {
|
|
366
|
+
console.log("Editor instance is valid and properly attached, updating content");
|
|
367
|
+
try {
|
|
368
|
+
n.setValue(t.contents), n.setScrollPosition({
|
|
369
|
+
scrollTop: t.scrollPosition?.line || 1,
|
|
370
|
+
scrollLeft: t.scrollPosition?.column || 1
|
|
371
|
+
}), n.layout();
|
|
372
|
+
return;
|
|
373
|
+
} catch (e) {
|
|
374
|
+
console.warn("Error updating existing editor, will recreate:", e);
|
|
375
|
+
}
|
|
376
|
+
} else {
|
|
377
|
+
console.log("Editor is valid but DOM attachment is wrong, disposing and recreating");
|
|
378
|
+
try {
|
|
379
|
+
n.dispose();
|
|
380
|
+
} catch (e) {
|
|
381
|
+
console.warn("Error disposing editor:", e);
|
|
382
|
+
}
|
|
383
|
+
J.delete(t.context), Y.delete(t.context);
|
|
382
384
|
}
|
|
383
|
-
|
|
384
|
-
}
|
|
385
|
-
else console.log("Editor instance is invalid or disposed, cleaning up"), J.delete(t.context), Y.delete(t.context);
|
|
385
|
+
} else console.log("Editor instance is invalid or disposed, cleaning up"), J.delete(t.context), Y.delete(t.context);
|
|
386
386
|
}
|
|
387
387
|
console.log("Creating new editor instance"), we();
|
|
388
|
-
let i =
|
|
388
|
+
let i = h.create(e, {
|
|
389
389
|
value: t.contents,
|
|
390
|
-
language:
|
|
390
|
+
language: o(t.editorType),
|
|
391
391
|
automaticLayout: !0,
|
|
392
392
|
autoClosingBrackets: "always",
|
|
393
393
|
autoClosingOvertype: "always",
|
|
@@ -410,7 +410,7 @@ var z = { class: "action-group action-group-scope" }, B = ["aria-pressed"], V =
|
|
|
410
410
|
}
|
|
411
411
|
} : {}
|
|
412
412
|
});
|
|
413
|
-
|
|
413
|
+
h.setTheme(`trilogyStudio${t.theme}`), J.set(t.context, i), Y.set(t.context, !0), Se(i, t.editorType, n.onGoToDefinition, r), Ce(i, t.editorType, n.onGoToDefinition, r), Te(i, n), i.setScrollPosition({
|
|
414
414
|
scrollTop: t.scrollPosition?.line || 1,
|
|
415
415
|
scrollLeft: t.scrollPosition?.column || 1
|
|
416
416
|
}), Ee(i, t.editorType, n), i.layout();
|
|
@@ -437,11 +437,11 @@ var z = { class: "action-group action-group-scope" }, B = ["aria-pressed"], V =
|
|
|
437
437
|
}, 500);
|
|
438
438
|
});
|
|
439
439
|
}, Ee = (e, t, n) => {
|
|
440
|
-
|
|
440
|
+
i(t) && e.addCommand(g.CtrlCmd | g.Shift | m.KeyV, () => {
|
|
441
441
|
n.onValidateQuery();
|
|
442
|
-
}),
|
|
442
|
+
}), a(t) && e.addCommand(g.CtrlCmd | m.Enter, () => {
|
|
443
443
|
n.onRunQuery();
|
|
444
|
-
}), r(t) && (e.addCommand(g.CtrlCmd |
|
|
444
|
+
}), r(t) && (e.addCommand(g.CtrlCmd | m.KeyK, () => {
|
|
445
445
|
n.onFormatQuery();
|
|
446
446
|
}), e.addAction({
|
|
447
447
|
id: "trilogy.format-query",
|
|
@@ -451,11 +451,11 @@ var z = { class: "action-group action-group-scope" }, B = ["aria-pressed"], V =
|
|
|
451
451
|
run: () => {
|
|
452
452
|
n.onFormatQuery();
|
|
453
453
|
}
|
|
454
|
-
})),
|
|
454
|
+
})), s(t) && e.addCommand(g.CtrlCmd | g.Shift | m.Enter, () => {
|
|
455
455
|
n.onGenerateLlmQuery();
|
|
456
|
-
}), e.addCommand(g.CtrlCmd |
|
|
456
|
+
}), e.addCommand(g.CtrlCmd | m.KeyS, () => {
|
|
457
457
|
n.onSave();
|
|
458
|
-
}), e.addCommand(g.CtrlCmd |
|
|
458
|
+
}), e.addCommand(g.CtrlCmd | m.KeyZ, () => {
|
|
459
459
|
e.trigger("ide", "undo", {}), n.onContentsChange(e.getValue());
|
|
460
460
|
});
|
|
461
461
|
}, De = (e, t) => {
|
|
@@ -480,7 +480,7 @@ var z = { class: "action-group action-group-scope" }, B = ["aria-pressed"], V =
|
|
|
480
480
|
r && r.executeEdits(t, n);
|
|
481
481
|
}, ke = (e, t) => {
|
|
482
482
|
let n = J.get(e);
|
|
483
|
-
n && n.getModel() &&
|
|
483
|
+
n && n.getModel() && h.setModelMarkers(n.getModel(), "owner", t);
|
|
484
484
|
}, Ae = (e) => J.get(e), je = w({
|
|
485
485
|
name: "CodeEditor",
|
|
486
486
|
props: {
|
|
@@ -563,7 +563,7 @@ var z = { class: "action-group action-group-scope" }, B = ["aria-pressed"], V =
|
|
|
563
563
|
let t = J.get(e.context);
|
|
564
564
|
t && t.layout();
|
|
565
565
|
}), F(() => e.theme, () => {
|
|
566
|
-
|
|
566
|
+
h.setTheme(`trilogyStudio${e.theme}`);
|
|
567
567
|
}), {
|
|
568
568
|
editorElement: n,
|
|
569
569
|
getEditorText: a,
|
|
@@ -604,8 +604,8 @@ var Ne = w({
|
|
|
604
604
|
}
|
|
605
605
|
},
|
|
606
606
|
components: {
|
|
607
|
-
LoadingButton:
|
|
608
|
-
ErrorMessage:
|
|
607
|
+
LoadingButton: f,
|
|
608
|
+
ErrorMessage: p,
|
|
609
609
|
SymbolsPane: ne,
|
|
610
610
|
EditorHeader: he,
|
|
611
611
|
EditorMobileToolbar: _e,
|
|
@@ -618,12 +618,12 @@ var Ne = w({
|
|
|
618
618
|
"query-finished"
|
|
619
619
|
],
|
|
620
620
|
setup() {
|
|
621
|
-
let e = T("connectionStore"), t = T("editorStore"), n = T("modelStore"), r = T("llmConnectionStore"), i = T("trilogyResolver"), a = T("userSettingsStore"),
|
|
621
|
+
let e = T("connectionStore"), t = T("editorStore"), n = T("modelStore"), r = T("llmConnectionStore"), i = T("trilogyResolver"), a = T("userSettingsStore"), o = d(), s = T("hideEditorSymbols", !1), l = T("hasGlobalChatPanel", !1), u = T("chatStore", null), f = T("setActiveEditor"), p = T("queryExecutionService"), m = T("analyticsStore"), h = T("navigationStore");
|
|
622
622
|
if (!m) throw Error("Analytics store is required");
|
|
623
|
-
if (m.log("studio-editor-open", "editor", !0), !t || !e || !i || !n || !a || !
|
|
623
|
+
if (m.log("studio-editor-open", "editor", !0), !t || !e || !i || !n || !a || !f || !p) throw Error("Editor store and connection store and trilogy resolver are not provided!");
|
|
624
624
|
return {
|
|
625
|
-
isMobile:
|
|
626
|
-
hideEditorSymbols:
|
|
625
|
+
isMobile: o,
|
|
626
|
+
hideEditorSymbols: s,
|
|
627
627
|
hasGlobalChatPanel: l,
|
|
628
628
|
chatStore: u,
|
|
629
629
|
connectionStore: e,
|
|
@@ -631,10 +631,10 @@ var Ne = w({
|
|
|
631
631
|
llmStore: r,
|
|
632
632
|
editorStore: t,
|
|
633
633
|
trilogyResolver: i,
|
|
634
|
-
EditorTag:
|
|
634
|
+
EditorTag: c,
|
|
635
635
|
userSettingsStore: a,
|
|
636
|
-
setActiveEditor:
|
|
637
|
-
queryExecutionService:
|
|
636
|
+
setActiveEditor: f,
|
|
637
|
+
queryExecutionService: p,
|
|
638
638
|
analyticsStore: m,
|
|
639
639
|
navigationStore: h
|
|
640
640
|
};
|
|
@@ -671,19 +671,21 @@ var Ne = w({
|
|
|
671
671
|
this.editorStore.setEditorContents(this.editorId, e);
|
|
672
672
|
},
|
|
673
673
|
updateEditorName(e) {
|
|
674
|
-
if (this.editorStore.updateEditorName(this.editorId, e), this.editorData.tags.includes(
|
|
674
|
+
if (this.editorStore.updateEditorName(this.editorId, e), this.editorData.tags.includes(c.SOURCE)) {
|
|
675
675
|
let t = this.editorConnection?.model;
|
|
676
676
|
t && (this.modelStore.models[t].updateModelSourceName(this.editorData.id, e), this.$emit("save-models"));
|
|
677
677
|
}
|
|
678
678
|
this.navigationStore && this.navigationStore.updateTabName("editors", null, this.editorId);
|
|
679
679
|
},
|
|
680
680
|
toggleTag(e) {
|
|
681
|
-
if (e ===
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
681
|
+
if (e === c.SOURCE) {
|
|
682
|
+
if (this.editorData.tags.includes(e)) {
|
|
683
|
+
let e = this.editorConnection?.model;
|
|
684
|
+
e && (this.modelStore.models[e].removeModelSourceSimple(this.editorData.id), this.$emit("save-models"));
|
|
685
|
+
} else {
|
|
686
|
+
let e = this.editorConnection?.model;
|
|
687
|
+
e && (this.modelStore.models[e].addModelSourceSimple(this.editorData.id, this.editorData.name), this.$emit("save-models"));
|
|
688
|
+
}
|
|
687
689
|
}
|
|
688
690
|
this.editorData.tags.includes(e) ? this.editorData.removeTag(e) : this.editorData.addTag(e);
|
|
689
691
|
},
|
|
@@ -702,7 +704,7 @@ var Ne = w({
|
|
|
702
704
|
this.editorStore.setEditorScrollPosition(this.editorId, e);
|
|
703
705
|
},
|
|
704
706
|
async validateQuery(e = !0, t = null) {
|
|
705
|
-
if (!this.editorData || !
|
|
707
|
+
if (!this.editorData || !i(this.editorData.type)) return console.log("Nothing to validate"), null;
|
|
706
708
|
try {
|
|
707
709
|
e && this.analyticsStore && this.analyticsStore.log("studio-query-validate", this.editorData.type, !0);
|
|
708
710
|
} catch (e) {
|
|
@@ -714,12 +716,12 @@ var Ne = w({
|
|
|
714
716
|
alias: e.alias,
|
|
715
717
|
contents: this.editorStore.editors[e.editor] ? this.editorStore.editors[e.editor].contents : ""
|
|
716
718
|
})) : [];
|
|
717
|
-
let r = this.editorData.contents,
|
|
719
|
+
let r = this.editorData.contents, a = t && t.length > 0 ? t : null, o = await this.queryExecutionService.validateQuery(n.id, {
|
|
718
720
|
text: r,
|
|
719
721
|
editorType: this.editorData.type,
|
|
720
722
|
imports: [],
|
|
721
723
|
currentFilename: this.editorData.name
|
|
722
|
-
}, e,
|
|
724
|
+
}, e, a);
|
|
723
725
|
if (!o) return null;
|
|
724
726
|
let s = this.$refs.codeEditor;
|
|
725
727
|
if (s) {
|
|
@@ -754,9 +756,9 @@ var Ne = w({
|
|
|
754
756
|
let t = this.editorConnection, n = t?.model ? this.modelStore.models[t.model] : void 0, r = n ? (n.sources || []).map((e) => ({
|
|
755
757
|
alias: e.alias,
|
|
756
758
|
contents: this.editorStore.editors[e.editor] ? this.editorStore.editors[e.editor].contents : ""
|
|
757
|
-
})) : [],
|
|
758
|
-
if (
|
|
759
|
-
|
|
759
|
+
})) : [], a = [];
|
|
760
|
+
if (i(this.editorData.type)) try {
|
|
761
|
+
a = await this.validateQuery(!1, r) || [];
|
|
760
762
|
} catch {
|
|
761
763
|
console.log("Validation failed. May not have proper imports.");
|
|
762
764
|
}
|
|
@@ -765,7 +767,7 @@ var Ne = w({
|
|
|
765
767
|
queryType: t ? t.query_type : "",
|
|
766
768
|
editorType: this.editorData.type,
|
|
767
769
|
sources: r,
|
|
768
|
-
imports:
|
|
770
|
+
imports: a,
|
|
769
771
|
currentFilename: this.editorData.name
|
|
770
772
|
};
|
|
771
773
|
},
|
|
@@ -784,7 +786,7 @@ var Ne = w({
|
|
|
784
786
|
}
|
|
785
787
|
},
|
|
786
788
|
async runQuery(e = !0) {
|
|
787
|
-
if (!this.editorData || !
|
|
789
|
+
if (!this.editorData || !a(this.editorData.type)) {
|
|
788
790
|
this.editorData && this.editorData.setError("Python files are editable but cannot be run locally.");
|
|
789
791
|
return;
|
|
790
792
|
}
|
|
@@ -802,12 +804,12 @@ var Ne = w({
|
|
|
802
804
|
this.editorStore.setEditorResults(t, new n(/* @__PURE__ */ new Map(), [])), this.editorData.loading = !1;
|
|
803
805
|
return;
|
|
804
806
|
}
|
|
805
|
-
let
|
|
807
|
+
let o = await this.buildQueryArgs(i), s = {
|
|
806
808
|
text: i,
|
|
807
|
-
editorType:
|
|
808
|
-
imports:
|
|
809
|
-
currentFilename:
|
|
810
|
-
},
|
|
809
|
+
editorType: o.editorType,
|
|
810
|
+
imports: o.imports,
|
|
811
|
+
currentFilename: o.currentFilename
|
|
812
|
+
}, c = this.editorConnection?.id || this.editorData.connectionId || this.editorData.connection, l = (e) => {
|
|
811
813
|
let n = this.editorStore.editors[t];
|
|
812
814
|
e.error && (n.loading = !1, n.setError(e.message)), e.running && (n.error = null, n.loading = !0);
|
|
813
815
|
}, u = (e) => {
|
|
@@ -817,7 +819,7 @@ var Ne = w({
|
|
|
817
819
|
console.error("Query execution error:", e.message);
|
|
818
820
|
let n = this.editorStore.editors[t];
|
|
819
821
|
n.setError(e.message || "An error occurred during query execution"), n.executed_contents = i, n.generated_sql = e.generatedSql || null, n.loading = !1, n.cancelCallback = null;
|
|
820
|
-
}, { resultPromise: f, cancellation: p } = await this.queryExecutionService.executeQuery(
|
|
822
|
+
}, { resultPromise: f, cancellation: p } = await this.queryExecutionService.executeQuery(c, s, () => {}, l, d, u);
|
|
821
823
|
this.editorData.cancelCallback = () => {
|
|
822
824
|
p.isActive() && p.cancel();
|
|
823
825
|
let e = this.editorStore.editors[t];
|
|
@@ -838,7 +840,7 @@ var Ne = w({
|
|
|
838
840
|
}
|
|
839
841
|
if (this.hasGlobalChatPanel && this.chatStore && this.llmStore) {
|
|
840
842
|
let e = this.$refs.codeEditor, t, n = e?.getEditorInstance(), r = n?.getSelection?.();
|
|
841
|
-
r &&
|
|
843
|
+
r && (r.startLineNumber !== r.endLineNumber || r.startColumn !== r.endColumn) && (t = n.getModel()?.getValueInRange(r) || void 0), u({
|
|
842
844
|
chatStore: this.chatStore,
|
|
843
845
|
llmConnectionStore: this.llmStore,
|
|
844
846
|
editor: {
|
|
@@ -862,7 +864,7 @@ var Ne = w({
|
|
|
862
864
|
let t = this.$refs.codeEditor;
|
|
863
865
|
if (!t) throw Error("Code editor reference not found");
|
|
864
866
|
let n, r, i = t.getEditorInstance(), a = i?.getSelection?.();
|
|
865
|
-
if (a &&
|
|
867
|
+
if (a && (a.startLineNumber !== a.endLineNumber || a.startColumn !== a.endColumn) && (r = i.getModel()?.getValueInRange(a) || void 0, r)) {
|
|
866
868
|
let t = e.contents.split("\n"), r = 0;
|
|
867
869
|
for (let e = 0; e < a.startLineNumber - 1; e++) r += t[e].length + 1;
|
|
868
870
|
r += a.startColumn - 1;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { n as e } from "./rolldown-runtime-
|
|
2
|
-
import { t } from "./_plugin-vue_export-helper-
|
|
1
|
+
import { n as e } from "./rolldown-runtime-B0aSnxlc.js";
|
|
2
|
+
import { t } from "./_plugin-vue_export-helper-f9Rw-Il4.js";
|
|
3
3
|
import { Fragment as n, createCommentVNode as r, createElementBlock as i, createElementVNode as a, normalizeClass as o, openBlock as s, renderList as c, renderSlot as l, toDisplayString as u } from "vue";
|
|
4
4
|
//#region components/ErrorMessage.vue?vue&type=script&lang.ts
|
|
5
5
|
var d = {
|
|
@@ -102,7 +102,7 @@ var d = {
|
|
|
102
102
|
e.some((e) => e.id === this.activeTab) || (this.activeTab = "primary");
|
|
103
103
|
} },
|
|
104
104
|
methods: { async copyQuery() {
|
|
105
|
-
|
|
105
|
+
this.query && this.canCopy && (await navigator.clipboard.writeText(this.query), this.copied = !0, window.setTimeout(() => {
|
|
106
106
|
this.copied = !1;
|
|
107
107
|
}, 1200));
|
|
108
108
|
} }
|
|
@@ -148,7 +148,7 @@ function A(e, t, d, f, A, j) {
|
|
|
148
148
|
onClick: (t) => A.activeTab = e.id
|
|
149
149
|
}, u(e.label), 11, y))), 128))])) : r("", !0)]),
|
|
150
150
|
a("div", b, [
|
|
151
|
-
j.showPrimaryBody && j.hasMessageContent ? (s(), i("div", x, [e.$slots.default ? l(e.$slots, "default", {
|
|
151
|
+
j.showPrimaryBody && j.hasMessageContent ? (s(), i("div", x, [e.$slots.default ? l(e.$slots, "default", {}, void 0, !0, 0) : (s(), i("span", S, u(d.details), 1))])) : r("", !0),
|
|
152
152
|
j.showSecondaryBody && !j.hasSecondaryContent ? (s(), i("div", C, " No additional context available. ")) : r("", !0),
|
|
153
153
|
j.showStackedFilters || j.showSecondaryBody && j.normalizedFilters.length ? (s(), i("div", w, [t[1] ||= a("div", { class: "message-query-header" }, [a("span", { class: "message-query-label" }, "Active Filters")], -1), a("pre", T, u(j.formattedFilters), 1)])) : r("", !0),
|
|
154
154
|
j.showStackedQuery || j.showSecondaryBody && d.query ? (s(), i("div", E, [a("div", D, [t[2] ||= a("span", { class: "message-query-label" }, "Trilogy Query", -1), j.canCopy ? (s(), i("button", {
|
|
@@ -1,22 +1,21 @@
|
|
|
1
|
-
import { t as e } from "./_plugin-vue_export-helper-
|
|
2
|
-
import {
|
|
3
|
-
import { a as r, i, r as a, t as o } from "./globalChatRuntime-
|
|
4
|
-
import {
|
|
5
|
-
import { t as
|
|
6
|
-
import { t as
|
|
7
|
-
import { t as
|
|
8
|
-
import { t as
|
|
9
|
-
import {
|
|
10
|
-
import { t as ee } from "./ChatModelSelect-Do-VRUFc.js";
|
|
1
|
+
import { t as e } from "./_plugin-vue_export-helper-f9Rw-Il4.js";
|
|
2
|
+
import { c as t, u as n } from "./base-DuKnVD-A.js";
|
|
3
|
+
import { a as r, i, r as a, t as o } from "./globalChatRuntime-DAERmOdu.js";
|
|
4
|
+
import { r as s, t as c } from "./useGlobalChatPanel-D9kMZLeF.js";
|
|
5
|
+
import { t as l } from "./VegaLiteChart-DX_LbF3g.js";
|
|
6
|
+
import { t as u } from "./MarkdownRenderer-B6lqdkgc.js";
|
|
7
|
+
import { t as d } from "./CodeBlock-Dj-GfTbW.js";
|
|
8
|
+
import { n as f, t as p } from "./LLMChat-eKgEc-I3.js";
|
|
9
|
+
import { t as ee } from "./ChatModelSelect-Cz7axWjP.js";
|
|
11
10
|
import { Fragment as m, computed as h, createBlock as g, createCommentVNode as _, createElementBlock as v, createElementVNode as y, createTextVNode as b, createVNode as x, defineComponent as S, inject as C, nextTick as te, normalizeClass as w, normalizeStyle as T, onBeforeUnmount as E, onMounted as ne, openBlock as D, ref as O, renderList as k, renderSlot as A, resolveComponent as j, toDisplayString as M, unref as N, vModelSelect as re, watch as P, withCtx as ie, withDirectives as ae, withModifiers as F } from "vue";
|
|
12
11
|
//#region components/llm/ChatArtifact.vue?vue&type=script&lang.ts
|
|
13
12
|
var I = S({
|
|
14
13
|
name: "ChatArtifactComponent",
|
|
15
14
|
components: {
|
|
16
|
-
DataTable:
|
|
17
|
-
VegaLiteChart:
|
|
15
|
+
DataTable: s,
|
|
16
|
+
VegaLiteChart: l,
|
|
18
17
|
CodeBlock: d,
|
|
19
|
-
MarkdownRenderer:
|
|
18
|
+
MarkdownRenderer: u
|
|
20
19
|
},
|
|
21
20
|
props: {
|
|
22
21
|
artifact: {
|
|
@@ -55,13 +54,13 @@ var I = S({
|
|
|
55
54
|
case "markdown": return "mdi mdi-language-markdown";
|
|
56
55
|
default: return "mdi mdi-file-document-outline";
|
|
57
56
|
}
|
|
58
|
-
}), c = h(() => e.artifact.data ? e.artifact.data instanceof
|
|
57
|
+
}), c = h(() => e.artifact.data ? e.artifact.data instanceof n ? e.artifact.data : e.artifact.data.headers && e.artifact.data.data ? n.fromJSON(e.artifact.data) : null : null), l = h(() => e.artifact.config?.chartConfig), u = h(() => {
|
|
59
58
|
if (e.artifact.type !== "markdown") return null;
|
|
60
|
-
let
|
|
61
|
-
return
|
|
59
|
+
let t = e.artifact.data?.queryResults;
|
|
60
|
+
return t ? t instanceof n ? t : t?.headers && t?.data ? n.fromJSON(t) : null : null;
|
|
62
61
|
}), d = h(() => {
|
|
63
62
|
if (!c.value) return !1;
|
|
64
|
-
for (let e of c.value.headers.values()) if (e.type ===
|
|
63
|
+
for (let e of c.value.headers.values()) if (e.type === t.ARRAY || e.type === t.STRUCT) return !0;
|
|
65
64
|
return !1;
|
|
66
65
|
});
|
|
67
66
|
return {
|
|
@@ -298,7 +297,7 @@ var se = /*#__PURE__*/ e(I, [["render", oe], ["__scopeId", "data-v-12ad0967"]]),
|
|
|
298
297
|
}, Ne = /*#__PURE__*/ e(/* @__PURE__ */ S({
|
|
299
298
|
__name: "GlobalChatPanel",
|
|
300
299
|
setup(e) {
|
|
301
|
-
let t = C("chatStore"), n = C("llmConnectionStore"), s = C("connectionStore"),
|
|
300
|
+
let t = C("chatStore"), n = C("llmConnectionStore"), s = C("connectionStore"), l = C("editorStore"), u = C("queryExecutionService"), d = C("dashboardStore", null), S = C("projectStore", null), A = C("modelStore", null), j = C("saveEditors", null), F = C("saveModels", null), I = C("saveLLMConnections", null), L = O(!1), R = O(""), z = c(), B = C("storesLoaded", O(!0)), V = h(() => {
|
|
302
301
|
let e = z.activePanelChatId.value;
|
|
303
302
|
if (!e) return null;
|
|
304
303
|
let n = t.chats[e];
|
|
@@ -365,8 +364,8 @@ var se = /*#__PURE__*/ e(I, [["render", oe], ["__scopeId", "data-v-12ad0967"]]),
|
|
|
365
364
|
deps: {
|
|
366
365
|
llmConnectionStore: n,
|
|
367
366
|
connectionStore: s,
|
|
368
|
-
queryExecutionService:
|
|
369
|
-
editorStore:
|
|
367
|
+
queryExecutionService: u,
|
|
368
|
+
editorStore: l,
|
|
370
369
|
...S ? { projectStore: S } : {},
|
|
371
370
|
...d ? { dashboardStore: d } : {},
|
|
372
371
|
...A ? { modelStore: A } : {},
|
|
@@ -381,7 +380,7 @@ var se = /*#__PURE__*/ e(I, [["render", oe], ["__scopeId", "data-v-12ad0967"]]),
|
|
|
381
380
|
chatStore: t,
|
|
382
381
|
getTargetChatId: () => z.activePanelChatId.value,
|
|
383
382
|
dashboardNameLookup: (e) => d?.dashboards[e]?.name ?? null,
|
|
384
|
-
editorNameLookup: (e) =>
|
|
383
|
+
editorNameLookup: (e) => l.editors[e]?.name ?? null
|
|
385
384
|
});
|
|
386
385
|
}), E(() => {
|
|
387
386
|
Z &&= (Z(), null);
|