tokentracker-cli 0.94.0 → 0.95.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/README.de.md +9 -7
- package/README.ja.md +8 -6
- package/README.ko.md +8 -6
- package/README.md +23 -10
- package/README.zh-CN.md +8 -6
- package/dashboard/dist/assets/{AchievementBadge-DPqwk2zI.js → AchievementBadge-Pi3Gvbm8.js} +1 -1
- package/dashboard/dist/assets/{AchievementsPage-CELHoMQt.js → AchievementsPage-C4WLT8Rl.js} +2 -2
- package/dashboard/dist/assets/{AchievementsSection-DdAC0VCb.js → AchievementsSection-ilvR2ssr.js} +1 -1
- package/dashboard/dist/assets/{BadgeDetailModal-Dd4I1SpM.js → BadgeDetailModal-CjEeToxa.js} +1 -1
- package/dashboard/dist/assets/{BotAnimated-DL2-4mnm.js → BotAnimated-DDf9pBuK.js} +1 -1
- package/dashboard/dist/assets/{Card-B_MpSRse.js → Card-DNous84-.js} +1 -1
- package/dashboard/dist/assets/{ClawdAnimated-BLZZ4rG6.js → ClawdAnimated-BLMIRntb.js} +2 -2
- package/dashboard/dist/assets/{CommandPalette-B-vfdIbH.js → CommandPalette-vVekhoFO.js} +1 -1
- package/dashboard/dist/assets/CommunityStatsModal-C0Kp_J8B.js +1 -0
- package/dashboard/dist/assets/{ConfirmModal-DLnRwUXC.js → ConfirmModal-DFdpcx12.js} +1 -1
- package/dashboard/dist/assets/{Controls-FZ8wEN5w.js → Controls-RNhqybmE.js} +1 -1
- package/dashboard/dist/assets/DashboardPage-BQjQh1IQ.js +1 -0
- package/dashboard/dist/assets/{DevicePage-D2IzPc5o.js → DevicePage-DIhh-YAk.js} +1 -1
- package/dashboard/dist/assets/{DialogClose-BaqQaUUk.js → DialogClose-ZqxYVIzl.js} +1 -1
- package/dashboard/dist/assets/DialogDescription-DDM4aanX.js +1 -0
- package/dashboard/dist/assets/{DialogTitle-DrbKjtuS.js → DialogTitle-BiRcejlu.js} +1 -1
- package/dashboard/dist/assets/{FadeIn-GddKDE8i.js → FadeIn-BDBQpeGe.js} +1 -1
- package/dashboard/dist/assets/{HeaderGithubStar-DUu-Z5mE.js → HeaderGithubStar-CztIwtKT.js} +1 -1
- package/dashboard/dist/assets/{HoverTooltip-BmDkY35A.js → HoverTooltip-Cfso7LTC.js} +1 -1
- package/dashboard/dist/assets/{IpCheckPage-CGJyqWk2.js → IpCheckPage-CNE7dLs3.js} +1 -1
- package/dashboard/dist/assets/{LandingPage-Bd91ALUj.js → LandingPage-B2a3cweM.js} +2 -2
- package/dashboard/dist/assets/{LeaderboardAvatar-BGGUwXFd.js → LeaderboardAvatar-CwmZnIji.js} +1 -1
- package/dashboard/dist/assets/{LeaderboardPage-BMEqHwif.js → LeaderboardPage-DkTHj3fB.js} +2 -2
- package/dashboard/dist/assets/{LeaderboardProfileModal-BSweJqm2.js → LeaderboardProfileModal-CefTO3Zh.js} +3 -3
- package/dashboard/dist/assets/{LeaderboardProfilePage-CRrI3RFz.js → LeaderboardProfilePage-CnOXlQ3L.js} +1 -1
- package/dashboard/dist/assets/{LimitsPage-XIRDv46K.js → LimitsPage-BIZ1-6BB.js} +2 -2
- package/dashboard/dist/assets/{LocalOnlyNotice-CCD-lGWG.js → LocalOnlyNotice-CdHQiPhy.js} +1 -1
- package/dashboard/dist/assets/{LoginCard-lDuqSv4f.js → LoginCard-yXLA9geu.js} +1 -1
- package/dashboard/dist/assets/{LoginModal-DStt5VXN.js → LoginModal-BF2Pfkqa.js} +1 -1
- package/dashboard/dist/assets/{LoginPage-dmVPSL72.js → LoginPage-DuOypZap.js} +1 -1
- package/dashboard/dist/assets/{PetPage-ybcZRctF.js → PetPage-BH3xDVV9.js} +1 -1
- package/dashboard/dist/assets/{PopoverPopup-Dar_UjxF.js → PopoverPopup-CewF_cGz.js} +1 -1
- package/dashboard/dist/assets/{ProviderIcon-Ct9tILpz.js → ProviderIcon-Dg0K0RPn.js} +1 -1
- package/dashboard/dist/assets/{ResetPasswordPage-B4yLh5zx.js → ResetPasswordPage-CYwt85O3.js} +1 -1
- package/dashboard/dist/assets/{SegmentedControl-BOE1CEzq.js → SegmentedControl-BJkXXomQ.js} +1 -1
- package/dashboard/dist/assets/{Select-D-bSh7Zz.js → Select-B3_WH0Qe.js} +1 -1
- package/dashboard/dist/assets/{SelectItemText-DMYjXXq4.js → SelectItemText-BUby_DUu.js} +1 -1
- package/dashboard/dist/assets/{ServiceStatusPage-CaleS-6_.js → ServiceStatusPage-BDlVZk4i.js} +1 -1
- package/dashboard/dist/assets/SessionsPage-TaC9nahK.js +2 -0
- package/dashboard/dist/assets/{SettingsPage-iJH0Yyah.js → SettingsPage-CudcQh6m.js} +2 -2
- package/dashboard/dist/assets/SkillsPage-iDLQ8lpZ.js +1 -0
- package/dashboard/dist/assets/{TokenGalaxy-CuXKoMPg.js → TokenGalaxy-DtYzUsXU.js} +1 -1
- package/dashboard/dist/assets/{ToolbarRootContext-Dx5GB7F5.js → ToolbarRootContext-PC8Tg1Jz.js} +1 -1
- package/dashboard/dist/assets/TrendMonitor-r8n8YO_9.js +19 -0
- package/dashboard/dist/assets/{WidgetsPage-DUaIyGtu.js → WidgetsPage-vzfGccWb.js} +1 -1
- package/dashboard/dist/assets/{WrappedPage-BzqlcAUC.js → WrappedPage-DaKuIkYE.js} +1 -1
- package/dashboard/dist/assets/{__vite-browser-external-BHz2N7Ih.css → __vite-browser-external-CCMdjCX2.css} +1 -1
- package/dashboard/dist/assets/__vite-browser-external-Dnxl50k1.js +45 -0
- package/dashboard/dist/assets/{agent-logos-BdWWxza6.js → agent-logos-B7nzn3n2.js} +1 -1
- package/dashboard/dist/assets/{arrow-up-right-CANSzmm-.js → arrow-up-right-CsxyvCER.js} +1 -1
- package/dashboard/dist/assets/{check-BnJpzXRZ.js → check-hYcC7MdH.js} +1 -1
- package/dashboard/dist/assets/{composite-Ccj6KQmh.js → composite-C79LNbex.js} +1 -1
- package/dashboard/dist/assets/{copy-C2Yc8Evu.js → copy-Cz4qzE62.js} +1 -1
- package/dashboard/dist/assets/{download-B52JTk6Y.js → download-CUaSNE2E.js} +1 -1
- package/dashboard/dist/assets/{external-link-DayTwZx-.js → external-link-vq7kIyKK.js} +1 -1
- package/dashboard/dist/assets/{flame-B8GEX2yT.js → flame-CB6K4eR6.js} +1 -1
- package/dashboard/dist/assets/{format-tokens-mhkbohkb.js → format-tokens-KI-e_JQ-.js} +1 -1
- package/dashboard/dist/assets/{icons-o8bPXqRP.js → icons-3maItkrp.js} +1 -1
- package/dashboard/dist/assets/{index-MBVWUKpA.js → index-BRXoZ7Jj.js} +1 -1
- package/dashboard/dist/assets/{index-CK_CduLm.js → index-C5WrfmLB.js} +1 -1
- package/dashboard/dist/assets/{index-Bp0ZHDtz.js → index-CUbC50Zp.js} +1 -1
- package/dashboard/dist/assets/{info-D94QM_vX.js → info-r0yGihUe.js} +1 -1
- package/dashboard/dist/assets/{limits-providers-BLzMyCiy.js → limits-providers-BN_94oe9.js} +1 -1
- package/dashboard/dist/assets/{link-2-CqBmFaDI.js → link-2-J9t0VXWM.js} +1 -1
- package/dashboard/dist/assets/{loader-circle-SaxUpDR6.js → loader-circle-DCvOsPze.js} +1 -1
- package/dashboard/dist/assets/{maximize-2-BoXqARks.js → maximize-2-CZ9JhGjf.js} +1 -1
- package/dashboard/dist/assets/{modifiers.esm-Conh_-BD.js → modifiers.esm-DJ0_WKg0.js} +1 -1
- package/dashboard/dist/assets/module-xpSFyNBK.js +3 -0
- package/dashboard/dist/assets/{monitor-smartphone-D6qLR9qd.js → monitor-smartphone-nqbWjJx_.js} +1 -1
- package/dashboard/dist/assets/{plus-D51mjIc2.js → plus-Cg7wd2jK.js} +1 -1
- package/dashboard/dist/assets/{provider-display-DpHPjd_s.js → provider-display-B9L1nRY9.js} +2 -2
- package/dashboard/dist/assets/{react-D_AcI466.js → react-D2AD6Pk2.js} +1 -1
- package/dashboard/dist/assets/{search-CwLcNdvZ.js → search-uNiWba1h.js} +1 -1
- package/dashboard/dist/assets/{skills-api-Dqi7Mjgo.js → skills-api-BBYuAhiL.js} +1 -1
- package/dashboard/dist/assets/{sortable.esm-BPDlUxPb.js → sortable.esm-CzPxc949.js} +1 -1
- package/dashboard/dist/assets/{store-ikeRIRGd.js → store-D4A7EUwE.js} +1 -1
- package/dashboard/dist/assets/{terminal-BfeX3L5T.js → terminal-Crmm_yKF.js} +1 -1
- package/dashboard/dist/assets/{trash-2-5_Qlp1k7.js → trash-2-ia9VjRnU.js} +1 -1
- package/dashboard/dist/assets/{use-community-stats-D90Fy2_j.js → use-community-stats-KaGCAxaF.js} +1 -1
- package/dashboard/dist/assets/use-latest-request-guard-Dy8gSDkk.js +1 -0
- package/dashboard/dist/assets/{use-limits-display-prefs-D4BYFaa-.js → use-limits-display-prefs-JSTYlbTD.js} +1 -1
- package/dashboard/dist/assets/{use-ordered-list-DJxLNdXY.js → use-ordered-list-C4JnHdE0.js} +1 -1
- package/dashboard/dist/assets/use-reduced-motion-AQE0ummK.js +1 -0
- package/dashboard/dist/assets/{use-session-efficiency-pref-CAX_GqXc.js → use-session-efficiency-pref-CgyUz5Gc.js} +1 -1
- package/dashboard/dist/assets/{use-transform-CeW6Z5R0.js → use-transform-C7-jSJ9k.js} +1 -1
- package/dashboard/dist/assets/use-usage-limits-B3YYqn-v.js +1 -0
- package/dashboard/dist/assets/{useCurrency-BarGeFyK.js → useCurrency-CK_gcb3J.js} +1 -1
- package/dashboard/dist/assets/{useTokenFormat-DUJ9iT9H.js → useTokenFormat-C_a-UkCA.js} +1 -1
- package/dashboard/dist/assets/{zap--m0IWoI3.js → zap-BIJNn-Ic.js} +1 -1
- package/dashboard/dist/brand-logos/lmstudio.svg +12 -0
- package/dashboard/dist/brand-logos/unsloth.svg +1 -0
- package/dashboard/dist/index.html +16 -12
- package/dashboard/dist/ip-check.html +2 -2
- package/dashboard/dist/leaderboard.html +2 -2
- package/dashboard/dist/llms.txt +4 -2
- package/dashboard/dist/share.html +2 -2
- package/package.json +2 -2
- package/src/commands/device-login.js +5 -10
- package/src/commands/init.js +28 -1
- package/src/commands/serve.js +6 -0
- package/src/commands/status.js +24 -0
- package/src/commands/sync.js +114 -18
- package/src/lib/cloud-account.js +102 -29
- package/src/lib/fs.js +30 -0
- package/src/lib/grok-context-breakdown.js +24 -33
- package/src/lib/grok-usage.js +95 -0
- package/src/lib/local-api.js +101 -13
- package/src/lib/pricing/index.js +15 -0
- package/src/lib/pricing/matcher.js +15 -0
- package/src/lib/pricing/seed-snapshot.json +1 -1
- package/src/lib/rollout.js +1094 -72
- package/src/lib/session-analytics.js +100 -40
- package/src/lib/usage-limits.js +507 -55
- package/src/lib/zcode-limits.js +65 -8
- package/dashboard/dist/assets/CommunityStatsModal-aAico565.js +0 -1
- package/dashboard/dist/assets/DashboardPage-BByRBsbt.js +0 -1
- package/dashboard/dist/assets/DialogDescription-BUrh0Jod.js +0 -1
- package/dashboard/dist/assets/SessionsPage-DOaY6_E9.js +0 -2
- package/dashboard/dist/assets/SkillsPage-BkzJOBLk.js +0 -1
- package/dashboard/dist/assets/TrendMonitor-BuKmsznP.js +0 -19
- package/dashboard/dist/assets/__vite-browser-external-CVIGknXl.js +0 -45
- package/dashboard/dist/assets/chevron-right-DJm0mbG0.js +0 -1
- package/dashboard/dist/assets/module-D2D5r9gC.js +0 -3
- package/dashboard/dist/assets/use-reduced-motion-yE3T3cat.js +0 -1
- package/dashboard/dist/assets/use-usage-limits-5HP8k9a3.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{m as c}from"./__vite-browser-external-
|
|
1
|
+
import{m as c}from"./__vite-browser-external-Dnxl50k1.js";const e=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],o=c("search",e);export{o as S};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{N as E,O as I,P as R,Q as $}from"./__vite-browser-external-
|
|
1
|
+
import{N as E,O as I,P as R,Q as $}from"./__vite-browser-external-Dnxl50k1.js";function s(e){return typeof e=="string"?e.trim():""}function g(e){return Array.isArray(e)?[...new Set(e.map(s).filter(Boolean))]:[]}function v(e){const t=s(e).replace(/\\/g,"/");if(!t||t.startsWith("/")||/^[A-Za-z]:\//.test(t))return"";const n=t.replace(/\/+$/g,"").split("/").filter(Boolean);return!n.length||n.some(r=>r==="."||r==="..")?"":n.join("/")}function C(e){const t=s(e).replace(/\\/g,"/");return!t||t.startsWith("/")||t.includes(":/")||/[A-Za-z]:\//.test(t)?"":t}function S(e){return s(e?.key)||s(e?.id)||`local:${s(e?.directory)}`}function L(e){return(Array.isArray(e)?e:[]).filter(t=>t?.scope!=="system").map(t=>{const n=v(t?.directory),r=C(S(t));if(!r||!n)return null;const i=t?.scope==="plugin"?"plugin":t?.managed?"managed":"local",o=v(t?.sourceName);return{key:r,name:s(t?.name)||n.split("/").pop()||"Skill",directory:n,targets:g(t?.targets),managed:t?.managed===!0,readOnly:t?.readOnly===!0,scope:i,...o?{sourceName:o}:{}}}).filter(t=>!!t)}function N(e){return{id:s(e?.id),name:s(e?.device_name)||s(e?.id),platform:s(e?.platform)||null,scannedAt:s(e?.scanned_at)||null}}function m(e,t){const n=Array.isArray(e.deviceSources)?e.deviceSources:[];return n.some(r=>r.id===t.id)?e:{...e,deviceSources:[...n,t]}}function q(e,t,n){const r=(Array.isArray(e)?e:[]).filter(o=>o?.scope!=="system").map(o=>({...o})),i=new Map;r.forEach((o,a)=>i.set(S(o).toLowerCase(),a));for(const o of Array.isArray(t?.devices)?t.devices:[]){const a=N(o);if(!(!a.id||a.id===n))for(const c of Array.isArray(o?.skills)?o.skills:[]){if(c?.scope==="system")continue;const l=S(c),p=s(c?.directory);if(!l||!p)continue;const h=l.toLowerCase(),k=g(c.targets),y=i.get(h);if(y!=null){const f=r[y];if(f.remote===!0&&f.inventoryOnly===!0){const A=[...new Set([...g(f.targets),...k])],U=Object.fromEntries(A.map(_=>[_,"synced"]));r[y]=m({...f,targets:A,targetStates:U},a)}else r[y]=m(f,a);continue}const w=k,b=Object.fromEntries(w.map(f=>[f,"synced"])),j=m({id:`remote:${encodeURIComponent(l)}`,key:l,name:s(c.name)||p.split(/[\\/]/).pop()||"Skill",directory:p,description:"",targets:w,targetStates:b,managed:!1,readOnly:!0,inventoryOnly:!0,remote:!0,scope:s(c.scope)||"local",sourceName:s(c.sourceName)||null},a);i.set(h,r.length),r.push(j)}}return r.sort((o,a)=>String(o.name||o.directory).localeCompare(String(a.name||a.directory))||String(o.id||o.key).localeCompare(String(a.id||a.key)))}const T="tokentracker-skills",P="tokentracker-account-skills",J=15e3;async function d(e){const t=new URL(`/functions/${T}`,window.location.origin);if(e)for(const[i,o]of Object.entries(e))o!=null&&o!==""&&t.searchParams.set(i,String(o));const n=await fetch(t.toString(),{headers:{Accept:"application/json"},cache:"no-store"}),r=await n.json().catch(()=>null);if(!n.ok)throw new Error(r?.error||`Request failed with HTTP ${n.status}`);return r}async function u(e){const t=await $(),n=await fetch(`/functions/${T}`,{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json",...t},cache:"no-store",body:JSON.stringify(e)}),r=await n.json().catch(()=>null);if(!n.ok||r?.ok===!1)throw new Error(r?.error||`Request failed with HTTP ${n.status}`);return r}function x(){return d({mode:"installed"})}function H(e={}){return d({mode:"discover",...e.force?{force:1}:{}})}function z(e,t=0,n=20){return d({mode:"search",q:e,offset:t,limit:n})}function B(){return d({mode:"repos"})}function M(e,t){return u({action:"install",skill:e,targets:t})}function D(e){return u({action:"uninstall",id:e})}function G(e){return u({action:"restore",id:e})}function Q(e,t){return u({action:"set_targets",id:e,targets:t})}function W(e,t){return u({action:"import_local",directory:e,targets:t})}function Z(e,t){return u({action:"delete_local",directory:e,targets:t||[]})}function F(e){return u({action:"add_repo",repo:e})}function V(e,t){return u({action:"remove_repo",owner:e,name:t})}function X(e={}){return d({mode:"popular",...e.force?{force:1}:{}})}function Y(e={}){return d({mode:"updates",...e.force?{force:1}:{}})}function ee(e={}){return d({mode:"skill_usage",...e.force?{force:1}:{}})}async function O({accessToken:e,method:t="GET",body:n}){if(!e||!E(e))throw new Error("Skills sync requires sign-in");const r=I();if(!r)throw new Error("InsForge base URL not configured");const i={Accept:"application/json","Content-Type":"application/json",Authorization:`Bearer ${e}`},o=R();o&&(i.apikey=o);const a=new AbortController,c=setTimeout(()=>a.abort(),J);try{const l=await fetch(`${r.replace(/\/$/,"")}/functions/${P}`,{method:t,headers:i,cache:"no-store",signal:a.signal,...n==null?{}:{body:JSON.stringify(n)}}),p=await l.json().catch(()=>null);if(!l.ok)throw new Error(p?.error||`Request failed with HTTP ${l.status}`);return p}finally{clearTimeout(c)}}function te(e){return O({accessToken:e})}function ne({accessToken:e,deviceId:t,skills:n}){return O({accessToken:e,method:"POST",body:{device_id:t,skills:L(n)}})}export{te as a,B as b,X as c,H as d,Y as e,ee as f,x as g,Z as h,M as i,Q as j,W as k,V as l,q as m,F as n,ne as p,G as r,z as s,D as u};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as c,d as P,a3 as Oe}from"./__vite-browser-external-
|
|
1
|
+
import{r as c,d as P,a3 as Oe}from"./__vite-browser-external-Dnxl50k1.js";function Sn(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return c.useMemo(()=>r=>{t.forEach(o=>o(r))},t)}const tt=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function me(e){const t=Object.prototype.toString.call(e);return t==="[object Window]"||t==="[object global]"}function bt(e){return"nodeType"in e}function B(e){var t,n;return e?me(e)?e:bt(e)&&(t=(n=e.ownerDocument)==null?void 0:n.defaultView)!=null?t:window:window}function wt(e){const{Document:t}=B(e);return e instanceof t}function Be(e){return me(e)?!1:e instanceof B(e).HTMLElement}function Wt(e){return e instanceof B(e).SVGElement}function ye(e){return e?me(e)?e.document:bt(e)?wt(e)?e:Be(e)||Wt(e)?e.ownerDocument:document:document:document}const Q=tt?c.useLayoutEffect:c.useEffect;function mt(e){const t=c.useRef(e);return Q(()=>{t.current=e}),c.useCallback(function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return t.current==null?void 0:t.current(...r)},[])}function En(){const e=c.useRef(null),t=c.useCallback((r,o)=>{e.current=setInterval(r,o)},[]),n=c.useCallback(()=>{e.current!==null&&(clearInterval(e.current),e.current=null)},[]);return[t,n]}function ke(e,t){t===void 0&&(t=[e]);const n=c.useRef(e);return Q(()=>{n.current!==e&&(n.current=e)},t),n}function Fe(e,t){const n=c.useRef();return c.useMemo(()=>{const r=e(n.current);return n.current=r,r},[...t])}function Je(e){const t=mt(e),n=c.useRef(null),r=c.useCallback(o=>{o!==n.current&&t?.(o,n.current),n.current=o},[]);return[n,r]}function ft(e){const t=c.useRef();return c.useEffect(()=>{t.current=e},[e]),t.current}let ct={};function $e(e,t){return c.useMemo(()=>{if(t)return t;const n=ct[e]==null?0:ct[e]+1;return ct[e]=n,e+"-"+n},[e,t])}function Ht(e){return function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return r.reduce((i,s)=>{const a=Object.entries(s);for(const[l,u]of a){const f=i[l];f!=null&&(i[l]=f+e*u)}return i},{...t})}}const we=Ht(1),ze=Ht(-1);function In(e){return"clientX"in e&&"clientY"in e}function yt(e){if(!e)return!1;const{KeyboardEvent:t}=B(e.target);return t&&e instanceof t}function Mn(e){if(!e)return!1;const{TouchEvent:t}=B(e.target);return t&&e instanceof t}function ht(e){if(Mn(e)){if(e.touches&&e.touches.length){const{clientX:t,clientY:n}=e.touches[0];return{x:t,y:n}}else if(e.changedTouches&&e.changedTouches.length){const{clientX:t,clientY:n}=e.changedTouches[0];return{x:t,y:n}}}return In(e)?{x:e.clientX,y:e.clientY}:null}const _e=Object.freeze({Translate:{toString(e){if(!e)return;const{x:t,y:n}=e;return"translate3d("+(t?Math.round(t):0)+"px, "+(n?Math.round(n):0)+"px, 0)"}},Scale:{toString(e){if(!e)return;const{scaleX:t,scaleY:n}=e;return"scaleX("+t+") scaleY("+n+")"}},Transform:{toString(e){if(e)return[_e.Translate.toString(e),_e.Scale.toString(e)].join(" ")}},Transition:{toString(e){let{property:t,duration:n,easing:r}=e;return t+" "+n+"ms "+r}}}),Tt="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function An(e){return e.matches(Tt)?e:e.querySelector(Tt)}const On={display:"none"};function Tn(e){let{id:t,value:n}=e;return P.createElement("div",{id:t,style:On},n)}function Nn(e){let{id:t,announcement:n,ariaLiveType:r="assertive"}=e;const o={position:"fixed",top:0,left:0,width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(100%)",whiteSpace:"nowrap"};return P.createElement("div",{id:t,style:o,role:"status","aria-live":r,"aria-atomic":!0},n)}function Ln(){const[e,t]=c.useState("");return{announce:c.useCallback(r=>{r!=null&&t(r)},[]),announcement:e}}const Kt=c.createContext(null);function kn(e){const t=c.useContext(Kt);c.useEffect(()=>{if(!t)throw new Error("useDndMonitor must be used within a children of <DndContext>");return t(e)},[e,t])}function zn(){const[e]=c.useState(()=>new Set),t=c.useCallback(r=>(e.add(r),()=>e.delete(r)),[e]);return[c.useCallback(r=>{let{type:o,event:i}=r;e.forEach(s=>{var a;return(a=s[o])==null?void 0:a.call(s,i)})},[e]),t]}const Pn={draggable:`
|
|
2
2
|
To pick up a draggable item, press the space bar.
|
|
3
3
|
While dragging, use the arrow keys to move the item.
|
|
4
4
|
Press space again to drop the item in its new position, or press escape to cancel.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Z as t}from"./__vite-browser-external-
|
|
1
|
+
import{Z as t}from"./__vite-browser-external-Dnxl50k1.js";import{F as p,P as g}from"./composite-C79LNbex.js";function d(){return new p({open:!1,transitionStatus:void 0,floatingElement:null,referenceElement:null,triggerElements:new g,floatingId:void 0,syncOnly:!1,nested:!1,onOpenChange:void 0})}function c(){return{open:!1,openProp:void 0,mounted:!1,transitionStatus:void 0,floatingRootContext:d(),floatingId:void 0,triggerCount:0,preventUnmountingOnClose:!1,payload:void 0,activeTriggerId:null,activeTriggerElement:null,triggerIdProp:void 0,popupElement:null,positionerElement:null,activeTriggerProps:t,inactiveTriggerProps:t,popupProps:t}}function m(e,n,l=!1){return new p({open:!1,transitionStatus:void 0,floatingElement:null,referenceElement:null,triggerElements:e,floatingId:n,syncOnly:!0,nested:l,onOpenChange:void 0})}const o=e=>e.triggerIdProp??e.activeTriggerId,r=e=>e.openProp??e.open,i=e=>(e.popupElement?.id??e.floatingId)||void 0;function u(e,n){return n!==void 0&&r(e)&&o(e)===n}function a(e,n){return u(e,n)?!0:n!==void 0&&r(e)&&o(e)==null&&e.triggerCount===1}const P={open:r,mounted:e=>e.mounted,transitionStatus:e=>e.transitionStatus,floatingRootContext:e=>e.floatingRootContext,triggerCount:e=>e.triggerCount,preventUnmountingOnClose:e=>e.preventUnmountingOnClose,payload:e=>e.payload,activeTriggerId:o,activeTriggerElement:e=>e.mounted?e.activeTriggerElement:null,popupId:i,isTriggerActive:(e,n)=>n!==void 0&&o(e)===n,isOpenedByTrigger:(e,n)=>u(e,n),isMountedByTrigger:(e,n)=>n!==void 0&&o(e)===n&&e.mounted,triggerProps:(e,n)=>n?e.activeTriggerProps:e.inactiveTriggerProps,triggerPopupId:(e,n)=>a(e,n)?i(e):void 0,popupProps:e=>e.popupProps,popupElement:e=>e.popupElement,positionerElement:e=>e.positionerElement};export{m as a,c,P as p};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{m as e}from"./__vite-browser-external-
|
|
1
|
+
import{m as e}from"./__vite-browser-external-Dnxl50k1.js";const o=[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]],a=e("terminal",o);export{a as T};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{m as a}from"./__vite-browser-external-
|
|
1
|
+
import{m as a}from"./__vite-browser-external-Dnxl50k1.js";const t=[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],o=a("trash-2",t);export{o as T};
|
package/dashboard/dist/assets/{use-community-stats-D90Fy2_j.js → use-community-stats-KaGCAxaF.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as p,g as N,b as M}from"./__vite-browser-external-
|
|
1
|
+
import{r as p,g as N,b as M}from"./__vite-browser-external-Dnxl50k1.js";const D=6e3,S=2500,E=100;function h(t,r){let o;const n=new Promise((a,i)=>{o=setTimeout(()=>i(new Error("landing stats timeout")),r)});return Promise.race([t,n]).finally(()=>{o!=null&&clearTimeout(o)})}const A=5*6e4,P=1440*6e4,k="tokentracker:community-stats:v2";let s=null;function C(t){const r=Number(t?.tokenFloor)||0,o=Number(t?.totalEntries)||0;return!(r>0)||!(o>0)?null:{tokenFloor:r,totalEntries:o,top:Array.isArray(t?.top)?t.top:[],topModels:Array.isArray(t?.topModels)?t.topModels:[],providers:Array.isArray(t?.providers)?t.providers:[],dailyGrowth:Array.isArray(t?.dailyGrowth)?t.dailyGrowth:[],tokenMix:Array.isArray(t?.tokenMix)?t.tokenMix:[],userDistribution:Array.isArray(t?.userDistribution)?t.userDistribution:[],platforms:Array.isArray(t?.platforms)?t.platforms:[],activeDevelopersTotal:Number(t?.activeDevelopersTotal)||0,activeDevelopers30d:Number(t?.activeDevelopers30d)||0,tokens30d:Number(t?.tokens30d)||0,tokenGrowthPct:t?.tokenGrowthPct!=null&&Number.isFinite(Number(t.tokenGrowthPct))?Number(t.tokenGrowthPct):null,developerGrowthPct:t?.developerGrowthPct!=null&&Number.isFinite(Number(t.developerGrowthPct))?Number(t.developerGrowthPct):null,generatedAt:typeof t?.generatedAt=="string"?t.generatedAt:null}}function G(){if(typeof window>"u"||!window.localStorage)return null;try{const t=JSON.parse(window.localStorage.getItem(k)||"null"),r=Number(t?.cachedAt)||0,o=C(t?.data),n=Date.now()-r;return!o||n<0||n>P?null:{data:o,isFresh:n<A}}catch{return null}}function I(t){if(!(typeof window>"u"||!window.localStorage))try{window.localStorage.setItem(k,JSON.stringify({cachedAt:Date.now(),data:t}))}catch{}}function F(){if(s&&Date.now()-s.at<A)return s.promise;const t=Promise.all([h(N({period:"total",limit:E,offset:0}),D),h(M(),S).catch(()=>null)]);return s={at:Date.now(),promise:t},t.catch(()=>{s?.promise===t&&(s=null)}),t}function O({enabled:t=!0}={}){const[r]=p.useState(()=>G()),[o,n]=p.useState(()=>r?{status:"ready",...r.data}:{status:"loading",tokenFloor:null,totalEntries:null,top:[]});return p.useEffect(()=>{if(!t||r?.isFresh)return;let a=!1,i=null,u=null;const y=async()=>{try{const[l,e]=await F();if(a)return;const c=Array.isArray(l?.entries)?l.entries:[],b=c.reduce((m,T)=>m+(Number(T?.total_tokens)||0),0),d=Number(e?.total_tokens)||0;d>0||(s=null);const w=Number(r?.data?.tokenFloor)||0,f=d>0?d:w>0?w:b;if(!c.length||!(f>0)){n(m=>({...m,status:"error"}));return}const g=Array.isArray(e?.top_models)?e.top_models:r?.data?.topModels||[],_={tokenFloor:f,totalEntries:Number(l?.total_entries)||c.length,top:c.slice(0,3),topModels:g,providers:Array.isArray(e?.providers)?e.providers:[],dailyGrowth:Array.isArray(e?.daily_growth)?e.daily_growth:[],tokenMix:Array.isArray(e?.token_mix)?e.token_mix:[],userDistribution:Array.isArray(e?.user_distribution)?e.user_distribution:[],platforms:Array.isArray(e?.platforms)?e.platforms:[],activeDevelopersTotal:Number(e?.active_developers_total)||0,activeDevelopers30d:Number(e?.active_developers_30d)||0,tokens30d:Number(e?.tokens_30d)||0,tokenGrowthPct:e?.token_growth_pct==null?null:Number(e.token_growth_pct),developerGrowthPct:e?.developer_growth_pct==null?null:Number(e.developer_growth_pct),generatedAt:typeof e?.generated_at=="string"?e.generated_at:null};n({status:"ready",..._}),d>0&&I(_)}catch{a||n(e=>e.status==="ready"?e:{...e,status:"error"})}};return typeof window<"u"&&"requestIdleCallback"in window?i=window.requestIdleCallback(y,{timeout:1500}):u=setTimeout(y,400),()=>{a=!0,i!=null&&typeof window.cancelIdleCallback=="function"&&window.cancelIdleCallback(i),u!=null&&clearTimeout(u)}},[t,r]),o}export{O as u};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as u}from"./__vite-browser-external-Dnxl50k1.js";function f(r,e){return r.length===e.length&&r.every((t,n)=>Object.is(t,e[n]))}function a(r){const e=u.useRef(r),t=u.useRef(0),n=u.useRef(!0);return u.useLayoutEffect(()=>{f(e.current,r)||(e.current=r,t.current+=1)}),u.useEffect(()=>(n.current=!0,()=>{n.current=!1,t.current+=1}),[]),u.useCallback(()=>{const c=++t.current,s=e.current;return()=>n.current&&t.current===c&&e.current===s},[])}export{a as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as a,q as M,t as B,v as q,w as G}from"./__vite-browser-external-
|
|
1
|
+
import{r as a,q as M,t as B,v as q,w as G}from"./__vite-browser-external-Dnxl50k1.js";import{L as F}from"./limits-providers-BN_94oe9.js";const l=F,g="tt.limits.providerOrder",A="tt.limits.providerVisibility",E="tt.limits.displayMode",I="tt.limits.showSubscriptions",m="tt.limits.updatedAt",V="limitsPreferences",H="limitsDisplayMode",S=Object.freeze({USED:"used",REMAINING:"remaining"}),O=new Set(Object.values(S)),_=new Set([g,A,E,I,m]);function v(){return[...l]}function h(){return Object.fromEntries(l.map(e=>[e,!0]))}function N(e){const t=[];if(Array.isArray(e))for(const o of e)l.includes(o)&&!t.includes(o)&&t.push(o);for(const o of l)t.includes(o)||t.push(o);return t}function k(e){const t=h();if(!e||typeof e!="object"||Array.isArray(e))return t;for(const o of l)typeof e[o]=="boolean"&&(t[o]=e[o]);return t}function W(e){return O.has(e)?e:S.USED}function P(e){return typeof e=="boolean"?e:!0}function w(e){if(e!=null){if(typeof e=="number")return Number.isSafeInteger(e)?e:void 0;if(typeof e=="string"){const t=e.trim();if(t==="")return;const o=Number(t);return Number.isSafeInteger(o)?o:void 0}}}function y(e={}){const t=e&&typeof e=="object"?e:{};return{displayMode:W(t.displayMode),providerOrder:N(t.providerOrder),providerVisibility:k(t.providerVisibility),showSubscriptions:P(t.showSubscriptions),updatedAt:w(t.updatedAt)}}function Q(){if(typeof window>"u")return v();try{const e=window.localStorage.getItem(g);return N(e?JSON.parse(e):void 0)}catch{return v()}}function X(){if(typeof window>"u")return h();try{const e=window.localStorage.getItem(A);return k(e?JSON.parse(e):void 0)}catch{return h()}}function Z(){if(typeof window>"u")return S.USED;try{const e=window.localStorage.getItem(E);return O.has(e)?e:S.USED}catch{return S.USED}}function $(){if(typeof window>"u")return!0;try{const e=window.localStorage.getItem(I);return e===null?!0:P(JSON.parse(e))}catch{return!0}}function ee(){if(!(typeof window>"u"))try{return w(window.localStorage.getItem(m))}catch{return}}function te(){if(typeof window>"u")return!1;try{for(const e of _)if(window.localStorage.getItem(e)!==null)return!0}catch{return!1}return!1}function b(){return y({displayMode:Z(),providerOrder:Q(),providerVisibility:X(),showSubscriptions:$(),updatedAt:ee()})}function re(e){if(typeof window>"u")return;const t=y(e);try{window.localStorage.setItem(g,JSON.stringify(t.providerOrder)),window.localStorage.setItem(A,JSON.stringify(t.providerVisibility)),window.localStorage.setItem(E,t.displayMode),window.localStorage.setItem(I,JSON.stringify(t.showSubscriptions)),t.updatedAt===void 0?window.localStorage.removeItem(m):window.localStorage.setItem(m,String(t.updatedAt))}catch(o){console.warn("[tokentracker] limits preferences localStorage write failed:",o)}}function ie(e){const t=y(e);return{displayMode:t.displayMode,providerOrder:[...t.providerOrder],providerVisibility:{...t.providerVisibility},showSubscriptions:t.showSubscriptions,updatedAt:t.updatedAt??null}}function ne(...e){let t;for(const d of e){const c=w(d);c!==void 0&&(t=t===void 0?c:Math.max(t,c))}const o=Date.now();return t!==void 0&&o<=t?t+1:o}function oe(e,t){return e.length===t.length&&e.every((o,d)=>o===t[d])}function se(e,t){return l.every(o=>e[o]===t[o])}function U(e,t){return e.displayMode===t.displayMode&&oe(e.providerOrder,t.providerOrder)&&se(e.providerVisibility,t.providerVisibility)&&e.showSubscriptions===t.showSubscriptions}function de(e,t){return U(e,t)&&w(e.updatedAt)===w(t.updatedAt)}function L(e,t){const o=w(e.updatedAt),d=w(t.updatedAt);return o!==void 0&&(d===void 0||o>d)}function ce(){const[e,t]=a.useState(b),o=a.useRef(e),d=a.useCallback((i,r={})=>{const n=y(i);return o.current=n,t(n),r.writeLocal&&re(n),n},[]),c=a.useCallback(i=>{M()&&B(V,ie(i))},[]),u=a.useCallback(i=>{const r=b(),n=L(r,o.current)?d(r):o.current,s=y(i(n));if(U(n,s))return;const f=ne(r.updatedAt,n.updatedAt),p=d({...s,updatedAt:f},{writeLocal:!0});c(p)},[d,c]),C=a.useCallback(i=>{O.has(i)&&u(r=>({...r,displayMode:i}))},[u]),x=a.useCallback(i=>{u(r=>({...r,showSubscriptions:!!i}))},[u]),D=a.useCallback(i=>{if(!O.has(i))return;const r=b();if(r.updatedAt!==void 0){d(r);return}d({...r,displayMode:i,updatedAt:void 0},{writeLocal:!0})},[d]);a.useEffect(()=>{if(!M())return;const i=q(r=>{const n=r?.[V];if(n&&typeof n=="object"){const s=y(n);if(!te()){d(s,{writeLocal:!0});return}const f=b();if(L(s,f))d(s,{writeLocal:!0});else{const p=d(f);de(s,f)||c(p)}return}D(r?.[H])});return G(),i},[D,d,c]),a.useEffect(()=>{if(typeof window>"u")return;const i=r=>{(r.key===null||_.has(r.key))&&d(b())};return window.addEventListener("storage",i),()=>window.removeEventListener("storage",i)},[d]);const R=a.useCallback(i=>{l.includes(i)&&u(r=>({...r,providerVisibility:{...r.providerVisibility,[i]:!r.providerVisibility[i]}}))},[u]),Y=a.useCallback(i=>{u(r=>{const n=r.providerOrder.indexOf(i);if(n<=0)return r;const s=[...r.providerOrder];return[s[n-1],s[n]]=[s[n],s[n-1]],{...r,providerOrder:s}})},[u]),T=a.useCallback(i=>{u(r=>{const n=r.providerOrder.indexOf(i);if(n<0||n>=r.providerOrder.length-1)return r;const s=[...r.providerOrder];return[s[n],s[n+1]]=[s[n+1],s[n]],{...r,providerOrder:s}})},[u]),z=a.useCallback((i,r)=>{i!==r&&u(n=>{const s=n.providerOrder.indexOf(i),f=n.providerOrder.indexOf(r);if(s<0||f<0)return n;const p=[...n.providerOrder],[J]=p.splice(s,1);return p.splice(f,0,J),{...n,providerOrder:p}})},[u]),K=a.useCallback(()=>{u(()=>({displayMode:S.USED,providerOrder:v(),providerVisibility:h(),showSubscriptions:!0}))},[u]),j=a.useMemo(()=>e.providerOrder.filter(i=>e.providerVisibility[i]!==!1),[e.providerOrder,e.providerVisibility]);return{order:e.providerOrder,visibility:e.providerVisibility,displayMode:e.displayMode,showSubscriptions:e.showSubscriptions,setDisplayMode:C,setShowSubscriptions:x,visibleOrdered:j,toggle:R,moveUp:Y,moveDown:T,moveToward:z,reset:K}}export{S as L,ce as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as f}from"./__vite-browser-external-
|
|
1
|
+
import{r as f}from"./__vite-browser-external-Dnxl50k1.js";function O(t){if(typeof window>"u")return null;try{const n=window.localStorage.getItem(t);if(!n)return null;const i=JSON.parse(n);return Array.isArray(i)?i.filter(o=>typeof o=="string"):null}catch{return null}}function m(t,n){if(!(typeof window>"u"))try{window.localStorage.setItem(t,JSON.stringify(n))}catch{}}function S(t,n){if(!t)return n;const i=new Set(n),o=t.filter(u=>i.has(u)),c=n.filter(u=>!o.includes(u));return[...o,...c]}function p(t,n){const i=f.useMemo(()=>n.join("|"),[n]),[o,c]=f.useState(()=>S(O(t),n));f.useEffect(()=>{c(r=>{const e=S(r,n);return e.length===r.length&&e.every((l,d)=>l===r[d])?r:(m(t,e),e)})},[i,n,t]);const u=f.useCallback((r,e)=>{!r||!e||r===e||c(s=>{const l=s.indexOf(r),d=s.indexOf(e);if(l===-1||d===-1)return s;const w=s.slice(),[h]=w.splice(l,1);return w.splice(d,0,h),m(t,w),w})},[t]),a=f.useCallback(()=>{m(t,n),c(n)},[t,n]);return{order:o,reorder:u,reset:a}}export{p as u};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as o}from"./__vite-browser-external-Dnxl50k1.js";import{h as r,i as t,p as s}from"./react-D2AD6Pk2.js";function i(){!r.current&&t();const[e]=o.useState(s.current);return e}export{i as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{m as u,r as n}from"./__vite-browser-external-
|
|
1
|
+
import{m as u,r as n}from"./__vite-browser-external-Dnxl50k1.js";const f=[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]],E=u("pencil",f),i="tt.qualityPerDollar.enabled";function l(){if(typeof window>"u")return!1;try{return window.localStorage.getItem(i)==="1"}catch{return!1}}function y(){const[r,o]=n.useState(l);n.useEffect(()=>{if(typeof window>"u")return;const t=e=>{(e.key===null||e.key===i)&&o(l())};return window.addEventListener("storage",t),()=>window.removeEventListener("storage",t)},[]);const a=n.useCallback(t=>{const e=!!t;o(e);try{window.localStorage.setItem(i,e?"1":"0")}catch{}},[]),s=n.useCallback(()=>a(!l()),[a]);return{enabled:r,setEnabled:a,toggle:s}}const d="tt.sessionEfficiency.enabled";function c(){if(typeof window>"u")return!1;try{return window.localStorage.getItem(d)==="1"}catch{return!1}}function g(){const[r,o]=n.useState(c);n.useEffect(()=>{if(typeof window>"u")return;const t=e=>{(e.key===null||e.key===d)&&o(c())};return window.addEventListener("storage",t),()=>window.removeEventListener("storage",t)},[]);const a=n.useCallback(t=>{const e=!!t;o(e);try{window.localStorage.setItem(d,e?"1":"0")}catch{}},[]),s=n.useCallback(()=>a(!c()),[a]);return{enabled:r,setEnabled:a,toggle:s}}export{E as P,g as a,y as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d as y,u as l,e as A,M as p,b as h,f as C,g as V,j as u}from"./react-
|
|
1
|
+
import{d as y,u as l,e as A,M as p,b as h,f as C,g as V,j as u}from"./react-D2AD6Pk2.js";import{r as f}from"./__vite-browser-external-Dnxl50k1.js";function x(...t){const e=!Array.isArray(t[0]),n=e?0:-1,o=t[0+n],s=t[1+n],c=t[2+n],r=t[3+n],a=y(s,c,r);return e?a(o):a}function E(t){const e=l(()=>A(t)),{isStatic:n}=f.useContext(p);if(n){const[,o]=f.useState(t);f.useEffect(()=>e.on("change",o),[])}return e}function m(t,e){const n=E(e()),o=()=>n.set(e());return o(),h(()=>{const s=()=>V.preRender(o,!1,!0),c=t.map(r=>r.on("change",s));return()=>{c.forEach(r=>r()),C(o)}}),n}function L(t){u.current=[],t();const e=m(u.current,t);return u.current=void 0,e}function g(t,e,n,o){if(typeof t=="function")return L(t);const c=typeof e=="function"?e:x(e,n,o),r=Array.isArray(t)?i(t,c):i([t],([d])=>c(d)),a=Array.isArray(t)?void 0:t.accelerate;return a&&!a.isTransformed&&typeof e!="function"&&Array.isArray(n)&&o?.clamp!==!1&&(r.accelerate={...a,times:e,keyframes:n,isTransformed:!0}),r}function i(t,e){const n=l(()=>[]);return m(t,()=>{n.length=0;const o=t.length;for(let s=0;s<o;s++)n[s]=t[s].get();return e(n)})}export{g as a,E as u};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{q as b,ac as v,r as y,c as g,ad as x,ae as M,af as _}from"./__vite-browser-external-Dnxl50k1.js";import{l as L}from"./limits-providers-BN_94oe9.js";import{u as I}from"./use-latest-request-guard-Dy8gSDkk.js";const S="native:notificationPermission";let E=null;function N(){return typeof window<"u"&&!!window.chrome?.webview}function K(){return b()?E||"unknown":N()?"granted":typeof Notification>"u"?"unsupported":Notification.permission}function O(e){if(typeof window>"u")return()=>{};const i=t=>{const a=t?.detail?.status;typeof a=="string"&&(E=a),e(K())};return window.addEventListener(S,i),e(K()),b()&&v({type:"getNotificationStatus"}),()=>window.removeEventListener(S,i)}async function q(){if(b()){v({type:"requestNotificationPermission"});return}N()||typeof Notification<"u"&&Notification.permission==="default"&&await Notification.requestPermission().catch(()=>"denied")}const p="tt.limitAlerts.enabled";function A(){try{return window.localStorage.getItem(p)==="1"}catch{return!1}}function H(){const[e,i]=y.useState(A),[t,a]=y.useState("unknown");y.useEffect(()=>O(a),[]);const f=y.useCallback(async n=>{const r=!!n;r&&await q();try{window.localStorage.setItem(p,r?"1":"0")}catch{}i(r)},[]);return{enabled:e,setEnabled:f,permissionBlocked:t==="denied"}}function C(e,i){if(!(e>0))return null;const t=(e-i)/e;return Number.isFinite(t)?Math.min(Math.max(t,0),1):null}function z(e,i,t=.03){return e>i+t}function D(e){const i=Math.max(0,Math.floor(e)),t=Math.floor(i/3600);return t>24?`${Math.floor(t/24)}d`:t>0?`${t}h`:`${Math.floor(i/60)}m`}function R(e,i){if(typeof e.windowSeconds=="number")return e.windowSeconds;if(e.windowSecondsField&&i){const t=i[e.windowSecondsField];return typeof t=="number"&&t>0?t:null}return null}function j(e){return e==null?NaN:typeof e=="number"?e*1e3:Date.parse(e)}function T({usedPercent:e,windowSeconds:i,resetMs:t,mode:a,now:f=Date.now()}){const n=Math.min(Math.max(Number(e)||0,0),100)/100,r={pacePercent:null,paceOver:!1,expectedPercent:null,runsOutEta:null,projectedEnd:null};if(!(i>0)||!Number.isFinite(t))return r;const o=Math.max(0,(t-f)/1e3),s=C(i,o);if(s==null)return r;if(r.expectedPercent=Math.round(s*100),r.paceOver=z(n,s),n>=.05){const m=a==="remaining"?1-s:s;r.pacePercent=m*100}if(s>.02&&n>0){const m=i*s,w=n/m,c=n/s;c>=1&&w>0?r.runsOutEta=D((1-n)/w):r.projectedEnd=Math.round(Math.min(c,1)*100)}return r}const $={claude:{windows(e){const i=Array.isArray(e.weekly_scoped)?e.weekly_scoped.map(t=>({key:`scoped-${t.label}`,label:t.label,window:t,pctField:"utilization",resetField:"resets_at",windowSeconds:604800})):[];return[{key:"5h",labelKey:"limits.label.claude_5h",window:e.five_hour,pctField:"utilization",resetField:"resets_at",windowSeconds:5*3600},{key:"7d",labelKey:"limits.label.claude_7d",window:e.seven_day,pctField:"utilization",resetField:"resets_at",windowSeconds:7*86400},{key:"opus",labelKey:"limits.label.claude_opus",window:e.seven_day_opus,pctField:"utilization",resetField:"resets_at",windowSeconds:7*86400},...i]}},codex:{extra:"codex_meta",windows(e){return[{key:"5h",labelKey:"limits.label.codex_5h",window:e.primary_window,windowSecondsField:"limit_window_seconds"},{key:"7d",labelKey:"limits.label.codex_7d",window:e.secondary_window,windowSecondsField:"limit_window_seconds"},{key:"credits",labelKey:"limits.label.codex_credits",window:e.credit_window},{key:"spark-5h",labelKey:"limits.label.codex_spark_5h",window:e.spark_primary_window,windowSecondsField:"limit_window_seconds"},{key:"spark-7d",labelKey:"limits.label.codex_spark_7d",window:e.spark_secondary_window,windowSecondsField:"limit_window_seconds"}]}},cursor:{windows(e){return[{key:"plan",labelKey:"limits.label.cursor_plan",window:e.primary_window,windowSecondsField:"limit_window_seconds"},{key:"auto",labelKey:"limits.label.cursor_auto",window:e.secondary_window,windowSecondsField:"limit_window_seconds"},{key:"api",labelKey:"limits.label.cursor_api",window:e.tertiary_window,windowSecondsField:"limit_window_seconds"},{key:"grok-bot",labelKey:"limits.label.cursor_grok_bot",window:e.quaternary_window,windowSecondsField:"limit_window_seconds"}]}},gemini:{windows(e){return[{key:"pro",labelKey:"limits.label.gemini_pro",window:e.primary_window},{key:"flash",labelKey:"limits.label.gemini_flash",window:e.secondary_window},{key:"lite",labelKey:"limits.label.gemini_lite",window:e.tertiary_window}]}},kimi:{extra:"kimi_parallel",windows(e){return[{key:"weekly",labelKey:"limits.label.kimi_weekly",window:e.primary_window,windowSeconds:7*86400},{key:"5h",labelKey:"limits.label.kimi_5h",window:e.secondary_window,windowSeconds:5*3600},{key:"total",labelKey:"limits.label.kimi_total",window:e.tertiary_window}]}},kiro:{extra:"kiro_credits",windows(e){return[{key:"month",labelKey:"limits.label.kiro_month",window:e.primary_window},{key:"bonus",labelKey:"limits.label.kiro_bonus",window:e.secondary_window}]}},grok:{windows(e){const i=typeof e.period_type=="string"?e.period_type:null,t=i==="weekly"?"limits.label.grok_week":i==="daily"?"limits.label.grok_day":"limits.label.grok_month",a=i==="weekly"?7*86400:i==="daily"?86400:void 0;return[{key:i==="weekly"?"week":i==="daily"?"day":"month",labelKey:t,window:e.primary_window,windowSeconds:a},{key:"ondemand",labelKey:"limits.label.grok_ondemand",window:e.secondary_window}]}},antigravity:{windows(e){return[{key:"claude-weekly",labelKey:"limits.label.antigravity_claude_weekly",window:e.primary_window},{key:"claude-5h",labelKey:"limits.label.antigravity_claude_5h",window:e.secondary_window},{key:"gemini-weekly",labelKey:"limits.label.antigravity_gemini_weekly",window:e.tertiary_window},{key:"gemini-5h",labelKey:"limits.label.antigravity_gemini_5h",window:e.quaternary_window}]}},copilot:{extra:"copilot_otel",windows(e){return[{key:"premium",labelKey:"limits.label.copilot_premium",window:e.primary_window},{key:"chat",labelKey:"limits.label.copilot_chat",window:e.secondary_window}]}},zcode:{windows(e){return e.plan_kind==="coding-plan"?[{key:"5h",labelKey:"limits.label.zcode_5h",window:e.primary_window},{key:"weekly",labelKey:"limits.label.zcode_weekly",window:e.secondary_window},{key:"tools",labelKey:"limits.label.zcode_tools",window:e.tertiary_window}]:[{key:"glm52",labelKey:"limits.label.zcode_glm52",window:e.primary_window},{key:"glm5t",labelKey:"limits.label.zcode_glm5t",window:e.secondary_window}]}},opencodeGo:{windows(e){return[{key:"5h",labelKey:"limits.label.opencode_go_5h",window:e.primary_window},{key:"weekly",labelKey:"limits.label.opencode_go_weekly",window:e.secondary_window},{key:"monthly",labelKey:"limits.label.opencode_go_monthly",window:e.tertiary_window}]}},qoder:{windows(e){return[{key:"credits",labelKey:"limits.label.qoder_credits",window:e.primary_window},{key:"ultimate",labelKey:"limits.label.qoder_ultimate",window:e.secondary_window,timeKind:"expiry"}]}},qoderCn:{windows(e){return[{key:"credits",labelKey:"limits.label.qoder_cn_credits",window:e.primary_window},{key:"ultimate",labelKey:"limits.label.qoder_cn_ultimate",window:e.secondary_window,timeKind:"expiry"}]}},codingPlan:{windows(e){return[{key:"5h",labelKey:"limits.label.ark_coding_plan_5h",window:e.primary_window},{key:"weekly",labelKey:"limits.label.ark_coding_plan_weekly",window:e.secondary_window},{key:"monthly",labelKey:"limits.label.ark_coding_plan_monthly",window:e.tertiary_window}]}}},P="tt.limitAlerts.cycles.v1";function B(){try{return JSON.parse(window.localStorage.getItem(P)||"{}")}catch{return{}}}function G(e){try{window.localStorage.setItem(P,JSON.stringify(e))}catch{}}function V(e,{now:i=Date.now()}={}){const t=[],a=$;for(const[f,n]of Object.entries(e||{})){const r=a[f];if(!(!n?.configured||n.error||!r))for(const o of r.windows(n)){if(!o.window)continue;const s=Number(o.pctField==="utilization"?o.window.utilization:o.window.used_percent),m=o.resetField==="resets_at"?o.window.resets_at:o.window.reset_at,w=j(m),c=T({usedPercent:s,windowSeconds:R(o,o.window),resetMs:w,mode:"used",now:i});!c.runsOutEta||!c.paceOver||s<20||!(w>i)||t.push({id:`${f}:${o.key}:${w}`,providerId:f,windowKey:o.key,resetMs:w,usedPercent:s,runsOutEta:c.runsOutEta})}}return t}function J(e){const i=B(),t=V(e);for(const n of t){if(i[n.id])continue;const r=L(n.providerId),o=g("limits.alert.title",{provider:r}),s=g("limits.alert.body",{eta:n.runsOutEta,percent:Math.round(n.usedPercent)});let m=x({title:o,body:s,id:n.id});!m&&typeof Notification<"u"&&Notification.permission==="granted"&&(new Notification(o,{body:s,tag:n.id}),m=!0),m&&(i[n.id]=Date.now())}const a=Date.now()-864e5,f=Object.fromEntries(Object.entries(i).filter(([n,r])=>{const o=Number(n.split(":").at(-1));return Number.isFinite(o)?o>=a:Number(r)>=a}).slice(-100));return G(f),t.length}function Q(e){const i=!!e?.initialState,[t,a]=y.useState(()=>i?e?.initialState?.data??null:null),[f,n]=y.useState(()=>i?e?.initialState?.error??null:null),[r,o]=y.useState(!i),s=!!e?.initialRefresh,m=!!e?.publishToPreloadCache,w=I([]);y.useEffect(()=>{if(!(!t||typeof window>"u"))try{window.localStorage.getItem(p)==="1"&&J(t)}catch{}},[t]);const c=y.useCallback((d,l)=>{!m||!d||typeof d!="object"||M(d,{source:l})},[m]),F=y.useCallback(async()=>{const d=w();try{const l=await _({refresh:!0});if(!d())return;const u=l&&typeof l=="object"?l:null;a(u),n(null),o(!1),c(u,"manual-refresh")}catch(l){if(!d())return;n(l?.message||String(l)),o(!1)}},[w,c]),k=y.useCallback(async()=>{const d=w();try{const l=await _();if(!d())return;const u=l&&typeof l=="object"?l:null;a(u),n(null),o(!1),c(u,"page-load")}catch(l){if(!d())return;n(l?.message||String(l)),o(!1)}},[w,c]);return y.useEffect(()=>{if(typeof window>"u"||typeof document>"u")return;const d=15e3;let l=Date.now();const u=()=>{if(document.visibilityState!=="visible")return;const h=Date.now();h-l<d||(l=h,k())};return window.addEventListener("focus",u),document.addEventListener("visibilitychange",u),()=>{window.removeEventListener("focus",u),document.removeEventListener("visibilitychange",u)}},[k]),y.useEffect(()=>{if(i&&!s)return;const d=w();(async()=>{try{const l=await _();if(!d())return;const u=l&&typeof l=="object"?l:null;a(u),n(null),c(u,"page-load")}catch(l){if(!d())return;n(l?.message||String(l))}finally{d()&&o(!1)}})()},[w,i,s,c]),{data:t,error:f,isLoading:r,refresh:F}}export{$ as P,R as a,H as b,T as c,j as r,J as s,Q as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e,C as t,D as r,x as c}from"./__vite-browser-external-
|
|
1
|
+
import{r as e,C as t,D as r,x as c}from"./__vite-browser-external-Dnxl50k1.js";const s=Object.freeze({currency:c,rate:1,symbol:"$",rates:{...r},rateSource:"default",rateFetchedAt:null,setCurrency:()=>{}});function a(){return e.useContext(t)??s}export{a as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e,T as r,n,o as a,p as s}from"./__vite-browser-external-
|
|
1
|
+
import{r as e,T as r,n,o as a,p as s}from"./__vite-browser-external-Dnxl50k1.js";const T=Object.freeze({mode:n.COMPACT,setMode:()=>{},formatTokens:(o,t={})=>s(o,t),formatTokensTooltip:(o,t={})=>a(o,t)});function f(){return e.useContext(r)??T}export{f as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{m as a}from"./__vite-browser-external-
|
|
1
|
+
import{m as a}from"./__vite-browser-external-Dnxl50k1.js";const o=[["path",{d:"M15.914 4a1.5 1.5 0 00-2.474-1.561l-9 9A1.5 1.5 0 005.5 14h4.002a.5.5 0 01.471.666L8.086 20a1.5 1.5 0 002.475 1.56l9-9A1.5 1.5 0 0018.5 10h-3.997a.5.5 0 01-.472-.667z",key:"1v7up4"}]],e=a("zap",o);export{e as Z};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
<svg width="512" height="512" viewBox="0 0 512 512" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<path d="M0 179.2C0 116.474 0 85.1112 12.2073 61.1531C22.9451 40.0789 40.0789 22.9451 61.1531 12.2073C85.1112 0 116.474 0 179.2 0H332.8C395.526 0 426.889 0 450.847 12.2073C471.921 22.9451 489.055 40.0789 499.793 61.1531C512 85.1112 512 116.474 512 179.2V332.8C512 395.526 512 426.889 499.793 450.847C489.055 471.921 471.921 489.055 450.847 499.793C426.889 512 395.526 512 332.8 512H179.2C116.474 512 85.1112 512 61.1531 499.793C40.0789 489.055 22.9451 471.921 12.2073 450.847C0 426.889 0 395.526 0 332.8V179.2Z" fill="url(#paint0)"/>
|
|
3
|
+
<g fill="white">
|
|
4
|
+
<rect x="64" y="84" width="224" height="44" rx="22"/><rect opacity=".25" x="128" y="84" width="224" height="44" rx="22"/>
|
|
5
|
+
<rect x="160" y="144" width="224" height="44" rx="22"/><rect opacity=".25" x="224" y="144" width="224" height="44" rx="22"/>
|
|
6
|
+
<rect x="104" y="204" width="224" height="44" rx="22"/><rect opacity=".25" x="168" y="204" width="224" height="44" rx="22"/>
|
|
7
|
+
<rect x="48" y="264" width="224" height="44" rx="22"/><rect opacity=".25" x="112" y="264" width="224" height="44" rx="22"/>
|
|
8
|
+
<rect x="112" y="324" width="224" height="44" rx="22"/><rect opacity=".25" x="176" y="324" width="224" height="44" rx="22"/>
|
|
9
|
+
<rect x="240" y="384" width="152" height="44" rx="22"/><rect opacity=".25" x="304" y="384" width="152" height="44" rx="22"/>
|
|
10
|
+
</g>
|
|
11
|
+
<defs><linearGradient id="paint0" x1="-219.792" y1="229.426" x2="239.06" y2="702.601" gradientUnits="userSpaceOnUse"><stop stop-color="#6E7EF3"/><stop offset="1" stop-color="#4F13BE"/></linearGradient></defs>
|
|
12
|
+
</svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32" role="img" aria-label="Unsloth"><image width="32" height="32" href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAH2ElEQVR42rVXfUyV5xX/ve/9vhdU4AqUqUNQwxRkClgq4gcta1pmnGl0KiKCuDqVNNoBCWHNNrIu0LRxy+wfHW5msU2MXTbmxDRiocAFB64Ws5atOOosJiLfF7mX+/W+O+e53MuH0GKWnps393mf9zznd57z9ZxHC6Kwq68/I0N+W1Kl9ZAg45skFYoqqbcVKMeHXyhvk/zgmkbZZNCrTpdKLNKTyJMm2VWoC1ZBMhkkxelyK/Btl3nnAtwx4XkScK1EhlJVjLsn4PJ5IEsLXioxFmMKbDa72Lkk6b5uJYMEgPucY1C0MjbFrkFseCQmPB7oZM3CFCEsxmRs7UJ8LoSShe0uJyYUL8Iti1C6LhvPepfgS9s/ELsqAb+MseDDnk6Y9RaE6I3Cloqqfp33JO1CTD1KwIpGwnNxicgOj0WSx4SO319C4dmz6B14iMqK1/Cb0pOoWxqPJnsv6u9+BsmnYrHBBK+qfLUxrFer5lVTQ+D9ZOpt307AqzEpGKnvwJWLf0JTmw33CZhJp9NBZzAgIiQUmWnpyPnhSwjPfhpv3O9Aw90uRJkXfaUS8yrA4H0OO0pTvoec/6ooO/kKbty+NWUZrRY+n4/C4fHlz6zfgF/99tf42wrgzVv1iDSFwjePEvJ8Zn9I4JVPfx+pDXexbetWAc6g/Gg0Gni93iA4vwe+8dNGvNtpTeqHX+DnaS/iodPuD96FKKAVZn+Ew4kZSG7txd7DeUFTMzEw71yiwJQpifmf33leUZQZvPsK85HUfA9HEjOFK+dSQp4dlk6vG/HWKBR5orHvwAExr9fr4aE0YxCmtLQ0sXsG5P8TJ04gNzdXvDMP8+onldifl4v8CStWWZ8SsqVZpUae6XcJdo8Lr67Zgnd++jocNDYajXC73QgNDcUBUqirqwvl5eVi9zk5OWLdsWPHcOHCBTQ2NuLQoUMwmUxwkxK8dsLrEbJOr84QsjWz6kQwCHna7fMiJsyKt6QEvLB5G7Q6LbweL7KysnDlyhUhkKmnpwfj4+NwOBxIT0/HnTt3EB8fHxTK87t27UJ9fT3J0JEMD+paGlEif44vh/ph0GiDhVueKjYyxkjD52LW4O9//cDvbwLfsGEDrl+/jr6+Pty4cUPMx8XFISkpCSkpKbh48SKio6OD4MwzODiIa9euYePGjQJczNdeRdZTq/GIMORpsSBP+Z/fZKzXhcH2UXOQwWKxICMjA7GxsdhKkb1z507hYw48jvi9e/cKHvZ9dna24F2xYgW2bNmCkJCQoBxbUzO+S7IlWZ47BjhPLVRQljh86O75TzC9Wlpa0NraiuLiYhELPD537pz4Njo6Kh6mmpoaOJ1OodimTZtgs9nQ1NQk+Ji6yW1hJNtiMAazZYYCXLeNOj18Yw6MjI74lSJhgZTiRYWFhRgaGkJUVFTQFWxmJg48BisrK0N7e7vIHH5nGUzDJNM7Ok5nhYGwphTQTmsUhG/YZ97JRZzjnkkfnqW6z1RUVITdu3eLMcdHwMz5+floaGhAdXW1AGZrBWRwqrIcj4uygFzgnnbua6dOSAjNdHqq7eRb4hYLly1bhkuXLiEiIgKLFy9GZGQkzpw5g9TUVFRWVgr/19XV4cGDBzh//rxQYGRkRFhqz5496O3tDdYSvdEAn12ZUQmmKUBFiLSWQswIpYNl2DkudsICOPcLCgqCi3bs2IGKigrY7XahpNVqRVVVlfjGCvLDdYHXBtwQQopKoWY4BlwwkKXV2Qrw4eOgY/eRUUZGSioct9ox0Oc/8dj3AwMDKCkpEe/Jycmora0VZuXYYP9PJ7bQqVOngnEUvtSK9MSN8Jj1cLhdMOlNFPTqrCAknYxUIN6914nKd2vwctHRYF3nqldaWorMzExcvnxZ7JznDJQ1AfCxsTFRrNg6DM7fAwFcdLgA1e//EefufQw9dU3qfMcxdz7cfCQtj0PFcCR+8OzzwSDinA+cBXoC5vMgikzN1N/fj/aODrgmJoJHNfNKMq1VVPzlgzpUR4+g44vPEWY0z+iUZnRE/CHMYEZnbw98FOHJqxPQ2f0vrF23Dp99+qnYEfNsTklDI9WH6bR9cwZsHe1izK4JrFm7chV8Cctx8/ZNRBgtjzUn8uNtOyniU3DN04eio0VironS63TxK0Jw3r79+LOtGSXkkgCdJpPX2lpwOC9P8Bz/0ctobfZX06NHjqBBGfD3D3M1PuaD2T+bqYAKs1aHTwZ7UZCVg4RxDTSJK7E2OxMrnTJ2lZ3A1s738JOXDuJ+fRviv7UcR373BjLb/oDXXtyPVT4jni8/id6RQcS5dVhffBC/+HcjzLJuzrvDnC0Z+91FJ+NSMtnpxO14r/sm7lFX82NqLN6/8zE6B+9jXUQMqqLT4aNmtbTXhu6hPnwnLBoH1qSipqsVkToLcmn81j8/Es2IUaubs0uetydkJbgiDrvGEUrdrZa8xeNFlEJmKtnjHrcoWgoFmY/Ma6E5B5nf7nZgicECH+XVGAU0j/VUC+Zr0SVrXZVvsk2RHm/c/fWBU5Qzgcecv/zjjPEfKtyaSQKAxXDDwTxcWalhE4ecOt8tkX4yXxT5rkYInrkCkqNWUdXgOOBHsSNGmXYB4W8BHp7zzgdOWIzJ2DLfUvmiKJmNuknMb5pUxvJfTpXjMl+R+ZaqOCc+eZIr7v9xPVcZizEZ+39tLcGnVFLbuQAAAABJRU5ErkJggg=="/></svg>
|
|
@@ -123,7 +123,7 @@
|
|
|
123
123
|
"price": "0",
|
|
124
124
|
"priceCurrency": "USD"
|
|
125
125
|
},
|
|
126
|
-
"description": "Local-first AI coding usage tracker for
|
|
126
|
+
"description": "Local-first AI coding usage tracker for 36 tools, with a desktop pet, four widgets, achievements, native macOS and Windows apps, accurate cross-provider deduplication, and no prompt collection."
|
|
127
127
|
},
|
|
128
128
|
{
|
|
129
129
|
"@type": "WebSite",
|
|
@@ -197,7 +197,9 @@
|
|
|
197
197
|
{ "@type": "ListItem", "position": 31, "name": "AnythingLLM Desktop" },
|
|
198
198
|
{ "@type": "ListItem", "position": 32, "name": "Claude Science" },
|
|
199
199
|
{ "@type": "ListItem", "position": 33, "name": "DeepSeek Harness" },
|
|
200
|
-
{ "@type": "ListItem", "position": 34, "name": "TRAE Work CN" }
|
|
200
|
+
{ "@type": "ListItem", "position": 34, "name": "TRAE Work CN" },
|
|
201
|
+
{ "@type": "ListItem", "position": 35, "name": "LM Studio" },
|
|
202
|
+
{ "@type": "ListItem", "position": 36, "name": "Unsloth Studio" }
|
|
201
203
|
]
|
|
202
204
|
},
|
|
203
205
|
{
|
|
@@ -216,7 +218,7 @@
|
|
|
216
218
|
"name": "Which AI coding CLIs does Token Tracker support?",
|
|
217
219
|
"acceptedAnswer": {
|
|
218
220
|
"@type": "Answer",
|
|
219
|
-
"text": "Token Tracker supports
|
|
221
|
+
"text": "Token Tracker supports 36 AI coding tools, including Claude Code, Codex CLI, Cursor, Gemini CLI, Antigravity, Kiro, OpenCode, OpenClaw, Every Code, Hermes Agent, GitHub Copilot, Kimi Code, CodeBuddy, WorkBuddy, Grok Build, oh-my-pi, pi, Dots, Prime Agent, Craft Agents, Reasonix, Kilo CLI, Kilo Code, Roo Code, Zed Agent, Goose, Droid, Mimo Code, ZCode, Qoder, AnythingLLM Desktop, Claude Science, DeepSeek Harness, TRAE Work CN, LM Studio, and Unsloth Studio."
|
|
220
222
|
}
|
|
221
223
|
},
|
|
222
224
|
{
|
|
@@ -248,7 +250,7 @@
|
|
|
248
250
|
"name": "How do I monitor AI token usage and cost across tools?",
|
|
249
251
|
"acceptedAnswer": {
|
|
250
252
|
"@type": "Answer",
|
|
251
|
-
"text": "Install Token Tracker with npx tokentracker-cli. It is an AI token usage and cost tracker that monitors token consumption and spend across all
|
|
253
|
+
"text": "Install Token Tracker with npx tokentracker-cli. It is an AI token usage and cost tracker that monitors token consumption and spend across all 36 supported tools in one dashboard, with per-model pricing across 2,200+ models so you can see cost by model, project, and time window without manual tracking."
|
|
252
254
|
}
|
|
253
255
|
},
|
|
254
256
|
{
|
|
@@ -264,15 +266,15 @@
|
|
|
264
266
|
]
|
|
265
267
|
}
|
|
266
268
|
</script>
|
|
267
|
-
<script type="module" crossorigin src="/assets/__vite-browser-external-
|
|
268
|
-
<link rel="stylesheet" crossorigin href="/assets/__vite-browser-external-
|
|
269
|
+
<script type="module" crossorigin src="/assets/__vite-browser-external-Dnxl50k1.js"></script>
|
|
270
|
+
<link rel="stylesheet" crossorigin href="/assets/__vite-browser-external-CCMdjCX2.css">
|
|
269
271
|
</head>
|
|
270
272
|
<body>
|
|
271
273
|
<main class="aeo-seed-content" aria-label="Token Tracker AI-readable summary">
|
|
272
274
|
<h1>Token Tracker: monitor AI token usage and cost with a local dashboard and desktop companion</h1>
|
|
273
275
|
<p>
|
|
274
276
|
Token Tracker is a free, open-source, local-first dashboard that automatically tracks and monitors token usage
|
|
275
|
-
and cost across
|
|
277
|
+
and cost across 36 AI coding tools — including Claude Code, OpenAI Codex, Cursor, Gemini CLI, LM Studio, and Unsloth Studio. A desktop pet
|
|
276
278
|
reacts to real token activity, four desktop widgets
|
|
277
279
|
keep usage visible, and achievements turn coding history into progress. Native macOS and Windows apps
|
|
278
280
|
sit on top of accurate cross-provider deduplication. Token counts only — never prompts or conversations.
|
|
@@ -297,7 +299,7 @@
|
|
|
297
299
|
<li><strong>Desktop pet</strong> — a pixel companion that reacts to real token burn, streaks, and rest.</li>
|
|
298
300
|
<li><strong>Four desktop widgets</strong> — usage, activity heatmap, top models, and limits at a glance.</li>
|
|
299
301
|
<li><strong>Achievements</strong> — unlock milestones from local and optional account-wide activity.</li>
|
|
300
|
-
<li><strong>Unified usage dashboard</strong> — input, output, cached, and cache-creation tokens across
|
|
302
|
+
<li><strong>Unified usage dashboard</strong> — input, output, cached, and cache-creation tokens across 36 AI coding tools.</li>
|
|
301
303
|
<li><strong>Cost analysis</strong> — per-model pricing across 2,200+ models with an offline snapshot.</li>
|
|
302
304
|
<li><strong>Usage limits view</strong> — live quota and subscription status for 13 providers, with last-good caching for local providers such as Antigravity and Qoder.</li>
|
|
303
305
|
<li><strong>Service Status page</strong> — live operational and incident status from eight official provider status pages.</li>
|
|
@@ -308,11 +310,11 @@
|
|
|
308
310
|
</ul>
|
|
309
311
|
<p><em>Privacy by design</em>: token counts only, never prompts or conversation content. Local-first; cloud sync is optional and powers only the public leaderboard.</p>
|
|
310
312
|
|
|
311
|
-
<h2>Supported AI coding tools (
|
|
313
|
+
<h2>Supported AI coding tools (36)</h2>
|
|
312
314
|
<p>
|
|
313
315
|
Use Token Tracker as a Claude Code token tracker, Codex token tracker, Cursor token tracker,
|
|
314
316
|
Gemini token tracker, OpenCode token tracker, GitHub Copilot token tracker, or DeepSeek Harness token tracker — one dashboard
|
|
315
|
-
covers all
|
|
317
|
+
covers all 36 tools below.
|
|
316
318
|
</p>
|
|
317
319
|
<ul>
|
|
318
320
|
<li><strong>Claude Code</strong> — Anthropic's official coding agent CLI; integrated via SessionEnd hook.</li>
|
|
@@ -349,6 +351,8 @@
|
|
|
349
351
|
<li><strong>Claude Science</strong> — passive reader for the <code>frames</code> table of <code>operon-cli.db</code>.</li>
|
|
350
352
|
<li><strong>DeepSeek Harness</strong> — passive session reader (<code>~/.dsh/sessions/**/session.jsonl[.zstd]</code>).</li>
|
|
351
353
|
<li><strong>TRAE Work CN</strong> — macOS signed-in app session-token reader; its internal API may change.</li>
|
|
354
|
+
<li><strong>LM Studio</strong> — passive local developer-server usage reader with mirrored-response deduplication.</li>
|
|
355
|
+
<li><strong>Unsloth Studio</strong> — passive scalar-only SQLite usage reader for local and paid-provider chat routes.</li>
|
|
352
356
|
</ul>
|
|
353
357
|
|
|
354
358
|
<h2>Who should use Token Tracker</h2>
|
|
@@ -379,7 +383,7 @@
|
|
|
379
383
|
<p>Run <code>npx tokentracker-cli</code>. The CLI auto-detects your AI coding tools, installs hooks, and opens the dashboard.</p>
|
|
380
384
|
|
|
381
385
|
<h3>Which AI coding tools does Token Tracker support?</h3>
|
|
382
|
-
<p>Token Tracker supports
|
|
386
|
+
<p>Token Tracker supports 36 tools: Claude Code, Codex CLI, Cursor, Gemini CLI, Antigravity, Kiro, OpenCode, OpenClaw, Every Code, Hermes Agent, GitHub Copilot, Kimi Code, CodeBuddy, WorkBuddy, Grok Build, oh-my-pi, pi, Dots, Prime Agent, Craft Agents, Reasonix, Kilo CLI, Kilo Code, Roo Code, Zed Agent, Goose, Droid, Mimo Code, ZCode, Qoder, AnythingLLM Desktop, Claude Science, DeepSeek Harness, TRAE Work CN, LM Studio, and Unsloth Studio.</p>
|
|
383
387
|
|
|
384
388
|
<h3>Is Token Tracker free and open source?</h3>
|
|
385
389
|
<p>Yes. Source on GitHub at <a href="https://github.com/xiufengsun/TokenTracker">github.com/xiufengsun/TokenTracker</a>; npm package <code>tokentracker-cli</code>.</p>
|
|
@@ -391,7 +395,7 @@
|
|
|
391
395
|
<p>Input, output, cached, and cache-creation tokens per model, project, and time window. It also surfaces usage limits for 13 providers, including Claude, Codex, Cursor, Gemini, Antigravity, Qoder, and Qoder CN.</p>
|
|
392
396
|
|
|
393
397
|
<h3>How do I monitor AI token usage and cost across tools?</h3>
|
|
394
|
-
<p>Token Tracker is an AI token usage and cost tracker: install it with <code>npx tokentracker-cli</code>, and it monitors token consumption and spend across all
|
|
398
|
+
<p>Token Tracker is an AI token usage and cost tracker: install it with <code>npx tokentracker-cli</code>, and it monitors token consumption and spend across all 36 tools in one dashboard, with per-model pricing across 2,200+ models so you can see cost by model, project, and time window without manual tracking.</p>
|
|
395
399
|
|
|
396
400
|
<h3>Does Token Tracker work offline?</h3>
|
|
397
401
|
<p>Yes. Token Tracker is local-first. All parsing, aggregation, and dashboard rendering happen on your machine. Cloud sync is optional and powers only the public leaderboard.</p>
|
|
@@ -165,8 +165,8 @@
|
|
|
165
165
|
]
|
|
166
166
|
}
|
|
167
167
|
</script>
|
|
168
|
-
<script type="module" crossorigin src="/assets/__vite-browser-external-
|
|
169
|
-
<link rel="stylesheet" crossorigin href="/assets/__vite-browser-external-
|
|
168
|
+
<script type="module" crossorigin src="/assets/__vite-browser-external-Dnxl50k1.js"></script>
|
|
169
|
+
<link rel="stylesheet" crossorigin href="/assets/__vite-browser-external-CCMdjCX2.css">
|
|
170
170
|
</head>
|
|
171
171
|
<body>
|
|
172
172
|
<main class="aeo-seed-content" aria-label="Claude IP Check AI-readable summary">
|
|
@@ -136,8 +136,8 @@
|
|
|
136
136
|
]
|
|
137
137
|
}
|
|
138
138
|
</script>
|
|
139
|
-
<script type="module" crossorigin src="/assets/__vite-browser-external-
|
|
140
|
-
<link rel="stylesheet" crossorigin href="/assets/__vite-browser-external-
|
|
139
|
+
<script type="module" crossorigin src="/assets/__vite-browser-external-Dnxl50k1.js"></script>
|
|
140
|
+
<link rel="stylesheet" crossorigin href="/assets/__vite-browser-external-CCMdjCX2.css">
|
|
141
141
|
</head>
|
|
142
142
|
<body>
|
|
143
143
|
<main class="aeo-seed-content" aria-label="AI Coding Token Usage Leaderboard AI-readable summary">
|
package/dashboard/dist/llms.txt
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# Token Tracker LLMs Index
|
|
2
2
|
|
|
3
3
|
Token Tracker is a free, open-source, local-first AI coding usage and cost
|
|
4
|
-
tracker for
|
|
4
|
+
tracker for 36 tools. Its distinctive desktop experience includes a pixel pet
|
|
5
5
|
powered by real token activity, four desktop widgets, and achievements. The
|
|
6
6
|
same data powers a cross-platform CLI, a native macOS menu bar app, a native
|
|
7
7
|
Windows system tray app, and a dashboard. It records token counts and
|
|
@@ -23,7 +23,7 @@ timestamps, never prompts, responses, or source code.
|
|
|
23
23
|
- [npm package](https://www.npmjs.com/package/tokentracker-cli)
|
|
24
24
|
- [Latest release](https://github.com/xiufengsun/TokenTracker/releases/latest)
|
|
25
25
|
|
|
26
|
-
## Supported AI coding tools (
|
|
26
|
+
## Supported AI coding tools (36)
|
|
27
27
|
- Claude Code
|
|
28
28
|
- Codex CLI
|
|
29
29
|
- Cursor
|
|
@@ -58,6 +58,8 @@ timestamps, never prompts, responses, or source code.
|
|
|
58
58
|
- Claude Science
|
|
59
59
|
- DeepSeek Harness
|
|
60
60
|
- TRAE Work CN
|
|
61
|
+
- LM Studio
|
|
62
|
+
- Unsloth Studio
|
|
61
63
|
|
|
62
64
|
## Capabilities
|
|
63
65
|
- Desktop pet that reacts to real token burn, streaks, and rest
|
|
@@ -75,8 +75,8 @@
|
|
|
75
75
|
"description": "Shareable Token Tracker dashboard snapshot."
|
|
76
76
|
}
|
|
77
77
|
</script>
|
|
78
|
-
<script type="module" crossorigin src="/assets/__vite-browser-external-
|
|
79
|
-
<link rel="stylesheet" crossorigin href="/assets/__vite-browser-external-
|
|
78
|
+
<script type="module" crossorigin src="/assets/__vite-browser-external-Dnxl50k1.js"></script>
|
|
79
|
+
<link rel="stylesheet" crossorigin href="/assets/__vite-browser-external-CCMdjCX2.css">
|
|
80
80
|
</head>
|
|
81
81
|
<body>
|
|
82
82
|
<main class="aeo-seed-content" aria-label="Token Tracker share page summary">
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tokentracker-cli",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "Local-first AI coding token usage and cost tracker for
|
|
3
|
+
"version": "0.95.0",
|
|
4
|
+
"description": "Local-first AI coding token usage and cost tracker for 36 tools, with a dashboard, desktop pet, widgets, achievements, and native macOS/Windows apps.",
|
|
5
5
|
"main": "src/cli.js",
|
|
6
6
|
"bin": {
|
|
7
7
|
"tokentracker-cli": "bin/tracker.js",
|
|
@@ -4,7 +4,7 @@ const os = require("node:os");
|
|
|
4
4
|
const path = require("node:path");
|
|
5
5
|
const fs = require("node:fs/promises");
|
|
6
6
|
|
|
7
|
-
const { readJson,
|
|
7
|
+
const { readJson, updateJsonLocked } = require("../lib/fs");
|
|
8
8
|
const { resolveTrackerPaths } = require("../lib/tracker-paths");
|
|
9
9
|
const { resolveRuntimeConfig } = require("../lib/runtime-config");
|
|
10
10
|
|
|
@@ -139,20 +139,15 @@ async function cmdDeviceLogin(argv = [], options = {}) {
|
|
|
139
139
|
if (!result.deviceToken) {
|
|
140
140
|
throw new Error("device login approved but server did not return a device token");
|
|
141
141
|
}
|
|
142
|
-
|
|
143
|
-
...
|
|
144
|
-
// `config` was read BEFORE getOrCreateMachineId persisted the
|
|
145
|
-
// machineId — spreading it alone would clobber the freshly-written
|
|
146
|
-
// machineId on disk and the next caller would mint a different one
|
|
147
|
-
// (device identity drift, the exact bug this field exists to fix).
|
|
142
|
+
await updateJsonLocked(configPath, async (current) => ({
|
|
143
|
+
...current,
|
|
148
144
|
...(machineId ? { machineId } : {}),
|
|
149
145
|
baseUrl,
|
|
150
146
|
user_id: result.user_id,
|
|
151
147
|
deviceToken: result.deviceToken,
|
|
152
|
-
deviceId: result.deviceId || config.deviceId,
|
|
148
|
+
deviceId: result.deviceId || current.deviceId || config.deviceId,
|
|
153
149
|
device_login_at: new Date().toISOString(),
|
|
154
|
-
};
|
|
155
|
-
await writeJson(configPath, next);
|
|
150
|
+
}));
|
|
156
151
|
process.stdout.write(`\n✓ Approved. device token written to ${configPath}\n`);
|
|
157
152
|
return;
|
|
158
153
|
}
|
package/src/commands/init.js
CHANGED
|
@@ -66,6 +66,8 @@ const {
|
|
|
66
66
|
resolvePiAgentDir,
|
|
67
67
|
piAgentDirCollidesWithOmp,
|
|
68
68
|
resolvePrimeAgentDir,
|
|
69
|
+
resolveLmstudioLogFiles,
|
|
70
|
+
resolveUnslothDbPath,
|
|
69
71
|
resolveAnythingllmDbPath,
|
|
70
72
|
resolveReasonixHome,
|
|
71
73
|
resolveTraeStoragePath,
|
|
@@ -103,7 +105,7 @@ const DIVIDER = "----------------------------------------------";
|
|
|
103
105
|
const DEFAULT_DASHBOARD_URL = "https://www.tokentracker.cc";
|
|
104
106
|
|
|
105
107
|
// Single source of truth for the welcome screen's provider count + sample list.
|
|
106
|
-
// test/discovery-metadata.test.js keeps this aligned with public
|
|
108
|
+
// test/discovery-metadata.test.js keeps this aligned with public tool copy.
|
|
107
109
|
const SUPPORTED_PROVIDERS = [
|
|
108
110
|
"Claude Code",
|
|
109
111
|
"Codex CLI",
|
|
@@ -139,6 +141,8 @@ const SUPPORTED_PROVIDERS = [
|
|
|
139
141
|
"Claude Science",
|
|
140
142
|
"DeepSeek Harness",
|
|
141
143
|
"TRAE Work CN",
|
|
144
|
+
"LM Studio",
|
|
145
|
+
"Unsloth Studio",
|
|
142
146
|
];
|
|
143
147
|
|
|
144
148
|
async function cmdInit(argv) {
|
|
@@ -796,6 +800,29 @@ async function applyIntegrationSetup({
|
|
|
796
800
|
}
|
|
797
801
|
}
|
|
798
802
|
|
|
803
|
+
// LM Studio and Unsloth Studio: passive readers — no hooks needed.
|
|
804
|
+
{
|
|
805
|
+
const lmstudioLogFiles = await resolveLmstudioLogFiles(process.env);
|
|
806
|
+
if (lmstudioLogFiles.length > 0) {
|
|
807
|
+
summary.push({
|
|
808
|
+
label: "LM Studio",
|
|
809
|
+
status: "detected",
|
|
810
|
+
detail: `Passive reader · ${lmstudioLogFiles.length} log${lmstudioLogFiles.length !== 1 ? "s" : ""}`,
|
|
811
|
+
});
|
|
812
|
+
}
|
|
813
|
+
}
|
|
814
|
+
|
|
815
|
+
{
|
|
816
|
+
const unslothDbPath = resolveUnslothDbPath(process.env);
|
|
817
|
+
if (unslothDbPath && fssync.existsSync(unslothDbPath)) {
|
|
818
|
+
summary.push({
|
|
819
|
+
label: "Unsloth Studio",
|
|
820
|
+
status: "detected",
|
|
821
|
+
detail: "Passive reader (no hook needed)",
|
|
822
|
+
});
|
|
823
|
+
}
|
|
824
|
+
}
|
|
825
|
+
|
|
799
826
|
// AnythingLLM Desktop: passive SQLite reader — no hook installation needed.
|
|
800
827
|
{
|
|
801
828
|
const anythingllmDbPath = resolveAnythingllmDbPath(process.env);
|
package/src/commands/serve.js
CHANGED
|
@@ -268,6 +268,7 @@ async function cmdServe(argv) {
|
|
|
268
268
|
|
|
269
269
|
function startNativeBackgroundSync({
|
|
270
270
|
appShell = process.env.TOKENTRACKER_APP_SHELL,
|
|
271
|
+
nativeSyncOwner = process.env.TOKENTRACKER_NATIVE_SYNC_OWNER,
|
|
271
272
|
intervalMs = NATIVE_BACKGROUND_SYNC_INTERVAL_MS,
|
|
272
273
|
runSync,
|
|
273
274
|
setIntervalFn = setInterval,
|
|
@@ -276,6 +277,11 @@ function startNativeBackgroundSync({
|
|
|
276
277
|
} = {}) {
|
|
277
278
|
const normalizedShell = String(appShell || "").trim().toLowerCase();
|
|
278
279
|
if (normalizedShell !== "windows") return null;
|
|
280
|
+
// The Windows tray host owns its five-minute background sync timer and
|
|
281
|
+
// receives completion events for the UI. Running this server-side fallback
|
|
282
|
+
// as well creates two independent sync producers that contend on sync.lock,
|
|
283
|
+
// leaving refreshes stale and needlessly expensive.
|
|
284
|
+
if (String(nativeSyncOwner || "").trim().toLowerCase() === "windows-host") return null;
|
|
279
285
|
|
|
280
286
|
// Run the periodic fallback sync in a child process, not in-process:
|
|
281
287
|
// several provider parsers read SQLite databases via execFileSync, which
|
package/src/commands/status.js
CHANGED
|
@@ -69,6 +69,9 @@ const {
|
|
|
69
69
|
resolveKilocodeTaskFiles,
|
|
70
70
|
resolveRoocodeTaskFiles,
|
|
71
71
|
resolveZedDbPath,
|
|
72
|
+
resolveLmstudioHome,
|
|
73
|
+
resolveLmstudioLogFiles,
|
|
74
|
+
resolveUnslothDbPath,
|
|
72
75
|
resolveQoderDbPaths,
|
|
73
76
|
resolveQoderCnDbPaths,
|
|
74
77
|
resolveClaudeScienceDbPaths,
|
|
@@ -637,6 +640,11 @@ async function cmdStatus(argv = []) {
|
|
|
637
640
|
const dshSessionsDir = dshHomes.map((homeDir) => path.join(homeDir, "sessions")).join(", ");
|
|
638
641
|
const dshSessionFiles = await resolveDshSessionFiles(process.env);
|
|
639
642
|
const dshInstalled = dshSessionFiles.length > 0;
|
|
643
|
+
const lmstudioHome = resolveLmstudioHome(process.env);
|
|
644
|
+
const lmstudioLogFiles = await resolveLmstudioLogFiles(process.env);
|
|
645
|
+
const lmstudioInstalled = lmstudioLogFiles.length > 0;
|
|
646
|
+
const unslothDbPath = resolveUnslothDbPath(process.env);
|
|
647
|
+
const unslothInstalled = Boolean(unslothDbPath && fssync.existsSync(unslothDbPath));
|
|
640
648
|
|
|
641
649
|
// Trae SOLO (ByteDance AI IDE) — passive entitlement snapshot reader.
|
|
642
650
|
const traeStoragePath = resolveTraeStoragePath(process.env);
|
|
@@ -961,6 +969,16 @@ async function cmdStatus(argv = []) {
|
|
|
961
969
|
dsh: dshInstalled
|
|
962
970
|
? { installed: true, files: dshSessionFiles.length, detail: dshSessionsDir }
|
|
963
971
|
: { installed: false },
|
|
972
|
+
lmstudio: lmstudioInstalled
|
|
973
|
+
? {
|
|
974
|
+
installed: true,
|
|
975
|
+
files: lmstudioLogFiles.length,
|
|
976
|
+
detail: path.join(lmstudioHome, "server-logs"),
|
|
977
|
+
}
|
|
978
|
+
: { installed: false },
|
|
979
|
+
unsloth: unslothInstalled
|
|
980
|
+
? { installed: true, detail: unslothDbPath }
|
|
981
|
+
: { installed: false },
|
|
964
982
|
trae: traeInstalled
|
|
965
983
|
? {
|
|
966
984
|
installed: true,
|
|
@@ -1137,6 +1155,12 @@ async function cmdStatus(argv = []) {
|
|
|
1137
1155
|
dshInstalled
|
|
1138
1156
|
? `- DeepSeek Harness: passive reader (${dshSessionFiles.length} session${dshSessionFiles.length !== 1 ? "s" : ""} in ${dshSessionsDir})`
|
|
1139
1157
|
: null,
|
|
1158
|
+
lmstudioInstalled
|
|
1159
|
+
? `- LM Studio: passive reader (${lmstudioLogFiles.length} log${lmstudioLogFiles.length !== 1 ? "s" : ""} in ${path.join(lmstudioHome, "server-logs")})`
|
|
1160
|
+
: null,
|
|
1161
|
+
unslothInstalled
|
|
1162
|
+
? `- Unsloth Studio: passive reader (${unslothDbPath})`
|
|
1163
|
+
: null,
|
|
1140
1164
|
traeInstalled
|
|
1141
1165
|
// Deliberately NOT "passive reader": every other line with that wording
|
|
1142
1166
|
// means tokens are being counted. Trae encrypts its session transcripts
|