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.
- package/.output/nitro.json +1 -1
- package/.output/public/_nuxt/{B4LjQa2N.js → 4MiwzAAt.js} +2 -2
- package/.output/public/_nuxt/{BZZeOWzQ.js → 5ZXA0Ckq.js} +1 -1
- package/.output/public/_nuxt/{B194okoV.js → 9IQmsEjr.js} +1 -1
- package/.output/public/_nuxt/{DQ_ZoW_9.js → 9QnH0xQM.js} +1 -1
- package/.output/public/_nuxt/{CF0HGIV6.js → B1X4Bzcy.js} +1 -1
- package/.output/public/_nuxt/{D9lowtoI.js → B3y_Qqox.js} +1 -1
- package/.output/public/_nuxt/{BB1R_SaV.js → B6S_ob86.js} +1 -1
- package/.output/public/_nuxt/{DVf1IpSh.js → BAIz-dEB.js} +1 -1
- package/.output/public/_nuxt/{CNFNMRY1.js → BCtfQCzC.js} +1 -1
- package/.output/public/_nuxt/BIIJhjQO.js +1 -0
- package/.output/public/_nuxt/BIckl6wA.js +1 -0
- package/.output/public/_nuxt/{Biy6boRV.js → BJ3o57WW.js} +1 -1
- package/.output/public/_nuxt/{B5rIsDOv.js → BNetzZzF.js} +1 -1
- package/.output/public/_nuxt/{DFXLcgxL.js → BOj6t-oo.js} +1 -1
- package/.output/public/_nuxt/{BDUpLPg_.js → BS0ofHJK.js} +1 -1
- package/.output/public/_nuxt/{DIdcflWi.js → BWhMnjID.js} +1 -1
- package/.output/public/_nuxt/{CExLOuIW.js → BYjadNrw.js} +1 -1
- package/.output/public/_nuxt/{C8ytOrRD.js → BZXMQuYP.js} +1 -1
- package/.output/public/_nuxt/{Ddih3UKd.js → B_3_hrpn.js} +1 -1
- package/.output/public/_nuxt/{CxSyRXlk.js → BaBZjmMC.js} +1 -1
- package/.output/public/_nuxt/BaMqDm5u.js +1 -0
- package/.output/public/_nuxt/BasgsT_S.js +1 -0
- package/.output/public/_nuxt/{Cehzuz52.js → BffWCM73.js} +1 -1
- package/.output/public/_nuxt/{Dh0BcDEI.js → BhzMoffi.js} +1 -1
- package/.output/public/_nuxt/{DmV68Eyp.js → BjjCvHLT.js} +1 -1
- package/.output/public/_nuxt/{nzAH3Wk0.js → BlAZO7nq.js} +1 -1
- package/.output/public/_nuxt/{BRPJdy3u.js → BlhFigLL.js} +1 -1
- package/.output/public/_nuxt/{CfTFjEuh.js → Bm9LyG4F.js} +1 -1
- package/.output/public/_nuxt/BoIxv-gM.js +1 -0
- package/.output/public/_nuxt/{BslL2E8V.js → BqKFIuRj.js} +1 -1
- package/.output/public/_nuxt/Br19oYkq.js +1 -0
- package/.output/public/_nuxt/{PtGESE-F.js → BrNqhp1a.js} +3 -3
- package/.output/public/_nuxt/{FvV9sv7q.js → BsEZoHd1.js} +1 -1
- package/.output/public/_nuxt/{BaPPQtFe.js → BxXOsXrM.js} +10 -10
- package/.output/public/_nuxt/BzOqrmGa.js +7 -0
- package/.output/public/_nuxt/{BNAsyazX.js → C0JKNMDO.js} +1 -1
- package/.output/public/_nuxt/C0kh_F7v.js +1 -0
- package/.output/public/_nuxt/{4Ew5YctE.js → C3FxIITy.js} +1 -1
- package/.output/public/_nuxt/{DnToOWVx.js → C4pxqdgg.js} +1 -1
- package/.output/public/_nuxt/{C5Ue4WbD.js → C61KgSco.js} +1 -1
- package/.output/public/_nuxt/{DcMvYcFq.js → C69W7k2j.js} +1 -1
- package/.output/public/_nuxt/{BnnFvWzv.js → C6RC3lA1.js} +1 -1
- package/.output/public/_nuxt/{DBENYi9d.js → C6aqGHu1.js} +1 -1
- package/.output/public/_nuxt/{YldWqMAh.js → CJUdYEdO.js} +1 -1
- package/.output/public/_nuxt/{BPAM-iC7.js → CKkC3Ptm.js} +1 -1
- package/.output/public/_nuxt/{CTXhFIUN.js → CNnJrDvu.js} +1 -1
- package/.output/public/_nuxt/{BwH2E0-a.js → CVJQGP1Q.js} +1 -1
- package/.output/public/_nuxt/{q0vhMpUB.js → CVgTJeSq.js} +1 -1
- package/.output/public/_nuxt/CWMUi89H.js +1 -0
- package/.output/public/_nuxt/{BU9VyOEC.js → CYP_MLH8.js} +1 -1
- package/.output/public/_nuxt/{76CHU1js.js → C_BdYLzz.js} +1 -1
- package/.output/public/_nuxt/{BQbnVFXA.js → Cdt3I3Go.js} +1 -1
- package/.output/public/_nuxt/Cdu2qGgq.js +1 -0
- package/.output/public/_nuxt/{ChMIRIq6.js → CeIVm4A3.js} +1 -1
- package/.output/public/_nuxt/CeIu7z4p.js +1 -0
- package/.output/public/_nuxt/{CZZw0T2a.js → Ci7UEZQh.js} +1 -1
- package/.output/public/_nuxt/{BP_jQhKs.js → CihWZmJe.js} +2 -2
- package/.output/public/_nuxt/{Bluqlt6l.js → CitkKxhw.js} +1 -1
- package/.output/public/_nuxt/{DIM73BjE.js → CmzH6R-N.js} +2 -2
- package/.output/public/_nuxt/{CD5hHJBM.js → Cp2MA0cm.js} +1 -1
- package/.output/public/_nuxt/{DflBkWfa.js → CqU2XbzO.js} +1 -1
- package/.output/public/_nuxt/{Ccc8OoR8.js → Cqy_L_ip.js} +1 -1
- package/.output/public/_nuxt/Cr8ixbr1.js +1 -0
- package/.output/public/_nuxt/{DdLGO0wP.js → CsJ9KhQ4.js} +1 -1
- package/.output/public/_nuxt/{mHNfVoS0.js → CtYFj7k1.js} +1 -1
- package/.output/public/_nuxt/{DIBimEIe.js → CtchsY6e.js} +1 -1
- package/.output/public/_nuxt/{BboG47Wz.js → Cvp7FI3T.js} +1 -1
- package/.output/public/_nuxt/CxuZBC8n.js +70 -0
- package/.output/public/_nuxt/D2689qk4.js +1 -0
- package/.output/public/_nuxt/{CWWmC6Y7.js → D31L7Ks6.js} +1 -1
- package/.output/public/_nuxt/{JxSV3wOO.js → D3RiUGdz.js} +1 -1
- package/.output/public/_nuxt/{C1tYtAeV.js → D3e44mCL.js} +1 -1
- package/.output/public/_nuxt/{BTWyDDBM.js → D6t3dcTl.js} +1 -1
- package/.output/public/_nuxt/{DpLjEbYb.js → DAQhmSv4.js} +1 -1
- package/.output/public/_nuxt/{BnwR3LQL.js → DB359q8R.js} +1 -1
- package/.output/public/_nuxt/{jCKYMNtT.js → DCzfkCGa.js} +1 -1
- package/.output/public/_nuxt/{BXWm1qrj.js → DG-T44jj.js} +1 -1
- package/.output/public/_nuxt/{BBygTbuF.js → DGX0tzL8.js} +1 -1
- package/.output/public/_nuxt/DHG66LPS.js +1 -0
- package/.output/public/_nuxt/{jBqB49XU.js → DHKLCQRG.js} +1 -1
- package/.output/public/_nuxt/{BDw-JoCx.js → DIoI0uJm.js} +1 -1
- package/.output/public/_nuxt/{DOQA5CEF.js → DJ5V-y_x.js} +1 -1
- package/.output/public/_nuxt/{BGaNWD0s.js → DJMS2og1.js} +1 -1
- package/.output/public/_nuxt/{UmgHYYVi.js → DJjDvbZE.js} +1 -1
- package/.output/public/_nuxt/{DdtX5kio.js → DK9jxJ0g.js} +1 -1
- package/.output/public/_nuxt/{Cc6GlQCO.js → DKZxeXDQ.js} +1 -1
- package/.output/public/_nuxt/{Tp-9mt9j.js → DLETdGFL.js} +1 -1
- package/.output/public/_nuxt/DOICd-Ld.js +1 -0
- package/.output/public/_nuxt/DPEcH-gi.js +65 -0
- package/.output/public/_nuxt/{CVNY6Bll.js → DSRrg8JT.js} +1 -1
- package/.output/public/_nuxt/{Sm7TJN7_.js → DTDgHTuh.js} +2 -2
- package/.output/public/_nuxt/{DeGKAWfY.js → D_3Rq1BS.js} +1 -1
- package/.output/public/_nuxt/{BvnL4Jyv.js → Daz4MeL6.js} +1 -1
- package/.output/public/_nuxt/{Dyd3g9po.js → Db2v8O7O.js} +1 -1
- package/.output/public/_nuxt/{D0FBwEzN.js → Db8-_gO7.js} +1 -1
- package/.output/public/_nuxt/{Cv4Qjbqk.js → DfQu3kEw.js} +1 -1
- package/.output/public/_nuxt/{c-RGQpsW.js → DgV-EDJ9.js} +1 -1
- package/.output/public/_nuxt/{CSF2cTe9.js → DnjGH3SQ.js} +1 -1
- package/.output/public/_nuxt/Dp2X5R2m.js +1 -0
- package/.output/public/_nuxt/DqB723Z0.js +1 -0
- package/.output/public/_nuxt/{DhRePYUI.js → DyRelyfs.js} +1 -1
- package/.output/public/_nuxt/{DZiAD6YN.js → Dy_Cq5LQ.js} +1 -1
- package/.output/public/_nuxt/{DWQMV4k2.js → DznawRFW.js} +1 -1
- package/.output/public/_nuxt/EuOqK1A6.js +1 -0
- package/.output/public/_nuxt/{BVZHIuu-.js → FNC8XZTk.js} +1 -1
- package/.output/public/_nuxt/{Dsk8JtTw.js → Fukkqjkf.js} +1 -1
- package/.output/public/_nuxt/{DNpdNXnv.js → FvlxxmNk.js} +2 -2
- package/.output/public/_nuxt/{zt0Txq93.js → IRSbVPIu.js} +1 -1
- package/.output/public/_nuxt/{T_w6A2Zo.js → JJ3634gV.js} +9 -9
- package/.output/public/_nuxt/{6Tt_Iaya.js → Jez9DHn7.js} +1 -1
- package/.output/public/_nuxt/{Cr7nQmYw.js → KKK6HVeG.js} +1 -1
- package/.output/public/_nuxt/{BJPw54Qz.js → Lwdv_RKd.js} +1 -1
- package/.output/public/_nuxt/{WqUIRM3G.js → Nb2jBtYT.js} +1 -1
- package/.output/public/_nuxt/Q8Ps7oN5.js +1 -0
- package/.output/public/_nuxt/SXTDhzp6.js +1 -0
- package/.output/public/_nuxt/{rfcePMfo.js → Sg2Lwc46.js} +1 -1
- package/.output/public/_nuxt/{gEpwc5gO.js → YuTZB7sD.js} +1 -1
- package/.output/public/_nuxt/{B2OKrc4G.js → _CYZi8HN.js} +1 -1
- package/.output/public/_nuxt/_J_7XIn-.js +1 -0
- package/.output/public/_nuxt/builds/latest.json +1 -1
- package/.output/public/_nuxt/builds/meta/a1e9100c-1a4f-4f7e-bb53-9dbe0d07effb.json +1 -0
- package/.output/public/_nuxt/{Bwx_Kl-4.js → cABRLVee.js} +1 -1
- package/.output/public/_nuxt/{DPuJYSUH.js → eko-0FUm.js} +1 -1
- package/.output/public/_nuxt/entry.CGxIBGAf.css +1 -0
- package/.output/public/_nuxt/{TQOIXkvr.js → g20UHUCv.js} +1 -1
- package/.output/public/_nuxt/{zOs8gUGl.js → gBC9k4Qj.js} +1 -1
- package/.output/public/_nuxt/{CJ3DQEW9.js → ghuJ76mD.js} +1 -1
- package/.output/public/_nuxt/{S6GTaxiQ.js → iBGCpHdw.js} +1 -1
- package/.output/public/_nuxt/{VGlRzjk3.js → inmzPrjz.js} +1 -1
- package/.output/public/_nuxt/{CCkumwhk.js → m5kGCDpI.js} +4 -4
- package/.output/public/_nuxt/{CXkbkhUa.js → nIU2F7ia.js} +3 -3
- package/.output/public/_nuxt/oIX-ZDN6.js +1 -0
- package/.output/public/_nuxt/{TsIha0iy.js → pcUI-zuY.js} +1 -1
- package/.output/public/_nuxt/{BN_2zhBR.js → sf57orEk.js} +1 -1
- package/.output/public/_nuxt/usage.vakN1lvi.css +1 -0
- package/.output/public/_nuxt/{DHYn0MnY.js → wCGVE8_e.js} +1 -1
- package/.output/public/_nuxt/{DMkXE4gH.js → xuzLdW-o.js} +1 -1
- package/.output/public/_nuxt/{DdoFnl6e.js → yNrp2XvX.js} +1 -1
- package/.output/public/_nuxt/{4hIPJQLp.js → yuf23kh9.js} +1 -1
- package/.output/server/chunks/build/CodeIcon-CWD5HcV7.mjs +1 -1
- package/.output/server/chunks/build/DropdownMenu-BBrV9nXz.mjs +1 -1
- package/.output/server/chunks/build/EditorToolbar-DIfb5arC.mjs +1 -1
- package/.output/server/chunks/build/Img-CWLmvN1t.mjs +1 -1
- package/.output/server/chunks/build/MDC-Dx0YPDhe.mjs +1 -1
- package/.output/server/chunks/build/Select-BB1oLrCD.mjs +1 -1
- package/.output/server/chunks/build/SelectMenu-DPssg6zD.mjs +1 -1
- package/.output/server/chunks/build/Table-DCwTlhCj.mjs +1 -1
- package/.output/server/chunks/build/Tooltip-TRyl6dje.mjs +1 -1
- package/.output/server/chunks/build/{_uuid_-CQEMsF1D.mjs → _uuid_-0UgdUhfY.mjs} +8 -7
- package/.output/server/chunks/build/{_uuid_-CQEMsF1D.mjs.map → _uuid_-0UgdUhfY.mjs.map} +1 -1
- package/.output/server/chunks/build/chat-CZMiB68R.mjs.map +1 -1
- package/.output/server/chunks/build/client.precomputed.mjs +1 -1
- package/.output/server/chunks/build/cookie-C_iulBi6.mjs +1 -1
- package/.output/server/chunks/build/{dashboard-24rCroiO.mjs → dashboard-CpMVYnDV.mjs} +13 -6
- package/.output/server/chunks/build/{dashboard-24rCroiO.mjs.map → dashboard-CpMVYnDV.mjs.map} +1 -1
- package/.output/server/chunks/build/dashboard-YEscLBQN.mjs +1109 -0
- package/.output/server/chunks/build/dashboard-YEscLBQN.mjs.map +1 -0
- package/.output/server/chunks/build/{docs-DOGZUctm.mjs → docs-Dk2JnYq3.mjs} +8 -7
- package/.output/server/chunks/build/{docs-DOGZUctm.mjs.map → docs-Dk2JnYq3.mjs.map} +1 -1
- package/.output/server/chunks/build/fetch-BB7Qzkwe.mjs +1 -1
- package/.output/server/chunks/build/{hooks-CuyNIRFI.mjs → hooks-DP8WoUPS.mjs} +2 -2
- package/.output/server/chunks/build/{hooks-CuyNIRFI.mjs.map → hooks-DP8WoUPS.mjs.map} +1 -1
- package/.output/server/chunks/build/{index-BZI-Mj1-.mjs → index-Ba_bPJgk.mjs} +2 -2
- package/.output/server/chunks/build/{index-BZI-Mj1-.mjs.map → index-Ba_bPJgk.mjs.map} +1 -1
- package/.output/server/chunks/build/index-CxDxc9fm.mjs +1 -1
- package/.output/server/chunks/build/server.mjs +26 -17
- package/.output/server/chunks/build/server.mjs.map +1 -1
- package/.output/server/chunks/build/settings-DdkKCJ00.mjs +1 -1
- package/.output/server/chunks/build/styles.mjs +2 -2
- package/.output/server/chunks/build/{tasks-DR55Wjpi.mjs → tasks-DiOi1HG_.mjs} +2 -2
- package/.output/server/chunks/build/{tasks-DR55Wjpi.mjs.map → tasks-DiOi1HG_.mjs.map} +1 -1
- package/.output/server/chunks/build/usage-H_mcd_fz.mjs +1578 -0
- package/.output/server/chunks/build/usage-H_mcd_fz.mjs.map +1 -0
- package/.output/server/chunks/build/{CodeEditorFallback-DfYly7f5.mjs → useCopyToClipboard-vi6FYyyZ.mjs} +29 -2
- package/.output/server/chunks/build/useCopyToClipboard-vi6FYyyZ.mjs.map +1 -0
- package/.output/server/chunks/build/useNotificationBus-BG5JNQf1.mjs +1 -1
- package/.output/server/chunks/build/{usePreferences-CUvZsOq5.mjs → usePreferences-CzC8fRzd.mjs} +7 -1
- package/.output/server/chunks/build/usePreferences-CzC8fRzd.mjs.map +1 -0
- package/.output/server/chunks/build/view-Dc8mvzCB.mjs +1 -1
- package/.output/server/chunks/nitro/nitro.mjs +884 -818
- package/.output/server/chunks/nitro/nitro.mjs.map +1 -1
- package/.output/server/chunks/routes/_ws/chat.mjs +18 -4
- package/.output/server/chunks/routes/_ws/chat.mjs.map +1 -1
- package/.output/server/chunks/routes/api/dashboard/overview.get.mjs +149 -0
- package/.output/server/chunks/routes/api/dashboard/overview.get.mjs.map +1 -0
- package/.output/server/chunks/routes/api/documents/_id/public.get.mjs +1 -1
- package/.output/server/chunks/routes/api/documents/_id/restore.post.mjs +1 -1
- package/.output/server/chunks/routes/api/documents/by-path.post.mjs +1 -1
- package/.output/server/chunks/routes/api/documents/index.delete.mjs +1 -1
- package/.output/server/chunks/routes/api/documents/index.put.mjs +1 -1
- package/.output/server/chunks/routes/api/fs/delete.post.mjs +1 -1
- package/.output/server/chunks/routes/api/fs/list.get.mjs +1 -1
- package/.output/server/chunks/routes/api/fs/mkdir.post.mjs +1 -1
- package/.output/server/chunks/routes/api/fs/move.post.mjs +1 -1
- package/.output/server/chunks/routes/api/fs/read.post.mjs +1 -1
- package/.output/server/chunks/routes/api/fs/rename.post.mjs +1 -1
- package/.output/server/chunks/routes/api/fs/write.post.mjs +1 -1
- package/.output/server/chunks/routes/api/health.get.mjs +1 -1
- package/.output/server/chunks/routes/api/home.get.mjs +1 -1
- package/.output/server/chunks/routes/api/hooks/index.get.mjs +1 -1
- package/.output/server/chunks/routes/api/hooks/index.post.mjs +1 -1
- package/.output/server/chunks/routes/api/hooks/stats.get.mjs +1 -1
- package/.output/server/chunks/routes/api/index.get3.mjs +1 -1
- package/.output/server/chunks/routes/api/index.get4.mjs +1 -1
- package/.output/server/chunks/routes/api/index.get5.mjs +1 -1
- package/.output/server/chunks/routes/api/index.get6.mjs +1 -1
- package/.output/server/chunks/routes/api/index.get7.mjs +1 -1
- package/.output/server/chunks/routes/api/index.get8.mjs +82 -0
- package/.output/server/chunks/routes/api/index.get8.mjs.map +1 -0
- package/.output/server/chunks/routes/api/index.post2.mjs +1 -1
- package/.output/server/chunks/routes/api/index.post3.mjs +1 -1
- package/.output/server/chunks/routes/api/index.post4.mjs +1 -1
- package/.output/server/chunks/routes/api/index.put.mjs +1 -1
- package/.output/server/chunks/routes/api/memory/_id_.delete.mjs +1 -1
- package/.output/server/chunks/routes/api/memory/context.get.mjs +1 -1
- package/.output/server/chunks/routes/api/memory/extract.post.mjs +20 -1
- package/.output/server/chunks/routes/api/memory/extract.post.mjs.map +1 -1
- package/.output/server/chunks/routes/api/memory/search.get.mjs +1 -1
- package/.output/server/chunks/routes/api/memory/store.post.mjs +1 -1
- package/.output/server/chunks/routes/api/projects/index.delete.mjs +1 -1
- package/.output/server/chunks/routes/api/projects/index.get.mjs +1 -1
- package/.output/server/chunks/routes/api/projects/index.put.mjs +1 -1
- package/.output/server/chunks/routes/api/secrets/_key_.delete.mjs +1 -1
- package/.output/server/chunks/routes/api/secrets/_key_.get.mjs +1 -1
- package/.output/server/chunks/routes/api/secrets/_key_.put.mjs +1 -1
- package/.output/server/chunks/routes/api/tasks/_id/restore.post.mjs +1 -1
- package/.output/server/chunks/routes/api/tasks/index.delete.mjs +1 -1
- package/.output/server/chunks/routes/api/tasks/index.put.mjs +1 -1
- package/.output/server/chunks/routes/api/tasks/tags.get.mjs +1 -1
- package/.output/server/chunks/routes/api/usage/stats.get.mjs +130 -0
- package/.output/server/chunks/routes/api/usage/stats.get.mjs.map +1 -0
- package/.output/server/chunks/routes/api/user/email.patch.mjs +1 -1
- package/.output/server/chunks/routes/notifications.mjs +1 -1
- package/.output/server/chunks/routes/renderer.mjs +1 -1
- package/.output/server/chunks/routes/terminal.mjs +1 -1
- package/.output/server/index.mjs +1 -1
- package/.output/server/package.json +1 -1
- package/app/components/dashboard/RecentChats.vue +93 -0
- package/app/components/dashboard/RecentDocs.vue +108 -0
- package/app/components/dashboard/StatCards.vue +82 -0
- package/app/components/dashboard/UpcomingTasks.vue +119 -0
- package/app/components/dashboard/UsageSummary.vue +94 -0
- package/app/components/editor/DocumentEditor.vue +5 -3
- package/app/components/usage/UsageCostChart.client.vue +174 -0
- package/app/components/usage/UsageCostChart.server.vue +22 -0
- package/app/components/usage/UsageRecordsTable.vue +249 -0
- package/app/components/usage/UsageSourceDonut.client.vue +93 -0
- package/app/components/usage/UsageSourceDonut.server.vue +21 -0
- package/app/components/usage/UsageStatsCards.vue +101 -0
- package/app/components/usage/UsageTopConsumers.vue +89 -0
- package/app/composables/useCopyToClipboard.ts +37 -0
- package/app/composables/usePreferences.ts +10 -0
- package/app/layouts/dashboard.vue +8 -1
- package/app/pages/chat.vue +11 -1
- package/app/pages/dashboard.vue +65 -64
- package/app/pages/usage.vue +130 -0
- package/app/pages/view/[uuid].vue +4 -3
- package/package.json +1 -1
- package/server/api/dashboard/overview.get.ts +133 -0
- package/server/api/usage/index.get.ts +69 -0
- package/server/api/usage/stats.get.ts +127 -0
- package/server/db/schema.ts +17 -0
- package/server/drizzle/migrations/0011_tearful_johnny_storm.sql +12 -0
- package/server/drizzle/migrations/meta/0011_snapshot.json +1634 -0
- package/server/drizzle/migrations/meta/_journal.json +7 -0
- package/server/routes/_ws/chat.ts +29 -2
- package/server/services/agent-executor.ts +13 -0
- package/server/services/memory-extractor.ts +25 -0
- package/server/utils/log-token-usage.ts +22 -0
- package/shared/types/index.ts +81 -0
- package/.output/public/_nuxt/B34UfOg4.js +0 -1
- package/.output/public/_nuxt/B3DmiwBX.js +0 -1
- package/.output/public/_nuxt/BESViHC6.js +0 -1
- package/.output/public/_nuxt/BIm_buQF.js +0 -1
- package/.output/public/_nuxt/BMh-dHBK.js +0 -1
- package/.output/public/_nuxt/Bkv1Ouue.js +0 -1
- package/.output/public/_nuxt/C4i10ReQ.js +0 -1
- package/.output/public/_nuxt/C5euqjeX.js +0 -1
- package/.output/public/_nuxt/C9hy_rtV.js +0 -1
- package/.output/public/_nuxt/CWJhKIyp.js +0 -1
- package/.output/public/_nuxt/Ck24Z-8o.js +0 -1
- package/.output/public/_nuxt/D1JmZKz7.js +0 -1
- package/.output/public/_nuxt/D6xvQUYG.js +0 -1
- package/.output/public/_nuxt/DGTbw5AQ.js +0 -1
- package/.output/public/_nuxt/Da8Xd1w6.js +0 -1
- package/.output/public/_nuxt/DamUHI17.js +0 -1
- package/.output/public/_nuxt/DoIiMqKa.js +0 -76
- package/.output/public/_nuxt/builds/meta/75ff59f2-0860-4bfc-a288-c670397cae5c.json +0 -1
- package/.output/public/_nuxt/entry.tLLAvqs1.css +0 -1
- package/.output/public/_nuxt/iJ4KRInq.js +0 -1
- package/.output/public/_nuxt/mSr5c6cB.js +0 -1
- package/.output/public/_nuxt/r8g_V5AH.js +0 -1
- package/.output/public/_nuxt/rZmMQHiC.js +0 -1
- package/.output/server/chunks/build/CodeEditorFallback-DfYly7f5.mjs.map +0 -1
- package/.output/server/chunks/build/dashboard-DtbGchTa.mjs +0 -277
- package/.output/server/chunks/build/dashboard-DtbGchTa.mjs.map +0 -1
- package/.output/server/chunks/build/usePreferences-CUvZsOq5.mjs.map +0 -1
- /package/.output/public/_nuxt/{language-detection.Be_IvFWy.css → useCopyToClipboard.Be_IvFWy.css} +0 -0
|
@@ -0,0 +1,1578 @@
|
|
|
1
|
+
import { _ as _sfc_main$1$1, a as _sfc_main$7 } from './DashboardNavbar-Cpq8yKA0.mjs';
|
|
2
|
+
import { _ as _sfc_main$8 } from './FieldGroup-KzsWn_XG.mjs';
|
|
3
|
+
import { g as _sfc_main$d, _ as _sfc_main$8$1, b as useLocale, e as useAppConfig, t as tv } from './server.mjs';
|
|
4
|
+
import { _ as _sfc_main$9 } from './Skeleton-DZqsQzFi.mjs';
|
|
5
|
+
import { defineComponent, ref, watch, mergeProps, withCtx, unref, isRef, createVNode, createBlock, createCommentVNode, openBlock, createTextVNode, toDisplayString, Fragment, renderList, createSlots, useSlots, computed, renderSlot, useSSRContext } from 'vue';
|
|
6
|
+
import { ssrRenderAttrs, ssrRenderComponent, ssrRenderList, ssrInterpolate, ssrRenderClass, ssrRenderAttr, ssrRenderSlot } from 'vue/server-renderer';
|
|
7
|
+
import { _ as _sfc_main$a } from './Card-G40WAFiH.mjs';
|
|
8
|
+
import { _ as _sfc_main$b } from './Badge-C1RKkIgG.mjs';
|
|
9
|
+
import { _ as _sfc_main$e } from './Select-BB1oLrCD.mjs';
|
|
10
|
+
import { _ as _sfc_main$f } from './Input-CV2hlBHo.mjs';
|
|
11
|
+
import { _ as _sfc_main$c } from './Table-DCwTlhCj.mjs';
|
|
12
|
+
import { useForwardPropsEmits, PaginationRoot, PaginationList, PaginationFirst, PaginationPrev, PaginationListItem, PaginationEllipsis, PaginationNext, PaginationLast } from 'reka-ui';
|
|
13
|
+
import { useDebounceFn, reactivePick } from '@vueuse/core';
|
|
14
|
+
import { formatDistanceToNow } from 'date-fns';
|
|
15
|
+
import { u as usePreferences } from './usePreferences-CzC8fRzd.mjs';
|
|
16
|
+
import './DashboardSidebarToggle-Chnqv04k.mjs';
|
|
17
|
+
import './cookie-C_iulBi6.mjs';
|
|
18
|
+
import '../nitro/nitro.mjs';
|
|
19
|
+
import '@anthropic-ai/claude-agent-sdk';
|
|
20
|
+
import 'crypto';
|
|
21
|
+
import 'module';
|
|
22
|
+
import 'path';
|
|
23
|
+
import 'node:http';
|
|
24
|
+
import 'node:https';
|
|
25
|
+
import 'node:crypto';
|
|
26
|
+
import 'stream';
|
|
27
|
+
import 'events';
|
|
28
|
+
import 'http';
|
|
29
|
+
import 'buffer';
|
|
30
|
+
import 'zlib';
|
|
31
|
+
import 'https';
|
|
32
|
+
import 'net';
|
|
33
|
+
import 'tls';
|
|
34
|
+
import 'url';
|
|
35
|
+
import 'node:events';
|
|
36
|
+
import 'node:buffer';
|
|
37
|
+
import 'node:fs';
|
|
38
|
+
import 'node:path';
|
|
39
|
+
import 'fs';
|
|
40
|
+
import 'drizzle-orm/postgres-js/migrator';
|
|
41
|
+
import 'drizzle-orm';
|
|
42
|
+
import 'drizzle-orm/postgres-js';
|
|
43
|
+
import 'postgres';
|
|
44
|
+
import 'drizzle-orm/pg-core';
|
|
45
|
+
import 'better-auth';
|
|
46
|
+
import 'better-auth/adapters/drizzle';
|
|
47
|
+
import 'chokidar';
|
|
48
|
+
import 'fs/promises';
|
|
49
|
+
import 'gray-matter';
|
|
50
|
+
import 'cron';
|
|
51
|
+
import 'node:url';
|
|
52
|
+
import '@iconify/utils';
|
|
53
|
+
import 'consola';
|
|
54
|
+
import './ssr-Bqnw2a-w.mjs';
|
|
55
|
+
import 'vue-router';
|
|
56
|
+
import 'tailwindcss/colors';
|
|
57
|
+
import '@iconify/vue';
|
|
58
|
+
import 'tailwind-variants';
|
|
59
|
+
import '@iconify/utils/lib/css/icon';
|
|
60
|
+
import 'perfect-debounce';
|
|
61
|
+
import '../routes/renderer.mjs';
|
|
62
|
+
import 'vue-bundle-renderer/runtime';
|
|
63
|
+
import 'unhead/server';
|
|
64
|
+
import 'devalue';
|
|
65
|
+
import 'unhead/plugins';
|
|
66
|
+
import 'unhead/utils';
|
|
67
|
+
import '@tanstack/vue-table';
|
|
68
|
+
import '@tanstack/vue-virtual';
|
|
69
|
+
|
|
70
|
+
const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
71
|
+
__name: "UsageStatsCards",
|
|
72
|
+
__ssrInlineRender: true,
|
|
73
|
+
props: {
|
|
74
|
+
stats: {},
|
|
75
|
+
loading: { type: Boolean }
|
|
76
|
+
},
|
|
77
|
+
setup(__props) {
|
|
78
|
+
function formatCurrency(value) {
|
|
79
|
+
if (value < 0.01 && value > 0) return "<$0.01";
|
|
80
|
+
return `$${value.toFixed(2)}`;
|
|
81
|
+
}
|
|
82
|
+
function formatTokens(value) {
|
|
83
|
+
if (value >= 1e6) return `${(value / 1e6).toFixed(1)}M`;
|
|
84
|
+
if (value >= 1e3) return `${(value / 1e3).toFixed(1)}K`;
|
|
85
|
+
return String(value);
|
|
86
|
+
}
|
|
87
|
+
return (_ctx, _push, _parent, _attrs) => {
|
|
88
|
+
const _component_USkeleton = _sfc_main$9;
|
|
89
|
+
const _component_UIcon = _sfc_main$d;
|
|
90
|
+
_push(`<div${ssrRenderAttrs(mergeProps({ class: "grid gap-4 grid-cols-2 sm:grid-cols-3 lg:grid-cols-5" }, _attrs))}>`);
|
|
91
|
+
if (__props.loading) {
|
|
92
|
+
_push(`<!--[-->`);
|
|
93
|
+
ssrRenderList(5, (i) => {
|
|
94
|
+
_push(`<div class="p-4 rounded-lg bg-elevated border border-default">`);
|
|
95
|
+
_push(ssrRenderComponent(_component_USkeleton, { class: "h-4 w-16 mb-2" }, null, _parent));
|
|
96
|
+
_push(ssrRenderComponent(_component_USkeleton, { class: "h-8 w-12" }, null, _parent));
|
|
97
|
+
_push(`</div>`);
|
|
98
|
+
});
|
|
99
|
+
_push(`<!--]-->`);
|
|
100
|
+
} else if (__props.stats) {
|
|
101
|
+
_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">`);
|
|
102
|
+
_push(ssrRenderComponent(_component_UIcon, {
|
|
103
|
+
name: "i-lucide-dollar-sign",
|
|
104
|
+
class: "size-4"
|
|
105
|
+
}, null, _parent));
|
|
106
|
+
_push(`<span>Total Cost</span></div><p class="text-2xl font-semibold">${ssrInterpolate(formatCurrency(__props.stats.totalCostUsd))}</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-arrow-down",
|
|
109
|
+
class: "size-4"
|
|
110
|
+
}, null, _parent));
|
|
111
|
+
_push(`<span>Input Tokens</span></div><p class="text-2xl font-semibold">${ssrInterpolate(formatTokens(__props.stats.totalInputTokens))}</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">`);
|
|
112
|
+
_push(ssrRenderComponent(_component_UIcon, {
|
|
113
|
+
name: "i-lucide-arrow-up",
|
|
114
|
+
class: "size-4"
|
|
115
|
+
}, null, _parent));
|
|
116
|
+
_push(`<span>Output Tokens</span></div><p class="text-2xl font-semibold">${ssrInterpolate(formatTokens(__props.stats.totalOutputTokens))}</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">`);
|
|
117
|
+
_push(ssrRenderComponent(_component_UIcon, {
|
|
118
|
+
name: "i-lucide-zap",
|
|
119
|
+
class: "size-4"
|
|
120
|
+
}, null, _parent));
|
|
121
|
+
_push(`<span>API Calls</span></div><p class="text-2xl font-semibold">${ssrInterpolate(__props.stats.totalCalls)}</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">`);
|
|
122
|
+
_push(ssrRenderComponent(_component_UIcon, {
|
|
123
|
+
name: "i-lucide-calculator",
|
|
124
|
+
class: "size-4"
|
|
125
|
+
}, null, _parent));
|
|
126
|
+
_push(`<span>Avg / Call</span></div><p class="text-2xl font-semibold">${ssrInterpolate(formatCurrency(__props.stats.avgCostPerCall))}</p></div><!--]-->`);
|
|
127
|
+
} else {
|
|
128
|
+
_push(`<!---->`);
|
|
129
|
+
}
|
|
130
|
+
_push(`</div>`);
|
|
131
|
+
};
|
|
132
|
+
}
|
|
133
|
+
});
|
|
134
|
+
const _sfc_setup$6 = _sfc_main$6.setup;
|
|
135
|
+
_sfc_main$6.setup = (props, ctx) => {
|
|
136
|
+
const ssrContext = useSSRContext();
|
|
137
|
+
(ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("components/usage/UsageStatsCards.vue");
|
|
138
|
+
return _sfc_setup$6 ? _sfc_setup$6(props, ctx) : void 0;
|
|
139
|
+
};
|
|
140
|
+
const __nuxt_component_4 = Object.assign(_sfc_main$6, { __name: "UsageStatsCards" });
|
|
141
|
+
const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
142
|
+
__name: "UsageCostChart.server",
|
|
143
|
+
__ssrInlineRender: true,
|
|
144
|
+
props: {
|
|
145
|
+
data: {},
|
|
146
|
+
title: {},
|
|
147
|
+
granularity: {}
|
|
148
|
+
},
|
|
149
|
+
setup(__props) {
|
|
150
|
+
return (_ctx, _push, _parent, _attrs) => {
|
|
151
|
+
const _component_UCard = _sfc_main$a;
|
|
152
|
+
_push(ssrRenderComponent(_component_UCard, mergeProps({ ui: { body: "!p-0" } }, _attrs), createSlots({
|
|
153
|
+
default: withCtx((_, _push2, _parent2, _scopeId) => {
|
|
154
|
+
if (_push2) {
|
|
155
|
+
_push2(`<div class="h-64 bg-muted/5 rounded animate-pulse"${_scopeId}></div>`);
|
|
156
|
+
} else {
|
|
157
|
+
return [
|
|
158
|
+
createVNode("div", { class: "h-64 bg-muted/5 rounded animate-pulse" })
|
|
159
|
+
];
|
|
160
|
+
}
|
|
161
|
+
}),
|
|
162
|
+
_: 2
|
|
163
|
+
}, [
|
|
164
|
+
__props.title ? {
|
|
165
|
+
name: "header",
|
|
166
|
+
fn: withCtx((_, _push2, _parent2, _scopeId) => {
|
|
167
|
+
if (_push2) {
|
|
168
|
+
_push2(`<p class="text-sm font-medium"${_scopeId}>${ssrInterpolate(__props.title)}</p>`);
|
|
169
|
+
} else {
|
|
170
|
+
return [
|
|
171
|
+
createVNode("p", { class: "text-sm font-medium" }, toDisplayString(__props.title), 1)
|
|
172
|
+
];
|
|
173
|
+
}
|
|
174
|
+
}),
|
|
175
|
+
key: "0"
|
|
176
|
+
} : void 0
|
|
177
|
+
]), _parent));
|
|
178
|
+
};
|
|
179
|
+
}
|
|
180
|
+
});
|
|
181
|
+
const _sfc_setup$5 = _sfc_main$5.setup;
|
|
182
|
+
_sfc_main$5.setup = (props, ctx) => {
|
|
183
|
+
const ssrContext = useSSRContext();
|
|
184
|
+
(ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("components/usage/UsageCostChart.server.vue");
|
|
185
|
+
return _sfc_setup$5 ? _sfc_setup$5(props, ctx) : void 0;
|
|
186
|
+
};
|
|
187
|
+
const __nuxt_component_5 = Object.assign(_sfc_main$5, { __name: "UsageCostChart" });
|
|
188
|
+
const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
189
|
+
__name: "UsageSourceDonut.server",
|
|
190
|
+
__ssrInlineRender: true,
|
|
191
|
+
props: {
|
|
192
|
+
data: {},
|
|
193
|
+
title: {}
|
|
194
|
+
},
|
|
195
|
+
setup(__props) {
|
|
196
|
+
return (_ctx, _push, _parent, _attrs) => {
|
|
197
|
+
const _component_UCard = _sfc_main$a;
|
|
198
|
+
_push(ssrRenderComponent(_component_UCard, mergeProps({ ui: { body: "!p-0" } }, _attrs), createSlots({
|
|
199
|
+
default: withCtx((_, _push2, _parent2, _scopeId) => {
|
|
200
|
+
if (_push2) {
|
|
201
|
+
_push2(`<div class="h-64 bg-muted/5 rounded animate-pulse"${_scopeId}></div>`);
|
|
202
|
+
} else {
|
|
203
|
+
return [
|
|
204
|
+
createVNode("div", { class: "h-64 bg-muted/5 rounded animate-pulse" })
|
|
205
|
+
];
|
|
206
|
+
}
|
|
207
|
+
}),
|
|
208
|
+
_: 2
|
|
209
|
+
}, [
|
|
210
|
+
__props.title ? {
|
|
211
|
+
name: "header",
|
|
212
|
+
fn: withCtx((_, _push2, _parent2, _scopeId) => {
|
|
213
|
+
if (_push2) {
|
|
214
|
+
_push2(`<p class="text-sm font-medium"${_scopeId}>${ssrInterpolate(__props.title)}</p>`);
|
|
215
|
+
} else {
|
|
216
|
+
return [
|
|
217
|
+
createVNode("p", { class: "text-sm font-medium" }, toDisplayString(__props.title), 1)
|
|
218
|
+
];
|
|
219
|
+
}
|
|
220
|
+
}),
|
|
221
|
+
key: "0"
|
|
222
|
+
} : void 0
|
|
223
|
+
]), _parent));
|
|
224
|
+
};
|
|
225
|
+
}
|
|
226
|
+
});
|
|
227
|
+
const _sfc_setup$4 = _sfc_main$4.setup;
|
|
228
|
+
_sfc_main$4.setup = (props, ctx) => {
|
|
229
|
+
const ssrContext = useSSRContext();
|
|
230
|
+
(ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("components/usage/UsageSourceDonut.server.vue");
|
|
231
|
+
return _sfc_setup$4 ? _sfc_setup$4(props, ctx) : void 0;
|
|
232
|
+
};
|
|
233
|
+
const __nuxt_component_6 = Object.assign(_sfc_main$4, { __name: "UsageSourceDonut" });
|
|
234
|
+
const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
235
|
+
__name: "UsageTopConsumers",
|
|
236
|
+
__ssrInlineRender: true,
|
|
237
|
+
props: {
|
|
238
|
+
data: {},
|
|
239
|
+
title: {}
|
|
240
|
+
},
|
|
241
|
+
setup(__props) {
|
|
242
|
+
const sourceLabels = {
|
|
243
|
+
chat: "Chat",
|
|
244
|
+
agent: "Agent",
|
|
245
|
+
memory_extraction: "Memory"
|
|
246
|
+
};
|
|
247
|
+
const sourceColors = {
|
|
248
|
+
chat: "primary",
|
|
249
|
+
agent: "warning",
|
|
250
|
+
memory_extraction: "info"
|
|
251
|
+
};
|
|
252
|
+
function formatCurrency(value) {
|
|
253
|
+
if (value < 0.01 && value > 0) return "<$0.01";
|
|
254
|
+
return `$${value.toFixed(4)}`;
|
|
255
|
+
}
|
|
256
|
+
return (_ctx, _push, _parent, _attrs) => {
|
|
257
|
+
const _component_UCard = _sfc_main$a;
|
|
258
|
+
const _component_UBadge = _sfc_main$b;
|
|
259
|
+
_push(ssrRenderComponent(_component_UCard, _attrs, createSlots({
|
|
260
|
+
default: withCtx((_, _push2, _parent2, _scopeId) => {
|
|
261
|
+
if (_push2) {
|
|
262
|
+
if (__props.data.length === 0) {
|
|
263
|
+
_push2(`<div class="flex items-center justify-center h-32 text-muted"${_scopeId}> No usage data </div>`);
|
|
264
|
+
} else {
|
|
265
|
+
_push2(`<div class="divide-y divide-default"${_scopeId}><!--[-->`);
|
|
266
|
+
ssrRenderList(__props.data, (item, index) => {
|
|
267
|
+
_push2(`<div class="${ssrRenderClass([{ "pt-0": index === 0 }, "flex items-center justify-between py-2.5"])}"${_scopeId}><div class="flex items-center gap-3 min-w-0"${_scopeId}><span class="text-sm text-muted w-5 text-right shrink-0"${_scopeId}>${ssrInterpolate(index + 1)}</span><div class="min-w-0"${_scopeId}><p class="text-sm font-medium truncate"${_scopeId}>${ssrInterpolate(item.name)}</p>`);
|
|
268
|
+
_push2(ssrRenderComponent(_component_UBadge, {
|
|
269
|
+
color: sourceColors[item.source],
|
|
270
|
+
variant: "subtle",
|
|
271
|
+
size: "xs"
|
|
272
|
+
}, {
|
|
273
|
+
default: withCtx((_2, _push3, _parent3, _scopeId2) => {
|
|
274
|
+
if (_push3) {
|
|
275
|
+
_push3(`${ssrInterpolate(sourceLabels[item.source])}`);
|
|
276
|
+
} else {
|
|
277
|
+
return [
|
|
278
|
+
createTextVNode(toDisplayString(sourceLabels[item.source]), 1)
|
|
279
|
+
];
|
|
280
|
+
}
|
|
281
|
+
}),
|
|
282
|
+
_: 2
|
|
283
|
+
}, _parent2, _scopeId));
|
|
284
|
+
_push2(`</div></div><div class="text-right shrink-0 ml-4"${_scopeId}><p class="text-sm font-semibold"${_scopeId}>${ssrInterpolate(formatCurrency(item.cost))}</p><p class="text-xs text-muted"${_scopeId}>${ssrInterpolate(item.calls)} ${ssrInterpolate(item.calls === 1 ? "call" : "calls")}</p></div></div>`);
|
|
285
|
+
});
|
|
286
|
+
_push2(`<!--]--></div>`);
|
|
287
|
+
}
|
|
288
|
+
} else {
|
|
289
|
+
return [
|
|
290
|
+
__props.data.length === 0 ? (openBlock(), createBlock("div", {
|
|
291
|
+
key: 0,
|
|
292
|
+
class: "flex items-center justify-center h-32 text-muted"
|
|
293
|
+
}, " No usage data ")) : (openBlock(), createBlock("div", {
|
|
294
|
+
key: 1,
|
|
295
|
+
class: "divide-y divide-default"
|
|
296
|
+
}, [
|
|
297
|
+
(openBlock(true), createBlock(Fragment, null, renderList(__props.data, (item, index) => {
|
|
298
|
+
return openBlock(), createBlock("div", {
|
|
299
|
+
key: `${item.source}-${item.name}`,
|
|
300
|
+
class: ["flex items-center justify-between py-2.5", { "pt-0": index === 0 }]
|
|
301
|
+
}, [
|
|
302
|
+
createVNode("div", { class: "flex items-center gap-3 min-w-0" }, [
|
|
303
|
+
createVNode("span", { class: "text-sm text-muted w-5 text-right shrink-0" }, toDisplayString(index + 1), 1),
|
|
304
|
+
createVNode("div", { class: "min-w-0" }, [
|
|
305
|
+
createVNode("p", { class: "text-sm font-medium truncate" }, toDisplayString(item.name), 1),
|
|
306
|
+
createVNode(_component_UBadge, {
|
|
307
|
+
color: sourceColors[item.source],
|
|
308
|
+
variant: "subtle",
|
|
309
|
+
size: "xs"
|
|
310
|
+
}, {
|
|
311
|
+
default: withCtx(() => [
|
|
312
|
+
createTextVNode(toDisplayString(sourceLabels[item.source]), 1)
|
|
313
|
+
]),
|
|
314
|
+
_: 2
|
|
315
|
+
}, 1032, ["color"])
|
|
316
|
+
])
|
|
317
|
+
]),
|
|
318
|
+
createVNode("div", { class: "text-right shrink-0 ml-4" }, [
|
|
319
|
+
createVNode("p", { class: "text-sm font-semibold" }, toDisplayString(formatCurrency(item.cost)), 1),
|
|
320
|
+
createVNode("p", { class: "text-xs text-muted" }, toDisplayString(item.calls) + " " + toDisplayString(item.calls === 1 ? "call" : "calls"), 1)
|
|
321
|
+
])
|
|
322
|
+
], 2);
|
|
323
|
+
}), 128))
|
|
324
|
+
]))
|
|
325
|
+
];
|
|
326
|
+
}
|
|
327
|
+
}),
|
|
328
|
+
_: 2
|
|
329
|
+
}, [
|
|
330
|
+
__props.title ? {
|
|
331
|
+
name: "header",
|
|
332
|
+
fn: withCtx((_, _push2, _parent2, _scopeId) => {
|
|
333
|
+
if (_push2) {
|
|
334
|
+
_push2(`<p class="text-sm font-medium"${_scopeId}>${ssrInterpolate(__props.title)}</p>`);
|
|
335
|
+
} else {
|
|
336
|
+
return [
|
|
337
|
+
createVNode("p", { class: "text-sm font-medium" }, toDisplayString(__props.title), 1)
|
|
338
|
+
];
|
|
339
|
+
}
|
|
340
|
+
}),
|
|
341
|
+
key: "0"
|
|
342
|
+
} : void 0
|
|
343
|
+
]), _parent));
|
|
344
|
+
};
|
|
345
|
+
}
|
|
346
|
+
});
|
|
347
|
+
const _sfc_setup$3 = _sfc_main$3.setup;
|
|
348
|
+
_sfc_main$3.setup = (props, ctx) => {
|
|
349
|
+
const ssrContext = useSSRContext();
|
|
350
|
+
(ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("components/usage/UsageTopConsumers.vue");
|
|
351
|
+
return _sfc_setup$3 ? _sfc_setup$3(props, ctx) : void 0;
|
|
352
|
+
};
|
|
353
|
+
const __nuxt_component_7 = Object.assign(_sfc_main$3, { __name: "UsageTopConsumers" });
|
|
354
|
+
const theme = {
|
|
355
|
+
"slots": {
|
|
356
|
+
"root": "",
|
|
357
|
+
"list": "flex items-center gap-1",
|
|
358
|
+
"ellipsis": "pointer-events-none",
|
|
359
|
+
"label": "min-w-5 text-center",
|
|
360
|
+
"first": "",
|
|
361
|
+
"prev": "",
|
|
362
|
+
"item": "",
|
|
363
|
+
"next": "",
|
|
364
|
+
"last": ""
|
|
365
|
+
}
|
|
366
|
+
};
|
|
367
|
+
const _sfc_main$2 = {
|
|
368
|
+
__name: "UPagination",
|
|
369
|
+
__ssrInlineRender: true,
|
|
370
|
+
props: {
|
|
371
|
+
as: { type: null, required: false },
|
|
372
|
+
firstIcon: { type: null, required: false },
|
|
373
|
+
prevIcon: { type: null, required: false },
|
|
374
|
+
nextIcon: { type: null, required: false },
|
|
375
|
+
lastIcon: { type: null, required: false },
|
|
376
|
+
ellipsisIcon: { type: null, required: false },
|
|
377
|
+
color: { type: null, required: false, default: "neutral" },
|
|
378
|
+
variant: { type: null, required: false, default: "outline" },
|
|
379
|
+
activeColor: { type: null, required: false, default: "primary" },
|
|
380
|
+
activeVariant: { type: null, required: false, default: "solid" },
|
|
381
|
+
showControls: { type: Boolean, required: false, default: true },
|
|
382
|
+
size: { type: null, required: false },
|
|
383
|
+
to: { type: Function, required: false },
|
|
384
|
+
class: { type: null, required: false },
|
|
385
|
+
ui: { type: null, required: false },
|
|
386
|
+
defaultPage: { type: Number, required: false },
|
|
387
|
+
disabled: { type: Boolean, required: false },
|
|
388
|
+
itemsPerPage: { type: Number, required: false, default: 10 },
|
|
389
|
+
page: { type: Number, required: false },
|
|
390
|
+
showEdges: { type: Boolean, required: false, default: false },
|
|
391
|
+
siblingCount: { type: Number, required: false, default: 2 },
|
|
392
|
+
total: { type: Number, required: false, default: 0 }
|
|
393
|
+
},
|
|
394
|
+
emits: ["update:page"],
|
|
395
|
+
setup(__props, { emit: __emit }) {
|
|
396
|
+
const props = __props;
|
|
397
|
+
const emits = __emit;
|
|
398
|
+
const slots = useSlots();
|
|
399
|
+
const { dir } = useLocale();
|
|
400
|
+
const appConfig = useAppConfig();
|
|
401
|
+
const rootProps = useForwardPropsEmits(reactivePick(props, "as", "defaultPage", "disabled", "itemsPerPage", "page", "showEdges", "siblingCount", "total"), emits);
|
|
402
|
+
const firstIcon = computed(() => props.firstIcon || (dir.value === "rtl" ? appConfig.ui.icons.chevronDoubleRight : appConfig.ui.icons.chevronDoubleLeft));
|
|
403
|
+
const prevIcon = computed(() => props.prevIcon || (dir.value === "rtl" ? appConfig.ui.icons.chevronRight : appConfig.ui.icons.chevronLeft));
|
|
404
|
+
const nextIcon = computed(() => props.nextIcon || (dir.value === "rtl" ? appConfig.ui.icons.chevronLeft : appConfig.ui.icons.chevronRight));
|
|
405
|
+
const lastIcon = computed(() => props.lastIcon || (dir.value === "rtl" ? appConfig.ui.icons.chevronDoubleLeft : appConfig.ui.icons.chevronDoubleRight));
|
|
406
|
+
const ui = computed(() => tv({ extend: tv(theme), ...appConfig.ui?.pagination || {} })());
|
|
407
|
+
return (_ctx, _push, _parent, _attrs) => {
|
|
408
|
+
_push(ssrRenderComponent(unref(PaginationRoot), mergeProps(unref(rootProps), {
|
|
409
|
+
"data-slot": "root",
|
|
410
|
+
class: ui.value.root({ class: [props.ui?.root, props.class] })
|
|
411
|
+
}, _attrs), {
|
|
412
|
+
default: withCtx(({ page, pageCount }, _push2, _parent2, _scopeId) => {
|
|
413
|
+
if (_push2) {
|
|
414
|
+
_push2(ssrRenderComponent(unref(PaginationList), {
|
|
415
|
+
"data-slot": "list",
|
|
416
|
+
class: ui.value.list({ class: props.ui?.list })
|
|
417
|
+
}, {
|
|
418
|
+
default: withCtx(({ items }, _push3, _parent3, _scopeId2) => {
|
|
419
|
+
if (_push3) {
|
|
420
|
+
if (__props.showControls || !!slots.first) {
|
|
421
|
+
_push3(ssrRenderComponent(unref(PaginationFirst), {
|
|
422
|
+
"as-child": "",
|
|
423
|
+
"data-slot": "first",
|
|
424
|
+
class: ui.value.first({ class: props.ui?.first })
|
|
425
|
+
}, {
|
|
426
|
+
default: withCtx((_, _push4, _parent4, _scopeId3) => {
|
|
427
|
+
if (_push4) {
|
|
428
|
+
ssrRenderSlot(_ctx.$slots, "first", {}, () => {
|
|
429
|
+
_push4(ssrRenderComponent(_sfc_main$8$1, {
|
|
430
|
+
color: __props.color,
|
|
431
|
+
variant: __props.variant,
|
|
432
|
+
size: __props.size,
|
|
433
|
+
icon: firstIcon.value,
|
|
434
|
+
to: __props.to?.(1)
|
|
435
|
+
}, null, _parent4, _scopeId3));
|
|
436
|
+
}, _push4, _parent4, _scopeId3);
|
|
437
|
+
} else {
|
|
438
|
+
return [
|
|
439
|
+
renderSlot(_ctx.$slots, "first", {}, () => [
|
|
440
|
+
createVNode(_sfc_main$8$1, {
|
|
441
|
+
color: __props.color,
|
|
442
|
+
variant: __props.variant,
|
|
443
|
+
size: __props.size,
|
|
444
|
+
icon: firstIcon.value,
|
|
445
|
+
to: __props.to?.(1)
|
|
446
|
+
}, null, 8, ["color", "variant", "size", "icon", "to"])
|
|
447
|
+
])
|
|
448
|
+
];
|
|
449
|
+
}
|
|
450
|
+
}),
|
|
451
|
+
_: 2
|
|
452
|
+
}, _parent3, _scopeId2));
|
|
453
|
+
} else {
|
|
454
|
+
_push3(`<!---->`);
|
|
455
|
+
}
|
|
456
|
+
if (__props.showControls || !!slots.prev) {
|
|
457
|
+
_push3(ssrRenderComponent(unref(PaginationPrev), {
|
|
458
|
+
"as-child": "",
|
|
459
|
+
"data-slot": "prev",
|
|
460
|
+
class: ui.value.prev({ class: props.ui?.prev })
|
|
461
|
+
}, {
|
|
462
|
+
default: withCtx((_, _push4, _parent4, _scopeId3) => {
|
|
463
|
+
if (_push4) {
|
|
464
|
+
ssrRenderSlot(_ctx.$slots, "prev", {}, () => {
|
|
465
|
+
_push4(ssrRenderComponent(_sfc_main$8$1, {
|
|
466
|
+
color: __props.color,
|
|
467
|
+
variant: __props.variant,
|
|
468
|
+
size: __props.size,
|
|
469
|
+
icon: prevIcon.value,
|
|
470
|
+
to: page > 1 ? __props.to?.(page - 1) : void 0
|
|
471
|
+
}, null, _parent4, _scopeId3));
|
|
472
|
+
}, _push4, _parent4, _scopeId3);
|
|
473
|
+
} else {
|
|
474
|
+
return [
|
|
475
|
+
renderSlot(_ctx.$slots, "prev", {}, () => [
|
|
476
|
+
createVNode(_sfc_main$8$1, {
|
|
477
|
+
color: __props.color,
|
|
478
|
+
variant: __props.variant,
|
|
479
|
+
size: __props.size,
|
|
480
|
+
icon: prevIcon.value,
|
|
481
|
+
to: page > 1 ? __props.to?.(page - 1) : void 0
|
|
482
|
+
}, null, 8, ["color", "variant", "size", "icon", "to"])
|
|
483
|
+
])
|
|
484
|
+
];
|
|
485
|
+
}
|
|
486
|
+
}),
|
|
487
|
+
_: 2
|
|
488
|
+
}, _parent3, _scopeId2));
|
|
489
|
+
} else {
|
|
490
|
+
_push3(`<!---->`);
|
|
491
|
+
}
|
|
492
|
+
_push3(`<!--[-->`);
|
|
493
|
+
ssrRenderList(items, (item, index) => {
|
|
494
|
+
_push3(`<!--[-->`);
|
|
495
|
+
if (item.type === "page") {
|
|
496
|
+
_push3(ssrRenderComponent(unref(PaginationListItem), {
|
|
497
|
+
"as-child": "",
|
|
498
|
+
value: item.value,
|
|
499
|
+
"data-slot": "item",
|
|
500
|
+
class: ui.value.item({ class: props.ui?.item })
|
|
501
|
+
}, {
|
|
502
|
+
default: withCtx((_, _push4, _parent4, _scopeId3) => {
|
|
503
|
+
if (_push4) {
|
|
504
|
+
ssrRenderSlot(_ctx.$slots, "item", mergeProps({ ref_for: true }, { item, index, page, pageCount }), () => {
|
|
505
|
+
_push4(ssrRenderComponent(_sfc_main$8$1, {
|
|
506
|
+
color: page === item.value ? __props.activeColor : __props.color,
|
|
507
|
+
variant: page === item.value ? __props.activeVariant : __props.variant,
|
|
508
|
+
size: __props.size,
|
|
509
|
+
label: String(item.value),
|
|
510
|
+
ui: { label: ui.value.label() },
|
|
511
|
+
to: __props.to?.(item.value),
|
|
512
|
+
square: ""
|
|
513
|
+
}, null, _parent4, _scopeId3));
|
|
514
|
+
}, _push4, _parent4, _scopeId3);
|
|
515
|
+
} else {
|
|
516
|
+
return [
|
|
517
|
+
renderSlot(_ctx.$slots, "item", mergeProps({ ref_for: true }, { item, index, page, pageCount }), () => [
|
|
518
|
+
createVNode(_sfc_main$8$1, {
|
|
519
|
+
color: page === item.value ? __props.activeColor : __props.color,
|
|
520
|
+
variant: page === item.value ? __props.activeVariant : __props.variant,
|
|
521
|
+
size: __props.size,
|
|
522
|
+
label: String(item.value),
|
|
523
|
+
ui: { label: ui.value.label() },
|
|
524
|
+
to: __props.to?.(item.value),
|
|
525
|
+
square: ""
|
|
526
|
+
}, null, 8, ["color", "variant", "size", "label", "ui", "to"])
|
|
527
|
+
])
|
|
528
|
+
];
|
|
529
|
+
}
|
|
530
|
+
}),
|
|
531
|
+
_: 2
|
|
532
|
+
}, _parent3, _scopeId2));
|
|
533
|
+
} else {
|
|
534
|
+
_push3(ssrRenderComponent(unref(PaginationEllipsis), {
|
|
535
|
+
"as-child": "",
|
|
536
|
+
"data-slot": "ellipsis",
|
|
537
|
+
class: ui.value.ellipsis({ class: props.ui?.ellipsis })
|
|
538
|
+
}, {
|
|
539
|
+
default: withCtx((_, _push4, _parent4, _scopeId3) => {
|
|
540
|
+
if (_push4) {
|
|
541
|
+
ssrRenderSlot(_ctx.$slots, "ellipsis", { ui: ui.value }, () => {
|
|
542
|
+
_push4(ssrRenderComponent(_sfc_main$8$1, {
|
|
543
|
+
as: "div",
|
|
544
|
+
color: __props.color,
|
|
545
|
+
variant: __props.variant,
|
|
546
|
+
size: __props.size,
|
|
547
|
+
icon: __props.ellipsisIcon || unref(appConfig).ui.icons.ellipsis
|
|
548
|
+
}, null, _parent4, _scopeId3));
|
|
549
|
+
}, _push4, _parent4, _scopeId3);
|
|
550
|
+
} else {
|
|
551
|
+
return [
|
|
552
|
+
renderSlot(_ctx.$slots, "ellipsis", { ui: ui.value }, () => [
|
|
553
|
+
createVNode(_sfc_main$8$1, {
|
|
554
|
+
as: "div",
|
|
555
|
+
color: __props.color,
|
|
556
|
+
variant: __props.variant,
|
|
557
|
+
size: __props.size,
|
|
558
|
+
icon: __props.ellipsisIcon || unref(appConfig).ui.icons.ellipsis
|
|
559
|
+
}, null, 8, ["color", "variant", "size", "icon"])
|
|
560
|
+
])
|
|
561
|
+
];
|
|
562
|
+
}
|
|
563
|
+
}),
|
|
564
|
+
_: 2
|
|
565
|
+
}, _parent3, _scopeId2));
|
|
566
|
+
}
|
|
567
|
+
_push3(`<!--]-->`);
|
|
568
|
+
});
|
|
569
|
+
_push3(`<!--]-->`);
|
|
570
|
+
if (__props.showControls || !!slots.next) {
|
|
571
|
+
_push3(ssrRenderComponent(unref(PaginationNext), {
|
|
572
|
+
"as-child": "",
|
|
573
|
+
"data-slot": "next",
|
|
574
|
+
class: ui.value.next({ class: props.ui?.next })
|
|
575
|
+
}, {
|
|
576
|
+
default: withCtx((_, _push4, _parent4, _scopeId3) => {
|
|
577
|
+
if (_push4) {
|
|
578
|
+
ssrRenderSlot(_ctx.$slots, "next", {}, () => {
|
|
579
|
+
_push4(ssrRenderComponent(_sfc_main$8$1, {
|
|
580
|
+
color: __props.color,
|
|
581
|
+
variant: __props.variant,
|
|
582
|
+
size: __props.size,
|
|
583
|
+
icon: nextIcon.value,
|
|
584
|
+
to: page < pageCount ? __props.to?.(page + 1) : void 0
|
|
585
|
+
}, null, _parent4, _scopeId3));
|
|
586
|
+
}, _push4, _parent4, _scopeId3);
|
|
587
|
+
} else {
|
|
588
|
+
return [
|
|
589
|
+
renderSlot(_ctx.$slots, "next", {}, () => [
|
|
590
|
+
createVNode(_sfc_main$8$1, {
|
|
591
|
+
color: __props.color,
|
|
592
|
+
variant: __props.variant,
|
|
593
|
+
size: __props.size,
|
|
594
|
+
icon: nextIcon.value,
|
|
595
|
+
to: page < pageCount ? __props.to?.(page + 1) : void 0
|
|
596
|
+
}, null, 8, ["color", "variant", "size", "icon", "to"])
|
|
597
|
+
])
|
|
598
|
+
];
|
|
599
|
+
}
|
|
600
|
+
}),
|
|
601
|
+
_: 2
|
|
602
|
+
}, _parent3, _scopeId2));
|
|
603
|
+
} else {
|
|
604
|
+
_push3(`<!---->`);
|
|
605
|
+
}
|
|
606
|
+
if (__props.showControls || !!slots.last) {
|
|
607
|
+
_push3(ssrRenderComponent(unref(PaginationLast), {
|
|
608
|
+
"as-child": "",
|
|
609
|
+
"data-slot": "last",
|
|
610
|
+
class: ui.value.last({ class: props.ui?.last })
|
|
611
|
+
}, {
|
|
612
|
+
default: withCtx((_, _push4, _parent4, _scopeId3) => {
|
|
613
|
+
if (_push4) {
|
|
614
|
+
ssrRenderSlot(_ctx.$slots, "last", {}, () => {
|
|
615
|
+
_push4(ssrRenderComponent(_sfc_main$8$1, {
|
|
616
|
+
color: __props.color,
|
|
617
|
+
variant: __props.variant,
|
|
618
|
+
size: __props.size,
|
|
619
|
+
icon: lastIcon.value,
|
|
620
|
+
to: __props.to?.(pageCount)
|
|
621
|
+
}, null, _parent4, _scopeId3));
|
|
622
|
+
}, _push4, _parent4, _scopeId3);
|
|
623
|
+
} else {
|
|
624
|
+
return [
|
|
625
|
+
renderSlot(_ctx.$slots, "last", {}, () => [
|
|
626
|
+
createVNode(_sfc_main$8$1, {
|
|
627
|
+
color: __props.color,
|
|
628
|
+
variant: __props.variant,
|
|
629
|
+
size: __props.size,
|
|
630
|
+
icon: lastIcon.value,
|
|
631
|
+
to: __props.to?.(pageCount)
|
|
632
|
+
}, null, 8, ["color", "variant", "size", "icon", "to"])
|
|
633
|
+
])
|
|
634
|
+
];
|
|
635
|
+
}
|
|
636
|
+
}),
|
|
637
|
+
_: 2
|
|
638
|
+
}, _parent3, _scopeId2));
|
|
639
|
+
} else {
|
|
640
|
+
_push3(`<!---->`);
|
|
641
|
+
}
|
|
642
|
+
} else {
|
|
643
|
+
return [
|
|
644
|
+
__props.showControls || !!slots.first ? (openBlock(), createBlock(unref(PaginationFirst), {
|
|
645
|
+
key: 0,
|
|
646
|
+
"as-child": "",
|
|
647
|
+
"data-slot": "first",
|
|
648
|
+
class: ui.value.first({ class: props.ui?.first })
|
|
649
|
+
}, {
|
|
650
|
+
default: withCtx(() => [
|
|
651
|
+
renderSlot(_ctx.$slots, "first", {}, () => [
|
|
652
|
+
createVNode(_sfc_main$8$1, {
|
|
653
|
+
color: __props.color,
|
|
654
|
+
variant: __props.variant,
|
|
655
|
+
size: __props.size,
|
|
656
|
+
icon: firstIcon.value,
|
|
657
|
+
to: __props.to?.(1)
|
|
658
|
+
}, null, 8, ["color", "variant", "size", "icon", "to"])
|
|
659
|
+
])
|
|
660
|
+
]),
|
|
661
|
+
_: 3
|
|
662
|
+
}, 8, ["class"])) : createCommentVNode("", true),
|
|
663
|
+
__props.showControls || !!slots.prev ? (openBlock(), createBlock(unref(PaginationPrev), {
|
|
664
|
+
key: 1,
|
|
665
|
+
"as-child": "",
|
|
666
|
+
"data-slot": "prev",
|
|
667
|
+
class: ui.value.prev({ class: props.ui?.prev })
|
|
668
|
+
}, {
|
|
669
|
+
default: withCtx(() => [
|
|
670
|
+
renderSlot(_ctx.$slots, "prev", {}, () => [
|
|
671
|
+
createVNode(_sfc_main$8$1, {
|
|
672
|
+
color: __props.color,
|
|
673
|
+
variant: __props.variant,
|
|
674
|
+
size: __props.size,
|
|
675
|
+
icon: prevIcon.value,
|
|
676
|
+
to: page > 1 ? __props.to?.(page - 1) : void 0
|
|
677
|
+
}, null, 8, ["color", "variant", "size", "icon", "to"])
|
|
678
|
+
])
|
|
679
|
+
]),
|
|
680
|
+
_: 2
|
|
681
|
+
}, 1032, ["class"])) : createCommentVNode("", true),
|
|
682
|
+
(openBlock(true), createBlock(Fragment, null, renderList(items, (item, index) => {
|
|
683
|
+
return openBlock(), createBlock(Fragment, { key: index }, [
|
|
684
|
+
item.type === "page" ? (openBlock(), createBlock(unref(PaginationListItem), {
|
|
685
|
+
key: 0,
|
|
686
|
+
"as-child": "",
|
|
687
|
+
value: item.value,
|
|
688
|
+
"data-slot": "item",
|
|
689
|
+
class: ui.value.item({ class: props.ui?.item })
|
|
690
|
+
}, {
|
|
691
|
+
default: withCtx(() => [
|
|
692
|
+
renderSlot(_ctx.$slots, "item", mergeProps({ ref_for: true }, { item, index, page, pageCount }), () => [
|
|
693
|
+
createVNode(_sfc_main$8$1, {
|
|
694
|
+
color: page === item.value ? __props.activeColor : __props.color,
|
|
695
|
+
variant: page === item.value ? __props.activeVariant : __props.variant,
|
|
696
|
+
size: __props.size,
|
|
697
|
+
label: String(item.value),
|
|
698
|
+
ui: { label: ui.value.label() },
|
|
699
|
+
to: __props.to?.(item.value),
|
|
700
|
+
square: ""
|
|
701
|
+
}, null, 8, ["color", "variant", "size", "label", "ui", "to"])
|
|
702
|
+
])
|
|
703
|
+
]),
|
|
704
|
+
_: 2
|
|
705
|
+
}, 1032, ["value", "class"])) : (openBlock(), createBlock(unref(PaginationEllipsis), {
|
|
706
|
+
key: 1,
|
|
707
|
+
"as-child": "",
|
|
708
|
+
"data-slot": "ellipsis",
|
|
709
|
+
class: ui.value.ellipsis({ class: props.ui?.ellipsis })
|
|
710
|
+
}, {
|
|
711
|
+
default: withCtx(() => [
|
|
712
|
+
renderSlot(_ctx.$slots, "ellipsis", { ui: ui.value }, () => [
|
|
713
|
+
createVNode(_sfc_main$8$1, {
|
|
714
|
+
as: "div",
|
|
715
|
+
color: __props.color,
|
|
716
|
+
variant: __props.variant,
|
|
717
|
+
size: __props.size,
|
|
718
|
+
icon: __props.ellipsisIcon || unref(appConfig).ui.icons.ellipsis
|
|
719
|
+
}, null, 8, ["color", "variant", "size", "icon"])
|
|
720
|
+
])
|
|
721
|
+
]),
|
|
722
|
+
_: 3
|
|
723
|
+
}, 8, ["class"]))
|
|
724
|
+
], 64);
|
|
725
|
+
}), 128)),
|
|
726
|
+
__props.showControls || !!slots.next ? (openBlock(), createBlock(unref(PaginationNext), {
|
|
727
|
+
key: 2,
|
|
728
|
+
"as-child": "",
|
|
729
|
+
"data-slot": "next",
|
|
730
|
+
class: ui.value.next({ class: props.ui?.next })
|
|
731
|
+
}, {
|
|
732
|
+
default: withCtx(() => [
|
|
733
|
+
renderSlot(_ctx.$slots, "next", {}, () => [
|
|
734
|
+
createVNode(_sfc_main$8$1, {
|
|
735
|
+
color: __props.color,
|
|
736
|
+
variant: __props.variant,
|
|
737
|
+
size: __props.size,
|
|
738
|
+
icon: nextIcon.value,
|
|
739
|
+
to: page < pageCount ? __props.to?.(page + 1) : void 0
|
|
740
|
+
}, null, 8, ["color", "variant", "size", "icon", "to"])
|
|
741
|
+
])
|
|
742
|
+
]),
|
|
743
|
+
_: 2
|
|
744
|
+
}, 1032, ["class"])) : createCommentVNode("", true),
|
|
745
|
+
__props.showControls || !!slots.last ? (openBlock(), createBlock(unref(PaginationLast), {
|
|
746
|
+
key: 3,
|
|
747
|
+
"as-child": "",
|
|
748
|
+
"data-slot": "last",
|
|
749
|
+
class: ui.value.last({ class: props.ui?.last })
|
|
750
|
+
}, {
|
|
751
|
+
default: withCtx(() => [
|
|
752
|
+
renderSlot(_ctx.$slots, "last", {}, () => [
|
|
753
|
+
createVNode(_sfc_main$8$1, {
|
|
754
|
+
color: __props.color,
|
|
755
|
+
variant: __props.variant,
|
|
756
|
+
size: __props.size,
|
|
757
|
+
icon: lastIcon.value,
|
|
758
|
+
to: __props.to?.(pageCount)
|
|
759
|
+
}, null, 8, ["color", "variant", "size", "icon", "to"])
|
|
760
|
+
])
|
|
761
|
+
]),
|
|
762
|
+
_: 2
|
|
763
|
+
}, 1032, ["class"])) : createCommentVNode("", true)
|
|
764
|
+
];
|
|
765
|
+
}
|
|
766
|
+
}),
|
|
767
|
+
_: 2
|
|
768
|
+
}, _parent2, _scopeId));
|
|
769
|
+
} else {
|
|
770
|
+
return [
|
|
771
|
+
createVNode(unref(PaginationList), {
|
|
772
|
+
"data-slot": "list",
|
|
773
|
+
class: ui.value.list({ class: props.ui?.list })
|
|
774
|
+
}, {
|
|
775
|
+
default: withCtx(({ items }) => [
|
|
776
|
+
__props.showControls || !!slots.first ? (openBlock(), createBlock(unref(PaginationFirst), {
|
|
777
|
+
key: 0,
|
|
778
|
+
"as-child": "",
|
|
779
|
+
"data-slot": "first",
|
|
780
|
+
class: ui.value.first({ class: props.ui?.first })
|
|
781
|
+
}, {
|
|
782
|
+
default: withCtx(() => [
|
|
783
|
+
renderSlot(_ctx.$slots, "first", {}, () => [
|
|
784
|
+
createVNode(_sfc_main$8$1, {
|
|
785
|
+
color: __props.color,
|
|
786
|
+
variant: __props.variant,
|
|
787
|
+
size: __props.size,
|
|
788
|
+
icon: firstIcon.value,
|
|
789
|
+
to: __props.to?.(1)
|
|
790
|
+
}, null, 8, ["color", "variant", "size", "icon", "to"])
|
|
791
|
+
])
|
|
792
|
+
]),
|
|
793
|
+
_: 3
|
|
794
|
+
}, 8, ["class"])) : createCommentVNode("", true),
|
|
795
|
+
__props.showControls || !!slots.prev ? (openBlock(), createBlock(unref(PaginationPrev), {
|
|
796
|
+
key: 1,
|
|
797
|
+
"as-child": "",
|
|
798
|
+
"data-slot": "prev",
|
|
799
|
+
class: ui.value.prev({ class: props.ui?.prev })
|
|
800
|
+
}, {
|
|
801
|
+
default: withCtx(() => [
|
|
802
|
+
renderSlot(_ctx.$slots, "prev", {}, () => [
|
|
803
|
+
createVNode(_sfc_main$8$1, {
|
|
804
|
+
color: __props.color,
|
|
805
|
+
variant: __props.variant,
|
|
806
|
+
size: __props.size,
|
|
807
|
+
icon: prevIcon.value,
|
|
808
|
+
to: page > 1 ? __props.to?.(page - 1) : void 0
|
|
809
|
+
}, null, 8, ["color", "variant", "size", "icon", "to"])
|
|
810
|
+
])
|
|
811
|
+
]),
|
|
812
|
+
_: 2
|
|
813
|
+
}, 1032, ["class"])) : createCommentVNode("", true),
|
|
814
|
+
(openBlock(true), createBlock(Fragment, null, renderList(items, (item, index) => {
|
|
815
|
+
return openBlock(), createBlock(Fragment, { key: index }, [
|
|
816
|
+
item.type === "page" ? (openBlock(), createBlock(unref(PaginationListItem), {
|
|
817
|
+
key: 0,
|
|
818
|
+
"as-child": "",
|
|
819
|
+
value: item.value,
|
|
820
|
+
"data-slot": "item",
|
|
821
|
+
class: ui.value.item({ class: props.ui?.item })
|
|
822
|
+
}, {
|
|
823
|
+
default: withCtx(() => [
|
|
824
|
+
renderSlot(_ctx.$slots, "item", mergeProps({ ref_for: true }, { item, index, page, pageCount }), () => [
|
|
825
|
+
createVNode(_sfc_main$8$1, {
|
|
826
|
+
color: page === item.value ? __props.activeColor : __props.color,
|
|
827
|
+
variant: page === item.value ? __props.activeVariant : __props.variant,
|
|
828
|
+
size: __props.size,
|
|
829
|
+
label: String(item.value),
|
|
830
|
+
ui: { label: ui.value.label() },
|
|
831
|
+
to: __props.to?.(item.value),
|
|
832
|
+
square: ""
|
|
833
|
+
}, null, 8, ["color", "variant", "size", "label", "ui", "to"])
|
|
834
|
+
])
|
|
835
|
+
]),
|
|
836
|
+
_: 2
|
|
837
|
+
}, 1032, ["value", "class"])) : (openBlock(), createBlock(unref(PaginationEllipsis), {
|
|
838
|
+
key: 1,
|
|
839
|
+
"as-child": "",
|
|
840
|
+
"data-slot": "ellipsis",
|
|
841
|
+
class: ui.value.ellipsis({ class: props.ui?.ellipsis })
|
|
842
|
+
}, {
|
|
843
|
+
default: withCtx(() => [
|
|
844
|
+
renderSlot(_ctx.$slots, "ellipsis", { ui: ui.value }, () => [
|
|
845
|
+
createVNode(_sfc_main$8$1, {
|
|
846
|
+
as: "div",
|
|
847
|
+
color: __props.color,
|
|
848
|
+
variant: __props.variant,
|
|
849
|
+
size: __props.size,
|
|
850
|
+
icon: __props.ellipsisIcon || unref(appConfig).ui.icons.ellipsis
|
|
851
|
+
}, null, 8, ["color", "variant", "size", "icon"])
|
|
852
|
+
])
|
|
853
|
+
]),
|
|
854
|
+
_: 3
|
|
855
|
+
}, 8, ["class"]))
|
|
856
|
+
], 64);
|
|
857
|
+
}), 128)),
|
|
858
|
+
__props.showControls || !!slots.next ? (openBlock(), createBlock(unref(PaginationNext), {
|
|
859
|
+
key: 2,
|
|
860
|
+
"as-child": "",
|
|
861
|
+
"data-slot": "next",
|
|
862
|
+
class: ui.value.next({ class: props.ui?.next })
|
|
863
|
+
}, {
|
|
864
|
+
default: withCtx(() => [
|
|
865
|
+
renderSlot(_ctx.$slots, "next", {}, () => [
|
|
866
|
+
createVNode(_sfc_main$8$1, {
|
|
867
|
+
color: __props.color,
|
|
868
|
+
variant: __props.variant,
|
|
869
|
+
size: __props.size,
|
|
870
|
+
icon: nextIcon.value,
|
|
871
|
+
to: page < pageCount ? __props.to?.(page + 1) : void 0
|
|
872
|
+
}, null, 8, ["color", "variant", "size", "icon", "to"])
|
|
873
|
+
])
|
|
874
|
+
]),
|
|
875
|
+
_: 2
|
|
876
|
+
}, 1032, ["class"])) : createCommentVNode("", true),
|
|
877
|
+
__props.showControls || !!slots.last ? (openBlock(), createBlock(unref(PaginationLast), {
|
|
878
|
+
key: 3,
|
|
879
|
+
"as-child": "",
|
|
880
|
+
"data-slot": "last",
|
|
881
|
+
class: ui.value.last({ class: props.ui?.last })
|
|
882
|
+
}, {
|
|
883
|
+
default: withCtx(() => [
|
|
884
|
+
renderSlot(_ctx.$slots, "last", {}, () => [
|
|
885
|
+
createVNode(_sfc_main$8$1, {
|
|
886
|
+
color: __props.color,
|
|
887
|
+
variant: __props.variant,
|
|
888
|
+
size: __props.size,
|
|
889
|
+
icon: lastIcon.value,
|
|
890
|
+
to: __props.to?.(pageCount)
|
|
891
|
+
}, null, 8, ["color", "variant", "size", "icon", "to"])
|
|
892
|
+
])
|
|
893
|
+
]),
|
|
894
|
+
_: 2
|
|
895
|
+
}, 1032, ["class"])) : createCommentVNode("", true)
|
|
896
|
+
]),
|
|
897
|
+
_: 2
|
|
898
|
+
}, 1032, ["class"])
|
|
899
|
+
];
|
|
900
|
+
}
|
|
901
|
+
}),
|
|
902
|
+
_: 3
|
|
903
|
+
}, _parent));
|
|
904
|
+
};
|
|
905
|
+
}
|
|
906
|
+
};
|
|
907
|
+
const _sfc_setup$2 = _sfc_main$2.setup;
|
|
908
|
+
_sfc_main$2.setup = (props, ctx) => {
|
|
909
|
+
const ssrContext = useSSRContext();
|
|
910
|
+
(ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("../node_modules/.pnpm/@nuxt+ui@4.3.0_2329ed002e1dfb3a5ad728629f2842a0/node_modules/@nuxt/ui/dist/runtime/components/Pagination.vue");
|
|
911
|
+
return _sfc_setup$2 ? _sfc_setup$2(props, ctx) : void 0;
|
|
912
|
+
};
|
|
913
|
+
const ALL_VALUE = "__all__";
|
|
914
|
+
const limit = 20;
|
|
915
|
+
const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
916
|
+
__name: "UsageRecordsTable",
|
|
917
|
+
__ssrInlineRender: true,
|
|
918
|
+
props: {
|
|
919
|
+
period: {}
|
|
920
|
+
},
|
|
921
|
+
setup(__props) {
|
|
922
|
+
const props = __props;
|
|
923
|
+
const sourceLabels = {
|
|
924
|
+
chat: "Chat",
|
|
925
|
+
agent: "Agent",
|
|
926
|
+
memory_extraction: "Memory"
|
|
927
|
+
};
|
|
928
|
+
const sourceColors = {
|
|
929
|
+
chat: "primary",
|
|
930
|
+
agent: "warning",
|
|
931
|
+
memory_extraction: "info"
|
|
932
|
+
};
|
|
933
|
+
const sourceFilter = ref(ALL_VALUE);
|
|
934
|
+
const searchQuery = ref("");
|
|
935
|
+
const page = ref(1);
|
|
936
|
+
const records = ref([]);
|
|
937
|
+
const total = ref(0);
|
|
938
|
+
const totalPages = ref(0);
|
|
939
|
+
const loading = ref(false);
|
|
940
|
+
const sourceOptions = [
|
|
941
|
+
{ value: ALL_VALUE, label: "All Sources" },
|
|
942
|
+
{ value: "chat", label: "Chat" },
|
|
943
|
+
{ value: "agent", label: "Agents" },
|
|
944
|
+
{ value: "memory_extraction", label: "Memory" }
|
|
945
|
+
];
|
|
946
|
+
const columns = [
|
|
947
|
+
{ accessorKey: "source", header: "Source" },
|
|
948
|
+
{ accessorKey: "sourceName", header: "Name" },
|
|
949
|
+
{ accessorKey: "inputTokens", header: "Input" },
|
|
950
|
+
{ accessorKey: "outputTokens", header: "Output" },
|
|
951
|
+
{ accessorKey: "costUsd", header: "Cost" },
|
|
952
|
+
{ accessorKey: "durationMs", header: "Duration" },
|
|
953
|
+
{ accessorKey: "createdAt", header: "Time" }
|
|
954
|
+
];
|
|
955
|
+
async function fetchRecords() {
|
|
956
|
+
loading.value = true;
|
|
957
|
+
try {
|
|
958
|
+
const query = {
|
|
959
|
+
period: props.period,
|
|
960
|
+
page: page.value,
|
|
961
|
+
limit
|
|
962
|
+
};
|
|
963
|
+
if (sourceFilter.value !== ALL_VALUE)
|
|
964
|
+
query.source = sourceFilter.value;
|
|
965
|
+
if (searchQuery.value.trim())
|
|
966
|
+
query.search = searchQuery.value.trim();
|
|
967
|
+
const res = await $fetch("/api/usage", { query });
|
|
968
|
+
records.value = res.data;
|
|
969
|
+
total.value = res.pagination.total;
|
|
970
|
+
totalPages.value = res.pagination.totalPages;
|
|
971
|
+
} catch {
|
|
972
|
+
} finally {
|
|
973
|
+
loading.value = false;
|
|
974
|
+
}
|
|
975
|
+
}
|
|
976
|
+
const debouncedFetch = useDebounceFn(() => {
|
|
977
|
+
page.value = 1;
|
|
978
|
+
fetchRecords();
|
|
979
|
+
}, 300);
|
|
980
|
+
watch(sourceFilter, () => {
|
|
981
|
+
page.value = 1;
|
|
982
|
+
fetchRecords();
|
|
983
|
+
});
|
|
984
|
+
watch(searchQuery, debouncedFetch);
|
|
985
|
+
watch(page, fetchRecords);
|
|
986
|
+
watch(() => props.period, () => {
|
|
987
|
+
page.value = 1;
|
|
988
|
+
fetchRecords();
|
|
989
|
+
});
|
|
990
|
+
function formatCost(value) {
|
|
991
|
+
if (value < 1e-4 && value > 0) return "<$0.0001";
|
|
992
|
+
return `$${value.toFixed(4)}`;
|
|
993
|
+
}
|
|
994
|
+
function formatTokenCount(value) {
|
|
995
|
+
if (value >= 1e6) return `${(value / 1e6).toFixed(1)}M`;
|
|
996
|
+
if (value >= 1e3) return `${(value / 1e3).toFixed(1)}K`;
|
|
997
|
+
return String(value);
|
|
998
|
+
}
|
|
999
|
+
function formatDuration(ms) {
|
|
1000
|
+
if (!ms) return "-";
|
|
1001
|
+
if (ms < 1e3) return `${ms}ms`;
|
|
1002
|
+
if (ms < 6e4) return `${(ms / 1e3).toFixed(1)}s`;
|
|
1003
|
+
return `${(ms / 6e4).toFixed(1)}m`;
|
|
1004
|
+
}
|
|
1005
|
+
function formatTime(date) {
|
|
1006
|
+
return formatDistanceToNow(new Date(date), { addSuffix: true });
|
|
1007
|
+
}
|
|
1008
|
+
return (_ctx, _push, _parent, _attrs) => {
|
|
1009
|
+
const _component_UCard = _sfc_main$a;
|
|
1010
|
+
const _component_UBadge = _sfc_main$b;
|
|
1011
|
+
const _component_USelect = _sfc_main$e;
|
|
1012
|
+
const _component_UInput = _sfc_main$f;
|
|
1013
|
+
const _component_USkeleton = _sfc_main$9;
|
|
1014
|
+
const _component_UTable = _sfc_main$c;
|
|
1015
|
+
const _component_UPagination = _sfc_main$2;
|
|
1016
|
+
_push(ssrRenderComponent(_component_UCard, _attrs, createSlots({
|
|
1017
|
+
header: withCtx((_, _push2, _parent2, _scopeId) => {
|
|
1018
|
+
if (_push2) {
|
|
1019
|
+
_push2(`<div class="flex items-center justify-between flex-wrap gap-3"${_scopeId}><div class="flex items-center gap-2"${_scopeId}><p class="text-sm font-medium"${_scopeId}> Usage Records </p>`);
|
|
1020
|
+
if (unref(total) > 0) {
|
|
1021
|
+
_push2(ssrRenderComponent(_component_UBadge, {
|
|
1022
|
+
color: "neutral",
|
|
1023
|
+
variant: "subtle"
|
|
1024
|
+
}, {
|
|
1025
|
+
default: withCtx((_2, _push3, _parent3, _scopeId2) => {
|
|
1026
|
+
if (_push3) {
|
|
1027
|
+
_push3(`${ssrInterpolate(unref(total))}`);
|
|
1028
|
+
} else {
|
|
1029
|
+
return [
|
|
1030
|
+
createTextVNode(toDisplayString(unref(total)), 1)
|
|
1031
|
+
];
|
|
1032
|
+
}
|
|
1033
|
+
}),
|
|
1034
|
+
_: 1
|
|
1035
|
+
}, _parent2, _scopeId));
|
|
1036
|
+
} else {
|
|
1037
|
+
_push2(`<!---->`);
|
|
1038
|
+
}
|
|
1039
|
+
_push2(`</div><div class="flex items-center gap-2"${_scopeId}>`);
|
|
1040
|
+
_push2(ssrRenderComponent(_component_USelect, {
|
|
1041
|
+
modelValue: unref(sourceFilter),
|
|
1042
|
+
"onUpdate:modelValue": ($event) => isRef(sourceFilter) ? sourceFilter.value = $event : null,
|
|
1043
|
+
items: sourceOptions,
|
|
1044
|
+
"value-key": "value",
|
|
1045
|
+
class: "w-36",
|
|
1046
|
+
size: "sm"
|
|
1047
|
+
}, null, _parent2, _scopeId));
|
|
1048
|
+
_push2(ssrRenderComponent(_component_UInput, {
|
|
1049
|
+
modelValue: unref(searchQuery),
|
|
1050
|
+
"onUpdate:modelValue": ($event) => isRef(searchQuery) ? searchQuery.value = $event : null,
|
|
1051
|
+
placeholder: "Search name...",
|
|
1052
|
+
icon: "i-lucide-search",
|
|
1053
|
+
class: "w-48",
|
|
1054
|
+
size: "sm"
|
|
1055
|
+
}, null, _parent2, _scopeId));
|
|
1056
|
+
_push2(`</div></div>`);
|
|
1057
|
+
} else {
|
|
1058
|
+
return [
|
|
1059
|
+
createVNode("div", { class: "flex items-center justify-between flex-wrap gap-3" }, [
|
|
1060
|
+
createVNode("div", { class: "flex items-center gap-2" }, [
|
|
1061
|
+
createVNode("p", { class: "text-sm font-medium" }, " Usage Records "),
|
|
1062
|
+
unref(total) > 0 ? (openBlock(), createBlock(_component_UBadge, {
|
|
1063
|
+
key: 0,
|
|
1064
|
+
color: "neutral",
|
|
1065
|
+
variant: "subtle"
|
|
1066
|
+
}, {
|
|
1067
|
+
default: withCtx(() => [
|
|
1068
|
+
createTextVNode(toDisplayString(unref(total)), 1)
|
|
1069
|
+
]),
|
|
1070
|
+
_: 1
|
|
1071
|
+
})) : createCommentVNode("", true)
|
|
1072
|
+
]),
|
|
1073
|
+
createVNode("div", { class: "flex items-center gap-2" }, [
|
|
1074
|
+
createVNode(_component_USelect, {
|
|
1075
|
+
modelValue: unref(sourceFilter),
|
|
1076
|
+
"onUpdate:modelValue": ($event) => isRef(sourceFilter) ? sourceFilter.value = $event : null,
|
|
1077
|
+
items: sourceOptions,
|
|
1078
|
+
"value-key": "value",
|
|
1079
|
+
class: "w-36",
|
|
1080
|
+
size: "sm"
|
|
1081
|
+
}, null, 8, ["modelValue", "onUpdate:modelValue"]),
|
|
1082
|
+
createVNode(_component_UInput, {
|
|
1083
|
+
modelValue: unref(searchQuery),
|
|
1084
|
+
"onUpdate:modelValue": ($event) => isRef(searchQuery) ? searchQuery.value = $event : null,
|
|
1085
|
+
placeholder: "Search name...",
|
|
1086
|
+
icon: "i-lucide-search",
|
|
1087
|
+
class: "w-48",
|
|
1088
|
+
size: "sm"
|
|
1089
|
+
}, null, 8, ["modelValue", "onUpdate:modelValue"])
|
|
1090
|
+
])
|
|
1091
|
+
])
|
|
1092
|
+
];
|
|
1093
|
+
}
|
|
1094
|
+
}),
|
|
1095
|
+
default: withCtx((_, _push2, _parent2, _scopeId) => {
|
|
1096
|
+
if (_push2) {
|
|
1097
|
+
if (unref(loading) && unref(records).length === 0) {
|
|
1098
|
+
_push2(`<div${_scopeId}><!--[-->`);
|
|
1099
|
+
ssrRenderList(5, (i) => {
|
|
1100
|
+
_push2(ssrRenderComponent(_component_USkeleton, {
|
|
1101
|
+
key: i,
|
|
1102
|
+
class: "h-10 w-full mb-2"
|
|
1103
|
+
}, null, _parent2, _scopeId));
|
|
1104
|
+
});
|
|
1105
|
+
_push2(`<!--]--></div>`);
|
|
1106
|
+
} else if (unref(records).length === 0) {
|
|
1107
|
+
_push2(`<div class="flex flex-col items-center justify-center h-32 text-muted"${_scopeId}><p class="text-sm"${_scopeId}> No records found </p></div>`);
|
|
1108
|
+
} else {
|
|
1109
|
+
_push2(ssrRenderComponent(_component_UTable, {
|
|
1110
|
+
data: unref(records),
|
|
1111
|
+
columns,
|
|
1112
|
+
loading: unref(loading)
|
|
1113
|
+
}, {
|
|
1114
|
+
"source-cell": withCtx(({ row }, _push3, _parent3, _scopeId2) => {
|
|
1115
|
+
if (_push3) {
|
|
1116
|
+
_push3(ssrRenderComponent(_component_UBadge, {
|
|
1117
|
+
color: sourceColors[row.original.source],
|
|
1118
|
+
variant: "subtle",
|
|
1119
|
+
size: "sm"
|
|
1120
|
+
}, {
|
|
1121
|
+
default: withCtx((_2, _push4, _parent4, _scopeId3) => {
|
|
1122
|
+
if (_push4) {
|
|
1123
|
+
_push4(`${ssrInterpolate(sourceLabels[row.original.source] || row.original.source)}`);
|
|
1124
|
+
} else {
|
|
1125
|
+
return [
|
|
1126
|
+
createTextVNode(toDisplayString(sourceLabels[row.original.source] || row.original.source), 1)
|
|
1127
|
+
];
|
|
1128
|
+
}
|
|
1129
|
+
}),
|
|
1130
|
+
_: 2
|
|
1131
|
+
}, _parent3, _scopeId2));
|
|
1132
|
+
} else {
|
|
1133
|
+
return [
|
|
1134
|
+
createVNode(_component_UBadge, {
|
|
1135
|
+
color: sourceColors[row.original.source],
|
|
1136
|
+
variant: "subtle",
|
|
1137
|
+
size: "sm"
|
|
1138
|
+
}, {
|
|
1139
|
+
default: withCtx(() => [
|
|
1140
|
+
createTextVNode(toDisplayString(sourceLabels[row.original.source] || row.original.source), 1)
|
|
1141
|
+
]),
|
|
1142
|
+
_: 2
|
|
1143
|
+
}, 1032, ["color"])
|
|
1144
|
+
];
|
|
1145
|
+
}
|
|
1146
|
+
}),
|
|
1147
|
+
"sourceName-cell": withCtx(({ row }, _push3, _parent3, _scopeId2) => {
|
|
1148
|
+
if (_push3) {
|
|
1149
|
+
_push3(`<span class="text-sm truncate max-w-48 inline-block"${ssrRenderAttr("title", row.original.sourceName)}${_scopeId2}>${ssrInterpolate(row.original.sourceName || "-")}</span>`);
|
|
1150
|
+
} else {
|
|
1151
|
+
return [
|
|
1152
|
+
createVNode("span", {
|
|
1153
|
+
class: "text-sm truncate max-w-48 inline-block",
|
|
1154
|
+
title: row.original.sourceName
|
|
1155
|
+
}, toDisplayString(row.original.sourceName || "-"), 9, ["title"])
|
|
1156
|
+
];
|
|
1157
|
+
}
|
|
1158
|
+
}),
|
|
1159
|
+
"inputTokens-cell": withCtx(({ row }, _push3, _parent3, _scopeId2) => {
|
|
1160
|
+
if (_push3) {
|
|
1161
|
+
_push3(`<span class="text-sm text-muted"${_scopeId2}>${ssrInterpolate(formatTokenCount(row.original.inputTokens))}</span>`);
|
|
1162
|
+
} else {
|
|
1163
|
+
return [
|
|
1164
|
+
createVNode("span", { class: "text-sm text-muted" }, toDisplayString(formatTokenCount(row.original.inputTokens)), 1)
|
|
1165
|
+
];
|
|
1166
|
+
}
|
|
1167
|
+
}),
|
|
1168
|
+
"outputTokens-cell": withCtx(({ row }, _push3, _parent3, _scopeId2) => {
|
|
1169
|
+
if (_push3) {
|
|
1170
|
+
_push3(`<span class="text-sm text-muted"${_scopeId2}>${ssrInterpolate(formatTokenCount(row.original.outputTokens))}</span>`);
|
|
1171
|
+
} else {
|
|
1172
|
+
return [
|
|
1173
|
+
createVNode("span", { class: "text-sm text-muted" }, toDisplayString(formatTokenCount(row.original.outputTokens)), 1)
|
|
1174
|
+
];
|
|
1175
|
+
}
|
|
1176
|
+
}),
|
|
1177
|
+
"costUsd-cell": withCtx(({ row }, _push3, _parent3, _scopeId2) => {
|
|
1178
|
+
if (_push3) {
|
|
1179
|
+
_push3(`<span class="text-sm font-medium"${_scopeId2}>${ssrInterpolate(formatCost(row.original.costUsd))}</span>`);
|
|
1180
|
+
} else {
|
|
1181
|
+
return [
|
|
1182
|
+
createVNode("span", { class: "text-sm font-medium" }, toDisplayString(formatCost(row.original.costUsd)), 1)
|
|
1183
|
+
];
|
|
1184
|
+
}
|
|
1185
|
+
}),
|
|
1186
|
+
"durationMs-cell": withCtx(({ row }, _push3, _parent3, _scopeId2) => {
|
|
1187
|
+
if (_push3) {
|
|
1188
|
+
_push3(`<span class="text-sm text-muted"${_scopeId2}>${ssrInterpolate(formatDuration(row.original.durationMs))}</span>`);
|
|
1189
|
+
} else {
|
|
1190
|
+
return [
|
|
1191
|
+
createVNode("span", { class: "text-sm text-muted" }, toDisplayString(formatDuration(row.original.durationMs)), 1)
|
|
1192
|
+
];
|
|
1193
|
+
}
|
|
1194
|
+
}),
|
|
1195
|
+
"createdAt-cell": withCtx(({ row }, _push3, _parent3, _scopeId2) => {
|
|
1196
|
+
if (_push3) {
|
|
1197
|
+
_push3(`<span class="text-sm text-muted"${_scopeId2}>${ssrInterpolate(formatTime(row.original.createdAt))}</span>`);
|
|
1198
|
+
} else {
|
|
1199
|
+
return [
|
|
1200
|
+
createVNode("span", { class: "text-sm text-muted" }, toDisplayString(formatTime(row.original.createdAt)), 1)
|
|
1201
|
+
];
|
|
1202
|
+
}
|
|
1203
|
+
}),
|
|
1204
|
+
_: 1
|
|
1205
|
+
}, _parent2, _scopeId));
|
|
1206
|
+
}
|
|
1207
|
+
} else {
|
|
1208
|
+
return [
|
|
1209
|
+
unref(loading) && unref(records).length === 0 ? (openBlock(), createBlock("div", { key: 0 }, [
|
|
1210
|
+
(openBlock(), createBlock(Fragment, null, renderList(5, (i) => {
|
|
1211
|
+
return createVNode(_component_USkeleton, {
|
|
1212
|
+
key: i,
|
|
1213
|
+
class: "h-10 w-full mb-2"
|
|
1214
|
+
});
|
|
1215
|
+
}), 64))
|
|
1216
|
+
])) : unref(records).length === 0 ? (openBlock(), createBlock("div", {
|
|
1217
|
+
key: 1,
|
|
1218
|
+
class: "flex flex-col items-center justify-center h-32 text-muted"
|
|
1219
|
+
}, [
|
|
1220
|
+
createVNode("p", { class: "text-sm" }, " No records found ")
|
|
1221
|
+
])) : (openBlock(), createBlock(_component_UTable, {
|
|
1222
|
+
key: 2,
|
|
1223
|
+
data: unref(records),
|
|
1224
|
+
columns,
|
|
1225
|
+
loading: unref(loading)
|
|
1226
|
+
}, {
|
|
1227
|
+
"source-cell": withCtx(({ row }) => [
|
|
1228
|
+
createVNode(_component_UBadge, {
|
|
1229
|
+
color: sourceColors[row.original.source],
|
|
1230
|
+
variant: "subtle",
|
|
1231
|
+
size: "sm"
|
|
1232
|
+
}, {
|
|
1233
|
+
default: withCtx(() => [
|
|
1234
|
+
createTextVNode(toDisplayString(sourceLabels[row.original.source] || row.original.source), 1)
|
|
1235
|
+
]),
|
|
1236
|
+
_: 2
|
|
1237
|
+
}, 1032, ["color"])
|
|
1238
|
+
]),
|
|
1239
|
+
"sourceName-cell": withCtx(({ row }) => [
|
|
1240
|
+
createVNode("span", {
|
|
1241
|
+
class: "text-sm truncate max-w-48 inline-block",
|
|
1242
|
+
title: row.original.sourceName
|
|
1243
|
+
}, toDisplayString(row.original.sourceName || "-"), 9, ["title"])
|
|
1244
|
+
]),
|
|
1245
|
+
"inputTokens-cell": withCtx(({ row }) => [
|
|
1246
|
+
createVNode("span", { class: "text-sm text-muted" }, toDisplayString(formatTokenCount(row.original.inputTokens)), 1)
|
|
1247
|
+
]),
|
|
1248
|
+
"outputTokens-cell": withCtx(({ row }) => [
|
|
1249
|
+
createVNode("span", { class: "text-sm text-muted" }, toDisplayString(formatTokenCount(row.original.outputTokens)), 1)
|
|
1250
|
+
]),
|
|
1251
|
+
"costUsd-cell": withCtx(({ row }) => [
|
|
1252
|
+
createVNode("span", { class: "text-sm font-medium" }, toDisplayString(formatCost(row.original.costUsd)), 1)
|
|
1253
|
+
]),
|
|
1254
|
+
"durationMs-cell": withCtx(({ row }) => [
|
|
1255
|
+
createVNode("span", { class: "text-sm text-muted" }, toDisplayString(formatDuration(row.original.durationMs)), 1)
|
|
1256
|
+
]),
|
|
1257
|
+
"createdAt-cell": withCtx(({ row }) => [
|
|
1258
|
+
createVNode("span", { class: "text-sm text-muted" }, toDisplayString(formatTime(row.original.createdAt)), 1)
|
|
1259
|
+
]),
|
|
1260
|
+
_: 1
|
|
1261
|
+
}, 8, ["data", "loading"]))
|
|
1262
|
+
];
|
|
1263
|
+
}
|
|
1264
|
+
}),
|
|
1265
|
+
_: 2
|
|
1266
|
+
}, [
|
|
1267
|
+
unref(totalPages) > 1 ? {
|
|
1268
|
+
name: "footer",
|
|
1269
|
+
fn: withCtx((_, _push2, _parent2, _scopeId) => {
|
|
1270
|
+
if (_push2) {
|
|
1271
|
+
_push2(`<div class="flex justify-center"${_scopeId}>`);
|
|
1272
|
+
_push2(ssrRenderComponent(_component_UPagination, {
|
|
1273
|
+
page: unref(page),
|
|
1274
|
+
"onUpdate:page": ($event) => isRef(page) ? page.value = $event : null,
|
|
1275
|
+
total: unref(total),
|
|
1276
|
+
"items-per-page": limit,
|
|
1277
|
+
"sibling-count": 1,
|
|
1278
|
+
"show-edges": ""
|
|
1279
|
+
}, null, _parent2, _scopeId));
|
|
1280
|
+
_push2(`</div>`);
|
|
1281
|
+
} else {
|
|
1282
|
+
return [
|
|
1283
|
+
createVNode("div", { class: "flex justify-center" }, [
|
|
1284
|
+
createVNode(_component_UPagination, {
|
|
1285
|
+
page: unref(page),
|
|
1286
|
+
"onUpdate:page": ($event) => isRef(page) ? page.value = $event : null,
|
|
1287
|
+
total: unref(total),
|
|
1288
|
+
"items-per-page": limit,
|
|
1289
|
+
"sibling-count": 1,
|
|
1290
|
+
"show-edges": ""
|
|
1291
|
+
}, null, 8, ["page", "onUpdate:page", "total"])
|
|
1292
|
+
])
|
|
1293
|
+
];
|
|
1294
|
+
}
|
|
1295
|
+
}),
|
|
1296
|
+
key: "0"
|
|
1297
|
+
} : void 0
|
|
1298
|
+
]), _parent));
|
|
1299
|
+
};
|
|
1300
|
+
}
|
|
1301
|
+
});
|
|
1302
|
+
const _sfc_setup$1 = _sfc_main$1.setup;
|
|
1303
|
+
_sfc_main$1.setup = (props, ctx) => {
|
|
1304
|
+
const ssrContext = useSSRContext();
|
|
1305
|
+
(ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("components/usage/UsageRecordsTable.vue");
|
|
1306
|
+
return _sfc_setup$1 ? _sfc_setup$1(props, ctx) : void 0;
|
|
1307
|
+
};
|
|
1308
|
+
const __nuxt_component_8 = Object.assign(_sfc_main$1, { __name: "UsageRecordsTable" });
|
|
1309
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
1310
|
+
__name: "usage",
|
|
1311
|
+
__ssrInlineRender: true,
|
|
1312
|
+
setup(__props) {
|
|
1313
|
+
const { usageStatsPeriod } = usePreferences();
|
|
1314
|
+
const period = ref(usageStatsPeriod.value);
|
|
1315
|
+
const granularity = ref("daily");
|
|
1316
|
+
const stats = ref(null);
|
|
1317
|
+
const loading = ref(false);
|
|
1318
|
+
const periodOptions = [
|
|
1319
|
+
{ label: "24h", value: "24h" },
|
|
1320
|
+
{ label: "7d", value: "7d" },
|
|
1321
|
+
{ label: "30d", value: "30d" }
|
|
1322
|
+
];
|
|
1323
|
+
async function loadStats() {
|
|
1324
|
+
loading.value = true;
|
|
1325
|
+
try {
|
|
1326
|
+
const res = await $fetch("/api/usage/stats", {
|
|
1327
|
+
query: {
|
|
1328
|
+
period: period.value,
|
|
1329
|
+
granularity: granularity.value,
|
|
1330
|
+
tzOffset: (/* @__PURE__ */ new Date()).getTimezoneOffset()
|
|
1331
|
+
}
|
|
1332
|
+
});
|
|
1333
|
+
stats.value = res.data;
|
|
1334
|
+
} catch {
|
|
1335
|
+
} finally {
|
|
1336
|
+
loading.value = false;
|
|
1337
|
+
}
|
|
1338
|
+
}
|
|
1339
|
+
watch(period, (value) => {
|
|
1340
|
+
usageStatsPeriod.value = value;
|
|
1341
|
+
loadStats();
|
|
1342
|
+
});
|
|
1343
|
+
watch(granularity, () => {
|
|
1344
|
+
loadStats();
|
|
1345
|
+
});
|
|
1346
|
+
return (_ctx, _push, _parent, _attrs) => {
|
|
1347
|
+
const _component_UDashboardPanel = _sfc_main$1$1;
|
|
1348
|
+
const _component_UDashboardNavbar = _sfc_main$7;
|
|
1349
|
+
const _component_UFieldGroup = _sfc_main$8;
|
|
1350
|
+
const _component_UButton = _sfc_main$8$1;
|
|
1351
|
+
const _component_UsageStatsCards = __nuxt_component_4;
|
|
1352
|
+
const _component_UsageCostChart = __nuxt_component_5;
|
|
1353
|
+
const _component_UsageSourceDonut = __nuxt_component_6;
|
|
1354
|
+
const _component_UsageTopConsumers = __nuxt_component_7;
|
|
1355
|
+
const _component_UsageRecordsTable = __nuxt_component_8;
|
|
1356
|
+
const _component_UIcon = _sfc_main$d;
|
|
1357
|
+
_push(`<div${ssrRenderAttrs(mergeProps({ class: "contents" }, _attrs))}>`);
|
|
1358
|
+
_push(ssrRenderComponent(_component_UDashboardPanel, {
|
|
1359
|
+
id: "usage",
|
|
1360
|
+
grow: ""
|
|
1361
|
+
}, {
|
|
1362
|
+
header: withCtx((_, _push2, _parent2, _scopeId) => {
|
|
1363
|
+
if (_push2) {
|
|
1364
|
+
_push2(ssrRenderComponent(_component_UDashboardNavbar, { title: "Token Usage" }, {
|
|
1365
|
+
right: withCtx((_2, _push3, _parent3, _scopeId2) => {
|
|
1366
|
+
if (_push3) {
|
|
1367
|
+
_push3(ssrRenderComponent(_component_UFieldGroup, null, {
|
|
1368
|
+
default: withCtx((_3, _push4, _parent4, _scopeId3) => {
|
|
1369
|
+
if (_push4) {
|
|
1370
|
+
_push4(`<!--[-->`);
|
|
1371
|
+
ssrRenderList(periodOptions, (opt) => {
|
|
1372
|
+
_push4(ssrRenderComponent(_component_UButton, {
|
|
1373
|
+
key: opt.value,
|
|
1374
|
+
color: unref(period) === opt.value ? "primary" : "neutral",
|
|
1375
|
+
variant: unref(period) === opt.value ? "solid" : "ghost",
|
|
1376
|
+
size: "sm",
|
|
1377
|
+
onClick: ($event) => period.value = opt.value
|
|
1378
|
+
}, {
|
|
1379
|
+
default: withCtx((_4, _push5, _parent5, _scopeId4) => {
|
|
1380
|
+
if (_push5) {
|
|
1381
|
+
_push5(`${ssrInterpolate(opt.label)}`);
|
|
1382
|
+
} else {
|
|
1383
|
+
return [
|
|
1384
|
+
createTextVNode(toDisplayString(opt.label), 1)
|
|
1385
|
+
];
|
|
1386
|
+
}
|
|
1387
|
+
}),
|
|
1388
|
+
_: 2
|
|
1389
|
+
}, _parent4, _scopeId3));
|
|
1390
|
+
});
|
|
1391
|
+
_push4(`<!--]-->`);
|
|
1392
|
+
} else {
|
|
1393
|
+
return [
|
|
1394
|
+
(openBlock(), createBlock(Fragment, null, renderList(periodOptions, (opt) => {
|
|
1395
|
+
return createVNode(_component_UButton, {
|
|
1396
|
+
key: opt.value,
|
|
1397
|
+
color: unref(period) === opt.value ? "primary" : "neutral",
|
|
1398
|
+
variant: unref(period) === opt.value ? "solid" : "ghost",
|
|
1399
|
+
size: "sm",
|
|
1400
|
+
onClick: ($event) => period.value = opt.value
|
|
1401
|
+
}, {
|
|
1402
|
+
default: withCtx(() => [
|
|
1403
|
+
createTextVNode(toDisplayString(opt.label), 1)
|
|
1404
|
+
]),
|
|
1405
|
+
_: 2
|
|
1406
|
+
}, 1032, ["color", "variant", "onClick"]);
|
|
1407
|
+
}), 64))
|
|
1408
|
+
];
|
|
1409
|
+
}
|
|
1410
|
+
}),
|
|
1411
|
+
_: 1
|
|
1412
|
+
}, _parent3, _scopeId2));
|
|
1413
|
+
} else {
|
|
1414
|
+
return [
|
|
1415
|
+
createVNode(_component_UFieldGroup, null, {
|
|
1416
|
+
default: withCtx(() => [
|
|
1417
|
+
(openBlock(), createBlock(Fragment, null, renderList(periodOptions, (opt) => {
|
|
1418
|
+
return createVNode(_component_UButton, {
|
|
1419
|
+
key: opt.value,
|
|
1420
|
+
color: unref(period) === opt.value ? "primary" : "neutral",
|
|
1421
|
+
variant: unref(period) === opt.value ? "solid" : "ghost",
|
|
1422
|
+
size: "sm",
|
|
1423
|
+
onClick: ($event) => period.value = opt.value
|
|
1424
|
+
}, {
|
|
1425
|
+
default: withCtx(() => [
|
|
1426
|
+
createTextVNode(toDisplayString(opt.label), 1)
|
|
1427
|
+
]),
|
|
1428
|
+
_: 2
|
|
1429
|
+
}, 1032, ["color", "variant", "onClick"]);
|
|
1430
|
+
}), 64))
|
|
1431
|
+
]),
|
|
1432
|
+
_: 1
|
|
1433
|
+
})
|
|
1434
|
+
];
|
|
1435
|
+
}
|
|
1436
|
+
}),
|
|
1437
|
+
_: 1
|
|
1438
|
+
}, _parent2, _scopeId));
|
|
1439
|
+
} else {
|
|
1440
|
+
return [
|
|
1441
|
+
createVNode(_component_UDashboardNavbar, { title: "Token Usage" }, {
|
|
1442
|
+
right: withCtx(() => [
|
|
1443
|
+
createVNode(_component_UFieldGroup, null, {
|
|
1444
|
+
default: withCtx(() => [
|
|
1445
|
+
(openBlock(), createBlock(Fragment, null, renderList(periodOptions, (opt) => {
|
|
1446
|
+
return createVNode(_component_UButton, {
|
|
1447
|
+
key: opt.value,
|
|
1448
|
+
color: unref(period) === opt.value ? "primary" : "neutral",
|
|
1449
|
+
variant: unref(period) === opt.value ? "solid" : "ghost",
|
|
1450
|
+
size: "sm",
|
|
1451
|
+
onClick: ($event) => period.value = opt.value
|
|
1452
|
+
}, {
|
|
1453
|
+
default: withCtx(() => [
|
|
1454
|
+
createTextVNode(toDisplayString(opt.label), 1)
|
|
1455
|
+
]),
|
|
1456
|
+
_: 2
|
|
1457
|
+
}, 1032, ["color", "variant", "onClick"]);
|
|
1458
|
+
}), 64))
|
|
1459
|
+
]),
|
|
1460
|
+
_: 1
|
|
1461
|
+
})
|
|
1462
|
+
]),
|
|
1463
|
+
_: 1
|
|
1464
|
+
})
|
|
1465
|
+
];
|
|
1466
|
+
}
|
|
1467
|
+
}),
|
|
1468
|
+
body: withCtx((_, _push2, _parent2, _scopeId) => {
|
|
1469
|
+
if (_push2) {
|
|
1470
|
+
_push2(`<div class="p-4 space-y-6"${_scopeId}>`);
|
|
1471
|
+
_push2(ssrRenderComponent(_component_UsageStatsCards, {
|
|
1472
|
+
stats: unref(stats),
|
|
1473
|
+
loading: unref(loading)
|
|
1474
|
+
}, null, _parent2, _scopeId));
|
|
1475
|
+
if (unref(stats) && unref(stats).dailyUsage.length > 0) {
|
|
1476
|
+
_push2(ssrRenderComponent(_component_UsageCostChart, {
|
|
1477
|
+
granularity: unref(granularity),
|
|
1478
|
+
"onUpdate:granularity": ($event) => isRef(granularity) ? granularity.value = $event : null,
|
|
1479
|
+
data: unref(stats).dailyUsage,
|
|
1480
|
+
title: "Cost Over Time"
|
|
1481
|
+
}, null, _parent2, _scopeId));
|
|
1482
|
+
} else {
|
|
1483
|
+
_push2(`<!---->`);
|
|
1484
|
+
}
|
|
1485
|
+
_push2(`<div class="grid gap-6 lg:grid-cols-2"${_scopeId}>`);
|
|
1486
|
+
if (unref(stats) && unref(stats).bySource.length > 0) {
|
|
1487
|
+
_push2(ssrRenderComponent(_component_UsageSourceDonut, {
|
|
1488
|
+
data: unref(stats).bySource,
|
|
1489
|
+
title: "Cost by Source"
|
|
1490
|
+
}, null, _parent2, _scopeId));
|
|
1491
|
+
} else {
|
|
1492
|
+
_push2(`<!---->`);
|
|
1493
|
+
}
|
|
1494
|
+
if (unref(stats) && unref(stats).topConsumers.length > 0) {
|
|
1495
|
+
_push2(ssrRenderComponent(_component_UsageTopConsumers, {
|
|
1496
|
+
data: unref(stats).topConsumers,
|
|
1497
|
+
title: "Top Consumers"
|
|
1498
|
+
}, null, _parent2, _scopeId));
|
|
1499
|
+
} else {
|
|
1500
|
+
_push2(`<!---->`);
|
|
1501
|
+
}
|
|
1502
|
+
_push2(`</div>`);
|
|
1503
|
+
if (unref(stats) && unref(stats).totalCalls > 0) {
|
|
1504
|
+
_push2(ssrRenderComponent(_component_UsageRecordsTable, { period: unref(period) }, null, _parent2, _scopeId));
|
|
1505
|
+
} else {
|
|
1506
|
+
_push2(`<!---->`);
|
|
1507
|
+
}
|
|
1508
|
+
if (!unref(loading) && unref(stats) && unref(stats).totalCalls === 0) {
|
|
1509
|
+
_push2(`<div class="flex flex-col items-center justify-center h-64 text-muted"${_scopeId}>`);
|
|
1510
|
+
_push2(ssrRenderComponent(_component_UIcon, {
|
|
1511
|
+
name: "i-lucide-bar-chart-3",
|
|
1512
|
+
class: "size-12 mb-4"
|
|
1513
|
+
}, null, _parent2, _scopeId));
|
|
1514
|
+
_push2(`<p class="text-lg font-medium"${_scopeId}> No usage data yet </p><p class="text-sm mt-1"${_scopeId}> Token usage will appear here once you start using chat or agents </p></div>`);
|
|
1515
|
+
} else {
|
|
1516
|
+
_push2(`<!---->`);
|
|
1517
|
+
}
|
|
1518
|
+
_push2(`</div>`);
|
|
1519
|
+
} else {
|
|
1520
|
+
return [
|
|
1521
|
+
createVNode("div", { class: "p-4 space-y-6" }, [
|
|
1522
|
+
createVNode(_component_UsageStatsCards, {
|
|
1523
|
+
stats: unref(stats),
|
|
1524
|
+
loading: unref(loading)
|
|
1525
|
+
}, null, 8, ["stats", "loading"]),
|
|
1526
|
+
unref(stats) && unref(stats).dailyUsage.length > 0 ? (openBlock(), createBlock(_component_UsageCostChart, {
|
|
1527
|
+
key: 0,
|
|
1528
|
+
granularity: unref(granularity),
|
|
1529
|
+
"onUpdate:granularity": ($event) => isRef(granularity) ? granularity.value = $event : null,
|
|
1530
|
+
data: unref(stats).dailyUsage,
|
|
1531
|
+
title: "Cost Over Time"
|
|
1532
|
+
}, null, 8, ["granularity", "onUpdate:granularity", "data"])) : createCommentVNode("", true),
|
|
1533
|
+
createVNode("div", { class: "grid gap-6 lg:grid-cols-2" }, [
|
|
1534
|
+
unref(stats) && unref(stats).bySource.length > 0 ? (openBlock(), createBlock(_component_UsageSourceDonut, {
|
|
1535
|
+
key: 0,
|
|
1536
|
+
data: unref(stats).bySource,
|
|
1537
|
+
title: "Cost by Source"
|
|
1538
|
+
}, null, 8, ["data"])) : createCommentVNode("", true),
|
|
1539
|
+
unref(stats) && unref(stats).topConsumers.length > 0 ? (openBlock(), createBlock(_component_UsageTopConsumers, {
|
|
1540
|
+
key: 1,
|
|
1541
|
+
data: unref(stats).topConsumers,
|
|
1542
|
+
title: "Top Consumers"
|
|
1543
|
+
}, null, 8, ["data"])) : createCommentVNode("", true)
|
|
1544
|
+
]),
|
|
1545
|
+
unref(stats) && unref(stats).totalCalls > 0 ? (openBlock(), createBlock(_component_UsageRecordsTable, {
|
|
1546
|
+
key: 1,
|
|
1547
|
+
period: unref(period)
|
|
1548
|
+
}, null, 8, ["period"])) : createCommentVNode("", true),
|
|
1549
|
+
!unref(loading) && unref(stats) && unref(stats).totalCalls === 0 ? (openBlock(), createBlock("div", {
|
|
1550
|
+
key: 2,
|
|
1551
|
+
class: "flex flex-col items-center justify-center h-64 text-muted"
|
|
1552
|
+
}, [
|
|
1553
|
+
createVNode(_component_UIcon, {
|
|
1554
|
+
name: "i-lucide-bar-chart-3",
|
|
1555
|
+
class: "size-12 mb-4"
|
|
1556
|
+
}),
|
|
1557
|
+
createVNode("p", { class: "text-lg font-medium" }, " No usage data yet "),
|
|
1558
|
+
createVNode("p", { class: "text-sm mt-1" }, " Token usage will appear here once you start using chat or agents ")
|
|
1559
|
+
])) : createCommentVNode("", true)
|
|
1560
|
+
])
|
|
1561
|
+
];
|
|
1562
|
+
}
|
|
1563
|
+
}),
|
|
1564
|
+
_: 1
|
|
1565
|
+
}, _parent));
|
|
1566
|
+
_push(`</div>`);
|
|
1567
|
+
};
|
|
1568
|
+
}
|
|
1569
|
+
});
|
|
1570
|
+
const _sfc_setup = _sfc_main.setup;
|
|
1571
|
+
_sfc_main.setup = (props, ctx) => {
|
|
1572
|
+
const ssrContext = useSSRContext();
|
|
1573
|
+
(ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("pages/usage.vue");
|
|
1574
|
+
return _sfc_setup ? _sfc_setup(props, ctx) : void 0;
|
|
1575
|
+
};
|
|
1576
|
+
|
|
1577
|
+
export { _sfc_main as default };
|
|
1578
|
+
//# sourceMappingURL=usage-H_mcd_fz.mjs.map
|