tokentracker-cli 0.95.0 → 0.95.2
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/dashboard/dist/assets/{AchievementBadge-Pi3Gvbm8.js → AchievementBadge-DtB1MwFe.js} +1 -1
- package/dashboard/dist/assets/{AchievementsPage-C4WLT8Rl.js → AchievementsPage--vddu0dC.js} +2 -2
- package/dashboard/dist/assets/{AchievementsSection-ilvR2ssr.js → AchievementsSection-CDl9hsbj.js} +1 -1
- package/dashboard/dist/assets/{BadgeDetailModal-CjEeToxa.js → BadgeDetailModal-C7WsIRy9.js} +1 -1
- package/dashboard/dist/assets/{BotAnimated-DDf9pBuK.js → BotAnimated-CmXyzIhX.js} +1 -1
- package/dashboard/dist/assets/{Card-DNous84-.js → Card-SUbC3VNS.js} +1 -1
- package/dashboard/dist/assets/{ClawdAnimated-BLMIRntb.js → ClawdAnimated-BdEbs8Me.js} +2 -2
- package/dashboard/dist/assets/{CommandPalette-vVekhoFO.js → CommandPalette-D1RLLeHB.js} +1 -1
- package/dashboard/dist/assets/{CommunityStatsModal-C0Kp_J8B.js → CommunityStatsModal-5ESGJgZQ.js} +1 -1
- package/dashboard/dist/assets/{ConfirmModal-DFdpcx12.js → ConfirmModal-DsCd51b2.js} +1 -1
- package/dashboard/dist/assets/{Controls-RNhqybmE.js → Controls-BVrLC_QD.js} +1 -1
- package/dashboard/dist/assets/{DashboardPage-BQjQh1IQ.js → DashboardPage-DtUOG6og.js} +1 -1
- package/dashboard/dist/assets/{DevicePage-DIhh-YAk.js → DevicePage-zYjj-m5V.js} +1 -1
- package/dashboard/dist/assets/{DialogClose-ZqxYVIzl.js → DialogClose-D66yBqkd.js} +1 -1
- package/dashboard/dist/assets/DialogDescription-BVlaoajd.js +1 -0
- package/dashboard/dist/assets/{DialogTitle-BiRcejlu.js → DialogTitle-C4ia00lc.js} +1 -1
- package/dashboard/dist/assets/{FadeIn-BDBQpeGe.js → FadeIn-DF2c8XaR.js} +1 -1
- package/dashboard/dist/assets/{HeaderGithubStar-CztIwtKT.js → HeaderGithubStar-Cnr3aqcX.js} +1 -1
- package/dashboard/dist/assets/{HoverTooltip-Cfso7LTC.js → HoverTooltip-DBOpxlH7.js} +1 -1
- package/dashboard/dist/assets/{IpCheckPage-CNE7dLs3.js → IpCheckPage-CUY6KBaV.js} +1 -1
- package/dashboard/dist/assets/{LandingPage-B2a3cweM.js → LandingPage-DKL8hZEq.js} +2 -2
- package/dashboard/dist/assets/{LeaderboardAvatar-CwmZnIji.js → LeaderboardAvatar-DRYeMNlq.js} +1 -1
- package/dashboard/dist/assets/{LeaderboardPage-DkTHj3fB.js → LeaderboardPage-DpD9Az3k.js} +2 -2
- package/dashboard/dist/assets/{LeaderboardProfileModal-CefTO3Zh.js → LeaderboardProfileModal-Dfg0V13F.js} +3 -3
- package/dashboard/dist/assets/{LeaderboardProfilePage-CnOXlQ3L.js → LeaderboardProfilePage-DH-jcVDu.js} +1 -1
- package/dashboard/dist/assets/{LimitsPage-BIZ1-6BB.js → LimitsPage-CVCKPScf.js} +1 -1
- package/dashboard/dist/assets/{LocalOnlyNotice-CdHQiPhy.js → LocalOnlyNotice-Bj_m0hw7.js} +1 -1
- package/dashboard/dist/assets/{LoginCard-yXLA9geu.js → LoginCard-BVKvtx60.js} +1 -1
- package/dashboard/dist/assets/{LoginModal-BF2Pfkqa.js → LoginModal-mUGiSIJN.js} +1 -1
- package/dashboard/dist/assets/{LoginPage-DuOypZap.js → LoginPage-BORCuCUt.js} +1 -1
- package/dashboard/dist/assets/{PetPage-BH3xDVV9.js → PetPage-D1JfEOVA.js} +1 -1
- package/dashboard/dist/assets/{PopoverPopup-CewF_cGz.js → PopoverPopup-DK3et-HG.js} +1 -1
- package/dashboard/dist/assets/{ProviderIcon-Dg0K0RPn.js → ProviderIcon-By8FAjxR.js} +1 -1
- package/dashboard/dist/assets/{ResetPasswordPage-CYwt85O3.js → ResetPasswordPage-DPa81jqa.js} +1 -1
- package/dashboard/dist/assets/{SegmentedControl-BJkXXomQ.js → SegmentedControl-DLzS-2eZ.js} +1 -1
- package/dashboard/dist/assets/{Select-B3_WH0Qe.js → Select-C05W6XEM.js} +1 -1
- package/dashboard/dist/assets/{SelectItemText-BUby_DUu.js → SelectItemText-CcfB3blP.js} +1 -1
- package/dashboard/dist/assets/{ServiceStatusPage-BDlVZk4i.js → ServiceStatusPage-ByqLbHv1.js} +1 -1
- package/dashboard/dist/assets/{SessionsPage-TaC9nahK.js → SessionsPage-CEDv1thj.js} +1 -1
- package/dashboard/dist/assets/{SettingsPage-CudcQh6m.js → SettingsPage-DAcndJZQ.js} +2 -2
- package/dashboard/dist/assets/{SkillsPage-iDLQ8lpZ.js → SkillsPage-BuuqQuNU.js} +1 -1
- package/dashboard/dist/assets/{TokenGalaxy-DtYzUsXU.js → TokenGalaxy-DzccxkXW.js} +1 -1
- package/dashboard/dist/assets/{ToolbarRootContext-PC8Tg1Jz.js → ToolbarRootContext-XUDMp5uy.js} +1 -1
- package/dashboard/dist/assets/{TrendMonitor-r8n8YO_9.js → TrendMonitor-B-yYabbz.js} +1 -1
- package/dashboard/dist/assets/{WidgetsPage-vzfGccWb.js → WidgetsPage-CwUDjEFo.js} +1 -1
- package/dashboard/dist/assets/{WrappedPage-DaKuIkYE.js → WrappedPage-Dr9ow3gH.js} +1 -1
- package/dashboard/dist/assets/{__vite-browser-external-Dnxl50k1.js → __vite-browser-external-DPOlUkcY.js} +2 -2
- package/dashboard/dist/assets/{agent-logos-B7nzn3n2.js → agent-logos-Cqc_suYk.js} +1 -1
- package/dashboard/dist/assets/{arrow-up-right-CsxyvCER.js → arrow-up-right-DSsR3Ntr.js} +1 -1
- package/dashboard/dist/assets/{check-hYcC7MdH.js → check-Cy35lAKh.js} +1 -1
- package/dashboard/dist/assets/{composite-C79LNbex.js → composite-BDwOlhhX.js} +1 -1
- package/dashboard/dist/assets/{copy-Cz4qzE62.js → copy-4szu5cYh.js} +1 -1
- package/dashboard/dist/assets/{download-CUaSNE2E.js → download-DdGW6Krz.js} +1 -1
- package/dashboard/dist/assets/{external-link-vq7kIyKK.js → external-link-DwSt83cq.js} +1 -1
- package/dashboard/dist/assets/{flame-CB6K4eR6.js → flame-DubukWqK.js} +1 -1
- package/dashboard/dist/assets/{format-tokens-KI-e_JQ-.js → format-tokens-B70EdQcN.js} +1 -1
- package/dashboard/dist/assets/{icons-3maItkrp.js → icons-B86TLdAj.js} +1 -1
- package/dashboard/dist/assets/{index-BRXoZ7Jj.js → index-B_KMoBeK.js} +1 -1
- package/dashboard/dist/assets/{index-CUbC50Zp.js → index-DI-W-pun.js} +1 -1
- package/dashboard/dist/assets/{index-C5WrfmLB.js → index-DzEMcUwI.js} +1 -1
- package/dashboard/dist/assets/{info-r0yGihUe.js → info-BzFpLbl6.js} +1 -1
- package/dashboard/dist/assets/{limits-providers-BN_94oe9.js → limits-providers-DxZOjiXQ.js} +1 -1
- package/dashboard/dist/assets/{link-2-J9t0VXWM.js → link-2-BQp7-3T7.js} +1 -1
- package/dashboard/dist/assets/{loader-circle-DCvOsPze.js → loader-circle-lrDmbIg5.js} +1 -1
- package/dashboard/dist/assets/{maximize-2-CZ9JhGjf.js → maximize-2-Cnd_Oth8.js} +1 -1
- package/dashboard/dist/assets/{modifiers.esm-DJ0_WKg0.js → modifiers.esm-CPTpZdHU.js} +1 -1
- package/dashboard/dist/assets/{monitor-smartphone-nqbWjJx_.js → monitor-smartphone-C7UY1zRx.js} +1 -1
- package/dashboard/dist/assets/{plus-Cg7wd2jK.js → plus-Bglp9N_7.js} +1 -1
- package/dashboard/dist/assets/{provider-display-B9L1nRY9.js → provider-display-CGsFySs6.js} +1 -1
- package/dashboard/dist/assets/{react-D2AD6Pk2.js → react-DKXriBSF.js} +1 -1
- package/dashboard/dist/assets/{search-uNiWba1h.js → search-D_LLDRdU.js} +1 -1
- package/dashboard/dist/assets/{skills-api-BBYuAhiL.js → skills-api-CJWjKIco.js} +1 -1
- package/dashboard/dist/assets/{sortable.esm-CzPxc949.js → sortable.esm-zlY09tye.js} +1 -1
- package/dashboard/dist/assets/{store-D4A7EUwE.js → store-8e16Ac2h.js} +1 -1
- package/dashboard/dist/assets/{terminal-Crmm_yKF.js → terminal-CR228ekj.js} +1 -1
- package/dashboard/dist/assets/{trash-2-ia9VjRnU.js → trash-2-BjLWewOp.js} +1 -1
- package/dashboard/dist/assets/{use-community-stats-KaGCAxaF.js → use-community-stats-DhOJPaVg.js} +1 -1
- package/dashboard/dist/assets/{use-latest-request-guard-Dy8gSDkk.js → use-latest-request-guard-lcGhb-NC.js} +1 -1
- package/dashboard/dist/assets/{use-limits-display-prefs-JSTYlbTD.js → use-limits-display-prefs-DJIImtLN.js} +1 -1
- package/dashboard/dist/assets/{use-ordered-list-C4JnHdE0.js → use-ordered-list-BJZfZuoJ.js} +1 -1
- package/dashboard/dist/assets/use-reduced-motion-DdpxZQoh.js +1 -0
- package/dashboard/dist/assets/{use-session-efficiency-pref-CgyUz5Gc.js → use-session-efficiency-pref-C-l4b1cD.js} +1 -1
- package/dashboard/dist/assets/{use-transform-C7-jSJ9k.js → use-transform-UjIt477N.js} +1 -1
- package/dashboard/dist/assets/{use-usage-limits-B3YYqn-v.js → use-usage-limits-DqoTZrqT.js} +1 -1
- package/dashboard/dist/assets/{useCurrency-CK_gcb3J.js → useCurrency-CnM8aB4v.js} +1 -1
- package/dashboard/dist/assets/{useTokenFormat-C_a-UkCA.js → useTokenFormat-D4pAK2ld.js} +1 -1
- package/dashboard/dist/assets/{zap-BIJNn-Ic.js → zap-Du1IyEtj.js} +1 -1
- package/dashboard/dist/index.html +1 -1
- package/dashboard/dist/ip-check.html +1 -1
- package/dashboard/dist/leaderboard.html +1 -1
- package/dashboard/dist/share.html +1 -1
- package/package.json +1 -1
- package/src/commands/status.js +51 -8
- package/src/commands/sync.js +75 -0
- package/src/lib/pricing/curated-overrides.json +18 -0
- package/src/lib/pricing/seed-snapshot.json +1 -1
- package/src/lib/rollout.js +383 -0
- package/dashboard/dist/assets/DialogDescription-DDM4aanX.js +0 -1
- package/dashboard/dist/assets/use-reduced-motion-AQE0ummK.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{m as c}from"./__vite-browser-external-
|
|
1
|
+
import{m as c}from"./__vite-browser-external-DPOlUkcY.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-DPOlUkcY.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-DPOlUkcY.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-DPOlUkcY.js";import{F as p,P as g}from"./composite-BDwOlhhX.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-DPOlUkcY.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-DPOlUkcY.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-KaGCAxaF.js → use-community-stats-DhOJPaVg.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-DPOlUkcY.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};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as u}from"./__vite-browser-external-
|
|
1
|
+
import{r as u}from"./__vite-browser-external-DPOlUkcY.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-DPOlUkcY.js";import{L as F}from"./limits-providers-DxZOjiXQ.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-DPOlUkcY.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-DPOlUkcY.js";import{h as r,i as t,p as s}from"./react-DKXriBSF.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-DPOlUkcY.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-DKXriBSF.js";import{r as f}from"./__vite-browser-external-DPOlUkcY.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};
|
|
@@ -1 +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
|
+
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-DPOlUkcY.js";import{l as L}from"./limits-providers-DxZOjiXQ.js";import{u as I}from"./use-latest-request-guard-lcGhb-NC.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-DPOlUkcY.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-DPOlUkcY.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-DPOlUkcY.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};
|
|
@@ -266,7 +266,7 @@
|
|
|
266
266
|
]
|
|
267
267
|
}
|
|
268
268
|
</script>
|
|
269
|
-
<script type="module" crossorigin src="/assets/__vite-browser-external-
|
|
269
|
+
<script type="module" crossorigin src="/assets/__vite-browser-external-DPOlUkcY.js"></script>
|
|
270
270
|
<link rel="stylesheet" crossorigin href="/assets/__vite-browser-external-CCMdjCX2.css">
|
|
271
271
|
</head>
|
|
272
272
|
<body>
|
|
@@ -165,7 +165,7 @@
|
|
|
165
165
|
]
|
|
166
166
|
}
|
|
167
167
|
</script>
|
|
168
|
-
<script type="module" crossorigin src="/assets/__vite-browser-external-
|
|
168
|
+
<script type="module" crossorigin src="/assets/__vite-browser-external-DPOlUkcY.js"></script>
|
|
169
169
|
<link rel="stylesheet" crossorigin href="/assets/__vite-browser-external-CCMdjCX2.css">
|
|
170
170
|
</head>
|
|
171
171
|
<body>
|
|
@@ -136,7 +136,7 @@
|
|
|
136
136
|
]
|
|
137
137
|
}
|
|
138
138
|
</script>
|
|
139
|
-
<script type="module" crossorigin src="/assets/__vite-browser-external-
|
|
139
|
+
<script type="module" crossorigin src="/assets/__vite-browser-external-DPOlUkcY.js"></script>
|
|
140
140
|
<link rel="stylesheet" crossorigin href="/assets/__vite-browser-external-CCMdjCX2.css">
|
|
141
141
|
</head>
|
|
142
142
|
<body>
|
|
@@ -75,7 +75,7 @@
|
|
|
75
75
|
"description": "Shareable Token Tracker dashboard snapshot."
|
|
76
76
|
}
|
|
77
77
|
</script>
|
|
78
|
-
<script type="module" crossorigin src="/assets/__vite-browser-external-
|
|
78
|
+
<script type="module" crossorigin src="/assets/__vite-browser-external-DPOlUkcY.js"></script>
|
|
79
79
|
<link rel="stylesheet" crossorigin href="/assets/__vite-browser-external-CCMdjCX2.css">
|
|
80
80
|
</head>
|
|
81
81
|
<body>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tokentracker-cli",
|
|
3
|
-
"version": "0.95.
|
|
3
|
+
"version": "0.95.2",
|
|
4
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": {
|
package/src/commands/status.js
CHANGED
|
@@ -74,6 +74,9 @@ const {
|
|
|
74
74
|
resolveUnslothDbPath,
|
|
75
75
|
resolveQoderDbPaths,
|
|
76
76
|
resolveQoderCnDbPaths,
|
|
77
|
+
resolveQoderProjectsDir,
|
|
78
|
+
resolveQoderCnProjectsDir,
|
|
79
|
+
listQoderNewSessionFiles,
|
|
77
80
|
resolveClaudeScienceDbPaths,
|
|
78
81
|
resolveAnythingllmDbPath,
|
|
79
82
|
resolveGooseDbPath,
|
|
@@ -130,6 +133,13 @@ function formatResolvedPaths(paths, filename) {
|
|
|
130
133
|
return active;
|
|
131
134
|
}
|
|
132
135
|
|
|
136
|
+
// Combine a legacy DB path with its new-JSONL projects-dir path for the
|
|
137
|
+
// machine-readable summary. Either side may be "" (absent); both absent
|
|
138
|
+
// yields "" so callers can fall back to "not found".
|
|
139
|
+
function summarizeQoderDetail(dbPath, newPath) {
|
|
140
|
+
return [dbPath, newPath].filter(Boolean).join(" + ") || "";
|
|
141
|
+
}
|
|
142
|
+
|
|
133
143
|
// The Trae SOLO entitlement snapshot is read directly from the Trae Local
|
|
134
144
|
// State storage.json via the shared parser (readTraeEntitlementFromStorage).
|
|
135
145
|
// The queue.jsonl contract is token-count-only (CLAUDE.md privacy rule), so
|
|
@@ -491,15 +501,28 @@ async function cmdStatus(argv = []) {
|
|
|
491
501
|
const zcodeInstalled = zcodeActive.length > 0;
|
|
492
502
|
const zcodeDbPath = zcodeActive.join(" | ");
|
|
493
503
|
|
|
494
|
-
// Qoder Desktop 1.18+ — token usage lives in SharedClientCache/local.db
|
|
504
|
+
// Qoder Desktop 1.18+ — token usage lives in SharedClientCache/local.db (legacy)
|
|
505
|
+
// and since 2026-08 (app 0.1.2+) also in ~/.qoder/projects JSONL (credit-based).
|
|
495
506
|
const qoderPaths = resolveQoderDbPaths({
|
|
496
507
|
home,
|
|
497
508
|
env: process.env,
|
|
498
509
|
platform: process.platform,
|
|
499
510
|
});
|
|
500
511
|
const qoderActive = formatResolvedPaths(qoderPaths);
|
|
501
|
-
|
|
512
|
+
// New JSONL location (com.qoder.app.stable + ~/.qoder/projects)
|
|
513
|
+
const qoderProjectsDirResolved = resolveQoderProjectsDir({ home, env: process.env });
|
|
514
|
+
let qoderNewFiles = [];
|
|
515
|
+
try {
|
|
516
|
+
qoderNewFiles = await listQoderNewSessionFiles(qoderProjectsDirResolved);
|
|
517
|
+
} catch (_e) {
|
|
518
|
+
qoderNewFiles = [];
|
|
519
|
+
}
|
|
520
|
+
const qoderNewInstalled = qoderNewFiles.length > 0;
|
|
521
|
+
const qoderInstalled = qoderActive.length > 0 || qoderNewInstalled;
|
|
502
522
|
const qoderDbPath = qoderActive.join(" | ");
|
|
523
|
+
const qoderNewPath = qoderNewFiles.length > 0
|
|
524
|
+
? `${qoderProjectsDirResolved} (${qoderNewFiles.length} sessions)`
|
|
525
|
+
: "";
|
|
503
526
|
|
|
504
527
|
// Qoder CN (国内版) — same schema, separate Application Support/QoderCN dir.
|
|
505
528
|
const qoderCnPaths = resolveQoderCnDbPaths({
|
|
@@ -508,8 +531,28 @@ async function cmdStatus(argv = []) {
|
|
|
508
531
|
platform: process.platform,
|
|
509
532
|
});
|
|
510
533
|
const qoderCnActive = formatResolvedPaths(qoderCnPaths);
|
|
511
|
-
|
|
534
|
+
// CN new-JSONL mirrors sync.js: CN and international currently share
|
|
535
|
+
// ~/.qoder/projects, and sync only parses the CN dir when it diverges from
|
|
536
|
+
// the international one (same files must not count under two sources). Only
|
|
537
|
+
// report CN JSONL when the dirs diverge.
|
|
538
|
+
const qoderCnProjectsDirResolved = resolveQoderCnProjectsDir({ home, env: process.env });
|
|
539
|
+
const qoderCnSharesIntlDir = path.normalize(qoderCnProjectsDirResolved) === path.normalize(qoderProjectsDirResolved)
|
|
540
|
+
|| (process.platform === "win32"
|
|
541
|
+
&& path.normalize(qoderCnProjectsDirResolved).toLowerCase() === path.normalize(qoderProjectsDirResolved).toLowerCase());
|
|
542
|
+
let qoderCnNewFiles = [];
|
|
543
|
+
if (!qoderCnSharesIntlDir) {
|
|
544
|
+
try {
|
|
545
|
+
qoderCnNewFiles = await listQoderNewSessionFiles(qoderCnProjectsDirResolved);
|
|
546
|
+
} catch (_e) {
|
|
547
|
+
qoderCnNewFiles = [];
|
|
548
|
+
}
|
|
549
|
+
}
|
|
550
|
+
const qoderCnNewInstalled = qoderCnNewFiles.length > 0;
|
|
551
|
+
const qoderCnInstalled = qoderCnActive.length > 0 || qoderCnNewInstalled;
|
|
512
552
|
const qoderCnDbPath = qoderCnActive.join(" | ");
|
|
553
|
+
const qoderCnNewPath = qoderCnNewFiles.length > 0
|
|
554
|
+
? `${qoderCnProjectsDirResolved} (${qoderCnNewFiles.length} sessions)`
|
|
555
|
+
: "";
|
|
513
556
|
|
|
514
557
|
// Claude Science — token usage lives on the `frames` table of operon-cli.db.
|
|
515
558
|
// Unlike the native/WSL pair other providers resolve to, this is an open-ended
|
|
@@ -945,10 +988,10 @@ async function cmdStatus(argv = []) {
|
|
|
945
988
|
? { installed: true, detail: zcodeDbPath }
|
|
946
989
|
: { installed: false },
|
|
947
990
|
qoder: qoderInstalled
|
|
948
|
-
? { installed: true, detail: qoderDbPath }
|
|
991
|
+
? { installed: true, detail: summarizeQoderDetail(qoderDbPath, qoderNewPath) }
|
|
949
992
|
: { installed: false },
|
|
950
993
|
"qoder-cn": qoderCnInstalled
|
|
951
|
-
? { installed: true, detail: qoderCnDbPath }
|
|
994
|
+
? { installed: true, detail: summarizeQoderDetail(qoderCnDbPath, qoderCnNewPath) }
|
|
952
995
|
: { installed: false },
|
|
953
996
|
"claude-science": claudeScienceInstalled
|
|
954
997
|
? { installed: true, detail: claudeScienceDbPath }
|
|
@@ -1107,10 +1150,10 @@ async function cmdStatus(argv = []) {
|
|
|
1107
1150
|
? `- ZCode: passive reader (${zcodeDbPath})`
|
|
1108
1151
|
: null,
|
|
1109
1152
|
qoderInstalled
|
|
1110
|
-
? `- Qoder: passive reader (${qoderDbPath})`
|
|
1153
|
+
? `- Qoder: passive reader (${[qoderDbPath, qoderNewPath].filter(Boolean).join(" + ") || "not found"}${qoderNewInstalled && qoderActive.length > 0 ? " [legacy DB + new JSONL (both tracked)]" : ""}${qoderNewInstalled && qoderActive.length === 0 ? " [new JSONL only]" : ""})`
|
|
1111
1154
|
: null,
|
|
1112
1155
|
qoderCnInstalled
|
|
1113
|
-
? `- Qoder CN: passive reader (${qoderCnDbPath})`
|
|
1156
|
+
? `- Qoder CN: passive reader (${summarizeQoderDetail(qoderCnDbPath, qoderCnNewPath) || "not found"}${qoderCnNewInstalled && qoderCnActive.length > 0 ? " [legacy DB + new JSONL (both tracked)]" : ""}${qoderCnNewInstalled && qoderCnActive.length === 0 ? " [new JSONL only]" : ""})`
|
|
1114
1157
|
: null,
|
|
1115
1158
|
claudeScienceInstalled
|
|
1116
1159
|
? `- Claude Science: passive reader (${claudeScienceDbPath})`
|
|
@@ -1462,4 +1505,4 @@ function parseEpochMsToIso(v) {
|
|
|
1462
1505
|
return d.toISOString();
|
|
1463
1506
|
}
|
|
1464
1507
|
|
|
1465
|
-
module.exports = { cmdStatus };
|
|
1508
|
+
module.exports = { cmdStatus, summarizeQoderDetail };
|
package/src/commands/sync.js
CHANGED
|
@@ -34,6 +34,10 @@ const {
|
|
|
34
34
|
resolveQoderDbPaths,
|
|
35
35
|
resolveQoderCnDbPaths,
|
|
36
36
|
readQoderDbMessages,
|
|
37
|
+
resolveQoderProjectsDir,
|
|
38
|
+
resolveQoderCnProjectsDir,
|
|
39
|
+
listQoderNewSessionFiles,
|
|
40
|
+
parseQoderNewIncremental,
|
|
37
41
|
resolveKiroDbPath,
|
|
38
42
|
resolveKiroJsonlPath,
|
|
39
43
|
resolveKiroBasePath,
|
|
@@ -1269,6 +1273,39 @@ async function cmdSync(argv, context = {}) {
|
|
|
1269
1273
|
}
|
|
1270
1274
|
}
|
|
1271
1275
|
|
|
1276
|
+
// Qoder new (JSONL) — com.qoder.app.stable / ~/.qoder/projects (2026-08+)
|
|
1277
|
+
// The new Electron app no longer writes SharedClientCache/local.db; all
|
|
1278
|
+
// recent sessions live in ~/.qoder/projects as flat JSONL with credit-based
|
|
1279
|
+
// usage. Parse them into the same "qoder" source so history is continuous.
|
|
1280
|
+
// The legacy DB block above remains as a fallback for pre-migration rows.
|
|
1281
|
+
if (sourceAllowed("qoder")) {
|
|
1282
|
+
try {
|
|
1283
|
+
const projectsDir = resolveQoderProjectsDir({ home, env: process.env });
|
|
1284
|
+
const sessionFiles = await listQoderNewSessionFiles(projectsDir);
|
|
1285
|
+
if (sessionFiles.length > 0) {
|
|
1286
|
+
if (progress?.enabled) {
|
|
1287
|
+
progress.start(`Parsing Qoder (new) ${renderBar(0)} | buckets 0`);
|
|
1288
|
+
}
|
|
1289
|
+
const parsed = await parseQoderNewIncremental({
|
|
1290
|
+
sessionFiles,
|
|
1291
|
+
cursors,
|
|
1292
|
+
queuePath,
|
|
1293
|
+
projectQueuePath,
|
|
1294
|
+
onProgress: makeProviderProgress("Qoder (new)"),
|
|
1295
|
+
sourceKey: "qoder",
|
|
1296
|
+
cursorKey: "qoderNew",
|
|
1297
|
+
});
|
|
1298
|
+
qoderResult = {
|
|
1299
|
+
recordsProcessed: qoderResult.recordsProcessed + (parsed.messagesProcessed || 0),
|
|
1300
|
+
eventsAggregated: qoderResult.eventsAggregated + (parsed.eventsAggregated || 0),
|
|
1301
|
+
bucketsQueued: qoderResult.bucketsQueued + (parsed.bucketsQueued || 0),
|
|
1302
|
+
};
|
|
1303
|
+
}
|
|
1304
|
+
} catch (err) {
|
|
1305
|
+
warnProviderParseFailure("Qoder (new)", err, opts);
|
|
1306
|
+
}
|
|
1307
|
+
}
|
|
1308
|
+
|
|
1272
1309
|
// ── Qoder CN (国内版) — same SharedClientCache/local.db schema, separate
|
|
1273
1310
|
// Application Support/QoderCN data directory. Tracked as its own source
|
|
1274
1311
|
// with its own cursor namespace: the two DBs each number rowids from 1, so
|
|
@@ -1320,6 +1357,44 @@ async function cmdSync(argv, context = {}) {
|
|
|
1320
1357
|
}
|
|
1321
1358
|
}
|
|
1322
1359
|
|
|
1360
|
+
// Qoder CN new (JSONL) — currently shares ~/.qoder/projects with international;
|
|
1361
|
+
// keep distinct parsing only when CN projects dir diverges (future CN split)
|
|
1362
|
+
// to avoid double-counting the same JSONL under two sources.
|
|
1363
|
+
if (sourceAllowed("qoder-cn")) {
|
|
1364
|
+
try {
|
|
1365
|
+
const cnProjectsDir = resolveQoderCnProjectsDir({ home, env: process.env });
|
|
1366
|
+
const intlProjectsDir = resolveQoderProjectsDir({ home, env: process.env });
|
|
1367
|
+
const projectsDirKey = (p) => {
|
|
1368
|
+
const normalized = path.normalize(p);
|
|
1369
|
+
return process.platform === "win32" ? normalized.toLowerCase() : normalized;
|
|
1370
|
+
};
|
|
1371
|
+
if (projectsDirKey(cnProjectsDir) !== projectsDirKey(intlProjectsDir)) {
|
|
1372
|
+
const sessionFiles = await listQoderNewSessionFiles(cnProjectsDir);
|
|
1373
|
+
if (sessionFiles.length > 0) {
|
|
1374
|
+
if (progress?.enabled) {
|
|
1375
|
+
progress.start(`Parsing Qoder CN (new) ${renderBar(0)} | buckets 0`);
|
|
1376
|
+
}
|
|
1377
|
+
const parsed = await parseQoderNewIncremental({
|
|
1378
|
+
sessionFiles,
|
|
1379
|
+
cursors,
|
|
1380
|
+
queuePath,
|
|
1381
|
+
projectQueuePath,
|
|
1382
|
+
onProgress: makeProviderProgress("Qoder CN (new)"),
|
|
1383
|
+
sourceKey: "qoder-cn",
|
|
1384
|
+
cursorKey: "qoderCnNew",
|
|
1385
|
+
});
|
|
1386
|
+
qoderCnResult = {
|
|
1387
|
+
recordsProcessed: qoderCnResult.recordsProcessed + (parsed.messagesProcessed || 0),
|
|
1388
|
+
eventsAggregated: qoderCnResult.eventsAggregated + (parsed.eventsAggregated || 0),
|
|
1389
|
+
bucketsQueued: qoderCnResult.bucketsQueued + (parsed.bucketsQueued || 0),
|
|
1390
|
+
};
|
|
1391
|
+
}
|
|
1392
|
+
}
|
|
1393
|
+
} catch (err) {
|
|
1394
|
+
warnProviderParseFailure("Qoder CN (new)", err, opts);
|
|
1395
|
+
}
|
|
1396
|
+
}
|
|
1397
|
+
|
|
1323
1398
|
// ── Claude Science (Anthropic's local research workbench, issue #246) ──
|
|
1324
1399
|
// Per-frame token usage lives on the `frames` table of operon-cli.db.
|
|
1325
1400
|
// Passive, incremental, subtract-on-change. There can be more than one DB:
|
|
@@ -254,6 +254,16 @@
|
|
|
254
254
|
"cache_read": 0.3,
|
|
255
255
|
"note": "Bare alias emitted by Kimi Code (modelAlias \"kimi-code/k3\" -> \"k3\"). Same rates as kimi-k3."
|
|
256
256
|
},
|
|
257
|
+
"glm-5.3": {
|
|
258
|
+
"input": 1.4,
|
|
259
|
+
"output": 4.4,
|
|
260
|
+
"cache_read": 0.26
|
|
261
|
+
},
|
|
262
|
+
"glm-5.3-flash": {
|
|
263
|
+
"input": 0.15,
|
|
264
|
+
"output": 0.5,
|
|
265
|
+
"cache_read": 0.03
|
|
266
|
+
},
|
|
257
267
|
"glm-5.2": {
|
|
258
268
|
"input": 1.4,
|
|
259
269
|
"output": 4.4,
|
|
@@ -516,6 +526,14 @@
|
|
|
516
526
|
"match": "glm-4.6",
|
|
517
527
|
"ref": "glm-4.6"
|
|
518
528
|
},
|
|
529
|
+
{
|
|
530
|
+
"match": "glm-5.3-flash",
|
|
531
|
+
"ref": "glm-5.3-flash"
|
|
532
|
+
},
|
|
533
|
+
{
|
|
534
|
+
"match": "glm-5.3",
|
|
535
|
+
"ref": "glm-5.3"
|
|
536
|
+
},
|
|
519
537
|
{
|
|
520
538
|
"match": "glm-5-turbo",
|
|
521
539
|
"ref": "glm-5-turbo"
|