cognova 0.1.9 → 0.2.0

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 (299) hide show
  1. package/.output/nitro.json +1 -1
  2. package/.output/public/_nuxt/{B4LjQa2N.js → 4MiwzAAt.js} +2 -2
  3. package/.output/public/_nuxt/{BZZeOWzQ.js → 5ZXA0Ckq.js} +1 -1
  4. package/.output/public/_nuxt/{B194okoV.js → 9IQmsEjr.js} +1 -1
  5. package/.output/public/_nuxt/{DQ_ZoW_9.js → 9QnH0xQM.js} +1 -1
  6. package/.output/public/_nuxt/{CF0HGIV6.js → B1X4Bzcy.js} +1 -1
  7. package/.output/public/_nuxt/{D9lowtoI.js → B3y_Qqox.js} +1 -1
  8. package/.output/public/_nuxt/{BB1R_SaV.js → B6S_ob86.js} +1 -1
  9. package/.output/public/_nuxt/{DVf1IpSh.js → BAIz-dEB.js} +1 -1
  10. package/.output/public/_nuxt/{CNFNMRY1.js → BCtfQCzC.js} +1 -1
  11. package/.output/public/_nuxt/BIIJhjQO.js +1 -0
  12. package/.output/public/_nuxt/BIckl6wA.js +1 -0
  13. package/.output/public/_nuxt/{Biy6boRV.js → BJ3o57WW.js} +1 -1
  14. package/.output/public/_nuxt/{B5rIsDOv.js → BNetzZzF.js} +1 -1
  15. package/.output/public/_nuxt/{DFXLcgxL.js → BOj6t-oo.js} +1 -1
  16. package/.output/public/_nuxt/{BDUpLPg_.js → BS0ofHJK.js} +1 -1
  17. package/.output/public/_nuxt/{DIdcflWi.js → BWhMnjID.js} +1 -1
  18. package/.output/public/_nuxt/{CExLOuIW.js → BYjadNrw.js} +1 -1
  19. package/.output/public/_nuxt/{C8ytOrRD.js → BZXMQuYP.js} +1 -1
  20. package/.output/public/_nuxt/{Ddih3UKd.js → B_3_hrpn.js} +1 -1
  21. package/.output/public/_nuxt/{CxSyRXlk.js → BaBZjmMC.js} +1 -1
  22. package/.output/public/_nuxt/BaMqDm5u.js +1 -0
  23. package/.output/public/_nuxt/BasgsT_S.js +1 -0
  24. package/.output/public/_nuxt/{Cehzuz52.js → BffWCM73.js} +1 -1
  25. package/.output/public/_nuxt/{Dh0BcDEI.js → BhzMoffi.js} +1 -1
  26. package/.output/public/_nuxt/{DmV68Eyp.js → BjjCvHLT.js} +1 -1
  27. package/.output/public/_nuxt/{nzAH3Wk0.js → BlAZO7nq.js} +1 -1
  28. package/.output/public/_nuxt/{BRPJdy3u.js → BlhFigLL.js} +1 -1
  29. package/.output/public/_nuxt/{CfTFjEuh.js → Bm9LyG4F.js} +1 -1
  30. package/.output/public/_nuxt/BoIxv-gM.js +1 -0
  31. package/.output/public/_nuxt/{BslL2E8V.js → BqKFIuRj.js} +1 -1
  32. package/.output/public/_nuxt/Br19oYkq.js +1 -0
  33. package/.output/public/_nuxt/{PtGESE-F.js → BrNqhp1a.js} +3 -3
  34. package/.output/public/_nuxt/{FvV9sv7q.js → BsEZoHd1.js} +1 -1
  35. package/.output/public/_nuxt/{BaPPQtFe.js → BxXOsXrM.js} +10 -10
  36. package/.output/public/_nuxt/BzOqrmGa.js +7 -0
  37. package/.output/public/_nuxt/{BNAsyazX.js → C0JKNMDO.js} +1 -1
  38. package/.output/public/_nuxt/C0kh_F7v.js +1 -0
  39. package/.output/public/_nuxt/{4Ew5YctE.js → C3FxIITy.js} +1 -1
  40. package/.output/public/_nuxt/{DnToOWVx.js → C4pxqdgg.js} +1 -1
  41. package/.output/public/_nuxt/{C5Ue4WbD.js → C61KgSco.js} +1 -1
  42. package/.output/public/_nuxt/{DcMvYcFq.js → C69W7k2j.js} +1 -1
  43. package/.output/public/_nuxt/{BnnFvWzv.js → C6RC3lA1.js} +1 -1
  44. package/.output/public/_nuxt/{DBENYi9d.js → C6aqGHu1.js} +1 -1
  45. package/.output/public/_nuxt/{YldWqMAh.js → CJUdYEdO.js} +1 -1
  46. package/.output/public/_nuxt/{BPAM-iC7.js → CKkC3Ptm.js} +1 -1
  47. package/.output/public/_nuxt/{CTXhFIUN.js → CNnJrDvu.js} +1 -1
  48. package/.output/public/_nuxt/{BwH2E0-a.js → CVJQGP1Q.js} +1 -1
  49. package/.output/public/_nuxt/{q0vhMpUB.js → CVgTJeSq.js} +1 -1
  50. package/.output/public/_nuxt/CWMUi89H.js +1 -0
  51. package/.output/public/_nuxt/{BU9VyOEC.js → CYP_MLH8.js} +1 -1
  52. package/.output/public/_nuxt/{76CHU1js.js → C_BdYLzz.js} +1 -1
  53. package/.output/public/_nuxt/{BQbnVFXA.js → Cdt3I3Go.js} +1 -1
  54. package/.output/public/_nuxt/Cdu2qGgq.js +1 -0
  55. package/.output/public/_nuxt/{ChMIRIq6.js → CeIVm4A3.js} +1 -1
  56. package/.output/public/_nuxt/CeIu7z4p.js +1 -0
  57. package/.output/public/_nuxt/{CZZw0T2a.js → Ci7UEZQh.js} +1 -1
  58. package/.output/public/_nuxt/{BP_jQhKs.js → CihWZmJe.js} +2 -2
  59. package/.output/public/_nuxt/{Bluqlt6l.js → CitkKxhw.js} +1 -1
  60. package/.output/public/_nuxt/{DIM73BjE.js → CmzH6R-N.js} +2 -2
  61. package/.output/public/_nuxt/{CD5hHJBM.js → Cp2MA0cm.js} +1 -1
  62. package/.output/public/_nuxt/{DflBkWfa.js → CqU2XbzO.js} +1 -1
  63. package/.output/public/_nuxt/{Ccc8OoR8.js → Cqy_L_ip.js} +1 -1
  64. package/.output/public/_nuxt/Cr8ixbr1.js +1 -0
  65. package/.output/public/_nuxt/{DdLGO0wP.js → CsJ9KhQ4.js} +1 -1
  66. package/.output/public/_nuxt/{mHNfVoS0.js → CtYFj7k1.js} +1 -1
  67. package/.output/public/_nuxt/{DIBimEIe.js → CtchsY6e.js} +1 -1
  68. package/.output/public/_nuxt/{BboG47Wz.js → Cvp7FI3T.js} +1 -1
  69. package/.output/public/_nuxt/CxuZBC8n.js +70 -0
  70. package/.output/public/_nuxt/D2689qk4.js +1 -0
  71. package/.output/public/_nuxt/{CWWmC6Y7.js → D31L7Ks6.js} +1 -1
  72. package/.output/public/_nuxt/{JxSV3wOO.js → D3RiUGdz.js} +1 -1
  73. package/.output/public/_nuxt/{C1tYtAeV.js → D3e44mCL.js} +1 -1
  74. package/.output/public/_nuxt/{BTWyDDBM.js → D6t3dcTl.js} +1 -1
  75. package/.output/public/_nuxt/{DpLjEbYb.js → DAQhmSv4.js} +1 -1
  76. package/.output/public/_nuxt/{BnwR3LQL.js → DB359q8R.js} +1 -1
  77. package/.output/public/_nuxt/{jCKYMNtT.js → DCzfkCGa.js} +1 -1
  78. package/.output/public/_nuxt/{BXWm1qrj.js → DG-T44jj.js} +1 -1
  79. package/.output/public/_nuxt/{BBygTbuF.js → DGX0tzL8.js} +1 -1
  80. package/.output/public/_nuxt/DHG66LPS.js +1 -0
  81. package/.output/public/_nuxt/{jBqB49XU.js → DHKLCQRG.js} +1 -1
  82. package/.output/public/_nuxt/{BDw-JoCx.js → DIoI0uJm.js} +1 -1
  83. package/.output/public/_nuxt/{DOQA5CEF.js → DJ5V-y_x.js} +1 -1
  84. package/.output/public/_nuxt/{BGaNWD0s.js → DJMS2og1.js} +1 -1
  85. package/.output/public/_nuxt/{UmgHYYVi.js → DJjDvbZE.js} +1 -1
  86. package/.output/public/_nuxt/{DdtX5kio.js → DK9jxJ0g.js} +1 -1
  87. package/.output/public/_nuxt/{Cc6GlQCO.js → DKZxeXDQ.js} +1 -1
  88. package/.output/public/_nuxt/{Tp-9mt9j.js → DLETdGFL.js} +1 -1
  89. package/.output/public/_nuxt/DOICd-Ld.js +1 -0
  90. package/.output/public/_nuxt/DPEcH-gi.js +65 -0
  91. package/.output/public/_nuxt/{CVNY6Bll.js → DSRrg8JT.js} +1 -1
  92. package/.output/public/_nuxt/{Sm7TJN7_.js → DTDgHTuh.js} +2 -2
  93. package/.output/public/_nuxt/{DeGKAWfY.js → D_3Rq1BS.js} +1 -1
  94. package/.output/public/_nuxt/{BvnL4Jyv.js → Daz4MeL6.js} +1 -1
  95. package/.output/public/_nuxt/{Dyd3g9po.js → Db2v8O7O.js} +1 -1
  96. package/.output/public/_nuxt/{D0FBwEzN.js → Db8-_gO7.js} +1 -1
  97. package/.output/public/_nuxt/{Cv4Qjbqk.js → DfQu3kEw.js} +1 -1
  98. package/.output/public/_nuxt/{c-RGQpsW.js → DgV-EDJ9.js} +1 -1
  99. package/.output/public/_nuxt/{CSF2cTe9.js → DnjGH3SQ.js} +1 -1
  100. package/.output/public/_nuxt/Dp2X5R2m.js +1 -0
  101. package/.output/public/_nuxt/DqB723Z0.js +1 -0
  102. package/.output/public/_nuxt/{DhRePYUI.js → DyRelyfs.js} +1 -1
  103. package/.output/public/_nuxt/{DZiAD6YN.js → Dy_Cq5LQ.js} +1 -1
  104. package/.output/public/_nuxt/{DWQMV4k2.js → DznawRFW.js} +1 -1
  105. package/.output/public/_nuxt/EuOqK1A6.js +1 -0
  106. package/.output/public/_nuxt/{BVZHIuu-.js → FNC8XZTk.js} +1 -1
  107. package/.output/public/_nuxt/{Dsk8JtTw.js → Fukkqjkf.js} +1 -1
  108. package/.output/public/_nuxt/{DNpdNXnv.js → FvlxxmNk.js} +2 -2
  109. package/.output/public/_nuxt/{zt0Txq93.js → IRSbVPIu.js} +1 -1
  110. package/.output/public/_nuxt/{T_w6A2Zo.js → JJ3634gV.js} +9 -9
  111. package/.output/public/_nuxt/{6Tt_Iaya.js → Jez9DHn7.js} +1 -1
  112. package/.output/public/_nuxt/{Cr7nQmYw.js → KKK6HVeG.js} +1 -1
  113. package/.output/public/_nuxt/{BJPw54Qz.js → Lwdv_RKd.js} +1 -1
  114. package/.output/public/_nuxt/{WqUIRM3G.js → Nb2jBtYT.js} +1 -1
  115. package/.output/public/_nuxt/Q8Ps7oN5.js +1 -0
  116. package/.output/public/_nuxt/SXTDhzp6.js +1 -0
  117. package/.output/public/_nuxt/{rfcePMfo.js → Sg2Lwc46.js} +1 -1
  118. package/.output/public/_nuxt/{gEpwc5gO.js → YuTZB7sD.js} +1 -1
  119. package/.output/public/_nuxt/{B2OKrc4G.js → _CYZi8HN.js} +1 -1
  120. package/.output/public/_nuxt/_J_7XIn-.js +1 -0
  121. package/.output/public/_nuxt/builds/latest.json +1 -1
  122. package/.output/public/_nuxt/builds/meta/a1e9100c-1a4f-4f7e-bb53-9dbe0d07effb.json +1 -0
  123. package/.output/public/_nuxt/{Bwx_Kl-4.js → cABRLVee.js} +1 -1
  124. package/.output/public/_nuxt/{DPuJYSUH.js → eko-0FUm.js} +1 -1
  125. package/.output/public/_nuxt/entry.CGxIBGAf.css +1 -0
  126. package/.output/public/_nuxt/{TQOIXkvr.js → g20UHUCv.js} +1 -1
  127. package/.output/public/_nuxt/{zOs8gUGl.js → gBC9k4Qj.js} +1 -1
  128. package/.output/public/_nuxt/{CJ3DQEW9.js → ghuJ76mD.js} +1 -1
  129. package/.output/public/_nuxt/{S6GTaxiQ.js → iBGCpHdw.js} +1 -1
  130. package/.output/public/_nuxt/{VGlRzjk3.js → inmzPrjz.js} +1 -1
  131. package/.output/public/_nuxt/{CCkumwhk.js → m5kGCDpI.js} +4 -4
  132. package/.output/public/_nuxt/{CXkbkhUa.js → nIU2F7ia.js} +3 -3
  133. package/.output/public/_nuxt/oIX-ZDN6.js +1 -0
  134. package/.output/public/_nuxt/{TsIha0iy.js → pcUI-zuY.js} +1 -1
  135. package/.output/public/_nuxt/{BN_2zhBR.js → sf57orEk.js} +1 -1
  136. package/.output/public/_nuxt/usage.vakN1lvi.css +1 -0
  137. package/.output/public/_nuxt/{DHYn0MnY.js → wCGVE8_e.js} +1 -1
  138. package/.output/public/_nuxt/{DMkXE4gH.js → xuzLdW-o.js} +1 -1
  139. package/.output/public/_nuxt/{DdoFnl6e.js → yNrp2XvX.js} +1 -1
  140. package/.output/public/_nuxt/{4hIPJQLp.js → yuf23kh9.js} +1 -1
  141. package/.output/server/chunks/build/CodeIcon-CWD5HcV7.mjs +1 -1
  142. package/.output/server/chunks/build/DropdownMenu-BBrV9nXz.mjs +1 -1
  143. package/.output/server/chunks/build/EditorToolbar-DIfb5arC.mjs +1 -1
  144. package/.output/server/chunks/build/Img-CWLmvN1t.mjs +1 -1
  145. package/.output/server/chunks/build/MDC-Dx0YPDhe.mjs +1 -1
  146. package/.output/server/chunks/build/Select-BB1oLrCD.mjs +1 -1
  147. package/.output/server/chunks/build/SelectMenu-DPssg6zD.mjs +1 -1
  148. package/.output/server/chunks/build/Table-DCwTlhCj.mjs +1 -1
  149. package/.output/server/chunks/build/Tooltip-TRyl6dje.mjs +1 -1
  150. package/.output/server/chunks/build/{_uuid_-CQEMsF1D.mjs → _uuid_-0UgdUhfY.mjs} +8 -7
  151. package/.output/server/chunks/build/{_uuid_-CQEMsF1D.mjs.map → _uuid_-0UgdUhfY.mjs.map} +1 -1
  152. package/.output/server/chunks/build/chat-CZMiB68R.mjs.map +1 -1
  153. package/.output/server/chunks/build/client.precomputed.mjs +1 -1
  154. package/.output/server/chunks/build/cookie-C_iulBi6.mjs +1 -1
  155. package/.output/server/chunks/build/{dashboard-24rCroiO.mjs → dashboard-CpMVYnDV.mjs} +13 -6
  156. package/.output/server/chunks/build/{dashboard-24rCroiO.mjs.map → dashboard-CpMVYnDV.mjs.map} +1 -1
  157. package/.output/server/chunks/build/dashboard-YEscLBQN.mjs +1109 -0
  158. package/.output/server/chunks/build/dashboard-YEscLBQN.mjs.map +1 -0
  159. package/.output/server/chunks/build/{docs-DOGZUctm.mjs → docs-Dk2JnYq3.mjs} +8 -7
  160. package/.output/server/chunks/build/{docs-DOGZUctm.mjs.map → docs-Dk2JnYq3.mjs.map} +1 -1
  161. package/.output/server/chunks/build/fetch-BB7Qzkwe.mjs +1 -1
  162. package/.output/server/chunks/build/{hooks-CuyNIRFI.mjs → hooks-DP8WoUPS.mjs} +2 -2
  163. package/.output/server/chunks/build/{hooks-CuyNIRFI.mjs.map → hooks-DP8WoUPS.mjs.map} +1 -1
  164. package/.output/server/chunks/build/{index-BZI-Mj1-.mjs → index-Ba_bPJgk.mjs} +2 -2
  165. package/.output/server/chunks/build/{index-BZI-Mj1-.mjs.map → index-Ba_bPJgk.mjs.map} +1 -1
  166. package/.output/server/chunks/build/index-CxDxc9fm.mjs +1 -1
  167. package/.output/server/chunks/build/server.mjs +26 -17
  168. package/.output/server/chunks/build/server.mjs.map +1 -1
  169. package/.output/server/chunks/build/settings-DdkKCJ00.mjs +1 -1
  170. package/.output/server/chunks/build/styles.mjs +2 -2
  171. package/.output/server/chunks/build/{tasks-DR55Wjpi.mjs → tasks-DiOi1HG_.mjs} +2 -2
  172. package/.output/server/chunks/build/{tasks-DR55Wjpi.mjs.map → tasks-DiOi1HG_.mjs.map} +1 -1
  173. package/.output/server/chunks/build/usage-H_mcd_fz.mjs +1578 -0
  174. package/.output/server/chunks/build/usage-H_mcd_fz.mjs.map +1 -0
  175. package/.output/server/chunks/build/{CodeEditorFallback-DfYly7f5.mjs → useCopyToClipboard-vi6FYyyZ.mjs} +29 -2
  176. package/.output/server/chunks/build/useCopyToClipboard-vi6FYyyZ.mjs.map +1 -0
  177. package/.output/server/chunks/build/useNotificationBus-BG5JNQf1.mjs +1 -1
  178. package/.output/server/chunks/build/{usePreferences-CUvZsOq5.mjs → usePreferences-CzC8fRzd.mjs} +7 -1
  179. package/.output/server/chunks/build/usePreferences-CzC8fRzd.mjs.map +1 -0
  180. package/.output/server/chunks/build/view-Dc8mvzCB.mjs +1 -1
  181. package/.output/server/chunks/nitro/nitro.mjs +884 -818
  182. package/.output/server/chunks/nitro/nitro.mjs.map +1 -1
  183. package/.output/server/chunks/routes/_ws/chat.mjs +18 -4
  184. package/.output/server/chunks/routes/_ws/chat.mjs.map +1 -1
  185. package/.output/server/chunks/routes/api/dashboard/overview.get.mjs +149 -0
  186. package/.output/server/chunks/routes/api/dashboard/overview.get.mjs.map +1 -0
  187. package/.output/server/chunks/routes/api/documents/_id/public.get.mjs +1 -1
  188. package/.output/server/chunks/routes/api/documents/_id/restore.post.mjs +1 -1
  189. package/.output/server/chunks/routes/api/documents/by-path.post.mjs +1 -1
  190. package/.output/server/chunks/routes/api/documents/index.delete.mjs +1 -1
  191. package/.output/server/chunks/routes/api/documents/index.put.mjs +1 -1
  192. package/.output/server/chunks/routes/api/fs/delete.post.mjs +1 -1
  193. package/.output/server/chunks/routes/api/fs/list.get.mjs +1 -1
  194. package/.output/server/chunks/routes/api/fs/mkdir.post.mjs +1 -1
  195. package/.output/server/chunks/routes/api/fs/move.post.mjs +1 -1
  196. package/.output/server/chunks/routes/api/fs/read.post.mjs +1 -1
  197. package/.output/server/chunks/routes/api/fs/rename.post.mjs +1 -1
  198. package/.output/server/chunks/routes/api/fs/write.post.mjs +1 -1
  199. package/.output/server/chunks/routes/api/health.get.mjs +1 -1
  200. package/.output/server/chunks/routes/api/home.get.mjs +1 -1
  201. package/.output/server/chunks/routes/api/hooks/index.get.mjs +1 -1
  202. package/.output/server/chunks/routes/api/hooks/index.post.mjs +1 -1
  203. package/.output/server/chunks/routes/api/hooks/stats.get.mjs +1 -1
  204. package/.output/server/chunks/routes/api/index.get3.mjs +1 -1
  205. package/.output/server/chunks/routes/api/index.get4.mjs +1 -1
  206. package/.output/server/chunks/routes/api/index.get5.mjs +1 -1
  207. package/.output/server/chunks/routes/api/index.get6.mjs +1 -1
  208. package/.output/server/chunks/routes/api/index.get7.mjs +1 -1
  209. package/.output/server/chunks/routes/api/index.get8.mjs +82 -0
  210. package/.output/server/chunks/routes/api/index.get8.mjs.map +1 -0
  211. package/.output/server/chunks/routes/api/index.post2.mjs +1 -1
  212. package/.output/server/chunks/routes/api/index.post3.mjs +1 -1
  213. package/.output/server/chunks/routes/api/index.post4.mjs +1 -1
  214. package/.output/server/chunks/routes/api/index.put.mjs +1 -1
  215. package/.output/server/chunks/routes/api/memory/_id_.delete.mjs +1 -1
  216. package/.output/server/chunks/routes/api/memory/context.get.mjs +1 -1
  217. package/.output/server/chunks/routes/api/memory/extract.post.mjs +20 -1
  218. package/.output/server/chunks/routes/api/memory/extract.post.mjs.map +1 -1
  219. package/.output/server/chunks/routes/api/memory/search.get.mjs +1 -1
  220. package/.output/server/chunks/routes/api/memory/store.post.mjs +1 -1
  221. package/.output/server/chunks/routes/api/projects/index.delete.mjs +1 -1
  222. package/.output/server/chunks/routes/api/projects/index.get.mjs +1 -1
  223. package/.output/server/chunks/routes/api/projects/index.put.mjs +1 -1
  224. package/.output/server/chunks/routes/api/secrets/_key_.delete.mjs +1 -1
  225. package/.output/server/chunks/routes/api/secrets/_key_.get.mjs +1 -1
  226. package/.output/server/chunks/routes/api/secrets/_key_.put.mjs +1 -1
  227. package/.output/server/chunks/routes/api/tasks/_id/restore.post.mjs +1 -1
  228. package/.output/server/chunks/routes/api/tasks/index.delete.mjs +1 -1
  229. package/.output/server/chunks/routes/api/tasks/index.put.mjs +1 -1
  230. package/.output/server/chunks/routes/api/tasks/tags.get.mjs +1 -1
  231. package/.output/server/chunks/routes/api/usage/stats.get.mjs +130 -0
  232. package/.output/server/chunks/routes/api/usage/stats.get.mjs.map +1 -0
  233. package/.output/server/chunks/routes/api/user/email.patch.mjs +1 -1
  234. package/.output/server/chunks/routes/notifications.mjs +1 -1
  235. package/.output/server/chunks/routes/renderer.mjs +1 -1
  236. package/.output/server/chunks/routes/terminal.mjs +1 -1
  237. package/.output/server/index.mjs +1 -1
  238. package/.output/server/package.json +1 -1
  239. package/app/components/dashboard/RecentChats.vue +93 -0
  240. package/app/components/dashboard/RecentDocs.vue +108 -0
  241. package/app/components/dashboard/StatCards.vue +82 -0
  242. package/app/components/dashboard/UpcomingTasks.vue +119 -0
  243. package/app/components/dashboard/UsageSummary.vue +94 -0
  244. package/app/components/editor/DocumentEditor.vue +5 -3
  245. package/app/components/usage/UsageCostChart.client.vue +174 -0
  246. package/app/components/usage/UsageCostChart.server.vue +22 -0
  247. package/app/components/usage/UsageRecordsTable.vue +249 -0
  248. package/app/components/usage/UsageSourceDonut.client.vue +93 -0
  249. package/app/components/usage/UsageSourceDonut.server.vue +21 -0
  250. package/app/components/usage/UsageStatsCards.vue +101 -0
  251. package/app/components/usage/UsageTopConsumers.vue +89 -0
  252. package/app/composables/useCopyToClipboard.ts +37 -0
  253. package/app/composables/usePreferences.ts +10 -0
  254. package/app/layouts/dashboard.vue +8 -1
  255. package/app/pages/chat.vue +11 -1
  256. package/app/pages/dashboard.vue +65 -64
  257. package/app/pages/usage.vue +130 -0
  258. package/app/pages/view/[uuid].vue +4 -3
  259. package/package.json +1 -1
  260. package/server/api/dashboard/overview.get.ts +133 -0
  261. package/server/api/usage/index.get.ts +69 -0
  262. package/server/api/usage/stats.get.ts +127 -0
  263. package/server/db/schema.ts +17 -0
  264. package/server/drizzle/migrations/0011_tearful_johnny_storm.sql +12 -0
  265. package/server/drizzle/migrations/meta/0011_snapshot.json +1634 -0
  266. package/server/drizzle/migrations/meta/_journal.json +7 -0
  267. package/server/routes/_ws/chat.ts +29 -2
  268. package/server/services/agent-executor.ts +13 -0
  269. package/server/services/memory-extractor.ts +25 -0
  270. package/server/utils/log-token-usage.ts +22 -0
  271. package/shared/types/index.ts +81 -0
  272. package/.output/public/_nuxt/B34UfOg4.js +0 -1
  273. package/.output/public/_nuxt/B3DmiwBX.js +0 -1
  274. package/.output/public/_nuxt/BESViHC6.js +0 -1
  275. package/.output/public/_nuxt/BIm_buQF.js +0 -1
  276. package/.output/public/_nuxt/BMh-dHBK.js +0 -1
  277. package/.output/public/_nuxt/Bkv1Ouue.js +0 -1
  278. package/.output/public/_nuxt/C4i10ReQ.js +0 -1
  279. package/.output/public/_nuxt/C5euqjeX.js +0 -1
  280. package/.output/public/_nuxt/C9hy_rtV.js +0 -1
  281. package/.output/public/_nuxt/CWJhKIyp.js +0 -1
  282. package/.output/public/_nuxt/Ck24Z-8o.js +0 -1
  283. package/.output/public/_nuxt/D1JmZKz7.js +0 -1
  284. package/.output/public/_nuxt/D6xvQUYG.js +0 -1
  285. package/.output/public/_nuxt/DGTbw5AQ.js +0 -1
  286. package/.output/public/_nuxt/Da8Xd1w6.js +0 -1
  287. package/.output/public/_nuxt/DamUHI17.js +0 -1
  288. package/.output/public/_nuxt/DoIiMqKa.js +0 -76
  289. package/.output/public/_nuxt/builds/meta/75ff59f2-0860-4bfc-a288-c670397cae5c.json +0 -1
  290. package/.output/public/_nuxt/entry.tLLAvqs1.css +0 -1
  291. package/.output/public/_nuxt/iJ4KRInq.js +0 -1
  292. package/.output/public/_nuxt/mSr5c6cB.js +0 -1
  293. package/.output/public/_nuxt/r8g_V5AH.js +0 -1
  294. package/.output/public/_nuxt/rZmMQHiC.js +0 -1
  295. package/.output/server/chunks/build/CodeEditorFallback-DfYly7f5.mjs.map +0 -1
  296. package/.output/server/chunks/build/dashboard-DtbGchTa.mjs +0 -277
  297. package/.output/server/chunks/build/dashboard-DtbGchTa.mjs.map +0 -1
  298. package/.output/server/chunks/build/usePreferences-CUvZsOq5.mjs.map +0 -1
  299. /package/.output/public/_nuxt/{language-detection.Be_IvFWy.css → useCopyToClipboard.Be_IvFWy.css} +0 -0
@@ -0,0 +1,1109 @@
1
+ import { _ as _sfc_main$1$1, a as _sfc_main$6 } from './DashboardNavbar-Cpq8yKA0.mjs';
2
+ import { _ as _sfc_main$7 } from './Skeleton-DZqsQzFi.mjs';
3
+ import { g as _sfc_main$d, l as __nuxt_component_0$1, _ as _sfc_main$8$1 } from './server.mjs';
4
+ import { defineComponent, ref, mergeProps, withCtx, unref, createVNode, toDisplayString, createTextVNode, createBlock, createCommentVNode, openBlock, Fragment, renderList, useSSRContext } from 'vue';
5
+ import { ssrRenderAttrs, ssrRenderComponent, ssrInterpolate, ssrRenderList, ssrRenderStyle } from 'vue/server-renderer';
6
+ import { _ as _sfc_main$8 } from './Card-G40WAFiH.mjs';
7
+ import { _ as _sfc_main$9 } from './Badge-C1RKkIgG.mjs';
8
+ import { formatDistanceToNow } from 'date-fns';
9
+ import { u as useAuth } from './useAuth-rW9toE_m.mjs';
10
+ import './DashboardSidebarToggle-Chnqv04k.mjs';
11
+ import '@vueuse/core';
12
+ import './cookie-C_iulBi6.mjs';
13
+ import '../nitro/nitro.mjs';
14
+ import '@anthropic-ai/claude-agent-sdk';
15
+ import 'crypto';
16
+ import 'module';
17
+ import 'path';
18
+ import 'node:http';
19
+ import 'node:https';
20
+ import 'node:crypto';
21
+ import 'stream';
22
+ import 'events';
23
+ import 'http';
24
+ import 'buffer';
25
+ import 'zlib';
26
+ import 'https';
27
+ import 'net';
28
+ import 'tls';
29
+ import 'url';
30
+ import 'node:events';
31
+ import 'node:buffer';
32
+ import 'node:fs';
33
+ import 'node:path';
34
+ import 'fs';
35
+ import 'drizzle-orm/postgres-js/migrator';
36
+ import 'drizzle-orm';
37
+ import 'drizzle-orm/postgres-js';
38
+ import 'postgres';
39
+ import 'drizzle-orm/pg-core';
40
+ import 'better-auth';
41
+ import 'better-auth/adapters/drizzle';
42
+ import 'chokidar';
43
+ import 'fs/promises';
44
+ import 'gray-matter';
45
+ import 'cron';
46
+ import 'node:url';
47
+ import '@iconify/utils';
48
+ import 'consola';
49
+ import './ssr-Bqnw2a-w.mjs';
50
+ import 'reka-ui';
51
+ import 'vue-router';
52
+ import 'tailwindcss/colors';
53
+ import '@iconify/vue';
54
+ import 'tailwind-variants';
55
+ import '@iconify/utils/lib/css/icon';
56
+ import 'perfect-debounce';
57
+ import '../routes/renderer.mjs';
58
+ import 'vue-bundle-renderer/runtime';
59
+ import 'unhead/server';
60
+ import 'devalue';
61
+ import 'unhead/plugins';
62
+ import 'unhead/utils';
63
+ import 'better-auth/vue';
64
+
65
+ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
66
+ __name: "StatCards",
67
+ __ssrInlineRender: true,
68
+ props: {
69
+ overview: {},
70
+ loading: { type: Boolean }
71
+ },
72
+ setup(__props) {
73
+ function formatCurrency(value) {
74
+ if (value < 0.01 && value > 0) return "<$0.01";
75
+ return `$${value.toFixed(2)}`;
76
+ }
77
+ return (_ctx, _push, _parent, _attrs) => {
78
+ const _component_USkeleton = _sfc_main$7;
79
+ const _component_UIcon = _sfc_main$d;
80
+ _push(`<div${ssrRenderAttrs(mergeProps({ class: "grid gap-4 grid-cols-2 lg:grid-cols-4" }, _attrs))}>`);
81
+ if (__props.loading) {
82
+ _push(`<!--[-->`);
83
+ ssrRenderList(4, (i) => {
84
+ _push(`<div class="p-4 rounded-lg bg-elevated border border-default">`);
85
+ _push(ssrRenderComponent(_component_USkeleton, { class: "h-4 w-16 mb-2" }, null, _parent));
86
+ _push(ssrRenderComponent(_component_USkeleton, { class: "h-8 w-12" }, null, _parent));
87
+ _push(`</div>`);
88
+ });
89
+ _push(`<!--]-->`);
90
+ } else if (__props.overview) {
91
+ _push(`<!--[--><div class="p-4 rounded-lg bg-elevated border border-default"><div class="flex items-center gap-2 text-muted text-sm mb-1">`);
92
+ _push(ssrRenderComponent(_component_UIcon, {
93
+ name: "i-lucide-circle-dot",
94
+ class: "size-4"
95
+ }, null, _parent));
96
+ _push(`<span>Todo</span></div><p class="text-2xl font-semibold">${ssrInterpolate(__props.overview.tasks.todoCount)}</p></div><div class="p-4 rounded-lg bg-elevated border border-default"><div class="flex items-center gap-2 text-muted text-sm mb-1">`);
97
+ _push(ssrRenderComponent(_component_UIcon, {
98
+ name: "i-lucide-loader",
99
+ class: "size-4"
100
+ }, null, _parent));
101
+ _push(`<span>In Progress</span></div><p class="text-2xl font-semibold">${ssrInterpolate(__props.overview.tasks.inProgressCount)}</p></div><div class="p-4 rounded-lg bg-elevated border border-default"><div class="flex items-center gap-2 text-muted text-sm mb-1">`);
102
+ _push(ssrRenderComponent(_component_UIcon, {
103
+ name: "i-lucide-dollar-sign",
104
+ class: "size-4"
105
+ }, null, _parent));
106
+ _push(`<span>7d Cost</span></div><p class="text-2xl font-semibold">${ssrInterpolate(formatCurrency(__props.overview.usage.totalCost7d))}</p></div><div class="p-4 rounded-lg bg-elevated border border-default"><div class="flex items-center gap-2 text-muted text-sm mb-1">`);
107
+ _push(ssrRenderComponent(_component_UIcon, {
108
+ name: "i-lucide-zap",
109
+ class: "size-4"
110
+ }, null, _parent));
111
+ _push(`<span>7d API Calls</span></div><p class="text-2xl font-semibold">${ssrInterpolate(__props.overview.usage.totalCalls7d)}</p></div><!--]-->`);
112
+ } else {
113
+ _push(`<!---->`);
114
+ }
115
+ _push(`</div>`);
116
+ };
117
+ }
118
+ });
119
+ const _sfc_setup$5 = _sfc_main$5.setup;
120
+ _sfc_main$5.setup = (props, ctx) => {
121
+ const ssrContext = useSSRContext();
122
+ (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("components/dashboard/StatCards.vue");
123
+ return _sfc_setup$5 ? _sfc_setup$5(props, ctx) : void 0;
124
+ };
125
+ const __nuxt_component_2 = Object.assign(_sfc_main$5, { __name: "DashboardStatCards" });
126
+ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
127
+ __name: "UpcomingTasks",
128
+ __ssrInlineRender: true,
129
+ props: {
130
+ tasks: {},
131
+ loading: { type: Boolean }
132
+ },
133
+ setup(__props) {
134
+ const priorityLabels = { 1: "Low", 2: "Med", 3: "High" };
135
+ const priorityColors = { 1: "neutral", 2: "warning", 3: "error" };
136
+ const statusColors = { todo: "neutral", in_progress: "primary", blocked: "error" };
137
+ function formatDueDate(iso) {
138
+ if (!iso) return "";
139
+ const date = new Date(iso);
140
+ const now = /* @__PURE__ */ new Date();
141
+ const diff = date.getTime() - now.getTime();
142
+ const days = Math.ceil(diff / (1e3 * 60 * 60 * 24));
143
+ if (days < 0) return `${Math.abs(days)}d overdue`;
144
+ if (days === 0) return "Today";
145
+ if (days === 1) return "Tomorrow";
146
+ return `${days}d`;
147
+ }
148
+ return (_ctx, _push, _parent, _attrs) => {
149
+ const _component_UCard = _sfc_main$8;
150
+ const _component_UIcon = _sfc_main$d;
151
+ const _component_UButton = _sfc_main$8$1;
152
+ const _component_USkeleton = _sfc_main$7;
153
+ const _component_NuxtLink = __nuxt_component_0$1;
154
+ const _component_UBadge = _sfc_main$9;
155
+ _push(ssrRenderComponent(_component_UCard, _attrs, {
156
+ header: withCtx((_, _push2, _parent2, _scopeId) => {
157
+ if (_push2) {
158
+ _push2(`<div class="flex items-center justify-between"${_scopeId}><div class="flex items-center gap-2"${_scopeId}>`);
159
+ _push2(ssrRenderComponent(_component_UIcon, {
160
+ name: "i-lucide-check-square",
161
+ class: "size-4 text-primary"
162
+ }, null, _parent2, _scopeId));
163
+ _push2(`<span class="text-sm font-medium"${_scopeId}>Upcoming Tasks</span></div>`);
164
+ _push2(ssrRenderComponent(_component_UButton, {
165
+ to: "/tasks",
166
+ variant: "ghost",
167
+ size: "xs",
168
+ "trailing-icon": "i-lucide-arrow-right"
169
+ }, {
170
+ default: withCtx((_2, _push3, _parent3, _scopeId2) => {
171
+ if (_push3) {
172
+ _push3(` View all `);
173
+ } else {
174
+ return [
175
+ createTextVNode(" View all ")
176
+ ];
177
+ }
178
+ }),
179
+ _: 1
180
+ }, _parent2, _scopeId));
181
+ _push2(`</div>`);
182
+ } else {
183
+ return [
184
+ createVNode("div", { class: "flex items-center justify-between" }, [
185
+ createVNode("div", { class: "flex items-center gap-2" }, [
186
+ createVNode(_component_UIcon, {
187
+ name: "i-lucide-check-square",
188
+ class: "size-4 text-primary"
189
+ }),
190
+ createVNode("span", { class: "text-sm font-medium" }, "Upcoming Tasks")
191
+ ]),
192
+ createVNode(_component_UButton, {
193
+ to: "/tasks",
194
+ variant: "ghost",
195
+ size: "xs",
196
+ "trailing-icon": "i-lucide-arrow-right"
197
+ }, {
198
+ default: withCtx(() => [
199
+ createTextVNode(" View all ")
200
+ ]),
201
+ _: 1
202
+ })
203
+ ])
204
+ ];
205
+ }
206
+ }),
207
+ default: withCtx((_, _push2, _parent2, _scopeId) => {
208
+ if (_push2) {
209
+ if (__props.loading) {
210
+ _push2(`<div class="space-y-3"${_scopeId}><!--[-->`);
211
+ ssrRenderList(3, (i) => {
212
+ _push2(`<div class="flex items-center gap-3"${_scopeId}>`);
213
+ _push2(ssrRenderComponent(_component_USkeleton, { class: "h-5 w-5 rounded" }, null, _parent2, _scopeId));
214
+ _push2(ssrRenderComponent(_component_USkeleton, { class: "h-4 flex-1" }, null, _parent2, _scopeId));
215
+ _push2(`</div>`);
216
+ });
217
+ _push2(`<!--]--></div>`);
218
+ } else if (__props.tasks.length === 0) {
219
+ _push2(`<div class="text-center py-4 text-muted text-sm"${_scopeId}> No upcoming tasks </div>`);
220
+ } else {
221
+ _push2(`<div class="space-y-2"${_scopeId}><!--[-->`);
222
+ ssrRenderList(__props.tasks, (task) => {
223
+ _push2(ssrRenderComponent(_component_NuxtLink, {
224
+ key: task.id,
225
+ to: { path: "/tasks", query: { selected: task.id } },
226
+ class: "flex items-center gap-3 p-2 -mx-2 rounded-md hover:bg-elevated transition-colors"
227
+ }, {
228
+ default: withCtx((_2, _push3, _parent3, _scopeId2) => {
229
+ if (_push3) {
230
+ _push3(ssrRenderComponent(_component_UBadge, {
231
+ color: statusColors[task.status] || "neutral",
232
+ variant: "subtle",
233
+ size: "xs"
234
+ }, {
235
+ default: withCtx((_3, _push4, _parent4, _scopeId3) => {
236
+ if (_push4) {
237
+ _push4(`${ssrInterpolate(task.status === "in_progress" ? "WIP" : task.status)}`);
238
+ } else {
239
+ return [
240
+ createTextVNode(toDisplayString(task.status === "in_progress" ? "WIP" : task.status), 1)
241
+ ];
242
+ }
243
+ }),
244
+ _: 2
245
+ }, _parent3, _scopeId2));
246
+ _push3(`<span class="text-sm truncate flex-1"${_scopeId2}>${ssrInterpolate(task.title)}</span>`);
247
+ if (task.projectName) {
248
+ _push3(ssrRenderComponent(_component_UBadge, {
249
+ variant: "subtle",
250
+ color: "neutral",
251
+ size: "xs"
252
+ }, {
253
+ default: withCtx((_3, _push4, _parent4, _scopeId3) => {
254
+ if (_push4) {
255
+ _push4(`<span class="inline-block size-2 rounded-full mr-1" style="${ssrRenderStyle({ background: task.projectColor || "var(--ui-primary)" })}"${_scopeId3}></span> ${ssrInterpolate(task.projectName)}`);
256
+ } else {
257
+ return [
258
+ createVNode("span", {
259
+ class: "inline-block size-2 rounded-full mr-1",
260
+ style: { background: task.projectColor || "var(--ui-primary)" }
261
+ }, null, 4),
262
+ createTextVNode(" " + toDisplayString(task.projectName), 1)
263
+ ];
264
+ }
265
+ }),
266
+ _: 2
267
+ }, _parent3, _scopeId2));
268
+ } else {
269
+ _push3(`<!---->`);
270
+ }
271
+ _push3(ssrRenderComponent(_component_UBadge, {
272
+ color: priorityColors[task.priority] || "neutral",
273
+ variant: "soft",
274
+ size: "xs"
275
+ }, {
276
+ default: withCtx((_3, _push4, _parent4, _scopeId3) => {
277
+ if (_push4) {
278
+ _push4(`${ssrInterpolate(priorityLabels[task.priority] || "Med")}`);
279
+ } else {
280
+ return [
281
+ createTextVNode(toDisplayString(priorityLabels[task.priority] || "Med"), 1)
282
+ ];
283
+ }
284
+ }),
285
+ _: 2
286
+ }, _parent3, _scopeId2));
287
+ if (task.dueDate) {
288
+ _push3(`<span class="text-xs text-muted whitespace-nowrap"${_scopeId2}>${ssrInterpolate(formatDueDate(task.dueDate))}</span>`);
289
+ } else {
290
+ _push3(`<!---->`);
291
+ }
292
+ } else {
293
+ return [
294
+ createVNode(_component_UBadge, {
295
+ color: statusColors[task.status] || "neutral",
296
+ variant: "subtle",
297
+ size: "xs"
298
+ }, {
299
+ default: withCtx(() => [
300
+ createTextVNode(toDisplayString(task.status === "in_progress" ? "WIP" : task.status), 1)
301
+ ]),
302
+ _: 2
303
+ }, 1032, ["color"]),
304
+ createVNode("span", { class: "text-sm truncate flex-1" }, toDisplayString(task.title), 1),
305
+ task.projectName ? (openBlock(), createBlock(_component_UBadge, {
306
+ key: 0,
307
+ variant: "subtle",
308
+ color: "neutral",
309
+ size: "xs"
310
+ }, {
311
+ default: withCtx(() => [
312
+ createVNode("span", {
313
+ class: "inline-block size-2 rounded-full mr-1",
314
+ style: { background: task.projectColor || "var(--ui-primary)" }
315
+ }, null, 4),
316
+ createTextVNode(" " + toDisplayString(task.projectName), 1)
317
+ ]),
318
+ _: 2
319
+ }, 1024)) : createCommentVNode("", true),
320
+ createVNode(_component_UBadge, {
321
+ color: priorityColors[task.priority] || "neutral",
322
+ variant: "soft",
323
+ size: "xs"
324
+ }, {
325
+ default: withCtx(() => [
326
+ createTextVNode(toDisplayString(priorityLabels[task.priority] || "Med"), 1)
327
+ ]),
328
+ _: 2
329
+ }, 1032, ["color"]),
330
+ task.dueDate ? (openBlock(), createBlock("span", {
331
+ key: 1,
332
+ class: "text-xs text-muted whitespace-nowrap"
333
+ }, toDisplayString(formatDueDate(task.dueDate)), 1)) : createCommentVNode("", true)
334
+ ];
335
+ }
336
+ }),
337
+ _: 2
338
+ }, _parent2, _scopeId));
339
+ });
340
+ _push2(`<!--]--></div>`);
341
+ }
342
+ } else {
343
+ return [
344
+ __props.loading ? (openBlock(), createBlock("div", {
345
+ key: 0,
346
+ class: "space-y-3"
347
+ }, [
348
+ (openBlock(), createBlock(Fragment, null, renderList(3, (i) => {
349
+ return createVNode("div", {
350
+ key: i,
351
+ class: "flex items-center gap-3"
352
+ }, [
353
+ createVNode(_component_USkeleton, { class: "h-5 w-5 rounded" }),
354
+ createVNode(_component_USkeleton, { class: "h-4 flex-1" })
355
+ ]);
356
+ }), 64))
357
+ ])) : __props.tasks.length === 0 ? (openBlock(), createBlock("div", {
358
+ key: 1,
359
+ class: "text-center py-4 text-muted text-sm"
360
+ }, " No upcoming tasks ")) : (openBlock(), createBlock("div", {
361
+ key: 2,
362
+ class: "space-y-2"
363
+ }, [
364
+ (openBlock(true), createBlock(Fragment, null, renderList(__props.tasks, (task) => {
365
+ return openBlock(), createBlock(_component_NuxtLink, {
366
+ key: task.id,
367
+ to: { path: "/tasks", query: { selected: task.id } },
368
+ class: "flex items-center gap-3 p-2 -mx-2 rounded-md hover:bg-elevated transition-colors"
369
+ }, {
370
+ default: withCtx(() => [
371
+ createVNode(_component_UBadge, {
372
+ color: statusColors[task.status] || "neutral",
373
+ variant: "subtle",
374
+ size: "xs"
375
+ }, {
376
+ default: withCtx(() => [
377
+ createTextVNode(toDisplayString(task.status === "in_progress" ? "WIP" : task.status), 1)
378
+ ]),
379
+ _: 2
380
+ }, 1032, ["color"]),
381
+ createVNode("span", { class: "text-sm truncate flex-1" }, toDisplayString(task.title), 1),
382
+ task.projectName ? (openBlock(), createBlock(_component_UBadge, {
383
+ key: 0,
384
+ variant: "subtle",
385
+ color: "neutral",
386
+ size: "xs"
387
+ }, {
388
+ default: withCtx(() => [
389
+ createVNode("span", {
390
+ class: "inline-block size-2 rounded-full mr-1",
391
+ style: { background: task.projectColor || "var(--ui-primary)" }
392
+ }, null, 4),
393
+ createTextVNode(" " + toDisplayString(task.projectName), 1)
394
+ ]),
395
+ _: 2
396
+ }, 1024)) : createCommentVNode("", true),
397
+ createVNode(_component_UBadge, {
398
+ color: priorityColors[task.priority] || "neutral",
399
+ variant: "soft",
400
+ size: "xs"
401
+ }, {
402
+ default: withCtx(() => [
403
+ createTextVNode(toDisplayString(priorityLabels[task.priority] || "Med"), 1)
404
+ ]),
405
+ _: 2
406
+ }, 1032, ["color"]),
407
+ task.dueDate ? (openBlock(), createBlock("span", {
408
+ key: 1,
409
+ class: "text-xs text-muted whitespace-nowrap"
410
+ }, toDisplayString(formatDueDate(task.dueDate)), 1)) : createCommentVNode("", true)
411
+ ]),
412
+ _: 2
413
+ }, 1032, ["to"]);
414
+ }), 128))
415
+ ]))
416
+ ];
417
+ }
418
+ }),
419
+ _: 1
420
+ }, _parent));
421
+ };
422
+ }
423
+ });
424
+ const _sfc_setup$4 = _sfc_main$4.setup;
425
+ _sfc_main$4.setup = (props, ctx) => {
426
+ const ssrContext = useSSRContext();
427
+ (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("components/dashboard/UpcomingTasks.vue");
428
+ return _sfc_setup$4 ? _sfc_setup$4(props, ctx) : void 0;
429
+ };
430
+ const __nuxt_component_3 = Object.assign(_sfc_main$4, { __name: "DashboardUpcomingTasks" });
431
+ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
432
+ __name: "RecentChats",
433
+ __ssrInlineRender: true,
434
+ props: {
435
+ conversations: {},
436
+ loading: { type: Boolean }
437
+ },
438
+ setup(__props) {
439
+ function relativeTime(iso) {
440
+ return formatDistanceToNow(new Date(iso), { addSuffix: true });
441
+ }
442
+ return (_ctx, _push, _parent, _attrs) => {
443
+ const _component_UCard = _sfc_main$8;
444
+ const _component_UIcon = _sfc_main$d;
445
+ const _component_UButton = _sfc_main$8$1;
446
+ const _component_USkeleton = _sfc_main$7;
447
+ const _component_NuxtLink = __nuxt_component_0$1;
448
+ _push(ssrRenderComponent(_component_UCard, _attrs, {
449
+ header: withCtx((_, _push2, _parent2, _scopeId) => {
450
+ if (_push2) {
451
+ _push2(`<div class="flex items-center justify-between"${_scopeId}><div class="flex items-center gap-2"${_scopeId}>`);
452
+ _push2(ssrRenderComponent(_component_UIcon, {
453
+ name: "i-lucide-message-square",
454
+ class: "size-4 text-primary"
455
+ }, null, _parent2, _scopeId));
456
+ _push2(`<span class="text-sm font-medium"${_scopeId}>Recent Chats</span></div>`);
457
+ _push2(ssrRenderComponent(_component_UButton, {
458
+ to: "/chat",
459
+ variant: "ghost",
460
+ size: "xs",
461
+ "trailing-icon": "i-lucide-arrow-right"
462
+ }, {
463
+ default: withCtx((_2, _push3, _parent3, _scopeId2) => {
464
+ if (_push3) {
465
+ _push3(` View all `);
466
+ } else {
467
+ return [
468
+ createTextVNode(" View all ")
469
+ ];
470
+ }
471
+ }),
472
+ _: 1
473
+ }, _parent2, _scopeId));
474
+ _push2(`</div>`);
475
+ } else {
476
+ return [
477
+ createVNode("div", { class: "flex items-center justify-between" }, [
478
+ createVNode("div", { class: "flex items-center gap-2" }, [
479
+ createVNode(_component_UIcon, {
480
+ name: "i-lucide-message-square",
481
+ class: "size-4 text-primary"
482
+ }),
483
+ createVNode("span", { class: "text-sm font-medium" }, "Recent Chats")
484
+ ]),
485
+ createVNode(_component_UButton, {
486
+ to: "/chat",
487
+ variant: "ghost",
488
+ size: "xs",
489
+ "trailing-icon": "i-lucide-arrow-right"
490
+ }, {
491
+ default: withCtx(() => [
492
+ createTextVNode(" View all ")
493
+ ]),
494
+ _: 1
495
+ })
496
+ ])
497
+ ];
498
+ }
499
+ }),
500
+ default: withCtx((_, _push2, _parent2, _scopeId) => {
501
+ if (_push2) {
502
+ if (__props.loading) {
503
+ _push2(`<div class="space-y-3"${_scopeId}><!--[-->`);
504
+ ssrRenderList(3, (i) => {
505
+ _push2(`<div class="flex items-center gap-3"${_scopeId}>`);
506
+ _push2(ssrRenderComponent(_component_USkeleton, { class: "size-8 rounded-full" }, null, _parent2, _scopeId));
507
+ _push2(`<div class="flex-1"${_scopeId}>`);
508
+ _push2(ssrRenderComponent(_component_USkeleton, { class: "h-4 w-32 mb-1" }, null, _parent2, _scopeId));
509
+ _push2(ssrRenderComponent(_component_USkeleton, { class: "h-3 w-20" }, null, _parent2, _scopeId));
510
+ _push2(`</div></div>`);
511
+ });
512
+ _push2(`<!--]--></div>`);
513
+ } else if (__props.conversations.length === 0) {
514
+ _push2(`<div class="text-center py-4 text-muted text-sm"${_scopeId}> No conversations yet </div>`);
515
+ } else {
516
+ _push2(`<div class="space-y-2"${_scopeId}><!--[-->`);
517
+ ssrRenderList(__props.conversations, (chat) => {
518
+ _push2(ssrRenderComponent(_component_NuxtLink, {
519
+ key: chat.id,
520
+ to: { path: "/chat", query: { conversation: chat.id } },
521
+ class: "flex items-center gap-3 p-2 -mx-2 rounded-md hover:bg-elevated transition-colors"
522
+ }, {
523
+ default: withCtx((_2, _push3, _parent3, _scopeId2) => {
524
+ if (_push3) {
525
+ _push3(`<div class="flex items-center justify-center size-8 rounded-full bg-primary/10"${_scopeId2}>`);
526
+ _push3(ssrRenderComponent(_component_UIcon, {
527
+ name: "i-lucide-message-square",
528
+ class: "size-4 text-primary"
529
+ }, null, _parent3, _scopeId2));
530
+ _push3(`</div><div class="flex-1 min-w-0"${_scopeId2}><p class="text-sm font-medium truncate"${_scopeId2}>${ssrInterpolate(chat.title || "Untitled Chat")}</p><p class="text-xs text-muted"${_scopeId2}>${ssrInterpolate(chat.messageCount)} messages </p></div><span class="text-xs text-muted whitespace-nowrap"${_scopeId2}>${ssrInterpolate(relativeTime(chat.startedAt))}</span>`);
531
+ } else {
532
+ return [
533
+ createVNode("div", { class: "flex items-center justify-center size-8 rounded-full bg-primary/10" }, [
534
+ createVNode(_component_UIcon, {
535
+ name: "i-lucide-message-square",
536
+ class: "size-4 text-primary"
537
+ })
538
+ ]),
539
+ createVNode("div", { class: "flex-1 min-w-0" }, [
540
+ createVNode("p", { class: "text-sm font-medium truncate" }, toDisplayString(chat.title || "Untitled Chat"), 1),
541
+ createVNode("p", { class: "text-xs text-muted" }, toDisplayString(chat.messageCount) + " messages ", 1)
542
+ ]),
543
+ createVNode("span", { class: "text-xs text-muted whitespace-nowrap" }, toDisplayString(relativeTime(chat.startedAt)), 1)
544
+ ];
545
+ }
546
+ }),
547
+ _: 2
548
+ }, _parent2, _scopeId));
549
+ });
550
+ _push2(`<!--]--></div>`);
551
+ }
552
+ } else {
553
+ return [
554
+ __props.loading ? (openBlock(), createBlock("div", {
555
+ key: 0,
556
+ class: "space-y-3"
557
+ }, [
558
+ (openBlock(), createBlock(Fragment, null, renderList(3, (i) => {
559
+ return createVNode("div", {
560
+ key: i,
561
+ class: "flex items-center gap-3"
562
+ }, [
563
+ createVNode(_component_USkeleton, { class: "size-8 rounded-full" }),
564
+ createVNode("div", { class: "flex-1" }, [
565
+ createVNode(_component_USkeleton, { class: "h-4 w-32 mb-1" }),
566
+ createVNode(_component_USkeleton, { class: "h-3 w-20" })
567
+ ])
568
+ ]);
569
+ }), 64))
570
+ ])) : __props.conversations.length === 0 ? (openBlock(), createBlock("div", {
571
+ key: 1,
572
+ class: "text-center py-4 text-muted text-sm"
573
+ }, " No conversations yet ")) : (openBlock(), createBlock("div", {
574
+ key: 2,
575
+ class: "space-y-2"
576
+ }, [
577
+ (openBlock(true), createBlock(Fragment, null, renderList(__props.conversations, (chat) => {
578
+ return openBlock(), createBlock(_component_NuxtLink, {
579
+ key: chat.id,
580
+ to: { path: "/chat", query: { conversation: chat.id } },
581
+ class: "flex items-center gap-3 p-2 -mx-2 rounded-md hover:bg-elevated transition-colors"
582
+ }, {
583
+ default: withCtx(() => [
584
+ createVNode("div", { class: "flex items-center justify-center size-8 rounded-full bg-primary/10" }, [
585
+ createVNode(_component_UIcon, {
586
+ name: "i-lucide-message-square",
587
+ class: "size-4 text-primary"
588
+ })
589
+ ]),
590
+ createVNode("div", { class: "flex-1 min-w-0" }, [
591
+ createVNode("p", { class: "text-sm font-medium truncate" }, toDisplayString(chat.title || "Untitled Chat"), 1),
592
+ createVNode("p", { class: "text-xs text-muted" }, toDisplayString(chat.messageCount) + " messages ", 1)
593
+ ]),
594
+ createVNode("span", { class: "text-xs text-muted whitespace-nowrap" }, toDisplayString(relativeTime(chat.startedAt)), 1)
595
+ ]),
596
+ _: 2
597
+ }, 1032, ["to"]);
598
+ }), 128))
599
+ ]))
600
+ ];
601
+ }
602
+ }),
603
+ _: 1
604
+ }, _parent));
605
+ };
606
+ }
607
+ });
608
+ const _sfc_setup$3 = _sfc_main$3.setup;
609
+ _sfc_main$3.setup = (props, ctx) => {
610
+ const ssrContext = useSSRContext();
611
+ (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("components/dashboard/RecentChats.vue");
612
+ return _sfc_setup$3 ? _sfc_setup$3(props, ctx) : void 0;
613
+ };
614
+ const __nuxt_component_4 = Object.assign(_sfc_main$3, { __name: "DashboardRecentChats" });
615
+ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
616
+ __name: "RecentDocs",
617
+ __ssrInlineRender: true,
618
+ props: {
619
+ documents: {},
620
+ loading: { type: Boolean }
621
+ },
622
+ setup(__props) {
623
+ function relativeTime(iso) {
624
+ if (!iso) return "";
625
+ return formatDistanceToNow(new Date(iso), { addSuffix: true });
626
+ }
627
+ return (_ctx, _push, _parent, _attrs) => {
628
+ const _component_UCard = _sfc_main$8;
629
+ const _component_UIcon = _sfc_main$d;
630
+ const _component_UButton = _sfc_main$8$1;
631
+ const _component_USkeleton = _sfc_main$7;
632
+ const _component_NuxtLink = __nuxt_component_0$1;
633
+ const _component_UBadge = _sfc_main$9;
634
+ _push(ssrRenderComponent(_component_UCard, _attrs, {
635
+ header: withCtx((_, _push2, _parent2, _scopeId) => {
636
+ if (_push2) {
637
+ _push2(`<div class="flex items-center justify-between"${_scopeId}><div class="flex items-center gap-2"${_scopeId}>`);
638
+ _push2(ssrRenderComponent(_component_UIcon, {
639
+ name: "i-lucide-file-text",
640
+ class: "size-4 text-primary"
641
+ }, null, _parent2, _scopeId));
642
+ _push2(`<span class="text-sm font-medium"${_scopeId}>Recent Docs</span></div>`);
643
+ _push2(ssrRenderComponent(_component_UButton, {
644
+ to: "/docs",
645
+ variant: "ghost",
646
+ size: "xs",
647
+ "trailing-icon": "i-lucide-arrow-right"
648
+ }, {
649
+ default: withCtx((_2, _push3, _parent3, _scopeId2) => {
650
+ if (_push3) {
651
+ _push3(` View all `);
652
+ } else {
653
+ return [
654
+ createTextVNode(" View all ")
655
+ ];
656
+ }
657
+ }),
658
+ _: 1
659
+ }, _parent2, _scopeId));
660
+ _push2(`</div>`);
661
+ } else {
662
+ return [
663
+ createVNode("div", { class: "flex items-center justify-between" }, [
664
+ createVNode("div", { class: "flex items-center gap-2" }, [
665
+ createVNode(_component_UIcon, {
666
+ name: "i-lucide-file-text",
667
+ class: "size-4 text-primary"
668
+ }),
669
+ createVNode("span", { class: "text-sm font-medium" }, "Recent Docs")
670
+ ]),
671
+ createVNode(_component_UButton, {
672
+ to: "/docs",
673
+ variant: "ghost",
674
+ size: "xs",
675
+ "trailing-icon": "i-lucide-arrow-right"
676
+ }, {
677
+ default: withCtx(() => [
678
+ createTextVNode(" View all ")
679
+ ]),
680
+ _: 1
681
+ })
682
+ ])
683
+ ];
684
+ }
685
+ }),
686
+ default: withCtx((_, _push2, _parent2, _scopeId) => {
687
+ if (_push2) {
688
+ if (__props.loading) {
689
+ _push2(`<div class="space-y-3"${_scopeId}><!--[-->`);
690
+ ssrRenderList(3, (i) => {
691
+ _push2(`<div class="flex items-center gap-3"${_scopeId}>`);
692
+ _push2(ssrRenderComponent(_component_USkeleton, { class: "size-8 rounded" }, null, _parent2, _scopeId));
693
+ _push2(`<div class="flex-1"${_scopeId}>`);
694
+ _push2(ssrRenderComponent(_component_USkeleton, { class: "h-4 w-32 mb-1" }, null, _parent2, _scopeId));
695
+ _push2(ssrRenderComponent(_component_USkeleton, { class: "h-3 w-20" }, null, _parent2, _scopeId));
696
+ _push2(`</div></div>`);
697
+ });
698
+ _push2(`<!--]--></div>`);
699
+ } else if (__props.documents.length === 0) {
700
+ _push2(`<div class="text-center py-4 text-muted text-sm"${_scopeId}> No documents yet </div>`);
701
+ } else {
702
+ _push2(`<div class="space-y-2"${_scopeId}><!--[-->`);
703
+ ssrRenderList(__props.documents, (doc) => {
704
+ _push2(ssrRenderComponent(_component_NuxtLink, {
705
+ key: doc.id,
706
+ to: { path: "/docs", query: { path: doc.path } },
707
+ class: "flex items-center gap-3 p-2 -mx-2 rounded-md hover:bg-elevated transition-colors"
708
+ }, {
709
+ default: withCtx((_2, _push3, _parent3, _scopeId2) => {
710
+ if (_push3) {
711
+ _push3(`<div class="flex items-center justify-center size-8 rounded bg-primary/10"${_scopeId2}>`);
712
+ _push3(ssrRenderComponent(_component_UIcon, {
713
+ name: "i-lucide-file-text",
714
+ class: "size-4 text-primary"
715
+ }, null, _parent3, _scopeId2));
716
+ _push3(`</div><div class="flex-1 min-w-0"${_scopeId2}><p class="text-sm font-medium truncate"${_scopeId2}>${ssrInterpolate(doc.title)}</p><div class="flex items-center gap-2"${_scopeId2}>`);
717
+ if (doc.projectName) {
718
+ _push3(ssrRenderComponent(_component_UBadge, {
719
+ variant: "subtle",
720
+ color: "neutral",
721
+ size: "xs"
722
+ }, {
723
+ default: withCtx((_3, _push4, _parent4, _scopeId3) => {
724
+ if (_push4) {
725
+ _push4(`<span class="inline-block size-2 rounded-full mr-1" style="${ssrRenderStyle({ background: doc.projectColor || "var(--ui-primary)" })}"${_scopeId3}></span> ${ssrInterpolate(doc.projectName)}`);
726
+ } else {
727
+ return [
728
+ createVNode("span", {
729
+ class: "inline-block size-2 rounded-full mr-1",
730
+ style: { background: doc.projectColor || "var(--ui-primary)" }
731
+ }, null, 4),
732
+ createTextVNode(" " + toDisplayString(doc.projectName), 1)
733
+ ];
734
+ }
735
+ }),
736
+ _: 2
737
+ }, _parent3, _scopeId2));
738
+ } else {
739
+ _push3(`<!---->`);
740
+ }
741
+ _push3(`</div></div>`);
742
+ if (doc.modifiedAt) {
743
+ _push3(`<span class="text-xs text-muted whitespace-nowrap"${_scopeId2}>${ssrInterpolate(relativeTime(doc.modifiedAt))}</span>`);
744
+ } else {
745
+ _push3(`<!---->`);
746
+ }
747
+ } else {
748
+ return [
749
+ createVNode("div", { class: "flex items-center justify-center size-8 rounded bg-primary/10" }, [
750
+ createVNode(_component_UIcon, {
751
+ name: "i-lucide-file-text",
752
+ class: "size-4 text-primary"
753
+ })
754
+ ]),
755
+ createVNode("div", { class: "flex-1 min-w-0" }, [
756
+ createVNode("p", { class: "text-sm font-medium truncate" }, toDisplayString(doc.title), 1),
757
+ createVNode("div", { class: "flex items-center gap-2" }, [
758
+ doc.projectName ? (openBlock(), createBlock(_component_UBadge, {
759
+ key: 0,
760
+ variant: "subtle",
761
+ color: "neutral",
762
+ size: "xs"
763
+ }, {
764
+ default: withCtx(() => [
765
+ createVNode("span", {
766
+ class: "inline-block size-2 rounded-full mr-1",
767
+ style: { background: doc.projectColor || "var(--ui-primary)" }
768
+ }, null, 4),
769
+ createTextVNode(" " + toDisplayString(doc.projectName), 1)
770
+ ]),
771
+ _: 2
772
+ }, 1024)) : createCommentVNode("", true)
773
+ ])
774
+ ]),
775
+ doc.modifiedAt ? (openBlock(), createBlock("span", {
776
+ key: 0,
777
+ class: "text-xs text-muted whitespace-nowrap"
778
+ }, toDisplayString(relativeTime(doc.modifiedAt)), 1)) : createCommentVNode("", true)
779
+ ];
780
+ }
781
+ }),
782
+ _: 2
783
+ }, _parent2, _scopeId));
784
+ });
785
+ _push2(`<!--]--></div>`);
786
+ }
787
+ } else {
788
+ return [
789
+ __props.loading ? (openBlock(), createBlock("div", {
790
+ key: 0,
791
+ class: "space-y-3"
792
+ }, [
793
+ (openBlock(), createBlock(Fragment, null, renderList(3, (i) => {
794
+ return createVNode("div", {
795
+ key: i,
796
+ class: "flex items-center gap-3"
797
+ }, [
798
+ createVNode(_component_USkeleton, { class: "size-8 rounded" }),
799
+ createVNode("div", { class: "flex-1" }, [
800
+ createVNode(_component_USkeleton, { class: "h-4 w-32 mb-1" }),
801
+ createVNode(_component_USkeleton, { class: "h-3 w-20" })
802
+ ])
803
+ ]);
804
+ }), 64))
805
+ ])) : __props.documents.length === 0 ? (openBlock(), createBlock("div", {
806
+ key: 1,
807
+ class: "text-center py-4 text-muted text-sm"
808
+ }, " No documents yet ")) : (openBlock(), createBlock("div", {
809
+ key: 2,
810
+ class: "space-y-2"
811
+ }, [
812
+ (openBlock(true), createBlock(Fragment, null, renderList(__props.documents, (doc) => {
813
+ return openBlock(), createBlock(_component_NuxtLink, {
814
+ key: doc.id,
815
+ to: { path: "/docs", query: { path: doc.path } },
816
+ class: "flex items-center gap-3 p-2 -mx-2 rounded-md hover:bg-elevated transition-colors"
817
+ }, {
818
+ default: withCtx(() => [
819
+ createVNode("div", { class: "flex items-center justify-center size-8 rounded bg-primary/10" }, [
820
+ createVNode(_component_UIcon, {
821
+ name: "i-lucide-file-text",
822
+ class: "size-4 text-primary"
823
+ })
824
+ ]),
825
+ createVNode("div", { class: "flex-1 min-w-0" }, [
826
+ createVNode("p", { class: "text-sm font-medium truncate" }, toDisplayString(doc.title), 1),
827
+ createVNode("div", { class: "flex items-center gap-2" }, [
828
+ doc.projectName ? (openBlock(), createBlock(_component_UBadge, {
829
+ key: 0,
830
+ variant: "subtle",
831
+ color: "neutral",
832
+ size: "xs"
833
+ }, {
834
+ default: withCtx(() => [
835
+ createVNode("span", {
836
+ class: "inline-block size-2 rounded-full mr-1",
837
+ style: { background: doc.projectColor || "var(--ui-primary)" }
838
+ }, null, 4),
839
+ createTextVNode(" " + toDisplayString(doc.projectName), 1)
840
+ ]),
841
+ _: 2
842
+ }, 1024)) : createCommentVNode("", true)
843
+ ])
844
+ ]),
845
+ doc.modifiedAt ? (openBlock(), createBlock("span", {
846
+ key: 0,
847
+ class: "text-xs text-muted whitespace-nowrap"
848
+ }, toDisplayString(relativeTime(doc.modifiedAt)), 1)) : createCommentVNode("", true)
849
+ ]),
850
+ _: 2
851
+ }, 1032, ["to"]);
852
+ }), 128))
853
+ ]))
854
+ ];
855
+ }
856
+ }),
857
+ _: 1
858
+ }, _parent));
859
+ };
860
+ }
861
+ });
862
+ const _sfc_setup$2 = _sfc_main$2.setup;
863
+ _sfc_main$2.setup = (props, ctx) => {
864
+ const ssrContext = useSSRContext();
865
+ (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("components/dashboard/RecentDocs.vue");
866
+ return _sfc_setup$2 ? _sfc_setup$2(props, ctx) : void 0;
867
+ };
868
+ const __nuxt_component_5 = Object.assign(_sfc_main$2, { __name: "DashboardRecentDocs" });
869
+ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
870
+ __name: "UsageSummary",
871
+ __ssrInlineRender: true,
872
+ props: {
873
+ usage: {},
874
+ loading: { type: Boolean }
875
+ },
876
+ setup(__props) {
877
+ function formatCurrency(value) {
878
+ if (value < 0.01 && value > 0) return "<$0.01";
879
+ return `$${value.toFixed(2)}`;
880
+ }
881
+ function formatTokens(value) {
882
+ if (value >= 1e6) return `${(value / 1e6).toFixed(1)}M`;
883
+ if (value >= 1e3) return `${(value / 1e3).toFixed(1)}K`;
884
+ return String(value);
885
+ }
886
+ return (_ctx, _push, _parent, _attrs) => {
887
+ const _component_UCard = _sfc_main$8;
888
+ const _component_UIcon = _sfc_main$d;
889
+ const _component_UButton = _sfc_main$8$1;
890
+ const _component_USkeleton = _sfc_main$7;
891
+ _push(ssrRenderComponent(_component_UCard, _attrs, {
892
+ header: withCtx((_, _push2, _parent2, _scopeId) => {
893
+ if (_push2) {
894
+ _push2(`<div class="flex items-center justify-between"${_scopeId}><div class="flex items-center gap-2"${_scopeId}>`);
895
+ _push2(ssrRenderComponent(_component_UIcon, {
896
+ name: "i-lucide-bar-chart-3",
897
+ class: "size-4 text-primary"
898
+ }, null, _parent2, _scopeId));
899
+ _push2(`<span class="text-sm font-medium"${_scopeId}>Token Usage (7d)</span></div>`);
900
+ _push2(ssrRenderComponent(_component_UButton, {
901
+ to: "/usage",
902
+ variant: "ghost",
903
+ size: "xs",
904
+ "trailing-icon": "i-lucide-arrow-right"
905
+ }, {
906
+ default: withCtx((_2, _push3, _parent3, _scopeId2) => {
907
+ if (_push3) {
908
+ _push3(` Details `);
909
+ } else {
910
+ return [
911
+ createTextVNode(" Details ")
912
+ ];
913
+ }
914
+ }),
915
+ _: 1
916
+ }, _parent2, _scopeId));
917
+ _push2(`</div>`);
918
+ } else {
919
+ return [
920
+ createVNode("div", { class: "flex items-center justify-between" }, [
921
+ createVNode("div", { class: "flex items-center gap-2" }, [
922
+ createVNode(_component_UIcon, {
923
+ name: "i-lucide-bar-chart-3",
924
+ class: "size-4 text-primary"
925
+ }),
926
+ createVNode("span", { class: "text-sm font-medium" }, "Token Usage (7d)")
927
+ ]),
928
+ createVNode(_component_UButton, {
929
+ to: "/usage",
930
+ variant: "ghost",
931
+ size: "xs",
932
+ "trailing-icon": "i-lucide-arrow-right"
933
+ }, {
934
+ default: withCtx(() => [
935
+ createTextVNode(" Details ")
936
+ ]),
937
+ _: 1
938
+ })
939
+ ])
940
+ ];
941
+ }
942
+ }),
943
+ default: withCtx((_, _push2, _parent2, _scopeId) => {
944
+ if (_push2) {
945
+ if (__props.loading) {
946
+ _push2(`<div class="grid grid-cols-2 gap-4"${_scopeId}><!--[-->`);
947
+ ssrRenderList(4, (i) => {
948
+ _push2(`<div${_scopeId}>`);
949
+ _push2(ssrRenderComponent(_component_USkeleton, { class: "h-3 w-12 mb-1" }, null, _parent2, _scopeId));
950
+ _push2(ssrRenderComponent(_component_USkeleton, { class: "h-6 w-16" }, null, _parent2, _scopeId));
951
+ _push2(`</div>`);
952
+ });
953
+ _push2(`<!--]--></div>`);
954
+ } else {
955
+ _push2(`<div class="grid grid-cols-2 gap-4"${_scopeId}><div${_scopeId}><p class="text-xs text-muted mb-0.5"${_scopeId}> Total Cost </p><p class="text-lg font-semibold"${_scopeId}>${ssrInterpolate(formatCurrency(__props.usage.totalCost7d))}</p></div><div${_scopeId}><p class="text-xs text-muted mb-0.5"${_scopeId}> API Calls </p><p class="text-lg font-semibold"${_scopeId}>${ssrInterpolate(__props.usage.totalCalls7d)}</p></div><div${_scopeId}><p class="text-xs text-muted mb-0.5"${_scopeId}> Input Tokens </p><p class="text-lg font-semibold"${_scopeId}>${ssrInterpolate(formatTokens(__props.usage.totalInputTokens7d))}</p></div><div${_scopeId}><p class="text-xs text-muted mb-0.5"${_scopeId}> Output Tokens </p><p class="text-lg font-semibold"${_scopeId}>${ssrInterpolate(formatTokens(__props.usage.totalOutputTokens7d))}</p></div></div>`);
956
+ }
957
+ } else {
958
+ return [
959
+ __props.loading ? (openBlock(), createBlock("div", {
960
+ key: 0,
961
+ class: "grid grid-cols-2 gap-4"
962
+ }, [
963
+ (openBlock(), createBlock(Fragment, null, renderList(4, (i) => {
964
+ return createVNode("div", { key: i }, [
965
+ createVNode(_component_USkeleton, { class: "h-3 w-12 mb-1" }),
966
+ createVNode(_component_USkeleton, { class: "h-6 w-16" })
967
+ ]);
968
+ }), 64))
969
+ ])) : (openBlock(), createBlock("div", {
970
+ key: 1,
971
+ class: "grid grid-cols-2 gap-4"
972
+ }, [
973
+ createVNode("div", null, [
974
+ createVNode("p", { class: "text-xs text-muted mb-0.5" }, " Total Cost "),
975
+ createVNode("p", { class: "text-lg font-semibold" }, toDisplayString(formatCurrency(__props.usage.totalCost7d)), 1)
976
+ ]),
977
+ createVNode("div", null, [
978
+ createVNode("p", { class: "text-xs text-muted mb-0.5" }, " API Calls "),
979
+ createVNode("p", { class: "text-lg font-semibold" }, toDisplayString(__props.usage.totalCalls7d), 1)
980
+ ]),
981
+ createVNode("div", null, [
982
+ createVNode("p", { class: "text-xs text-muted mb-0.5" }, " Input Tokens "),
983
+ createVNode("p", { class: "text-lg font-semibold" }, toDisplayString(formatTokens(__props.usage.totalInputTokens7d)), 1)
984
+ ]),
985
+ createVNode("div", null, [
986
+ createVNode("p", { class: "text-xs text-muted mb-0.5" }, " Output Tokens "),
987
+ createVNode("p", { class: "text-lg font-semibold" }, toDisplayString(formatTokens(__props.usage.totalOutputTokens7d)), 1)
988
+ ])
989
+ ]))
990
+ ];
991
+ }
992
+ }),
993
+ _: 1
994
+ }, _parent));
995
+ };
996
+ }
997
+ });
998
+ const _sfc_setup$1 = _sfc_main$1.setup;
999
+ _sfc_main$1.setup = (props, ctx) => {
1000
+ const ssrContext = useSSRContext();
1001
+ (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("components/dashboard/UsageSummary.vue");
1002
+ return _sfc_setup$1 ? _sfc_setup$1(props, ctx) : void 0;
1003
+ };
1004
+ const __nuxt_component_6 = Object.assign(_sfc_main$1, { __name: "DashboardUsageSummary" });
1005
+ const _sfc_main = /* @__PURE__ */ defineComponent({
1006
+ __name: "dashboard",
1007
+ __ssrInlineRender: true,
1008
+ setup(__props) {
1009
+ const { user } = useAuth();
1010
+ const overview = ref(null);
1011
+ const loading = ref(true);
1012
+ return (_ctx, _push, _parent, _attrs) => {
1013
+ const _component_UDashboardPanel = _sfc_main$1$1;
1014
+ const _component_UDashboardNavbar = _sfc_main$6;
1015
+ const _component_DashboardStatCards = __nuxt_component_2;
1016
+ const _component_DashboardUpcomingTasks = __nuxt_component_3;
1017
+ const _component_DashboardRecentChats = __nuxt_component_4;
1018
+ const _component_DashboardRecentDocs = __nuxt_component_5;
1019
+ const _component_DashboardUsageSummary = __nuxt_component_6;
1020
+ _push(`<div${ssrRenderAttrs(mergeProps({ class: "contents" }, _attrs))}>`);
1021
+ _push(ssrRenderComponent(_component_UDashboardPanel, {
1022
+ id: "dashboard",
1023
+ grow: ""
1024
+ }, {
1025
+ header: withCtx((_, _push2, _parent2, _scopeId) => {
1026
+ if (_push2) {
1027
+ _push2(ssrRenderComponent(_component_UDashboardNavbar, { title: "Dashboard" }, null, _parent2, _scopeId));
1028
+ } else {
1029
+ return [
1030
+ createVNode(_component_UDashboardNavbar, { title: "Dashboard" })
1031
+ ];
1032
+ }
1033
+ }),
1034
+ body: withCtx((_, _push2, _parent2, _scopeId) => {
1035
+ if (_push2) {
1036
+ _push2(`<div class="p-4 space-y-6"${_scopeId}><div${_scopeId}><h1 class="text-2xl font-bold"${_scopeId}> Welcome back${ssrInterpolate(unref(user)?.name ? `, ${unref(user).name}` : "")}</h1><p class="text-muted mt-1 text-sm"${_scopeId}> Here&#39;s what&#39;s happening in your workspace. </p></div>`);
1037
+ _push2(ssrRenderComponent(_component_DashboardStatCards, {
1038
+ overview: unref(overview),
1039
+ loading: unref(loading)
1040
+ }, null, _parent2, _scopeId));
1041
+ _push2(`<div class="grid gap-6 lg:grid-cols-2"${_scopeId}>`);
1042
+ _push2(ssrRenderComponent(_component_DashboardUpcomingTasks, {
1043
+ tasks: unref(overview)?.tasks.upcoming ?? [],
1044
+ loading: unref(loading)
1045
+ }, null, _parent2, _scopeId));
1046
+ _push2(ssrRenderComponent(_component_DashboardRecentChats, {
1047
+ conversations: unref(overview)?.conversations ?? [],
1048
+ loading: unref(loading)
1049
+ }, null, _parent2, _scopeId));
1050
+ _push2(`</div><div class="grid gap-6 lg:grid-cols-2"${_scopeId}>`);
1051
+ _push2(ssrRenderComponent(_component_DashboardRecentDocs, {
1052
+ documents: unref(overview)?.documents ?? [],
1053
+ loading: unref(loading)
1054
+ }, null, _parent2, _scopeId));
1055
+ _push2(ssrRenderComponent(_component_DashboardUsageSummary, {
1056
+ usage: unref(overview)?.usage ?? { totalCost7d: 0, totalCalls7d: 0, totalInputTokens7d: 0, totalOutputTokens7d: 0 },
1057
+ loading: unref(loading)
1058
+ }, null, _parent2, _scopeId));
1059
+ _push2(`</div></div>`);
1060
+ } else {
1061
+ return [
1062
+ createVNode("div", { class: "p-4 space-y-6" }, [
1063
+ createVNode("div", null, [
1064
+ createVNode("h1", { class: "text-2xl font-bold" }, " Welcome back" + toDisplayString(unref(user)?.name ? `, ${unref(user).name}` : ""), 1),
1065
+ createVNode("p", { class: "text-muted mt-1 text-sm" }, " Here's what's happening in your workspace. ")
1066
+ ]),
1067
+ createVNode(_component_DashboardStatCards, {
1068
+ overview: unref(overview),
1069
+ loading: unref(loading)
1070
+ }, null, 8, ["overview", "loading"]),
1071
+ createVNode("div", { class: "grid gap-6 lg:grid-cols-2" }, [
1072
+ createVNode(_component_DashboardUpcomingTasks, {
1073
+ tasks: unref(overview)?.tasks.upcoming ?? [],
1074
+ loading: unref(loading)
1075
+ }, null, 8, ["tasks", "loading"]),
1076
+ createVNode(_component_DashboardRecentChats, {
1077
+ conversations: unref(overview)?.conversations ?? [],
1078
+ loading: unref(loading)
1079
+ }, null, 8, ["conversations", "loading"])
1080
+ ]),
1081
+ createVNode("div", { class: "grid gap-6 lg:grid-cols-2" }, [
1082
+ createVNode(_component_DashboardRecentDocs, {
1083
+ documents: unref(overview)?.documents ?? [],
1084
+ loading: unref(loading)
1085
+ }, null, 8, ["documents", "loading"]),
1086
+ createVNode(_component_DashboardUsageSummary, {
1087
+ usage: unref(overview)?.usage ?? { totalCost7d: 0, totalCalls7d: 0, totalInputTokens7d: 0, totalOutputTokens7d: 0 },
1088
+ loading: unref(loading)
1089
+ }, null, 8, ["usage", "loading"])
1090
+ ])
1091
+ ])
1092
+ ];
1093
+ }
1094
+ }),
1095
+ _: 1
1096
+ }, _parent));
1097
+ _push(`</div>`);
1098
+ };
1099
+ }
1100
+ });
1101
+ const _sfc_setup = _sfc_main.setup;
1102
+ _sfc_main.setup = (props, ctx) => {
1103
+ const ssrContext = useSSRContext();
1104
+ (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("pages/dashboard.vue");
1105
+ return _sfc_setup ? _sfc_setup(props, ctx) : void 0;
1106
+ };
1107
+
1108
+ export { _sfc_main as default };
1109
+ //# sourceMappingURL=dashboard-YEscLBQN.mjs.map