(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[898],{20063:(e,t,r)=>{"use strict";var n=r(47260);r.o(n,"usePathname")&&r.d(t,{usePathname:function(){return n.usePathname}}),r.o(n,"useRouter")&&r.d(t,{useRouter:function(){return n.useRouter}}),r.o(n,"useSearchParams")&&r.d(t,{useSearchParams:function(){return n.useSearchParams}})},20467:(e,t,r)=>{"use strict";function n(e){return e>=1e6?"".concat((e/1e6).toFixed(1),"M"):e>=1e3?"".concat((e/1e3).toFixed(1),"k"):e.toString()}function o(e){return e>=1e3?"$".concat(e.toFixed(0)):"$".concat(e.toFixed(2))}function a(e){let t=Math.floor(e/1e3);if(t<60)return"".concat(t,"s");let r=Math.floor(t/60);if(r<60)return"".concat(r,"m");let n=Math.floor(r/60);return"".concat(n,"h ").concat(r%60,"m")}r.d(t,{F0:()=>o,c5:()=>a,yj:()=>n})},38250:(e,t,r)=>{"use strict";r.d(t,{SessionRow:()=>i});var n=r(95155),o=r(20063),a=r(20467);let s={Planning:"bg-tertiary-soft text-ink-dim border-ink-mute/30",Debugging:"bg-error/15 text-error border-error/30",Refactor:"bg-primary/10 text-primary border-primary/30",Feature:"bg-secondary/10 text-secondary border-secondary/30",Styling:"bg-fuchsia-400/10 text-fuchsia-300 border-fuchsia-400/30","SEO/Content":"bg-amber-400/10 text-amber-300 border-amber-400/30",DevOps:"bg-orange-400/10 text-orange-300 border-orange-400/30",Data:"bg-sky-400/10 text-sky-300 border-sky-400/30",Payments:"bg-emerald-400/10 text-emerald-300 border-emerald-400/30",Docs:"bg-violet-400/10 text-violet-300 border-violet-400/30",Unknown:"bg-surface-3 text-ink-mute border-surface-4"};function c(e){let{category:t,size:r="sm"}=e,o=s[t]||s.Unknown;return(0,n.jsx)("span",{className:"inline-block ".concat("xs"===r?"text-[9px] px-1 py-0":"text-[10px] px-1.5 py-0.5"," rounded font-mono uppercase tracking-wider border ").concat(o," shrink-0"),children:t})}function i(e){let{session:t,zebra:r}=e,s=(0,o.useRouter)(),i="/sessions/".concat(t.id),u=t.input_tokens+t.output_tokens+t.cache_read_tokens+t.cache_write_tokens,d=function(e){if(e.summary)return e.summary.split("\n")[0].trim();if(e.heuristic_title)return e.heuristic_title;if(e.first_prompt){var t;let r=(null!=(t=e.first_prompt.trim().split("\n").find(e=>e.trim().length>0))?t:"").replace(/\s+/g," ").trim();if(r.length<=100)return r;let n=r.lastIndexOf(" ",100);return(n>60?r.slice(0,n):r.slice(0,100))+"…"}return"(untitled session)"}(t),l=function(e){if(e.categories)try{let t=JSON.parse(e.categories);if(Array.isArray(t))return t.filter(e=>"string"==typeof e)}catch(e){}return e.category?[e.category]:[]}(t);return(0,n.jsxs)("tr",{onClick:()=>s.push(i),onAuxClick:e=>{1===e.button&&window.open(i,"_blank")},onKeyDown:e=>{"Enter"===e.key&&s.push(i)},tabIndex:0,role:"link",className:"border-t border-surface-2 cursor-pointer transition-colors hover:bg-surface-2/60 focus:outline-none focus:bg-surface-2/70 ".concat(r?"bg-surface-1/30":""),children:[(0,n.jsx)("td",{className:"px-3 py-2 font-mono text-code-sm text-ink-mute",children:new Date(t.started_at).toLocaleString([],{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"})}),(0,n.jsx)("td",{className:"px-3 py-2",children:(0,n.jsx)("span",{className:"inline-block px-1.5 py-0.5 rounded text-[10px] font-mono uppercase tracking-wider ".concat("claude"===t.provider?"bg-primary/15 text-primary":"bg-secondary/15 text-secondary"),children:t.provider})}),(0,n.jsx)("td",{className:"px-3 py-2 text-ink-dim",children:t.project_name}),(0,n.jsx)("td",{className:"px-3 py-2 font-mono text-code-sm text-ink-mute truncate max-w-[180px]",children:t.model||"—"}),(0,n.jsx)("td",{className:"px-3 py-2 max-w-[420px]",children:(0,n.jsxs)("div",{className:"flex items-center gap-2 flex-wrap",children:[(0,n.jsx)("span",{className:"text-ink truncate",children:d}),l.map(e=>(0,n.jsx)(c,{category:e},e))]})}),(0,n.jsx)("td",{className:"px-3 py-2 text-right font-mono tabular",children:(0,a.yj)(u)}),(0,n.jsx)("td",{className:"px-3 py-2 text-right font-mono tabular text-secondary",children:(0,a.F0)(t.est_cost_usd)}),(0,n.jsx)("td",{className:"px-3 py-2 text-right font-mono tabular text-ink-mute",children:(0,a.c5)(t.duration_ms)})]})}},99884:(e,t,r)=>{Promise.resolve().then(r.bind(r,38250))}},e=>{e.O(0,[441,255,358],()=>e(e.s=99884)),_N_E=e.O()}]);