usage-board 2.1.2 → 3.1.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/dist/index.mjs +10 -4
- package/dist/public/_nuxt/BJUAqwzD.js +1 -0
- package/dist/public/_nuxt/BuL2_OVR.js +105 -0
- package/dist/public/_nuxt/Bz0aA7IQ.js +1 -0
- package/dist/public/_nuxt/CEZpUSPI.js +1 -0
- package/dist/public/_nuxt/CF27djws.js +1 -0
- package/dist/public/_nuxt/CbwePq4F.js +119 -0
- package/dist/public/_nuxt/Cd5S9Sm2.js +1 -0
- package/dist/public/_nuxt/{BeEwECnn.js → CoVMsEv_.js} +1 -1
- package/dist/public/_nuxt/D7Qebc1i.js +4 -0
- package/dist/public/_nuxt/DS17D0R7.js +25 -0
- package/dist/public/_nuxt/{chy2QJx0.js → Dr4nyTE3.js} +31 -31
- package/dist/public/_nuxt/Dzuxw4nD.js +21 -0
- package/dist/public/_nuxt/LYzk-FvL.js +1 -0
- package/dist/public/_nuxt/WjVGlVHF.js +6 -0
- package/dist/public/_nuxt/builds/latest.json +1 -1
- package/dist/public/_nuxt/builds/meta/5b933d30-47b4-45ca-8d5a-cba3255174fa.json +1 -0
- package/dist/public/_nuxt/entry.vHfFzkyD.css +1 -0
- package/dist/server/chunks/_/error-500.mjs +8 -4
- package/dist/server/chunks/_/shared.cjs.prod.mjs +1 -1
- package/dist/server/chunks/build/client.precomputed.mjs +1 -1
- package/dist/server/chunks/nitro/nitro.mjs +8665 -2839
- package/dist/server/chunks/routes/api/analysis/agent/session.json.mjs +22 -0
- package/dist/server/chunks/routes/api/analysis/agent/token.json.mjs +25 -0
- package/dist/server/chunks/routes/api/analysis/cache.json.mjs +25 -0
- package/dist/server/chunks/routes/api/analysis/hot-project.json.mjs +25 -0
- package/dist/server/chunks/routes/api/analysis/model.json.mjs +25 -0
- package/dist/server/chunks/routes/api/analysis/overview-cards.json.mjs +25 -0
- package/dist/server/chunks/routes/api/analysis/session.json.mjs +22 -0
- package/dist/server/chunks/routes/api/analysis/token/daily.json.mjs +22 -0
- package/dist/server/chunks/routes/api/analysis/token.json.mjs +25 -0
- package/dist/server/chunks/routes/api/payload.json.mjs +11 -626
- package/dist/server/chunks/routes/api/projects/_project/modules.get.mjs +36 -0
- package/dist/server/chunks/routes/api/projects/catalog.get.mjs +26 -0
- package/dist/server/chunks/routes/renderer.mjs +9 -5
- package/dist/server/chunks/routes/ws.mjs +29 -971
- package/dist/server/index.mjs +9 -5
- package/package.json +7 -6
- package/dist/public/_nuxt/15CW3D68.js +0 -1
- package/dist/public/_nuxt/B6G-s9D-.js +0 -1
- package/dist/public/_nuxt/BeygfM9p.js +0 -105
- package/dist/public/_nuxt/Bu4SpN_a.js +0 -1
- package/dist/public/_nuxt/C6ydMk2z.js +0 -25
- package/dist/public/_nuxt/Dn8cXZx3.js +0 -9
- package/dist/public/_nuxt/DysUC14A.js +0 -119
- package/dist/public/_nuxt/KLhV325n.js +0 -1
- package/dist/public/_nuxt/builds/meta/ac4b25d6-d6eb-44bb-8c5b-b1d6f651c196.json +0 -1
- package/dist/public/_nuxt/entry.r-q4oQC0.css +0 -1
- package/dist/public/_nuxt/pmnAmEjb.js +0 -21
- package/dist/server/chunks/_/index.min.mjs +0 -348
package/dist/server/index.mjs
CHANGED
|
@@ -1,14 +1,18 @@
|
|
|
1
|
-
import process from 'node:process';globalThis._importMeta_={url:import.meta.url,env:process.env};export {
|
|
2
|
-
import 'node:os';
|
|
3
|
-
import 'node:path';
|
|
4
|
-
import 'node:fs';
|
|
5
|
-
import 'node:fs/promises';
|
|
1
|
+
import process from 'node:process';globalThis._importMeta_={url:import.meta.url,env:process.env};export { z as handler, B as listener, C as websocket } from './chunks/nitro/nitro.mjs';
|
|
6
2
|
import 'node:http';
|
|
7
3
|
import 'node:https';
|
|
8
4
|
import 'node:events';
|
|
9
5
|
import 'node:buffer';
|
|
6
|
+
import 'node:fs';
|
|
7
|
+
import 'node:path';
|
|
10
8
|
import 'node:crypto';
|
|
9
|
+
import 'node:sqlite';
|
|
11
10
|
import 'node:url';
|
|
11
|
+
import 'fs';
|
|
12
|
+
import 'node:fs/promises';
|
|
13
|
+
import 'node:stream';
|
|
14
|
+
import 'node:string_decoder';
|
|
15
|
+
import 'node:os';
|
|
12
16
|
import 'node:util';
|
|
13
17
|
import 'node:process';
|
|
14
18
|
import 'node:tty';
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "usage-board",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "
|
|
4
|
+
"version": "3.1.0",
|
|
5
5
|
"packageManager": "pnpm@10.33.0",
|
|
6
6
|
"description": "An all-in-one dashboard to quickly analyze token usage from local json files",
|
|
7
7
|
"license": "MIT",
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"dist"
|
|
28
28
|
],
|
|
29
29
|
"scripts": {
|
|
30
|
-
"build": "nuxt build && tsdown &&
|
|
30
|
+
"build": "nuxt build && tsdown && rimraf ./dist/nitro.json",
|
|
31
31
|
"dev": "nuxt dev",
|
|
32
32
|
"generate": "nuxt generate",
|
|
33
33
|
"preview": "nuxt preview",
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
"lint:fix": "eslint --fix",
|
|
37
37
|
"dev:cli": "tsdown -w",
|
|
38
38
|
"test": "vitest",
|
|
39
|
-
"prepare": "simple-git-hooks",
|
|
39
|
+
"prepare": "nuxt prepare && simple-git-hooks",
|
|
40
40
|
"prepublishOnly": "pnpm build"
|
|
41
41
|
},
|
|
42
42
|
"publishConfig": {
|
|
@@ -75,13 +75,14 @@
|
|
|
75
75
|
"embla-carousel-vue": "^8.6.0",
|
|
76
76
|
"eslint": "^10.2.0",
|
|
77
77
|
"get-port-please": "^3.2.0",
|
|
78
|
-
"lint-staged": "^16.4.0",
|
|
79
78
|
"lucide-vue-next": "^0.545.0",
|
|
79
|
+
"nano-staged": "^1.0.2",
|
|
80
80
|
"nuxt": "^4.4.2",
|
|
81
81
|
"open": "^11.0.0",
|
|
82
82
|
"path-type": "^6.0.0",
|
|
83
83
|
"picocolors": "^1.1.1",
|
|
84
84
|
"reka-ui": "^2.9.5",
|
|
85
|
+
"rimraf": "^6.1.3",
|
|
85
86
|
"shadcn-nuxt": "^2.6.2",
|
|
86
87
|
"simple-git-hooks": "^2.13.1",
|
|
87
88
|
"tailwind-merge": "^3.5.0",
|
|
@@ -101,10 +102,10 @@
|
|
|
101
102
|
"zod": "3.25.76"
|
|
102
103
|
},
|
|
103
104
|
"simple-git-hooks": {
|
|
104
|
-
"pre-commit": "npx
|
|
105
|
+
"pre-commit": "npx nano-staged",
|
|
105
106
|
"commit-msg": "node scripts/verify-commit.js"
|
|
106
107
|
},
|
|
107
|
-
"
|
|
108
|
+
"nano-staged": {
|
|
108
109
|
"*": "eslint --fix"
|
|
109
110
|
}
|
|
110
111
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{z as f,o as s,B as _,w as m,C as k,L as z,D as u,P as j,h,T as O,U as F,aD as P,aE as q,b as l,e as S,a8 as w,c as g,t as $,aC as B,a0 as M,a as c,X as V,Z as C,aa as A,aF as G,aG as R,J as N,K as D,Y as E,aH as H,aI as K,d as y,_ as U}from"./Dn8cXZx3.js";import{a as J,_ as X}from"./BeygfM9p.js";var Y=f({__name:"BaseSeparator",props:{orientation:{type:String,required:!1,default:"horizontal"},decorative:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(r){const t=r,o=["horizontal","vertical"];function e(i){return o.includes(i)}const a=h(()=>e(t.orientation)?t.orientation:"horizontal"),n=h(()=>a.value==="vertical"?t.orientation:void 0),p=h(()=>t.decorative?{role:"none"}:{"aria-orientation":n.value,role:"separator"});return(i,x)=>(s(),_(u(j),z({as:i.as,"as-child":i.asChild,"data-orientation":a.value},p.value),{default:m(()=>[k(i.$slots,"default")]),_:3},16,["as","as-child","data-orientation"]))}}),Z=Y,Q=f({__name:"Separator",props:{orientation:{type:String,required:!1,default:"horizontal"},decorative:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(r){const t=r;return(o,e)=>(s(),_(Z,O(F(t)),{default:m(()=>[k(o.$slots,"default")]),_:3},16))}}),W=Q;const ee={key:1,class:"text-muted-foreground w-8 text-xs tabular-nums"},te=f({__name:"GitHubLink",setup(r){const t=P(),{data:o,pending:e}=q(`https://ungh.cc/repos/${t.github.repo}`,"$5jzG0y0vUx"),a=h(()=>{const n=o.value?.repo?.stars;return n?n>=1e3?`${(n/1e3).toFixed(1)}k`:n.toLocaleString():"∞"});return(n,p)=>{const i=w,x=J,v=S,b=B;return s(),_(b,{"as-child":"",class:"h-8 shadow-none",size:"sm",variant:"ghost"},{default:m(()=>[l(v,{to:u(t).github.link,rel:"noreferrer",target:"_blank"},{default:m(()=>[l(i,{name:"mdi:github"}),u(e)?(s(),_(x,{key:0,class:"h-4 w-8"})):(s(),g("span",ee,$(u(a)),1))]),_:1},8,["to"])]),_:1})}}}),oe=Object.assign(te,{__name:"GitHubLink"}),ne=f({__name:"ModeSwitcher",setup(r){const t=M({selector:"html",attribute:"class",storageKey:"app-color-mode",onChanged(o,e){const a=document,n=window.matchMedia("(prefers-reduced-motion: reduce)").matches;if(!a.startViewTransition||n){e(o);return}a.startViewTransition(()=>{e(o)})}});return(o,e)=>{const a=w,n=B;return s(),_(n,{variant:"ghost",size:"icon",class:"group/toggle extend-touch-target size-8",title:"Toggle theme",onClick:e[0]||(e[0]=p=>t.value=u(t)==="light"?"dark":"light")},{default:m(()=>[u(t)==="dark"?(s(),_(a,{key:0,name:"lucide:moon",mode:"svg"})):(s(),_(a,{key:1,name:"lucide:sun",mode:"svg"})),e[1]||(e[1]=c("span",{class:"sr-only"},"Toggle theme",-1))]),_:1})}}}),ae=Object.assign(ne,{__name:"ModeSwitcher"}),se=f({__name:"Separator",props:{orientation:{default:"horizontal"},decorative:{type:Boolean,default:!0},asChild:{type:Boolean},as:{},class:{type:[Boolean,null,String,Object,Array]}},setup(r){const t=r,o=V(t,"class");return(e,a)=>(s(),_(u(W),z({"data-slot":"separator"},u(o),{class:u(C)("bg-border shrink-0 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px",t.class)}),null,16,["class"]))}}),re={class:"flex flex-col border-b z-10 mb-5"},ie={class:"container mx-auto flex items-center justify-between gap-3"},ce={class:"flex flex-col h-14"},le={class:"flex items-center gap-4 h-full"},_e={class:"flex items-center"},ue={class:"container mx-auto flex items-center justify-between pt-3 pb-1"},pe={class:"capitalize text-xs font-medium font-mono"},de=f({name:"SiteNavbar",__name:"SiteNavbar",setup(r){const t=[{icon:"solar:home-bold-duotone",iconType:"icon",label:"home",link:"/"},...H,{icon:"ri:apps-ai-line",iconType:"icon",label:"Project",link:"/project"}],o=A(),e=h(()=>o.path);function a(n){const p=e.value===n.link,i=n.iconFillClass??(n.iconType==="ai"?"[&_svg]:fill-foreground/50":"");return C("relative flex flex-col items-center gap-1.5",p?["after:content-[''] after:absolute after:w-full after:h-px after:bg-amber-500","after:-bottom-1 after:rounded-2xl"]:["text-foreground/50",i])}return(n,p)=>{const i=R,x=oe,v=ae,b=se,T=w,I=X,L=S;return s(),g("header",re,[c("div",ie,[c("div",ce,[c("div",le,[p[0]||(p[0]=c("img",{alt:"",class:"size-8",src:G},null,-1)),l(i,{class:"w-48 fill-foreground"})])]),c("div",_e,[l(x),l(v)])]),l(b),c("div",ue,[(s(),g(N,null,D(t,d=>l(L,{key:d.label,class:E(a(d)),to:d.link},{default:m(()=>[d.iconType==="icon"?(s(),_(T,{key:0,name:d.icon,class:"size-5",mode:"svg"},null,8,["name"])):(s(),_(I,{key:1,name:d.icon},null,8,["name"])),c("span",pe,$(d.label),1)]),_:2},1032,["class","to"])),64))])])}}}),me=Object.assign(de,{__name:"SiteNavbar"}),fe={class:"mt-8 border-t"},he={class:"container mx-auto flex flex-col items-center justify-between gap-2 py-4 text-center text-xs text-muted-foreground sm:flex-row sm:text-left"},ge=f({name:"SiteFooter",__name:"SiteFooter",setup(r){const{public:{appVersion:t}}=K();return(o,e)=>{const a=S;return s(),g("footer",fe,[c("div",he,[c("p",null,[e[1]||(e[1]=y(" Copyright © 2026 ",-1)),l(a,{class:"font-medium text-foreground underline-offset-4 transition-colors hover:text-amber-600 hover:underline",rel:"noreferrer",target:"_blank",to:"https://github.com/lonewolfyx"},{default:m(()=>[...e[0]||(e[0]=[y(" lonewolfyx ",-1)])]),_:1}),e[2]||(e[2]=y(". ",-1))]),c("p",null," Built with Nuxt, extended from ccusage, and released under the MIT License. Version "+$(u(t))+". ",1)])])}}}),xe=Object.assign(ge,{__name:"SiteFooter"}),ve={};function be(r,t){const o=me,e=xe;return s(),g(N,null,[l(o),k(r.$slots,"default"),l(e)],64)}const Se=U(ve,[["render",be]]);export{Se as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{_ as s,u as a,o as i,c as u,a as t,t as n,b as c,w as l,d,e as f}from"./Dn8cXZx3.js";const p={class:"antialiased bg-white dark:bg-[#020420] dark:text-white font-sans grid min-h-screen overflow-hidden place-content-center text-[#020420] tracking-wide"},m={class:"max-w-520px text-center"},h=["textContent"],b=["textContent"],x=["textContent"],g={class:"flex items-center justify-center w-full"},y={__name:"error-404",props:{appName:{type:String,default:"Nuxt"},status:{type:Number,default:404},statusText:{type:String,default:"Page not found"},description:{type:String,default:"Sorry, the page you are looking for could not be found."},backHome:{type:String,default:"Go back home"}},setup(e){const r=e;return a({title:`${r.status} - ${r.statusText} | ${r.appName}`,script:[{innerHTML:`!function(){const e=document.createElement("link").relList;if(!(e&&e.supports&&e.supports("modulepreload"))){for(const e of document.querySelectorAll('link[rel="modulepreload"]'))r(e);new MutationObserver(e=>{for(const o of e)if("childList"===o.type)for(const e of o.addedNodes)"LINK"===e.tagName&&"modulepreload"===e.rel&&r(e)}).observe(document,{childList:!0,subtree:!0})}function r(e){if(e.ep)return;e.ep=!0;const r=function(e){const r={};return e.integrity&&(r.integrity=e.integrity),e.referrerPolicy&&(r.referrerPolicy=e.referrerPolicy),"use-credentials"===e.crossOrigin?r.credentials="include":"anonymous"===e.crossOrigin?r.credentials="omit":r.credentials="same-origin",r}(e);fetch(e.href,r)}}();`}],style:[{innerHTML:'*,:after,:before{border-color:var(--un-default-border-color,#e5e7eb);border-style:solid;border-width:0;box-sizing:border-box}:after,:before{--un-content:""}html{line-height:1.5;-webkit-text-size-adjust:100%;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-feature-settings:normal;font-variation-settings:normal;-moz-tab-size:4;tab-size:4;-webkit-tap-highlight-color:transparent}body{line-height:inherit;margin:0}h1,h2{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}h1,h2,p{margin:0}*,:after,:before{--un-rotate:0;--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-scale-x:1;--un-scale-y:1;--un-scale-z:1;--un-skew-x:0;--un-skew-y:0;--un-translate-x:0;--un-translate-y:0;--un-translate-z:0;--un-pan-x: ;--un-pan-y: ;--un-pinch-zoom: ;--un-scroll-snap-strictness:proximity;--un-ordinal: ;--un-slashed-zero: ;--un-numeric-figure: ;--un-numeric-spacing: ;--un-numeric-fraction: ;--un-border-spacing-x:0;--un-border-spacing-y:0;--un-ring-offset-shadow:0 0 transparent;--un-ring-shadow:0 0 transparent;--un-shadow-inset: ;--un-shadow:0 0 transparent;--un-ring-inset: ;--un-ring-offset-width:0px;--un-ring-offset-color:#fff;--un-ring-width:0px;--un-ring-color:rgba(147,197,253,.5);--un-blur: ;--un-brightness: ;--un-contrast: ;--un-drop-shadow: ;--un-grayscale: ;--un-hue-rotate: ;--un-invert: ;--un-saturate: ;--un-sepia: ;--un-backdrop-blur: ;--un-backdrop-brightness: ;--un-backdrop-contrast: ;--un-backdrop-grayscale: ;--un-backdrop-hue-rotate: ;--un-backdrop-invert: ;--un-backdrop-opacity: ;--un-backdrop-saturate: ;--un-backdrop-sepia: }'}]}),(k,w)=>{const o=f;return i(),u("div",p,[t("div",m,[t("h1",{class:"font-semibold leading-none mb-4 sm:text-[110px] tabular-nums text-[80px]",textContent:n(e.status)},null,8,h),t("h2",{class:"font-semibold mb-2 sm:text-3xl text-2xl",textContent:n(e.statusText)},null,8,b),t("p",{class:"mb-4 px-2 text-[#64748B] text-md",textContent:n(e.description)},null,8,x),t("div",g,[c(o,{to:"/",class:"font-medium hover:text-[#00DC82] text-sm underline underline-offset-3"},{default:l(()=>[d(n(e.backHome),1)]),_:1})])])])}}},v=s(y,[["__scopeId","data-v-0abdad73"]]);export{v as default};
|
|
@@ -1,105 +0,0 @@
|
|
|
1
|
-
import{z as t,$ as i,h as n,o as r,c as o,Y as a,D as s,Z as f}from"./Dn8cXZx3.js";const c={claude_code:'<svg fill="#D97757" role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><title>Claude</title><path d="m4.7144 15.9555 4.7174-2.6471.079-.2307-.079-.1275h-.2307l-.7893-.0486-2.6956-.0729-2.3375-.0971-2.2646-.1214-.5707-.1215-.5343-.7042.0546-.3522.4797-.3218.686.0608 1.5179.1032 2.2767.1578 1.6514.0972 2.4468.255h.3886l.0546-.1579-.1336-.0971-.1032-.0972L6.973 9.8356l-2.55-1.6879-1.3356-.9714-.7225-.4918-.3643-.4614-.1578-1.0078.6557-.7225.8803.0607.2246.0607.8925.686 1.9064 1.4754 2.4893 1.8336.3643.3035.1457-.1032.0182-.0728-.164-.2733-1.3539-2.4467-1.445-2.4893-.6435-1.032-.17-.6194c-.0607-.255-.1032-.4674-.1032-.7285L6.287.1335 6.6997 0l.9957.1336.419.3642.6192 1.4147 1.0018 2.2282 1.5543 3.0296.4553.8985.2429.8318.091.255h.1579v-.1457l.1275-1.706.2368-2.0947.2307-2.6957.0789-.7589.3764-.9107.7468-.4918.5828.2793.4797.686-.0668.4433-.2853 1.8517-.5586 2.9021-.3643 1.9429h.2125l.2429-.2429.9835-1.3053 1.6514-2.0643.7286-.8196.85-.9046.5464-.4311h1.0321l.759 1.1293-.34 1.1657-1.0625 1.3478-.8804 1.1414-1.2628 1.7-.7893 1.36.0729.1093.1882-.0183 2.8535-.607 1.5421-.2794 1.8396-.3157.8318.3886.091.3946-.3278.8075-1.967.4857-2.3072.4614-3.4364.8136-.0425.0304.0486.0607 1.5482.1457.6618.0364h1.621l3.0175.2247.7892.522.4736.6376-.079.4857-1.2142.6193-1.6393-.3886-3.825-.9107-1.3113-.3279h-.1822v.1093l1.0929 1.0686 2.0035 1.8092 2.5075 2.3314.1275.5768-.3218.4554-.34-.0486-2.2039-1.6575-.85-.7468-1.9246-1.621h-.1275v.17l.4432.6496 2.3436 3.5214.1214 1.0807-.17.3521-.6071.2125-.6679-.1214-1.3721-1.9246L14.38 17.959l-1.1414-1.9428-.1397.079-.674 7.2552-.3156.3703-.7286.2793-.6071-.4614-.3218-.7468.3218-1.4753.3886-1.9246.3157-1.53.2853-1.9004.17-.6314-.0121-.0425-.1397.0182-1.4328 1.9672-2.1796 2.9446-1.7243 1.8456-.4128.164-.7164-.3704.0667-.6618.4008-.5889 2.386-3.0357 1.4389-1.882.929-1.0868-.0062-.1579h-.0546l-6.3385 4.1164-1.1293.1457-.4857-.4554.0608-.7467.2307-.2429 1.9064-1.3114Z"/></svg>',codex:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" fill-rule="evenodd">
|
|
2
|
-
<title>Codex (OpenAI)</title>
|
|
3
|
-
<path clip-rule="evenodd"
|
|
4
|
-
d="M8.086.457a6.105 6.105 0 013.046-.415c1.333.153 2.521.72 3.564 1.7a.117.117 0 00.107.029c1.408-.346 2.762-.224 4.061.366l.063.03.154.076c1.357.703 2.33 1.77 2.918 3.198.278.679.418 1.388.421 2.126a5.655 5.655 0 01-.18 1.631.167.167 0 00.04.155 5.982 5.982 0 011.578 2.891c.385 1.901-.01 3.615-1.183 5.14l-.182.22a6.063 6.063 0 01-2.934 1.851.162.162 0 00-.108.102c-.255.736-.511 1.364-.987 1.992-1.199 1.582-2.962 2.462-4.948 2.451-1.583-.008-2.986-.587-4.21-1.736a.145.145 0 00-.14-.032c-.518.167-1.04.191-1.604.185a5.924 5.924 0 01-2.595-.622 6.058 6.058 0 01-2.146-1.781c-.203-.269-.404-.522-.551-.821a7.74 7.74 0 01-.495-1.283 6.11 6.11 0 01-.017-3.064.166.166 0 00.008-.074.115.115 0 00-.037-.064 5.958 5.958 0 01-1.38-2.202 5.196 5.196 0 01-.333-1.589 6.915 6.915 0 01.188-2.132c.45-1.484 1.309-2.648 2.577-3.493.282-.188.55-.334.802-.438.286-.12.573-.22.861-.304a.129.129 0 00.087-.087A6.016 6.016 0 015.635 2.31C6.315 1.464 7.132.846 8.086.457zm-.804 7.85a.848.848 0 00-1.473.842l1.694 2.965-1.688 2.848a.849.849 0 001.46.864l1.94-3.272a.849.849 0 00.007-.854l-1.94-3.393zm5.446 6.24a.849.849 0 000 1.695h4.848a.849.849 0 000-1.696h-4.848z" />
|
|
5
|
-
</svg>`,cursor:'<svg role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><title>Cursor</title><path d="M11.503.131 1.891 5.678a.84.84 0 0 0-.42.726v11.188c0 .3.162.575.42.724l9.609 5.55a1 1 0 0 0 .998 0l9.61-5.55a.84.84 0 0 0 .42-.724V6.404a.84.84 0 0 0-.42-.726L12.497.131a1.01 1.01 0 0 0-.996 0M2.657 6.338h18.55c.263 0 .43.287.297.515L12.23 22.918c-.062.107-.229.064-.229-.06V12.335a.59.59 0 0 0-.295-.51l-9.11-5.257c-.109-.063-.064-.23.061-.23"/></svg>',antigravity:`<svg width="16" height="15" viewBox="0 0 16 15" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
6
|
-
<mask id="mask0_111_52" style="mask-type:alpha" maskUnits="userSpaceOnUse" x="0" y="0" width="16" height="15">
|
|
7
|
-
<path d="M14.0777 13.984C14.945 14.6345 16.2458 14.2008 15.0533 13.0084C11.476 9.53949 12.2349 0 7.79033 0C3.34579 0 4.10461 9.53949 0.527295 13.0084C-0.773543 14.3092 0.635692 14.6345 1.50293 13.984C4.86344 11.7076 4.64663 7.69664 7.79033 7.69664C10.934 7.69664 10.7172 11.7076 14.0777 13.984Z" fill="black"/>
|
|
8
|
-
</mask>
|
|
9
|
-
<g mask="url(#mask0_111_52)">
|
|
10
|
-
<g filter="url(#filter0_f_111_52)">
|
|
11
|
-
<path d="M-0.658907 -3.2306C-0.922679 -0.906781 1.07986 1.22861 3.81388 1.53894C6.54791 1.84927 8.97811 0.217009 9.24188 -2.10681C9.50565 -4.43063 7.50312 -6.56602 4.76909 -6.87635C2.03506 -7.18667 -0.395135 -5.55442 -0.658907 -3.2306Z" fill="#FFE432"/>
|
|
12
|
-
</g>
|
|
13
|
-
<g filter="url(#filter1_f_111_52)">
|
|
14
|
-
<path d="M9.88233 4.36642C10.5673 7.31568 13.566 9.13902 16.5801 8.43896C19.5942 7.73891 21.4823 4.78056 20.7973 1.83131C20.1123 -1.11795 17.1136 -2.94128 14.0995 -2.24123C11.0854 -1.54118 9.19733 1.41717 9.88233 4.36642Z" fill="#FC413D"/>
|
|
15
|
-
</g>
|
|
16
|
-
<g filter="url(#filter2_f_111_52)">
|
|
17
|
-
<path d="M-8.05291 6.34512C-7.18736 9.38883 -3.28925 10.9473 0.653774 9.82598C4.5968 8.7047 7.09158 5.32829 6.22603 2.28458C5.36048 -0.759142 1.46236 -2.31758 -2.48066 -1.19629C-6.42368 -0.0750048 -8.91846 3.3014 -8.05291 6.34512Z" fill="#00B95C"/>
|
|
18
|
-
</g>
|
|
19
|
-
<g filter="url(#filter3_f_111_52)">
|
|
20
|
-
<path d="M-8.05291 6.34512C-7.18736 9.38883 -3.28925 10.9473 0.653774 9.82598C4.5968 8.7047 7.09158 5.32829 6.22603 2.28458C5.36048 -0.759142 1.46236 -2.31758 -2.48066 -1.19629C-6.42368 -0.0750048 -8.91846 3.3014 -8.05291 6.34512Z" fill="#00B95C"/>
|
|
21
|
-
</g>
|
|
22
|
-
<g filter="url(#filter4_f_111_52)">
|
|
23
|
-
<path d="M-4.92402 8.86746C-2.75421 11.0837 0.982691 10.9438 3.42257 8.55507C5.86246 6.1663 6.08139 2.43321 3.91158 0.216963C1.74177 -1.99928 -1.99513 -1.85942 -4.43501 0.529349C-6.87489 2.91812 -7.09383 6.65122 -4.92402 8.86746Z" fill="#00B95C"/>
|
|
24
|
-
</g>
|
|
25
|
-
<g filter="url(#filter5_f_111_52)">
|
|
26
|
-
<path d="M6.42819 17.2263C7.10197 20.1273 9.91278 21.953 12.7063 21.3042C15.4998 20.6553 17.2182 17.7777 16.5444 14.8767C15.8707 11.9757 13.0599 10.15 10.2663 10.7988C7.47281 11.4477 5.75441 14.3253 6.42819 17.2263Z" fill="#3186FF"/>
|
|
27
|
-
</g>
|
|
28
|
-
<g filter="url(#filter6_f_111_52)">
|
|
29
|
-
<path d="M1.66508 -5.94539C0.254213 -2.80254 1.7978 0.951609 5.11277 2.43973C8.42774 3.92785 12.2588 2.58642 13.6696 -0.556431C15.0805 -3.69928 13.5369 -7.45343 10.222 -8.94155C6.90699 -10.4297 3.07594 -9.08824 1.66508 -5.94539Z" fill="#FBBC04"/>
|
|
30
|
-
</g>
|
|
31
|
-
<g filter="url(#filter7_f_111_52)">
|
|
32
|
-
<path d="M-2.11428 24.3903C-5.52984 23.0496 0.307266 12.0177 1.75874 8.32038C3.21024 4.62304 7.15576 2.71272 10.5713 4.05357C13.9869 5.39442 18.0354 12.7796 16.5838 16.477C15.1323 20.1743 1.30129 25.7311 -2.11428 24.3903Z" fill="#3186FF"/>
|
|
33
|
-
</g>
|
|
34
|
-
<g filter="url(#filter8_f_111_52)">
|
|
35
|
-
<path d="M18.5814 10.6598C17.6669 11.727 15.2806 11.1828 13.2514 9.44417C11.2222 7.70556 10.3185 5.43097 11.2329 4.3637C12.1473 3.29646 14.5336 3.84069 16.5628 5.57928C18.592 7.31789 19.4958 9.59249 18.5814 10.6598Z" fill="#749BFF"/>
|
|
36
|
-
</g>
|
|
37
|
-
<g filter="url(#filter9_f_111_52)">
|
|
38
|
-
<path d="M11.7552 5.22715C15.5162 7.77124 19.8471 7.93838 21.4286 5.60045C23.0101 3.26253 21.2433 -0.695128 17.4823 -3.23922C13.7213 -5.78331 9.39044 -5.95044 7.80896 -3.61252C6.22747 -1.27459 7.99428 2.68306 11.7552 5.22715Z" fill="#FC413D"/>
|
|
39
|
-
</g>
|
|
40
|
-
<g filter="url(#filter10_f_111_52)">
|
|
41
|
-
<path d="M-0.592149 1.08896C-1.5239 3.33663 -1.21959 5.59799 0.0875457 6.13985C1.39468 6.68171 3.20966 5.29888 4.14141 3.05121C5.07316 0.803541 4.76885 -1.45782 3.46171 -1.99968C2.15458 -2.54154 0.339602 -1.15871 -0.592149 1.08896Z" fill="#FFEE48"/>
|
|
42
|
-
</g>
|
|
43
|
-
</g>
|
|
44
|
-
<defs>
|
|
45
|
-
<filter id="filter0_f_111_52" x="-2.12817" y="-8.35998" width="12.8393" height="11.383" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
|
|
46
|
-
<feFlood flood-opacity="0" result="BackgroundImageFix"/>
|
|
47
|
-
<feBlend mode="normal" in="SourceGraphic" in2="BackgroundImageFix" result="shape"/>
|
|
48
|
-
<feGaussianBlur stdDeviation="0.722959" result="effect1_foregroundBlur_111_52"/>
|
|
49
|
-
</filter>
|
|
50
|
-
<filter id="filter1_f_111_52" x="2.75168" y="-9.38089" width="25.1763" height="24.96" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
|
|
51
|
-
<feFlood flood-opacity="0" result="BackgroundImageFix"/>
|
|
52
|
-
<feBlend mode="normal" in="SourceGraphic" in2="BackgroundImageFix" result="shape"/>
|
|
53
|
-
<feGaussianBlur stdDeviation="3.49513" result="effect1_foregroundBlur_111_52"/>
|
|
54
|
-
</filter>
|
|
55
|
-
<filter id="filter2_f_111_52" x="-14.1669" y="-7.50196" width="26.5068" height="23.6338" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
|
|
56
|
-
<feFlood flood-opacity="0" result="BackgroundImageFix"/>
|
|
57
|
-
<feBlend mode="normal" in="SourceGraphic" in2="BackgroundImageFix" result="shape"/>
|
|
58
|
-
<feGaussianBlur stdDeviation="2.97119" result="effect1_foregroundBlur_111_52"/>
|
|
59
|
-
</filter>
|
|
60
|
-
<filter id="filter3_f_111_52" x="-14.1669" y="-7.50196" width="26.5068" height="23.6338" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
|
|
61
|
-
<feFlood flood-opacity="0" result="BackgroundImageFix"/>
|
|
62
|
-
<feBlend mode="normal" in="SourceGraphic" in2="BackgroundImageFix" result="shape"/>
|
|
63
|
-
<feGaussianBlur stdDeviation="2.97119" result="effect1_foregroundBlur_111_52"/>
|
|
64
|
-
</filter>
|
|
65
|
-
<filter id="filter4_f_111_52" x="-12.3607" y="-7.29981" width="23.709" height="23.6846" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
|
|
66
|
-
<feFlood flood-opacity="0" result="BackgroundImageFix"/>
|
|
67
|
-
<feBlend mode="normal" in="SourceGraphic" in2="BackgroundImageFix" result="shape"/>
|
|
68
|
-
<feGaussianBlur stdDeviation="2.97119" result="effect1_foregroundBlur_111_52"/>
|
|
69
|
-
</filter>
|
|
70
|
-
<filter id="filter5_f_111_52" x="0.634962" y="5.02095" width="21.7027" height="22.0616" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
|
|
71
|
-
<feFlood flood-opacity="0" result="BackgroundImageFix"/>
|
|
72
|
-
<feBlend mode="normal" in="SourceGraphic" in2="BackgroundImageFix" result="shape"/>
|
|
73
|
-
<feGaussianBlur stdDeviation="2.82351" result="effect1_foregroundBlur_111_52"/>
|
|
74
|
-
</filter>
|
|
75
|
-
<filter id="filter6_f_111_52" x="-3.97547" y="-14.6666" width="23.2857" height="22.8313" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
|
|
76
|
-
<feFlood flood-opacity="0" result="BackgroundImageFix"/>
|
|
77
|
-
<feBlend mode="normal" in="SourceGraphic" in2="BackgroundImageFix" result="shape"/>
|
|
78
|
-
<feGaussianBlur stdDeviation="2.5589" result="effect1_foregroundBlur_111_52"/>
|
|
79
|
-
</filter>
|
|
80
|
-
<filter id="filter7_f_111_52" x="-7.7407" y="-0.945408" width="29.1982" height="30.1105" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
|
|
81
|
-
<feFlood flood-opacity="0" result="BackgroundImageFix"/>
|
|
82
|
-
<feBlend mode="normal" in="SourceGraphic" in2="BackgroundImageFix" result="shape"/>
|
|
83
|
-
<feGaussianBlur stdDeviation="2.2852" result="effect1_foregroundBlur_111_52"/>
|
|
84
|
-
</filter>
|
|
85
|
-
<filter id="filter8_f_111_52" x="6.78641" y="-0.27231" width="16.2415" height="15.5681" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
|
|
86
|
-
<feFlood flood-opacity="0" result="BackgroundImageFix"/>
|
|
87
|
-
<feBlend mode="normal" in="SourceGraphic" in2="BackgroundImageFix" result="shape"/>
|
|
88
|
-
<feGaussianBlur stdDeviation="2.04485" result="effect1_foregroundBlur_111_52"/>
|
|
89
|
-
</filter>
|
|
90
|
-
<filter id="filter9_f_111_52" x="3.77526" y="-8.71693" width="21.687" height="19.4212" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
|
|
91
|
-
<feFlood flood-opacity="0" result="BackgroundImageFix"/>
|
|
92
|
-
<feBlend mode="normal" in="SourceGraphic" in2="BackgroundImageFix" result="shape"/>
|
|
93
|
-
<feGaussianBlur stdDeviation="1.72712" result="effect1_foregroundBlur_111_52"/>
|
|
94
|
-
</filter>
|
|
95
|
-
<filter id="filter10_f_111_52" x="-5.40727" y="-6.39238" width="14.3639" height="16.9254" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
|
|
96
|
-
<feFlood flood-opacity="0" result="BackgroundImageFix"/>
|
|
97
|
-
<feBlend mode="normal" in="SourceGraphic" in2="BackgroundImageFix" result="shape"/>
|
|
98
|
-
<feGaussianBlur stdDeviation="2.1376" result="effect1_foregroundBlur_111_52"/>
|
|
99
|
-
</filter>
|
|
100
|
-
</defs>
|
|
101
|
-
</svg>
|
|
102
|
-
`,open_code:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" fill-rule="evenodd">
|
|
103
|
-
<title>opencode</title>
|
|
104
|
-
<path d="M16 6H8v12h8V6zm4 16H4V2h16v20z" />
|
|
105
|
-
</svg>`,copilot:'<svg role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><title>GitHub Copilot</title><path d="M23.922 16.997C23.061 18.492 18.063 22.02 12 22.02 5.937 22.02.939 18.492.078 16.997A.641.641 0 0 1 0 16.741v-2.869a.883.883 0 0 1 .053-.22c.372-.935 1.347-2.292 2.605-2.656.167-.429.414-1.055.644-1.517a10.098 10.098 0 0 1-.052-1.086c0-1.331.282-2.499 1.132-3.368.397-.406.89-.717 1.474-.952C7.255 2.937 9.248 1.98 11.978 1.98c2.731 0 4.767.957 6.166 2.093.584.235 1.077.546 1.474.952.85.869 1.132 2.037 1.132 3.368 0 .368-.014.733-.052 1.086.23.462.477 1.088.644 1.517 1.258.364 2.233 1.721 2.605 2.656a.841.841 0 0 1 .053.22v2.869a.641.641 0 0 1-.078.256Zm-11.75-5.992h-.344a4.359 4.359 0 0 1-.355.508c-.77.947-1.918 1.492-3.508 1.492-1.725 0-2.989-.359-3.782-1.259a2.137 2.137 0 0 1-.085-.104L4 11.746v6.585c1.435.779 4.514 2.179 8 2.179 3.486 0 6.565-1.4 8-2.179v-6.585l-.098-.104s-.033.045-.085.104c-.793.9-2.057 1.259-3.782 1.259-1.59 0-2.738-.545-3.508-1.492a4.359 4.359 0 0 1-.355-.508Zm2.328 3.25c.549 0 1 .451 1 1v2c0 .549-.451 1-1 1-.549 0-1-.451-1-1v-2c0-.549.451-1 1-1Zm-5 0c.549 0 1 .451 1 1v2c0 .549-.451 1-1 1-.549 0-1-.451-1-1v-2c0-.549.451-1 1-1Zm3.313-6.185c.136 1.057.403 1.913.878 2.497.442.544 1.134.938 2.344.938 1.573 0 2.292-.337 2.657-.751.384-.435.558-1.15.558-2.361 0-1.14-.243-1.847-.705-2.319-.477-.488-1.319-.862-2.824-1.025-1.487-.161-2.192.138-2.533.529-.269.307-.437.808-.438 1.578v.021c0 .265.021.562.063.893Zm-1.626 0c.042-.331.063-.628.063-.894v-.02c-.001-.77-.169-1.271-.438-1.578-.341-.391-1.046-.69-2.533-.529-1.505.163-2.347.537-2.824 1.025-.462.472-.705 1.179-.705 2.319 0 1.211.175 1.926.558 2.361.365.414 1.084.751 2.657.751 1.21 0 1.902-.394 2.344-.938.475-.584.742-1.44.878-2.497Z"/></svg>',gemini:'<svg height="1em" style="flex:none;line-height:1" viewBox="0 0 24 24" width="1em" xmlns="http://www.w3.org/2000/svg"><title>Gemini</title><path d="M20.616 10.835a14.147 14.147 0 01-4.45-3.001 14.111 14.111 0 01-3.678-6.452.503.503 0 00-.975 0 14.134 14.134 0 01-3.679 6.452 14.155 14.155 0 01-4.45 3.001c-.65.28-1.318.505-2.002.678a.502.502 0 000 .975c.684.172 1.35.397 2.002.677a14.147 14.147 0 014.45 3.001 14.112 14.112 0 013.679 6.453.502.502 0 00.975 0c.172-.685.397-1.351.677-2.003a14.145 14.145 0 013.001-4.45 14.113 14.113 0 016.453-3.678.503.503 0 000-.975 13.245 13.245 0 01-2.003-.678z" fill="#3186FF"></path><path d="M20.616 10.835a14.147 14.147 0 01-4.45-3.001 14.111 14.111 0 01-3.678-6.452.503.503 0 00-.975 0 14.134 14.134 0 01-3.679 6.452 14.155 14.155 0 01-4.45 3.001c-.65.28-1.318.505-2.002.678a.502.502 0 000 .975c.684.172 1.35.397 2.002.677a14.147 14.147 0 014.45 3.001 14.112 14.112 0 013.679 6.453.502.502 0 00.975 0c.172-.685.397-1.351.677-2.003a14.145 14.145 0 013.001-4.45 14.113 14.113 0 016.453-3.678.503.503 0 000-.975 13.245 13.245 0 01-2.003-.678z" fill="url(#lobe-icons-gemini-0-_R_0_)"></path><path d="M20.616 10.835a14.147 14.147 0 01-4.45-3.001 14.111 14.111 0 01-3.678-6.452.503.503 0 00-.975 0 14.134 14.134 0 01-3.679 6.452 14.155 14.155 0 01-4.45 3.001c-.65.28-1.318.505-2.002.678a.502.502 0 000 .975c.684.172 1.35.397 2.002.677a14.147 14.147 0 014.45 3.001 14.112 14.112 0 013.679 6.453.502.502 0 00.975 0c.172-.685.397-1.351.677-2.003a14.145 14.145 0 013.001-4.45 14.113 14.113 0 016.453-3.678.503.503 0 000-.975 13.245 13.245 0 01-2.003-.678z" fill="url(#lobe-icons-gemini-1-_R_0_)"></path><path d="M20.616 10.835a14.147 14.147 0 01-4.45-3.001 14.111 14.111 0 01-3.678-6.452.503.503 0 00-.975 0 14.134 14.134 0 01-3.679 6.452 14.155 14.155 0 01-4.45 3.001c-.65.28-1.318.505-2.002.678a.502.502 0 000 .975c.684.172 1.35.397 2.002.677a14.147 14.147 0 014.45 3.001 14.112 14.112 0 013.679 6.453.502.502 0 00.975 0c.172-.685.397-1.351.677-2.003a14.145 14.145 0 013.001-4.45 14.113 14.113 0 016.453-3.678.503.503 0 000-.975 13.245 13.245 0 01-2.003-.678z" fill="url(#lobe-icons-gemini-2-_R_0_)"></path><defs><linearGradient gradientUnits="userSpaceOnUse" id="lobe-icons-gemini-0-_R_0_" x1="7" x2="11" y1="15.5" y2="12"><stop stop-color="#08B962"></stop><stop offset="1" stop-color="#08B962" stop-opacity="0"></stop></linearGradient><linearGradient gradientUnits="userSpaceOnUse" id="lobe-icons-gemini-1-_R_0_" x1="8" x2="11.5" y1="5.5" y2="11"><stop stop-color="#F94543"></stop><stop offset="1" stop-color="#F94543" stop-opacity="0"></stop></linearGradient><linearGradient gradientUnits="userSpaceOnUse" id="lobe-icons-gemini-2-_R_0_" x1="3.5" x2="17.5" y1="13.5" y2="12"><stop stop-color="#FABC12"></stop><stop offset=".46" stop-color="#FABC12" stop-opacity="0"></stop></linearGradient></defs></svg>',qwen_code:'<svg xmlns="http://www.w3.org/2000/svg" width="518.08" height="512" viewBox="0 0 256 253"><path fill="#623ae7" d="M129.263 0a6.75 6.75 0 0 1 5.88 3.374l15.256 26.424l65.258-.482a6.75 6.75 0 0 1 5.892 3.373l16.843 29.172a6.75 6.75 0 0 1-.038 6.811l-15.569 26.29a6.7 6.7 0 0 1-.887 1.182l33.195 56.28a6.75 6.75 0 0 1 .021 6.72l-16.94 29.706a6.75 6.75 0 0 1-5.86 3.405h-30.513l-32.21 56.756a6.75 6.75 0 0 1-5.868 3.417h-33.686a6.75 6.75 0 0 1-5.88-3.438l-15.022-26.7l-67.31.06a6.75 6.75 0 0 1-5.831-3.343l-17.256-29.523a6.75 6.75 0 0 1-.018-6.777l15.256-26.425L.929 100.008a6.75 6.75 0 0 1-.025-6.79l16.843-29.172a6.75 6.75 0 0 1 5.917-3.374l30.553.339a6.7 6.7 0 0 1 1.789.262L89.258 3.562a6.75 6.75 0 0 1 5.81-3.379z" stroke-width="6.5" stroke="#623ae7" /><path fill="#fff" d="m180.679 97.445l36.108.025l33.198 58.74h-34.51l-17.266-30.239l-68.54 119.948l-17.218-29.263zM57.85 66.893l69.028 118.902l-17.872 30.86l-67.905-.622l17.255-29.887l34.82.166L23.567 66.981zm37.24-60.8l17.256 29.887l-17.554 30.07l138.147-.616l-17.064 29.733l-137.896.33L59.917 66.05z" stroke-width="6.5" stroke="#fff" /></svg>',kimi_code:'<svg viewBox="0 0 512 512" xmlns="http://www.w3.org/2000/svg" fill-rule="evenodd" clip-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="2"><path d="M503 114.333v280c0 60.711-49.29 110-110 110H113c-60.711 0-110-49.289-110-110v-280c0-60.71 49.289-110 110-110h280c60.71 0 110 49.29 110 110z"/><path d="M342.065 189.759c1.886-2.42 3.541-4.63 5.289-6.77.81-1.007.74-1.771-.046-2.824-7.58-9.965-8.298-21.028-3.935-32.254 3.275-8.448 10.52-12.406 19.373-13.25 5.52-.521 10.936.046 15.959 2.73 6.596 3.53 10.438 8.912 11.688 16.341.995 5.926.81 11.712-.868 17.452-2.974 10.161-10.277 15.427-20.287 16.758-8.31 1.11-16.734 1.25-25.113 1.817-.648.046-1.308 0-2.06 0z" fill="#027aff"/><path d="M321.512 144.254h-50.064l-39.637 90.384h-56.036v-89.99H131v232.868h44.787v-98.103h78.973c13.598 0 26.015-7.927 31.744-20.252v118.355h44.787v-98.103c0-23.342-18.239-42.97-41.523-44.671v-.116h-24.593a45.577 45.577 0 0026.884-24.534l29.453-65.838z" fill="#fff"/></svg>',amp:'<svg height="1em" style="flex:none;line-height:1" viewBox="0 0 24 24" width="1em" xmlns="http://www.w3.org/2000/svg"><title>Amp</title><path d="M15.087 23.18L12.03 24l-2.097-7.823-5.738 5.738-2.251-2.251 5.718-5.719-7.769-2.082.82-3.057 11.294 3.08 3.08 11.295z" fill="#F34E3F"></path><path d="M19.505 18.762l-3.057.82-2.564-9.573-9.572-2.564.819-3.057 11.295 3.079 3.08 11.295z" fill="#F34E3F"></path><path d="M23.893 14.374l-3.057.82-2.565-9.572L8.7 3.057 9.52 0l11.295 3.08 3.079 11.294z" fill="#F34E3F"></path></svg>'},g=t({name:"IconAi",props:{name:{type:String,required:!0}},setup(e){const l=n(()=>c[e.name]||"");return()=>i("span",{class:"size-5",innerHTML:l.value})}}),h=t({__name:"Skeleton",props:{class:{type:[Boolean,null,String,Object,Array]}},setup(e){const l=e;return(d,u)=>(r(),o("div",{"data-slot":"skeleton",class:a(s(f)("animate-pulse rounded-md bg-primary/10",l.class))},null,2))}});export{g as _,h as a};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{d as ee,c as fe,b as pe,u as me,t as te,B as ae,I as ve,x as ge,s as _e,v as be,w as ye,m as q,n as he,y as Te}from"./chy2QJx0.js";import{M as G,r as B,h as w,s as Ie,ad as we,z as S,p as Ce,ae as Se,$ as Y,af as J,i as xe,ag as ke,G as H,H as se,o as T,B as C,w as n,b as d,D as a,P as $,C as A,Q as oe,v as Ae,n as Re,A as N,a4 as ne,W as Be,S as Ee,I as le,ah as Me,N as Fe,X as P,L as V,Z as O,T as $e,U as qe,a as Pe,c as K,K as z,J as L,a3 as Ve,d as g,t as x,E as Oe}from"./Dn8cXZx3.js";function Q(){let t=document.activeElement;if(t==null)return null;for(;t!=null&&t.shadowRoot!=null&&t.shadowRoot.activeElement!=null;)t=t.shadowRoot.activeElement;return t}const[Ne]=G("ConfigProvider");function re(t){const e=Ne({dir:B("ltr")});return w(()=>t?.value||e.dir?.value||"ltr")}function X(){const t=B(),e=w(()=>["#text","#comment"].includes(t.value?.$el.nodeName)?t.value?.$el.nextElementSibling:Ie(t));return{primitiveElement:t,currentElement:e}}const Z="data-reka-collection-item";function ue(t={}){const{key:e="",isProvider:l=!1}=t,o=`${e}CollectionProvider`;let i;if(l){const s=B(new Map);i={collectionRef:B(),itemMap:s},ke(o,i)}else i=we(o);const _=(s=!1)=>{const u=i.collectionRef.value;if(!u)return[];const m=Array.from(u.querySelectorAll(`[${Z}]`)),I=Array.from(i.itemMap.value.values()).sort((R,y)=>m.indexOf(R.ref)-m.indexOf(y.ref));return s?I:I.filter(R=>R.ref.dataset.disabled!=="")},c=S({name:"CollectionSlot",inheritAttrs:!1,setup(s,{slots:u,attrs:m}){const{primitiveElement:b,currentElement:I}=X();return xe(I,()=>{i.collectionRef.value=I.value}),()=>Y(J,{ref:b,...m},u)}}),f=S({name:"CollectionItem",inheritAttrs:!1,props:{value:{validator:()=>!0}},setup(s,{slots:u,attrs:m}){const{primitiveElement:b,currentElement:I}=X();return Ce(R=>{if(I.value){const y=Se(I.value);i.itemMap.value.set(y,{ref:I.value,value:s.value}),R(()=>i.itemMap.value.delete(y))}}),()=>Y(J,{...m,[Z]:"",ref:b},u)}}),p=w(()=>Array.from(i.itemMap.value.values())),r=w(()=>i.itemMap.value.size);return{getItems:_,reactiveItems:p,itemMapSize:r,CollectionSlot:c,CollectionItem:f}}const Ue="rovingFocusGroup.onEntryFocus",De={bubbles:!1,cancelable:!0},je={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function Ke(t,e){return e!=="rtl"?t:t==="ArrowLeft"?"ArrowRight":t==="ArrowRight"?"ArrowLeft":t}function ze(t,e,l){const o=Ke(t.key,l);if(!(e==="vertical"&&["ArrowLeft","ArrowRight"].includes(o))&&!(e==="horizontal"&&["ArrowUp","ArrowDown"].includes(o)))return je[o]}function ie(t,e=!1){const l=Q();for(const o of t)if(o===l||(o.focus({preventScroll:e}),Q()!==l))return}function Le(t,e){return t.map((l,o)=>t[(e+o)%t.length])}const[Ge,He]=G("RovingFocusGroup");var We=S({__name:"RovingFocusGroup",props:{orientation:{type:String,required:!1,default:void 0},dir:{type:String,required:!1},loop:{type:Boolean,required:!1,default:!1},currentTabStopId:{type:[String,null],required:!1},defaultCurrentTabStopId:{type:String,required:!1},preventScrollOnEntryFocus:{type:Boolean,required:!1,default:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["entryFocus","update:currentTabStopId"],setup(t,{expose:e,emit:l}){const o=t,i=l,{loop:_,orientation:c,dir:f}=H(o),p=re(f),r=se(o,"currentTabStopId",i,{defaultValue:o.defaultCurrentTabStopId,passive:o.currentTabStopId===void 0}),s=B(!1),u=B(!1),m=B(0),{getItems:b,CollectionSlot:I}=ue({isProvider:!0});function R(k){const E=!u.value;if(k.currentTarget&&k.target===k.currentTarget&&E&&!s.value){const M=new CustomEvent(Ue,De);if(k.currentTarget.dispatchEvent(M),i("entryFocus",M),!M.defaultPrevented){const F=b().map(v=>v.ref).filter(v=>v.dataset.disabled!==""),U=F.find(v=>v.getAttribute("data-active")===""),D=F.find(v=>v.getAttribute("data-highlighted")===""),j=F.find(v=>v.id===r.value),h=[U,D,j,...F].filter(Boolean);ie(h,o.preventScrollOnEntryFocus)}}u.value=!1}function y(){setTimeout(()=>{u.value=!1},1)}return e({getItems:b}),He({loop:_,dir:p,orientation:c,currentTabStopId:r,onItemFocus:k=>{r.value=k},onItemShiftTab:()=>{s.value=!0},onFocusableItemAdd:()=>{m.value++},onFocusableItemRemove:()=>{m.value--}}),(k,E)=>(T(),C(a(I),null,{default:n(()=>[d(a($),{tabindex:s.value||m.value===0?-1:0,"data-orientation":a(c),as:k.as,"as-child":k.asChild,dir:a(p),style:{outline:"none"},onMousedown:E[0]||(E[0]=M=>u.value=!0),onMouseup:y,onFocus:R,onBlur:E[1]||(E[1]=M=>s.value=!1)},{default:n(()=>[A(k.$slots,"default")]),_:3},8,["tabindex","data-orientation","as","as-child","dir"])]),_:3}))}}),Ye=We,Je=S({__name:"RovingFocusItem",props:{tabStopId:{type:String,required:!1},focusable:{type:Boolean,required:!1,default:!0},active:{type:Boolean,required:!1},allowShiftKey:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"span"}},setup(t){const e=t,l=Ge(),o=ee(),i=w(()=>e.tabStopId||o),_=w(()=>l.currentTabStopId.value===i.value),{getItems:c,CollectionItem:f}=ue();oe(()=>{e.focusable&&l.onFocusableItemAdd()}),Ae(()=>{e.focusable&&l.onFocusableItemRemove()});function p(r){if(r.key==="Tab"&&r.shiftKey){l.onItemShiftTab();return}if(r.target!==r.currentTarget)return;const s=ze(r,l.orientation.value,l.dir.value);if(s!==void 0){if(r.metaKey||r.ctrlKey||r.altKey||!e.allowShiftKey&&r.shiftKey)return;r.preventDefault();let u=[...c().map(m=>m.ref).filter(m=>m.dataset.disabled!=="")];if(s==="last")u.reverse();else if(s==="prev"||s==="next"){s==="prev"&&u.reverse();const m=u.indexOf(r.currentTarget);u=l.loop.value?Le(u,m+1):u.slice(m+1)}Re(()=>ie(u))}}return(r,s)=>(T(),C(a(f),null,{default:n(()=>[d(a($),{tabindex:_.value?0:-1,"data-orientation":a(l).orientation.value,"data-active":r.active?"":void 0,"data-disabled":r.focusable?void 0:"",as:r.as,"as-child":r.asChild,onMousedown:s[0]||(s[0]=u=>{r.focusable?a(l).onItemFocus(i.value):u.preventDefault()}),onFocus:s[1]||(s[1]=u=>a(l).onItemFocus(i.value)),onKeydown:p},{default:n(()=>[A(r.$slots,"default")]),_:3},8,["tabindex","data-orientation","data-active","data-disabled","as","as-child"])]),_:3}))}}),Qe=Je;const[W,Xe]=G("TabsRoot");var Ze=S({__name:"TabsRoot",props:{defaultValue:{type:null,required:!1},orientation:{type:String,required:!1,default:"horizontal"},dir:{type:String,required:!1},activationMode:{type:String,required:!1,default:"automatic"},modelValue:{type:null,required:!1},unmountOnHide:{type:Boolean,required:!1,default:!0},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["update:modelValue"],setup(t,{emit:e}){const l=t,o=e,{orientation:i,unmountOnHide:_,dir:c}=H(l),f=re(c);N();const p=se(l,"modelValue",o,{defaultValue:l.defaultValue,passive:l.modelValue===void 0}),r=B(),s=ne(new Set);return Xe({modelValue:p,changeModelValue:u=>{p.value=u},orientation:i,dir:f,unmountOnHide:_,activationMode:l.activationMode,baseId:ee(void 0,"reka-tabs"),tabsList:r,contentIds:s,registerContent:u=>{s.value=new Set([...s.value,u])},unregisterContent:u=>{const m=new Set(s.value);m.delete(u),s.value=m}}),(u,m)=>(T(),C(a($),{dir:a(f),"data-orientation":a(i),"as-child":u.asChild,as:u.as},{default:n(()=>[A(u.$slots,"default",{modelValue:a(p)})]),_:3},8,["dir","data-orientation","as-child","as"]))}}),et=Ze;function de(t,e){return`${t}-trigger-${e}`}function ce(t,e){return`${t}-content-${e}`}var tt=S({__name:"TabsContent",props:{value:{type:[String,Number],required:!0},forceMount:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(t){const e=t,{forwardRef:l}=N(),o=W(),i=w(()=>de(o.baseId,e.value)),_=w(()=>ce(o.baseId,e.value)),c=w(()=>e.value===o.modelValue.value),f=B(c.value);return oe(()=>{o.registerContent(e.value),requestAnimationFrame(()=>{f.value=!1})}),Be(()=>{o.unregisterContent(e.value)}),(p,r)=>(T(),C(a(fe),{present:p.forceMount||c.value,"force-mount":""},{default:n(({present:s})=>[d(a($),{id:_.value,ref:a(l),"as-child":p.asChild,as:p.as,role:"tabpanel","data-state":c.value?"active":"inactive","data-orientation":a(o).orientation.value,"aria-labelledby":i.value,hidden:!s,tabindex:"0",style:Ee({animationDuration:f.value?"0s":void 0})},{default:n(()=>[!a(o).unmountOnHide.value||s?A(p.$slots,"default",{key:0}):le("v-if",!0)]),_:2},1032,["id","as-child","as","data-state","data-orientation","aria-labelledby","hidden","style"])]),_:3},8,["present"]))}}),at=tt,st=S({__name:"TabsList",props:{loop:{type:Boolean,required:!1,default:!0},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(t){const e=t,{loop:l}=H(e),{forwardRef:o,currentElement:i}=N(),_=W();return _.tabsList=i,(c,f)=>(T(),C(a(Ye),{"as-child":"",orientation:a(_).orientation.value,dir:a(_).dir.value,loop:a(l)},{default:n(()=>[d(a($),{ref:a(o),role:"tablist","as-child":c.asChild,as:c.as,"aria-orientation":a(_).orientation.value},{default:n(()=>[A(c.$slots,"default")]),_:3},8,["as-child","as","aria-orientation"])]),_:3},8,["orientation","dir","loop"]))}}),ot=st,nt=S({__name:"TabsTrigger",props:{value:{type:[String,Number],required:!0},disabled:{type:Boolean,required:!1,default:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"button"}},setup(t){const e=t,{forwardRef:l}=N(),o=W(),i=w(()=>de(o.baseId,e.value)),_=w(()=>o.contentIds.value.has(e.value)?ce(o.baseId,e.value):void 0),c=w(()=>e.value===o.modelValue.value);return(f,p)=>(T(),C(a(Qe),{"as-child":"",focusable:!f.disabled,active:c.value},{default:n(()=>[d(a($),{id:i.value,ref:a(l),role:"tab",type:f.as==="button"?"button":void 0,as:f.as,"as-child":f.asChild,"aria-selected":c.value?"true":"false","aria-controls":_.value,"data-state":c.value?"active":"inactive",disabled:f.disabled,"data-disabled":f.disabled?"":void 0,"data-orientation":a(o).orientation.value,onMousedown:p[0]||(p[0]=Fe(r=>{!f.disabled&&r.ctrlKey===!1?a(o).changeModelValue(f.value):r.preventDefault()},["left"])),onKeydown:p[1]||(p[1]=Me(r=>a(o).changeModelValue(f.value),["enter","space"])),onFocus:p[2]||(p[2]=()=>{const r=a(o).activationMode!=="manual";!c.value&&!f.disabled&&r&&a(o).changeModelValue(f.value)})},{default:n(()=>[A(f.$slots,"default")]),_:3},8,["id","type","as","as-child","aria-selected","aria-controls","data-state","disabled","data-disabled","data-orientation"])]),_:3},8,["focusable","active"]))}}),lt=nt;const rt=S({__name:"Tabs",props:{defaultValue:{},orientation:{},dir:{},activationMode:{},modelValue:{},unmountOnHide:{type:Boolean},asChild:{type:Boolean},as:{},class:{type:[Boolean,null,String,Object,Array]}},emits:["update:modelValue"],setup(t,{emit:e}){const l=t,o=e,i=P(l,"class"),_=pe(i,o);return(c,f)=>(T(),C(a(et),V({"data-slot":"tabs"},a(_),{class:a(O)("flex flex-col gap-2",l.class)}),{default:n(p=>[A(c.$slots,"default",$e(qe(p)))]),_:3},16,["class"]))}}),ut=S({__name:"TabsContent",props:{value:{},forceMount:{type:Boolean},asChild:{type:Boolean},as:{},class:{type:[Boolean,null,String,Object,Array]}},setup(t){const e=t,l=P(e,"class");return(o,i)=>(T(),C(a(at),V({"data-slot":"tabs-content",class:a(O)("flex-1 outline-none",e.class)},a(l)),{default:n(()=>[A(o.$slots,"default")]),_:3},16,["class"]))}}),it=S({__name:"TabsList",props:{loop:{type:Boolean},asChild:{type:Boolean},as:{},class:{type:[Boolean,null,String,Object,Array]}},setup(t){const e=t,l=P(e,"class");return(o,i)=>(T(),C(a(ot),V({"data-slot":"tabs-list"},a(l),{class:a(O)("bg-muted text-muted-foreground inline-flex h-9 w-fit items-center justify-center rounded-lg p-[3px]",e.class)}),{default:n(()=>[A(o.$slots,"default")]),_:3},16,["class"]))}}),dt=S({__name:"TabsTrigger",props:{value:{},disabled:{type:Boolean},asChild:{type:Boolean},as:{},class:{type:[Boolean,null,String,Object,Array]}},setup(t){const e=t,l=P(e,"class"),o=me(l);return(i,_)=>(T(),C(a(lt),V({"data-slot":"tabs-trigger",class:a(O)("data-[state=active]:bg-background dark:data-[state=active]:text-foreground focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:outline-ring dark:data-[state=active]:border-input dark:data-[state=active]:bg-input/30 text-foreground dark:text-muted-foreground inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-2 py-1 text-sm font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:ring-[3px] focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:shadow-sm [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e.class)},a(o)),{default:n(()=>[A(i.$slots,"default")]),_:3},16,["class"]))}}),ct={class:"flex items-center justify-center py-10"},ft=S({__name:"TableEmpty",props:{class:{type:[Boolean,null,String,Object,Array]},colspan:{default:1}},setup(t){const e=t,l=P(e,"class");return(o,i)=>(T(),C(te,null,{default:n(()=>[d(ae,V({class:a(O)("p-4 whitespace-nowrap align-middle text-sm text-foreground",e.class)},a(l)),{default:n(()=>[Pe("div",ct,[A(o.$slots,"default")])]),_:3},16,["class"])]),_:3}))}}),pt=S({name:"UsageAnalyticsTokenUsageTabsPanel",__name:"TokenUsageTabsPanel",props:{dailyItems:{},weeklyItems:{},monthlyItems:{},sessionItems:{},pageSize:{default:10},productName:{default:"Product"}},setup(t){const e=t,l=ne("day"),o=Oe({day:1,month:1,session:1,week:1}),i=[{heading:"Date",label:"Day",value:"day"},{heading:"Week",label:"Week",value:"week"},{heading:"Month",label:"Month",value:"month"},{heading:"Session ID",label:"Session",value:"session"}],_=w(()=>({day:e.dailyItems,month:e.monthlyItems,session:e.sessionItems,week:e.weeklyItems})),c=w(()=>Object.fromEntries(i.map(r=>{const s=_.value[r.value],u=Math.max(1,Math.ceil(s.length/e.pageSize)),m=Math.min(o[r.value],u),b=(m-1)*e.pageSize;return[r.value,{items:s,page:m,pageCount:u,paginatedItems:s.slice(b,b+e.pageSize)}]})));function f(r,s){const u=c.value[r].pageCount;o[r]=Math.min(u,Math.max(1,s))}function p(r){return r.length>0?r.join(", "):"None"}return(r,s)=>{const u=dt,m=it,b=be,I=te,R=_e,y=ae,k=ft,E=ye,M=ge,F=Te,U=ut,D=rt,j=ve;return T(),C(j,{description:`Browse ${t.productName} token consumption by day, week, month, or session.`,icon:"lucide:table-2",title:`${t.productName} Token Usage`},{default:n(()=>[d(D,{modelValue:a(l),"onUpdate:modelValue":s[0]||(s[0]=h=>Ve(l)?l.value=h:null)},{default:n(()=>[d(m,{class:"grid w-full grid-cols-4 sm:w-fit"},{default:n(()=>[(T(),K(L,null,z(i,h=>d(u,{key:h.value,value:h.value},{default:n(()=>[g(x(h.label),1)]),_:2},1032,["value"])),64))]),_:1}),(T(),K(L,null,z(i,h=>d(U,{key:h.value,class:"mt-4",value:h.value},{default:n(()=>[d(M,null,{default:n(()=>[d(R,null,{default:n(()=>[d(I,null,{default:n(()=>[d(b,null,{default:n(()=>[g(x(h.heading),1)]),_:2},1024),d(b,null,{default:n(()=>[...s[1]||(s[1]=[g("Models",-1)])]),_:1}),d(b,null,{default:n(()=>[...s[2]||(s[2]=[g("Projects",-1)])]),_:1}),d(b,{class:"text-right"},{default:n(()=>[...s[3]||(s[3]=[g(" Sessions ",-1)])]),_:1}),d(b,{class:"text-right"},{default:n(()=>[...s[4]||(s[4]=[g(" Input ",-1)])]),_:1}),d(b,{class:"text-right"},{default:n(()=>[...s[5]||(s[5]=[g(" Output ",-1)])]),_:1}),d(b,{class:"text-right"},{default:n(()=>[...s[6]||(s[6]=[g(" Reasoning ",-1)])]),_:1}),d(b,{class:"text-right"},{default:n(()=>[...s[7]||(s[7]=[g(" Cache Read ",-1)])]),_:1}),d(b,{class:"text-right"},{default:n(()=>[...s[8]||(s[8]=[g(" Total Tokens ",-1)])]),_:1}),d(b,{class:"text-right"},{default:n(()=>[...s[9]||(s[9]=[g(" Cost ",-1)])]),_:1})]),_:2},1024)]),_:2},1024),d(E,null,{default:n(()=>[(T(!0),K(L,null,z(a(c)[h.value].paginatedItems,v=>(T(),C(I,{key:v.id},{default:n(()=>[d(y,{class:"max-w-72 truncate font-medium"},{default:n(()=>[g(x(v.label),1)]),_:2},1024),d(y,null,{default:n(()=>[g(x(p(v.models)),1)]),_:2},1024),d(y,{class:"max-w-56 truncate"},{default:n(()=>[g(x(p(v.projects)),1)]),_:2},1024),d(y,{class:"text-right tabular-nums"},{default:n(()=>[g(x(v.sessionCount),1)]),_:2},1024),d(y,{class:"text-right tabular-nums"},{default:n(()=>[g(x(a(q)(v.inputTokens)),1)]),_:2},1024),d(y,{class:"text-right tabular-nums"},{default:n(()=>[g(x(a(q)(v.outputTokens)),1)]),_:2},1024),d(y,{class:"text-right tabular-nums"},{default:n(()=>[g(x(a(q)(v.reasoningOutputTokens)),1)]),_:2},1024),d(y,{class:"text-right tabular-nums"},{default:n(()=>[g(x(a(q)(v.cachedInputTokens)),1)]),_:2},1024),d(y,{class:"text-right tabular-nums"},{default:n(()=>[g(x(a(q)(v.totalTokens)),1)]),_:2},1024),d(y,{class:"text-right tabular-nums"},{default:n(()=>[g(x(("formatCurrency"in r?r.formatCurrency:a(he))(v.costUSD)),1)]),_:2},1024)]),_:2},1024))),128)),a(c)[h.value].items.length===0?(T(),C(k,{key:0,colspan:10},{default:n(()=>[g(" No "+x(t.productName)+" token usage found. ",1)]),_:1})):le("",!0)]),_:2},1024)]),_:2},1024),d(F,{page:a(c)[h.value].page,"page-count":a(c)[h.value].pageCount,"page-size":t.pageSize,total:a(c)[h.value].items.length,"onUpdate:page":v=>f(h.value,v)},null,8,["page","page-count","page-size","total","onUpdate:page"])]),_:2},1032,["value"])),64))]),_:1},8,["modelValue"])]),_:1},8,["description","title"])}}}),gt=Object.assign(pt,{__name:"UsageAnalyticsTokenUsageTabsPanel"});export{ft as _,re as a,it as b,dt as c,ut as d,gt as e,rt as f,Q as g,Ne as i,ue as u};
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import{I as ne,S as ve,C as be,f as ue,z as he,A as ye,_ as xe,g as $,n as z}from"./chy2QJx0.js";import{z as ae,a1 as ke,a2 as _e,o as i,B as q,w as K,a as n,b as R,D as l,I as Y,c as b,S as U,t as m,K as A,J as I,h as s,a4 as ce,a8 as $e,Y as te}from"./Dn8cXZx3.js";const we={key:0,class:"pointer-events-none absolute inset-0 z-10"},Te={class:"mt-4 flex flex-wrap items-center justify-center gap-3 text-xs text-muted-foreground"},Me={class:"font-medium text-foreground tabular-nums"},Ce=288,De=ae({name:"StatisticalAnalysisModelUsagePanel",__name:"ModelUsagePanel",props:{monthlyItems:{},year:{}},setup(H){const g=H,B=["#2563eb","#f97316","#0891b2","#8b5cf6","#059669","#f43f5e"],k={bottom:32,left:56,right:12,top:8},F=[0,void 0],S=ke("chartRoot"),{width:P}=_e(S),w=ce(null),d=ce(null),T=s(()=>g.year??ge(g.monthlyItems)??new Date().getFullYear()),f=s(()=>Array.from({length:12},(e,r)=>{const u=`${r+1}`.padStart(2,"0");return`${T.value}-${u}`})),N=s(()=>[0,Math.max(f.value.length-1,0)]),p=s(()=>f.value.map((e,r)=>r)),G=s(()=>g.monthlyItems.filter(e=>e.month.startsWith(`${T.value}-`))),J=s(()=>Array.from(new Set(G.value.map(e=>e.model)))),j=s(()=>f.value.map((e,r)=>{const u=Object.fromEntries(J.value.map(c=>[c,G.value.find(v=>v.month===e&&v.model===c)?.tokenTotal??0]));return{month:e,monthIndex:r,tokensByModel:u,totalTokens:Object.values(u).reduce((c,v)=>c+v,0)}})),_=s(()=>J.value.map((e,r)=>{const u=ee(r),c=j.value.reduce((v,X)=>v+(X.tokensByModel[e]??0),0);return{color:u,model:e,totalLabel:$(c),totalTokens:c}}).sort((e,r)=>r.totalTokens-e.totalTokens)),O=s(()=>_.value.map(e=>r=>r.tokensByModel[e.model]??0)),Q=s(()=>Object.fromEntries(_.value.map(e=>[e.model,{color:e.color,label:e.model}]))),Z=s(()=>_.value.map(e=>`
|
|
2
|
-
<linearGradient id="${re(e.model)}" x1="0" y1="0" x2="0" y2="1">
|
|
3
|
-
<stop offset="0%" stop-color="${e.color}" stop-opacity="0.45" />
|
|
4
|
-
<stop offset="100%" stop-color="${e.color}" stop-opacity="0.08" />
|
|
5
|
-
</linearGradient>
|
|
6
|
-
`).join("")),V=s(()=>j.value.length>0&&_.value.length>0),L=s(()=>k.left),M=s(()=>k.top),C=s(()=>Math.max(P.value-k.left-k.right,0)),D=s(()=>Math.max(Ce-k.top-k.bottom,0)),E=s(()=>M.value+D.value),t=s(()=>Math.max(...j.value.map(e=>e.totalTokens),0)),a=s(()=>{if(w.value===null||d.value===null)return null;const e=j.value[w.value];if(!e||C.value<=0||D.value<=0)return null;const r=f.value.length<=1?0:w.value/(f.value.length-1),u=L.value+r*C.value,c=le(d.value,M.value,E.value),X=(D.value<=0?0:1-(c-M.value)/D.value)*t.value;return{x:u,xLabel:me(e.month),y:c,yLabel:$(X)}});function h(e){return e.monthIndex}function o(e,r){const u=_.value[r];return u?`url(#${re(u.model)})`:ee(0)}function W(e,r){return _.value[r]?.color??ee(0)}function y(e,r){return _.value[r]?.color??ee(0)}function x(e){const r=_.value.map(u=>({...u,tokenTotal:e.tokensByModel[u.model]??0})).sort((u,c)=>c.tokenTotal-u.tokenTotal);return`
|
|
7
|
-
<div class="grid min-w-48 gap-2 rounded-md border bg-background px-3 py-2 text-xs shadow-lg">
|
|
8
|
-
<div class="font-medium text-foreground">${oe(e.month)} ${e.month.slice(0,4)}</div>
|
|
9
|
-
<div class="grid gap-1 text-muted-foreground">
|
|
10
|
-
${r.map(u=>`
|
|
11
|
-
<div class="flex items-center justify-between gap-4">
|
|
12
|
-
<span class="flex items-center gap-2">
|
|
13
|
-
<span class="size-2 rounded-sm" style="background-color: ${u.color}"></span>
|
|
14
|
-
${fe(u.model)}
|
|
15
|
-
</span>
|
|
16
|
-
<span class="font-mono font-medium text-foreground">${$(u.tokenTotal)}</span>
|
|
17
|
-
</div>
|
|
18
|
-
`).join("")}
|
|
19
|
-
</div>
|
|
20
|
-
<div class="flex justify-between gap-4 border-t pt-2 text-muted-foreground">
|
|
21
|
-
<span>Total</span>
|
|
22
|
-
<span class="font-mono font-semibold text-foreground">${$(e.totalTokens)}</span>
|
|
23
|
-
</div>
|
|
24
|
-
</div>
|
|
25
|
-
`}function ie(e){if(e instanceof Date)return"";const r=f.value[e];return r?oe(r):""}function de(e){return e instanceof Date?"":$(e)}function oe(e){const[r,u]=e.split("-"),c=new Date(Number(r),Number(u)-1,1);return new Intl.DateTimeFormat("en-US",{month:"short"}).format(c)}function me(e){return`${oe(e)} ${e.slice(0,4)}`}function pe(e){const r=S.value?.getBoundingClientRect();if(!r)return;const u=e.clientX-r.left,c=e.clientY-r.top,v=L.value+C.value;if(u<L.value||u>v||c<M.value||c>E.value||C.value<=0||!V.value||f.value.length===0){se();return}const X=le((u-L.value)/Math.max(C.value,1),0,1);w.value=f.value.length<=1?0:Math.round(X*(f.value.length-1)),d.value=c}function se(){w.value=null,d.value=null}function ge(e){const u=[...e].sort((c,v)=>v.month.localeCompare(c.month))[0]?.month?.split("-")[0];return u?Number(u):null}function re(e){return`model-usage-${e.replace(/[^a-z0-9]+/gi,"-").toLowerCase()}`}function ee(e){return B[e%B.length]??"#2563eb"}function le(e,r,u){return Math.min(Math.max(e,r),u)}function fe(e){return e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}return(e,r)=>{const u=xe,c=ne;return i(),q(c,{description:"Monthly token trends by model",icon:"solar:cpu-line-duotone",title:"Model Usage"},{default:K(()=>[n("div",{ref_key:"chartRoot",ref:S,class:"relative",onPointerleave:se,onPointermove:pe},[R(u,{class:"h-72 w-full",config:l(Q)},{default:K(()=>[R(l(ve),{"auto-margin":!1,data:l(j),height:288,margin:k,"svg-defs":l(Z),"x-domain":l(N),"y-domain":F},{default:K(()=>[R(l(be),{color:o,line:!0,"line-color":W,"line-width":2.5,opacity:.82,x:h,y:l(O)},null,8,["y"]),R(l(ue),{"grid-line":!1,"tick-format":ie,"tick-values":l(p),type:"x"},null,8,["tick-values"]),R(l(ue),{"num-ticks":4,"tick-format":de,type:"y"}),l(V)?(i(),q(l(he),{key:0})):Y("",!0),l(V)?(i(),q(l(ye),{key:1,color:y,template:x,x:h,"y-stacked":l(O)},null,8,["y-stacked"])):Y("",!0)]),_:1},8,["data","svg-defs","x-domain"])]),_:1},8,["config"]),l(a)?(i(),b("div",we,[n("div",{class:"absolute border-l border-dashed border-border/80",style:U({height:`${l(D)}px`,left:`${l(a).x}px`,top:`${l(M)}px`})},null,4),n("div",{class:"absolute border-t border-dashed border-border/80",style:U({left:`${l(L)}px`,top:`${l(a).y}px`,width:`${l(C)}px`})},null,4),n("div",{class:"absolute rounded-sm bg-foreground px-2 py-1 text-[11px] font-medium text-background shadow-sm",style:U({left:`${l(a).x}px`,top:`${l(E)+6}px`,transform:"translateX(-50%)"})},m(l(a).xLabel),5),n("div",{class:"absolute rounded-sm bg-foreground px-2 py-1 text-[11px] font-medium text-background shadow-sm",style:U({left:`${Math.max(l(L)-8,0)}px`,top:`${l(a).y}px`,transform:"translate(-100%, -50%)"})},m(l(a).yLabel),5)])):Y("",!0)],544),n("div",Te,[(i(!0),b(I,null,A(l(_),v=>(i(),b("div",{key:v.model,class:"flex items-center gap-2"},[n("span",{class:"size-2.5 rounded-sm",style:U({backgroundColor:v.color})},null,4),n("span",null,m(v.model),1),n("span",Me,m(v.totalLabel),1)]))),128))])]),_:1})}}}),ut=Object.assign(De,{__name:"StatisticalAnalysisModelUsagePanel"}),Se={class:"space-y-3"},Le={class:"flex flex-col flex-1"},Ue={class:"truncate text-sm font-medium tracking-tight"},Be={class:"mt-1 truncate text-xs text-muted-foreground"},Pe={class:"text-right"},je={class:"text-xs font-medium tracking-tight tabular-nums"},Ae={class:"mt-1 flex items-center justify-end gap-1"},Ie=ae({name:"StatisticalAnalysisProjectUsagePanel",__name:"ProjectUsagePanel",props:{items:{}},setup(H){const g=H,B=[{trend:"+12.4%",trendTone:"up"},{trend:"-8.2%",trendTone:"down"},{trend:"+22.1%",trendTone:"up"},{trend:"+15.8%",trendTone:"up"},{trend:"-3.4%",trendTone:"down"},{trend:"+9.6%",trendTone:"up"},{trend:"-5.1%",trendTone:"down"},{trend:"+4.7%",trendTone:"up"}],k=s(()=>g.items.slice(0,6).map((d,T)=>{const f=B[T]??{trend:"+0.0%",trendTone:"up"};return{...d,shortName:w(d.label),trend:f.trend,trendTone:f.trendTone}}));function F(d){return d==="down"?"lucide:trending-down":"lucide:trending-up"}function S(d){return d==="down"?"size-3 text-red-500":"size-3 text-emerald-600 dark:text-emerald-400"}function P(d){return d==="down"?"text-sm font-medium text-red-500 tabular-nums":"text-sm font-medium text-emerald-600 dark:text-emerald-400 tabular-nums"}function w(d){return d.split(/[-_\s]+/).filter(Boolean).slice(0,2).map(T=>T[0]?.toUpperCase()??"").join("")}return(d,T)=>{const f=$e,N=ne;return i(),q(N,{description:"Best performers by spend",icon:"lucide:folder-git-2",title:"Top Projects"},{default:K(()=>[n("div",Se,[(i(!0),b(I,null,A(l(k),p=>(i(),b("div",{key:p.repository,class:"flex justify-between items-center gap-3 rounded-md transition-colors"},[n("div",Le,[n("p",Ue,m(p.label),1),n("p",Be,m(p.detail),1)]),n("div",Pe,[n("p",je,m(p.value),1),n("div",Ae,[R(f,{class:te(S(p.trendTone)),mode:"svg",name:F(p.trendTone)},null,8,["class","name"]),n("span",{class:te(P(p.trendTone))},m(p.trend),3)])])]))),128))])]),_:1})}}}),ct=Object.assign(Ie,{__name:"StatisticalAnalysisProjectUsagePanel"}),Ne={class:"mb-4 grid grid-cols-1 gap-3 sm:grid-cols-3"},ze={class:"text-xs text-muted-foreground"},Re={class:"mt-1 text-lg font-semibold tabular-nums"},Ye={class:"border-b pb-4"},He=["aria-label","tabindex"],Fe={class:"sr-only"},Ge={key:0,class:"pointer-events-none absolute bottom-full left-1/2 z-30 mb-2 hidden min-w-40 -translate-x-1/2 gap-1 rounded-md border bg-popover px-2.5 py-1.5 text-xs text-popover-foreground shadow-md group-hover:grid group-focus-visible:grid",role:"tooltip"},Oe={class:"font-medium"},Ve={key:0,class:"flex items-center justify-between gap-4 text-muted-foreground"},Ee={class:"font-mono font-medium text-foreground"},We={class:"flex items-center justify-between gap-4 text-muted-foreground"},Xe={class:"font-mono font-medium text-foreground"},qe={key:1,class:"flex items-center justify-between gap-4 text-muted-foreground"},Ke={class:"font-mono font-medium text-foreground"},Je={class:"mt-4 flex items-center justify-between gap-4"},Qe={class:"text-xs text-muted-foreground"},Ze={class:"flex items-center gap-1 text-xs text-muted-foreground"},et={class:"mt-4 grid grid-cols-1 gap-3 sm:grid-cols-3"},tt={class:"text-xs text-muted-foreground"},ot={class:"mt-1 flex items-center justify-between gap-2"},nt={class:"text-sm font-semibold"},at={class:"text-xs text-muted-foreground"},st=ae({name:"UsageHeatmapPanel",__name:"UsageHeatmapPanel",props:{heatMetric:{default:"tokens"},items:{},title:{}},setup(H){const g=H,B=["bg-zinc-100 dark:bg-zinc-800/80","bg-emerald-50 dark:bg-emerald-950/70","bg-emerald-100 dark:bg-emerald-900/70","bg-teal-100 dark:bg-teal-900/75","bg-teal-200 dark:bg-teal-800/80","bg-cyan-200 dark:bg-cyan-800/85","bg-cyan-300 dark:bg-cyan-700/90","bg-sky-300 dark:bg-sky-600/90","bg-sky-400 dark:bg-sky-500/95","bg-blue-500 dark:bg-blue-400"],k=[...B],F=[{key:"sun",label:"S",row:"1"},{key:"mon",label:"M",row:"2"},{key:"tue",label:"T",row:"3"},{key:"wed",label:"W",row:"4"},{key:"thu",label:"T",row:"5"},{key:"fri",label:"F",row:"6"},{key:"sat",label:"S",row:"7"}],S=s(()=>M(new Date)),P=s(()=>{const t=M(S.value);return t.setDate(t.getDate()-364),t}),w=s(()=>`${D(P.value)} - ${D(S.value)}`),d=s(()=>g.heatMetric==="cost"?"spend":"tokens"),T=s(()=>`${w.value} ${d.value} heatmap. Darker cells mean higher daily ${d.value}.`),f=s(()=>`Colored by daily ${d.value}`),N=s(()=>{const t=new Map(g.items.map(a=>[C(L(a.date)),a]));return Array.from({length:365},(a,h)=>{const o=M(P.value);return o.setDate(o.getDate()+h),{date:o,usage:t.get(C(o))}})}),p=s(()=>{const t=Math.max(...N.value.map(a=>g.heatMetric==="cost"?a.usage?.costUSD??0:a.usage?.totalTokens??0));return N.value.map(a=>{const h=a.usage?.costUSD??0,o=a.usage?.totalTokens??0,W=g.heatMetric==="cost"?h:o;return{colorClass:B[E(W,t)],costLabel:z(h),costUSD:h,date:D(a.date),hasUsage:!!a.usage,tokenLabel:$(o),totalTokens:o}})}),G=s(()=>{const t=P.value.getDay(),a=(7-(t+p.value.length)%7)%7,h=Array.from({length:t},(y,x)=>({column:String(Math.floor(x/7)+2),colorClass:"bg-transparent",costLabel:"",date:"",isBlank:!0,key:`blank-${x}`,row:String(x%7+1),title:"No date",tokenLabel:""})),o=p.value.map((y,x)=>({...y,column:String(Math.floor((t+x)/7)+2),isBlank:!1,key:y.date,row:String((t+x)%7+1),title:g.heatMetric==="cost"?`${y.date}: ${z(y.costUSD)} / ${$(y.totalTokens)} tokens`:`${y.date}: ${$(y.totalTokens)} tokens / ${z(y.costUSD)}`})),W=Array.from({length:a},(y,x)=>({column:String(Math.floor((t+p.value.length+x)/7)+2),colorClass:"bg-transparent",costLabel:"",date:"",isBlank:!0,key:`trailing-blank-${x}`,row:String((t+p.value.length+x)%7+1),title:"No date",tokenLabel:""}));return[...h,...o,...W]}),J=s(()=>Math.ceil(G.value.length/7)),j=s(()=>({gridTemplateColumns:`max-content repeat(${J.value}, minmax(0, 1fr))`,gridTemplateRows:"repeat(7, minmax(0, 1fr))"})),_=s(()=>p.value.filter(t=>t.hasUsage).slice(-3)),O=s(()=>p.value.filter(t=>t.hasUsage).length),Q=s(()=>z(p.value.reduce((t,a)=>t+a.costUSD,0))),Z=s(()=>$(p.value.reduce((t,a)=>t+a.totalTokens,0))),V=s(()=>g.heatMetric==="cost"?[{key:"year-cost",label:"Year Spend",value:Q.value},{key:"year-tokens",label:"Year Tokens",value:Z.value},{key:"active-days",label:"Active Days",value:String(O.value)}]:[{key:"year-tokens",label:"Year Tokens",value:Z.value},{key:"year-cost",label:"Year Spend",value:Q.value},{key:"active-days",label:"Active Days",value:String(O.value)}]);function L(t){return new Date(t)}function M(t){return new Date(t.getFullYear(),t.getMonth(),t.getDate())}function C(t){const a=t.getFullYear(),h=`${t.getMonth()+1}`.padStart(2,"0"),o=`${t.getDate()}`.padStart(2,"0");return`${a}-${h}-${o}`}function D(t){return new Intl.DateTimeFormat("en-US",{day:"2-digit",month:"short",year:"numeric"}).format(t)}function E(t,a){return t<=0||a<=0?0:Math.min(9,Math.max(1,Math.ceil(t/a*9)))}return(t,a)=>{const h=ne;return i(),q(h,{description:T.value,icon:"lucide:calendar-days",title:g.title},{default:K(()=>[n("div",Ne,[(i(!0),b(I,null,A(V.value,o=>(i(),b("div",{key:o.key,class:"rounded-md border px-3 py-2"},[n("p",ze,m(o.label),1),n("p",Re,m(o.value),1)]))),128))]),n("div",Ye,[n("div",{class:"grid w-full gap-1",style:U(j.value)},[(i(),b(I,null,A(F,o=>n("span",{key:o.key,class:"flex items-center justify-end pr-1 text-[10px] text-muted-foreground",style:U({gridColumn:"1",gridRow:o.row})},m(o.label),5)),64)),(i(!0),b(I,null,A(G.value,o=>(i(),b("div",{key:o.key,class:te(["group relative aspect-square w-full max-w-3 justify-self-center rounded-sm border border-black/5 outline-none transition-colors focus-visible:ring-2 focus-visible:ring-ring/50 dark:border-white/10",[o.colorClass,{"border-transparent opacity-0":o.isBlank}]]),"aria-label":o.title,style:U({gridColumn:o.column,gridRow:o.row}),tabindex:o.isBlank?-1:0},[n("span",Fe,m(o.title),1),o.isBlank?Y("",!0):(i(),b("div",Ge,[n("span",Oe,m(o.date),1),g.heatMetric==="tokens"?(i(),b("span",Ve,[a[0]||(a[0]=n("span",null,"Tokens",-1)),n("span",Ee,m(o.tokenLabel),1)])):Y("",!0),n("span",We,[a[1]||(a[1]=n("span",null,"Cost",-1)),n("span",Xe,m(o.costLabel),1)]),g.heatMetric==="cost"?(i(),b("span",qe,[a[2]||(a[2]=n("span",null,"Tokens",-1)),n("span",Ke,m(o.tokenLabel),1)])):Y("",!0),a[3]||(a[3]=n("span",{class:"absolute top-full left-1/2 size-2 -translate-x-1/2 -translate-y-1/2 rotate-45 border-r border-b border-border bg-popover"},null,-1))]))],14,He))),128))],4),n("div",Je,[n("p",Qe,m(f.value),1),n("div",Ze,[a[4]||(a[4]=n("span",null,"Less",-1)),(i(),b(I,null,A(k,o=>n("span",{key:o,class:te(["size-3 rounded-[2px] border border-black/5 dark:border-white/10",o])},null,2)),64)),a[5]||(a[5]=n("span",null,"More",-1))])])]),n("div",et,[(i(!0),b(I,null,A(_.value,o=>(i(),b("div",{key:o.date,class:"rounded-md border px-3 py-2"},[n("p",tt,m(o.date),1),n("div",ot,[n("span",nt,m(g.heatMetric==="cost"?("formatCurrency"in t?t.formatCurrency:l(z))(o.costUSD):("formatCompactNumber"in t?t.formatCompactNumber:l($))(o.totalTokens)),1),n("span",at,m(g.heatMetric==="cost"?("formatCompactNumber"in t?t.formatCompactNumber:l($))(o.totalTokens):("formatCurrency"in t?t.formatCurrency:l(z))(o.costUSD)),1)])]))),128))])]),_:1},8,["description","title"])}}}),it=Object.assign(st,{__name:"UsageHeatmapPanel"});export{ut as _,ct as a,it as b};
|