@trilogy-data/trilogy-studio-components 0.1.12 → 0.1.14

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 (294) hide show
  1. package/dist/{ChatCreatorModal-kIXgcJQp.js → ChatCreatorModal-D-CByWEF.js} +12 -12
  2. package/dist/{Dashboard-B-YfrO5u.js → Dashboard-CCWjUVBq.js} +347 -348
  3. package/dist/{DashboardCreatorInline-C6fr4jNo.js → DashboardCreatorInline-DRlxDEBN.js} +1 -1
  4. package/dist/{DashboardMobile-D911XYkl.js → DashboardMobile-GOPaxc9_.js} +104 -103
  5. package/dist/{LLMConnectionList-DZbu1kGq.js → LLMConnectionList-ByLjIXLO.js} +1168 -1213
  6. package/dist/{LLMView-C4RQS1B8.js → LLMView-B7XLbzBx.js} +53 -51
  7. package/dist/Manager-B2wTf-lw.js +4 -0
  8. package/dist/{ResultComponent-fVgARLAb.js → ResultComponent-BKuWOt_p.js} +37 -34
  9. package/dist/Sidebar-CMy9ptnW.js +2188 -0
  10. package/dist/TutorialPage-9YzXa97t.js +509 -0
  11. package/dist/{WelcomePage-LRJvygaE.js → WelcomePage-BMcBpSQ7.js} +4 -4
  12. package/dist/components/AssetAutoImporter.vue.d.ts.map +1 -1
  13. package/dist/components/ChartControlPanel.vue.d.ts.map +1 -1
  14. package/dist/components/CodeBlock.vue.d.ts.map +1 -1
  15. package/dist/components/ConfirmDialog.vue.d.ts +25 -0
  16. package/dist/components/ConfirmDialog.vue.d.ts.map +1 -0
  17. package/dist/components/ContextMenu.vue.d.ts +4 -2
  18. package/dist/components/ContextMenu.vue.d.ts.map +1 -1
  19. package/dist/components/DataTable.vue.d.ts +9 -0
  20. package/dist/components/DataTable.vue.d.ts.map +1 -1
  21. package/dist/components/EditableTitle.vue.d.ts.map +1 -1
  22. package/dist/components/HintComponent.vue.d.ts +1 -1
  23. package/dist/components/HintComponent.vue.d.ts.map +1 -1
  24. package/dist/components/LoadingButton.vue.d.ts.map +1 -1
  25. package/dist/components/MarkdownRenderer.vue.d.ts +1 -0
  26. package/dist/components/MarkdownRenderer.vue.d.ts.map +1 -1
  27. package/dist/components/ModalDialog.vue.d.ts +36 -0
  28. package/dist/components/ModalDialog.vue.d.ts.map +1 -0
  29. package/dist/components/PopupModal.vue.d.ts.map +1 -1
  30. package/dist/components/SimpleEditor.vue.d.ts +117 -0
  31. package/dist/components/SimpleEditor.vue.d.ts.map +1 -1
  32. package/dist/components/StatusIcon.vue.d.ts +3 -3
  33. package/dist/components/StatusIcon.vue.d.ts.map +1 -1
  34. package/dist/components/StoreTokenModal.vue.d.ts +18 -0
  35. package/dist/components/StoreTokenModal.vue.d.ts.map +1 -0
  36. package/dist/components/SymbolsPane.vue.d.ts.map +1 -1
  37. package/dist/components/VegaLiteChart.vue.d.ts.map +1 -1
  38. package/dist/components/chartRenderManager.d.ts +2 -0
  39. package/dist/components/chartRenderManager.d.ts.map +1 -1
  40. package/dist/components/community/AddStoreModal.vue.d.ts +46 -1
  41. package/dist/components/community/AddStoreModal.vue.d.ts.map +1 -1
  42. package/dist/components/community/CommunityModelCard.vue.d.ts +3 -3
  43. package/dist/components/community/CommunityModelCard.vue.d.ts.map +1 -1
  44. package/dist/components/community/CommunityModelHeader.vue.d.ts +7 -4
  45. package/dist/components/community/CommunityModelHeader.vue.d.ts.map +1 -1
  46. package/dist/components/community/CommunityModels.vue.d.ts +4 -4
  47. package/dist/components/community/CommunityModels.vue.d.ts.map +1 -1
  48. package/dist/components/community/CommunityRemote.vue.d.ts.map +1 -1
  49. package/dist/components/connection/ConnectionDatabase.vue.d.ts.map +1 -1
  50. package/dist/components/connection/ConnectionSchema.vue.d.ts.map +1 -1
  51. package/dist/components/connection/ConnectionTable.vue.d.ts +9 -0
  52. package/dist/components/connection/ConnectionTable.vue.d.ts.map +1 -1
  53. package/dist/components/dashboard/Dashboard.vue.d.ts +4 -4
  54. package/dist/components/dashboard/Dashboard.vue.d.ts.map +1 -1
  55. package/dist/components/dashboard/DashboardAddItemModal.vue.d.ts +4 -4
  56. package/dist/components/dashboard/DashboardAddItemModal.vue.d.ts.map +1 -1
  57. package/dist/components/dashboard/DashboardCTA.vue.d.ts +4 -4
  58. package/dist/components/dashboard/DashboardCTA.vue.d.ts.map +1 -1
  59. package/dist/components/dashboard/DashboardChart.vue.d.ts +1 -1
  60. package/dist/components/dashboard/DashboardChart.vue.d.ts.map +1 -1
  61. package/dist/components/dashboard/DashboardChartEditor.vue.d.ts +234 -2
  62. package/dist/components/dashboard/DashboardChartEditor.vue.d.ts.map +1 -1
  63. package/dist/components/dashboard/DashboardDataSelector.vue.d.ts.map +1 -1
  64. package/dist/components/dashboard/DashboardEditorDialog.vue.d.ts +42 -0
  65. package/dist/components/dashboard/DashboardEditorDialog.vue.d.ts.map +1 -0
  66. package/dist/components/dashboard/DashboardFilter.vue.d.ts +0 -1
  67. package/dist/components/dashboard/DashboardFilter.vue.d.ts.map +1 -1
  68. package/dist/components/dashboard/DashboardFilterAutocomplete.vue.d.ts.map +1 -1
  69. package/dist/components/dashboard/DashboardGridItem.vue.d.ts +4 -4
  70. package/dist/components/dashboard/DashboardGridItem.vue.d.ts.map +1 -1
  71. package/dist/components/dashboard/DashboardHeader.vue.d.ts.map +1 -1
  72. package/dist/components/dashboard/DashboardHeaderFilterInput.vue.d.ts +1 -0
  73. package/dist/components/dashboard/DashboardHeaderFilterInput.vue.d.ts.map +1 -1
  74. package/dist/components/dashboard/DashboardImportPopup.vue.d.ts +5 -7
  75. package/dist/components/dashboard/DashboardImportPopup.vue.d.ts.map +1 -1
  76. package/dist/components/dashboard/DashboardImportSelector.vue.d.ts +4 -1
  77. package/dist/components/dashboard/DashboardImportSelector.vue.d.ts.map +1 -1
  78. package/dist/components/dashboard/DashboardMarkdown.vue.d.ts +1 -20
  79. package/dist/components/dashboard/DashboardMarkdown.vue.d.ts.map +1 -1
  80. package/dist/components/dashboard/DashboardMarkdownEditor.vue.d.ts +234 -1
  81. package/dist/components/dashboard/DashboardMarkdownEditor.vue.d.ts.map +1 -1
  82. package/dist/components/dashboard/DashboardMobile.vue.d.ts +3 -3
  83. package/dist/components/dashboard/DashboardMobile.vue.d.ts.map +1 -1
  84. package/dist/components/dashboard/DashboardSharePopup.vue.d.ts +5 -7
  85. package/dist/components/dashboard/DashboardSharePopup.vue.d.ts.map +1 -1
  86. package/dist/components/dashboard/DashboardTable.vue.d.ts +9 -1
  87. package/dist/components/dashboard/DashboardTable.vue.d.ts.map +1 -1
  88. package/dist/components/dashboard/useDashboard.d.ts.map +1 -1
  89. package/dist/components/dashboard/useDashboardItemShell.d.ts +28 -0
  90. package/dist/components/dashboard/useDashboardItemShell.d.ts.map +1 -0
  91. package/dist/components/editor/Editor.vue.d.ts +20 -6
  92. package/dist/components/editor/Editor.vue.d.ts.map +1 -1
  93. package/dist/components/editor/EditorCreatorInline.vue.d.ts.map +1 -1
  94. package/dist/components/editor/EditorHeader.vue.d.ts +10 -3
  95. package/dist/components/editor/EditorHeader.vue.d.ts.map +1 -1
  96. package/dist/components/editor/ResultComponent.vue.d.ts +75 -181
  97. package/dist/components/editor/ResultComponent.vue.d.ts.map +1 -1
  98. package/dist/components/editor/Results.vue.d.ts +9 -0
  99. package/dist/components/editor/Results.vue.d.ts.map +1 -1
  100. package/dist/components/editor/editorHelpers.d.ts +1 -1
  101. package/dist/components/editor/editorHelpers.d.ts.map +1 -1
  102. package/dist/components/jobs/JobsAddStoreModal.vue.d.ts +14 -0
  103. package/dist/components/jobs/JobsAddStoreModal.vue.d.ts.map +1 -0
  104. package/dist/components/jobs/JobsView.vue.d.ts +6 -0
  105. package/dist/components/jobs/JobsView.vue.d.ts.map +1 -0
  106. package/dist/components/layout/MobileSidebarLayout.vue.d.ts.map +1 -1
  107. package/dist/components/layout/SidebarLayout.vue.d.ts.map +1 -1
  108. package/dist/components/layout/TabbedBrowser.vue.d.ts +1 -12
  109. package/dist/components/layout/TabbedBrowser.vue.d.ts.map +1 -1
  110. package/dist/components/layout/TabbedLayout.vue.d.ts.map +1 -1
  111. package/dist/components/llm/ArtifactsPane.vue.d.ts +11 -2
  112. package/dist/components/llm/ArtifactsPane.vue.d.ts.map +1 -1
  113. package/dist/components/llm/ChatArtifact.vue.d.ts +10 -0
  114. package/dist/components/llm/ChatArtifact.vue.d.ts.map +1 -1
  115. package/dist/components/llm/ChatCreatorModal.vue.d.ts +1 -9
  116. package/dist/components/llm/ChatCreatorModal.vue.d.ts.map +1 -1
  117. package/dist/components/llm/LLMChat.vue.d.ts +9 -36
  118. package/dist/components/llm/LLMChat.vue.d.ts.map +1 -1
  119. package/dist/components/llm/LLMChatSplitView.vue.d.ts +55 -185
  120. package/dist/components/llm/LLMChatSplitView.vue.d.ts.map +1 -1
  121. package/dist/components/llm/LLMEditorRefinement.vue.d.ts +47 -180
  122. package/dist/components/llm/LLMEditorRefinement.vue.d.ts.map +1 -1
  123. package/dist/components/llm/toolCallDisplay.d.ts +13 -0
  124. package/dist/components/llm/toolCallDisplay.d.ts.map +1 -0
  125. package/dist/components/model/ModelCard.vue.d.ts +22 -5
  126. package/dist/components/model/ModelCard.vue.d.ts.map +1 -1
  127. package/dist/components/model/ModelConcept.vue.d.ts.map +1 -1
  128. package/dist/components/model/ModelCreator.vue.d.ts +3 -0
  129. package/dist/components/model/ModelCreator.vue.d.ts.map +1 -1
  130. package/dist/components/model/ModelSelector.vue.d.ts.map +1 -1
  131. package/dist/components/sidebar/CommunityModelList.vue.d.ts +284 -0
  132. package/dist/components/sidebar/CommunityModelList.vue.d.ts.map +1 -0
  133. package/dist/components/sidebar/CommunityModelListItem.vue.d.ts +7 -7
  134. package/dist/components/sidebar/CommunityModelListItem.vue.d.ts.map +1 -1
  135. package/dist/components/sidebar/ConnectionCreatorInline.vue.d.ts.map +1 -1
  136. package/dist/components/sidebar/ConnectionIcon.vue.d.ts.map +1 -1
  137. package/dist/components/sidebar/ConnectionList.vue.d.ts +21 -71
  138. package/dist/components/sidebar/ConnectionList.vue.d.ts.map +1 -1
  139. package/dist/components/sidebar/ConnectionListItem.vue.d.ts +15 -61
  140. package/dist/components/sidebar/ConnectionListItem.vue.d.ts.map +1 -1
  141. package/dist/components/sidebar/ConnectionRefresh.vue.d.ts.map +1 -1
  142. package/dist/components/sidebar/CreateEditorFromDatasourcePopup.vue.d.ts.map +1 -1
  143. package/dist/components/sidebar/DashboardList.vue.d.ts +33 -75
  144. package/dist/components/sidebar/DashboardList.vue.d.ts.map +1 -1
  145. package/dist/components/sidebar/DashboardListItem.vue.d.ts +13 -59
  146. package/dist/components/sidebar/DashboardListItem.vue.d.ts.map +1 -1
  147. package/dist/components/sidebar/DuckDBImporter.vue.d.ts +1 -0
  148. package/dist/components/sidebar/DuckDBImporter.vue.d.ts.map +1 -1
  149. package/dist/components/sidebar/EditorList.vue.d.ts +190 -67
  150. package/dist/components/sidebar/EditorList.vue.d.ts.map +1 -1
  151. package/dist/components/sidebar/EditorListItem.vue.d.ts +16 -59
  152. package/dist/components/sidebar/EditorListItem.vue.d.ts.map +1 -1
  153. package/dist/components/sidebar/GenericSidebarItem.vue.d.ts.map +1 -1
  154. package/dist/components/sidebar/JobsList.vue.d.ts +12 -0
  155. package/dist/components/sidebar/JobsList.vue.d.ts.map +1 -0
  156. package/dist/components/sidebar/JobsListItem.vue.d.ts +25 -0
  157. package/dist/components/sidebar/JobsListItem.vue.d.ts.map +1 -0
  158. package/dist/components/sidebar/LLMConnectionCreator.vue.d.ts.map +1 -1
  159. package/dist/components/sidebar/LLMConnectionList.vue.d.ts +14 -356
  160. package/dist/components/sidebar/LLMConnectionList.vue.d.ts.map +1 -1
  161. package/dist/components/sidebar/LLMConnectionListItem.vue.d.ts +15 -190
  162. package/dist/components/sidebar/LLMConnectionListItem.vue.d.ts.map +1 -1
  163. package/dist/components/sidebar/ModelSidebar.vue.d.ts +15 -0
  164. package/dist/components/sidebar/ModelSidebar.vue.d.ts.map +1 -1
  165. package/dist/components/sidebar/Sidebar.vue.d.ts +3966 -0
  166. package/dist/components/sidebar/Sidebar.vue.d.ts.map +1 -0
  167. package/dist/components/sidebar/SidebarList.vue.d.ts.map +1 -1
  168. package/dist/components/sidebar/SidebarOverflowMenu.vue.d.ts +19 -0
  169. package/dist/components/sidebar/SidebarOverflowMenu.vue.d.ts.map +1 -0
  170. package/dist/components/sidebar/SidebarTagChip.vue.d.ts +6 -0
  171. package/dist/components/sidebar/SidebarTagChip.vue.d.ts.map +1 -0
  172. package/dist/components/tutorial/TutorialPrompt.vue.d.ts +97 -186
  173. package/dist/components/tutorial/TutorialPrompt.vue.d.ts.map +1 -1
  174. package/dist/components/useConfirmationState.d.ts +10 -0
  175. package/dist/components/useConfirmationState.d.ts.map +1 -0
  176. package/dist/composables/useClickOutside.d.ts +12 -0
  177. package/dist/composables/useClickOutside.d.ts.map +1 -0
  178. package/dist/connections/index.d.ts +1 -0
  179. package/dist/connections/index.d.ts.map +1 -1
  180. package/dist/connections/remoteProject.d.ts +23 -0
  181. package/dist/connections/remoteProject.d.ts.map +1 -0
  182. package/dist/{cssMode-DCSjJlZ5.js → cssMode-Cfy3yIk-.js} +1 -1
  183. package/dist/dashboards/base.d.ts +2 -1
  184. package/dist/dashboards/base.d.ts.map +1 -1
  185. package/dist/dashboards/prompts.d.ts +1 -1
  186. package/dist/dashboards/prompts.d.ts.map +1 -1
  187. package/dist/dashboards/spec.d.ts +4 -0
  188. package/dist/dashboards/spec.d.ts.map +1 -1
  189. package/dist/data/index.d.ts +1 -0
  190. package/dist/data/index.d.ts.map +1 -1
  191. package/dist/data/localStorage.d.ts +3 -3
  192. package/dist/data/localStorage.d.ts.map +1 -1
  193. package/dist/data/remoteStoreStorage.d.ts +46 -0
  194. package/dist/data/remoteStoreStorage.d.ts.map +1 -0
  195. package/dist/data/storage.d.ts +6 -6
  196. package/dist/data/storage.d.ts.map +1 -1
  197. package/dist/data/tutorial/reference.d.ts.map +1 -1
  198. package/dist/editors/editor.d.ts +19 -5
  199. package/dist/editors/editor.d.ts.map +1 -1
  200. package/dist/editors/fileTypes.d.ts +12 -0
  201. package/dist/editors/fileTypes.d.ts.map +1 -0
  202. package/dist/editors/helpers.d.ts +2 -0
  203. package/dist/editors/helpers.d.ts.map +1 -1
  204. package/dist/{freemarker2-BKjHRYvq.js → freemarker2-Dy8u-XQv.js} +1 -1
  205. package/dist/{handlebars-D_px6u7k.js → handlebars-BDrD8h_c.js} +1 -1
  206. package/dist/{html-Bm-h8fTq.js → html-CKz7V4Cn.js} +1 -1
  207. package/dist/{htmlMode-YODzRvjv.js → htmlMode-BZE5C9QD.js} +1 -1
  208. package/dist/{javascript-DZrwO1Xq.js → javascript-Cav2mApM.js} +1 -1
  209. package/dist/{jsonMode-_ThxxZQx.js → jsonMode-B6434NZu.js} +1 -1
  210. package/dist/{liquid-I2p3UrJy.js → liquid-Cq-Omf5B.js} +1 -1
  211. package/dist/llm/chatToolExecutor.d.ts.map +1 -1
  212. package/dist/llm/editorRefinementToolExecutor.d.ts.map +1 -1
  213. package/dist/llm/toolLoopCore.d.ts.map +1 -1
  214. package/dist/{main-Bjg9NFbT.js → main-C-6acy1R.js} +54550 -52400
  215. package/dist/main.css +1 -1
  216. package/dist/main.js +16 -16
  217. package/dist/main.umd.cjs +580 -559
  218. package/dist/{mdx-e5VczKhJ.js → mdx-DYvw7-lF.js} +1 -1
  219. package/dist/models/helpers.d.ts +16 -4
  220. package/dist/models/helpers.d.ts.map +1 -1
  221. package/dist/models/model.d.ts +1 -0
  222. package/dist/models/model.d.ts.map +1 -1
  223. package/dist/monaco/editorHelpers.d.ts.map +1 -1
  224. package/dist/prism-clike-SH1s-yiH.js +31 -0
  225. package/dist/prism-javascript-CLux6jF8.js +137 -0
  226. package/dist/prism-json-iVb7He6L.js +25 -0
  227. package/dist/prism-markdown-tjNeCMi3.js +300 -0
  228. package/dist/prism-markup-BNGj0Tvm.js +173 -0
  229. package/dist/prism-python-DBk-6kcY.js +71 -0
  230. package/dist/prism-typescript-Crma_dEX.js +55 -0
  231. package/dist/{python-CUAfebEu.js → python-BTTSwl4o.js} +1 -1
  232. package/dist/{razor-B95YKGrm.js → razor-BVBhJqGl.js} +1 -1
  233. package/dist/remotes/genericStoreMetadata.d.ts +8 -0
  234. package/dist/remotes/genericStoreMetadata.d.ts.map +1 -0
  235. package/dist/remotes/jobs.d.ts +38 -0
  236. package/dist/remotes/jobs.d.ts.map +1 -0
  237. package/dist/remotes/jobsService.d.ts +15 -0
  238. package/dist/remotes/jobsService.d.ts.map +1 -0
  239. package/dist/remotes/models.d.ts +2 -1
  240. package/dist/remotes/models.d.ts.map +1 -1
  241. package/dist/remotes/remoteStoreSync.d.ts +7 -0
  242. package/dist/remotes/remoteStoreSync.d.ts.map +1 -0
  243. package/dist/remotes/storeService.d.ts +2 -1
  244. package/dist/remotes/storeService.d.ts.map +1 -1
  245. package/dist/stores/Manager.vue.d.ts +9 -0
  246. package/dist/stores/Manager.vue.d.ts.map +1 -1
  247. package/dist/stores/communityApiStore.d.ts +6 -0
  248. package/dist/stores/communityApiStore.d.ts.map +1 -1
  249. package/dist/stores/editorStore.d.ts +7 -2
  250. package/dist/stores/editorStore.d.ts.map +1 -1
  251. package/dist/stores/index.d.ts +1 -0
  252. package/dist/stores/index.d.ts.map +1 -1
  253. package/dist/stores/jobsApiStore.d.ts +45 -0
  254. package/dist/stores/jobsApiStore.d.ts.map +1 -0
  255. package/dist/stores/modelStore.d.ts.map +1 -1
  256. package/dist/stores/queryExecutionService.d.ts +6 -4
  257. package/dist/stores/queryExecutionService.d.ts.map +1 -1
  258. package/dist/stores/resolver.d.ts +4 -4
  259. package/dist/stores/resolver.d.ts.map +1 -1
  260. package/dist/stores/useScreenNavigation.d.ts +3 -1
  261. package/dist/stores/useScreenNavigation.d.ts.map +1 -1
  262. package/dist/stores/userSettingsStore.d.ts.map +1 -1
  263. package/dist/{tsMode-BcjYt2WB.js → tsMode-z99lZ8eT.js} +1 -1
  264. package/dist/{typescript-Ck_cSGyE.js → typescript-BXQnMlGm.js} +1 -1
  265. package/dist/useDashboard-3deVRse_.js +3502 -0
  266. package/dist/utility/markdownRenderer.d.ts.map +1 -1
  267. package/dist/utility/prism.d.ts +5 -0
  268. package/dist/utility/prism.d.ts.map +1 -0
  269. package/dist/utils/terminalOutput.d.ts +3 -0
  270. package/dist/utils/terminalOutput.d.ts.map +1 -0
  271. package/dist/views/ConnectionView.vue.d.ts +9 -0
  272. package/dist/views/ConnectionView.vue.d.ts.map +1 -1
  273. package/dist/views/IDE.vue.d.ts +7 -0
  274. package/dist/views/IDE.vue.d.ts.map +1 -0
  275. package/dist/views/LLMView.vue.d.ts +232 -846
  276. package/dist/views/LLMView.vue.d.ts.map +1 -1
  277. package/dist/views/MobileIDE.vue.d.ts +6 -0
  278. package/dist/views/MobileIDE.vue.d.ts.map +1 -0
  279. package/dist/views/ModelView.vue.d.ts +46 -10
  280. package/dist/views/ModelView.vue.d.ts.map +1 -1
  281. package/dist/views/ResponsiveIDE.vue.d.ts.map +1 -1
  282. package/dist/views/TutorialPage.vue.d.ts +465 -907
  283. package/dist/views/TutorialPage.vue.d.ts.map +1 -1
  284. package/dist/{xml-Do52fQeS.js → xml-Ci-UOFva.js} +1 -1
  285. package/dist/{yaml-C8U7HH0M.js → yaml-XEOisXAU.js} +1 -1
  286. package/package.json +1 -1
  287. package/dist/Manager-CoKiEZT-.js +0 -4
  288. package/dist/Sidebar-esb9EqnY.js +0 -1862
  289. package/dist/TutorialPage-DfA2845i.js +0 -482
  290. package/dist/components/dashboard/DashboardCreatorIcon.vue.d.ts +0 -52
  291. package/dist/components/dashboard/DashboardCreatorIcon.vue.d.ts.map +0 -1
  292. package/dist/components/editor/EditorCreatorIcon.vue.d.ts +0 -61
  293. package/dist/components/editor/EditorCreatorIcon.vue.d.ts.map +0 -1
  294. package/dist/useDashboard-BnXAbWPO.js +0 -3352
@@ -1,19 +1,19 @@
1
- var Oe = Object.defineProperty;
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-Bjg9NFbT.js";
6
- function Je(t, e, o, i) {
1
+ var Ye = Object.defineProperty;
2
+ var Ge = (t, e, o) => e in t ? Ye(t, e, { enumerable: !0, configurable: !0, writable: !0, value: o }) : t[e] = o;
3
+ var te = (t, e, o) => Ge(t, typeof e != "symbol" ? e + "" : e, o);
4
+ import { defineComponent as ce, ref as C, inject as _, createElementBlock as u, createCommentVNode as M, openBlock as l, createElementVNode as s, withModifiers as R, withDirectives as D, vModelText as B, vModelSelect as Ce, vModelCheckbox as Me, Fragment as pe, computed as z, createBlock as W, withCtx as q, unref as Ke, normalizeClass as me, toDisplayString as F, renderList as we, resolveComponent as x, createVNode as G, Transition as ge, createTextVNode as be, onMounted as Le, watch as Pe, vModelDynamic as je, createStaticVNode as Qe } from "vue";
5
+ import { K as L, a as Z, T as Ae, L as Re, z as Ve, f as De, A as He, B as _e, S as Ne, j as We, e as qe, F as Ue, O as Oe, G as xe, H as ze, I as Xe, u as Je, g as Ze } from "./main-C-6acy1R.js";
6
+ function $e(t, e, o, i) {
7
7
  const c = [];
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) => {
8
+ return Object.values(t).sort((a, p) => a.connected && !p.connected ? -1 : !a.connected && p.connected ? 1 : a.name.localeCompare(p.name)).forEach((a) => {
9
9
  if (a.deleted)
10
10
  return;
11
- let d = a.databases ? a.databases : [];
11
+ let p = a.databases ? a.databases : [];
12
12
  c.push({
13
13
  id: a.name,
14
14
  name: a.name,
15
15
  indent: 0,
16
- count: d.length,
16
+ count: p.length,
17
17
  type: "connection",
18
18
  searchPath: a.name,
19
19
  connection: a
@@ -105,90 +105,90 @@ function Je(t, e, o, i) {
105
105
  type: "error",
106
106
  searchPath: a.name,
107
107
  connection: a
108
- }), d.forEach((T) => {
109
- const m = `${a.name}${_}${T.name}`;
108
+ }), p.forEach((w) => {
109
+ const d = `${a.name}${L}${w.name}`;
110
110
  c.push({
111
- id: m,
112
- name: T.name,
111
+ id: d,
112
+ name: w.name,
113
113
  indent: 1,
114
- count: T.schemas.length,
114
+ count: w.schemas.length,
115
115
  type: "database",
116
- searchPath: `${T.name}`,
116
+ searchPath: `${w.name}`,
117
117
  connection: a
118
- }), e[m] || (o[m] && c.push({
119
- id: `${m}-loading`,
118
+ }), e[d] || (o[d] && c.push({
119
+ id: `${d}-loading`,
120
120
  name: "Loading...",
121
121
  indent: 1,
122
122
  count: 0,
123
123
  type: "loading",
124
- searchPath: `${T.name}`,
124
+ searchPath: `${w.name}`,
125
125
  connection: a
126
- }), T.schemas.forEach((R) => {
127
- const P = `${m}${_}${R.name}`;
126
+ }), w.schemas.forEach((S) => {
127
+ const f = `${d}${L}${S.name}`;
128
128
  c.push({
129
- id: P,
130
- name: R.name,
129
+ id: f,
130
+ name: S.name,
131
131
  indent: 2,
132
- count: R.tables.length,
132
+ count: S.tables.length,
133
133
  type: "schema",
134
- searchPath: `${T.name}.${R.name}`,
134
+ searchPath: `${w.name}.${S.name}`,
135
135
  connection: a
136
- }), e[P] || (o[P] && c.push({
137
- id: `${P}-loading`,
136
+ }), e[f] || (o[f] && c.push({
137
+ id: `${f}-loading`,
138
138
  name: "Loading...",
139
139
  indent: 2,
140
140
  count: 0,
141
141
  type: "loading",
142
- searchPath: `${T.name}.${R.name}`,
142
+ searchPath: `${w.name}.${S.name}`,
143
143
  connection: a
144
- }), R.tables.forEach((g) => {
145
- const h = `${m}${_}${R.name}${_}${g.name}`;
144
+ }), S.tables.forEach((N) => {
145
+ const A = `${d}${L}${S.name}${L}${N.name}`;
146
146
  c.push({
147
- id: h,
148
- name: g.name,
147
+ id: A,
148
+ name: N.name,
149
149
  indent: 3,
150
150
  count: 0,
151
151
  type: "table",
152
- searchPath: `${T.name}.${R.name}.${g.name}`,
152
+ searchPath: `${w.name}.${S.name}.${N.name}`,
153
153
  connection: a,
154
- object: g
154
+ object: N
155
155
  });
156
156
  }));
157
157
  }));
158
158
  }));
159
159
  }), c;
160
160
  }
161
- function Ze(t, e) {
161
+ function et(t, e) {
162
162
  if (!e || e.trim() === "")
163
163
  return t;
164
164
  const o = e.toLowerCase().trim(), i = /* @__PURE__ */ new Set();
165
- t.forEach((d) => {
166
- (d.type === "view-queries" || d.searchPath.toLowerCase().includes(o)) && i.add(d.id);
165
+ t.forEach((p) => {
166
+ (p.type === "view-queries" || p.searchPath.toLowerCase().includes(o)) && i.add(p.id);
167
167
  });
168
168
  const c = /* @__PURE__ */ new Map();
169
- for (let d = 0; d < t.length; d++) {
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;
169
+ for (let p = 0; p < t.length; p++) {
170
+ const w = t[p];
171
+ let d = null;
172
+ for (let S = p - 1; S >= 0; S--) {
173
+ const f = t[S];
174
+ if (f.indent < w.indent) {
175
+ d = f.id;
176
176
  break;
177
177
  }
178
178
  }
179
- m && (c.has(T.id) || c.set(T.id, /* @__PURE__ */ new Set()), c.get(T.id).add(m));
179
+ d && (c.has(w.id) || c.set(w.id, /* @__PURE__ */ new Set()), c.get(w.id).add(d));
180
180
  }
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));
181
+ const y = new Set(i), a = (p) => {
182
+ const w = c.get(p);
183
+ if (w)
184
+ for (const d of w)
185
+ y.has(d) || (y.add(d), a(d));
186
186
  };
187
- return i.forEach((d) => {
188
- a(d);
189
- }), t.filter((d) => y.has(d.id));
187
+ return i.forEach((p) => {
188
+ a(p);
189
+ }), t.filter((p) => y.has(p.id));
190
190
  }
191
- const $e = ae({
191
+ const tt = ce({
192
192
  name: "ConnectionCreator",
193
193
  props: {
194
194
  visible: {
@@ -207,7 +207,7 @@ const $e = ae({
207
207
  }
208
208
  },
209
209
  setup(t, { emit: e }) {
210
- const o = S({
210
+ const o = C({
211
211
  name: "",
212
212
  type: "duckdb",
213
213
  options: {
@@ -219,7 +219,7 @@ const $e = ae({
219
219
  privateKey: "",
220
220
  saveCredential: !1
221
221
  }
222
- }), i = Y("connectionStore"), c = Y("saveConnections"), y = Y("saveAll");
222
+ }), i = _("connectionStore"), c = _("saveConnections"), y = _("saveAll");
223
223
  if (!i || !c || !y)
224
224
  throw new Error("must inject connectionStore to ConnectionCreator");
225
225
  const a = i.connections;
@@ -246,40 +246,42 @@ const $e = ae({
246
246
  }
247
247
  };
248
248
  }
249
- }), et = {
249
+ }), nt = {
250
250
  key: 0,
251
251
  class: "creator-container"
252
- }, tt = { class: "form-row" }, nt = { class: "form-row" }, ot = {
252
+ }, ot = { class: "form-row" }, it = { class: "form-row" }, at = {
253
253
  key: 0,
254
254
  class: "form-row"
255
- }, it = {
255
+ }, st = {
256
256
  key: 1,
257
257
  class: "form-row"
258
- }, at = {
258
+ }, rt = {
259
259
  key: 2,
260
260
  class: "form-row"
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, [
261
+ }, lt = { class: "form-row" }, ct = { class: "form-row" }, ut = { class: "form-row" }, dt = { class: "button-row" };
262
+ function pt(t, e, o, i, c, y) {
263
+ return t.visible ? (l(), u("div", nt, [
264
264
  s("form", {
265
- onSubmit: e[11] || (e[11] = k((...a) => t.submitConnectionCreation && t.submitConnectionCreation(...a), ["prevent"]))
265
+ onSubmit: e[11] || (e[11] = R((...a) => t.submitConnectionCreation && t.submitConnectionCreation(...a), ["prevent"]))
266
266
  }, [
267
- s("div", tt, [
267
+ s("div", ot, [
268
268
  e[12] || (e[12] = s("label", { for: "connection-name" }, "Name", -1)),
269
- N(s("input", {
269
+ D(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),
273
+ class: "sidebar-control-input",
273
274
  id: "connection-name",
274
275
  required: ""
275
276
  }, null, 512), [
276
- [G, t.connectionDetails.name]
277
+ [B, t.connectionDetails.name]
277
278
  ])
278
279
  ]),
279
- s("div", nt, [
280
+ s("div", it, [
280
281
  e[14] || (e[14] = s("label", { for: "connection-type" }, "Type", -1)),
281
- N(s("select", {
282
+ D(s("select", {
282
283
  "onUpdate:modelValue": e[1] || (e[1] = (a) => t.connectionDetails.type = a),
284
+ class: "sidebar-control-select",
283
285
  id: "connection-type",
284
286
  required: ""
285
287
  }, [...e[13] || (e[13] = [
@@ -287,98 +289,105 @@ function ut(t, e, o, i, c, y) {
287
289
  s("option", { value: "bigquery" }, "Bigquery Oauth", -1),
288
290
  s("option", { value: "snowflake" }, "Snowflake", -1)
289
291
  ])], 512), [
290
- [Ee, t.connectionDetails.type]
292
+ [Ce, t.connectionDetails.type]
291
293
  ])
292
294
  ]),
293
- t.connectionDetails.type === "motherduck" ? (r(), l("div", ot, [
295
+ t.connectionDetails.type === "motherduck" ? (l(), u("div", at, [
294
296
  e[15] || (e[15] = s("label", { for: "md-token" }, "MotherDuck Token", -1)),
295
- N(s("input", {
297
+ D(s("input", {
296
298
  type: "password",
297
299
  "onUpdate:modelValue": e[2] || (e[2] = (a) => t.connectionDetails.options.mdToken = a),
300
+ class: "sidebar-control-input",
298
301
  id: "md-token",
299
302
  placeholder: "MotherDuck Token",
300
303
  required: ""
301
304
  }, null, 512), [
302
- [G, t.connectionDetails.options.mdToken]
305
+ [B, t.connectionDetails.options.mdToken]
303
306
  ]),
304
307
  e[16] || (e[16] = s("label", { for: "save-credential" }, "Save Credential?", -1)),
305
- N(s("input", {
308
+ D(s("input", {
306
309
  type: "checkbox",
307
310
  id: "save-credential",
308
311
  "onUpdate:modelValue": e[3] || (e[3] = (a) => t.connectionDetails.options.saveCredential = a),
309
312
  label: "Save Credential?"
310
313
  }, null, 512), [
311
- [Pe, t.connectionDetails.options.saveCredential]
314
+ [Me, t.connectionDetails.options.saveCredential]
312
315
  ])
313
- ])) : A("", !0),
314
- t.connectionDetails.type === "bigquery" ? (r(), l("div", it, [
316
+ ])) : M("", !0),
317
+ t.connectionDetails.type === "bigquery" ? (l(), u("div", st, [
315
318
  e[17] || (e[17] = s("label", { for: "project-id" }, "BigQuery Project ID", -1)),
316
- N(s("input", {
319
+ D(s("input", {
317
320
  type: "text",
318
321
  "onUpdate:modelValue": e[4] || (e[4] = (a) => t.connectionDetails.options.projectId = a),
322
+ class: "sidebar-control-input",
319
323
  id: "project-id",
320
324
  placeholder: "Billing Project ID",
321
325
  required: ""
322
326
  }, null, 512), [
323
- [G, t.connectionDetails.options.projectId]
327
+ [B, t.connectionDetails.options.projectId]
324
328
  ])
325
- ])) : A("", !0),
326
- t.connectionDetails.type === "sqlserver" ? (r(), l("div", at, [
329
+ ])) : M("", !0),
330
+ t.connectionDetails.type === "sqlserver" ? (l(), u("div", rt, [
327
331
  e[18] || (e[18] = s("label", { for: "username" }, "Username", -1)),
328
- N(s("input", {
332
+ D(s("input", {
329
333
  type: "text",
330
334
  "onUpdate:modelValue": e[5] || (e[5] = (a) => t.connectionDetails.options.username = a),
335
+ class: "sidebar-control-input",
331
336
  id: "username",
332
337
  required: ""
333
338
  }, null, 512), [
334
- [G, t.connectionDetails.options.username]
339
+ [B, t.connectionDetails.options.username]
335
340
  ]),
336
341
  e[19] || (e[19] = s("label", { for: "password" }, "Password", -1)),
337
- N(s("input", {
342
+ D(s("input", {
338
343
  type: "password",
339
344
  "onUpdate:modelValue": e[6] || (e[6] = (a) => t.connectionDetails.options.password = a),
345
+ class: "sidebar-control-input",
340
346
  id: "username",
341
347
  required: ""
342
348
  }, null, 512), [
343
- [G, t.connectionDetails.options.password]
349
+ [B, t.connectionDetails.options.password]
344
350
  ])
345
- ])) : A("", !0),
346
- t.connectionDetails.type === "snowflake" ? (r(), l(le, { key: 3 }, [
347
- s("div", st, [
351
+ ])) : M("", !0),
352
+ t.connectionDetails.type === "snowflake" ? (l(), u(pe, { key: 3 }, [
353
+ s("div", lt, [
348
354
  e[20] || (e[20] = s("label", { for: "account" }, "Account", -1)),
349
- N(s("input", {
355
+ D(s("input", {
350
356
  type: "text",
351
357
  "onUpdate:modelValue": e[7] || (e[7] = (a) => t.connectionDetails.options.account = a),
358
+ class: "sidebar-control-input",
352
359
  id: "account",
353
360
  required: ""
354
361
  }, null, 512), [
355
- [G, t.connectionDetails.options.account]
362
+ [B, t.connectionDetails.options.account]
356
363
  ])
357
364
  ]),
358
- s("div", rt, [
365
+ s("div", ct, [
359
366
  e[21] || (e[21] = s("label", { for: "username" }, "Username", -1)),
360
- N(s("input", {
367
+ D(s("input", {
361
368
  type: "text",
362
369
  "onUpdate:modelValue": e[8] || (e[8] = (a) => t.connectionDetails.options.username = a),
370
+ class: "sidebar-control-input",
363
371
  id: "username",
364
372
  required: ""
365
373
  }, null, 512), [
366
- [G, t.connectionDetails.options.username]
374
+ [B, t.connectionDetails.options.username]
367
375
  ])
368
376
  ]),
369
- s("div", lt, [
377
+ s("div", ut, [
370
378
  e[22] || (e[22] = s("label", { for: "privateKey" }, "Private Key", -1)),
371
- N(s("input", {
379
+ D(s("input", {
372
380
  type: "password",
373
381
  "onUpdate:modelValue": e[9] || (e[9] = (a) => t.connectionDetails.options.privateKey = a),
382
+ class: "sidebar-control-input",
374
383
  id: "privateKey",
375
384
  required: ""
376
385
  }, null, 512), [
377
- [G, t.connectionDetails.options.privateKey]
386
+ [B, t.connectionDetails.options.privateKey]
378
387
  ])
379
388
  ])
380
- ], 64)) : A("", !0),
381
- s("div", ct, [
389
+ ], 64)) : M("", !0),
390
+ s("div", dt, [
382
391
  e[23] || (e[23] = s("button", {
383
392
  "data-testid": "connection-creator-submit",
384
393
  type: "submit"
@@ -389,46 +398,47 @@ function ut(t, e, o, i, c, y) {
389
398
  }, "Cancel")
390
399
  ])
391
400
  ], 32)
392
- ])) : A("", !0);
401
+ ])) : M("", !0);
393
402
  }
394
- const dt = /* @__PURE__ */ z($e, [["render", ut], ["__scopeId", "data-v-bd6e19a1"]]), pt = "data:image/png;base64,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", mt = {
403
+ const mt = /* @__PURE__ */ Z(tt, [["render", pt], ["__scopeId", "data-v-891a9edb"]]), ht = "data:image/png;base64,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", yt = {
395
404
  key: 0,
396
405
  class: "mdi mdi-duck"
397
- }, ht = ["src"], yt = {
406
+ }, gt = ["src"], ft = {
398
407
  key: 2,
399
408
  class: "mdi mdi-google"
400
- }, ft = {
409
+ }, wt = {
401
410
  key: 3,
402
411
  class: "mdi mdi-google"
403
- }, gt = {
412
+ }, bt = {
404
413
  key: 4,
405
414
  class: "mdi mdi-database"
406
- }, wt = /* @__PURE__ */ ae({
415
+ }, Tt = /* @__PURE__ */ ce({
407
416
  __name: "ConnectionIcon",
408
417
  props: {
409
418
  connectionType: {}
410
419
  },
411
420
  setup(t) {
412
- const e = t, o = J(() => ({
421
+ const e = t, o = z(() => ({
413
422
  duckdb: "DuckDB",
414
423
  motherduck: "MotherDuck",
415
424
  "bigquery-oauth": "BigQuery",
416
425
  snowflake: "Snowflake",
426
+ remote: "Remote Project",
417
427
  default: "Database Connection"
418
428
  })[e.connectionType || "default"] || e.connectionType || "");
419
- return (i, c) => (r(), W(Se, { content: o.value }, {
429
+ return (i, c) => (l(), W(Ae, { content: o.value }, {
420
430
  default: q(() => [
421
- t.connectionType === "duckdb" ? (r(), l("i", mt)) : t.connectionType === "motherduck" ? (r(), l("img", {
431
+ t.connectionType === "duckdb" ? (l(), u("i", yt)) : t.connectionType === "motherduck" ? (l(), u("img", {
422
432
  key: 1,
423
- src: xe(pt),
433
+ src: Ke(ht),
424
434
  class: "motherduck-icon",
425
435
  alt: "MotherDuck"
426
- }, null, 8, ht)) : t.connectionType === "bigquery-oauth" ? (r(), l("i", yt)) : t.connectionType === "bigquery" ? (r(), l("i", ft)) : (r(), l("i", gt))
436
+ }, null, 8, gt)) : t.connectionType === "bigquery-oauth" ? (l(), u("i", ft)) : t.connectionType === "bigquery" ? (l(), u("i", wt)) : (l(), u("i", bt))
427
437
  ]),
428
438
  _: 1
429
439
  }, 8, ["content"]));
430
440
  }
431
- }), Tt = /* @__PURE__ */ z(wt, [["__scopeId", "data-v-8b4a0eaf"]]), bt = /* @__PURE__ */ ae({
441
+ }), vt = /* @__PURE__ */ Z(Tt, [["__scopeId", "data-v-d7a85282"]]), Et = "sidebar-icon-button", St = /* @__PURE__ */ ce({
432
442
  __name: "ConnectionRefresh",
433
443
  props: {
434
444
  connection: {},
@@ -439,24 +449,26 @@ const dt = /* @__PURE__ */ z($e, [["render", ut], ["__scopeId", "data-v-bd6e19a1
439
449
  setup(t, { emit: e }) {
440
450
  const o = t, i = e;
441
451
  let c;
442
- if (o.type === "llm" ? c = Y("llmConnectionStore") : c = Y("connectionStore"), !c)
452
+ if (o.type === "llm" ? c = _("llmConnectionStore") : c = _("connectionStore"), !c)
443
453
  throw new Error("Connection store is not provided!");
444
- const y = J(
445
- () => o.connection.connected ? "mdi mdi-refresh" : "mdi mdi-connection"
446
- ), a = async () => {
454
+ const y = z(
455
+ () => o.connection.connected ? "mdi mdi-refresh" : "mdi mdi-power-plug-outline"
456
+ ), a = z(
457
+ () => o.connection.connected ? `refresh-connection-${o.connection.name}` : `connect-connection-${o.connection.name}`
458
+ ), p = async () => {
447
459
  try {
448
460
  await c.resetConnection(o.connection.name), i("refresh", o.connection.name);
449
- } catch (d) {
450
- throw console.error("Refresh failed:", d), d;
461
+ } catch (w) {
462
+ throw console.error("Refresh failed:", w), w;
451
463
  }
452
464
  };
453
- return (d, T) => (r(), W(Ce, {
454
- class: "refresh-button",
455
- action: a,
456
- "data-testid": `refresh-connection-${t.connection.name}`,
465
+ return (w, d) => (l(), W(Re, {
466
+ class: me(["refresh-button", Et]),
467
+ action: p,
468
+ "data-testid": a.value,
457
469
  useDefaultStyle: !1,
458
- testId: `refresh-connection-${t.connection.name}`,
459
- onClick: T[0] || (T[0] = k(() => {
470
+ testId: a.value,
471
+ onClick: d[0] || (d[0] = R(() => {
460
472
  }, ["stop"]))
461
473
  }, {
462
474
  default: q(() => [
@@ -467,7 +479,7 @@ const dt = /* @__PURE__ */ z($e, [["render", ut], ["__scopeId", "data-v-bd6e19a1
467
479
  _: 1
468
480
  }, 8, ["data-testid", "testId"]));
469
481
  }
470
- }), Ue = /* @__PURE__ */ z(bt, [["__scopeId", "data-v-a2ead502"]]), vt = ae({
482
+ }), Ct = /* @__PURE__ */ Z(St, [["__scopeId", "data-v-11056d75"]]), kt = ce({
471
483
  name: "FileUpload",
472
484
  props: {
473
485
  connection: {
@@ -476,31 +488,34 @@ const dt = /* @__PURE__ */ z($e, [["render", ut], ["__scopeId", "data-v-bd6e19a1
476
488
  }
477
489
  },
478
490
  setup(t) {
479
- const e = S(!1), o = S(!1), i = S("Processing file..."), c = S(""), y = S(null), a = () => {
491
+ const e = C(!1), o = C(!1), i = C("Processing file..."), c = C(""), y = C(null), a = () => {
480
492
  e.value = !0;
481
- }, d = () => {
493
+ }, p = () => {
482
494
  e.value = !1;
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");
495
+ }, w = async (A) => {
496
+ const m = A.target;
497
+ m.files && m.files.length > 0 && await N(m.files[0]);
498
+ }, d = () => {
499
+ var A;
500
+ (A = y.value) == null || A.click();
501
+ }, S = async (A) => {
502
+ var m;
503
+ if (e.value = !1, (m = A.dataTransfer) != null && m.files && A.dataTransfer.files.length > 0) {
504
+ const Q = A.dataTransfer.files[0];
505
+ f(Q) ? await N(Q) : alert("Please drop a CSV, Parquet, or DuckDB file");
491
506
  }
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) => {
507
+ }, f = (A) => A.type === "text/csv" || A.name.endsWith(".csv") || A.type === "application/octet-stream" || A.name.endsWith(".parquet") || A.name.endsWith(".db"), N = async (A) => {
493
508
  try {
494
- o.value = !0, i.value = `Processing ${g.name}...`;
495
- const h = await t.connection.importFile(g, (F) => {
496
- i.value = F;
509
+ o.value = !0, i.value = `Processing ${A.name}...`;
510
+ const m = await t.connection.importFile(A, (Q) => {
511
+ i.value = Q;
497
512
  });
498
- h.type === "database" ? c.value = `Successfully attached database ${h.name}` : c.value = `Successfully imported ${h.name}`, o.value = !1, setTimeout(() => {
513
+ m.type === "database" ? c.value = `Successfully attached database ${m.name}` : c.value = `Successfully imported ${m.name}`, o.value = !1, setTimeout(() => {
499
514
  c.value = "";
500
515
  }, 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"}`
516
+ } catch (m) {
517
+ o.value = !1, console.error(`Error processing ${A.name}:`, m), alert(
518
+ `Error processing ${A.name}: ${m instanceof Error ? m.message : "Unknown error"}`
504
519
  );
505
520
  }
506
521
  };
@@ -510,129 +525,118 @@ const dt = /* @__PURE__ */ z($e, [["render", ut], ["__scopeId", "data-v-bd6e19a1
510
525
  loadingMessage: i,
511
526
  successMessage: c,
512
527
  fileInput: y,
528
+ openFilePicker: d,
513
529
  handleDragOver: a,
514
- handleDragLeave: d,
515
- handleDrop: m,
516
- handleFileInput: T
530
+ handleDragLeave: p,
531
+ handleDrop: S,
532
+ handleFileInput: w
517
533
  };
518
534
  }
519
- }), Et = { class: "upload-area" }, St = {
520
- key: 0,
521
- class: "success-message"
522
- }, Ct = { key: 1 }, kt = { class: "truncate-text" }, At = { class: "file-input-label" }, It = {
523
- key: 2,
524
- class: "loading-container"
525
- };
526
- function Pt(t, e, o, i, c, y) {
527
- return r(), l("div", {
528
- class: me(["file-upload-container", { "drag-active": t.isDragging }]),
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"]))
535
+ }), At = ["data-testid"], It = ["data-testid"], Pt = { class: "upload-copy truncate-text" }, Rt = {
536
+ key: 1,
537
+ class: "upload-row"
538
+ }, Mt = ["data-testid"], Lt = { class: "upload-copy truncate-text" };
539
+ function Dt(t, e, o, i, c, y) {
540
+ return l(), u("button", {
541
+ type: "button",
542
+ class: me(["file-upload-container", { "drag-active": t.isDragging, loading: t.isLoading }]),
543
+ "data-testid": `duckdb-importer-${t.connection.name}`,
544
+ onClick: e[1] || (e[1] = (...a) => t.openFilePicker && t.openFilePicker(...a)),
545
+ onDragover: e[2] || (e[2] = R((...a) => t.handleDragOver && t.handleDragOver(...a), ["prevent"])),
546
+ onDragleave: e[3] || (e[3] = R((...a) => t.handleDragLeave && t.handleDragLeave(...a), ["prevent"])),
547
+ onDrop: e[4] || (e[4] = R((...a) => t.handleDrop && t.handleDrop(...a), ["prevent"]))
532
548
  }, [
533
- s("div", Et, [
534
- t.successMessage && !t.isLoading ? (r(), l("div", St, [
535
- s("span", null, j(t.successMessage), 1)
536
- ])) : t.isLoading ? (r(), l("div", It, [
537
- e[7] || (e[7] = s("span", { class: "spinner" }, null, -1)),
538
- s("span", null, j(t.loadingMessage), 1)
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
- s("input", {
545
- type: "file",
546
- accept: ".csv,.parquet,.db",
547
- onChange: e[0] || (e[0] = (...a) => t.handleFileInput && t.handleFileInput(...a)),
548
- ref: "fileInput",
549
- class: "hidden-input"
550
- }, null, 544)
551
- ]),
552
- e[6] || (e[6] = ie(" CSV/Parquet or DuckDB DB ", -1))
553
- ])
554
- ]))
555
- ])
556
- ], 34);
549
+ s("input", {
550
+ type: "file",
551
+ accept: ".csv,.parquet,.db",
552
+ onChange: e[0] || (e[0] = (...a) => t.handleFileInput && t.handleFileInput(...a)),
553
+ ref: "fileInput",
554
+ class: "hidden-input"
555
+ }, null, 544),
556
+ t.successMessage && !t.isLoading ? (l(), u("div", {
557
+ key: 0,
558
+ class: "upload-row upload-success",
559
+ "data-testid": `duckdb-import-success-${t.connection.name}`
560
+ }, [
561
+ e[5] || (e[5] = s("i", { class: "mdi mdi-check-circle-outline upload-icon" }, null, -1)),
562
+ s("span", Pt, F(t.successMessage), 1)
563
+ ], 8, It)) : t.isLoading ? (l(), u("div", {
564
+ key: 2,
565
+ class: "upload-row loading-container",
566
+ "data-testid": `duckdb-import-loading-${t.connection.name}`
567
+ }, [
568
+ e[7] || (e[7] = s("span", { class: "spinner" }, null, -1)),
569
+ s("span", Lt, F(t.loadingMessage), 1)
570
+ ], 8, Mt)) : (l(), u("div", Rt, [...e[6] || (e[6] = [
571
+ s("i", { class: "mdi mdi-plus upload-icon" }, null, -1),
572
+ s("span", { class: "upload-copy" }, [
573
+ s("span", { class: "upload-label" }, "Import data..."),
574
+ s("span", { class: "upload-subtitle" }, "CSV, Parquet, DuckDB")
575
+ ], -1)
576
+ ])]))
577
+ ], 42, At);
557
578
  }
558
- const Rt = /* @__PURE__ */ z(vt, [["render", Pt], ["__scopeId", "data-v-d7832089"]]), Mt = { class: "model-anchor" }, Lt = {
579
+ const _t = /* @__PURE__ */ Z(kt, [["render", Dt], ["__scopeId", "data-v-daeb30e9"]]), Nt = { class: "model-anchor" }, qt = { class: "model-trigger-text truncate-text" }, Ut = {
559
580
  key: 0,
560
581
  class: "model-form"
561
- }, Dt = ["value"], _t = /* @__PURE__ */ ae({
582
+ }, Ot = ["onClick"], xt = /* @__PURE__ */ ce({
562
583
  __name: "ModelSelector",
563
584
  props: {
564
585
  connection: {}
565
586
  },
566
587
  setup(t) {
567
- const e = t, o = Y("modelStore"), i = Y("connectionStore"), c = Y("saveConnections", () => {
568
- }), y = S(!1), a = S(e.connection.model || ""), d = J(() => o ? Object.keys(o.models) : []), T = () => {
588
+ const e = t, o = _("modelStore"), i = _("connectionStore"), c = _("saveConnections", () => {
589
+ }), y = C(!1), a = z(() => o ? Object.keys(o.models) : []), p = () => {
569
590
  y.value = !y.value;
570
- }, m = () => {
571
- y.value = !1;
572
- }, R = async () => {
573
- if (a.value && i) {
574
- let P = a.value;
575
- P === "~new-model" && (P = e.connection.name, await (o == null ? void 0 : o.addModelConfig(
576
- new Ke({
577
- name: e.connection.name,
578
- sources: [],
579
- storage: "local",
580
- description: ""
581
- })
582
- ))), i.connections[e.connection.name].model = P;
583
- }
584
- c(), y.value = !1;
591
+ }, w = async (d) => {
592
+ if (!i)
593
+ return;
594
+ let S = d;
595
+ S === "~new-model" && (S = e.connection.name, await (o == null ? void 0 : o.addModelConfig(
596
+ new Ve({
597
+ name: e.connection.name,
598
+ sources: [],
599
+ storage: "local",
600
+ description: ""
601
+ })
602
+ ))), i.connections[e.connection.name].model = S, await c(), y.value = !1;
585
603
  };
586
- return (P, g) => (r(), l("div", Mt, [
604
+ return (d, S) => (l(), u("div", Nt, [
587
605
  s("button", {
588
- class: "button truncate-text",
589
- onClick: T
590
- }, j(t.connection.model || "Set Model"), 1),
591
- y.value ? (r(), l("div", Lt, [
592
- s("form", {
593
- onSubmit: k(R, ["prevent"])
594
- }, [
595
- N(s("select", {
596
- "onUpdate:modelValue": g[0] || (g[0] = (h) => a.value = h),
597
- class: "model-select",
598
- required: ""
599
- }, [
600
- (r(!0), l(le, null, fe(d.value, (h) => (r(), l("option", {
601
- key: h,
602
- value: h,
603
- class: "model-select-item"
604
- }, j(h), 9, Dt))), 128)),
605
- g[1] || (g[1] = s("option", {
606
- key: "~new-model",
607
- value: "~new-model",
608
- class: "model-select-item"
609
- }, " Create New Model ", -1))
610
- ], 512), [
611
- [Ee, a.value]
612
- ]),
613
- s("div", { class: "model-form-actions" }, [
614
- g[2] || (g[2] = s("button", { type: "submit" }, "Submit", -1)),
615
- s("button", {
616
- type: "button",
617
- onClick: m
618
- }, "Close")
619
- ])
620
- ], 32)
621
- ])) : A("", !0)
606
+ class: "model-trigger truncate-text",
607
+ type: "button",
608
+ onClick: p
609
+ }, [
610
+ s("span", qt, F(t.connection.model || "Set model"), 1),
611
+ S[1] || (S[1] = s("i", { class: "mdi mdi-chevron-down model-trigger-icon" }, null, -1))
612
+ ]),
613
+ y.value ? (l(), u("div", Ut, [
614
+ (l(!0), u(pe, null, we(a.value, (f) => (l(), u("button", {
615
+ key: f,
616
+ type: "button",
617
+ class: me(["model-option", { active: f === t.connection.model }]),
618
+ onClick: (N) => w(f)
619
+ }, F(f), 11, Ot))), 128)),
620
+ s("button", {
621
+ type: "button",
622
+ class: "model-option",
623
+ onClick: S[0] || (S[0] = (f) => w("~new-model"))
624
+ }, " Create New Model ")
625
+ ])) : M("", !0)
622
626
  ]));
623
627
  }
624
- }), Nt = /* @__PURE__ */ z(_t, [["__scopeId", "data-v-11ffb5f2"]]), qt = {
628
+ }), Bt = /* @__PURE__ */ Z(xt, [["__scopeId", "data-v-fb7779b2"]]), Ft = {
625
629
  name: "ConnectionListItem",
626
630
  components: {
627
- SidebarItem: Me,
628
- ConnectionIcon: Tt,
629
- ConnectionRefresh: Ue,
630
- ConnectionStatusIcon: Re,
631
- EditorCreatorIcon: Ve,
632
- CreateEditorFromDatasourcePopup: Qe,
633
- DuckDBImporter: Rt,
634
- ModelSelector: Nt,
635
- Tooltip: Se
631
+ SidebarItem: Ne,
632
+ ConnectionIcon: vt,
633
+ ConnectionStatusIcon: _e,
634
+ ConnectionRefresh: Ct,
635
+ CreateEditorFromDatasourcePopup: He,
636
+ DuckDBImporter: _t,
637
+ ModelSelector: Bt,
638
+ Tooltip: Ae,
639
+ SidebarOverflowMenu: De
636
640
  },
637
641
  props: {
638
642
  item: {
@@ -667,12 +671,15 @@ const Rt = /* @__PURE__ */ z(vt, [["render", Pt], ["__scopeId", "data-v-d7832089
667
671
  "toggleMobileMenu"
668
672
  ],
669
673
  setup(t, { emit: e }) {
670
- var re, V, ge;
671
- const o = Y("isMobile", !1), i = J(
674
+ var ae, ee, se;
675
+ const o = _("isMobile", !1), i = _("editorStore"), c = _("saveEditors"), y = _("setActiveScreen"), a = _("setActiveEditor");
676
+ if (!i || !c || !y || !a)
677
+ throw new Error("Editor store is not provided!");
678
+ const p = z(
672
679
  () => ["connection", "database", "schema"].includes(t.item.type)
673
- ), c = J(
680
+ ), w = z(
674
681
  () => ["connection", "database", "schema", "table", "schema"].includes(t.item.type)
675
- ), y = () => [
682
+ ), d = () => [
676
683
  "refresh-connection",
677
684
  "refresh-database",
678
685
  "refresh-schema",
@@ -685,140 +692,192 @@ const Rt = /* @__PURE__ */ z(vt, [["render", Pt], ["__scopeId", "data-v-d7832089
685
692
  "snowflake-account",
686
693
  "snowflake-username",
687
694
  "toggle-save-credential"
688
- ].includes(t.item.type) ? "" : t.item.name, a = () => {
689
- var M;
690
- c.value && e("click", t.item.id, ((M = t.item.connection) == null ? void 0 : M.name) || "", t.item.type);
691
- }, d = () => {
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
+ ].includes(t.item.type) ? "" : t.item.name, S = () => {
696
+ var E;
697
+ w.value && e("click", t.item.id, ((E = t.item.connection) == null ? void 0 : E.name) || "", t.item.type);
698
+ }, f = () => {
699
+ var E;
700
+ w.value && e("toggle", t.item.id, ((E = t.item.connection) == null ? void 0 : E.name) || "", t.item.type);
701
+ }, N = () => {
695
702
  e("toggleMobileMenu");
703
+ }, A = async (E) => {
704
+ try {
705
+ const ye = `new-editor-${Date.now()}`, Se = t.item.connection, Be = Se.storage === "remote", Fe = i.newEditor(
706
+ ye,
707
+ E === "trilogy" ? "preql" : "sql",
708
+ t.item.connection.name,
709
+ void 0,
710
+ Be ? {
711
+ storage: "remote",
712
+ remoteStoreId: Se.remoteStoreId || null,
713
+ remotePath: ye
714
+ } : void 0
715
+ );
716
+ await c(), a(Fe.id), y("editors");
717
+ } catch (re) {
718
+ console.error("Failed to create new editor:", re);
719
+ }
696
720
  }, 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");
702
- }, P = () => {
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(
721
+ var E, re;
722
+ e("refresh", (E = t.item.connection) == null ? void 0 : E.name, ((re = t.item.connection) == null ? void 0 : re.name) || "", "connection");
723
+ }, Q = () => {
724
+ var E;
725
+ e("refresh", t.item.id, ((E = t.item.connection) == null ? void 0 : E.name) || "", "database");
726
+ }, ue = () => {
727
+ var E;
728
+ e("refresh", t.item.id, ((E = t.item.connection) == null ? void 0 : E.name) || "", "schema");
729
+ }, le = (E) => {
730
+ e("deleteConnection", E);
731
+ }, g = z(() => {
732
+ if (t.item.type !== "connection")
733
+ return [];
734
+ const E = [];
735
+ return o && E.push({ id: "query-history", label: "Query history", icon: "mdi-history" }), E.push(
736
+ { id: "new-sql", label: "New SQL editor", icon: "mdi-file-document-plus-outline" },
737
+ {
738
+ id: "new-trilogy",
739
+ label: "New Trilogy editor",
740
+ icon: "mdi-file-document-plus-outline"
741
+ },
742
+ { id: "refresh", label: "Refresh connection", icon: "mdi-refresh" },
743
+ { id: "delete-separator", kind: "separator" },
744
+ { id: "delete", label: "Delete connection", icon: "mdi-trash-can-outline", danger: !0 }
745
+ ), E;
746
+ }), P = (E) => {
747
+ switch (E.id) {
748
+ case "query-history":
749
+ N();
750
+ break;
751
+ case "new-sql":
752
+ A("sql");
753
+ break;
754
+ case "new-trilogy":
755
+ A("trilogy");
756
+ break;
757
+ case "refresh":
758
+ m();
759
+ break;
760
+ case "delete":
761
+ le(t.item.connection);
762
+ break;
763
+ }
764
+ }, v = C(
708
765
  t.item.connection.projectId || ""
709
- ), F = S(
766
+ ), b = C(
710
767
  t.item.connection.browsingProjectId || ""
711
- ), w = S(t.item.connection.mdToken || ""), ce = S(
712
- ((re = t.item.connection.config) == null ? void 0 : re.privateKey) || ""
713
- ), ue = S(
714
- ((V = t.item.connection.config) == null ? void 0 : V.account) || ""
715
- ), f = S(
716
- ((ge = t.item.connection.config) == null ? void 0 : ge.username) || ""
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;
768
+ ), k = C(t.item.connection.mdToken || ""), ne = C(
769
+ ((ae = t.item.connection.config) == null ? void 0 : ae.privateKey) || ""
770
+ ), X = C(
771
+ ((ee = t.item.connection.config) == null ? void 0 : ee.account) || ""
772
+ ), V = C(
773
+ ((se = t.item.connection.config) == null ? void 0 : se.username) || ""
774
+ ), J = C(!1), h = C(!1), r = C(!1), T = C(!1), U = C(!1), K = (E) => {
775
+ E.value = !0, setTimeout(() => {
776
+ E.value = !1;
720
777
  }, 1500);
721
- }, K = (M, oe) => {
722
- let we;
723
- return (...de) => {
724
- clearTimeout(we), we = setTimeout(() => M(...de), oe);
778
+ }, Y = (E, re) => {
779
+ let ye;
780
+ return (...Se) => {
781
+ clearTimeout(ye), ye = setTimeout(() => E(...Se), re);
725
782
  };
726
- }, p = () => {
727
- e("updateBigqueryProject", t.item.connection, h.value), Q(C);
728
- }, D = () => {
729
- e("updateBigqueryBrowsingProject", t.item.connection, F.value), Q(v);
730
- }, u = () => {
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
- D,
783
+ }, $ = () => {
784
+ e("updateBigqueryProject", t.item.connection, v.value), K(J);
785
+ }, oe = () => {
786
+ e("updateBigqueryBrowsingProject", t.item.connection, b.value), K(h);
787
+ }, O = () => {
788
+ e("updateSnowflakePrivateKey", t.item.connection, ne.value), K(r);
789
+ }, j = () => {
790
+ e("updateSnowflakeAccount", t.item.connection, X.value), K(T);
791
+ }, ie = () => {
792
+ e("updateSnowflakeUsername", t.item.connection, V.value), K(U);
793
+ }, de = Y($, 500), H = Y(
794
+ oe,
738
795
  500
739
- ), $ = K(u, 500), ne = K(E, 500), B = K(x, 500);
796
+ ), Te = Y(O, 500), ve = Y(j, 500), Ee = Y(ie, 500);
740
797
  return {
741
798
  isMobile: o,
742
- isExpandable: i,
743
- getItemName: y,
744
- handleItemClick: a,
745
- handleToggle: d,
746
- toggleMobileMenu: T,
799
+ isExpandable: p,
800
+ getItemName: d,
801
+ handleItemClick: S,
802
+ handleToggle: f,
803
+ toggleMobileMenu: N,
747
804
  handleRefreshConnectionClick: m,
748
- handleRefreshDatabaseClick: R,
749
- handleRefreshSchemaClick: P,
750
- deleteConnection: g,
805
+ handleRefreshDatabaseClick: Q,
806
+ handleRefreshSchemaClick: ue,
807
+ deleteConnection: le,
808
+ contextMenuItems: g,
809
+ handleContextMenuItemClick: P,
751
810
  // Config variables
752
- bigqueryProject: h,
753
- bigqueryBrowsingProject: F,
754
- mdToken: w,
755
- snowflakePrivateKey: ce,
756
- snowflakeAccount: ue,
757
- snowflakeUsername: f,
811
+ bigqueryProject: v,
812
+ bigqueryBrowsingProject: b,
813
+ mdToken: k,
814
+ snowflakePrivateKey: ne,
815
+ snowflakeAccount: X,
816
+ snowflakeUsername: V,
758
817
  // Success indicators
759
- showBillingSuccess: C,
760
- showBrowsingSuccess: v,
761
- showPrivateKeySuccess: b,
762
- showAccountSuccess: I,
763
- showUsernameSuccess: te,
818
+ showBillingSuccess: J,
819
+ showBrowsingSuccess: h,
820
+ showPrivateKeySuccess: r,
821
+ showAccountSuccess: T,
822
+ showUsernameSuccess: U,
764
823
  // Update functions
765
- debouncedUpdateBigqueryProject: Z,
766
- debouncedUpdateBigqueryBrowsingProject: X,
767
- debouncedUpdateSnowflakePrivateKey: $,
768
- debouncedUpdateSnowflakeAccount: ne,
769
- debouncedUpdateSnowflakeUsername: B,
770
- updateMotherDuckToken: (M, oe) => {
771
- e("updateMotherDuckToken", M, oe);
824
+ debouncedUpdateBigqueryProject: de,
825
+ debouncedUpdateBigqueryBrowsingProject: H,
826
+ debouncedUpdateSnowflakePrivateKey: Te,
827
+ debouncedUpdateSnowflakeAccount: ve,
828
+ debouncedUpdateSnowflakeUsername: Ee,
829
+ updateMotherDuckToken: (E, re) => {
830
+ e("updateMotherDuckToken", E, re);
772
831
  },
773
- toggleSaveCredential: (M) => {
774
- e("toggleSaveCredential", M);
832
+ toggleSaveCredential: (E) => {
833
+ e("toggleSaveCredential", E);
775
834
  }
776
835
  };
777
836
  }
778
- }, Ut = {
837
+ }, Yt = {
779
838
  key: 1,
780
839
  class: "mdi mdi-database node-icon"
781
- }, Ot = {
840
+ }, Gt = {
782
841
  key: 2,
783
842
  class: "mdi mdi-folder-outline node-icon"
784
- }, Bt = {
843
+ }, Kt = {
785
844
  key: 3,
786
845
  class: "mdi mdi-table node-icon"
787
- }, xt = {
846
+ }, jt = {
788
847
  key: 4,
789
848
  class: "mdi mdi-alert-circle node-icon"
790
- }, Yt = {
849
+ }, Qt = {
791
850
  key: 5,
792
851
  class: "mdi mdi-loading mdi-spin node-icon"
793
- }, Ft = {
852
+ }, Vt = {
794
853
  key: 6,
795
854
  class: "mdi mdi-table-column node-icon"
796
- }, Gt = {
855
+ }, Ht = {
797
856
  key: 0,
798
857
  class: "mdi mdi-check-circle success-icon"
799
- }, jt = {
858
+ }, Wt = {
800
859
  key: 0,
801
860
  class: "mdi mdi-check-circle success-icon"
802
- }, Kt = {
861
+ }, zt = {
803
862
  key: 0,
804
863
  class: "mdi mdi-check-circle success-icon"
805
- }, Qt = {
864
+ }, Xt = {
806
865
  key: 0,
807
866
  class: "mdi mdi-check-circle success-icon"
808
- }, Vt = {
867
+ }, Jt = {
809
868
  key: 0,
810
869
  class: "mdi mdi-check-circle success-icon"
811
- }, Ht = { class: "save-credential-toggle" }, Wt = ["checked"], zt = { key: 0 }, Xt = {
870
+ }, Zt = { class: "save-credential-toggle sidebar-toggle-row" }, $t = ["checked"], en = { key: 0 }, tn = {
812
871
  key: 0,
813
872
  class: "connection-actions"
814
- }, Jt = {
873
+ }, nn = {
815
874
  key: 1,
816
875
  class: "connection-actions"
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
- return r(), l("div", null, [
821
- O(F, {
876
+ };
877
+ function on(t, e, o, i, c, y) {
878
+ const a = x("connection-icon"), p = x("DuckDBImporter"), w = x("model-selector"), d = x("CreateEditorFromDatasourcePopup"), S = x("connection-refresh"), f = x("connection-status-icon"), N = x("sidebar-overflow-menu"), A = x("sidebar-item");
879
+ return l(), u("div", null, [
880
+ G(A, {
822
881
  "item-id": o.item.id,
823
882
  name: i.getItemName(),
824
883
  indent: o.item.indent,
@@ -830,285 +889,252 @@ function $t(t, e, o, i, c, y) {
830
889
  onToggle: i.handleToggle
831
890
  }, {
832
891
  icon: q(() => {
833
- var w;
892
+ var m;
834
893
  return [
835
- o.item.type === "connection" ? (r(), W(a, {
894
+ o.item.type === "connection" ? (l(), W(a, {
836
895
  key: 0,
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)
896
+ "connection-type": (m = o.item.connection) == null ? void 0 : m.type
897
+ }, null, 8, ["connection-type"])) : o.item.type === "database" ? (l(), u("i", Yt)) : o.item.type === "schema" ? (l(), u("i", Gt)) : o.item.type === "table" ? (l(), u("i", Kt)) : o.item.type === "error" ? (l(), u("i", jt)) : o.item.type === "loading" ? (l(), u("i", Qt)) : o.item.type === "column" ? (l(), u("i", Vt)) : M("", !0)
839
898
  ];
840
899
  }),
841
900
  name: q(() => [
842
- o.item.type === "refresh-connection" ? (r(), l("div", {
901
+ o.item.type === "refresh-connection" ? (l(), u("div", {
843
902
  key: 0,
844
903
  class: "refresh title-pad-left truncate-text sidebar-sub-item",
845
- onClick: e[0] || (e[0] = (...w) => i.handleRefreshConnectionClick && i.handleRefreshConnectionClick(...w))
846
- }, j(o.item.name), 1)) : o.item.type === "refresh-database" ? (r(), l("div", {
904
+ onClick: e[0] || (e[0] = (...m) => i.handleRefreshConnectionClick && i.handleRefreshConnectionClick(...m))
905
+ }, F(o.item.name), 1)) : o.item.type === "refresh-database" ? (l(), u("div", {
847
906
  key: 1,
848
907
  class: "refresh title-pad-left truncate-text sidebar-sub-item",
849
- onClick: e[1] || (e[1] = (...w) => i.handleRefreshDatabaseClick && i.handleRefreshDatabaseClick(...w))
850
- }, j(o.item.name), 1)) : o.item.type === "refresh-schema" ? (r(), l("div", {
908
+ onClick: e[1] || (e[1] = (...m) => i.handleRefreshDatabaseClick && i.handleRefreshDatabaseClick(...m))
909
+ }, F(o.item.name), 1)) : o.item.type === "refresh-schema" ? (l(), u("div", {
851
910
  key: 2,
852
911
  class: "refresh title-pad-left truncate-text sidebar-sub-item",
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, {
912
+ onClick: e[2] || (e[2] = (...m) => i.handleRefreshSchemaClick && i.handleRefreshSchemaClick(...m))
913
+ }, F(o.item.name), 1)) : o.item.type === "duckdb-upload" ? (l(), W(p, {
855
914
  key: 3,
856
915
  db: o.item.connection.db,
857
916
  connection: o.item.connection
858
- }, null, 8, ["db", "connection"])) : o.item.type === "model" ? (r(), l("div", {
917
+ }, null, 8, ["db", "connection"])) : o.item.type === "model" ? (l(), u("div", {
859
918
  key: 4,
860
- class: "bq-project-container",
861
- onClick: e[3] || (e[3] = k(() => {
919
+ class: "connection-meta-row",
920
+ onClick: e[3] || (e[3] = R(() => {
862
921
  }, ["stop"]))
863
922
  }, [
864
- e[29] || (e[29] = s("label", { class: "input-label" }, "Model", -1)),
865
- O(T, {
923
+ e[26] || (e[26] = s("span", { class: "meta-label" }, "Model:", -1)),
924
+ G(w, {
866
925
  connection: o.item.connection
867
926
  }, null, 8, ["connection"])
868
- ])) : o.item.type === "bigquery-project" ? (r(), l("div", {
927
+ ])) : o.item.type === "bigquery-project" ? (l(), u("div", {
869
928
  key: 5,
870
929
  class: "bq-project-container",
871
- onClick: e[6] || (e[6] = k(() => {
930
+ onClick: e[6] || (e[6] = R(() => {
872
931
  }, ["stop"]))
873
932
  }, [
874
- e[30] || (e[30] = s("label", { class: "input-label" }, "Billing", -1)),
933
+ e[27] || (e[27] = s("label", { class: "input-label" }, "Billing", -1)),
875
934
  s("span", null, [
876
- O(be, { name: "fade" }, {
935
+ G(ge, { name: "fade" }, {
877
936
  default: q(() => [
878
- i.showBillingSuccess ? (r(), l("i", Gt)) : A("", !0)
937
+ i.showBillingSuccess ? (l(), u("i", Ht)) : M("", !0)
879
938
  ]),
880
939
  _: 1
881
940
  }),
882
- N(s("input", {
941
+ D(s("input", {
883
942
  type: "text",
884
- "onUpdate:modelValue": e[4] || (e[4] = (w) => i.bigqueryProject = w),
943
+ "onUpdate:modelValue": e[4] || (e[4] = (m) => i.bigqueryProject = m),
885
944
  placeholder: "Billing Project",
886
- class: "bq-project-input",
887
- onInput: e[5] || (e[5] = (...w) => i.debouncedUpdateBigqueryProject && i.debouncedUpdateBigqueryProject(...w))
945
+ class: "bq-project-input sidebar-control-input",
946
+ onInput: e[5] || (e[5] = (...m) => i.debouncedUpdateBigqueryProject && i.debouncedUpdateBigqueryProject(...m))
888
947
  }, null, 544), [
889
- [G, i.bigqueryProject]
948
+ [B, i.bigqueryProject]
890
949
  ])
891
950
  ])
892
- ])) : o.item.type === "bigquery-browsing-project" ? (r(), l("div", {
951
+ ])) : o.item.type === "bigquery-browsing-project" ? (l(), u("div", {
893
952
  key: 6,
894
953
  class: "bq-project-container",
895
- onClick: e[9] || (e[9] = k(() => {
954
+ onClick: e[9] || (e[9] = R(() => {
896
955
  }, ["stop"]))
897
956
  }, [
898
- e[31] || (e[31] = s("label", { class: "input-label" }, "Browsing", -1)),
957
+ e[28] || (e[28] = s("label", { class: "input-label" }, "Browsing", -1)),
899
958
  s("span", null, [
900
- O(be, { name: "fade" }, {
959
+ G(ge, { name: "fade" }, {
901
960
  default: q(() => [
902
- i.showBrowsingSuccess ? (r(), l("i", jt)) : A("", !0)
961
+ i.showBrowsingSuccess ? (l(), u("i", Wt)) : M("", !0)
903
962
  ]),
904
963
  _: 1
905
964
  }),
906
- N(s("input", {
965
+ D(s("input", {
907
966
  type: "text",
908
- "onUpdate:modelValue": e[7] || (e[7] = (w) => i.bigqueryBrowsingProject = w),
967
+ "onUpdate:modelValue": e[7] || (e[7] = (m) => i.bigqueryBrowsingProject = m),
909
968
  placeholder: "Browsing Project",
910
- class: "bq-project-input",
911
- onInput: e[8] || (e[8] = (...w) => i.debouncedUpdateBigqueryBrowsingProject && i.debouncedUpdateBigqueryBrowsingProject(...w))
969
+ class: "bq-project-input sidebar-control-input",
970
+ onInput: e[8] || (e[8] = (...m) => i.debouncedUpdateBigqueryBrowsingProject && i.debouncedUpdateBigqueryBrowsingProject(...m))
912
971
  }, null, 544), [
913
- [G, i.bigqueryBrowsingProject]
972
+ [B, i.bigqueryBrowsingProject]
914
973
  ])
915
974
  ])
916
- ])) : o.item.type === "motherduck-token" ? (r(), l("div", {
975
+ ])) : o.item.type === "motherduck-token" ? (l(), u("div", {
917
976
  key: 7,
918
977
  class: "md-token-container",
919
- onClick: e[12] || (e[12] = k(() => {
978
+ onClick: e[12] || (e[12] = R(() => {
920
979
  }, ["stop"]))
921
980
  }, [
922
981
  s("form", {
923
- onSubmit: e[11] || (e[11] = k((w) => i.updateMotherDuckToken(o.item.connection, i.mdToken), ["prevent"]))
982
+ onSubmit: e[11] || (e[11] = R((m) => i.updateMotherDuckToken(o.item.connection, i.mdToken), ["prevent"]))
924
983
  }, [
925
- e[32] || (e[32] = s("button", {
984
+ e[29] || (e[29] = s("button", {
926
985
  type: "submit",
927
- class: "customize-button"
928
- }, "Update Token", -1)),
929
- N(s("input", {
986
+ class: "customize-button sidebar-control-button"
987
+ }, " Update Token ", -1)),
988
+ D(s("input", {
930
989
  type: "password",
931
- "onUpdate:modelValue": e[10] || (e[10] = (w) => i.mdToken = w),
990
+ "onUpdate:modelValue": e[10] || (e[10] = (m) => i.mdToken = m),
932
991
  placeholder: "mdToken",
933
- class: "connection-customize"
992
+ class: "connection-customize sidebar-control-input"
934
993
  }, null, 512), [
935
- [G, i.mdToken]
994
+ [B, i.mdToken]
936
995
  ])
937
996
  ], 32)
938
- ])) : o.item.type === "snowflake-private-key" ? (r(), l("div", {
997
+ ])) : o.item.type === "snowflake-private-key" ? (l(), u("div", {
939
998
  key: 8,
940
999
  class: "bq-project-container",
941
- onClick: e[15] || (e[15] = k(() => {
1000
+ onClick: e[15] || (e[15] = R(() => {
942
1001
  }, ["stop"]))
943
1002
  }, [
944
- e[33] || (e[33] = s("label", { class: "input-label" }, "Private Key", -1)),
1003
+ e[30] || (e[30] = s("label", { class: "input-label" }, "Private Key", -1)),
945
1004
  s("span", null, [
946
- O(be, { name: "fade" }, {
1005
+ G(ge, { name: "fade" }, {
947
1006
  default: q(() => [
948
- i.showPrivateKeySuccess ? (r(), l("i", Kt)) : A("", !0)
1007
+ i.showPrivateKeySuccess ? (l(), u("i", zt)) : M("", !0)
949
1008
  ]),
950
1009
  _: 1
951
1010
  }),
952
- N(s("input", {
1011
+ D(s("input", {
953
1012
  type: "password",
954
- "onUpdate:modelValue": e[13] || (e[13] = (w) => i.snowflakePrivateKey = w),
1013
+ "onUpdate:modelValue": e[13] || (e[13] = (m) => i.snowflakePrivateKey = m),
955
1014
  placeholder: "Private Key",
956
- class: "bq-project-input",
957
- onInput: e[14] || (e[14] = (...w) => i.debouncedUpdateSnowflakePrivateKey && i.debouncedUpdateSnowflakePrivateKey(...w))
1015
+ class: "bq-project-input sidebar-control-input",
1016
+ onInput: e[14] || (e[14] = (...m) => i.debouncedUpdateSnowflakePrivateKey && i.debouncedUpdateSnowflakePrivateKey(...m))
958
1017
  }, null, 544), [
959
- [G, i.snowflakePrivateKey]
1018
+ [B, i.snowflakePrivateKey]
960
1019
  ])
961
1020
  ])
962
- ])) : o.item.type === "snowflake-account" ? (r(), l("div", {
1021
+ ])) : o.item.type === "snowflake-account" ? (l(), u("div", {
963
1022
  key: 9,
964
1023
  class: "bq-project-container",
965
- onClick: e[18] || (e[18] = k(() => {
1024
+ onClick: e[18] || (e[18] = R(() => {
966
1025
  }, ["stop"]))
967
1026
  }, [
968
- e[34] || (e[34] = s("label", { class: "input-label" }, "Account", -1)),
1027
+ e[31] || (e[31] = s("label", { class: "input-label" }, "Account", -1)),
969
1028
  s("span", null, [
970
- O(be, { name: "fade" }, {
1029
+ G(ge, { name: "fade" }, {
971
1030
  default: q(() => [
972
- i.showAccountSuccess ? (r(), l("i", Qt)) : A("", !0)
1031
+ i.showAccountSuccess ? (l(), u("i", Xt)) : M("", !0)
973
1032
  ]),
974
1033
  _: 1
975
1034
  }),
976
- N(s("input", {
1035
+ D(s("input", {
977
1036
  type: "text",
978
- "onUpdate:modelValue": e[16] || (e[16] = (w) => i.snowflakeAccount = w),
1037
+ "onUpdate:modelValue": e[16] || (e[16] = (m) => i.snowflakeAccount = m),
979
1038
  placeholder: "Account",
980
- class: "bq-project-input",
981
- onInput: e[17] || (e[17] = (...w) => i.debouncedUpdateSnowflakeAccount && i.debouncedUpdateSnowflakeAccount(...w))
1039
+ class: "bq-project-input sidebar-control-input",
1040
+ onInput: e[17] || (e[17] = (...m) => i.debouncedUpdateSnowflakeAccount && i.debouncedUpdateSnowflakeAccount(...m))
982
1041
  }, null, 544), [
983
- [G, i.snowflakeAccount]
1042
+ [B, i.snowflakeAccount]
984
1043
  ])
985
1044
  ])
986
- ])) : o.item.type === "snowflake-username" ? (r(), l("div", {
1045
+ ])) : o.item.type === "snowflake-username" ? (l(), u("div", {
987
1046
  key: 10,
988
1047
  class: "bq-project-container",
989
- onClick: e[21] || (e[21] = k(() => {
1048
+ onClick: e[21] || (e[21] = R(() => {
990
1049
  }, ["stop"]))
991
1050
  }, [
992
- e[35] || (e[35] = s("label", { class: "input-label" }, "Username", -1)),
1051
+ e[32] || (e[32] = s("label", { class: "input-label" }, "Username", -1)),
993
1052
  s("span", null, [
994
- O(be, { name: "fade" }, {
1053
+ G(ge, { name: "fade" }, {
995
1054
  default: q(() => [
996
- i.showUsernameSuccess ? (r(), l("i", Vt)) : A("", !0)
1055
+ i.showUsernameSuccess ? (l(), u("i", Jt)) : M("", !0)
997
1056
  ]),
998
1057
  _: 1
999
1058
  }),
1000
- N(s("input", {
1059
+ D(s("input", {
1001
1060
  type: "text",
1002
- "onUpdate:modelValue": e[19] || (e[19] = (w) => i.snowflakeUsername = w),
1061
+ "onUpdate:modelValue": e[19] || (e[19] = (m) => i.snowflakeUsername = m),
1003
1062
  placeholder: "Username",
1004
- class: "bq-project-input",
1005
- onInput: e[20] || (e[20] = (...w) => i.debouncedUpdateSnowflakeUsername && i.debouncedUpdateSnowflakeUsername(...w))
1063
+ class: "bq-project-input sidebar-control-input",
1064
+ onInput: e[20] || (e[20] = (...m) => i.debouncedUpdateSnowflakeUsername && i.debouncedUpdateSnowflakeUsername(...m))
1006
1065
  }, null, 544), [
1007
- [G, i.snowflakeUsername]
1066
+ [B, i.snowflakeUsername]
1008
1067
  ])
1009
1068
  ])
1010
- ])) : o.item.type === "toggle-save-credential" ? (r(), l("div", {
1069
+ ])) : o.item.type === "toggle-save-credential" ? (l(), u("div", {
1011
1070
  key: 11,
1012
1071
  class: "md-token-container",
1013
- onClick: e[23] || (e[23] = k(() => {
1072
+ onClick: e[23] || (e[23] = R(() => {
1014
1073
  }, ["stop"]))
1015
1074
  }, [
1016
- s("label", Ht, [
1075
+ s("label", Zt, [
1017
1076
  s("input", {
1018
1077
  type: "checkbox",
1019
1078
  checked: o.item.connection.saveCredential,
1020
- onChange: e[22] || (e[22] = (w) => i.toggleSaveCredential(o.item.connection))
1021
- }, null, 40, Wt),
1022
- e[36] || (e[36] = s("span", { class: "checkbox-label" }, "Save Credentials", -1))
1079
+ onChange: e[22] || (e[22] = (m) => i.toggleSaveCredential(o.item.connection))
1080
+ }, null, 40, $t),
1081
+ e[33] || (e[33] = s("span", { class: "checkbox-label" }, "Save Credentials", -1))
1023
1082
  ])
1024
- ])) : (r(), l("span", {
1083
+ ])) : (l(), u("span", {
1025
1084
  key: 12,
1026
1085
  class: me(["title-pad-left truncate-text", { "error-indicator": o.item.type === "error" }])
1027
1086
  }, [
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
- o.item.type === "connection" ? (r(), l("span", {
1087
+ be(F(o.item.name) + " ", 1),
1088
+ o.item.count !== void 0 && o.item.count > 0 ? (l(), u("span", en, " (" + F(o.item.count) + ") ", 1)) : M("", !0),
1089
+ o.item.type === "database" ? (l(), u("span", {
1031
1090
  key: 1,
1032
1091
  class: "hover-icon",
1033
- onClick: e[24] || (e[24] = k((...w) => i.handleRefreshConnectionClick && i.handleRefreshConnectionClick(...w), ["stop"]))
1034
- }, [...e[37] || (e[37] = [
1092
+ onClick: e[24] || (e[24] = R((...m) => i.handleRefreshDatabaseClick && i.handleRefreshDatabaseClick(...m), ["stop"]))
1093
+ }, [...e[34] || (e[34] = [
1035
1094
  s("i", { class: "mdi mdi-refresh" }, null, -1)
1036
- ])])) : A("", !0),
1037
- o.item.type === "database" ? (r(), l("span", {
1095
+ ])])) : M("", !0),
1096
+ o.item.type === "schema" ? (l(), u("span", {
1038
1097
  key: 2,
1039
1098
  class: "hover-icon",
1040
- onClick: e[25] || (e[25] = k((...w) => i.handleRefreshDatabaseClick && i.handleRefreshDatabaseClick(...w), ["stop"]))
1041
- }, [...e[38] || (e[38] = [
1099
+ onClick: e[25] || (e[25] = R((...m) => i.handleRefreshSchemaClick && i.handleRefreshSchemaClick(...m), ["stop"]))
1100
+ }, [...e[35] || (e[35] = [
1042
1101
  s("i", { class: "mdi mdi-refresh" }, null, -1)
1043
- ])])) : A("", !0),
1044
- o.item.type === "schema" ? (r(), l("span", {
1045
- key: 3,
1046
- class: "hover-icon",
1047
- onClick: e[26] || (e[26] = k((...w) => i.handleRefreshSchemaClick && i.handleRefreshSchemaClick(...w), ["stop"]))
1048
- }, [...e[39] || (e[39] = [
1049
- s("i", { class: "mdi mdi-refresh" }, null, -1)
1050
- ])])) : A("", !0)
1102
+ ])])) : M("", !0)
1051
1103
  ], 2))
1052
1104
  ]),
1053
- "extra-content": q(() => [
1054
- o.item.type === "table" ? (r(), l("div", Xt, [
1055
- O(m, {
1056
- class: "hover-icon",
1057
- connection: o.item.connection,
1058
- table: o.item.object,
1059
- mode: "icon"
1060
- }, null, 8, ["connection", "table"])
1061
- ])) : o.item.type === "connection" ? (r(), l("div", Jt, [
1062
- i.isMobile ? (r(), l("i", {
1063
- key: 0,
1064
- "data-testid": `toggle-history-${o.item.connection.name}`,
1065
- class: "mdi mdi-history hover-icon",
1066
- title: "Query History",
1067
- onClick: e[27] || (e[27] = k((...w) => i.toggleMobileMenu && i.toggleMobileMenu(...w), ["stop"]))
1068
- }, null, 8, Zt)) : A("", !0),
1069
- O(R, {
1070
- class: "tacticle-button hover-icon",
1071
- connection: o.item.connection.name,
1072
- type: "sql",
1073
- title: "New SQL Editor",
1074
- "data-testid": o.testTag ? `new-sql-editor-${o.item.connection.name}-${o.testTag}` : `new-sql-editor-${o.item.connection.name}`
1075
- }, null, 8, ["connection", "data-testid"]),
1076
- O(R, {
1077
- class: "tacticle-button hover-icon",
1078
- connection: o.item.connection.name,
1079
- title: "New Trilogy Editor",
1080
- "data-testid": o.testTag ? `new-trilogy-editor-${o.item.connection.name}-${o.testTag}` : `new-trilogy-editor-${o.item.connection.name}`
1081
- }, null, 8, ["connection", "data-testid"]),
1082
- O(P, {
1083
- class: "tacticle-button hover-icon",
1084
- connection: o.item.connection,
1085
- "is-connected": o.item.connection.connected
1086
- }, null, 8, ["connection", "is-connected"]),
1087
- O(g, {
1088
- class: "tacticle-button hover-icon",
1089
- content: "Delete Connection",
1090
- position: "left"
1091
- }, {
1092
- default: q(() => [
1093
- s("span", {
1094
- class: "remove-btn",
1095
- onClick: e[28] || (e[28] = k((w) => i.deleteConnection(o.item.connection), ["stop"]))
1096
- }, [...e[40] || (e[40] = [
1097
- s("i", { class: "mdi mdi-trash-can-outline" }, null, -1)
1098
- ])])
1099
- ]),
1100
- _: 1
1101
- }),
1102
- O(h, {
1103
- connection: o.item.connection
1104
- }, null, 8, ["connection"])
1105
- ])) : A("", !0)
1106
- ]),
1105
+ "extra-content": q(() => {
1106
+ var m;
1107
+ return [
1108
+ o.item.type === "table" ? (l(), u("div", tn, [
1109
+ G(d, {
1110
+ class: "hover-icon",
1111
+ connection: o.item.connection,
1112
+ table: o.item.object,
1113
+ mode: "icon"
1114
+ }, null, 8, ["connection", "table"])
1115
+ ])) : o.item.type === "connection" ? (l(), u("div", nn, [
1116
+ (m = o.item.connection) != null && m.connected ? (l(), W(f, {
1117
+ key: 1,
1118
+ connection: o.item.connection
1119
+ }, null, 8, ["connection"])) : (l(), W(S, {
1120
+ key: 0,
1121
+ connection: o.item.connection,
1122
+ onRefresh: i.handleRefreshConnectionClick
1123
+ }, null, 8, ["connection", "onRefresh"])),
1124
+ G(N, {
1125
+ items: i.contextMenuItems,
1126
+ tooltip: "Connection actions",
1127
+ "test-id-base": `connection-actions-${o.item.id}`,
1128
+ onSelect: i.handleContextMenuItemClick
1129
+ }, null, 8, ["items", "test-id-base", "onSelect"])
1130
+ ])) : M("", !0)
1131
+ ];
1132
+ }),
1107
1133
  _: 1
1108
1134
  }, 8, ["item-id", "name", "indent", "is-selected", "is-collapsible", "is-collapsed", "itemType", "onClick", "onToggle"])
1109
1135
  ]);
1110
1136
  }
1111
- const en = /* @__PURE__ */ z(qt, [["render", $t], ["__scopeId", "data-v-fce665fc"]]), tn = {
1137
+ const an = /* @__PURE__ */ Z(Ft, [["render", on], ["__scopeId", "data-v-36a1a62a"]]), sn = {
1112
1138
  name: "ConnectionList",
1113
1139
  props: {
1114
1140
  activeConnectionKey: {
@@ -1128,146 +1154,146 @@ const en = /* @__PURE__ */ z(qt, [["render", $t], ["__scopeId", "data-v-fce665fc
1128
1154
  };
1129
1155
  },
1130
1156
  setup(t, { emit: e }) {
1131
- const o = Y("connectionStore"), i = Y("saveConnections"), c = Y("modelStore"), y = Y("editorStore"), a = Y("isMobile", S(!1));
1157
+ const o = _("connectionStore"), i = _("saveConnections"), c = _("modelStore"), y = _("editorStore"), a = _("isMobile", C(!1));
1132
1158
  if (!o || !i || !c || !y)
1133
1159
  throw new Error("Connection store is not provided!");
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
- u.saveCredential = !u.saveCredential, o.resetConnection(u.name);
1160
+ const p = C({}), w = C({}), d = C({}), S = C(!1), f = C(""), N = () => {
1161
+ f.value = "";
1162
+ }, A = (r, T) => {
1163
+ r.type === "motherduck" && (r.setAttribute("mdToken", T), o.resetConnection(r.name));
1164
+ }, m = async (r, T) => {
1165
+ r.type === "snowflake" && (r.setPrivateKey(T), await i(), await o.resetConnection(r.name));
1166
+ }, Q = async (r, T) => {
1167
+ r.type === "snowflake" && (r.setAccount(T), await i(), o.resetConnection(r.name));
1168
+ }, ue = async (r, T) => {
1169
+ r.type === "snowflake" && (r.setUsername(T), await i(), o.resetConnection(r.name));
1170
+ }, le = async (r, T) => {
1171
+ r.type === "bigquery-oauth" && (r.setAttribute("projectId", T), await i(), o.resetConnection(r.name));
1172
+ }, g = async (r, T) => {
1173
+ r.type === "bigquery-oauth" && (r.setAttribute("browsingProjectId", T), await i(), r.databases = [], await r.getDatabases());
1174
+ }, P = (r) => {
1175
+ r.saveCredential = !r.saveCredential, o.resetConnection(r.name);
1150
1176
  }, v = () => {
1151
1177
  e("toggle-mobile-menu");
1152
- }, b = S({}), I = async (u, E, x) => {
1153
- var Z, X, $, ne;
1178
+ }, b = C({}), k = async (r, T, U) => {
1179
+ var K, Y, $, oe;
1154
1180
  try {
1155
- if (T.value[u] = !0, (Z = o.connections[E]) != null && Z.connected || await o.resetConnection(E), x === "connection") {
1181
+ if (w.value[r] = !0, (K = o.connections[T]) != null && K.connected || await o.resetConnection(T), U === "connection") {
1156
1182
  console.log("getting databases");
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;
1183
+ let O = await o.connections[T].getDatabases();
1184
+ for (let j of O) {
1185
+ let ie = `${T}${L}${j.name}`;
1186
+ b.value[ie] = !0;
1161
1187
  }
1162
1188
  }
1163
- if (x === "database") {
1189
+ if (U === "database") {
1164
1190
  console.log("getting schemas");
1165
- let B = u.split(_)[1];
1166
- await o.connections[E].refreshDatabase(B);
1191
+ let O = r.split(L)[1];
1192
+ await o.connections[T].refreshDatabase(O);
1167
1193
  }
1168
- if (x === "schema") {
1169
- let B = u.split(_)[1], H = u.split(_)[2];
1170
- await o.connections[E].refreshSchema(B, H);
1194
+ if (U === "schema") {
1195
+ let O = r.split(L)[1], j = r.split(L)[2];
1196
+ await o.connections[T].refreshSchema(O, j);
1171
1197
  }
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
- if (re) {
1175
- let V = await o.connections[E].getColumns(
1176
- B,
1177
- H,
1178
- se
1198
+ if (U === "table") {
1199
+ let O = r.split(L)[1], j = r.split(L)[2], ie = r.split(L)[3], de = (oe = ($ = (Y = o.connections[T].databases) == null ? void 0 : Y.find((H) => H.name === O)) == null ? void 0 : $.schemas.find((H) => H.name === j)) == null ? void 0 : oe.tables.find((H) => H.name === ie);
1200
+ if (de) {
1201
+ let H = await o.connections[T].getColumns(
1202
+ O,
1203
+ j,
1204
+ ie
1179
1205
  );
1180
- re.columns = V;
1206
+ de.columns = H;
1181
1207
  }
1182
1208
  }
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";
1209
+ delete d.value[r];
1210
+ } catch (O) {
1211
+ console.error(O), O instanceof Error ? d.value[r] = O.message : d.value[r] = "An error occurred";
1186
1212
  }
1187
- delete T.value[u];
1188
- }, te = async (u, E, x) => {
1189
- console.log("emitting connection key selected:", u), e("connection-key-selected", u);
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
- if (ye && ye.columns.length === 0) {
1207
- await I(u, E, x);
1213
+ delete w.value[r];
1214
+ }, ne = async (r, T, U) => {
1215
+ console.log("emitting connection key selected:", r), e("connection-key-selected", r);
1216
+ }, X = async (r, T, U) => {
1217
+ var K, Y, $, oe, O, j, ie, de, H, Te, ve, Ee, Ie;
1218
+ if (U === "connection" && (b.value[r] === void 0 || b.value[r] === !0))
1219
+ b.value[r] = !1, (((K = o.connections[T].databases) == null ? void 0 : K.length) === 0 || ((Y = o.connections[T].databases) == null ? void 0 : Y.length) === void 0) && await k(r, T, U);
1220
+ else if (U === "database" && b.value[r] !== !1) {
1221
+ b.value[r] = !1;
1222
+ let he = r.split(L)[1], ae = ($ = o.connections[T].databases) == null ? void 0 : $.find((ee) => ee.name === he);
1223
+ ae && ((oe = ae.schemas) == null ? void 0 : oe.length) === 0 && await k(r, T, U);
1224
+ } else if (U === "schema" && b.value[r] !== !1) {
1225
+ b.value[r] = !1;
1226
+ let he = r.split(L)[1], ae = r.split(L)[2], ee = (ie = (j = (O = o.connections[T].databases) == null ? void 0 : O.find((se) => se.name === he)) == null ? void 0 : j.schemas) == null ? void 0 : ie.find((se) => se.name === ae);
1227
+ ee && ((de = ee.tables) == null ? void 0 : de.length) === 0 && await k(r, T, U);
1228
+ } else if (U === "table" && b.value[r] !== !1) {
1229
+ let he = r.split(L)[1], ae = r.split(L)[3], ee = r.split(L)[2];
1230
+ if (ee) {
1231
+ let se = await ((Ie = (Ee = (ve = (Te = (H = o.connections[T].databases) == null ? void 0 : H.find((E) => E.name === he)) == null ? void 0 : Te.schemas) == null ? void 0 : ve.find((E) => E.name === ee)) == null ? void 0 : Ee.tables) == null ? void 0 : Ie.find((E) => E.name === ae));
1232
+ if (se && se.columns.length === 0) {
1233
+ await k(r, T, U);
1208
1234
  return;
1209
1235
  }
1210
1236
  }
1211
- } else b.value[u] === void 0 ? b.value[u] = !1 : b.value[u] = !b.value[u];
1237
+ } else b.value[r] === void 0 ? b.value[r] = !1 : b.value[r] = !b.value[r];
1212
1238
  };
1213
- Object.values(o.connections).forEach((u) => {
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;
1239
+ Object.values(o.connections).forEach((r) => {
1240
+ var U;
1241
+ let T = `${r.name}`;
1242
+ b.value[T] = !0, (U = r.databases) == null || U.forEach((K) => {
1243
+ let Y = `${T}${L}${K.name}`;
1244
+ b.value[Y] = !0, K.schemas.forEach(($) => {
1245
+ let oe = `${Y}${L}${$.name}`;
1246
+ b.value[oe] = !0;
1247
+ for (let O of $.tables) {
1248
+ let j = `${Y}${L}${O.schema}${L}${O.name}`;
1249
+ b.value[j] = !0;
1224
1250
  }
1225
1251
  });
1226
1252
  });
1227
1253
  });
1228
- const K = J(() => Je(
1254
+ const V = z(() => $e(
1229
1255
  Object.values(o.connections),
1230
1256
  b.value,
1231
- T.value,
1232
- m.value
1233
- )), p = J(() => Ze(K.value, P.value));
1257
+ w.value,
1258
+ d.value
1259
+ )), J = z(() => et(V.value, f.value));
1234
1260
  return {
1235
1261
  connectionStore: o,
1236
1262
  editorStore: y,
1237
- contentList: K,
1238
- filteredContentList: p,
1239
- toggleCollapse: Q,
1240
- handleItemClick: te,
1263
+ contentList: V,
1264
+ filteredContentList: J,
1265
+ toggleCollapse: X,
1266
+ handleItemClick: ne,
1241
1267
  toggleMobileMenu: v,
1242
1268
  collapsed: b,
1243
1269
  saveConnections: i,
1244
1270
  modelStore: c,
1245
- connectionModelVisible: d,
1246
- updateMotherDuckToken: h,
1247
- updateSnowflakePrivateKey: F,
1248
- updateSnowflakeAccount: w,
1249
- updateSnowflakeUsername: ce,
1250
- toggleSaveCredential: C,
1251
- updateBigqueryProject: ue,
1252
- updateBigqueryBrowsingProject: f,
1253
- refreshId: I,
1254
- rightSplit: (u) => {
1255
- const E = u.lastIndexOf(_);
1256
- return E !== -1 ? u.substring(0, E) : u;
1271
+ connectionModelVisible: p,
1272
+ updateMotherDuckToken: A,
1273
+ updateSnowflakePrivateKey: m,
1274
+ updateSnowflakeAccount: Q,
1275
+ updateSnowflakeUsername: ue,
1276
+ toggleSaveCredential: P,
1277
+ updateBigqueryProject: le,
1278
+ updateBigqueryBrowsingProject: g,
1279
+ refreshId: k,
1280
+ rightSplit: (r) => {
1281
+ const T = r.lastIndexOf(L);
1282
+ return T !== -1 ? r.substring(0, T) : r;
1257
1283
  },
1258
- creatorVisible: R,
1284
+ creatorVisible: S,
1259
1285
  isMobile: a,
1260
- searchTerm: P,
1261
- clearSearch: g
1286
+ searchTerm: f,
1287
+ clearSearch: N
1262
1288
  };
1263
1289
  },
1264
1290
  components: {
1265
- SidebarList: De,
1266
- ConnectionCreatorInline: dt,
1267
- LoadingButton: Ce,
1268
- StatusIcon: Le,
1269
- Tooltip: Se,
1270
- ConnectionListItem: en
1291
+ SidebarList: qe,
1292
+ ConnectionCreatorInline: mt,
1293
+ LoadingButton: Re,
1294
+ StatusIcon: We,
1295
+ Tooltip: Ae,
1296
+ ConnectionListItem: an
1271
1297
  },
1272
1298
  methods: {
1273
1299
  resetConnection(t) {
@@ -1300,51 +1326,52 @@ const en = /* @__PURE__ */ z(qt, [["render", $t], ["__scopeId", "data-v-fce665fc
1300
1326
  return Object.keys(this.modelStore.models);
1301
1327
  }
1302
1328
  }
1303
- }, nn = { class: "button-container" }, on = ["data-testid"], an = {
1304
- key: 0,
1305
- class: "mdi mdi-plus icon"
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
- actions: q(() => [
1311
- s("div", nn, [
1329
+ }, rn = { class: "connections-header" }, ln = ["data-testid"], cn = { class: "search-container" }, un = ["data-testid"], dn = ["data-testid"], pn = { class: "confirmation-dialog" }, mn = { class: "dialog-actions" };
1330
+ function hn(t, e, o, i, c, y) {
1331
+ const a = x("connection-creator-inline"), p = x("connection-list-item"), w = x("sidebar-list");
1332
+ return l(), W(w, { title: "Connections" }, {
1333
+ header: q(() => [
1334
+ s("div", rn, [
1335
+ e[8] || (e[8] = s("h3", { class: "font-sans sidebar-header" }, "Connections", -1)),
1312
1336
  s("button", {
1313
- onClick: e[0] || (e[0] = (m) => i.creatorVisible = !i.creatorVisible),
1337
+ class: "sidebar-control-button sidebar-header-action connections-new-btn",
1338
+ onClick: e[0] || (e[0] = (d) => i.creatorVisible = !i.creatorVisible),
1314
1339
  "data-testid": o.testTag ? `connection-creator-add-${o.testTag}` : "connection-creator-add"
1315
1340
  }, [
1316
- i.creatorVisible ? (r(), l("i", an)) : A("", !0),
1317
- ie(" " + j(i.creatorVisible ? "Hide" : "New"), 1)
1318
- ], 8, on)
1319
- ]),
1320
- O(a, {
1341
+ e[7] || (e[7] = s("i", { class: "mdi mdi-plus" }, null, -1)),
1342
+ be(" " + F(i.creatorVisible ? "Close" : "New"), 1)
1343
+ ], 8, ln)
1344
+ ])
1345
+ ]),
1346
+ actions: q(() => [
1347
+ G(a, {
1321
1348
  visible: i.creatorVisible,
1322
- onClose: e[1] || (e[1] = (m) => i.creatorVisible = !i.creatorVisible)
1349
+ onClose: e[1] || (e[1] = (d) => i.creatorVisible = !i.creatorVisible)
1323
1350
  }, null, 8, ["visible"]),
1324
- s("div", sn, [
1325
- N(s("input", {
1351
+ s("div", cn, [
1352
+ D(s("input", {
1326
1353
  type: "text",
1327
- "onUpdate:modelValue": e[2] || (e[2] = (m) => i.searchTerm = m),
1354
+ "onUpdate:modelValue": e[2] || (e[2] = (d) => i.searchTerm = d),
1328
1355
  placeholder: "Search objects...",
1329
1356
  class: "search-input",
1330
1357
  "data-testid": o.testTag ? `connection-search-${o.testTag}` : "connection-search"
1331
- }, null, 8, rn), [
1332
- [G, i.searchTerm]
1358
+ }, null, 8, un), [
1359
+ [B, i.searchTerm]
1333
1360
  ]),
1334
- i.searchTerm ? (r(), l("button", {
1361
+ i.searchTerm ? (l(), u("button", {
1335
1362
  key: 0,
1336
- onClick: e[3] || (e[3] = (...m) => i.clearSearch && i.clearSearch(...m)),
1337
- class: "clear-search-btn",
1363
+ onClick: e[3] || (e[3] = (...d) => i.clearSearch && i.clearSearch(...d)),
1364
+ class: "clear-search-btn sidebar-icon-button",
1338
1365
  "data-testid": o.testTag ? `connection-search-clear-${o.testTag}` : "connection-search-clear"
1339
- }, " ✕ ", 8, ln)) : A("", !0)
1366
+ }, " ✕ ", 8, dn)) : M("", !0)
1340
1367
  ])
1341
1368
  ]),
1342
1369
  default: q(() => [
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,
1370
+ (l(!0), u(pe, null, we(i.filteredContentList, (d) => (l(), W(p, {
1371
+ key: d.id,
1372
+ item: d,
1373
+ "is-collapsed": i.collapsed[d.id],
1374
+ isSelected: d.id === o.activeConnectionKey,
1348
1375
  isMobile: i.isMobile,
1349
1376
  testTag: o.testTag,
1350
1377
  onToggle: i.toggleCollapse,
@@ -1360,56 +1387,56 @@ function dn(t, e, o, i, c, y) {
1360
1387
  onToggleMobileMenu: i.toggleMobileMenu,
1361
1388
  "delete-connection": y.deleteConnection
1362
1389
  }, null, 8, ["item", "is-collapsed", "isSelected", "isMobile", "testTag", "onToggle", "onClick", "onRefresh", "onUpdateMotherduckToken", "onUpdateBigqueryProject", "onUpdateBigqueryBrowsingProject", "onUpdateSnowflakePrivateKey", "onUpdateSnowflakeAccount", "onUpdateSnowflakeUsername", "onToggleSaveCredential", "onToggleMobileMenu", "delete-connection"]))), 128)),
1363
- c.showDeleteConfirmationState ? (r(), l("div", {
1390
+ c.showDeleteConfirmationState ? (l(), u("div", {
1364
1391
  key: 0,
1365
1392
  class: "confirmation-overlay",
1366
- onClick: e[6] || (e[6] = k((...m) => y.cancelDelete && y.cancelDelete(...m), ["self"]))
1393
+ onClick: e[6] || (e[6] = R((...d) => y.cancelDelete && y.cancelDelete(...d), ["self"]))
1367
1394
  }, [
1368
- s("div", cn, [
1369
- e[7] || (e[7] = s("h3", null, "Confirm Deletion", -1)),
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", un, [
1395
+ s("div", pn, [
1396
+ e[9] || (e[9] = s("h3", null, "Confirm Deletion", -1)),
1397
+ e[10] || (e[10] = s("p", null, " Are you sure you want to delete this connection? All associated editors will be deleted. ", -1)),
1398
+ s("div", mn, [
1372
1399
  s("button", {
1373
1400
  class: "cancel-btn",
1374
- onClick: e[4] || (e[4] = (...m) => y.cancelDelete && y.cancelDelete(...m))
1401
+ onClick: e[4] || (e[4] = (...d) => y.cancelDelete && y.cancelDelete(...d))
1375
1402
  }, "Cancel"),
1376
1403
  s("button", {
1377
1404
  class: "confirm-btn",
1378
- onClick: e[5] || (e[5] = (...m) => y.confirmDelete && y.confirmDelete(...m))
1405
+ onClick: e[5] || (e[5] = (...d) => y.confirmDelete && y.confirmDelete(...d))
1379
1406
  }, "Delete")
1380
1407
  ])
1381
1408
  ])
1382
- ])) : A("", !0)
1409
+ ])) : M("", !0)
1383
1410
  ]),
1384
1411
  _: 1
1385
1412
  });
1386
1413
  }
1387
- const So = /* @__PURE__ */ z(tn, [["render", dn], ["__scopeId", "data-v-e9246856"]]);
1414
+ const Eo = /* @__PURE__ */ Z(sn, [["render", hn], ["__scopeId", "data-v-d32fa84c"]]);
1388
1415
  class n {
1389
1416
  constructor(e, o, i = null, c = null) {
1390
- ee(this, "title");
1391
- ee(this, "content");
1392
- ee(this, "type");
1393
- ee(this, "data");
1417
+ te(this, "title");
1418
+ te(this, "content");
1419
+ te(this, "type");
1420
+ te(this, "data");
1394
1421
  this.title = e, this.content = o, this.type = i, this.data = c || {};
1395
1422
  }
1396
1423
  }
1397
- class L {
1424
+ class I {
1398
1425
  constructor(e, o, i = void 0) {
1399
- ee(this, "title");
1400
- ee(this, "paragraphs");
1401
- ee(this, "displayName");
1426
+ te(this, "title");
1427
+ te(this, "paragraphs");
1428
+ te(this, "displayName");
1402
1429
  this.title = e, this.paragraphs = o, this.displayName = i;
1403
1430
  }
1404
1431
  }
1405
1432
  class ke {
1406
1433
  constructor(e, o) {
1407
- ee(this, "title");
1408
- ee(this, "articles");
1434
+ te(this, "title");
1435
+ te(this, "articles");
1409
1436
  this.title = e, this.articles = o;
1410
1437
  }
1411
1438
  }
1412
- const pn = new L(
1439
+ const yn = new I(
1413
1440
  "Dashboards",
1414
1441
  [
1415
1442
  new n(
@@ -1468,7 +1495,7 @@ const pn = new L(
1468
1495
  )
1469
1496
  ],
1470
1497
  "Dashboard Tutorial"
1471
- ), mn = new L(
1498
+ ), gn = new I(
1472
1499
  "Model Tutorial",
1473
1500
  [
1474
1501
  new n(
@@ -1522,8 +1549,8 @@ order by
1522
1549
  "Make sure the state output is named state and you've ordered properly."
1523
1550
  ],
1524
1551
  validationFn: (t) => {
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";
1552
+ var e, o, i, c, y, a, p;
1553
+ 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" && ((p = (a = t.data) == null ? void 0 : a[2]) == null ? void 0 : p.state) === "TX";
1527
1554
  }
1528
1555
  },
1529
1556
  {
@@ -1681,7 +1708,7 @@ select
1681
1708
  )
1682
1709
  ],
1683
1710
  "Model Tutorial"
1684
- ), hn = new L(
1711
+ ), fn = new I(
1685
1712
  "Welcome",
1686
1713
  [
1687
1714
  new n(
@@ -1703,7 +1730,7 @@ select
1703
1730
  ),
1704
1731
  new n(
1705
1732
  "Purpose",
1706
- `Trilogy Studio has a built in model "store", containing a set of public models hosted on github. The demo model is one of those options. Let's get started! Search below for the demo-model, and click the import button to add it. You want to import it to a duckdb connection. Select new duckdb connection and name it demo-connection.`
1733
+ `Trilogy Studio has a built in model "store", containing a set of public models hosted on github. The demo model is one of those options. Let's get started! Search below for the demo-model, and click the import button to add it. You want to import it to a duckdb connection. Select "New DuckDB" and keep the default connection name.`
1707
1734
  ),
1708
1735
  new n("Purpose", "<PLACEHOLDER>", "community-models"),
1709
1736
  new n("ModelList", "", "model-validator"),
@@ -1730,7 +1757,7 @@ select
1730
1757
  ),
1731
1758
  new n(
1732
1759
  "Purpose",
1733
- 'Now that you have a connection and model set up, you can start querying in an editor. Editors are grouped by their storage, then by connection. `Local` represents local storage in your browser. [Other storage, like Github, will be available in the future] Your imported model will have populated some default editors, but lets start with a new one. Click the new button and create a Trilogy editor named "my-first-editor" associated with the demo connection.'
1760
+ 'Now that you have a connection and model set up, you can start querying in an editor. Editors are grouped by their storage, then by connection. `Local` represents local storage in your browser. [Other storage, like Github, will be available in the future] Your imported model will have populated some default editors, but let\'s start with a new one. In the sidebar, click the "..." menu next to the demo-model-connection to expand its options, then create a new Trilogy editor named "my-first-editor".'
1734
1761
  ),
1735
1762
  new n("Purpose", "", "editors"),
1736
1763
  new n("Purpose", "", "editor-validator"),
@@ -1802,7 +1829,7 @@ order by
1802
1829
  )
1803
1830
  ],
1804
1831
  "Welcome and Query Tutorial"
1805
- ), yn = new L("LLM Tutorial", [
1832
+ ), wn = new I("LLM Tutorial", [
1806
1833
  new n(
1807
1834
  "Connections",
1808
1835
  "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 +1929,7 @@ auto state.population <- random(state)*10000;
1902
1929
  "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
1930
  "tip"
1904
1931
  )
1905
- ]), fn = new L("Functions", [
1932
+ ]), bn = new I("Functions", [
1906
1933
  new n(
1907
1934
  "Trilogy Built-in Functions",
1908
1935
  "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 +2816,7 @@ auto state.population <- random(state)*10000;
2789
2816
  }
2790
2817
  }
2791
2818
  )
2792
- ]), gn = new L("Window Functions", [
2819
+ ]), Tn = new I("Window Functions", [
2793
2820
  new n(
2794
2821
  "Trilogy Built-in Functions",
2795
2822
  "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 +2902,7 @@ auto state.population <- random(state)*10000;
2875
2902
  }
2876
2903
  }
2877
2904
  )
2878
- ]), wn = new L(
2905
+ ]), vn = new I(
2879
2906
  "Modeling",
2880
2907
  // Article Title
2881
2908
  [
@@ -3105,8 +3132,8 @@ select pi * 2 as circumference_ratio;`,
3105
3132
  )
3106
3133
  ],
3107
3134
  "Modeling"
3108
- ), Tn = new ke("Trilogy Reference", [
3109
- new L("Overview/Goals", [
3135
+ ), En = new ke("Trilogy Reference", [
3136
+ new I("Overview/Goals", [
3110
3137
  new n(
3111
3138
  "Introduction",
3112
3139
  "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 +3218,7 @@ ORDER BY
3191
3218
  "Explore the rest of the reference documentation for more details on how Trilogy works and explore these concepts in more detail."
3192
3219
  )
3193
3220
  ]),
3194
- new L("Code", [
3221
+ new I("Code", [
3195
3222
  new n(
3196
3223
  "How Trilogy Works",
3197
3224
  `Studio and dependent code is open-source under the MIT license. The code is available on GitHub at the following locations:
@@ -3204,7 +3231,7 @@ ORDER BY
3204
3231
  `
3205
3232
  )
3206
3233
  ]),
3207
- new L("Querying Data", [
3234
+ new I("Querying Data", [
3208
3235
  new n(
3209
3236
  "SELECT Without FROM, JOIN, or GROUP BY",
3210
3237
  "In Trilogy, you write queries without explicitly specifying tables, joins, or grouping."
@@ -3249,7 +3276,7 @@ LIMIT 10;`,
3249
3276
  "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
3277
  )
3251
3278
  ]),
3252
- new L("Syntax", [
3279
+ new I("Syntax", [
3253
3280
  new n(
3254
3281
  "Basic SELECT Statement",
3255
3282
  "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 +3365,7 @@ complete_for_clause?
3338
3365
  "code"
3339
3366
  )
3340
3367
  ]),
3341
- new L("Concepts", [
3368
+ new I("Concepts", [
3342
3369
  new n(
3343
3370
  "What Are Concepts?",
3344
3371
  "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 +3419,7 @@ metric product_count <-count(product.id); # the count of products`,
3392
3419
  "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
3420
  )
3394
3421
  ]),
3395
- new L("Datasources and Joins", [
3422
+ new I("Datasources and Joins", [
3396
3423
  new n(
3397
3424
  "Defining Datasources",
3398
3425
  "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. "
@@ -3419,12 +3446,39 @@ grain (customers.id)
3419
3446
  address warehouse.customers;`,
3420
3447
  "code"
3421
3448
  ),
3449
+ new n(
3450
+ "Partial Data",
3451
+ "Sometimes partial data is all we need. For example, imagine a recent and archive table. When you query the last 7 days, and the last 30 are in recent - we can prune the archive."
3452
+ ),
3453
+ new n(
3454
+ "Example",
3455
+ `partial datasource recent_sales (
3456
+ order_id: orders.id,
3457
+ cu_id: customers.id,
3458
+ revenue: orders.revenue,
3459
+ date: orders.date
3460
+ )
3461
+ grain (orders.id)
3462
+ complete where orders.date > current_date - 30
3463
+ address warehouse.sales;
3464
+
3465
+ partial datasource archive_sales (
3466
+ order_id: orders.id,
3467
+ cu_id: customers.id,
3468
+ revenue: orders.revenue,
3469
+ date: orders.date
3470
+ )
3471
+ grain (orders.id)
3472
+ complete where orders.date <= current_date - 30
3473
+ address warehouse.sales_archive;`,
3474
+ "code"
3475
+ ),
3422
3476
  new n(
3423
3477
  "Partial Keys",
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.'
3478
+ "A query of the form `where orders.date > current_date -7 can safely resolve to just our recent. This lets us efficiently prune and select relevant datasources."
3425
3479
  )
3426
3480
  ]),
3427
- new L("Grains and Aggregation", [
3481
+ new I("Grains and Aggregation", [
3428
3482
  new n(
3429
3483
  "What Is a Grain?",
3430
3484
  "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 +3496,9 @@ address warehouse.customers;`,
3442
3496
  "This query would aggregate revenue to the grain of order_date, as order year is a property of order date."
3443
3497
  )
3444
3498
  ]),
3445
- fn,
3446
- gn,
3447
- new L("Custom Functions", [
3499
+ bn,
3500
+ Tn,
3501
+ new I("Custom Functions", [
3448
3502
  new n(
3449
3503
  "Defining Functions",
3450
3504
  "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 +3536,9 @@ SELECT
3482
3536
  "code"
3483
3537
  )
3484
3538
  ]),
3485
- wn
3486
- ]), bn = new ke("Terms of Service", [
3487
- new L("Terms of Service", [
3539
+ vn
3540
+ ]), Sn = new ke("Terms of Service", [
3541
+ new I("Terms of Service", [
3488
3542
  new n("Last Updated", "February 22, 2025"),
3489
3543
  new n(
3490
3544
  "Service Description",
@@ -3558,13 +3612,13 @@ SELECT
3558
3612
  "conclusion"
3559
3613
  )
3560
3614
  ])
3561
- ]), Co = [
3615
+ ]), So = [
3562
3616
  new ke("Studio", [
3563
- hn,
3564
- pn,
3565
- mn,
3617
+ fn,
3566
3618
  yn,
3567
- new L("Functionality", [
3619
+ gn,
3620
+ wn,
3621
+ new I("Functionality", [
3568
3622
  new n(
3569
3623
  "Tip",
3570
3624
  "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 +3633,7 @@ SELECT
3579
3633
  "tip"
3580
3634
  )
3581
3635
  ]),
3582
- new L("Navigation", [
3636
+ new I("Navigation", [
3583
3637
  new n(
3584
3638
  "Navigation",
3585
3639
  "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 +3644,7 @@ SELECT
3590
3644
  "tip"
3591
3645
  )
3592
3646
  ]),
3593
- new L("Querying", [
3647
+ new I("Querying", [
3594
3648
  new n(
3595
3649
  "Querying",
3596
3650
  "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 +3658,7 @@ SELECT
3604
3658
  "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
3659
  )
3606
3660
  ]),
3607
- new L("Connections", [
3661
+ new I("Connections", [
3608
3662
  new n(
3609
3663
  "Connections",
3610
3664
  "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 +3669,34 @@ SELECT
3615
3669
  ),
3616
3670
  new n("ConnectionList", "", "connections")
3617
3671
  ]),
3618
- new L("DuckDB", [
3672
+ new I("DuckDB", [
3619
3673
  new n(
3620
3674
  "DuckDB",
3621
3675
  "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
3676
  )
3623
3677
  ]),
3624
- new L("Bigquery", [
3678
+ new I("Bigquery", [
3625
3679
  new n(
3626
3680
  "Connections",
3627
3681
  '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
3682
  )
3629
3683
  ]),
3630
- new L("Snowflake", [
3684
+ new I("Snowflake", [
3631
3685
  new n(
3632
3686
  "Connections",
3633
3687
  '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
3688
  )
3635
3689
  ]),
3636
- new L("Scheduling", [
3690
+ new I("Scheduling", [
3637
3691
  new n(
3638
3692
  "Scheduling",
3639
3693
  '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
3694
  )
3641
3695
  ])
3642
3696
  ]),
3643
- Tn,
3697
+ En,
3644
3698
  new ke("Privacy And Data", [
3645
- new L("Privacy Policy", [
3699
+ new I("Privacy Policy", [
3646
3700
  new n("Last Updated", "February 22, 2025"),
3647
3701
  new n(
3648
3702
  "Introduction",
@@ -3709,7 +3763,7 @@ SELECT
3709
3763
  "conclusion"
3710
3764
  )
3711
3765
  ]),
3712
- new L("Stored Info", [
3766
+ new I("Stored Info", [
3713
3767
  new n(
3714
3768
  "Local Data",
3715
3769
  "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 +3783,19 @@ SELECT
3729
3783
  "tip"
3730
3784
  )
3731
3785
  ]),
3732
- new L("Google", [
3786
+ new I("Google", [
3733
3787
  new n(
3734
3788
  "Google Account",
3735
3789
  "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
3790
  )
3737
3791
  ]),
3738
- new L("Snowflake", [
3792
+ new I("Snowflake", [
3739
3793
  new n(
3740
3794
  "Google Account",
3741
3795
  "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
3796
  )
3743
3797
  ]),
3744
- new L("Telemetry Details", [
3798
+ new I("Telemetry Details", [
3745
3799
  new n(
3746
3800
  "Telemetry",
3747
3801
  `<a href="https://www.goatcounter.com/">GoatCounter</a> is used to collect anonymized
@@ -3749,8 +3803,8 @@ SELECT
3749
3803
  )
3750
3804
  ])
3751
3805
  ]),
3752
- bn
3753
- ], vn = ae({
3806
+ Sn
3807
+ ], Cn = ce({
3754
3808
  name: "LLMProviderIcon",
3755
3809
  props: {
3756
3810
  providerType: {
@@ -3758,107 +3812,44 @@ SELECT
3758
3812
  required: !0
3759
3813
  }
3760
3814
  }
3761
- }), En = { class: "provider-icon-container" }, Sn = {
3815
+ }), kn = { class: "provider-icon-container" }, An = {
3762
3816
  key: 0,
3763
3817
  class: "mdi mdi-alpha-c-circle",
3764
3818
  title: "Anthropic"
3765
- }, Cn = {
3819
+ }, In = {
3766
3820
  key: 1,
3767
3821
  class: "mdi mdi-flash",
3768
3822
  title: "OpenAI"
3769
- }, kn = {
3823
+ }, Pn = {
3770
3824
  key: 2,
3771
3825
  class: "mdi mdi-google",
3772
3826
  title: "Google"
3773
- }, An = {
3827
+ }, Rn = {
3774
3828
  key: 3,
3775
3829
  class: "mdi mdi-robot",
3776
3830
  title: "OpenRouter"
3777
- }, In = {
3831
+ }, Mn = {
3778
3832
  key: 4,
3779
3833
  class: "mdi mdi-history demo-icon",
3780
3834
  title: "Demo"
3781
- }, Pn = {
3835
+ }, Ln = {
3782
3836
  key: 5,
3783
3837
  class: "mdi mdi-robot",
3784
3838
  title: "LLM Provider"
3785
3839
  };
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))
3840
+ function Dn(t, e, o, i, c, y) {
3841
+ return l(), u("div", kn, [
3842
+ t.providerType === "anthropic" ? (l(), u("i", An)) : t.providerType === "openai" ? (l(), u("i", In)) : t.providerType === "google" ? (l(), u("i", Pn)) : t.providerType === "openrouter" ? (l(), u("i", Rn)) : t.providerType === "demo" ? (l(), u("i", Mn)) : (l(), u("i", Ln))
3789
3843
  ]);
3790
3844
  }
3791
- const Mn = /* @__PURE__ */ z(vn, [["render", Rn], ["__scopeId", "data-v-66f81112"]]), Ln = ae({
3792
- name: "ContextMenu",
3793
- props: {
3794
- items: {
3795
- type: Array,
3796
- required: !0
3797
- },
3798
- position: {
3799
- type: Object,
3800
- default: () => ({ x: 0, y: 0 })
3801
- },
3802
- isVisible: {
3803
- type: Boolean,
3804
- default: !1
3805
- },
3806
- id: {
3807
- type: String,
3808
- default: ""
3809
- }
3810
- },
3811
- emits: ["item-click", "close"],
3812
- setup(t, { emit: e }) {
3813
- const o = J(() => ({
3814
- left: `${t.position.x}px`,
3815
- top: `${t.position.y}px`
3816
- })), i = (y) => {
3817
- e("item-click", y), e("close");
3818
- }, c = (y) => {
3819
- t.isVisible && e("close");
3820
- };
3821
- return Ie(() => {
3822
- setTimeout(() => {
3823
- document.addEventListener("click", c);
3824
- }, 300);
3825
- }), Ye(() => {
3826
- document.removeEventListener("click", c);
3827
- }), {
3828
- positionStyle: o,
3829
- handleItemClick: i
3830
- };
3831
- }
3832
- }), Dn = ["onClick"];
3833
- function _n(t, e, o, i, c, y) {
3834
- return t.isVisible ? (r(), l("div", {
3835
- key: 0,
3836
- style: Fe(t.positionStyle),
3837
- class: "context-menu"
3838
- }, [
3839
- (r(!0), l(le, null, fe(t.items, (a) => (r(), l("div", {
3840
- key: a.id,
3841
- class: me(["context-menu-item", { danger: a.danger }]),
3842
- onClick: (d) => t.handleItemClick(a)
3843
- }, [
3844
- a.icon ? (r(), l("i", {
3845
- key: 0,
3846
- class: me(`mdi ${a.icon}`)
3847
- }, null, 2)) : A("", !0),
3848
- s("span", null, j(a.label), 1)
3849
- ], 10, Dn))), 128))
3850
- ], 4)) : A("", !0);
3851
- }
3852
- const Nn = /* @__PURE__ */ z(Ln, [["render", _n], ["__scopeId", "data-v-48938153"]]), qn = ae({
3845
+ const _n = /* @__PURE__ */ Z(Cn, [["render", Dn], ["__scopeId", "data-v-66f81112"]]), Nn = ce({
3853
3846
  name: "LLMConnectionListItem",
3854
3847
  components: {
3855
- SidebarItem: Me,
3856
- LLMProviderIcon: Mn,
3857
- ConnectionRefresh: Ue,
3858
- ConnectionStatusIcon: Re,
3859
- LoadingButton: Ce,
3860
- ContextMenu: Nn,
3861
- Tooltip: Se
3848
+ SidebarItem: Ne,
3849
+ LLMProviderIcon: _n,
3850
+ ConnectionStatusIcon: _e,
3851
+ Tooltip: Ae,
3852
+ SidebarOverflowMenu: De
3862
3853
  },
3863
3854
  props: {
3864
3855
  item: {
@@ -3886,116 +3877,132 @@ const Nn = /* @__PURE__ */ z(Ln, [["render", _n], ["__scopeId", "data-v-48938153
3886
3877
  "deleteChat"
3887
3878
  ],
3888
3879
  setup(t, { emit: e }) {
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) || "");
3893
- }), Ae(
3880
+ const o = C(""), i = C(!1), c = C(""), y = C("");
3881
+ let a = null;
3882
+ Le(() => {
3883
+ var h, r, T;
3884
+ t.item.type === "api-key" && ((h = t.item.connection) != null && h.getApiKey()) && (o.value = t.item.connection.getApiKey()), t.item.type === "model" && ((r = t.item.connection) != null && r.model) && (c.value = t.item.connection.model), t.item.type === "fast-model" && (y.value = ((T = t.item.connection) == null ? void 0 : T.fastModel) || "");
3885
+ }), Pe(
3894
3886
  // @ts-ignore
3895
3887
  () => {
3896
- var p;
3897
- return (p = t.item.connection) == null ? void 0 : p.apiKey;
3888
+ var h;
3889
+ return (h = t.item.connection) == null ? void 0 : h.apiKey;
3898
3890
  },
3899
- (p) => {
3900
- t.item.type === "api-key" && p && (o.value = p);
3891
+ (h) => {
3892
+ t.item.type === "api-key" && h && (o.value = h);
3901
3893
  }
3902
- ), Ae(
3894
+ ), Pe(
3903
3895
  () => {
3904
- var p;
3905
- return (p = t.item.connection) == null ? void 0 : p.model;
3896
+ var h;
3897
+ return (h = t.item.connection) == null ? void 0 : h.model;
3906
3898
  },
3907
- (p) => {
3908
- t.item.type === "model" && p && (c.value = p);
3899
+ (h) => {
3900
+ t.item.type === "model" && h && (c.value = h);
3909
3901
  },
3910
3902
  { immediate: !0 }
3911
- ), Ae(
3903
+ ), Pe(
3912
3904
  () => {
3913
- var p;
3914
- return (p = t.item.connection) == null ? void 0 : p.fastModel;
3905
+ var h;
3906
+ return (h = t.item.connection) == null ? void 0 : h.fastModel;
3915
3907
  },
3916
- (p) => {
3917
- t.item.type === "fast-model" && (y.value = p || "");
3908
+ (h) => {
3909
+ t.item.type === "fast-model" && (y.value = h || "");
3918
3910
  },
3919
3911
  { immediate: !0 }
3920
3912
  );
3921
- const a = S(!1), d = S({ x: 0, y: 0 }), T = J(() => {
3922
- const p = [];
3923
- return t.item.type === "connection" && p.push(
3924
- { id: "set-default", label: "Set as Default", icon: "mdi-star-outline" },
3913
+ const p = z(() => {
3914
+ var r;
3915
+ const h = [];
3916
+ return t.item.type === "connection" && ((r = t.item.connection) != null && r.isDefault || h.push({
3917
+ id: "set-default",
3918
+ label: "Set as default",
3919
+ icon: "mdi-star-outline"
3920
+ }), h.push(
3925
3921
  { id: "refresh", label: "Refresh Connection", icon: "mdi-refresh" },
3926
- { id: "delete", label: "Delete Connection", icon: "mdi-delete-outline", danger: !0 }
3927
- ), p;
3928
- }), m = (p) => {
3929
- t.item.type === "connection" && (d.value = {
3930
- x: p.clientX,
3931
- y: p.clientY
3932
- }, a.value = !0);
3933
- }, R = (p) => {
3934
- var D;
3935
- switch (p.id) {
3922
+ { id: "delete-separator", kind: "separator" },
3923
+ { id: "delete", label: "Delete connection", icon: "mdi-trash-can-outline", danger: !0 }
3924
+ )), h;
3925
+ }), w = (h) => {
3926
+ var r;
3927
+ switch (h.id) {
3936
3928
  case "delete":
3937
- v(t.item.id);
3929
+ g(t.item.id);
3938
3930
  break;
3939
3931
  case "set-default":
3940
- C(t.item.id);
3932
+ le(t.item.id);
3941
3933
  break;
3942
3934
  case "refresh":
3943
- e("refresh", t.item.id, ((D = t.item.connection) == null ? void 0 : D.name) || "", "connection");
3935
+ e("refresh", t.item.id, ((r = t.item.connection) == null ? void 0 : r.name) || "", "connection");
3944
3936
  break;
3945
3937
  }
3946
- }, P = J(() => ["connection"].includes(t.item.type)), g = () => ["api-key", "model", "fast-model", "toggle-save-credential", "refresh-connection"].includes(
3947
- t.item.type
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) => {
3951
- var u;
3952
- const D = t.item.type === "chat-item" ? { chatId: t.item.chatId } : void 0;
3953
- e("toggle", p, ((u = t.item.connection) == null ? void 0 : u.name) || "", t.item.type, D);
3954
- }, w = (p) => {
3955
- var D;
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) => {
3960
- var D;
3961
- e("setActive", p, ((D = t.item.connection) == null ? void 0 : D.name) || "", "connection");
3962
- }, v = (p) => {
3963
- var D;
3964
- e("deleteConnection", p, ((D = t.item.connection) == null ? void 0 : D.name) || "");
3938
+ }, d = z(() => ["connection", "settings-group"].includes(t.item.type)), S = () => [
3939
+ "api-key",
3940
+ "model",
3941
+ "fast-model",
3942
+ "settings-group",
3943
+ "toggle-save-credential",
3944
+ "refresh-connection"
3945
+ ].includes(t.item.type) ? "" : t.item.name, f = () => {
3946
+ (d.value || t.item.type === "open-chat" || t.item.type === "open-validation" || t.item.type === "new-chat" || t.item.type === "chat-item") && N(t.item.id);
3947
+ }, N = (h) => {
3948
+ var T;
3949
+ const r = t.item.type === "chat-item" ? { chatId: t.item.chatId } : void 0;
3950
+ e("toggle", h, ((T = t.item.connection) == null ? void 0 : T.name) || "", t.item.type, r);
3951
+ }, A = (h) => {
3952
+ var r;
3953
+ h.stopPropagation(), e("refresh", t.item.id, ((r = t.item.connection) == null ? void 0 : r.name) || "", "connection");
3954
+ }, m = (h) => {
3955
+ e("toggleSaveCredential", h);
3956
+ }, Q = (h) => h instanceof Ue ? "anthropic" : h instanceof Oe ? "openai" : h instanceof xe ? "google" : h.type || "unknown", ue = (h) => h && h.connected === !0, le = (h) => {
3957
+ var r;
3958
+ e("setActive", h, ((r = t.item.connection) == null ? void 0 : r.name) || "", "connection");
3959
+ }, g = (h) => {
3960
+ var r;
3961
+ e("deleteConnection", h, ((r = t.item.connection) == null ? void 0 : r.name) || "");
3962
+ }, P = (h) => {
3963
+ var r;
3964
+ h && e("deleteChat", h, ((r = t.item.connection) == null ? void 0 : r.name) || "");
3965
+ }, v = (h, r) => {
3966
+ e("updateApiKey", h, r);
3967
+ }, b = (h, r) => {
3968
+ e("updateModel", h, r);
3969
+ }, k = (h, r) => {
3970
+ e("updateFastModel", h, r);
3965
3971
  };
3966
3972
  return {
3967
3973
  apiKeyInput: o,
3968
3974
  selectedModel: c,
3969
3975
  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);
3976
+ isExpandable: d,
3977
+ getItemName: S,
3978
+ handleItemClick: f,
3979
+ handleRefreshConnectionClick: A,
3980
+ getProviderType: Q,
3981
+ isConnected: ue,
3982
+ setAsActive: le,
3983
+ updateApiKey: v,
3984
+ updateModel: b,
3985
+ updateFastModel: k,
3986
+ handleApiKeyInput: () => {
3987
+ t.item.type !== "api-key" || !t.item.connection || o.value !== (t.item.connection.getApiKey() || "") && (a && clearTimeout(a), a = setTimeout(() => {
3988
+ v(t.item.connection, o.value);
3989
+ }, 500));
3979
3990
  },
3980
- updateModel: (p, D) => {
3981
- e("updateModel", p, D);
3991
+ handleModelChange: () => {
3992
+ t.item.type !== "model" || !t.item.connection || !c.value || c.value === t.item.connection.model || b(t.item.connection, c.value);
3982
3993
  },
3983
- updateFastModel: (p, D) => {
3984
- e("updateFastModel", p, D);
3985
- },
3986
- toggleSaveCredential: ce,
3987
- deleteConnection: v,
3988
- deleteChat: (p) => {
3989
- var D;
3990
- p && e("deleteChat", p, ((D = t.item.connection) == null ? void 0 : D.name) || "");
3994
+ handleFastModelChange: () => {
3995
+ if (t.item.type !== "fast-model" || !t.item.connection)
3996
+ return;
3997
+ const h = y.value || null;
3998
+ h !== (t.item.connection.fastModel || null) && k(t.item.connection, h);
3991
3999
  },
3992
- // Context menu
3993
- contextMenuVisible: a,
3994
- contextMenuPosition: d,
3995
- contextMenuItems: T,
3996
- showContextMenu: m,
3997
- handleContextMenuItemClick: R,
3998
- toggleCollapse: F,
4000
+ toggleSaveCredential: m,
4001
+ deleteConnection: g,
4002
+ deleteChat: P,
4003
+ contextMenuItems: p,
4004
+ handleContextMenuItemClick: w,
4005
+ toggleCollapse: N,
3999
4006
  // API key visibility
4000
4007
  showApiKey: i,
4001
4008
  toggleApiKeyVisibility: () => {
@@ -4003,38 +4010,38 @@ const Nn = /* @__PURE__ */ z(Ln, [["render", _n], ["__scopeId", "data-v-48938153
4003
4010
  }
4004
4011
  };
4005
4012
  }
4006
- }), Un = {
4013
+ }), qn = {
4007
4014
  key: 1,
4015
+ class: "mdi mdi-tune-vertical node-icon"
4016
+ }, Un = {
4017
+ key: 2,
4008
4018
  class: "mdi mdi-alert-circle node-icon"
4009
4019
  }, On = {
4010
- key: 2,
4011
- class: "mdi mdi-chat-outline node-icon"
4012
- }, Bn = {
4013
4020
  key: 3,
4014
- class: "mdi mdi-test-tube node-icon"
4021
+ class: "mdi mdi-chat-outline node-icon"
4015
4022
  }, xn = {
4016
4023
  key: 4,
4017
- class: "mdi mdi-chat-plus-outline node-icon"
4018
- }, Yn = {
4024
+ class: "mdi mdi-test-tube node-icon"
4025
+ }, Bn = {
4019
4026
  key: 5,
4020
- class: "mdi mdi-chat node-icon"
4027
+ class: "mdi mdi-chat-plus-outline node-icon"
4021
4028
  }, Fn = {
4022
4029
  key: 6,
4030
+ class: "mdi mdi-chat node-icon"
4031
+ }, Yn = {
4032
+ key: 7,
4023
4033
  class: "mdi mdi-folder-outline node-icon"
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 = {
4034
+ }, Gn = { class: "api-key-input-wrapper" }, Kn = ["type", "data-testid"], jn = ["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 sidebar-toggle-row" }, Zn = ["checked"], $n = { key: 0 }, eo = {
4025
4035
  key: 0,
4026
- class: "chat-actions"
4036
+ class: "connection-actions chat-actions"
4027
4037
  }, to = {
4028
4038
  key: 1,
4029
4039
  class: "connection-actions"
4030
- }, no = {
4031
- key: 0,
4032
- class: "mdi mdi-star loading-button is-active"
4033
4040
  };
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");
4036
- return r(), l("div", null, [
4037
- O(g, {
4041
+ function no(t, e, o, i, c, y) {
4042
+ const a = x("LLMProviderIcon"), p = x("tooltip"), w = x("connection-status-icon"), d = x("sidebar-overflow-menu"), S = x("sidebar-item");
4043
+ return l(), u("div", null, [
4044
+ G(S, {
4038
4045
  "item-id": t.item.id,
4039
4046
  name: t.getItemName(),
4040
4047
  indent: t.item.indent,
@@ -4043,237 +4050,176 @@ function oo(t, e, o, i, c, y) {
4043
4050
  "is-collapsed": t.isCollapsed,
4044
4051
  itemType: "llm-connection",
4045
4052
  onClick: t.handleItemClick,
4046
- onToggle: t.toggleCollapse,
4047
- onContextmenu: k(t.showContextMenu, ["prevent"])
4053
+ onToggle: t.toggleCollapse
4048
4054
  }, {
4049
4055
  icon: q(() => [
4050
- t.item.type === "connection" ? (r(), W(d, {
4056
+ t.item.type === "connection" ? (l(), W(a, {
4051
4057
  key: 0,
4052
4058
  "provider-type": t.getProviderType(t.item.connection)
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)
4059
+ }, null, 8, ["provider-type"])) : t.item.type === "settings-group" ? (l(), u("i", qn)) : t.item.type === "error" ? (l(), u("i", Un)) : t.item.type === "open-chat" ? (l(), u("i", On)) : t.item.type === "open-validation" ? (l(), u("i", xn)) : t.item.type === "new-chat" ? (l(), u("i", Bn)) : t.item.type === "chat-item" ? (l(), u("i", Fn)) : t.item.type === "chats-header" ? (l(), u("i", Yn)) : M("", !0)
4054
4060
  ]),
4055
4061
  name: q(() => [
4056
- t.item.type === "refresh-connection" ? (r(), l("div", {
4062
+ t.item.type === "refresh-connection" ? (l(), u("div", {
4057
4063
  key: 0,
4058
4064
  class: "refresh title-pad-left truncate-text sidebar-sub-item",
4059
- onClick: e[1] || (e[1] = (...h) => t.handleRefreshConnectionClick && t.handleRefreshConnectionClick(...h))
4060
- }, j(t.item.name), 1)) : t.item.type === "api-key" ? (r(), l("div", {
4065
+ onClick: e[0] || (e[0] = (...f) => t.handleRefreshConnectionClick && t.handleRefreshConnectionClick(...f))
4066
+ }, F(t.item.name), 1)) : t.item.type === "api-key" ? (l(), u("div", {
4061
4067
  key: 1,
4062
4068
  class: "api-key-container",
4063
- onClick: e[5] || (e[5] = k(() => {
4069
+ onClick: e[5] || (e[5] = R(() => {
4064
4070
  }, ["stop"]))
4065
4071
  }, [
4066
4072
  s("form", {
4067
- onSubmit: e[4] || (e[4] = k((h) => t.updateApiKey(t.item.connection, t.apiKeyInput), ["prevent"]))
4073
+ onSubmit: e[4] || (e[4] = R(() => {
4074
+ }, ["prevent"]))
4068
4075
  }, [
4069
- e[17] || (e[17] = s("button", {
4070
- type: "submit",
4071
- class: "customize-button"
4072
- }, "Update API Key", -1)),
4073
4076
  s("div", Gn, [
4074
- N(s("input", {
4077
+ D(s("input", {
4075
4078
  type: t.showApiKey ? "text" : "password",
4076
4079
  id: "api-key",
4077
- "onUpdate:modelValue": e[2] || (e[2] = (h) => t.apiKeyInput = h),
4080
+ "onUpdate:modelValue": e[1] || (e[1] = (f) => t.apiKeyInput = f),
4081
+ onInput: e[2] || (e[2] = (...f) => t.handleApiKeyInput && t.handleApiKeyInput(...f)),
4078
4082
  placeholder: "API Key",
4079
- class: "connection-customize",
4083
+ class: "connection-customize sidebar-control-input",
4080
4084
  "data-testid": `api-key-input-${t.item.connection.name}`
4081
- }, null, 8, jn), [
4082
- [Ge, t.apiKeyInput]
4085
+ }, null, 40, Kn), [
4086
+ [je, t.apiKeyInput]
4083
4087
  ]),
4084
4088
  s("button", {
4085
4089
  type: "button",
4086
- class: "visibility-toggle",
4087
- onClick: e[3] || (e[3] = (...h) => t.toggleApiKeyVisibility && t.toggleApiKeyVisibility(...h)),
4090
+ class: "visibility-toggle sidebar-icon-button",
4091
+ onClick: e[3] || (e[3] = (...f) => t.toggleApiKeyVisibility && t.toggleApiKeyVisibility(...f)),
4088
4092
  "data-testid": `toggle-api-key-visibility-${t.item.connection.name}`,
4089
4093
  title: t.showApiKey ? "Hide API Key" : "Show API Key"
4090
4094
  }, [
4091
4095
  s("i", {
4092
4096
  class: me(t.showApiKey ? "mdi mdi-eye-off" : "mdi mdi-eye")
4093
4097
  }, null, 2)
4094
- ], 8, Kn)
4098
+ ], 8, jn)
4095
4099
  ])
4096
4100
  ], 32)
4097
- ])) : t.item.type === "model" ? (r(), l("div", {
4101
+ ])) : t.item.type === "model" ? (l(), u("div", {
4098
4102
  key: 2,
4099
4103
  class: "api-key-container",
4100
- onClick: e[8] || (e[8] = k(() => {
4104
+ onClick: e[9] || (e[9] = R(() => {
4101
4105
  }, ["stop"]))
4102
4106
  }, [
4103
4107
  s("form", {
4104
- onSubmit: e[7] || (e[7] = k(() => {
4108
+ onSubmit: e[8] || (e[8] = R(() => {
4105
4109
  }, ["prevent"])),
4106
4110
  "data-testid": `model-update-form-${t.item.connection.name}`
4107
4111
  }, [
4108
- O(T, {
4109
- action: () => t.updateModel(t.item.connection, t.selectedModel),
4110
- "use-default-style": !1,
4111
- class: "customize-button",
4112
- "data-testid": `update-model-${t.item.connection.name}`
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),
4112
+ D(s("select", {
4113
+ "onUpdate:modelValue": e[6] || (e[6] = (f) => t.selectedModel = f),
4114
+ onChange: e[7] || (e[7] = (...f) => t.handleModelChange && t.handleModelChange(...f)),
4121
4115
  id: "connection-type",
4122
4116
  required: "",
4123
- class: "connection-customize",
4117
+ class: "connection-customize sidebar-control-select",
4124
4118
  "data-testid": `model-select-${t.item.connection.name}`
4125
4119
  }, [
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]
4120
+ (l(!0), u(pe, null, we(t.item.connection.models, (f) => (l(), u("option", {
4121
+ value: f,
4122
+ key: f,
4123
+ "data-testid": `model-option-${f}`
4124
+ }, F(f), 9, Hn))), 128))
4125
+ ], 40, Vn), [
4126
+ [Ce, t.selectedModel]
4133
4127
  ])
4134
4128
  ], 40, Qn)
4135
- ])) : t.item.type === "fast-model" ? (r(), l("div", {
4129
+ ])) : t.item.type === "fast-model" ? (l(), u("div", {
4136
4130
  key: 3,
4137
4131
  class: "api-key-container",
4138
- onClick: e[11] || (e[11] = k(() => {
4132
+ onClick: e[13] || (e[13] = R(() => {
4139
4133
  }, ["stop"]))
4140
4134
  }, [
4141
4135
  s("form", {
4142
- onSubmit: e[10] || (e[10] = k(() => {
4136
+ onSubmit: e[12] || (e[12] = R(() => {
4143
4137
  }, ["prevent"])),
4144
4138
  "data-testid": `fast-model-update-form-${t.item.connection.name}`
4145
4139
  }, [
4146
- O(T, {
4147
- action: () => t.updateFastModel(t.item.connection, t.selectedFastModel || null),
4148
- "use-default-style": !1,
4149
- class: "customize-button",
4150
- "data-testid": `update-fast-model-${t.item.connection.name}`
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),
4159
- class: "connection-customize",
4140
+ D(s("select", {
4141
+ "onUpdate:modelValue": e[10] || (e[10] = (f) => t.selectedFastModel = f),
4142
+ onChange: e[11] || (e[11] = (...f) => t.handleFastModelChange && t.handleFastModelChange(...f)),
4143
+ class: "connection-customize sidebar-control-select",
4160
4144
  "data-testid": `fast-model-select-${t.item.connection.name}`
4161
4145
  }, [
4162
- e[20] || (e[20] = s("option", {
4146
+ e[17] || (e[17] = s("option", {
4163
4147
  value: "",
4164
4148
  "data-testid": "fast-model-option-none"
4165
4149
  }, "(Use primary model)", -1)),
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]
4150
+ (l(!0), u(pe, null, we(t.item.connection.models, (f) => (l(), u("option", {
4151
+ value: f,
4152
+ key: f,
4153
+ "data-testid": `fast-model-option-${f}`
4154
+ }, F(f), 9, Xn))), 128))
4155
+ ], 40, zn), [
4156
+ [Ce, t.selectedFastModel]
4173
4157
  ])
4174
4158
  ], 40, Wn)
4175
- ])) : t.item.type === "toggle-save-credential" ? (r(), l("div", {
4159
+ ])) : t.item.type === "toggle-save-credential" ? (l(), u("div", {
4176
4160
  key: 4,
4177
4161
  class: "md-token-container",
4178
- onClick: e[13] || (e[13] = k(() => {
4162
+ onClick: e[15] || (e[15] = R(() => {
4179
4163
  }, ["stop"]))
4180
4164
  }, [
4181
4165
  s("label", Jn, [
4182
4166
  s("input", {
4183
4167
  type: "checkbox",
4184
4168
  checked: t.item.connection.saveCredential,
4185
- onChange: e[12] || (e[12] = (h) => t.toggleSaveCredential(t.item.connection))
4169
+ onChange: e[14] || (e[14] = (f) => t.toggleSaveCredential(t.item.connection))
4186
4170
  }, null, 40, Zn),
4187
- e[21] || (e[21] = s("span", { class: "checkbox-label" }, "Save Credentials", -1))
4171
+ e[18] || (e[18] = s("span", { class: "checkbox-label" }, "Save credentials", -1))
4188
4172
  ])
4189
- ])) : (r(), l("span", {
4173
+ ])) : (l(), u("span", {
4190
4174
  key: 5,
4191
4175
  class: me(["title-pad-left truncate-text", { "error-indicator": t.item.type === "error" }])
4192
4176
  }, [
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)
4177
+ be(F(t.item.name) + " ", 1),
4178
+ t.item.count !== void 0 && t.item.count > 0 ? (l(), u("span", $n, " (" + F(t.item.count) + ") ", 1)) : M("", !0)
4195
4179
  ], 2))
4196
4180
  ]),
4197
4181
  "extra-content": q(() => [
4198
- t.item.type === "chat-item" ? (r(), l("div", eo, [
4199
- O(m, {
4182
+ t.item.type === "chat-item" ? (l(), u("div", eo, [
4183
+ G(p, {
4200
4184
  class: "tactile-button",
4201
4185
  content: "Delete Chat",
4202
4186
  position: "left"
4203
4187
  }, {
4204
4188
  default: q(() => [
4205
4189
  s("span", {
4206
- class: "remove-btn hover-icon",
4207
- onClick: e[14] || (e[14] = k((h) => t.deleteChat(t.item.chatId), ["stop"]))
4208
- }, [...e[22] || (e[22] = [
4190
+ class: "remove-btn hover-icon sidebar-icon-button danger",
4191
+ onClick: e[16] || (e[16] = R((f) => t.deleteChat(t.item.chatId), ["stop"]))
4192
+ }, [...e[19] || (e[19] = [
4209
4193
  s("i", { class: "mdi mdi-trash-can-outline" }, null, -1)
4210
4194
  ])])
4211
4195
  ]),
4212
4196
  _: 1
4213
4197
  })
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, {
4217
- key: 1,
4218
- class: "loading-button",
4219
- onClick: e[15] || (e[15] = k(() => {
4220
- }, ["stop"])),
4221
- action: () => t.setAsActive(t.item.id),
4222
- title: "Set as default"
4223
- }, {
4224
- default: q(() => [...e[23] || (e[23] = [
4225
- s("i", { class: "mdi mdi-star-outline" }, null, -1)
4226
- ])]),
4227
- _: 1
4228
- }, 8, ["action"])),
4229
- t.item.connection ? (r(), W(R, {
4230
- key: 2,
4231
- connection: t.item.connection,
4232
- type: "llm",
4233
- "is-connected": t.isConnected(t.item.connection),
4234
- "data-testid": `refresh-llm-connection-${t.item.connection.name}`
4235
- }, null, 8, ["connection", "is-connected", "data-testid"])) : A("", !0),
4236
- O(m, {
4237
- class: "tacticle-button",
4238
- content: "Delete Connection",
4239
- position: "left"
4240
- }, {
4241
- default: q(() => [
4242
- s("span", {
4243
- class: "remove-btn",
4244
- onClick: e[16] || (e[16] = k((h) => t.deleteConnection(t.item.id), ["stop"]))
4245
- }, [...e[24] || (e[24] = [
4246
- s("i", { class: "mdi mdi-trash-can-outline tactile-button" }, null, -1)
4247
- ])])
4248
- ]),
4249
- _: 1
4250
- }),
4251
- t.item.connection ? (r(), W(P, {
4252
- key: 3,
4198
+ ])) : M("", !0),
4199
+ t.item.type === "connection" ? (l(), u("div", to, [
4200
+ t.item.connection ? (l(), W(w, {
4201
+ key: 0,
4253
4202
  connection: t.item.connection
4254
- }, null, 8, ["connection"])) : A("", !0)
4255
- ])) : A("", !0)
4256
- ]),
4257
- default: q(() => [
4258
- O(a, {
4259
- items: t.contextMenuItems,
4260
- position: t.contextMenuPosition,
4261
- "is-visible": t.contextMenuVisible,
4262
- onItemClick: t.handleContextMenuItemClick,
4263
- onClose: e[0] || (e[0] = (h) => t.contextMenuVisible = !1)
4264
- }, null, 8, ["items", "position", "is-visible", "onItemClick"])
4203
+ }, null, 8, ["connection"])) : M("", !0),
4204
+ G(d, {
4205
+ items: t.contextMenuItems,
4206
+ tooltip: "Connection actions",
4207
+ "test-id-base": `llm-connection-actions-${t.item.id}`,
4208
+ onSelect: t.handleContextMenuItemClick
4209
+ }, null, 8, ["items", "test-id-base", "onSelect"])
4210
+ ])) : M("", !0)
4265
4211
  ]),
4266
4212
  _: 1
4267
- }, 8, ["item-id", "name", "indent", "is-selected", "is-collapsible", "is-collapsed", "onClick", "onToggle", "onContextmenu"])
4213
+ }, 8, ["item-id", "name", "indent", "is-selected", "is-collapsible", "is-collapsed", "onClick", "onToggle"])
4268
4214
  ]);
4269
4215
  }
4270
- const io = /* @__PURE__ */ z(qn, [["render", oo], ["__scopeId", "data-v-45d1389b"]]), ve = {
4216
+ const oo = /* @__PURE__ */ Z(Nn, [["render", no], ["__scopeId", "data-v-9af9356c"]]), fe = {
4271
4217
  openai: ["gpt-5.3", "gpt-5.2", "gpt-5.2-mini"],
4272
4218
  anthropic: ["claude-opus-4-6-20260514", "claude-opus-4-20250514", "claude-sonnet-4-20250514"],
4273
4219
  google: ["models/gemini-2.5-pro", "models/gemini-2.5-flash"],
4274
4220
  openrouter: ["anthropic/claude-sonnet-4", "openai/gpt-4o", "google/gemini-2.5-pro"],
4275
4221
  demo: ["deepseek/deepseek-v3.2"]
4276
- }, ao = ae({
4222
+ }, io = ce({
4277
4223
  name: "LLMConnectionCreator",
4278
4224
  props: {
4279
4225
  visible: {
@@ -4292,10 +4238,10 @@ const io = /* @__PURE__ */ z(qn, [["render", oo], ["__scopeId", "data-v-45d1389b
4292
4238
  }
4293
4239
  },
4294
4240
  components: {
4295
- LoadingButton: Ce
4241
+ LoadingButton: Re
4296
4242
  },
4297
4243
  setup(t, { emit: e }) {
4298
- const o = S({
4244
+ const o = C({
4299
4245
  name: "",
4300
4246
  type: "demo",
4301
4247
  options: {
@@ -4303,7 +4249,7 @@ const io = /* @__PURE__ */ z(qn, [["render", oo], ["__scopeId", "data-v-45d1389b
4303
4249
  model: "deepseek/deepseek-v3.2",
4304
4250
  saveCredential: !1
4305
4251
  }
4306
- }), i = Y("llmConnectionStore");
4252
+ }), i = _("llmConnectionStore");
4307
4253
  if (!i)
4308
4254
  throw new Error("must inject llmConnectionStore to LLMConnectionCreator");
4309
4255
  const c = i.connections, y = () => {
@@ -4312,37 +4258,37 @@ const io = /* @__PURE__ */ z(qn, [["render", oo], ["__scopeId", "data-v-45d1389b
4312
4258
  model: "",
4313
4259
  saveCredential: !1
4314
4260
  }, a("demo");
4315
- }, a = (m) => {
4316
- switch (m) {
4261
+ }, a = (d) => {
4262
+ switch (d) {
4317
4263
  case "openai":
4318
- o.value.options.model = Ne.getDefaultModel(
4319
- ve.openai
4264
+ o.value.options.model = Oe.getDefaultModel(
4265
+ fe.openai
4320
4266
  );
4321
4267
  break;
4322
4268
  case "anthropic":
4323
- o.value.options.model = _e.getDefaultModel(
4324
- ve.anthropic
4269
+ o.value.options.model = Ue.getDefaultModel(
4270
+ fe.anthropic
4325
4271
  );
4326
4272
  break;
4327
4273
  case "google":
4328
- o.value.options.model = qe.getDefaultModel(
4329
- ve.google
4274
+ o.value.options.model = xe.getDefaultModel(
4275
+ fe.google
4330
4276
  );
4331
4277
  break;
4332
4278
  case "demo":
4333
- o.value.options.model = We.getDefaultModel(ve.demo);
4279
+ o.value.options.model = Xe.getDefaultModel(fe.demo);
4334
4280
  break;
4335
4281
  case "openrouter":
4336
- o.value.options.model = He.getDefaultModel(
4337
- ve.openrouter
4282
+ o.value.options.model = ze.getDefaultModel(
4283
+ fe.openrouter
4338
4284
  );
4339
4285
  break;
4340
4286
  default:
4341
4287
  o.value.options.model = "";
4342
4288
  }
4343
- }, d = async () => {
4344
- await T();
4345
- }, T = async () => {
4289
+ }, p = async () => {
4290
+ await w();
4291
+ }, w = async () => {
4346
4292
  if (!o.value.name)
4347
4293
  throw new Error("Connection name is required");
4348
4294
  if (!o.value.type)
@@ -4359,8 +4305,8 @@ const io = /* @__PURE__ */ z(qn, [["render", oo], ["__scopeId", "data-v-45d1389b
4359
4305
  connectionDetails: o,
4360
4306
  connections: c,
4361
4307
  createConnection: y,
4362
- handleSubmitConnection: T,
4363
- submitConnectionCreation: d,
4308
+ handleSubmitConnection: w,
4309
+ submitConnectionCreation: p,
4364
4310
  updateDefaultModel: a
4365
4311
  };
4366
4312
  },
@@ -4371,94 +4317,97 @@ const io = /* @__PURE__ */ z(qn, [["render", oo], ["__scopeId", "data-v-45d1389b
4371
4317
  }
4372
4318
  }
4373
4319
  }
4374
- }), so = {
4320
+ }), ao = {
4375
4321
  key: 0,
4376
4322
  class: "creator-container"
4377
- }, ro = { class: "form-row" }, lo = { class: "form-row" }, co = {
4323
+ }, so = { class: "form-row" }, ro = { class: "form-row" }, lo = {
4378
4324
  key: 0,
4379
4325
  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) {
4382
- const a = U("loading-button");
4383
- return t.visible ? (r(), l("div", so, [
4326
+ }, co = { class: "form-row" }, uo = { class: "form-row" }, po = { class: "button-row" };
4327
+ function mo(t, e, o, i, c, y) {
4328
+ const a = x("loading-button");
4329
+ return t.visible ? (l(), u("div", ao, [
4384
4330
  s("form", {
4385
- onSubmit: e[5] || (e[5] = k((...d) => t.submitConnectionCreation && t.submitConnectionCreation(...d), ["prevent"]))
4331
+ onSubmit: e[5] || (e[5] = R((...p) => t.submitConnectionCreation && t.submitConnectionCreation(...p), ["prevent"]))
4386
4332
  }, [
4387
- s("div", ro, [
4333
+ s("div", so, [
4388
4334
  e[6] || (e[6] = s("label", { for: "llm-connection-name" }, "Name", -1)),
4389
- N(s("input", {
4335
+ D(s("input", {
4390
4336
  type: "text",
4391
- "onUpdate:modelValue": e[0] || (e[0] = (d) => t.connectionDetails.name = d),
4337
+ "onUpdate:modelValue": e[0] || (e[0] = (p) => t.connectionDetails.name = p),
4338
+ class: "sidebar-control-input",
4392
4339
  id: "llm-connection-name",
4393
4340
  required: "",
4394
4341
  "data-testid": "llm-connection-creator-name",
4395
4342
  placeholder: "Connection Name"
4396
4343
  }, null, 512), [
4397
- [G, t.connectionDetails.name]
4344
+ [B, t.connectionDetails.name]
4398
4345
  ])
4399
4346
  ]),
4400
- s("div", lo, [
4347
+ s("div", ro, [
4401
4348
  e[8] || (e[8] = s("label", { for: "llm-provider-type" }, "Provider", -1)),
4402
- N(s("select", {
4403
- "onUpdate:modelValue": e[1] || (e[1] = (d) => t.connectionDetails.type = d),
4349
+ D(s("select", {
4350
+ "onUpdate:modelValue": e[1] || (e[1] = (p) => t.connectionDetails.type = p),
4351
+ class: "sidebar-control-select",
4404
4352
  id: "llm-provider-type",
4405
4353
  required: "",
4406
4354
  "data-testid": "llm-connection-creator-type"
4407
4355
  }, [...e[7] || (e[7] = [
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)
4356
+ Qe('<option value="demo" data-testid="llm-connection-creator-demo" data-v-bb0a7bcc>Demo (Free Trial)</option><option value="openai" data-testid="llm-connection-creator-openai" data-v-bb0a7bcc>OpenAI</option><option value="anthropic" data-testid="llm-connection-creator-anthropic" data-v-bb0a7bcc> Anthropic </option><option value="google" data-testid="llm-connection-creator-google" data-v-bb0a7bcc>Google</option><option value="openrouter" data-testid="llm-connection-creator-openrouter" data-v-bb0a7bcc> OpenRouter </option>', 5)
4409
4357
  ])], 512), [
4410
- [Ee, t.connectionDetails.type]
4358
+ [Ce, t.connectionDetails.type]
4411
4359
  ])
4412
4360
  ]),
4413
- t.connectionDetails.type === "demo" ? (r(), l("div", co, [...e[9] || (e[9] = [
4361
+ t.connectionDetails.type === "demo" ? (l(), u("div", lo, [...e[9] || (e[9] = [
4414
4362
  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, [
4363
+ ])])) : M("", !0),
4364
+ t.connectionDetails.type !== "demo" ? (l(), u(pe, { key: 1 }, [
4365
+ s("div", co, [
4418
4366
  e[10] || (e[10] = s("label", { for: "llm-api-key" }, "API Key", -1)),
4419
- N(s("input", {
4367
+ D(s("input", {
4420
4368
  type: "password",
4421
- "onUpdate:modelValue": e[2] || (e[2] = (d) => t.connectionDetails.options.apiKey = d),
4369
+ "onUpdate:modelValue": e[2] || (e[2] = (p) => t.connectionDetails.options.apiKey = p),
4370
+ class: "sidebar-control-input",
4422
4371
  id: "llm-api-key",
4423
4372
  placeholder: "API Key",
4424
4373
  required: "",
4425
4374
  "data-testid": "llm-connection-creator-api-key"
4426
4375
  }, null, 512), [
4427
- [G, t.connectionDetails.options.apiKey]
4376
+ [B, t.connectionDetails.options.apiKey]
4428
4377
  ])
4429
4378
  ]),
4430
- s("div", po, [
4379
+ s("div", uo, [
4431
4380
  e[11] || (e[11] = s("label", { for: "save-credential" }, "Save Credential?", -1)),
4432
- N(s("input", {
4381
+ D(s("input", {
4433
4382
  type: "checkbox",
4434
4383
  id: "save-credential",
4435
- "onUpdate:modelValue": e[3] || (e[3] = (d) => t.connectionDetails.options.saveCredential = d),
4384
+ "onUpdate:modelValue": e[3] || (e[3] = (p) => t.connectionDetails.options.saveCredential = p),
4436
4385
  "data-testid": "llm-connection-creator-save-credential"
4437
4386
  }, null, 512), [
4438
- [Pe, t.connectionDetails.options.saveCredential]
4387
+ [Me, t.connectionDetails.options.saveCredential]
4439
4388
  ])
4440
4389
  ])
4441
- ], 64)) : A("", !0),
4442
- s("div", mo, [
4443
- O(a, {
4390
+ ], 64)) : M("", !0),
4391
+ s("div", po, [
4392
+ G(a, {
4444
4393
  "data-testid": "llm-connection-creator-submit",
4445
4394
  action: t.handleSubmitConnection,
4446
4395
  class: "submit-button"
4447
4396
  }, {
4448
4397
  default: q(() => [...e[12] || (e[12] = [
4449
- ie(" Submit ", -1)
4398
+ be(" Submit ", -1)
4450
4399
  ])]),
4451
4400
  _: 1
4452
4401
  }, 8, ["action"]),
4453
4402
  s("button", {
4454
4403
  type: "button",
4455
- onClick: e[4] || (e[4] = (d) => t.close())
4404
+ onClick: e[4] || (e[4] = (p) => t.close())
4456
4405
  }, "Cancel")
4457
4406
  ])
4458
4407
  ], 32)
4459
- ])) : A("", !0);
4408
+ ])) : M("", !0);
4460
4409
  }
4461
- const yo = /* @__PURE__ */ z(ao, [["render", ho], ["__scopeId", "data-v-56d82681"]]), fo = {
4410
+ const ho = /* @__PURE__ */ Z(io, [["render", mo], ["__scopeId", "data-v-bb0a7bcc"]]), yo = {
4462
4411
  name: "LLMConnectionList",
4463
4412
  props: {
4464
4413
  activeLLMKey: {
@@ -4474,184 +4423,183 @@ const yo = /* @__PURE__ */ z(ao, [["render", ho], ["__scopeId", "data-v-56d82681
4474
4423
  },
4475
4424
  emits: ["llm-open-view", "create-new-chat", "open-chat"],
4476
4425
  setup(t, { emit: e }) {
4477
- const o = Y("llmConnectionStore"), i = Y("saveLLMConnections"), c = Y("chatStore", null);
4426
+ const o = _("llmConnectionStore"), i = _("saveLLMConnections"), c = _("chatStore", null);
4478
4427
  if (!o || !i)
4479
4428
  throw new Error("LLM connection store is not provided!");
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";
4429
+ const y = Je(), a = C({}), p = C({}), w = C(!1), d = C({}), S = (g) => `${g}-settings`, f = async (g, P) => {
4430
+ P && (await o.connections[g.name].setApiKey(P), o.resetConnection(g.name), await i());
4431
+ }, N = (g, P) => {
4432
+ P && (o.connections[g.name].setModel(P), o.resetConnection(g.name), i());
4433
+ }, A = (g, P) => {
4434
+ o.connections[g.name].setFastModel(P), i();
4435
+ }, m = async (g, P, v) => {
4436
+ if (!o.connections[P]) {
4437
+ p.value[g] = "Connection not found";
4489
4438
  return;
4490
4439
  }
4491
4440
  try {
4492
- if (a.value[f] = !0, v === "connection") {
4493
- const b = o.connections[C];
4441
+ if (a.value[g] = !0, v === "connection") {
4442
+ const b = o.connections[P];
4494
4443
  b.testConnection && await b.testConnection();
4495
4444
  }
4496
- delete d.value[f];
4445
+ delete p.value[g];
4497
4446
  } catch (b) {
4498
- b instanceof Error ? d.value[f] = b.message : d.value[f] = "An error occurred";
4447
+ b instanceof Error ? p.value[g] = b.message : p.value[g] = "An error occurred";
4499
4448
  }
4500
- delete a.value[f];
4501
- }, F = async (f, C, v, b) => {
4449
+ delete a.value[g];
4450
+ }, Q = async (g, P, v, b) => {
4502
4451
  if (v === "new-chat") {
4503
- e("create-new-chat", C);
4452
+ e("create-new-chat", P);
4504
4453
  return;
4505
4454
  }
4506
4455
  if (v === "chat-item") {
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);
4456
+ c && (b != null && b.chatId) && (c.setActiveChat(b.chatId), o.activeConnection = P), e("llm-open-view", P, "chat", b == null ? void 0 : b.chatId);
4508
4457
  return;
4509
4458
  }
4510
4459
  if (v === "open-chat") {
4511
- e("llm-open-view", C, "chat");
4460
+ e("llm-open-view", P, "chat");
4512
4461
  return;
4513
4462
  }
4514
4463
  if (v === "open-validation") {
4515
- e("llm-open-view", C, "validation");
4464
+ e("llm-open-view", P, "validation");
4516
4465
  return;
4517
4466
  }
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}`);
4467
+ if (v === "connection" && (d.value[g] === void 0 || d.value[g] === !0)) {
4468
+ const k = o.connections[P];
4469
+ if (!k) {
4470
+ console.log(`Connection not found ${k}`);
4522
4471
  return;
4523
4472
  }
4524
- (!I.models || I.models.length === 0) && await h(f, C, "models");
4473
+ (!k.models || k.models.length === 0) && await m(g, P, "models");
4525
4474
  }
4526
- g.value[f] === void 0 ? g.value[f] = !1 : g.value[f] = !g.value[f];
4475
+ d.value[g] === void 0 ? d.value[g] = !1 : d.value[g] = !d.value[g];
4527
4476
  };
4528
- Object.entries(o.connections).forEach(([f, C]) => {
4529
- let v = f;
4530
- g.value[v] = !0;
4531
- }), Ie(() => {
4532
- const f = Xe("llm-key", "");
4533
- if (f) {
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));
4536
- }
4477
+ Object.entries(o.connections).forEach(([g]) => {
4478
+ d.value[g] = !0, d.value[S(g)] = !0;
4479
+ }), Le(() => {
4480
+ const g = Ze("llm-key", "");
4481
+ if (!g)
4482
+ return;
4483
+ const P = g.split(L), v = P[0], b = P[1];
4484
+ v && o.connections[v] && (d.value[v] = !1, o.activeConnection = v, b && c && c.setActiveChat(b));
4537
4485
  });
4538
- const w = J(() => {
4539
- const f = [];
4486
+ const ue = z(() => {
4487
+ const g = [];
4540
4488
  return Object.entries(o.connections).sort(
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);
4489
+ ([v, b], [k, ne]) => {
4490
+ const X = b, V = ne;
4491
+ return X.connected && !V.connected ? -1 : !X.connected && V.connected ? 1 : v.localeCompare(k);
4544
4492
  }
4545
4493
  ).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({
4494
+ var V;
4495
+ const k = b, ne = ((V = k.availableModels) == null ? void 0 : V.length) || 0;
4496
+ if (k.deleted || (g.push({
4549
4497
  id: v,
4550
4498
  name: v,
4551
4499
  indent: 0,
4552
- count: te,
4500
+ count: ne,
4553
4501
  type: "connection",
4554
- connection: I
4555
- }), g.value[v] === !1)) {
4556
- const K = c ? c.getConnectionChats(v) : [];
4557
- f.push({
4558
- id: `${v}-new-chat`,
4559
- name: "New Chat",
4560
- indent: 1,
4561
- count: K.length,
4562
- type: "new-chat",
4563
- connection: I
4564
- }), K.forEach((p) => {
4565
- f.push({
4566
- id: `${v}-chat-${p.id}`,
4567
- name: p.name,
4568
- indent: 2,
4569
- count: p.messages.length,
4570
- type: "chat-item",
4571
- connection: I,
4572
- chat: p,
4573
- chatId: p.id
4574
- });
4575
- }), f.push({
4576
- id: `${v}-open-validation`,
4577
- name: "Validation Tests",
4578
- indent: 1,
4579
- count: 0,
4580
- type: "open-validation",
4581
- connection: I
4582
- }), I.type !== "demo" && f.push({
4583
- id: `${v}-api-key`,
4584
- name: "API Key",
4585
- indent: 1,
4586
- count: 0,
4587
- type: "api-key",
4588
- connection: I
4589
- }), f.push({
4590
- id: `${v}-model`,
4591
- name: "Model",
4592
- indent: 1,
4593
- count: 0,
4594
- type: "model",
4595
- connection: I
4596
- }), f.push({
4597
- id: `${v}-fast-model`,
4598
- name: "Fast Model",
4599
- indent: 1,
4600
- count: 0,
4601
- type: "fast-model",
4602
- connection: I
4603
- }), I.type !== "demo" && f.push({
4604
- id: `${v}-toggle-save-credential`,
4605
- name: "Toggle Save Credential",
4606
- indent: 1,
4607
- count: 0,
4608
- type: "toggle-save-credential",
4609
- connection: I
4610
- }), a.value[v] && f.push({
4611
- id: `${v}-loading`,
4612
- name: "Loading...",
4613
- indent: 1,
4614
- count: 0,
4615
- type: "loading",
4616
- connection: I
4617
- }), d.value[v] && f.push({
4618
- id: `${v}-error`,
4619
- name: d.value[v],
4620
- indent: 1,
4621
- count: 0,
4622
- type: "error",
4623
- connection: I
4502
+ connection: k
4503
+ }), d.value[v] !== !1))
4504
+ return;
4505
+ const X = c ? c.getConnectionChats(v) : [];
4506
+ g.push({
4507
+ id: `${v}-new-chat`,
4508
+ name: "New Chat",
4509
+ indent: 1,
4510
+ count: X.length,
4511
+ type: "new-chat",
4512
+ connection: k
4513
+ }), X.forEach((J) => {
4514
+ g.push({
4515
+ id: `${v}-chat-${J.id}`,
4516
+ name: J.name,
4517
+ indent: 2,
4518
+ count: J.messages.length,
4519
+ type: "chat-item",
4520
+ connection: k,
4521
+ chat: J,
4522
+ chatId: J.id
4624
4523
  });
4625
- }
4626
- }), f;
4524
+ }), g.push({
4525
+ id: `${v}-open-validation`,
4526
+ name: "Validation Tests",
4527
+ indent: 1,
4528
+ count: 0,
4529
+ type: "open-validation",
4530
+ connection: k
4531
+ }), g.push({
4532
+ id: S(v),
4533
+ name: "Settings",
4534
+ indent: 1,
4535
+ count: 0,
4536
+ type: "settings-group",
4537
+ connection: k
4538
+ }), d.value[S(v)] === !1 && (k.type !== "demo" && g.push({
4539
+ id: `${v}-api-key`,
4540
+ name: "API Key",
4541
+ indent: 2,
4542
+ count: 0,
4543
+ type: "api-key",
4544
+ connection: k
4545
+ }), g.push({
4546
+ id: `${v}-model`,
4547
+ name: "Model",
4548
+ indent: 2,
4549
+ count: 0,
4550
+ type: "model",
4551
+ connection: k
4552
+ }), g.push({
4553
+ id: `${v}-fast-model`,
4554
+ name: "Fast Model",
4555
+ indent: 2,
4556
+ count: 0,
4557
+ type: "fast-model",
4558
+ connection: k
4559
+ }), k.type !== "demo" && g.push({
4560
+ id: `${v}-toggle-save-credential`,
4561
+ name: "Toggle Save Credential",
4562
+ indent: 2,
4563
+ count: 0,
4564
+ type: "toggle-save-credential",
4565
+ connection: k
4566
+ })), a.value[v] && g.push({
4567
+ id: `${v}-loading`,
4568
+ name: "Loading...",
4569
+ indent: 1,
4570
+ count: 0,
4571
+ type: "loading",
4572
+ connection: k
4573
+ }), p.value[v] && g.push({
4574
+ id: `${v}-error`,
4575
+ name: p.value[v],
4576
+ indent: 1,
4577
+ count: 0,
4578
+ type: "error",
4579
+ connection: k
4580
+ });
4581
+ }), g;
4627
4582
  });
4628
4583
  return {
4629
4584
  llmConnectionStore: o,
4630
4585
  chatStore: c,
4631
- contentList: w,
4632
- toggleCollapse: F,
4633
- collapsed: g,
4586
+ contentList: ue,
4587
+ toggleCollapse: Q,
4588
+ collapsed: d,
4634
4589
  saveConnections: i,
4635
- updateApiKey: m,
4636
- updateModel: R,
4637
- updateFastModel: P,
4638
- refreshId: h,
4639
- rightSplit: (f) => {
4640
- const C = f.lastIndexOf(_);
4641
- return C !== -1 ? f.substring(0, C) : f;
4642
- },
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,
4590
+ updateApiKey: f,
4591
+ updateModel: N,
4592
+ updateFastModel: A,
4593
+ refreshId: m,
4594
+ creatorVisible: w,
4595
+ isItemSelected: (g) => g.type === "chat-item" && g.chatId && c ? g.chatId === c.activeChatId : g.type === "connection" ? g.id === o.activeConnection : !1,
4645
4596
  screenNavigation: y
4646
4597
  };
4647
4598
  },
4648
4599
  components: {
4649
- SidebarList: De,
4650
- LLMConnectionListItem: io,
4651
- LLMConnectionCreator: yo,
4652
- LoadingButton: Ce,
4653
- StatusIcon: Le,
4654
- Tooltip: Se
4600
+ SidebarList: qe,
4601
+ LLMConnectionListItem: oo,
4602
+ LLMConnectionCreator: ho
4655
4603
  },
4656
4604
  methods: {
4657
4605
  resetConnection(t) {
@@ -4664,7 +4612,7 @@ const yo = /* @__PURE__ */ z(ao, [["render", ho], ["__scopeId", "data-v-56d82681
4664
4612
  },
4665
4613
  deleteConnection(t, e) {
4666
4614
  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);
4615
+ this.screenNavigation.closeTab(null, `${e}${L}${i.id}`), this.chatStore.removeChat(i.id);
4668
4616
  }), this.screenNavigation.closeTab(null, e), this.llmConnectionStore.connections[e].delete(), this.llmConnectionStore.activeConnection === t && (this.llmConnectionStore.activeConnection = ""));
4669
4617
  },
4670
4618
  deleteChat(t, e) {
@@ -4679,28 +4627,35 @@ const yo = /* @__PURE__ */ z(ao, [["render", ho], ["__scopeId", "data-v-56d82681
4679
4627
  return Object.values(this.llmConnectionStore.connections);
4680
4628
  }
4681
4629
  }
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" }, {
4686
- actions: q(() => [
4630
+ }, go = { class: "llm-header" }, fo = ["data-testid"];
4631
+ function wo(t, e, o, i, c, y) {
4632
+ const a = x("LLMConnectionCreator"), p = x("LLMConnectionListItem"), w = x("sidebar-list");
4633
+ return l(), W(w, { title: "AI & Agents" }, {
4634
+ header: q(() => [
4687
4635
  s("div", go, [
4636
+ e[3] || (e[3] = s("h3", { class: "font-sans sidebar-header" }, "AI & Agents", -1)),
4688
4637
  s("button", {
4689
- onClick: e[0] || (e[0] = (m) => i.creatorVisible = !i.creatorVisible),
4638
+ class: "sidebar-control-button sidebar-header-action llm-new-button",
4639
+ onClick: e[0] || (e[0] = (d) => i.creatorVisible = !i.creatorVisible),
4690
4640
  "data-testid": o.testTag ? `llm-connection-creator-add-${o.testTag}` : "llm-connection-creator-add"
4691
- }, j(i.creatorVisible ? "Hide" : "New"), 9, wo)
4692
- ]),
4693
- O(a, {
4641
+ }, [
4642
+ e[2] || (e[2] = s("i", { class: "mdi mdi-plus" }, null, -1)),
4643
+ be(" " + F(i.creatorVisible ? "Close" : "New"), 1)
4644
+ ], 8, fo)
4645
+ ])
4646
+ ]),
4647
+ actions: q(() => [
4648
+ G(a, {
4694
4649
  visible: i.creatorVisible,
4695
- onClose: e[1] || (e[1] = (m) => i.creatorVisible = !i.creatorVisible)
4650
+ onClose: e[1] || (e[1] = (d) => i.creatorVisible = !i.creatorVisible)
4696
4651
  }, null, 8, ["visible"])
4697
4652
  ]),
4698
4653
  default: q(() => [
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),
4654
+ (l(!0), u(pe, null, we(i.contentList, (d) => (l(), W(p, {
4655
+ key: d.id,
4656
+ item: d,
4657
+ "is-collapsed": i.collapsed[d.id],
4658
+ isSelected: i.isItemSelected(d),
4704
4659
  onToggle: i.toggleCollapse,
4705
4660
  onRefresh: i.refreshId,
4706
4661
  onUpdateApiKey: i.updateApiKey,
@@ -4715,10 +4670,10 @@ function To(t, e, o, i, c, y) {
4715
4670
  _: 1
4716
4671
  });
4717
4672
  }
4718
- const ko = /* @__PURE__ */ z(fo, [["render", To], ["__scopeId", "data-v-cd5d5232"]]);
4673
+ const Co = /* @__PURE__ */ Z(yo, [["render", wo], ["__scopeId", "data-v-be74feb0"]]);
4719
4674
  export {
4720
- So as C,
4721
- ko as L,
4722
- Tt as a,
4723
- Co as d
4675
+ Eo as C,
4676
+ Co as L,
4677
+ vt as a,
4678
+ So as d
4724
4679
  };