agentgraphed 0.2.2 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.next/standalone/.next/BUILD_ID +1 -1
- package/.next/standalone/.next/app-build-manifest.json +39 -18
- package/.next/standalone/.next/app-path-routes-manifest.json +6 -3
- package/.next/standalone/.next/build-manifest.json +2 -2
- package/.next/standalone/.next/routes-manifest.json +16 -0
- package/.next/standalone/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/_not-found.html +1 -1
- package/.next/standalone/.next/server/app/_not-found.rsc +3 -3
- package/.next/standalone/.next/server/app/analytics/page.js +2 -2
- package/.next/standalone/.next/server/app/analytics/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/analytics/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/ingest-local/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/quota-probe/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/share/dashboard/route.js +1 -0
- package/.next/standalone/.next/server/app/api/share/dashboard/route.js.nft.json +1 -0
- package/.next/standalone/.next/server/app/api/share/dashboard/route_client-reference-manifest.js +1 -0
- package/.next/standalone/.next/server/app/api/share/project/[id]/route.js +1 -0
- package/.next/standalone/.next/server/app/api/share/project/[id]/route.js.nft.json +1 -0
- package/.next/standalone/.next/server/app/api/share/project/[id]/route_client-reference-manifest.js +1 -0
- package/.next/standalone/.next/server/app/api/share/session/[id]/route.js +1 -0
- package/.next/standalone/.next/server/app/api/share/session/[id]/route.js.nft.json +1 -0
- package/.next/standalone/.next/server/app/api/share/session/[id]/route_client-reference-manifest.js +1 -0
- package/.next/standalone/.next/server/app/page.js +46 -2
- package/.next/standalone/.next/server/app/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/projects/[id]/page.js +1 -1
- package/.next/standalone/.next/server/app/projects/[id]/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/projects/[id]/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/projects/page.js +44 -2
- package/.next/standalone/.next/server/app/projects/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/projects/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/sessions/[id]/page.js +3 -10
- package/.next/standalone/.next/server/app/sessions/[id]/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/sessions/[id]/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/sessions/page.js +44 -2
- package/.next/standalone/.next/server/app/sessions/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/sessions/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/settings/page.js +8 -19
- package/.next/standalone/.next/server/app/settings/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/settings/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/timeline/page.js +44 -2
- package/.next/standalone/.next/server/app/timeline/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/timeline/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app-paths-manifest.json +6 -3
- package/.next/standalone/.next/server/chunks/165.js +2 -2
- package/.next/standalone/.next/server/chunks/191.js +1 -0
- package/.next/standalone/.next/server/chunks/367.js +43 -0
- package/.next/standalone/.next/server/chunks/660.js +1 -1
- package/.next/standalone/.next/server/chunks/693.js +1 -0
- package/.next/standalone/.next/server/chunks/837.js +12 -0
- package/.next/standalone/.next/server/chunks/944.js +19 -16
- package/.next/standalone/.next/server/chunks/970.js +9 -0
- package/.next/standalone/.next/server/functions-config-manifest.json +4 -1
- package/.next/standalone/.next/server/pages/404.html +1 -1
- package/.next/standalone/.next/server/pages/500.html +1 -1
- package/.next/standalone/.next/server/server-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/server-reference-manifest.json +1 -1
- package/.next/standalone/.next/static/A6dvfHR2KYz42pasM2hyV/_buildManifest.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/ingest-local/route-3bc0072e65861283.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/quota-probe/route-3bc0072e65861283.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/share/dashboard/route-3bc0072e65861283.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/share/project/[id]/route-3bc0072e65861283.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/share/session/[id]/route-3bc0072e65861283.js +1 -0
- package/.next/standalone/.next/static/chunks/app/layout-4527370a1e451501.js +1 -0
- package/.next/standalone/.next/static/chunks/app/page-aa358006ddd29e91.js +1 -0
- package/.next/standalone/.next/static/chunks/app/projects/[id]/page-15f21aaacdacb59c.js +1 -0
- package/.next/standalone/.next/static/chunks/app/projects/page-d794cc35674274a4.js +1 -0
- package/.next/standalone/.next/static/chunks/app/sessions/[id]/page-a887f742425eb49c.js +1 -0
- package/.next/standalone/.next/static/chunks/app/sessions/page-35c503eef7e53742.js +1 -0
- package/.next/standalone/.next/static/chunks/app/settings/page-dc0bec0bd2577322.js +1 -0
- package/.next/standalone/.next/static/chunks/app/timeline/page-d794cc35674274a4.js +1 -0
- package/.next/standalone/.next/static/css/fff107f5d96e58c9.css +3 -0
- package/.next/standalone/node_modules/next/dist/compiled/@vercel/og/index.node.js +20180 -0
- package/.next/standalone/node_modules/next/dist/compiled/@vercel/og/noto-sans-v27-latin-regular.ttf +0 -0
- package/.next/standalone/node_modules/next/dist/compiled/@vercel/og/package.json +16 -0
- package/.next/standalone/node_modules/next/dist/compiled/@vercel/og/resvg.wasm +0 -0
- package/.next/standalone/node_modules/next/dist/compiled/@vercel/og/yoga.wasm +0 -0
- package/.next/standalone/package.json +2 -1
- package/.next/static/A6dvfHR2KYz42pasM2hyV/_buildManifest.js +1 -0
- package/.next/static/chunks/app/api/ingest-local/route-3bc0072e65861283.js +1 -0
- package/.next/static/chunks/app/api/quota-probe/route-3bc0072e65861283.js +1 -0
- package/.next/static/chunks/app/api/share/dashboard/route-3bc0072e65861283.js +1 -0
- package/.next/static/chunks/app/api/share/project/[id]/route-3bc0072e65861283.js +1 -0
- package/.next/static/chunks/app/api/share/session/[id]/route-3bc0072e65861283.js +1 -0
- package/.next/static/chunks/app/layout-4527370a1e451501.js +1 -0
- package/.next/static/chunks/app/page-aa358006ddd29e91.js +1 -0
- package/.next/static/chunks/app/projects/[id]/page-15f21aaacdacb59c.js +1 -0
- package/.next/static/chunks/app/projects/page-d794cc35674274a4.js +1 -0
- package/.next/static/chunks/app/sessions/[id]/page-a887f742425eb49c.js +1 -0
- package/.next/static/chunks/app/sessions/page-35c503eef7e53742.js +1 -0
- package/.next/static/chunks/app/settings/page-dc0bec0bd2577322.js +1 -0
- package/.next/static/chunks/app/timeline/page-d794cc35674274a4.js +1 -0
- package/.next/static/css/fff107f5d96e58c9.css +3 -0
- package/CHANGELOG.md +23 -0
- package/package.json +2 -1
- package/.next/standalone/.next/static/chunks/app/api/ingest-local/route-db04e57ba4c845d6.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/quota-probe/route-db04e57ba4c845d6.js +0 -1
- package/.next/standalone/.next/static/chunks/app/layout-359f69bd6ea201be.js +0 -1
- package/.next/standalone/.next/static/chunks/app/page-72efdd1b71c43e03.js +0 -1
- package/.next/standalone/.next/static/chunks/app/projects/[id]/page-85ce81e040071814.js +0 -1
- package/.next/standalone/.next/static/chunks/app/projects/page-85ce81e040071814.js +0 -1
- package/.next/standalone/.next/static/chunks/app/sessions/[id]/page-9e268d4cde844722.js +0 -1
- package/.next/standalone/.next/static/chunks/app/sessions/page-caef08af2717f525.js +0 -1
- package/.next/standalone/.next/static/chunks/app/settings/page-e26a7c386e472178.js +0 -1
- package/.next/standalone/.next/static/chunks/app/timeline/page-85ce81e040071814.js +0 -1
- package/.next/standalone/.next/static/css/568a2d3dc76080d7.css +0 -3
- package/.next/standalone/.next/static/x9UWQ4odHhvHvXGtRm2Bl/_buildManifest.js +0 -1
- package/.next/static/chunks/app/api/ingest-local/route-db04e57ba4c845d6.js +0 -1
- package/.next/static/chunks/app/api/quota-probe/route-db04e57ba4c845d6.js +0 -1
- package/.next/static/chunks/app/layout-359f69bd6ea201be.js +0 -1
- package/.next/static/chunks/app/page-72efdd1b71c43e03.js +0 -1
- package/.next/static/chunks/app/projects/[id]/page-85ce81e040071814.js +0 -1
- package/.next/static/chunks/app/projects/page-85ce81e040071814.js +0 -1
- package/.next/static/chunks/app/sessions/[id]/page-9e268d4cde844722.js +0 -1
- package/.next/static/chunks/app/sessions/page-caef08af2717f525.js +0 -1
- package/.next/static/chunks/app/settings/page-e26a7c386e472178.js +0 -1
- package/.next/static/chunks/app/timeline/page-85ce81e040071814.js +0 -1
- package/.next/static/css/568a2d3dc76080d7.css +0 -3
- package/.next/static/x9UWQ4odHhvHvXGtRm2Bl/_buildManifest.js +0 -1
- /package/.next/standalone/.next/static/{x9UWQ4odHhvHvXGtRm2Bl → A6dvfHR2KYz42pasM2hyV}/_ssgManifest.js +0 -0
- /package/.next/static/{x9UWQ4odHhvHvXGtRm2Bl → A6dvfHR2KYz42pasM2hyV}/_ssgManifest.js +0 -0
package/.next/standalone/node_modules/next/dist/compiled/@vercel/og/noto-sans-v27-latin-regular.ttf
ADDED
|
Binary file
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@vercel/og",
|
|
3
|
+
"version": "0.7.2",
|
|
4
|
+
"license": "MPL-2.0",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "./index.node.js",
|
|
7
|
+
"exports": {
|
|
8
|
+
".": {
|
|
9
|
+
"edge-light": "./index.edge.js",
|
|
10
|
+
"import": "./index.node.js",
|
|
11
|
+
"node": "./index.node.js",
|
|
12
|
+
"default": "./index.node.js"
|
|
13
|
+
},
|
|
14
|
+
"./package.json": "./package.json"
|
|
15
|
+
}
|
|
16
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "agentgraphed",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Claude Code usage monitor — local-first analytics dashboard for Claude Code & Codex CLI sessions. See every session, every project, every dollar. No login, no cloud.",
|
|
6
6
|
"keywords": [
|
|
@@ -28,6 +28,7 @@
|
|
|
28
28
|
},
|
|
29
29
|
"scripts": {
|
|
30
30
|
"dev": "node scripts/fetch-pricing.mjs && next dev -p 3737",
|
|
31
|
+
"demo": "AGENTGRAPHED_DEMO_HOME=/Users/dev node scripts/fetch-pricing.mjs && AGENTGRAPHED_DEMO_HOME=/Users/dev next dev -p 3737",
|
|
31
32
|
"build": "node scripts/fetch-pricing.mjs && next build && node scripts/copy-standalone-assets.mjs",
|
|
32
33
|
"prepack": "npm run build",
|
|
33
34
|
"start": "node .next/standalone/server.js",
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
self.__BUILD_MANIFEST=function(e,r,t,_){return{__rewrites:{afterFiles:[],beforeFiles:[],fallback:[]},__routerFilterStatic:{numItems:10,errorRate:1e-4,numBits:192,numHashes:14,bitArray:[1,1,e,e,e,e,e,e,0,0,e,e,e,r,e,e,r,e,r,r,r,r,e,r,r,r,e,r,e,e,r,e,e,r,e,e,e,r,r,e,e,r,e,r,r,r,e,e,r,r,r,e,e,r,r,e,e,e,e,e,e,e,r,r,e,e,r,r,e,r,r,e,e,r,r,e,r,r,e,r,e,e,r,e,e,e,r,e,e,r,e,e,e,e,r,r,e,e,r,r,e,e,r,e,e,r,r,r,e,e,e,r,r,e,e,e,r,r,e,r,r,r,e,e,e,r,r,e,r,e,e,e,r,e,r,e,r,r,r,r,r,e,r,r,e,r,e,e,r,e,e,e,e,e,e,e,e,r,e,e,r,e,r,r,e,e,e,e,r,r,e,r,r,e,r,e,r,r,e,r,r,r,r,r,e,e,r,r,r,r,e,r]},__routerFilterDynamic:{numItems:4,errorRate:1e-4,numBits:77,numHashes:14,bitArray:[r,r,r,r,r,r,e,e,e,r,r,e,e,r,r,e,r,r,r,r,r,e,e,e,r,e,r,e,e,r,e,e,e,e,r,r,e,r,r,r,e,r,e,e,e,r,e,r,r,e,e,r,r,r,r,e,e,e,r,e,r,e,e,e,r,e,e,e,e,r,e,r,r,r,r,e,r]},"/_error":["static/chunks/pages/_error-022e4ac7bbb9914f.js"],sortedPages:["/_app","/_error"]}}(1,0,1e-4,14),self.__BUILD_MANIFEST_CB&&self.__BUILD_MANIFEST_CB();
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[52,341,407,820,934],{84441:()=>{}},_=>{_.O(0,[441,255,358],()=>_(_.s=84441)),_N_E=_.O()}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[52,341,407,820,934],{84441:()=>{}},_=>{_.O(0,[441,255,358],()=>_(_.s=84441)),_N_E=_.O()}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[52,341,407,820,934],{84441:()=>{}},_=>{_.O(0,[441,255,358],()=>_(_.s=84441)),_N_E=_.O()}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[52,341,407,820,934],{84441:()=>{}},_=>{_.O(0,[441,255,358],()=>_(_.s=84441)),_N_E=_.O()}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[52,341,407,820,934],{84441:()=>{}},_=>{_.O(0,[441,255,358],()=>_(_.s=84441)),_N_E=_.O()}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[177],{2821:(e,t,r)=>{"use strict";r.d(t,{A:()=>n});let n=function(){for(var e,t,r=0,n="",a=arguments.length;r<a;r++)(e=arguments[r])&&(t=function e(t){var r,n,a="";if("string"==typeof t||"number"==typeof t)a+=t;else if("object"==typeof t)if(Array.isArray(t)){var s=t.length;for(r=0;r<s;r++)t[r]&&(n=e(t[r]))&&(a&&(a+=" "),a+=n)}else for(n in t)t[n]&&(a&&(a+=" "),a+=n);return a}(e))&&(n&&(n+=" "),n+=t);return n}},13673:()=>{},16078:(e,t,r)=>{Promise.resolve().then(r.t.bind(r,13673,23)),Promise.resolve().then(r.bind(r,82259))},20063:(e,t,r)=>{"use strict";var n=r(47260);r.o(n,"usePathname")&&r.d(t,{usePathname:function(){return n.usePathname}}),r.o(n,"useRouter")&&r.d(t,{useRouter:function(){return n.useRouter}}),r.o(n,"useSearchParams")&&r.d(t,{useSearchParams:function(){return n.useSearchParams}})},82259:(e,t,r)=>{"use strict";r.d(t,{Sidebar:()=>y});var n=r(95155),a=r(52619),s=r.n(a),l=r(20063),o=r(2821),c=r(12115),i=r(47650);function d(e){var t,r,n,a;if(!e||!e.ok)return null;let s=null!=(n=null==(t=e.primary)?void 0:t.pct)?n:null,l=null!=(a=null==(r=e.secondary)?void 0:r.pct)?a:null;return null===s&&null===l?null:Math.max(null!=s?s:0,null!=l?l:0)}function u(e){let t=e-Date.now();if(t<=0&&t>-12e4)return"<1m";if(t<=0)return"resetting";let r=Math.round(t/6e4);if(r<1)return"<1m";if(r<60)return"".concat(r,"m");let n=Math.floor(r/60),a=r%60;return 0===a?"".concat(n,"h"):"".concat(n,"h").concat(a,"m")}function p(){let[e,t]=(0,c.useState)({claude:null,codex:null,fetchedAt:0,loading:!1}),[r,a]=(0,c.useState)(!1),[s,l]=(0,c.useState)(null),o=(0,c.useRef)(null),p=(0,c.useRef)(null);(0,c.useEffect)(()=>{if(!r||!o.current)return;let e=()=>{o.current&&l(o.current.getBoundingClientRect())};return e(),window.addEventListener("scroll",e,!0),window.addEventListener("resize",e),()=>{window.removeEventListener("scroll",e,!0),window.removeEventListener("resize",e)}},[r]);let m=(0,c.useCallback)(async()=>{t(e=>({...e,loading:!0}));let[e,r]=await Promise.all([fetch("/api/quota-probe?provider=claude",{method:"POST"}).then(e=>e.json()).catch(e=>({ok:!1,error:e.message})),fetch("/api/quota-probe?provider=codex",{method:"POST"}).then(e=>e.json()).catch(e=>({ok:!1,error:e.message}))]);t({claude:f("claude",e),codex:f("codex",r),fetchedAt:Date.now(),loading:!1})},[]);function h(){p.current&&clearTimeout(p.current),a(!0),Date.now()-e.fetchedAt>6e4&&!e.loading&&m()}function b(){p.current&&clearTimeout(p.current),p.current=setTimeout(()=>a(!1),120)}return(0,n.jsxs)("div",{ref:o,className:"relative px-3 py-2 border-b border-surface-2",onMouseEnter:h,onMouseLeave:b,onFocus:h,onBlur:b,children:[(0,n.jsxs)("button",{type:"button",onClick:m,className:"w-full flex items-center gap-2 text-[12px] text-ink-dim hover:text-ink","aria-haspopup":"dialog","aria-expanded":r,children:[(0,n.jsx)("span",{className:"w-1.5 h-1.5 rounded-full ".concat(function(e){var t,r;if(0===e.fetchedAt)return"bg-ink-mute";let n=Math.max(null!=(t=d(e.claude))?t:0,null!=(r=d(e.codex))?r:0);return n>=95?"bg-error":n>=80?"bg-secondary":"bg-primary"}(e)," ").concat(e.loading?"animate-pulse":"")}),(0,n.jsx)("span",{className:"font-mono tabular truncate",children:e.loading&&0===e.fetchedAt?"Probing…":function(e){var t;if(0===e.fetchedAt)return"Live quota";let r=d(e.claude);return null!==r&&(null==(t=e.claude)?void 0:t.primary)?"Claude ".concat(Math.round(r),"% \xb7 ").concat(u(e.claude.primary.resetsAt)):"Live quota"}(e)})]}),r&&s&&"undefined"!=typeof document&&(0,i.createPortal)((0,n.jsx)(x,{state:e,loading:e.loading,anchorRect:s,onEnter:h,onLeave:b}),document.body)]})}function x(e){let{state:t,loading:r,anchorRect:a,onEnter:s,onLeave:l}=e,o={position:"fixed",left:a.right+8,top:a.top,backgroundColor:"#1c2026",isolation:"isolate"};return(0,n.jsx)("div",{role:"dialog",onMouseEnter:s,onMouseLeave:l,className:"w-72 z-[9999] rounded-lg border border-surface-3 p-4 space-y-4 shadow-[0_20px_60px_-10px_rgba(0,0,0,0.8)]",style:o,children:r&&0===t.fetchedAt?(0,n.jsx)("div",{className:"text-body-sm text-ink-mute",children:"Probing Anthropic & OpenAI…"}):(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(m,{kpi:t.claude}),(0,n.jsx)("div",{className:"border-t border-surface-2"}),(0,n.jsx)(m,{kpi:t.codex}),(0,n.jsx)("div",{className:"text-[10px] text-ink-mute font-mono tabular pt-1 border-t border-surface-2",children:0===t.fetchedAt?"never probed":"updated ".concat(function(e){let t=Date.now()-e;return t<1e3?"just now":t<6e4?"".concat(Math.round(t/1e3),"s ago"):"".concat(Math.round(t/6e4),"m ago")}(t.fetchedAt)," \xb7 hover again after 60s to refresh")})]})})}function m(e){let{kpi:t}=e;if(!t)return(0,n.jsx)("div",{className:"text-body-sm text-ink-mute",children:"No data."});let r="claude"===t.provider?"Claude":"Codex";return(0,n.jsxs)("div",{className:"space-y-2",children:[(0,n.jsxs)("div",{className:"flex items-baseline justify-between",children:[(0,n.jsx)("span",{className:"text-label-caps text-ink-dim",children:r}),t.ok&&t.planType&&(0,n.jsx)("span",{className:"text-[10px] text-ink-mute font-mono uppercase tracking-wide",children:t.planType})]}),t.ok?(0,n.jsxs)(n.Fragment,{children:[t.primary&&(0,n.jsx)(h,{label:t.primary.label,pct:t.primary.pct,resetsAt:t.primary.resetsAt,accent:"primary"}),t.secondary&&(0,n.jsx)(h,{label:t.secondary.label,pct:t.secondary.pct,resetsAt:t.secondary.resetsAt,accent:"secondary"}),!t.primary&&!t.secondary&&(0,n.jsx)("div",{className:"text-body-sm text-ink-mute",children:"No rate-limit headers returned."})]}):(0,n.jsx)("div",{className:"text-[11px] text-ink-mute leading-relaxed",children:t.error})]})}function h(e){let{label:t,pct:r,resetsAt:a,accent:s}=e;return(0,n.jsxs)("div",{children:[(0,n.jsxs)("div",{className:"flex items-baseline justify-between text-body-sm",children:[(0,n.jsx)("span",{className:"text-ink font-mono uppercase tracking-wider text-[10px]",children:t}),(0,n.jsxs)("span",{className:"font-mono tabular text-ink",children:[Math.round(r),"%"]})]}),(0,n.jsx)("div",{className:"h-1 bg-surface-2 rounded-full overflow-hidden mt-1",children:(0,n.jsx)("div",{className:"h-full ".concat("primary"===s?"bg-primary":"bg-secondary"),style:{width:"".concat(Math.min(100,Math.max(0,r)),"%")}})}),(0,n.jsxs)("div",{className:"text-[10px] text-ink-mute font-mono tabular mt-0.5",children:["resets in ",u(a)]})]})}function f(e,t){if(!t||!("ok"in t))return{provider:e,ok:!1,observedAt:Date.now(),planType:null,primary:null,secondary:null,error:"unexpected response"};if(!t.ok)return{provider:e,ok:!1,observedAt:Date.now(),planType:null,primary:null,secondary:null,error:t.error};let r=t.snapshot;return{provider:e,ok:!0,observedAt:r.observedAt,planType:r.planType,primary:r.primary?{pct:r.primary.pct,resetsAt:r.primary.resetsAt,label:"claude"===e?"5h":"1m"}:null,secondary:r.secondary?{pct:r.secondary.pct,resetsAt:r.secondary.resetsAt,label:"7d"}:null}}let b=[{href:"/",label:"Dashboard",icon:"◧"},{href:"/timeline",label:"Timeline",icon:"☰"},{href:"/projects",label:"Projects",icon:"▦"},{href:"/sessions",label:"Sessions",icon:"⌘"},{href:"/analytics",label:"Analytics",icon:"⌁"}];function y(){let e=(0,l.usePathname)();return(0,n.jsxs)("aside",{className:"w-56 shrink-0 border-r border-surface-2 bg-surface-0 flex flex-col sticky top-0 h-screen self-start",children:[(0,n.jsxs)("div",{className:"px-5 border-b border-surface-2 h-[72px] flex flex-col justify-center",children:[(0,n.jsxs)("div",{className:"flex items-baseline gap-1.5 leading-none",children:[(0,n.jsx)("span",{className:"text-primary text-base",children:"◧"}),(0,n.jsxs)("span",{className:"text-lg font-bold tracking-tight",children:[(0,n.jsx)("span",{className:"text-ink-dim",children:"Agent"}),(0,n.jsx)("span",{className:"text-primary",children:"Graphed"})]})]}),(0,n.jsx)("div",{className:"text-[10px] uppercase tracking-wider text-ink-mute mt-1.5",children:"See your AI work"})]}),(0,n.jsx)(p,{}),(0,n.jsx)("nav",{className:"px-2 py-3 flex-1 flex flex-col gap-0.5",children:b.map(t=>{let r="/"===t.href?"/"===e:e.startsWith(t.href);return(0,n.jsxs)(s(),{href:t.href,className:(0,o.A)("flex items-center gap-3 px-3 py-2 rounded text-[13px] transition-colors",r?"bg-surface-2 text-primary border-l-2 border-primary -ml-px":"text-ink-dim hover:text-ink hover:bg-surface-1"),children:[(0,n.jsx)("span",{className:"text-base w-4 text-center opacity-80",children:t.icon}),(0,n.jsx)("span",{children:t.label})]},t.href)})}),(0,n.jsx)("div",{className:"px-2 py-3 border-t border-surface-2",children:(0,n.jsxs)(s(),{href:"/settings",className:(0,o.A)("flex items-center gap-3 px-3 py-2 rounded text-[13px] transition-colors",e.startsWith("/settings")?"bg-surface-2 text-primary border-l-2 border-primary -ml-px":"text-ink-dim hover:text-ink hover:bg-surface-1"),children:[(0,n.jsx)("span",{className:"text-base w-4 text-center opacity-80",children:"⚙"}),(0,n.jsx)("span",{children:"Settings"})]})})]})}}},e=>{e.O(0,[978,619,441,255,358],()=>e(e.s=16078)),_N_E=e.O()}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[974],{2278:(e,t,r)=>{Promise.resolve().then(r.t.bind(r,52619,23)),Promise.resolve().then(r.bind(r,15433)),Promise.resolve().then(r.bind(r,34077)),Promise.resolve().then(r.bind(r,74050)),Promise.resolve().then(r.bind(r,61438)),Promise.resolve().then(r.bind(r,95925)),Promise.resolve().then(r.bind(r,17834)),Promise.resolve().then(r.bind(r,29366))},15433:(e,t,r)=>{"use strict";r.d(t,{ClassifyChip:()=>a});var n=r(95155),o=r(12115),s=r(20063),i=r(25511);function a(e){let{count:t,estimatedUsd:r}=e,a=(0,s.useRouter)(),[l,c]=(0,o.useState)("idle"),[d,u]=(0,o.useState)(null),[m,p]=(0,o.useState)(null),[h,x]=(0,o.useTransition)(),f=()=>{if("idle"===l)return void c("confirm");"confirm"===l&&x(async()=>{let e=await (0,i.v)("uncategorized");if(!e.ok){u(e.error),c("err"),setTimeout(()=>c("idle"),4e3);return}p({classified:e.classified,costUsd:e.costUsd}),c("done"),a.refresh(),setTimeout(()=>c("idle"),3e3)})};return"done"===l&&m?(0,n.jsxs)("div",{className:"text-[11px] font-mono px-2 py-0.5 rounded bg-secondary/10 text-secondary border border-secondary/30",children:["✓ classified ",m.classified," \xb7 $",m.costUsd.toFixed(4)]}):"err"===l?(0,n.jsx)("div",{className:"text-[11px] font-mono px-2 py-0.5 rounded bg-error/10 text-error border border-error/30",title:null!=d?d:"",children:"✗ failed"}):"confirm"===l?(0,n.jsx)("button",{onClick:f,disabled:h,className:"text-[11px] font-mono px-2 py-0.5 rounded bg-primary/15 text-primary border border-primary/40 hover:bg-primary/25 transition-colors disabled:opacity-60",title:"Click again to confirm — sends prompts to your configured provider",children:h?"… classifying":"confirm \xb7 run for ~$".concat(r.toFixed(4))}):(0,n.jsxs)("button",{onClick:f,className:"text-[11px] font-mono px-2 py-0.5 rounded text-ink-mute hover:text-primary hover:bg-surface-2 transition-colors",title:"Send their first prompts to your configured LLM to assign a title + category. ~$0.0001 per session.",children:[t," unclassified \xb7 classify"]})}},17834:(e,t,r)=>{"use strict";r.d(t,{ShareButton:()=>s});var n=r(95155),o=r(12115);function s(e){let{imageUrl:t,className:r}=e,[s,c]=(0,o.useState)("idle"),[d,u]=(0,o.useState)(null),m=async()=>{c("busy"),u(null);try{var e;let r=await fetch(t);if(!r.ok)throw Error("HTTP ".concat(r.status));let n=await r.blob();if("undefined"==typeof ClipboardItem||!(null==(e=navigator.clipboard)?void 0:e.write))throw Error("clipboard image unsupported");let o=new ClipboardItem({"image/png":n});await navigator.clipboard.write([o]),c("done"),setTimeout(()=>c("idle"),2400)}catch(e){try{let e=await fetch(t),r=await e.blob(),n=URL.createObjectURL(r),o=document.createElement("a");o.href=n,o.download="agentgraphed-stats.png",document.body.appendChild(o),o.click(),document.body.removeChild(o),setTimeout(()=>URL.revokeObjectURL(n),5e3),u("Saved to Downloads (clipboard image unsupported)"),c("err"),setTimeout(()=>c("idle"),4e3)}catch(t){u(t.message||e.message),c("err"),setTimeout(()=>c("idle"),3e3)}}};return(0,n.jsx)("button",{onClick:m,disabled:"busy"===s,"aria-label":"Share",title:"busy"===s?"Generating image…":"done"===s?"Image copied to clipboard":"err"===s?null!=d?d:"Try again":"Copy share image to clipboard",className:"btn-icon ".concat("done"===s?"text-secondary":""," ").concat(null!=r?r:""),children:"busy"===s?(0,n.jsx)(l,{}):"done"===s?(0,n.jsx)(a,{}):(0,n.jsx)(i,{})})}function i(){return(0,n.jsxs)("svg",{width:"17",height:"17",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.4",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,n.jsx)("path",{d:"M4 12v8a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-8"}),(0,n.jsx)("polyline",{points:"16 6 12 2 8 6"}),(0,n.jsx)("line",{x1:"12",y1:"2",x2:"12",y2:"15"})]})}function a(){return(0,n.jsx)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:(0,n.jsx)("polyline",{points:"20 6 9 17 4 12"})})}function l(){return(0,n.jsx)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"animate-spin",children:(0,n.jsx)("path",{d:"M21 12a9 9 0 1 1-6.219-8.56"})})}},20467:(e,t,r)=>{"use strict";function n(e){return e>=1e6?"".concat((e/1e6).toFixed(1),"M"):e>=1e3?"".concat((e/1e3).toFixed(1),"k"):e.toString()}function o(e){return e>=1e3?"$".concat(e.toFixed(0)):"$".concat(e.toFixed(2))}function s(e){let t=Math.floor(e/1e3);if(t<60)return"".concat(t,"s");let r=Math.floor(t/60);if(r<60)return"".concat(r,"m");let n=Math.floor(r/60);return"".concat(n,"h ").concat(r%60,"m")}r.d(t,{F0:()=>o,c5:()=>s,yj:()=>n})},25511:(e,t,r)=>{"use strict";r.d(t,{v:()=>o});var n=r(30926);let o=(0,n.createServerReference)("40ebbe581be2d6a1560853a1f470f6bef259ff3ce0",n.callServer,void 0,n.findSourceMapURL,"classifyAction")},29366:(e,t,r)=>{"use strict";r.d(t,{UsageChartCard:()=>x});var n=r(95155),o=r(12115),s=r(20063),i=r(26991),a=r(73850),l=r(68425),c=r(47734),d=r(73697),u=r(23508),m=r(77568),p=r(20467);function h(e){let{data:t,metric:r="tokens",scale:o="lin"}=e,s=t.map(e=>{let t=e[r];return{...e,label:e.day.slice(5),value:"log"===o&&t<=0?1:t,raw:t}}),h="cost"===r?"#00ffab":"#00f5ff";return(0,n.jsx)("div",{className:"h-64 -mx-1",children:(0,n.jsx)(i.u,{width:"100%",height:"100%",children:(0,n.jsxs)(a.Q,{data:s,margin:{top:8,right:8,bottom:0,left:-8},children:[(0,n.jsx)("defs",{children:(0,n.jsxs)("linearGradient",{id:"grad-".concat(r),x1:"0",y1:"0",x2:"0",y2:"1",children:[(0,n.jsx)("stop",{offset:"0%",stopColor:h,stopOpacity:.35}),(0,n.jsx)("stop",{offset:"100%",stopColor:h,stopOpacity:0})]})}),(0,n.jsx)(l.d,{stroke:"#262a31",strokeDasharray:"2 4",vertical:!1}),(0,n.jsx)(c.W,{dataKey:"label",tick:{fill:"#849495",fontSize:11,fontFamily:"JetBrains Mono"},axisLine:{stroke:"#262a31"},tickLine:!1,minTickGap:48}),(0,n.jsx)(d.h,{scale:"log"===o?"log":"auto",domain:"log"===o?[1,"auto"]:["auto","auto"],allowDataOverflow:!0,tick:{fill:"#849495",fontSize:11,fontFamily:"JetBrains Mono"},axisLine:!1,tickLine:!1,tickFormatter:e=>"cost"===r?"$".concat(Math.round(e)):(0,p.yj)(e)}),(0,n.jsx)(u.m,{cursor:{stroke:h,strokeOpacity:.3},contentStyle:{background:"#181c22",border:"1px solid ".concat(h),borderRadius:6,fontSize:12,color:"#dfe2eb"},formatter:(e,t,n)=>{var o,s;let i=null!=(s=null==n||null==(o=n.payload)?void 0:o.raw)?s:0;return"tokens"===r?[(0,p.yj)(i),"tokens"]:"sessions"===r?[i.toString(),"sessions"]:["$".concat(i.toFixed(2)),"cost"]},labelFormatter:e=>"Day ".concat(e)}),(0,n.jsx)(m.G,{type:"monotone",dataKey:"value",stroke:h,strokeWidth:2,fill:"url(#grad-".concat(r,")"),isAnimationActive:!1})]})})})}function x(e){let{data:t,label:r="last 30 days",metric:i,scale:a}=e,l=(0,s.useRouter)(),c=(0,s.usePathname)(),d=(0,s.useSearchParams)(),u=(0,o.useMemo)(()=>!function(e,t){let r=e.map(e=>e[t]).filter(e=>e>0);if(r.length<5)return!1;let n=[...r].sort((e,t)=>e-t);return n[n.length-1]/Math.max(n[Math.floor(n.length/2)],1)>10}(t,i)?"lin":"log",[t,i]),m=null!=a?a:u,p=(e,t,r)=>{let n=new URLSearchParams(d.toString());null===t||t===r?n.delete(e):n.set(e,t);let o=n.toString();l.push(o?"".concat(c,"?").concat(o):c,{scroll:!1})};return(0,n.jsxs)("div",{className:"card",children:[(0,n.jsxs)("div",{className:"card-header flex items-center justify-between",children:[(0,n.jsxs)("span",{children:["Usage — ",r]}),(0,n.jsxs)("div",{className:"flex items-center gap-3 normal-case tracking-normal",children:[(0,n.jsx)("div",{className:"flex items-center gap-0.5",children:[{id:"tokens",label:"Tokens"},{id:"sessions",label:"Sessions"},{id:"cost",label:"Est. Cost"}].map(e=>(0,n.jsx)("button",{onClick:()=>p("metric",e.id,"tokens"),className:"px-2 py-0.5 text-[11px] rounded transition-colors font-mono ".concat(i===e.id?"bg-primary/15 text-primary":"text-ink-mute hover:text-ink-dim"),children:e.label},e.id))}),(0,n.jsx)("div",{className:"w-px h-4 bg-surface-3"}),(0,n.jsx)("div",{className:"flex items-center gap-0.5",children:["lin","log"].map(e=>(0,n.jsxs)("button",{onClick:()=>p("scale",e,u),className:"px-1.5 py-0.5 text-[10px] rounded transition-colors font-mono uppercase relative ".concat(m===e?"bg-secondary/15 text-secondary":"text-ink-mute hover:text-ink-dim"),title:"log"===e?"Logarithmic scale — better when one day dwarfs the rest":"Linear scale",children:[e,null===a&&u===e&&(0,n.jsx)("span",{className:"absolute -top-0.5 -right-0.5 w-1.5 h-1.5 rounded-full bg-secondary",title:"auto-selected based on data range"})]},e))})]})]}),(0,n.jsx)("div",{className:"p-4",children:(0,n.jsx)(h,{data:t,metric:i,scale:m})})]})}},30926:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),!function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{callServer:function(){return n.callServer},createServerReference:function(){return s.createServerReference},findSourceMapURL:function(){return o.findSourceMapURL}});let n=r(41209),o=r(85153),s=r(77197)},34077:(e,t,r)=>{"use strict";r.d(t,{FreshnessIndicator:()=>i});var n=r(95155),o=r(12115),s=r(20063);function i(e){let{lastIngestedAt:t}=e,[,r]=(0,o.useState)(0),[i,c]=(0,o.useState)(!1),[d,u]=(0,o.useTransition)(),m=(0,s.useRouter)();(0,o.useEffect)(()=>{let e=setInterval(()=>r(e=>e+1),5e3);return()=>clearInterval(e)},[]);let p=0===t?"never scanned":"updated ".concat(function(e){let t=Date.now()-e;return t<1e3?"just now":t<6e4?"".concat(l(Math.round(t/1e3)),"s"):t<36e5?"".concat(l(Math.round(t/6e4)),"m"):"".concat(l(Math.round(t/36e5)),"h")}(t)," ago"),h=0===t,x=i||d;return(0,n.jsxs)("button",{type:"button",onClick:function(){u(()=>m.refresh())},onMouseEnter:()=>c(!0),onMouseLeave:()=>c(!1),onFocus:()=>c(!0),onBlur:()=>c(!1),disabled:h||d,title:"Re-scan local sessions and refresh",style:{width:"128px"},className:"text-[11px] font-mono tabular px-2 py-0.5 rounded transition-colors text-ink-mute hover:text-primary hover:bg-surface-2 focus-visible:text-primary focus-visible:bg-surface-2 outline-none disabled:opacity-50 disabled:hover:bg-transparent disabled:hover:text-ink-mute disabled:cursor-not-allowed grid items-center",children:[(0,n.jsx)("span",{className:"col-start-1 row-start-1 transition-opacity flex items-center justify-center gap-1.5 whitespace-nowrap",style:{opacity:+!x},children:p}),(0,n.jsxs)("span",{"aria-hidden":!0,className:"col-start-1 row-start-1 transition-opacity flex items-center justify-center gap-1.5 whitespace-nowrap",style:{opacity:+!!x},children:[(0,n.jsx)(a,{spinning:d}),(0,n.jsx)("span",{children:"refresh"})]})]})}function a(e){let{spinning:t}=e;return(0,n.jsxs)("svg",{width:"11",height:"11",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",className:t?"animate-spin":"",children:[(0,n.jsx)("path",{d:"M3 12a9 9 0 0 1 15.5-6.4L21 8"}),(0,n.jsx)("path",{d:"M21 3v5h-5"}),(0,n.jsx)("path",{d:"M21 12a9 9 0 0 1-15.5 6.4L3 16"}),(0,n.jsx)("path",{d:"M3 21v-5h5"})]})}function l(e){return e<10?"0".concat(e):String(e)}},61438:(e,t,r)=>{"use strict";r.d(t,{ProjectFilter:()=>a});var n=r(95155),o=r(20063),s=r(12115),i=r(47650);function a(e){var t,r;let{projects:a,current:l}=e,c=(0,o.useRouter)(),d=(0,o.usePathname)(),u=(0,o.useSearchParams)(),[m,p]=(0,s.useState)(!1),[h,x]=(0,s.useTransition)(),[f,y]=(0,s.useState)(!1),[b,v]=(0,s.useState)(null),g=(0,s.useRef)(null);(0,s.useEffect)(()=>y(!0),[]);let k=e=>{let t=new URLSearchParams(u.toString());e?t.set("project",e):t.delete("project");let r=t.toString();p(!1),x(()=>c.push(r?"".concat(d,"?").concat(r):d,{scroll:!1}))},j=l?null!=(r=null==(t=a.find(e=>e.id===l))?void 0:t.name)?r:"project":null;return(0,s.useEffect)(()=>{if(!m)return;let e=e=>{var t;let r=e.target;if(null==(t=g.current)?void 0:t.contains(r))return;let n=document.getElementById("project-filter-pop");null!=n&&n.contains(r)||p(!1)},t=e=>{"Escape"===e.key&&p(!1)};return window.addEventListener("mousedown",e),window.addEventListener("keydown",t),()=>{window.removeEventListener("mousedown",e),window.removeEventListener("keydown",t)}},[m]),(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("button",{ref:g,onClick:()=>{if(!m&&g.current){let e=g.current.getBoundingClientRect();v({top:e.bottom+6,left:e.left,width:Math.max(e.width,220)})}p(e=>!e)},className:"text-[11px] font-mono px-2 py-0.5 rounded transition-colors flex items-center gap-1.5 ".concat(l?"bg-primary/15 text-primary":"text-ink-mute hover:text-ink-dim hover:bg-surface-2"," ").concat(h?"opacity-60":""),title:"Filter by project",children:[(0,n.jsx)("svg",{width:"11",height:"11",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:(0,n.jsx)("path",{d:"M22 19a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h5l2 3h9a2 2 0 0 1 2 2z"})}),(0,n.jsx)("span",{className:"truncate max-w-[140px]",children:null!=j?j:"All projects"}),(0,n.jsx)("svg",{width:"8",height:"8",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"3",strokeLinecap:"round",strokeLinejoin:"round",className:"transition-transform ".concat(m?"rotate-180":""),children:(0,n.jsx)("polyline",{points:"6 9 12 15 18 9"})})]}),f&&m&&b&&(0,i.createPortal)((0,n.jsxs)("div",{id:"project-filter-pop",style:{position:"fixed",top:b.top,left:b.left,minWidth:b.width,backgroundColor:"#1c2026",zIndex:100,isolation:"isolate"},className:"border border-surface-3 rounded-md shadow-xl overflow-hidden text-[12px] font-mono max-h-[60vh] overflow-y-auto",children:[(0,n.jsx)("button",{onClick:()=>k(null),className:"w-full text-left px-3 py-2 transition-colors hover:bg-surface-2 ".concat(l?"text-ink-dim":"text-primary bg-primary/10"),children:"All projects"}),(0,n.jsx)("div",{className:"h-px bg-surface-3"}),a.map(e=>(0,n.jsx)("button",{onClick:()=>k(e.id),className:"w-full text-left px-3 py-2 transition-colors hover:bg-surface-2 truncate ".concat(l===e.id?"text-primary bg-primary/10":"text-ink-dim"),title:e.name,children:e.name},e.id)),0===a.length&&(0,n.jsx)("div",{className:"px-3 py-2 text-ink-mute",children:"No projects yet."})]}),document.body)]})}},74050:(e,t,r)=>{"use strict";r.d(t,{ModelFilter:()=>a});var n=r(95155),o=r(20063),s=r(12115),i=r(47650);function a(e){let{families:t,current:r}=e,a=(0,o.useRouter)(),l=(0,o.usePathname)(),c=(0,o.useSearchParams)(),[d,u]=(0,s.useState)(!1),[m,p]=(0,s.useTransition)(),[h,x]=(0,s.useState)(!1),[f,y]=(0,s.useState)(null),b=(0,s.useRef)(null);(0,s.useEffect)(()=>x(!0),[]);let v=e=>{let t=new URLSearchParams(c.toString());e?t.set("model",e):t.delete("model");let r=t.toString();u(!1),p(()=>a.push(r?"".concat(l,"?").concat(r):l,{scroll:!1}))};return(0,s.useEffect)(()=>{if(!d)return;let e=e=>{var t;let r=e.target;if(null==(t=b.current)?void 0:t.contains(r))return;let n=document.getElementById("model-filter-pop");null!=n&&n.contains(r)||u(!1)},t=e=>{"Escape"===e.key&&u(!1)};return window.addEventListener("mousedown",e),window.addEventListener("keydown",t),()=>{window.removeEventListener("mousedown",e),window.removeEventListener("keydown",t)}},[d]),(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("button",{ref:b,onClick:()=>{if(!d&&b.current){let e=b.current.getBoundingClientRect();y({top:e.bottom+6,left:e.left,width:Math.max(e.width,200)})}u(e=>!e)},className:"text-[11px] font-mono px-2 py-0.5 rounded transition-colors flex items-center gap-1.5 ".concat(r?"bg-primary/15 text-primary":"text-ink-mute hover:text-ink-dim hover:bg-surface-2"," ").concat(m?"opacity-60":""),title:"Filter by model",children:[(0,n.jsxs)("svg",{width:"11",height:"11",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,n.jsx)("circle",{cx:"12",cy:"12",r:"4"}),(0,n.jsx)("path",{d:"M12 2v2M12 20v2M2 12h2M20 12h2M4.9 4.9l1.4 1.4M17.7 17.7l1.4 1.4M4.9 19.1l1.4-1.4M17.7 6.3l1.4-1.4"})]}),(0,n.jsx)("span",{className:"truncate max-w-[140px]",children:null!=r?r:"All models"}),(0,n.jsx)("svg",{width:"8",height:"8",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"3",strokeLinecap:"round",strokeLinejoin:"round",className:"transition-transform ".concat(d?"rotate-180":""),children:(0,n.jsx)("polyline",{points:"6 9 12 15 18 9"})})]}),h&&d&&f&&(0,i.createPortal)((0,n.jsxs)("div",{id:"model-filter-pop",style:{position:"fixed",top:f.top,left:f.left,minWidth:f.width,backgroundColor:"#1c2026",zIndex:100,isolation:"isolate"},className:"border border-surface-3 rounded-md shadow-xl overflow-hidden text-[12px] font-mono max-h-[60vh] overflow-y-auto",children:[(0,n.jsx)("button",{onClick:()=>v(null),className:"w-full text-left px-3 py-2 transition-colors hover:bg-surface-2 ".concat(r?"text-ink-dim":"text-primary bg-primary/10"),children:"All models"}),(0,n.jsx)("div",{className:"h-px bg-surface-3"}),t.map(e=>(0,n.jsxs)("button",{onClick:()=>v(e.family),className:"w-full text-left px-3 py-2 transition-colors hover:bg-surface-2 flex items-center justify-between gap-3 ".concat(r===e.family?"text-primary bg-primary/10":"text-ink-dim"),title:e.family,children:[(0,n.jsx)("span",{className:"truncate",children:e.family}),(0,n.jsx)("span",{className:"text-ink-mute text-[10px] tabular",children:e.sessions})]},e.family)),0===t.length&&(0,n.jsx)("div",{className:"px-3 py-2 text-ink-mute",children:"No models seen yet."})]}),document.body)]})}},95925:(e,t,r)=>{"use strict";r.d(t,{RangePicker:()=>a});var n=r(95155),o=r(20063),s=r(12115);let i=[{key:"7d",label:"Last 7 days",days:7},{key:"30d",label:"Last 30 days",days:30},{key:"90d",label:"Last 90 days",days:90},{key:"all",label:"All time",days:null}];function a(e){let{current:t}=e,r=(0,o.useRouter)(),a=(0,o.usePathname)(),l=(0,o.useSearchParams)(),[c,d]=(0,s.useTransition)();return(0,n.jsx)("div",{className:"flex items-center gap-0.5 normal-case tracking-normal transition-opacity ".concat(c?"opacity-50":""),children:i.map(e=>(0,n.jsx)("button",{onClick:()=>(e=>{let t=new URLSearchParams(l.toString());"30d"===e?t.delete("range"):t.set("range",e);let n=t.toString();d(()=>{r.push(n?"".concat(a,"?").concat(n):a)})})(e.key),className:"px-2 py-0.5 text-[11px] rounded transition-colors font-mono ".concat(t===e.key?"bg-primary/15 text-primary":"text-ink-mute hover:text-ink-dim"),children:"all"===e.key?"All":e.key},e.key))})}}},e=>{e.O(0,[619,997,441,255,358],()=>e(e.s=2278)),_N_E=e.O()}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[801],{16500:(e,t,o)=>{Promise.resolve().then(o.t.bind(o,52619,23)),Promise.resolve().then(o.bind(o,17834))},17834:(e,t,o)=>{"use strict";o.d(t,{ShareButton:()=>r});var n=o(95155),i=o(12115);function r(e){let{imageUrl:t,className:o}=e,[r,d]=(0,i.useState)("idle"),[c,u]=(0,i.useState)(null),h=async()=>{d("busy"),u(null);try{var e;let o=await fetch(t);if(!o.ok)throw Error("HTTP ".concat(o.status));let n=await o.blob();if("undefined"==typeof ClipboardItem||!(null==(e=navigator.clipboard)?void 0:e.write))throw Error("clipboard image unsupported");let i=new ClipboardItem({"image/png":n});await navigator.clipboard.write([i]),d("done"),setTimeout(()=>d("idle"),2400)}catch(e){try{let e=await fetch(t),o=await e.blob(),n=URL.createObjectURL(o),i=document.createElement("a");i.href=n,i.download="agentgraphed-stats.png",document.body.appendChild(i),i.click(),document.body.removeChild(i),setTimeout(()=>URL.revokeObjectURL(n),5e3),u("Saved to Downloads (clipboard image unsupported)"),d("err"),setTimeout(()=>d("idle"),4e3)}catch(t){u(t.message||e.message),d("err"),setTimeout(()=>d("idle"),3e3)}}};return(0,n.jsx)("button",{onClick:h,disabled:"busy"===r,"aria-label":"Share",title:"busy"===r?"Generating image…":"done"===r?"Image copied to clipboard":"err"===r?null!=c?c:"Try again":"Copy share image to clipboard",className:"btn-icon ".concat("done"===r?"text-secondary":""," ").concat(null!=o?o:""),children:"busy"===r?(0,n.jsx)(l,{}):"done"===r?(0,n.jsx)(s,{}):(0,n.jsx)(a,{})})}function a(){return(0,n.jsxs)("svg",{width:"17",height:"17",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.4",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,n.jsx)("path",{d:"M4 12v8a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-8"}),(0,n.jsx)("polyline",{points:"16 6 12 2 8 6"}),(0,n.jsx)("line",{x1:"12",y1:"2",x2:"12",y2:"15"})]})}function s(){return(0,n.jsx)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:(0,n.jsx)("polyline",{points:"20 6 9 17 4 12"})})}function l(){return(0,n.jsx)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"animate-spin",children:(0,n.jsx)("path",{d:"M21 12a9 9 0 1 1-6.219-8.56"})})}}},e=>{e.O(0,[619,441,255,358],()=>e(e.s=16500)),_N_E=e.O()}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[404,893],{8724:(e,s,_)=>{Promise.resolve().then(_.t.bind(_,52619,23))}},e=>{e.O(0,[619,441,255,358],()=>e(e.s=8724)),_N_E=e.O()}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[824],{17834:(e,t,n)=>{"use strict";n.d(t,{ShareButton:()=>o});var r=n(95155),i=n(12115);function o(e){let{imageUrl:t,className:n}=e,[o,l]=(0,i.useState)("idle"),[d,u]=(0,i.useState)(null),h=async()=>{l("busy"),u(null);try{var e;let n=await fetch(t);if(!n.ok)throw Error("HTTP ".concat(n.status));let r=await n.blob();if("undefined"==typeof ClipboardItem||!(null==(e=navigator.clipboard)?void 0:e.write))throw Error("clipboard image unsupported");let i=new ClipboardItem({"image/png":r});await navigator.clipboard.write([i]),l("done"),setTimeout(()=>l("idle"),2400)}catch(e){try{let e=await fetch(t),n=await e.blob(),r=URL.createObjectURL(n),i=document.createElement("a");i.href=r,i.download="agentgraphed-stats.png",document.body.appendChild(i),i.click(),document.body.removeChild(i),setTimeout(()=>URL.revokeObjectURL(r),5e3),u("Saved to Downloads (clipboard image unsupported)"),l("err"),setTimeout(()=>l("idle"),4e3)}catch(t){u(t.message||e.message),l("err"),setTimeout(()=>l("idle"),3e3)}}};return(0,r.jsx)("button",{onClick:h,disabled:"busy"===o,"aria-label":"Share",title:"busy"===o?"Generating image…":"done"===o?"Image copied to clipboard":"err"===o?null!=d?d:"Try again":"Copy share image to clipboard",className:"btn-icon ".concat("done"===o?"text-secondary":""," ").concat(null!=n?n:""),children:"busy"===o?(0,r.jsx)(c,{}):"done"===o?(0,r.jsx)(s,{}):(0,r.jsx)(a,{})})}function a(){return(0,r.jsxs)("svg",{width:"17",height:"17",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.4",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,r.jsx)("path",{d:"M4 12v8a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-8"}),(0,r.jsx)("polyline",{points:"16 6 12 2 8 6"}),(0,r.jsx)("line",{x1:"12",y1:"2",x2:"12",y2:"15"})]})}function s(){return(0,r.jsx)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:(0,r.jsx)("polyline",{points:"20 6 9 17 4 12"})})}function c(){return(0,r.jsx)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"animate-spin",children:(0,r.jsx)("path",{d:"M21 12a9 9 0 1 1-6.219-8.56"})})}},30926:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),!function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{callServer:function(){return r.callServer},createServerReference:function(){return o.createServerReference},findSourceMapURL:function(){return i.findSourceMapURL}});let r=n(41209),i=n(85153),o=n(77197)},36960:(e,t,n)=>{Promise.resolve().then(n.t.bind(n,52619,23)),Promise.resolve().then(n.bind(n,44782)),Promise.resolve().then(n.bind(n,95828)),Promise.resolve().then(n.bind(n,17834))},44782:(e,t,n)=>{"use strict";n.d(t,{ResumePanel:()=>o});var r=n(95155),i=n(12115);function o(e){let{provider:t,cwd:n,sessionId:o}=e,[c,l]=(0,i.useState)(!1),d=function(e,t,n){let r='cd "'.concat(t,'"');return"claude"===e?"".concat(r," && claude --resume ").concat(n):"codex"===e?"".concat(r," && codex resume ").concat(n):r}(t,n,o),u=async()=>{await navigator.clipboard.writeText(d),l(!0),setTimeout(()=>l(!1),2e3)};return(0,r.jsxs)("div",{className:"card",children:[(0,r.jsxs)("div",{className:"card-header flex items-center justify-between",children:[(0,r.jsx)("span",{children:"Resume in your terminal"}),(0,r.jsxs)("span",{className:"normal-case tracking-normal font-normal text-ink-mute text-[11px]",children:["paste into ","claude"===t?"Claude Code":"codex"===t?"Codex CLI":t]})]}),(0,r.jsxs)("div",{className:"p-3 flex items-stretch gap-2",children:[(0,r.jsx)("code",{className:"flex-1 bg-canvas border border-surface-3 rounded px-3 py-2 font-mono text-code-sm text-ink-dim overflow-x-auto whitespace-nowrap leading-relaxed",title:d,children:d}),(0,r.jsx)("button",{onClick:u,className:"btn ".concat(c?"text-secondary":""," flex-shrink-0"),title:"Copy command to clipboard",children:c?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(s,{}),(0,r.jsx)("span",{children:"Copied"})]}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(a,{}),(0,r.jsx)("span",{children:"Copy"})]})})]})]})}function a(){return(0,r.jsxs)("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,r.jsx)("rect",{x:"9",y:"9",width:"13",height:"13",rx:"2",ry:"2"}),(0,r.jsx)("path",{d:"M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"})]})}function s(){return(0,r.jsx)("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:(0,r.jsx)("polyline",{points:"20 6 9 17 4 12"})})}},95828:(e,t,n)=>{"use strict";n.d(t,{SessionActions:()=>l});var r=n(95155),i=n(12115),o=n(52619),a=n.n(o),s=n(30926);let c=(0,s.createServerReference)("409df161bd853257579b553d81125acb8a9b5b40c8",s.callServer,void 0,s.findSourceMapURL,"generateContextAction");function l(e){let{sessionId:t,hasLlmKey:n,cachedContext:o}=e,[s,l]=(0,i.useState)(o),[d,u]=(0,i.useState)(!1),[h,x]=(0,i.useState)(null),[m,p]=(0,i.useState)(null),[b,f]=(0,i.useTransition)();return(0,r.jsxs)("div",{className:"flex items-center gap-2 relative",children:[(0,r.jsx)("button",{onClick:()=>{x(null),f(async()=>{if(s){await navigator.clipboard.writeText(s),u(!0),setTimeout(()=>u(!1),1800);return}let e=await c(t);if(!e.ok)return void x(e.error);l(e.context),p(e.costUsd),await navigator.clipboard.writeText(e.context),u(!0),setTimeout(()=>u(!1),1800)})},disabled:!n||b,title:n?"Summarize this session so you can paste it into a fresh chat":"Add an API key in Settings to enable",className:"btn ".concat(n?"btn-primary":""," disabled:opacity-50 disabled:cursor-not-allowed"),children:b?"… summarizing":d?"✓ Copied":s?"Copy summary":"Summarize for new chat"}),(h||null!==m&&m>0||!n)&&(0,r.jsxs)("div",{className:"absolute top-full right-0 mt-2 text-[11px] text-ink-mute flex items-center gap-2 whitespace-nowrap",children:[h&&(0,r.jsx)("span",{className:"text-error",children:h}),null!==m&&m>0&&(0,r.jsxs)("span",{className:"font-mono",children:["cost $",m.toFixed(4)]}),!n&&(0,r.jsxs)("span",{children:["summary needs ",(0,r.jsx)(a(),{href:"/settings",className:"text-primary hover:underline",children:"an API key"})]})]})]})}}},e=>{e.O(0,[619,441,255,358],()=>e(e.s=36960)),_N_E=e.O()}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[898],{20063:(e,t,r)=>{"use strict";var n=r(47260);r.o(n,"usePathname")&&r.d(t,{usePathname:function(){return n.usePathname}}),r.o(n,"useRouter")&&r.d(t,{useRouter:function(){return n.useRouter}}),r.o(n,"useSearchParams")&&r.d(t,{useSearchParams:function(){return n.useSearchParams}})},20467:(e,t,r)=>{"use strict";function n(e){return e>=1e6?"".concat((e/1e6).toFixed(1),"M"):e>=1e3?"".concat((e/1e3).toFixed(1),"k"):e.toString()}function a(e){return e>=1e3?"$".concat(e.toFixed(0)):"$".concat(e.toFixed(2))}function s(e){let t=Math.floor(e/1e3);if(t<60)return"".concat(t,"s");let r=Math.floor(t/60);if(r<60)return"".concat(r,"m");let n=Math.floor(r/60);return"".concat(n,"h ").concat(r%60,"m")}r.d(t,{F0:()=>a,c5:()=>s,yj:()=>n})},38250:(e,t,r)=>{"use strict";r.d(t,{SessionRow:()=>i});var n=r(95155),a=r(20063),s=r(20467);let o={Planning:"bg-tertiary-soft text-ink-dim border-ink-mute/30",Debugging:"bg-error/15 text-error border-error/30",Refactor:"bg-primary/10 text-primary border-primary/30",Feature:"bg-secondary/10 text-secondary border-secondary/30",Styling:"bg-fuchsia-400/10 text-fuchsia-300 border-fuchsia-400/30","SEO/Content":"bg-amber-400/10 text-amber-300 border-amber-400/30",DevOps:"bg-orange-400/10 text-orange-300 border-orange-400/30",Data:"bg-sky-400/10 text-sky-300 border-sky-400/30",Payments:"bg-emerald-400/10 text-emerald-300 border-emerald-400/30",Docs:"bg-violet-400/10 text-violet-300 border-violet-400/30",Unknown:"bg-surface-3 text-ink-mute border-surface-4"};function c(e){let{category:t,size:r="sm"}=e,a=o[t]||o.Unknown;return(0,n.jsx)("span",{className:"inline-block ".concat("xs"===r?"text-[9px] px-1 py-0":"text-[10px] px-1.5 py-0.5"," rounded font-mono uppercase tracking-wider border ").concat(a," shrink-0"),children:t})}function i(e){let{session:t,zebra:r}=e,o=(0,a.useRouter)(),i="/sessions/".concat(t.id),u=t.input_tokens+t.output_tokens+t.cache_read_tokens+t.cache_write_tokens,l=t.summary?t.summary.split("\n")[0].trim():t.heuristic_title?t.heuristic_title:t.first_prompt?function(e){let t=e.trim(),r=(t=(t=(t=(t=(t=(t=(t=t.replace(/<[^>]+>/g," ")).replace(/^\/[a-z][a-z0-9-]*(\s|$)/i,"")).replace(/```[a-z]*\n?/gi," ").replace(/```/g," ").replace(/`/g,"")).replace(/\[([^\]]+)\]\([^)]*\)/g,"$1")).replace(/https?:\/\/\S+/g,"")).replace(/(^|\s)(\/|~\/)[\w./~-]+/g," ")).replace(/\s+/g," ").trim()).search(/[.!?](\s|$)/);if(r>8&&r<90&&(t=t.slice(0,r).trim()),0===t.length)return"(untitled session)";if((t=t.charAt(0).toUpperCase()+t.slice(1)).length<=90)return t;let n=t.lastIndexOf(" ",90);return(n>50?t.slice(0,n):t.slice(0,90))+"…"}(t.first_prompt):"(untitled session)",d=function(e){if(e.categories)try{let t=JSON.parse(e.categories);if(Array.isArray(t))return t.filter(e=>"string"==typeof e)}catch(e){}return e.category?[e.category]:[]}(t);return(0,n.jsxs)("tr",{onClick:()=>o.push(i),onAuxClick:e=>{1===e.button&&window.open(i,"_blank")},onKeyDown:e=>{"Enter"===e.key&&o.push(i)},tabIndex:0,role:"link",className:"border-t border-surface-2 cursor-pointer transition-colors hover:bg-surface-2/60 focus:outline-none focus:bg-surface-2/70 ".concat(r?"bg-surface-1/30":""),children:[(0,n.jsx)("td",{className:"px-3 py-2 font-mono text-code-sm text-ink-mute",children:new Date(t.started_at).toLocaleString([],{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"})}),(0,n.jsx)("td",{className:"px-3 py-2",children:(0,n.jsx)("span",{className:"inline-block px-1.5 py-0.5 rounded text-[10px] font-mono uppercase tracking-wider ".concat("claude"===t.provider?"bg-primary/15 text-primary":"bg-secondary/15 text-secondary"),children:t.provider})}),(0,n.jsx)("td",{className:"px-3 py-2 text-ink-dim",children:t.project_name}),(0,n.jsx)("td",{className:"px-3 py-2 font-mono text-code-sm text-ink-mute truncate max-w-[180px]",children:t.model||"—"}),(0,n.jsx)("td",{className:"px-3 py-2 max-w-[420px]",children:(0,n.jsxs)("div",{className:"flex items-center gap-2 flex-wrap",children:[(0,n.jsx)("span",{className:"text-ink truncate",children:l}),d.map(e=>(0,n.jsx)(c,{category:e},e))]})}),(0,n.jsx)("td",{className:"px-3 py-2 text-right font-mono tabular",children:(0,s.yj)(u)}),(0,n.jsx)("td",{className:"px-3 py-2 text-right font-mono tabular text-secondary",children:(0,s.F0)(t.est_cost_usd)}),(0,n.jsx)("td",{className:"px-3 py-2 text-right font-mono tabular text-ink-mute",children:(0,s.c5)(t.duration_ms)})]})}},99884:(e,t,r)=>{Promise.resolve().then(r.bind(r,38250))}},e=>{e.O(0,[441,255,358],()=>e(e.s=99884)),_N_E=e.O()}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[662],{25511:(e,s,a)=>{"use strict";a.d(s,{v:()=>r});var t=a(30926);let r=(0,t.createServerReference)("40ebbe581be2d6a1560853a1f470f6bef259ff3ce0",t.callServer,void 0,t.findSourceMapURL,"classifyAction")},30926:(e,s,a)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),!function(e,s){for(var a in s)Object.defineProperty(e,a,{enumerable:!0,get:s[a]})}(s,{callServer:function(){return t.callServer},createServerReference:function(){return n.createServerReference},findSourceMapURL:function(){return r.findSourceMapURL}});let t=a(41209),r=a(85153),n=a(77197)},66700:(e,s,a)=>{Promise.resolve().then(a.bind(a,68566))},68566:(e,s,a)=>{"use strict";a.d(s,{LlmSection:()=>x});var t=a(95155),r=a(12115),n=a(30926);let i=(0,n.createServerReference)("40acb06b98d922bbaa705775c5e053590069080d2e",n.callServer,void 0,n.findSourceMapURL,"saveLlmAction"),o=(0,n.createServerReference)("403820812a9461424d17b14bf3b24acd13354c2523",n.callServer,void 0,n.findSourceMapURL,"setAutoClassifyAction"),l=(0,n.createServerReference)("40d6068a0e90cc763358acc206b8d68d79340910e7",n.callServer,void 0,n.findSourceMapURL,"clearKeyAction"),c=(0,n.createServerReference)("404e24f64e5bf12ba9bd1bba81003a96aa21b8f8f0",n.callServer,void 0,n.findSourceMapURL,"estimateAction");var d=a(25511);let m=[{id:"claude-haiku-4-5",label:"Claude Haiku 4.5 (cheapest)",provider:"anthropic",input:1,output:5},{id:"claude-sonnet-4-6",label:"Claude Sonnet 4.6 (smarter)",provider:"anthropic",input:3,output:15},{id:"gpt-5-mini",label:"GPT-5 Mini (cheapest)",provider:"openai",input:.5,output:2},{id:"gpt-4o-mini",label:"GPT-4o Mini (very cheap)",provider:"openai",input:.15,output:.6},{id:"gpt-5",label:"GPT-5 (smarter)",provider:"openai",input:2.5,output:10}];function p(e){return m.filter(s=>s.provider===e)}function u(e){return"openai"===e?"gpt-5-mini":"claude-haiku-4-5"}let b=e=>e?e.slice(0,8)+"…"+e.slice(-4):"";function x(e){let{provider:s,anthKey:a,oaiKey:n,classifierModel:m,summarizerModel:x,classified:f,total:h,autoClassify:v}=e,[y,k]=(0,r.useState)(s),[j,N]=(0,r.useState)(m),[g,w]=(0,r.useState)(null),[S,C]=(0,r.useState)(v),[L,R]=(0,r.useState)({kind:"idle"}),[U,A]=(0,r.useTransition)(),M=("openai"===y?n:a).length>0,_=p(y),O=_.some(e=>e.id===j)?j:u(y),P=e=>{R({kind:"idle"}),A(async()=>{let s=await c(e);s.ok?R({kind:"estimate",totalUsd:s.totalUsd,rowCount:s.rowCount,modelLabel:s.modelLabel,scope:e}):R({kind:"error",message:s.error})})};return(0,t.jsxs)("div",{className:"card",children:[(0,t.jsxs)("div",{className:"card-header flex items-center justify-between",children:[(0,t.jsx)("span",{children:"LLM provider"}),(0,t.jsxs)("span",{className:"normal-case tracking-normal text-ink-mute text-[11px] font-mono",children:[f,"/",h," sessions classified"]})]}),(0,t.jsxs)("form",{action:e=>{A(async()=>{await i(e),w(Date.now()),setTimeout(()=>w(null),2e3)})},className:"p-5 space-y-4 text-body-md",children:[(0,t.jsxs)("p",{className:"text-ink-dim text-body-sm",children:["Optional. Used to auto-title and categorize sessions, and to generate context primers when you click ",(0,t.jsx)("em",{children:"Copy context"})," on a session. Skip this and titles stay as the raw first prompt."]}),(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-3",children:[(0,t.jsxs)("div",{className:"space-y-1",children:[(0,t.jsx)("label",{className:"text-label-caps text-ink-mute block",children:"Provider"}),(0,t.jsxs)("select",{name:"provider",value:y,onChange:e=>{var s;k(s=e.target.value),p(s).some(e=>e.id===j)||N(u(s))},className:"bg-surface-1 border border-surface-3 rounded px-2 h-9 text-body-md w-full",children:[(0,t.jsx)("option",{value:"anthropic",children:"Anthropic"}),(0,t.jsx)("option",{value:"openai",children:"OpenAI"})]})]}),(0,t.jsxs)("div",{className:"space-y-1",children:[(0,t.jsx)("label",{className:"text-label-caps text-ink-mute block",children:"Model"}),(0,t.jsx)("select",{name:"classifier_model",value:O,onChange:e=>N(e.target.value),className:"bg-surface-1 border border-surface-3 rounded px-2 h-9 text-body-md font-mono w-full",children:_.map(e=>(0,t.jsx)("option",{value:e.id,children:e.label},e.id))})]})]}),(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-3",children:[(0,t.jsxs)("div",{className:"space-y-1",children:[(0,t.jsxs)("label",{className:"text-label-caps text-ink-mute block flex items-center justify-between",children:["Anthropic key",a&&(0,t.jsx)("button",{type:"button",onClick:()=>A(()=>l("anthropic")),className:"normal-case tracking-normal text-[10px] text-ink-mute hover:text-error",children:"clear"})]}),(0,t.jsx)("input",{type:"password",name:"anthropic_key",placeholder:b(a)||"sk-ant-…",className:"bg-surface-1 border border-surface-3 rounded px-3 h-9 text-body-md font-mono w-full focus:outline-none focus:border-primary"})]}),(0,t.jsxs)("div",{className:"space-y-1",children:[(0,t.jsxs)("label",{className:"text-label-caps text-ink-mute block flex items-center justify-between",children:["OpenAI key",n&&(0,t.jsx)("button",{type:"button",onClick:()=>A(()=>l("openai")),className:"normal-case tracking-normal text-[10px] text-ink-mute hover:text-error",children:"clear"})]}),(0,t.jsx)("input",{type:"password",name:"openai_key",placeholder:b(n)||"sk-…",className:"bg-surface-1 border border-surface-3 rounded px-3 h-9 text-body-md font-mono w-full focus:outline-none focus:border-primary"})]})]}),(0,t.jsxs)("p",{className:"text-[11px] text-ink-mute leading-relaxed",children:["Keys are stored in plaintext in your local SQLite file — same threat model as"," ",(0,t.jsx)("span",{className:"font-mono",children:"~/.aws/credentials"})," or a ",(0,t.jsx)("span",{className:"font-mono",children:".env"}),". Never sent over the network. Any process that can read your home folder can read them."]}),(0,t.jsx)("input",{type:"hidden",name:"summarizer_model",value:x}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("button",{className:"btn btn-primary",type:"submit",disabled:U,children:U?"Saving…":"Save"}),g&&(0,t.jsx)("span",{className:"text-body-sm text-secondary",children:"✓ saved"})]})]}),(0,t.jsxs)("div",{className:"px-5 pb-5 border-t border-surface-2 pt-4 space-y-3",children:[(0,t.jsxs)("label",{className:"flex items-start gap-3 text-body-sm ".concat(M?"cursor-pointer":"opacity-60 cursor-not-allowed"),children:[(0,t.jsx)("input",{type:"checkbox",checked:S,onChange:e=>{var s;C(s=e.target.checked),A(async()=>{await o(s)})},disabled:!M||U,className:"mt-1 accent-primary"}),(0,t.jsxs)("span",{className:"text-ink-dim",children:[(0,t.jsx)("span",{className:"text-ink font-medium",children:"Automatically classify new sessions"}),(0,t.jsx)("span",{className:"block text-ink-mute text-[11px] mt-0.5",children:"When a background scan finds unclassified sessions, batch them through the classifier. Costs ~$0.0001 per session."})]})]}),(0,t.jsxs)("div",{className:"flex items-center gap-2 flex-wrap",children:[(0,t.jsx)("button",{type:"button",disabled:!M||U,onClick:()=>P("uncategorized"),className:"btn disabled:opacity-50 disabled:cursor-not-allowed",children:"Classify uncategorized"}),(0,t.jsx)("button",{type:"button",disabled:!M||U,onClick:()=>P("all"),className:"btn disabled:opacity-50 disabled:cursor-not-allowed",children:"Re-classify all"}),!M&&(0,t.jsx)("span",{className:"text-body-sm text-ink-mute",children:"Save a key above to enable."})]}),"estimate"===L.kind&&(0,t.jsxs)("div",{className:"border border-primary/40 bg-primary/5 rounded p-3 text-body-sm",children:[(0,t.jsx)("div",{className:"text-ink mb-2",children:0===L.rowCount?"Nothing to classify.":(0,t.jsxs)(t.Fragment,{children:["About to classify ",(0,t.jsx)("span",{className:"font-mono text-primary",children:L.rowCount})," ","sessions with ",L.modelLabel," for an estimated"," ",(0,t.jsxs)("span",{className:"font-mono text-primary",children:["$",L.totalUsd.toFixed(4)]}),"."]})}),L.rowCount>0&&(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("button",{type:"button",onClick:()=>{var e;return e=L.scope,void A(async()=>{let s=await (0,d.v)(e);s.ok?R({kind:"done",classified:s.classified,costUsd:s.costUsd,warning:s.warning}):R({kind:"error",message:s.error})})},className:"btn btn-primary",disabled:U,children:U?"Classifying…":"Confirm"}),(0,t.jsx)("button",{type:"button",onClick:()=>R({kind:"idle"}),className:"btn",disabled:U,children:"Cancel"})]})]}),"done"===L.kind&&(0,t.jsxs)("div",{className:"border border-secondary/40 bg-secondary/5 rounded p-3 text-body-sm text-ink space-y-1",children:[(0,t.jsxs)("div",{children:["✓ Classified ",(0,t.jsx)("span",{className:"font-mono text-secondary",children:L.classified})," ","sessions for ",(0,t.jsxs)("span",{className:"font-mono",children:["$",L.costUsd.toFixed(4)]}),"."]}),L.warning&&(0,t.jsxs)("div",{className:"text-error text-[11px] border-l-2 border-error pl-2 font-mono break-words",children:["Warning: ",L.warning]})]}),"error"===L.kind&&(0,t.jsx)("div",{className:"text-body-sm text-error border-l-2 border-error pl-3",children:L.message})]})]})}}},e=>{e.O(0,[441,255,358],()=>e(e.s=66700)),_N_E=e.O()}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[404,893],{8724:(e,s,_)=>{Promise.resolve().then(_.t.bind(_,52619,23))}},e=>{e.O(0,[619,441,255,358],()=>e(e.s=8724)),_N_E=e.O()}]);
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
*,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgb(59 130 246/0.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgb(59 130 246/0.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }/*
|
|
2
|
+
! tailwindcss v3.4.19 | MIT License | https://tailwindcss.com
|
|
3
|
+
*/*,:after,:before{box-sizing:border-box;border:0 solid #e5e7eb}:after,:before{--tw-content:""}:host,html{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:Inter,ui-sans-serif,system-ui,-apple-system,Segoe UI,Roboto,sans-serif;font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:JetBrains Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}.container{width:100%}@media (min-width:640px){.container{max-width:640px}}@media (min-width:768px){.container{max-width:768px}}@media (min-width:1024px){.container{max-width:1024px}}@media (min-width:1280px){.container{max-width:1280px}}@media (min-width:1536px){.container{max-width:1536px}}.visible{visibility:visible}.collapse{visibility:collapse}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.sticky{position:sticky}.-right-0\.5{right:-.125rem}.-top-0\.5{top:-.125rem}.right-0{right:0}.top-0{top:0}.top-full{top:100%}.isolate{isolation:isolate}.z-20{z-index:20}.z-\[9999\]{z-index:9999}.col-span-2{grid-column:span 2/span 2}.col-start-1{grid-column-start:1}.row-start-1{grid-row-start:1}.-mx-1{margin-left:-.25rem;margin-right:-.25rem}.-mx-2{margin-left:-.5rem;margin-right:-.5rem}.-ml-px{margin-left:-1px}.mb-1{margin-bottom:.25rem}.mb-2{margin-bottom:.5rem}.mb-3{margin-bottom:.75rem}.mb-4{margin-bottom:1rem}.ml-2{margin-left:.5rem}.mr-2{margin-right:.5rem}.mt-0\.5{margin-top:.125rem}.mt-1{margin-top:.25rem}.mt-1\.5{margin-top:.375rem}.mt-2{margin-top:.5rem}.block{display:block}.inline-block{display:inline-block}.inline{display:inline}.flex{display:flex}.inline-flex{display:inline-flex}.table{display:table}.grid{display:grid}.contents{display:contents}.hidden{display:none}.h-1{height:.25rem}.h-1\.5{height:.375rem}.h-2\.5{height:.625rem}.h-3\.5{height:.875rem}.h-4{height:1rem}.h-60{height:15rem}.h-64{height:16rem}.h-72{height:18rem}.h-8{height:2rem}.h-9{height:2.25rem}.h-\[72px\]{height:72px}.h-fit{height:-moz-fit-content;height:fit-content}.h-full{height:100%}.h-px{height:1px}.h-screen{height:100vh}.max-h-\[60vh\]{max-height:60vh}.min-h-screen{min-height:100vh}.w-1\.5{width:.375rem}.w-2\.5{width:.625rem}.w-4{width:1rem}.w-56{width:14rem}.w-72{width:18rem}.w-full{width:100%}.w-px{width:1px}.min-w-0{min-width:0}.min-w-\[100px\]{min-width:100px}.min-w-\[120px\]{min-width:120px}.min-w-\[60px\]{min-width:60px}.max-w-3xl{max-width:48rem}.max-w-\[140px\]{max-width:140px}.max-w-\[180px\]{max-width:180px}.max-w-\[420px\]{max-width:420px}.max-w-\[78\%\]{max-width:78%}.max-w-md{max-width:28rem}.flex-1{flex:1 1 0%}.flex-shrink-0,.shrink-0{flex-shrink:0}.grow{flex-grow:1}.rotate-180{--tw-rotate:180deg}.rotate-180,.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes pulse{50%{opacity:.5}}.animate-pulse{animation:pulse 2s cubic-bezier(.4,0,.6,1) infinite}@keyframes spin{to{transform:rotate(1turn)}}.animate-spin{animation:spin 1s linear infinite}.cursor-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.resize{resize:both}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.grid-cols-5{grid-template-columns:repeat(5,minmax(0,1fr))}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-start{align-items:flex-start}.items-end{align-items:flex-end}.items-center{align-items:center}.items-baseline{align-items:baseline}.items-stretch{align-items:stretch}.justify-start{justify-content:flex-start}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-0\.5{gap:.125rem}.gap-1\.5{gap:.375rem}.gap-2{gap:.5rem}.gap-2\.5{gap:.625rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.space-y-0\.5>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(.125rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.125rem * var(--tw-space-y-reverse))}.space-y-1>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(.25rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.25rem * var(--tw-space-y-reverse))}.space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.5rem * var(--tw-space-y-reverse))}.space-y-2\.5>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(.625rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.625rem * var(--tw-space-y-reverse))}.space-y-3>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(.75rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.75rem * var(--tw-space-y-reverse))}.space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(1rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1rem * var(--tw-space-y-reverse))}.space-y-6>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(1.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1.5rem * var(--tw-space-y-reverse))}.space-y-7>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(1.75rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1.75rem * var(--tw-space-y-reverse))}.divide-y>:not([hidden])~:not([hidden]){--tw-divide-y-reverse:0;border-top-width:calc(1px * calc(1 - var(--tw-divide-y-reverse)));border-bottom-width:calc(1px * var(--tw-divide-y-reverse))}.divide-surface-2>:not([hidden])~:not([hidden]){--tw-divide-opacity:1;border-color:rgb(28 32 38/var(--tw-divide-opacity,1))}.self-start{align-self:flex-start}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.truncate{overflow:hidden;text-overflow:ellipsis}.truncate,.whitespace-nowrap{white-space:nowrap}.whitespace-pre-wrap{white-space:pre-wrap}.break-words{overflow-wrap:break-word}.break-all{word-break:break-all}.rounded{border-radius:4px}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:8px}.rounded-md{border-radius:6px}.rounded-sm{border-radius:2px}.rounded-bl-sm{border-bottom-left-radius:2px}.rounded-br-sm{border-bottom-right-radius:2px}.border{border-width:1px}.border-b{border-bottom-width:1px}.border-l-2{border-left-width:2px}.border-r{border-right-width:1px}.border-t{border-top-width:1px}.border-amber-400\/30{border-color:rgb(251 191 36/.3)}.border-emerald-400\/30{border-color:rgb(52 211 153/.3)}.border-error{--tw-border-opacity:1;border-color:rgb(255 180 171/var(--tw-border-opacity,1))}.border-error\/30{border-color:rgb(255 180 171/.3)}.border-fuchsia-400\/30{border-color:rgb(232 121 249/.3)}.border-ink-mute\/30{border-color:rgb(132 148 149/.3)}.border-orange-400\/30{border-color:rgb(251 146 60/.3)}.border-outline{--tw-border-opacity:1;border-color:rgb(58 73 74/var(--tw-border-opacity,1))}.border-primary{--tw-border-opacity:1;border-color:rgb(0 245 255/var(--tw-border-opacity,1))}.border-primary\/30{border-color:rgb(0 245 255/.3)}.border-primary\/40{border-color:rgb(0 245 255/.4)}.border-secondary\/30{border-color:rgb(0 255 171/.3)}.border-secondary\/40{border-color:rgb(0 255 171/.4)}.border-sky-400\/30{border-color:rgb(56 189 248/.3)}.border-surface-2{--tw-border-opacity:1;border-color:rgb(28 32 38/var(--tw-border-opacity,1))}.border-surface-3{--tw-border-opacity:1;border-color:rgb(38 42 49/var(--tw-border-opacity,1))}.border-surface-4{--tw-border-opacity:1;border-color:rgb(49 53 60/var(--tw-border-opacity,1))}.border-violet-400\/30{border-color:rgb(167 139 250/.3)}.bg-amber-400\/10{background-color:rgb(251 191 36/.1)}.bg-canvas{--tw-bg-opacity:1;background-color:rgb(16 20 26/var(--tw-bg-opacity,1))}.bg-canvas\/95{background-color:rgb(16 20 26/.95)}.bg-emerald-400\/10{background-color:rgb(52 211 153/.1)}.bg-error{--tw-bg-opacity:1;background-color:rgb(255 180 171/var(--tw-bg-opacity,1))}.bg-error\/10{background-color:rgb(255 180 171/.1)}.bg-error\/15{background-color:rgb(255 180 171/.15)}.bg-fuchsia-400\/10{background-color:rgb(232 121 249/.1)}.bg-ink-mute{--tw-bg-opacity:1;background-color:rgb(132 148 149/var(--tw-bg-opacity,1))}.bg-orange-400\/10{background-color:rgb(251 146 60/.1)}.bg-primary{--tw-bg-opacity:1;background-color:rgb(0 245 255/var(--tw-bg-opacity,1))}.bg-primary\/10{background-color:rgb(0 245 255/.1)}.bg-primary\/15{background-color:rgb(0 245 255/.15)}.bg-primary\/5{background-color:rgb(0 245 255/.05)}.bg-primary\/60{background-color:rgb(0 245 255/.6)}.bg-secondary{--tw-bg-opacity:1;background-color:rgb(0 255 171/var(--tw-bg-opacity,1))}.bg-secondary\/10{background-color:rgb(0 255 171/.1)}.bg-secondary\/15{background-color:rgb(0 255 171/.15)}.bg-secondary\/5{background-color:rgb(0 255 171/.05)}.bg-secondary\/70{background-color:rgb(0 255 171/.7)}.bg-sky-400\/10{background-color:rgb(56 189 248/.1)}.bg-surface-0{--tw-bg-opacity:1;background-color:rgb(10 14 20/var(--tw-bg-opacity,1))}.bg-surface-1{--tw-bg-opacity:1;background-color:rgb(24 28 34/var(--tw-bg-opacity,1))}.bg-surface-1\/30{background-color:rgb(24 28 34/.3)}.bg-surface-1\/40{background-color:rgb(24 28 34/.4)}.bg-surface-2{--tw-bg-opacity:1;background-color:rgb(28 32 38/var(--tw-bg-opacity,1))}.bg-surface-3{--tw-bg-opacity:1;background-color:rgb(38 42 49/var(--tw-bg-opacity,1))}.bg-violet-400\/10{background-color:rgb(167 139 250/.1)}.p-10{padding:2.5rem}.p-3{padding:.75rem}.p-4{padding:1rem}.p-5{padding:1.25rem}.p-6{padding:1.5rem}.p-7{padding:1.75rem}.px-1{padding-left:.25rem;padding-right:.25rem}.px-1\.5{padding-left:.375rem;padding-right:.375rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.px-5{padding-left:1.25rem;padding-right:1.25rem}.px-7{padding-left:1.75rem;padding-right:1.75rem}.py-0{padding-top:0;padding-bottom:0}.py-0\.5{padding-top:.125rem;padding-bottom:.125rem}.py-1\.5{padding-top:.375rem;padding-bottom:.375rem}.py-10{padding-top:2.5rem;padding-bottom:2.5rem}.py-12{padding-top:3rem;padding-bottom:3rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-2\.5{padding-top:.625rem;padding-bottom:.625rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.py-4{padding-top:1rem;padding-bottom:1rem}.pb-3{padding-bottom:.75rem}.pb-4{padding-bottom:1rem}.pb-5{padding-bottom:1.25rem}.pl-2{padding-left:.5rem}.pl-3{padding-left:.75rem}.pr-2{padding-right:.5rem}.pt-1{padding-top:.25rem}.pt-4{padding-top:1rem}.pt-5{padding-top:1.25rem}.text-left{text-align:left}.text-center{text-align:center}.text-right{text-align:right}.font-mono{font-family:JetBrains Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace}.text-\[10px\]{font-size:10px}.text-\[11px\]{font-size:11px}.text-\[12px\]{font-size:12px}.text-\[13px\]{font-size:13px}.text-\[9px\]{font-size:9px}.text-base{font-size:1rem;line-height:1.5rem}.text-body-md{font-size:14px;line-height:20px}.text-body-sm{font-size:12px;line-height:18px}.text-code-md{font-size:13px;line-height:20px}.text-code-sm{font-size:11px;line-height:16px}.text-headline-md{font-size:20px;line-height:28px;letter-spacing:-.01em;font-weight:600}.text-label-caps{font-size:11px;line-height:16px;letter-spacing:.05em;font-weight:600}.text-lg{font-size:1.125rem;line-height:1.75rem}.font-bold{font-weight:700}.font-medium{font-weight:500}.font-normal{font-weight:400}.font-semibold{font-weight:600}.uppercase{text-transform:uppercase}.capitalize{text-transform:capitalize}.normal-case{text-transform:none}.leading-none{line-height:1}.leading-relaxed{line-height:1.625}.tracking-normal{letter-spacing:0}.tracking-tight{letter-spacing:-.025em}.tracking-wide{letter-spacing:.025em}.tracking-wider{letter-spacing:.05em}.text-amber-300{--tw-text-opacity:1;color:rgb(252 211 77/var(--tw-text-opacity,1))}.text-emerald-300{--tw-text-opacity:1;color:rgb(110 231 183/var(--tw-text-opacity,1))}.text-error{--tw-text-opacity:1;color:rgb(255 180 171/var(--tw-text-opacity,1))}.text-fuchsia-300{--tw-text-opacity:1;color:rgb(240 171 252/var(--tw-text-opacity,1))}.text-ink{--tw-text-opacity:1;color:rgb(223 226 235/var(--tw-text-opacity,1))}.text-ink-dim{--tw-text-opacity:1;color:rgb(185 202 202/var(--tw-text-opacity,1))}.text-ink-mute{--tw-text-opacity:1;color:rgb(132 148 149/var(--tw-text-opacity,1))}.text-orange-300{--tw-text-opacity:1;color:rgb(253 186 116/var(--tw-text-opacity,1))}.text-primary{--tw-text-opacity:1;color:rgb(0 245 255/var(--tw-text-opacity,1))}.text-secondary{--tw-text-opacity:1;color:rgb(0 255 171/var(--tw-text-opacity,1))}.text-sky-300{--tw-text-opacity:1;color:rgb(125 211 252/var(--tw-text-opacity,1))}.text-violet-300{--tw-text-opacity:1;color:rgb(196 181 253/var(--tw-text-opacity,1))}.accent-primary{accent-color:#00f5ff}.opacity-50{opacity:.5}.opacity-60{opacity:.6}.opacity-80{opacity:.8}.shadow-\[0_20px_60px_-10px_rgba\(0\2c 0\2c 0\2c 0\.8\)\]{--tw-shadow:0 20px 60px -10px rgba(0,0,0,0.8);--tw-shadow-colored:0 20px 60px -10px var(--tw-shadow-color)}.shadow-\[0_20px_60px_-10px_rgba\(0\2c 0\2c 0\2c 0\.8\)\],.shadow-xl{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-xl{--tw-shadow:0 20px 25px -5px rgb(0 0 0/0.1),0 8px 10px -6px rgb(0 0 0/0.1);--tw-shadow-colored:0 20px 25px -5px var(--tw-shadow-color),0 8px 10px -6px var(--tw-shadow-color)}.outline-none{outline:2px solid transparent;outline-offset:2px}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.backdrop-blur{--tw-backdrop-blur:blur(8px)}.backdrop-blur,.backdrop-filter{backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-opacity{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-transform{transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap");:root{color-scheme:dark}body,html{background:#10141a;color:#dfe2eb;font-family:Inter,system-ui,-apple-system,sans-serif;font-size:14px;line-height:20px;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}*{box-sizing:border-box}::-moz-selection{background:#00f5ff;color:#003739}::selection{background:#00f5ff;color:#003739}::-webkit-scrollbar{width:10px;height:10px}::-webkit-scrollbar-track{background:#0a0e14}::-webkit-scrollbar-thumb{background:#262a31;border-radius:4px}::-webkit-scrollbar-thumb:hover{background:#31353c}.card{background:#181c22;border:1px solid #262a31;border-radius:6px}.card-header{padding:10px 14px;border-bottom:1px solid #262a31;font-size:11px;letter-spacing:.05em;font-weight:600;color:#b9caca;text-transform:uppercase}.metric-value{font-family:JetBrains Mono,monospace;font-size:24px;font-weight:500;color:#dfe2eb}.metric-label{font-size:11px;letter-spacing:.05em;font-weight:600;color:#849495;text-transform:uppercase}.btn{display:inline-flex;align-items:center;gap:6px;height:32px;padding:0 12px;border-radius:4px;background:#1c2026;border:1px solid #31353c;color:#dfe2eb;font-size:13px;cursor:pointer;transition:border-color .12s ease,background .12s ease}.btn:hover{border-color:#6E7681}.btn-primary{background:#00f5ff;color:#003739;border-color:transparent;font-weight:600}.btn-primary:hover{background:#00dce5;border-color:transparent}.btn-icon{display:inline-flex;align-items:center;justify-content:center;width:34px;height:34px;border-radius:6px;background:rgba(0,245,255,.08);border:1px solid rgba(0,245,255,.35);color:#00f5ff;cursor:pointer;transition:background .12s ease,border-color .12s ease,color .12s ease,transform .12s ease,box-shadow .12s ease}.btn-icon:hover{background:rgba(0,245,255,.16);border-color:#00f5ff;box-shadow:0 0 0 3px rgba(0,245,255,.12);transform:translateY(-1px)}.btn-icon:active{transform:translateY(0)}.btn-icon:disabled{opacity:.5;cursor:not-allowed}.tabular{font-variant-numeric:tabular-nums}a{color:inherit;text-decoration:none}.hover\:border-primary:hover{--tw-border-opacity:1;border-color:rgb(0 245 255/var(--tw-border-opacity,1))}.hover\:bg-primary\/25:hover{background-color:rgb(0 245 255/.25)}.hover\:bg-surface-1:hover{--tw-bg-opacity:1;background-color:rgb(24 28 34/var(--tw-bg-opacity,1))}.hover\:bg-surface-2:hover{--tw-bg-opacity:1;background-color:rgb(28 32 38/var(--tw-bg-opacity,1))}.hover\:bg-surface-2\/40:hover{background-color:rgb(28 32 38/.4)}.hover\:bg-surface-2\/50:hover{background-color:rgb(28 32 38/.5)}.hover\:bg-surface-2\/60:hover{background-color:rgb(28 32 38/.6)}.hover\:text-error:hover{--tw-text-opacity:1;color:rgb(255 180 171/var(--tw-text-opacity,1))}.hover\:text-ink:hover{--tw-text-opacity:1;color:rgb(223 226 235/var(--tw-text-opacity,1))}.hover\:text-ink-dim:hover{--tw-text-opacity:1;color:rgb(185 202 202/var(--tw-text-opacity,1))}.hover\:text-primary:hover{--tw-text-opacity:1;color:rgb(0 245 255/var(--tw-text-opacity,1))}.hover\:underline:hover{text-decoration-line:underline}.focus\:border-primary:focus{--tw-border-opacity:1;border-color:rgb(0 245 255/var(--tw-border-opacity,1))}.focus\:bg-surface-2\/70:focus{background-color:rgb(28 32 38/.7)}.focus\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus-visible\:bg-surface-2:focus-visible{--tw-bg-opacity:1;background-color:rgb(28 32 38/var(--tw-bg-opacity,1))}.focus-visible\:text-primary:focus-visible{--tw-text-opacity:1;color:rgb(0 245 255/var(--tw-text-opacity,1))}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:opacity-50:disabled{opacity:.5}.disabled\:opacity-60:disabled{opacity:.6}.disabled\:hover\:bg-transparent:hover:disabled{background-color:transparent}.disabled\:hover\:text-ink-mute:hover:disabled{--tw-text-opacity:1;color:rgb(132 148 149/var(--tw-text-opacity,1))}.group:hover .group-hover\:text-primary{--tw-text-opacity:1;color:rgb(0 245 255/var(--tw-text-opacity,1))}@supports (backdrop-filter:var(--tw )){.supports-\[backdrop-filter\]\:bg-canvas\/80{background-color:rgb(16 20 26/.8)}}
|
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,29 @@ All notable changes to this project will be documented here.
|
|
|
4
4
|
|
|
5
5
|
The format is loosely based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
|
|
6
6
|
|
|
7
|
+
## [0.3.0] — 2026-06-08
|
|
8
|
+
|
|
9
|
+
### Added
|
|
10
|
+
- **Project filter on the dashboard.** New dropdown next to the title (`?project=<id>`) refilters every dashboard widget — Range Summary, Usage chart, Today's Activity, Top Projects, Work Type, Daily Summary, share image. "All projects" by default.
|
|
11
|
+
- **Model filter on the dashboard.** Second dropdown next to the project filter (`?model=<family>`) filters by **model family** (rolled up: `claude-opus-4-7` + `claude-opus-4-6` → "Claude Opus 4"). Threads through the same widgets as the project filter.
|
|
12
|
+
- **By Model breakdown card** on the dashboard (under Daily Summary), on project detail pages, and on session detail pages when a session bounces between models. Sessions × tokens × cost per family, ranked by cost.
|
|
13
|
+
- **Resume panel on session detail.** Replaces the cryptic "Resume → ✓ Copied" button with a visible command preview (`cd "<cwd>" && claude --resume <id>`) in a mono code chip with a Copy button on the right. GitHub-clone-URL pattern — what gets copied is the thing you're looking at.
|
|
14
|
+
- **Auto-classify new sessions** (default on, opt-out in Settings). Background ingest now batches unclassified sessions through the LLM classifier when ≥5 are pending, so titles and categories appear without a manual trigger.
|
|
15
|
+
- **"N unclassified · classify" chip** on the dashboard header — shown only when auto-classify is off and there's a backlog. Two-step confirm with the dollar estimate so the click never feels surprising.
|
|
16
|
+
|
|
17
|
+
### Changed
|
|
18
|
+
- **Share image is now a graph.** Dropped the "Top projects" + "Mostly" text rows. The share PNG now renders the dashboard's actual usage chart as an SVG area chart, respecting the current range, metric (tokens/sessions/cost), scale (lin/log), and project filter. The headline metric card matching the active metric gets the accent color.
|
|
19
|
+
- **Usage chart toggles are URL-driven.** Metric (`?metric=`) and scale (`?scale=`) now live in the URL, so dashboard links carry the view and the share image always matches what you're looking at.
|
|
20
|
+
- **Share button is icon-only.** Dropped "Share stats" copy in favor of the system share glyph (matches iOS/macOS/GitHub/Linear convention). Cyan-tinted button with a hover glow and a brief checkmark on success.
|
|
21
|
+
- **Session detail header redesigned.** Title is now the AI-derived session title (not the raw cwd path); buttons sit in a single row; helper text moves below as a tooltip-style line. "Generate context" relabeled to **"Summarize for new chat"** → **"Copy summary"**.
|
|
22
|
+
- **Freshness pill is rock-steady.** Fixed-width slot + zero-padded tick text (`04s` / `15s` / `03m`) — no horizontal shift on hover, no oscillation. Refresh icon + label on hover make it an obvious button.
|
|
23
|
+
- **Project filter sits with the title**, not the action bar. Treated as "what you're viewing," coupled with Dashboard + date.
|
|
24
|
+
- **Heuristic session titles are cleaner.** Strips `<command-name>` tags, leading slash commands, URLs, absolute paths, code-fence noise; trims to a sentence boundary. Unclassified rows in the timeline no longer leak command markers or path strings.
|
|
25
|
+
- **Codex quota reset label.** No longer says "resetting" for the per-minute window that's constantly rolling — shows `<1m` instead.
|
|
26
|
+
|
|
27
|
+
### Fixed
|
|
28
|
+
- Project filter, model filter, range, freshness, and share button now share one tight cluster with subtle dividers — no more floating-island layout in the dashboard header.
|
|
29
|
+
|
|
7
30
|
## [0.2.2] — 2026-06-07
|
|
8
31
|
|
|
9
32
|
### Changed
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "agentgraphed",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Claude Code usage monitor — local-first analytics dashboard for Claude Code & Codex CLI sessions. See every session, every project, every dollar. No login, no cloud.",
|
|
6
6
|
"keywords": [
|
|
@@ -28,6 +28,7 @@
|
|
|
28
28
|
},
|
|
29
29
|
"scripts": {
|
|
30
30
|
"dev": "node scripts/fetch-pricing.mjs && next dev -p 3737",
|
|
31
|
+
"demo": "AGENTGRAPHED_DEMO_HOME=/Users/dev node scripts/fetch-pricing.mjs && AGENTGRAPHED_DEMO_HOME=/Users/dev next dev -p 3737",
|
|
31
32
|
"build": "node scripts/fetch-pricing.mjs && next build && node scripts/copy-standalone-assets.mjs",
|
|
32
33
|
"prepack": "npm run build",
|
|
33
34
|
"start": "node .next/standalone/server.js",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[52,407],{84441:()=>{}},_=>{_.O(0,[441,255,358],()=>_(_.s=84441)),_N_E=_.O()}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[52,407],{84441:()=>{}},_=>{_.O(0,[441,255,358],()=>_(_.s=84441)),_N_E=_.O()}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[177],{2821:(e,t,r)=>{"use strict";r.d(t,{A:()=>n});let n=function(){for(var e,t,r=0,n="",a=arguments.length;r<a;r++)(e=arguments[r])&&(t=function e(t){var r,n,a="";if("string"==typeof t||"number"==typeof t)a+=t;else if("object"==typeof t)if(Array.isArray(t)){var s=t.length;for(r=0;r<s;r++)t[r]&&(n=e(t[r]))&&(a&&(a+=" "),a+=n)}else for(n in t)t[n]&&(a&&(a+=" "),a+=n);return a}(e))&&(n&&(n+=" "),n+=t);return n}},13673:()=>{},16078:(e,t,r)=>{Promise.resolve().then(r.t.bind(r,13673,23)),Promise.resolve().then(r.bind(r,82259))},20063:(e,t,r)=>{"use strict";var n=r(47260);r.o(n,"usePathname")&&r.d(t,{usePathname:function(){return n.usePathname}}),r.o(n,"useRouter")&&r.d(t,{useRouter:function(){return n.useRouter}}),r.o(n,"useSearchParams")&&r.d(t,{useSearchParams:function(){return n.useSearchParams}})},82259:(e,t,r)=>{"use strict";r.d(t,{Sidebar:()=>y});var n=r(95155),a=r(52619),s=r.n(a),l=r(20063),o=r(2821),c=r(12115),i=r(47650);function d(e){var t,r,n,a;if(!e||!e.ok)return null;let s=null!=(n=null==(t=e.primary)?void 0:t.pct)?n:null,l=null!=(a=null==(r=e.secondary)?void 0:r.pct)?a:null;return null===s&&null===l?null:Math.max(null!=s?s:0,null!=l?l:0)}function u(e){let t=e-Date.now();if(t<=0)return"resetting";let r=Math.round(t/6e4);if(r<1)return"<1m";if(r<60)return"".concat(r,"m");let n=Math.floor(r/60),a=r%60;return 0===a?"".concat(n,"h"):"".concat(n,"h").concat(a,"m")}function p(){let[e,t]=(0,c.useState)({claude:null,codex:null,fetchedAt:0,loading:!1}),[r,a]=(0,c.useState)(!1),[s,l]=(0,c.useState)(null),o=(0,c.useRef)(null),p=(0,c.useRef)(null);(0,c.useEffect)(()=>{if(!r||!o.current)return;let e=()=>{o.current&&l(o.current.getBoundingClientRect())};return e(),window.addEventListener("scroll",e,!0),window.addEventListener("resize",e),()=>{window.removeEventListener("scroll",e,!0),window.removeEventListener("resize",e)}},[r]);let m=(0,c.useCallback)(async()=>{t(e=>({...e,loading:!0}));let[e,r]=await Promise.all([fetch("/api/quota-probe?provider=claude",{method:"POST"}).then(e=>e.json()).catch(e=>({ok:!1,error:e.message})),fetch("/api/quota-probe?provider=codex",{method:"POST"}).then(e=>e.json()).catch(e=>({ok:!1,error:e.message}))]);t({claude:f("claude",e),codex:f("codex",r),fetchedAt:Date.now(),loading:!1})},[]);function h(){p.current&&clearTimeout(p.current),a(!0),Date.now()-e.fetchedAt>6e4&&!e.loading&&m()}function b(){p.current&&clearTimeout(p.current),p.current=setTimeout(()=>a(!1),120)}return(0,n.jsxs)("div",{ref:o,className:"relative px-3 py-2 border-b border-surface-2",onMouseEnter:h,onMouseLeave:b,onFocus:h,onBlur:b,children:[(0,n.jsxs)("button",{type:"button",onClick:m,className:"w-full flex items-center gap-2 text-[12px] text-ink-dim hover:text-ink","aria-haspopup":"dialog","aria-expanded":r,children:[(0,n.jsx)("span",{className:"w-1.5 h-1.5 rounded-full ".concat(function(e){var t,r;if(0===e.fetchedAt)return"bg-ink-mute";let n=Math.max(null!=(t=d(e.claude))?t:0,null!=(r=d(e.codex))?r:0);return n>=95?"bg-error":n>=80?"bg-secondary":"bg-primary"}(e)," ").concat(e.loading?"animate-pulse":"")}),(0,n.jsx)("span",{className:"font-mono tabular truncate",children:e.loading&&0===e.fetchedAt?"Probing…":function(e){var t;if(0===e.fetchedAt)return"Live quota";let r=d(e.claude);return null!==r&&(null==(t=e.claude)?void 0:t.primary)?"Claude ".concat(Math.round(r),"% \xb7 ").concat(u(e.claude.primary.resetsAt)):"Live quota"}(e)})]}),r&&s&&"undefined"!=typeof document&&(0,i.createPortal)((0,n.jsx)(x,{state:e,loading:e.loading,anchorRect:s,onEnter:h,onLeave:b}),document.body)]})}function x(e){let{state:t,loading:r,anchorRect:a,onEnter:s,onLeave:l}=e,o={position:"fixed",left:a.right+8,top:a.top,backgroundColor:"#1c2026",isolation:"isolate"};return(0,n.jsx)("div",{role:"dialog",onMouseEnter:s,onMouseLeave:l,className:"w-72 z-[9999] rounded-lg border border-surface-3 p-4 space-y-4 shadow-[0_20px_60px_-10px_rgba(0,0,0,0.8)]",style:o,children:r&&0===t.fetchedAt?(0,n.jsx)("div",{className:"text-body-sm text-ink-mute",children:"Probing Anthropic & OpenAI…"}):(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(m,{kpi:t.claude}),(0,n.jsx)("div",{className:"border-t border-surface-2"}),(0,n.jsx)(m,{kpi:t.codex}),(0,n.jsx)("div",{className:"text-[10px] text-ink-mute font-mono tabular pt-1 border-t border-surface-2",children:0===t.fetchedAt?"never probed":"updated ".concat(function(e){let t=Date.now()-e;return t<1e3?"just now":t<6e4?"".concat(Math.round(t/1e3),"s ago"):"".concat(Math.round(t/6e4),"m ago")}(t.fetchedAt)," \xb7 hover again after 60s to refresh")})]})})}function m(e){let{kpi:t}=e;if(!t)return(0,n.jsx)("div",{className:"text-body-sm text-ink-mute",children:"No data."});let r="claude"===t.provider?"Claude":"Codex";return(0,n.jsxs)("div",{className:"space-y-2",children:[(0,n.jsxs)("div",{className:"flex items-baseline justify-between",children:[(0,n.jsx)("span",{className:"text-label-caps text-ink-dim",children:r}),t.ok&&t.planType&&(0,n.jsx)("span",{className:"text-[10px] text-ink-mute font-mono uppercase tracking-wide",children:t.planType})]}),t.ok?(0,n.jsxs)(n.Fragment,{children:[t.primary&&(0,n.jsx)(h,{label:t.primary.label,pct:t.primary.pct,resetsAt:t.primary.resetsAt,accent:"primary"}),t.secondary&&(0,n.jsx)(h,{label:t.secondary.label,pct:t.secondary.pct,resetsAt:t.secondary.resetsAt,accent:"secondary"}),!t.primary&&!t.secondary&&(0,n.jsx)("div",{className:"text-body-sm text-ink-mute",children:"No rate-limit headers returned."})]}):(0,n.jsx)("div",{className:"text-[11px] text-ink-mute leading-relaxed",children:t.error})]})}function h(e){let{label:t,pct:r,resetsAt:a,accent:s}=e;return(0,n.jsxs)("div",{children:[(0,n.jsxs)("div",{className:"flex items-baseline justify-between text-body-sm",children:[(0,n.jsx)("span",{className:"text-ink font-mono uppercase tracking-wider text-[10px]",children:t}),(0,n.jsxs)("span",{className:"font-mono tabular text-ink",children:[Math.round(r),"%"]})]}),(0,n.jsx)("div",{className:"h-1 bg-surface-2 rounded-full overflow-hidden mt-1",children:(0,n.jsx)("div",{className:"h-full ".concat("primary"===s?"bg-primary":"bg-secondary"),style:{width:"".concat(Math.min(100,Math.max(0,r)),"%")}})}),(0,n.jsxs)("div",{className:"text-[10px] text-ink-mute font-mono tabular mt-0.5",children:["resets in ",u(a)]})]})}function f(e,t){if(!t||!("ok"in t))return{provider:e,ok:!1,observedAt:Date.now(),planType:null,primary:null,secondary:null,error:"unexpected response"};if(!t.ok)return{provider:e,ok:!1,observedAt:Date.now(),planType:null,primary:null,secondary:null,error:t.error};let r=t.snapshot;return{provider:e,ok:!0,observedAt:r.observedAt,planType:r.planType,primary:r.primary?{pct:r.primary.pct,resetsAt:r.primary.resetsAt,label:"claude"===e?"5h":"1m"}:null,secondary:r.secondary?{pct:r.secondary.pct,resetsAt:r.secondary.resetsAt,label:"7d"}:null}}let b=[{href:"/",label:"Dashboard",icon:"◧"},{href:"/timeline",label:"Timeline",icon:"☰"},{href:"/projects",label:"Projects",icon:"▦"},{href:"/sessions",label:"Sessions",icon:"⌘"},{href:"/analytics",label:"Analytics",icon:"⌁"}];function y(){let e=(0,l.usePathname)();return(0,n.jsxs)("aside",{className:"w-56 shrink-0 border-r border-surface-2 bg-surface-0 flex flex-col sticky top-0 h-screen self-start",children:[(0,n.jsxs)("div",{className:"px-5 border-b border-surface-2 h-[72px] flex flex-col justify-center",children:[(0,n.jsxs)("div",{className:"flex items-baseline gap-1.5 leading-none",children:[(0,n.jsx)("span",{className:"text-primary text-base",children:"◧"}),(0,n.jsxs)("span",{className:"text-lg font-bold tracking-tight",children:[(0,n.jsx)("span",{className:"text-ink-dim",children:"Agent"}),(0,n.jsx)("span",{className:"text-primary",children:"Graphed"})]})]}),(0,n.jsx)("div",{className:"text-[10px] uppercase tracking-wider text-ink-mute mt-1.5",children:"See your AI work"})]}),(0,n.jsx)(p,{}),(0,n.jsx)("nav",{className:"px-2 py-3 flex-1 flex flex-col gap-0.5",children:b.map(t=>{let r="/"===t.href?"/"===e:e.startsWith(t.href);return(0,n.jsxs)(s(),{href:t.href,className:(0,o.A)("flex items-center gap-3 px-3 py-2 rounded text-[13px] transition-colors",r?"bg-surface-2 text-primary border-l-2 border-primary -ml-px":"text-ink-dim hover:text-ink hover:bg-surface-1"),children:[(0,n.jsx)("span",{className:"text-base w-4 text-center opacity-80",children:t.icon}),(0,n.jsx)("span",{children:t.label})]},t.href)})}),(0,n.jsx)("div",{className:"px-2 py-3 border-t border-surface-2",children:(0,n.jsxs)(s(),{href:"/settings",className:(0,o.A)("flex items-center gap-3 px-3 py-2 rounded text-[13px] transition-colors",e.startsWith("/settings")?"bg-surface-2 text-primary border-l-2 border-primary -ml-px":"text-ink-dim hover:text-ink hover:bg-surface-1"),children:[(0,n.jsx)("span",{className:"text-base w-4 text-center opacity-80",children:"⚙"}),(0,n.jsx)("span",{children:"Settings"})]})})]})}}},e=>{e.O(0,[978,619,441,255,358],()=>e(e.s=16078)),_N_E=e.O()}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[974],{20467:(e,t,a)=>{"use strict";function n(e){return e>=1e6?"".concat((e/1e6).toFixed(1),"M"):e>=1e3?"".concat((e/1e3).toFixed(1),"k"):e.toString()}function s(e){return e>=1e3?"$".concat(e.toFixed(0)):"$".concat(e.toFixed(2))}function o(e){let t=Math.floor(e/1e3);if(t<60)return"".concat(t,"s");let a=Math.floor(t/60);if(a<60)return"".concat(a,"m");let n=Math.floor(a/60);return"".concat(n,"h ").concat(a%60,"m")}a.d(t,{F0:()=>s,c5:()=>o,yj:()=>n})},29366:(e,t,a)=>{"use strict";a.d(t,{UsageChartCard:()=>h});var n=a(95155),s=a(12115),o=a(26991),r=a(73850),l=a(68425),i=a(47734),c=a(73697),d=a(23508),u=a(77568),m=a(20467);function x(e){let{data:t,metric:a="tokens",scale:s="lin"}=e,x=t.map(e=>{let t=e[a];return{...e,label:e.day.slice(5),value:"log"===s&&t<=0?1:t,raw:t}}),h="cost"===a?"#00ffab":"#00f5ff";return(0,n.jsx)("div",{className:"h-64 -mx-1",children:(0,n.jsx)(o.u,{width:"100%",height:"100%",children:(0,n.jsxs)(r.Q,{data:x,margin:{top:8,right:8,bottom:0,left:-8},children:[(0,n.jsx)("defs",{children:(0,n.jsxs)("linearGradient",{id:"grad-".concat(a),x1:"0",y1:"0",x2:"0",y2:"1",children:[(0,n.jsx)("stop",{offset:"0%",stopColor:h,stopOpacity:.35}),(0,n.jsx)("stop",{offset:"100%",stopColor:h,stopOpacity:0})]})}),(0,n.jsx)(l.d,{stroke:"#262a31",strokeDasharray:"2 4",vertical:!1}),(0,n.jsx)(i.W,{dataKey:"label",tick:{fill:"#849495",fontSize:11,fontFamily:"JetBrains Mono"},axisLine:{stroke:"#262a31"},tickLine:!1,minTickGap:48}),(0,n.jsx)(c.h,{scale:"log"===s?"log":"auto",domain:"log"===s?[1,"auto"]:["auto","auto"],allowDataOverflow:!0,tick:{fill:"#849495",fontSize:11,fontFamily:"JetBrains Mono"},axisLine:!1,tickLine:!1,tickFormatter:e=>"cost"===a?"$".concat(Math.round(e)):(0,m.yj)(e)}),(0,n.jsx)(d.m,{cursor:{stroke:h,strokeOpacity:.3},contentStyle:{background:"#181c22",border:"1px solid ".concat(h),borderRadius:6,fontSize:12,color:"#dfe2eb"},formatter:(e,t,n)=>{var s,o;let r=null!=(o=null==n||null==(s=n.payload)?void 0:s.raw)?o:0;return"tokens"===a?[(0,m.yj)(r),"tokens"]:"sessions"===a?[r.toString(),"sessions"]:["$".concat(r.toFixed(2)),"cost"]},labelFormatter:e=>"Day ".concat(e)}),(0,n.jsx)(u.G,{type:"monotone",dataKey:"value",stroke:h,strokeWidth:2,fill:"url(#grad-".concat(a,")"),isAnimationActive:!1})]})})})}function h(e){let{data:t,label:a="last 30 days"}=e,[o,r]=(0,s.useState)("tokens"),l=(0,s.useMemo)(()=>!function(e,t){let a=e.map(e=>e[t]).filter(e=>e>0);if(a.length<5)return!1;let n=[...a].sort((e,t)=>e-t);return n[n.length-1]/Math.max(n[Math.floor(n.length/2)],1)>10}(t,o)?"lin":"log",[t,o]),[i,c]=(0,s.useState)(null),d=null!=i?i:l;return(0,n.jsxs)("div",{className:"card",children:[(0,n.jsxs)("div",{className:"card-header flex items-center justify-between",children:[(0,n.jsxs)("span",{children:["Usage — ",a]}),(0,n.jsxs)("div",{className:"flex items-center gap-3 normal-case tracking-normal",children:[(0,n.jsx)("div",{className:"flex items-center gap-0.5",children:[{id:"tokens",label:"Tokens"},{id:"sessions",label:"Sessions"},{id:"cost",label:"Est. Cost"}].map(e=>(0,n.jsx)("button",{onClick:()=>r(e.id),className:"px-2 py-0.5 text-[11px] rounded transition-colors font-mono ".concat(o===e.id?"bg-primary/15 text-primary":"text-ink-mute hover:text-ink-dim"),children:e.label},e.id))}),(0,n.jsx)("div",{className:"w-px h-4 bg-surface-3"}),(0,n.jsx)("div",{className:"flex items-center gap-0.5",children:["lin","log"].map(e=>(0,n.jsxs)("button",{onClick:()=>c(e),className:"px-1.5 py-0.5 text-[10px] rounded transition-colors font-mono uppercase relative ".concat(d===e?"bg-secondary/15 text-secondary":"text-ink-mute hover:text-ink-dim"),title:"log"===e?"Logarithmic scale — better when one day dwarfs the rest":"Linear scale",children:[e,null===i&&l===e&&(0,n.jsx)("span",{className:"absolute -top-0.5 -right-0.5 w-1.5 h-1.5 rounded-full bg-secondary",title:"auto-selected based on data range"})]},e))})]})]}),(0,n.jsx)("div",{className:"p-4",children:(0,n.jsx)(x,{data:t,metric:o,scale:d})})]})}},34077:(e,t,a)=>{"use strict";a.d(t,{FreshnessIndicator:()=>r});var n=a(95155),s=a(12115),o=a(20063);function r(e){let{lastIngestedAt:t}=e,[,a]=(0,s.useState)(0),[r,l]=(0,s.useTransition)(),i=(0,o.useRouter)();(0,s.useEffect)(()=>{let e=setInterval(()=>a(e=>e+1),5e3);return()=>clearInterval(e)},[]);let c=0===t?"never scanned":"updated ".concat(function(e){let t=Date.now()-e;return t<1e3?"just now":t<6e4?"".concat(Math.round(t/1e3),"s"):t<36e5?"".concat(Math.round(t/6e4),"m"):"".concat(Math.round(t/36e5),"h")}(t)," ago");return(0,n.jsxs)("span",{className:"text-[11px] text-ink-mute font-mono tabular flex items-center gap-2",children:[(0,n.jsx)("span",{children:c}),(0,n.jsx)("button",{onClick:function(){l(()=>i.refresh())},disabled:r,className:"text-ink-mute hover:text-primary uppercase tracking-wide disabled:opacity-50",title:"Re-scan local sessions and refresh",children:r?"…":"refresh"})]})}},95800:(e,t,a)=>{Promise.resolve().then(a.t.bind(a,52619,23)),Promise.resolve().then(a.bind(a,34077)),Promise.resolve().then(a.bind(a,95925)),Promise.resolve().then(a.bind(a,29366))},95925:(e,t,a)=>{"use strict";a.d(t,{RangePicker:()=>l});var n=a(95155),s=a(20063),o=a(12115);let r=[{key:"7d",label:"Last 7 days",days:7},{key:"30d",label:"Last 30 days",days:30},{key:"90d",label:"Last 90 days",days:90},{key:"all",label:"All time",days:null}];function l(e){let{current:t}=e,a=(0,s.useRouter)(),l=(0,s.usePathname)(),i=(0,s.useSearchParams)(),[c,d]=(0,o.useTransition)();return(0,n.jsx)("div",{className:"flex items-center gap-0.5 normal-case tracking-normal transition-opacity ".concat(c?"opacity-50":""),children:r.map(e=>(0,n.jsx)("button",{onClick:()=>(e=>{let t=new URLSearchParams(i.toString());"30d"===e?t.delete("range"):t.set("range",e);let n=t.toString();d(()=>{a.push(n?"".concat(l,"?").concat(n):l)})})(e.key),className:"px-2 py-0.5 text-[11px] rounded transition-colors font-mono ".concat(t===e.key?"bg-primary/15 text-primary":"text-ink-mute hover:text-ink-dim"),children:"all"===e.key?"All":e.key},e.key))})}}},e=>{e.O(0,[619,997,441,255,358],()=>e(e.s=95800)),_N_E=e.O()}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[404,801,893],{8724:(e,s,_)=>{Promise.resolve().then(_.t.bind(_,52619,23))}},e=>{e.O(0,[619,441,255,358],()=>e(e.s=8724)),_N_E=e.O()}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[404,801,893],{8724:(e,s,_)=>{Promise.resolve().then(_.t.bind(_,52619,23))}},e=>{e.O(0,[619,441,255,358],()=>e(e.s=8724)),_N_E=e.O()}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[824],{30926:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),!function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{callServer:function(){return r.callServer},createServerReference:function(){return i.createServerReference},findSourceMapURL:function(){return a.findSourceMapURL}});let r=n(41209),a=n(85153),i=n(77197)},89478:(e,t,n)=>{Promise.resolve().then(n.t.bind(n,52619,23)),Promise.resolve().then(n.bind(n,95828))},95828:(e,t,n)=>{"use strict";n.d(t,{SessionActions:()=>s});var r=n(95155),a=n(12115),i=n(30926);let c=(0,i.createServerReference)("409df161bd853257579b553d81125acb8a9b5b40c8",i.callServer,void 0,i.findSourceMapURL,"generateContextAction");function s(e){let{sessionId:t,provider:n,cwd:i,hasLlmKey:s,cachedContext:o}=e,[l,d]=(0,a.useState)(!1),[u,x]=(0,a.useState)(o),[f,m]=(0,a.useState)(!1),[b,p]=(0,a.useState)(null),[v,h]=(0,a.useState)(null),[S,y]=(0,a.useTransition)(),g=function(e,t,n){let r='cd "'.concat(t,'"');return"claude"===e?"".concat(r," && claude --resume ").concat(n):"codex"===e?"".concat(r," && codex resume ").concat(n):r}(n,i,t),k=async()=>{await navigator.clipboard.writeText(g),d(!0),setTimeout(()=>d(!1),1800)};return(0,r.jsxs)("div",{className:"flex flex-col items-end gap-1.5",children:[(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[(0,r.jsx)("button",{onClick:k,className:"btn",title:g,children:l?"✓ Copied":"⟲ Resume session"}),(0,r.jsx)("button",{onClick:()=>{p(null),y(async()=>{if(u){await navigator.clipboard.writeText(u),m(!0),setTimeout(()=>m(!1),1800);return}let e=await c(t);if(!e.ok)return void p(e.error);x(e.context),h(e.costUsd),await navigator.clipboard.writeText(e.context),m(!0),setTimeout(()=>m(!1),1800)})},disabled:!s||S,title:s?"Generate a short primer for a fresh chat":"Add an API key in Settings to enable",className:"btn ".concat(s?"btn-primary":""," disabled:opacity-50 disabled:cursor-not-allowed"),children:S?"… generating":f?"✓ Copied":u?"⎘ Copy context":"✶ Generate & copy context"})]}),b&&(0,r.jsx)("div",{className:"text-body-sm text-error",children:b}),null!==v&&v>0&&(0,r.jsxs)("div",{className:"text-[10px] font-mono text-ink-mute",children:["cost: $",v.toFixed(4)]}),!s&&(0,r.jsxs)("div",{className:"text-[11px] text-ink-mute",children:["“Copy context” needs an API key —"," ",(0,r.jsx)("a",{href:"/settings",className:"text-primary hover:underline",children:"add one in Settings"})]})]})}}},e=>{e.O(0,[619,441,255,358],()=>e(e.s=89478)),_N_E=e.O()}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[898],{20063:(e,t,r)=>{"use strict";var n=r(47260);r.o(n,"usePathname")&&r.d(t,{usePathname:function(){return n.usePathname}}),r.o(n,"useRouter")&&r.d(t,{useRouter:function(){return n.useRouter}}),r.o(n,"useSearchParams")&&r.d(t,{useSearchParams:function(){return n.useSearchParams}})},20467:(e,t,r)=>{"use strict";function n(e){return e>=1e6?"".concat((e/1e6).toFixed(1),"M"):e>=1e3?"".concat((e/1e3).toFixed(1),"k"):e.toString()}function o(e){return e>=1e3?"$".concat(e.toFixed(0)):"$".concat(e.toFixed(2))}function a(e){let t=Math.floor(e/1e3);if(t<60)return"".concat(t,"s");let r=Math.floor(t/60);if(r<60)return"".concat(r,"m");let n=Math.floor(r/60);return"".concat(n,"h ").concat(r%60,"m")}r.d(t,{F0:()=>o,c5:()=>a,yj:()=>n})},38250:(e,t,r)=>{"use strict";r.d(t,{SessionRow:()=>i});var n=r(95155),o=r(20063),a=r(20467);let s={Planning:"bg-tertiary-soft text-ink-dim border-ink-mute/30",Debugging:"bg-error/15 text-error border-error/30",Refactor:"bg-primary/10 text-primary border-primary/30",Feature:"bg-secondary/10 text-secondary border-secondary/30",Styling:"bg-fuchsia-400/10 text-fuchsia-300 border-fuchsia-400/30","SEO/Content":"bg-amber-400/10 text-amber-300 border-amber-400/30",DevOps:"bg-orange-400/10 text-orange-300 border-orange-400/30",Data:"bg-sky-400/10 text-sky-300 border-sky-400/30",Payments:"bg-emerald-400/10 text-emerald-300 border-emerald-400/30",Docs:"bg-violet-400/10 text-violet-300 border-violet-400/30",Unknown:"bg-surface-3 text-ink-mute border-surface-4"};function c(e){let{category:t,size:r="sm"}=e,o=s[t]||s.Unknown;return(0,n.jsx)("span",{className:"inline-block ".concat("xs"===r?"text-[9px] px-1 py-0":"text-[10px] px-1.5 py-0.5"," rounded font-mono uppercase tracking-wider border ").concat(o," shrink-0"),children:t})}function i(e){let{session:t,zebra:r}=e,s=(0,o.useRouter)(),i="/sessions/".concat(t.id),u=t.input_tokens+t.output_tokens+t.cache_read_tokens+t.cache_write_tokens,d=function(e){if(e.summary)return e.summary.split("\n")[0].trim();if(e.heuristic_title)return e.heuristic_title;if(e.first_prompt){var t;let r=(null!=(t=e.first_prompt.trim().split("\n").find(e=>e.trim().length>0))?t:"").replace(/\s+/g," ").trim();if(r.length<=100)return r;let n=r.lastIndexOf(" ",100);return(n>60?r.slice(0,n):r.slice(0,100))+"…"}return"(untitled session)"}(t),l=function(e){if(e.categories)try{let t=JSON.parse(e.categories);if(Array.isArray(t))return t.filter(e=>"string"==typeof e)}catch(e){}return e.category?[e.category]:[]}(t);return(0,n.jsxs)("tr",{onClick:()=>s.push(i),onAuxClick:e=>{1===e.button&&window.open(i,"_blank")},onKeyDown:e=>{"Enter"===e.key&&s.push(i)},tabIndex:0,role:"link",className:"border-t border-surface-2 cursor-pointer transition-colors hover:bg-surface-2/60 focus:outline-none focus:bg-surface-2/70 ".concat(r?"bg-surface-1/30":""),children:[(0,n.jsx)("td",{className:"px-3 py-2 font-mono text-code-sm text-ink-mute",children:new Date(t.started_at).toLocaleString([],{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"})}),(0,n.jsx)("td",{className:"px-3 py-2",children:(0,n.jsx)("span",{className:"inline-block px-1.5 py-0.5 rounded text-[10px] font-mono uppercase tracking-wider ".concat("claude"===t.provider?"bg-primary/15 text-primary":"bg-secondary/15 text-secondary"),children:t.provider})}),(0,n.jsx)("td",{className:"px-3 py-2 text-ink-dim",children:t.project_name}),(0,n.jsx)("td",{className:"px-3 py-2 font-mono text-code-sm text-ink-mute truncate max-w-[180px]",children:t.model||"—"}),(0,n.jsx)("td",{className:"px-3 py-2 max-w-[420px]",children:(0,n.jsxs)("div",{className:"flex items-center gap-2 flex-wrap",children:[(0,n.jsx)("span",{className:"text-ink truncate",children:d}),l.map(e=>(0,n.jsx)(c,{category:e},e))]})}),(0,n.jsx)("td",{className:"px-3 py-2 text-right font-mono tabular",children:(0,a.yj)(u)}),(0,n.jsx)("td",{className:"px-3 py-2 text-right font-mono tabular text-secondary",children:(0,a.F0)(t.est_cost_usd)}),(0,n.jsx)("td",{className:"px-3 py-2 text-right font-mono tabular text-ink-mute",children:(0,a.c5)(t.duration_ms)})]})}},99884:(e,t,r)=>{Promise.resolve().then(r.bind(r,38250))}},e=>{e.O(0,[441,255,358],()=>e(e.s=99884)),_N_E=e.O()}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[662],{30926:(e,a,s)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),!function(e,a){for(var s in a)Object.defineProperty(e,s,{enumerable:!0,get:a[s]})}(a,{callServer:function(){return r.callServer},createServerReference:function(){return n.createServerReference},findSourceMapURL:function(){return t.findSourceMapURL}});let r=s(41209),t=s(85153),n=s(77197)},35248:(e,a,s)=>{"use strict";s.d(a,{LlmSection:()=>b});var r=s(95155),t=s(12115),n=s(30926);let i=(0,n.createServerReference)("40acb06b98d922bbaa705775c5e053590069080d2e",n.callServer,void 0,n.findSourceMapURL,"saveLlmAction"),o=(0,n.createServerReference)("40d6068a0e90cc763358acc206b8d68d79340910e7",n.callServer,void 0,n.findSourceMapURL,"clearKeyAction"),l=(0,n.createServerReference)("404e24f64e5bf12ba9bd1bba81003a96aa21b8f8f0",n.callServer,void 0,n.findSourceMapURL,"estimateAction"),c=(0,n.createServerReference)("40ebbe581be2d6a1560853a1f470f6bef259ff3ce0",n.callServer,void 0,n.findSourceMapURL,"classifyAction"),d=[{id:"claude-haiku-4-5",label:"Claude Haiku 4.5 (cheapest)",provider:"anthropic",input:1,output:5},{id:"claude-sonnet-4-6",label:"Claude Sonnet 4.6 (smarter)",provider:"anthropic",input:3,output:15},{id:"gpt-5-mini",label:"GPT-5 Mini (cheapest)",provider:"openai",input:.5,output:2},{id:"gpt-4o-mini",label:"GPT-4o Mini (very cheap)",provider:"openai",input:.15,output:.6},{id:"gpt-5",label:"GPT-5 (smarter)",provider:"openai",input:2.5,output:10}];function m(e){return d.filter(a=>a.provider===e)}function p(e){return"openai"===e?"gpt-5-mini":"claude-haiku-4-5"}let u=e=>e?e.slice(0,8)+"…"+e.slice(-4):"";function b(e){let{provider:a,anthKey:s,oaiKey:n,classifierModel:d,summarizerModel:b,classified:x,total:f}=e,[h,v]=(0,t.useState)(a),[y,j]=(0,t.useState)(d),[k,N]=(0,t.useState)(null),[g,w]=(0,t.useState)({kind:"idle"}),[S,C]=(0,t.useTransition)(),L=("openai"===h?n:s).length>0,R=m(h),U=R.some(e=>e.id===y)?y:p(h),M=e=>{w({kind:"idle"}),C(async()=>{let a=await l(e);a.ok?w({kind:"estimate",totalUsd:a.totalUsd,rowCount:a.rowCount,modelLabel:a.modelLabel,scope:e}):w({kind:"error",message:a.error})})};return(0,r.jsxs)("div",{className:"card",children:[(0,r.jsxs)("div",{className:"card-header flex items-center justify-between",children:[(0,r.jsx)("span",{children:"LLM provider"}),(0,r.jsxs)("span",{className:"normal-case tracking-normal text-ink-mute text-[11px] font-mono",children:[x,"/",f," sessions classified"]})]}),(0,r.jsxs)("form",{action:e=>{C(async()=>{await i(e),N(Date.now()),setTimeout(()=>N(null),2e3)})},className:"p-5 space-y-4 text-body-md",children:[(0,r.jsxs)("p",{className:"text-ink-dim text-body-sm",children:["Optional. Used to auto-title and categorize sessions, and to generate context primers when you click ",(0,r.jsx)("em",{children:"Copy context"})," on a session. Skip this and titles stay as the raw first prompt."]}),(0,r.jsxs)("div",{className:"grid grid-cols-2 gap-3",children:[(0,r.jsxs)("div",{className:"space-y-1",children:[(0,r.jsx)("label",{className:"text-label-caps text-ink-mute block",children:"Provider"}),(0,r.jsxs)("select",{name:"provider",value:h,onChange:e=>{var a;v(a=e.target.value),m(a).some(e=>e.id===y)||j(p(a))},className:"bg-surface-1 border border-surface-3 rounded px-2 h-9 text-body-md w-full",children:[(0,r.jsx)("option",{value:"anthropic",children:"Anthropic"}),(0,r.jsx)("option",{value:"openai",children:"OpenAI"})]})]}),(0,r.jsxs)("div",{className:"space-y-1",children:[(0,r.jsx)("label",{className:"text-label-caps text-ink-mute block",children:"Model"}),(0,r.jsx)("select",{name:"classifier_model",value:U,onChange:e=>j(e.target.value),className:"bg-surface-1 border border-surface-3 rounded px-2 h-9 text-body-md font-mono w-full",children:R.map(e=>(0,r.jsx)("option",{value:e.id,children:e.label},e.id))})]})]}),(0,r.jsxs)("div",{className:"grid grid-cols-2 gap-3",children:[(0,r.jsxs)("div",{className:"space-y-1",children:[(0,r.jsxs)("label",{className:"text-label-caps text-ink-mute block flex items-center justify-between",children:["Anthropic key",s&&(0,r.jsx)("button",{type:"button",onClick:()=>C(()=>o("anthropic")),className:"normal-case tracking-normal text-[10px] text-ink-mute hover:text-error",children:"clear"})]}),(0,r.jsx)("input",{type:"password",name:"anthropic_key",placeholder:u(s)||"sk-ant-…",className:"bg-surface-1 border border-surface-3 rounded px-3 h-9 text-body-md font-mono w-full focus:outline-none focus:border-primary"})]}),(0,r.jsxs)("div",{className:"space-y-1",children:[(0,r.jsxs)("label",{className:"text-label-caps text-ink-mute block flex items-center justify-between",children:["OpenAI key",n&&(0,r.jsx)("button",{type:"button",onClick:()=>C(()=>o("openai")),className:"normal-case tracking-normal text-[10px] text-ink-mute hover:text-error",children:"clear"})]}),(0,r.jsx)("input",{type:"password",name:"openai_key",placeholder:u(n)||"sk-…",className:"bg-surface-1 border border-surface-3 rounded px-3 h-9 text-body-md font-mono w-full focus:outline-none focus:border-primary"})]})]}),(0,r.jsxs)("p",{className:"text-[11px] text-ink-mute leading-relaxed",children:["Keys are stored in plaintext in your local SQLite file — same threat model as"," ",(0,r.jsx)("span",{className:"font-mono",children:"~/.aws/credentials"})," or a ",(0,r.jsx)("span",{className:"font-mono",children:".env"}),". Never sent over the network. Any process that can read your home folder can read them."]}),(0,r.jsx)("input",{type:"hidden",name:"summarizer_model",value:b}),(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[(0,r.jsx)("button",{className:"btn btn-primary",type:"submit",disabled:S,children:S?"Saving…":"Save"}),k&&(0,r.jsx)("span",{className:"text-body-sm text-secondary",children:"✓ saved"})]})]}),(0,r.jsxs)("div",{className:"px-5 pb-5 border-t border-surface-2 pt-4 space-y-3",children:[(0,r.jsxs)("div",{className:"flex items-center gap-2 flex-wrap",children:[(0,r.jsx)("button",{type:"button",disabled:!L||S,onClick:()=>M("uncategorized"),className:"btn disabled:opacity-50 disabled:cursor-not-allowed",children:"Classify uncategorized"}),(0,r.jsx)("button",{type:"button",disabled:!L||S,onClick:()=>M("all"),className:"btn disabled:opacity-50 disabled:cursor-not-allowed",children:"Re-classify all"}),!L&&(0,r.jsx)("span",{className:"text-body-sm text-ink-mute",children:"Save a key above to enable."})]}),"estimate"===g.kind&&(0,r.jsxs)("div",{className:"border border-primary/40 bg-primary/5 rounded p-3 text-body-sm",children:[(0,r.jsx)("div",{className:"text-ink mb-2",children:0===g.rowCount?"Nothing to classify.":(0,r.jsxs)(r.Fragment,{children:["About to classify ",(0,r.jsx)("span",{className:"font-mono text-primary",children:g.rowCount})," ","sessions with ",g.modelLabel," for an estimated"," ",(0,r.jsxs)("span",{className:"font-mono text-primary",children:["$",g.totalUsd.toFixed(4)]}),"."]})}),g.rowCount>0&&(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[(0,r.jsx)("button",{type:"button",onClick:()=>{var e;return e=g.scope,void C(async()=>{let a=await c(e);a.ok?w({kind:"done",classified:a.classified,costUsd:a.costUsd,warning:a.warning}):w({kind:"error",message:a.error})})},className:"btn btn-primary",disabled:S,children:S?"Classifying…":"Confirm"}),(0,r.jsx)("button",{type:"button",onClick:()=>w({kind:"idle"}),className:"btn",disabled:S,children:"Cancel"})]})]}),"done"===g.kind&&(0,r.jsxs)("div",{className:"border border-secondary/40 bg-secondary/5 rounded p-3 text-body-sm text-ink space-y-1",children:[(0,r.jsxs)("div",{children:["✓ Classified ",(0,r.jsx)("span",{className:"font-mono text-secondary",children:g.classified})," ","sessions for ",(0,r.jsxs)("span",{className:"font-mono",children:["$",g.costUsd.toFixed(4)]}),"."]}),g.warning&&(0,r.jsxs)("div",{className:"text-error text-[11px] border-l-2 border-error pl-2 font-mono break-words",children:["Warning: ",g.warning]})]}),"error"===g.kind&&(0,r.jsx)("div",{className:"text-body-sm text-error border-l-2 border-error pl-3",children:g.message})]})]})}},66700:(e,a,s)=>{Promise.resolve().then(s.bind(s,35248))}},e=>{e.O(0,[441,255,358],()=>e(e.s=66700)),_N_E=e.O()}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[404,801,893],{8724:(e,s,_)=>{Promise.resolve().then(_.t.bind(_,52619,23))}},e=>{e.O(0,[619,441,255,358],()=>e(e.s=8724)),_N_E=e.O()}]);
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
*,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgb(59 130 246/0.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgb(59 130 246/0.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }/*
|
|
2
|
-
! tailwindcss v3.4.19 | MIT License | https://tailwindcss.com
|
|
3
|
-
*/*,:after,:before{box-sizing:border-box;border:0 solid #e5e7eb}:after,:before{--tw-content:""}:host,html{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:Inter,ui-sans-serif,system-ui,-apple-system,Segoe UI,Roboto,sans-serif;font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:JetBrains Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}.visible{visibility:visible}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.sticky{position:sticky}.-right-0\.5{right:-.125rem}.-top-0\.5{top:-.125rem}.top-0{top:0}.isolate{isolation:isolate}.z-20{z-index:20}.z-\[9999\]{z-index:9999}.col-span-2{grid-column:span 2/span 2}.-mx-1{margin-left:-.25rem;margin-right:-.25rem}.-mx-2{margin-left:-.5rem;margin-right:-.5rem}.-ml-px{margin-left:-1px}.mb-1{margin-bottom:.25rem}.mb-2{margin-bottom:.5rem}.mb-3{margin-bottom:.75rem}.mb-4{margin-bottom:1rem}.ml-2{margin-left:.5rem}.mr-2{margin-right:.5rem}.mt-0\.5{margin-top:.125rem}.mt-1{margin-top:.25rem}.mt-1\.5{margin-top:.375rem}.mt-2{margin-top:.5rem}.block{display:block}.inline-block{display:inline-block}.inline{display:inline}.flex{display:flex}.table{display:table}.grid{display:grid}.contents{display:contents}.hidden{display:none}.h-1{height:.25rem}.h-1\.5{height:.375rem}.h-2\.5{height:.625rem}.h-4{height:1rem}.h-60{height:15rem}.h-64{height:16rem}.h-72{height:18rem}.h-8{height:2rem}.h-9{height:2.25rem}.h-\[72px\]{height:72px}.h-fit{height:-moz-fit-content;height:fit-content}.h-full{height:100%}.h-screen{height:100vh}.min-h-screen{min-height:100vh}.w-1\.5{width:.375rem}.w-2\.5{width:.625rem}.w-4{width:1rem}.w-56{width:14rem}.w-72{width:18rem}.w-full{width:100%}.w-px{width:1px}.min-w-0{min-width:0}.min-w-\[100px\]{min-width:100px}.min-w-\[120px\]{min-width:120px}.min-w-\[60px\]{min-width:60px}.max-w-3xl{max-width:48rem}.max-w-\[180px\]{max-width:180px}.max-w-\[420px\]{max-width:420px}.max-w-\[78\%\]{max-width:78%}.max-w-md{max-width:28rem}.flex-1{flex:1 1 0%}.shrink-0{flex-shrink:0}.grow{flex-grow:1}@keyframes pulse{50%{opacity:.5}}.animate-pulse{animation:pulse 2s cubic-bezier(.4,0,.6,1) infinite}.cursor-pointer{cursor:pointer}.resize{resize:both}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.grid-cols-5{grid-template-columns:repeat(5,minmax(0,1fr))}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-start{align-items:flex-start}.items-end{align-items:flex-end}.items-center{align-items:center}.items-baseline{align-items:baseline}.items-stretch{align-items:stretch}.justify-start{justify-content:flex-start}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-0\.5{gap:.125rem}.gap-1\.5{gap:.375rem}.gap-2{gap:.5rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.space-y-0\.5>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(.125rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.125rem * var(--tw-space-y-reverse))}.space-y-1>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(.25rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.25rem * var(--tw-space-y-reverse))}.space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.5rem * var(--tw-space-y-reverse))}.space-y-2\.5>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(.625rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.625rem * var(--tw-space-y-reverse))}.space-y-3>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(.75rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.75rem * var(--tw-space-y-reverse))}.space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(1rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1rem * var(--tw-space-y-reverse))}.space-y-6>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(1.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1.5rem * var(--tw-space-y-reverse))}.space-y-7>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(1.75rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1.75rem * var(--tw-space-y-reverse))}.divide-y>:not([hidden])~:not([hidden]){--tw-divide-y-reverse:0;border-top-width:calc(1px * calc(1 - var(--tw-divide-y-reverse)));border-bottom-width:calc(1px * var(--tw-divide-y-reverse))}.divide-surface-2>:not([hidden])~:not([hidden]){--tw-divide-opacity:1;border-color:rgb(28 32 38/var(--tw-divide-opacity,1))}.self-start{align-self:flex-start}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.whitespace-pre-wrap{white-space:pre-wrap}.break-words{overflow-wrap:break-word}.break-all{word-break:break-all}.rounded{border-radius:4px}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:8px}.rounded-sm{border-radius:2px}.rounded-bl-sm{border-bottom-left-radius:2px}.rounded-br-sm{border-bottom-right-radius:2px}.border{border-width:1px}.border-b{border-bottom-width:1px}.border-l-2{border-left-width:2px}.border-r{border-right-width:1px}.border-t{border-top-width:1px}.border-amber-400\/30{border-color:rgb(251 191 36/.3)}.border-emerald-400\/30{border-color:rgb(52 211 153/.3)}.border-error{--tw-border-opacity:1;border-color:rgb(255 180 171/var(--tw-border-opacity,1))}.border-error\/30{border-color:rgb(255 180 171/.3)}.border-fuchsia-400\/30{border-color:rgb(232 121 249/.3)}.border-ink-mute\/30{border-color:rgb(132 148 149/.3)}.border-orange-400\/30{border-color:rgb(251 146 60/.3)}.border-outline{--tw-border-opacity:1;border-color:rgb(58 73 74/var(--tw-border-opacity,1))}.border-primary{--tw-border-opacity:1;border-color:rgb(0 245 255/var(--tw-border-opacity,1))}.border-primary\/30{border-color:rgb(0 245 255/.3)}.border-primary\/40{border-color:rgb(0 245 255/.4)}.border-secondary\/30{border-color:rgb(0 255 171/.3)}.border-secondary\/40{border-color:rgb(0 255 171/.4)}.border-sky-400\/30{border-color:rgb(56 189 248/.3)}.border-surface-2{--tw-border-opacity:1;border-color:rgb(28 32 38/var(--tw-border-opacity,1))}.border-surface-3{--tw-border-opacity:1;border-color:rgb(38 42 49/var(--tw-border-opacity,1))}.border-surface-4{--tw-border-opacity:1;border-color:rgb(49 53 60/var(--tw-border-opacity,1))}.border-violet-400\/30{border-color:rgb(167 139 250/.3)}.bg-amber-400\/10{background-color:rgb(251 191 36/.1)}.bg-canvas\/95{background-color:rgb(16 20 26/.95)}.bg-emerald-400\/10{background-color:rgb(52 211 153/.1)}.bg-error{--tw-bg-opacity:1;background-color:rgb(255 180 171/var(--tw-bg-opacity,1))}.bg-error\/15{background-color:rgb(255 180 171/.15)}.bg-fuchsia-400\/10{background-color:rgb(232 121 249/.1)}.bg-ink-mute{--tw-bg-opacity:1;background-color:rgb(132 148 149/var(--tw-bg-opacity,1))}.bg-orange-400\/10{background-color:rgb(251 146 60/.1)}.bg-primary{--tw-bg-opacity:1;background-color:rgb(0 245 255/var(--tw-bg-opacity,1))}.bg-primary\/10{background-color:rgb(0 245 255/.1)}.bg-primary\/15{background-color:rgb(0 245 255/.15)}.bg-primary\/5{background-color:rgb(0 245 255/.05)}.bg-primary\/60{background-color:rgb(0 245 255/.6)}.bg-secondary{--tw-bg-opacity:1;background-color:rgb(0 255 171/var(--tw-bg-opacity,1))}.bg-secondary\/10{background-color:rgb(0 255 171/.1)}.bg-secondary\/15{background-color:rgb(0 255 171/.15)}.bg-secondary\/5{background-color:rgb(0 255 171/.05)}.bg-sky-400\/10{background-color:rgb(56 189 248/.1)}.bg-surface-0{--tw-bg-opacity:1;background-color:rgb(10 14 20/var(--tw-bg-opacity,1))}.bg-surface-1{--tw-bg-opacity:1;background-color:rgb(24 28 34/var(--tw-bg-opacity,1))}.bg-surface-1\/30{background-color:rgb(24 28 34/.3)}.bg-surface-1\/40{background-color:rgb(24 28 34/.4)}.bg-surface-2{--tw-bg-opacity:1;background-color:rgb(28 32 38/var(--tw-bg-opacity,1))}.bg-surface-3{--tw-bg-opacity:1;background-color:rgb(38 42 49/var(--tw-bg-opacity,1))}.bg-violet-400\/10{background-color:rgb(167 139 250/.1)}.p-10{padding:2.5rem}.p-3{padding:.75rem}.p-4{padding:1rem}.p-5{padding:1.25rem}.p-6{padding:1.5rem}.p-7{padding:1.75rem}.px-1{padding-left:.25rem;padding-right:.25rem}.px-1\.5{padding-left:.375rem;padding-right:.375rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.px-5{padding-left:1.25rem;padding-right:1.25rem}.px-7{padding-left:1.75rem;padding-right:1.75rem}.py-0{padding-top:0;padding-bottom:0}.py-0\.5{padding-top:.125rem;padding-bottom:.125rem}.py-1\.5{padding-top:.375rem;padding-bottom:.375rem}.py-10{padding-top:2.5rem;padding-bottom:2.5rem}.py-12{padding-top:3rem;padding-bottom:3rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-2\.5{padding-top:.625rem;padding-bottom:.625rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.py-4{padding-top:1rem;padding-bottom:1rem}.pb-3{padding-bottom:.75rem}.pb-4{padding-bottom:1rem}.pb-5{padding-bottom:1.25rem}.pl-2{padding-left:.5rem}.pl-3{padding-left:.75rem}.pr-2{padding-right:.5rem}.pt-1{padding-top:.25rem}.pt-4{padding-top:1rem}.pt-5{padding-top:1.25rem}.text-left{text-align:left}.text-center{text-align:center}.text-right{text-align:right}.font-mono{font-family:JetBrains Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace}.text-\[10px\]{font-size:10px}.text-\[11px\]{font-size:11px}.text-\[12px\]{font-size:12px}.text-\[13px\]{font-size:13px}.text-\[9px\]{font-size:9px}.text-base{font-size:1rem;line-height:1.5rem}.text-body-md{font-size:14px;line-height:20px}.text-body-sm{font-size:12px;line-height:18px}.text-code-md{font-size:13px;line-height:20px}.text-code-sm{font-size:11px;line-height:16px}.text-headline-md{font-size:20px;line-height:28px;letter-spacing:-.01em;font-weight:600}.text-label-caps{font-size:11px;line-height:16px;letter-spacing:.05em;font-weight:600}.text-lg{font-size:1.125rem;line-height:1.75rem}.font-bold{font-weight:700}.font-normal{font-weight:400}.font-semibold{font-weight:600}.uppercase{text-transform:uppercase}.capitalize{text-transform:capitalize}.normal-case{text-transform:none}.leading-none{line-height:1}.leading-relaxed{line-height:1.625}.tracking-normal{letter-spacing:0}.tracking-tight{letter-spacing:-.025em}.tracking-wide{letter-spacing:.025em}.tracking-wider{letter-spacing:.05em}.text-amber-300{--tw-text-opacity:1;color:rgb(252 211 77/var(--tw-text-opacity,1))}.text-emerald-300{--tw-text-opacity:1;color:rgb(110 231 183/var(--tw-text-opacity,1))}.text-error{--tw-text-opacity:1;color:rgb(255 180 171/var(--tw-text-opacity,1))}.text-fuchsia-300{--tw-text-opacity:1;color:rgb(240 171 252/var(--tw-text-opacity,1))}.text-ink{--tw-text-opacity:1;color:rgb(223 226 235/var(--tw-text-opacity,1))}.text-ink-dim{--tw-text-opacity:1;color:rgb(185 202 202/var(--tw-text-opacity,1))}.text-ink-mute{--tw-text-opacity:1;color:rgb(132 148 149/var(--tw-text-opacity,1))}.text-orange-300{--tw-text-opacity:1;color:rgb(253 186 116/var(--tw-text-opacity,1))}.text-primary{--tw-text-opacity:1;color:rgb(0 245 255/var(--tw-text-opacity,1))}.text-secondary{--tw-text-opacity:1;color:rgb(0 255 171/var(--tw-text-opacity,1))}.text-sky-300{--tw-text-opacity:1;color:rgb(125 211 252/var(--tw-text-opacity,1))}.text-violet-300{--tw-text-opacity:1;color:rgb(196 181 253/var(--tw-text-opacity,1))}.opacity-50{opacity:.5}.opacity-60{opacity:.6}.opacity-80{opacity:.8}.shadow-\[0_20px_60px_-10px_rgba\(0\2c 0\2c 0\2c 0\.8\)\]{--tw-shadow:0 20px 60px -10px rgba(0,0,0,0.8);--tw-shadow-colored:0 20px 60px -10px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.backdrop-blur{--tw-backdrop-blur:blur(8px)}.backdrop-blur,.backdrop-filter{backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-opacity{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap");:root{color-scheme:dark}body,html{background:#10141a;color:#dfe2eb;font-family:Inter,system-ui,-apple-system,sans-serif;font-size:14px;line-height:20px;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}*{box-sizing:border-box}::-moz-selection{background:#00f5ff;color:#003739}::selection{background:#00f5ff;color:#003739}::-webkit-scrollbar{width:10px;height:10px}::-webkit-scrollbar-track{background:#0a0e14}::-webkit-scrollbar-thumb{background:#262a31;border-radius:4px}::-webkit-scrollbar-thumb:hover{background:#31353c}.card{background:#181c22;border:1px solid #262a31;border-radius:6px}.card-header{padding:10px 14px;border-bottom:1px solid #262a31;font-size:11px;letter-spacing:.05em;font-weight:600;color:#b9caca;text-transform:uppercase}.metric-value{font-family:JetBrains Mono,monospace;font-size:24px;font-weight:500;color:#dfe2eb}.metric-label{font-size:11px;letter-spacing:.05em;font-weight:600;color:#849495;text-transform:uppercase}.btn{display:inline-flex;align-items:center;gap:6px;height:32px;padding:0 12px;border-radius:4px;background:#1c2026;border:1px solid #31353c;color:#dfe2eb;font-size:13px;cursor:pointer;transition:border-color .12s ease,background .12s ease}.btn:hover{border-color:#6E7681}.btn-primary{background:#00f5ff;color:#003739;border-color:transparent;font-weight:600}.btn-primary:hover{background:#00dce5;border-color:transparent}.tabular{font-variant-numeric:tabular-nums}a{color:inherit;text-decoration:none}.hover\:border-primary:hover{--tw-border-opacity:1;border-color:rgb(0 245 255/var(--tw-border-opacity,1))}.hover\:bg-surface-1:hover{--tw-bg-opacity:1;background-color:rgb(24 28 34/var(--tw-bg-opacity,1))}.hover\:bg-surface-2\/40:hover{background-color:rgb(28 32 38/.4)}.hover\:bg-surface-2\/50:hover{background-color:rgb(28 32 38/.5)}.hover\:bg-surface-2\/60:hover{background-color:rgb(28 32 38/.6)}.hover\:text-error:hover{--tw-text-opacity:1;color:rgb(255 180 171/var(--tw-text-opacity,1))}.hover\:text-ink:hover{--tw-text-opacity:1;color:rgb(223 226 235/var(--tw-text-opacity,1))}.hover\:text-ink-dim:hover{--tw-text-opacity:1;color:rgb(185 202 202/var(--tw-text-opacity,1))}.hover\:text-primary:hover{--tw-text-opacity:1;color:rgb(0 245 255/var(--tw-text-opacity,1))}.hover\:underline:hover{text-decoration-line:underline}.focus\:border-primary:focus{--tw-border-opacity:1;border-color:rgb(0 245 255/var(--tw-border-opacity,1))}.focus\:bg-surface-2\/70:focus{background-color:rgb(28 32 38/.7)}.focus\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:opacity-50:disabled{opacity:.5}.group:hover .group-hover\:text-primary{--tw-text-opacity:1;color:rgb(0 245 255/var(--tw-text-opacity,1))}@supports (backdrop-filter:var(--tw )){.supports-\[backdrop-filter\]\:bg-canvas\/80{background-color:rgb(16 20 26/.8)}}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
self.__BUILD_MANIFEST=function(e,r,t,_){return{__rewrites:{afterFiles:[],beforeFiles:[],fallback:[]},__routerFilterStatic:{numItems:9,errorRate:1e-4,numBits:173,numHashes:14,bitArray:[1,1,0,r,r,0,e,e,e,r,e,r,r,e,e,r,r,e,r,e,e,e,r,e,e,e,e,r,e,e,e,e,e,r,e,r,r,e,r,e,e,r,r,e,e,r,e,r,e,e,e,e,e,r,e,e,e,e,r,e,e,r,r,e,e,e,r,r,e,r,r,r,r,e,e,r,r,r,r,e,e,e,r,e,e,r,e,e,r,r,r,e,e,e,e,r,e,r,e,e,e,e,e,r,e,e,e,r,e,r,e,e,r,e,r,e,r,r,r,e,e,r,r,e,e,r,e,e,e,r,r,r,r,e,r,r,e,e,r,r,r,r,r,e,r,e,r,r,r,e,r,e,r,r,r,r,e,e,r,e,r,e,e,e,r,r,e,r,r,e,r,e,r]},__routerFilterDynamic:{numItems:2,errorRate:1e-4,numBits:39,numHashes:14,bitArray:[r,r,r,r,r,r,e,r,r,r,e,e,r,e,e,e,e,r,r,e,r,e,r,r,r,e,e,r,r,r,r,r,e,r,e,e,e,e,e]},"/_error":["static/chunks/pages/_error-022e4ac7bbb9914f.js"],sortedPages:["/_app","/_error"]}}(0,1,1e-4,14),self.__BUILD_MANIFEST_CB&&self.__BUILD_MANIFEST_CB();
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[52,407],{84441:()=>{}},_=>{_.O(0,[441,255,358],()=>_(_.s=84441)),_N_E=_.O()}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[52,407],{84441:()=>{}},_=>{_.O(0,[441,255,358],()=>_(_.s=84441)),_N_E=_.O()}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[177],{2821:(e,t,r)=>{"use strict";r.d(t,{A:()=>n});let n=function(){for(var e,t,r=0,n="",a=arguments.length;r<a;r++)(e=arguments[r])&&(t=function e(t){var r,n,a="";if("string"==typeof t||"number"==typeof t)a+=t;else if("object"==typeof t)if(Array.isArray(t)){var s=t.length;for(r=0;r<s;r++)t[r]&&(n=e(t[r]))&&(a&&(a+=" "),a+=n)}else for(n in t)t[n]&&(a&&(a+=" "),a+=n);return a}(e))&&(n&&(n+=" "),n+=t);return n}},13673:()=>{},16078:(e,t,r)=>{Promise.resolve().then(r.t.bind(r,13673,23)),Promise.resolve().then(r.bind(r,82259))},20063:(e,t,r)=>{"use strict";var n=r(47260);r.o(n,"usePathname")&&r.d(t,{usePathname:function(){return n.usePathname}}),r.o(n,"useRouter")&&r.d(t,{useRouter:function(){return n.useRouter}}),r.o(n,"useSearchParams")&&r.d(t,{useSearchParams:function(){return n.useSearchParams}})},82259:(e,t,r)=>{"use strict";r.d(t,{Sidebar:()=>y});var n=r(95155),a=r(52619),s=r.n(a),l=r(20063),o=r(2821),c=r(12115),i=r(47650);function d(e){var t,r,n,a;if(!e||!e.ok)return null;let s=null!=(n=null==(t=e.primary)?void 0:t.pct)?n:null,l=null!=(a=null==(r=e.secondary)?void 0:r.pct)?a:null;return null===s&&null===l?null:Math.max(null!=s?s:0,null!=l?l:0)}function u(e){let t=e-Date.now();if(t<=0)return"resetting";let r=Math.round(t/6e4);if(r<1)return"<1m";if(r<60)return"".concat(r,"m");let n=Math.floor(r/60),a=r%60;return 0===a?"".concat(n,"h"):"".concat(n,"h").concat(a,"m")}function p(){let[e,t]=(0,c.useState)({claude:null,codex:null,fetchedAt:0,loading:!1}),[r,a]=(0,c.useState)(!1),[s,l]=(0,c.useState)(null),o=(0,c.useRef)(null),p=(0,c.useRef)(null);(0,c.useEffect)(()=>{if(!r||!o.current)return;let e=()=>{o.current&&l(o.current.getBoundingClientRect())};return e(),window.addEventListener("scroll",e,!0),window.addEventListener("resize",e),()=>{window.removeEventListener("scroll",e,!0),window.removeEventListener("resize",e)}},[r]);let m=(0,c.useCallback)(async()=>{t(e=>({...e,loading:!0}));let[e,r]=await Promise.all([fetch("/api/quota-probe?provider=claude",{method:"POST"}).then(e=>e.json()).catch(e=>({ok:!1,error:e.message})),fetch("/api/quota-probe?provider=codex",{method:"POST"}).then(e=>e.json()).catch(e=>({ok:!1,error:e.message}))]);t({claude:f("claude",e),codex:f("codex",r),fetchedAt:Date.now(),loading:!1})},[]);function h(){p.current&&clearTimeout(p.current),a(!0),Date.now()-e.fetchedAt>6e4&&!e.loading&&m()}function b(){p.current&&clearTimeout(p.current),p.current=setTimeout(()=>a(!1),120)}return(0,n.jsxs)("div",{ref:o,className:"relative px-3 py-2 border-b border-surface-2",onMouseEnter:h,onMouseLeave:b,onFocus:h,onBlur:b,children:[(0,n.jsxs)("button",{type:"button",onClick:m,className:"w-full flex items-center gap-2 text-[12px] text-ink-dim hover:text-ink","aria-haspopup":"dialog","aria-expanded":r,children:[(0,n.jsx)("span",{className:"w-1.5 h-1.5 rounded-full ".concat(function(e){var t,r;if(0===e.fetchedAt)return"bg-ink-mute";let n=Math.max(null!=(t=d(e.claude))?t:0,null!=(r=d(e.codex))?r:0);return n>=95?"bg-error":n>=80?"bg-secondary":"bg-primary"}(e)," ").concat(e.loading?"animate-pulse":"")}),(0,n.jsx)("span",{className:"font-mono tabular truncate",children:e.loading&&0===e.fetchedAt?"Probing…":function(e){var t;if(0===e.fetchedAt)return"Live quota";let r=d(e.claude);return null!==r&&(null==(t=e.claude)?void 0:t.primary)?"Claude ".concat(Math.round(r),"% \xb7 ").concat(u(e.claude.primary.resetsAt)):"Live quota"}(e)})]}),r&&s&&"undefined"!=typeof document&&(0,i.createPortal)((0,n.jsx)(x,{state:e,loading:e.loading,anchorRect:s,onEnter:h,onLeave:b}),document.body)]})}function x(e){let{state:t,loading:r,anchorRect:a,onEnter:s,onLeave:l}=e,o={position:"fixed",left:a.right+8,top:a.top,backgroundColor:"#1c2026",isolation:"isolate"};return(0,n.jsx)("div",{role:"dialog",onMouseEnter:s,onMouseLeave:l,className:"w-72 z-[9999] rounded-lg border border-surface-3 p-4 space-y-4 shadow-[0_20px_60px_-10px_rgba(0,0,0,0.8)]",style:o,children:r&&0===t.fetchedAt?(0,n.jsx)("div",{className:"text-body-sm text-ink-mute",children:"Probing Anthropic & OpenAI…"}):(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(m,{kpi:t.claude}),(0,n.jsx)("div",{className:"border-t border-surface-2"}),(0,n.jsx)(m,{kpi:t.codex}),(0,n.jsx)("div",{className:"text-[10px] text-ink-mute font-mono tabular pt-1 border-t border-surface-2",children:0===t.fetchedAt?"never probed":"updated ".concat(function(e){let t=Date.now()-e;return t<1e3?"just now":t<6e4?"".concat(Math.round(t/1e3),"s ago"):"".concat(Math.round(t/6e4),"m ago")}(t.fetchedAt)," \xb7 hover again after 60s to refresh")})]})})}function m(e){let{kpi:t}=e;if(!t)return(0,n.jsx)("div",{className:"text-body-sm text-ink-mute",children:"No data."});let r="claude"===t.provider?"Claude":"Codex";return(0,n.jsxs)("div",{className:"space-y-2",children:[(0,n.jsxs)("div",{className:"flex items-baseline justify-between",children:[(0,n.jsx)("span",{className:"text-label-caps text-ink-dim",children:r}),t.ok&&t.planType&&(0,n.jsx)("span",{className:"text-[10px] text-ink-mute font-mono uppercase tracking-wide",children:t.planType})]}),t.ok?(0,n.jsxs)(n.Fragment,{children:[t.primary&&(0,n.jsx)(h,{label:t.primary.label,pct:t.primary.pct,resetsAt:t.primary.resetsAt,accent:"primary"}),t.secondary&&(0,n.jsx)(h,{label:t.secondary.label,pct:t.secondary.pct,resetsAt:t.secondary.resetsAt,accent:"secondary"}),!t.primary&&!t.secondary&&(0,n.jsx)("div",{className:"text-body-sm text-ink-mute",children:"No rate-limit headers returned."})]}):(0,n.jsx)("div",{className:"text-[11px] text-ink-mute leading-relaxed",children:t.error})]})}function h(e){let{label:t,pct:r,resetsAt:a,accent:s}=e;return(0,n.jsxs)("div",{children:[(0,n.jsxs)("div",{className:"flex items-baseline justify-between text-body-sm",children:[(0,n.jsx)("span",{className:"text-ink font-mono uppercase tracking-wider text-[10px]",children:t}),(0,n.jsxs)("span",{className:"font-mono tabular text-ink",children:[Math.round(r),"%"]})]}),(0,n.jsx)("div",{className:"h-1 bg-surface-2 rounded-full overflow-hidden mt-1",children:(0,n.jsx)("div",{className:"h-full ".concat("primary"===s?"bg-primary":"bg-secondary"),style:{width:"".concat(Math.min(100,Math.max(0,r)),"%")}})}),(0,n.jsxs)("div",{className:"text-[10px] text-ink-mute font-mono tabular mt-0.5",children:["resets in ",u(a)]})]})}function f(e,t){if(!t||!("ok"in t))return{provider:e,ok:!1,observedAt:Date.now(),planType:null,primary:null,secondary:null,error:"unexpected response"};if(!t.ok)return{provider:e,ok:!1,observedAt:Date.now(),planType:null,primary:null,secondary:null,error:t.error};let r=t.snapshot;return{provider:e,ok:!0,observedAt:r.observedAt,planType:r.planType,primary:r.primary?{pct:r.primary.pct,resetsAt:r.primary.resetsAt,label:"claude"===e?"5h":"1m"}:null,secondary:r.secondary?{pct:r.secondary.pct,resetsAt:r.secondary.resetsAt,label:"7d"}:null}}let b=[{href:"/",label:"Dashboard",icon:"◧"},{href:"/timeline",label:"Timeline",icon:"☰"},{href:"/projects",label:"Projects",icon:"▦"},{href:"/sessions",label:"Sessions",icon:"⌘"},{href:"/analytics",label:"Analytics",icon:"⌁"}];function y(){let e=(0,l.usePathname)();return(0,n.jsxs)("aside",{className:"w-56 shrink-0 border-r border-surface-2 bg-surface-0 flex flex-col sticky top-0 h-screen self-start",children:[(0,n.jsxs)("div",{className:"px-5 border-b border-surface-2 h-[72px] flex flex-col justify-center",children:[(0,n.jsxs)("div",{className:"flex items-baseline gap-1.5 leading-none",children:[(0,n.jsx)("span",{className:"text-primary text-base",children:"◧"}),(0,n.jsxs)("span",{className:"text-lg font-bold tracking-tight",children:[(0,n.jsx)("span",{className:"text-ink-dim",children:"Agent"}),(0,n.jsx)("span",{className:"text-primary",children:"Graphed"})]})]}),(0,n.jsx)("div",{className:"text-[10px] uppercase tracking-wider text-ink-mute mt-1.5",children:"See your AI work"})]}),(0,n.jsx)(p,{}),(0,n.jsx)("nav",{className:"px-2 py-3 flex-1 flex flex-col gap-0.5",children:b.map(t=>{let r="/"===t.href?"/"===e:e.startsWith(t.href);return(0,n.jsxs)(s(),{href:t.href,className:(0,o.A)("flex items-center gap-3 px-3 py-2 rounded text-[13px] transition-colors",r?"bg-surface-2 text-primary border-l-2 border-primary -ml-px":"text-ink-dim hover:text-ink hover:bg-surface-1"),children:[(0,n.jsx)("span",{className:"text-base w-4 text-center opacity-80",children:t.icon}),(0,n.jsx)("span",{children:t.label})]},t.href)})}),(0,n.jsx)("div",{className:"px-2 py-3 border-t border-surface-2",children:(0,n.jsxs)(s(),{href:"/settings",className:(0,o.A)("flex items-center gap-3 px-3 py-2 rounded text-[13px] transition-colors",e.startsWith("/settings")?"bg-surface-2 text-primary border-l-2 border-primary -ml-px":"text-ink-dim hover:text-ink hover:bg-surface-1"),children:[(0,n.jsx)("span",{className:"text-base w-4 text-center opacity-80",children:"⚙"}),(0,n.jsx)("span",{children:"Settings"})]})})]})}}},e=>{e.O(0,[978,619,441,255,358],()=>e(e.s=16078)),_N_E=e.O()}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[974],{20467:(e,t,a)=>{"use strict";function n(e){return e>=1e6?"".concat((e/1e6).toFixed(1),"M"):e>=1e3?"".concat((e/1e3).toFixed(1),"k"):e.toString()}function s(e){return e>=1e3?"$".concat(e.toFixed(0)):"$".concat(e.toFixed(2))}function o(e){let t=Math.floor(e/1e3);if(t<60)return"".concat(t,"s");let a=Math.floor(t/60);if(a<60)return"".concat(a,"m");let n=Math.floor(a/60);return"".concat(n,"h ").concat(a%60,"m")}a.d(t,{F0:()=>s,c5:()=>o,yj:()=>n})},29366:(e,t,a)=>{"use strict";a.d(t,{UsageChartCard:()=>h});var n=a(95155),s=a(12115),o=a(26991),r=a(73850),l=a(68425),i=a(47734),c=a(73697),d=a(23508),u=a(77568),m=a(20467);function x(e){let{data:t,metric:a="tokens",scale:s="lin"}=e,x=t.map(e=>{let t=e[a];return{...e,label:e.day.slice(5),value:"log"===s&&t<=0?1:t,raw:t}}),h="cost"===a?"#00ffab":"#00f5ff";return(0,n.jsx)("div",{className:"h-64 -mx-1",children:(0,n.jsx)(o.u,{width:"100%",height:"100%",children:(0,n.jsxs)(r.Q,{data:x,margin:{top:8,right:8,bottom:0,left:-8},children:[(0,n.jsx)("defs",{children:(0,n.jsxs)("linearGradient",{id:"grad-".concat(a),x1:"0",y1:"0",x2:"0",y2:"1",children:[(0,n.jsx)("stop",{offset:"0%",stopColor:h,stopOpacity:.35}),(0,n.jsx)("stop",{offset:"100%",stopColor:h,stopOpacity:0})]})}),(0,n.jsx)(l.d,{stroke:"#262a31",strokeDasharray:"2 4",vertical:!1}),(0,n.jsx)(i.W,{dataKey:"label",tick:{fill:"#849495",fontSize:11,fontFamily:"JetBrains Mono"},axisLine:{stroke:"#262a31"},tickLine:!1,minTickGap:48}),(0,n.jsx)(c.h,{scale:"log"===s?"log":"auto",domain:"log"===s?[1,"auto"]:["auto","auto"],allowDataOverflow:!0,tick:{fill:"#849495",fontSize:11,fontFamily:"JetBrains Mono"},axisLine:!1,tickLine:!1,tickFormatter:e=>"cost"===a?"$".concat(Math.round(e)):(0,m.yj)(e)}),(0,n.jsx)(d.m,{cursor:{stroke:h,strokeOpacity:.3},contentStyle:{background:"#181c22",border:"1px solid ".concat(h),borderRadius:6,fontSize:12,color:"#dfe2eb"},formatter:(e,t,n)=>{var s,o;let r=null!=(o=null==n||null==(s=n.payload)?void 0:s.raw)?o:0;return"tokens"===a?[(0,m.yj)(r),"tokens"]:"sessions"===a?[r.toString(),"sessions"]:["$".concat(r.toFixed(2)),"cost"]},labelFormatter:e=>"Day ".concat(e)}),(0,n.jsx)(u.G,{type:"monotone",dataKey:"value",stroke:h,strokeWidth:2,fill:"url(#grad-".concat(a,")"),isAnimationActive:!1})]})})})}function h(e){let{data:t,label:a="last 30 days"}=e,[o,r]=(0,s.useState)("tokens"),l=(0,s.useMemo)(()=>!function(e,t){let a=e.map(e=>e[t]).filter(e=>e>0);if(a.length<5)return!1;let n=[...a].sort((e,t)=>e-t);return n[n.length-1]/Math.max(n[Math.floor(n.length/2)],1)>10}(t,o)?"lin":"log",[t,o]),[i,c]=(0,s.useState)(null),d=null!=i?i:l;return(0,n.jsxs)("div",{className:"card",children:[(0,n.jsxs)("div",{className:"card-header flex items-center justify-between",children:[(0,n.jsxs)("span",{children:["Usage — ",a]}),(0,n.jsxs)("div",{className:"flex items-center gap-3 normal-case tracking-normal",children:[(0,n.jsx)("div",{className:"flex items-center gap-0.5",children:[{id:"tokens",label:"Tokens"},{id:"sessions",label:"Sessions"},{id:"cost",label:"Est. Cost"}].map(e=>(0,n.jsx)("button",{onClick:()=>r(e.id),className:"px-2 py-0.5 text-[11px] rounded transition-colors font-mono ".concat(o===e.id?"bg-primary/15 text-primary":"text-ink-mute hover:text-ink-dim"),children:e.label},e.id))}),(0,n.jsx)("div",{className:"w-px h-4 bg-surface-3"}),(0,n.jsx)("div",{className:"flex items-center gap-0.5",children:["lin","log"].map(e=>(0,n.jsxs)("button",{onClick:()=>c(e),className:"px-1.5 py-0.5 text-[10px] rounded transition-colors font-mono uppercase relative ".concat(d===e?"bg-secondary/15 text-secondary":"text-ink-mute hover:text-ink-dim"),title:"log"===e?"Logarithmic scale — better when one day dwarfs the rest":"Linear scale",children:[e,null===i&&l===e&&(0,n.jsx)("span",{className:"absolute -top-0.5 -right-0.5 w-1.5 h-1.5 rounded-full bg-secondary",title:"auto-selected based on data range"})]},e))})]})]}),(0,n.jsx)("div",{className:"p-4",children:(0,n.jsx)(x,{data:t,metric:o,scale:d})})]})}},34077:(e,t,a)=>{"use strict";a.d(t,{FreshnessIndicator:()=>r});var n=a(95155),s=a(12115),o=a(20063);function r(e){let{lastIngestedAt:t}=e,[,a]=(0,s.useState)(0),[r,l]=(0,s.useTransition)(),i=(0,o.useRouter)();(0,s.useEffect)(()=>{let e=setInterval(()=>a(e=>e+1),5e3);return()=>clearInterval(e)},[]);let c=0===t?"never scanned":"updated ".concat(function(e){let t=Date.now()-e;return t<1e3?"just now":t<6e4?"".concat(Math.round(t/1e3),"s"):t<36e5?"".concat(Math.round(t/6e4),"m"):"".concat(Math.round(t/36e5),"h")}(t)," ago");return(0,n.jsxs)("span",{className:"text-[11px] text-ink-mute font-mono tabular flex items-center gap-2",children:[(0,n.jsx)("span",{children:c}),(0,n.jsx)("button",{onClick:function(){l(()=>i.refresh())},disabled:r,className:"text-ink-mute hover:text-primary uppercase tracking-wide disabled:opacity-50",title:"Re-scan local sessions and refresh",children:r?"…":"refresh"})]})}},95800:(e,t,a)=>{Promise.resolve().then(a.t.bind(a,52619,23)),Promise.resolve().then(a.bind(a,34077)),Promise.resolve().then(a.bind(a,95925)),Promise.resolve().then(a.bind(a,29366))},95925:(e,t,a)=>{"use strict";a.d(t,{RangePicker:()=>l});var n=a(95155),s=a(20063),o=a(12115);let r=[{key:"7d",label:"Last 7 days",days:7},{key:"30d",label:"Last 30 days",days:30},{key:"90d",label:"Last 90 days",days:90},{key:"all",label:"All time",days:null}];function l(e){let{current:t}=e,a=(0,s.useRouter)(),l=(0,s.usePathname)(),i=(0,s.useSearchParams)(),[c,d]=(0,o.useTransition)();return(0,n.jsx)("div",{className:"flex items-center gap-0.5 normal-case tracking-normal transition-opacity ".concat(c?"opacity-50":""),children:r.map(e=>(0,n.jsx)("button",{onClick:()=>(e=>{let t=new URLSearchParams(i.toString());"30d"===e?t.delete("range"):t.set("range",e);let n=t.toString();d(()=>{a.push(n?"".concat(l,"?").concat(n):l)})})(e.key),className:"px-2 py-0.5 text-[11px] rounded transition-colors font-mono ".concat(t===e.key?"bg-primary/15 text-primary":"text-ink-mute hover:text-ink-dim"),children:"all"===e.key?"All":e.key},e.key))})}}},e=>{e.O(0,[619,997,441,255,358],()=>e(e.s=95800)),_N_E=e.O()}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[404,801,893],{8724:(e,s,_)=>{Promise.resolve().then(_.t.bind(_,52619,23))}},e=>{e.O(0,[619,441,255,358],()=>e(e.s=8724)),_N_E=e.O()}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[404,801,893],{8724:(e,s,_)=>{Promise.resolve().then(_.t.bind(_,52619,23))}},e=>{e.O(0,[619,441,255,358],()=>e(e.s=8724)),_N_E=e.O()}]);
|