@hirra/vibemeter 0.1.1 → 0.1.3
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/BUILD_ID +1 -1
- package/.next/build-manifest.json +3 -3
- package/.next/fallback-build-manifest.json +3 -3
- package/.next/prerender-manifest.json +3 -3
- package/.next/server/app/_global-error.html +1 -1
- package/.next/server/app/_global-error.rsc +1 -1
- package/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/_not-found.html +1 -1
- package/.next/server/app/_not-found.rsc +1 -1
- package/.next/server/app/_not-found.segments/_full.segment.rsc +1 -1
- package/.next/server/app/_not-found.segments/_head.segment.rsc +1 -1
- package/.next/server/app/_not-found.segments/_index.segment.rsc +1 -1
- package/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
- package/.next/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
- package/.next/server/app/_not-found.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/admin/page.js.nft.json +1 -1
- package/.next/server/app/api/codex-accounts/route.js.nft.json +1 -1
- package/.next/server/app/api/import-sessions/route.js.nft.json +1 -1
- package/.next/server/app/page.js.nft.json +1 -1
- package/.next/server/app/page_client-reference-manifest.js +1 -1
- package/.next/server/chunks/ssr/_0ye~8el._.js +1 -1
- package/.next/server/chunks/ssr/_0ye~8el._.js.map +1 -1
- package/.next/server/middleware-build-manifest.js +3 -3
- package/.next/server/pages/404.html +1 -1
- package/.next/server/pages/500.html +1 -1
- package/.next/server/server-reference-manifest.js +1 -1
- package/.next/server/server-reference-manifest.json +1 -1
- package/.next/static/chunks/{0erq0bmub6w_z.js → 0yz9oprcns4nm.js} +2 -2
- package/bin/require-hook.cjs +11 -0
- package/bin/vibemeter.mjs +9 -1
- package/package.json +1 -1
- /package/.next/static/{pbaZ4xRfoDHL1KG3S0xG- → DcqlVrgh4gM8jlqrnOCpT}/_buildManifest.js +0 -0
- /package/.next/static/{pbaZ4xRfoDHL1KG3S0xG- → DcqlVrgh4gM8jlqrnOCpT}/_clientMiddlewareManifest.js +0 -0
- /package/.next/static/{pbaZ4xRfoDHL1KG3S0xG- → DcqlVrgh4gM8jlqrnOCpT}/_ssgManifest.js +0 -0
|
@@ -7,9 +7,9 @@ globalThis.__BUILD_MANIFEST = {
|
|
|
7
7
|
"static/chunks/03~yq9q893hmn.js"
|
|
8
8
|
],
|
|
9
9
|
"lowPriorityFiles": [
|
|
10
|
-
"static/
|
|
11
|
-
"static/
|
|
12
|
-
"static/
|
|
10
|
+
"static/DcqlVrgh4gM8jlqrnOCpT/_buildManifest.js",
|
|
11
|
+
"static/DcqlVrgh4gM8jlqrnOCpT/_ssgManifest.js",
|
|
12
|
+
"static/DcqlVrgh4gM8jlqrnOCpT/_clientMiddlewareManifest.js"
|
|
13
13
|
],
|
|
14
14
|
"rootMainFiles": [
|
|
15
15
|
"static/chunks/00gq-v0e07i1q.js",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
<!DOCTYPE html><html lang="en" class="geist_a71539c9-module__T19VSG__variable geist_mono_8d43a2aa-module__8Li5zG__variable h-full antialiased"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="/_next/static/chunks/002~6040mndie.css" data-precedence="next"/><link rel="preload" as="script" fetchPriority="low" href="/_next/static/chunks/00gq-v0e07i1q.js"/><script src="/_next/static/chunks/0pqt~8bl3ukh4.js" async=""></script><script src="/_next/static/chunks/02g3221oh~3le.js" async=""></script><script src="/_next/static/chunks/07lhk_q6pmm3r.js" async=""></script><script src="/_next/static/chunks/turbopack-14vio.b1b9i4l.js" async=""></script><script src="/_next/static/chunks/01xlw8hd842-c.js" async=""></script><script src="/_next/static/chunks/0d3shmwh5_nmn.js" async=""></script><meta name="robots" content="noindex"/><meta name="next-size-adjust" content=""/><title>404: This page could not be found.</title><title>Vibemeter</title><meta name="description" content="Measure your AI coding vibe — local-first dashboard for Claude Code, Codex, and Cursor"/><link rel="icon" href="/favicon.ico?favicon.0x3dzn~oxb6tn.ico" sizes="256x256" type="image/x-icon"/><script src="/_next/static/chunks/03~yq9q893hmn.js" noModule=""></script></head><body class="min-h-full flex flex-col"><div hidden=""><!--$--><!--/$--></div><div style="font-family:system-ui,"Segoe UI",Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji";height:100vh;text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center"><div><style>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)}}</style><h1 class="next-error-h1" style="display:inline-block;margin:0 20px 0 0;padding:0 23px 0 0;font-size:24px;font-weight:500;vertical-align:top;line-height:49px">404</h1><div style="display:inline-block"><h2 style="font-size:14px;font-weight:400;line-height:49px;margin:0">This page could not be found.</h2></div></div></div><!--$--><!--/$--><script src="/_next/static/chunks/00gq-v0e07i1q.js" id="_R_" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0])</script><script>self.__next_f.push([1,"1:\"$Sreact.fragment\"\n2:I[39756,[\"/_next/static/chunks/01xlw8hd842-c.js\",\"/_next/static/chunks/0d3shmwh5_nmn.js\"],\"default\"]\n3:I[37457,[\"/_next/static/chunks/01xlw8hd842-c.js\",\"/_next/static/chunks/0d3shmwh5_nmn.js\"],\"default\"]\n4:I[97367,[\"/_next/static/chunks/01xlw8hd842-c.js\",\"/_next/static/chunks/0d3shmwh5_nmn.js\"],\"OutletBoundary\"]\n5:\"$Sreact.suspense\"\n8:I[97367,[\"/_next/static/chunks/01xlw8hd842-c.js\",\"/_next/static/chunks/0d3shmwh5_nmn.js\"],\"ViewportBoundary\"]\na:I[97367,[\"/_next/static/chunks/01xlw8hd842-c.js\",\"/_next/static/chunks/0d3shmwh5_nmn.js\"],\"MetadataBoundary\"]\nc:I[68027,[\"/_next/static/chunks/01xlw8hd842-c.js\",\"/_next/static/chunks/0d3shmwh5_nmn.js\"],\"default\",1]\n:HL[\"/_next/static/chunks/002~6040mndie.css\",\"style\"]\n"])</script><script>self.__next_f.push([1,"0:{\"P\":null,\"c\":[\"\",\"_not-found\"],\"q\":\"\",\"i\":false,\"f\":[[[\"\",{\"children\":[\"/_not-found\",{\"children\":[\"__PAGE__\",{}]}]},\"$undefined\",\"$undefined\",16],[[\"$\",\"$1\",\"c\",{\"children\":[[[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/chunks/002~6040mndie.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\",\"nonce\":\"$undefined\"}],[\"$\",\"script\",\"script-0\",{\"src\":\"/_next/static/chunks/01xlw8hd842-c.js\",\"async\":true,\"nonce\":\"$undefined\"}],[\"$\",\"script\",\"script-1\",{\"src\":\"/_next/static/chunks/0d3shmwh5_nmn.js\",\"async\":true,\"nonce\":\"$undefined\"}]],[\"$\",\"html\",null,{\"lang\":\"en\",\"className\":\"geist_a71539c9-module__T19VSG__variable geist_mono_8d43a2aa-module__8Li5zG__variable h-full antialiased\",\"children\":[\"$\",\"body\",null,{\"className\":\"min-h-full flex flex-col\",\"children\":[\"$\",\"$L2\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L3\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":[[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":{\"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\"},\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"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)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":{\"display\":\"inline-block\",\"margin\":\"0 20px 0 0\",\"padding\":\"0 23px 0 0\",\"fontSize\":24,\"fontWeight\":500,\"verticalAlign\":\"top\",\"lineHeight\":\"49px\"},\"children\":404}],[\"$\",\"div\",null,{\"style\":{\"display\":\"inline-block\"},\"children\":[\"$\",\"h2\",null,{\"style\":{\"fontSize\":14,\"fontWeight\":400,\"lineHeight\":\"49px\",\"margin\":0},\"children\":\"This page could not be found.\"}]}]]}]}]],[]],\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]}]}]]}],{\"children\":[[\"$\",\"$1\",\"c\",{\"children\":[null,[\"$\",\"$L2\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L3\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]]}],{\"children\":[[\"$\",\"$1\",\"c\",{\"children\":[[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":\"$0:f:0:1:0:props:children:1:props:children:props:children:props:notFound:0:1:props:style\",\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"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)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":\"$0:f:0:1:0:props:children:1:props:children:props:children:props:notFound:0:1:props:children:props:children:1:props:style\",\"children\":404}],[\"$\",\"div\",null,{\"style\":\"$0:f:0:1:0:props:children:1:props:children:props:children:props:notFound:0:1:props:children:props:children:2:props:style\",\"children\":[\"$\",\"h2\",null,{\"style\":\"$0:f:0:1:0:props:children:1:props:children:props:children:props:notFound:0:1:props:children:props:children:2:props:children:props:style\",\"children\":\"This page could not be found.\"}]}]]}]}]],null,[\"$\",\"$L4\",null,{\"children\":[\"$\",\"$5\",null,{\"name\":\"Next.MetadataOutlet\",\"children\":\"$@6\"}]}]]}],{},null,false,null]},null,false,\"$@7\"]},null,false,null],[\"$\",\"$1\",\"h\",{\"children\":[[\"$\",\"meta\",null,{\"name\":\"robots\",\"content\":\"noindex\"}],[\"$\",\"$L8\",null,{\"children\":\"$L9\"}],[\"$\",\"div\",null,{\"hidden\":true,\"children\":[\"$\",\"$La\",null,{\"children\":[\"$\",\"$5\",null,{\"name\":\"Next.Metadata\",\"children\":\"$Lb\"}]}]}],[\"$\",\"meta\",null,{\"name\":\"next-size-adjust\",\"content\":\"\"}]]}],false]],\"m\":\"$undefined\",\"G\":[\"$c\",[[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/chunks/002~6040mndie.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\",\"nonce\":\"$undefined\"}]]],\"S\":true,\"h\":null,\"s\":\"$undefined\",\"l\":\"$undefined\",\"p\":\"$undefined\",\"d\":\"$undefined\",\"b\":\"
|
|
1
|
+
<!DOCTYPE html><html lang="en" class="geist_a71539c9-module__T19VSG__variable geist_mono_8d43a2aa-module__8Li5zG__variable h-full antialiased"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="/_next/static/chunks/002~6040mndie.css" data-precedence="next"/><link rel="preload" as="script" fetchPriority="low" href="/_next/static/chunks/00gq-v0e07i1q.js"/><script src="/_next/static/chunks/0pqt~8bl3ukh4.js" async=""></script><script src="/_next/static/chunks/02g3221oh~3le.js" async=""></script><script src="/_next/static/chunks/07lhk_q6pmm3r.js" async=""></script><script src="/_next/static/chunks/turbopack-14vio.b1b9i4l.js" async=""></script><script src="/_next/static/chunks/01xlw8hd842-c.js" async=""></script><script src="/_next/static/chunks/0d3shmwh5_nmn.js" async=""></script><meta name="robots" content="noindex"/><meta name="next-size-adjust" content=""/><title>404: This page could not be found.</title><title>Vibemeter</title><meta name="description" content="Measure your AI coding vibe — local-first dashboard for Claude Code, Codex, and Cursor"/><link rel="icon" href="/favicon.ico?favicon.0x3dzn~oxb6tn.ico" sizes="256x256" type="image/x-icon"/><script src="/_next/static/chunks/03~yq9q893hmn.js" noModule=""></script></head><body class="min-h-full flex flex-col"><div hidden=""><!--$--><!--/$--></div><div style="font-family:system-ui,"Segoe UI",Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji";height:100vh;text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center"><div><style>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)}}</style><h1 class="next-error-h1" style="display:inline-block;margin:0 20px 0 0;padding:0 23px 0 0;font-size:24px;font-weight:500;vertical-align:top;line-height:49px">404</h1><div style="display:inline-block"><h2 style="font-size:14px;font-weight:400;line-height:49px;margin:0">This page could not be found.</h2></div></div></div><!--$--><!--/$--><script src="/_next/static/chunks/00gq-v0e07i1q.js" id="_R_" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0])</script><script>self.__next_f.push([1,"1:\"$Sreact.fragment\"\n2:I[39756,[\"/_next/static/chunks/01xlw8hd842-c.js\",\"/_next/static/chunks/0d3shmwh5_nmn.js\"],\"default\"]\n3:I[37457,[\"/_next/static/chunks/01xlw8hd842-c.js\",\"/_next/static/chunks/0d3shmwh5_nmn.js\"],\"default\"]\n4:I[97367,[\"/_next/static/chunks/01xlw8hd842-c.js\",\"/_next/static/chunks/0d3shmwh5_nmn.js\"],\"OutletBoundary\"]\n5:\"$Sreact.suspense\"\n8:I[97367,[\"/_next/static/chunks/01xlw8hd842-c.js\",\"/_next/static/chunks/0d3shmwh5_nmn.js\"],\"ViewportBoundary\"]\na:I[97367,[\"/_next/static/chunks/01xlw8hd842-c.js\",\"/_next/static/chunks/0d3shmwh5_nmn.js\"],\"MetadataBoundary\"]\nc:I[68027,[\"/_next/static/chunks/01xlw8hd842-c.js\",\"/_next/static/chunks/0d3shmwh5_nmn.js\"],\"default\",1]\n:HL[\"/_next/static/chunks/002~6040mndie.css\",\"style\"]\n"])</script><script>self.__next_f.push([1,"0:{\"P\":null,\"c\":[\"\",\"_not-found\"],\"q\":\"\",\"i\":false,\"f\":[[[\"\",{\"children\":[\"/_not-found\",{\"children\":[\"__PAGE__\",{}]}]},\"$undefined\",\"$undefined\",16],[[\"$\",\"$1\",\"c\",{\"children\":[[[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/chunks/002~6040mndie.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\",\"nonce\":\"$undefined\"}],[\"$\",\"script\",\"script-0\",{\"src\":\"/_next/static/chunks/01xlw8hd842-c.js\",\"async\":true,\"nonce\":\"$undefined\"}],[\"$\",\"script\",\"script-1\",{\"src\":\"/_next/static/chunks/0d3shmwh5_nmn.js\",\"async\":true,\"nonce\":\"$undefined\"}]],[\"$\",\"html\",null,{\"lang\":\"en\",\"className\":\"geist_a71539c9-module__T19VSG__variable geist_mono_8d43a2aa-module__8Li5zG__variable h-full antialiased\",\"children\":[\"$\",\"body\",null,{\"className\":\"min-h-full flex flex-col\",\"children\":[\"$\",\"$L2\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L3\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":[[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":{\"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\"},\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"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)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":{\"display\":\"inline-block\",\"margin\":\"0 20px 0 0\",\"padding\":\"0 23px 0 0\",\"fontSize\":24,\"fontWeight\":500,\"verticalAlign\":\"top\",\"lineHeight\":\"49px\"},\"children\":404}],[\"$\",\"div\",null,{\"style\":{\"display\":\"inline-block\"},\"children\":[\"$\",\"h2\",null,{\"style\":{\"fontSize\":14,\"fontWeight\":400,\"lineHeight\":\"49px\",\"margin\":0},\"children\":\"This page could not be found.\"}]}]]}]}]],[]],\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]}]}]]}],{\"children\":[[\"$\",\"$1\",\"c\",{\"children\":[null,[\"$\",\"$L2\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L3\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]]}],{\"children\":[[\"$\",\"$1\",\"c\",{\"children\":[[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":\"$0:f:0:1:0:props:children:1:props:children:props:children:props:notFound:0:1:props:style\",\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"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)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":\"$0:f:0:1:0:props:children:1:props:children:props:children:props:notFound:0:1:props:children:props:children:1:props:style\",\"children\":404}],[\"$\",\"div\",null,{\"style\":\"$0:f:0:1:0:props:children:1:props:children:props:children:props:notFound:0:1:props:children:props:children:2:props:style\",\"children\":[\"$\",\"h2\",null,{\"style\":\"$0:f:0:1:0:props:children:1:props:children:props:children:props:notFound:0:1:props:children:props:children:2:props:children:props:style\",\"children\":\"This page could not be found.\"}]}]]}]}]],null,[\"$\",\"$L4\",null,{\"children\":[\"$\",\"$5\",null,{\"name\":\"Next.MetadataOutlet\",\"children\":\"$@6\"}]}]]}],{},null,false,null]},null,false,\"$@7\"]},null,false,null],[\"$\",\"$1\",\"h\",{\"children\":[[\"$\",\"meta\",null,{\"name\":\"robots\",\"content\":\"noindex\"}],[\"$\",\"$L8\",null,{\"children\":\"$L9\"}],[\"$\",\"div\",null,{\"hidden\":true,\"children\":[\"$\",\"$La\",null,{\"children\":[\"$\",\"$5\",null,{\"name\":\"Next.Metadata\",\"children\":\"$Lb\"}]}]}],[\"$\",\"meta\",null,{\"name\":\"next-size-adjust\",\"content\":\"\"}]]}],false]],\"m\":\"$undefined\",\"G\":[\"$c\",[[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/chunks/002~6040mndie.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\",\"nonce\":\"$undefined\"}]]],\"S\":true,\"h\":null,\"s\":\"$undefined\",\"l\":\"$undefined\",\"p\":\"$undefined\",\"d\":\"$undefined\",\"b\":\"DcqlVrgh4gM8jlqrnOCpT\"}\n"])</script><script>self.__next_f.push([1,"d:[]\n7:\"$Wd\"\n"])</script><script>self.__next_f.push([1,"9:[[\"$\",\"meta\",\"0\",{\"charSet\":\"utf-8\"}],[\"$\",\"meta\",\"1\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}]]\n"])</script><script>self.__next_f.push([1,"e:I[27201,[\"/_next/static/chunks/01xlw8hd842-c.js\",\"/_next/static/chunks/0d3shmwh5_nmn.js\"],\"IconMark\"]\n6:null\nb:[[\"$\",\"title\",\"0\",{\"children\":\"Vibemeter\"}],[\"$\",\"meta\",\"1\",{\"name\":\"description\",\"content\":\"Measure your AI coding vibe — local-first dashboard for Claude Code, Codex, and Cursor\"}],[\"$\",\"link\",\"2\",{\"rel\":\"icon\",\"href\":\"/favicon.ico?favicon.0x3dzn~oxb6tn.ico\",\"sizes\":\"256x256\",\"type\":\"image/x-icon\"}],[\"$\",\"$Le\",\"3\",{}]]\n"])</script></body></html>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
<!DOCTYPE html><html id="__next_error__"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="preload" as="script" fetchPriority="low" href="/_next/static/chunks/00gq-v0e07i1q.js"/><script src="/_next/static/chunks/0pqt~8bl3ukh4.js" async=""></script><script src="/_next/static/chunks/02g3221oh~3le.js" async=""></script><script src="/_next/static/chunks/07lhk_q6pmm3r.js" async=""></script><script src="/_next/static/chunks/turbopack-14vio.b1b9i4l.js" async=""></script><script src="/_next/static/chunks/01xlw8hd842-c.js" async=""></script><script src="/_next/static/chunks/0d3shmwh5_nmn.js" async=""></script><meta name="next-size-adjust" content=""/><title>500: This page couldn’t load</title><link rel="icon" href="/favicon.ico?favicon.0x3dzn~oxb6tn.ico" sizes="256x256" type="image/x-icon"/><style>:root {--next-error-bg: #fff;--next-error-text: #171717;--next-error-title: #171717;--next-error-message: #171717;--next-error-digest: #666666;--next-error-btn-text: #fff;--next-error-btn-bg: #171717;--next-error-btn-border: none;--next-error-btn-secondary-text: #171717;--next-error-btn-secondary-bg: transparent;--next-error-btn-secondary-border: 1px solid rgba(0,0,0,0.08);}@media (prefers-color-scheme: dark) {:root {--next-error-bg: #0a0a0a;--next-error-text: #ededed;--next-error-title: #ededed;--next-error-message: #ededed;--next-error-digest: #a0a0a0;--next-error-btn-text: #0a0a0a;--next-error-btn-bg: #ededed;--next-error-btn-border: none;--next-error-btn-secondary-text: #ededed;--next-error-btn-secondary-bg: transparent;--next-error-btn-secondary-border: 1px solid rgba(255,255,255,0.14);}}body { margin: 0; color: var(--next-error-text); background: var(--next-error-bg); }</style><script src="/_next/static/chunks/03~yq9q893hmn.js" noModule=""></script></head><body><div hidden=""><!--$--><!--/$--></div><div style="font-family:system-ui,"Segoe UI",Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji";height:100vh;display:flex;align-items:center;justify-content:center"><div style="margin-top:-32px;max-width:325px;padding:32px 28px;text-align:left"><svg width="32" height="32" viewBox="-0.2 -1.5 32 32" fill="none" style="margin-bottom:24px"><path d="M16.9328 0C18.0839 0.000116771 19.1334 0.658832 19.634 1.69531L31.4299 26.1309C32.0708 27.4588 31.1036 28.9999 29.6291 29H2.00215C0.527541 29 -0.439628 27.4588 0.201371 26.1309L11.9973 1.69531C12.4979 0.658823 13.5474 7.75066e-05 14.6984 0H16.9328ZM3.59493 26H28.0363L16.9328 3H14.6984L3.59493 26ZM15.8156 19C16.9202 19.0001 17.8156 19.8955 17.8156 21C17.8156 22.1045 16.9202 22.9999 15.8156 23C14.7111 23 13.8156 22.1046 13.8156 21C13.8156 19.8954 14.7111 19 15.8156 19ZM17.3156 16.5H14.3156V8.5H17.3156V16.5Z" fill="var(--next-error-title)"></path></svg><h1 style="font-size:24px;font-weight:500;letter-spacing:-0.02em;line-height:32px;margin:0 0 12px 0;color:var(--next-error-title)">This page couldn’t load</h1><p style="font-size:14px;font-weight:400;line-height:21px;margin:0 0 20px 0;color:var(--next-error-message)">A server error occurred. Reload to try again.</p><form style="margin:0"><button type="submit" style="display:inline-flex;align-items:center;justify-content:center;height:32px;padding:0 12px;font-size:14px;font-weight:500;line-height:20px;border-radius:6px;cursor:pointer;color:var(--next-error-btn-text);background:var(--next-error-btn-bg);border:var(--next-error-btn-border)">Reload</button></form></div></div><!--$--><!--/$--><script src="/_next/static/chunks/00gq-v0e07i1q.js" id="_R_" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0])</script><script>self.__next_f.push([1,"1:\"$Sreact.fragment\"\n2:I[39756,[\"/_next/static/chunks/01xlw8hd842-c.js\",\"/_next/static/chunks/0d3shmwh5_nmn.js\"],\"default\"]\n3:I[37457,[\"/_next/static/chunks/01xlw8hd842-c.js\",\"/_next/static/chunks/0d3shmwh5_nmn.js\"],\"default\"]\n4:I[97367,[\"/_next/static/chunks/01xlw8hd842-c.js\",\"/_next/static/chunks/0d3shmwh5_nmn.js\"],\"OutletBoundary\"]\n5:\"$Sreact.suspense\"\n8:I[97367,[\"/_next/static/chunks/01xlw8hd842-c.js\",\"/_next/static/chunks/0d3shmwh5_nmn.js\"],\"ViewportBoundary\"]\na:I[97367,[\"/_next/static/chunks/01xlw8hd842-c.js\",\"/_next/static/chunks/0d3shmwh5_nmn.js\"],\"MetadataBoundary\"]\nc:I[68027,[\"/_next/static/chunks/01xlw8hd842-c.js\",\"/_next/static/chunks/0d3shmwh5_nmn.js\"],\"default\",1]\n"])</script><script>self.__next_f.push([1,"0:{\"P\":null,\"c\":[\"\",\"_global-error\"],\"q\":\"\",\"i\":false,\"f\":[[[\"\",{\"children\":[\"__PAGE__\",{}]}],[[\"$\",\"$1\",\"c\",{\"children\":[null,[\"$\",\"$L2\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L3\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]]}],{\"children\":[[\"$\",\"$1\",\"c\",{\"children\":[[\"$\",\"html\",null,{\"id\":\"__next_error__\",\"children\":[[\"$\",\"head\",null,{\"children\":[[\"$\",\"title\",null,{\"children\":\"500: This page couldn’t load\"}],[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\":root {--next-error-bg: #fff;--next-error-text: #171717;--next-error-title: #171717;--next-error-message: #171717;--next-error-digest: #666666;--next-error-btn-text: #fff;--next-error-btn-bg: #171717;--next-error-btn-border: none;--next-error-btn-secondary-text: #171717;--next-error-btn-secondary-bg: transparent;--next-error-btn-secondary-border: 1px solid rgba(0,0,0,0.08);}@media (prefers-color-scheme: dark) {:root {--next-error-bg: #0a0a0a;--next-error-text: #ededed;--next-error-title: #ededed;--next-error-message: #ededed;--next-error-digest: #a0a0a0;--next-error-btn-text: #0a0a0a;--next-error-btn-bg: #ededed;--next-error-btn-border: none;--next-error-btn-secondary-text: #ededed;--next-error-btn-secondary-bg: transparent;--next-error-btn-secondary-border: 1px solid rgba(255,255,255,0.14);}}body { margin: 0; color: var(--next-error-text); background: var(--next-error-bg); }\"}}]]}],[\"$\",\"body\",null,{\"children\":[\"$\",\"div\",null,{\"style\":{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"display\":\"flex\",\"alignItems\":\"center\",\"justifyContent\":\"center\"},\"children\":[\"$\",\"div\",null,{\"style\":{\"marginTop\":\"-32px\",\"maxWidth\":\"325px\",\"padding\":\"32px 28px\",\"textAlign\":\"left\"},\"children\":[[\"$\",\"svg\",null,{\"width\":\"32\",\"height\":\"32\",\"viewBox\":\"-0.2 -1.5 32 32\",\"fill\":\"none\",\"style\":{\"marginBottom\":\"24px\"},\"children\":[\"$\",\"path\",null,{\"d\":\"M16.9328 0C18.0839 0.000116771 19.1334 0.658832 19.634 1.69531L31.4299 26.1309C32.0708 27.4588 31.1036 28.9999 29.6291 29H2.00215C0.527541 29 -0.439628 27.4588 0.201371 26.1309L11.9973 1.69531C12.4979 0.658823 13.5474 7.75066e-05 14.6984 0H16.9328ZM3.59493 26H28.0363L16.9328 3H14.6984L3.59493 26ZM15.8156 19C16.9202 19.0001 17.8156 19.8955 17.8156 21C17.8156 22.1045 16.9202 22.9999 15.8156 23C14.7111 23 13.8156 22.1046 13.8156 21C13.8156 19.8954 14.7111 19 15.8156 19ZM17.3156 16.5H14.3156V8.5H17.3156V16.5Z\",\"fill\":\"var(--next-error-title)\"}]}],[\"$\",\"h1\",null,{\"style\":{\"fontSize\":\"24px\",\"fontWeight\":500,\"letterSpacing\":\"-0.02em\",\"lineHeight\":\"32px\",\"margin\":\"0 0 12px 0\",\"color\":\"var(--next-error-title)\"},\"children\":\"This page couldn’t load\"}],[\"$\",\"p\",null,{\"style\":{\"fontSize\":\"14px\",\"fontWeight\":400,\"lineHeight\":\"21px\",\"margin\":\"0 0 20px 0\",\"color\":\"var(--next-error-message)\"},\"children\":\"A server error occurred. Reload to try again.\"}],[\"$\",\"form\",null,{\"style\":{\"margin\":0},\"children\":[\"$\",\"button\",null,{\"type\":\"submit\",\"style\":{\"display\":\"inline-flex\",\"alignItems\":\"center\",\"justifyContent\":\"center\",\"height\":\"32px\",\"padding\":\"0 12px\",\"fontSize\":\"14px\",\"fontWeight\":500,\"lineHeight\":\"20px\",\"borderRadius\":\"6px\",\"cursor\":\"pointer\",\"color\":\"var(--next-error-btn-text)\",\"background\":\"var(--next-error-btn-bg)\",\"border\":\"var(--next-error-btn-border)\"},\"children\":\"Reload\"}]}]]}]}]}]]}],null,[\"$\",\"$L4\",null,{\"children\":[\"$\",\"$5\",null,{\"name\":\"Next.MetadataOutlet\",\"children\":\"$@6\"}]}]]}],{},null,false,null]},null,false,\"$@7\"],[\"$\",\"$1\",\"h\",{\"children\":[null,[\"$\",\"$L8\",null,{\"children\":\"$L9\"}],[\"$\",\"div\",null,{\"hidden\":true,\"children\":[\"$\",\"$La\",null,{\"children\":[\"$\",\"$5\",null,{\"name\":\"Next.Metadata\",\"children\":\"$Lb\"}]}]}],[\"$\",\"meta\",null,{\"name\":\"next-size-adjust\",\"content\":\"\"}]]}],false]],\"m\":\"$undefined\",\"G\":[\"$c\",[]],\"S\":true,\"h\":null,\"s\":\"$undefined\",\"l\":\"$undefined\",\"p\":\"$undefined\",\"d\":\"$undefined\",\"b\":\"
|
|
1
|
+
<!DOCTYPE html><html id="__next_error__"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="preload" as="script" fetchPriority="low" href="/_next/static/chunks/00gq-v0e07i1q.js"/><script src="/_next/static/chunks/0pqt~8bl3ukh4.js" async=""></script><script src="/_next/static/chunks/02g3221oh~3le.js" async=""></script><script src="/_next/static/chunks/07lhk_q6pmm3r.js" async=""></script><script src="/_next/static/chunks/turbopack-14vio.b1b9i4l.js" async=""></script><script src="/_next/static/chunks/01xlw8hd842-c.js" async=""></script><script src="/_next/static/chunks/0d3shmwh5_nmn.js" async=""></script><meta name="next-size-adjust" content=""/><title>500: This page couldn’t load</title><link rel="icon" href="/favicon.ico?favicon.0x3dzn~oxb6tn.ico" sizes="256x256" type="image/x-icon"/><style>:root {--next-error-bg: #fff;--next-error-text: #171717;--next-error-title: #171717;--next-error-message: #171717;--next-error-digest: #666666;--next-error-btn-text: #fff;--next-error-btn-bg: #171717;--next-error-btn-border: none;--next-error-btn-secondary-text: #171717;--next-error-btn-secondary-bg: transparent;--next-error-btn-secondary-border: 1px solid rgba(0,0,0,0.08);}@media (prefers-color-scheme: dark) {:root {--next-error-bg: #0a0a0a;--next-error-text: #ededed;--next-error-title: #ededed;--next-error-message: #ededed;--next-error-digest: #a0a0a0;--next-error-btn-text: #0a0a0a;--next-error-btn-bg: #ededed;--next-error-btn-border: none;--next-error-btn-secondary-text: #ededed;--next-error-btn-secondary-bg: transparent;--next-error-btn-secondary-border: 1px solid rgba(255,255,255,0.14);}}body { margin: 0; color: var(--next-error-text); background: var(--next-error-bg); }</style><script src="/_next/static/chunks/03~yq9q893hmn.js" noModule=""></script></head><body><div hidden=""><!--$--><!--/$--></div><div style="font-family:system-ui,"Segoe UI",Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji";height:100vh;display:flex;align-items:center;justify-content:center"><div style="margin-top:-32px;max-width:325px;padding:32px 28px;text-align:left"><svg width="32" height="32" viewBox="-0.2 -1.5 32 32" fill="none" style="margin-bottom:24px"><path d="M16.9328 0C18.0839 0.000116771 19.1334 0.658832 19.634 1.69531L31.4299 26.1309C32.0708 27.4588 31.1036 28.9999 29.6291 29H2.00215C0.527541 29 -0.439628 27.4588 0.201371 26.1309L11.9973 1.69531C12.4979 0.658823 13.5474 7.75066e-05 14.6984 0H16.9328ZM3.59493 26H28.0363L16.9328 3H14.6984L3.59493 26ZM15.8156 19C16.9202 19.0001 17.8156 19.8955 17.8156 21C17.8156 22.1045 16.9202 22.9999 15.8156 23C14.7111 23 13.8156 22.1046 13.8156 21C13.8156 19.8954 14.7111 19 15.8156 19ZM17.3156 16.5H14.3156V8.5H17.3156V16.5Z" fill="var(--next-error-title)"></path></svg><h1 style="font-size:24px;font-weight:500;letter-spacing:-0.02em;line-height:32px;margin:0 0 12px 0;color:var(--next-error-title)">This page couldn’t load</h1><p style="font-size:14px;font-weight:400;line-height:21px;margin:0 0 20px 0;color:var(--next-error-message)">A server error occurred. Reload to try again.</p><form style="margin:0"><button type="submit" style="display:inline-flex;align-items:center;justify-content:center;height:32px;padding:0 12px;font-size:14px;font-weight:500;line-height:20px;border-radius:6px;cursor:pointer;color:var(--next-error-btn-text);background:var(--next-error-btn-bg);border:var(--next-error-btn-border)">Reload</button></form></div></div><!--$--><!--/$--><script src="/_next/static/chunks/00gq-v0e07i1q.js" id="_R_" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0])</script><script>self.__next_f.push([1,"1:\"$Sreact.fragment\"\n2:I[39756,[\"/_next/static/chunks/01xlw8hd842-c.js\",\"/_next/static/chunks/0d3shmwh5_nmn.js\"],\"default\"]\n3:I[37457,[\"/_next/static/chunks/01xlw8hd842-c.js\",\"/_next/static/chunks/0d3shmwh5_nmn.js\"],\"default\"]\n4:I[97367,[\"/_next/static/chunks/01xlw8hd842-c.js\",\"/_next/static/chunks/0d3shmwh5_nmn.js\"],\"OutletBoundary\"]\n5:\"$Sreact.suspense\"\n8:I[97367,[\"/_next/static/chunks/01xlw8hd842-c.js\",\"/_next/static/chunks/0d3shmwh5_nmn.js\"],\"ViewportBoundary\"]\na:I[97367,[\"/_next/static/chunks/01xlw8hd842-c.js\",\"/_next/static/chunks/0d3shmwh5_nmn.js\"],\"MetadataBoundary\"]\nc:I[68027,[\"/_next/static/chunks/01xlw8hd842-c.js\",\"/_next/static/chunks/0d3shmwh5_nmn.js\"],\"default\",1]\n"])</script><script>self.__next_f.push([1,"0:{\"P\":null,\"c\":[\"\",\"_global-error\"],\"q\":\"\",\"i\":false,\"f\":[[[\"\",{\"children\":[\"__PAGE__\",{}]}],[[\"$\",\"$1\",\"c\",{\"children\":[null,[\"$\",\"$L2\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L3\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]]}],{\"children\":[[\"$\",\"$1\",\"c\",{\"children\":[[\"$\",\"html\",null,{\"id\":\"__next_error__\",\"children\":[[\"$\",\"head\",null,{\"children\":[[\"$\",\"title\",null,{\"children\":\"500: This page couldn’t load\"}],[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\":root {--next-error-bg: #fff;--next-error-text: #171717;--next-error-title: #171717;--next-error-message: #171717;--next-error-digest: #666666;--next-error-btn-text: #fff;--next-error-btn-bg: #171717;--next-error-btn-border: none;--next-error-btn-secondary-text: #171717;--next-error-btn-secondary-bg: transparent;--next-error-btn-secondary-border: 1px solid rgba(0,0,0,0.08);}@media (prefers-color-scheme: dark) {:root {--next-error-bg: #0a0a0a;--next-error-text: #ededed;--next-error-title: #ededed;--next-error-message: #ededed;--next-error-digest: #a0a0a0;--next-error-btn-text: #0a0a0a;--next-error-btn-bg: #ededed;--next-error-btn-border: none;--next-error-btn-secondary-text: #ededed;--next-error-btn-secondary-bg: transparent;--next-error-btn-secondary-border: 1px solid rgba(255,255,255,0.14);}}body { margin: 0; color: var(--next-error-text); background: var(--next-error-bg); }\"}}]]}],[\"$\",\"body\",null,{\"children\":[\"$\",\"div\",null,{\"style\":{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"display\":\"flex\",\"alignItems\":\"center\",\"justifyContent\":\"center\"},\"children\":[\"$\",\"div\",null,{\"style\":{\"marginTop\":\"-32px\",\"maxWidth\":\"325px\",\"padding\":\"32px 28px\",\"textAlign\":\"left\"},\"children\":[[\"$\",\"svg\",null,{\"width\":\"32\",\"height\":\"32\",\"viewBox\":\"-0.2 -1.5 32 32\",\"fill\":\"none\",\"style\":{\"marginBottom\":\"24px\"},\"children\":[\"$\",\"path\",null,{\"d\":\"M16.9328 0C18.0839 0.000116771 19.1334 0.658832 19.634 1.69531L31.4299 26.1309C32.0708 27.4588 31.1036 28.9999 29.6291 29H2.00215C0.527541 29 -0.439628 27.4588 0.201371 26.1309L11.9973 1.69531C12.4979 0.658823 13.5474 7.75066e-05 14.6984 0H16.9328ZM3.59493 26H28.0363L16.9328 3H14.6984L3.59493 26ZM15.8156 19C16.9202 19.0001 17.8156 19.8955 17.8156 21C17.8156 22.1045 16.9202 22.9999 15.8156 23C14.7111 23 13.8156 22.1046 13.8156 21C13.8156 19.8954 14.7111 19 15.8156 19ZM17.3156 16.5H14.3156V8.5H17.3156V16.5Z\",\"fill\":\"var(--next-error-title)\"}]}],[\"$\",\"h1\",null,{\"style\":{\"fontSize\":\"24px\",\"fontWeight\":500,\"letterSpacing\":\"-0.02em\",\"lineHeight\":\"32px\",\"margin\":\"0 0 12px 0\",\"color\":\"var(--next-error-title)\"},\"children\":\"This page couldn’t load\"}],[\"$\",\"p\",null,{\"style\":{\"fontSize\":\"14px\",\"fontWeight\":400,\"lineHeight\":\"21px\",\"margin\":\"0 0 20px 0\",\"color\":\"var(--next-error-message)\"},\"children\":\"A server error occurred. Reload to try again.\"}],[\"$\",\"form\",null,{\"style\":{\"margin\":0},\"children\":[\"$\",\"button\",null,{\"type\":\"submit\",\"style\":{\"display\":\"inline-flex\",\"alignItems\":\"center\",\"justifyContent\":\"center\",\"height\":\"32px\",\"padding\":\"0 12px\",\"fontSize\":\"14px\",\"fontWeight\":500,\"lineHeight\":\"20px\",\"borderRadius\":\"6px\",\"cursor\":\"pointer\",\"color\":\"var(--next-error-btn-text)\",\"background\":\"var(--next-error-btn-bg)\",\"border\":\"var(--next-error-btn-border)\"},\"children\":\"Reload\"}]}]]}]}]}]]}],null,[\"$\",\"$L4\",null,{\"children\":[\"$\",\"$5\",null,{\"name\":\"Next.MetadataOutlet\",\"children\":\"$@6\"}]}]]}],{},null,false,null]},null,false,\"$@7\"],[\"$\",\"$1\",\"h\",{\"children\":[null,[\"$\",\"$L8\",null,{\"children\":\"$L9\"}],[\"$\",\"div\",null,{\"hidden\":true,\"children\":[\"$\",\"$La\",null,{\"children\":[\"$\",\"$5\",null,{\"name\":\"Next.Metadata\",\"children\":\"$Lb\"}]}]}],[\"$\",\"meta\",null,{\"name\":\"next-size-adjust\",\"content\":\"\"}]]}],false]],\"m\":\"$undefined\",\"G\":[\"$c\",[]],\"S\":true,\"h\":null,\"s\":\"$undefined\",\"l\":\"$undefined\",\"p\":\"$undefined\",\"d\":\"$undefined\",\"b\":\"DcqlVrgh4gM8jlqrnOCpT\"}\n"])</script><script>self.__next_f.push([1,"d:[]\n7:\"$Wd\"\n"])</script><script>self.__next_f.push([1,"9:[[\"$\",\"meta\",\"0\",{\"charSet\":\"utf-8\"}],[\"$\",\"meta\",\"1\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}]]\n"])</script><script>self.__next_f.push([1,"e:I[27201,[\"/_next/static/chunks/01xlw8hd842-c.js\",\"/_next/static/chunks/0d3shmwh5_nmn.js\"],\"IconMark\"]\n6:null\nb:[[\"$\",\"link\",\"0\",{\"rel\":\"icon\",\"href\":\"/favicon.ico?favicon.0x3dzn~oxb6tn.ico\",\"sizes\":\"256x256\",\"type\":\"image/x-icon\"}],[\"$\",\"$Le\",\"1\",{}]]\n"])</script></body></html>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
self.__RSC_SERVER_MANIFEST="{\n \"node\": {},\n \"edge\": {},\n \"encryptionKey\": \"
|
|
1
|
+
self.__RSC_SERVER_MANIFEST="{\n \"node\": {},\n \"edge\": {},\n \"encryptionKey\": \"Cxc/s5PZCeUFuvLJ2Ai7PkIMmhG7AJE9s5JwkMIn7eI=\"\n}"
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,95057,(e,t,s)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0});var n={formatUrl:function(){return i},formatWithValidation:function(){return o},urlObjectKeys:function(){return c}};for(var r in n)Object.defineProperty(s,r,{enumerable:!0,get:n[r]});let l=e.r(90809)._(e.r(98183)),a=/https?|ftp|gopher|file/;function i(e){let{auth:t,hostname:s}=e,n=e.protocol||"",r=e.pathname||"",i=e.hash||"",c=e.query||"",o=!1;t=t?encodeURIComponent(t).replace(/%3A/i,":")+"@":"",e.host?o=t+e.host:s&&(o=t+(~s.indexOf(":")?`[${s}]`:s),e.port&&(o+=":"+e.port)),c&&"object"==typeof c&&(c=String(l.urlQueryToSearchParams(c)));let d=e.search||c&&`?${c}`||"";return n&&!n.endsWith(":")&&(n+=":"),e.slashes||(!n||a.test(n))&&!1!==o?(o="//"+(o||""),r&&"/"!==r[0]&&(r="/"+r)):o||(o=""),i&&"#"!==i[0]&&(i="#"+i),d&&"?"!==d[0]&&(d="?"+d),r=r.replace(/[?#]/g,encodeURIComponent),d=d.replace("#","%23"),`${n}${o}${r}${d}${i}`}let c=["auth","hash","host","hostname","href","path","pathname","port","protocol","query","search","slashes"];function o(e){return i(e)}},18581,(e,t,s)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),Object.defineProperty(s,"useMergedRef",{enumerable:!0,get:function(){return r}});let n=e.r(71645);function r(e,t){let s=(0,n.useRef)(null),r=(0,n.useRef)(null);return(0,n.useCallback)(n=>{if(null===n){let e=s.current;e&&(s.current=null,e());let t=r.current;t&&(r.current=null,t())}else e&&(s.current=l(e,n)),t&&(r.current=l(t,n))},[e,t])}function l(e,t){if("function"!=typeof e)return e.current=t,()=>{e.current=null};{let s=e(t);return"function"==typeof s?s:()=>e(null)}}("function"==typeof s.default||"object"==typeof s.default&&null!==s.default)&&void 0===s.default.__esModule&&(Object.defineProperty(s.default,"__esModule",{value:!0}),Object.assign(s.default,s),t.exports=s.default)},73668,(e,t,s)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),Object.defineProperty(s,"isLocalURL",{enumerable:!0,get:function(){return l}});let n=e.r(18967),r=e.r(52817);function l(e){if(!(0,n.isAbsoluteUrl)(e))return!0;try{let t=(0,n.getLocationOrigin)(),s=new URL(e,t);return s.origin===t&&(0,r.hasBasePath)(s.pathname)}catch(e){return!1}}},84508,(e,t,s)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),Object.defineProperty(s,"errorOnce",{enumerable:!0,get:function(){return n}});let n=e=>{}},22016,(e,t,s)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0});var n={default:function(){return f},useLinkStatus:function(){return j}};for(var r in n)Object.defineProperty(s,r,{enumerable:!0,get:n[r]});let l=e.r(90809),a=e.r(43476),i=l._(e.r(71645)),c=e.r(95057),o=e.r(8372),d=e.r(18581),x=e.r(18967),u=e.r(5550);e.r(33525);let m=e.r(88540),p=e.r(91949),h=e.r(73668),g=e.r(9396);function f(t){var s,n;let r,l,f,[j,v]=(0,i.useOptimistic)(p.IDLE_LINK_STATUS),N=(0,i.useRef)(null),{href:y,as:z,children:w,prefetch:k=null,passHref:M,replace:$,shallow:_,scroll:S,onClick:C,onMouseEnter:T,onTouchStart:F,legacyBehavior:D=!1,onNavigate:L,transitionTypes:R,ref:P,unstable_dynamicOnHover:O,...A}=t;r=w,D&&("string"==typeof r||"number"==typeof r)&&(r=(0,a.jsx)("a",{children:r}));let E=i.default.useContext(o.AppRouterContext),U=!1!==k,X=!1!==k?null===(n=k)||"auto"===n?g.FetchStrategy.PPR:g.FetchStrategy.Full:g.FetchStrategy.PPR,I="string"==typeof(s=z||y)?s:(0,c.formatUrl)(s);if(D){if(r?.$$typeof===Symbol.for("react.lazy"))throw Object.defineProperty(Error("`<Link legacyBehavior>` received a direct child that is either a Server Component, or JSX that was loaded with React.lazy(). This is not supported. Either remove legacyBehavior, or make the direct child a Client Component that renders the Link's `<a>` tag."),"__NEXT_ERROR_CODE",{value:"E863",enumerable:!1,configurable:!0});l=i.default.Children.only(r)}let W=D?l&&"object"==typeof l&&l.ref:P,B=i.default.useCallback(e=>(null!==E&&(N.current=(0,p.mountLinkInstance)(e,I,E,X,U,v)),()=>{N.current&&((0,p.unmountLinkForCurrentNavigation)(N.current),N.current=null),(0,p.unmountPrefetchableInstance)(e)}),[U,I,E,X,v]),K={ref:(0,d.useMergedRef)(B,W),onClick(t){D||"function"!=typeof C||C(t),D&&l.props&&"function"==typeof l.props.onClick&&l.props.onClick(t),!E||t.defaultPrevented||function(t,s,n,r,l,a,c){if("u">typeof window){let o,{nodeName:d}=t.currentTarget;if("A"===d.toUpperCase()&&((o=t.currentTarget.getAttribute("target"))&&"_self"!==o||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey||t.nativeEvent&&2===t.nativeEvent.which)||t.currentTarget.hasAttribute("download"))return;if(!(0,h.isLocalURL)(s)){r&&(t.preventDefault(),location.replace(s));return}if(t.preventDefault(),a){let e=!1;if(a({preventDefault:()=>{e=!0}}),e)return}let{dispatchNavigateAction:x}=e.r(99781);i.default.startTransition(()=>{x(s,r?"replace":"push",!1===l?m.ScrollBehavior.NoScroll:m.ScrollBehavior.Default,n.current,c)})}}(t,I,N,$,S,L,R)},onMouseEnter(e){D||"function"!=typeof T||T(e),D&&l.props&&"function"==typeof l.props.onMouseEnter&&l.props.onMouseEnter(e),E&&U&&(0,p.onNavigationIntent)(e.currentTarget,!0===O)},onTouchStart:function(e){D||"function"!=typeof F||F(e),D&&l.props&&"function"==typeof l.props.onTouchStart&&l.props.onTouchStart(e),E&&U&&(0,p.onNavigationIntent)(e.currentTarget,!0===O)}};return(0,x.isAbsoluteUrl)(I)?K.href=I:D&&!M&&("a"!==l.type||"href"in l.props)||(K.href=(0,u.addBasePath)(I)),f=D?i.default.cloneElement(l,K):(0,a.jsx)("a",{...A,...K,children:r}),(0,a.jsx)(b.Provider,{value:j,children:f})}e.r(84508);let b=(0,i.createContext)(p.IDLE_LINK_STATUS),j=()=>(0,i.useContext)(b);("function"==typeof s.default||"object"==typeof s.default&&null!==s.default)&&void 0===s.default.__esModule&&(Object.defineProperty(s.default,"__esModule",{value:!0}),Object.assign(s.default,s),t.exports=s.default)},18566,(e,t,s)=>{t.exports=e.r(76562)},58116,e=>{"use strict";var t=e.i(43476),s=e.i(71645),n=e.i(18566);let r=["blocked","poc","spike","review","done"];function l(e){return e?e.split("/").filter(Boolean).pop()??e:"—"}function a({tool:e}){return"codex"===e?(0,t.jsx)("span",{className:"text-xs px-1.5 py-0.5 rounded bg-emerald-900/40 text-emerald-400 border border-emerald-800/50",children:"codex"}):"cursor"===e?(0,t.jsx)("span",{className:"text-xs px-1.5 py-0.5 rounded bg-sky-900/40 text-sky-400 border border-sky-800/50",children:"cursor"}):(0,t.jsx)("span",{className:"text-xs px-1.5 py-0.5 rounded bg-violet-900/40 text-violet-400 border border-violet-800/50",children:"claude"})}function i({label:e,onRemove:s}){let n={blocked:"bg-red-900/40 text-red-400 border-red-800/50",poc:"bg-yellow-900/40 text-yellow-400 border-yellow-800/50",spike:"bg-orange-900/40 text-orange-400 border-orange-800/50",review:"bg-blue-900/40 text-blue-400 border-blue-800/50",done:"bg-zinc-700/40 text-zinc-400 border-zinc-600/50"}[e]??"bg-zinc-800/40 text-zinc-400 border-zinc-700/50";return(0,t.jsxs)("span",{className:`inline-flex items-center gap-1 text-xs px-1.5 py-0.5 rounded border ${n}`,children:[e,s&&(0,t.jsx)("button",{onClick:s,className:"hover:text-white leading-none",children:"×"})]})}function c({sessions:e}){let[n,o]=(0,s.useState)(""),[d,x]=(0,s.useState)({}),[u,m]=(0,s.useState)({}),[p,h]=(0,s.useState)(null),g=(0,s.useMemo)(()=>{let t=n.toLowerCase();return t?e.filter(e=>l(e.cwd).toLowerCase().includes(t)||(e.ai_title??"").toLowerCase().includes(t)||(e.summary??"").toLowerCase().includes(t)):e},[e,n]);async function f(e,t){x(s=>({...s,[e]:t})),await fetch(`/api/sessions/${e}/tags`,{method:"PATCH",headers:{"content-type":"application/json"},body:JSON.stringify({tags:t})})}function b(e){return d[e.id]??function(e){try{return e?JSON.parse(e):[]}catch{return[]}}(e.tags)}function j(e,t){let s=t.trim().toLowerCase().replace(/\s+/g,"-");if(!s)return;let n=b(e);n.includes(s)||(f(e.id,[...n,s]),m(t=>({...t,[e.id]:""})))}return(0,t.jsxs)("div",{className:"rounded-lg border border-zinc-800 bg-zinc-900",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between px-5 py-3 border-b border-zinc-800 gap-4",children:[(0,t.jsx)("h2",{className:"text-sm font-medium text-zinc-300 shrink-0",children:"Recent Sessions"}),(0,t.jsx)("input",{type:"text",placeholder:"search project / title…",value:n,onChange:e=>o(e.target.value),className:"flex-1 max-w-xs bg-zinc-800 border border-zinc-700 rounded px-3 py-1 text-xs text-zinc-200 placeholder-zinc-600 focus:outline-none focus:border-zinc-500"}),(0,t.jsxs)("span",{className:"text-xs text-zinc-500 shrink-0",children:[e.filter(e=>!e.ended_at).length," active · ",g.length,"/",e.length]})]}),0===g.length?(0,t.jsx)("p",{className:"px-5 py-8 text-zinc-600 text-sm text-center",children:"No sessions match."}):(0,t.jsxs)("table",{className:"w-full text-sm",children:[(0,t.jsx)("thead",{children:(0,t.jsxs)("tr",{className:"text-xs text-zinc-500 border-b border-zinc-800",children:[(0,t.jsx)("th",{className:"px-4 py-2 text-left font-normal",children:"started"}),(0,t.jsx)("th",{className:"px-4 py-2 text-left font-normal",children:"tool"}),(0,t.jsx)("th",{className:"px-4 py-2 text-left font-normal",children:"project · title"}),(0,t.jsx)("th",{className:"px-4 py-2 text-left font-normal",children:"dur"}),(0,t.jsx)("th",{className:"px-4 py-2 text-left font-normal",children:"status"}),(0,t.jsx)("th",{className:"px-4 py-2 text-left font-normal",children:"tags"})]})}),(0,t.jsx)("tbody",{children:g.map(e=>{let n=!e.ended_at,c=b(e),o=p===e.id;return(0,t.jsx)(s.default.Fragment,{children:(0,t.jsxs)("tr",{className:"border-b border-zinc-800/40 hover:bg-zinc-800/20 transition-colors",children:[(0,t.jsx)("td",{className:"px-4 py-2 text-zinc-500 tabular-nums whitespace-nowrap text-xs",children:new Date(e.started_at).toLocaleString("zh-CN",{month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",hour12:!1})}),(0,t.jsx)("td",{className:"px-4 py-2",children:(0,t.jsx)(a,{tool:e.tool})}),(0,t.jsxs)("td",{className:"px-4 py-2 max-w-xs",children:[(0,t.jsx)("div",{className:"text-zinc-200 text-xs font-medium",children:l(e.cwd)}),e.ai_title&&(0,t.jsx)("div",{className:"text-zinc-500 text-xs truncate",children:e.ai_title}),!e.ai_title&&e.summary&&(0,t.jsx)("div",{className:"text-zinc-600 text-xs truncate",children:e.summary})]}),(0,t.jsx)("td",{className:"px-4 py-2 text-zinc-500 tabular-nums text-xs",children:function(e,t){if(!t)return"active";let s=Math.round((t-e)/6e4);return s<60?`${s}m`:`${Math.floor(s/60)}h ${s%60}m`}(e.started_at,e.ended_at??null)}),(0,t.jsx)("td",{className:"px-4 py-2",children:n?(0,t.jsxs)("span",{className:"inline-flex items-center gap-1 text-emerald-400 text-xs",children:[(0,t.jsx)("span",{className:"w-1.5 h-1.5 rounded-full bg-emerald-400 animate-pulse inline-block"}),"active"]}):(0,t.jsx)("span",{className:"text-zinc-700 text-xs",children:"done"})}),(0,t.jsx)("td",{className:"px-4 py-2",children:(0,t.jsxs)("div",{className:"flex flex-wrap gap-1 items-center",children:[c.map(s=>(0,t.jsx)(i,{label:s,onRemove:()=>{f(e.id,b(e).filter(e=>e!==s))}},s)),o?(0,t.jsxs)("div",{className:"flex items-center gap-1",children:[(0,t.jsx)("input",{autoFocus:!0,value:u[e.id]??"",onChange:t=>m(s=>({...s,[e.id]:t.target.value})),onKeyDown:t=>{"Enter"===t.key&&j(e,u[e.id]??""),"Escape"===t.key&&h(null)},placeholder:"tag…",className:"w-16 bg-zinc-800 border border-zinc-600 rounded px-1 py-0.5 text-xs text-zinc-200 focus:outline-none"}),(0,t.jsx)("div",{className:"flex gap-1",children:r.filter(e=>!c.includes(e)).slice(0,3).map(s=>(0,t.jsx)("button",{onClick:()=>j(e,s),className:"text-xs text-zinc-500 hover:text-zinc-300 px-1 py-0.5 rounded border border-zinc-700",children:s},s))}),(0,t.jsx)("button",{onClick:()=>h(null),className:"text-zinc-600 hover:text-zinc-400 text-xs",children:"✕"})]}):(0,t.jsx)("button",{onClick:()=>h(e.id),className:"text-zinc-700 hover:text-zinc-400 text-xs leading-none",children:"+"})]})})]})},e.id)})})]})]})}let o={"claude-code":"bg-violet-500",codex:"bg-emerald-500",cursor:"bg-sky-500",other:"bg-zinc-500"};function d({data:e}){let s=e.reduce((e,t)=>e+t.sessions,0);return(0,t.jsxs)("div",{className:"rounded-lg border border-zinc-800 bg-zinc-900 p-5",children:[(0,t.jsx)("p",{className:"text-xs text-zinc-500 uppercase tracking-wider mb-3",children:"tool split"}),0===e.length?(0,t.jsx)("p",{className:"text-zinc-600 text-sm",children:"no data"}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{className:"flex h-2 rounded overflow-hidden gap-0.5 mb-3",children:e.map(e=>(0,t.jsx)("div",{className:`${o[e.tool]??"bg-zinc-500"} rounded-sm`,style:{width:`${e.pct}%`}},e.tool))}),(0,t.jsx)("div",{className:"space-y-1.5",children:e.map(e=>{let s;return(0,t.jsxs)("div",{className:"flex items-center justify-between text-xs",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("span",{className:`w-2 h-2 rounded-sm inline-block ${o[e.tool]??"bg-zinc-500"}`}),(0,t.jsx)("span",{className:"text-zinc-300",children:"claude-code"===e.tool?"claude code":e.tool})]}),(0,t.jsxs)("span",{className:"text-zinc-500 tabular-nums",children:[e.sessions," sessions · ",(s=e.totalMs/36e5)<1?`${Math.round(60*s)}m`:`${s.toFixed(1)}h`," · ",e.pct,"%"]})]},e.tool)})}),(0,t.jsxs)("p",{className:"text-xs text-zinc-600 mt-2",children:[s," total sessions"]})]})]})}function x(e){return e.map(e=>`${e.x.toFixed(1)},${e.y.toFixed(1)}`).join(" ")}function u(e){let t=new Date(e),s=new Date,n=t.toLocaleTimeString("zh-CN",{hour:"2-digit",minute:"2-digit",hour12:!1});return t.toDateString()===s.toDateString()?n:`${(t.getMonth()+1).toString().padStart(2,"0")}/${t.getDate().toString().padStart(2,"0")} ${n}`}function m({data:e,label:n="claude code"}){let r=(0,s.useRef)(null),[l,a]=(0,s.useState)(null),i=e.length>=2?e[0].ts:0,c=e.length>=2?e[e.length-1].ts:1,o=c-i||1,d=e=>32+(e-i)/o*520,p=e=>null==e?null:4+(1-e/100)*112,h=(0,s.useCallback)(t=>{if(!r.current||e.length<2)return;let s=r.current.getBoundingClientRect(),n=32+520*Math.max(0,Math.min(1,(t.clientX-s.left)/s.width)),l=e[0],i=1/0;for(let t of e){let e=Math.abs(d(t.ts)-n);e<i&&(i=e,l=t)}a({svgX:d(l.ts),screenX:t.clientX,screenY:s.top,point:l})},[e,i,o]);if(e.length<2)return(0,t.jsxs)("div",{className:"rounded-lg border border-zinc-800 bg-zinc-900 p-5",children:[(0,t.jsxs)("p",{className:"text-xs text-zinc-500 uppercase tracking-wider mb-2",children:["usage history (7d) · ",n]}),(0,t.jsx)("p",{className:"text-zinc-600 text-sm",children:"not enough data yet"})]});let g=e.filter(e=>null!=e.pct5h).map(e=>({x:d(e.ts),y:p(e.pct5h)})),f=e.filter(e=>null!=e.pctWeekly).map(e=>({x:d(e.ts),y:p(e.pctWeekly)})),b=e.filter(e=>null!=e.pct5h).at(-1)?.pct5h,j=e.filter(e=>null!=e.pctWeekly).at(-1)?.pctWeekly;return(0,t.jsxs)("div",{className:"rounded-lg border border-zinc-800 bg-zinc-900 p-5 relative",children:[(0,t.jsxs)("p",{className:"text-xs text-zinc-500 uppercase tracking-wider mb-3",children:["usage history (7d) · ",n]}),(0,t.jsxs)("svg",{ref:r,viewBox:"0 0 560 120",className:"w-full h-28 cursor-crosshair",preserveAspectRatio:"none",onMouseMove:h,onMouseLeave:()=>a(null),children:[[0,25,50,75,100].map(e=>{let s=p(e);return(0,t.jsxs)("g",{children:[(0,t.jsx)("line",{x1:32,y1:s,x2:552,y2:s,stroke:"#27272a",strokeWidth:"1"}),(0,t.jsxs)("text",{x:29,y:s+3.5,textAnchor:"end",fontSize:"8",fill:"#52525b",children:[e,"%"]})]},e)}),g.length>=2&&(0,t.jsx)("polyline",{points:x(g),fill:"none",stroke:"#8b5cf6",strokeWidth:"1.5",strokeLinejoin:"round"}),f.length>=2&&(0,t.jsx)("polyline",{points:x(f),fill:"none",stroke:"#10b981",strokeWidth:"1.5",strokeLinejoin:"round",strokeDasharray:"4 2"}),l&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("line",{x1:l.svgX,y1:4,x2:l.svgX,y2:116,stroke:"#52525b",strokeWidth:"1",strokeDasharray:"3 2"}),null!=l.point.pct5h&&(0,t.jsx)("circle",{cx:l.svgX,cy:p(l.point.pct5h),r:"2.5",fill:"#8b5cf6"}),null!=l.point.pctWeekly&&(0,t.jsx)("circle",{cx:l.svgX,cy:p(l.point.pctWeekly),r:"2.5",fill:"#10b981"})]})]}),l&&(0,t.jsxs)("div",{className:"pointer-events-none absolute z-10 bg-zinc-800 border border-zinc-700 rounded px-2 py-1.5 text-xs shadow-lg",style:{left:`${((l.svgX-32)/520*100).toFixed(1)}%`,transform:l.svgX>364?"translateX(-110%)":"translateX(4px)",top:"40px"},children:[(0,t.jsx)("p",{className:"text-zinc-400 mb-1",children:u(l.point.ts)}),null!=l.point.pct5h&&(0,t.jsxs)("p",{className:"text-violet-400",children:["5h: ",l.point.pct5h.toFixed(0),"% used"]}),null!=l.point.pctWeekly&&(0,t.jsxs)("p",{className:"text-emerald-400",children:["7day: ",l.point.pctWeekly.toFixed(0),"% used"]})]}),(0,t.jsxs)("div",{className:"flex items-center justify-between mt-1 text-xs text-zinc-600",children:[(0,t.jsx)("span",{children:u(i)}),(0,t.jsxs)("div",{className:"flex gap-4",children:[(0,t.jsxs)("span",{className:"text-violet-400",children:["— 5h ",null!=b?`(${b.toFixed(0)}% used)`:""]}),(0,t.jsxs)("span",{className:"text-emerald-400",children:["-- 7day ",null!=j?`(${j.toFixed(0)}% used)`:""]})]}),(0,t.jsx)("span",{children:u(c)})]})]})}function p({data:e}){if(0===e.length)return null;let s=e[0].changes;return(0,t.jsxs)("div",{className:"rounded-lg border border-zinc-800 bg-zinc-900 p-5",children:[(0,t.jsx)("p",{className:"text-xs text-zinc-500 uppercase tracking-wider mb-3",children:"file hotspots"}),(0,t.jsx)("div",{className:"space-y-2",children:e.map(e=>{let n,r;return(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"flex items-center justify-between text-xs mb-0.5",children:[(0,t.jsxs)("span",{className:"text-zinc-300 truncate max-w-xs",title:e.path,children:[(0,t.jsxs)("span",{className:"text-zinc-600",children:[(n=e.path.split("/")).length>1?n.slice(-2,-1)[0]:"","/"]}),(r=e.path).split("/").pop()??r]}),(0,t.jsxs)("span",{className:"text-zinc-500 tabular-nums ml-2 shrink-0",children:[e.changes,"× · ",e.sessions," sessions"]})]}),(0,t.jsx)("div",{className:"h-1 bg-zinc-800 rounded",children:(0,t.jsx)("div",{className:"h-1 bg-amber-500/60 rounded",style:{width:`${e.changes/s*100}%`}})})]},e.path)})})]})}function h(e){return e>=1e9?`${(e/1e9).toFixed(1)}B`:e>=1e6?`${(e/1e6).toFixed(0)}M`:e>=1e3?`${(e/1e3).toFixed(0)}K`:String(e)}function g({data:e,toolFilter:s}){let n="all"===s||"claude-code"===s,r="all"===s||"codex"===s,l=n?Math.max(...e.daily.map(e=>e.claudeUsd),.01):.01,a=r?Math.max(...e.daily.map(e=>e.codexTokens),1):1;return n||r?(0,t.jsxs)("div",{className:"rounded-lg border border-zinc-800 bg-zinc-900 p-5",children:[(0,t.jsx)("p",{className:"text-xs text-zinc-500 uppercase tracking-wider mb-3",children:"spending / consumption"}),(0,t.jsxs)("div",{className:"flex gap-6 mb-4",children:[n&&(0,t.jsxs)("div",{children:[(0,t.jsxs)("p",{className:"text-xl font-bold text-violet-400",children:["$",e.claudeTotalUsd.toFixed(2)]}),(0,t.jsx)("p",{className:"text-xs text-zinc-600 mt-0.5",children:"claude code total"})]}),r&&(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{className:"text-xl font-bold text-emerald-400",children:h(e.codexTotalTokens)}),(0,t.jsx)("p",{className:"text-xs text-zinc-600 mt-0.5",children:"codex tokens"})]})]}),(0,t.jsx)("p",{className:"text-xs text-zinc-600 mb-2",children:"last 14 days"}),(0,t.jsx)("div",{className:"flex items-end gap-px h-16",children:e.daily.map(e=>{let s=n?e.claudeUsd/l*100:0,i=r?e.codexTokens/a*100:0,c=[e.date.slice(5),n?`Claude $${e.claudeUsd.toFixed(2)}`:"",r?`Codex ${h(e.codexTokens)} tokens`:""].filter(Boolean).join("\n");return(0,t.jsx)("div",{className:"flex-1 flex flex-col items-center",title:c,children:(0,t.jsxs)("div",{className:"w-full flex flex-col justify-end gap-px",style:{height:"56px"},children:[r&&e.codexTokens>0&&(0,t.jsx)("div",{className:"w-full bg-emerald-600/60 rounded-sm",style:{height:`${Math.max(.56*i,1)}px`}}),n&&e.claudeUsd>0&&(0,t.jsx)("div",{className:"w-full bg-violet-500/70 rounded-sm",style:{height:`${Math.max(.56*s,1)}px`}})]})},e.date)})}),(0,t.jsxs)("div",{className:"flex justify-between mt-1",children:[(0,t.jsx)("span",{className:"text-zinc-700 text-xs",children:e.daily[0]?.date.slice(5)}),(0,t.jsx)("span",{className:"text-zinc-700 text-xs",children:e.daily[e.daily.length-1]?.date.slice(5)})]}),(0,t.jsxs)("div",{className:"flex gap-4 mt-2",children:[n&&(0,t.jsxs)("span",{className:"flex items-center gap-1 text-xs text-zinc-600",children:[(0,t.jsx)("span",{className:"w-2 h-2 rounded-sm bg-violet-500/70 inline-block"})," claude ($)"]}),r&&(0,t.jsxs)("span",{className:"flex items-center gap-1 text-xs text-zinc-600",children:[(0,t.jsx)("span",{className:"w-2 h-2 rounded-sm bg-emerald-600/60 inline-block"})," codex (tokens)"]})]})]}):(0,t.jsxs)("div",{className:"rounded-lg border border-zinc-800 bg-zinc-900 p-5",children:[(0,t.jsx)("p",{className:"text-xs text-zinc-500 uppercase tracking-wider mb-3",children:"spending / consumption"}),(0,t.jsx)("p",{className:"text-zinc-600 text-sm",children:"no spending data for cursor"})]})}let f=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"];function b(e){return e<60?`${Math.round(e)}m`:`${(e/60).toFixed(1)}h`}function j(e){let t=new Date(e);return`${t.getHours().toString().padStart(2,"0")}:${t.getMinutes().toString().padStart(2,"0")}`}let v={"claude-code":"bg-violet-500/80 border-violet-400 text-violet-50",codex:"bg-emerald-600/80 border-emerald-400 text-emerald-50",cursor:"bg-sky-600/80 border-sky-400 text-sky-50"};function N({sessions:e,streak:n,timeline:r}){var l;let[a,i]=(0,s.useState)("pattern"),[c,o]=(0,s.useState)(null),d=(0,s.useMemo)(()=>(function(e){let t=new Map;for(let s of e){let e=s.started_at,n=s.ended_at??Math.min(Date.now(),s.started_at+36e5),r=e,l=null;for(;r<n;){let e=new Date(r),s=(e.getDay()+6)%7,a=e.getHours(),i=`${s}-${a}`,c=new Date(e);c.setMinutes(0,0,0),c.setHours(e.getHours()+1);let o=(Math.min(c.getTime(),n)-r)/6e4,d=t.get(i)??{minutes:0,sessions:0};d.minutes+=o,null===l&&(d.sessions+=1,l=i),t.set(i,d),r=c.getTime()}}let s=[];for(let e=0;e<7;e++)for(let n=0;n<24;n++){let r=t.get(`${e}-${n}`)??{minutes:0,sessions:0};s.push({dow:e,hour:n,...r})}return s})(e),[e]),x=Math.max(...d.map(e=>e.minutes),1),u=d.reduce((e,t)=>e+t.minutes,0)/60,m=d.reduce((e,t)=>t.minutes>e.minutes?t:e,d[0]),p=new Date(r.dateLabel+"T00:00:00").getTime(),h=p+864e5,g=r.sessions.map(e=>({...e,_start:Math.max(e.startMs,p),_end:Math.min(e.endMs,h)})).filter(e=>e._end>e._start).sort((e,t)=>e._start-t._start),y=[];for(let e of g){let t=!1;for(let s of y)if(s[s.length-1]._end<=e._start){s.push(e),t=!0;break}t||y.push([e])}let z=Math.max(y.length,1),w=g.reduce((e,t)=>e+(t._end-t._start),0)/36e5;return(0,t.jsxs)("div",{className:"rounded-lg border border-zinc-800 bg-zinc-900 p-5 relative",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between mb-4 gap-4 flex-wrap",children:[(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[(0,t.jsx)("p",{className:"text-xs text-zinc-500 uppercase tracking-wider",children:"activity"}),(0,t.jsxs)("div",{className:"flex gap-1",children:[(0,t.jsx)("button",{onClick:()=>i("pattern"),className:`text-xs px-2.5 py-1 rounded border transition-colors ${"pattern"===a?"bg-zinc-700 border-zinc-500 text-zinc-100":"border-zinc-800 text-zinc-500 hover:text-zinc-300 hover:border-zinc-600"}`,children:"pattern"}),(0,t.jsx)("button",{onClick:()=>i("today"),className:`text-xs px-2.5 py-1 rounded border transition-colors ${"today"===a?"bg-zinc-700 border-zinc-500 text-zinc-100":"border-zinc-800 text-zinc-500 hover:text-zinc-300 hover:border-zinc-600"}`,children:"today"})]})]}),(0,t.jsxs)("div",{className:"flex items-center gap-4 text-xs",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("span",{className:"text-base font-bold text-zinc-100 tabular-nums",children:n.current}),(0,t.jsx)("span",{className:"text-zinc-500 ml-1",children:"day streak"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("span",{className:"text-base font-bold text-zinc-300 tabular-nums",children:n.longest}),(0,t.jsx)("span",{className:"text-zinc-500 ml-1",children:"longest"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("span",{className:"text-base font-bold text-zinc-300 tabular-nums",children:n.totalDays}),(0,t.jsx)("span",{className:"text-zinc-500 ml-1",children:"active days"})]}),(0,t.jsxs)("div",{className:"border-l border-zinc-800 pl-4",children:[(0,t.jsxs)("span",{className:"text-base font-bold text-violet-400 tabular-nums",children:[u.toFixed(0),"h"]}),(0,t.jsx)("span",{className:"text-zinc-500 ml-1",children:"total"})]})]})]}),"pattern"===a?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("p",{className:"text-xs text-zinc-600 mb-2",children:["peak slot: ",f[m.dow]," ",m.hour.toString().padStart(2,"0"),":00 (",b(m.minutes),")"]}),(0,t.jsxs)("div",{className:"flex gap-1 text-xs",children:[(0,t.jsx)("div",{className:"w-8 shrink-0"}),(0,t.jsx)("div",{className:"flex-1 grid gap-px",style:{gridTemplateColumns:"repeat(24, minmax(0, 1fr))"},children:Array.from({length:24}).map((e,s)=>(0,t.jsx)("div",{className:`text-center text-[9px] text-zinc-600 ${s%3==0?"":"opacity-40"}`,children:s%3==0?s.toString().padStart(2,"0"):""},s))})]}),f.map((e,s)=>(0,t.jsxs)("div",{className:"flex gap-1 mt-px",children:[(0,t.jsx)("div",{className:"w-8 shrink-0 text-[10px] text-zinc-600 leading-4",children:e}),(0,t.jsx)("div",{className:"flex-1 grid gap-px",style:{gridTemplateColumns:"repeat(24, minmax(0, 1fr))"},children:Array.from({length:24}).map((n,r)=>{let l=d[24*s+r];return(0,t.jsx)("div",{className:`h-4 rounded-sm ${function(e,t){if(0===e)return"bg-zinc-900";let s=t>0?e/t:0;return s<.15?"bg-violet-900/40":s<.3?"bg-violet-800/60":s<.5?"bg-violet-700":s<.75?"bg-violet-600":"bg-violet-400"}(l.minutes,x)}`,title:`${e} ${r.toString().padStart(2,"0")}:00
|
|
2
|
-
${b(l.minutes)} \xb7 ${l.sessions} sessions`},r)})})]},e)),(0,t.jsxs)("div",{className:"flex items-center gap-2 mt-3 text-[10px] text-zinc-600",children:[(0,t.jsx)("span",{children:"less"}),(0,t.jsx)("span",{className:"w-3 h-3 rounded-sm bg-zinc-900 border border-zinc-800"}),(0,t.jsx)("span",{className:"w-3 h-3 rounded-sm bg-violet-900/40"}),(0,t.jsx)("span",{className:"w-3 h-3 rounded-sm bg-violet-800/60"}),(0,t.jsx)("span",{className:"w-3 h-3 rounded-sm bg-violet-700"}),(0,t.jsx)("span",{className:"w-3 h-3 rounded-sm bg-violet-600"}),(0,t.jsx)("span",{className:"w-3 h-3 rounded-sm bg-violet-400"}),(0,t.jsx)("span",{children:"more"})]})]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("p",{className:"text-xs text-zinc-600 mb-2",children:[r.dateLabel," · ",g.length," sessions · ",w.toFixed(1),"h active"]}),0===g.length?(0,t.jsx)("p",{className:"text-zinc-600 text-sm py-4",children:"no sessions today"}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{className:"relative h-4 mb-1",children:Array.from({length:25}).map((e,s)=>(0,t.jsx)("div",{className:"absolute top-0 text-[10px] text-zinc-600 tabular-nums",style:{left:`${s/24*100}%`,transform:"translateX(-50%)"},children:s%3==0?s.toString().padStart(2,"0"):""},s))}),(0,t.jsxs)("div",{className:"relative bg-zinc-950/50 rounded overflow-hidden",style:{height:`${32*z+4}px`},children:[Array.from({length:25}).map((e,s)=>(0,t.jsx)("div",{className:"absolute top-0 bottom-0 border-l border-zinc-800/40",style:{left:`${s/24*100}%`}},s)),y.flatMap((e,s)=>e.map(e=>{let n=(e._start-p)/864e5*100,r=(e._end-e._start)/864e5*100;return(0,t.jsx)("div",{className:`absolute rounded border text-[11px] font-medium leading-none cursor-pointer hover:brightness-125 transition-all overflow-hidden ${v[e.tool]??"bg-zinc-600 border-zinc-500 text-zinc-100"}`,style:{left:`${n}%`,width:`${Math.max(r,.4)}%`,top:`${4+32*s}px`,height:"28px"},onMouseEnter:t=>o({s:e,x:t.clientX,y:t.clientY}),onMouseMove:t=>o({s:e,x:t.clientX,y:t.clientY}),onMouseLeave:()=>o(null),children:r>4&&(0,t.jsxs)("div",{className:"px-1.5 py-1 truncate",children:[(0,t.jsx)("span",{className:"opacity-80",children:j(e._start)})," · ",e.project]})},e.id)}))]}),(0,t.jsxs)("div",{className:"flex gap-4 mt-3 text-[11px] text-zinc-600",children:[(0,t.jsxs)("span",{className:"flex items-center gap-1",children:[(0,t.jsx)("span",{className:"w-2.5 h-2.5 rounded-sm bg-violet-500/80 inline-block"})," claude code"]}),(0,t.jsxs)("span",{className:"flex items-center gap-1",children:[(0,t.jsx)("span",{className:"w-2.5 h-2.5 rounded-sm bg-emerald-600/80 inline-block"})," codex"]}),(0,t.jsxs)("span",{className:"flex items-center gap-1",children:[(0,t.jsx)("span",{className:"w-2.5 h-2.5 rounded-sm bg-sky-600/80 inline-block"})," cursor"]})]}),c&&(0,t.jsxs)("div",{className:"fixed z-20 bg-zinc-800 border border-zinc-700 rounded px-3 py-2 text-xs shadow-xl pointer-events-none max-w-xs",style:{left:c.x+12,top:c.y+12},children:[(0,t.jsxs)("p",{className:"text-zinc-100 font-medium mb-0.5",children:[c.s.project," ",(0,t.jsxs)("span",{className:"text-zinc-500 font-normal",children:["· ",c.s.tool]})]}),c.s.aiTitle&&(0,t.jsx)("p",{className:"text-zinc-400 mb-1 line-clamp-2",children:c.s.aiTitle}),(0,t.jsxs)("p",{className:"text-zinc-500 tabular-nums",children:[j(c.s.startMs)," → ",j(c.s.endMs)," · ",(l=c.s.startMs,Math.max(1,Math.round((c.s.endMs-l)/6e4))),"m"]})]})]})]})]})}let y={"claude-code":"bg-violet-500",codex:"bg-emerald-500",cursor:"bg-sky-500"};function z({sessions:e,limit:n=10}){let r=(0,s.useMemo)(()=>{let t=new Map;for(let n of e){var s;let e=(s=n.cwd)?s.split("/").filter(Boolean).pop()??s:"—";if("—"===e)continue;let r=(n.ended_at??n.started_at)-n.started_at,l=t.get(e)??{project:e,cwd:n.cwd,sessions:0,totalMs:0,tools:{}};l.sessions+=1,l.totalMs+=r,l.tools[n.tool]=(l.tools[n.tool]??0)+1,t.set(e,l)}return[...t.values()].sort((e,t)=>t.totalMs-e.totalMs).slice(0,n)},[e,n]),l=Math.max(...r.map(e=>e.totalMs),1);return 0===r.length?(0,t.jsxs)("div",{className:"rounded-lg border border-zinc-800 bg-zinc-900 p-5",children:[(0,t.jsx)("p",{className:"text-xs text-zinc-500 uppercase tracking-wider mb-3",children:"project leaderboard"}),(0,t.jsx)("p",{className:"text-zinc-600 text-sm",children:"no projects yet"})]}):(0,t.jsxs)("div",{className:"rounded-lg border border-zinc-800 bg-zinc-900 p-5",children:[(0,t.jsx)("p",{className:"text-xs text-zinc-500 uppercase tracking-wider mb-3",children:"project leaderboard"}),(0,t.jsx)("div",{className:"space-y-1.5",children:r.map((e,s)=>{let n;return(0,t.jsxs)("div",{className:"group",children:[(0,t.jsxs)("div",{className:"flex items-center gap-3 text-xs",children:[(0,t.jsx)("span",{className:"w-5 text-right text-zinc-600 tabular-nums",children:s+1}),(0,t.jsx)("span",{className:"flex-1 text-zinc-200 truncate",title:e.cwd??e.project,children:e.project}),(0,t.jsx)("div",{className:"flex gap-0.5",children:Object.entries(e.tools).map(([e,s])=>(0,t.jsx)("span",{className:`w-1.5 h-1.5 rounded-full ${y[e]??"bg-zinc-500"}`,title:`${e}: ${s}`},e))}),(0,t.jsxs)("span",{className:"text-zinc-500 tabular-nums w-12 text-right",children:[e.sessions,"×"]}),(0,t.jsx)("span",{className:"text-zinc-400 tabular-nums w-14 text-right",children:(n=e.totalMs/36e5)<1?`${Math.round(60*n)}m`:`${n.toFixed(1)}h`})]}),(0,t.jsx)("div",{className:"flex gap-px h-1 mt-0.5 ml-8",children:(0,t.jsx)("div",{className:"bg-violet-500/30 rounded-sm",style:{width:`${e.totalMs/l*100}%`}})})]},e.project)})})]})}function w({data:e}){let[n,r]=(0,s.useState)(!1),l=e.filter(e=>e.unlocked),a=e.filter(e=>!e.unlocked).sort((e,t)=>{let s=e.progress?e.progress.current/e.progress.target:0;return(t.progress?t.progress.current/t.progress.target:0)-s}),i=n?[...l,...a]:[...l.slice(0,4),...a.slice(0,Math.max(0,6-Math.min(l.length,4)))];return(0,t.jsxs)("div",{className:"rounded-lg border border-zinc-800 bg-zinc-900 p-5",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between mb-3",children:[(0,t.jsx)("p",{className:"text-xs text-zinc-500 uppercase tracking-wider",children:"achievements"}),(0,t.jsxs)("p",{className:"text-xs text-zinc-600",children:[l.length," / ",e.length," unlocked"]})]}),(0,t.jsx)("div",{className:"grid grid-cols-2 gap-2",children:i.map(e=>{let s=e.progress?Math.min(100,e.progress.current/e.progress.target*100):100*!!e.unlocked;return(0,t.jsxs)("div",{className:`rounded border px-2.5 py-2 ${e.unlocked?"border-amber-700/50 bg-amber-950/30":"border-zinc-800 bg-zinc-950/30"}`,title:e.description,children:[(0,t.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,t.jsxs)("span",{className:`text-xs font-medium ${e.unlocked?"text-amber-300":"text-zinc-500"}`,children:[e.unlocked?"★":"☆"," ",e.title]}),(0,t.jsx)("span",{className:"text-[10px] text-zinc-600 tabular-nums shrink-0",children:function(e){if(!e.progress)return"";let{current:t,target:s}=e.progress;return s>=1e6?`${(t/1e6).toFixed(0)}M / ${(s/1e6).toFixed(0)}M`:s>=1e3?`${t.toLocaleString()} / ${s.toLocaleString()}`:s>=100&&Number.isFinite(t)&&t<100&&t%1!=0?`${t.toFixed(1)} / ${s}`:`${Math.floor(t)} / ${s}`}(e)})]}),(0,t.jsx)("div",{className:"h-0.5 bg-zinc-800 rounded mt-1.5 overflow-hidden",children:(0,t.jsx)("div",{className:`h-full ${e.unlocked?"bg-amber-500":"bg-zinc-600"}`,style:{width:`${s}%`}})}),(0,t.jsx)("p",{className:"text-[10px] text-zinc-600 mt-1 truncate",children:e.description})]},e.id)})}),e.length>6&&(0,t.jsx)("button",{onClick:()=>r(!n),className:"w-full mt-3 text-xs text-zinc-500 hover:text-zinc-300 border border-zinc-800 rounded py-1",children:n?"show less":`show all (${e.length})`})]})}let k=["all","claude-code","codex","cursor"],M={all:"All","claude-code":"Claude Code",codex:"Codex",cursor:"Cursor"},$=["today","7d","30d","all"],_={today:"Today","7d":"7 days","30d":"30 days",all:"All time"};function S(e){if(!e)return"";let t=e-Date.now();if(t<=0)return"resetting…";let s=new Date(e),n=s.toLocaleTimeString("zh-CN",{hour:"2-digit",minute:"2-digit",hour12:!1}),r=new Date().toDateString()===s.toDateString()?n:`${(s.getMonth()+1).toString().padStart(2,"0")}/${s.getDate().toString().padStart(2,"0")} ${n}`,l=Math.floor(t/36e5),a=Math.floor(t%36e5/6e4),i=l>0?`${l}h ${a}m`:`${a}m`;return`resets at ${r} (in ${i})`}e.s(["Dashboard",0,function({sessions:e,streak:r,allBurndown:l,claudeBurndown:a,codexBurndown:i,hotspots:o,allUsage:x,claudeUsage:u,codexUsage:h,codexAccounts:f,selectedCodexAccountId:b,initialToolFilter:j,spending:v,timeline:y,achievements:C}){var T;let F,D,L=(0,n.useRouter)(),R=(0,n.usePathname)(),P=(0,n.useSearchParams)(),[O,A]=(0,s.useState)(j),[E,U]=(0,s.useState)("all"),[X,I]=(0,s.useState)("idle"),[W,B]=(0,s.useState)(null),K=(0,s.useMemo)(()=>f.find(e=>e.accountId===b)??null,[f,b]),H=K?`codex \xb7 ${K.label}`:"codex · all accounts",J=(0,s.useMemo)(()=>{let e;return e=new Date,"today"===E?(e.setHours(0,0,0,0),e.getTime()):"7d"===E?Date.now()-6048e5:"30d"===E?Date.now()-2592e6:0},[E]),Y=(0,s.useMemo)(()=>{let t=J>0?e.filter(e=>e.started_at>=J):e,s={all:t.length};for(let e of t)s[e.tool]=(s[e.tool]??0)+1;return s},[e,J]),q=(0,s.useMemo)(()=>{let t="all"===O?e:e.filter(e=>e.tool===O);return J>0&&(t=t.filter(e=>e.started_at>=J)),t},[e,O,J]),Q=(0,s.useMemo)(()=>{let e=new Map;for(let t of q){let s=(t.ended_at??t.started_at)-t.started_at,n=e.get(t.tool)??{sessions:0,totalMs:0};e.set(t.tool,{sessions:n.sessions+1,totalMs:n.totalMs+s})}let t=Math.max([...e.values()].reduce((e,t)=>e+t.totalMs,0),1);return[...e.entries()].map(([e,s])=>({tool:e,sessions:s.sessions,totalMs:s.totalMs,pct:Math.round(s.totalMs/t*100)})).sort((e,t)=>t.totalMs-e.totalMs)},[q]),V=(0,s.useMemo)(()=>{if(0===J)return v;let e=new Date(J).toISOString().slice(0,10);return{...v,daily:v.daily.filter(t=>t.date>=e)}},[v,J]);async function G(){I("refreshing"),B(null);try{let e=await fetch("/api/import-sessions",{method:"POST"}),t=await e.json();if(!e.ok)throw Error(t.error??"Refresh failed");I("done"),B(`scanned ${t.scanned??0} logs in ${Math.round((t.durationMs??0)/100)/10}s`),L.refresh()}catch(e){I("error"),B(e instanceof Error?e.message:"Refresh failed")}}function Z(e,t){let s=new URLSearchParams(P.toString());"all"===e?(s.delete("agent"),s.delete("codexAccount")):(s.set("agent",e),"codex"!==e&&s.delete("codexAccount")),"codex"===e&&t?s.set("codexAccount",t):s.delete("codexAccount");let n=s.toString();L.replace(n?`${R}?${n}`:R,{scroll:!1}),L.refresh()}return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:"flex flex-wrap items-center justify-between mb-4 gap-3",children:[(0,t.jsx)("div",{className:"flex flex-wrap gap-2",children:k.filter(e=>"all"===e||(Y[e]??0)>0).sort((e,t)=>"all"===e?-1:"all"===t?1:(Y[t]??0)-(Y[e]??0)).map(e=>(0,t.jsxs)("button",{onClick:()=>{A(e),Z(e,"codex"===e?b:null)},className:`text-xs px-3 py-1.5 rounded-full border transition-colors ${O===e?"bg-zinc-700 border-zinc-500 text-zinc-100":"border-zinc-700 text-zinc-500 hover:text-zinc-300 hover:border-zinc-600"}`,children:[M[e],(0,t.jsx)("span",{className:"ml-1.5 text-zinc-600 tabular-nums",children:Y[e]??0})]},e))}),(0,t.jsxs)("div",{className:"flex flex-wrap items-center justify-end gap-2",children:[(0,t.jsx)("div",{className:"flex gap-1",children:$.map(e=>(0,t.jsx)("button",{onClick:()=>U(e),className:`text-xs px-3 py-1.5 rounded-full border transition-colors ${E===e?"bg-zinc-700 border-zinc-500 text-zinc-100":"border-zinc-700 text-zinc-500 hover:text-zinc-300 hover:border-zinc-600"}`,children:_[e]},e))}),(0,t.jsx)("button",{type:"button",onClick:G,disabled:"refreshing"===X,className:"text-xs px-3 py-1.5 rounded-full border border-violet-500/40 bg-violet-500/10 text-violet-100 transition-colors hover:bg-violet-500/20 disabled:cursor-not-allowed disabled:opacity-50",children:"refreshing"===X?"Refreshing...":"Refresh data"})]})]}),W&&(0,t.jsx)("div",{className:`mb-4 rounded-lg border px-4 py-3 text-xs ${"error"===X?"border-red-900/60 bg-red-950/40 text-red-200":"border-emerald-900/60 bg-emerald-950/30 text-emerald-200"}`,children:W}),"codex"===O&&f.length>0&&(0,t.jsxs)("div",{className:"mb-3 flex flex-wrap items-center justify-between gap-2 rounded-lg border border-zinc-800 bg-zinc-900 px-4 py-3",children:[(0,t.jsxs)("div",{className:"min-w-0",children:[(0,t.jsx)("p",{className:"text-xs uppercase tracking-wider text-zinc-500",children:"Codex account"}),(0,t.jsx)("p",{className:"mt-1 truncate text-xs text-zinc-600",children:K?K.isCurrent?"current account only":"saved account only":"all saved and legacy Codex usage"})]}),(0,t.jsxs)("div",{className:"flex min-w-0 items-center gap-2",children:[(0,t.jsxs)("select",{value:b??"",onChange:e=>{var t;return t=e.target.value,void(A("codex"),Z("codex",t||null))},className:"max-w-72 rounded-md border border-zinc-700 bg-zinc-950 px-3 py-2 text-xs text-zinc-100 outline-none transition-colors hover:border-zinc-500 focus:border-violet-500",children:[(0,t.jsx)("option",{value:"",children:"All Codex accounts"}),f.map(e=>(0,t.jsxs)("option",{value:e.accountId,children:[e.label," · ",e.planType??"unknown",e.isCurrent?" · current":""]},e.accountId))]}),(0,t.jsx)("span",{className:"hidden shrink-0 text-xs text-zinc-600 sm:inline",children:K?(T=K.accountId).length>12?`${T.slice(0,6)}...${T.slice(-4)}`:T:"all"})]})]}),(F="codex"===O?h:"claude-code"===O?u:"all"===O?x:null,D="codex"===O?H:"claude-code"===O?"claude code":"all"===O?"all agents":M[O].toLowerCase(),(0,t.jsx)(t.Fragment,{children:(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-4 mb-4",children:[(0,t.jsxs)("div",{className:"rounded-lg border border-zinc-800 bg-zinc-900 p-5",children:[(0,t.jsxs)("p",{className:"text-xs text-zinc-500 uppercase tracking-wider mb-2",children:["5h window · ",D]}),F?.window_5h_used_pct!=null?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("p",{className:"text-3xl font-bold text-zinc-100",children:[(100-F.window_5h_used_pct).toFixed(0),"%"]}),(0,t.jsxs)("p",{className:"text-xs text-zinc-500 mt-1",children:["remaining · ",F.window_5h_used_pct.toFixed(0),"% used"]}),F.reset_at_5h&&(0,t.jsx)("p",{className:"text-xs text-zinc-600 mt-1",children:S(F.reset_at_5h)})]}):(0,t.jsx)("p",{className:"text-zinc-600 text-sm mt-1",children:"codex"===O&&b?"no usage snapshot for this account yet":"no data yet"})]}),(0,t.jsxs)("div",{className:"rounded-lg border border-zinc-800 bg-zinc-900 p-5",children:[(0,t.jsxs)("p",{className:"text-xs text-zinc-500 uppercase tracking-wider mb-2",children:["7-day budget · ",D]}),F?.window_weekly_used_pct!=null?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("p",{className:"text-3xl font-bold text-zinc-100",children:[(100-F.window_weekly_used_pct).toFixed(0),"%"]}),(0,t.jsxs)("p",{className:"text-xs text-zinc-500 mt-1",children:["remaining · ",F.window_weekly_used_pct.toFixed(0),"% used"]}),F.reset_at_weekly&&(0,t.jsx)("p",{className:"text-xs text-zinc-600 mt-1",children:S(F.reset_at_weekly)})]}):(0,t.jsx)("p",{className:"text-zinc-600 text-sm mt-1",children:"codex"===O&&b?"click Refresh data after using this account":"no data yet"})]})]})})),(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-4 mb-4",children:[(0,t.jsx)(g,{data:V,toolFilter:O}),(0,t.jsx)(w,{data:C})]}),(0,t.jsx)("div",{className:"mb-4",children:(0,t.jsx)(N,{sessions:q,streak:r,timeline:y})}),(0,t.jsx)("div",{className:"mb-4",children:(0,t.jsx)(m,{data:"codex"===O?i:"claude-code"===O?a:l,label:"codex"===O?H:"claude-code"===O?"claude code":"all agents"})}),(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-4 mb-4",children:[(0,t.jsx)(d,{data:Q}),(0,t.jsx)(z,{sessions:q})]}),(0,t.jsx)("div",{className:"mb-4",children:(0,t.jsx)(c,{sessions:q.slice(0,40)})}),o.length>0&&(0,t.jsx)(p,{data:o})]})}],58116)}]);
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,95057,(e,t,s)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0});var n={formatUrl:function(){return i},formatWithValidation:function(){return o},urlObjectKeys:function(){return c}};for(var r in n)Object.defineProperty(s,r,{enumerable:!0,get:n[r]});let l=e.r(90809)._(e.r(98183)),a=/https?|ftp|gopher|file/;function i(e){let{auth:t,hostname:s}=e,n=e.protocol||"",r=e.pathname||"",i=e.hash||"",c=e.query||"",o=!1;t=t?encodeURIComponent(t).replace(/%3A/i,":")+"@":"",e.host?o=t+e.host:s&&(o=t+(~s.indexOf(":")?`[${s}]`:s),e.port&&(o+=":"+e.port)),c&&"object"==typeof c&&(c=String(l.urlQueryToSearchParams(c)));let d=e.search||c&&`?${c}`||"";return n&&!n.endsWith(":")&&(n+=":"),e.slashes||(!n||a.test(n))&&!1!==o?(o="//"+(o||""),r&&"/"!==r[0]&&(r="/"+r)):o||(o=""),i&&"#"!==i[0]&&(i="#"+i),d&&"?"!==d[0]&&(d="?"+d),r=r.replace(/[?#]/g,encodeURIComponent),d=d.replace("#","%23"),`${n}${o}${r}${d}${i}`}let c=["auth","hash","host","hostname","href","path","pathname","port","protocol","query","search","slashes"];function o(e){return i(e)}},18581,(e,t,s)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),Object.defineProperty(s,"useMergedRef",{enumerable:!0,get:function(){return r}});let n=e.r(71645);function r(e,t){let s=(0,n.useRef)(null),r=(0,n.useRef)(null);return(0,n.useCallback)(n=>{if(null===n){let e=s.current;e&&(s.current=null,e());let t=r.current;t&&(r.current=null,t())}else e&&(s.current=l(e,n)),t&&(r.current=l(t,n))},[e,t])}function l(e,t){if("function"!=typeof e)return e.current=t,()=>{e.current=null};{let s=e(t);return"function"==typeof s?s:()=>e(null)}}("function"==typeof s.default||"object"==typeof s.default&&null!==s.default)&&void 0===s.default.__esModule&&(Object.defineProperty(s.default,"__esModule",{value:!0}),Object.assign(s.default,s),t.exports=s.default)},73668,(e,t,s)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),Object.defineProperty(s,"isLocalURL",{enumerable:!0,get:function(){return l}});let n=e.r(18967),r=e.r(52817);function l(e){if(!(0,n.isAbsoluteUrl)(e))return!0;try{let t=(0,n.getLocationOrigin)(),s=new URL(e,t);return s.origin===t&&(0,r.hasBasePath)(s.pathname)}catch(e){return!1}}},84508,(e,t,s)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),Object.defineProperty(s,"errorOnce",{enumerable:!0,get:function(){return n}});let n=e=>{}},22016,(e,t,s)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0});var n={default:function(){return f},useLinkStatus:function(){return j}};for(var r in n)Object.defineProperty(s,r,{enumerable:!0,get:n[r]});let l=e.r(90809),a=e.r(43476),i=l._(e.r(71645)),c=e.r(95057),o=e.r(8372),d=e.r(18581),x=e.r(18967),u=e.r(5550);e.r(33525);let m=e.r(88540),p=e.r(91949),h=e.r(73668),g=e.r(9396);function f(t){var s,n;let r,l,f,[j,N]=(0,i.useOptimistic)(p.IDLE_LINK_STATUS),v=(0,i.useRef)(null),{href:y,as:z,children:w,prefetch:k=null,passHref:M,replace:$,shallow:_,scroll:S,onClick:C,onMouseEnter:T,onTouchStart:F,legacyBehavior:D=!1,onNavigate:L,transitionTypes:R,ref:P,unstable_dynamicOnHover:O,...A}=t;r=w,D&&("string"==typeof r||"number"==typeof r)&&(r=(0,a.jsx)("a",{children:r}));let E=i.default.useContext(o.AppRouterContext),U=!1!==k,X=!1!==k?null===(n=k)||"auto"===n?g.FetchStrategy.PPR:g.FetchStrategy.Full:g.FetchStrategy.PPR,I="string"==typeof(s=z||y)?s:(0,c.formatUrl)(s);if(D){if(r?.$$typeof===Symbol.for("react.lazy"))throw Object.defineProperty(Error("`<Link legacyBehavior>` received a direct child that is either a Server Component, or JSX that was loaded with React.lazy(). This is not supported. Either remove legacyBehavior, or make the direct child a Client Component that renders the Link's `<a>` tag."),"__NEXT_ERROR_CODE",{value:"E863",enumerable:!1,configurable:!0});l=i.default.Children.only(r)}let W=D?l&&"object"==typeof l&&l.ref:P,B=i.default.useCallback(e=>(null!==E&&(v.current=(0,p.mountLinkInstance)(e,I,E,X,U,N)),()=>{v.current&&((0,p.unmountLinkForCurrentNavigation)(v.current),v.current=null),(0,p.unmountPrefetchableInstance)(e)}),[U,I,E,X,N]),K={ref:(0,d.useMergedRef)(B,W),onClick(t){D||"function"!=typeof C||C(t),D&&l.props&&"function"==typeof l.props.onClick&&l.props.onClick(t),!E||t.defaultPrevented||function(t,s,n,r,l,a,c){if("u">typeof window){let o,{nodeName:d}=t.currentTarget;if("A"===d.toUpperCase()&&((o=t.currentTarget.getAttribute("target"))&&"_self"!==o||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey||t.nativeEvent&&2===t.nativeEvent.which)||t.currentTarget.hasAttribute("download"))return;if(!(0,h.isLocalURL)(s)){r&&(t.preventDefault(),location.replace(s));return}if(t.preventDefault(),a){let e=!1;if(a({preventDefault:()=>{e=!0}}),e)return}let{dispatchNavigateAction:x}=e.r(99781);i.default.startTransition(()=>{x(s,r?"replace":"push",!1===l?m.ScrollBehavior.NoScroll:m.ScrollBehavior.Default,n.current,c)})}}(t,I,v,$,S,L,R)},onMouseEnter(e){D||"function"!=typeof T||T(e),D&&l.props&&"function"==typeof l.props.onMouseEnter&&l.props.onMouseEnter(e),E&&U&&(0,p.onNavigationIntent)(e.currentTarget,!0===O)},onTouchStart:function(e){D||"function"!=typeof F||F(e),D&&l.props&&"function"==typeof l.props.onTouchStart&&l.props.onTouchStart(e),E&&U&&(0,p.onNavigationIntent)(e.currentTarget,!0===O)}};return(0,x.isAbsoluteUrl)(I)?K.href=I:D&&!M&&("a"!==l.type||"href"in l.props)||(K.href=(0,u.addBasePath)(I)),f=D?i.default.cloneElement(l,K):(0,a.jsx)("a",{...A,...K,children:r}),(0,a.jsx)(b.Provider,{value:j,children:f})}e.r(84508);let b=(0,i.createContext)(p.IDLE_LINK_STATUS),j=()=>(0,i.useContext)(b);("function"==typeof s.default||"object"==typeof s.default&&null!==s.default)&&void 0===s.default.__esModule&&(Object.defineProperty(s.default,"__esModule",{value:!0}),Object.assign(s.default,s),t.exports=s.default)},18566,(e,t,s)=>{t.exports=e.r(76562)},58116,e=>{"use strict";var t=e.i(43476),s=e.i(71645),n=e.i(18566);let r=["blocked","poc","spike","review","done"];function l(e){return e?e.split("/").filter(Boolean).pop()??e:"—"}function a({tool:e}){return"codex"===e?(0,t.jsx)("span",{className:"text-xs px-1.5 py-0.5 rounded bg-emerald-900/40 text-emerald-400 border border-emerald-800/50",children:"codex"}):"cursor"===e?(0,t.jsx)("span",{className:"text-xs px-1.5 py-0.5 rounded bg-sky-900/40 text-sky-400 border border-sky-800/50",children:"cursor"}):(0,t.jsx)("span",{className:"text-xs px-1.5 py-0.5 rounded bg-violet-900/40 text-violet-400 border border-violet-800/50",children:"claude"})}function i({label:e,onRemove:s}){let n={blocked:"bg-red-900/40 text-red-400 border-red-800/50",poc:"bg-yellow-900/40 text-yellow-400 border-yellow-800/50",spike:"bg-orange-900/40 text-orange-400 border-orange-800/50",review:"bg-blue-900/40 text-blue-400 border-blue-800/50",done:"bg-zinc-700/40 text-zinc-400 border-zinc-600/50"}[e]??"bg-zinc-800/40 text-zinc-400 border-zinc-700/50";return(0,t.jsxs)("span",{className:`inline-flex items-center gap-1 text-xs px-1.5 py-0.5 rounded border ${n}`,children:[e,s&&(0,t.jsx)("button",{onClick:s,className:"hover:text-white leading-none",children:"×"})]})}function c({sessions:e}){let[n,o]=(0,s.useState)(""),[d,x]=(0,s.useState)({}),[u,m]=(0,s.useState)({}),[p,h]=(0,s.useState)(null),g=(0,s.useMemo)(()=>{let t=n.toLowerCase();return t?e.filter(e=>l(e.cwd).toLowerCase().includes(t)||(e.ai_title??"").toLowerCase().includes(t)||(e.summary??"").toLowerCase().includes(t)):e},[e,n]);async function f(e,t){x(s=>({...s,[e]:t})),await fetch(`/api/sessions/${e}/tags`,{method:"PATCH",headers:{"content-type":"application/json"},body:JSON.stringify({tags:t})})}function b(e){return d[e.id]??function(e){try{return e?JSON.parse(e):[]}catch{return[]}}(e.tags)}function j(e,t){let s=t.trim().toLowerCase().replace(/\s+/g,"-");if(!s)return;let n=b(e);n.includes(s)||(f(e.id,[...n,s]),m(t=>({...t,[e.id]:""})))}return(0,t.jsxs)("div",{className:"rounded-lg border border-zinc-800 bg-zinc-900",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between px-5 py-3 border-b border-zinc-800 gap-4",children:[(0,t.jsx)("h2",{className:"text-sm font-medium text-zinc-300 shrink-0",children:"Recent Sessions"}),(0,t.jsx)("input",{type:"text",placeholder:"search project / title…",value:n,onChange:e=>o(e.target.value),className:"flex-1 max-w-xs bg-zinc-800 border border-zinc-700 rounded px-3 py-1 text-xs text-zinc-200 placeholder-zinc-600 focus:outline-none focus:border-zinc-500"}),(0,t.jsxs)("span",{className:"text-xs text-zinc-500 shrink-0",children:[e.filter(e=>!e.ended_at).length," active · ",g.length,"/",e.length]})]}),0===g.length?(0,t.jsx)("p",{className:"px-5 py-8 text-zinc-600 text-sm text-center",children:"No sessions match."}):(0,t.jsxs)("table",{className:"w-full text-sm",children:[(0,t.jsx)("thead",{children:(0,t.jsxs)("tr",{className:"text-xs text-zinc-500 border-b border-zinc-800",children:[(0,t.jsx)("th",{className:"px-4 py-2 text-left font-normal",children:"started"}),(0,t.jsx)("th",{className:"px-4 py-2 text-left font-normal",children:"tool"}),(0,t.jsx)("th",{className:"px-4 py-2 text-left font-normal",children:"project · title"}),(0,t.jsx)("th",{className:"px-4 py-2 text-left font-normal",children:"dur"}),(0,t.jsx)("th",{className:"px-4 py-2 text-left font-normal",children:"status"}),(0,t.jsx)("th",{className:"px-4 py-2 text-left font-normal",children:"tags"})]})}),(0,t.jsx)("tbody",{children:g.map(e=>{let n=!e.ended_at,c=b(e),o=p===e.id;return(0,t.jsx)(s.default.Fragment,{children:(0,t.jsxs)("tr",{className:"border-b border-zinc-800/40 hover:bg-zinc-800/20 transition-colors",children:[(0,t.jsx)("td",{className:"px-4 py-2 text-zinc-500 tabular-nums whitespace-nowrap text-xs",children:new Date(e.started_at).toLocaleString("zh-CN",{month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",hour12:!1})}),(0,t.jsx)("td",{className:"px-4 py-2",children:(0,t.jsx)(a,{tool:e.tool})}),(0,t.jsxs)("td",{className:"px-4 py-2 max-w-xs",children:[(0,t.jsx)("div",{className:"text-zinc-200 text-xs font-medium",children:l(e.cwd)}),e.ai_title&&(0,t.jsx)("div",{className:"text-zinc-500 text-xs truncate",children:e.ai_title}),!e.ai_title&&e.summary&&(0,t.jsx)("div",{className:"text-zinc-600 text-xs truncate",children:e.summary})]}),(0,t.jsx)("td",{className:"px-4 py-2 text-zinc-500 tabular-nums text-xs",children:function(e,t){if(!t)return"active";let s=Math.round((t-e)/6e4);return s<60?`${s}m`:`${Math.floor(s/60)}h ${s%60}m`}(e.started_at,e.ended_at??null)}),(0,t.jsx)("td",{className:"px-4 py-2",children:n?(0,t.jsxs)("span",{className:"inline-flex items-center gap-1 text-emerald-400 text-xs",children:[(0,t.jsx)("span",{className:"w-1.5 h-1.5 rounded-full bg-emerald-400 animate-pulse inline-block"}),"active"]}):(0,t.jsx)("span",{className:"text-zinc-700 text-xs",children:"done"})}),(0,t.jsx)("td",{className:"px-4 py-2",children:(0,t.jsxs)("div",{className:"flex flex-wrap gap-1 items-center",children:[c.map(s=>(0,t.jsx)(i,{label:s,onRemove:()=>{f(e.id,b(e).filter(e=>e!==s))}},s)),o?(0,t.jsxs)("div",{className:"flex items-center gap-1",children:[(0,t.jsx)("input",{autoFocus:!0,value:u[e.id]??"",onChange:t=>m(s=>({...s,[e.id]:t.target.value})),onKeyDown:t=>{"Enter"===t.key&&j(e,u[e.id]??""),"Escape"===t.key&&h(null)},placeholder:"tag…",className:"w-16 bg-zinc-800 border border-zinc-600 rounded px-1 py-0.5 text-xs text-zinc-200 focus:outline-none"}),(0,t.jsx)("div",{className:"flex gap-1",children:r.filter(e=>!c.includes(e)).slice(0,3).map(s=>(0,t.jsx)("button",{onClick:()=>j(e,s),className:"text-xs text-zinc-500 hover:text-zinc-300 px-1 py-0.5 rounded border border-zinc-700",children:s},s))}),(0,t.jsx)("button",{onClick:()=>h(null),className:"text-zinc-600 hover:text-zinc-400 text-xs",children:"✕"})]}):(0,t.jsx)("button",{onClick:()=>h(e.id),className:"text-zinc-700 hover:text-zinc-400 text-xs leading-none",children:"+"})]})})]})},e.id)})})]})]})}let o={"claude-code":"bg-violet-500",codex:"bg-emerald-500",cursor:"bg-sky-500",other:"bg-zinc-500"};function d({data:e}){let s=e.reduce((e,t)=>e+t.sessions,0);return(0,t.jsxs)("div",{className:"rounded-lg border border-zinc-800 bg-zinc-900 p-5",children:[(0,t.jsx)("p",{className:"text-xs text-zinc-500 uppercase tracking-wider mb-3",children:"tool split"}),0===e.length?(0,t.jsx)("p",{className:"text-zinc-600 text-sm",children:"no data"}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{className:"flex h-2 rounded overflow-hidden gap-0.5 mb-3",children:e.map(e=>(0,t.jsx)("div",{className:`${o[e.tool]??"bg-zinc-500"} rounded-sm`,style:{width:`${e.pct}%`}},e.tool))}),(0,t.jsx)("div",{className:"space-y-1.5",children:e.map(e=>{let s;return(0,t.jsxs)("div",{className:"flex items-center justify-between text-xs",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("span",{className:`w-2 h-2 rounded-sm inline-block ${o[e.tool]??"bg-zinc-500"}`}),(0,t.jsx)("span",{className:"text-zinc-300",children:"claude-code"===e.tool?"claude code":e.tool})]}),(0,t.jsxs)("span",{className:"text-zinc-500 tabular-nums",children:[e.sessions," sessions · ",(s=e.totalMs/36e5)<1?`${Math.round(60*s)}m`:`${s.toFixed(1)}h`," · ",e.pct,"%"]})]},e.tool)})}),(0,t.jsxs)("p",{className:"text-xs text-zinc-600 mt-2",children:[s," total sessions"]})]})]})}function x(e){return e.map(e=>`${e.x.toFixed(1)},${e.y.toFixed(1)}`).join(" ")}function u(e){let t=new Date(e),s=new Date,n=t.toLocaleTimeString("zh-CN",{hour:"2-digit",minute:"2-digit",hour12:!1});return t.toDateString()===s.toDateString()?n:`${(t.getMonth()+1).toString().padStart(2,"0")}/${t.getDate().toString().padStart(2,"0")} ${n}`}function m({data:e,label:n="claude code"}){let r=(0,s.useRef)(null),[l,a]=(0,s.useState)(null),i=e.length>=2?e[0].ts:0,c=e.length>=2?e[e.length-1].ts:1,o=c-i||1,d=e=>32+(e-i)/o*520,p=e=>null==e?null:4+(1-e/100)*112,h=(0,s.useCallback)(t=>{if(!r.current||e.length<2)return;let s=r.current.getBoundingClientRect(),n=32+520*Math.max(0,Math.min(1,(t.clientX-s.left)/s.width)),l=e[0],i=1/0;for(let t of e){let e=Math.abs(d(t.ts)-n);e<i&&(i=e,l=t)}a({svgX:d(l.ts),screenX:t.clientX,screenY:s.top,point:l})},[e,i,o]);if(e.length<2)return(0,t.jsxs)("div",{className:"rounded-lg border border-zinc-800 bg-zinc-900 p-5",children:[(0,t.jsxs)("p",{className:"text-xs text-zinc-500 uppercase tracking-wider mb-2",children:["usage history (7d) · ",n]}),(0,t.jsx)("p",{className:"text-zinc-600 text-sm",children:"not enough data yet"})]});let g=e.filter(e=>null!=e.pct5h).map(e=>({x:d(e.ts),y:p(e.pct5h)})),f=e.filter(e=>null!=e.pctWeekly).map(e=>({x:d(e.ts),y:p(e.pctWeekly)})),b=e.filter(e=>null!=e.pct5h).at(-1)?.pct5h,j=e.filter(e=>null!=e.pctWeekly).at(-1)?.pctWeekly;return(0,t.jsxs)("div",{className:"rounded-lg border border-zinc-800 bg-zinc-900 p-5 relative",children:[(0,t.jsxs)("p",{className:"text-xs text-zinc-500 uppercase tracking-wider mb-3",children:["usage history (7d) · ",n]}),(0,t.jsxs)("svg",{ref:r,viewBox:"0 0 560 120",className:"w-full h-28 cursor-crosshair",preserveAspectRatio:"none",onMouseMove:h,onMouseLeave:()=>a(null),children:[[0,25,50,75,100].map(e=>{let s=p(e);return(0,t.jsxs)("g",{children:[(0,t.jsx)("line",{x1:32,y1:s,x2:552,y2:s,stroke:"#27272a",strokeWidth:"1"}),(0,t.jsxs)("text",{x:29,y:s+3.5,textAnchor:"end",fontSize:"8",fill:"#52525b",children:[e,"%"]})]},e)}),g.length>=2&&(0,t.jsx)("polyline",{points:x(g),fill:"none",stroke:"#8b5cf6",strokeWidth:"1.5",strokeLinejoin:"round"}),f.length>=2&&(0,t.jsx)("polyline",{points:x(f),fill:"none",stroke:"#10b981",strokeWidth:"1.5",strokeLinejoin:"round",strokeDasharray:"4 2"}),l&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("line",{x1:l.svgX,y1:4,x2:l.svgX,y2:116,stroke:"#52525b",strokeWidth:"1",strokeDasharray:"3 2"}),null!=l.point.pct5h&&(0,t.jsx)("circle",{cx:l.svgX,cy:p(l.point.pct5h),r:"2.5",fill:"#8b5cf6"}),null!=l.point.pctWeekly&&(0,t.jsx)("circle",{cx:l.svgX,cy:p(l.point.pctWeekly),r:"2.5",fill:"#10b981"})]})]}),l&&(0,t.jsxs)("div",{className:"pointer-events-none absolute z-10 bg-zinc-800 border border-zinc-700 rounded px-2 py-1.5 text-xs shadow-lg",style:{left:`${((l.svgX-32)/520*100).toFixed(1)}%`,transform:l.svgX>364?"translateX(-110%)":"translateX(4px)",top:"40px"},children:[(0,t.jsx)("p",{className:"text-zinc-400 mb-1",children:u(l.point.ts)}),null!=l.point.pct5h&&(0,t.jsxs)("p",{className:"text-violet-400",children:["5h: ",l.point.pct5h.toFixed(0),"% used"]}),null!=l.point.pctWeekly&&(0,t.jsxs)("p",{className:"text-emerald-400",children:["7day: ",l.point.pctWeekly.toFixed(0),"% used"]})]}),(0,t.jsxs)("div",{className:"flex items-center justify-between mt-1 text-xs text-zinc-600",children:[(0,t.jsx)("span",{children:u(i)}),(0,t.jsxs)("div",{className:"flex gap-4",children:[(0,t.jsxs)("span",{className:"text-violet-400",children:["— 5h ",null!=b?`(${b.toFixed(0)}% used)`:""]}),(0,t.jsxs)("span",{className:"text-emerald-400",children:["-- 7day ",null!=j?`(${j.toFixed(0)}% used)`:""]})]}),(0,t.jsx)("span",{children:u(c)})]})]})}function p({data:e}){if(0===e.length)return null;let s=e[0].changes;return(0,t.jsxs)("div",{className:"rounded-lg border border-zinc-800 bg-zinc-900 p-5",children:[(0,t.jsx)("p",{className:"text-xs text-zinc-500 uppercase tracking-wider mb-3",children:"file hotspots"}),(0,t.jsx)("div",{className:"space-y-2",children:e.map(e=>{let n,r;return(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"flex items-center justify-between text-xs mb-0.5",children:[(0,t.jsxs)("span",{className:"text-zinc-300 truncate max-w-xs",title:e.path,children:[(0,t.jsxs)("span",{className:"text-zinc-600",children:[(n=e.path.split("/")).length>1?n.slice(-2,-1)[0]:"","/"]}),(r=e.path).split("/").pop()??r]}),(0,t.jsxs)("span",{className:"text-zinc-500 tabular-nums ml-2 shrink-0",children:[e.changes,"× · ",e.sessions," sessions"]})]}),(0,t.jsx)("div",{className:"h-1 bg-zinc-800 rounded",children:(0,t.jsx)("div",{className:"h-1 bg-amber-500/60 rounded",style:{width:`${e.changes/s*100}%`}})})]},e.path)})})]})}function h(e){return e>=1e9?`${(e/1e9).toFixed(1)}B`:e>=1e6?`${(e/1e6).toFixed(0)}M`:e>=1e3?`${(e/1e3).toFixed(0)}K`:String(e)}function g({data:e,toolFilter:s}){let n="all"===s||"claude-code"===s,r="all"===s||"codex"===s,l=n?Math.max(...e.daily.map(e=>e.claudeUsd),.01):.01,a=r?Math.max(...e.daily.map(e=>e.codexTokens),1):1;return n||r?(0,t.jsxs)("div",{className:"rounded-lg border border-zinc-800 bg-zinc-900 p-5",children:[(0,t.jsx)("p",{className:"text-xs text-zinc-500 uppercase tracking-wider mb-3",children:"spending / consumption"}),(0,t.jsxs)("div",{className:"flex gap-6 mb-4",children:[n&&(0,t.jsxs)("div",{children:[(0,t.jsxs)("p",{className:"text-xl font-bold text-violet-400",children:["$",e.claudeTotalUsd.toFixed(2)]}),(0,t.jsx)("p",{className:"text-xs text-zinc-600 mt-0.5",children:"claude code total"})]}),r&&(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{className:"text-xl font-bold text-emerald-400",children:h(e.codexTotalTokens)}),(0,t.jsx)("p",{className:"text-xs text-zinc-600 mt-0.5",children:"codex tokens"})]})]}),(0,t.jsx)("p",{className:"text-xs text-zinc-600 mb-2",children:"last 14 days"}),(0,t.jsx)("div",{className:"flex items-end gap-px h-16",children:e.daily.map(e=>{let s=n?e.claudeUsd/l*100:0,i=r?e.codexTokens/a*100:0,c=[e.date.slice(5),n?`Claude $${e.claudeUsd.toFixed(2)}`:"",r?`Codex ${h(e.codexTokens)} tokens`:""].filter(Boolean).join("\n");return(0,t.jsx)("div",{className:"flex-1 flex flex-col items-center",title:c,children:(0,t.jsxs)("div",{className:"w-full flex flex-col justify-end gap-px",style:{height:"56px"},children:[r&&e.codexTokens>0&&(0,t.jsx)("div",{className:"w-full bg-emerald-600/60 rounded-sm",style:{height:`${Math.max(.56*i,1)}px`}}),n&&e.claudeUsd>0&&(0,t.jsx)("div",{className:"w-full bg-violet-500/70 rounded-sm",style:{height:`${Math.max(.56*s,1)}px`}})]})},e.date)})}),(0,t.jsxs)("div",{className:"flex justify-between mt-1",children:[(0,t.jsx)("span",{className:"text-zinc-700 text-xs",children:e.daily[0]?.date.slice(5)}),(0,t.jsx)("span",{className:"text-zinc-700 text-xs",children:e.daily[e.daily.length-1]?.date.slice(5)})]}),(0,t.jsxs)("div",{className:"flex gap-4 mt-2",children:[n&&(0,t.jsxs)("span",{className:"flex items-center gap-1 text-xs text-zinc-600",children:[(0,t.jsx)("span",{className:"w-2 h-2 rounded-sm bg-violet-500/70 inline-block"})," claude ($)"]}),r&&(0,t.jsxs)("span",{className:"flex items-center gap-1 text-xs text-zinc-600",children:[(0,t.jsx)("span",{className:"w-2 h-2 rounded-sm bg-emerald-600/60 inline-block"})," codex (tokens)"]})]})]}):(0,t.jsxs)("div",{className:"rounded-lg border border-zinc-800 bg-zinc-900 p-5",children:[(0,t.jsx)("p",{className:"text-xs text-zinc-500 uppercase tracking-wider mb-3",children:"spending / consumption"}),(0,t.jsx)("p",{className:"text-zinc-600 text-sm",children:"no spending data for cursor"})]})}let f=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"];function b(e){return e<60?`${Math.round(e)}m`:`${(e/60).toFixed(1)}h`}function j(e){let t=new Date(e);return`${t.getHours().toString().padStart(2,"0")}:${t.getMinutes().toString().padStart(2,"0")}`}let N={"claude-code":"bg-violet-500/80 border-violet-400 text-violet-50",codex:"bg-emerald-600/80 border-emerald-400 text-emerald-50",cursor:"bg-sky-600/80 border-sky-400 text-sky-50"};function v({sessions:e,streak:n,timeline:r}){var l;let[a,i]=(0,s.useState)("pattern"),[c,o]=(0,s.useState)(null),d=(0,s.useMemo)(()=>(function(e){let t=new Map;for(let s of e){let e=s.started_at,n=s.ended_at??Math.min(Date.now(),s.started_at+36e5),r=e,l=null;for(;r<n;){let e=new Date(r),s=(e.getDay()+6)%7,a=e.getHours(),i=`${s}-${a}`,c=new Date(e);c.setMinutes(0,0,0),c.setHours(e.getHours()+1);let o=(Math.min(c.getTime(),n)-r)/6e4,d=t.get(i)??{minutes:0,sessions:0};d.minutes+=o,null===l&&(d.sessions+=1,l=i),t.set(i,d),r=c.getTime()}}let s=[];for(let e=0;e<7;e++)for(let n=0;n<24;n++){let r=t.get(`${e}-${n}`)??{minutes:0,sessions:0};s.push({dow:e,hour:n,...r})}return s})(e),[e]),x=Math.max(...d.map(e=>e.minutes),1),u=d.reduce((e,t)=>e+t.minutes,0)/60,m=d.reduce((e,t)=>t.minutes>e.minutes?t:e,d[0]),p=new Date(r.dateLabel+"T00:00:00").getTime(),h=p+864e5,g=r.sessions.map(e=>({...e,_start:Math.max(e.startMs,p),_end:Math.min(e.endMs,h)})).filter(e=>e._end>e._start).sort((e,t)=>e._start-t._start),y=[];for(let e of g){let t=!1;for(let s of y)if(s[s.length-1]._end<=e._start){s.push(e),t=!0;break}t||y.push([e])}let z=Math.max(y.length,1),w=g.reduce((e,t)=>e+(t._end-t._start),0)/36e5;return(0,t.jsxs)("div",{className:"rounded-lg border border-zinc-800 bg-zinc-900 p-5 relative",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between mb-4 gap-4 flex-wrap",children:[(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[(0,t.jsx)("p",{className:"text-xs text-zinc-500 uppercase tracking-wider",children:"activity"}),(0,t.jsxs)("div",{className:"flex gap-1",children:[(0,t.jsx)("button",{onClick:()=>i("pattern"),className:`text-xs px-2.5 py-1 rounded border transition-colors ${"pattern"===a?"bg-zinc-700 border-zinc-500 text-zinc-100":"border-zinc-800 text-zinc-500 hover:text-zinc-300 hover:border-zinc-600"}`,children:"pattern"}),(0,t.jsx)("button",{onClick:()=>i("today"),className:`text-xs px-2.5 py-1 rounded border transition-colors ${"today"===a?"bg-zinc-700 border-zinc-500 text-zinc-100":"border-zinc-800 text-zinc-500 hover:text-zinc-300 hover:border-zinc-600"}`,children:"today"})]})]}),(0,t.jsxs)("div",{className:"flex items-center gap-4 text-xs",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("span",{className:"text-base font-bold text-zinc-100 tabular-nums",children:n.current}),(0,t.jsx)("span",{className:"text-zinc-500 ml-1",children:"day streak"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("span",{className:"text-base font-bold text-zinc-300 tabular-nums",children:n.longest}),(0,t.jsx)("span",{className:"text-zinc-500 ml-1",children:"longest"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("span",{className:"text-base font-bold text-zinc-300 tabular-nums",children:n.totalDays}),(0,t.jsx)("span",{className:"text-zinc-500 ml-1",children:"active days"})]}),(0,t.jsxs)("div",{className:"border-l border-zinc-800 pl-4",children:[(0,t.jsxs)("span",{className:"text-base font-bold text-violet-400 tabular-nums",children:[u.toFixed(0),"h"]}),(0,t.jsx)("span",{className:"text-zinc-500 ml-1",children:"total"})]})]})]}),"pattern"===a?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("p",{className:"text-xs text-zinc-600 mb-2",children:["peak slot: ",f[m.dow]," ",m.hour.toString().padStart(2,"0"),":00 (",b(m.minutes),")"]}),(0,t.jsxs)("div",{className:"flex gap-1 text-xs",children:[(0,t.jsx)("div",{className:"w-8 shrink-0"}),(0,t.jsx)("div",{className:"flex-1 grid gap-px",style:{gridTemplateColumns:"repeat(24, minmax(0, 1fr))"},children:Array.from({length:24}).map((e,s)=>(0,t.jsx)("div",{className:`text-center text-[9px] text-zinc-600 ${s%3==0?"":"opacity-40"}`,children:s%3==0?s.toString().padStart(2,"0"):""},s))})]}),f.map((e,s)=>(0,t.jsxs)("div",{className:"flex gap-1 mt-px",children:[(0,t.jsx)("div",{className:"w-8 shrink-0 text-[10px] text-zinc-600 leading-4",children:e}),(0,t.jsx)("div",{className:"flex-1 grid gap-px",style:{gridTemplateColumns:"repeat(24, minmax(0, 1fr))"},children:Array.from({length:24}).map((n,r)=>{let l=d[24*s+r];return(0,t.jsx)("div",{className:`h-4 rounded-sm ${function(e,t){if(0===e)return"bg-zinc-900";let s=t>0?e/t:0;return s<.15?"bg-violet-900/40":s<.3?"bg-violet-800/60":s<.5?"bg-violet-700":s<.75?"bg-violet-600":"bg-violet-400"}(l.minutes,x)}`,title:`${e} ${r.toString().padStart(2,"0")}:00
|
|
2
|
+
${b(l.minutes)} \xb7 ${l.sessions} sessions`},r)})})]},e)),(0,t.jsxs)("div",{className:"flex items-center gap-2 mt-3 text-[10px] text-zinc-600",children:[(0,t.jsx)("span",{children:"less"}),(0,t.jsx)("span",{className:"w-3 h-3 rounded-sm bg-zinc-900 border border-zinc-800"}),(0,t.jsx)("span",{className:"w-3 h-3 rounded-sm bg-violet-900/40"}),(0,t.jsx)("span",{className:"w-3 h-3 rounded-sm bg-violet-800/60"}),(0,t.jsx)("span",{className:"w-3 h-3 rounded-sm bg-violet-700"}),(0,t.jsx)("span",{className:"w-3 h-3 rounded-sm bg-violet-600"}),(0,t.jsx)("span",{className:"w-3 h-3 rounded-sm bg-violet-400"}),(0,t.jsx)("span",{children:"more"})]})]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("p",{className:"text-xs text-zinc-600 mb-2",children:[r.dateLabel," · ",g.length," sessions · ",w.toFixed(1),"h active"]}),0===g.length?(0,t.jsx)("p",{className:"text-zinc-600 text-sm py-4",children:"no sessions today"}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{className:"relative h-4 mb-1",children:Array.from({length:25}).map((e,s)=>(0,t.jsx)("div",{className:"absolute top-0 text-[10px] text-zinc-600 tabular-nums",style:{left:`${s/24*100}%`,transform:"translateX(-50%)"},children:s%3==0?s.toString().padStart(2,"0"):""},s))}),(0,t.jsxs)("div",{className:"relative bg-zinc-950/50 rounded overflow-hidden",style:{height:`${32*z+4}px`},children:[Array.from({length:25}).map((e,s)=>(0,t.jsx)("div",{className:"absolute top-0 bottom-0 border-l border-zinc-800/40",style:{left:`${s/24*100}%`}},s)),y.flatMap((e,s)=>e.map(e=>{let n=(e._start-p)/864e5*100,r=(e._end-e._start)/864e5*100;return(0,t.jsx)("div",{className:`absolute rounded border text-[11px] font-medium leading-none cursor-pointer hover:brightness-125 transition-all overflow-hidden ${N[e.tool]??"bg-zinc-600 border-zinc-500 text-zinc-100"}`,style:{left:`${n}%`,width:`${Math.max(r,.4)}%`,top:`${4+32*s}px`,height:"28px"},onMouseEnter:t=>o({s:e,x:t.clientX,y:t.clientY}),onMouseMove:t=>o({s:e,x:t.clientX,y:t.clientY}),onMouseLeave:()=>o(null),children:r>4&&(0,t.jsxs)("div",{className:"px-1.5 py-1 truncate",children:[(0,t.jsx)("span",{className:"opacity-80",children:j(e._start)})," · ",e.project]})},e.id)}))]}),(0,t.jsxs)("div",{className:"flex gap-4 mt-3 text-[11px] text-zinc-600",children:[(0,t.jsxs)("span",{className:"flex items-center gap-1",children:[(0,t.jsx)("span",{className:"w-2.5 h-2.5 rounded-sm bg-violet-500/80 inline-block"})," claude code"]}),(0,t.jsxs)("span",{className:"flex items-center gap-1",children:[(0,t.jsx)("span",{className:"w-2.5 h-2.5 rounded-sm bg-emerald-600/80 inline-block"})," codex"]}),(0,t.jsxs)("span",{className:"flex items-center gap-1",children:[(0,t.jsx)("span",{className:"w-2.5 h-2.5 rounded-sm bg-sky-600/80 inline-block"})," cursor"]})]}),c&&(0,t.jsxs)("div",{className:"fixed z-20 bg-zinc-800 border border-zinc-700 rounded px-3 py-2 text-xs shadow-xl pointer-events-none max-w-xs",style:{left:c.x+12,top:c.y+12},children:[(0,t.jsxs)("p",{className:"text-zinc-100 font-medium mb-0.5",children:[c.s.project," ",(0,t.jsxs)("span",{className:"text-zinc-500 font-normal",children:["· ",c.s.tool]})]}),c.s.aiTitle&&(0,t.jsx)("p",{className:"text-zinc-400 mb-1 line-clamp-2",children:c.s.aiTitle}),(0,t.jsxs)("p",{className:"text-zinc-500 tabular-nums",children:[j(c.s.startMs)," → ",j(c.s.endMs)," · ",(l=c.s.startMs,Math.max(1,Math.round((c.s.endMs-l)/6e4))),"m"]})]})]})]})]})}let y={"claude-code":"bg-violet-500",codex:"bg-emerald-500",cursor:"bg-sky-500"};function z({sessions:e,limit:n=10}){let r=(0,s.useMemo)(()=>{let t=new Map;for(let n of e){var s;let e=(s=n.cwd)?s.split("/").filter(Boolean).pop()??s:"—";if("—"===e)continue;let r=(n.ended_at??n.started_at)-n.started_at,l=t.get(e)??{project:e,cwd:n.cwd,sessions:0,totalMs:0,tools:{}};l.sessions+=1,l.totalMs+=r,l.tools[n.tool]=(l.tools[n.tool]??0)+1,t.set(e,l)}return[...t.values()].sort((e,t)=>t.totalMs-e.totalMs).slice(0,n)},[e,n]),l=Math.max(...r.map(e=>e.totalMs),1);return 0===r.length?(0,t.jsxs)("div",{className:"rounded-lg border border-zinc-800 bg-zinc-900 p-5",children:[(0,t.jsx)("p",{className:"text-xs text-zinc-500 uppercase tracking-wider mb-3",children:"project leaderboard"}),(0,t.jsx)("p",{className:"text-zinc-600 text-sm",children:"no projects yet"})]}):(0,t.jsxs)("div",{className:"rounded-lg border border-zinc-800 bg-zinc-900 p-5",children:[(0,t.jsx)("p",{className:"text-xs text-zinc-500 uppercase tracking-wider mb-3",children:"project leaderboard"}),(0,t.jsx)("div",{className:"space-y-1.5",children:r.map((e,s)=>{let n;return(0,t.jsxs)("div",{className:"group",children:[(0,t.jsxs)("div",{className:"flex items-center gap-3 text-xs",children:[(0,t.jsx)("span",{className:"w-5 text-right text-zinc-600 tabular-nums",children:s+1}),(0,t.jsx)("span",{className:"flex-1 text-zinc-200 truncate",title:e.cwd??e.project,children:e.project}),(0,t.jsx)("div",{className:"flex gap-0.5",children:Object.entries(e.tools).map(([e,s])=>(0,t.jsx)("span",{className:`w-1.5 h-1.5 rounded-full ${y[e]??"bg-zinc-500"}`,title:`${e}: ${s}`},e))}),(0,t.jsxs)("span",{className:"text-zinc-500 tabular-nums w-12 text-right",children:[e.sessions,"×"]}),(0,t.jsx)("span",{className:"text-zinc-400 tabular-nums w-14 text-right",children:(n=e.totalMs/36e5)<1?`${Math.round(60*n)}m`:`${n.toFixed(1)}h`})]}),(0,t.jsx)("div",{className:"flex gap-px h-1 mt-0.5 ml-8",children:(0,t.jsx)("div",{className:"bg-violet-500/30 rounded-sm",style:{width:`${e.totalMs/l*100}%`}})})]},e.project)})})]})}function w({data:e}){let[n,r]=(0,s.useState)(!1),l=e.filter(e=>e.unlocked),a=e.filter(e=>!e.unlocked).sort((e,t)=>{let s=e.progress?e.progress.current/e.progress.target:0;return(t.progress?t.progress.current/t.progress.target:0)-s}),i=n?[...l,...a]:[...l.slice(0,4),...a.slice(0,Math.max(0,6-Math.min(l.length,4)))];return(0,t.jsxs)("div",{className:"rounded-lg border border-zinc-800 bg-zinc-900 p-5",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between mb-3",children:[(0,t.jsx)("p",{className:"text-xs text-zinc-500 uppercase tracking-wider",children:"achievements"}),(0,t.jsxs)("p",{className:"text-xs text-zinc-600",children:[l.length," / ",e.length," unlocked"]})]}),(0,t.jsx)("div",{className:"grid grid-cols-2 gap-2",children:i.map(e=>{let s=e.progress?Math.min(100,e.progress.current/e.progress.target*100):100*!!e.unlocked;return(0,t.jsxs)("div",{className:`rounded border px-2.5 py-2 ${e.unlocked?"border-amber-700/50 bg-amber-950/30":"border-zinc-800 bg-zinc-950/30"}`,title:e.description,children:[(0,t.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,t.jsxs)("span",{className:`text-xs font-medium ${e.unlocked?"text-amber-300":"text-zinc-500"}`,children:[e.unlocked?"★":"☆"," ",e.title]}),(0,t.jsx)("span",{className:"text-[10px] text-zinc-600 tabular-nums shrink-0",children:function(e){if(!e.progress)return"";let{current:t,target:s}=e.progress;return s>=1e6?`${(t/1e6).toFixed(0)}M / ${(s/1e6).toFixed(0)}M`:s>=1e3?`${t.toLocaleString()} / ${s.toLocaleString()}`:s>=100&&Number.isFinite(t)&&t<100&&t%1!=0?`${t.toFixed(1)} / ${s}`:`${Math.floor(t)} / ${s}`}(e)})]}),(0,t.jsx)("div",{className:"h-0.5 bg-zinc-800 rounded mt-1.5 overflow-hidden",children:(0,t.jsx)("div",{className:`h-full ${e.unlocked?"bg-amber-500":"bg-zinc-600"}`,style:{width:`${s}%`}})}),(0,t.jsx)("p",{className:"text-[10px] text-zinc-600 mt-1 truncate",children:e.description})]},e.id)})}),e.length>6&&(0,t.jsx)("button",{onClick:()=>r(!n),className:"w-full mt-3 text-xs text-zinc-500 hover:text-zinc-300 border border-zinc-800 rounded py-1",children:n?"show less":`show all (${e.length})`})]})}let k=["all","claude-code","codex","cursor"],M={all:"All","claude-code":"Claude Code",codex:"Codex",cursor:"Cursor"},$=["today","7d","30d","all"],_={today:"Today","7d":"7 days","30d":"30 days",all:"All time"};function S(e){if(!e)return"";let t=e-Date.now();if(t<=0)return"resetting…";let s=new Date(e),n=s.toLocaleTimeString("zh-CN",{hour:"2-digit",minute:"2-digit",hour12:!1}),r=new Date().toDateString()===s.toDateString()?n:`${(s.getMonth()+1).toString().padStart(2,"0")}/${s.getDate().toString().padStart(2,"0")} ${n}`,l=Math.floor(t/36e5),a=Math.floor(t%36e5/6e4),i=l>0?`${l}h ${a}m`:`${a}m`;return`resets at ${r} (in ${i})`}e.s(["Dashboard",0,function({sessions:e,streak:r,allBurndown:l,claudeBurndown:a,codexBurndown:i,hotspots:o,allUsage:x,claudeUsage:u,codexUsage:h,codexAccounts:f,selectedCodexAccountId:b,initialToolFilter:j,spending:N,timeline:y,achievements:C}){var T;let F,D,L=(0,n.useRouter)(),R=(0,n.usePathname)(),P=(0,n.useSearchParams)(),O=P.get("agent"),A=k.includes(O)?O:j,[E,U]=(0,s.useState)("all"),[X,I]=(0,s.useState)("idle"),[W,B]=(0,s.useState)(null),K=(0,s.useMemo)(()=>f.find(e=>e.accountId===b)??null,[f,b]),H=K?`codex \xb7 ${K.label}`:"codex · all accounts",J=(0,s.useMemo)(()=>{let e;return e=new Date,"today"===E?(e.setHours(0,0,0,0),e.getTime()):"7d"===E?Date.now()-6048e5:"30d"===E?Date.now()-2592e6:0},[E]),Y=(0,s.useMemo)(()=>{let t=J>0?e.filter(e=>e.started_at>=J):e,s={all:t.length};for(let e of t)s[e.tool]=(s[e.tool]??0)+1;return s},[e,J]),q=(0,s.useMemo)(()=>{let t="all"===A?e:e.filter(e=>e.tool===A);return J>0&&(t=t.filter(e=>e.started_at>=J)),t},[e,A,J]),Q=(0,s.useMemo)(()=>{let e=new Map;for(let t of q){let s=(t.ended_at??t.started_at)-t.started_at,n=e.get(t.tool)??{sessions:0,totalMs:0};e.set(t.tool,{sessions:n.sessions+1,totalMs:n.totalMs+s})}let t=Math.max([...e.values()].reduce((e,t)=>e+t.totalMs,0),1);return[...e.entries()].map(([e,s])=>({tool:e,sessions:s.sessions,totalMs:s.totalMs,pct:Math.round(s.totalMs/t*100)})).sort((e,t)=>t.totalMs-e.totalMs)},[q]),V=(0,s.useMemo)(()=>{if(0===J)return N;let e=new Date(J).toISOString().slice(0,10);return{...N,daily:N.daily.filter(t=>t.date>=e)}},[N,J]);async function G(){I("refreshing"),B(null);try{let e=await fetch("/api/import-sessions",{method:"POST"}),t=await e.json();if(!e.ok)throw Error(t.error??"Refresh failed");I("done"),B(`scanned ${t.scanned??0} logs in ${Math.round((t.durationMs??0)/100)/10}s`),L.refresh()}catch(e){I("error"),B(e instanceof Error?e.message:"Refresh failed")}}function Z(e,t){let s=new URLSearchParams(P.toString());"all"===e?(s.delete("agent"),s.delete("codexAccount")):(s.set("agent",e),"codex"!==e&&s.delete("codexAccount")),"codex"===e&&t?s.set("codexAccount",t):s.delete("codexAccount");let n=s.toString();L.replace(n?`${R}?${n}`:R,{scroll:!1}),L.refresh()}return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:"flex flex-wrap items-center justify-between mb-4 gap-3",children:[(0,t.jsx)("div",{className:"flex flex-wrap gap-2",children:k.filter(e=>"all"===e||(Y[e]??0)>0).sort((e,t)=>"all"===e?-1:"all"===t?1:(Y[t]??0)-(Y[e]??0)).map(e=>(0,t.jsxs)("button",{onClick:()=>{Z(e,"codex"===e?b:null)},className:`text-xs px-3 py-1.5 rounded-full border transition-colors ${A===e?"bg-zinc-700 border-zinc-500 text-zinc-100":"border-zinc-700 text-zinc-500 hover:text-zinc-300 hover:border-zinc-600"}`,children:[M[e],(0,t.jsx)("span",{className:"ml-1.5 text-zinc-600 tabular-nums",children:Y[e]??0})]},e))}),(0,t.jsxs)("div",{className:"flex flex-wrap items-center justify-end gap-2",children:[(0,t.jsx)("div",{className:"flex gap-1",children:$.map(e=>(0,t.jsx)("button",{onClick:()=>U(e),className:`text-xs px-3 py-1.5 rounded-full border transition-colors ${E===e?"bg-zinc-700 border-zinc-500 text-zinc-100":"border-zinc-700 text-zinc-500 hover:text-zinc-300 hover:border-zinc-600"}`,children:_[e]},e))}),(0,t.jsx)("button",{type:"button",onClick:G,disabled:"refreshing"===X,className:"text-xs px-3 py-1.5 rounded-full border border-violet-500/40 bg-violet-500/10 text-violet-100 transition-colors hover:bg-violet-500/20 disabled:cursor-not-allowed disabled:opacity-50",children:"refreshing"===X?"Refreshing...":"Refresh data"})]})]}),W&&(0,t.jsx)("div",{className:`mb-4 rounded-lg border px-4 py-3 text-xs ${"error"===X?"border-red-900/60 bg-red-950/40 text-red-200":"border-emerald-900/60 bg-emerald-950/30 text-emerald-200"}`,children:W}),"codex"===A&&f.length>0&&(0,t.jsxs)("div",{className:"mb-3 flex flex-wrap items-center justify-between gap-2 rounded-lg border border-zinc-800 bg-zinc-900 px-4 py-3",children:[(0,t.jsxs)("div",{className:"min-w-0",children:[(0,t.jsx)("p",{className:"text-xs uppercase tracking-wider text-zinc-500",children:"Codex account"}),(0,t.jsx)("p",{className:"mt-1 truncate text-xs text-zinc-600",children:K?K.isCurrent?"current account only":"saved account only":"all saved and legacy Codex usage"})]}),(0,t.jsxs)("div",{className:"flex min-w-0 items-center gap-2",children:[(0,t.jsxs)("select",{value:b??"",onChange:e=>{Z("codex",e.target.value||null)},className:"max-w-72 rounded-md border border-zinc-700 bg-zinc-950 px-3 py-2 text-xs text-zinc-100 outline-none transition-colors hover:border-zinc-500 focus:border-violet-500",children:[(0,t.jsx)("option",{value:"",children:"All Codex accounts"}),f.map(e=>(0,t.jsxs)("option",{value:e.accountId,children:[e.label," · ",e.planType??"unknown",e.isCurrent?" · current":""]},e.accountId))]}),(0,t.jsx)("span",{className:"hidden shrink-0 text-xs text-zinc-600 sm:inline",children:K?(T=K.accountId).length>12?`${T.slice(0,6)}...${T.slice(-4)}`:T:"all"})]})]}),(F="codex"===A?h:"claude-code"===A?u:"all"===A?x:null,D="codex"===A?H:"claude-code"===A?"claude code":"all"===A?"all agents":M[A].toLowerCase(),(0,t.jsx)(t.Fragment,{children:(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-4 mb-4",children:[(0,t.jsxs)("div",{className:"rounded-lg border border-zinc-800 bg-zinc-900 p-5",children:[(0,t.jsxs)("p",{className:"text-xs text-zinc-500 uppercase tracking-wider mb-2",children:["5h window · ",D]}),F?.window_5h_used_pct!=null?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("p",{className:"text-3xl font-bold text-zinc-100",children:[(100-F.window_5h_used_pct).toFixed(0),"%"]}),(0,t.jsxs)("p",{className:"text-xs text-zinc-500 mt-1",children:["remaining · ",F.window_5h_used_pct.toFixed(0),"% used"]}),F.reset_at_5h&&(0,t.jsx)("p",{className:"text-xs text-zinc-600 mt-1",children:S(F.reset_at_5h)})]}):(0,t.jsx)("p",{className:"text-zinc-600 text-sm mt-1",children:"codex"===A&&b?"no usage snapshot for this account yet":"no data yet"})]}),(0,t.jsxs)("div",{className:"rounded-lg border border-zinc-800 bg-zinc-900 p-5",children:[(0,t.jsxs)("p",{className:"text-xs text-zinc-500 uppercase tracking-wider mb-2",children:["7-day budget · ",D]}),F?.window_weekly_used_pct!=null?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("p",{className:"text-3xl font-bold text-zinc-100",children:[(100-F.window_weekly_used_pct).toFixed(0),"%"]}),(0,t.jsxs)("p",{className:"text-xs text-zinc-500 mt-1",children:["remaining · ",F.window_weekly_used_pct.toFixed(0),"% used"]}),F.reset_at_weekly&&(0,t.jsx)("p",{className:"text-xs text-zinc-600 mt-1",children:S(F.reset_at_weekly)})]}):(0,t.jsx)("p",{className:"text-zinc-600 text-sm mt-1",children:"codex"===A&&b?"click Refresh data after using this account":"no data yet"})]})]})})),(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-4 mb-4",children:[(0,t.jsx)(g,{data:V,toolFilter:A}),(0,t.jsx)(w,{data:C})]}),(0,t.jsx)("div",{className:"mb-4",children:(0,t.jsx)(v,{sessions:q,streak:r,timeline:y})}),(0,t.jsx)("div",{className:"mb-4",children:(0,t.jsx)(m,{data:"codex"===A?i:"claude-code"===A?a:l,label:"codex"===A?H:"claude-code"===A?"claude code":"all agents"})}),(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-4 mb-4",children:[(0,t.jsx)(d,{data:Q}),(0,t.jsx)(z,{sessions:q})]}),(0,t.jsx)("div",{className:"mb-4",children:(0,t.jsx)(c,{sessions:q.slice(0,40)})}),o.length>0&&(0,t.jsx)(p,{data:o})]})}],58116)}]);
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/* eslint-disable @typescript-eslint/no-require-imports */
|
|
2
|
+
const Module = require('node:module');
|
|
3
|
+
|
|
4
|
+
const load = Module._load;
|
|
5
|
+
|
|
6
|
+
Module._load = function vibemeterLoad(request, parent, isMain) {
|
|
7
|
+
if (/^better-sqlite3-[a-f0-9]+$/.test(request)) {
|
|
8
|
+
return load.call(this, 'better-sqlite3', parent, isMain);
|
|
9
|
+
}
|
|
10
|
+
return load.call(this, request, parent, isMain);
|
|
11
|
+
};
|
package/bin/vibemeter.mjs
CHANGED
|
@@ -17,6 +17,7 @@ import { createRequire } from 'node:module';
|
|
|
17
17
|
|
|
18
18
|
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
19
19
|
const ROOT = join(__dirname, '..');
|
|
20
|
+
const REQUIRE_HOOK = join(__dirname, 'require-hook.cjs');
|
|
20
21
|
const DEFAULT_PORT = 9527;
|
|
21
22
|
const PORT = process.env.PORT ?? String(DEFAULT_PORT);
|
|
22
23
|
const DATA_DIR = process.env.VIBEMETER_DATA_DIR ?? join(homedir(), '.vibemeter');
|
|
@@ -42,7 +43,14 @@ async function runNext(args) {
|
|
|
42
43
|
process.exit(1);
|
|
43
44
|
}
|
|
44
45
|
return new Promise((resolveP, reject) => {
|
|
45
|
-
const
|
|
46
|
+
const nodeOptions = process.env.NODE_OPTIONS
|
|
47
|
+
? `${process.env.NODE_OPTIONS} --require ${REQUIRE_HOOK}`
|
|
48
|
+
: `--require ${REQUIRE_HOOK}`;
|
|
49
|
+
const p = spawn(process.execPath, [nextBin, ...args], {
|
|
50
|
+
cwd: ROOT,
|
|
51
|
+
stdio: 'inherit',
|
|
52
|
+
env: { ...process.env, NODE_OPTIONS: nodeOptions },
|
|
53
|
+
});
|
|
46
54
|
p.on('exit', (code) => code === 0 ? resolveP() : reject(new Error(`next ${args[0]} exit ${code}`)));
|
|
47
55
|
for (const sig of ['SIGINT', 'SIGTERM']) process.on(sig, () => p.kill(sig));
|
|
48
56
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hirra/vibemeter",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.3",
|
|
4
4
|
"description": "Local-first dashboard for your AI coding life — Claude Code, Codex, Cursor session tracking with usage windows, spending, heatmaps, and achievements.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"claude-code",
|
|
File without changes
|
/package/.next/static/{pbaZ4xRfoDHL1KG3S0xG- → DcqlVrgh4gM8jlqrnOCpT}/_clientMiddlewareManifest.js
RENAMED
|
File without changes
|
|
File without changes
|