@trilogy-data/trilogy-studio-components 0.1.26 → 0.1.27

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (138) hide show
  1. package/dist/AssetAutoImporter-OHphsfW9.js +403 -0
  2. package/dist/{ChatCreatorModal-CL-jBnc3.js → ChatCreatorModal-CuXha6Dg.js} +3 -3
  3. package/dist/{ChatModelSelect-Do-VRUFc.js → ChatModelSelect-Cz7axWjP.js} +1 -1
  4. package/dist/{CodeBlock-PT4no49I.js → CodeBlock-BBsaC6hX.js} +4 -4
  5. package/dist/{CommunityModels-Cmro0hV3.js → CommunityModels-CIQQhO-y.js} +7 -7
  6. package/dist/{ConnectionErrorPopup-FSs7U-Yl.js → ConnectionErrorPopup-7vpqgF0s.js} +1 -1
  7. package/dist/{ConnectionView-COnTTuA4.js → ConnectionView-7Jj_Ggdi.js} +49 -49
  8. package/dist/{CreateEditorFromDatasourcePopup-snOh1d5h.js → CreateEditorFromDatasourcePopup-CrVHUWFl.js} +4 -4
  9. package/dist/{Dashboard-BH9ZwMVJ.js → Dashboard-DxSi9W6Q.js} +276 -280
  10. package/dist/{DashboardImportSelector-DQSvu9T-.js → DashboardImportSelector-kuDRDYi8.js} +2 -2
  11. package/dist/{DashboardMobile-BUPtdN2V.js → DashboardMobile-CZEgTb0R.js} +39 -39
  12. package/dist/{DrilldownPane-CBs5ZojS.js → DrilldownPane-BheRHJMs.js} +5 -7
  13. package/dist/{Editor-DQsYpkwl.js → Editor-D6tdutTm.js} +105 -103
  14. package/dist/{ErrorMessage-XMn_08gJ.js → ErrorMessage-D5JeF3Iz.js} +4 -4
  15. package/dist/{GlobalChatPanel-DhnOaige.js → GlobalChatPanel-BXZh0sdD.js} +20 -21
  16. package/dist/{IDE-HLa8vybk.js → IDE-T8PmyAQ_.js} +200 -203
  17. package/dist/{JobsView-B97HBoIE.js → JobsView-Ca97MiSd.js} +13 -14
  18. package/dist/{LLMChat-CxJcPLEG.js → LLMChat-Cch33Yd_.js} +3 -3
  19. package/dist/{LLMView-C1MUf0c2.js → LLMView-BDb6wD74.js} +23 -23
  20. package/dist/{LoadingView-s1uznGwG.js → LoadingView-B-xFwd2N.js} +2 -2
  21. package/dist/{MarkdownRenderer-BNDuEyG-.js → MarkdownRenderer-BWvdx0k3.js} +531 -430
  22. package/dist/{MobileIDE-BpqXoaMR.js → MobileIDE-DpdEQEqc.js} +179 -182
  23. package/dist/{ModelCard-BhN25jaV.js → ModelCard-DkAMP4X9.js} +12 -13
  24. package/dist/{ModelView-DUDA_PtZ.js → ModelView-DomyhN8g.js} +7 -7
  25. package/dist/PageLoading-BAvKGo9h.js +5937 -0
  26. package/dist/{ResultComponent-CAn_r3BL.js → ResultComponent-zoOSoRLe.js} +8 -8
  27. package/dist/{Results-BJtlwebY.js → Results-dq-SlJbU.js} +17 -19
  28. package/dist/{StatusIcon-BylPx2EO.js → StatusIcon-AbxNvJ6p.js} +2 -2
  29. package/dist/{StoreTokenModal-zCSYhfrw.js → StoreTokenModal-CM8WXdu1.js} +2 -2
  30. package/dist/{SymbolsPane-KYSwN9Sv.js → SymbolsPane-DfaxeaPS.js} +6 -3
  31. package/dist/{TrilogyEmbedProvider-WA_dlv9e.js → TrilogyEmbedProvider-D3h0gYnX.js} +9 -9
  32. package/dist/{TutorialPage-NRcee6Dx.js → TutorialPage-BtEJG7cT.js} +27 -28
  33. package/dist/{VegaLiteChart-D1slfOUY.js → VegaLiteChart-BVyAab-o.js} +12131 -10947
  34. package/dist/{WelcomePage-D5mU2x1L.js → WelcomePage-BoqzYBLr.js} +5 -5
  35. package/dist/{embedTheme-Bub46ILG.js → _plugin-vue_export-helper-f9Rw-Il4.js} +14 -6
  36. package/dist/assets/{css.worker-9aDGcEUy.js → css.worker-niORQtzO.js} +14 -14
  37. package/dist/assets/{html.worker-D2LKDpnG.js → html.worker-CO5LvJpF.js} +17 -17
  38. package/dist/assets/json.worker-BezHzWUV.js +58 -0
  39. package/dist/assets/{ts.worker-Bz0-EaKK.js → ts.worker-CYhxGg0r.js} +107 -107
  40. package/dist/{results-DTgAKr5j.js → base-DuKnVD-A.js} +216 -45
  41. package/dist/components/FeedbackBanner.vue.d.ts +4 -0
  42. package/dist/components/FeedbackBanner.vue.d.ts.map +1 -0
  43. package/dist/components/dashboard/DashboardCreatorIcon.vue.d.ts +54 -0
  44. package/dist/components/dashboard/DashboardCreatorIcon.vue.d.ts.map +1 -0
  45. package/dist/components/dashboard/DashboardProvenance.vue.d.ts +30 -0
  46. package/dist/components/dashboard/DashboardProvenance.vue.d.ts.map +1 -0
  47. package/dist/components/dashboard/ReportLayout.vue.d.ts +19 -0
  48. package/dist/components/dashboard/ReportLayout.vue.d.ts.map +1 -0
  49. package/dist/components/editor/Editor.vue.d.ts +3 -3
  50. package/dist/components/editor/EditorCreatorIcon.vue.d.ts +62 -0
  51. package/dist/components/editor/EditorCreatorIcon.vue.d.ts.map +1 -0
  52. package/dist/components/editor/ValidationComponent.vue.d.ts +50 -0
  53. package/dist/components/editor/ValidationComponent.vue.d.ts.map +1 -0
  54. package/dist/components/model/ModelCard.vue.d.ts +3 -3
  55. package/dist/components/sidebar/LLMConnectionList.vue.d.ts.map +1 -1
  56. package/dist/components/sidebar/Sidebar.vue.d.ts.map +1 -1
  57. package/dist/components/tutorial/TutorialPrompt.vue.d.ts +3 -3
  58. package/dist/components/tutorial/TutorialPrompt.vue.d.ts.map +1 -1
  59. package/dist/{remoteWorker-Dkv3TJ0j.js → connections-CWH3zwH2.js} +4544 -4126
  60. package/dist/connections.js +3 -4
  61. package/dist/{cssMode-D4Rzr1Cu.js → cssMode-zpO2ap2B.js} +5 -6
  62. package/dist/dashboard.js +28 -31
  63. package/dist/{dist-CXoL8kXK.js → dist-1z5KURzS.js} +55 -50
  64. package/dist/{dist-DKkuvbPb.js → dist-Bv3D2p5A.js} +20 -18
  65. package/dist/{editor.main-Cl8i7rHY.js → editor.main-BQh6DxDB.js} +33 -33
  66. package/dist/{editorRefinementRuntime-DoP9P5J2.js → editorStore-CAlMJftt.js} +1692 -575
  67. package/dist/embed.js +2 -2
  68. package/dist/{freemarker2-fW5NBILf.js → freemarker2-DQBqlEXc.js} +1 -1
  69. package/dist/{globalChatRuntime-DWZxeS57.js → globalChatRuntime-CyS7vH51.js} +16 -16
  70. package/dist/{handlebars-dG4w8UUY.js → handlebars-tgYxaM70.js} +1 -1
  71. package/dist/{helpers-BLQAgX3C.js → helpers-BbVlA3Pf.js} +34 -35
  72. package/dist/{html-1Dq70BdU.js → html-jJahD3Mi.js} +1 -1
  73. package/dist/{htmlMode--IQmLBeh.js → htmlMode-BA1-8l2e.js} +5 -6
  74. package/dist/{javascript-CTzBM4sF.js → javascript-Cypfo7va.js} +1 -1
  75. package/dist/{jsonMode-DzeJjIEH.js → jsonMode-xJye8PWS.js} +25 -25
  76. package/dist/{liquid-DlHThiki.js → liquid-BGDrv5da.js} +1 -1
  77. package/dist/llm-ClU-2rgk.js +18493 -0
  78. package/dist/llm.js +2 -3
  79. package/dist/{localStorage-D9uyOFEO.js → localStorage-CGQ1iJXt.js} +40 -43
  80. package/dist/{lspLanguageFeatures-Cdfs3EKq.js → lspLanguageFeatures-V3e_p9oN.js} +32 -32
  81. package/dist/{mdx-fn3g4PH5.js → mdx-BUR1aImW.js} +1 -1
  82. package/dist/monaco.js +3 -3
  83. package/dist/{python-CCVj0pFt.js → python-YLkl0pc6.js} +1 -1
  84. package/dist/{razor-Cj3flYnk.js → razor-BP8TRMDY.js} +1 -1
  85. package/dist/{reconcile-Dyf4UZmj.js → reconcile-DXIvGwBk.js} +1 -1
  86. package/dist/{remoteStoreSync-Z-yjlYtI.js → remoteStoreSync-CuQBWpWf.js} +3 -3
  87. package/dist/{rolldown-runtime-Dqa2HsxW.js → rolldown-runtime-B0aSnxlc.js} +2 -2
  88. package/dist/static/test_import.vue.d.ts +4 -0
  89. package/dist/static/test_import.vue.d.ts.map +1 -0
  90. package/dist/stores-LlyiwSbK.js +2604 -0
  91. package/dist/stores.js +4 -7
  92. package/dist/trilogy-studio-components.css +1 -1
  93. package/dist/{tsMode-GI4xMYAl.js → tsMode-BH9HS_sH.js} +64 -66
  94. package/dist/{typescript-CPibXi3J.js → typescript-BM-ynfk9.js} +1 -1
  95. package/dist/{useChatWithTools-B0HZ_DVh.js → useChatWithTools-m3Jn_SV-.js} +11 -11
  96. package/dist/{useDashboard-CdSnPe_6.js → useDashboard-BOAuvVEw.js} +1014 -1022
  97. package/dist/{tabulator_esm-CxLvGDp8.js → useGlobalChatPanel-DuP1q7_f.js} +1729 -711
  98. package/dist/{useResizableDialog-B0ePSts4.js → useResizableDialog-Cs90WJdF.js} +2 -2
  99. package/dist/views/ModelView.vue.d.ts +6 -6
  100. package/dist/views/ModelView.vue.d.ts.map +1 -1
  101. package/dist/views/TutorialPage.vue.d.ts +9 -9
  102. package/dist/views/TutorialPage.vue.d.ts.map +1 -1
  103. package/dist/views.js +192 -194
  104. package/dist/{editor.api2-ClD5pp8H.js → workers-B9Eybl-M.js} +16252 -15926
  105. package/dist/{xml-BNyphceI.js → xml-M5WFPSpA.js} +1 -1
  106. package/dist/{yaml-DE5Vz0PH.js → yaml-CEeFwjz9.js} +1 -1
  107. package/package.json +29 -20
  108. package/dist/AssetAutoImporter-CBzvBaOt.js +0 -405
  109. package/dist/DashboardCreatorInline-CDU7kLy3.js +0 -129
  110. package/dist/DataTable-DoRDynP1.js +0 -365
  111. package/dist/EditorCreatorInline-D6_y1H_h.js +0 -125
  112. package/dist/LoadingButton-OH3frQuO.js +0 -138
  113. package/dist/ModalDialog-D1EOG4rl.js +0 -42
  114. package/dist/ModelCreator-CCdC7EXt.js +0 -253
  115. package/dist/PageLoading-BzniJM0C.js +0 -2669
  116. package/dist/Tooltip-Dihir4zs.js +0 -103
  117. package/dist/_plugin-vue_export-helper-B3ysoDQm.js +0 -8
  118. package/dist/assets/json.worker-CJ5MmO5Q.js +0 -58
  119. package/dist/base-C8IuZWqY.js +0 -164
  120. package/dist/connectionHistoryStorage-DKJHiKJY.js +0 -111
  121. package/dist/connectionHistoryStore-DQeBvStZ.js +0 -61
  122. package/dist/connections-CJSb1TZl.js +0 -229
  123. package/dist/constants-DgFEYN2b.js +0 -7
  124. package/dist/dashboardStore-ppM6nGks.js +0 -641
  125. package/dist/demoSetup-mwa-RDC6.js +0 -2942
  126. package/dist/editorRefinementToolExecutor-CVY3FA7k.js +0 -4624
  127. package/dist/editorStore-BhhmXbi-.js +0 -1019
  128. package/dist/formatting-BbJ5ICgh.js +0 -6
  129. package/dist/llm-BBOVWb-F.js +0 -11967
  130. package/dist/llmStore-DJM2JhzY.js +0 -153
  131. package/dist/monaco.contribution-ikesdolO.js +0 -128
  132. package/dist/stores-BT9hTLny.js +0 -1708
  133. package/dist/trilogy-BroD2Qmp.js +0 -4
  134. package/dist/urlStore-52HG6lsX.js +0 -55
  135. package/dist/useGlobalChatPanel-D_0luajQ.js +0 -85
  136. package/dist/useIsMobile-CNpUQAvk.js +0 -8
  137. package/dist/usePrismHighlight-DVyDiDAL.js +0 -183
  138. package/dist/workers-Br7ThUKL.js +0 -47
package/dist/views.js CHANGED
@@ -1,27 +1,23 @@
1
- import "./embedTheme-Bub46ILG.js";
2
- import { t as e } from "./_plugin-vue_export-helper-B3ysoDQm.js";
3
- import { an as t, in as n, on as r } from "./editorRefinementToolExecutor-CVY3FA7k.js";
4
- import { i, n as a, o } from "./stores-BT9hTLny.js";
5
- import { i as s, v as c } from "./editorRefinementRuntime-DoP9P5J2.js";
6
- import { N as l, i as u, l as d, r as f, t as p } from "./editorStore-BhhmXbi-.js";
7
- import { n as m } from "./llmStore-DJM2JhzY.js";
8
- import { n as h } from "./dashboardStore-ppM6nGks.js";
9
- import { t as g } from "./localStorage-D9uyOFEO.js";
10
- import { Fragment as _, Suspense as v, Teleport as y, computed as b, createBlock as x, createCommentVNode as S, createElementBlock as C, createElementVNode as w, createVNode as T, defineAsyncComponent as E, defineComponent as D, onBeforeUnmount as O, onMounted as ee, openBlock as k, provide as A, ref as j, renderList as M, toDisplayString as N, unref as P, vModelText as F, withCtx as I, withDirectives as te, withKeys as ne } from "vue";
1
+ import { t as e } from "./_plugin-vue_export-helper-f9Rw-Il4.js";
2
+ import { dn as t, fn as n, pn as r } from "./llm-ClU-2rgk.js";
3
+ import { a as i, d as a, g as o, n as s, p as c } from "./stores-LlyiwSbK.js";
4
+ import { C as l, O as u, Q as d, S as f, i as p, t as m, y as h } from "./editorStore-CAlMJftt.js";
5
+ import { t as g } from "./localStorage-CGQ1iJXt.js";
6
+ import { Fragment as _, Suspense as v, Teleport as y, computed as b, createBlock as x, createCommentVNode as S, createElementBlock as C, createElementVNode as w, createVNode as T, defineAsyncComponent as E, defineComponent as D, onBeforeUnmount as ee, onMounted as te, openBlock as O, provide as k, ref as A, renderList as j, toDisplayString as M, unref as N, vModelText as P, withCtx as F, withDirectives as ne, withKeys as I } from "vue";
11
7
  //#region stores/CredentialManager.vue?vue&type=script&setup=true&lang.ts
12
- var L = { class: "confirmation-overlay" }, R = { class: "confirmation-dialog" }, z = {
8
+ var re = { class: "confirmation-overlay" }, ie = { class: "confirmation-dialog" }, L = {
13
9
  key: 0,
14
10
  class: "credential-prompt-content"
15
- }, B = {
11
+ }, R = {
16
12
  key: 0,
17
13
  class: "creator-container"
18
- }, V = { class: "credential-list" }, H = { class: "form-group" }, U = {
14
+ }, z = { class: "credential-list" }, B = { class: "form-group" }, V = {
19
15
  key: 1,
20
16
  class: "error-message"
21
- }, W = {
17
+ }, H = {
22
18
  key: 1,
23
19
  class: "credential-prompt-content"
24
- }, re = /*#__PURE__*/ e(/* @__PURE__ */ D({
20
+ }, ae = /*#__PURE__*/ e(/* @__PURE__ */ D({
25
21
  __name: "CredentialManager",
26
22
  props: {
27
23
  showPrompt: {
@@ -48,7 +44,7 @@ var L = { class: "confirmation-overlay" }, R = { class: "confirmation-dialog" },
48
44
  "cancel-bypass"
49
45
  ],
50
46
  setup(e, { emit: t }) {
51
- let n = t, r = j(""), i = () => {
47
+ let n = t, r = A(""), i = () => {
52
48
  n("submit-keyphrase", r.value), r.value = "";
53
49
  }, a = () => {
54
50
  n("show-bypass-warning");
@@ -57,13 +53,13 @@ var L = { class: "confirmation-overlay" }, R = { class: "confirmation-dialog" },
57
53
  }, s = () => {
58
54
  n("cancel-bypass");
59
55
  };
60
- return (t, n) => (k(), C("div", null, [e.showPrompt ? (k(), x(y, {
56
+ return (t, n) => (O(), C("div", null, [e.showPrompt ? (O(), x(y, {
61
57
  key: 0,
62
58
  to: "body"
63
- }, [w("div", L, [w("div", R, [
59
+ }, [w("div", re, [w("div", ie, [
64
60
  n[6] ||= w("h2", null, "One Moment", -1),
65
61
  n[7] ||= w("h3", null, "Loading Your Saved Studio Credentials", -1),
66
- e.bypassMode ? (k(), C("div", W, [
62
+ e.bypassMode ? (O(), C("div", H, [
67
63
  n[4] ||= w("p", { class: "warning-message" }, " ⚠️ Warning: Bypassing encryption will cause all your saved credentials to become inaccessible. ", -1),
68
64
  n[5] ||= w("p", null, "Your saved credentials will be lost and you will need to re-enter them.", -1),
69
65
  w("div", { class: "credential-actions" }, [w("button", {
@@ -73,21 +69,21 @@ var L = { class: "confirmation-overlay" }, R = { class: "confirmation-dialog" },
73
69
  onClick: s,
74
70
  class: "cancel-btn"
75
71
  }, "Go Back")])
76
- ])) : (k(), C("div", z, [
72
+ ])) : (O(), C("div", L, [
77
73
  n[3] ||= w("p", null, " Enter a keyphrase to use saved credentials. (This is a secret phrase you created to encrypt your credentials. It's not stored anywhere, so keep it safe.) You'll be asked for it once per session. Credentials are encrypted in your browser local storage and are never sent anywhere. ", -1),
78
- e.storedCredentialLabels.length > 0 ? (k(), C("div", B, [n[1] ||= w("div", { class: "text-bold" }, "Your stored credentials:", -1), w("ul", V, [(k(!0), C(_, null, M(e.storedCredentialLabels, (e) => (k(), C("li", {
74
+ e.storedCredentialLabels.length > 0 ? (O(), C("div", R, [n[1] ||= w("div", { class: "text-bold" }, "Your stored credentials:", -1), w("ul", z, [(O(!0), C(_, null, j(e.storedCredentialLabels, (e) => (O(), C("li", {
79
75
  key: e,
80
76
  class: "truncate-text"
81
- }, N(e), 1))), 128))])])) : S("", !0),
82
- w("div", H, [n[2] ||= w("label", { for: "keyphrase" }, "Keyphrase", -1), te(w("input", {
77
+ }, M(e), 1))), 128))])])) : S("", !0),
78
+ w("div", B, [n[2] ||= w("label", { for: "keyphrase" }, "Keyphrase", -1), ne(w("input", {
83
79
  type: "password",
84
80
  id: "keyphrase",
85
81
  "onUpdate:modelValue": n[0] ||= (e) => r.value = e,
86
- onKeyup: ne(i, ["enter"]),
82
+ onKeyup: I(i, ["enter"]),
87
83
  placeholder: "Enter the keyphrase you used to save credentials",
88
84
  "data-testid": "keyphrase-input"
89
- }, null, 544), [[F, r.value]])]),
90
- e.error ? (k(), C("div", U, N(e.error), 1)) : S("", !0),
85
+ }, null, 544), [[P, r.value]])]),
86
+ e.error ? (O(), C("div", V, M(e.error), 1)) : S("", !0),
91
87
  w("div", { class: "credential-actions" }, [w("button", {
92
88
  onClick: i,
93
89
  class: "primary-button",
@@ -99,27 +95,27 @@ var L = { class: "confirmation-overlay" }, R = { class: "confirmation-dialog" },
99
95
  ]))
100
96
  ])])])) : S("", !0)]));
101
97
  }
102
- }), [["__scopeId", "data-v-bce47d59"]]), ie = "trilogy_studio_";
103
- function G(e) {
98
+ }), [["__scopeId", "data-v-bce47d59"]]), oe = "trilogy_studio_";
99
+ function U(e) {
104
100
  let t = e instanceof ArrayBuffer ? new Uint8Array(e) : new Uint8Array(e.buffer, e.byteOffset, e.byteLength), n = "";
105
101
  for (let e = 0; e < t.length; e++) n += String.fromCharCode(t[e]);
106
102
  return btoa(n);
107
103
  }
108
- function K(e) {
104
+ function W(e) {
109
105
  let t = atob(e), n = new Uint8Array(t.length);
110
106
  for (let e = 0; e < t.length; e++) n[e] = t.charCodeAt(e);
111
107
  return n;
112
108
  }
113
- var q = class extends Error {
109
+ var G = class extends Error {
114
110
  cause;
115
111
  constructor(e, t) {
116
112
  super(e), this.cause = t, this.name = "CredentialError";
117
113
  }
118
- }, J = class extends q {
114
+ }, K = class extends G {
119
115
  constructor(e = "Decryption failed. Likely incorrect password.", t) {
120
116
  super(e, t), this.name = "DecryptionError";
121
117
  }
122
- }, Y = "trilogy-studio-saved-passwords", ae = class {
118
+ }, q = "trilogy-studio-saved-passwords", se = class {
123
119
  pbkdf2Iterations;
124
120
  credentialPrefix;
125
121
  useCredentialApi;
@@ -144,23 +140,23 @@ var q = class extends Error {
144
140
  async encryptValue(e, t) {
145
141
  let n = window.crypto.getRandomValues(/* @__PURE__ */ new Uint8Array(16)), r = window.crypto.getRandomValues(/* @__PURE__ */ new Uint8Array(12)), i = await this.deriveKey(t, n), a = new TextEncoder().encode(e);
146
142
  return {
147
- encryptedValue: G(await window.crypto.subtle.encrypt({
143
+ encryptedValue: U(await window.crypto.subtle.encrypt({
148
144
  name: "AES-GCM",
149
145
  iv: r
150
146
  }, i, a)),
151
- iv: G(r),
152
- salt: G(n)
147
+ iv: U(r),
148
+ salt: U(n)
153
149
  };
154
150
  }
155
151
  async decryptValue(e, t) {
156
152
  try {
157
- let n = K(e.encryptedValue), r = K(e.iv), i = K(e.salt), a = await this.deriveKey(t, i), o = await window.crypto.subtle.decrypt({
153
+ let n = W(e.encryptedValue), r = W(e.iv), i = W(e.salt), a = await this.deriveKey(t, i), o = await window.crypto.subtle.decrypt({
158
154
  name: "AES-GCM",
159
155
  iv: r
160
156
  }, a, n);
161
157
  return new TextDecoder().decode(o);
162
158
  } catch (e) {
163
- throw new J(void 0, e);
159
+ throw new K(void 0, e);
164
160
  }
165
161
  }
166
162
  getStorageKey(e, t) {
@@ -180,7 +176,7 @@ var q = class extends Error {
180
176
  password: !0,
181
177
  mediation: "optional"
182
178
  });
183
- if (e && e instanceof PasswordCredential && e.id === Y) try {
179
+ if (e && e instanceof PasswordCredential && e.id === q) try {
184
180
  return JSON.parse(e.password);
185
181
  } catch (e) {
186
182
  return console.warn("Failed to parse credential blob:", e), {};
@@ -199,7 +195,7 @@ var q = class extends Error {
199
195
  try {
200
196
  console.log("Performing create credential request Credential API");
201
197
  let t = new PasswordCredential({
202
- id: Y,
198
+ id: q,
203
199
  password: JSON.stringify(e),
204
200
  name: "Trilogy Studio Saved Passwords"
205
201
  });
@@ -217,19 +213,18 @@ var q = class extends Error {
217
213
  let e = this.getCredentialBlobKey(n.label, n.type);
218
214
  t[e] = n.value, console.log(`Adding/updating credential '${n.label}' (${n.type}) in blob.`);
219
215
  }
220
- if (!await this.storeCredentialBlob(t)) throw new q("Failed to store credential blob.");
216
+ if (!await this.storeCredentialBlob(t)) throw new G("Failed to store credential blob.");
221
217
  return console.log("Stored multiple credentials in Credential Management API."), !0;
222
- } else {
223
- if (!t) throw new q("Password is required for encryption when not using Credential API.");
224
- console.log("Storing multiple credentials using localStorage.");
225
- for (let n of e) {
226
- let e = this.getStorageKey(n.label, n.type), r = await this.encryptValue(n.value, t), i = JSON.stringify(r);
227
- console.log(`Storing credential '${n.label}' (${n.type}) in localStorage.`), localStorage.setItem(e, i);
228
- }
229
- return console.log("Stored multiple credentials in localStorage."), !0;
230
218
  }
219
+ if (!t) throw new G("Password is required for encryption when not using Credential API.");
220
+ console.log("Storing multiple credentials using localStorage.");
221
+ for (let n of e) {
222
+ let e = this.getStorageKey(n.label, n.type), r = await this.encryptValue(n.value, t), i = JSON.stringify(r);
223
+ console.log(`Storing credential '${n.label}' (${n.type}) in localStorage.`), localStorage.setItem(e, i);
224
+ }
225
+ return console.log("Stored multiple credentials in localStorage."), !0;
231
226
  } catch (e) {
232
- throw console.error("Error storing multiple credentials:", e), new q("Failed to store multiple credentials", e);
227
+ throw console.error("Error storing multiple credentials:", e), new G("Failed to store multiple credentials", e);
233
228
  }
234
229
  }
235
230
  async storeCredential(e, t, n, r = null) {
@@ -237,15 +232,16 @@ var q = class extends Error {
237
232
  if (this.useCredentialApi) {
238
233
  console.log(`Storing credential '${e}' (${t}) using Credential Management API.`);
239
234
  let r = await this.getCredentialBlob(), i = this.getCredentialBlobKey(e, t);
240
- if (r[i] = n, !await this.storeCredentialBlob(r)) throw new q("Failed to store credential blob.");
235
+ if (r[i] = n, !await this.storeCredentialBlob(r)) throw new G("Failed to store credential blob.");
241
236
  return console.log(`Stored credential '${e}' (${t}) in Credential Management API.`), !0;
242
- } else {
243
- if (!r) throw new q("Password is required for encryption when not using Credential API.");
237
+ }
238
+ {
239
+ if (!r) throw new G("Password is required for encryption when not using Credential API.");
244
240
  let i = this.getStorageKey(e, t), a = await this.encryptValue(n, r), o = JSON.stringify(a);
245
241
  return console.log(`Storing credential '${e}' (${t}) using localStorage.`), localStorage.setItem(i, o), !0;
246
242
  }
247
243
  } catch (n) {
248
- throw console.error("Error storing credential:", n), new q(`Failed to store credential '${e}' (${t})`, n);
244
+ throw console.error("Error storing credential:", n), new G(`Failed to store credential '${e}' (${t})`, n);
249
245
  }
250
246
  }
251
247
  async getCredential(e, t, n) {
@@ -268,7 +264,7 @@ var q = class extends Error {
268
264
  value: i
269
265
  };
270
266
  } catch (n) {
271
- throw n instanceof J ? (console.error(`Decryption failed for '${e}' (${t}): ${n.message}`), n) : (console.error(`Error retrieving credential '${e}' (${t}):`, n), new q(`Failed to retrieve credential '${e}' (${t})`, n));
267
+ throw n instanceof K ? (console.error(`Decryption failed for '${e}' (${t}): ${n.message}`), n) : (console.error(`Error retrieving credential '${e}' (${t}):`, n), new G(`Failed to retrieve credential '${e}' (${t})`, n));
272
268
  }
273
269
  }
274
270
  async deleteCredential(e, t) {
@@ -282,7 +278,7 @@ var q = class extends Error {
282
278
  let r = this.getStorageKey(e, t);
283
279
  return localStorage.getItem(r) !== null && (localStorage.removeItem(r), n = !0, console.log(`Deleted credential '${e}' (${t}) from localStorage.`)), n;
284
280
  } catch (n) {
285
- throw console.error(`Error deleting credential '${e}' (${t}):`, n), new q(`Failed to delete credential '${e}' (${t})`, n);
281
+ throw console.error(`Error deleting credential '${e}' (${t}):`, n), new G(`Failed to delete credential '${e}' (${t})`, n);
286
282
  }
287
283
  }
288
284
  async listCredentials() {
@@ -318,20 +314,20 @@ var q = class extends Error {
318
314
  getIsCredentialApiSupported() {
319
315
  return this.isCredentialApiSupported;
320
316
  }
321
- }, X = { class: "ide-placeholder" }, oe = {
317
+ }, J = { class: "ide-placeholder" }, Y = {
322
318
  key: 0,
323
319
  class: "ide-placeholder__sidebar"
324
- }, se = /*#__PURE__*/ e(/* @__PURE__ */ D({
320
+ }, ce = /*#__PURE__*/ e(/* @__PURE__ */ D({
325
321
  __name: "IDEPlaceholder",
326
322
  setup(e) {
327
323
  let t = b(() => window.location.href.includes("dashboard-import"));
328
- return (e, n) => (k(), C("div", X, [t.value ? S("", !0) : (k(), C("div", oe)), n[0] ||= w("div", { class: "ide-placeholder__main" }, [w("div", { class: "ide-placeholder__editor" })], -1)]));
324
+ return (e, n) => (O(), C("div", J, [t.value ? S("", !0) : (O(), C("div", Y)), n[0] ||= w("div", { class: "ide-placeholder__main" }, [w("div", { class: "ide-placeholder__editor" })], -1)]));
329
325
  }
330
- }), [["__scopeId", "data-v-4c31bd0b"]]), ce = {}, Z = { class: "mobile-ide-placeholder" };
331
- function le(e, t) {
332
- return k(), C("div", Z, [...t[0] ||= [w("div", { class: "mobile-ide-placeholder__header" }, null, -1), w("div", { class: "mobile-ide-placeholder__content" }, null, -1)]]);
326
+ }), [["__scopeId", "data-v-4c31bd0b"]]), le = {}, ue = { class: "mobile-ide-placeholder" };
327
+ function X(e, t) {
328
+ return O(), C("div", ue, [...t[0] ||= [w("div", { class: "mobile-ide-placeholder__header" }, null, -1), w("div", { class: "mobile-ide-placeholder__content" }, null, -1)]]);
333
329
  }
334
- var ue = /*#__PURE__*/ e(ce, [["render", le], ["__scopeId", "data-v-263dbb39"]]), Q = /* @__PURE__ */ D({
330
+ var de = /*#__PURE__*/ e(le, [["render", X], ["__scopeId", "data-v-263dbb39"]]), Z = /* @__PURE__ */ D({
335
331
  __name: "Manager",
336
332
  props: {
337
333
  connectionStore: {
@@ -371,7 +367,7 @@ var ue = /*#__PURE__*/ e(ce, [["render", le], ["__scopeId", "data-v-263dbb39"]])
371
367
  required: !0
372
368
  },
373
369
  trilogyResolver: {
374
- type: n,
370
+ type: t,
375
371
  required: !0
376
372
  },
377
373
  storageSources: {
@@ -381,38 +377,38 @@ var ue = /*#__PURE__*/ e(ce, [["render", le], ["__scopeId", "data-v-263dbb39"]])
381
377
  }
382
378
  },
383
379
  setup(e) {
384
- let t = E(() => import("./IDE-HLa8vybk.js")), n = E(() => import("./MobileIDE-BpqXoaMR.js")), o = e, s = j(!1), l = j(!1), u = j(""), d = j(null), f = j(!1), p = j([]), m = j([]), h = new ae({ credentialPrefix: ie });
385
- h.getIsCredentialApiSupported() && (console.log("Native Credential API supported"), f.value = !0);
380
+ let t = E(() => import("./IDE-T8PmyAQ_.js")), n = E(() => import("./MobileIDE-DpdEQEqc.js")), a = e, o = A(!1), c = A(!1), l = A(""), u = A(null), d = A(!1), f = A([]), p = A([]), m = new se({ credentialPrefix: oe });
381
+ m.getIsCredentialApiSupported() && (console.log("Native Credential API supported"), d.value = !0);
386
382
  let g = async (e = null) => {
387
383
  try {
388
- let t = await h.listCredentials();
389
- return p.value = t.map((e) => e.label), e ? p.value.includes(e) : t.length > 0;
384
+ let t = await m.listCredentials();
385
+ return f.value = t.map((e) => e.label), e ? f.value.includes(e) : t.length > 0;
390
386
  } catch (e) {
391
- return console.error("Error checking for credentials:", e), p.value = [], !1;
387
+ return console.error("Error checking for credentials:", e), f.value = [], !1;
392
388
  }
393
389
  }, _ = async (e) => {
394
390
  if (!e.trim()) {
395
- u.value = "Keyphrase cannot be empty";
391
+ l.value = "Keyphrase cannot be empty";
396
392
  return;
397
393
  }
398
- let t = await y(e), n = p.value.length > 0;
394
+ let t = await y(e), n = f.value.length > 0;
399
395
  if (!t && n) {
400
- u.value = "Invalid keyphrase. Please try again.";
396
+ l.value = "Invalid keyphrase. Please try again.";
401
397
  return;
402
398
  }
403
- if (d.value = e, s.value = !1, u.value = "", m.value.length > 0) {
404
- let t = [...m.value];
405
- m.value = [];
399
+ if (u.value = e, o.value = !1, l.value = "", p.value.length > 0) {
400
+ let t = [...p.value];
401
+ p.value = [];
406
402
  for (let { resolve: n, operation: r, params: i } of t) try {
407
403
  if (r === "save") {
408
404
  let { label: t, type: r, value: a } = i;
409
- n(!!await h.storeCredential(t, r, a, e));
405
+ n(!!await m.storeCredential(t, r, a, e));
410
406
  } else if (r === "saveBulk") {
411
407
  let { credentials: t } = i;
412
- n(!!await h.storeCredentials(t, e));
408
+ n(!!await m.storeCredentials(t, e));
413
409
  } else if (r === "get") {
414
410
  let { label: t, type: r } = i;
415
- n(await h.getCredential(t, r, e));
411
+ n(await m.getCredential(t, r, e));
416
412
  }
417
413
  } catch (e) {
418
414
  console.error("Error in credential operation:", e), n(null);
@@ -420,48 +416,48 @@ var ue = /*#__PURE__*/ e(ce, [["render", le], ["__scopeId", "data-v-263dbb39"]])
420
416
  await g();
421
417
  }
422
418
  }, y = async (e) => {
423
- let t = await h.listCredentials();
419
+ let t = await m.listCredentials();
424
420
  if (!t || t.length < 1) return !0;
425
421
  try {
426
422
  let n = t[0];
427
- return await h.getCredential(n.label, n.type, e) !== null;
423
+ return await m.getCredential(n.label, n.type, e) !== null;
428
424
  } catch (e) {
429
425
  return console.error("Error verifying keyphrase:", e), !1;
430
426
  }
431
427
  }, S = () => {
432
- l.value = !0;
428
+ c.value = !0;
433
429
  }, w = () => {
434
- if (d.value = null, s.value = !1, l.value = !1, m.value.length > 0) {
435
- let e = [...m.value];
436
- m.value = [];
430
+ if (u.value = null, o.value = !1, c.value = !1, p.value.length > 0) {
431
+ let e = [...p.value];
432
+ p.value = [];
437
433
  for (let t of e) t.resolve(null);
438
434
  }
439
435
  }, D = () => {
440
- l.value = !1;
441
- }, M = async (e) => {
442
- if (d.value || f.value) try {
443
- let t = await h.storeCredentials(e, d.value || "");
436
+ c.value = !1;
437
+ }, j = async (e) => {
438
+ if (u.value || d.value) try {
439
+ let t = await m.storeCredentials(e, u.value || "");
444
440
  return await g(), !!t;
445
441
  } catch (e) {
446
442
  return console.error("Error saving credentials:", e), !1;
447
443
  }
448
444
  return new Promise((t, n) => {
449
- m.value.push({
445
+ p.value.push({
450
446
  resolve: t,
451
447
  reject: n,
452
448
  operation: "saveBulk",
453
449
  params: { credentials: e }
454
- }), s.value ||= !0;
450
+ }), o.value ||= !0;
455
451
  });
456
- }, N = async (e, t, n) => {
457
- if (d.value || f.value) try {
458
- let r = await h.storeCredential(e, t, n, d.value);
452
+ }, M = async (e, t, n) => {
453
+ if (u.value || d.value) try {
454
+ let r = await m.storeCredential(e, t, n, u.value);
459
455
  return await g(), !!r;
460
456
  } catch (e) {
461
457
  return console.error("Error saving credential:", e), !1;
462
458
  }
463
459
  return new Promise((r, i) => {
464
- m.value.push({
460
+ p.value.push({
465
461
  resolve: r,
466
462
  reject: i,
467
463
  operation: "save",
@@ -470,10 +466,10 @@ var ue = /*#__PURE__*/ e(ce, [["render", le], ["__scopeId", "data-v-263dbb39"]])
470
466
  type: t,
471
467
  value: n
472
468
  }
473
- }), s.value ||= !0;
469
+ }), o.value ||= !0;
474
470
  });
475
- }, F = async (e, t) => d.value || f.value ? await h.getCredential(e, t, d.value || "") : new Promise((n, r) => {
476
- m.value.push({
471
+ }, P = async (e, t) => u.value || d.value ? await m.getCredential(e, t, u.value || "") : new Promise((n, r) => {
472
+ p.value.push({
477
473
  resolve: n,
478
474
  reject: r,
479
475
  operation: "get",
@@ -481,62 +477,64 @@ var ue = /*#__PURE__*/ e(ce, [["render", le], ["__scopeId", "data-v-263dbb39"]])
481
477
  label: e,
482
478
  type: t
483
479
  }
484
- }), s.value ||= !0;
480
+ }), o.value ||= !0;
485
481
  });
486
- g(), A("credentialManager", {
487
- saveCredential: N,
488
- getCredential: F,
489
- hasKeyphrase: () => d.value !== null,
482
+ g(), k("credentialManager", {
483
+ saveCredential: M,
484
+ getCredential: P,
485
+ hasKeyphrase: () => u.value !== null,
490
486
  refreshCredentials: g
491
- }), A("editorStore", o.editorStore), A("connectionStore", o.connectionStore), A("modelStore", o.modelStore), A("trilogyResolver", o.trilogyResolver), A("storageSources", o.storageSources), A("userSettingsStore", o.userSettingsStore), A("llmConnectionStore", o.llmConnectionStore), A("dashboardStore", o.dashboardStore), A("communityApiStore", o.communityApiStore), A("jobsApiStore", o.jobsApiStore), A("chatStore", o.chatStore);
492
- let { setActiveScreen: te, setActiveEditor: ne, setActiveDashboard: L } = i();
493
- A("setActiveScreen", te), A("setActiveEditor", ne), A("setActiveDashboard", L), A("analyticsStore", r()), A("queryExecutionService", new a(o.trilogyResolver, o.connectionStore));
494
- let R = j(window.innerWidth), z = j(!1), B = [];
495
- for (let e of o.storageSources) B.push(e.loadEditors().then((e) => {
496
- for (let t of Object.values(e)) o.editorStore.addEditor(t);
497
- })), B.push((async () => {
487
+ }), k("editorStore", a.editorStore), k("connectionStore", a.connectionStore), k("modelStore", a.modelStore), k("trilogyResolver", a.trilogyResolver), k("storageSources", a.storageSources), k("userSettingsStore", a.userSettingsStore), k("llmConnectionStore", a.llmConnectionStore), k("dashboardStore", a.dashboardStore), k("communityApiStore", a.communityApiStore), k("jobsApiStore", a.jobsApiStore), k("chatStore", a.chatStore);
488
+ let { setActiveScreen: ne, setActiveEditor: I, setActiveDashboard: re } = i();
489
+ k("setActiveScreen", ne), k("setActiveEditor", I), k("setActiveDashboard", re);
490
+ let ie = r();
491
+ k("analyticsStore", ie), k("queryExecutionService", new s(a.trilogyResolver, a.connectionStore));
492
+ let L = A(window.innerWidth), R = A(!1), z = [];
493
+ for (let e of a.storageSources) z.push(e.loadEditors().then((e) => {
494
+ for (let t of Object.values(e)) a.editorStore.addEditor(t);
495
+ })), z.push((async () => {
498
496
  let t = await e.loadConnections();
499
497
  for (let e of Object.values(t)) {
500
498
  if (e.getSecret() == "saved") {
501
- let t = await F(e.getSecretName(), "connection");
499
+ let t = await P(e.getSecretName(), "connection");
502
500
  e.setSecret(t ? t.value : ""), e.changed = !1;
503
501
  }
504
- o.connectionStore.addConnection(e);
502
+ a.connectionStore.addConnection(e);
505
503
  }
506
- })()), B.push(e.loadModelConfig().then((e) => {
507
- for (let t of Object.values(e)) o.modelStore.addModelConfig(t);
508
- })), B.push((async () => {
504
+ })()), z.push(e.loadModelConfig().then((e) => {
505
+ for (let t of Object.values(e)) a.modelStore.addModelConfig(t);
506
+ })), z.push((async () => {
509
507
  let t = await e.loadLLMConnections();
510
508
  for (let e of Object.values(t)) {
511
509
  if (e.getApiKey() == "saved") {
512
- let t = await F(e.getCredentialName(), "llm");
510
+ let t = await P(e.getCredentialName(), "llm");
513
511
  e.setApiKey(t ? t.value : ""), e.changed = !1;
514
512
  }
515
- o.llmConnectionStore.addConnection(e, !1), e.isDefault && (o.llmConnectionStore.activeConnection = e.name, o.llmConnectionStore.resetConnectionInBackground(e.name));
513
+ a.llmConnectionStore.addConnection(e, !1), e.isDefault && (a.llmConnectionStore.activeConnection = e.name, a.llmConnectionStore.resetConnectionInBackground(e.name));
516
514
  }
517
- })()), B.push(e.loadDashboards().then((e) => {
518
- for (let t of Object.values(e)) o.dashboardStore.addDashboard(t);
519
- })), B.push(e.loadChats().then((e) => {
520
- for (let t of Object.values(e)) o.chatStore.addChat(t);
515
+ })()), z.push(e.loadDashboards().then((e) => {
516
+ for (let t of Object.values(e)) a.dashboardStore.addDashboard(t);
517
+ })), z.push(e.loadChats().then((e) => {
518
+ for (let t of Object.values(e)) a.chatStore.addChat(t);
521
519
  }));
522
- let V = j(null);
523
- Promise.all(B).then(() => {
524
- c(Object.values(o.dashboardStore.dashboards), o.connectionStore);
525
- for (let e of Object.values(o.chatStore.chats)) if (!e.dataConnectionId && e.dataConnectionName) {
526
- let t = o.connectionStore.connectionByName(e.dataConnectionName);
520
+ let B = A(null);
521
+ Promise.all(z).then(() => {
522
+ h(Object.values(a.dashboardStore.dashboards), a.connectionStore);
523
+ for (let e of Object.values(a.chatStore.chats)) if (!e.dataConnectionId && e.dataConnectionName) {
524
+ let t = a.connectionStore.connectionByName(e.dataConnectionName);
527
525
  t && (e.dataConnectionId = t.id, e.changed = !0);
528
526
  }
529
527
  }).catch((e) => {
530
- console.error("Error loading workspace data:", e), V.value = e;
528
+ console.error("Error loading workspace data:", e), B.value = e;
531
529
  }).finally(() => {
532
- z.value = !0;
530
+ R.value = !0;
533
531
  });
534
- let H = async () => {
535
- for (let e of o.storageSources) await e.saveEditors(Object.values(o.editorStore.editors).filter((t) => t.storage == e.type));
532
+ let V = async () => {
533
+ for (let e of a.storageSources) await e.saveEditors(Object.values(a.editorStore.editors).filter((t) => t.storage == e.type));
536
534
  console.log("Editors saved");
537
- }, U = async () => {
538
- for (let e of o.storageSources) await e.saveConnections(Object.values(o.connectionStore.connections).filter((t) => t.storage == e.type));
539
- let e = (await Promise.all(Object.values(o.connectionStore.connections).map(async (e) => {
535
+ }, H = async () => {
536
+ for (let e of a.storageSources) await e.saveConnections(Object.values(a.connectionStore.connections).filter((t) => t.storage == e.type));
537
+ let e = (await Promise.all(Object.values(a.connectionStore.connections).map(async (e) => {
540
538
  if (e.getSecret() && e.saveCredential) {
541
539
  let t = e.getSecret();
542
540
  if (t) return {
@@ -547,13 +545,13 @@ var ue = /*#__PURE__*/ e(ce, [["render", le], ["__scopeId", "data-v-263dbb39"]])
547
545
  }
548
546
  return null;
549
547
  }))).filter((e) => e !== null);
550
- e.length > 0 && (await M(e), console.log("Connections saved"));
551
- }, W = async () => {
552
- for (let e of o.storageSources) await e.saveModelConfig(Object.values(o.modelStore.models).filter((t) => t.storage == e.type));
548
+ e.length > 0 && (await j(e), console.log("Connections saved"));
549
+ }, U = async () => {
550
+ for (let e of a.storageSources) await e.saveModelConfig(Object.values(a.modelStore.models).filter((t) => t.storage == e.type));
553
551
  console.log("Models saved");
554
- }, G = async () => {
555
- for (let e of o.storageSources) await e.saveLLMConnections(Object.values(o.llmConnectionStore.connections).filter((t) => t.storage == e.type));
556
- let e = Object.values(o.llmConnectionStore.connections).map((e) => {
552
+ }, W = async () => {
553
+ for (let e of a.storageSources) await e.saveLLMConnections(Object.values(a.llmConnectionStore.connections).filter((t) => t.storage == e.type));
554
+ let e = Object.values(a.llmConnectionStore.connections).map((e) => {
557
555
  let t = e.getApiKey();
558
556
  return t ? {
559
557
  label: e.getCredentialName(),
@@ -561,51 +559,51 @@ var ue = /*#__PURE__*/ e(ce, [["render", le], ["__scopeId", "data-v-263dbb39"]])
561
559
  value: t
562
560
  } : null;
563
561
  }).filter((e) => e !== null);
564
- e.length > 0 && (await M(e), console.log("LLM connections saved"));
565
- }, K = async () => {
562
+ e.length > 0 && (await j(e), console.log("LLM connections saved"));
563
+ }, G = async () => {
566
564
  console.log("saving dashboards");
567
- for (let e of o.storageSources) await e.saveDashboards(Object.values(o.dashboardStore.dashboards).filter((t) => t.storage == e.type));
568
- }, q = async () => {
565
+ for (let e of a.storageSources) await e.saveDashboards(Object.values(a.dashboardStore.dashboards).filter((t) => t.storage == e.type));
566
+ }, K = async () => {
569
567
  console.log("saving chats");
570
- for (let e of o.storageSources) await e.saveChats(Object.values(o.chatStore.chats).filter((t) => t.storage == e.type));
571
- }, J = async () => {
568
+ for (let e of a.storageSources) await e.saveChats(Object.values(a.chatStore.chats).filter((t) => t.storage == e.type));
569
+ }, q = async () => {
572
570
  await Promise.all([
571
+ V(),
573
572
  H(),
574
573
  U(),
575
574
  W(),
576
575
  G(),
577
- K(),
578
- q()
576
+ K()
579
577
  ]);
580
- }, Y = b(() => Number(o.editorStore.unsavedEditors || 0) + Number(o.connectionStore.unsavedConnections || 0) + Number(o.modelStore.unsavedModels || 0) + Number(o.llmConnectionStore.unsavedConnections || 0) + Number(o.dashboardStore.unsavedDashboards || 0) + Number(o.chatStore.unsavedChats || 0)), X = j(null), oe = () => {
581
- X.value && clearInterval(X.value), X.value = setInterval(async () => {
582
- if (Y.value > 0) {
583
- console.log(`Auto-saving ${Y.value} unsaved changes...`);
578
+ }, J = b(() => Number(a.editorStore.unsavedEditors || 0) + Number(a.connectionStore.unsavedConnections || 0) + Number(a.modelStore.unsavedModels || 0) + Number(a.llmConnectionStore.unsavedConnections || 0) + Number(a.dashboardStore.unsavedDashboards || 0) + Number(a.chatStore.unsavedChats || 0)), Y = A(null), le = () => {
579
+ Y.value && clearInterval(Y.value), Y.value = setInterval(async () => {
580
+ if (J.value > 0) {
581
+ console.log(`Auto-saving ${J.value} unsaved changes...`);
584
582
  try {
585
- await J(), console.log("Auto-save completed successfully");
583
+ await q(), console.log("Auto-save completed successfully");
586
584
  } catch (e) {
587
585
  console.error("Auto-save failed:", e);
588
586
  }
589
587
  }
590
- }, 60 * 1e3);
591
- }, ce = () => {
592
- X.value &&= (clearInterval(X.value), null);
593
- }, Z = (e) => {
594
- if (Y.value > 0) return e.preventDefault(), "";
588
+ }, 6e4);
589
+ }, ue = () => {
590
+ Y.value &&= (clearInterval(Y.value), null);
591
+ }, X = (e) => {
592
+ if (J.value > 0) return e.preventDefault(), "";
595
593
  };
596
- ee(() => {
597
- oe(), window.addEventListener("beforeunload", Z), window.addEventListener("resize", $);
598
- }), O(() => {
599
- ce(), window.removeEventListener("beforeunload", Z), window.removeEventListener("resize", $);
600
- }), A("saveEditors", H), A("saveConnections", U), A("saveModels", W), A("saveLLMConnections", G), A("saveDashboards", K), A("saveChats", q), A("saveAll", J), A("unSaved", Y);
601
- let le = window.innerWidth <= 768, Q = b(() => z.value ? R.value <= 768 : le), $ = () => {
602
- R.value = window.innerWidth;
594
+ te(() => {
595
+ le(), window.addEventListener("beforeunload", X), window.addEventListener("resize", $);
596
+ }), ee(() => {
597
+ ue(), window.removeEventListener("beforeunload", X), window.removeEventListener("resize", $);
598
+ }), k("saveEditors", V), k("saveConnections", H), k("saveModels", U), k("saveLLMConnections", W), k("saveDashboards", G), k("saveChats", K), k("saveAll", q), k("unSaved", J);
599
+ let Z = window.innerWidth <= 768, Q = b(() => R.value ? L.value <= 768 : Z), $ = () => {
600
+ L.value = window.innerWidth;
603
601
  };
604
- return A("isMobile", Q), A("storesLoaded", z), A("storesLoadError", V), (e, r) => (k(), C("div", null, [T(re, {
605
- showPrompt: s.value,
606
- bypassMode: l.value,
607
- error: u.value,
608
- storedCredentialLabels: p.value,
602
+ return k("isMobile", Q), k("storesLoaded", R), k("storesLoadError", B), (e, r) => (O(), C("div", null, [T(ae, {
603
+ showPrompt: o.value,
604
+ bypassMode: c.value,
605
+ error: l.value,
606
+ storedCredentialLabels: f.value,
609
607
  onSubmitKeyphrase: _,
610
608
  onShowBypassWarning: S,
611
609
  onConfirmBypass: w,
@@ -615,43 +613,43 @@ var ue = /*#__PURE__*/ e(ce, [["render", le], ["__scopeId", "data-v-263dbb39"]])
615
613
  "bypassMode",
616
614
  "error",
617
615
  "storedCredentialLabels"
618
- ]), Q.value ? (k(), x(v, { key: 0 }, {
619
- default: I(() => [T(P(n))]),
620
- fallback: I(() => [T(ue)]),
616
+ ]), Q.value ? (O(), x(v, { key: 0 }, {
617
+ default: F(() => [T(N(n))]),
618
+ fallback: F(() => [T(de)]),
621
619
  _: 1
622
- })) : (k(), x(v, { key: 1 }, {
623
- default: I(() => [T(P(t), { showingCredentialPrompt: s.value }, null, 8, ["showingCredentialPrompt"])]),
624
- fallback: I(() => [T(se)]),
620
+ })) : (O(), x(v, { key: 1 }, {
621
+ default: F(() => [T(N(t), { showingCredentialPrompt: o.value }, null, 8, ["showingCredentialPrompt"])]),
622
+ fallback: F(() => [T(ce)]),
625
623
  _: 1
626
624
  }))]));
627
625
  }
628
- }), $ = { class: "main" }, de = /*#__PURE__*/ e(/* @__PURE__ */ D({
626
+ }), Q = { class: "main" }, $ = /*#__PURE__*/ e(/* @__PURE__ */ D({
629
627
  __name: "ResponsiveIDE",
630
628
  setup(e) {
631
629
  function r(e) {
632
630
  return !/^https?:\/\/(localhost|127\.0\.0\.1)(?::\d+)?(?:\/|$)/i.test(e);
633
631
  }
634
- let i = t();
632
+ let i = n();
635
633
  i.loadSettings();
636
- let a = window.matchMedia("(prefers-color-scheme: dark)").matches;
637
- i.settings.theme || i.updateSetting("theme", a ? "dark" : "light"), i.settings.trilogyResolver === "" && i.updateSetting("trilogyResolver", "https://trilogy-service.fly.dev"), i.toggleTheme();
638
- let c = new n(i);
639
- r(i.settings.trilogyResolver) && c.warmResolver();
640
- let _ = new g(), v = p(), y = f(), b = l(), x = m(), S = h(), w = u();
634
+ let s = window.matchMedia("(prefers-color-scheme: dark)").matches;
635
+ i.settings.theme || i.updateSetting("theme", s ? "dark" : "light"), i.settings.trilogyResolver === "" && i.updateSetting("trilogyResolver", "https://trilogy-service.fly.dev"), i.toggleTheme();
636
+ let h = new t(i);
637
+ r(i.settings.trilogyResolver) && h.warmResolver();
638
+ let _ = new g(), v = m(), y = f(), b = d(), x = o(), S = c(), w = l();
641
639
  w.loadStoresFromStorage();
642
- let E = o(), D = new d(w), O = s(), ee = [_, D];
643
- return (e, t) => (k(), C("div", $, [T(Q, {
644
- connectionStore: P(y),
645
- editorStore: P(v),
646
- trilogyResolver: P(c),
647
- modelStore: P(b),
648
- storageSources: P(ee),
649
- userSettingsStore: P(i),
650
- dashboardStore: P(S),
651
- llmConnectionStore: P(x),
652
- communityApiStore: P(w),
653
- jobsApiStore: P(E),
654
- chatStore: P(O)
640
+ let E = a(), D = new u(w), ee = p(), te = [_, D];
641
+ return (e, t) => (O(), C("div", Q, [T(Z, {
642
+ connectionStore: N(y),
643
+ editorStore: N(v),
644
+ trilogyResolver: N(h),
645
+ modelStore: N(b),
646
+ storageSources: N(te),
647
+ userSettingsStore: N(i),
648
+ dashboardStore: N(S),
649
+ llmConnectionStore: N(x),
650
+ communityApiStore: N(w),
651
+ jobsApiStore: N(E),
652
+ chatStore: N(ee)
655
653
  }, null, 8, [
656
654
  "connectionStore",
657
655
  "editorStore",
@@ -668,4 +666,4 @@ var ue = /*#__PURE__*/ e(ce, [["render", le], ["__scopeId", "data-v-263dbb39"]])
668
666
  }
669
667
  }), [["__scopeId", "data-v-2d211672"]]);
670
668
  //#endregion
671
- export { Q as Manager, de as ResponsiveIDE };
669
+ export { Z as Manager, $ as ResponsiveIDE };