nomnomtokens 0.2.0 → 0.3.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 (181) hide show
  1. package/README.md +15 -10
  2. package/dist/index.js +4208 -3455
  3. package/dist/index.js.map +1 -1
  4. package/package.json +1 -1
  5. package/web/nitro.json +1 -1
  6. package/web/public/_nuxt/4C_a23zt.js +1 -0
  7. package/web/public/_nuxt/B1jhn8zK.js +1 -0
  8. package/web/public/_nuxt/B2aHje2L.js +1 -0
  9. package/web/public/_nuxt/BAfR3Wl32.js +1 -0
  10. package/web/public/_nuxt/BMSLzLlT.js +1 -0
  11. package/web/public/_nuxt/BOKlFKrX.js +1 -0
  12. package/web/public/_nuxt/Ba6z8j_4.js +1 -0
  13. package/web/public/_nuxt/{B1O-ibEy.js → Bag9D5rq.js} +2 -2
  14. package/web/public/_nuxt/Bia8fJFj.js +1 -0
  15. package/web/public/_nuxt/{tqUqm2f-.js → Bprokln-.js} +1 -1
  16. package/web/public/_nuxt/C51OzH6V.js +1 -0
  17. package/web/public/_nuxt/C9MiT_Wm.js +96 -0
  18. package/web/public/_nuxt/CDzUujek.js +2 -0
  19. package/web/public/_nuxt/CIHIOSzn.js +1 -0
  20. package/web/public/_nuxt/CIKwfDBl.js +1 -0
  21. package/web/public/_nuxt/COwSpxrx.js +1 -0
  22. package/web/public/_nuxt/CZSbzIi-.js +1 -0
  23. package/web/public/_nuxt/CfBMjq8x.js +1 -0
  24. package/web/public/_nuxt/Ch3y3mGJ.js +1 -0
  25. package/web/public/_nuxt/{B7bAnU98.js → CkRZsevx.js} +1 -1
  26. package/web/public/_nuxt/Cq1Sq3Go.js +1 -0
  27. package/web/public/_nuxt/CsN_oUfs.js +1 -0
  28. package/web/public/_nuxt/CvIugsJe2.js +1 -0
  29. package/web/public/_nuxt/D49wVVwm2.js +1 -0
  30. package/web/public/_nuxt/D4C6J8YV.js +1 -0
  31. package/web/public/_nuxt/D7Ph0tZD.js +1 -0
  32. package/web/public/_nuxt/D9Mxq5ER.js +1 -0
  33. package/web/public/_nuxt/D9j6aFUy.js +1 -0
  34. package/web/public/_nuxt/DMgad8mU.js +1 -0
  35. package/web/public/_nuxt/DPnm6zS2.js +1 -0
  36. package/web/public/_nuxt/DQEnwY-5.js +1 -0
  37. package/web/public/_nuxt/Dh50_bkx.js +1 -0
  38. package/web/public/_nuxt/DhJW7zb9.js +1 -0
  39. package/web/public/_nuxt/DnTwjl0_2.js +47 -0
  40. package/web/public/_nuxt/DsH8sTHf.js +1 -0
  41. package/web/public/_nuxt/Dy30RUCD2.js +1 -0
  42. package/web/public/_nuxt/OU1MVgXQ.js +1 -0
  43. package/web/public/_nuxt/W3KL_OjU.js +1 -0
  44. package/web/public/_nuxt/{BgvEQa6E.js → ZjfInHdu.js} +2 -2
  45. package/web/public/_nuxt/builds/latest.json +1 -1
  46. package/web/public/_nuxt/builds/meta/e90c8a2d-9e50-4b58-8019-6b1bf4c8fc6d.json +1 -0
  47. package/web/public/_nuxt/cbxnBwm6.js +1 -0
  48. package/web/public/_nuxt/entry.MbqNBIeH.css +2 -0
  49. package/web/public/_nuxt/m3-Vaz25.js +1 -0
  50. package/web/server/chunks/_/filters.mjs +1 -1
  51. package/web/server/chunks/build/{Badge-C0eTW_zX.mjs → Badge-BmQgPqZ1.mjs} +2 -2
  52. package/web/server/chunks/build/{Badge-C0eTW_zX.mjs.map → Badge-BmQgPqZ1.mjs.map} +1 -1
  53. package/web/server/chunks/build/{Button-7BTto1uR.mjs → Button-DnpDAHT3.mjs} +2 -2
  54. package/web/server/chunks/build/{Button-7BTto1uR.mjs.map → Button-DnpDAHT3.mjs.map} +1 -1
  55. package/web/server/chunks/build/Card-Be4cmWue.mjs +30 -0
  56. package/web/server/chunks/build/Card-Be4cmWue.mjs.map +1 -0
  57. package/web/server/chunks/build/{CardAction-M7nFIGyX.mjs → CardAction-CkY0xYx3.mjs} +2 -2
  58. package/web/server/chunks/build/{CardAction-M7nFIGyX.mjs.map → CardAction-CkY0xYx3.mjs.map} +1 -1
  59. package/web/server/chunks/build/{CardTitle-D9ve_H9E.mjs → CardContent-C_IMqI8K.mjs} +26 -26
  60. package/web/server/chunks/build/CardContent-C_IMqI8K.mjs.map +1 -0
  61. package/web/server/chunks/build/{EmptyState-DWgJMVCI.mjs → EmptyState-FUeBWCT0.mjs} +2 -2
  62. package/web/server/chunks/build/{EmptyState-DWgJMVCI.mjs.map → EmptyState-FUeBWCT0.mjs.map} +1 -1
  63. package/web/server/chunks/build/{FilterBar-vwbfttN7.mjs → FilterBar-BlEsJ5dy.mjs} +5 -5
  64. package/web/server/chunks/build/{FilterBar-vwbfttN7.mjs.map → FilterBar-BlEsJ5dy.mjs.map} +1 -1
  65. package/web/server/chunks/build/{Progress-BckzQSF5.mjs → Progress-BUpfE9Os.mjs} +2 -2
  66. package/web/server/chunks/build/{Progress-BckzQSF5.mjs.map → Progress-BUpfE9Os.mjs.map} +1 -1
  67. package/web/server/chunks/build/Skeleton-BidW2_bw.mjs +28 -0
  68. package/web/server/chunks/build/Skeleton-BidW2_bw.mjs.map +1 -0
  69. package/web/server/chunks/build/{Sparkline-Cxifh2uK.mjs → Sparkline-CaCRq45J.mjs} +6 -5
  70. package/web/server/chunks/build/Sparkline-CaCRq45J.mjs.map +1 -0
  71. package/web/server/chunks/build/{TableCell-BZwItbY_.mjs → TableCell-xM3CadYu.mjs} +2 -2
  72. package/web/server/chunks/build/{TableCell-BZwItbY_.mjs.map → TableCell-xM3CadYu.mjs.map} +1 -1
  73. package/web/server/chunks/build/{Tooltip-BVTXdgMT.mjs → Tooltip-BZX3jLtj.mjs} +16 -4
  74. package/web/server/chunks/build/Tooltip-BZX3jLtj.mjs.map +1 -0
  75. package/web/server/chunks/build/{_id_-BKmH0aHH.mjs → _id_-BvccBwzH.mjs} +14 -11
  76. package/web/server/chunks/build/_id_-BvccBwzH.mjs.map +1 -0
  77. package/web/server/chunks/build/alerts-6wBAzQHU.mjs +159 -0
  78. package/web/server/chunks/build/alerts-6wBAzQHU.mjs.map +1 -0
  79. package/web/server/chunks/build/{fetch-Debw9R9i.mjs → asyncData-CMa0z9Yw.mjs} +8 -129
  80. package/web/server/chunks/build/asyncData-CMa0z9Yw.mjs.map +1 -0
  81. package/web/server/chunks/build/default-BokiYQNv.mjs +847 -0
  82. package/web/server/chunks/build/default-BokiYQNv.mjs.map +1 -0
  83. package/web/server/chunks/build/error-404-DPRNxhXC.mjs +2 -2
  84. package/web/server/chunks/build/error-500-DXGrtqsW.mjs +2 -2
  85. package/web/server/chunks/build/export-BhfwmSMl.mjs +184 -0
  86. package/web/server/chunks/build/export-BhfwmSMl.mjs.map +1 -0
  87. package/web/server/chunks/build/fetch-DJ9NNbFP.mjs +131 -0
  88. package/web/server/chunks/build/fetch-DJ9NNbFP.mjs.map +1 -0
  89. package/web/server/chunks/build/import-CO3NEu0P.mjs +233 -0
  90. package/web/server/chunks/build/import-CO3NEu0P.mjs.map +1 -0
  91. package/web/server/chunks/build/{limits-CnRLojCD.mjs → limits-CX9zBSqw.mjs} +15 -12
  92. package/web/server/chunks/build/limits-CX9zBSqw.mjs.map +1 -0
  93. package/web/server/chunks/build/nuxt-link-mYiLFsJs.mjs +2 -2
  94. package/web/server/chunks/build/{pages-DlIWqsLr.mjs → pages-DyXqJyPq.mjs} +140 -15
  95. package/web/server/chunks/build/pages-DyXqJyPq.mjs.map +1 -0
  96. package/web/server/chunks/build/{providers-DOMeWSDZ.mjs → providers-Ca7keu2G.mjs} +17 -14
  97. package/web/server/chunks/build/providers-Ca7keu2G.mjs.map +1 -0
  98. package/web/server/chunks/build/scopes-E5z80S19.mjs +1348 -0
  99. package/web/server/chunks/build/scopes-E5z80S19.mjs.map +1 -0
  100. package/web/server/chunks/build/{sessions-peyhKv2_.mjs → sessions-CESRiCOS.mjs} +14 -11
  101. package/web/server/chunks/build/sessions-CESRiCOS.mjs.map +1 -0
  102. package/web/server/chunks/build/{timeline-P2RrZyBs.mjs → timeline-d27OlbZN.mjs} +16 -13
  103. package/web/server/chunks/build/timeline-d27OlbZN.mjs.map +1 -0
  104. package/web/server/chunks/build/useFormat-NkyUqeik.mjs +71 -0
  105. package/web/server/chunks/build/useFormat-NkyUqeik.mjs.map +1 -0
  106. package/web/server/chunks/build/{useStats-Dor6kLek.mjs → useStats-CmYzpdbE.mjs} +11 -3
  107. package/web/server/chunks/build/useStats-CmYzpdbE.mjs.map +1 -0
  108. package/web/server/chunks/nitro/nitro.mjs +739 -195
  109. package/web/server/chunks/nitro/nitro.mjs.map +1 -1
  110. package/web/server/chunks/routes/api/alerts.get.mjs +24 -0
  111. package/web/server/chunks/routes/api/alerts.get.mjs.map +1 -0
  112. package/web/server/chunks/routes/api/alerts.put.mjs +27 -0
  113. package/web/server/chunks/routes/api/alerts.put.mjs.map +1 -0
  114. package/web/server/chunks/routes/api/events/stream.get.mjs +3 -3
  115. package/web/server/chunks/routes/api/export.get.mjs +36 -0
  116. package/web/server/chunks/routes/api/export.get.mjs.map +1 -0
  117. package/web/server/chunks/routes/api/import/csv.post.mjs +65 -0
  118. package/web/server/chunks/routes/api/import/csv.post.mjs.map +1 -0
  119. package/web/server/chunks/routes/api/ingest.post.mjs +3 -3
  120. package/web/server/chunks/routes/api/meta.get.mjs +3 -3
  121. package/web/server/chunks/routes/api/stats/heatmap.get.mjs +2 -2
  122. package/web/server/chunks/routes/api/stats/limits.get.mjs +3 -3
  123. package/web/server/chunks/routes/api/stats/providers.get.mjs +3 -3
  124. package/web/server/chunks/routes/api/stats/scopes.get.mjs +3 -3
  125. package/web/server/chunks/routes/api/stats/series.get.mjs +3 -3
  126. package/web/server/chunks/routes/api/stats/session/_id_.get.mjs +3 -3
  127. package/web/server/chunks/routes/api/stats/sessions.get.mjs +3 -3
  128. package/web/server/chunks/routes/api/stats/summary.get.mjs +3 -3
  129. package/web/server/chunks/routes/renderer.mjs +2 -2
  130. package/web/server/chunks/virtual/entry.mjs +26 -11
  131. package/web/server/chunks/virtual/precomputed.mjs +1 -1
  132. package/web/server/chunks/virtual/precomputed.mjs.map +1 -1
  133. package/web/server/index.mjs +3 -3
  134. package/web/public/_nuxt/075nz0Lp.js +0 -1
  135. package/web/public/_nuxt/BDF8cO8j.js +0 -1
  136. package/web/public/_nuxt/BGnU88BC.js +0 -1
  137. package/web/public/_nuxt/BPhzhJvP.js +0 -1
  138. package/web/public/_nuxt/BgaLDD2o.js +0 -1
  139. package/web/public/_nuxt/BioUjjBz.js +0 -1
  140. package/web/public/_nuxt/BlvSknce.js +0 -1
  141. package/web/public/_nuxt/Bn14i44R.js +0 -1
  142. package/web/public/_nuxt/BnfUOzcc.js +0 -1
  143. package/web/public/_nuxt/Bv0odo9W.js +0 -1
  144. package/web/public/_nuxt/Bxx0Z5z6.js +0 -1
  145. package/web/public/_nuxt/CiWIPYVi.js +0 -1
  146. package/web/public/_nuxt/CqSNCP5f.js +0 -1
  147. package/web/public/_nuxt/Ctg1e1JV.js +0 -1
  148. package/web/public/_nuxt/Cu3rIkF2.js +0 -47
  149. package/web/public/_nuxt/Cutk9Ewh.js +0 -1
  150. package/web/public/_nuxt/DCVp7cZB.js +0 -96
  151. package/web/public/_nuxt/DCnkQFS0.js +0 -1
  152. package/web/public/_nuxt/DJbGqyvB.js +0 -1
  153. package/web/public/_nuxt/DMT7tA5C.js +0 -1
  154. package/web/public/_nuxt/M0pG6UQn.js +0 -1
  155. package/web/public/_nuxt/RlymLGHS.js +0 -1
  156. package/web/public/_nuxt/TmkSb4nj.js +0 -1
  157. package/web/public/_nuxt/_S09PGd-.js +0 -1
  158. package/web/public/_nuxt/builds/meta/63ad5f37-5b40-456d-8f53-69ff57b4903c.json +0 -1
  159. package/web/public/_nuxt/cHkFs-ms.js +0 -1
  160. package/web/public/_nuxt/entry.DTNjKx6y.css +0 -2
  161. package/web/public/_nuxt/fjfS4ymU.js +0 -1
  162. package/web/public/_nuxt/moFy8lON.js +0 -2
  163. package/web/public/_nuxt/oT-x2NdZ.js +0 -1
  164. package/web/server/chunks/build/CardTitle-D9ve_H9E.mjs.map +0 -1
  165. package/web/server/chunks/build/Sparkline-Cxifh2uK.mjs.map +0 -1
  166. package/web/server/chunks/build/Tooltip-BVTXdgMT.mjs.map +0 -1
  167. package/web/server/chunks/build/_id_-BKmH0aHH.mjs.map +0 -1
  168. package/web/server/chunks/build/default-C8deLrP0.mjs +0 -556
  169. package/web/server/chunks/build/default-C8deLrP0.mjs.map +0 -1
  170. package/web/server/chunks/build/fetch-Debw9R9i.mjs.map +0 -1
  171. package/web/server/chunks/build/limits-CnRLojCD.mjs.map +0 -1
  172. package/web/server/chunks/build/pages-DlIWqsLr.mjs.map +0 -1
  173. package/web/server/chunks/build/providers-DOMeWSDZ.mjs.map +0 -1
  174. package/web/server/chunks/build/scopes-Bagepvnf.mjs +0 -794
  175. package/web/server/chunks/build/scopes-Bagepvnf.mjs.map +0 -1
  176. package/web/server/chunks/build/sessions-peyhKv2_.mjs.map +0 -1
  177. package/web/server/chunks/build/timeline-P2RrZyBs.mjs.map +0 -1
  178. package/web/server/chunks/build/useFormat-BfI0x0lv.mjs +0 -119
  179. package/web/server/chunks/build/useFormat-BfI0x0lv.mjs.map +0 -1
  180. package/web/server/chunks/build/useStats-Dor6kLek.mjs.map +0 -1
  181. /package/web/public/_nuxt/{BDNMzG2s.js → BDNMzG2s2.js} +0 -0
@@ -1,794 +0,0 @@
1
- import { a as useHead$1 } from '../virtual/entry.mjs';
2
- import { b as useScopeStats, c as useFilters } from './useStats-Dor6kLek.mjs';
3
- import { E as EmptyState_default } from './EmptyState-DWgJMVCI.mjs';
4
- import { C as Card_default, S as Skeleton_default, f as formatUsd, d as formatPct, a as formatCompact, b as formatRatio } from './useFormat-BfI0x0lv.mjs';
5
- import { P as Progress_default } from './Progress-BckzQSF5.mjs';
6
- import { F as FilterBar_default } from './FilterBar-vwbfttN7.mjs';
7
- import { T as Table_default, a as TableHeader_default, b as TableRow_default, c as TableHead_default, d as TableBody_default, e as TableCell_default } from './TableCell-BZwItbY_.mjs';
8
- import { defineComponent, computed, mergeProps, withCtx, createTextVNode, createVNode, unref, toDisplayString, openBlock, createBlock, createCommentVNode, Fragment, renderList, useSSRContext } from 'vue';
9
- import { ssrRenderAttrs, ssrRenderComponent, ssrRenderList, ssrInterpolate, ssrRenderClass } from 'vue/server-renderer';
10
- import { ArrowUp, ArrowDown, Minus } from 'lucide-vue-next';
11
- import 'unhead/utils';
12
- import '../routes/renderer.mjs';
13
- import '../nitro/nitro.mjs';
14
- import 'node:http';
15
- import 'node:https';
16
- import 'node:events';
17
- import 'node:buffer';
18
- import 'node:fs';
19
- import 'node:path';
20
- import 'node:crypto';
21
- import 'node:os';
22
- import 'better-sqlite3';
23
- import 'drizzle-orm/better-sqlite3';
24
- import 'drizzle-orm/sqlite-core';
25
- import 'node:fs/promises';
26
- import 'node:string_decoder';
27
- import 'node:url';
28
- import 'unhead/server';
29
- import 'unhead/legacy';
30
- import 'unhead/plugins';
31
- import 'nostics';
32
- import 'vue-bundle-renderer/runtime';
33
- import 'devalue';
34
- import './fetch-Debw9R9i.mjs';
35
- import 'clsx';
36
- import 'tailwind-merge';
37
- import 'fnv1a-64';
38
- import 'object-identity';
39
- import './Button-7BTto1uR.mjs';
40
- import './nuxt-link-mYiLFsJs.mjs';
41
- import 'class-variance-authority';
42
- import './Badge-C0eTW_zX.mjs';
43
-
44
- var scopes_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
45
- __name: "scopes",
46
- __ssrInlineRender: true,
47
- setup(__props) {
48
- useHead$1({ title: "Projects \u2014 nomnomtokens" });
49
- const { data, pending } = useScopeStats();
50
- const filters = useFilters();
51
- const total = computed(() => (data.value?.rows ?? []).reduce((s, r) => s + r.costUsd, 0));
52
- const share = (cost) => total.value > 0 ? cost / total.value * 100 : 0;
53
- function displayName(row) {
54
- const base = row.label?.trim() || row.scopeHash;
55
- if ((data.value?.rows ?? []).filter((r) => (r.label?.trim() || r.scopeHash) === base).length <= 1) return base;
56
- return `${base} \xB7 ${row.scopeHash.slice(0, 6)}`;
57
- }
58
- return (_ctx, _push, _parent, _attrs) => {
59
- const _component_FilterBar = FilterBar_default;
60
- const _component_UiCard = Card_default;
61
- const _component_UiTable = Table_default;
62
- const _component_UiTableHeader = TableHeader_default;
63
- const _component_UiTableRow = TableRow_default;
64
- const _component_UiTableHead = TableHead_default;
65
- const _component_UiTableBody = TableBody_default;
66
- const _component_UiTableCell = TableCell_default;
67
- const _component_UiSkeleton = Skeleton_default;
68
- const _component_EmptyState = EmptyState_default;
69
- const _component_UiProgress = Progress_default;
70
- _push(`<div${ssrRenderAttrs(mergeProps({ class: "space-y-6" }, _attrs))}><div><h1 class="text-2xl font-semibold tracking-tight">Projects</h1><p class="text-muted-foreground mt-1 text-sm"> What the agent cost per project. Click a row to focus every screen on it (including this table). Clear the chip above to see all again. </p></div>`);
71
- _push(ssrRenderComponent(_component_FilterBar, null, null, _parent));
72
- _push(`<p class="text-muted-foreground text-xs leading-relaxed"> Each row is a distinct folder on disk, identified by a hash of its full path (we never store the path itself). The name is only the last path segment, so several rows can share a label like <span class="font-mono">rowkit</span> or <span class="font-mono">app</span> when you have clones, worktrees, or similarly named directories. The short suffix after \xB7 disambiguates them \u2014 these are not sessions. Filtering applies to that one folder, not every row with the same name. </p>`);
73
- _push(ssrRenderComponent(_component_UiCard, { class: "py-0" }, {
74
- default: withCtx((_, _push2, _parent2, _scopeId) => {
75
- if (_push2) _push2(ssrRenderComponent(_component_UiTable, { "container-class": "rounded-xl" }, {
76
- default: withCtx((_2, _push3, _parent3, _scopeId2) => {
77
- if (_push3) {
78
- _push3(ssrRenderComponent(_component_UiTableHeader, null, {
79
- default: withCtx((_3, _push4, _parent4, _scopeId3) => {
80
- if (_push4) _push4(ssrRenderComponent(_component_UiTableRow, null, {
81
- default: withCtx((_4, _push5, _parent5, _scopeId4) => {
82
- if (_push5) {
83
- _push5(ssrRenderComponent(_component_UiTableHead, { class: "pl-4" }, {
84
- default: withCtx((_5, _push6, _parent6, _scopeId5) => {
85
- if (_push6) _push6(`Project`);
86
- else return [createTextVNode("Project")];
87
- }),
88
- _: 1
89
- }, _parent5, _scopeId4));
90
- _push5(ssrRenderComponent(_component_UiTableHead, { numeric: "" }, {
91
- default: withCtx((_5, _push6, _parent6, _scopeId5) => {
92
- if (_push6) _push6(`Cost`);
93
- else return [createTextVNode("Cost")];
94
- }),
95
- _: 1
96
- }, _parent5, _scopeId4));
97
- _push5(ssrRenderComponent(_component_UiTableHead, { numeric: "" }, {
98
- default: withCtx((_5, _push6, _parent6, _scopeId5) => {
99
- if (_push6) _push6(`Share`);
100
- else return [createTextVNode("Share")];
101
- }),
102
- _: 1
103
- }, _parent5, _scopeId4));
104
- _push5(ssrRenderComponent(_component_UiTableHead, { numeric: "" }, {
105
- default: withCtx((_5, _push6, _parent6, _scopeId5) => {
106
- if (_push6) _push6(`Trend`);
107
- else return [createTextVNode("Trend")];
108
- }),
109
- _: 1
110
- }, _parent5, _scopeId4));
111
- _push5(ssrRenderComponent(_component_UiTableHead, { numeric: "" }, {
112
- default: withCtx((_5, _push6, _parent6, _scopeId5) => {
113
- if (_push6) _push6(`Tokens`);
114
- else return [createTextVNode("Tokens")];
115
- }),
116
- _: 1
117
- }, _parent5, _scopeId4));
118
- _push5(ssrRenderComponent(_component_UiTableHead, { numeric: "" }, {
119
- default: withCtx((_5, _push6, _parent6, _scopeId5) => {
120
- if (_push6) _push6(`Cache`);
121
- else return [createTextVNode("Cache")];
122
- }),
123
- _: 1
124
- }, _parent5, _scopeId4));
125
- _push5(ssrRenderComponent(_component_UiTableHead, {
126
- numeric: "",
127
- class: "pr-4"
128
- }, {
129
- default: withCtx((_5, _push6, _parent6, _scopeId5) => {
130
- if (_push6) _push6(`Sessions`);
131
- else return [createTextVNode("Sessions")];
132
- }),
133
- _: 1
134
- }, _parent5, _scopeId4));
135
- } else return [
136
- createVNode(_component_UiTableHead, { class: "pl-4" }, {
137
- default: withCtx(() => [createTextVNode("Project")]),
138
- _: 1
139
- }),
140
- createVNode(_component_UiTableHead, { numeric: "" }, {
141
- default: withCtx(() => [createTextVNode("Cost")]),
142
- _: 1
143
- }),
144
- createVNode(_component_UiTableHead, { numeric: "" }, {
145
- default: withCtx(() => [createTextVNode("Share")]),
146
- _: 1
147
- }),
148
- createVNode(_component_UiTableHead, { numeric: "" }, {
149
- default: withCtx(() => [createTextVNode("Trend")]),
150
- _: 1
151
- }),
152
- createVNode(_component_UiTableHead, { numeric: "" }, {
153
- default: withCtx(() => [createTextVNode("Tokens")]),
154
- _: 1
155
- }),
156
- createVNode(_component_UiTableHead, { numeric: "" }, {
157
- default: withCtx(() => [createTextVNode("Cache")]),
158
- _: 1
159
- }),
160
- createVNode(_component_UiTableHead, {
161
- numeric: "",
162
- class: "pr-4"
163
- }, {
164
- default: withCtx(() => [createTextVNode("Sessions")]),
165
- _: 1
166
- })
167
- ];
168
- }),
169
- _: 1
170
- }, _parent4, _scopeId3));
171
- else return [createVNode(_component_UiTableRow, null, {
172
- default: withCtx(() => [
173
- createVNode(_component_UiTableHead, { class: "pl-4" }, {
174
- default: withCtx(() => [createTextVNode("Project")]),
175
- _: 1
176
- }),
177
- createVNode(_component_UiTableHead, { numeric: "" }, {
178
- default: withCtx(() => [createTextVNode("Cost")]),
179
- _: 1
180
- }),
181
- createVNode(_component_UiTableHead, { numeric: "" }, {
182
- default: withCtx(() => [createTextVNode("Share")]),
183
- _: 1
184
- }),
185
- createVNode(_component_UiTableHead, { numeric: "" }, {
186
- default: withCtx(() => [createTextVNode("Trend")]),
187
- _: 1
188
- }),
189
- createVNode(_component_UiTableHead, { numeric: "" }, {
190
- default: withCtx(() => [createTextVNode("Tokens")]),
191
- _: 1
192
- }),
193
- createVNode(_component_UiTableHead, { numeric: "" }, {
194
- default: withCtx(() => [createTextVNode("Cache")]),
195
- _: 1
196
- }),
197
- createVNode(_component_UiTableHead, {
198
- numeric: "",
199
- class: "pr-4"
200
- }, {
201
- default: withCtx(() => [createTextVNode("Sessions")]),
202
- _: 1
203
- })
204
- ]),
205
- _: 1
206
- })];
207
- }),
208
- _: 1
209
- }, _parent3, _scopeId2));
210
- _push3(ssrRenderComponent(_component_UiTableBody, null, {
211
- default: withCtx((_3, _push4, _parent4, _scopeId3) => {
212
- if (_push4) {
213
- if (unref(pending) && !unref(data)) _push4(ssrRenderComponent(_component_UiTableRow, null, {
214
- default: withCtx((_4, _push5, _parent5, _scopeId4) => {
215
- if (_push5) _push5(ssrRenderComponent(_component_UiTableCell, {
216
- colspan: "7",
217
- class: "p-4"
218
- }, {
219
- default: withCtx((_5, _push6, _parent6, _scopeId5) => {
220
- if (_push6) _push6(ssrRenderComponent(_component_UiSkeleton, { class: "h-24 w-full" }, null, _parent6, _scopeId5));
221
- else return [createVNode(_component_UiSkeleton, { class: "h-24 w-full" })];
222
- }),
223
- _: 1
224
- }, _parent5, _scopeId4));
225
- else return [createVNode(_component_UiTableCell, {
226
- colspan: "7",
227
- class: "p-4"
228
- }, {
229
- default: withCtx(() => [createVNode(_component_UiSkeleton, { class: "h-24 w-full" })]),
230
- _: 1
231
- })];
232
- }),
233
- _: 1
234
- }, _parent4, _scopeId3));
235
- else if ((unref(data)?.rows.length ?? 0) === 0) _push4(ssrRenderComponent(_component_UiTableRow, null, {
236
- default: withCtx((_4, _push5, _parent5, _scopeId4) => {
237
- if (_push5) _push5(ssrRenderComponent(_component_UiTableCell, { colspan: "7" }, {
238
- default: withCtx((_5, _push6, _parent6, _scopeId5) => {
239
- if (_push6) _push6(ssrRenderComponent(_component_EmptyState, {
240
- title: "No projects in this range",
241
- description: "Widen the range, or run a scan to pick up more history.",
242
- command: "npx nomnomtokens scan"
243
- }, null, _parent6, _scopeId5));
244
- else return [createVNode(_component_EmptyState, {
245
- title: "No projects in this range",
246
- description: "Widen the range, or run a scan to pick up more history.",
247
- command: "npx nomnomtokens scan"
248
- })];
249
- }),
250
- _: 1
251
- }, _parent5, _scopeId4));
252
- else return [createVNode(_component_UiTableCell, { colspan: "7" }, {
253
- default: withCtx(() => [createVNode(_component_EmptyState, {
254
- title: "No projects in this range",
255
- description: "Widen the range, or run a scan to pick up more history.",
256
- command: "npx nomnomtokens scan"
257
- })]),
258
- _: 1
259
- })];
260
- }),
261
- _: 1
262
- }, _parent4, _scopeId3));
263
- else _push4(`<!---->`);
264
- _push4(`<!--[-->`);
265
- ssrRenderList(unref(data)?.rows, (row) => {
266
- _push4(ssrRenderComponent(_component_UiTableRow, {
267
- key: row.scopeHash,
268
- clickable: "",
269
- selected: unref(filters).scopes.value.includes(row.scopeHash),
270
- onClick: ($event) => unref(filters).toggleScope(row.scopeHash)
271
- }, {
272
- default: withCtx((_4, _push5, _parent5, _scopeId4) => {
273
- if (_push5) {
274
- _push5(ssrRenderComponent(_component_UiTableCell, { class: "pl-4 font-medium" }, {
275
- default: withCtx((_5, _push6, _parent6, _scopeId5) => {
276
- if (_push6) {
277
- _push6(`${ssrInterpolate(displayName(row))} `);
278
- if (!row.label) _push6(`<span class="text-muted-foreground ml-1 font-mono text-xs"${_scopeId5}>unlabelled</span>`);
279
- else _push6(`<!---->`);
280
- } else return [createTextVNode(toDisplayString(displayName(row)) + " ", 1), !row.label ? (openBlock(), createBlock("span", {
281
- key: 0,
282
- class: "text-muted-foreground ml-1 font-mono text-xs"
283
- }, "unlabelled")) : createCommentVNode("", true)];
284
- }),
285
- _: 2
286
- }, _parent5, _scopeId4));
287
- _push5(ssrRenderComponent(_component_UiTableCell, { numeric: "" }, {
288
- default: withCtx((_5, _push6, _parent6, _scopeId5) => {
289
- if (_push6) _push6(`${ssrInterpolate(("formatUsd" in _ctx ? _ctx.formatUsd : unref(formatUsd))(row.costUsd))}`);
290
- else return [createTextVNode(toDisplayString(("formatUsd" in _ctx ? _ctx.formatUsd : unref(formatUsd))(row.costUsd)), 1)];
291
- }),
292
- _: 2
293
- }, _parent5, _scopeId4));
294
- _push5(ssrRenderComponent(_component_UiTableCell, {
295
- numeric: "",
296
- class: "w-32"
297
- }, {
298
- default: withCtx((_5, _push6, _parent6, _scopeId5) => {
299
- if (_push6) {
300
- _push6(`<div class="flex items-center justify-end gap-2"${_scopeId5}>`);
301
- _push6(ssrRenderComponent(_component_UiProgress, {
302
- value: share(row.costUsd),
303
- class: "h-1.5 w-16"
304
- }, null, _parent6, _scopeId5));
305
- _push6(`<span class="text-muted-foreground w-10 text-right"${_scopeId5}>${ssrInterpolate(("formatPct" in _ctx ? _ctx.formatPct : unref(formatPct))(share(row.costUsd)))}</span></div>`);
306
- } else return [createVNode("div", { class: "flex items-center justify-end gap-2" }, [createVNode(_component_UiProgress, {
307
- value: share(row.costUsd),
308
- class: "h-1.5 w-16"
309
- }, null, 8, ["value"]), createVNode("span", { class: "text-muted-foreground w-10 text-right" }, toDisplayString(("formatPct" in _ctx ? _ctx.formatPct : unref(formatPct))(share(row.costUsd))), 1)])];
310
- }),
311
- _: 2
312
- }, _parent5, _scopeId4));
313
- _push5(ssrRenderComponent(_component_UiTableCell, { numeric: "" }, {
314
- default: withCtx((_5, _push6, _parent6, _scopeId5) => {
315
- if (_push6) if (row.trendPct !== null) {
316
- _push6(`<span class="${ssrRenderClass([row.trendPct > 5 ? "text-destructive" : row.trendPct < -5 ? "text-success" : "text-muted-foreground", "inline-flex items-center gap-1"])}"${_scopeId5}>`);
317
- if (row.trendPct > 5) _push6(ssrRenderComponent(unref(ArrowUp), { class: "size-3" }, null, _parent6, _scopeId5));
318
- else if (row.trendPct < -5) _push6(ssrRenderComponent(unref(ArrowDown), { class: "size-3" }, null, _parent6, _scopeId5));
319
- else _push6(ssrRenderComponent(unref(Minus), { class: "size-3" }, null, _parent6, _scopeId5));
320
- _push6(` ${ssrInterpolate(("formatPct" in _ctx ? _ctx.formatPct : unref(formatPct))(Math.abs(row.trendPct)))}</span>`);
321
- } else _push6(`<span class="text-muted-foreground"${_scopeId5}>\u2014</span>`);
322
- else return [row.trendPct !== null ? (openBlock(), createBlock("span", {
323
- key: 0,
324
- class: ["inline-flex items-center gap-1", row.trendPct > 5 ? "text-destructive" : row.trendPct < -5 ? "text-success" : "text-muted-foreground"]
325
- }, [row.trendPct > 5 ? (openBlock(), createBlock(unref(ArrowUp), {
326
- key: 0,
327
- class: "size-3"
328
- })) : row.trendPct < -5 ? (openBlock(), createBlock(unref(ArrowDown), {
329
- key: 1,
330
- class: "size-3"
331
- })) : (openBlock(), createBlock(unref(Minus), {
332
- key: 2,
333
- class: "size-3"
334
- })), createTextVNode(" " + toDisplayString(("formatPct" in _ctx ? _ctx.formatPct : unref(formatPct))(Math.abs(row.trendPct))), 1)], 2)) : (openBlock(), createBlock("span", {
335
- key: 1,
336
- class: "text-muted-foreground"
337
- }, "\u2014"))];
338
- }),
339
- _: 2
340
- }, _parent5, _scopeId4));
341
- _push5(ssrRenderComponent(_component_UiTableCell, { numeric: "" }, {
342
- default: withCtx((_5, _push6, _parent6, _scopeId5) => {
343
- if (_push6) _push6(`${ssrInterpolate(("formatCompact" in _ctx ? _ctx.formatCompact : unref(formatCompact))(row.tokens))}`);
344
- else return [createTextVNode(toDisplayString(("formatCompact" in _ctx ? _ctx.formatCompact : unref(formatCompact))(row.tokens)), 1)];
345
- }),
346
- _: 2
347
- }, _parent5, _scopeId4));
348
- _push5(ssrRenderComponent(_component_UiTableCell, { numeric: "" }, {
349
- default: withCtx((_5, _push6, _parent6, _scopeId5) => {
350
- if (_push6) _push6(`${ssrInterpolate(("formatRatio" in _ctx ? _ctx.formatRatio : unref(formatRatio))(row.cacheHitRate))}`);
351
- else return [createTextVNode(toDisplayString(("formatRatio" in _ctx ? _ctx.formatRatio : unref(formatRatio))(row.cacheHitRate)), 1)];
352
- }),
353
- _: 2
354
- }, _parent5, _scopeId4));
355
- _push5(ssrRenderComponent(_component_UiTableCell, {
356
- numeric: "",
357
- class: "pr-4"
358
- }, {
359
- default: withCtx((_5, _push6, _parent6, _scopeId5) => {
360
- if (_push6) _push6(`${ssrInterpolate(row.sessions)}`);
361
- else return [createTextVNode(toDisplayString(row.sessions), 1)];
362
- }),
363
- _: 2
364
- }, _parent5, _scopeId4));
365
- } else return [
366
- createVNode(_component_UiTableCell, { class: "pl-4 font-medium" }, {
367
- default: withCtx(() => [createTextVNode(toDisplayString(displayName(row)) + " ", 1), !row.label ? (openBlock(), createBlock("span", {
368
- key: 0,
369
- class: "text-muted-foreground ml-1 font-mono text-xs"
370
- }, "unlabelled")) : createCommentVNode("", true)]),
371
- _: 2
372
- }, 1024),
373
- createVNode(_component_UiTableCell, { numeric: "" }, {
374
- default: withCtx(() => [createTextVNode(toDisplayString(("formatUsd" in _ctx ? _ctx.formatUsd : unref(formatUsd))(row.costUsd)), 1)]),
375
- _: 2
376
- }, 1024),
377
- createVNode(_component_UiTableCell, {
378
- numeric: "",
379
- class: "w-32"
380
- }, {
381
- default: withCtx(() => [createVNode("div", { class: "flex items-center justify-end gap-2" }, [createVNode(_component_UiProgress, {
382
- value: share(row.costUsd),
383
- class: "h-1.5 w-16"
384
- }, null, 8, ["value"]), createVNode("span", { class: "text-muted-foreground w-10 text-right" }, toDisplayString(("formatPct" in _ctx ? _ctx.formatPct : unref(formatPct))(share(row.costUsd))), 1)])]),
385
- _: 2
386
- }, 1024),
387
- createVNode(_component_UiTableCell, { numeric: "" }, {
388
- default: withCtx(() => [row.trendPct !== null ? (openBlock(), createBlock("span", {
389
- key: 0,
390
- class: ["inline-flex items-center gap-1", row.trendPct > 5 ? "text-destructive" : row.trendPct < -5 ? "text-success" : "text-muted-foreground"]
391
- }, [row.trendPct > 5 ? (openBlock(), createBlock(unref(ArrowUp), {
392
- key: 0,
393
- class: "size-3"
394
- })) : row.trendPct < -5 ? (openBlock(), createBlock(unref(ArrowDown), {
395
- key: 1,
396
- class: "size-3"
397
- })) : (openBlock(), createBlock(unref(Minus), {
398
- key: 2,
399
- class: "size-3"
400
- })), createTextVNode(" " + toDisplayString(("formatPct" in _ctx ? _ctx.formatPct : unref(formatPct))(Math.abs(row.trendPct))), 1)], 2)) : (openBlock(), createBlock("span", {
401
- key: 1,
402
- class: "text-muted-foreground"
403
- }, "\u2014"))]),
404
- _: 2
405
- }, 1024),
406
- createVNode(_component_UiTableCell, { numeric: "" }, {
407
- default: withCtx(() => [createTextVNode(toDisplayString(("formatCompact" in _ctx ? _ctx.formatCompact : unref(formatCompact))(row.tokens)), 1)]),
408
- _: 2
409
- }, 1024),
410
- createVNode(_component_UiTableCell, { numeric: "" }, {
411
- default: withCtx(() => [createTextVNode(toDisplayString(("formatRatio" in _ctx ? _ctx.formatRatio : unref(formatRatio))(row.cacheHitRate)), 1)]),
412
- _: 2
413
- }, 1024),
414
- createVNode(_component_UiTableCell, {
415
- numeric: "",
416
- class: "pr-4"
417
- }, {
418
- default: withCtx(() => [createTextVNode(toDisplayString(row.sessions), 1)]),
419
- _: 2
420
- }, 1024)
421
- ];
422
- }),
423
- _: 2
424
- }, _parent4, _scopeId3));
425
- });
426
- _push4(`<!--]-->`);
427
- } else return [unref(pending) && !unref(data) ? (openBlock(), createBlock(_component_UiTableRow, { key: 0 }, {
428
- default: withCtx(() => [createVNode(_component_UiTableCell, {
429
- colspan: "7",
430
- class: "p-4"
431
- }, {
432
- default: withCtx(() => [createVNode(_component_UiSkeleton, { class: "h-24 w-full" })]),
433
- _: 1
434
- })]),
435
- _: 1
436
- })) : (unref(data)?.rows.length ?? 0) === 0 ? (openBlock(), createBlock(_component_UiTableRow, { key: 1 }, {
437
- default: withCtx(() => [createVNode(_component_UiTableCell, { colspan: "7" }, {
438
- default: withCtx(() => [createVNode(_component_EmptyState, {
439
- title: "No projects in this range",
440
- description: "Widen the range, or run a scan to pick up more history.",
441
- command: "npx nomnomtokens scan"
442
- })]),
443
- _: 1
444
- })]),
445
- _: 1
446
- })) : createCommentVNode("", true), (openBlock(true), createBlock(Fragment, null, renderList(unref(data)?.rows, (row) => {
447
- return openBlock(), createBlock(_component_UiTableRow, {
448
- key: row.scopeHash,
449
- clickable: "",
450
- selected: unref(filters).scopes.value.includes(row.scopeHash),
451
- onClick: ($event) => unref(filters).toggleScope(row.scopeHash)
452
- }, {
453
- default: withCtx(() => [
454
- createVNode(_component_UiTableCell, { class: "pl-4 font-medium" }, {
455
- default: withCtx(() => [createTextVNode(toDisplayString(displayName(row)) + " ", 1), !row.label ? (openBlock(), createBlock("span", {
456
- key: 0,
457
- class: "text-muted-foreground ml-1 font-mono text-xs"
458
- }, "unlabelled")) : createCommentVNode("", true)]),
459
- _: 2
460
- }, 1024),
461
- createVNode(_component_UiTableCell, { numeric: "" }, {
462
- default: withCtx(() => [createTextVNode(toDisplayString(("formatUsd" in _ctx ? _ctx.formatUsd : unref(formatUsd))(row.costUsd)), 1)]),
463
- _: 2
464
- }, 1024),
465
- createVNode(_component_UiTableCell, {
466
- numeric: "",
467
- class: "w-32"
468
- }, {
469
- default: withCtx(() => [createVNode("div", { class: "flex items-center justify-end gap-2" }, [createVNode(_component_UiProgress, {
470
- value: share(row.costUsd),
471
- class: "h-1.5 w-16"
472
- }, null, 8, ["value"]), createVNode("span", { class: "text-muted-foreground w-10 text-right" }, toDisplayString(("formatPct" in _ctx ? _ctx.formatPct : unref(formatPct))(share(row.costUsd))), 1)])]),
473
- _: 2
474
- }, 1024),
475
- createVNode(_component_UiTableCell, { numeric: "" }, {
476
- default: withCtx(() => [row.trendPct !== null ? (openBlock(), createBlock("span", {
477
- key: 0,
478
- class: ["inline-flex items-center gap-1", row.trendPct > 5 ? "text-destructive" : row.trendPct < -5 ? "text-success" : "text-muted-foreground"]
479
- }, [row.trendPct > 5 ? (openBlock(), createBlock(unref(ArrowUp), {
480
- key: 0,
481
- class: "size-3"
482
- })) : row.trendPct < -5 ? (openBlock(), createBlock(unref(ArrowDown), {
483
- key: 1,
484
- class: "size-3"
485
- })) : (openBlock(), createBlock(unref(Minus), {
486
- key: 2,
487
- class: "size-3"
488
- })), createTextVNode(" " + toDisplayString(("formatPct" in _ctx ? _ctx.formatPct : unref(formatPct))(Math.abs(row.trendPct))), 1)], 2)) : (openBlock(), createBlock("span", {
489
- key: 1,
490
- class: "text-muted-foreground"
491
- }, "\u2014"))]),
492
- _: 2
493
- }, 1024),
494
- createVNode(_component_UiTableCell, { numeric: "" }, {
495
- default: withCtx(() => [createTextVNode(toDisplayString(("formatCompact" in _ctx ? _ctx.formatCompact : unref(formatCompact))(row.tokens)), 1)]),
496
- _: 2
497
- }, 1024),
498
- createVNode(_component_UiTableCell, { numeric: "" }, {
499
- default: withCtx(() => [createTextVNode(toDisplayString(("formatRatio" in _ctx ? _ctx.formatRatio : unref(formatRatio))(row.cacheHitRate)), 1)]),
500
- _: 2
501
- }, 1024),
502
- createVNode(_component_UiTableCell, {
503
- numeric: "",
504
- class: "pr-4"
505
- }, {
506
- default: withCtx(() => [createTextVNode(toDisplayString(row.sessions), 1)]),
507
- _: 2
508
- }, 1024)
509
- ]),
510
- _: 2
511
- }, 1032, ["selected", "onClick"]);
512
- }), 128))];
513
- }),
514
- _: 1
515
- }, _parent3, _scopeId2));
516
- } else return [createVNode(_component_UiTableHeader, null, {
517
- default: withCtx(() => [createVNode(_component_UiTableRow, null, {
518
- default: withCtx(() => [
519
- createVNode(_component_UiTableHead, { class: "pl-4" }, {
520
- default: withCtx(() => [createTextVNode("Project")]),
521
- _: 1
522
- }),
523
- createVNode(_component_UiTableHead, { numeric: "" }, {
524
- default: withCtx(() => [createTextVNode("Cost")]),
525
- _: 1
526
- }),
527
- createVNode(_component_UiTableHead, { numeric: "" }, {
528
- default: withCtx(() => [createTextVNode("Share")]),
529
- _: 1
530
- }),
531
- createVNode(_component_UiTableHead, { numeric: "" }, {
532
- default: withCtx(() => [createTextVNode("Trend")]),
533
- _: 1
534
- }),
535
- createVNode(_component_UiTableHead, { numeric: "" }, {
536
- default: withCtx(() => [createTextVNode("Tokens")]),
537
- _: 1
538
- }),
539
- createVNode(_component_UiTableHead, { numeric: "" }, {
540
- default: withCtx(() => [createTextVNode("Cache")]),
541
- _: 1
542
- }),
543
- createVNode(_component_UiTableHead, {
544
- numeric: "",
545
- class: "pr-4"
546
- }, {
547
- default: withCtx(() => [createTextVNode("Sessions")]),
548
- _: 1
549
- })
550
- ]),
551
- _: 1
552
- })]),
553
- _: 1
554
- }), createVNode(_component_UiTableBody, null, {
555
- default: withCtx(() => [unref(pending) && !unref(data) ? (openBlock(), createBlock(_component_UiTableRow, { key: 0 }, {
556
- default: withCtx(() => [createVNode(_component_UiTableCell, {
557
- colspan: "7",
558
- class: "p-4"
559
- }, {
560
- default: withCtx(() => [createVNode(_component_UiSkeleton, { class: "h-24 w-full" })]),
561
- _: 1
562
- })]),
563
- _: 1
564
- })) : (unref(data)?.rows.length ?? 0) === 0 ? (openBlock(), createBlock(_component_UiTableRow, { key: 1 }, {
565
- default: withCtx(() => [createVNode(_component_UiTableCell, { colspan: "7" }, {
566
- default: withCtx(() => [createVNode(_component_EmptyState, {
567
- title: "No projects in this range",
568
- description: "Widen the range, or run a scan to pick up more history.",
569
- command: "npx nomnomtokens scan"
570
- })]),
571
- _: 1
572
- })]),
573
- _: 1
574
- })) : createCommentVNode("", true), (openBlock(true), createBlock(Fragment, null, renderList(unref(data)?.rows, (row) => {
575
- return openBlock(), createBlock(_component_UiTableRow, {
576
- key: row.scopeHash,
577
- clickable: "",
578
- selected: unref(filters).scopes.value.includes(row.scopeHash),
579
- onClick: ($event) => unref(filters).toggleScope(row.scopeHash)
580
- }, {
581
- default: withCtx(() => [
582
- createVNode(_component_UiTableCell, { class: "pl-4 font-medium" }, {
583
- default: withCtx(() => [createTextVNode(toDisplayString(displayName(row)) + " ", 1), !row.label ? (openBlock(), createBlock("span", {
584
- key: 0,
585
- class: "text-muted-foreground ml-1 font-mono text-xs"
586
- }, "unlabelled")) : createCommentVNode("", true)]),
587
- _: 2
588
- }, 1024),
589
- createVNode(_component_UiTableCell, { numeric: "" }, {
590
- default: withCtx(() => [createTextVNode(toDisplayString(("formatUsd" in _ctx ? _ctx.formatUsd : unref(formatUsd))(row.costUsd)), 1)]),
591
- _: 2
592
- }, 1024),
593
- createVNode(_component_UiTableCell, {
594
- numeric: "",
595
- class: "w-32"
596
- }, {
597
- default: withCtx(() => [createVNode("div", { class: "flex items-center justify-end gap-2" }, [createVNode(_component_UiProgress, {
598
- value: share(row.costUsd),
599
- class: "h-1.5 w-16"
600
- }, null, 8, ["value"]), createVNode("span", { class: "text-muted-foreground w-10 text-right" }, toDisplayString(("formatPct" in _ctx ? _ctx.formatPct : unref(formatPct))(share(row.costUsd))), 1)])]),
601
- _: 2
602
- }, 1024),
603
- createVNode(_component_UiTableCell, { numeric: "" }, {
604
- default: withCtx(() => [row.trendPct !== null ? (openBlock(), createBlock("span", {
605
- key: 0,
606
- class: ["inline-flex items-center gap-1", row.trendPct > 5 ? "text-destructive" : row.trendPct < -5 ? "text-success" : "text-muted-foreground"]
607
- }, [row.trendPct > 5 ? (openBlock(), createBlock(unref(ArrowUp), {
608
- key: 0,
609
- class: "size-3"
610
- })) : row.trendPct < -5 ? (openBlock(), createBlock(unref(ArrowDown), {
611
- key: 1,
612
- class: "size-3"
613
- })) : (openBlock(), createBlock(unref(Minus), {
614
- key: 2,
615
- class: "size-3"
616
- })), createTextVNode(" " + toDisplayString(("formatPct" in _ctx ? _ctx.formatPct : unref(formatPct))(Math.abs(row.trendPct))), 1)], 2)) : (openBlock(), createBlock("span", {
617
- key: 1,
618
- class: "text-muted-foreground"
619
- }, "\u2014"))]),
620
- _: 2
621
- }, 1024),
622
- createVNode(_component_UiTableCell, { numeric: "" }, {
623
- default: withCtx(() => [createTextVNode(toDisplayString(("formatCompact" in _ctx ? _ctx.formatCompact : unref(formatCompact))(row.tokens)), 1)]),
624
- _: 2
625
- }, 1024),
626
- createVNode(_component_UiTableCell, { numeric: "" }, {
627
- default: withCtx(() => [createTextVNode(toDisplayString(("formatRatio" in _ctx ? _ctx.formatRatio : unref(formatRatio))(row.cacheHitRate)), 1)]),
628
- _: 2
629
- }, 1024),
630
- createVNode(_component_UiTableCell, {
631
- numeric: "",
632
- class: "pr-4"
633
- }, {
634
- default: withCtx(() => [createTextVNode(toDisplayString(row.sessions), 1)]),
635
- _: 2
636
- }, 1024)
637
- ]),
638
- _: 2
639
- }, 1032, ["selected", "onClick"]);
640
- }), 128))]),
641
- _: 1
642
- })];
643
- }),
644
- _: 1
645
- }, _parent2, _scopeId));
646
- else return [createVNode(_component_UiTable, { "container-class": "rounded-xl" }, {
647
- default: withCtx(() => [createVNode(_component_UiTableHeader, null, {
648
- default: withCtx(() => [createVNode(_component_UiTableRow, null, {
649
- default: withCtx(() => [
650
- createVNode(_component_UiTableHead, { class: "pl-4" }, {
651
- default: withCtx(() => [createTextVNode("Project")]),
652
- _: 1
653
- }),
654
- createVNode(_component_UiTableHead, { numeric: "" }, {
655
- default: withCtx(() => [createTextVNode("Cost")]),
656
- _: 1
657
- }),
658
- createVNode(_component_UiTableHead, { numeric: "" }, {
659
- default: withCtx(() => [createTextVNode("Share")]),
660
- _: 1
661
- }),
662
- createVNode(_component_UiTableHead, { numeric: "" }, {
663
- default: withCtx(() => [createTextVNode("Trend")]),
664
- _: 1
665
- }),
666
- createVNode(_component_UiTableHead, { numeric: "" }, {
667
- default: withCtx(() => [createTextVNode("Tokens")]),
668
- _: 1
669
- }),
670
- createVNode(_component_UiTableHead, { numeric: "" }, {
671
- default: withCtx(() => [createTextVNode("Cache")]),
672
- _: 1
673
- }),
674
- createVNode(_component_UiTableHead, {
675
- numeric: "",
676
- class: "pr-4"
677
- }, {
678
- default: withCtx(() => [createTextVNode("Sessions")]),
679
- _: 1
680
- })
681
- ]),
682
- _: 1
683
- })]),
684
- _: 1
685
- }), createVNode(_component_UiTableBody, null, {
686
- default: withCtx(() => [unref(pending) && !unref(data) ? (openBlock(), createBlock(_component_UiTableRow, { key: 0 }, {
687
- default: withCtx(() => [createVNode(_component_UiTableCell, {
688
- colspan: "7",
689
- class: "p-4"
690
- }, {
691
- default: withCtx(() => [createVNode(_component_UiSkeleton, { class: "h-24 w-full" })]),
692
- _: 1
693
- })]),
694
- _: 1
695
- })) : (unref(data)?.rows.length ?? 0) === 0 ? (openBlock(), createBlock(_component_UiTableRow, { key: 1 }, {
696
- default: withCtx(() => [createVNode(_component_UiTableCell, { colspan: "7" }, {
697
- default: withCtx(() => [createVNode(_component_EmptyState, {
698
- title: "No projects in this range",
699
- description: "Widen the range, or run a scan to pick up more history.",
700
- command: "npx nomnomtokens scan"
701
- })]),
702
- _: 1
703
- })]),
704
- _: 1
705
- })) : createCommentVNode("", true), (openBlock(true), createBlock(Fragment, null, renderList(unref(data)?.rows, (row) => {
706
- return openBlock(), createBlock(_component_UiTableRow, {
707
- key: row.scopeHash,
708
- clickable: "",
709
- selected: unref(filters).scopes.value.includes(row.scopeHash),
710
- onClick: ($event) => unref(filters).toggleScope(row.scopeHash)
711
- }, {
712
- default: withCtx(() => [
713
- createVNode(_component_UiTableCell, { class: "pl-4 font-medium" }, {
714
- default: withCtx(() => [createTextVNode(toDisplayString(displayName(row)) + " ", 1), !row.label ? (openBlock(), createBlock("span", {
715
- key: 0,
716
- class: "text-muted-foreground ml-1 font-mono text-xs"
717
- }, "unlabelled")) : createCommentVNode("", true)]),
718
- _: 2
719
- }, 1024),
720
- createVNode(_component_UiTableCell, { numeric: "" }, {
721
- default: withCtx(() => [createTextVNode(toDisplayString(("formatUsd" in _ctx ? _ctx.formatUsd : unref(formatUsd))(row.costUsd)), 1)]),
722
- _: 2
723
- }, 1024),
724
- createVNode(_component_UiTableCell, {
725
- numeric: "",
726
- class: "w-32"
727
- }, {
728
- default: withCtx(() => [createVNode("div", { class: "flex items-center justify-end gap-2" }, [createVNode(_component_UiProgress, {
729
- value: share(row.costUsd),
730
- class: "h-1.5 w-16"
731
- }, null, 8, ["value"]), createVNode("span", { class: "text-muted-foreground w-10 text-right" }, toDisplayString(("formatPct" in _ctx ? _ctx.formatPct : unref(formatPct))(share(row.costUsd))), 1)])]),
732
- _: 2
733
- }, 1024),
734
- createVNode(_component_UiTableCell, { numeric: "" }, {
735
- default: withCtx(() => [row.trendPct !== null ? (openBlock(), createBlock("span", {
736
- key: 0,
737
- class: ["inline-flex items-center gap-1", row.trendPct > 5 ? "text-destructive" : row.trendPct < -5 ? "text-success" : "text-muted-foreground"]
738
- }, [row.trendPct > 5 ? (openBlock(), createBlock(unref(ArrowUp), {
739
- key: 0,
740
- class: "size-3"
741
- })) : row.trendPct < -5 ? (openBlock(), createBlock(unref(ArrowDown), {
742
- key: 1,
743
- class: "size-3"
744
- })) : (openBlock(), createBlock(unref(Minus), {
745
- key: 2,
746
- class: "size-3"
747
- })), createTextVNode(" " + toDisplayString(("formatPct" in _ctx ? _ctx.formatPct : unref(formatPct))(Math.abs(row.trendPct))), 1)], 2)) : (openBlock(), createBlock("span", {
748
- key: 1,
749
- class: "text-muted-foreground"
750
- }, "\u2014"))]),
751
- _: 2
752
- }, 1024),
753
- createVNode(_component_UiTableCell, { numeric: "" }, {
754
- default: withCtx(() => [createTextVNode(toDisplayString(("formatCompact" in _ctx ? _ctx.formatCompact : unref(formatCompact))(row.tokens)), 1)]),
755
- _: 2
756
- }, 1024),
757
- createVNode(_component_UiTableCell, { numeric: "" }, {
758
- default: withCtx(() => [createTextVNode(toDisplayString(("formatRatio" in _ctx ? _ctx.formatRatio : unref(formatRatio))(row.cacheHitRate)), 1)]),
759
- _: 2
760
- }, 1024),
761
- createVNode(_component_UiTableCell, {
762
- numeric: "",
763
- class: "pr-4"
764
- }, {
765
- default: withCtx(() => [createTextVNode(toDisplayString(row.sessions), 1)]),
766
- _: 2
767
- }, 1024)
768
- ]),
769
- _: 2
770
- }, 1032, ["selected", "onClick"]);
771
- }), 128))]),
772
- _: 1
773
- })]),
774
- _: 1
775
- })];
776
- }),
777
- _: 1
778
- }, _parent));
779
- if (unref(data) && !unref(data).hasTrend) _push(`<p class="text-muted-foreground text-xs"> Trend needs a preceding period of equal length \u2014 pick a bounded range to see it. </p>`);
780
- else _push(`<!---->`);
781
- _push(`</div>`);
782
- };
783
- }
784
- });
785
- var _sfc_setup = scopes_vue_vue_type_script_setup_true_lang_default.setup;
786
- scopes_vue_vue_type_script_setup_true_lang_default.setup = (props, ctx) => {
787
- const ssrContext = useSSRContext();
788
- (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("pages/scopes.vue");
789
- return _sfc_setup ? _sfc_setup(props, ctx) : void 0;
790
- };
791
- var scopes_default = scopes_vue_vue_type_script_setup_true_lang_default;
792
-
793
- export { scopes_default as default };
794
- //# sourceMappingURL=scopes-Bagepvnf.mjs.map