fleetlens 0.2.8 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/app/apps/web/.next/BUILD_ID +1 -1
- package/app/apps/web/.next/build-manifest.json +3 -3
- package/app/apps/web/.next/prerender-manifest.json +3 -3
- package/app/apps/web/.next/server/app/_global-error.html +1 -1
- package/app/apps/web/.next/server/app/_global-error.rsc +1 -1
- package/app/apps/web/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
- package/app/apps/web/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/app/apps/web/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
- package/app/apps/web/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
- package/app/apps/web/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/app/apps/web/.next/server/app/_not-found/page.js +1 -1
- package/app/apps/web/.next/server/app/_not-found/page.js.nft.json +1 -1
- package/app/apps/web/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/app/apps/web/.next/server/app/page.js +3 -3
- package/app/apps/web/.next/server/app/page.js.nft.json +1 -1
- package/app/apps/web/.next/server/app/page_client-reference-manifest.js +1 -1
- package/app/apps/web/.next/server/app/parallelism/page.js +1 -1
- package/app/apps/web/.next/server/app/parallelism/page.js.nft.json +1 -1
- package/app/apps/web/.next/server/app/parallelism/page_client-reference-manifest.js +1 -1
- package/app/apps/web/.next/server/app/projects/[slug]/page.js +3 -3
- package/app/apps/web/.next/server/app/projects/[slug]/page.js.nft.json +1 -1
- package/app/apps/web/.next/server/app/projects/[slug]/page_client-reference-manifest.js +1 -1
- package/app/apps/web/.next/server/app/projects/page.js +1 -1
- package/app/apps/web/.next/server/app/projects/page.js.nft.json +1 -1
- package/app/apps/web/.next/server/app/projects/page_client-reference-manifest.js +1 -1
- package/app/apps/web/.next/server/app/sessions/[id]/page.js +3 -2
- package/app/apps/web/.next/server/app/sessions/[id]/page.js.nft.json +1 -1
- package/app/apps/web/.next/server/app/sessions/[id]/page_client-reference-manifest.js +1 -1
- package/app/apps/web/.next/server/app/sessions/page.js +1 -1
- package/app/apps/web/.next/server/app/sessions/page.js.nft.json +1 -1
- package/app/apps/web/.next/server/app/sessions/page_client-reference-manifest.js +1 -1
- package/app/apps/web/.next/server/app/usage/page.js +1 -1
- package/app/apps/web/.next/server/app/usage/page.js.nft.json +1 -1
- package/app/apps/web/.next/server/app/usage/page_client-reference-manifest.js +1 -1
- package/app/apps/web/.next/server/chunks/[root-of-the-server]__0op9af~._.js +1 -1
- package/app/apps/web/.next/server/chunks/ssr/[root-of-the-server]__00z7zlm._.js +3 -0
- package/app/apps/web/.next/server/chunks/ssr/[root-of-the-server]__05lbtny._.js +12 -0
- package/app/apps/web/.next/server/chunks/ssr/[root-of-the-server]__0ms7h0~._.js +1 -1
- package/app/apps/web/.next/server/chunks/ssr/{[root-of-the-server]__08cr2u9._.js → [root-of-the-server]__0p~g4m6._.js} +2 -2
- package/app/apps/web/.next/server/chunks/ssr/[root-of-the-server]__0w52fbc._.js +1 -1
- package/app/apps/web/.next/server/chunks/ssr/[root-of-the-server]__0wvzyl7._.js +3 -0
- package/app/apps/web/.next/server/chunks/ssr/_09n75_5._.js +1 -1
- package/app/apps/web/.next/server/chunks/ssr/_0ph19-k._.js +12 -0
- package/app/apps/web/.next/server/chunks/ssr/_0u29mdd._.js +3 -0
- package/app/apps/web/.next/server/chunks/ssr/_0xies90._.js +1 -1
- package/app/apps/web/.next/server/chunks/ssr/apps_web_components_06j3c.0._.js +1 -1
- package/app/apps/web/.next/server/chunks/ssr/packages_parser_dist_0-jvt~a._.js +1 -1
- package/app/apps/web/.next/server/chunks/ssr/packages_parser_dist_analytics_0k4dgst.js +1 -1
- package/app/apps/web/.next/server/middleware-build-manifest.js +3 -3
- package/app/apps/web/.next/server/pages/500.html +1 -1
- package/app/apps/web/.next/server/server-reference-manifest.js +1 -1
- package/app/apps/web/.next/server/server-reference-manifest.json +1 -1
- package/app/apps/web/.next/static/chunks/03.mv4y4.w-vb.js +6 -0
- package/app/apps/web/.next/static/chunks/08983lz4~hffx.js +6 -0
- package/app/apps/web/.next/static/chunks/0fc6dk2qtokwh.js +1 -0
- package/app/apps/web/.next/static/chunks/0p1lpoh02zh8h.js +10 -0
- package/app/apps/web/.next/static/chunks/{03fw7f2obcvq~.js → 14q3xsfpkvuef.js} +2 -2
- package/app/apps/web/app/layout.tsx +2 -0
- package/app/apps/web/app/projects/[slug]/page.tsx +2 -0
- package/app/apps/web/app/sessions/[id]/page.tsx +27 -1
- package/app/apps/web/app/sessions/[id]/session-view.tsx +372 -793
- package/app/apps/web/app/sessions/[id]/team-tab/adapter.ts +633 -0
- package/app/apps/web/app/sessions/[id]/team-tab/format.ts +20 -0
- package/app/apps/web/app/sessions/[id]/team-tab/team-minimap.tsx +682 -0
- package/app/apps/web/app/sessions/[id]/team-tab/team-tab-client.tsx +78 -0
- package/app/apps/web/app/sessions/[id]/team-tab/team-table.tsx +796 -0
- package/app/apps/web/app/sessions/[id]/team-tab/turn-drawer.tsx +805 -0
- package/app/apps/web/app/sessions/[id]/tool-cards.tsx +461 -0
- package/app/apps/web/app/sessions/[id]/turn-steps.tsx +306 -0
- package/app/apps/web/app/sessions/sessions-grid.tsx +36 -5
- package/app/apps/web/components/live-sessions-widget.tsx +20 -6
- package/app/apps/web/components/team-badge.tsx +90 -0
- package/app/apps/web/package.json +1 -1
- package/app/apps/web/tsconfig.tsbuildinfo +1 -1
- package/dist/daemon-worker.js +74 -21
- package/dist/index.js +93 -23
- package/package.json +1 -1
- package/app/apps/web/.next/server/chunks/ssr/[root-of-the-server]__0b..h_8._.js +0 -3
- package/app/apps/web/.next/server/chunks/ssr/[root-of-the-server]__0cdd~8n._.js +0 -3
- package/app/apps/web/.next/server/chunks/ssr/[root-of-the-server]__0~a~v00._.js +0 -3
- package/app/apps/web/.next/server/chunks/ssr/_0zv~jv-._.js +0 -12
- package/app/apps/web/.next/server/chunks/ssr/_12dtryh._.js +0 -12
- package/app/apps/web/.next/static/chunks/07oyxajlp3dvb.js +0 -6
- package/app/apps/web/.next/static/chunks/0a24elrqoqqep.js +0 -10
- package/app/apps/web/.next/static/chunks/0i4zodv86~~~i.js +0 -1
- package/app/apps/web/.next/static/chunks/0rbm60-qyshdm.js +0 -6
- /package/app/apps/web/.next/static/{CH5VTNGEbso0WpO5B8BTA → 0fPDRTdMQ-Y62h6fHNJXL}/_buildManifest.js +0 -0
- /package/app/apps/web/.next/static/{CH5VTNGEbso0WpO5B8BTA → 0fPDRTdMQ-Y62h6fHNJXL}/_clientMiddlewareManifest.js +0 -0
- /package/app/apps/web/.next/static/{CH5VTNGEbso0WpO5B8BTA → 0fPDRTdMQ-Y62h6fHNJXL}/_ssgManifest.js +0 -0
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
module.exports=[64240,(a,b,c)=>{"use strict";function d(a){if("function"!=typeof WeakMap)return null;var b=new WeakMap,c=new WeakMap;return(d=function(a){return a?c:b})(a)}c._=function(a,b){if(!b&&a&&a.__esModule)return a;if(null===a||"object"!=typeof a&&"function"!=typeof a)return{default:a};var c=d(b);if(c&&c.has(a))return c.get(a);var e={__proto__:null},f=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var g in a)if("default"!==g&&Object.prototype.hasOwnProperty.call(a,g)){var h=f?Object.getOwnPropertyDescriptor(a,g):null;h&&(h.get||h.set)?Object.defineProperty(e,g,h):e[g]=a[g]}return e.default=a,c&&c.set(a,e),e}},790,(a,b,c)=>{let{createClientModuleProxy:d}=a.r(11857);a.n(d("[project]/node_modules/next/dist/client/app-dir/link.js <module evaluation>"))},84707,(a,b,c)=>{let{createClientModuleProxy:d}=a.r(11857);a.n(d("[project]/node_modules/next/dist/client/app-dir/link.js"))},97647,a=>{"use strict";a.i(790);var b=a.i(84707);a.n(b)},95936,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0});var d={default:function(){return i},useLinkStatus:function(){return h.useLinkStatus}};for(var e in d)Object.defineProperty(c,e,{enumerable:!0,get:d[e]});let f=a.r(64240),g=a.r(7997),h=f._(a.r(97647));function i(a){let b=a.legacyBehavior,c="string"==typeof a.children||"number"==typeof a.children||"string"==typeof a.children?.type,d=a.children?.type?.$$typeof===Symbol.for("react.client.reference");return!b||c||d||(a.children?.type?.$$typeof===Symbol.for("react.lazy")?console.error("Using a Lazy Component as a direct child of `<Link legacyBehavior>` from a Server Component is not supported. If you need legacyBehavior, wrap your Lazy Component in a Client Component that renders the Link's `<a>` tag."):console.error("Using a Server Component as a direct child of `<Link legacyBehavior>` is not supported. If you need legacyBehavior, wrap your Server Component in a Client Component that renders the Link's `<a>` tag.")),(0,g.jsx)(h.default,{...a})}("function"==typeof c.default||"object"==typeof c.default&&null!==c.default)&&void 0===c.default.__esModule&&(Object.defineProperty(c.default,"__esModule",{value:!0}),Object.assign(c.default,c),b.exports=c.default)},83885,a=>{"use strict";a.s(["Heatmap",()=>b]);let b=(0,a.i(11857).registerClientReference)(function(){throw Error("Attempted to call Heatmap() from the server but Heatmap is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/apps/web/components/heatmap.tsx <module evaluation>","Heatmap")},44467,a=>{"use strict";a.s(["Heatmap",()=>b]);let b=(0,a.i(11857).registerClientReference)(function(){throw Error("Attempted to call Heatmap() from the server but Heatmap is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/apps/web/components/heatmap.tsx","Heatmap")},54572,a=>{"use strict";a.i(83885);var b=a.i(44467);a.n(b)},70301,a=>{"use strict";a.s(["ActivityChart",()=>b]);let b=(0,a.i(11857).registerClientReference)(function(){throw Error("Attempted to call ActivityChart() from the server but ActivityChart is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/apps/web/components/activity-chart.tsx <module evaluation>","ActivityChart")},37964,a=>{"use strict";a.s(["ActivityChart",()=>b]);let b=(0,a.i(11857).registerClientReference)(function(){throw Error("Attempted to call ActivityChart() from the server but ActivityChart is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/apps/web/components/activity-chart.tsx","ActivityChart")},37707,a=>{"use strict";a.i(70301);var b=a.i(37964);a.n(b)},25581,a=>{"use strict";a.s(["MetricCard",()=>b]);let b=(0,a.i(11857).registerClientReference)(function(){throw Error("Attempted to call MetricCard() from the server but MetricCard is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/apps/web/components/metric-card.tsx <module evaluation>","MetricCard")},77267,a=>{"use strict";a.s(["MetricCard",()=>b]);let b=(0,a.i(11857).registerClientReference)(function(){throw Error("Attempted to call MetricCard() from the server but MetricCard is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/apps/web/components/metric-card.tsx","MetricCard")},94045,a=>{"use strict";a.i(25581);var b=a.i(77267);a.n(b)},4636,87067,a=>{"use strict";var b=a.i(7997),c=a.i(48024),d=a.i(54572),e=a.i(37707),f=a.i(94045);function g(a){return a<1e3?String(a):a<1e4?(a/1e3).toFixed(1)+"k":a<1e6?Math.round(a/1e3)+"k":a<1e7?(a/1e6).toFixed(2)+"M":(a/1e6).toFixed(1)+"M"}function h(a){if(void 0===a)return"—";if(a<1e3)return`${a}ms`;let b=Math.round(a/1e3);if(b<60)return`${b}s`;let c=Math.floor(b/60),d=b%60;if(c<60)return d?`${c}m ${d}s`:`${c}m`;let e=Math.floor(c/60),f=c%60;return f?`${e}h ${f}m`:`${e}h`}let i={input:1,output:5,cacheRead:.1,cacheWrite:1.25},j={input:3,output:15,cacheRead:.3,cacheWrite:3.75},k={input:5,output:25,cacheRead:.5,cacheWrite:6.25};function l(a){return a.reduce((a,b)=>{var c;let d;return a+(c=b.totalUsage,d=function(a){if(!a)return k;let b=a.toLowerCase();return b.includes("haiku")?i:b.includes("sonnet")?j:k}(b.model),c.input/1e6*d.input+c.output/1e6*d.output+c.cacheRead/1e6*d.cacheRead+c.cacheWrite/1e6*d.cacheWrite)},0)}function m(a){return a<.01?"<$0.01":a<1||a<100?`$${a.toFixed(2)}`:a<1e3?`$${a.toFixed(1)}`:`$${a.toLocaleString(void 0,{maximumFractionDigits:0})}`}a.s(["estimateCostMulti",0,l,"formatCost",0,m,"formatDuration",0,h,"formatRelative",0,function(a){let b=Date.parse(a);if(Number.isNaN(b))return a;let c=Math.round((Date.now()-b)/1e3);if(c<60)return`${c}s ago`;let d=Math.round(c/60);if(d<60)return`${d}m ago`;let e=Math.round(d/60);if(e<24)return`${e}h ago`;let f=Math.round(e/24);return`${f}d ago`},"formatTokens",0,g,"prettyProjectName",0,function(a,b=35){let c=a.split("/").filter(Boolean),d=c.lastIndexOf(".worktrees");if(d>0&&d<c.length-1){let a=c[d-1],e=c[d+1],f=`${a}/${e}`;return f.length<=b?f:"…"+f.slice(f.length-b+1)}let e=c.length>=2?`${c[c.length-2]}/${c[c.length-1]}`:c[c.length-1]??a;return e.length<=b?e:"…"+e.slice(e.length-b+1)}],87067);var n=a.i(1269);let o=(0,n.default)("ListTree",[["path",{d:"M21 12h-8",key:"1bmf0i"}],["path",{d:"M21 6H8",key:"1pqkrb"}],["path",{d:"M21 18h-8",key:"1tm79t"}],["path",{d:"M3 6v4c0 1.1.9 2 2 2h3",key:"1ywdgy"}],["path",{d:"M3 10v6c0 1.1.9 2 2 2h3",key:"2wc746"}]]),p=(0,n.default)("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]),q=(0,n.default)("Zap",[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]]),r=(0,n.default)("DollarSign",[["line",{x1:"12",x2:"12",y1:"2",y2:"22",key:"7eqyqh"}],["path",{d:"M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6",key:"1b0p4s"}]]);function s({line1:a,line2:c}){return(0,b.jsxs)("div",{style:{lineHeight:1.4},children:[(0,b.jsx)("div",{children:a}),(0,b.jsx)("div",{style:{color:"var(--af-text-tertiary)"},children:c})]})}function t(a){return a<1e3?String(a):a<1e6?(a/1e3).toFixed(1)+"k":(a/1e6).toFixed(1)+"M"}function u(a){return a<1e3?String(a):a<1e6?(a/1e3).toFixed(1)+"k":a<1e9?(a/1e6).toFixed(1)+"M":(a/1e9).toFixed(1)+"B"}a.s(["DashboardView",0,function({sessions:a,override:i}){let j=(0,c.highLevelMetrics)(a),k=(0,c.dailyActivity)(a),n=(0,c.summarizeBursts)((0,c.computeBurstsFromSessions)(a)),v=j.totalTokens.input+j.totalTokens.cacheRead+j.totalTokens.cacheWrite,w=i?.activeTimeMs??j.totalAirTimeMs,x=k.filter(a=>a.airTimeMs>0).length;return(0,b.jsxs)(b.Fragment,{children:[(0,b.jsxs)("section",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fit, minmax(180px, 1fr))",gap:12},children:[(0,b.jsx)(f.MetricCard,{label:"Sessions",value:j.sessionCount.toLocaleString(),sub:(0,b.jsx)(s,{line1:`${j.totalTurns.toLocaleString()} turns`,line2:`avg ${j.sessionCount?Math.round(j.totalTurns/j.sessionCount):0} / session`}),icon:(0,b.jsx)(o,{size:13}),tooltip:"Total Claude Code sessions (one JSONL file = one session). A 'turn' is one user message that starts an agent response cycle."}),(0,b.jsx)(f.MetricCard,{label:"Agent time",value:h(w),sub:x>0?(0,b.jsx)(s,{line1:`${h(w/x)} / day`,line2:`${x} active days`}):"no activity",icon:(0,b.jsx)(p,{size:13}),tooltip:"Sum of time the Claude agent was actively working across all sessions. Gaps longer than 3 minutes (user away, laptop lid closed) are excluded. This is NOT wall-clock duration. Per-day average is across days with any agent activity."}),(0,b.jsx)(f.MetricCard,{label:"Tool calls",value:j.totalToolCalls.toLocaleString(),sub:(0,b.jsx)(s,{line1:`avg ${j.sessionCount?Math.round(j.totalToolCalls/j.sessionCount):0} / session`,line2:`across ${j.sessionCount.toLocaleString()} sessions`}),icon:(0,b.jsx)(q,{size:13}),tooltip:"Total tool invocations (Bash, Read, Edit, Write, Grep, Glob, Agent, etc.) across all sessions."}),(0,b.jsx)(f.MetricCard,{label:"Parallelism",value:n.burstCount>0?h(n.totalParallelMs):"—",sub:n.burstCount>0?(0,b.jsx)(s,{line1:`peak \xd7${n.peakConcurrent}`,line2:`${Math.round(n.totalParallelMs/Math.max(1,w)*100)}% of active time`}):"no sustained parallelism",tooltip:`Total time ≥2 agents were working in parallel, with peak concurrency as the highest count in any single burst.
|
|
2
|
-
|
|
3
|
-
${n.burstCount} burst${1===n.burstCount?"":"s"} \xb7 ${n.crossProjectBurstCount} spanned multiple projects.`}),(0,b.jsx)(f.MetricCard,{label:"Code changes",value:(0,b.jsxs)("span",{children:[(0,b.jsxs)("span",{style:{color:"var(--af-success)"},children:["+",t(j.totalLinesAdded)]})," ",(0,b.jsxs)("span",{style:{color:"var(--af-danger)"},children:["-",t(j.totalLinesRemoved)]})]}),sub:(0,b.jsx)(s,{line1:`${j.totalFilesEdited.toLocaleString()} files touched`,line2:`${t(j.totalLinesAdded+j.totalLinesRemoved)} total lines`}),tooltip:`Total lines added and removed across all Edit + Write tool calls.
|
|
4
|
-
+${j.totalLinesAdded.toLocaleString()} added
|
|
5
|
-
-${j.totalLinesRemoved.toLocaleString()} removed
|
|
6
|
-
${j.totalFilesEdited.toLocaleString()} unique files touched`}),(0,b.jsx)(f.MetricCard,{label:"Est. cost",value:m(l(a)),sub:(0,b.jsx)(s,{line1:`${u(v)} in`,line2:`${u(j.totalTokens.output)} out`}),icon:(0,b.jsx)(r,{size:13}),tooltip:`Estimated API spend priced per-model across all sessions.
|
|
7
|
-
Input: ${g(j.totalTokens.input)}
|
|
8
|
-
Output: ${g(j.totalTokens.output)}
|
|
9
|
-
Cache read: ${g(j.totalTokens.cacheRead)}
|
|
10
|
-
Cache write: ${g(j.totalTokens.cacheWrite)}`}),i?.extraCards]}),(0,b.jsxs)("section",{style:{display:"grid",gridTemplateColumns:"1fr 2fr",gap:16},children:[(0,b.jsxs)("div",{className:"af-panel",style:{display:"flex",flexDirection:"column"},children:[(0,b.jsxs)("div",{className:"af-panel-header",children:[(0,b.jsx)("span",{children:"Contribution heatmap"}),(0,b.jsx)("span",{style:{fontSize:11,color:"var(--af-text-tertiary)",fontWeight:400},children:"sessions / day"})]}),(0,b.jsx)("div",{style:{padding:18,flex:1,display:"flex",alignItems:"center",justifyContent:"center"},children:(0,b.jsx)(d.Heatmap,{buckets:k,valueKey:"sessions"})})]}),(0,b.jsxs)("div",{className:"af-panel",children:[(0,b.jsxs)("div",{className:"af-panel-header",children:[(0,b.jsx)("span",{children:"Daily activity"}),(0,b.jsx)("span",{style:{fontSize:11,color:"var(--af-text-tertiary)",fontWeight:400},children:"click a metric to switch"})]}),(0,b.jsx)("div",{style:{padding:18},children:(0,b.jsx)(e.ActivityChart,{buckets:k})})]})]})]})}],4636)},41264,a=>{"use strict";a.s(["LiveBadge",()=>b]);let b=(0,a.i(11857).registerClientReference)(function(){throw Error("Attempted to call LiveBadge() from the server but LiveBadge is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/apps/web/components/live-badge.tsx <module evaluation>","LiveBadge")},71475,a=>{"use strict";a.s(["LiveBadge",()=>b]);let b=(0,a.i(11857).registerClientReference)(function(){throw Error("Attempted to call LiveBadge() from the server but LiveBadge is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/apps/web/components/live-badge.tsx","LiveBadge")},77708,a=>{"use strict";a.i(41264);var b=a.i(71475);a.n(b)}];
|
|
11
|
-
|
|
12
|
-
//# sourceMappingURL=_12dtryh._.js.map
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,52535,e=>{"use strict";var t=e.i(18050),a=e.i(71645);e.s(["LiveBadge",0,function({mtimeIso:e,size:r="sm"}){let[i,s]=(0,a.useState)(()=>Date.now());if((0,a.useEffect)(()=>{let e=setInterval(()=>s(Date.now()),1e4);return()=>clearInterval(e)},[]),!e)return null;let l=Date.parse(e);if(Number.isNaN(l)||i-l>45e3)return null;let o="md"===r?8:6;return(0,t.jsxs)("span",{style:{display:"inline-flex",alignItems:"center",gap:5,fontSize:"md"===r?10:9,fontWeight:700,letterSpacing:"0.04em",padding:"md"===r?"3px 9px":"2px 7px",borderRadius:100,background:"rgba(239, 68, 68, 0.12)",color:"#ef4444",textTransform:"uppercase"},title:`Last updated ${new Date(l).toLocaleTimeString()}`,children:[(0,t.jsx)("span",{style:{display:"inline-block",width:o,height:o,borderRadius:"50%",background:"#ef4444",animation:"cs-live-pulse 1.6s ease-in-out infinite"}}),"LIVE",(0,t.jsx)("style",{children:`
|
|
2
|
-
@keyframes cs-live-pulse {
|
|
3
|
-
0%, 100% { opacity: 1; transform: scale(1); }
|
|
4
|
-
50% { opacity: 0.4; transform: scale(0.85); }
|
|
5
|
-
}
|
|
6
|
-
`})]})}])},25063,e=>{"use strict";let t=(0,e.i(75254).default)("ArrowDown",[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]]);e.s(["ArrowDown",0,t],25063)},95116,e=>{"use strict";let t=(0,e.i(75254).default)("Wrench",[["path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z",key:"cbrjhi"}]]);e.s(["Wrench",0,t],95116)},3116,e=>{"use strict";let t=(0,e.i(75254).default)("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]);e.s(["Clock",0,t],3116)},55898,78360,e=>{"use strict";var t=e.i(18050),a=e.i(71645),r=e.i(75254);let i=(0,r.default)("ArrowUp",[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]]);var s=e.i(25063);let l=(0,r.default)("ArrowUpDown",[["path",{d:"m21 16-4 4-4-4",key:"f6ql7i"}],["path",{d:"M17 20V4",key:"1ejh1v"}],["path",{d:"m3 8 4-4 4 4",key:"11wl7u"}],["path",{d:"M7 4v16",key:"1glfcx"}]]);e.s(["DataTable",0,function({rows:e,columns:r,getRowKey:o,onRowClick:n,defaultSortKey:d,defaultSortDir:c="desc"}){let[p,u]=(0,a.useState)(d??null),[f,h]=(0,a.useState)(c),x=(0,a.useMemo)(()=>{if(!p)return e;let t=r.find(e=>e.key===p);if(!t||!t.sortValue)return e;let a="asc"===f?1:-1;return[...e].sort((e,r)=>{let i=t.sortValue(e),s=t.sortValue(r);return"number"==typeof i&&"number"==typeof s?(i-s)*a:String(i).localeCompare(String(s))*a})},[e,r,p,f]);return(0,t.jsx)("div",{style:{overflowX:"auto",border:"1px solid var(--af-border-subtle)",borderRadius:8,background:"var(--af-surface)"},children:(0,t.jsxs)("table",{style:{width:"100%",borderCollapse:"collapse",fontSize:12,color:"var(--af-text)"},children:[(0,t.jsx)("thead",{children:(0,t.jsx)("tr",{children:r.map(e=>{let a=p===e.key,r=!1!==e.sortable&&!!e.sortValue;return(0,t.jsx)("th",{onClick:()=>{!1!==e.sortable&&e.sortValue&&(p===e.key?h(e=>"asc"===e?"desc":"asc"):(u(e.key),h("desc")))},style:{textAlign:e.align??"left",fontSize:10,fontWeight:600,color:a?"var(--af-accent)":"var(--af-text-tertiary)",textTransform:"uppercase",letterSpacing:"0.05em",padding:"10px 12px",borderBottom:"1px solid var(--af-border-subtle)",cursor:r?"pointer":"default",userSelect:"none",whiteSpace:"nowrap",width:e.width,background:"var(--af-surface)",position:"sticky",top:0},children:(0,t.jsxs)("span",{style:{display:"inline-flex",alignItems:"center",gap:4,verticalAlign:"middle"},children:[e.header,r&&(0,t.jsx)("span",{style:{display:"inline-flex",opacity:a?1:.35},children:a?"asc"===f?(0,t.jsx)(i,{size:10}):(0,t.jsx)(s.ArrowDown,{size:10}):(0,t.jsx)(l,{size:10})})]})},e.key)})})}),(0,t.jsxs)("tbody",{children:[x.map(e=>(0,t.jsx)("tr",{onClick:()=>n?.(e),style:{cursor:n?"pointer":"default",borderBottom:"1px solid var(--af-border-subtle)",transition:"background 0.1s"},onMouseEnter:e=>{e.currentTarget.style.background="var(--af-surface-hover)"},onMouseLeave:e=>{e.currentTarget.style.background=""},children:r.map(a=>(0,t.jsx)("td",{style:{padding:"10px 12px",textAlign:a.align??"left",whiteSpace:"right"===a.align?"nowrap":void 0,verticalAlign:"top"},children:a.render(e)},a.key))},o(e))),0===x.length&&(0,t.jsx)("tr",{children:(0,t.jsx)("td",{colSpan:r.length,style:{padding:"32px 16px",textAlign:"center",fontSize:12,color:"var(--af-text-tertiary)"},children:"No rows to display."})})]})]})})}],55898);let o=(0,r.default)("LayoutGrid",[["rect",{width:"7",height:"7",x:"3",y:"3",rx:"1",key:"1g98yp"}],["rect",{width:"7",height:"7",x:"14",y:"3",rx:"1",key:"6d4xhi"}],["rect",{width:"7",height:"7",x:"14",y:"14",rx:"1",key:"nxv5o0"}],["rect",{width:"7",height:"7",x:"3",y:"14",rx:"1",key:"1bb6yr"}]]),n=(0,r.default)("Table",[["path",{d:"M12 3v18",key:"108xh3"}],["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M3 9h18",key:"1pudct"}],["path",{d:"M3 15h18",key:"5xshup"}]]);var d=e.i(86619);function c({active:e,onClick:a,label:r,icon:i,rightEdge:s}){return(0,t.jsxs)("button",{type:"button",onClick:a,style:{display:"inline-flex",alignItems:"center",gap:5,padding:"6px 12px",fontSize:11,fontWeight:500,background:e?"var(--af-accent-subtle)":"transparent",color:e?"var(--af-accent)":"var(--af-text-secondary)",border:"none",borderRight:s?"none":"1px solid var(--af-border-subtle)",cursor:"pointer",letterSpacing:"0.02em"},children:[i,r]})}e.s(["useViewToggle",0,function(e,a="cards"){let[r,i,s]=(0,d.usePersistentBoolean)(e,"table"===a);return{mode:r?"table":"cards",toggle:(0,t.jsxs)("div",{style:{display:"inline-flex",border:"1px solid var(--af-border-subtle)",borderRadius:6,overflow:"hidden"},children:[(0,t.jsx)(c,{active:!r,onClick:()=>i(!1),label:"Cards",icon:(0,t.jsx)(o,{size:12})}),(0,t.jsx)(c,{active:r,onClick:()=>i(!0),label:"Table",icon:(0,t.jsx)(n,{size:12}),rightEdge:!0})]}),hydrated:s}}],78360)},86333,e=>{"use strict";var t=e.i(18050),a=e.i(22016),r=e.i(71645),i=e.i(18566),s=e.i(56324),l=e.i(55436),o=e.i(95116);let n=(0,e.i(75254).default)("MessagesSquare",[["path",{d:"M14 9a2 2 0 0 1-2 2H6l-4 4V4a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2z",key:"p1xzt8"}],["path",{d:"M18 9h2a2 2 0 0 1 2 2v11l-4-4h-6a2 2 0 0 1-2-2v-1",key:"1cx29u"}]]);var d=e.i(3116),c=e.i(52535),p=e.i(55898),u=e.i(78360);let f=[{key:"project",header:"Project",sortValue:e=>e.projectName,render:e=>(0,t.jsxs)("div",{style:{maxWidth:180,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},title:e.projectName,children:[(0,t.jsx)("div",{style:{fontWeight:500},children:(0,s.prettyProjectName)(e.projectName)}),(0,t.jsx)("div",{style:{fontSize:10,color:"var(--af-text-tertiary)",fontFamily:"var(--font-mono)"},children:(0,s.shortId)(e.id)})]})},{key:"preview",header:"First message",sortable:!1,render:e=>(0,t.jsx)("div",{style:{maxWidth:360,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",color:"var(--af-text-secondary)"},title:e.firstUserPreview,children:e.firstUserPreview||"—"})},{key:"lastActive",header:"Last active",sortValue:e=>e.lastTimestamp?Date.parse(e.lastTimestamp):0,align:"right",render:e=>(0,t.jsx)("span",{suppressHydrationWarning:!0,style:{fontFamily:"var(--font-mono)",fontSize:11},children:e.lastTimestamp?(0,s.formatRelative)(e.lastTimestamp):"—"})},{key:"airtime",header:"Agent time",sortValue:e=>e.airTimeMs??e.durationMs??0,align:"right",render:e=>(0,t.jsx)("span",{style:{fontFamily:"var(--font-mono)",fontSize:11},children:(0,s.formatDuration)(e.airTimeMs??e.durationMs??0)})},{key:"turns",header:"Turns",sortValue:e=>e.turnCount??0,align:"right",render:e=>(0,t.jsx)("span",{style:{fontFamily:"var(--font-mono)",fontSize:11},children:(e.turnCount??0).toLocaleString()})},{key:"tools",header:"Tool calls",sortValue:e=>e.toolCallCount??0,align:"right",render:e=>(0,t.jsx)("span",{style:{fontFamily:"var(--font-mono)",fontSize:11},children:(e.toolCallCount??0).toLocaleString()})},{key:"tokens",header:"Tokens",sortValue:e=>e.totalUsage.input+e.totalUsage.output+e.totalUsage.cacheRead+e.totalUsage.cacheWrite,align:"right",render:e=>(0,t.jsx)("span",{style:{fontFamily:"var(--font-mono)",fontSize:11},children:(0,s.formatTokens)(e.totalUsage.input+e.totalUsage.output+e.totalUsage.cacheRead+e.totalUsage.cacheWrite)})},{key:"status",header:"Status",sortValue:e=>+("running"===e.status),align:"center",render:e=>"running"===e.status?(0,t.jsx)(c.LiveBadge,{}):(0,t.jsx)("span",{style:{opacity:.4},children:"—"})}];function h({session:e}){let r=e.totalUsage.input+e.totalUsage.output+e.totalUsage.cacheRead+e.totalUsage.cacheWrite;return(0,t.jsxs)(a.default,{href:`/sessions/${e.id}`,className:"af-card",style:{display:"flex",flexDirection:"column",gap:10,padding:"14px 16px"},children:[(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",gap:8},children:[(0,t.jsxs)("div",{style:{fontSize:11,color:"var(--af-text-tertiary)",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",display:"flex",alignItems:"center",gap:6,minWidth:0},title:e.projectName,children:[(0,t.jsx)(c.LiveBadge,{mtimeIso:e.lastTimestamp}),(0,t.jsx)("span",{style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:(0,s.prettyProjectName)(e.projectName)})]}),(0,t.jsx)("div",{style:{fontSize:10,color:"var(--af-text-tertiary)",fontFamily:"var(--font-mono)",flexShrink:0},suppressHydrationWarning:!0,children:e.firstTimestamp?(0,s.formatRelative)(e.firstTimestamp):"—"})]}),(0,t.jsx)("div",{style:{fontSize:13,color:"var(--af-text)",display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:2,overflow:"hidden",minHeight:36,lineHeight:1.4},title:e.firstUserPreview,children:e.firstUserPreview||(0,t.jsx)("em",{style:{color:"var(--af-text-tertiary)"},children:"(no user message)"})}),(0,t.jsx)("div",{style:{fontSize:11.5,color:"var(--af-text-secondary)",display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:2,overflow:"hidden",lineHeight:1.4,paddingLeft:10,borderLeft:"2px solid var(--af-accent-subtle)"},title:e.lastAgentPreview,children:e.lastAgentPreview||(0,t.jsx)("em",{style:{color:"var(--af-text-tertiary)"},children:"—"})}),(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:14,fontSize:10.5,color:"var(--af-text-tertiary)",paddingTop:8,borderTop:"1px solid var(--af-border-subtle)",fontFamily:"var(--font-mono)"},children:[(0,t.jsx)(x,{icon:(0,t.jsx)(n,{size:11}),label:`${e.turnCount??0} turn${1===e.turnCount?"":"s"}`}),(0,t.jsx)(x,{icon:(0,t.jsx)(o.Wrench,{size:11}),label:`${e.toolCallCount??0} tools`}),(0,t.jsx)(x,{icon:(0,t.jsx)(d.Clock,{size:11}),label:(0,s.formatDuration)(e.airTimeMs??e.durationMs)}),(0,t.jsx)("span",{style:{marginLeft:"auto"},children:(0,s.formatTokens)(r)})]})]})}function x({icon:e,label:a}){return(0,t.jsxs)("span",{style:{display:"flex",alignItems:"center",gap:4},children:[e,a]})}e.s(["SessionsGrid",0,function({sessions:e}){let a=(0,i.useRouter)(),[o,n]=(0,r.useState)(""),[d,c]=(0,r.useState)("all"),[x,y]=(0,r.useState)("newest"),{mode:g,toggle:m}=(0,u.useViewToggle)("cclens:sessions:view"),v=(0,r.useMemo)(()=>["all",...Array.from(new Set(e.map(e=>e.projectName))).sort()],[e]),j=(0,r.useMemo)(()=>{let t=e.slice();if("all"!==d&&(t=t.filter(e=>e.projectName===d)),o){let e=o.toLowerCase();t=t.filter(t=>t.id.toLowerCase().includes(e)||(t.firstUserPreview??"").toLowerCase().includes(e)||(t.lastAgentPreview??"").toLowerCase().includes(e)||t.projectName.toLowerCase().includes(e))}return"longest"===x?t.sort((e,t)=>(t.airTimeMs??t.durationMs??0)-(e.airTimeMs??e.durationMs??0)):"most-tokens"===x&&t.sort((e,t)=>t.totalUsage.input+t.totalUsage.output+t.totalUsage.cacheRead-(e.totalUsage.input+e.totalUsage.output+e.totalUsage.cacheRead)),t},[e,d,o,x]);return(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{style:{display:"flex",gap:10,marginBottom:16,flexWrap:"wrap",alignItems:"center"},children:[(0,t.jsxs)("div",{style:{position:"relative",flex:1,minWidth:260,maxWidth:480},children:[(0,t.jsx)(l.Search,{size:13,color:"var(--af-text-tertiary)",style:{position:"absolute",left:12,top:"50%",transform:"translateY(-50%)"}}),(0,t.jsx)("input",{type:"text",placeholder:"Search by message, project, or ID",value:o,onChange:e=>n(e.target.value),style:{width:"100%",paddingLeft:32}})]}),(0,t.jsx)("select",{value:d,onChange:e=>c(e.target.value),style:{maxWidth:260},children:v.map(e=>(0,t.jsx)("option",{value:e,children:"all"===e?"All projects":(0,s.prettyProjectName)(e)},e))}),(0,t.jsxs)("select",{value:x,onChange:e=>y(e.target.value),children:[(0,t.jsx)("option",{value:"newest",children:"Newest"}),(0,t.jsx)("option",{value:"longest",children:"Longest"}),(0,t.jsx)("option",{value:"most-tokens",children:"Most tokens"})]}),(0,t.jsx)("span",{style:{marginLeft:"auto",fontSize:11,color:"var(--af-text-tertiary)",fontFamily:"var(--font-mono)"},children:j.length}),m]}),0===j.length?(0,t.jsx)("div",{className:"af-empty",children:"No sessions found."}):"table"===g?(0,t.jsx)(p.DataTable,{rows:j,getRowKey:e=>`${e.projectDir}/${e.id}`,onRowClick:e=>a.push(`/sessions/${e.id}`),defaultSortKey:"lastActive",defaultSortDir:"desc",columns:f}):(0,t.jsx)("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(360px, 1fr))",gap:14},children:j.map(e=>(0,t.jsx)(h,{session:e},`${e.projectDir}/${e.id}`))})]})}],86333)}]);
|