agentgraphed 0.3.0 → 0.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.next/standalone/.next/BUILD_ID +1 -1
- package/.next/standalone/.next/app-build-manifest.json +39 -39
- package/.next/standalone/.next/app-path-routes-manifest.json +6 -6
- package/.next/standalone/.next/build-manifest.json +3 -3
- package/.next/standalone/.next/prerender-manifest.json +3 -3
- package/.next/standalone/.next/required-server-files.json +6 -6
- package/.next/standalone/.next/server/app/_not-found/page.js +2 -2
- package/.next/standalone/.next/server/app/_not-found/page.js.nft.json +1 -1
- 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 +2 -2
- 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.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.js +2 -2
- 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 -1
- package/.next/standalone/.next/server/app/api/share/dashboard/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/share/project/[id]/route.js +1 -1
- package/.next/standalone/.next/server/app/api/share/project/[id]/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/share/session/[id]/route.js +1 -1
- package/.next/standalone/.next/server/app/api/share/session/[id]/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/page.js +3 -3
- 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 +2 -2
- 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 +2 -44
- 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 -3
- 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 +2 -44
- 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 +4 -4
- 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 +2 -44
- 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 -6
- package/.next/standalone/.next/server/chunks/27.js +15 -3
- package/.next/standalone/.next/server/chunks/450.js +137 -0
- package/.next/standalone/.next/server/chunks/564.js +4 -4
- package/.next/standalone/.next/server/chunks/694.js +43 -0
- package/.next/standalone/.next/server/chunks/903.js +1 -0
- package/.next/standalone/.next/server/chunks/944.js +61 -25
- package/.next/standalone/.next/server/chunks/954.js +1 -0
- package/.next/standalone/.next/server/functions-config-manifest.json +1 -1
- package/.next/standalone/.next/server/middleware-build-manifest.js +1 -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/chunks/app/_not-found/{page-dc1cbec20c205394.js → page-01ad39d2ead973c7.js} +1 -1
- package/.next/{static/chunks/app/analytics/page-42186370029f753c.js → standalone/.next/static/chunks/app/analytics/page-79a1781c3529dcb6.js} +1 -1
- package/.next/standalone/.next/static/chunks/app/{layout-4527370a1e451501.js → layout-bbab14e77aaeeb67.js} +1 -1
- package/.next/standalone/.next/static/chunks/app/page-d5393f25e2553a0c.js +1 -0
- package/.next/standalone/.next/static/chunks/app/projects/[id]/page-32fe8cf66558be7c.js +1 -0
- package/.next/standalone/.next/static/chunks/app/projects/page-dce207c2f75422be.js +1 -0
- package/.next/standalone/.next/static/chunks/app/sessions/[id]/{page-a887f742425eb49c.js → page-49542233907f7f6b.js} +1 -1
- package/.next/standalone/.next/static/chunks/app/sessions/page-aec145af506da55b.js +1 -0
- package/.next/standalone/.next/static/chunks/app/settings/page-b961ca195748ef3b.js +1 -0
- package/.next/standalone/.next/static/chunks/app/timeline/page-dce207c2f75422be.js +1 -0
- package/.next/standalone/.next/static/chunks/{main-app-c9ae70e5bb48ac77.js → main-app-27b331c894fe5037.js} +1 -1
- package/.next/standalone/node_modules/@img/{sharp-libvips-darwin-arm64/lib/libvips-cpp.8.17.3.dylib → sharp-libvips-linux-x64/lib/libvips-cpp.so.8.17.3} +0 -0
- package/.next/standalone/node_modules/@img/{sharp-libvips-darwin-arm64 → sharp-libvips-linux-x64}/package.json +11 -5
- package/.next/standalone/node_modules/@img/sharp-libvips-linuxmusl-x64/lib/index.js +1 -0
- package/.next/standalone/node_modules/@img/sharp-libvips-linuxmusl-x64/lib/libvips-cpp.so.8.17.3 +0 -0
- package/.next/standalone/node_modules/@img/sharp-libvips-linuxmusl-x64/package.json +42 -0
- package/.next/standalone/node_modules/@img/sharp-libvips-linuxmusl-x64/versions.json +30 -0
- package/.next/standalone/node_modules/@img/sharp-linux-x64/lib/sharp-linux-x64.node +0 -0
- package/.next/standalone/node_modules/@img/{sharp-darwin-arm64 → sharp-linux-x64}/package.json +13 -7
- package/.next/standalone/node_modules/@img/sharp-linuxmusl-x64/LICENSE +191 -0
- package/.next/standalone/node_modules/@img/sharp-linuxmusl-x64/lib/sharp-linuxmusl-x64.node +0 -0
- package/.next/standalone/node_modules/@img/sharp-linuxmusl-x64/package.json +46 -0
- package/.next/standalone/package.json +1 -1
- package/.next/standalone/server.js +1 -1
- package/.next/standalone/src/lib/pricing-data/litellm.json +615 -92
- package/.next/standalone/src/lib/pricing-data/litellm.meta.json +2 -2
- package/.next/static/chunks/app/_not-found/{page-dc1cbec20c205394.js → page-01ad39d2ead973c7.js} +1 -1
- package/.next/{standalone/.next/static/chunks/app/analytics/page-42186370029f753c.js → static/chunks/app/analytics/page-79a1781c3529dcb6.js} +1 -1
- package/.next/static/chunks/app/{layout-4527370a1e451501.js → layout-bbab14e77aaeeb67.js} +1 -1
- package/.next/static/chunks/app/page-d5393f25e2553a0c.js +1 -0
- package/.next/static/chunks/app/projects/[id]/page-32fe8cf66558be7c.js +1 -0
- package/.next/static/chunks/app/projects/page-dce207c2f75422be.js +1 -0
- package/.next/static/chunks/app/sessions/[id]/{page-a887f742425eb49c.js → page-49542233907f7f6b.js} +1 -1
- package/.next/static/chunks/app/sessions/page-aec145af506da55b.js +1 -0
- package/.next/static/chunks/app/settings/page-b961ca195748ef3b.js +1 -0
- package/.next/static/chunks/app/timeline/page-dce207c2f75422be.js +1 -0
- package/.next/static/chunks/{main-app-c9ae70e5bb48ac77.js → main-app-27b331c894fe5037.js} +1 -1
- package/CHANGELOG.md +22 -0
- package/README.md +52 -46
- package/package.json +1 -1
- package/src/lib/pricing-data/litellm.json +615 -92
- package/src/lib/pricing-data/litellm.meta.json +2 -2
- package/.next/standalone/.next/server/chunks/165.js +0 -109
- package/.next/standalone/.next/server/chunks/191.js +0 -1
- package/.next/standalone/.next/server/chunks/367.js +0 -43
- package/.next/standalone/.next/server/chunks/660.js +0 -1
- package/.next/standalone/.next/static/chunks/app/page-aa358006ddd29e91.js +0 -1
- package/.next/standalone/.next/static/chunks/app/projects/[id]/page-15f21aaacdacb59c.js +0 -1
- package/.next/standalone/.next/static/chunks/app/projects/page-d794cc35674274a4.js +0 -1
- package/.next/standalone/.next/static/chunks/app/sessions/page-35c503eef7e53742.js +0 -1
- package/.next/standalone/.next/static/chunks/app/settings/page-dc0bec0bd2577322.js +0 -1
- package/.next/standalone/.next/static/chunks/app/timeline/page-d794cc35674274a4.js +0 -1
- package/.next/standalone/node_modules/@img/sharp-darwin-arm64/lib/sharp-darwin-arm64.node +0 -0
- package/.next/standalone/node_modules/better-sqlite3/build/Release/better_sqlite3.node +0 -0
- package/.next/standalone/node_modules/better-sqlite3/lib/database.js +0 -90
- package/.next/standalone/node_modules/better-sqlite3/lib/index.js +0 -3
- package/.next/standalone/node_modules/better-sqlite3/lib/methods/aggregate.js +0 -43
- package/.next/standalone/node_modules/better-sqlite3/lib/methods/backup.js +0 -67
- package/.next/standalone/node_modules/better-sqlite3/lib/methods/function.js +0 -31
- package/.next/standalone/node_modules/better-sqlite3/lib/methods/inspect.js +0 -7
- package/.next/standalone/node_modules/better-sqlite3/lib/methods/pragma.js +0 -12
- package/.next/standalone/node_modules/better-sqlite3/lib/methods/serialize.js +0 -16
- package/.next/standalone/node_modules/better-sqlite3/lib/methods/table.js +0 -189
- package/.next/standalone/node_modules/better-sqlite3/lib/methods/transaction.js +0 -78
- package/.next/standalone/node_modules/better-sqlite3/lib/methods/wrappers.js +0 -54
- package/.next/standalone/node_modules/better-sqlite3/lib/sqlite-error.js +0 -20
- package/.next/standalone/node_modules/better-sqlite3/lib/util.js +0 -12
- package/.next/standalone/node_modules/better-sqlite3/package.json +0 -54
- package/.next/static/chunks/app/page-aa358006ddd29e91.js +0 -1
- package/.next/static/chunks/app/projects/[id]/page-15f21aaacdacb59c.js +0 -1
- package/.next/static/chunks/app/projects/page-d794cc35674274a4.js +0 -1
- package/.next/static/chunks/app/sessions/page-35c503eef7e53742.js +0 -1
- package/.next/static/chunks/app/settings/page-dc0bec0bd2577322.js +0 -1
- package/.next/static/chunks/app/timeline/page-d794cc35674274a4.js +0 -1
- /package/.next/standalone/.next/static/{A6dvfHR2KYz42pasM2hyV → hnOq_d-GplXbWU5EnSBzF}/_buildManifest.js +0 -0
- /package/.next/standalone/.next/static/{A6dvfHR2KYz42pasM2hyV → hnOq_d-GplXbWU5EnSBzF}/_ssgManifest.js +0 -0
- /package/.next/standalone/node_modules/@img/{sharp-libvips-darwin-arm64 → sharp-libvips-linux-x64}/lib/index.js +0 -0
- /package/.next/standalone/node_modules/@img/{sharp-libvips-darwin-arm64 → sharp-libvips-linux-x64}/versions.json +0 -0
- /package/.next/standalone/node_modules/@img/{sharp-darwin-arm64 → sharp-linux-x64}/LICENSE +0 -0
- /package/.next/static/{A6dvfHR2KYz42pasM2hyV → hnOq_d-GplXbWU5EnSBzF}/_buildManifest.js +0 -0
- /package/.next/static/{A6dvfHR2KYz42pasM2hyV → hnOq_d-GplXbWU5EnSBzF}/_ssgManifest.js +0 -0
package/.next/static/chunks/app/_not-found/{page-dc1cbec20c205394.js → page-01ad39d2ead973c7.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[492],{24585:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"styles",{enumerable:!0,get:function(){return l}});let l={error:{fontFamily:'system-ui,"Segoe UI",Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji"',height:"100vh",textAlign:"center",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},desc:{display:"inline-block"},h1:{display:"inline-block",margin:"0 20px 0 0",padding:"0 23px 0 0",fontSize:24,fontWeight:500,verticalAlign:"top",lineHeight:"49px"},h2:{fontSize:14,fontWeight:400,lineHeight:"49px",margin:0}};("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},38886:(e,t,l)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"HTTPAccessErrorFallback",{enumerable:!0,get:function(){return o}});let r=l(95155),n=l(24585);function o(e){let{status:t,message:l}=e;return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("title",{children:t+": "+l}),(0,r.jsx)("div",{style:n.styles.error,children:(0,r.jsxs)("div",{children:[(0,r.jsx)("style",{dangerouslySetInnerHTML:{__html:"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}),(0,r.jsx)("h1",{className:"next-error-h1",style:n.styles.h1,children:t}),(0,r.jsx)("div",{style:n.styles.desc,children:(0,r.jsx)("h2",{style:n.styles.h2,children:l})})]})})]})}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[492],{24585:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"styles",{enumerable:!0,get:function(){return l}});let l={error:{fontFamily:'system-ui,"Segoe UI",Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji"',height:"100vh",textAlign:"center",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},desc:{display:"inline-block"},h1:{display:"inline-block",margin:"0 20px 0 0",padding:"0 23px 0 0",fontSize:24,fontWeight:500,verticalAlign:"top",lineHeight:"49px"},h2:{fontSize:14,fontWeight:400,lineHeight:"49px",margin:0}};("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},31037:(e,t,l)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/_not-found/page",function(){return l(79520)}])},38886:(e,t,l)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"HTTPAccessErrorFallback",{enumerable:!0,get:function(){return o}});let r=l(95155),n=l(24585);function o(e){let{status:t,message:l}=e;return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("title",{children:t+": "+l}),(0,r.jsx)("div",{style:n.styles.error,children:(0,r.jsxs)("div",{children:[(0,r.jsx)("style",{dangerouslySetInnerHTML:{__html:"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}),(0,r.jsx)("h1",{className:"next-error-h1",style:n.styles.h1,children:t}),(0,r.jsx)("div",{style:n.styles.desc,children:(0,r.jsx)("h2",{style:n.styles.h2,children:l})})]})})]})}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},79520:(e,t,l)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return o}});let r=l(95155),n=l(38886),o=function(){return(0,r.jsx)("html",{children:(0,r.jsx)("body",{children:(0,r.jsx)(n.HTTPAccessErrorFallback,{status:404,message:"This page could not be found."})})})};("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)}},e=>{e.O(0,[441,255,358],()=>e(e.s=31037)),_N_E=e.O()}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[745],{11796:(e,s,a)=>{"use strict";a.d(s,{AnalyticsCharts:()=>p});var t=a(95155),i=a(26991),r=a(73850),n=a(68425),o=a(47734),l=a(73697),c=a(23508),d=a(77568),x=a(98128),m=a(16533),h=a(78765),f=a(12235),y=a(69386),k=a(20467);let j="#00f5ff",u={claude:"#00f5ff",codex:"#00ffab",unknown:"#6E7681"};function p(e){let{daily:s,providers:a,models:p,label:b="last 30 days"}=e,v=s.map(e=>({...e,label:e.day.slice(5)}));return(0,t.jsxs)("div",{className:"space-y-7",children:[(0,t.jsxs)("div",{className:"card",children:[(0,t.jsxs)("div",{className:"card-header",children:["Activity Over Time — ",b]}),(0,t.jsx)("div",{className:"p-4 h-72",children:(0,t.jsx)(i.u,{width:"100%",height:"100%",children:(0,t.jsxs)(r.Q,{data:v,margin:{top:8,right:12,bottom:0,left:-8},children:[(0,t.jsx)("defs",{children:(0,t.jsxs)("linearGradient",{id:"tokens",x1:"0",y1:"0",x2:"0",y2:"1",children:[(0,t.jsx)("stop",{offset:"0%",stopColor:j,stopOpacity:.3}),(0,t.jsx)("stop",{offset:"100%",stopColor:j,stopOpacity:0})]})}),(0,t.jsx)(n.d,{stroke:"#262a31",strokeDasharray:"2 4",vertical:!1}),(0,t.jsx)(o.W,{dataKey:"label",tick:{fill:"#849495",fontSize:11,fontFamily:"JetBrains Mono"},axisLine:{stroke:"#262a31"},tickLine:!1}),(0,t.jsx)(l.h,{tick:{fill:"#849495",fontSize:11,fontFamily:"JetBrains Mono"},axisLine:!1,tickLine:!1,tickFormatter:e=>(0,k.yj)(e)}),(0,t.jsx)(c.m,{cursor:{stroke:"#00f5ff",strokeOpacity:.3},contentStyle:{background:"#181c22",border:"1px solid #00f5ff",borderRadius:6,fontSize:12,color:"#dfe2eb"},formatter:e=>(0,k.yj)(e),labelFormatter:e=>"Day ".concat(e)}),(0,t.jsx)(d.G,{type:"monotone",dataKey:"tokens",stroke:j,strokeWidth:2,fill:"url(#tokens)"})]})})})]}),(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,t.jsxs)("div",{className:"card",children:[(0,t.jsx)("div",{className:"card-header",children:"Sessions Per Day"}),(0,t.jsx)("div",{className:"p-4 h-60",children:(0,t.jsx)(i.u,{width:"100%",height:"100%",children:(0,t.jsxs)(x.E,{data:v,margin:{top:8,right:8,bottom:0,left:-8},children:[(0,t.jsx)(n.d,{stroke:"#262a31",strokeDasharray:"2 4",vertical:!1}),(0,t.jsx)(o.W,{dataKey:"label",tick:{fill:"#849495",fontSize:10,fontFamily:"JetBrains Mono"},axisLine:{stroke:"#262a31"},tickLine:!1}),(0,t.jsx)(l.h,{tick:{fill:"#849495",fontSize:11,fontFamily:"JetBrains Mono"},axisLine:!1,tickLine:!1,allowDecimals:!1}),(0,t.jsx)(c.m,{contentStyle:{background:"#181c22",border:"1px solid #00ffab",borderRadius:6,fontSize:12,color:"#dfe2eb"}}),(0,t.jsx)(m.y,{dataKey:"sessions",fill:"#00ffab",radius:[2,2,0,0]})]})})})]}),(0,t.jsxs)("div",{className:"card",children:[(0,t.jsx)("div",{className:"card-header",children:"Provider Breakdown"}),(0,t.jsxs)("div",{className:"p-4 h-60 flex items-center gap-4",children:[(0,t.jsx)(i.u,{width:"50%",height:"100%",children:(0,t.jsxs)(h.r,{children:[(0,t.jsx)(f.F,{data:a,dataKey:"tokens",nameKey:"provider",innerRadius:45,outerRadius:75,stroke:"#10141a",strokeWidth:2,children:a.map(e=>(0,t.jsx)(y.f,{fill:u[e.provider]||"#6E7681"},e.provider))}),(0,t.jsx)(c.m,{contentStyle:{background:"#181c22",border:"1px solid #00f5ff",borderRadius:6,fontSize:12},formatter:e=>(0,k.yj)(e)})]})}),(0,t.jsx)("div",{className:"flex-1 space-y-2",children:a.map(e=>(0,t.jsxs)("div",{className:"flex items-center gap-2 text-body-sm",children:[(0,t.jsx)("div",{className:"w-2.5 h-2.5 rounded-sm",style:{background:u[e.provider]||"#6E7681"}}),(0,t.jsx)("span",{className:"text-ink-dim capitalize flex-1",children:e.provider}),(0,t.jsx)("span",{className:"font-mono tabular text-ink",children:(0,k.yj)(e.tokens)})]},e.provider))})]})]})]}),(0,t.jsxs)("div",{className:"card",children:[(0,t.jsx)("div",{className:"card-header",children:"Model Breakdown"}),(0,t.jsx)("div",{className:"p-4 space-y-2",children:p.map(e=>{let s=Math.max(...p.map(e=>e.tokens),1),a=e.tokens/s*100;return(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"flex justify-between text-body-sm mb-1",children:[(0,t.jsx)("span",{className:"font-mono text-code-md text-ink truncate pr-2",children:e.model}),(0,t.jsxs)("span",{className:"font-mono tabular text-ink-mute",children:[(0,k.yj)(e.tokens)," \xb7 ",(0,k.F0)(e.cost)]})]}),(0,t.jsx)("div",{className:"h-1.5 bg-surface-2 rounded-full overflow-hidden",children:(0,t.jsx)("div",{className:"h-full bg-primary",style:{width:"".concat(a,"%")}})})]},e.model)})})]})]})}},20467:(e,s,a)=>{"use strict";function t(e){return e>=1e6?"".concat((e/1e6).toFixed(1),"M"):e>=1e3?"".concat((e/1e3).toFixed(1),"k"):e.toString()}function i(e){return e>=1e3?"$".concat(e.toFixed(0)):"$".concat(e.toFixed(2))}function r(e){let s=Math.floor(e/1e3);if(s<60)return"".concat(s,"s");let a=Math.floor(s/60);if(a<60)return"".concat(a,"m");let t=Math.floor(a/60);return"".concat(t,"h ").concat(a%60,"m")}a.d(s,{F0:()=>i,c5:()=>r,yj:()=>t})},
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[745],{11796:(e,s,a)=>{"use strict";a.d(s,{AnalyticsCharts:()=>p});var t=a(95155),i=a(26991),r=a(73850),n=a(68425),o=a(47734),l=a(73697),c=a(23508),d=a(77568),x=a(98128),m=a(16533),h=a(78765),f=a(12235),y=a(69386),k=a(20467);let j="#00f5ff",u={claude:"#00f5ff",codex:"#00ffab",unknown:"#6E7681"};function p(e){let{daily:s,providers:a,models:p,label:b="last 30 days"}=e,v=s.map(e=>({...e,label:e.day.slice(5)}));return(0,t.jsxs)("div",{className:"space-y-7",children:[(0,t.jsxs)("div",{className:"card",children:[(0,t.jsxs)("div",{className:"card-header",children:["Activity Over Time — ",b]}),(0,t.jsx)("div",{className:"p-4 h-72",children:(0,t.jsx)(i.u,{width:"100%",height:"100%",children:(0,t.jsxs)(r.Q,{data:v,margin:{top:8,right:12,bottom:0,left:-8},children:[(0,t.jsx)("defs",{children:(0,t.jsxs)("linearGradient",{id:"tokens",x1:"0",y1:"0",x2:"0",y2:"1",children:[(0,t.jsx)("stop",{offset:"0%",stopColor:j,stopOpacity:.3}),(0,t.jsx)("stop",{offset:"100%",stopColor:j,stopOpacity:0})]})}),(0,t.jsx)(n.d,{stroke:"#262a31",strokeDasharray:"2 4",vertical:!1}),(0,t.jsx)(o.W,{dataKey:"label",tick:{fill:"#849495",fontSize:11,fontFamily:"JetBrains Mono"},axisLine:{stroke:"#262a31"},tickLine:!1}),(0,t.jsx)(l.h,{tick:{fill:"#849495",fontSize:11,fontFamily:"JetBrains Mono"},axisLine:!1,tickLine:!1,tickFormatter:e=>(0,k.yj)(e)}),(0,t.jsx)(c.m,{cursor:{stroke:"#00f5ff",strokeOpacity:.3},contentStyle:{background:"#181c22",border:"1px solid #00f5ff",borderRadius:6,fontSize:12,color:"#dfe2eb"},formatter:e=>(0,k.yj)(e),labelFormatter:e=>"Day ".concat(e)}),(0,t.jsx)(d.G,{type:"monotone",dataKey:"tokens",stroke:j,strokeWidth:2,fill:"url(#tokens)"})]})})})]}),(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,t.jsxs)("div",{className:"card",children:[(0,t.jsx)("div",{className:"card-header",children:"Sessions Per Day"}),(0,t.jsx)("div",{className:"p-4 h-60",children:(0,t.jsx)(i.u,{width:"100%",height:"100%",children:(0,t.jsxs)(x.E,{data:v,margin:{top:8,right:8,bottom:0,left:-8},children:[(0,t.jsx)(n.d,{stroke:"#262a31",strokeDasharray:"2 4",vertical:!1}),(0,t.jsx)(o.W,{dataKey:"label",tick:{fill:"#849495",fontSize:10,fontFamily:"JetBrains Mono"},axisLine:{stroke:"#262a31"},tickLine:!1}),(0,t.jsx)(l.h,{tick:{fill:"#849495",fontSize:11,fontFamily:"JetBrains Mono"},axisLine:!1,tickLine:!1,allowDecimals:!1}),(0,t.jsx)(c.m,{contentStyle:{background:"#181c22",border:"1px solid #00ffab",borderRadius:6,fontSize:12,color:"#dfe2eb"}}),(0,t.jsx)(m.y,{dataKey:"sessions",fill:"#00ffab",radius:[2,2,0,0]})]})})})]}),(0,t.jsxs)("div",{className:"card",children:[(0,t.jsx)("div",{className:"card-header",children:"Provider Breakdown"}),(0,t.jsxs)("div",{className:"p-4 h-60 flex items-center gap-4",children:[(0,t.jsx)(i.u,{width:"50%",height:"100%",children:(0,t.jsxs)(h.r,{children:[(0,t.jsx)(f.F,{data:a,dataKey:"tokens",nameKey:"provider",innerRadius:45,outerRadius:75,stroke:"#10141a",strokeWidth:2,children:a.map(e=>(0,t.jsx)(y.f,{fill:u[e.provider]||"#6E7681"},e.provider))}),(0,t.jsx)(c.m,{contentStyle:{background:"#181c22",border:"1px solid #00f5ff",borderRadius:6,fontSize:12},formatter:e=>(0,k.yj)(e)})]})}),(0,t.jsx)("div",{className:"flex-1 space-y-2",children:a.map(e=>(0,t.jsxs)("div",{className:"flex items-center gap-2 text-body-sm",children:[(0,t.jsx)("div",{className:"w-2.5 h-2.5 rounded-sm",style:{background:u[e.provider]||"#6E7681"}}),(0,t.jsx)("span",{className:"text-ink-dim capitalize flex-1",children:e.provider}),(0,t.jsx)("span",{className:"font-mono tabular text-ink",children:(0,k.yj)(e.tokens)})]},e.provider))})]})]})]}),(0,t.jsxs)("div",{className:"card",children:[(0,t.jsx)("div",{className:"card-header",children:"Model Breakdown"}),(0,t.jsx)("div",{className:"p-4 space-y-2",children:p.map(e=>{let s=Math.max(...p.map(e=>e.tokens),1),a=e.tokens/s*100;return(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"flex justify-between text-body-sm mb-1",children:[(0,t.jsx)("span",{className:"font-mono text-code-md text-ink truncate pr-2",children:e.model}),(0,t.jsxs)("span",{className:"font-mono tabular text-ink-mute",children:[(0,k.yj)(e.tokens)," \xb7 ",(0,k.F0)(e.cost)]})]}),(0,t.jsx)("div",{className:"h-1.5 bg-surface-2 rounded-full overflow-hidden",children:(0,t.jsx)("div",{className:"h-full bg-primary",style:{width:"".concat(a,"%")}})})]},e.model)})})]})]})}},20467:(e,s,a)=>{"use strict";function t(e){return e>=1e6?"".concat((e/1e6).toFixed(1),"M"):e>=1e3?"".concat((e/1e3).toFixed(1),"k"):e.toString()}function i(e){return e>=1e3?"$".concat(e.toFixed(0)):"$".concat(e.toFixed(2))}function r(e){let s=Math.floor(e/1e3);if(s<60)return"".concat(s,"s");let a=Math.floor(s/60);if(a<60)return"".concat(a,"m");let t=Math.floor(a/60);return"".concat(t,"h ").concat(a%60,"m")}a.d(s,{F0:()=>i,c5:()=>r,yj:()=>t})},28245:(e,s,a)=>{Promise.resolve().then(a.bind(a,11796)),Promise.resolve().then(a.bind(a,95925))},95925:(e,s,a)=>{"use strict";a.d(s,{RangePicker:()=>o});var t=a(95155),i=a(20063),r=a(12115);let n=[{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 o(e){let{current:s}=e,a=(0,i.useRouter)(),o=(0,i.usePathname)(),l=(0,i.useSearchParams)(),[c,d]=(0,r.useTransition)();return(0,t.jsx)("div",{className:"flex items-center gap-0.5 normal-case tracking-normal transition-opacity ".concat(c?"opacity-50":""),children:n.map(e=>(0,t.jsx)("button",{onClick:()=>(e=>{let s=new URLSearchParams(l.toString());"30d"===e?s.delete("range"):s.set("range",e);let t=s.toString();d(()=>{a.push(t?"".concat(o,"?").concat(t):o)})})(e.key),className:"px-2 py-0.5 text-[11px] rounded transition-colors font-mono ".concat(s===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,[997,984,441,255,358],()=>e(e.s=28245)),_N_E=e.O()}]);
|
|
@@ -1 +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:()=>{},
|
|
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:()=>{},17696:(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=17696)),_N_E=e.O()}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[974],{15433:(e,t,r)=>{"use strict";r.d(t,{ClassifyChip:()=>a});var n=r(95155),o=r(12115),s=r(20063),i=r(85722);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})},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.max(0,Math.floor(.1*r.length)-1)],1)>50}(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)}},40250:(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))},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)]})}},85722:(e,t,r)=>{"use strict";r.d(t,{v:()=>o});var n=r(30926);let o=(0,n.createServerReference)("404bcb28ddc5fd7d11963dbddc1e3bb5cd34f55700",n.callServer,void 0,n.findSourceMapURL,"classifyAction")},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=40250)),_N_E=e.O()}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[801],{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"})})}},83990:(e,t,o)=>{Promise.resolve().then(o.t.bind(o,52619,23)),Promise.resolve().then(o.bind(o,17834))}},e=>{e.O(0,[619,441,255,358],()=>e(e.s=83990)),_N_E=e.O()}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[404,893],{23374:(e,s,_)=>{Promise.resolve().then(_.t.bind(_,52619,23))}},e=>{e.O(0,[619,441,255,358],()=>e(e.s=23374)),_N_E=e.O()}]);
|
package/.next/static/chunks/app/sessions/[id]/{page-a887f742425eb49c.js → page-49542233907f7f6b.js}
RENAMED
|
@@ -1 +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)},
|
|
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)},40040:(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,63637)),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"})})}},63637:(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)("408982b0f25ec9efd83542ecf8e59c4d5216a7d2cd",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),[f,b]=(0,i.useTransition)();return(0,r.jsxs)("div",{className:"flex items-center gap-2 relative",children:[(0,r.jsx)("button",{onClick:()=>{x(null),b(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||f,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:f?"… 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=40040)),_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})},24885:(e,t,r)=>{Promise.resolve().then(r.bind(r,38250))},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)})]})}}},e=>{e.O(0,[441,255,358],()=>e(e.s=24885)),_N_E=e.O()}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[662],{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)},48642:(e,s,a)=>{"use strict";a.d(s,{LlmSection:()=>b});var t=a(95155),r=a(12115),n=a(30926);let i=(0,n.createServerReference)("40d025f6325797c124231a3041a7cdb8e31fbbda34",n.callServer,void 0,n.findSourceMapURL,"saveLlmAction"),o=(0,n.createServerReference)("40556a6d15487b2f88e9deb306be92feff8f744ca5",n.callServer,void 0,n.findSourceMapURL,"setAutoClassifyAction"),l=(0,n.createServerReference)("40eafd3ee6454f54ccab40a274aa7dd142f80dd2c4",n.callServer,void 0,n.findSourceMapURL,"clearKeyAction"),c=(0,n.createServerReference)("400132447f4cc6e314911c7e2bdb0e15a790880ed3",n.callServer,void 0,n.findSourceMapURL,"estimateAction");var d=a(85722);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 x=e=>e?e.slice(0,8)+"…"+e.slice(-4):"";function b(e){let{provider:s,anthKey:a,oaiKey:n,classifierModel:m,summarizerModel:b,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:x(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:x(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:b}),(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})]})]})}},66821:(e,s,a)=>{Promise.resolve().then(a.bind(a,48642))},85722:(e,s,a)=>{"use strict";a.d(s,{v:()=>r});var t=a(30926);let r=(0,t.createServerReference)("404bcb28ddc5fd7d11963dbddc1e3bb5cd34f55700",t.callServer,void 0,t.findSourceMapURL,"classifyAction")}},e=>{e.O(0,[441,255,358],()=>e(e.s=66821)),_N_E=e.O()}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[404,893],{23374:(e,s,_)=>{Promise.resolve().then(_.t.bind(_,52619,23))}},e=>{e.O(0,[619,441,255,358],()=>e(e.s=23374)),_N_E=e.O()}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[358],{19393:()=>{},
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[358],{19393:()=>{},71861:(e,s,n)=>{Promise.resolve().then(n.t.bind(n,57150,23)),Promise.resolve().then(n.t.bind(n,81959,23)),Promise.resolve().then(n.t.bind(n,17989,23)),Promise.resolve().then(n.t.bind(n,63886,23)),Promise.resolve().then(n.t.bind(n,9766,23)),Promise.resolve().then(n.t.bind(n,15278,23)),Promise.resolve().then(n.t.bind(n,98924,23)),Promise.resolve().then(n.t.bind(n,24431,23)),Promise.resolve().then(n.bind(n,80622))}},e=>{var s=s=>e(e.s=s);e.O(0,[441,255],()=>(s(1666),s(71861))),_N_E=e.O()}]);
|
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,28 @@ 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.2] — 2026-06-09
|
|
8
|
+
|
|
9
|
+
### Fixed
|
|
10
|
+
- **`npx agentgraphed` failed to start on macOS and Windows.** The CI runner is Linux, so `npm run build` left a Linux x64 `better-sqlite3` binary inside `.next/standalone/node_modules/better-sqlite3/`. On install, npm fetches the correct platform prebuild at the top level, but Node's standalone-bundle require resolution found the Linux binary first and dlopened it — failing with `slice is not valid mach-o file` on Apple Silicon (and the equivalent on Windows). Versions 0.1.0 through 0.3.1 were all affected. The post-build script now prunes `node_modules/better-sqlite3` from the standalone bundle so require falls through to the platform-correct copy installed alongside the package. Reproduced and verified on a clean install.
|
|
11
|
+
|
|
12
|
+
## [0.3.1] — 2026-06-09
|
|
13
|
+
|
|
14
|
+
### Fixed
|
|
15
|
+
- **Multi-day sessions now count tokens on the days they actually happened.** Previously a conversation opened Saturday and still active Tuesday attributed every token to Saturday, so the dashboard showed zero usage for Sunday/Monday/Tuesday even when 95% of the work happened then. The dashboard now sums tokens from per-message timestamps; the messages table gained per-message token + cost columns; the ingester writes them straight from each Claude `message.usage` block. Codex token attribution is best-effort — its log only reports running totals, not per-message — but lands tokens on the right calendar day in practice.
|
|
16
|
+
- **Sessions whose source JSONLs were rotated off disk by Claude Code keep their totals.** Added an idempotent backfill that reconciles message-level totals against the session row's totals on every boot. When messages.SUM lags sessions.row (because the source file is gone, or the migration only saw a subagent fragment), the gap is distributed evenly across the assistant messages we have, anchored on real timestamps. Orphaned sessions with no message rows at all get a synthetic placeholder so they still appear on the dashboard.
|
|
17
|
+
- **`?range=all` was silently rendering the last 30 days.** `rangeDays('all')` used `?? 30` as a missing-key fallback, but `??` doesn't distinguish "no match" from "match with value null" — so the All-time option collapsed to 30. Latent for the lifetime of the range picker; surfaced once historical message data started flowing through the new attribution path.
|
|
18
|
+
- **Claude subagent files no longer wipe their parent transcript's messages.** Claude Code emits one main JSONL plus one per-subagent under `<sessionId>/subagents/*.jsonl`, all sharing the same sessionId. The ingester's DELETE-then-INSERT-by-session meant whichever subagent finished last left only its own messages. Switched to upsert keyed on Claude's stable per-message UUID; subagent files now accumulate alongside the parent.
|
|
19
|
+
- **Codex "resetting" quota label.** OpenAI's per-minute rate-limit window resets continuously; by the time we render, the header has already elapsed. Now shows `<1m` for windows that just rolled.
|
|
20
|
+
- **Auto-log scale heuristic.** Switched the peak-vs-quiet ratio from peak/median (5× on a billion-token spike) to peak/p10 with a 50× threshold so long-tailed multi-month histories actually flip to log instead of squashing flat against the X-axis.
|
|
21
|
+
|
|
22
|
+
### Added
|
|
23
|
+
- **Server-side 5-minute scheduled ingest.** The dashboard's per-render trigger only fires when a tab is open; the scheduler keeps scanning your log directories whether or not anyone's looking. Bootstrapped from the first per-render `triggerBackgroundIngest()` call (globalThis-keyed for idempotency); `unref()`'d so it can't keep the process alive at shutdown. No instrumentation hook needed.
|
|
24
|
+
- **Schema versioning** with on-boot migrations + invalidated `ingest_state` so future ingest semantic changes ship cleanly.
|
|
25
|
+
|
|
26
|
+
### Changed
|
|
27
|
+
- **CI publish uses npm Trusted Publisher OIDC** instead of a long-lived `NPM_TOKEN`. The runner upgrades to `npm@latest` (≥11.5.1 is required for OIDC); `--provenance` still attaches a sigstore attestation tying the package to the workflow run.
|
|
28
|
+
|
|
7
29
|
## [0.3.0] — 2026-06-08
|
|
8
30
|
|
|
9
31
|
### Added
|
package/README.md
CHANGED
|
@@ -2,11 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
# AgentGraphed
|
|
4
4
|
|
|
5
|
-
**
|
|
5
|
+
**Local-first history, search, and analytics for Claude Code and Codex.**
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
Find old sessions, resume unfinished work, search past conversations, and see usage across every AI coding project on your machine.
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
No login. No cloud. Nothing leaves your computer.
|
|
10
|
+
|
|
11
|
+
🌐 **Site:** <https://agentgraphed.com> · 📦 **npm:** <https://www.npmjs.com/package/agentgraphed>
|
|
10
12
|
|
|
11
13
|
[](https://www.npmjs.com/package/agentgraphed)
|
|
12
14
|
[](./LICENSE)
|
|
@@ -14,15 +16,29 @@ See every session, every project, every dollar — across your whole machine. No
|
|
|
14
16
|
|
|
15
17
|
</div>
|
|
16
18
|
|
|
19
|
+

|
|
20
|
+
|
|
17
21
|
---
|
|
18
22
|
|
|
19
|
-
##
|
|
23
|
+
## What it does
|
|
24
|
+
|
|
25
|
+
AgentGraphed automatically indexes every Claude Code and Codex session on your machine. With it you can:
|
|
26
|
+
|
|
27
|
+
- **Find old work** you forgot about — every session, searchable.
|
|
28
|
+
- **Resume abandoned sessions** with one click.
|
|
29
|
+
- **Browse project history** across every git repo you've touched.
|
|
30
|
+
- **Generate context for a new chat** from any past conversation.
|
|
31
|
+
- **Track usage and costs** across providers, models, and projects.
|
|
32
|
+
|
|
33
|
+
Everything stays local. AgentGraphed reads the JSONL logs your CLI tools were already writing (`~/.claude/projects/`, `~/.codex/sessions/`) and turns them into a real dashboard.
|
|
34
|
+
|
|
35
|
+
## Try it
|
|
20
36
|
|
|
21
37
|
```bash
|
|
22
38
|
npx agentgraphed
|
|
23
39
|
```
|
|
24
40
|
|
|
25
|
-
That's the whole install. No clone, no signup, no config file. The dashboard opens at <http://localhost:3737
|
|
41
|
+
That's the whole install. No clone, no signup, no config file. The dashboard opens at <http://localhost:3737>. Re-run any time, or leave it running — it re-scans every 5 minutes.
|
|
26
42
|
|
|
27
43
|
**Prefer a global install?**
|
|
28
44
|
|
|
@@ -31,13 +47,13 @@ npm install -g agentgraphed
|
|
|
31
47
|
agentgraphed
|
|
32
48
|
```
|
|
33
49
|
|
|
34
|
-
**Don't have npx / Node?** Install Node 20+ from <https://nodejs.org> (the LTS version is fine).
|
|
50
|
+
**Don't have npx / Node?** Install Node 20+ from <https://nodejs.org> (the LTS version is fine).
|
|
35
51
|
|
|
36
52
|
### What to expect on first run
|
|
37
53
|
|
|
38
54
|
1. `npx agentgraphed` downloads the package once (~15 MB, takes 30-60s on a typical connection). Subsequent runs start in seconds — npm caches the package.
|
|
39
|
-
2. You'll see one `npm warn exec` line and a couple of `npm warn deprecated` warnings from transitive dependencies.
|
|
40
|
-
3. The dashboard server boots
|
|
55
|
+
2. You'll see one `npm warn exec` line and a couple of `npm warn deprecated` warnings from transitive dependencies. Harmless.
|
|
56
|
+
3. The dashboard server boots:
|
|
41
57
|
```
|
|
42
58
|
› Starting AgentGraphed on http://localhost:3737
|
|
43
59
|
› Scanning local AI coding sessions…
|
|
@@ -45,62 +61,48 @@ agentgraphed
|
|
|
45
61
|
› Ready. Press Ctrl+C to stop.
|
|
46
62
|
```
|
|
47
63
|
4. Your browser opens to the dashboard automatically.
|
|
48
|
-
5. To stop the server, hit `Ctrl+C
|
|
49
|
-
|
|
50
|
-

|
|
51
|
-
|
|
52
|
-
---
|
|
53
|
-
|
|
54
|
-
## What it does
|
|
55
|
-
|
|
56
|
-
AgentGraphed reads your local Claude Code (`~/.claude/projects/`) and Codex CLI (`~/.codex/sessions/`) JSONL logs and turns them into a real dashboard. There's no agent to install on each session, no API key required to get started — it just reads files your CLI tools were already writing.
|
|
57
|
-
|
|
58
|
-
After `npx agentgraphed`, here's how to use it:
|
|
59
|
-
|
|
60
|
-
- **Browse your work** — Timeline groups every session by day. Multi-day sessions show `STARTED · SPANS Nd` / `CONTINUED` / `CLOSED` badges so nothing hides on a single bucket. Click any session to read the full conversation in a chat-bubble view.
|
|
61
|
-
- **Resume a session** — On any session page, click *Resume session* to copy `cd <cwd> && claude --resume <id>` to your clipboard. Paste it in your terminal to pick up where you left off.
|
|
62
|
-
- **Find a specific project** — Projects ranks every git repo you've worked in by activity, tokens, and cost. Click one to see only that repo's sessions.
|
|
63
|
-
- **Refresh after more coding** — Re-run `npx agentgraphed`. It re-scans your CLI logs incrementally; already-ingested sessions are skipped.
|
|
64
|
-
- **Get clean titles and categories** *(optional, BYO key)* — Open *Settings → LLM provider*, paste an Anthropic or OpenAI key, then click *Classify uncategorized*. Past-tense titles like "Fixed Stripe checkout bug" replace the raw first prompt. Cost is typically $0.01-0.03 for a few hundred sessions.
|
|
65
|
-
- **Live quota probe** *(optional, opt-in)* — On the dashboard, click *Probe now* (or toggle *Poll every 60s*) for live 5h & 7d rate-limit utilization read straight from Anthropic. Each probe costs a single token (~$0.00006).
|
|
66
|
-
|
|
67
|
-
## Features
|
|
68
|
-
|
|
69
|
-
- **Dashboard** — 30-day usage chart, KPIs, top projects, work categories at a glance
|
|
70
|
-
- **Timeline** — every session grouped by day, searchable, filterable by project or provider
|
|
71
|
-
- **Projects** — auto-detected from git repo roots; see which projects pull the most AI time
|
|
72
|
-
- **Sessions** — read past conversations in a clean chat-bubble view
|
|
73
|
-
- **Resume** — one click copies `cd <cwd> && claude --resume <id>` to your clipboard
|
|
74
|
-
- **Copy context** *(optional, BYO LLM key)* — generates a primer for a fresh chat
|
|
75
|
-
- **Multi-label classification** *(optional, BYO LLM key)* — auto-categorizes sessions as Feature / Debugging / Planning / Refactor / Styling / DevOps / Data / Payments / Docs / Content
|
|
76
|
-
- **Cost estimates** — uses LiteLLM's auto-updating pricing data (2700+ models covered)
|
|
77
|
-
- **Range picker** — 7d / 30d / 90d / all-time on every chart
|
|
64
|
+
5. To stop the server, hit `Ctrl+C`. Your indexed data stays at `~/.agentgraphed/agentgraphed.sqlite` for next time — even after Claude Code rotates the original log files off disk.
|
|
78
65
|
|
|
79
66
|
## Screenshots
|
|
80
67
|
|
|
81
68
|
<table>
|
|
82
69
|
<tr>
|
|
83
70
|
<td width="50%">
|
|
84
|
-
<a href="./docs/screenshots/timeline.png"><img src="./docs/screenshots/timeline.png" alt="Timeline —
|
|
85
|
-
<p align="center"><sub><b>
|
|
71
|
+
<a href="./docs/screenshots/timeline.png"><img src="./docs/screenshots/timeline.png" alt="Timeline — find old work" /></a>
|
|
72
|
+
<p align="center"><sub><b>Find old work</b> — every session, grouped by day. Search and filter by project, provider, or model.</sub></p>
|
|
86
73
|
</td>
|
|
87
74
|
<td width="50%">
|
|
88
|
-
<a href="./docs/screenshots/session-detail.png"><img src="./docs/screenshots/session-detail.png" alt="Session detail —
|
|
89
|
-
<p align="center"><sub><b>
|
|
75
|
+
<a href="./docs/screenshots/session-detail.png"><img src="./docs/screenshots/session-detail.png" alt="Session detail — resume unfinished sessions" /></a>
|
|
76
|
+
<p align="center"><sub><b>Resume unfinished sessions</b> — read the full conversation, copy a one-line resume command, or generate a primer to paste into a fresh chat.</sub></p>
|
|
90
77
|
</td>
|
|
91
78
|
</tr>
|
|
92
79
|
<tr>
|
|
93
80
|
<td width="50%">
|
|
94
|
-
<a href="./docs/screenshots/projects.png"><img src="./docs/screenshots/projects.png" alt="Projects —
|
|
95
|
-
<p align="center"><sub><b>
|
|
81
|
+
<a href="./docs/screenshots/projects.png"><img src="./docs/screenshots/projects.png" alt="Projects — browse project history" /></a>
|
|
82
|
+
<p align="center"><sub><b>Browse project history</b> — every git repo you've worked in, ranked by activity. Click any project to see only its sessions.</sub></p>
|
|
96
83
|
</td>
|
|
97
84
|
<td width="50%">
|
|
98
|
-
<a href="./docs/screenshots/analytics.png"><img src="./docs/screenshots/analytics.png" alt="Analytics —
|
|
99
|
-
<p align="center"><sub><b>
|
|
85
|
+
<a href="./docs/screenshots/analytics.png"><img src="./docs/screenshots/analytics.png" alt="Analytics — see where your AI time and money go" /></a>
|
|
86
|
+
<p align="center"><sub><b>See where your AI time goes</b> — usage by day, model, project, and category, with retail-priced cost estimates from LiteLLM's 2700+ model catalog.</sub></p>
|
|
100
87
|
</td>
|
|
101
88
|
</tr>
|
|
102
89
|
</table>
|
|
103
90
|
|
|
91
|
+
## Features
|
|
92
|
+
|
|
93
|
+
- **Timeline** — every session grouped by day, with `STARTED · SPANS Nd` / `CONTINUED` / `CLOSED` badges so multi-day work doesn't hide on a single bucket.
|
|
94
|
+
- **Sessions** — read past conversations in a chat-bubble view; search by content, project, provider, or model.
|
|
95
|
+
- **Resume** — one click copies `cd <cwd> && claude --resume <id>` to your clipboard.
|
|
96
|
+
- **Generate context** *(optional, BYO LLM key)* — produces a primer to paste into a fresh chat so you don't lose context when resuming.
|
|
97
|
+
- **Projects** — auto-detected from git repo roots; per-project usage, model spend, and session history.
|
|
98
|
+
- **Dashboard** — usage chart, KPIs, top projects, work-type breakdown, per-model cost. Filter the whole dashboard by project or model family.
|
|
99
|
+
- **Auto-classification** *(optional, BYO LLM key, on by default)* — categorizes sessions as Feature / Debugging / Planning / Refactor / Styling / DevOps / Data / Payments / Docs / Content and writes a clean past-tense title for each. Typically a few cents for hundreds of sessions.
|
|
100
|
+
- **Live quota probe** *(optional)* — hover the sidebar widget to read your live Anthropic 5h/7d and OpenAI per-minute rate-limit utilization. Single-token probes (~$0.00006 each).
|
|
101
|
+
- **Share** — generate a stat-card PNG of your dashboard, project, or session view and copy it straight to your clipboard.
|
|
102
|
+
- **Background ingest** — re-scans local logs every 5 minutes; new sessions appear without you doing anything.
|
|
103
|
+
- **Cost estimates** — LiteLLM's auto-updating retail pricing for 2700+ models. Treat as directional.
|
|
104
|
+
- **Range picker** — 7d / 30d / 90d / all-time on every chart, with auto-suggested log scale when the data is long-tailed.
|
|
105
|
+
|
|
104
106
|
## Privacy
|
|
105
107
|
|
|
106
108
|
- Everything lives in `~/.agentgraphed/agentgraphed.sqlite` on your machine.
|
|
@@ -157,3 +159,7 @@ npm pack # creates agentgraphed-X.Y.Z.tgz
|
|
|
157
159
|
## License
|
|
158
160
|
|
|
159
161
|
MIT © [Michael Patrick](https://github.com/sudomichael)
|
|
162
|
+
|
|
163
|
+
---
|
|
164
|
+
|
|
165
|
+
Built and maintained by [@ushercakes](https://x.com/ushercakes).
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "agentgraphed",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.2",
|
|
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": [
|