failproofai 0.0.11-beta.3 → 0.0.11-beta.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.next/standalone/.next/BUILD_ID +1 -1
- package/.next/standalone/.next/build-manifest.json +3 -3
- package/.next/standalone/.next/prerender-manifest.json +3 -3
- package/.next/standalone/.next/required-server-files.json +1 -1
- package/.next/standalone/.next/server/app/_global-error/page/server-reference-manifest.json +1 -1
- package/.next/standalone/.next/server/app/_global-error/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/_global-error/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/_global-error.html +1 -1
- package/.next/standalone/.next/server/app/_global-error.rsc +7 -7
- package/.next/standalone/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/_global-error.segments/_full.segment.rsc +7 -7
- package/.next/standalone/.next/server/app/_global-error.segments/_head.segment.rsc +3 -3
- package/.next/standalone/.next/server/app/_global-error.segments/_index.segment.rsc +3 -3
- package/.next/standalone/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_not-found/page/server-reference-manifest.json +1 -1
- package/.next/standalone/.next/server/app/_not-found/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/_not-found.html +1 -1
- package/.next/standalone/.next/server/app/_not-found.rsc +14 -14
- package/.next/standalone/.next/server/app/_not-found.segments/_full.segment.rsc +14 -14
- package/.next/standalone/.next/server/app/_not-found.segments/_head.segment.rsc +4 -4
- package/.next/standalone/.next/server/app/_not-found.segments/_index.segment.rsc +9 -9
- package/.next/standalone/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/_not-found.segments/_not-found.segment.rsc +3 -3
- package/.next/standalone/.next/server/app/_not-found.segments/_tree.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/audit/page/server-reference-manifest.json +2 -2
- package/.next/standalone/.next/server/app/audit/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/audit/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/index.html +1 -1
- package/.next/standalone/.next/server/app/index.rsc +14 -14
- package/.next/standalone/.next/server/app/index.segments/__PAGE__.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/index.segments/_full.segment.rsc +14 -14
- package/.next/standalone/.next/server/app/index.segments/_head.segment.rsc +4 -4
- package/.next/standalone/.next/server/app/index.segments/_index.segment.rsc +9 -9
- package/.next/standalone/.next/server/app/index.segments/_tree.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/page/server-reference-manifest.json +1 -1
- package/.next/standalone/.next/server/app/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/policies/page/server-reference-manifest.json +8 -8
- package/.next/standalone/.next/server/app/policies/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/policies/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/project/[name]/page/server-reference-manifest.json +1 -1
- package/.next/standalone/.next/server/app/project/[name]/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/project/[name]/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/project/[name]/session/[sessionId]/page/react-loadable-manifest.json +2 -2
- package/.next/standalone/.next/server/app/project/[name]/session/[sessionId]/page/server-reference-manifest.json +2 -2
- package/.next/standalone/.next/server/app/project/[name]/session/[sessionId]/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/project/[name]/session/[sessionId]/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/projects/page/server-reference-manifest.json +1 -1
- package/.next/standalone/.next/server/app/projects/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/projects/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0sb_5m8._.js +1 -1
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__13ra2jq._.js +1 -1
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__1_mqemn._.js +1 -1
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__1b9z5-i._.js +1 -1
- package/.next/standalone/.next/server/chunks/_1-1804f._.js +1 -1
- package/.next/standalone/.next/server/chunks/package_json_[json]_cjs_1nxcc4v._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0ywoypf._.js → [root-of-the-server]__0-wdurj._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__00jkjmt._.js +2 -2
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__013du6r._.js +2 -2
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__06f-yix._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0e85wxv._.js +2 -2
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__1cd25c7._.js +2 -2
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__1hlrq6y._.js +2 -2
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__1ihxdo5._.js +2 -2
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__1mt35_w._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__1pcxxwg._.js +2 -2
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__1vvfde2._.js +2 -2
- package/.next/standalone/.next/server/chunks/ssr/app_audit__components_audit-dashboard_tsx_0p9ud47._.js +3 -3
- package/.next/standalone/.next/server/chunks/ssr/app_global-error_tsx_1kp6l3x._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/app_policies_hooks-client_tsx_19dqvpc._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{node_modules_html2canvas_dist_html2canvas_esm_05gja40.js → node_modules_html2canvas_dist_html2canvas_esm_0hmsdod.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/node_modules_next_dist_1d_onnt._.js +2 -2
- package/.next/standalone/.next/server/middleware-build-manifest.js +3 -3
- package/.next/standalone/.next/server/pages/404.html +1 -1
- package/.next/standalone/.next/server/pages/500.html +1 -1
- package/.next/standalone/.next/server/server-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/server-reference-manifest.json +10 -10
- package/.next/standalone/.next/static/chunks/{43lnq0c1rnflb.js → 0fkntmojmibda.js} +1 -1
- package/.next/standalone/.next/static/chunks/{0kdglk0vtzymo.js → 0nbmu4_n1j2-c.js} +1 -1
- package/.next/standalone/.next/static/chunks/{0ehe4dh0grngk.js → 1bxdpd036n3l9.js} +16 -16
- package/.next/standalone/.next/static/chunks/{0gdm-xaez4l7t.js → 1e0o-6kjfnwzh.js} +1 -1
- package/.next/standalone/.next/static/chunks/{2b1fzuhuk-42n.js → 20b5bz43so-1k.js} +1 -1
- package/.next/standalone/.next/static/chunks/{1fmco3pvq_twz.js → 2zjavpea8glet.js} +1 -1
- package/.next/standalone/.next/static/chunks/{3krzy-lhwfrmz.js → 36l507r2mbf5h.js} +1 -1
- package/.next/standalone/.next/static/chunks/{2dtip-mvmihiu.js → 3y3l184vijlfg.js} +1 -1
- package/.next/standalone/.next/static/chunks/{2srzafd1_ha5y.js → 41jjdgqqpl7em.js} +1 -1
- package/.next/standalone/app/audit/_components/share-dock.tsx +1 -1
- package/.next/standalone/app/audit/_components/share-templates.ts +2 -2
- package/.next/standalone/lib/share-card.ts +26 -2
- package/.next/standalone/package.json +1 -1
- package/.next/standalone/server.js +1 -1
- package/dist/cli.mjs +2 -2
- package/lib/share-card.ts +26 -2
- package/package.json +1 -1
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__100hdar._.js +0 -3
- /package/.next/standalone/.next/static/{wU3ot-EKa5ApKoh785wp8 → t4nu8RTRp3Z2srol-9pVb}/_buildManifest.js +0 -0
- /package/.next/standalone/.next/static/{wU3ot-EKa5ApKoh785wp8 → t4nu8RTRp3Z2srol-9pVb}/_clientMiddlewareManifest.js +0 -0
- /package/.next/standalone/.next/static/{wU3ot-EKa5ApKoh785wp8 → t4nu8RTRp3Z2srol-9pVb}/_ssgManifest.js +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,67927,e=>{"use strict";let t=(0,e.i(56420).default)("chevron-right",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);e.s(["ChevronRight",0,t],67927)},24071,e=>{"use strict";let t=(0,e.i(56420).default)("chevron-left",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);e.s(["ChevronLeft",0,t],24071)},73520,e=>{"use strict";var t=e.i(43476),a=e.i(24071),r=e.i(67927);e.s(["default",0,function({currentPage:e,totalPages:i,onPageChange:s}){if(i<=1)return null;let l=e=>`px-3 py-2 text-sm rounded-md transition-colors flex items-center gap-1 bg-muted text-muted-foreground ${e?"opacity-50 cursor-not-allowed":"hover:bg-muted/80"}`;return(0,t.jsxs)("div",{className:"flex items-center justify-center gap-2 py-4",children:[(0,t.jsxs)("button",{onClick:()=>s(e-1),disabled:1===e,className:l(1===e),"aria-label":"Previous page",children:[(0,t.jsx)(a.ChevronLeft,{className:"w-4 h-4"}),(0,t.jsx)("span",{className:"hidden sm:inline",children:"Previous"})]}),(0,t.jsx)("div",{className:"flex items-center gap-1",children:(()=>{if(i<=7)return Array.from({length:i},(e,t)=>t+1);let t=[1],a=Math.max(2,e-1),r=Math.min(i-1,e+1);e<=3&&(r=Math.min(5,i-1)),e>=i-2&&(a=Math.max(2,i-4)),a>2&&t.push("ellipsis-start");for(let e=a;e<=r;e++)t.push(e);return r<i-1&&t.push("ellipsis-end"),t.push(i),t})().map(a=>"string"==typeof a?(0,t.jsx)("span",{className:"px-2 text-muted-foreground",children:"..."},a):(0,t.jsx)("button",{onClick:()=>s(a),className:`min-w-[2.5rem] px-3 py-2 text-sm rounded-md transition-colors ${e===a?"bg-primary text-primary-foreground":"bg-muted text-muted-foreground hover:bg-muted/80"}`,"aria-label":`Page ${a}`,"aria-current":e===a?"page":void 0,children:a},a))}),(0,t.jsxs)("button",{onClick:()=>s(e+1),disabled:e===i,className:l(e===i),"aria-label":"Next page",children:[(0,t.jsx)("span",{className:"hidden sm:inline",children:"Next"}),(0,t.jsx)(r.ChevronRight,{className:"w-4 h-4"})]})]})}])},34713,e=>{"use strict";e.s(["formatDuration",0,function(e){if(e<1e3)return`${e}ms`;let t=e/1e3;if(t<60)return`${t.toFixed(1)}s`;let a=Math.floor(t/60);if(a>=60){let e=Math.floor(a/60);return`${e}h ${a%60}m`}let r=(t%60).toFixed(0);return`${a}m ${r}s`},"formatRelativeTime",0,function(e){let t=Date.now()-e;return t<6e4?`${Math.max(1,Math.floor(t/1e3))}s ago`:t<36e5?`${Math.floor(t/6e4)}m ago`:t<864e5?`${Math.floor(t/36e5)}h ago`:`${Math.floor(t/864e5)}d ago`}])},66794,
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,67927,e=>{"use strict";let t=(0,e.i(56420).default)("chevron-right",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);e.s(["ChevronRight",0,t],67927)},24071,e=>{"use strict";let t=(0,e.i(56420).default)("chevron-left",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);e.s(["ChevronLeft",0,t],24071)},73520,e=>{"use strict";var t=e.i(43476),a=e.i(24071),r=e.i(67927);e.s(["default",0,function({currentPage:e,totalPages:i,onPageChange:s}){if(i<=1)return null;let l=e=>`px-3 py-2 text-sm rounded-md transition-colors flex items-center gap-1 bg-muted text-muted-foreground ${e?"opacity-50 cursor-not-allowed":"hover:bg-muted/80"}`;return(0,t.jsxs)("div",{className:"flex items-center justify-center gap-2 py-4",children:[(0,t.jsxs)("button",{onClick:()=>s(e-1),disabled:1===e,className:l(1===e),"aria-label":"Previous page",children:[(0,t.jsx)(a.ChevronLeft,{className:"w-4 h-4"}),(0,t.jsx)("span",{className:"hidden sm:inline",children:"Previous"})]}),(0,t.jsx)("div",{className:"flex items-center gap-1",children:(()=>{if(i<=7)return Array.from({length:i},(e,t)=>t+1);let t=[1],a=Math.max(2,e-1),r=Math.min(i-1,e+1);e<=3&&(r=Math.min(5,i-1)),e>=i-2&&(a=Math.max(2,i-4)),a>2&&t.push("ellipsis-start");for(let e=a;e<=r;e++)t.push(e);return r<i-1&&t.push("ellipsis-end"),t.push(i),t})().map(a=>"string"==typeof a?(0,t.jsx)("span",{className:"px-2 text-muted-foreground",children:"..."},a):(0,t.jsx)("button",{onClick:()=>s(a),className:`min-w-[2.5rem] px-3 py-2 text-sm rounded-md transition-colors ${e===a?"bg-primary text-primary-foreground":"bg-muted text-muted-foreground hover:bg-muted/80"}`,"aria-label":`Page ${a}`,"aria-current":e===a?"page":void 0,children:a},a))}),(0,t.jsxs)("button",{onClick:()=>s(e+1),disabled:e===i,className:l(e===i),"aria-label":"Next page",children:[(0,t.jsx)("span",{className:"hidden sm:inline",children:"Next"}),(0,t.jsx)(r.ChevronRight,{className:"w-4 h-4"})]})]})}])},34713,e=>{"use strict";e.s(["formatDuration",0,function(e){if(e<1e3)return`${e}ms`;let t=e/1e3;if(t<60)return`${t.toFixed(1)}s`;let a=Math.floor(t/60);if(a>=60){let e=Math.floor(a/60);return`${e}h ${a%60}m`}let r=(t%60).toFixed(0);return`${a}m ${r}s`},"formatRelativeTime",0,function(e){let t=Date.now()-e;return t<6e4?`${Math.max(1,Math.floor(t/1e3))}s ago`:t<36e5?`${Math.floor(t/6e4)}m ago`:t<864e5?`${Math.floor(t/36e5)}h ago`:`${Math.floor(t/864e5)}d ago`}])},66794,67199,e=>{"use strict";let t=(0,e.i(56420).default)("settings",[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);e.s(["Settings",0,t],66794);var a=e.i(95187);let r=(0,a.createServerReference)("600eeb367b747a728a03cb1f3347fc9f9f828ba08a",a.callServer,void 0,a.findSourceMapURL,"searchHookActivityAction");e.s(["searchHookActivityAction",0,r],67199)},84026,29407,16306,82954,e=>{"use strict";var t=e.i(56420);let a=(0,t.default)("shield-check",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);e.s(["ShieldCheck",0,a],84026);let r=(0,t.default)("shield-x",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m14.5 9.5-5 5",key:"17q4r4"}],["path",{d:"m9.5 9.5 5 5",key:"18nt4w"}]]);e.s(["ShieldX",0,r],29407);let i=(0,t.default)("shield-alert",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"M12 8v4",key:"1got3b"}],["path",{d:"M12 16h.01",key:"1drbdi"}]]);e.s(["ShieldAlert",0,i],16306);let s=(0,t.default)("shield",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}]]);e.s(["Shield",0,s],82954)}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,8734,89664,e=>{"use strict";var t=e.i(56420);let a=(0,t.default)("copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);e.s(["Copy",0,a],8734);let r=(0,t.default)("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);e.s(["Check",0,r],89664)},84026,29407,16306,82954,e=>{"use strict";var t=e.i(56420);let a=(0,t.default)("shield-check",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);e.s(["ShieldCheck",0,a],84026);let r=(0,t.default)("shield-x",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m14.5 9.5-5 5",key:"17q4r4"}],["path",{d:"m9.5 9.5 5 5",key:"18nt4w"}]]);e.s(["ShieldX",0,r],29407);let l=(0,t.default)("shield-alert",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"M12 8v4",key:"1got3b"}],["path",{d:"M12 16h.01",key:"1drbdi"}]]);e.s(["ShieldAlert",0,l],16306);let s=(0,t.default)("shield",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}]]);e.s(["Shield",0,s],82954)},66794,
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,8734,89664,e=>{"use strict";var t=e.i(56420);let a=(0,t.default)("copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);e.s(["Copy",0,a],8734);let r=(0,t.default)("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);e.s(["Check",0,r],89664)},84026,29407,16306,82954,e=>{"use strict";var t=e.i(56420);let a=(0,t.default)("shield-check",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);e.s(["ShieldCheck",0,a],84026);let r=(0,t.default)("shield-x",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m14.5 9.5-5 5",key:"17q4r4"}],["path",{d:"m9.5 9.5 5 5",key:"18nt4w"}]]);e.s(["ShieldX",0,r],29407);let l=(0,t.default)("shield-alert",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"M12 8v4",key:"1got3b"}],["path",{d:"M12 16h.01",key:"1drbdi"}]]);e.s(["ShieldAlert",0,l],16306);let s=(0,t.default)("shield",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}]]);e.s(["Shield",0,s],82954)},66794,67199,e=>{"use strict";let t=(0,e.i(56420).default)("settings",[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);e.s(["Settings",0,t],66794);var a=e.i(95187);let r=(0,a.createServerReference)("600eeb367b747a728a03cb1f3347fc9f9f828ba08a",a.callServer,void 0,a.findSourceMapURL,"searchHookActivityAction");e.s(["searchHookActivityAction",0,r],67199)},34713,e=>{"use strict";e.s(["formatDuration",0,function(e){if(e<1e3)return`${e}ms`;let t=e/1e3;if(t<60)return`${t.toFixed(1)}s`;let a=Math.floor(t/60);if(a>=60){let e=Math.floor(a/60);return`${e}h ${a%60}m`}let r=(t%60).toFixed(0);return`${a}m ${r}s`},"formatRelativeTime",0,function(e){let t=Date.now()-e;return t<6e4?`${Math.max(1,Math.floor(t/1e3))}s ago`:t<36e5?`${Math.floor(t/6e4)}m ago`:t<864e5?`${Math.floor(t/36e5)}h ago`:`${Math.floor(t/864e5)}d ago`}])},24071,e=>{"use strict";let t=(0,e.i(56420).default)("chevron-left",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);e.s(["ChevronLeft",0,t],24071)},67927,e=>{"use strict";let t=(0,e.i(56420).default)("chevron-right",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);e.s(["ChevronRight",0,t],67927)},73520,e=>{"use strict";var t=e.i(43476),a=e.i(24071),r=e.i(67927);e.s(["default",0,function({currentPage:e,totalPages:l,onPageChange:s}){if(l<=1)return null;let i=e=>`px-3 py-2 text-sm rounded-md transition-colors flex items-center gap-1 bg-muted text-muted-foreground ${e?"opacity-50 cursor-not-allowed":"hover:bg-muted/80"}`;return(0,t.jsxs)("div",{className:"flex items-center justify-center gap-2 py-4",children:[(0,t.jsxs)("button",{onClick:()=>s(e-1),disabled:1===e,className:i(1===e),"aria-label":"Previous page",children:[(0,t.jsx)(a.ChevronLeft,{className:"w-4 h-4"}),(0,t.jsx)("span",{className:"hidden sm:inline",children:"Previous"})]}),(0,t.jsx)("div",{className:"flex items-center gap-1",children:(()=>{if(l<=7)return Array.from({length:l},(e,t)=>t+1);let t=[1],a=Math.max(2,e-1),r=Math.min(l-1,e+1);e<=3&&(r=Math.min(5,l-1)),e>=l-2&&(a=Math.max(2,l-4)),a>2&&t.push("ellipsis-start");for(let e=a;e<=r;e++)t.push(e);return r<l-1&&t.push("ellipsis-end"),t.push(l),t})().map(a=>"string"==typeof a?(0,t.jsx)("span",{className:"px-2 text-muted-foreground",children:"..."},a):(0,t.jsx)("button",{onClick:()=>s(a),className:`min-w-[2.5rem] px-3 py-2 text-sm rounded-md transition-colors ${e===a?"bg-primary text-primary-foreground":"bg-muted text-muted-foreground hover:bg-muted/80"}`,"aria-label":`Page ${a}`,"aria-current":e===a?"page":void 0,children:a},a))}),(0,t.jsxs)("button",{onClick:()=>s(e+1),disabled:e===l,className:i(e===l),"aria-label":"Next page",children:[(0,t.jsx)("span",{className:"hidden sm:inline",children:"Next"}),(0,t.jsx)(r.ChevronRight,{className:"w-4 h-4"})]})]})}])},80060,2711,e=>{"use strict";var t=e.i(18566),a=e.i(71645);function r(e){let t=e.getFullYear(),a=String(e.getMonth()+1).padStart(2,"0"),r=String(e.getDate()).padStart(2,"0");return`${t}-${a}-${r}`}function l(e){var t;if(!e||(t=e,!/^\d{4}-\d{2}-\d{2}$/.test(t)||isNaN(Date.parse(t))))return null;let[a,r,l]=e.split("-").map(Number);return new Date(a,r-1,l,12,0,0)}e.s(["useUrlParams",0,function(){let e=(0,t.useSearchParams)(),r=(0,t.useRouter)(),l=(0,t.usePathname)(),s=(0,a.useRef)(null),i=(0,a.useCallback)(t=>e.get(t),[e]),o=(0,a.useCallback)(()=>new URLSearchParams(e.toString()),[e]),n=(0,a.useCallback)(t=>{s.current&&clearTimeout(s.current),s.current=setTimeout(()=>{let a=new URLSearchParams(e.toString());for(let[e,r]of Object.entries(t))void 0===r||""===r?a.delete(e):a.set(e,r);let s=a.toString(),i=s?`${l}?${s}`:l;r.replace(i,{scroll:!1})},150)},[e,l,r]);return(0,a.useEffect)(()=>()=>{s.current&&clearTimeout(s.current)},[]),{get:i,getAll:o,setAll:n}}],80060),e.s(["dateRangeToParams",0,function(e){let t={};return e.from&&(t.from=r(e.from)),e.to&&(t.to=r(e.to)),t},"keywordsToParam",0,function(e){if(0!==e.length)return e.map(e=>encodeURIComponent(e)).join(",")},"pageToParam",0,function(e){return e<=1?void 0:String(e)},"paramToKeywords",0,function(e){return e?e.split(",").map(e=>decodeURIComponent(e.trim())).filter(e=>e.length>0):[]},"paramToPage",0,function(e){if(!e)return 1;let t=parseInt(e,10);return Number.isFinite(t)&&t>=1?t:1},"paramToPreset",0,function(e){return e&&["all","last-hour","today","last-7-days","last-30-days","custom"].includes(e)?e:"all"},"paramsToDateRange",0,function(e,t){return{from:l(e),to:l(t)}},"presetToParam",0,function(e){return"all"===e?void 0:e}],2711)},24578,e=>{"use strict";let t={claude:{id:"claude",label:"Claude Code",badgeClasses:"bg-orange-500/10 text-orange-400 border-orange-500/20"},codex:{id:"codex",label:"OpenAI Codex",badgeClasses:"bg-purple-500/10 text-purple-400 border-purple-500/20"},copilot:{id:"copilot",label:"GitHub Copilot",badgeClasses:"bg-blue-500/10 text-blue-400 border-blue-500/20"},cursor:{id:"cursor",label:"Cursor Agent",badgeClasses:"bg-emerald-500/10 text-emerald-400 border-emerald-500/20"},opencode:{id:"opencode",label:"OpenCode",badgeClasses:"bg-amber-500/10 text-amber-400 border-amber-500/20"},pi:{id:"pi",label:"Pi",badgeClasses:"bg-pink-500/10 text-pink-400 border-pink-500/20"},gemini:{id:"gemini",label:"Gemini CLI",badgeClasses:"bg-sky-500/10 text-sky-400 border-sky-500/20"}};e.s(["KNOWN_CLI_IDS",0,["claude","codex","copilot","cursor","opencode","pi","gemini"],"getCliBadgeClasses",0,function(e){return t[e]?.badgeClasses??t.claude.badgeClasses},"getCliLabel",0,function(e){return t[e]?.label??e},"isKnownCli",0,function(e){return"string"==typeof e&&Object.prototype.hasOwnProperty.call(t,e)}])},63676,e=>{"use strict";let t=(0,e.i(56420).default)("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);e.s(["X",0,t],63676)}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,36406,e=>{"use strict";let t;var s=e.i(43476),r=e.i(71645),n=e.i(74080);function i(e,t,s){let r,n=s.initialDeps??[],i=!0;function l(){let l=e();return(l.length!==n.length||l.some((e,t)=>n[t]!==e))&&(n=l,r=t(...l),(null==s?void 0:s.onChange)&&!(i&&s.skipInitialOnChange)&&s.onChange(r),i=!1),r}return l.updateDeps=e=>{n=e},l}function l(e,t){if(void 0!==e)return e;throw Error(`Unexpected undefined${t?`: ${t}`:""}`)}e.i(47167);let o=()=>{if(void 0!==t)return t;if("u"<typeof navigator)return t=!1;if(/iP(hone|od|ad)/.test(navigator.userAgent))return t=!0;let e=navigator.maxTouchPoints;return t="MacIntel"===navigator.platform&&void 0!==e&&e>0},a=e=>e,d=e=>{let t=Math.max(e.startIndex-e.overscan,0),s=Math.min(e.endIndex+e.overscan,e.count-1)-t+1,r=Array(s);for(let e=0;e<s;e++)r[e]=t+e;return r},c={passive:!0},h=(e,t)=>{let s=e.scrollElement;if(!s)return;let r=()=>{t({width:s.innerWidth,height:s.innerHeight})};return r(),s.addEventListener("resize",r,c),()=>{s.removeEventListener("resize",r)}},u="u"<typeof window||"onscrollend"in window,m=(e,t)=>((e,t,s)=>{var r,n;let i,l=e.scrollElement;if(!l)return;let o=e.targetWindow;if(!o)return;let a=e.options.useScrollendEvent&&u,d=0,h=a?null:(r=()=>t(d,!1),n=e.options.isScrollingResetDelay,function(...e){o.clearTimeout(i),i=o.setTimeout(()=>r.apply(this,e),n)}),m=e=>()=>{d=s(l),null==h||h(),t(d,e)},p=m(!0),f=m(!1);return l.addEventListener("scroll",p,c),a&&l.addEventListener("scrollend",f,c),()=>{l.removeEventListener("scroll",p),a&&l.removeEventListener("scrollend",f)}})(e,t,t=>e.options.horizontal?t.scrollX:t.scrollY),p=(e,t,s)=>{if(s.options.useCachedMeasurements){let t=s.indexFromElement(e),r=s.options.getItemKey(t);return s.itemSizeCache.get(r)??s.options.estimateSize(t)}if(null==t?void 0:t.borderBoxSize){let e=t.borderBoxSize[0];if(e)return Math.round(e[s.options.horizontal?"inlineSize":"blockSize"])}if(!t){let t=s.indexFromElement(e),r=s.options.getItemKey(t),n=s.itemSizeCache.get(r);if(void 0!==n)return n}return e[s.options.horizontal?"offsetWidth":"offsetHeight"]},f=(e,{adjustments:t=0,behavior:s},r)=>{var n,i;null==(i=null==(n=r.scrollElement)?void 0:n.scrollTo)||i.call(n,{[r.options.horizontal?"left":"top"]:e+t,behavior:s})};class g{constructor(e){this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.isScrolling=!1,this.scrollState=null,this.measurementsCache=[],this._flatMeasurements=null,this.itemSizeCache=new Map,this.itemSizeCacheVersion=0,this.laneAssignments=new Map,this.pendingMin=null,this.prevLanes=void 0,this.lanesChangedFlag=!1,this.lanesSettling=!1,this.pendingScrollAnchor=null,this.scrollRect=null,this.scrollOffset=null,this.scrollDirection=null,this.scrollAdjustments=0,this._iosDeferredAdjustment=0,this._iosTouching=!1,this._iosJustTouchEnded=!1,this._iosTouchEndTimerId=null,this._intendedScrollOffset=null,this.elementsCache=new Map,this.now=()=>{var e,t,s;return(null==(s=null==(t=null==(e=this.targetWindow)?void 0:e.performance)?void 0:t.now)?void 0:s.call(t))??Date.now()},this.observer=(()=>{let e=null,t=()=>e||(this.targetWindow&&this.targetWindow.ResizeObserver?e=new this.targetWindow.ResizeObserver(e=>{e.forEach(e=>{let t=()=>{let t=e.target,s=this.indexFromElement(t);if(!t.isConnected){for(let[e,s]of(this.observer.unobserve(t),this.elementsCache))if(s===t){this.elementsCache.delete(e);break}return}this.shouldMeasureDuringScroll(s)&&this.resizeItem(s,this.options.measureElement(t,e,this))};this.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(t):t()})}):null);return{disconnect:()=>{var s;null==(s=t())||s.disconnect(),e=null},observe:e=>{var s;return null==(s=t())?void 0:s.observe(e,{box:"border-box"})},unobserve:e=>{var s;return null==(s=t())?void 0:s.unobserve(e)}}})(),this.range=null,this.setOptions=e=>{var t,s;let r={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:a,rangeExtractor:d,onChange:()=>{},measureElement:p,initialRect:{width:0,height:0},scrollMargin:0,gap:0,indexAttribute:"data-index",initialMeasurementsCache:[],lanes:1,anchorTo:"start",followOnAppend:!1,scrollEndThreshold:1,isScrollingResetDelay:150,enabled:!0,isRtl:!1,useScrollendEvent:!1,useAnimationFrameWithResizeObserver:!1,laneAssignmentMode:"estimate",useCachedMeasurements:!1};for(let t in e){let s=e[t];void 0!==s&&(r[t]=s)}let n=this.options,i=null,l=null,o=!1;if(void 0!==n&&n.enabled&&r.enabled&&"end"===r.anchorTo&&null!==this.scrollElement){let e=n.count,a=r.count,d=this.getMeasurements(),c=e>0?(null==(t=d[0])?void 0:t.key)??n.getItemKey(0):null,h=e>0?(null==(s=d[e-1])?void 0:s.key)??n.getItemKey(e-1):null;if(a!==e||e>0&&a>0&&(r.getItemKey(0)!==c||r.getItemKey(a-1)!==h)){o=!0;let t=e>0?this.getVirtualItemForOffset(this.getScrollOffset())??d[0]:null;t&&(i=[t.key,this.getScrollOffset()-t.start]);let s=!0===r.followOnAppend?"auto":r.followOnAppend||null;s&&a>e&&this.isAtEnd(n.scrollEndThreshold)&&(0===e||r.getItemKey(a-1)!==h)&&(l=s)}}this.options=r,o&&(this.pendingMin=0,this.itemSizeCacheVersion++);let c=!1,h=0;if(i&&null!==this.scrollOffset){let[e,t]=i,s=this.getMeasurements(),{count:r,getItemKey:n}=this.options,l=0;for(;l<r&&n(l)!==e;)l++;if(l<r){let e=s[l];if(e){let s=e.start+t;s!==this.scrollOffset&&(h=s-this.scrollOffset,this.scrollOffset=s,c=!0)}}}(c||l)&&(this.pendingScrollAnchor=[c?i[0]:null,c?i[1]:0,l,h])},this.notify=e=>{var t,s;null==(s=(t=this.options).onChange)||s.call(t,this,e)},this.maybeNotify=i(()=>(this.calculateRange(),[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]),e=>{this.notify(e)},{key:!1,debug:()=>this.options.debug,initialDeps:[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]}),this.cleanup=()=>{this.unsubs.filter(Boolean).forEach(e=>e()),this.unsubs=[],this.observer.disconnect(),null!=this.rafId&&this.targetWindow&&(this.targetWindow.cancelAnimationFrame(this.rafId),this.rafId=null),this.scrollState=null,this.scrollElement=null,this.targetWindow=null},this._didMount=()=>()=>{this.cleanup()},this._willUpdate=()=>{var e;let t=this.options.enabled?this.options.getScrollElement():null;if(this.scrollElement!==t){if(this.cleanup(),!t)return void this.maybeNotify();if(this.scrollElement=t,this.scrollElement&&"ownerDocument"in this.scrollElement?this.targetWindow=this.scrollElement.ownerDocument.defaultView:this.targetWindow=(null==(e=this.scrollElement)?void 0:e.window)??null,this.elementsCache.forEach(e=>{this.observer.observe(e)}),this.unsubs.push(this.options.observeElementRect(this,e=>{this.scrollRect=e,this.maybeNotify()})),this.unsubs.push(this.options.observeElementOffset(this,(e,t)=>{null!==this._intendedScrollOffset&&1.5>Math.abs(e-this._intendedScrollOffset)&&(e=this._intendedScrollOffset),this._intendedScrollOffset=null,this.scrollAdjustments=0,this.scrollDirection=t?this.getScrollOffset()<e?"forward":"backward":null,this.scrollOffset=e,this.isScrolling=t,this._flushIosDeferredIfReady(),this.scrollState&&this.scheduleScrollReconcile(),this.maybeNotify()})),"addEventListener"in this.scrollElement){let e=this.scrollElement,t=()=>{this._iosTouching=!0,this._iosJustTouchEnded=!1,null!==this._iosTouchEndTimerId&&null!=this.targetWindow&&(this.targetWindow.clearTimeout(this._iosTouchEndTimerId),this._iosTouchEndTimerId=null)},s=()=>{this._iosTouching=!1,o()&&null!=this.targetWindow&&(this._iosJustTouchEnded=!0,this._iosTouchEndTimerId=this.targetWindow.setTimeout(()=>{this._iosJustTouchEnded=!1,this._iosTouchEndTimerId=null,this._flushIosDeferredIfReady()},150))};e.addEventListener("touchstart",t,c),e.addEventListener("touchend",s,c),this.unsubs.push(()=>{e.removeEventListener("touchstart",t),e.removeEventListener("touchend",s),null!==this._iosTouchEndTimerId&&null!=this.targetWindow&&(this.targetWindow.clearTimeout(this._iosTouchEndTimerId),this._iosTouchEndTimerId=null)})}this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0})}let s=this.pendingScrollAnchor;if(this.pendingScrollAnchor=null,s&&this.scrollElement&&this.options.enabled){let[e,t,r,n]=s;null===e||r||(o()&&(this.isScrolling||this._iosTouching||this._iosJustTouchEnded)?0!==n&&(this._iosDeferredAdjustment+=n):this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0})),r&&this.scrollToEnd({behavior:r})}},this._flushIosDeferredIfReady=()=>{if(0===this._iosDeferredAdjustment||this.isScrolling||this._iosTouching||this._iosJustTouchEnded)return;let e=this.getScrollOffset(),t=this.getMaxScrollOffset();if(e<0||e>t)return;let s=this._iosDeferredAdjustment;this._iosDeferredAdjustment=0,this._scrollToOffset(e,{adjustments:this.scrollAdjustments+=s,behavior:void 0})},this.rafId=null,this.getSize=()=>this.options.enabled?(this.scrollRect=this.scrollRect??this.options.initialRect,this.scrollRect[this.options.horizontal?"width":"height"]):(this.scrollRect=null,0),this.getScrollOffset=()=>this.options.enabled?(this.scrollOffset=this.scrollOffset??("function"==typeof this.options.initialOffset?this.options.initialOffset():this.options.initialOffset),this.scrollOffset):(this.scrollOffset=null,0),this.getFurthestMeasurement=(e,t)=>{let s=new Map,r=new Map;for(let n=t-1;n>=0;n--){let t=e[n];if(s.has(t.lane))continue;let i=r.get(t.lane);if(null==i||t.end>i.end?r.set(t.lane,t):t.end<i.end&&s.set(t.lane,!0),s.size===this.options.lanes)break}return r.size===this.options.lanes?Array.from(r.values()).sort((e,t)=>e.end===t.end?e.index-t.index:e.end-t.end)[0]:void 0},this.getMeasurementOptions=i(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled,this.options.lanes,this.options.laneAssignmentMode],(e,t,s,r,n,i,l)=>(void 0!==this.prevLanes&&this.prevLanes!==i&&(this.lanesChangedFlag=!0),this.prevLanes=i,this.pendingMin=null,{count:e,paddingStart:t,scrollMargin:s,getItemKey:r,enabled:n,lanes:i,laneAssignmentMode:l}),{key:!1}),this.getMeasurements=i(()=>[this.getMeasurementOptions(),this.itemSizeCacheVersion],({count:e,paddingStart:t,scrollMargin:s,getItemKey:r,enabled:n,lanes:i,laneAssignmentMode:l},o)=>{let a=this.itemSizeCache;if(!n)return this.measurementsCache=[],this.itemSizeCache.clear(),this.laneAssignments.clear(),[];if(this.laneAssignments.size>e)for(let t of this.laneAssignments.keys())t>=e&&this.laneAssignments.delete(t);this.lanesChangedFlag&&(this.lanesChangedFlag=!1,this.lanesSettling=!0,this.measurementsCache=[],this.itemSizeCache.clear(),this.laneAssignments.clear(),this.pendingMin=null),0!==this.measurementsCache.length||this.lanesSettling||(this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(e=>{this.itemSizeCache.set(e.key,e.size)}));let d=this.lanesSettling?0:this.pendingMin??0;if(this.pendingMin=null,this.lanesSettling&&this.measurementsCache.length===e&&(this.lanesSettling=!1),1===i){var c;let n,i=this.options.gap,l=2*e,o=this._flatMeasurements;if(!o||o.length<l){let e=new Float64Array(l);o&&d>0&&e.set(o.subarray(0,2*d)),o=e,this._flatMeasurements=o}if(0===d)n=t+s;else{let e=d-1;n=o[2*e]+o[2*e+1]+i}for(let t=d;t<e;t++){let e=r(t),s=a.get(e),l="number"==typeof s?s:this.options.estimateSize(t);o[2*t]=n,o[2*t+1]=l,n+=l+i}let h=(c=o,new Proxy(Array(e),{get(t,s,n){if("string"==typeof s){let n=s.charCodeAt(0);if(n>=48&&n<=57){let n=+s;if(Number.isInteger(n)&&n>=0&&n<e){let e=t[n];if(!e){let s=c[2*n];e=t[n]={index:n,key:r(n),start:s,size:c[2*n+1],end:s+c[2*n+1],lane:0}}return e}}if("length"===s)return e}return Reflect.get(t,s,n)}}));return this.measurementsCache=h,h}let h=this.measurementsCache.slice(0,d),u=Array(i).fill(void 0);for(let e=0;e<d;e++){let t=h[e];t&&(u[t.lane]=e)}for(let n=d;n<e;n++){let e,i,o=r(n),d=this.laneAssignments.get(n),c="estimate"===l||a.has(o);if(void 0!==d&&this.options.lanes>1){let r=u[e=d],n=void 0!==r?h[r]:void 0;i=n?n.end+this.options.gap:t+s}else{let r=1===this.options.lanes?h[n-1]:this.getFurthestMeasurement(h,n);i=r?r.end+this.options.gap:t+s,e=r?r.lane:n%this.options.lanes,this.options.lanes>1&&c&&this.laneAssignments.set(n,e)}let m=a.get(o),p="number"==typeof m?m:this.options.estimateSize(n),f=i+p;h[n]={index:n,start:i,size:p,end:f,key:o,lane:e},u[e]=n}return this.measurementsCache=h,h},{key:!1,debug:()=>this.options.debug}),this.calculateRange=i(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset(),this.options.lanes],(e,t,s,r)=>this.range=e.length>0&&t>0?function({measurements:e,outerSize:t,scrollOffset:s,lanes:r,flat:n}){let i=e.length-1,l=n?e=>n[2*e]:t=>e[t].start,o=n?e=>n[2*e]+n[2*e+1]:t=>e[t].end;if(e.length<=r)return{startIndex:0,endIndex:i};let a=x(0,i,l,s),d=a;if(1===r)for(;d<i&&o(d)<s+t;)d++;else if(r>1){let n=Array(r).fill(0);for(;d<i&&n.some(e=>e<s+t);){let t=e[d];n[t.lane]=t.end,d++}let l=Array(r).fill(s+t);for(;a>=0&&l.some(e=>e>=s);){let t=e[a];l[t.lane]=t.start,a--}a=Math.max(0,a-a%r),d=Math.min(i,d+(r-1-d%r))}return{startIndex:a,endIndex:d}}({measurements:e,outerSize:t,scrollOffset:s,lanes:r,flat:1===r&&null!=this._flatMeasurements?this._flatMeasurements:null}):null,{key:!1,debug:()=>this.options.debug}),this.getVirtualIndexes=i(()=>{let e=null,t=null,s=this.calculateRange();return s&&(e=s.startIndex,t=s.endIndex),this.maybeNotify.updateDeps([this.isScrolling,e,t]),[this.options.rangeExtractor,this.options.overscan,this.options.count,e,t]},(e,t,s,r,n)=>null===r||null===n?[]:e({startIndex:r,endIndex:n,overscan:t,count:s}),{key:!1,debug:()=>this.options.debug}),this.indexFromElement=e=>{let t=this.options.indexAttribute,s=e.getAttribute(t);return s?parseInt(s,10):(console.warn(`Missing attribute name '${t}={index}' on measured element.`),-1)},this.shouldMeasureDuringScroll=e=>{var t;if(!this.scrollState||"smooth"!==this.scrollState.behavior)return!0;let s=this.scrollState.index??(null==(t=this.getVirtualItemForOffset(this.scrollState.lastTargetOffset))?void 0:t.index);if(void 0!==s&&this.range){let t=Math.max(this.options.overscan,Math.ceil((this.range.endIndex-this.range.startIndex)/2)),r=Math.max(0,s-t),n=Math.min(this.options.count-1,s+t);return e>=r&&e<=n}return!0},this.measureElement=e=>{if(!e)return void this.elementsCache.forEach((e,t)=>{e.isConnected||(this.observer.unobserve(e),this.elementsCache.delete(t))});let t=this.indexFromElement(e),s=this.options.getItemKey(t),r=this.elementsCache.get(s);r!==e&&(r&&this.observer.unobserve(r),this.observer.observe(e),this.elementsCache.set(s,e)),(!this.isScrolling||this.scrollState)&&this.shouldMeasureDuringScroll(t)&&this.resizeItem(t,this.options.measureElement(e,void 0,this))},this.resizeItem=(e,t)=>{var s,r;let n,i,l;if(e<0||e>=this.options.count)return;let o=this._flatMeasurements;if(1===this.options.lanes&&null!==o)l=this.options.getItemKey(e),i=o[2*e],n=o[2*e+1];else{let t=this.measurementsCache[e];if(!t)return;l=t.key,i=t.start,n=t.size}let a=t-(this.itemSizeCache.get(l)??n);if(0!==a){let o="end"===this.options.anchorTo&&(null==(s=this.scrollState)?void 0:s.behavior)!=="smooth"&&this.getVirtualDistanceFromEnd()<=this.options.scrollEndThreshold,d=o?this.getTotalSize():0,c=(null==(r=this.scrollState)?void 0:r.behavior)!=="smooth"&&(void 0!==this.shouldAdjustScrollPositionOnItemSizeChange?this.shouldAdjustScrollPositionOnItemSizeChange(this.measurementsCache[e]??{index:e,key:l,start:i,size:n,end:i+n,lane:0},a,this):i<this.getScrollOffset()+this.scrollAdjustments&&"backward"!==this.scrollDirection);(null===this.pendingMin||e<this.pendingMin)&&(this.pendingMin=e),this.itemSizeCache.set(l,t),this.itemSizeCacheVersion++,o?this.applyScrollAdjustment(this.getTotalSize()-d):c&&this.applyScrollAdjustment(a),this.notify(!1)}},this.getVirtualItems=i(()=>[this.getVirtualIndexes(),this.getMeasurements()],(e,t)=>{let s=[];for(let r=0,n=e.length;r<n;r++){let n=t[e[r]];s.push(n)}return s},{key:!1,debug:()=>this.options.debug}),this.getVirtualItemForOffset=e=>{let t=this.getMeasurements();if(0===t.length)return;let s=this._flatMeasurements,r=1===this.options.lanes&&null!=s,n=x(0,t.length-1,r?e=>s[2*e]:e=>l(t[e]).start,e);return l(t[n])},this.getMaxScrollOffset=()=>{if(!this.scrollElement)return 0;if("scrollHeight"in this.scrollElement)return this.options.horizontal?this.scrollElement.scrollWidth-this.scrollElement.clientWidth:this.scrollElement.scrollHeight-this.scrollElement.clientHeight;{let e=this.scrollElement.document.documentElement;return this.options.horizontal?e.scrollWidth-this.scrollElement.innerWidth:e.scrollHeight-this.scrollElement.innerHeight}},this.getVirtualDistanceFromEnd=()=>Math.max(this.getTotalSize()-this.getSize()-this.getScrollOffset(),0),this.getDistanceFromEnd=()=>Math.max(this.getMaxScrollOffset()-this.getScrollOffset(),0),this.isAtEnd=(e=this.options.scrollEndThreshold)=>this.getDistanceFromEnd()<=e,this.getOffsetForAlignment=(e,t,s=0)=>{if(!this.scrollElement)return 0;let r=this.getSize(),n=this.getScrollOffset();return"auto"===t&&(t=e>=n+r?"end":"start"),"center"===t?e+=(s-r)/2:"end"===t&&(e-=r),Math.max(Math.min(this.getMaxScrollOffset(),e),0)},this.getOffsetForIndex=(e,t="auto")=>{e=Math.max(0,Math.min(e,this.options.count-1));let s=this.getSize(),r=this.getScrollOffset(),n=this.measurementsCache[e];if(!n)return;if("auto"===t)if(n.end>=r+s-this.options.scrollPaddingEnd)t="end";else{if(!(n.start<=r+this.options.scrollPaddingStart))return[r,t];t="start"}if("end"===t&&e===this.options.count-1)return[this.getMaxScrollOffset(),t];let i="end"===t?n.end+this.options.scrollPaddingEnd:n.start-this.options.scrollPaddingStart;return[this.getOffsetForAlignment(i,t,n.size),t]},this.scrollToOffset=(e,{align:t="start",behavior:s="auto"}={})=>{let r=this.getOffsetForAlignment(e,t),n=this.now();this.scrollState={index:null,align:t,behavior:s,startedAt:n,lastTargetOffset:r,stableFrames:0},this._scrollToOffset(r,{adjustments:void 0,behavior:s}),this.scheduleScrollReconcile()},this.scrollToIndex=(e,{align:t="auto",behavior:s="auto"}={})=>{e=Math.max(0,Math.min(e,this.options.count-1));let r=this.getOffsetForIndex(e,t);if(!r)return;let[n,i]=r,l=this.now();this.scrollState={index:e,align:i,behavior:s,startedAt:l,lastTargetOffset:n,stableFrames:0},this._scrollToOffset(n,{adjustments:void 0,behavior:s}),this.scheduleScrollReconcile()},this.scrollBy=(e,{behavior:t="auto"}={})=>{let s=this.getScrollOffset()+e,r=this.now();this.scrollState={index:null,align:"start",behavior:t,startedAt:r,lastTargetOffset:s,stableFrames:0},this._scrollToOffset(s,{adjustments:void 0,behavior:t}),this.scheduleScrollReconcile()},this.scrollToEnd=({behavior:e="auto"}={})=>{this.options.count>0?this.scrollToIndex(this.options.count-1,{align:"end",behavior:e}):this.scrollToOffset(Math.max(this.getTotalSize()-this.getSize(),0),{behavior:e})},this.getTotalSize=()=>{var e;let t,s=this.getMeasurements();if(0===s.length)t=this.options.paddingStart;else if(1===this.options.lanes){let r=s.length-1,n=this._flatMeasurements;t=null!=n?n[2*r]+n[2*r+1]:(null==(e=s[r])?void 0:e.end)??0}else{let e=Array(this.options.lanes).fill(null),r=s.length-1;for(;r>=0&&e.some(e=>null===e);){let t=s[r];null===e[t.lane]&&(e[t.lane]=t.end),r--}t=Math.max(...e.filter(e=>null!==e))}return Math.max(t-this.options.scrollMargin+this.options.paddingEnd,0)},this.takeSnapshot=()=>{let e=[];if(0===this.itemSizeCache.size)return e;for(let t of this.getMeasurements())t&&this.itemSizeCache.has(t.key)&&e.push({index:t.index,key:t.key,start:t.start,size:t.size,end:t.end,lane:t.lane});return e},this._scrollToOffset=(e,{adjustments:t,behavior:s})=>{this._intendedScrollOffset=e+(t??0),this.options.scrollToFn(e,{behavior:s,adjustments:t},this)},this.measure=()=>{this.pendingMin=null,this.itemSizeCache.clear(),this.laneAssignments.clear(),this.itemSizeCacheVersion++,this.notify(!1)},this.setOptions(e)}applyScrollAdjustment(e,t){0!==e&&(o()&&(this.isScrolling||this._iosTouching||this._iosJustTouchEnded)?this._iosDeferredAdjustment+=e:this._scrollToOffset(this.getScrollOffset(),{adjustments:this.scrollAdjustments+=e,behavior:t}))}scheduleScrollReconcile(){if(!this.targetWindow){this.scrollState=null;return}null==this.rafId&&(this.rafId=this.targetWindow.requestAnimationFrame(()=>{this.rafId=null,this.reconcileScroll()}))}reconcileScroll(){if(!this.scrollState||!this.scrollElement)return;if(this.now()-this.scrollState.startedAt>5e3){this.scrollState=null;return}let e=null!=this.scrollState.index?this.getOffsetForIndex(this.scrollState.index,this.scrollState.align):void 0,t=e?e[0]:this.scrollState.lastTargetOffset,s=t!==this.scrollState.lastTargetOffset;if(!s&&1.01>Math.abs(t-this.getScrollOffset())){if(this.scrollState.stableFrames++,this.scrollState.stableFrames>=1){this.getScrollOffset()!==t&&this._scrollToOffset(t,{adjustments:void 0,behavior:"auto"}),this.scrollState=null;return}}else if(this.scrollState.stableFrames=0,s){let e=this.getSize()||600,s=Math.abs(t-this.getScrollOffset()),r="smooth"===this.scrollState.behavior&&s>e;this.scrollState.lastTargetOffset=t,r||(this.scrollState.behavior="auto"),this._scrollToOffset(t,{adjustments:void 0,behavior:r?"smooth":"auto"})}this.scheduleScrollReconcile()}}let x=(e,t,s,r)=>{for(;e<=t;){let n=(e+t)/2|0,i=s(n);if(i<r)e=n+1;else{if(!(i>r))return n;t=n-1}}return e>0?e-1:0},y="u">typeof document?r.useLayoutEffect:r.useEffect;var b=e.i(16327),v=e.i(56420);let j=(0,v.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.106-3.105c.32-.322.863-.22.983.218a6 6 0 0 1-8.259 7.057l-7.91 7.91a1 1 0 0 1-2.999-3l7.91-7.91a6 6 0 0 1 7.057-8.259c.438.12.54.662.219.984z",key:"1ngwbx"}]]),w=(0,v.default)("user",[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]]),S=(0,v.default)("bot",[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]]),N=(0,v.default)("cpu",[["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M17 20v2",key:"1rnc9c"}],["path",{d:"M17 2v2",key:"11trls"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M2 17h2",key:"7oei6x"}],["path",{d:"M2 7h2",key:"asdhe0"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"M20 17h2",key:"1fpfkl"}],["path",{d:"M20 7h2",key:"1o8tra"}],["path",{d:"M7 20v2",key:"4gnj0m"}],["path",{d:"M7 2v2",key:"1i4yhu"}],["rect",{x:"4",y:"4",width:"16",height:"16",rx:"2",key:"1vbyd7"}],["rect",{x:"8",y:"8",width:"8",height:"8",rx:"1",key:"z9xiuo"}]]),M=(0,v.default)("clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6l4 2",key:"mmk7yg"}]]);var k=e.i(68590);let E=(0,v.default)("workflow",[["rect",{width:"8",height:"8",x:"3",y:"3",rx:"2",key:"by2w9f"}],["path",{d:"M7 11v4a2 2 0 0 0 2 2h4",key:"xkn7yn"}],["rect",{width:"8",height:"8",x:"13",y:"13",rx:"2",key:"1cgmvn"}]]);var T=e.i(34713);let I=r.default.memo(function({entries:e,compact:t=!1}){let n=(0,r.useMemo)(()=>(function(e){let t=0,s=0,r=0,n=0,i=0,l=new Set;for(let o of e)if("user"===o.type&&t++,"queue-operation"===o.type&&i++,"assistant"===o.type){for(let e of(s++,o.message.content))"tool_use"===e.type&&("Task"===e.name&&(e.subagentType||e.subagentId)?n++:r++);o.message.model&&l.add(o.message.model)}let o="";if(e.length>=2){let t=e[e.length-1].timestampMs-e[0].timestampMs;o=(0,T.formatDuration)(t)}return{turnCount:i,userCount:t,assistantCount:s,toolCallCount:r,subagentCount:n,duration:o,models:Array.from(l)}})(e),[e]),i=t?"w-3.5 h-3.5":"w-4 h-4",l=t?"text-xs font-medium":"text-sm font-medium",o=t?"text-[10px] text-muted-foreground":"text-xs text-muted-foreground",a=[...t?[]:[{Icon:k.MessageSquare,color:"text-primary",v:n.turnCount,l:"Turns"}],{Icon:w,color:"text-[color:var(--chart-1)]",v:n.userCount,l:"User"},{Icon:S,color:"text-[color:var(--chart-2)]",v:n.assistantCount,l:"Assistant"},{Icon:j,color:"text-[color:var(--chart-3)]",v:n.toolCallCount,l:t?"Tools":"Tool Calls"},{Icon:E,color:"text-[color:var(--chart-5)]",v:n.subagentCount,l:"Subagents"},{Icon:M,color:"text-[color:var(--chart-4)]",v:n.duration||"—",l:"Duration"},{Icon:N,color:"text-[color:var(--chart-5)]",v:n.models.length>0?n.models.join(", "):"—",l:t?"Model":"Model(s)"}];return(0,s.jsx)("div",{className:t?"bg-muted/30 border border-border/50 rounded-lg p-3 mb-3":"bg-card border border-border rounded-lg p-4",children:(0,s.jsx)("div",{className:`grid grid-cols-2 ${t?"sm:grid-cols-6 gap-3":"sm:grid-cols-4 lg:grid-cols-7 gap-4"}`,children:a.map(({Icon:e,color:t,v:r,l:n})=>(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)(e,{className:`${i} ${t}`}),(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{className:`${l} truncate max-w-[120px]`,children:r}),(0,s.jsx)("div",{className:o,children:n})]})]},n))})})}),C=(0,v.default)("play",[["path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",key:"10ikf1"}]]);var O=e.i(67927);function A(e){return JSON.stringify(e.raw,null,2)}let z=new Intl.DateTimeFormat("en-US",{month:"short",day:"numeric",year:"numeric",hour:"numeric",minute:"2-digit",second:"2-digit",hour12:!0});function _(e){let t=new Date(e),s=z.format(t),r=t.getMilliseconds().toString().padStart(3,"0");return`${s}.${r}`}let F=r.default.memo(function({entry:e,isCollapsed:t,entryCount:r,onToggle:n}){let i="function"==typeof n,l=(0,s.jsxs)("div",{className:`flex items-center gap-2 px-3 py-1 rounded-full bg-primary/10 border border-primary/20 text-primary text-xs font-medium${i?" group-hover:bg-primary/20 transition-colors":""}`,children:[i?(0,s.jsx)(O.ChevronRight,{className:`w-3 h-3 transition-transform ${t?"":"rotate-90"}`}):(0,s.jsx)(C,{className:"w-3 h-3"}),(0,s.jsx)("span",{children:e.label}),(0,s.jsx)("span",{className:"text-muted-foreground",children:_(e.timestampMs)}),i&&t&&"number"==typeof r&&(0,s.jsxs)("span",{className:"ml-1 px-1.5 py-0.5 rounded bg-primary/20 text-[10px] leading-none",children:[r," ",1===r?"entry":"entries"]})]});return i?(0,s.jsxs)("button",{type:"button",onClick:n,className:"group flex items-center gap-3 py-3 px-4 w-full cursor-pointer",children:[(0,s.jsx)("div",{className:"flex-1 h-px bg-primary/30"}),l,(0,s.jsx)("div",{className:"flex-1 h-px bg-primary/30"})]}):(0,s.jsxs)("div",{className:"flex items-center gap-3 py-3 px-4",children:[(0,s.jsx)("div",{className:"flex-1 h-px bg-primary/30"}),l,(0,s.jsx)("div",{className:"flex-1 h-px bg-primary/30"})]})});var D=e.i(47163);let R={user:"User",assistant:"Assistant","file-history-snapshot":"Snapshot",progress:"Progress",system:"System","queue-operation":"Queue"},$={user:"bg-[color:var(--chart-1)]/20 text-[color:var(--chart-1)] border-[color:var(--chart-1)]/30",assistant:"bg-[color:var(--chart-2)]/20 text-[color:var(--chart-2)] border-[color:var(--chart-2)]/30","file-history-snapshot":"bg-[color:var(--chart-3)]/20 text-[color:var(--chart-3)] border-[color:var(--chart-3)]/30",progress:"bg-[color:var(--chart-5)]/20 text-[color:var(--chart-5)] border-[color:var(--chart-5)]/30",system:"bg-[color:var(--chart-4)]/20 text-[color:var(--chart-4)] border-[color:var(--chart-4)]/30","queue-operation":"bg-primary/20 text-primary border-primary/30"},P={user:"border-l-[color:var(--chart-1)]",assistant:"border-l-[color:var(--chart-2)]","file-history-snapshot":"border-l-[color:var(--chart-3)]",progress:"border-l-[color:var(--chart-5)]",system:"border-l-[color:var(--chart-4)]","queue-operation":"border-l-primary"},W=(0,v.default)("file-text",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]),L=(0,v.default)("activity",[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]]);var U=e.i(66794);function q({type:e}){let t="w-4 h-4";switch(e){case"user":return(0,s.jsx)(w,{className:t});case"assistant":return(0,s.jsx)(S,{className:t});case"file-history-snapshot":return(0,s.jsx)(W,{className:t});case"progress":return(0,s.jsx)(L,{className:t});case"system":return(0,s.jsx)(U.Settings,{className:t});case"queue-operation":return(0,s.jsx)(C,{className:t})}}function B({type:e}){return(0,s.jsxs)("span",{className:`inline-flex items-center gap-1.5 px-2 py-0.5 text-xs font-mono rounded border ${$[e]}`,children:[(0,s.jsx)(q,{type:e}),R[e]]})}var H=e.i(24380);function V({block:e}){let t=(0,r.useMemo)(()=>JSON.stringify(e.input,null,2),[e]);return(0,s.jsxs)("div",{className:"space-y-2",children:[(0,s.jsxs)("details",{open:!0,children:[(0,s.jsx)("summary",{className:"text-xs text-muted-foreground cursor-pointer hover:text-foreground transition-colors",children:(0,s.jsxs)("span",{className:"inline-flex items-center gap-1",children:["Input",(0,s.jsx)(H.CopyButton,{text:t})]})}),(0,s.jsx)("pre",{className:"mt-1 p-2 bg-muted/50 rounded text-xs whitespace-pre-wrap break-words max-h-64 overflow-y-auto",children:t})]}),e.result?(0,s.jsxs)("div",{className:"border-l-2 border-primary/50 pl-3 space-y-1",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)("span",{className:"inline-block px-2 py-0.5 text-xs font-mono rounded border bg-primary/20 text-primary border-primary/30",children:"Result"}),(0,s.jsx)("span",{className:"text-xs text-muted-foreground",children:_(new Date(e.result.timestamp).getTime())})]}),e.result.content&&(0,s.jsxs)("details",{open:!0,children:[(0,s.jsx)("summary",{className:"text-xs text-muted-foreground cursor-pointer hover:text-foreground transition-colors",children:(0,s.jsxs)("span",{className:"inline-flex items-center gap-1",children:["Output",(0,s.jsx)(H.CopyButton,{text:e.result.content})]})}),(0,s.jsx)("pre",{className:"mt-1 p-2 bg-muted/50 rounded text-xs whitespace-pre-wrap break-words max-h-48 overflow-y-auto",children:e.result.content})]}),e.result.images?.map((e,t)=>(0,s.jsx)("img",{src:`data:${e.mediaType};base64,${e.base64}`,alt:`Tool result image ${t+1}`,className:"mt-2 max-w-full rounded border border-border"},t))]}):(0,s.jsx)("div",{className:"text-xs text-muted-foreground",children:"Tool did not return a result"})]})}let K=(0,v.default)("brain",[["path",{d:"M12 18V5",key:"adv99a"}],["path",{d:"M15 13a4.17 4.17 0 0 1-3-4 4.17 4.17 0 0 1-3 4",key:"1e3is1"}],["path",{d:"M17.598 6.5A3 3 0 1 0 12 5a3 3 0 1 0-5.598 1.5",key:"1gqd8o"}],["path",{d:"M17.997 5.125a4 4 0 0 1 2.526 5.77",key:"iwvgf7"}],["path",{d:"M18 18a4 4 0 0 0 2-7.464",key:"efp6ie"}],["path",{d:"M19.967 17.483A4 4 0 1 1 12 18a4 4 0 1 1-7.967-.517",key:"1gq6am"}],["path",{d:"M6 18a4 4 0 0 1-2-7.464",key:"k1g0md"}],["path",{d:"M6.003 5.125a4 4 0 0 0-2.526 5.77",key:"q97ue3"}]]),J=r.default.memo(function({block:e,entriesBySource:t,projectName:r,sessionId:n,highlightedUuid:i,autoExpandForUuid:l}){switch(e.type){case"text":return(0,s.jsx)("p",{className:"whitespace-pre-wrap text-sm",children:e.text});case"tool_use":if("Task"===e.name&&(e.subagentType||e.subagentId)){let o=e.subagentId&&t?t.get(`agent-${e.subagentId}`):void 0;return(0,s.jsx)(et,{block:e,subagentEntries:o,projectName:r,sessionId:n,highlightedUuid:i,autoExpandForUuid:l})}return(0,s.jsxs)("div",{className:"border border-border/50 rounded-lg p-3 bg-muted/10",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2 mb-2",children:[(0,s.jsx)(j,{className:"w-4 h-4 text-primary flex-shrink-0"}),(0,s.jsx)("span",{className:"font-mono text-sm text-primary truncate min-w-0",children:e.name}),e.result&&(0,s.jsx)("span",{className:"text-xs text-muted-foreground ml-auto flex-shrink-0",children:e.result.durationFormatted})]}),(0,s.jsx)(V,{block:e})]});case"thinking":return(0,s.jsx)("div",{className:"border border-[color:var(--chart-5)]/30 rounded-lg p-3 bg-[color:var(--chart-5)]/5",children:(0,s.jsxs)("details",{children:[(0,s.jsxs)("summary",{className:"flex items-center gap-2 text-xs cursor-pointer hover:text-foreground transition-colors text-[color:var(--chart-5)]",children:[(0,s.jsx)(K,{className:"w-4 h-4"}),(0,s.jsx)("span",{children:"Thinking"}),(0,s.jsxs)("span",{className:"text-muted-foreground ml-1",children:["(",e.thinking.length.toLocaleString()," chars)"]})]}),(0,s.jsx)("p",{className:"mt-2 whitespace-pre-wrap text-xs text-muted-foreground p-2 bg-muted/30 rounded max-h-64 overflow-y-auto",children:e.thinking})]})})}});function Y({entry:e}){return(0,s.jsx)("div",{children:e.message.content&&(0,s.jsx)("p",{className:"whitespace-pre-wrap text-sm",children:e.message.content})})}let X=r.default.memo(function({entry:e,entriesBySource:t,projectName:r,sessionId:n,highlightedUuid:i,autoExpandForUuid:l}){let{content:o}=e.message;return(0,s.jsx)("div",{className:"space-y-3",children:o.map((e,o)=>(0,s.jsx)(J,{block:e,entriesBySource:t,projectName:r,sessionId:n,highlightedUuid:i,autoExpandForUuid:l},o))})}),Q=r.default.memo(function({entry:e}){let t=(0,r.useMemo)(()=>{if("progress"===e.type){let t=e.raw.data,s=t?.agentId;return[t?.type,s&&`agent:${s}`].filter(Boolean).join(" | ")}return"file-history-snapshot"===e.type?"File history snapshot":e.type},[e.type,e.raw]);return(0,s.jsxs)("div",{className:"text-sm",children:[(0,s.jsx)("span",{className:"text-muted-foreground",children:t}),(0,s.jsxs)("details",{className:"mt-1",children:[(0,s.jsx)("summary",{className:"text-xs text-muted-foreground cursor-pointer hover:text-foreground transition-colors",children:"Show raw JSON"}),(0,s.jsx)("pre",{className:"mt-1 p-2 bg-muted/50 rounded text-xs whitespace-pre-wrap break-words max-h-64 overflow-y-auto",children:A(e)})]})]})}),G=(0,v.default)("link-2",[["path",{d:"M9 17H7A5 5 0 0 1 7 7h2",key:"8i5ue5"}],["path",{d:"M15 7h2a5 5 0 1 1 0 10h-2",key:"1b9ql8"}],["line",{x1:"8",x2:"16",y1:"12",y2:"12",key:"1jonct"}]]);var Z=e.i(55574);function ee({uuid:e}){let t=(0,r.useCallback)(async()=>{window.history.replaceState(null,"",`#entry-${e}`);try{await navigator.clipboard.writeText(window.location.href)}catch{let e=document.createElement("textarea");e.value=window.location.href,e.style.position="fixed",e.style.opacity="0",document.body.appendChild(e),e.select(),document.execCommand("copy"),document.body.removeChild(e)}(0,Z.toast)("Link copied")},[e]);return(0,s.jsx)("button",{onClick:t,title:"Copy link to entry",className:"inline-flex items-center justify-center rounded p-1 text-muted-foreground hover:text-foreground hover:bg-muted/80 transition-colors opacity-0 group-hover:opacity-100 transition-opacity",children:(0,s.jsx)(G,{className:"w-3.5 h-3.5"})})}function et({block:e,subagentEntries:t,projectName:n,sessionId:i,highlightedUuid:l,autoExpandForUuid:o}){let a=!!(o&&t?.some(e=>e.uuid===o)),[d,c]=(0,r.useState)(a);(0,r.useEffect)(()=>{if(!a)return;let e=requestAnimationFrame(()=>c(!0));return()=>cancelAnimationFrame(e)},[a]);let h=(0,r.useCallback)(()=>{c(e=>!e)},[]),u=t&&t.length>0;return(0,s.jsxs)("div",{className:"border border-border/50 rounded-lg p-3 bg-muted/10",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2 mb-2",children:[(0,s.jsx)(E,{className:"w-4 h-4 text-[color:var(--chart-5)]"}),(0,s.jsx)("span",{className:"font-mono text-sm text-[color:var(--chart-5)]",children:"Subagent"}),e.subagentType&&(0,s.jsx)("span",{className:"inline-flex items-center px-2 py-0.5 text-xs font-mono rounded border bg-[color:var(--chart-5)]/20 text-[color:var(--chart-5)] border-[color:var(--chart-5)]/30",children:e.subagentType}),e.result&&(0,s.jsx)("span",{className:"text-xs text-muted-foreground ml-auto",children:e.result.durationFormatted})]}),e.subagentDescription&&(0,s.jsx)("p",{className:"text-sm text-muted-foreground mb-2",children:e.subagentDescription}),e.subagentId&&t&&(0,s.jsxs)("button",{onClick:h,className:"inline-flex items-center gap-1.5 px-2.5 py-1 text-xs font-medium rounded border border-primary/30 bg-primary/10 text-primary hover:bg-primary/20 transition-colors mb-2",children:[(0,s.jsx)(O.ChevronRight,{className:(0,D.cn)("w-3 h-3 transition-transform",d&&"rotate-90")}),(0,s.jsxs)("span",{children:["agent-",e.subagentId]}),(0,s.jsx)("span",{className:"text-muted-foreground",children:d?"Collapse":"View subagent log"})]}),d&&(0,s.jsxs)("div",{className:"ml-4 pl-3 border-l-2 border-primary/30 mt-2 space-y-2",children:[t&&0===t.length&&(0,s.jsx)("div",{className:"text-xs text-muted-foreground py-2",children:"No entries found in subagent log."}),u&&(0,s.jsx)(s.Fragment,{children:(0,s.jsx)(I,{entries:t,compact:!0})}),t&&t.map(e=>"queue-operation"===e.type?(0,s.jsx)(F,{entry:e},e.uuid||e.timestamp):(0,s.jsx)(er,{entry:e,projectName:n,sessionId:i,isHighlighted:!!l&&e.uuid===l},e.uuid||e.timestamp))]}),(0,s.jsx)(V,{block:e})]})}function es({entry:e,entriesBySource:t,projectName:r,sessionId:n,highlightedUuid:i,autoExpandForUuid:l}){switch(e.type){case"user":return(0,s.jsx)(Y,{entry:e});case"assistant":return(0,s.jsx)(X,{entry:e,entriesBySource:t,projectName:r,sessionId:n,highlightedUuid:i,autoExpandForUuid:l});case"file-history-snapshot":case"progress":case"system":return(0,s.jsx)(Q,{entry:e})}}let er=r.default.memo(function({entry:e,entriesBySource:t,projectName:r,sessionId:n,isHighlighted:i,highlightedUuid:l,autoExpandForUuid:o}){return(0,s.jsxs)("div",{id:e.uuid?`entry-${e.uuid}`:void 0,className:(0,D.cn)(`group border-l-4 ${P[e.type]} bg-card/50 rounded-r-lg mb-2 hover:bg-muted/30 transition-colors`,i&&"entry-highlighted"),children:[(0,s.jsxs)("div",{className:"flex items-center gap-2 px-4 py-2 border-b border-border/30",children:[(0,s.jsx)(B,{type:e.type}),(0,s.jsxs)("div",{className:"flex items-center gap-1 ml-auto",children:[e.uuid&&(0,s.jsx)(ee,{uuid:e.uuid}),(0,s.jsx)(H.CopyButton,{text:function(e){switch(e.type){case"user":return e.message.content;case"assistant":return e.message.content.filter(e=>"text"===e.type).map(e=>e.text).join("\n");case"file-history-snapshot":case"progress":case"system":return A(e);case"queue-operation":return e.label}}(e)}),(0,s.jsx)("span",{className:"text-xs font-mono text-muted-foreground whitespace-nowrap",children:_(e.timestampMs)})]})]}),(0,s.jsx)("div",{className:"px-4 py-3",children:(0,s.jsx)(es,{entry:e,entriesBySource:t,projectName:r,sessionId:n,highlightedUuid:l,autoExpandForUuid:o})})]})},(e,t)=>e.entry===t.entry&&e.entriesBySource===t.entriesBySource&&e.projectName===t.projectName&&e.sessionId===t.sessionId&&e.isHighlighted===t.isHighlighted&&e.highlightedUuid===t.highlightedUuid&&e.autoExpandForUuid===t.autoExpandForUuid);var en=e.i(24637),ei=e.i(84026),el=e.i(29407),eo=e.i(16306),ea=e.i(82954),ed=e.i(73520),ec=e.i(85881);function eh({decision:e}){return"deny"===e?(0,s.jsxs)("span",{className:"inline-flex items-center gap-1 rounded px-1.5 py-0.5 text-[0.65rem] font-semibold tracking-wide uppercase bg-red-500/10 text-red-400 border border-red-500/20",children:[(0,s.jsx)(el.ShieldX,{className:"h-3 w-3"}),"Deny"]}):"instruct"===e?(0,s.jsxs)("span",{className:"inline-flex items-center gap-1 rounded px-1.5 py-0.5 text-[0.65rem] font-semibold tracking-wide uppercase bg-amber-500/10 text-amber-400 border border-amber-500/20",children:[(0,s.jsx)(eo.ShieldAlert,{className:"h-3 w-3"}),"Instruct"]}):(0,s.jsxs)("span",{className:"inline-flex items-center gap-1 rounded px-1.5 py-0.5 text-[0.65rem] font-semibold tracking-wide uppercase bg-emerald-500/10 text-emerald-400 border border-emerald-500/20",children:[(0,s.jsx)(ei.ShieldCheck,{className:"h-3 w-3"}),"Allow"]})}function eu({eventType:e}){return(0,s.jsx)("span",{className:"inline-flex items-center rounded px-1.5 py-0.5 text-[0.6rem] font-medium bg-muted text-muted-foreground border border-border/50",children:e})}function em({mode:e}){let t="default"===e;return(0,s.jsx)("span",{className:`inline-flex items-center rounded px-1.5 py-0.5 text-[0.6rem] font-medium border ${t?"bg-sky-500/10 text-sky-400 border-sky-500/20":"bg-amber-500/10 text-amber-400 border-amber-500/20"}`,children:e})}function ep({ms:e}){return(0,s.jsx)("span",{className:`font-mono text-[0.7rem] ${e>500?"text-red-400":e>100?"text-amber-400":"text-muted-foreground"}`,children:e<1e3?`${e}ms`:`${(e/1e3).toFixed(1)}s`})}function ef({value:e,onChange:t}){return(0,s.jsx)("div",{className:"inline-flex items-center rounded-md border border-border bg-muted/30 p-0.5",children:[{label:"All",value:""},{label:"Allow",value:"allow"},{label:"Instruct",value:"instruct"},{label:"Deny",value:"deny"}].map(r=>(0,s.jsx)("button",{onClick:()=>t(r.value),className:`px-2.5 py-1 text-[0.65rem] font-medium rounded transition-all ${e===r.value?"deny"===r.value?"bg-red-500/15 text-red-400 shadow-sm":"allow"===r.value?"bg-emerald-500/15 text-emerald-400 shadow-sm":"instruct"===r.value?"bg-amber-500/15 text-amber-400 shadow-sm":"bg-background text-foreground shadow-sm":"text-muted-foreground hover:text-foreground"}`,children:r.label},r.value))})}function eg({item:e}){return(0,s.jsx)("tr",{children:(0,s.jsx)("td",{colSpan:9,className:"px-0 py-0",children:(0,s.jsxs)("div",{className:"px-6 py-3 bg-muted/20 border-t border-border/30 space-y-2 text-xs animate-expand",children:[(0,s.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-x-8 gap-y-1.5",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("span",{className:"text-muted-foreground",children:"Session ID: "}),(0,s.jsx)("span",{className:"font-mono text-foreground",children:e.sessionId??"—"}),e.sessionId&&(0,s.jsx)(H.CopyButton,{text:e.sessionId})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("span",{className:"text-muted-foreground",children:"CWD: "}),(0,s.jsx)("span",{className:"font-mono text-foreground",children:e.cwd??"—"}),e.cwd&&(0,s.jsx)(H.CopyButton,{text:e.cwd})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("span",{className:"text-muted-foreground",children:"Transcript: "}),(0,s.jsx)("span",{className:"font-mono text-foreground break-all",children:e.transcriptPath??"—"}),e.transcriptPath?.startsWith("opencode-db://")&&(0,s.jsx)("span",{className:"text-muted-foreground ml-1",children:"(stored in opencode DB)"})]})]}),e.policyNames&&e.policyNames.length>1&&(0,s.jsxs)("div",{children:[(0,s.jsx)("span",{className:"text-muted-foreground",children:"Policies: "}),(0,s.jsx)("span",{className:"font-mono text-foreground",children:e.policyNames.join(", ")})]}),e.reason&&(0,s.jsxs)("div",{children:[(0,s.jsx)("span",{className:"text-muted-foreground",children:"Full reason: "}),(0,s.jsx)("span",{className:"text-foreground",children:e.reason})]})]})})})}function ex({sessionId:e,initialData:t}){let{intervalSec:n}=(0,ec.useAutoRefresh)(),[i,l]=(0,r.useState)(!1),[o,a]=(0,r.useState)(1),[d,c]=(0,r.useState)(t),[h,u]=(0,r.useState)(null),[m,p]=(0,r.useState)(""),[f,g]=(0,r.useState)(""),[x,y]=(0,r.useState)(""),v=(0,r.useRef)(null),j=(0,r.useRef)({filterDecision:m,filterEventType:f,filterPolicy:x});j.current={filterDecision:m,filterEventType:f,filterPolicy:x};let w=""!==m||""!==f||""!==x,S=(0,r.useCallback)(async t=>{try{let{filterDecision:s,filterEventType:r,filterPolicy:n}=j.current,i=await (0,en.searchHookActivityAction)({sessionId:e,decision:s||void 0,eventType:r||void 0,policyName:n||void 0},t);c(i)}catch{}},[e]);(0,r.useEffect)(()=>{S(o);let e=setInterval(()=>S(o),n>0?1e3*n:5e3);return()=>clearInterval(e)},[o,S,n]),(0,r.useEffect)(()=>(v.current&&clearTimeout(v.current),v.current=setTimeout(()=>{a(1),u(null),S(1)},300),()=>{v.current&&clearTimeout(v.current)}),[m,f,x]);let N=d.entries,M=d.totalPages;return(0,s.jsxs)("div",{children:[(0,s.jsxs)("button",{onClick:()=>l(e=>!e),className:"flex items-center gap-2 hover:opacity-80 transition-opacity",children:[(0,s.jsx)(b.ChevronDown,{className:`w-4 h-4 text-muted-foreground transition-transform ${i?"-rotate-90":""}`}),(0,s.jsx)("span",{className:"text-sm font-semibold text-muted-foreground uppercase tracking-wide",children:"Hook Logs"})]}),!i&&(0,s.jsxs)("div",{className:"mt-2 bg-card border border-border rounded-lg overflow-hidden shadow-sm",children:[(0,s.jsxs)("div",{className:"flex flex-wrap items-center gap-3 px-4 py-2.5 border-b border-border bg-muted/20",children:[(0,s.jsx)(ef,{value:m,onChange:p}),(0,s.jsxs)("select",{value:f,onChange:e=>g(e.target.value),className:"h-7 rounded-md border border-border bg-background px-2 text-xs text-foreground focus:outline-none focus:ring-2 focus:ring-primary/40 focus:border-primary/40 transition-shadow",children:[(0,s.jsx)("option",{value:"",children:"All Events"}),(0,s.jsx)("option",{value:"PreToolUse",children:"PreToolUse"}),(0,s.jsx)("option",{value:"PostToolUse",children:"PostToolUse"}),(0,s.jsx)("option",{value:"SessionStart",children:"SessionStart"}),(0,s.jsx)("option",{value:"SessionEnd",children:"SessionEnd"}),(0,s.jsx)("option",{value:"UserPromptSubmit",children:"UserPromptSubmit"}),(0,s.jsx)("option",{value:"PermissionRequest",children:"PermissionRequest"})]}),(0,s.jsx)("div",{className:"relative",children:(0,s.jsx)("input",{type:"text",value:x,onChange:e=>y(e.target.value),placeholder:"Filter by policy…",className:"h-7 rounded-md border border-border bg-background px-2.5 text-xs text-foreground placeholder:text-muted-foreground w-44 focus:outline-none focus:ring-2 focus:ring-primary/40 focus:border-primary/40 transition-shadow"})})]}),0===N.length?(0,s.jsxs)("div",{className:"flex flex-col items-center justify-center py-12 px-4",children:[(0,s.jsx)(ea.Shield,{className:"h-10 w-10 text-muted-foreground/30"}),(0,s.jsx)("p",{className:"text-sm text-muted-foreground mt-3",children:w?"No matching hook events.":"No hook events found."})]}):(0,s.jsx)("div",{className:"overflow-x-auto",children:(0,s.jsxs)("table",{className:"w-full text-xs",children:[(0,s.jsx)("thead",{children:(0,s.jsxs)("tr",{className:"text-left text-muted-foreground border-b border-border bg-muted/30",children:[(0,s.jsx)("th",{className:"px-4 py-2.5 font-medium w-6"}),(0,s.jsx)("th",{className:"px-3 py-2.5 font-medium",children:"Decision"}),(0,s.jsx)("th",{className:"px-3 py-2.5 font-medium",children:"Event"}),(0,s.jsx)("th",{className:"px-3 py-2.5 font-medium",children:"Tool"}),(0,s.jsx)("th",{className:"px-3 py-2.5 font-medium",children:"Policy"}),(0,s.jsx)("th",{className:"px-3 py-2.5 font-medium",children:"Reason"}),(0,s.jsx)("th",{className:"px-3 py-2.5 font-medium",children:"Duration"}),(0,s.jsx)("th",{className:"px-3 py-2.5 font-medium",children:"Mode"}),(0,s.jsx)("th",{className:"px-3 py-2.5 font-medium text-right",children:"Time"})]})}),(0,s.jsx)("tbody",{className:"divide-y divide-border/30",children:N.map((e,t)=>{let n="deny"===e.decision,i=h===t,l="instruct"===e.decision;return(0,s.jsxs)(r.default.Fragment,{children:[(0,s.jsxs)("tr",{onClick:()=>{u(e=>e===t?null:t)},className:`cursor-pointer transition-colors ${n?"bg-red-500/[0.03] hover:bg-red-500/[0.07] border-l-2 border-l-red-500/40":l?"bg-amber-500/[0.03] hover:bg-amber-500/[0.07] border-l-2 border-l-amber-500/40":t%2==0?"hover:bg-muted/30":"bg-muted/[0.04] hover:bg-muted/30"} ${i?"bg-muted/20":""}`,children:[(0,s.jsx)("td",{className:"px-4 py-2",children:(0,s.jsx)(b.ChevronDown,{className:`h-3.5 w-3.5 text-muted-foreground transition-transform duration-150 ${i?"rotate-0":"-rotate-90"}`})}),(0,s.jsx)("td",{className:"px-3 py-2",children:(0,s.jsx)(eh,{decision:e.decision})}),(0,s.jsx)("td",{className:"px-3 py-2",children:(0,s.jsx)(eu,{eventType:e.eventType})}),(0,s.jsx)("td",{className:"px-3 py-2 font-mono text-foreground",children:e.toolName??"—"}),(0,s.jsx)("td",{className:"px-3 py-2 font-mono text-foreground",children:e.policyNames&&e.policyNames.length>1?(0,s.jsxs)("span",{title:e.policyNames.join(", "),children:[e.policyNames[0],(0,s.jsxs)("span",{className:"text-muted-foreground text-[0.6rem]",children:[" +",e.policyNames.length-1]})]}):e.policyName??"—"}),(0,s.jsx)("td",{className:"px-3 py-2 text-muted-foreground truncate max-w-[240px]",title:e.reason??"",children:e.reason??"—"}),(0,s.jsx)("td",{className:"px-3 py-2",children:(0,s.jsx)(ep,{ms:e.durationMs})}),(0,s.jsx)("td",{className:"px-3 py-2",children:e.permissionMode?(0,s.jsx)(em,{mode:e.permissionMode}):"—"}),(0,s.jsx)("td",{className:"px-3 py-2 text-right text-muted-foreground whitespace-nowrap",title:new Date(e.timestamp).toLocaleString(void 0,{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit",second:"2-digit"}),children:(0,T.formatRelativeTime)(e.timestamp)})]}),i&&(0,s.jsx)(eg,{item:e})]},`${e.timestamp}-${t}`)})})]})}),(0,s.jsx)(ed.default,{currentPage:o,totalPages:M,onPageChange:e=>{a(e),u(null)}})]})]})}function ey(e){let t=new Map;for(let s of e)if("assistant"===s.type)for(let e of s.message.content){if("tool_use"!==e.type||"Task"===e.name&&(e.subagentType||e.subagentId))continue;let s=t.get(e.name)||{count:0,totalDurationMs:0};s.count++,e.result?.durationMs&&(s.totalDurationMs+=e.result.durationMs),t.set(e.name,s)}return Array.from(t.entries()).map(([e,t])=>({name:e,...t})).sort((e,t)=>t.count-e.count)}function eb({tools:e,compact:t}){return(0,s.jsx)("div",{className:`bg-card border border-border rounded-lg ${t?"p-3":"p-4"}`,children:(0,s.jsx)("div",{className:`grid grid-cols-[repeat(auto-fit,minmax(200px,1fr))] ${t?"gap-2":"gap-3"}`,children:e.map(e=>(0,s.jsxs)("div",{className:"flex items-center gap-2 min-w-0",children:[(0,s.jsx)(j,{className:"w-3.5 h-3.5 text-muted-foreground flex-shrink-0"}),(0,s.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,s.jsx)("div",{className:`${t?"text-xs":"text-sm"} font-mono font-medium truncate`,children:e.name}),(0,s.jsxs)("div",{className:"text-xs text-muted-foreground truncate",children:[e.count," call",1!==e.count?"s":"",e.totalDurationMs>0&&` \xb7 ${(e.totalDurationMs/1e3).toFixed(1)}s`]})]})]},e.name))})})}function ev(e){return`${e.uuid}-${e.timestampMs}`}function ej(){let e=window.location.hash;return e.startsWith("#entry-")?e.slice(7):null}function ew({entries:e,entriesBySource:t,projectName:i,sessionId:l}){let o=(0,r.useMemo)(()=>Array.from(t.values()).flat(),[t]),[a,d]=(0,r.useState)(new Set),[c,u]=(0,r.useState)(0),[p,x]=(0,r.useState)(()=>ej()),b=(0,r.useRef)(void 0),v=(0,r.useRef)(!1),j=(0,r.useRef)(null);(0,r.useLayoutEffect)(()=>{let e=j.current;if(!e)return;let t=()=>{let t=e.getBoundingClientRect().top+window.scrollY;u(e=>e===t?e:t)};t();let s=new ResizeObserver(t);return s.observe(document.body),window.addEventListener("resize",t),()=>{s.disconnect(),window.removeEventListener("resize",t)}},[]);let w=(0,r.useMemo)(()=>(function(e){let t=new Map,s=null,r=0;for(let n of e)"queue-operation"===n.type?(null!==s&&t.set(s,r),s=ev(n),r=0):null!==s&&r++;return null!==s&&t.set(s,r),t})(e),[e]),S=(0,r.useMemo)(()=>{let t;return t=!1,e.filter(e=>"queue-operation"===e.type?(t=a.has(ev(e)),!0):!t)},[e,a]),N=(0,r.useMemo)(()=>{let e=new Map;return S.forEach((t,s)=>{t.uuid&&e.set(t.uuid,s)}),e},[S]),M=(0,r.useMemo)(()=>(function(e){let t=new Map;for(let s of e)if("assistant"===s.type&&s.uuid)for(let e of s.message.content)"tool_use"===e.type&&"Task"===e.name&&e.subagentId&&t.set(e.subagentId,s.uuid);let s=new Map;for(let r of e){if(!r._source?.startsWith("agent-")||!r.uuid)continue;let e=r._source.slice(6),n=t.get(e);n&&s.set(r.uuid,n)}return s})(o),[o]),k=(0,r.useMemo)(()=>p&&M.has(p)?p:null,[p,M]),E=k?M.get(k)??null:null;(0,r.useEffect)(()=>{if(p)return b.current=setTimeout(()=>x(null),4e3),()=>{b.current&&clearTimeout(b.current)}},[]),(0,r.useEffect)(()=>{let e=()=>{let e=ej();x(e),v.current=!1,b.current&&clearTimeout(b.current),e&&(b.current=setTimeout(()=>x(null),4e3))};return window.addEventListener("hashchange",e),()=>window.removeEventListener("hashchange",e)},[]);let T=(0,r.useMemo)(()=>{if(!p)return null;let t=E??p,s=e.some(e=>e.uuid===t),r=N.has(t);if(s&&!r){let s=null;for(let r of e)if("queue-operation"===r.type)s=ev(r);else if(r.uuid===t&&s)return s}return null},[p,E,e,N]);(0,r.useEffect)(()=>{if(!T)return;let e=requestAnimationFrame(()=>{d(e=>{if(!e.has(T))return e;let t=new Set(e);return t.delete(T),t})});return()=>cancelAnimationFrame(e)},[T]);let I=(0,r.useCallback)(e=>{d(t=>{let s=new Set(t);return s.has(e)?s.delete(e):s.add(e),s})},[]),C=function({useFlushSync:e=!0,directDomUpdates:t=!1,directDomUpdatesMode:s="transform",...i}){let l=r.useReducer(e=>e+1,0)[1],o=r.useRef({enabled:t,mode:s,container:null,lastSize:null,lastPositions:new WeakMap,prevRange:null});o.current.enabled=t,o.current.mode=s;let a=e=>{let t=o.current;if(!t.enabled)return;let s=e.getTotalSize();if(t.container&&s!==t.lastSize){t.lastSize=s;let r=e.options.horizontal?"width":"height";t.container.style[r]=`${s}px`}let r=!!e.options.horizontal,n="transform"===t.mode,i=r?"left":"top",l=e.options.scrollMargin;for(let s of e.getVirtualItems()){let o=s.start-l,a=e.elementsCache.get(s.key);a&&t.lastPositions.get(a)!==o&&(t.lastPositions.set(a,o),n?a.style.transform=r?`translate3d(${o}px, 0, 0)`:`translate3d(0, ${o}px, 0)`:a.style[i]=`${o}px`)}},d={...i,onChange:(t,s)=>{var r;let d=o.current,c=!0;if(d.enabled){a(t);let e=t.range,s=d.prevRange;(c=!s||s.isScrolling!==t.isScrolling||s.startIndex!==(null==e?void 0:e.startIndex)||s.endIndex!==(null==e?void 0:e.endIndex))&&(d.prevRange=e?{startIndex:e.startIndex,endIndex:e.endIndex,isScrolling:t.isScrolling}:null)}c&&(e&&s?(0,n.flushSync)(l):l()),null==(r=i.onChange)||r.call(i,t,s)}},[c]=r.useState(()=>{let e=new g(d);return Object.assign(e,{containerRef:t=>{let s=o.current;if(s.container=t,s.lastSize=null,t&&s.enabled){let r=e.getTotalSize();s.lastSize=r;let n=e.options.horizontal?"width":"height";t.style[n]=`${r}px`}}})});return c.setOptions(d),y(()=>c._didMount(),[]),y(()=>c._willUpdate()),y(()=>{a(c)}),c}({getScrollElement:()=>"u">typeof document?window:null,observeElementRect:h,observeElementOffset:m,scrollToFn:f,initialOffset:()=>"u">typeof document?window.scrollY:0,...{count:S.length,estimateSize:e=>(function(e){switch(e.type){case"queue-operation":return 48;case"user":return 90;case"assistant":return 80+120*e.message.content.length;default:return 100}})(S[e]),overscan:5,scrollMargin:c}});return(0,r.useEffect)(()=>{if(!p||v.current)return;let e=E??p,t=N.get(e);null!=t&&(v.current=!0,requestAnimationFrame(()=>{C.scrollToIndex(t,{align:"center"})}))},[p,E,N,C]),(0,s.jsx)("div",{ref:j,children:(0,s.jsx)("div",{style:{height:`${C.getTotalSize()}px`,width:"100%",position:"relative"},children:C.getVirtualItems().map(e=>{let r=S[e.index],n=!!p&&r.uuid===(E??p);return(0,s.jsx)("div",{"data-index":e.index,ref:C.measureElement,style:{position:"absolute",top:0,left:0,width:"100%",transform:`translateY(${e.start-C.options.scrollMargin}px)`},children:"queue-operation"===r.type?(0,s.jsx)(F,{entry:r,isCollapsed:a.has(ev(r)),entryCount:w.get(ev(r))??0,onToggle:()=>I(ev(r))}):(0,s.jsx)(er,{entry:r,entriesBySource:t,projectName:i,sessionId:l,isHighlighted:!k&&n,highlightedUuid:k,autoExpandForUuid:k})},"queue-operation"===r.type?ev(r):r.uuid||r.timestamp)})})})}let eS=[];e.s([],76248),e.i(76248),e.s(["default",0,function({entries:e,projectName:t,sessionId:n}){let i=(0,r.useMemo)(()=>{let t=new Map;for(let s of e){let e=t.get(s._source);e?e.push(s):t.set(s._source,[s])}return t},[e]),l=i.get("session")??eS,o=(0,r.useMemo)(()=>(function(e){let t=new Map;for(let s of e)if("assistant"===s.type)for(let e of s.message.content)"tool_use"===e.type&&"Task"===e.name&&e.subagentId&&(t.has(e.subagentId)||t.set(e.subagentId,{id:e.subagentId,type:e.subagentType||"unknown",description:e.subagentDescription||""}));return Array.from(t.values())})(e),[e]),a=(0,r.useMemo)(()=>ey(l),[l]),[d,c]=(0,r.useState)(!1),[h,u]=(0,r.useState)(new Set),[m,p]=(0,r.useState)(!1),[f,g]=(0,r.useState)(null);(0,r.useEffect)(()=>{(0,en.searchHookActivityAction)({sessionId:n},1).then(e=>{e.entries.length>0&&g(e)}).catch(()=>{})},[n]),(0,r.useEffect)(()=>{let e=()=>{window.location.hash.startsWith("#entry-")&&p(!1)};return window.addEventListener("hashchange",e),()=>window.removeEventListener("hashchange",e)},[]);let x=(0,r.useCallback)(e=>{u(t=>{let s=new Set(t);return s.has(e)?s.delete(e):s.add(e),s})},[]);return(0,s.jsxs)("div",{className:"space-y-4",children:[(0,s.jsx)(I,{entries:l}),f&&(0,s.jsx)(ex,{sessionId:n,initialData:f},n),o.length>0&&(0,s.jsxs)("div",{className:"space-y-3",children:[(0,s.jsxs)("button",{onClick:()=>c(e=>!e),className:"flex items-center gap-2 hover:opacity-80 transition-opacity",children:[(0,s.jsx)(b.ChevronDown,{className:`w-4 h-4 text-muted-foreground transition-transform ${d?"-rotate-90":""}`}),(0,s.jsx)("span",{className:"text-sm font-semibold text-muted-foreground uppercase tracking-wide",children:"Subagents"}),(0,s.jsxs)("span",{className:"text-xs text-muted-foreground",children:["(",o.length,")"]})]}),!d&&o.map(e=>{let t;return(0,s.jsxs)("div",{className:"pl-3 border-l-2 border-primary/30 space-y-2",children:[(0,s.jsxs)("button",{onClick:()=>x(e.id),className:"flex items-center gap-2 hover:opacity-80 transition-opacity",children:[(0,s.jsx)(b.ChevronDown,{className:`w-3.5 h-3.5 text-muted-foreground transition-transform ${h.has(e.id)?"-rotate-90":""}`}),(0,s.jsx)("span",{className:"text-sm font-bold",children:e.type}),e.description&&(0,s.jsx)("span",{className:"text-xs text-muted-foreground truncate max-w-[400px]",children:e.description})]}),!h.has(e.id)&&(0,s.jsxs)("div",{className:"space-y-2",children:[(0,s.jsx)(I,{entries:i.get(`agent-${e.id}`)||[],compact:!0}),(t=ey(i.get(`agent-${e.id}`)||[])).length>0?(0,s.jsx)(eb,{tools:t,compact:!0}):null]})]},e.id)})]}),a.length>0&&(0,s.jsxs)("div",{className:"space-y-3",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)("span",{className:"text-sm font-semibold text-muted-foreground uppercase tracking-wide",children:"Tools"}),(0,s.jsxs)("span",{className:"text-xs text-muted-foreground",children:["(",a.reduce((e,t)=>e+t.count,0),")"]})]}),(0,s.jsx)(eb,{tools:a})]}),(0,s.jsxs)("div",{children:[(0,s.jsxs)("button",{onClick:()=>p(e=>!e),className:"flex items-center gap-2 hover:opacity-80 transition-opacity",children:[(0,s.jsx)(b.ChevronDown,{className:`w-4 h-4 text-muted-foreground transition-transform ${m?"-rotate-90":""}`}),(0,s.jsx)("span",{className:"text-sm font-semibold text-muted-foreground uppercase tracking-wide",children:"Logs"})]}),!m&&(0,s.jsx)("div",{className:"mt-2 bg-card border border-border rounded-lg p-4 shadow-sm",children:0===l.length?(0,s.jsx)("p",{className:"text-muted-foreground text-center py-8",children:"No entries found."}):(0,s.jsx)(ew,{entries:l,entriesBySource:i,projectName:t,sessionId:n})})]})]})}],36406)},5780,e=>{e.n(e.i(36406))}]);
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,36406,e=>{"use strict";let t;var s=e.i(43476),r=e.i(71645),n=e.i(74080);function i(e,t,s){let r,n=s.initialDeps??[],i=!0;function l(){let l=e();return(l.length!==n.length||l.some((e,t)=>n[t]!==e))&&(n=l,r=t(...l),(null==s?void 0:s.onChange)&&!(i&&s.skipInitialOnChange)&&s.onChange(r),i=!1),r}return l.updateDeps=e=>{n=e},l}function l(e,t){if(void 0!==e)return e;throw Error(`Unexpected undefined${t?`: ${t}`:""}`)}e.i(47167);let o=()=>{if(void 0!==t)return t;if("u"<typeof navigator)return t=!1;if(/iP(hone|od|ad)/.test(navigator.userAgent))return t=!0;let e=navigator.maxTouchPoints;return t="MacIntel"===navigator.platform&&void 0!==e&&e>0},a=e=>e,d=e=>{let t=Math.max(e.startIndex-e.overscan,0),s=Math.min(e.endIndex+e.overscan,e.count-1)-t+1,r=Array(s);for(let e=0;e<s;e++)r[e]=t+e;return r},c={passive:!0},h=(e,t)=>{let s=e.scrollElement;if(!s)return;let r=()=>{t({width:s.innerWidth,height:s.innerHeight})};return r(),s.addEventListener("resize",r,c),()=>{s.removeEventListener("resize",r)}},u="u"<typeof window||"onscrollend"in window,m=(e,t)=>((e,t,s)=>{var r,n;let i,l=e.scrollElement;if(!l)return;let o=e.targetWindow;if(!o)return;let a=e.options.useScrollendEvent&&u,d=0,h=a?null:(r=()=>t(d,!1),n=e.options.isScrollingResetDelay,function(...e){o.clearTimeout(i),i=o.setTimeout(()=>r.apply(this,e),n)}),m=e=>()=>{d=s(l),null==h||h(),t(d,e)},p=m(!0),f=m(!1);return l.addEventListener("scroll",p,c),a&&l.addEventListener("scrollend",f,c),()=>{l.removeEventListener("scroll",p),a&&l.removeEventListener("scrollend",f)}})(e,t,t=>e.options.horizontal?t.scrollX:t.scrollY),p=(e,t,s)=>{if(s.options.useCachedMeasurements){let t=s.indexFromElement(e),r=s.options.getItemKey(t);return s.itemSizeCache.get(r)??s.options.estimateSize(t)}if(null==t?void 0:t.borderBoxSize){let e=t.borderBoxSize[0];if(e)return Math.round(e[s.options.horizontal?"inlineSize":"blockSize"])}if(!t){let t=s.indexFromElement(e),r=s.options.getItemKey(t),n=s.itemSizeCache.get(r);if(void 0!==n)return n}return e[s.options.horizontal?"offsetWidth":"offsetHeight"]},f=(e,{adjustments:t=0,behavior:s},r)=>{var n,i;null==(i=null==(n=r.scrollElement)?void 0:n.scrollTo)||i.call(n,{[r.options.horizontal?"left":"top"]:e+t,behavior:s})};class g{constructor(e){this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.isScrolling=!1,this.scrollState=null,this.measurementsCache=[],this._flatMeasurements=null,this.itemSizeCache=new Map,this.itemSizeCacheVersion=0,this.laneAssignments=new Map,this.pendingMin=null,this.prevLanes=void 0,this.lanesChangedFlag=!1,this.lanesSettling=!1,this.pendingScrollAnchor=null,this.scrollRect=null,this.scrollOffset=null,this.scrollDirection=null,this.scrollAdjustments=0,this._iosDeferredAdjustment=0,this._iosTouching=!1,this._iosJustTouchEnded=!1,this._iosTouchEndTimerId=null,this._intendedScrollOffset=null,this.elementsCache=new Map,this.now=()=>{var e,t,s;return(null==(s=null==(t=null==(e=this.targetWindow)?void 0:e.performance)?void 0:t.now)?void 0:s.call(t))??Date.now()},this.observer=(()=>{let e=null,t=()=>e||(this.targetWindow&&this.targetWindow.ResizeObserver?e=new this.targetWindow.ResizeObserver(e=>{e.forEach(e=>{let t=()=>{let t=e.target,s=this.indexFromElement(t);if(!t.isConnected){for(let[e,s]of(this.observer.unobserve(t),this.elementsCache))if(s===t){this.elementsCache.delete(e);break}return}this.shouldMeasureDuringScroll(s)&&this.resizeItem(s,this.options.measureElement(t,e,this))};this.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(t):t()})}):null);return{disconnect:()=>{var s;null==(s=t())||s.disconnect(),e=null},observe:e=>{var s;return null==(s=t())?void 0:s.observe(e,{box:"border-box"})},unobserve:e=>{var s;return null==(s=t())?void 0:s.unobserve(e)}}})(),this.range=null,this.setOptions=e=>{var t,s;let r={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:a,rangeExtractor:d,onChange:()=>{},measureElement:p,initialRect:{width:0,height:0},scrollMargin:0,gap:0,indexAttribute:"data-index",initialMeasurementsCache:[],lanes:1,anchorTo:"start",followOnAppend:!1,scrollEndThreshold:1,isScrollingResetDelay:150,enabled:!0,isRtl:!1,useScrollendEvent:!1,useAnimationFrameWithResizeObserver:!1,laneAssignmentMode:"estimate",useCachedMeasurements:!1};for(let t in e){let s=e[t];void 0!==s&&(r[t]=s)}let n=this.options,i=null,l=null,o=!1;if(void 0!==n&&n.enabled&&r.enabled&&"end"===r.anchorTo&&null!==this.scrollElement){let e=n.count,a=r.count,d=this.getMeasurements(),c=e>0?(null==(t=d[0])?void 0:t.key)??n.getItemKey(0):null,h=e>0?(null==(s=d[e-1])?void 0:s.key)??n.getItemKey(e-1):null;if(a!==e||e>0&&a>0&&(r.getItemKey(0)!==c||r.getItemKey(a-1)!==h)){o=!0;let t=e>0?this.getVirtualItemForOffset(this.getScrollOffset())??d[0]:null;t&&(i=[t.key,this.getScrollOffset()-t.start]);let s=!0===r.followOnAppend?"auto":r.followOnAppend||null;s&&a>e&&this.isAtEnd(n.scrollEndThreshold)&&(0===e||r.getItemKey(a-1)!==h)&&(l=s)}}this.options=r,o&&(this.pendingMin=0,this.itemSizeCacheVersion++);let c=!1,h=0;if(i&&null!==this.scrollOffset){let[e,t]=i,s=this.getMeasurements(),{count:r,getItemKey:n}=this.options,l=0;for(;l<r&&n(l)!==e;)l++;if(l<r){let e=s[l];if(e){let s=e.start+t;s!==this.scrollOffset&&(h=s-this.scrollOffset,this.scrollOffset=s,c=!0)}}}(c||l)&&(this.pendingScrollAnchor=[c?i[0]:null,c?i[1]:0,l,h])},this.notify=e=>{var t,s;null==(s=(t=this.options).onChange)||s.call(t,this,e)},this.maybeNotify=i(()=>(this.calculateRange(),[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]),e=>{this.notify(e)},{key:!1,debug:()=>this.options.debug,initialDeps:[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]}),this.cleanup=()=>{this.unsubs.filter(Boolean).forEach(e=>e()),this.unsubs=[],this.observer.disconnect(),null!=this.rafId&&this.targetWindow&&(this.targetWindow.cancelAnimationFrame(this.rafId),this.rafId=null),this.scrollState=null,this.scrollElement=null,this.targetWindow=null},this._didMount=()=>()=>{this.cleanup()},this._willUpdate=()=>{var e;let t=this.options.enabled?this.options.getScrollElement():null;if(this.scrollElement!==t){if(this.cleanup(),!t)return void this.maybeNotify();if(this.scrollElement=t,this.scrollElement&&"ownerDocument"in this.scrollElement?this.targetWindow=this.scrollElement.ownerDocument.defaultView:this.targetWindow=(null==(e=this.scrollElement)?void 0:e.window)??null,this.elementsCache.forEach(e=>{this.observer.observe(e)}),this.unsubs.push(this.options.observeElementRect(this,e=>{this.scrollRect=e,this.maybeNotify()})),this.unsubs.push(this.options.observeElementOffset(this,(e,t)=>{null!==this._intendedScrollOffset&&1.5>Math.abs(e-this._intendedScrollOffset)&&(e=this._intendedScrollOffset),this._intendedScrollOffset=null,this.scrollAdjustments=0,this.scrollDirection=t?this.getScrollOffset()<e?"forward":"backward":null,this.scrollOffset=e,this.isScrolling=t,this._flushIosDeferredIfReady(),this.scrollState&&this.scheduleScrollReconcile(),this.maybeNotify()})),"addEventListener"in this.scrollElement){let e=this.scrollElement,t=()=>{this._iosTouching=!0,this._iosJustTouchEnded=!1,null!==this._iosTouchEndTimerId&&null!=this.targetWindow&&(this.targetWindow.clearTimeout(this._iosTouchEndTimerId),this._iosTouchEndTimerId=null)},s=()=>{this._iosTouching=!1,o()&&null!=this.targetWindow&&(this._iosJustTouchEnded=!0,this._iosTouchEndTimerId=this.targetWindow.setTimeout(()=>{this._iosJustTouchEnded=!1,this._iosTouchEndTimerId=null,this._flushIosDeferredIfReady()},150))};e.addEventListener("touchstart",t,c),e.addEventListener("touchend",s,c),this.unsubs.push(()=>{e.removeEventListener("touchstart",t),e.removeEventListener("touchend",s),null!==this._iosTouchEndTimerId&&null!=this.targetWindow&&(this.targetWindow.clearTimeout(this._iosTouchEndTimerId),this._iosTouchEndTimerId=null)})}this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0})}let s=this.pendingScrollAnchor;if(this.pendingScrollAnchor=null,s&&this.scrollElement&&this.options.enabled){let[e,t,r,n]=s;null===e||r||(o()&&(this.isScrolling||this._iosTouching||this._iosJustTouchEnded)?0!==n&&(this._iosDeferredAdjustment+=n):this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0})),r&&this.scrollToEnd({behavior:r})}},this._flushIosDeferredIfReady=()=>{if(0===this._iosDeferredAdjustment||this.isScrolling||this._iosTouching||this._iosJustTouchEnded)return;let e=this.getScrollOffset(),t=this.getMaxScrollOffset();if(e<0||e>t)return;let s=this._iosDeferredAdjustment;this._iosDeferredAdjustment=0,this._scrollToOffset(e,{adjustments:this.scrollAdjustments+=s,behavior:void 0})},this.rafId=null,this.getSize=()=>this.options.enabled?(this.scrollRect=this.scrollRect??this.options.initialRect,this.scrollRect[this.options.horizontal?"width":"height"]):(this.scrollRect=null,0),this.getScrollOffset=()=>this.options.enabled?(this.scrollOffset=this.scrollOffset??("function"==typeof this.options.initialOffset?this.options.initialOffset():this.options.initialOffset),this.scrollOffset):(this.scrollOffset=null,0),this.getFurthestMeasurement=(e,t)=>{let s=new Map,r=new Map;for(let n=t-1;n>=0;n--){let t=e[n];if(s.has(t.lane))continue;let i=r.get(t.lane);if(null==i||t.end>i.end?r.set(t.lane,t):t.end<i.end&&s.set(t.lane,!0),s.size===this.options.lanes)break}return r.size===this.options.lanes?Array.from(r.values()).sort((e,t)=>e.end===t.end?e.index-t.index:e.end-t.end)[0]:void 0},this.getMeasurementOptions=i(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled,this.options.lanes,this.options.laneAssignmentMode],(e,t,s,r,n,i,l)=>(void 0!==this.prevLanes&&this.prevLanes!==i&&(this.lanesChangedFlag=!0),this.prevLanes=i,this.pendingMin=null,{count:e,paddingStart:t,scrollMargin:s,getItemKey:r,enabled:n,lanes:i,laneAssignmentMode:l}),{key:!1}),this.getMeasurements=i(()=>[this.getMeasurementOptions(),this.itemSizeCacheVersion],({count:e,paddingStart:t,scrollMargin:s,getItemKey:r,enabled:n,lanes:i,laneAssignmentMode:l},o)=>{let a=this.itemSizeCache;if(!n)return this.measurementsCache=[],this.itemSizeCache.clear(),this.laneAssignments.clear(),[];if(this.laneAssignments.size>e)for(let t of this.laneAssignments.keys())t>=e&&this.laneAssignments.delete(t);this.lanesChangedFlag&&(this.lanesChangedFlag=!1,this.lanesSettling=!0,this.measurementsCache=[],this.itemSizeCache.clear(),this.laneAssignments.clear(),this.pendingMin=null),0!==this.measurementsCache.length||this.lanesSettling||(this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(e=>{this.itemSizeCache.set(e.key,e.size)}));let d=this.lanesSettling?0:this.pendingMin??0;if(this.pendingMin=null,this.lanesSettling&&this.measurementsCache.length===e&&(this.lanesSettling=!1),1===i){var c;let n,i=this.options.gap,l=2*e,o=this._flatMeasurements;if(!o||o.length<l){let e=new Float64Array(l);o&&d>0&&e.set(o.subarray(0,2*d)),o=e,this._flatMeasurements=o}if(0===d)n=t+s;else{let e=d-1;n=o[2*e]+o[2*e+1]+i}for(let t=d;t<e;t++){let e=r(t),s=a.get(e),l="number"==typeof s?s:this.options.estimateSize(t);o[2*t]=n,o[2*t+1]=l,n+=l+i}let h=(c=o,new Proxy(Array(e),{get(t,s,n){if("string"==typeof s){let n=s.charCodeAt(0);if(n>=48&&n<=57){let n=+s;if(Number.isInteger(n)&&n>=0&&n<e){let e=t[n];if(!e){let s=c[2*n];e=t[n]={index:n,key:r(n),start:s,size:c[2*n+1],end:s+c[2*n+1],lane:0}}return e}}if("length"===s)return e}return Reflect.get(t,s,n)}}));return this.measurementsCache=h,h}let h=this.measurementsCache.slice(0,d),u=Array(i).fill(void 0);for(let e=0;e<d;e++){let t=h[e];t&&(u[t.lane]=e)}for(let n=d;n<e;n++){let e,i,o=r(n),d=this.laneAssignments.get(n),c="estimate"===l||a.has(o);if(void 0!==d&&this.options.lanes>1){let r=u[e=d],n=void 0!==r?h[r]:void 0;i=n?n.end+this.options.gap:t+s}else{let r=1===this.options.lanes?h[n-1]:this.getFurthestMeasurement(h,n);i=r?r.end+this.options.gap:t+s,e=r?r.lane:n%this.options.lanes,this.options.lanes>1&&c&&this.laneAssignments.set(n,e)}let m=a.get(o),p="number"==typeof m?m:this.options.estimateSize(n),f=i+p;h[n]={index:n,start:i,size:p,end:f,key:o,lane:e},u[e]=n}return this.measurementsCache=h,h},{key:!1,debug:()=>this.options.debug}),this.calculateRange=i(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset(),this.options.lanes],(e,t,s,r)=>this.range=e.length>0&&t>0?function({measurements:e,outerSize:t,scrollOffset:s,lanes:r,flat:n}){let i=e.length-1,l=n?e=>n[2*e]:t=>e[t].start,o=n?e=>n[2*e]+n[2*e+1]:t=>e[t].end;if(e.length<=r)return{startIndex:0,endIndex:i};let a=x(0,i,l,s),d=a;if(1===r)for(;d<i&&o(d)<s+t;)d++;else if(r>1){let n=Array(r).fill(0);for(;d<i&&n.some(e=>e<s+t);){let t=e[d];n[t.lane]=t.end,d++}let l=Array(r).fill(s+t);for(;a>=0&&l.some(e=>e>=s);){let t=e[a];l[t.lane]=t.start,a--}a=Math.max(0,a-a%r),d=Math.min(i,d+(r-1-d%r))}return{startIndex:a,endIndex:d}}({measurements:e,outerSize:t,scrollOffset:s,lanes:r,flat:1===r&&null!=this._flatMeasurements?this._flatMeasurements:null}):null,{key:!1,debug:()=>this.options.debug}),this.getVirtualIndexes=i(()=>{let e=null,t=null,s=this.calculateRange();return s&&(e=s.startIndex,t=s.endIndex),this.maybeNotify.updateDeps([this.isScrolling,e,t]),[this.options.rangeExtractor,this.options.overscan,this.options.count,e,t]},(e,t,s,r,n)=>null===r||null===n?[]:e({startIndex:r,endIndex:n,overscan:t,count:s}),{key:!1,debug:()=>this.options.debug}),this.indexFromElement=e=>{let t=this.options.indexAttribute,s=e.getAttribute(t);return s?parseInt(s,10):(console.warn(`Missing attribute name '${t}={index}' on measured element.`),-1)},this.shouldMeasureDuringScroll=e=>{var t;if(!this.scrollState||"smooth"!==this.scrollState.behavior)return!0;let s=this.scrollState.index??(null==(t=this.getVirtualItemForOffset(this.scrollState.lastTargetOffset))?void 0:t.index);if(void 0!==s&&this.range){let t=Math.max(this.options.overscan,Math.ceil((this.range.endIndex-this.range.startIndex)/2)),r=Math.max(0,s-t),n=Math.min(this.options.count-1,s+t);return e>=r&&e<=n}return!0},this.measureElement=e=>{if(!e)return void this.elementsCache.forEach((e,t)=>{e.isConnected||(this.observer.unobserve(e),this.elementsCache.delete(t))});let t=this.indexFromElement(e),s=this.options.getItemKey(t),r=this.elementsCache.get(s);r!==e&&(r&&this.observer.unobserve(r),this.observer.observe(e),this.elementsCache.set(s,e)),(!this.isScrolling||this.scrollState)&&this.shouldMeasureDuringScroll(t)&&this.resizeItem(t,this.options.measureElement(e,void 0,this))},this.resizeItem=(e,t)=>{var s,r;let n,i,l;if(e<0||e>=this.options.count)return;let o=this._flatMeasurements;if(1===this.options.lanes&&null!==o)l=this.options.getItemKey(e),i=o[2*e],n=o[2*e+1];else{let t=this.measurementsCache[e];if(!t)return;l=t.key,i=t.start,n=t.size}let a=t-(this.itemSizeCache.get(l)??n);if(0!==a){let o="end"===this.options.anchorTo&&(null==(s=this.scrollState)?void 0:s.behavior)!=="smooth"&&this.getVirtualDistanceFromEnd()<=this.options.scrollEndThreshold,d=o?this.getTotalSize():0,c=(null==(r=this.scrollState)?void 0:r.behavior)!=="smooth"&&(void 0!==this.shouldAdjustScrollPositionOnItemSizeChange?this.shouldAdjustScrollPositionOnItemSizeChange(this.measurementsCache[e]??{index:e,key:l,start:i,size:n,end:i+n,lane:0},a,this):i<this.getScrollOffset()+this.scrollAdjustments&&"backward"!==this.scrollDirection);(null===this.pendingMin||e<this.pendingMin)&&(this.pendingMin=e),this.itemSizeCache.set(l,t),this.itemSizeCacheVersion++,o?this.applyScrollAdjustment(this.getTotalSize()-d):c&&this.applyScrollAdjustment(a),this.notify(!1)}},this.getVirtualItems=i(()=>[this.getVirtualIndexes(),this.getMeasurements()],(e,t)=>{let s=[];for(let r=0,n=e.length;r<n;r++){let n=t[e[r]];s.push(n)}return s},{key:!1,debug:()=>this.options.debug}),this.getVirtualItemForOffset=e=>{let t=this.getMeasurements();if(0===t.length)return;let s=this._flatMeasurements,r=1===this.options.lanes&&null!=s,n=x(0,t.length-1,r?e=>s[2*e]:e=>l(t[e]).start,e);return l(t[n])},this.getMaxScrollOffset=()=>{if(!this.scrollElement)return 0;if("scrollHeight"in this.scrollElement)return this.options.horizontal?this.scrollElement.scrollWidth-this.scrollElement.clientWidth:this.scrollElement.scrollHeight-this.scrollElement.clientHeight;{let e=this.scrollElement.document.documentElement;return this.options.horizontal?e.scrollWidth-this.scrollElement.innerWidth:e.scrollHeight-this.scrollElement.innerHeight}},this.getVirtualDistanceFromEnd=()=>Math.max(this.getTotalSize()-this.getSize()-this.getScrollOffset(),0),this.getDistanceFromEnd=()=>Math.max(this.getMaxScrollOffset()-this.getScrollOffset(),0),this.isAtEnd=(e=this.options.scrollEndThreshold)=>this.getDistanceFromEnd()<=e,this.getOffsetForAlignment=(e,t,s=0)=>{if(!this.scrollElement)return 0;let r=this.getSize(),n=this.getScrollOffset();return"auto"===t&&(t=e>=n+r?"end":"start"),"center"===t?e+=(s-r)/2:"end"===t&&(e-=r),Math.max(Math.min(this.getMaxScrollOffset(),e),0)},this.getOffsetForIndex=(e,t="auto")=>{e=Math.max(0,Math.min(e,this.options.count-1));let s=this.getSize(),r=this.getScrollOffset(),n=this.measurementsCache[e];if(!n)return;if("auto"===t)if(n.end>=r+s-this.options.scrollPaddingEnd)t="end";else{if(!(n.start<=r+this.options.scrollPaddingStart))return[r,t];t="start"}if("end"===t&&e===this.options.count-1)return[this.getMaxScrollOffset(),t];let i="end"===t?n.end+this.options.scrollPaddingEnd:n.start-this.options.scrollPaddingStart;return[this.getOffsetForAlignment(i,t,n.size),t]},this.scrollToOffset=(e,{align:t="start",behavior:s="auto"}={})=>{let r=this.getOffsetForAlignment(e,t),n=this.now();this.scrollState={index:null,align:t,behavior:s,startedAt:n,lastTargetOffset:r,stableFrames:0},this._scrollToOffset(r,{adjustments:void 0,behavior:s}),this.scheduleScrollReconcile()},this.scrollToIndex=(e,{align:t="auto",behavior:s="auto"}={})=>{e=Math.max(0,Math.min(e,this.options.count-1));let r=this.getOffsetForIndex(e,t);if(!r)return;let[n,i]=r,l=this.now();this.scrollState={index:e,align:i,behavior:s,startedAt:l,lastTargetOffset:n,stableFrames:0},this._scrollToOffset(n,{adjustments:void 0,behavior:s}),this.scheduleScrollReconcile()},this.scrollBy=(e,{behavior:t="auto"}={})=>{let s=this.getScrollOffset()+e,r=this.now();this.scrollState={index:null,align:"start",behavior:t,startedAt:r,lastTargetOffset:s,stableFrames:0},this._scrollToOffset(s,{adjustments:void 0,behavior:t}),this.scheduleScrollReconcile()},this.scrollToEnd=({behavior:e="auto"}={})=>{this.options.count>0?this.scrollToIndex(this.options.count-1,{align:"end",behavior:e}):this.scrollToOffset(Math.max(this.getTotalSize()-this.getSize(),0),{behavior:e})},this.getTotalSize=()=>{var e;let t,s=this.getMeasurements();if(0===s.length)t=this.options.paddingStart;else if(1===this.options.lanes){let r=s.length-1,n=this._flatMeasurements;t=null!=n?n[2*r]+n[2*r+1]:(null==(e=s[r])?void 0:e.end)??0}else{let e=Array(this.options.lanes).fill(null),r=s.length-1;for(;r>=0&&e.some(e=>null===e);){let t=s[r];null===e[t.lane]&&(e[t.lane]=t.end),r--}t=Math.max(...e.filter(e=>null!==e))}return Math.max(t-this.options.scrollMargin+this.options.paddingEnd,0)},this.takeSnapshot=()=>{let e=[];if(0===this.itemSizeCache.size)return e;for(let t of this.getMeasurements())t&&this.itemSizeCache.has(t.key)&&e.push({index:t.index,key:t.key,start:t.start,size:t.size,end:t.end,lane:t.lane});return e},this._scrollToOffset=(e,{adjustments:t,behavior:s})=>{this._intendedScrollOffset=e+(t??0),this.options.scrollToFn(e,{behavior:s,adjustments:t},this)},this.measure=()=>{this.pendingMin=null,this.itemSizeCache.clear(),this.laneAssignments.clear(),this.itemSizeCacheVersion++,this.notify(!1)},this.setOptions(e)}applyScrollAdjustment(e,t){0!==e&&(o()&&(this.isScrolling||this._iosTouching||this._iosJustTouchEnded)?this._iosDeferredAdjustment+=e:this._scrollToOffset(this.getScrollOffset(),{adjustments:this.scrollAdjustments+=e,behavior:t}))}scheduleScrollReconcile(){if(!this.targetWindow){this.scrollState=null;return}null==this.rafId&&(this.rafId=this.targetWindow.requestAnimationFrame(()=>{this.rafId=null,this.reconcileScroll()}))}reconcileScroll(){if(!this.scrollState||!this.scrollElement)return;if(this.now()-this.scrollState.startedAt>5e3){this.scrollState=null;return}let e=null!=this.scrollState.index?this.getOffsetForIndex(this.scrollState.index,this.scrollState.align):void 0,t=e?e[0]:this.scrollState.lastTargetOffset,s=t!==this.scrollState.lastTargetOffset;if(!s&&1.01>Math.abs(t-this.getScrollOffset())){if(this.scrollState.stableFrames++,this.scrollState.stableFrames>=1){this.getScrollOffset()!==t&&this._scrollToOffset(t,{adjustments:void 0,behavior:"auto"}),this.scrollState=null;return}}else if(this.scrollState.stableFrames=0,s){let e=this.getSize()||600,s=Math.abs(t-this.getScrollOffset()),r="smooth"===this.scrollState.behavior&&s>e;this.scrollState.lastTargetOffset=t,r||(this.scrollState.behavior="auto"),this._scrollToOffset(t,{adjustments:void 0,behavior:r?"smooth":"auto"})}this.scheduleScrollReconcile()}}let x=(e,t,s,r)=>{for(;e<=t;){let n=(e+t)/2|0,i=s(n);if(i<r)e=n+1;else{if(!(i>r))return n;t=n-1}}return e>0?e-1:0},y="u">typeof document?r.useLayoutEffect:r.useEffect;var b=e.i(16327),v=e.i(56420);let j=(0,v.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.106-3.105c.32-.322.863-.22.983.218a6 6 0 0 1-8.259 7.057l-7.91 7.91a1 1 0 0 1-2.999-3l7.91-7.91a6 6 0 0 1 7.057-8.259c.438.12.54.662.219.984z",key:"1ngwbx"}]]),w=(0,v.default)("user",[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]]),S=(0,v.default)("bot",[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]]),N=(0,v.default)("cpu",[["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M17 20v2",key:"1rnc9c"}],["path",{d:"M17 2v2",key:"11trls"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M2 17h2",key:"7oei6x"}],["path",{d:"M2 7h2",key:"asdhe0"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"M20 17h2",key:"1fpfkl"}],["path",{d:"M20 7h2",key:"1o8tra"}],["path",{d:"M7 20v2",key:"4gnj0m"}],["path",{d:"M7 2v2",key:"1i4yhu"}],["rect",{x:"4",y:"4",width:"16",height:"16",rx:"2",key:"1vbyd7"}],["rect",{x:"8",y:"8",width:"8",height:"8",rx:"1",key:"z9xiuo"}]]),M=(0,v.default)("clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6l4 2",key:"mmk7yg"}]]);var k=e.i(68590);let E=(0,v.default)("workflow",[["rect",{width:"8",height:"8",x:"3",y:"3",rx:"2",key:"by2w9f"}],["path",{d:"M7 11v4a2 2 0 0 0 2 2h4",key:"xkn7yn"}],["rect",{width:"8",height:"8",x:"13",y:"13",rx:"2",key:"1cgmvn"}]]);var T=e.i(34713);let I=r.default.memo(function({entries:e,compact:t=!1}){let n=(0,r.useMemo)(()=>(function(e){let t=0,s=0,r=0,n=0,i=0,l=new Set;for(let o of e)if("user"===o.type&&t++,"queue-operation"===o.type&&i++,"assistant"===o.type){for(let e of(s++,o.message.content))"tool_use"===e.type&&("Task"===e.name&&(e.subagentType||e.subagentId)?n++:r++);o.message.model&&l.add(o.message.model)}let o="";if(e.length>=2){let t=e[e.length-1].timestampMs-e[0].timestampMs;o=(0,T.formatDuration)(t)}return{turnCount:i,userCount:t,assistantCount:s,toolCallCount:r,subagentCount:n,duration:o,models:Array.from(l)}})(e),[e]),i=t?"w-3.5 h-3.5":"w-4 h-4",l=t?"text-xs font-medium":"text-sm font-medium",o=t?"text-[10px] text-muted-foreground":"text-xs text-muted-foreground",a=[...t?[]:[{Icon:k.MessageSquare,color:"text-primary",v:n.turnCount,l:"Turns"}],{Icon:w,color:"text-[color:var(--chart-1)]",v:n.userCount,l:"User"},{Icon:S,color:"text-[color:var(--chart-2)]",v:n.assistantCount,l:"Assistant"},{Icon:j,color:"text-[color:var(--chart-3)]",v:n.toolCallCount,l:t?"Tools":"Tool Calls"},{Icon:E,color:"text-[color:var(--chart-5)]",v:n.subagentCount,l:"Subagents"},{Icon:M,color:"text-[color:var(--chart-4)]",v:n.duration||"—",l:"Duration"},{Icon:N,color:"text-[color:var(--chart-5)]",v:n.models.length>0?n.models.join(", "):"—",l:t?"Model":"Model(s)"}];return(0,s.jsx)("div",{className:t?"bg-muted/30 border border-border/50 rounded-lg p-3 mb-3":"bg-card border border-border rounded-lg p-4",children:(0,s.jsx)("div",{className:`grid grid-cols-2 ${t?"sm:grid-cols-6 gap-3":"sm:grid-cols-4 lg:grid-cols-7 gap-4"}`,children:a.map(({Icon:e,color:t,v:r,l:n})=>(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)(e,{className:`${i} ${t}`}),(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{className:`${l} truncate max-w-[120px]`,children:r}),(0,s.jsx)("div",{className:o,children:n})]})]},n))})})}),C=(0,v.default)("play",[["path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",key:"10ikf1"}]]);var O=e.i(67927);function A(e){return JSON.stringify(e.raw,null,2)}let z=new Intl.DateTimeFormat("en-US",{month:"short",day:"numeric",year:"numeric",hour:"numeric",minute:"2-digit",second:"2-digit",hour12:!0});function _(e){let t=new Date(e),s=z.format(t),r=t.getMilliseconds().toString().padStart(3,"0");return`${s}.${r}`}let F=r.default.memo(function({entry:e,isCollapsed:t,entryCount:r,onToggle:n}){let i="function"==typeof n,l=(0,s.jsxs)("div",{className:`flex items-center gap-2 px-3 py-1 rounded-full bg-primary/10 border border-primary/20 text-primary text-xs font-medium${i?" group-hover:bg-primary/20 transition-colors":""}`,children:[i?(0,s.jsx)(O.ChevronRight,{className:`w-3 h-3 transition-transform ${t?"":"rotate-90"}`}):(0,s.jsx)(C,{className:"w-3 h-3"}),(0,s.jsx)("span",{children:e.label}),(0,s.jsx)("span",{className:"text-muted-foreground",children:_(e.timestampMs)}),i&&t&&"number"==typeof r&&(0,s.jsxs)("span",{className:"ml-1 px-1.5 py-0.5 rounded bg-primary/20 text-[10px] leading-none",children:[r," ",1===r?"entry":"entries"]})]});return i?(0,s.jsxs)("button",{type:"button",onClick:n,className:"group flex items-center gap-3 py-3 px-4 w-full cursor-pointer",children:[(0,s.jsx)("div",{className:"flex-1 h-px bg-primary/30"}),l,(0,s.jsx)("div",{className:"flex-1 h-px bg-primary/30"})]}):(0,s.jsxs)("div",{className:"flex items-center gap-3 py-3 px-4",children:[(0,s.jsx)("div",{className:"flex-1 h-px bg-primary/30"}),l,(0,s.jsx)("div",{className:"flex-1 h-px bg-primary/30"})]})});var D=e.i(47163);let R={user:"User",assistant:"Assistant","file-history-snapshot":"Snapshot",progress:"Progress",system:"System","queue-operation":"Queue"},$={user:"bg-[color:var(--chart-1)]/20 text-[color:var(--chart-1)] border-[color:var(--chart-1)]/30",assistant:"bg-[color:var(--chart-2)]/20 text-[color:var(--chart-2)] border-[color:var(--chart-2)]/30","file-history-snapshot":"bg-[color:var(--chart-3)]/20 text-[color:var(--chart-3)] border-[color:var(--chart-3)]/30",progress:"bg-[color:var(--chart-5)]/20 text-[color:var(--chart-5)] border-[color:var(--chart-5)]/30",system:"bg-[color:var(--chart-4)]/20 text-[color:var(--chart-4)] border-[color:var(--chart-4)]/30","queue-operation":"bg-primary/20 text-primary border-primary/30"},P={user:"border-l-[color:var(--chart-1)]",assistant:"border-l-[color:var(--chart-2)]","file-history-snapshot":"border-l-[color:var(--chart-3)]",progress:"border-l-[color:var(--chart-5)]",system:"border-l-[color:var(--chart-4)]","queue-operation":"border-l-primary"},W=(0,v.default)("file-text",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]),L=(0,v.default)("activity",[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]]);var U=e.i(66794);function q({type:e}){let t="w-4 h-4";switch(e){case"user":return(0,s.jsx)(w,{className:t});case"assistant":return(0,s.jsx)(S,{className:t});case"file-history-snapshot":return(0,s.jsx)(W,{className:t});case"progress":return(0,s.jsx)(L,{className:t});case"system":return(0,s.jsx)(U.Settings,{className:t});case"queue-operation":return(0,s.jsx)(C,{className:t})}}function B({type:e}){return(0,s.jsxs)("span",{className:`inline-flex items-center gap-1.5 px-2 py-0.5 text-xs font-mono rounded border ${$[e]}`,children:[(0,s.jsx)(q,{type:e}),R[e]]})}var H=e.i(24380);function V({block:e}){let t=(0,r.useMemo)(()=>JSON.stringify(e.input,null,2),[e]);return(0,s.jsxs)("div",{className:"space-y-2",children:[(0,s.jsxs)("details",{open:!0,children:[(0,s.jsx)("summary",{className:"text-xs text-muted-foreground cursor-pointer hover:text-foreground transition-colors",children:(0,s.jsxs)("span",{className:"inline-flex items-center gap-1",children:["Input",(0,s.jsx)(H.CopyButton,{text:t})]})}),(0,s.jsx)("pre",{className:"mt-1 p-2 bg-muted/50 rounded text-xs whitespace-pre-wrap break-words max-h-64 overflow-y-auto",children:t})]}),e.result?(0,s.jsxs)("div",{className:"border-l-2 border-primary/50 pl-3 space-y-1",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)("span",{className:"inline-block px-2 py-0.5 text-xs font-mono rounded border bg-primary/20 text-primary border-primary/30",children:"Result"}),(0,s.jsx)("span",{className:"text-xs text-muted-foreground",children:_(new Date(e.result.timestamp).getTime())})]}),e.result.content&&(0,s.jsxs)("details",{open:!0,children:[(0,s.jsx)("summary",{className:"text-xs text-muted-foreground cursor-pointer hover:text-foreground transition-colors",children:(0,s.jsxs)("span",{className:"inline-flex items-center gap-1",children:["Output",(0,s.jsx)(H.CopyButton,{text:e.result.content})]})}),(0,s.jsx)("pre",{className:"mt-1 p-2 bg-muted/50 rounded text-xs whitespace-pre-wrap break-words max-h-48 overflow-y-auto",children:e.result.content})]}),e.result.images?.map((e,t)=>(0,s.jsx)("img",{src:`data:${e.mediaType};base64,${e.base64}`,alt:`Tool result image ${t+1}`,className:"mt-2 max-w-full rounded border border-border"},t))]}):(0,s.jsx)("div",{className:"text-xs text-muted-foreground",children:"Tool did not return a result"})]})}let K=(0,v.default)("brain",[["path",{d:"M12 18V5",key:"adv99a"}],["path",{d:"M15 13a4.17 4.17 0 0 1-3-4 4.17 4.17 0 0 1-3 4",key:"1e3is1"}],["path",{d:"M17.598 6.5A3 3 0 1 0 12 5a3 3 0 1 0-5.598 1.5",key:"1gqd8o"}],["path",{d:"M17.997 5.125a4 4 0 0 1 2.526 5.77",key:"iwvgf7"}],["path",{d:"M18 18a4 4 0 0 0 2-7.464",key:"efp6ie"}],["path",{d:"M19.967 17.483A4 4 0 1 1 12 18a4 4 0 1 1-7.967-.517",key:"1gq6am"}],["path",{d:"M6 18a4 4 0 0 1-2-7.464",key:"k1g0md"}],["path",{d:"M6.003 5.125a4 4 0 0 0-2.526 5.77",key:"q97ue3"}]]),J=r.default.memo(function({block:e,entriesBySource:t,projectName:r,sessionId:n,highlightedUuid:i,autoExpandForUuid:l}){switch(e.type){case"text":return(0,s.jsx)("p",{className:"whitespace-pre-wrap text-sm",children:e.text});case"tool_use":if("Task"===e.name&&(e.subagentType||e.subagentId)){let o=e.subagentId&&t?t.get(`agent-${e.subagentId}`):void 0;return(0,s.jsx)(et,{block:e,subagentEntries:o,projectName:r,sessionId:n,highlightedUuid:i,autoExpandForUuid:l})}return(0,s.jsxs)("div",{className:"border border-border/50 rounded-lg p-3 bg-muted/10",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2 mb-2",children:[(0,s.jsx)(j,{className:"w-4 h-4 text-primary flex-shrink-0"}),(0,s.jsx)("span",{className:"font-mono text-sm text-primary truncate min-w-0",children:e.name}),e.result&&(0,s.jsx)("span",{className:"text-xs text-muted-foreground ml-auto flex-shrink-0",children:e.result.durationFormatted})]}),(0,s.jsx)(V,{block:e})]});case"thinking":return(0,s.jsx)("div",{className:"border border-[color:var(--chart-5)]/30 rounded-lg p-3 bg-[color:var(--chart-5)]/5",children:(0,s.jsxs)("details",{children:[(0,s.jsxs)("summary",{className:"flex items-center gap-2 text-xs cursor-pointer hover:text-foreground transition-colors text-[color:var(--chart-5)]",children:[(0,s.jsx)(K,{className:"w-4 h-4"}),(0,s.jsx)("span",{children:"Thinking"}),(0,s.jsxs)("span",{className:"text-muted-foreground ml-1",children:["(",e.thinking.length.toLocaleString()," chars)"]})]}),(0,s.jsx)("p",{className:"mt-2 whitespace-pre-wrap text-xs text-muted-foreground p-2 bg-muted/30 rounded max-h-64 overflow-y-auto",children:e.thinking})]})})}});function Y({entry:e}){return(0,s.jsx)("div",{children:e.message.content&&(0,s.jsx)("p",{className:"whitespace-pre-wrap text-sm",children:e.message.content})})}let X=r.default.memo(function({entry:e,entriesBySource:t,projectName:r,sessionId:n,highlightedUuid:i,autoExpandForUuid:l}){let{content:o}=e.message;return(0,s.jsx)("div",{className:"space-y-3",children:o.map((e,o)=>(0,s.jsx)(J,{block:e,entriesBySource:t,projectName:r,sessionId:n,highlightedUuid:i,autoExpandForUuid:l},o))})}),Q=r.default.memo(function({entry:e}){let t=(0,r.useMemo)(()=>{if("progress"===e.type){let t=e.raw.data,s=t?.agentId;return[t?.type,s&&`agent:${s}`].filter(Boolean).join(" | ")}return"file-history-snapshot"===e.type?"File history snapshot":e.type},[e.type,e.raw]);return(0,s.jsxs)("div",{className:"text-sm",children:[(0,s.jsx)("span",{className:"text-muted-foreground",children:t}),(0,s.jsxs)("details",{className:"mt-1",children:[(0,s.jsx)("summary",{className:"text-xs text-muted-foreground cursor-pointer hover:text-foreground transition-colors",children:"Show raw JSON"}),(0,s.jsx)("pre",{className:"mt-1 p-2 bg-muted/50 rounded text-xs whitespace-pre-wrap break-words max-h-64 overflow-y-auto",children:A(e)})]})]})}),G=(0,v.default)("link-2",[["path",{d:"M9 17H7A5 5 0 0 1 7 7h2",key:"8i5ue5"}],["path",{d:"M15 7h2a5 5 0 1 1 0 10h-2",key:"1b9ql8"}],["line",{x1:"8",x2:"16",y1:"12",y2:"12",key:"1jonct"}]]);var Z=e.i(55574);function ee({uuid:e}){let t=(0,r.useCallback)(async()=>{window.history.replaceState(null,"",`#entry-${e}`);try{await navigator.clipboard.writeText(window.location.href)}catch{let e=document.createElement("textarea");e.value=window.location.href,e.style.position="fixed",e.style.opacity="0",document.body.appendChild(e),e.select(),document.execCommand("copy"),document.body.removeChild(e)}(0,Z.toast)("Link copied")},[e]);return(0,s.jsx)("button",{onClick:t,title:"Copy link to entry",className:"inline-flex items-center justify-center rounded p-1 text-muted-foreground hover:text-foreground hover:bg-muted/80 transition-colors opacity-0 group-hover:opacity-100 transition-opacity",children:(0,s.jsx)(G,{className:"w-3.5 h-3.5"})})}function et({block:e,subagentEntries:t,projectName:n,sessionId:i,highlightedUuid:l,autoExpandForUuid:o}){let a=!!(o&&t?.some(e=>e.uuid===o)),[d,c]=(0,r.useState)(a);(0,r.useEffect)(()=>{if(!a)return;let e=requestAnimationFrame(()=>c(!0));return()=>cancelAnimationFrame(e)},[a]);let h=(0,r.useCallback)(()=>{c(e=>!e)},[]),u=t&&t.length>0;return(0,s.jsxs)("div",{className:"border border-border/50 rounded-lg p-3 bg-muted/10",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2 mb-2",children:[(0,s.jsx)(E,{className:"w-4 h-4 text-[color:var(--chart-5)]"}),(0,s.jsx)("span",{className:"font-mono text-sm text-[color:var(--chart-5)]",children:"Subagent"}),e.subagentType&&(0,s.jsx)("span",{className:"inline-flex items-center px-2 py-0.5 text-xs font-mono rounded border bg-[color:var(--chart-5)]/20 text-[color:var(--chart-5)] border-[color:var(--chart-5)]/30",children:e.subagentType}),e.result&&(0,s.jsx)("span",{className:"text-xs text-muted-foreground ml-auto",children:e.result.durationFormatted})]}),e.subagentDescription&&(0,s.jsx)("p",{className:"text-sm text-muted-foreground mb-2",children:e.subagentDescription}),e.subagentId&&t&&(0,s.jsxs)("button",{onClick:h,className:"inline-flex items-center gap-1.5 px-2.5 py-1 text-xs font-medium rounded border border-primary/30 bg-primary/10 text-primary hover:bg-primary/20 transition-colors mb-2",children:[(0,s.jsx)(O.ChevronRight,{className:(0,D.cn)("w-3 h-3 transition-transform",d&&"rotate-90")}),(0,s.jsxs)("span",{children:["agent-",e.subagentId]}),(0,s.jsx)("span",{className:"text-muted-foreground",children:d?"Collapse":"View subagent log"})]}),d&&(0,s.jsxs)("div",{className:"ml-4 pl-3 border-l-2 border-primary/30 mt-2 space-y-2",children:[t&&0===t.length&&(0,s.jsx)("div",{className:"text-xs text-muted-foreground py-2",children:"No entries found in subagent log."}),u&&(0,s.jsx)(s.Fragment,{children:(0,s.jsx)(I,{entries:t,compact:!0})}),t&&t.map(e=>"queue-operation"===e.type?(0,s.jsx)(F,{entry:e},e.uuid||e.timestamp):(0,s.jsx)(er,{entry:e,projectName:n,sessionId:i,isHighlighted:!!l&&e.uuid===l},e.uuid||e.timestamp))]}),(0,s.jsx)(V,{block:e})]})}function es({entry:e,entriesBySource:t,projectName:r,sessionId:n,highlightedUuid:i,autoExpandForUuid:l}){switch(e.type){case"user":return(0,s.jsx)(Y,{entry:e});case"assistant":return(0,s.jsx)(X,{entry:e,entriesBySource:t,projectName:r,sessionId:n,highlightedUuid:i,autoExpandForUuid:l});case"file-history-snapshot":case"progress":case"system":return(0,s.jsx)(Q,{entry:e})}}let er=r.default.memo(function({entry:e,entriesBySource:t,projectName:r,sessionId:n,isHighlighted:i,highlightedUuid:l,autoExpandForUuid:o}){return(0,s.jsxs)("div",{id:e.uuid?`entry-${e.uuid}`:void 0,className:(0,D.cn)(`group border-l-4 ${P[e.type]} bg-card/50 rounded-r-lg mb-2 hover:bg-muted/30 transition-colors`,i&&"entry-highlighted"),children:[(0,s.jsxs)("div",{className:"flex items-center gap-2 px-4 py-2 border-b border-border/30",children:[(0,s.jsx)(B,{type:e.type}),(0,s.jsxs)("div",{className:"flex items-center gap-1 ml-auto",children:[e.uuid&&(0,s.jsx)(ee,{uuid:e.uuid}),(0,s.jsx)(H.CopyButton,{text:function(e){switch(e.type){case"user":return e.message.content;case"assistant":return e.message.content.filter(e=>"text"===e.type).map(e=>e.text).join("\n");case"file-history-snapshot":case"progress":case"system":return A(e);case"queue-operation":return e.label}}(e)}),(0,s.jsx)("span",{className:"text-xs font-mono text-muted-foreground whitespace-nowrap",children:_(e.timestampMs)})]})]}),(0,s.jsx)("div",{className:"px-4 py-3",children:(0,s.jsx)(es,{entry:e,entriesBySource:t,projectName:r,sessionId:n,highlightedUuid:l,autoExpandForUuid:o})})]})},(e,t)=>e.entry===t.entry&&e.entriesBySource===t.entriesBySource&&e.projectName===t.projectName&&e.sessionId===t.sessionId&&e.isHighlighted===t.isHighlighted&&e.highlightedUuid===t.highlightedUuid&&e.autoExpandForUuid===t.autoExpandForUuid);var en=e.i(67199),ei=e.i(84026),el=e.i(29407),eo=e.i(16306),ea=e.i(82954),ed=e.i(73520),ec=e.i(85881);function eh({decision:e}){return"deny"===e?(0,s.jsxs)("span",{className:"inline-flex items-center gap-1 rounded px-1.5 py-0.5 text-[0.65rem] font-semibold tracking-wide uppercase bg-red-500/10 text-red-400 border border-red-500/20",children:[(0,s.jsx)(el.ShieldX,{className:"h-3 w-3"}),"Deny"]}):"instruct"===e?(0,s.jsxs)("span",{className:"inline-flex items-center gap-1 rounded px-1.5 py-0.5 text-[0.65rem] font-semibold tracking-wide uppercase bg-amber-500/10 text-amber-400 border border-amber-500/20",children:[(0,s.jsx)(eo.ShieldAlert,{className:"h-3 w-3"}),"Instruct"]}):(0,s.jsxs)("span",{className:"inline-flex items-center gap-1 rounded px-1.5 py-0.5 text-[0.65rem] font-semibold tracking-wide uppercase bg-emerald-500/10 text-emerald-400 border border-emerald-500/20",children:[(0,s.jsx)(ei.ShieldCheck,{className:"h-3 w-3"}),"Allow"]})}function eu({eventType:e}){return(0,s.jsx)("span",{className:"inline-flex items-center rounded px-1.5 py-0.5 text-[0.6rem] font-medium bg-muted text-muted-foreground border border-border/50",children:e})}function em({mode:e}){let t="default"===e;return(0,s.jsx)("span",{className:`inline-flex items-center rounded px-1.5 py-0.5 text-[0.6rem] font-medium border ${t?"bg-sky-500/10 text-sky-400 border-sky-500/20":"bg-amber-500/10 text-amber-400 border-amber-500/20"}`,children:e})}function ep({ms:e}){return(0,s.jsx)("span",{className:`font-mono text-[0.7rem] ${e>500?"text-red-400":e>100?"text-amber-400":"text-muted-foreground"}`,children:e<1e3?`${e}ms`:`${(e/1e3).toFixed(1)}s`})}function ef({value:e,onChange:t}){return(0,s.jsx)("div",{className:"inline-flex items-center rounded-md border border-border bg-muted/30 p-0.5",children:[{label:"All",value:""},{label:"Allow",value:"allow"},{label:"Instruct",value:"instruct"},{label:"Deny",value:"deny"}].map(r=>(0,s.jsx)("button",{onClick:()=>t(r.value),className:`px-2.5 py-1 text-[0.65rem] font-medium rounded transition-all ${e===r.value?"deny"===r.value?"bg-red-500/15 text-red-400 shadow-sm":"allow"===r.value?"bg-emerald-500/15 text-emerald-400 shadow-sm":"instruct"===r.value?"bg-amber-500/15 text-amber-400 shadow-sm":"bg-background text-foreground shadow-sm":"text-muted-foreground hover:text-foreground"}`,children:r.label},r.value))})}function eg({item:e}){return(0,s.jsx)("tr",{children:(0,s.jsx)("td",{colSpan:9,className:"px-0 py-0",children:(0,s.jsxs)("div",{className:"px-6 py-3 bg-muted/20 border-t border-border/30 space-y-2 text-xs animate-expand",children:[(0,s.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-x-8 gap-y-1.5",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("span",{className:"text-muted-foreground",children:"Session ID: "}),(0,s.jsx)("span",{className:"font-mono text-foreground",children:e.sessionId??"—"}),e.sessionId&&(0,s.jsx)(H.CopyButton,{text:e.sessionId})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("span",{className:"text-muted-foreground",children:"CWD: "}),(0,s.jsx)("span",{className:"font-mono text-foreground",children:e.cwd??"—"}),e.cwd&&(0,s.jsx)(H.CopyButton,{text:e.cwd})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("span",{className:"text-muted-foreground",children:"Transcript: "}),(0,s.jsx)("span",{className:"font-mono text-foreground break-all",children:e.transcriptPath??"—"}),e.transcriptPath?.startsWith("opencode-db://")&&(0,s.jsx)("span",{className:"text-muted-foreground ml-1",children:"(stored in opencode DB)"})]})]}),e.policyNames&&e.policyNames.length>1&&(0,s.jsxs)("div",{children:[(0,s.jsx)("span",{className:"text-muted-foreground",children:"Policies: "}),(0,s.jsx)("span",{className:"font-mono text-foreground",children:e.policyNames.join(", ")})]}),e.reason&&(0,s.jsxs)("div",{children:[(0,s.jsx)("span",{className:"text-muted-foreground",children:"Full reason: "}),(0,s.jsx)("span",{className:"text-foreground",children:e.reason})]})]})})})}function ex({sessionId:e,initialData:t}){let{intervalSec:n}=(0,ec.useAutoRefresh)(),[i,l]=(0,r.useState)(!1),[o,a]=(0,r.useState)(1),[d,c]=(0,r.useState)(t),[h,u]=(0,r.useState)(null),[m,p]=(0,r.useState)(""),[f,g]=(0,r.useState)(""),[x,y]=(0,r.useState)(""),v=(0,r.useRef)(null),j=(0,r.useRef)({filterDecision:m,filterEventType:f,filterPolicy:x});j.current={filterDecision:m,filterEventType:f,filterPolicy:x};let w=""!==m||""!==f||""!==x,S=(0,r.useCallback)(async t=>{try{let{filterDecision:s,filterEventType:r,filterPolicy:n}=j.current,i=await (0,en.searchHookActivityAction)({sessionId:e,decision:s||void 0,eventType:r||void 0,policyName:n||void 0},t);c(i)}catch{}},[e]);(0,r.useEffect)(()=>{S(o);let e=setInterval(()=>S(o),n>0?1e3*n:5e3);return()=>clearInterval(e)},[o,S,n]),(0,r.useEffect)(()=>(v.current&&clearTimeout(v.current),v.current=setTimeout(()=>{a(1),u(null),S(1)},300),()=>{v.current&&clearTimeout(v.current)}),[m,f,x]);let N=d.entries,M=d.totalPages;return(0,s.jsxs)("div",{children:[(0,s.jsxs)("button",{onClick:()=>l(e=>!e),className:"flex items-center gap-2 hover:opacity-80 transition-opacity",children:[(0,s.jsx)(b.ChevronDown,{className:`w-4 h-4 text-muted-foreground transition-transform ${i?"-rotate-90":""}`}),(0,s.jsx)("span",{className:"text-sm font-semibold text-muted-foreground uppercase tracking-wide",children:"Hook Logs"})]}),!i&&(0,s.jsxs)("div",{className:"mt-2 bg-card border border-border rounded-lg overflow-hidden shadow-sm",children:[(0,s.jsxs)("div",{className:"flex flex-wrap items-center gap-3 px-4 py-2.5 border-b border-border bg-muted/20",children:[(0,s.jsx)(ef,{value:m,onChange:p}),(0,s.jsxs)("select",{value:f,onChange:e=>g(e.target.value),className:"h-7 rounded-md border border-border bg-background px-2 text-xs text-foreground focus:outline-none focus:ring-2 focus:ring-primary/40 focus:border-primary/40 transition-shadow",children:[(0,s.jsx)("option",{value:"",children:"All Events"}),(0,s.jsx)("option",{value:"PreToolUse",children:"PreToolUse"}),(0,s.jsx)("option",{value:"PostToolUse",children:"PostToolUse"}),(0,s.jsx)("option",{value:"SessionStart",children:"SessionStart"}),(0,s.jsx)("option",{value:"SessionEnd",children:"SessionEnd"}),(0,s.jsx)("option",{value:"UserPromptSubmit",children:"UserPromptSubmit"}),(0,s.jsx)("option",{value:"PermissionRequest",children:"PermissionRequest"})]}),(0,s.jsx)("div",{className:"relative",children:(0,s.jsx)("input",{type:"text",value:x,onChange:e=>y(e.target.value),placeholder:"Filter by policy…",className:"h-7 rounded-md border border-border bg-background px-2.5 text-xs text-foreground placeholder:text-muted-foreground w-44 focus:outline-none focus:ring-2 focus:ring-primary/40 focus:border-primary/40 transition-shadow"})})]}),0===N.length?(0,s.jsxs)("div",{className:"flex flex-col items-center justify-center py-12 px-4",children:[(0,s.jsx)(ea.Shield,{className:"h-10 w-10 text-muted-foreground/30"}),(0,s.jsx)("p",{className:"text-sm text-muted-foreground mt-3",children:w?"No matching hook events.":"No hook events found."})]}):(0,s.jsx)("div",{className:"overflow-x-auto",children:(0,s.jsxs)("table",{className:"w-full text-xs",children:[(0,s.jsx)("thead",{children:(0,s.jsxs)("tr",{className:"text-left text-muted-foreground border-b border-border bg-muted/30",children:[(0,s.jsx)("th",{className:"px-4 py-2.5 font-medium w-6"}),(0,s.jsx)("th",{className:"px-3 py-2.5 font-medium",children:"Decision"}),(0,s.jsx)("th",{className:"px-3 py-2.5 font-medium",children:"Event"}),(0,s.jsx)("th",{className:"px-3 py-2.5 font-medium",children:"Tool"}),(0,s.jsx)("th",{className:"px-3 py-2.5 font-medium",children:"Policy"}),(0,s.jsx)("th",{className:"px-3 py-2.5 font-medium",children:"Reason"}),(0,s.jsx)("th",{className:"px-3 py-2.5 font-medium",children:"Duration"}),(0,s.jsx)("th",{className:"px-3 py-2.5 font-medium",children:"Mode"}),(0,s.jsx)("th",{className:"px-3 py-2.5 font-medium text-right",children:"Time"})]})}),(0,s.jsx)("tbody",{className:"divide-y divide-border/30",children:N.map((e,t)=>{let n="deny"===e.decision,i=h===t,l="instruct"===e.decision;return(0,s.jsxs)(r.default.Fragment,{children:[(0,s.jsxs)("tr",{onClick:()=>{u(e=>e===t?null:t)},className:`cursor-pointer transition-colors ${n?"bg-red-500/[0.03] hover:bg-red-500/[0.07] border-l-2 border-l-red-500/40":l?"bg-amber-500/[0.03] hover:bg-amber-500/[0.07] border-l-2 border-l-amber-500/40":t%2==0?"hover:bg-muted/30":"bg-muted/[0.04] hover:bg-muted/30"} ${i?"bg-muted/20":""}`,children:[(0,s.jsx)("td",{className:"px-4 py-2",children:(0,s.jsx)(b.ChevronDown,{className:`h-3.5 w-3.5 text-muted-foreground transition-transform duration-150 ${i?"rotate-0":"-rotate-90"}`})}),(0,s.jsx)("td",{className:"px-3 py-2",children:(0,s.jsx)(eh,{decision:e.decision})}),(0,s.jsx)("td",{className:"px-3 py-2",children:(0,s.jsx)(eu,{eventType:e.eventType})}),(0,s.jsx)("td",{className:"px-3 py-2 font-mono text-foreground",children:e.toolName??"—"}),(0,s.jsx)("td",{className:"px-3 py-2 font-mono text-foreground",children:e.policyNames&&e.policyNames.length>1?(0,s.jsxs)("span",{title:e.policyNames.join(", "),children:[e.policyNames[0],(0,s.jsxs)("span",{className:"text-muted-foreground text-[0.6rem]",children:[" +",e.policyNames.length-1]})]}):e.policyName??"—"}),(0,s.jsx)("td",{className:"px-3 py-2 text-muted-foreground truncate max-w-[240px]",title:e.reason??"",children:e.reason??"—"}),(0,s.jsx)("td",{className:"px-3 py-2",children:(0,s.jsx)(ep,{ms:e.durationMs})}),(0,s.jsx)("td",{className:"px-3 py-2",children:e.permissionMode?(0,s.jsx)(em,{mode:e.permissionMode}):"—"}),(0,s.jsx)("td",{className:"px-3 py-2 text-right text-muted-foreground whitespace-nowrap",title:new Date(e.timestamp).toLocaleString(void 0,{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit",second:"2-digit"}),children:(0,T.formatRelativeTime)(e.timestamp)})]}),i&&(0,s.jsx)(eg,{item:e})]},`${e.timestamp}-${t}`)})})]})}),(0,s.jsx)(ed.default,{currentPage:o,totalPages:M,onPageChange:e=>{a(e),u(null)}})]})]})}function ey(e){let t=new Map;for(let s of e)if("assistant"===s.type)for(let e of s.message.content){if("tool_use"!==e.type||"Task"===e.name&&(e.subagentType||e.subagentId))continue;let s=t.get(e.name)||{count:0,totalDurationMs:0};s.count++,e.result?.durationMs&&(s.totalDurationMs+=e.result.durationMs),t.set(e.name,s)}return Array.from(t.entries()).map(([e,t])=>({name:e,...t})).sort((e,t)=>t.count-e.count)}function eb({tools:e,compact:t}){return(0,s.jsx)("div",{className:`bg-card border border-border rounded-lg ${t?"p-3":"p-4"}`,children:(0,s.jsx)("div",{className:`grid grid-cols-[repeat(auto-fit,minmax(200px,1fr))] ${t?"gap-2":"gap-3"}`,children:e.map(e=>(0,s.jsxs)("div",{className:"flex items-center gap-2 min-w-0",children:[(0,s.jsx)(j,{className:"w-3.5 h-3.5 text-muted-foreground flex-shrink-0"}),(0,s.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,s.jsx)("div",{className:`${t?"text-xs":"text-sm"} font-mono font-medium truncate`,children:e.name}),(0,s.jsxs)("div",{className:"text-xs text-muted-foreground truncate",children:[e.count," call",1!==e.count?"s":"",e.totalDurationMs>0&&` \xb7 ${(e.totalDurationMs/1e3).toFixed(1)}s`]})]})]},e.name))})})}function ev(e){return`${e.uuid}-${e.timestampMs}`}function ej(){let e=window.location.hash;return e.startsWith("#entry-")?e.slice(7):null}function ew({entries:e,entriesBySource:t,projectName:i,sessionId:l}){let o=(0,r.useMemo)(()=>Array.from(t.values()).flat(),[t]),[a,d]=(0,r.useState)(new Set),[c,u]=(0,r.useState)(0),[p,x]=(0,r.useState)(()=>ej()),b=(0,r.useRef)(void 0),v=(0,r.useRef)(!1),j=(0,r.useRef)(null);(0,r.useLayoutEffect)(()=>{let e=j.current;if(!e)return;let t=()=>{let t=e.getBoundingClientRect().top+window.scrollY;u(e=>e===t?e:t)};t();let s=new ResizeObserver(t);return s.observe(document.body),window.addEventListener("resize",t),()=>{s.disconnect(),window.removeEventListener("resize",t)}},[]);let w=(0,r.useMemo)(()=>(function(e){let t=new Map,s=null,r=0;for(let n of e)"queue-operation"===n.type?(null!==s&&t.set(s,r),s=ev(n),r=0):null!==s&&r++;return null!==s&&t.set(s,r),t})(e),[e]),S=(0,r.useMemo)(()=>{let t;return t=!1,e.filter(e=>"queue-operation"===e.type?(t=a.has(ev(e)),!0):!t)},[e,a]),N=(0,r.useMemo)(()=>{let e=new Map;return S.forEach((t,s)=>{t.uuid&&e.set(t.uuid,s)}),e},[S]),M=(0,r.useMemo)(()=>(function(e){let t=new Map;for(let s of e)if("assistant"===s.type&&s.uuid)for(let e of s.message.content)"tool_use"===e.type&&"Task"===e.name&&e.subagentId&&t.set(e.subagentId,s.uuid);let s=new Map;for(let r of e){if(!r._source?.startsWith("agent-")||!r.uuid)continue;let e=r._source.slice(6),n=t.get(e);n&&s.set(r.uuid,n)}return s})(o),[o]),k=(0,r.useMemo)(()=>p&&M.has(p)?p:null,[p,M]),E=k?M.get(k)??null:null;(0,r.useEffect)(()=>{if(p)return b.current=setTimeout(()=>x(null),4e3),()=>{b.current&&clearTimeout(b.current)}},[]),(0,r.useEffect)(()=>{let e=()=>{let e=ej();x(e),v.current=!1,b.current&&clearTimeout(b.current),e&&(b.current=setTimeout(()=>x(null),4e3))};return window.addEventListener("hashchange",e),()=>window.removeEventListener("hashchange",e)},[]);let T=(0,r.useMemo)(()=>{if(!p)return null;let t=E??p,s=e.some(e=>e.uuid===t),r=N.has(t);if(s&&!r){let s=null;for(let r of e)if("queue-operation"===r.type)s=ev(r);else if(r.uuid===t&&s)return s}return null},[p,E,e,N]);(0,r.useEffect)(()=>{if(!T)return;let e=requestAnimationFrame(()=>{d(e=>{if(!e.has(T))return e;let t=new Set(e);return t.delete(T),t})});return()=>cancelAnimationFrame(e)},[T]);let I=(0,r.useCallback)(e=>{d(t=>{let s=new Set(t);return s.has(e)?s.delete(e):s.add(e),s})},[]),C=function({useFlushSync:e=!0,directDomUpdates:t=!1,directDomUpdatesMode:s="transform",...i}){let l=r.useReducer(e=>e+1,0)[1],o=r.useRef({enabled:t,mode:s,container:null,lastSize:null,lastPositions:new WeakMap,prevRange:null});o.current.enabled=t,o.current.mode=s;let a=e=>{let t=o.current;if(!t.enabled)return;let s=e.getTotalSize();if(t.container&&s!==t.lastSize){t.lastSize=s;let r=e.options.horizontal?"width":"height";t.container.style[r]=`${s}px`}let r=!!e.options.horizontal,n="transform"===t.mode,i=r?"left":"top",l=e.options.scrollMargin;for(let s of e.getVirtualItems()){let o=s.start-l,a=e.elementsCache.get(s.key);a&&t.lastPositions.get(a)!==o&&(t.lastPositions.set(a,o),n?a.style.transform=r?`translate3d(${o}px, 0, 0)`:`translate3d(0, ${o}px, 0)`:a.style[i]=`${o}px`)}},d={...i,onChange:(t,s)=>{var r;let d=o.current,c=!0;if(d.enabled){a(t);let e=t.range,s=d.prevRange;(c=!s||s.isScrolling!==t.isScrolling||s.startIndex!==(null==e?void 0:e.startIndex)||s.endIndex!==(null==e?void 0:e.endIndex))&&(d.prevRange=e?{startIndex:e.startIndex,endIndex:e.endIndex,isScrolling:t.isScrolling}:null)}c&&(e&&s?(0,n.flushSync)(l):l()),null==(r=i.onChange)||r.call(i,t,s)}},[c]=r.useState(()=>{let e=new g(d);return Object.assign(e,{containerRef:t=>{let s=o.current;if(s.container=t,s.lastSize=null,t&&s.enabled){let r=e.getTotalSize();s.lastSize=r;let n=e.options.horizontal?"width":"height";t.style[n]=`${r}px`}}})});return c.setOptions(d),y(()=>c._didMount(),[]),y(()=>c._willUpdate()),y(()=>{a(c)}),c}({getScrollElement:()=>"u">typeof document?window:null,observeElementRect:h,observeElementOffset:m,scrollToFn:f,initialOffset:()=>"u">typeof document?window.scrollY:0,...{count:S.length,estimateSize:e=>(function(e){switch(e.type){case"queue-operation":return 48;case"user":return 90;case"assistant":return 80+120*e.message.content.length;default:return 100}})(S[e]),overscan:5,scrollMargin:c}});return(0,r.useEffect)(()=>{if(!p||v.current)return;let e=E??p,t=N.get(e);null!=t&&(v.current=!0,requestAnimationFrame(()=>{C.scrollToIndex(t,{align:"center"})}))},[p,E,N,C]),(0,s.jsx)("div",{ref:j,children:(0,s.jsx)("div",{style:{height:`${C.getTotalSize()}px`,width:"100%",position:"relative"},children:C.getVirtualItems().map(e=>{let r=S[e.index],n=!!p&&r.uuid===(E??p);return(0,s.jsx)("div",{"data-index":e.index,ref:C.measureElement,style:{position:"absolute",top:0,left:0,width:"100%",transform:`translateY(${e.start-C.options.scrollMargin}px)`},children:"queue-operation"===r.type?(0,s.jsx)(F,{entry:r,isCollapsed:a.has(ev(r)),entryCount:w.get(ev(r))??0,onToggle:()=>I(ev(r))}):(0,s.jsx)(er,{entry:r,entriesBySource:t,projectName:i,sessionId:l,isHighlighted:!k&&n,highlightedUuid:k,autoExpandForUuid:k})},"queue-operation"===r.type?ev(r):r.uuid||r.timestamp)})})})}let eS=[];e.s([],76248),e.i(76248),e.s(["default",0,function({entries:e,projectName:t,sessionId:n}){let i=(0,r.useMemo)(()=>{let t=new Map;for(let s of e){let e=t.get(s._source);e?e.push(s):t.set(s._source,[s])}return t},[e]),l=i.get("session")??eS,o=(0,r.useMemo)(()=>(function(e){let t=new Map;for(let s of e)if("assistant"===s.type)for(let e of s.message.content)"tool_use"===e.type&&"Task"===e.name&&e.subagentId&&(t.has(e.subagentId)||t.set(e.subagentId,{id:e.subagentId,type:e.subagentType||"unknown",description:e.subagentDescription||""}));return Array.from(t.values())})(e),[e]),a=(0,r.useMemo)(()=>ey(l),[l]),[d,c]=(0,r.useState)(!1),[h,u]=(0,r.useState)(new Set),[m,p]=(0,r.useState)(!1),[f,g]=(0,r.useState)(null);(0,r.useEffect)(()=>{(0,en.searchHookActivityAction)({sessionId:n},1).then(e=>{e.entries.length>0&&g(e)}).catch(()=>{})},[n]),(0,r.useEffect)(()=>{let e=()=>{window.location.hash.startsWith("#entry-")&&p(!1)};return window.addEventListener("hashchange",e),()=>window.removeEventListener("hashchange",e)},[]);let x=(0,r.useCallback)(e=>{u(t=>{let s=new Set(t);return s.has(e)?s.delete(e):s.add(e),s})},[]);return(0,s.jsxs)("div",{className:"space-y-4",children:[(0,s.jsx)(I,{entries:l}),f&&(0,s.jsx)(ex,{sessionId:n,initialData:f},n),o.length>0&&(0,s.jsxs)("div",{className:"space-y-3",children:[(0,s.jsxs)("button",{onClick:()=>c(e=>!e),className:"flex items-center gap-2 hover:opacity-80 transition-opacity",children:[(0,s.jsx)(b.ChevronDown,{className:`w-4 h-4 text-muted-foreground transition-transform ${d?"-rotate-90":""}`}),(0,s.jsx)("span",{className:"text-sm font-semibold text-muted-foreground uppercase tracking-wide",children:"Subagents"}),(0,s.jsxs)("span",{className:"text-xs text-muted-foreground",children:["(",o.length,")"]})]}),!d&&o.map(e=>{let t;return(0,s.jsxs)("div",{className:"pl-3 border-l-2 border-primary/30 space-y-2",children:[(0,s.jsxs)("button",{onClick:()=>x(e.id),className:"flex items-center gap-2 hover:opacity-80 transition-opacity",children:[(0,s.jsx)(b.ChevronDown,{className:`w-3.5 h-3.5 text-muted-foreground transition-transform ${h.has(e.id)?"-rotate-90":""}`}),(0,s.jsx)("span",{className:"text-sm font-bold",children:e.type}),e.description&&(0,s.jsx)("span",{className:"text-xs text-muted-foreground truncate max-w-[400px]",children:e.description})]}),!h.has(e.id)&&(0,s.jsxs)("div",{className:"space-y-2",children:[(0,s.jsx)(I,{entries:i.get(`agent-${e.id}`)||[],compact:!0}),(t=ey(i.get(`agent-${e.id}`)||[])).length>0?(0,s.jsx)(eb,{tools:t,compact:!0}):null]})]},e.id)})]}),a.length>0&&(0,s.jsxs)("div",{className:"space-y-3",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)("span",{className:"text-sm font-semibold text-muted-foreground uppercase tracking-wide",children:"Tools"}),(0,s.jsxs)("span",{className:"text-xs text-muted-foreground",children:["(",a.reduce((e,t)=>e+t.count,0),")"]})]}),(0,s.jsx)(eb,{tools:a})]}),(0,s.jsxs)("div",{children:[(0,s.jsxs)("button",{onClick:()=>p(e=>!e),className:"flex items-center gap-2 hover:opacity-80 transition-opacity",children:[(0,s.jsx)(b.ChevronDown,{className:`w-4 h-4 text-muted-foreground transition-transform ${m?"-rotate-90":""}`}),(0,s.jsx)("span",{className:"text-sm font-semibold text-muted-foreground uppercase tracking-wide",children:"Logs"})]}),!m&&(0,s.jsx)("div",{className:"mt-2 bg-card border border-border rounded-lg p-4 shadow-sm",children:0===l.length?(0,s.jsx)("p",{className:"text-muted-foreground text-center py-8",children:"No entries found."}):(0,s.jsx)(ew,{entries:l,entriesBySource:i,projectName:t,sessionId:n})})]})]})}],36406)},5780,e=>{e.n(e.i(36406))}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,53348,e=>{"use strict";var r=e.i(43476),t=e.i(71645),n=e.i(
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,53348,e=>{"use strict";var r=e.i(43476),t=e.i(71645),n=e.i(15574),i=e.i(9969);e.s(["default",0,function({error:e,reset:o}){return(0,t.useEffect)(()=>{(0,n.getTelemetryConfig)().then(r=>{(0,i.setClientTelemetryConfig)(r),(0,i.captureClientEvent)("client_error",{error_message:e.message,error_name:e.name,error_digest:e.digest,boundary:"global"})}).catch(()=>{})},[e]),(0,r.jsx)("html",{children:(0,r.jsx)("body",{children:(0,r.jsx)("main",{style:{minHeight:"100vh",display:"flex",alignItems:"center",justifyContent:"center",background:"#031035",color:"#f8fafc",fontFamily:"system-ui, sans-serif"},children:(0,r.jsxs)("div",{style:{textAlign:"center",padding:"2rem",border:"1px solid rgba(239,68,68,0.4)",borderRadius:"0.5rem",maxWidth:"500px"},children:[(0,r.jsx)("h2",{style:{color:"#ef4444",marginBottom:"0.5rem",fontSize:"1.25rem"},children:"Something went wrong"}),(0,r.jsx)("p",{style:{color:"#94a3b8",marginBottom:"1.5rem"},children:e.message||"An unexpected error occurred."}),(0,r.jsx)("button",{onClick:o,style:{padding:"0.5rem 1.25rem",background:"#3b82f6",color:"white",border:"none",borderRadius:"0.375rem",cursor:"pointer",fontSize:"0.875rem"},children:"Try again"})]})})})})}])}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,33525,(e,r,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"warnOnce",{enumerable:!0,get:function(){return n}});let n=e=>{}},18967,(e,r,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n={DecodeError:function(){return
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,33525,(e,r,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"warnOnce",{enumerable:!0,get:function(){return n}});let n=e=>{}},18967,(e,r,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n={DecodeError:function(){return b},MiddlewareNotFoundError:function(){return P},MissingStaticPage:function(){return S},NormalizeError:function(){return h},PageNotFoundError:function(){return v},SP:function(){return m},ST:function(){return y},WEB_VITALS:function(){return i},execOnce:function(){return a},getDisplayName:function(){return f},getLocationOrigin:function(){return u},getURL:function(){return l},isAbsoluteUrl:function(){return c},isResSent:function(){return d},loadGetInitialProps:function(){return g},normalizeRepeatedSlashes:function(){return p},stringifyError:function(){return E}};for(var o in n)Object.defineProperty(t,o,{enumerable:!0,get:n[o]});let i=["CLS","FCP","FID","INP","LCP","TTFB"];function a(e){let r,t=!1;return(...n)=>(t||(t=!0,r=e(...n)),r)}let s=/^[a-zA-Z][a-zA-Z\d+\-.]*?:/,c=e=>s.test(e);function u(){let{protocol:e,hostname:r,port:t}=window.location;return`${e}//${r}${t?":"+t:""}`}function l(){let{href:e}=window.location,r=u();return e.substring(r.length)}function f(e){return"string"==typeof e?e:e.displayName||e.name||"Unknown"}function d(e){return e.finished||e.headersSent}function p(e){let r=e.split("?");return r[0].replace(/\\/g,"/").replace(/\/\/+/g,"/")+(r[1]?`?${r.slice(1).join("?")}`:"")}async function g(e,r){let t=r.res||r.ctx&&r.ctx.res;if(!e.getInitialProps)return r.ctx&&r.Component?{pageProps:await g(r.Component,r.ctx)}:{};let n=await e.getInitialProps(r);if(t&&d(t))return n;if(!n)throw Object.defineProperty(Error(`"${f(e)}.getInitialProps()" should resolve to an object. But found "${n}" instead.`),"__NEXT_ERROR_CODE",{value:"E1025",enumerable:!1,configurable:!0});return n}let m="u">typeof performance,y=m&&["mark","measure","getEntriesByName"].every(e=>"function"==typeof performance[e]);class b extends Error{}class h extends Error{}class v extends Error{constructor(e){super(),this.code="ENOENT",this.name="PageNotFoundError",this.message=`Cannot find module for page: ${e}`}}class S extends Error{constructor(e,r){super(),this.message=`Failed to load static file for page: ${e} ${r}`}}class P extends Error{constructor(){super(),this.code="ENOENT",this.message="Cannot find the middleware module"}}function E(e){return JSON.stringify({message:e.message,stack:e.stack})}},98183,(e,r,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n={assign:function(){return c},searchParamsToUrlQuery:function(){return i},urlQueryToSearchParams:function(){return s}};for(var o in n)Object.defineProperty(t,o,{enumerable:!0,get:n[o]});function i(e){let r={};for(let[t,n]of e.entries()){let e=r[t];void 0===e?r[t]=n:Array.isArray(e)?e.push(n):r[t]=[e,n]}return r}function a(e){return"string"==typeof e?e:("number"!=typeof e||isNaN(e))&&"boolean"!=typeof e?"":String(e)}function s(e){let r=new URLSearchParams;for(let[t,n]of Object.entries(e))if(Array.isArray(n))for(let e of n)r.append(t,a(e));else r.set(t,a(n));return r}function c(e,...r){for(let t of r){for(let r of t.keys())e.delete(r);for(let[r,n]of t.entries())e.append(r,n)}return e}},9969,e=>{"use strict";let r=null;e.s(["captureClientEvent",0,function(e,t){if(!r||!r.enabled)return;let n=JSON.stringify({api_key:r.apiKey,event:e,distinct_id:r.distinctId,properties:{...t,$lib:"failproofai-web",failproofai_version:r.version,product:"failproofai-oss",$current_url:window.location.href,$pathname:window.location.pathname}});fetch(r.host.replace(/\/+$/,"")+"/capture/",{method:"POST",headers:{"Content-Type":"application/json"},body:n,signal:AbortSignal.timeout(5e3)}).catch(()=>{})},"setClientTelemetryConfig",0,function(e){r=e}],9969)},95187,(e,r,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n={callServer:function(){return i.callServer},createServerReference:function(){return s.createServerReference},findSourceMapURL:function(){return a.findSourceMapURL}};for(var o in n)Object.defineProperty(t,o,{enumerable:!0,get:n[o]});let i=e.r(32120),a=e.r(92245),s=e.r(35326)},15574,e=>{"use strict";var r=e.i(95187);let t=(0,r.createServerReference)("00a7b5386a1a3e47fc1d84985626367e9b2acb7a05",r.callServer,void 0,r.findSourceMapURL,"getTelemetryConfig");e.s(["getTelemetryConfig",0,t])},53348,e=>{"use strict";var r=e.i(43476),t=e.i(71645),n=e.i(15574),o=e.i(9969);e.s(["default",0,function({error:e,reset:i}){return(0,t.useEffect)(()=>{(0,n.getTelemetryConfig)().then(r=>{(0,o.setClientTelemetryConfig)(r),(0,o.captureClientEvent)("client_error",{error_message:e.message,error_name:e.name,error_digest:e.digest,boundary:"global"})}).catch(()=>{})},[e]),(0,r.jsx)("html",{children:(0,r.jsx)("body",{children:(0,r.jsx)("main",{style:{minHeight:"100vh",display:"flex",alignItems:"center",justifyContent:"center",background:"#031035",color:"#f8fafc",fontFamily:"system-ui, sans-serif"},children:(0,r.jsxs)("div",{style:{textAlign:"center",padding:"2rem",border:"1px solid rgba(239,68,68,0.4)",borderRadius:"0.5rem",maxWidth:"500px"},children:[(0,r.jsx)("h2",{style:{color:"#ef4444",marginBottom:"0.5rem",fontSize:"1.25rem"},children:"Something went wrong"}),(0,r.jsx)("p",{style:{color:"#94a3b8",marginBottom:"1.5rem"},children:e.message||"An unexpected error occurred."}),(0,r.jsx)("button",{onClick:i,style:{padding:"0.5rem 1.25rem",background:"#3b82f6",color:"white",border:"none",borderRadius:"0.375rem",cursor:"pointer",fontSize:"0.875rem"},children:"Try again"})]})})})})}])}]);
|