@claudeye/linux-x64 1.0.4-beta.5 → 1.0.4-beta.7
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/assets/standalone/.next/BUILD_ID +1 -1
- package/assets/standalone/.next/build-manifest.json +2 -2
- package/assets/standalone/.next/prerender-manifest.json +3 -3
- package/assets/standalone/.next/server/app/_global-error/page_client-reference-manifest.js +1 -1
- package/assets/standalone/.next/server/app/_global-error.html +2 -2
- package/assets/standalone/.next/server/app/_global-error.rsc +1 -1
- package/assets/standalone/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
- package/assets/standalone/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/assets/standalone/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
- package/assets/standalone/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
- package/assets/standalone/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/assets/standalone/.next/server/app/_not-found/page/server-reference-manifest.json +1 -1
- package/assets/standalone/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/assets/standalone/.next/server/app/_not-found.html +2 -2
- package/assets/standalone/.next/server/app/_not-found.rsc +6 -6
- package/assets/standalone/.next/server/app/_not-found.segments/_full.segment.rsc +6 -6
- package/assets/standalone/.next/server/app/_not-found.segments/_head.segment.rsc +1 -1
- package/assets/standalone/.next/server/app/_not-found.segments/_index.segment.rsc +6 -6
- package/assets/standalone/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
- package/assets/standalone/.next/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
- package/assets/standalone/.next/server/app/_not-found.segments/_tree.segment.rsc +1 -1
- package/assets/standalone/.next/server/app/api/completed-history/route.js +1 -1
- package/assets/standalone/.next/server/app/api/queue-item/route.js +1 -1
- package/assets/standalone/.next/server/app/api/queue-status/route.js +1 -1
- package/assets/standalone/.next/server/app/dashboard/[viewName]/page/server-reference-manifest.json +4 -4
- package/assets/standalone/.next/server/app/dashboard/[viewName]/page_client-reference-manifest.js +1 -1
- package/assets/standalone/.next/server/app/dashboard/page/server-reference-manifest.json +4 -4
- package/assets/standalone/.next/server/app/dashboard/page_client-reference-manifest.js +1 -1
- package/assets/standalone/.next/server/app/login/page/server-reference-manifest.json +2 -2
- package/assets/standalone/.next/server/app/login/page_client-reference-manifest.js +1 -1
- package/assets/standalone/.next/server/app/login.html +2 -2
- package/assets/standalone/.next/server/app/login.rsc +7 -7
- package/assets/standalone/.next/server/app/login.segments/_full.segment.rsc +7 -7
- package/assets/standalone/.next/server/app/login.segments/_head.segment.rsc +1 -1
- package/assets/standalone/.next/server/app/login.segments/_index.segment.rsc +6 -6
- package/assets/standalone/.next/server/app/login.segments/_tree.segment.rsc +1 -1
- package/assets/standalone/.next/server/app/login.segments/login/__PAGE__.segment.rsc +2 -2
- package/assets/standalone/.next/server/app/login.segments/login.segment.rsc +1 -1
- package/assets/standalone/.next/server/app/page/server-reference-manifest.json +1 -1
- package/assets/standalone/.next/server/app/page_client-reference-manifest.js +1 -1
- package/assets/standalone/.next/server/app/project/[name]/page/server-reference-manifest.json +1 -1
- package/assets/standalone/.next/server/app/project/[name]/page_client-reference-manifest.js +1 -1
- package/assets/standalone/.next/server/app/project/[name]/session/[sessionId]/page/react-loadable-manifest.json +1 -1
- package/assets/standalone/.next/server/app/project/[name]/session/[sessionId]/page/server-reference-manifest.json +8 -8
- package/assets/standalone/.next/server/app/project/[name]/session/[sessionId]/page.js +1 -1
- package/assets/standalone/.next/server/app/project/[name]/session/[sessionId]/page_client-reference-manifest.js +1 -1
- package/assets/standalone/.next/server/app/queue/page/server-reference-manifest.json +3 -3
- package/assets/standalone/.next/server/app/queue/page.js +1 -1
- package/assets/standalone/.next/server/app/queue/page_client-reference-manifest.js +1 -1
- package/assets/standalone/.next/server/chunks/[root-of-the-server]__1b1bb02d._.js +4 -0
- package/assets/standalone/.next/server/chunks/[root-of-the-server]__639e9c9a._.js +3 -0
- package/assets/standalone/.next/server/chunks/[root-of-the-server]__6b95fca3._.js +3 -0
- package/assets/standalone/.next/server/chunks/[root-of-the-server]__88b832c4._.js +3 -0
- package/assets/standalone/.next/server/chunks/[root-of-the-server]__df519d04._.js +3 -0
- package/assets/standalone/.next/server/chunks/_3f3c09bf._.js +1 -1
- package/assets/standalone/.next/server/chunks/_7e07bbd9._.js +1 -1
- package/assets/standalone/.next/server/chunks/_8f856fad._.js +1 -1
- package/assets/standalone/.next/server/chunks/_b394bd4b._.js +1 -1
- package/assets/standalone/.next/server/chunks/_b8adaa37._.js +2 -2
- package/assets/standalone/.next/server/chunks/lib_eval-queue_ts_642b3543._.js +1 -1
- package/assets/standalone/.next/server/chunks/node_modules_next_dist_esm_build_templates_app-route_7a66d362.js +1 -1
- package/assets/standalone/.next/server/chunks/package_json_4b1b4d6f._.js +1 -1
- package/assets/standalone/.next/server/chunks/ssr/{[root-of-the-server]__ec5e984e._.js → [root-of-the-server]__38984221._.js} +3 -3
- package/assets/standalone/.next/server/chunks/ssr/{[root-of-the-server]__d889f802._.js → [root-of-the-server]__84ff5b0e._.js} +3 -3
- package/assets/standalone/.next/server/chunks/ssr/_14858238._.js +1 -1
- package/assets/standalone/.next/server/chunks/ssr/_19a3e694._.js +2 -2
- package/assets/standalone/.next/server/chunks/ssr/_1d335924._.js +1 -1
- package/assets/standalone/.next/server/chunks/ssr/_3dacef09._.js +1 -1
- package/assets/standalone/.next/server/chunks/ssr/_617143fc._.js +2 -2
- package/assets/standalone/.next/server/chunks/ssr/_76ab933f._.js +1 -1
- package/assets/standalone/.next/server/chunks/ssr/_7ae321cd._.js +2 -2
- package/assets/standalone/.next/server/chunks/ssr/_87e025a1._.js +1 -1
- package/assets/standalone/.next/server/chunks/ssr/_986c0cdb._.js +2 -2
- package/assets/standalone/.next/server/chunks/ssr/_c9400c33._.js +2 -2
- package/assets/standalone/.next/server/chunks/ssr/_d7159840._.js +1 -1
- package/assets/standalone/.next/server/chunks/ssr/_fa9c2bed._.js +2 -2
- package/assets/standalone/.next/server/chunks/ssr/app_actions_compute-dashboard_ts_fc151dbb._.js +1 -1
- package/assets/standalone/.next/server/chunks/ssr/app_login_page_tsx_ccc0019b._.js +1 -1
- package/assets/standalone/.next/server/chunks/ssr/app_queue_queue-client_tsx_45f040f7._.js +1 -1
- package/assets/standalone/.next/server/chunks/ssr/lib_eval-queue_ts_e2258485._.js +1 -1
- package/assets/standalone/.next/server/chunks/ssr/node_modules_next_dist_esm_eedfc1fd._.js +1 -1
- package/assets/standalone/.next/server/pages/404.html +2 -2
- package/assets/standalone/.next/server/pages/500.html +2 -2
- package/assets/standalone/.next/server/server-reference-manifest.js +1 -1
- package/assets/standalone/.next/server/server-reference-manifest.json +15 -15
- package/assets/standalone/.next/static/chunks/{55d7f3d570c3f38d.js → 5ae59224724682dc.js} +1 -1
- package/assets/standalone/.next/static/chunks/{8669d54d92d4466d.js → 6141caa2603e0880.js} +1 -1
- package/assets/standalone/.next/static/chunks/{1486b27aa4b57257.js → 956e49a68b386f70.js} +1 -1
- package/assets/standalone/.next/static/chunks/{333e46921ff43343.js → 9c84b3fa3dc62c60.js} +1 -1
- package/assets/standalone/.next/static/chunks/{e44c4c3d49708f7c.js → cda126f1a405a998.js} +1 -1
- package/assets/standalone/.next/static/chunks/{4dd8683617bd1a5d.js → ecc98c903d48abfc.js} +3 -3
- package/assets/standalone/package.json +1 -1
- package/bin/claudeye +0 -0
- package/package.json +1 -1
- package/assets/standalone/.next/server/chunks/[root-of-the-server]__389cb3d5._.js +0 -3
- package/assets/standalone/.next/server/chunks/[root-of-the-server]__69ce7092._.js +0 -3
- package/assets/standalone/.next/server/chunks/[root-of-the-server]__c7fb0df9._.js +0 -4
- package/assets/standalone/.next/server/chunks/[root-of-the-server]__e41760c0._.js +0 -3
- package/assets/standalone/.next/server/chunks/[root-of-the-server]__f56ad7d8._.js +0 -3
- /package/assets/standalone/.next/static/{iVoYbjH6JlkOnJKcKC-Ts → P18Lxdrc77C-DQQSii3OB}/_buildManifest.js +0 -0
- /package/assets/standalone/.next/static/{iVoYbjH6JlkOnJKcKC-Ts → P18Lxdrc77C-DQQSii3OB}/_clientMiddlewareManifest.json +0 -0
- /package/assets/standalone/.next/static/{iVoYbjH6JlkOnJKcKC-Ts → P18Lxdrc77C-DQQSii3OB}/_ssgManifest.js +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"node": {
|
|
3
|
-
"
|
|
3
|
+
"009057c308c98d7346fd82aa9a32354e56053ff925": {
|
|
4
4
|
"workers": {
|
|
5
5
|
"app/_not-found/page": {
|
|
6
6
|
"moduleId": 74639,
|
|
@@ -64,7 +64,7 @@
|
|
|
64
64
|
"filename": "app/actions/auth.ts",
|
|
65
65
|
"exportedName": "logout"
|
|
66
66
|
},
|
|
67
|
-
"
|
|
67
|
+
"0067ec978c672419e5e9588f8f5f2bc21a8a95dc98": {
|
|
68
68
|
"workers": {
|
|
69
69
|
"app/dashboard/[viewName]/page": {
|
|
70
70
|
"moduleId": 20722,
|
|
@@ -86,7 +86,7 @@
|
|
|
86
86
|
"filename": "app/actions/list-dashboard-views.ts",
|
|
87
87
|
"exportedName": "listDashboardViews"
|
|
88
88
|
},
|
|
89
|
-
"
|
|
89
|
+
"60c7fe61b5a21f69eeef773c094c3a60a787ffdd3b": {
|
|
90
90
|
"workers": {
|
|
91
91
|
"app/dashboard/[viewName]/page": {
|
|
92
92
|
"moduleId": 20722,
|
|
@@ -108,7 +108,7 @@
|
|
|
108
108
|
"filename": "app/actions/compute-dashboard.ts",
|
|
109
109
|
"exportedName": "computeDashboard"
|
|
110
110
|
},
|
|
111
|
-
"
|
|
111
|
+
"40f42081621f5d6f5a51d3e58c9c56dfe66b3961fc": {
|
|
112
112
|
"workers": {
|
|
113
113
|
"app/dashboard/[viewName]/page": {
|
|
114
114
|
"moduleId": 20722,
|
|
@@ -130,7 +130,7 @@
|
|
|
130
130
|
"filename": "app/actions/compute-aggregates.ts",
|
|
131
131
|
"exportedName": "computeAggregates"
|
|
132
132
|
},
|
|
133
|
-
"
|
|
133
|
+
"4042e6f3c27fe2b8c648b50c1ba7efcf91ed4ce164": {
|
|
134
134
|
"workers": {
|
|
135
135
|
"app/login/page": {
|
|
136
136
|
"moduleId": 51661,
|
|
@@ -145,7 +145,7 @@
|
|
|
145
145
|
"filename": "app/actions/auth.ts",
|
|
146
146
|
"exportedName": "login"
|
|
147
147
|
},
|
|
148
|
-
"
|
|
148
|
+
"78e8dc5721f3ea29fa224635c5c4f0218a9cca9d0b": {
|
|
149
149
|
"workers": {
|
|
150
150
|
"app/project/[name]/session/[sessionId]/page": {
|
|
151
151
|
"moduleId": 79839,
|
|
@@ -160,7 +160,7 @@
|
|
|
160
160
|
"filename": "app/actions/check-eval-cache.ts",
|
|
161
161
|
"exportedName": "checkEvalCacheAndList"
|
|
162
162
|
},
|
|
163
|
-
"
|
|
163
|
+
"60619ccd657b7bb3e8b061509b21f6eb177b0f73a1": {
|
|
164
164
|
"workers": {
|
|
165
165
|
"app/project/[name]/session/[sessionId]/page": {
|
|
166
166
|
"moduleId": 79839,
|
|
@@ -175,7 +175,7 @@
|
|
|
175
175
|
"filename": "app/actions/clear-alert-marker.ts",
|
|
176
176
|
"exportedName": "clearAlertMarker"
|
|
177
177
|
},
|
|
178
|
-
"
|
|
178
|
+
"78a4e7d6cf541c9c824ab398e4c5f6039857613b1b": {
|
|
179
179
|
"workers": {
|
|
180
180
|
"app/project/[name]/session/[sessionId]/page": {
|
|
181
181
|
"moduleId": 79839,
|
|
@@ -190,7 +190,7 @@
|
|
|
190
190
|
"filename": "app/actions/invalidate-session-caches.ts",
|
|
191
191
|
"exportedName": "invalidateSessionItemCaches"
|
|
192
192
|
},
|
|
193
|
-
"
|
|
193
|
+
"78ea8b40c869663e65dec3da9d674f7c47ee0eef10": {
|
|
194
194
|
"workers": {
|
|
195
195
|
"app/project/[name]/session/[sessionId]/page": {
|
|
196
196
|
"moduleId": 79839,
|
|
@@ -205,7 +205,7 @@
|
|
|
205
205
|
"filename": "app/actions/check-enrichment-cache.ts",
|
|
206
206
|
"exportedName": "checkEnrichmentCacheAndList"
|
|
207
207
|
},
|
|
208
|
-
"
|
|
208
|
+
"782491ea6cc6cddf33f4226e888ba9749c471b2c5b": {
|
|
209
209
|
"workers": {
|
|
210
210
|
"app/project/[name]/session/[sessionId]/page": {
|
|
211
211
|
"moduleId": 79839,
|
|
@@ -220,7 +220,7 @@
|
|
|
220
220
|
"filename": "app/actions/check-action-cache.ts",
|
|
221
221
|
"exportedName": "checkActionCacheAndList"
|
|
222
222
|
},
|
|
223
|
-
"
|
|
223
|
+
"7c164c9b77804c8d2279d6822723d0daeaa0d78ae3": {
|
|
224
224
|
"workers": {
|
|
225
225
|
"app/project/[name]/session/[sessionId]/page": {
|
|
226
226
|
"moduleId": 79839,
|
|
@@ -235,7 +235,7 @@
|
|
|
235
235
|
"filename": "app/actions/invalidate-session-caches.ts",
|
|
236
236
|
"exportedName": "invalidateSessionItemCache"
|
|
237
237
|
},
|
|
238
|
-
"
|
|
238
|
+
"00ab954b6b9925c708b52460906eafea4608be5624": {
|
|
239
239
|
"workers": {
|
|
240
240
|
"app/project/[name]/session/[sessionId]/page": {
|
|
241
241
|
"moduleId": 79839,
|
|
@@ -250,7 +250,7 @@
|
|
|
250
250
|
"filename": "app/actions/get-queue-status.ts",
|
|
251
251
|
"exportedName": "getQueueStatusAction"
|
|
252
252
|
},
|
|
253
|
-
"
|
|
253
|
+
"40db08619cebb164930f904a701b786721deb26dd4": {
|
|
254
254
|
"workers": {
|
|
255
255
|
"app/queue/page": {
|
|
256
256
|
"moduleId": 16057,
|
|
@@ -265,7 +265,7 @@
|
|
|
265
265
|
"filename": "app/actions/get-completed-history.ts",
|
|
266
266
|
"exportedName": "getCompletedHistoryAction"
|
|
267
267
|
},
|
|
268
|
-
"
|
|
268
|
+
"60f5e53109928642d659a758f75e4b2f3660933c1d": {
|
|
269
269
|
"workers": {
|
|
270
270
|
"app/queue/page": {
|
|
271
271
|
"moduleId": 16057,
|
|
@@ -282,5 +282,5 @@
|
|
|
282
282
|
}
|
|
283
283
|
},
|
|
284
284
|
"edge": {},
|
|
285
|
-
"encryptionKey": "
|
|
285
|
+
"encryptionKey": "MXbm1fgyPfY05Kbcti8lGnnIIAAkqlmgefWGv/MsSho="
|
|
286
286
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,36406,e=>{"use strict";var t=e.i(43476),s=e.i(71645),r=e.i(74080);function a(e,t,s){let r,a=s.initialDeps??[],n=!0;function i(){var i,l,o;let c,d;s.key&&(null==(i=s.debug)?void 0:i.call(s))&&(c=Date.now());let u=e();if(!(u.length!==a.length||u.some((e,t)=>a[t]!==e)))return r;if(a=u,s.key&&(null==(l=s.debug)?void 0:l.call(s))&&(d=Date.now()),r=t(...u),s.key&&(null==(o=s.debug)?void 0:o.call(s))){let e=Math.round((Date.now()-c)*100)/100,t=Math.round((Date.now()-d)*100)/100,r=t/16,a=(e,t)=>{for(e=String(e);e.length<t;)e=" "+e;return e};console.info(`%c⏱ ${a(t,5)} /${a(e,5)} ms`,`
|
|
2
2
|
font-size: .6rem;
|
|
3
3
|
font-weight: bold;
|
|
4
|
-
color: hsl(${Math.max(0,Math.min(120-120*r,120))}deg 100% 31%);`,null==s?void 0:s.key)}return(null==s?void 0:s.onChange)&&!(n&&s.skipInitialOnChange)&&s.onChange(r),n=!1,r}return i.updateDeps=e=>{a=e},i}function n(e,t){if(void 0!==e)return e;throw Error(`Unexpected undefined${t?`: ${t}`:""}`)}e.i(47167);let i=e=>e,l=e=>{let t=Math.max(e.startIndex-e.overscan,0),s=Math.min(e.endIndex+e.overscan,e.count-1),r=[];for(let e=t;e<=s;e++)r.push(e);return r},o={passive:!0},c=(e,t)=>{let s=e.scrollElement;if(!s)return;let r=()=>{t({width:s.innerWidth,height:s.innerHeight})};return r(),s.addEventListener("resize",r,o),()=>{s.removeEventListener("resize",r)}},d="u"<typeof window||"onscrollend"in window,u=(e,t)=>{var s,r;let a,n=e.scrollElement;if(!n)return;let i=e.targetWindow;if(!i)return;let l=0,c=e.options.useScrollendEvent&&d?()=>void 0:(s=()=>{t(l,!1)},r=e.options.isScrollingResetDelay,function(...e){i.clearTimeout(a),a=i.setTimeout(()=>s.apply(this,e),r)}),u=s=>()=>{l=n[e.options.horizontal?"scrollX":"scrollY"],c(),t(l,s)},m=u(!0),h=u(!1);n.addEventListener("scroll",m,o);let p=e.options.useScrollendEvent&&d;return p&&n.addEventListener("scrollend",h,o),()=>{n.removeEventListener("scroll",m),p&&n.removeEventListener("scrollend",h)}},m=(e,t,s)=>{if(null==t?void 0:t.borderBoxSize){let e=t.borderBoxSize[0];if(e)return Math.round(e[s.options.horizontal?"inlineSize":"blockSize"])}return e[s.options.horizontal?"offsetWidth":"offsetHeight"]},h=(e,{adjustments:t=0,behavior:s},r)=>{var a,n;null==(n=null==(a=r.scrollElement)?void 0:a.scrollTo)||n.call(a,{[r.options.horizontal?"left":"top"]:e+t,behavior:s})};class p{constructor(e){this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.isScrolling=!1,this.scrollState=null,this.measurementsCache=[],this.itemSizeCache=new Map,this.laneAssignments=new Map,this.pendingMeasuredCacheIndexes=[],this.prevLanes=void 0,this.lanesChangedFlag=!1,this.lanesSettling=!1,this.scrollRect=null,this.scrollOffset=null,this.scrollDirection=null,this.scrollAdjustments=0,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=()=>{this._measureElement(e.target,e)};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=>{Object.entries(e).forEach(([t,s])=>{void 0===s&&delete e[t]}),this.options={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:i,rangeExtractor:l,onChange:()=>{},measureElement:m,initialRect:{width:0,height:0},scrollMargin:0,gap:0,indexAttribute:"data-index",initialMeasurementsCache:[],lanes:1,isScrollingResetDelay:150,enabled:!0,isRtl:!1,useScrollendEvent:!1,useAnimationFrameWithResizeObserver:!1,...e}},this.notify=e=>{var t,s;null==(s=(t=this.options).onChange)||s.call(t,this,e)},this.maybeNotify=a(()=>(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();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)=>{this.scrollAdjustments=0,this.scrollDirection=t?this.getScrollOffset()<e?"forward":"backward":null,this.scrollOffset=e,this.isScrolling=t,this.scrollState&&this.scheduleScrollReconcile(),this.maybeNotify()})),this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,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 a=t-1;a>=0;a--){let t=e[a];if(s.has(t.lane))continue;let n=r.get(t.lane);if(null==n||t.end>n.end?r.set(t.lane,t):t.end<n.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=a(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled,this.options.lanes],(e,t,s,r,a,n)=>(void 0!==this.prevLanes&&this.prevLanes!==n&&(this.lanesChangedFlag=!0),this.prevLanes=n,this.pendingMeasuredCacheIndexes=[],{count:e,paddingStart:t,scrollMargin:s,getItemKey:r,enabled:a,lanes:n}),{key:!1}),this.getMeasurements=a(()=>[this.getMeasurementOptions(),this.itemSizeCache],({count:e,paddingStart:t,scrollMargin:s,getItemKey:r,enabled:a,lanes:n},i)=>{if(!a)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.pendingMeasuredCacheIndexes=[]),0!==this.measurementsCache.length||this.lanesSettling||(this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(e=>{this.itemSizeCache.set(e.key,e.size)}));let l=this.lanesSettling?0:this.pendingMeasuredCacheIndexes.length>0?Math.min(...this.pendingMeasuredCacheIndexes):0;this.pendingMeasuredCacheIndexes=[],this.lanesSettling&&this.measurementsCache.length===e&&(this.lanesSettling=!1);let o=this.measurementsCache.slice(0,l),c=Array(n).fill(void 0);for(let e=0;e<l;e++){let t=o[e];t&&(c[t.lane]=e)}for(let a=l;a<e;a++){let e,n,l=r(a),d=this.laneAssignments.get(a);if(void 0!==d&&this.options.lanes>1){let r=c[e=d],a=void 0!==r?o[r]:void 0;n=a?a.end+this.options.gap:t+s}else{let r=1===this.options.lanes?o[a-1]:this.getFurthestMeasurement(o,a);n=r?r.end+this.options.gap:t+s,e=r?r.lane:a%this.options.lanes,this.options.lanes>1&&this.laneAssignments.set(a,e)}let u=i.get(l),m="number"==typeof u?u:this.options.estimateSize(a),h=n+m;o[a]={index:a,start:n,size:m,end:h,key:l,lane:e},c[e]=a}return this.measurementsCache=o,o},{key:!1,debug:()=>this.options.debug}),this.calculateRange=a(()=>[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}){let a=e.length-1;if(e.length<=r)return{startIndex:0,endIndex:a};let n=x(0,a,t=>e[t].start,s),i=n;if(1===r)for(;i<a&&e[i].end<s+t;)i++;else if(r>1){let l=Array(r).fill(0);for(;i<a&&l.some(e=>e<s+t);){let t=e[i];l[t.lane]=t.end,i++}let o=Array(r).fill(s+t);for(;n>=0&&o.some(e=>e>=s);){let t=e[n];o[t.lane]=t.start,n--}n=Math.max(0,n-n%r),i=Math.min(a,i+(r-1-i%r))}return{startIndex:n,endIndex:i}}({measurements:e,outerSize:t,scrollOffset:s,lanes:r}):null,{key:!1,debug:()=>this.options.debug}),this.getVirtualIndexes=a(()=>{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,a)=>null===r||null===a?[]:e({startIndex:r,endIndex:a,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),a=Math.min(this.options.count-1,s+t);return e>=r&&e<=a}return!0},this._measureElement=(e,t)=>{if(!e.isConnected)return void this.observer.unobserve(e);let s=this.indexFromElement(e),r=this.measurementsCache[s];if(!r)return;let a=r.key,n=this.elementsCache.get(a);n!==e&&(n&&this.observer.unobserve(n),this.observer.observe(e),this.elementsCache.set(a,e)),this.shouldMeasureDuringScroll(s)&&this.resizeItem(s,this.options.measureElement(e,t,this))},this.resizeItem=(e,t)=>{var s;let r=this.measurementsCache[e];if(!r)return;let a=t-(this.itemSizeCache.get(r.key)??r.size);0!==a&&((null==(s=this.scrollState)?void 0:s.behavior)!=="smooth"&&(void 0!==this.shouldAdjustScrollPositionOnItemSizeChange?this.shouldAdjustScrollPositionOnItemSizeChange(r,a,this):r.start<this.getScrollOffset()+this.scrollAdjustments)&&this._scrollToOffset(this.getScrollOffset(),{adjustments:this.scrollAdjustments+=a,behavior:void 0}),this.pendingMeasuredCacheIndexes.push(r.index),this.itemSizeCache=new Map(this.itemSizeCache.set(r.key,t)),this.notify(!1))},this.measureElement=e=>{e?this._measureElement(e,void 0):this.elementsCache.forEach((e,t)=>{e.isConnected||(this.observer.unobserve(e),this.elementsCache.delete(t))})},this.getVirtualItems=a(()=>[this.getVirtualIndexes(),this.getMeasurements()],(e,t)=>{let s=[];for(let r=0,a=e.length;r<a;r++){let a=t[e[r]];s.push(a)}return s},{key:!1,debug:()=>this.options.debug}),this.getVirtualItemForOffset=e=>{let t=this.getMeasurements();if(0!==t.length)return n(t[x(0,t.length-1,e=>n(t[e]).start,e)])},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.getOffsetForAlignment=(e,t,s=0)=>{if(!this.scrollElement)return 0;let r=this.getSize(),a=this.getScrollOffset();return"auto"===t&&(t=e>=a+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(),a=this.measurementsCache[e];if(!a)return;if("auto"===t)if(a.end>=r+s-this.options.scrollPaddingEnd)t="end";else{if(!(a.start<=r+this.options.scrollPaddingStart))return[r,t];t="start"}if("end"===t&&e===this.options.count-1)return[this.getMaxScrollOffset(),t];let n="end"===t?a.end+this.options.scrollPaddingEnd:a.start-this.options.scrollPaddingStart;return[this.getOffsetForAlignment(n,t,a.size),t]},this.scrollToOffset=(e,{align:t="start",behavior:s="auto"}={})=>{let r=this.getOffsetForAlignment(e,t),a=this.now();this.scrollState={index:null,align:t,behavior:s,startedAt:a,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[a,n]=r,i=this.now();this.scrollState={index:e,align:n,behavior:s,startedAt:i,lastTargetOffset:a,stableFrames:0},this._scrollToOffset(a,{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.getTotalSize=()=>{var e;let t,s=this.getMeasurements();if(0===s.length)t=this.options.paddingStart;else if(1===this.options.lanes)t=(null==(e=s[s.length-1])?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._scrollToOffset=(e,{adjustments:t,behavior:s})=>{this.options.scrollToFn(e,{behavior:s,adjustments:t},this)},this.measure=()=>{this.itemSizeCache=new Map,this.laneAssignments=new Map,this.notify(!1)},this.setOptions(e)}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.scrollState=null;return}}else this.scrollState.stableFrames=0,s&&(this.scrollState.lastTargetOffset=t,this.scrollState.behavior="auto",this._scrollToOffset(t,{adjustments:void 0,behavior:"auto"}));this.scheduleScrollReconcile()}}let x=(e,t,s,r)=>{for(;e<=t;){let a=(e+t)/2|0,n=s(a);if(n<r)e=a+1;else{if(!(n>r))return a;t=a-1}}return e>0?e-1:0},f="u">typeof document?s.useLayoutEffect:s.useEffect;var g=e.i(64659),y=e.i(75254);let b=(0,y.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"}]]),v=(0,y.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"}]]),j=(0,y.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,y.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"}]]),w=(0,y.default)("clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6l4 2",key:"mmk7yg"}]]);var k=e.i(86311);let S=(0,y.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"}]]),M=s.default.memo(function({entries:e,compact:r=!1}){let a=(0,s.useMemo)(()=>(function(e){let t=0,s=0,r=0,a=0,n=0,i=new Set;for(let l of e)if("user"===l.type&&t++,"queue-operation"===l.type&&n++,"assistant"===l.type){for(let e of(s++,l.message.content))"tool_use"===e.type&&("Task"===e.name&&(e.subagentType||e.subagentId)?a++:r++);l.message.model&&i.add(l.message.model)}let l="";return e.length>=2&&(l=function(e){if(e<1e3)return`${e}ms`;let t=e/1e3;if(t<60)return`${t.toFixed(1)}s`;let s=Math.floor(t/60);if(s>=60){let e=Math.floor(s/60);return`${e}h ${s%60}m`}let r=(t%60).toFixed(0);return`${s}m ${r}s`}(e[e.length-1].timestampMs-e[0].timestampMs)),{turnCount:n,userCount:t,assistantCount:s,toolCallCount:r,subagentCount:a,duration:l,models:Array.from(i)}})(e),[e]),n=r?"w-3.5 h-3.5":"w-4 h-4",i=r?"text-xs font-medium":"text-sm font-medium",l=r?"text-[10px] text-muted-foreground":"text-xs text-muted-foreground",o=[...r?[]:[{Icon:k.MessageSquare,color:"text-primary",v:a.turnCount,l:"Turns"}],{Icon:v,color:"text-[color:var(--chart-1)]",v:a.userCount,l:"User"},{Icon:j,color:"text-[color:var(--chart-2)]",v:a.assistantCount,l:"Assistant"},{Icon:b,color:"text-[color:var(--chart-3)]",v:a.toolCallCount,l:r?"Tools":"Tool Calls"},{Icon:S,color:"text-[color:var(--chart-5)]",v:a.subagentCount,l:"Subagents"},{Icon:w,color:"text-[color:var(--chart-4)]",v:a.duration||"—",l:"Duration"},{Icon:N,color:"text-[color:var(--chart-5)]",v:a.models.length>0?a.models.join(", "):"—",l:r?"Model":"Model(s)"}];return(0,t.jsx)("div",{className:r?"bg-muted/30 border border-border/50 rounded-lg p-3 mb-3":"bg-card border border-border rounded-lg p-4",children:(0,t.jsx)("div",{className:`grid grid-cols-2 ${r?"sm:grid-cols-6 gap-3":"sm:grid-cols-4 lg:grid-cols-7 gap-4"}`,children:o.map(({Icon:e,color:s,v:r,l:a})=>(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(e,{className:`${n} ${s}`}),(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{className:`${i} truncate max-w-[120px]`,children:r}),(0,t.jsx)("div",{className:l,children:a})]})]},a))})})}),C=(0,y.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 E=e.i(63059);function I(e){return JSON.stringify(e.raw,null,2)}let R=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=R.format(t),r=t.getMilliseconds().toString().padStart(3,"0");return`${s}.${r}`}let T=s.default.memo(function({entry:e,isCollapsed:s,entryCount:r,onToggle:a}){let n="function"==typeof a,i=(0,t.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${n?" group-hover:bg-primary/20 transition-colors":""}`,children:[n?(0,t.jsx)(E.ChevronRight,{className:`w-3 h-3 transition-transform ${s?"":"rotate-90"}`}):(0,t.jsx)(C,{className:"w-3 h-3"}),(0,t.jsx)("span",{children:e.label}),(0,t.jsx)("span",{className:"text-muted-foreground",children:$(e.timestampMs)}),n&&s&&"number"==typeof r&&(0,t.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 n?(0,t.jsxs)("button",{type:"button",onClick:a,className:"group flex items-center gap-3 py-3 px-4 w-full cursor-pointer",children:[(0,t.jsx)("div",{className:"flex-1 h-px bg-primary/30"}),i,(0,t.jsx)("div",{className:"flex-1 h-px bg-primary/30"})]}):(0,t.jsxs)("div",{className:"flex items-center gap-3 py-3 px-4",children:[(0,t.jsx)("div",{className:"flex-1 h-px bg-primary/30"}),i,(0,t.jsx)("div",{className:"flex-1 h-px bg-primary/30"})]})});var O=e.i(47163);let A={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"},z={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"},F=(0,y.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"}]]),D=(0,y.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"}]]),q=(0,y.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"}]]);function L({type:e}){let s="w-4 h-4";switch(e){case"user":return(0,t.jsx)(v,{className:s});case"assistant":return(0,t.jsx)(j,{className:s});case"file-history-snapshot":return(0,t.jsx)(F,{className:s});case"progress":return(0,t.jsx)(D,{className:s});case"system":return(0,t.jsx)(q,{className:s});case"queue-operation":return(0,t.jsx)(C,{className:s})}}function U({type:e}){return(0,t.jsxs)("span",{className:`inline-flex items-center gap-1.5 px-2 py-0.5 text-xs font-mono rounded border ${_[e]}`,children:[(0,t.jsx)(L,{type:e}),A[e]]})}var W=e.i(24380);function P({block:e}){let r=(0,s.useMemo)(()=>JSON.stringify(e.input,null,2),[e]);return(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsxs)("details",{open:!0,children:[(0,t.jsx)("summary",{className:"text-xs text-muted-foreground cursor-pointer hover:text-foreground transition-colors",children:(0,t.jsxs)("span",{className:"inline-flex items-center gap-1",children:["Input",(0,t.jsx)(W.CopyButton,{text:r})]})}),(0,t.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:r})]}),e.result?(0,t.jsxs)("div",{className:"border-l-2 border-primary/50 pl-3 space-y-1",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.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,t.jsx)("span",{className:"text-xs text-muted-foreground",children:$(new Date(e.result.timestamp).getTime())})]}),e.result.content&&(0,t.jsxs)("details",{open:!0,children:[(0,t.jsx)("summary",{className:"text-xs text-muted-foreground cursor-pointer hover:text-foreground transition-colors",children:(0,t.jsxs)("span",{className:"inline-flex items-center gap-1",children:["Output",(0,t.jsx)(W.CopyButton,{text:e.result.content})]})}),(0,t.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,s)=>(0,t.jsx)("img",{src:`data:${e.mediaType};base64,${e.base64}`,alt:`Tool result image ${s+1}`,className:"mt-2 max-w-full rounded border border-border"},s))]}):(0,t.jsx)("div",{className:"text-xs text-muted-foreground",children:"Tool did not return a result"})]})}let H=(0,y.default)("circle-check-big",[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]);var V=e.i(73884);let B=(0,y.default)("triangle-alert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]),J=(0,y.default)("chart-column",[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["path",{d:"M18 17V9",key:"2bz60n"}],["path",{d:"M13 17V5",key:"1frdt8"}],["path",{d:"M8 17v-3",key:"17ska0"}]]);var Q=e.i(16715),K=e.i(95187);let X=(0,K.createServerReference)("78f8a642741e52e90de2336eb2dcd039c38b72df07",K.callServer,void 0,K.findSourceMapURL,"checkEvalCacheAndList");async function Y(e,t,s,r=!1,a){let n;try{n=await fetch("/api/queue-item",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({type:"eval",projectName:e,sessionId:t,itemName:s,forceRefresh:r,...a&&{agentId:a.agentId,subagentType:a.subagentType,subagentDescription:a.subagentDescription}})})}catch(e){return{ok:!1,error:`Network error: ${e instanceof Error?e.message:String(e)}`}}return 202===n.status?{ok:!1,error:"__queued__"}:n.ok?n.json():{ok:!1,error:`Queue request failed: ${n.status}`}}let G=(0,K.createServerReference)("60ea95cabce46ffcc344f184abb76e920d02887c3f",K.callServer,void 0,K.findSourceMapURL,"clearAlertMarker"),Z=(0,K.createServerReference)("78a9281416cdf8d9bbd42bf9562be1862e5d5617d9",K.callServer,void 0,K.findSourceMapURL,"invalidateSessionItemCaches");function ee({score:e}){let s=Math.round(100*e);return(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("div",{className:"flex-1 h-2 bg-muted rounded-full overflow-hidden max-w-[80px]",children:(0,t.jsx)("div",{className:`h-full rounded-full transition-all ${e>=.8?"bg-green-500":e>=.5?"bg-yellow-500":"bg-red-500"}`,style:{width:`${s}%`}})}),(0,t.jsxs)("span",{className:"text-xs font-mono text-muted-foreground w-8",children:[s,"%"]})]})}function et({result:e}){return e.error?(0,t.jsx)(B,{className:"w-4 h-4 text-yellow-500"}):e.pass?(0,t.jsx)(H,{className:"w-4 h-4 text-green-500"}):(0,t.jsx)(V.XCircle,{className:"w-4 h-4 text-red-500"})}function es({name:e}){return(0,t.jsxs)("div",{className:"flex items-center gap-3 px-3 py-2",children:[(0,t.jsx)("div",{className:"w-4 h-4 rounded-full bg-muted animate-pulse"}),(0,t.jsx)("span",{className:"text-sm font-mono truncate max-w-[200px] text-muted-foreground",children:e}),(0,t.jsx)("div",{className:"flex-1 h-2 bg-muted rounded-full animate-pulse max-w-[80px]"})]})}function er({name:e,error:s}){return(0,t.jsxs)("div",{className:"flex items-center gap-3 px-3 py-2",children:[(0,t.jsx)(B,{className:"w-4 h-4 text-yellow-500"}),(0,t.jsx)("span",{className:"text-sm font-mono truncate max-w-[200px]",children:e}),(0,t.jsx)("span",{className:"text-xs text-yellow-500 truncate",children:s})]})}function ea({result:e,cached:r,onRerun:a,globalLoading:n}){let[i,l]=(0,s.useState)(!1),[o,c]=(0,s.useState)(!1),d=e.error||e.message,u=!!d,m=async t=>{t.stopPropagation(),c(!0);try{await a(e.name)}finally{c(!1)}};return(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:`flex items-center gap-3 px-3 py-2 rounded-md hover:bg-muted/30 transition-colors ${u?"cursor-pointer":""}`,onClick:()=>u&&l(e=>!e),children:[u&&(0,t.jsx)(E.ChevronRight,{className:`w-3.5 h-3.5 text-muted-foreground transition-transform ${i?"rotate-90":""}`}),(0,t.jsx)(et,{result:e}),(0,t.jsx)("span",{className:"text-sm font-mono truncate max-w-[200px]",children:e.name}),(0,t.jsx)(ee,{score:e.score}),r&&(0,t.jsx)("span",{className:"text-[10px] font-medium text-muted-foreground/70 bg-muted px-1 py-0.5 rounded",children:"cached"}),e.error&&(0,t.jsx)("span",{className:"text-xs text-yellow-500 flex-1 truncate min-w-0",children:e.error}),e.message&&!e.error&&(0,t.jsx)("span",{className:"text-xs text-muted-foreground flex-1 truncate min-w-0",children:e.message}),(0,t.jsx)("button",{onClick:m,disabled:o||n,className:"ml-auto flex-shrink-0 p-1 rounded hover:bg-muted/50 transition-colors disabled:opacity-50",title:"Re-run this eval","aria-label":`Re-run eval ${e.name}`,children:(0,t.jsx)(Q.RefreshCw,{className:`w-3.5 h-3.5 text-muted-foreground ${o?"animate-spin":""}`})})]}),i&&d&&(0,t.jsxs)("div",{className:"ml-10 mr-3 mb-2 relative group",children:[(0,t.jsx)("div",{className:"absolute top-1 right-1 opacity-0 group-hover:opacity-100 transition-opacity",children:(0,t.jsx)(W.CopyButton,{text:d})}),(0,t.jsx)("div",{className:"p-2 pr-8 bg-muted/50 rounded text-xs whitespace-pre-wrap break-words select-text",children:d})]})]})}function en({projectName:e,sessionId:r,agentId:a,subagentType:n,subagentDescription:i,compact:l}){let[o,c]=(0,s.useState)([]),[d,u]=(0,s.useState)(!0),[m,h]=(0,s.useState)(!1),[p,x]=(0,s.useState)(!1),[f,y]=(0,s.useState)(!1),[b,v]=(0,s.useState)(null),[j,N]=(0,s.useState)(!0),w=(0,s.useRef)(!0);(0,s.useEffect)(()=>{w.current=!0;let t=!1;return u(!0),v(null),h(!1),c([]),X(e,r,a,n).then(s=>{if(!t&&w.current){if(!s.ok){v(s.error),u(!1);return}if(!s.hasEvals){h(!0),u(!1);return}if(c(s.names.map(e=>{let t=s.cachedResults.find(t=>t.name===e);return t?{status:"done",name:e,result:t,cached:!0}:{status:"loading",name:e}})),x(0===s.uncachedNames.length),u(!1),s.uncachedNames.length>0){let l=a?{agentId:a,subagentType:n,subagentDescription:i}:void 0;Promise.all(s.uncachedNames.map(async s=>{try{let a=await Y(e,r,s,!1,l);if(t||!w.current||!a.ok&&"__queued__"===a.error)return;a.ok?c(e=>e.map(e=>e.name===s?{status:"done",name:s,result:a.result,cached:!1}:e)):c(e=>e.map(e=>e.name===s?{status:"error",name:s,error:a.error}:e))}catch(e){if(t||!w.current)return;c(t=>t.map(t=>t.name===s?{status:"error",name:s,error:e instanceof Error?e.message:"Failed"}:t))}}))}}}).catch(e=>{!t&&w.current&&(v(e instanceof Error?e.message:"Failed to load evals"),u(!1))}),()=>{t=!0,w.current=!1}},[e,r,a,n,i]),(0,s.useEffect)(()=>{if(0===o.filter(e=>"loading"===e.status).map(e=>e.name).length)return;let t=!1,s=setInterval(async()=>{try{let s=await X(e,r,a,n);if(t||!s.ok||!s.hasEvals)return;c(e=>{let t=!1,r=e.map(e=>{if("loading"!==e.status)return e;let r=s.cachedResults.find(t=>t.name===e.name);return r?(t=!0,{status:"done",name:e.name,result:r,cached:!1}):e});return t?r:e})}catch{}},3e3);return()=>{t=!0,clearInterval(s)}},[o,e,r,a,n]);let k=(0,s.useCallback)(async()=>{y(!0),c(e=>e.map(e=>({status:"loading",name:e.name})));let t=a?{agentId:a,subagentType:n,subagentDescription:i}:void 0;try{await Z("evals",e,r,a),await G(e,r);let s=o.map(e=>e.name);await Promise.all(s.map(async s=>{try{let a=await Y(e,r,s,!0,t);if(!w.current||!a.ok&&"__queued__"===a.error)return;a.ok?c(e=>e.map(e=>e.name===s?{status:"done",name:s,result:a.result,cached:!1}:e)):c(e=>e.map(e=>e.name===s?{status:"error",name:s,error:a.error}:e))}catch(e){if(!w.current)return;c(t=>t.map(t=>t.name===s?{status:"error",name:s,error:e instanceof Error?e.message:"Failed"}:t))}})),w.current&&x(!1)}finally{w.current&&y(!1)}},[e,r,a,n,i,o]),S=(0,s.useCallback)(async t=>{x(!1),c(e=>e.map(e=>e.name===t?{status:"loading",name:t}:e));let s=a?{agentId:a,subagentType:n,subagentDescription:i}:void 0;try{let a=await Y(e,r,t,!0,s);if(!w.current||!a.ok&&"__queued__"===a.error)return;a.ok?c(e=>e.map(e=>e.name===t?{status:"done",name:t,result:a.result,cached:!1}:e)):c(e=>e.map(e=>e.name===t?{status:"error",name:t,error:a.error}:e))}catch(e){if(!w.current)return;c(s=>s.map(s=>s.name===t?{status:"error",name:t,error:e instanceof Error?e.message:"Re-run failed"}:s))}},[e,r,a,n,i]),M=o.filter(e=>"done"===e.status),E=o.filter(e=>"loading"===e.status).length,I=M.map(e=>e.result).filter(e=>!e.skipped),R=I.filter(e=>!e.error&&e.pass).length,$=I.filter(e=>!e.error&&!e.pass).length,T=M.filter(e=>!!e.result.error).length+o.filter(e=>"error"===e.status).length,O=d||E>0||f;if(m)return null;let A=l?"p-2.5":"p-4",_=l?"text-xs":"text-sm";if(d)return(0,t.jsx)("div",{className:`bg-card border border-border rounded-lg ${A}`,children:(0,t.jsxs)("div",{className:`flex items-center gap-2 ${_} text-muted-foreground`,children:[(0,t.jsx)(Q.RefreshCw,{className:"w-4 h-4 animate-spin"}),"Loading evals..."]})});if(b&&0===o.length)return(0,t.jsx)("div",{className:`bg-card border border-border rounded-lg ${A}`,children:(0,t.jsxs)("div",{className:`flex items-center gap-2 ${_} text-destructive`,children:[(0,t.jsx)(B,{className:"w-4 h-4"}),b]})});if(0===o.length)return null;let z=o.filter(e=>!("done"===e.status&&e.result.skipped)),F=o.filter(e=>"done"===e.status&&e.result.skipped).length;return(0,t.jsxs)("div",{className:`bg-card border border-border rounded-lg ${A} ${j?"":"space-y-3"}`,children:[(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsxs)("button",{onClick:()=>N(e=>!e),className:"flex items-center gap-2 hover:opacity-80 transition-opacity",children:[(0,t.jsx)(g.ChevronDown,{className:`w-4 h-4 text-muted-foreground transition-transform ${j?"-rotate-90":""}`}),(0,t.jsx)(J,{className:"w-4 h-4 text-primary"}),(0,t.jsx)("span",{className:"text-sm font-medium",children:"Eval Results"})]}),(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[(0,t.jsxs)("div",{className:"flex items-center gap-3 text-xs",children:[R>0&&(0,t.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,t.jsx)(H,{className:"w-3.5 h-3.5 text-green-500"}),(0,t.jsx)("span",{className:"font-medium",children:R}),(0,t.jsx)("span",{className:"text-muted-foreground",children:"passed"})]}),$>0&&(0,t.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,t.jsx)(V.XCircle,{className:"w-3.5 h-3.5 text-red-500"}),(0,t.jsx)("span",{className:"font-medium",children:$}),(0,t.jsx)("span",{className:"text-muted-foreground",children:"failed"})]}),T>0&&(0,t.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,t.jsx)(B,{className:"w-3.5 h-3.5 text-yellow-500"}),(0,t.jsx)("span",{className:"font-medium",children:T}),(0,t.jsx)("span",{className:"text-muted-foreground",children:"errored"})]}),E>0&&(0,t.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,t.jsx)(Q.RefreshCw,{className:"w-3.5 h-3.5 text-muted-foreground animate-spin"}),(0,t.jsxs)("span",{className:"text-muted-foreground",children:[E," running..."]})]}),F>0&&!O&&(0,t.jsxs)("span",{className:"text-[10px] font-medium text-muted-foreground/50 bg-muted px-1.5 py-0.5 rounded",children:[F," skipped"]}),p&&!O&&(0,t.jsx)("span",{className:"text-[10px] font-medium text-muted-foreground/70 bg-muted px-1.5 py-0.5 rounded",children:"cached"})]}),(0,t.jsxs)("button",{onClick:()=>k(),disabled:O,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 disabled:opacity-50",children:[f?(0,t.jsx)(Q.RefreshCw,{className:"w-3 h-3 animate-spin"}):(0,t.jsx)(C,{className:"w-3 h-3"}),f?"Running...":"Re-run"]})]})]}),!j&&(0,t.jsx)("div",{className:"divide-y divide-border/50",children:z.map(e=>"loading"===e.status?(0,t.jsx)(es,{name:e.name},e.name):"error"===e.status?(0,t.jsx)(er,{name:e.name,error:e.error},e.name):(0,t.jsx)(ea,{result:e.result,cached:e.cached,onRerun:S,globalLoading:f},e.name))})]})}let ei=(0,y.default)("database",[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]]),el=(0,K.createServerReference)("788f1f39173bbb954dd4a8249f33e9f31b0f0fca19",K.callServer,void 0,K.findSourceMapURL,"checkEnrichmentCacheAndList");async function eo(e,t,s,r=!1,a){let n;try{n=await fetch("/api/queue-item",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({type:"enrichment",projectName:e,sessionId:t,itemName:s,forceRefresh:r,...a&&{agentId:a.agentId,subagentType:a.subagentType,subagentDescription:a.subagentDescription}})})}catch(e){return{ok:!1,error:`Network error: ${e instanceof Error?e.message:String(e)}`}}return 202===n.status?{ok:!1,error:"__queued__"}:n.ok?n.json():{ok:!1,error:`Queue request failed: ${n.status}`}}function ec({name:e}){return(0,t.jsxs)("div",{className:"space-y-1.5",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("span",{className:"text-sm font-mono font-medium text-muted-foreground",children:e}),(0,t.jsx)("div",{className:"w-10 h-3 bg-muted rounded animate-pulse"})]}),(0,t.jsxs)("div",{className:"pl-1 space-y-1",children:[(0,t.jsx)("div",{className:"h-3 bg-muted rounded animate-pulse w-2/3"}),(0,t.jsx)("div",{className:"h-3 bg-muted rounded animate-pulse w-1/2"})]})]})}function ed({name:e,error:s}){return(0,t.jsx)("div",{className:"space-y-1.5",children:(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(B,{className:"w-3.5 h-3.5 text-yellow-500"}),(0,t.jsx)("span",{className:"text-sm font-mono font-medium",children:e}),(0,t.jsx)("span",{className:"text-xs text-yellow-500 truncate",children:s})]})})}function eu({result:e,cached:s}){if(e.error)return(0,t.jsx)("div",{className:"space-y-1.5",children:(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(B,{className:"w-3.5 h-3.5 text-yellow-500"}),(0,t.jsx)("span",{className:"text-sm font-mono font-medium",children:e.name}),(0,t.jsx)("span",{className:"text-xs text-yellow-500 truncate",title:e.error,children:e.error})]})});let r=Object.entries(e.data);return 0===r.length?null:(0,t.jsxs)("div",{className:"space-y-1.5",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("span",{className:"text-sm font-mono font-medium",children:e.name}),(0,t.jsxs)("span",{className:"text-xs text-muted-foreground",children:[e.durationMs,"ms"]}),s&&(0,t.jsx)("span",{className:"text-[10px] font-medium text-muted-foreground/70 bg-muted px-1 py-0.5 rounded",children:"cached"})]}),(0,t.jsx)("div",{className:"grid grid-cols-1 gap-y-1 pl-1",children:r.map(([e,s])=>(0,t.jsxs)("div",{className:"flex items-baseline gap-2 min-w-0 flex-wrap",children:[(0,t.jsxs)("span",{className:"text-xs font-semibold text-primary/70 shrink-0",children:[e,":"]}),(0,t.jsx)("span",{className:"text-sm font-mono break-all",title:String(s),children:"boolean"==typeof s?s?"Yes":"No":"number"==typeof s?s.toLocaleString():String(s)})]},e))})]})}function em({projectName:e,sessionId:r,agentId:a,subagentType:n,subagentDescription:i,compact:l}){let[o,c]=(0,s.useState)([]),[d,u]=(0,s.useState)(!0),[m,h]=(0,s.useState)(!1),[p,x]=(0,s.useState)(!1),[f,y]=(0,s.useState)(!1),[b,v]=(0,s.useState)(null),[j,N]=(0,s.useState)(!0),w=(0,s.useRef)(!0);(0,s.useEffect)(()=>{w.current=!0;let t=!1;return u(!0),v(null),h(!1),c([]),el(e,r,a,n).then(s=>{if(!t&&w.current){if(!s.ok){v(s.error),u(!1);return}if(!s.hasEnrichers){h(!0),u(!1);return}if(c(s.names.map(e=>{let t=s.cachedResults.find(t=>t.name===e);return t?{status:"done",name:e,result:t,cached:!0}:{status:"loading",name:e}})),x(0===s.uncachedNames.length),u(!1),s.uncachedNames.length>0){let l=a?{agentId:a,subagentType:n,subagentDescription:i}:void 0;Promise.all(s.uncachedNames.map(async s=>{try{let a=await eo(e,r,s,!1,l);if(t||!w.current||!a.ok&&"__queued__"===a.error)return;a.ok?c(e=>e.map(e=>e.name===s?{status:"done",name:s,result:a.result,cached:!1}:e)):c(e=>e.map(e=>e.name===s?{status:"error",name:s,error:a.error}:e))}catch(e){if(t||!w.current)return;c(t=>t.map(t=>t.name===s?{status:"error",name:s,error:e instanceof Error?e.message:"Failed"}:t))}}))}}}).catch(e=>{!t&&w.current&&(v(e instanceof Error?e.message:"Failed to load enrichments"),u(!1))}),()=>{t=!0,w.current=!1}},[e,r,a,n,i]);let k=(0,s.useCallback)(async()=>{y(!0),c(e=>e.map(e=>({status:"loading",name:e.name})));let t=a?{agentId:a,subagentType:n,subagentDescription:i}:void 0;try{await Z("enrichments",e,r,a);let s=o.map(e=>e.name);await Promise.all(s.map(async s=>{try{let a=await eo(e,r,s,!0,t);if(!w.current||!a.ok&&"__queued__"===a.error)return;a.ok?c(e=>e.map(e=>e.name===s?{status:"done",name:s,result:a.result,cached:!1}:e)):c(e=>e.map(e=>e.name===s?{status:"error",name:s,error:a.error}:e))}catch(e){if(!w.current)return;c(t=>t.map(t=>t.name===s?{status:"error",name:s,error:e instanceof Error?e.message:"Failed"}:t))}})),w.current&&x(!1)}finally{w.current&&y(!1)}},[e,r,a,n,i,o]),S=o.filter(e=>"done"===e.status),M=o.filter(e=>"loading"===e.status).length,E=S.filter(e=>!!e.result.error).length+o.filter(e=>"error"===e.status).length,I=d||M>0||f;if(m)return null;let R=l?"p-2.5":"p-4",$=l?"text-xs":"text-sm";if(d)return(0,t.jsx)("div",{className:`bg-card border border-border rounded-lg ${R}`,children:(0,t.jsxs)("div",{className:`flex items-center gap-2 ${$} text-muted-foreground`,children:[(0,t.jsx)(Q.RefreshCw,{className:"w-4 h-4 animate-spin"}),"Loading enrichments..."]})});if(b&&0===o.length)return(0,t.jsx)("div",{className:`bg-card border border-border rounded-lg ${R}`,children:(0,t.jsxs)("div",{className:`flex items-center gap-2 ${$} text-destructive`,children:[(0,t.jsx)(B,{className:"w-4 h-4"}),b]})});if(0===o.length)return null;let T=o.filter(e=>!("done"===e.status&&e.result.skipped)),O=o.filter(e=>"done"===e.status&&e.result.skipped).length;return(0,t.jsxs)("div",{className:`bg-card border border-border rounded-lg ${R} ${j?"":"space-y-3"}`,children:[(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsxs)("button",{onClick:()=>N(e=>!e),className:"flex items-center gap-2 hover:opacity-80 transition-opacity",children:[(0,t.jsx)(g.ChevronDown,{className:`w-4 h-4 text-muted-foreground transition-transform ${j?"-rotate-90":""}`}),(0,t.jsx)(ei,{className:"w-4 h-4 text-primary"}),(0,t.jsx)("span",{className:"text-sm font-medium",children:"Enrichment Data"})]}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[E>0&&(0,t.jsxs)("div",{className:"flex items-center gap-1 text-xs text-yellow-500",children:[(0,t.jsx)(B,{className:"w-3.5 h-3.5"}),(0,t.jsxs)("span",{children:[E," errored"]})]}),M>0&&(0,t.jsxs)("div",{className:"flex items-center gap-1 text-xs text-muted-foreground",children:[(0,t.jsx)(Q.RefreshCw,{className:"w-3.5 h-3.5 animate-spin"}),(0,t.jsxs)("span",{children:[M," running..."]})]}),O>0&&!I&&(0,t.jsxs)("span",{className:"text-[10px] font-medium text-muted-foreground/50 bg-muted px-1.5 py-0.5 rounded",children:[O," skipped"]}),p&&!I&&(0,t.jsx)("span",{className:"text-[10px] font-medium text-muted-foreground/70 bg-muted px-1.5 py-0.5 rounded",children:"cached"}),(0,t.jsxs)("button",{onClick:()=>k(),disabled:I,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 disabled:opacity-50",children:[f?(0,t.jsx)(Q.RefreshCw,{className:"w-3 h-3 animate-spin"}):(0,t.jsx)(C,{className:"w-3 h-3"}),f?"Running...":"Re-run"]})]})]}),!j&&(0,t.jsx)("div",{className:"space-y-3 divide-y divide-border/50",children:T.map(e=>(0,t.jsxs)("div",{className:"pt-2 first:pt-0",children:["loading"===e.status&&(0,t.jsx)(ec,{name:e.name}),"error"===e.status&&(0,t.jsx)(ed,{name:e.name,error:e.error}),"done"===e.status&&(0,t.jsx)(eu,{result:e.result,cached:e.cached})]},e.name))})]})}let eh=(0,y.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"}]]),ep=s.default.memo(function({block:e,allEntries:s,projectName:r,sessionId:a,highlightedUuid:n,autoExpandForUuid:i}){switch(e.type){case"text":return(0,t.jsx)("p",{className:"whitespace-pre-wrap text-sm",children:e.text});case"tool_use":if("Task"===e.name&&(e.subagentType||e.subagentId)){let l=e.subagentId&&s?s.filter(t=>t._source===`agent-${e.subagentId}`):void 0;return(0,t.jsx)(ej,{block:e,subagentEntries:l,projectName:r,sessionId:a,highlightedUuid:n,autoExpandForUuid:i})}return(0,t.jsxs)("div",{className:"border border-border/50 rounded-lg p-3 bg-muted/10",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 mb-2",children:[(0,t.jsx)(b,{className:"w-4 h-4 text-primary flex-shrink-0"}),(0,t.jsx)("span",{className:"font-mono text-sm text-primary truncate min-w-0",children:e.name}),e.result&&(0,t.jsx)("span",{className:"text-xs text-muted-foreground ml-auto flex-shrink-0",children:e.result.durationFormatted})]}),(0,t.jsx)(P,{block:e})]});case"thinking":return(0,t.jsx)("div",{className:"border border-[color:var(--chart-5)]/30 rounded-lg p-3 bg-[color:var(--chart-5)]/5",children:(0,t.jsxs)("details",{children:[(0,t.jsxs)("summary",{className:"flex items-center gap-2 text-xs cursor-pointer hover:text-foreground transition-colors text-[color:var(--chart-5)]",children:[(0,t.jsx)(eh,{className:"w-4 h-4"}),(0,t.jsx)("span",{children:"Thinking"}),(0,t.jsxs)("span",{className:"text-muted-foreground ml-1",children:["(",e.thinking.length.toLocaleString()," chars)"]})]}),(0,t.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 ex({entry:e}){return(0,t.jsx)("div",{children:e.message.content&&(0,t.jsx)("p",{className:"whitespace-pre-wrap text-sm",children:e.message.content})})}let ef=s.default.memo(function({entry:e,allEntries:s,projectName:r,sessionId:a,highlightedUuid:n,autoExpandForUuid:i}){let{content:l}=e.message;return(0,t.jsx)("div",{className:"space-y-3",children:l.map((e,l)=>(0,t.jsx)(ep,{block:e,allEntries:s,projectName:r,sessionId:a,highlightedUuid:n,autoExpandForUuid:i},l))})}),eg=s.default.memo(function({entry:e}){let r=(0,s.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,t.jsxs)("div",{className:"text-sm",children:[(0,t.jsx)("span",{className:"text-muted-foreground",children:r}),(0,t.jsxs)("details",{className:"mt-1",children:[(0,t.jsx)("summary",{className:"text-xs text-muted-foreground cursor-pointer hover:text-foreground transition-colors",children:"Show raw JSON"}),(0,t.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:I(e)})]})]})}),ey=(0,y.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 eb=e.i(55574);function ev({uuid:e}){let r=(0,s.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,eb.toast)("Link copied")},[e]);return(0,t.jsx)("button",{onClick:r,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,t.jsx)(ey,{className:"w-3.5 h-3.5"})})}function ej({block:e,subagentEntries:r,projectName:a,sessionId:n,highlightedUuid:i,autoExpandForUuid:l}){let o=!!(l&&r?.some(e=>e.uuid===l)),[c,d]=(0,s.useState)(o);(0,s.useEffect)(()=>{if(!o)return;let e=requestAnimationFrame(()=>d(!0));return()=>cancelAnimationFrame(e)},[o]);let u=(0,s.useCallback)(()=>{d(e=>!e)},[]),m=r&&r.length>0;return(0,t.jsxs)("div",{className:"border border-border/50 rounded-lg p-3 bg-muted/10",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 mb-2",children:[(0,t.jsx)(S,{className:"w-4 h-4 text-[color:var(--chart-5)]"}),(0,t.jsx)("span",{className:"font-mono text-sm text-[color:var(--chart-5)]",children:"Subagent"}),e.subagentType&&(0,t.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,t.jsx)("span",{className:"text-xs text-muted-foreground ml-auto",children:e.result.durationFormatted})]}),e.subagentDescription&&(0,t.jsx)("p",{className:"text-sm text-muted-foreground mb-2",children:e.subagentDescription}),e.subagentId&&r&&(0,t.jsxs)("button",{onClick:u,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,t.jsx)(E.ChevronRight,{className:(0,O.cn)("w-3 h-3 transition-transform",c&&"rotate-90")}),(0,t.jsxs)("span",{children:["agent-",e.subagentId]}),(0,t.jsx)("span",{className:"text-muted-foreground",children:c?"Collapse":"View subagent log"})]}),c&&(0,t.jsxs)("div",{className:"ml-4 pl-3 border-l-2 border-primary/30 mt-2 space-y-2",children:[r&&0===r.length&&(0,t.jsx)("div",{className:"text-xs text-muted-foreground py-2",children:"No entries found in subagent log."}),m&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(M,{entries:r,compact:!0}),(0,t.jsx)(en,{projectName:a,sessionId:n,agentId:e.subagentId,subagentType:e.subagentType,subagentDescription:e.subagentDescription,compact:!0}),(0,t.jsx)(em,{projectName:a,sessionId:n,agentId:e.subagentId,subagentType:e.subagentType,subagentDescription:e.subagentDescription,compact:!0})]}),r&&r.map(e=>"queue-operation"===e.type?(0,t.jsx)(T,{entry:e},e.uuid||e.timestamp):(0,t.jsx)(ew,{entry:e,projectName:a,sessionId:n,isHighlighted:!!i&&e.uuid===i},e.uuid||e.timestamp))]}),(0,t.jsx)(P,{block:e})]})}function eN({entry:e,allEntries:s,projectName:r,sessionId:a,highlightedUuid:n,autoExpandForUuid:i}){switch(e.type){case"user":return(0,t.jsx)(ex,{entry:e});case"assistant":return(0,t.jsx)(ef,{entry:e,allEntries:s,projectName:r,sessionId:a,highlightedUuid:n,autoExpandForUuid:i});case"file-history-snapshot":case"progress":case"system":return(0,t.jsx)(eg,{entry:e})}}let ew=s.default.memo(function({entry:e,allEntries:s,projectName:r,sessionId:a,isHighlighted:n,highlightedUuid:i,autoExpandForUuid:l}){return(0,t.jsxs)("div",{id:e.uuid?`entry-${e.uuid}`:void 0,className:(0,O.cn)(`group border-l-4 ${z[e.type]} bg-card/50 rounded-r-lg mb-2 hover:bg-muted/30 transition-colors`,n&&"entry-highlighted"),children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 px-4 py-2 border-b border-border/30",children:[(0,t.jsx)(U,{type:e.type}),(0,t.jsxs)("div",{className:"flex items-center gap-1 ml-auto",children:[e.uuid&&(0,t.jsx)(ev,{uuid:e.uuid}),(0,t.jsx)(W.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 I(e);case"queue-operation":return e.label}}(e)}),(0,t.jsx)("span",{className:"text-xs font-mono text-muted-foreground whitespace-nowrap",children:$(e.timestampMs)})]})]}),(0,t.jsx)("div",{className:"px-4 py-3",children:(0,t.jsx)(eN,{entry:e,allEntries:s,projectName:r,sessionId:a,highlightedUuid:i,autoExpandForUuid:l})})]})},(e,t)=>e.entry===t.entry&&e.allEntries===t.allEntries&&e.projectName===t.projectName&&e.sessionId===t.sessionId&&e.isHighlighted===t.isHighlighted&&e.highlightedUuid===t.highlightedUuid&&e.autoExpandForUuid===t.autoExpandForUuid),ek=(0,y.default)("zap",[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]]),eS=(0,y.default)("minus",[["path",{d:"M5 12h14",key:"1ays0h"}]]),eM=(0,K.createServerReference)("78373ac3e43d0ff94b038204804080c208f7cd2122",K.callServer,void 0,K.findSourceMapURL,"checkActionCacheAndList");async function eC(e,t,s,r=!1,a){let n;try{n=await fetch("/api/queue-item",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({type:"action",projectName:e,sessionId:t,itemName:s,forceRefresh:r,...a&&{agentId:a.agentId,subagentType:a.subagentType,subagentDescription:a.subagentDescription}})})}catch(e){return{ok:!1,error:`Network error: ${e instanceof Error?e.message:String(e)}`}}return 202===n.status?{ok:!1,error:"__queued__"}:n.ok?n.json():{ok:!1,error:`Queue request failed: ${n.status}`}}let eE=(0,K.createServerReference)("7c8c6034aa84daabade89f05bbcd4fae02a4cf58c7",K.callServer,void 0,K.findSourceMapURL,"invalidateSessionItemCache"),eI=(0,K.createServerReference)("00c55f01456f2013bdeb6cbec52f8a4cab2b04789d",K.callServer,void 0,K.findSourceMapURL,"getQueueStatusAction");function eR({name:e}){return(0,t.jsxs)("div",{className:"flex items-center gap-3 px-3 py-2",children:[(0,t.jsx)("div",{className:"w-4 h-4 rounded-full bg-muted animate-pulse"}),(0,t.jsx)("span",{className:"text-sm font-mono truncate max-w-[200px] text-muted-foreground",children:e}),(0,t.jsx)("span",{className:"text-xs text-muted-foreground",children:"running..."})]})}function e$({name:e,error:s}){return(0,t.jsxs)("div",{className:"flex items-center gap-3 px-3 py-2",children:[(0,t.jsx)(B,{className:"w-4 h-4 text-yellow-500"}),(0,t.jsx)("span",{className:"text-sm font-mono truncate max-w-[200px]",children:e}),(0,t.jsx)("span",{className:"text-xs text-yellow-500 truncate",children:s})]})}function eT({name:e,onRun:s,disabled:r}){return(0,t.jsxs)("div",{className:"flex items-center gap-3 px-3 py-2",children:[(0,t.jsx)(eS,{className:"w-4 h-4 text-muted-foreground"}),(0,t.jsx)("span",{className:"text-sm font-mono truncate max-w-[200px] text-muted-foreground",children:e}),(0,t.jsx)("span",{className:"text-[10px] text-muted-foreground/50",children:"not run"}),(0,t.jsxs)("button",{onClick:s,disabled:r,className:"ml-auto flex-shrink-0 inline-flex items-center gap-1 px-2 py-0.5 text-[11px] font-medium rounded border border-primary/30 bg-primary/10 text-primary hover:bg-primary/20 transition-colors disabled:opacity-50",children:[(0,t.jsx)(C,{className:"w-2.5 h-2.5"}),"Run"]})]})}function eO({result:e,cached:r,onRerun:a,globalLoading:n}){let[i,l]=(0,s.useState)(!1),[o,c]=(0,s.useState)(!1),d=e.output||e.message,u=!!d,m=async t=>{t.stopPropagation(),c(!0);try{await a(e.name)}finally{c(!1)}};if(e.error)return(0,t.jsxs)("div",{className:"flex items-center gap-3 px-3 py-2",children:[(0,t.jsx)(B,{className:"w-4 h-4 text-yellow-500"}),(0,t.jsx)("span",{className:"text-sm font-mono truncate max-w-[200px]",children:e.name}),(0,t.jsx)("span",{className:"text-xs text-yellow-500 truncate",title:e.error,children:e.error}),(0,t.jsx)("button",{onClick:m,disabled:o||n,className:"ml-auto flex-shrink-0 p-1 rounded hover:bg-muted/50 transition-colors disabled:opacity-50",title:"Re-run this action","aria-label":`Re-run action ${e.name}`,children:(0,t.jsx)(Q.RefreshCw,{className:`w-3.5 h-3.5 text-muted-foreground ${o?"animate-spin":""}`})})]});let h="success"===e.status?(0,t.jsx)(H,{className:"w-4 h-4 text-green-500"}):(0,t.jsx)(V.XCircle,{className:"w-4 h-4 text-red-500"}),p=`action-result-${e.name}`;return(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"flex items-center gap-3 px-3 py-2 rounded-md hover:bg-muted/30 transition-colors",children:[u&&(0,t.jsx)("button",{onClick:()=>l(e=>!e),"aria-expanded":i,"aria-controls":p,className:"flex-shrink-0 p-0 bg-transparent border-none cursor-pointer","aria-label":`Toggle details for ${e.name}`,children:(0,t.jsx)(E.ChevronRight,{className:`w-3.5 h-3.5 text-muted-foreground transition-transform ${i?"rotate-90":""}`})}),h,(0,t.jsx)("span",{className:"text-sm font-mono truncate max-w-[200px]",children:e.name}),(0,t.jsxs)("span",{className:"text-xs text-muted-foreground",children:[e.durationMs,"ms"]}),r&&(0,t.jsx)("span",{className:"text-[10px] font-medium text-muted-foreground/70 bg-muted px-1 py-0.5 rounded",children:"cached"}),e.message&&(0,t.jsx)("span",{className:"text-xs text-muted-foreground flex-1 truncate min-w-0",children:e.message}),(0,t.jsx)("button",{onClick:m,disabled:o||n,className:"ml-auto flex-shrink-0 p-1 rounded hover:bg-muted/50 transition-colors disabled:opacity-50",title:"Re-run this action","aria-label":`Re-run action ${e.name}`,children:(0,t.jsx)(Q.RefreshCw,{className:`w-3.5 h-3.5 text-muted-foreground ${o?"animate-spin":""}`})})]}),i&&d&&(0,t.jsxs)("div",{id:p,className:"ml-10 mr-3 mb-2 relative group",children:[(0,t.jsx)("div",{className:"absolute top-1 right-1 opacity-0 group-hover:opacity-100 transition-opacity",children:(0,t.jsx)(W.CopyButton,{text:d})}),(0,t.jsx)("div",{className:"p-2 pr-8 bg-muted/50 rounded text-xs whitespace-pre-wrap break-words select-text",children:d})]})]})}function eA({projectName:e,sessionId:r,agentId:a,subagentType:n,subagentDescription:i,compact:l}){let[o,c]=(0,s.useState)([]),[d,u]=(0,s.useState)(!0),[m,h]=(0,s.useState)(!1),[p,x]=(0,s.useState)(!1),[f,y]=(0,s.useState)(!1),[b,v]=(0,s.useState)(null),[j,N]=(0,s.useState)(!0),w=(0,s.useRef)(0);(0,s.useEffect)(()=>{let t=++w.current;return u(!0),v(null),h(!1),c([]),eM(e,r,a,n).then(async s=>{if(t!==w.current)return;if(!s.ok){v(s.error),u(!1);return}if(!s.hasActions){h(!0),u(!1);return}let n=new Set;if(s.uncachedNames.length>0)try{let s=await eI();if(t!==w.current)return;let i=a?`${r}/agent-${a}`:r;for(let t of[...s.pending,...s.processing])"action"===t.type&&t.projectName===e&&t.sessionId===i&&n.add(t.itemName)}catch{}c(s.names.map(e=>{let t=s.cachedResults.find(t=>t.name===e);return t?{status:"done",name:e,result:t,cached:!0}:n.has(e)?{status:"loading",name:e}:{status:"idle",name:e}})),x(0===s.uncachedNames.length),u(!1)}).catch(e=>{t===w.current&&(v(e instanceof Error?e.message:"Failed to load actions"),u(!1))}),()=>{}},[e,r,a,n]),(0,s.useEffect)(()=>{if(0===o.filter(e=>"loading"===e.status).map(e=>e.name).length)return;let t=!1,s=setInterval(async()=>{try{let s=await eM(e,r,a,n);if(t||!s.ok||!s.hasActions)return;c(e=>{let t=!1,r=e.map(e=>{if("loading"!==e.status)return e;let r=s.cachedResults.find(t=>t.name===e.name);return r?(t=!0,{status:"done",name:e.name,result:r,cached:!1}):e});return t?r:e})}catch{}},3e3);return()=>{t=!0,clearInterval(s)}},[o,e,r,a,n]);let k=(0,s.useCallback)(async(t,s=!1)=>{let l=w.current;c(e=>e.map(e=>e.name===t?{status:"loading",name:t}:e));let o=a?{agentId:a,subagentType:n,subagentDescription:i}:void 0;try{s&&await eE("actions",e,r,t,a).catch(e=>console.error("Failed to invalidate action cache:",e));let n=await eC(e,r,t,s,o);if(l!==w.current||!n.ok&&"__queued__"===n.error)return;n.ok?c(e=>e.map(e=>e.name===t?{status:"done",name:t,result:n.result,cached:!1}:e)):c(e=>e.map(e=>e.name===t?{status:"error",name:t,error:n.error}:e))}catch(e){if(l!==w.current)return;c(s=>s.map(s=>s.name===t?{status:"error",name:t,error:e instanceof Error?e.message:"Failed"}:s))}},[e,r,a,n,i]),S=(0,s.useCallback)(async e=>{x(!1),await k(e,!0)},[k]),M=(0,s.useCallback)(async()=>{let t=w.current;y(!0);let s=o.map(e=>e.name);c(e=>e.map(e=>({status:"loading",name:e.name})));let l=a?{agentId:a,subagentType:n,subagentDescription:i}:void 0;try{try{await Z("actions",e,r,a)}catch(e){console.error("Failed to invalidate action caches:",e)}await Promise.all(s.map(async s=>{try{let a=await eC(e,r,s,!0,l);if(t!==w.current||!a.ok&&"__queued__"===a.error)return;a.ok?c(e=>e.map(e=>e.name===s?{status:"done",name:s,result:a.result,cached:!1}:e)):c(e=>e.map(e=>e.name===s?{status:"error",name:s,error:a.error}:e))}catch(e){if(t!==w.current)return;c(t=>t.map(t=>t.name===s?{status:"error",name:s,error:e instanceof Error?e.message:"Failed"}:t))}})),t===w.current&&x(!1)}finally{t===w.current&&y(!1)}},[e,r,a,n,i,o]),E=o.filter(e=>"done"===e.status),I=o.filter(e=>"loading"===e.status).length,R=o.filter(e=>"idle"===e.status).length,$=E.filter(e=>"error"===e.result.status||!!e.result.error).length+o.filter(e=>"error"===e.status).length,T=E.filter(e=>"success"===e.result.status&&!e.result.error).length,O=d||I>0||f;if(m)return null;let A=l?"p-2.5":"p-4",_=l?"text-xs":"text-sm";if(d)return(0,t.jsx)("div",{className:`bg-card border border-border rounded-lg ${A}`,children:(0,t.jsxs)("div",{className:`flex items-center gap-2 ${_} text-muted-foreground`,children:[(0,t.jsx)(Q.RefreshCw,{className:"w-4 h-4 animate-spin"}),"Loading actions..."]})});if(b&&0===o.length)return(0,t.jsx)("div",{className:`bg-card border border-border rounded-lg ${A}`,children:(0,t.jsxs)("div",{className:`flex items-center gap-2 ${_} text-destructive`,children:[(0,t.jsx)(B,{className:"w-4 h-4"}),b]})});if(0===o.length)return null;let z=o.filter(e=>!("done"===e.status&&e.result.skipped)),F=o.filter(e=>"done"===e.status&&e.result.skipped).length;return(0,t.jsxs)("div",{className:`bg-card border border-border rounded-lg ${A} ${j?"":"space-y-3"}`,children:[(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsxs)("button",{onClick:()=>N(e=>!e),"aria-expanded":!j,"aria-controls":"action-results-content",className:"flex items-center gap-2 hover:opacity-80 transition-opacity",children:[(0,t.jsx)(g.ChevronDown,{className:`w-4 h-4 text-muted-foreground transition-transform ${j?"-rotate-90":""}`}),(0,t.jsx)(ek,{className:"w-4 h-4 text-primary"}),(0,t.jsx)("span",{className:"text-sm font-medium",children:"Actions"})]}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[T>0&&(0,t.jsxs)("div",{className:"flex items-center gap-1 text-xs text-green-500",children:[(0,t.jsx)(H,{className:"w-3.5 h-3.5"}),(0,t.jsx)("span",{children:T})]}),$>0&&(0,t.jsxs)("div",{className:"flex items-center gap-1 text-xs text-yellow-500",children:[(0,t.jsx)(B,{className:"w-3.5 h-3.5"}),(0,t.jsxs)("span",{children:[$," errored"]})]}),R>0&&!O&&(0,t.jsxs)("span",{className:"text-[10px] text-muted-foreground/50",children:[R," pending"]}),I>0&&(0,t.jsxs)("div",{className:"flex items-center gap-1 text-xs text-muted-foreground",children:[(0,t.jsx)(Q.RefreshCw,{className:"w-3.5 h-3.5 animate-spin"}),(0,t.jsxs)("span",{children:[I," running..."]})]}),F>0&&!O&&(0,t.jsxs)("span",{className:"text-[10px] font-medium text-muted-foreground/50 bg-muted px-1.5 py-0.5 rounded",children:[F," skipped"]}),p&&!O&&(0,t.jsx)("span",{className:"text-[10px] font-medium text-muted-foreground/70 bg-muted px-1.5 py-0.5 rounded",children:"cached"}),(0,t.jsxs)("button",{onClick:()=>M(),disabled:O,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 disabled:opacity-50",children:[f?(0,t.jsx)(Q.RefreshCw,{className:"w-3 h-3 animate-spin"}):(0,t.jsx)(C,{className:"w-3 h-3"}),f?"Running...":"Run All"]})]})]}),!j&&(0,t.jsx)("div",{id:"action-results-content",className:"divide-y divide-border/50",children:z.map(e=>"idle"===e.status?(0,t.jsx)(eT,{name:e.name,onRun:()=>k(e.name,!0),disabled:O},e.name):"loading"===e.status?(0,t.jsx)(eR,{name:e.name},e.name):"error"===e.status?(0,t.jsx)(e$,{name:e.name,error:e.error},e.name):(0,t.jsx)(eO,{result:e.result,cached:e.cached,onRerun:S,globalLoading:f},e.name))})]})}function e_(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 ez({tools:e,compact:s}){return(0,t.jsx)("div",{className:`bg-card border border-border rounded-lg ${s?"p-3":"p-4"}`,children:(0,t.jsx)("div",{className:`grid grid-cols-[repeat(auto-fit,minmax(200px,1fr))] ${s?"gap-2":"gap-3"}`,children:e.map(e=>(0,t.jsxs)("div",{className:"flex items-center gap-2 min-w-0",children:[(0,t.jsx)(b,{className:"w-3.5 h-3.5 text-muted-foreground flex-shrink-0"}),(0,t.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,t.jsx)("div",{className:`${s?"text-xs":"text-sm"} font-mono font-medium truncate`,children:e.name}),(0,t.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 eF(e){return`${e.uuid}-${e.timestampMs}`}function eD(){let e=window.location.hash;return e.startsWith("#entry-")?e.slice(7):null}function eq({entries:e,allEntries:a,projectName:n,sessionId:i}){let[l,o]=(0,s.useState)(new Set),[d,m]=(0,s.useState)(0),[x,g]=(0,s.useState)(()=>eD()),y=(0,s.useRef)(void 0),b=(0,s.useRef)(!1),v=(0,s.useCallback)(e=>{e&&m(e.offsetTop)},[]),j=(0,s.useMemo)(()=>(function(e){let t=new Map,s=null,r=0;for(let a of e)"queue-operation"===a.type?(null!==s&&t.set(s,r),s=eF(a),r=0):null!==s&&r++;return null!==s&&t.set(s,r),t})(e),[e]),N=(0,s.useMemo)(()=>{let t;return t=!1,e.filter(e=>"queue-operation"===e.type?(t=l.has(eF(e)),!0):!t)},[e,l]),w=(0,s.useMemo)(()=>{let e=new Map;return N.forEach((t,s)=>{t.uuid&&e.set(t.uuid,s)}),e},[N]),k=(0,s.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),a=t.get(e);a&&s.set(r.uuid,a)}return s})(a),[a]),S=(0,s.useMemo)(()=>x&&k.has(x)?x:null,[x,k]),M=S?k.get(S)??null:null;(0,s.useEffect)(()=>{if(x)return y.current=setTimeout(()=>g(null),4e3),()=>{y.current&&clearTimeout(y.current)}},[]),(0,s.useEffect)(()=>{let e=()=>{let e=eD();g(e),b.current=!1,y.current&&clearTimeout(y.current),e&&(y.current=setTimeout(()=>g(null),4e3))};return window.addEventListener("hashchange",e),()=>window.removeEventListener("hashchange",e)},[]);let C=(0,s.useMemo)(()=>{if(!x)return null;let t=M??x,s=e.some(e=>e.uuid===t),r=w.has(t);if(s&&!r){let s=null;for(let r of e)if("queue-operation"===r.type)s=eF(r);else if(r.uuid===t&&s)return s}return null},[x,M,e,w]);(0,s.useEffect)(()=>{if(!C)return;let e=requestAnimationFrame(()=>{o(e=>{if(!e.has(C))return e;let t=new Set(e);return t.delete(C),t})});return()=>cancelAnimationFrame(e)},[C]);let E=(0,s.useCallback)(e=>{o(t=>{let s=new Set(t);return s.has(e)?s.delete(e):s.add(e),s})},[]),I=function({useFlushSync:e=!0,...t}){let a=s.useReducer(()=>({}),{})[1],n={...t,onChange:(s,n)=>{var i;e&&n?(0,r.flushSync)(a):a(),null==(i=t.onChange)||i.call(t,s,n)}},[i]=s.useState(()=>new p(n));return i.setOptions(n),f(()=>i._didMount(),[]),f(()=>i._willUpdate()),i}({getScrollElement:()=>"u">typeof document?window:null,observeElementRect:c,observeElementOffset:u,scrollToFn:h,initialOffset:()=>"u">typeof document?window.scrollY:0,...{count:N.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}})(N[e]),overscan:5,scrollMargin:d}});return(0,s.useEffect)(()=>{if(!x||b.current)return;let e=M??x,t=w.get(e);null!=t&&(b.current=!0,requestAnimationFrame(()=>{I.scrollToIndex(t,{align:"center"})}))},[x,M,w,I]),(0,t.jsx)("div",{ref:v,children:(0,t.jsx)("div",{style:{height:`${I.getTotalSize()}px`,width:"100%",position:"relative"},children:I.getVirtualItems().map(e=>{let s=N[e.index],r=!!x&&s.uuid===(M??x);return(0,t.jsx)("div",{"data-index":e.index,ref:I.measureElement,style:{position:"absolute",top:0,left:0,width:"100%",transform:`translateY(${e.start-I.options.scrollMargin}px)`},children:"queue-operation"===s.type?(0,t.jsx)(T,{entry:s,isCollapsed:l.has(eF(s)),entryCount:j.get(eF(s))??0,onToggle:()=>E(eF(s))}):(0,t.jsx)(ew,{entry:s,allEntries:a,projectName:n,sessionId:i,isHighlighted:!S&&r,highlightedUuid:S,autoExpandForUuid:S})},"queue-operation"===s.type?eF(s):s.uuid||s.timestamp)})})})}function eL({entries:e,projectName:r,sessionId:a}){let n=(0,s.useMemo)(()=>e.filter(e=>"session"===e._source),[e]),i=(0,s.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]),l=(0,s.useMemo)(()=>{let t=new Map;for(let s of i){let r=`agent-${s.id}`;t.set(s.id,e.filter(e=>e._source===r))}return t},[e,i]),o=(0,s.useMemo)(()=>e_(n),[n]),[c,d]=(0,s.useState)(!1),[u,m]=(0,s.useState)(new Set),[h,p]=(0,s.useState)(!1);(0,s.useEffect)(()=>{let e=()=>{window.location.hash.startsWith("#entry-")&&p(!1)};return window.addEventListener("hashchange",e),()=>window.removeEventListener("hashchange",e)},[]);let x=(0,s.useCallback)(e=>{m(t=>{let s=new Set(t);return s.has(e)?s.delete(e):s.add(e),s})},[]);return(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsx)(M,{entries:n}),(0,t.jsx)(en,{projectName:r,sessionId:a}),(0,t.jsx)(em,{projectName:r,sessionId:a}),(0,t.jsx)(eA,{projectName:r,sessionId:a}),i.length>0&&(0,t.jsxs)("div",{className:"space-y-3",children:[(0,t.jsxs)("button",{onClick:()=>d(e=>!e),className:"flex items-center gap-2 hover:opacity-80 transition-opacity",children:[(0,t.jsx)(g.ChevronDown,{className:`w-4 h-4 text-muted-foreground transition-transform ${c?"-rotate-90":""}`}),(0,t.jsx)("span",{className:"text-sm font-semibold text-muted-foreground uppercase tracking-wide",children:"Subagents"}),(0,t.jsxs)("span",{className:"text-xs text-muted-foreground",children:["(",i.length,")"]})]}),!c&&i.map(e=>{let s;return(0,t.jsxs)("div",{className:"pl-3 border-l-2 border-primary/30 space-y-2",children:[(0,t.jsxs)("button",{onClick:()=>x(e.id),className:"flex items-center gap-2 hover:opacity-80 transition-opacity",children:[(0,t.jsx)(g.ChevronDown,{className:`w-3.5 h-3.5 text-muted-foreground transition-transform ${u.has(e.id)?"-rotate-90":""}`}),(0,t.jsx)("span",{className:"text-sm font-bold",children:e.type}),e.description&&(0,t.jsx)("span",{className:"text-xs text-muted-foreground truncate max-w-[400px]",children:e.description})]}),!u.has(e.id)&&(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(M,{entries:l.get(e.id)||[],compact:!0}),(0,t.jsx)(en,{projectName:r,sessionId:a,agentId:e.id,subagentType:e.type,subagentDescription:e.description,compact:!0}),(0,t.jsx)(em,{projectName:r,sessionId:a,agentId:e.id,subagentType:e.type,subagentDescription:e.description,compact:!0}),(0,t.jsx)(eA,{projectName:r,sessionId:a,agentId:e.id,subagentType:e.type,subagentDescription:e.description,compact:!0}),(s=e_(l.get(e.id)||[])).length>0?(0,t.jsx)(ez,{tools:s,compact:!0}):null]})]},e.id)})]}),o.length>0&&(0,t.jsxs)("div",{className:"space-y-3",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("span",{className:"text-sm font-semibold text-muted-foreground uppercase tracking-wide",children:"Tools"}),(0,t.jsxs)("span",{className:"text-xs text-muted-foreground",children:["(",o.reduce((e,t)=>e+t.count,0),")"]})]}),(0,t.jsx)(ez,{tools:o})]}),(0,t.jsxs)("div",{children:[(0,t.jsxs)("button",{onClick:()=>p(e=>!e),className:"flex items-center gap-2 hover:opacity-80 transition-opacity",children:[(0,t.jsx)(g.ChevronDown,{className:`w-4 h-4 text-muted-foreground transition-transform ${h?"-rotate-90":""}`}),(0,t.jsx)("span",{className:"text-sm font-semibold text-muted-foreground uppercase tracking-wide",children:"Logs"})]}),!h&&(0,t.jsx)("div",{className:"mt-2 bg-card border border-border rounded-lg p-4 shadow-sm",children:0===n.length?(0,t.jsx)("p",{className:"text-muted-foreground text-center py-8",children:"No entries found."}):(0,t.jsx)(eq,{entries:n,allEntries:e,projectName:r,sessionId:a})})]})]})}e.s([],76248),e.i(76248),e.s(["default",()=>eL],36406)},5780,e=>{e.n(e.i(36406))}]);
|
|
4
|
+
color: hsl(${Math.max(0,Math.min(120-120*r,120))}deg 100% 31%);`,null==s?void 0:s.key)}return(null==s?void 0:s.onChange)&&!(n&&s.skipInitialOnChange)&&s.onChange(r),n=!1,r}return i.updateDeps=e=>{a=e},i}function n(e,t){if(void 0!==e)return e;throw Error(`Unexpected undefined${t?`: ${t}`:""}`)}e.i(47167);let i=e=>e,l=e=>{let t=Math.max(e.startIndex-e.overscan,0),s=Math.min(e.endIndex+e.overscan,e.count-1),r=[];for(let e=t;e<=s;e++)r.push(e);return r},o={passive:!0},c=(e,t)=>{let s=e.scrollElement;if(!s)return;let r=()=>{t({width:s.innerWidth,height:s.innerHeight})};return r(),s.addEventListener("resize",r,o),()=>{s.removeEventListener("resize",r)}},d="u"<typeof window||"onscrollend"in window,u=(e,t)=>{var s,r;let a,n=e.scrollElement;if(!n)return;let i=e.targetWindow;if(!i)return;let l=0,c=e.options.useScrollendEvent&&d?()=>void 0:(s=()=>{t(l,!1)},r=e.options.isScrollingResetDelay,function(...e){i.clearTimeout(a),a=i.setTimeout(()=>s.apply(this,e),r)}),u=s=>()=>{l=n[e.options.horizontal?"scrollX":"scrollY"],c(),t(l,s)},m=u(!0),h=u(!1);n.addEventListener("scroll",m,o);let p=e.options.useScrollendEvent&&d;return p&&n.addEventListener("scrollend",h,o),()=>{n.removeEventListener("scroll",m),p&&n.removeEventListener("scrollend",h)}},m=(e,t,s)=>{if(null==t?void 0:t.borderBoxSize){let e=t.borderBoxSize[0];if(e)return Math.round(e[s.options.horizontal?"inlineSize":"blockSize"])}return e[s.options.horizontal?"offsetWidth":"offsetHeight"]},h=(e,{adjustments:t=0,behavior:s},r)=>{var a,n;null==(n=null==(a=r.scrollElement)?void 0:a.scrollTo)||n.call(a,{[r.options.horizontal?"left":"top"]:e+t,behavior:s})};class p{constructor(e){this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.isScrolling=!1,this.scrollState=null,this.measurementsCache=[],this.itemSizeCache=new Map,this.laneAssignments=new Map,this.pendingMeasuredCacheIndexes=[],this.prevLanes=void 0,this.lanesChangedFlag=!1,this.lanesSettling=!1,this.scrollRect=null,this.scrollOffset=null,this.scrollDirection=null,this.scrollAdjustments=0,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=()=>{this._measureElement(e.target,e)};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=>{Object.entries(e).forEach(([t,s])=>{void 0===s&&delete e[t]}),this.options={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:i,rangeExtractor:l,onChange:()=>{},measureElement:m,initialRect:{width:0,height:0},scrollMargin:0,gap:0,indexAttribute:"data-index",initialMeasurementsCache:[],lanes:1,isScrollingResetDelay:150,enabled:!0,isRtl:!1,useScrollendEvent:!1,useAnimationFrameWithResizeObserver:!1,...e}},this.notify=e=>{var t,s;null==(s=(t=this.options).onChange)||s.call(t,this,e)},this.maybeNotify=a(()=>(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();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)=>{this.scrollAdjustments=0,this.scrollDirection=t?this.getScrollOffset()<e?"forward":"backward":null,this.scrollOffset=e,this.isScrolling=t,this.scrollState&&this.scheduleScrollReconcile(),this.maybeNotify()})),this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,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 a=t-1;a>=0;a--){let t=e[a];if(s.has(t.lane))continue;let n=r.get(t.lane);if(null==n||t.end>n.end?r.set(t.lane,t):t.end<n.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=a(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled,this.options.lanes],(e,t,s,r,a,n)=>(void 0!==this.prevLanes&&this.prevLanes!==n&&(this.lanesChangedFlag=!0),this.prevLanes=n,this.pendingMeasuredCacheIndexes=[],{count:e,paddingStart:t,scrollMargin:s,getItemKey:r,enabled:a,lanes:n}),{key:!1}),this.getMeasurements=a(()=>[this.getMeasurementOptions(),this.itemSizeCache],({count:e,paddingStart:t,scrollMargin:s,getItemKey:r,enabled:a,lanes:n},i)=>{if(!a)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.pendingMeasuredCacheIndexes=[]),0!==this.measurementsCache.length||this.lanesSettling||(this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(e=>{this.itemSizeCache.set(e.key,e.size)}));let l=this.lanesSettling?0:this.pendingMeasuredCacheIndexes.length>0?Math.min(...this.pendingMeasuredCacheIndexes):0;this.pendingMeasuredCacheIndexes=[],this.lanesSettling&&this.measurementsCache.length===e&&(this.lanesSettling=!1);let o=this.measurementsCache.slice(0,l),c=Array(n).fill(void 0);for(let e=0;e<l;e++){let t=o[e];t&&(c[t.lane]=e)}for(let a=l;a<e;a++){let e,n,l=r(a),d=this.laneAssignments.get(a);if(void 0!==d&&this.options.lanes>1){let r=c[e=d],a=void 0!==r?o[r]:void 0;n=a?a.end+this.options.gap:t+s}else{let r=1===this.options.lanes?o[a-1]:this.getFurthestMeasurement(o,a);n=r?r.end+this.options.gap:t+s,e=r?r.lane:a%this.options.lanes,this.options.lanes>1&&this.laneAssignments.set(a,e)}let u=i.get(l),m="number"==typeof u?u:this.options.estimateSize(a),h=n+m;o[a]={index:a,start:n,size:m,end:h,key:l,lane:e},c[e]=a}return this.measurementsCache=o,o},{key:!1,debug:()=>this.options.debug}),this.calculateRange=a(()=>[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}){let a=e.length-1;if(e.length<=r)return{startIndex:0,endIndex:a};let n=x(0,a,t=>e[t].start,s),i=n;if(1===r)for(;i<a&&e[i].end<s+t;)i++;else if(r>1){let l=Array(r).fill(0);for(;i<a&&l.some(e=>e<s+t);){let t=e[i];l[t.lane]=t.end,i++}let o=Array(r).fill(s+t);for(;n>=0&&o.some(e=>e>=s);){let t=e[n];o[t.lane]=t.start,n--}n=Math.max(0,n-n%r),i=Math.min(a,i+(r-1-i%r))}return{startIndex:n,endIndex:i}}({measurements:e,outerSize:t,scrollOffset:s,lanes:r}):null,{key:!1,debug:()=>this.options.debug}),this.getVirtualIndexes=a(()=>{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,a)=>null===r||null===a?[]:e({startIndex:r,endIndex:a,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),a=Math.min(this.options.count-1,s+t);return e>=r&&e<=a}return!0},this._measureElement=(e,t)=>{if(!e.isConnected)return void this.observer.unobserve(e);let s=this.indexFromElement(e),r=this.measurementsCache[s];if(!r)return;let a=r.key,n=this.elementsCache.get(a);n!==e&&(n&&this.observer.unobserve(n),this.observer.observe(e),this.elementsCache.set(a,e)),this.shouldMeasureDuringScroll(s)&&this.resizeItem(s,this.options.measureElement(e,t,this))},this.resizeItem=(e,t)=>{var s;let r=this.measurementsCache[e];if(!r)return;let a=t-(this.itemSizeCache.get(r.key)??r.size);0!==a&&((null==(s=this.scrollState)?void 0:s.behavior)!=="smooth"&&(void 0!==this.shouldAdjustScrollPositionOnItemSizeChange?this.shouldAdjustScrollPositionOnItemSizeChange(r,a,this):r.start<this.getScrollOffset()+this.scrollAdjustments)&&this._scrollToOffset(this.getScrollOffset(),{adjustments:this.scrollAdjustments+=a,behavior:void 0}),this.pendingMeasuredCacheIndexes.push(r.index),this.itemSizeCache=new Map(this.itemSizeCache.set(r.key,t)),this.notify(!1))},this.measureElement=e=>{e?this._measureElement(e,void 0):this.elementsCache.forEach((e,t)=>{e.isConnected||(this.observer.unobserve(e),this.elementsCache.delete(t))})},this.getVirtualItems=a(()=>[this.getVirtualIndexes(),this.getMeasurements()],(e,t)=>{let s=[];for(let r=0,a=e.length;r<a;r++){let a=t[e[r]];s.push(a)}return s},{key:!1,debug:()=>this.options.debug}),this.getVirtualItemForOffset=e=>{let t=this.getMeasurements();if(0!==t.length)return n(t[x(0,t.length-1,e=>n(t[e]).start,e)])},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.getOffsetForAlignment=(e,t,s=0)=>{if(!this.scrollElement)return 0;let r=this.getSize(),a=this.getScrollOffset();return"auto"===t&&(t=e>=a+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(),a=this.measurementsCache[e];if(!a)return;if("auto"===t)if(a.end>=r+s-this.options.scrollPaddingEnd)t="end";else{if(!(a.start<=r+this.options.scrollPaddingStart))return[r,t];t="start"}if("end"===t&&e===this.options.count-1)return[this.getMaxScrollOffset(),t];let n="end"===t?a.end+this.options.scrollPaddingEnd:a.start-this.options.scrollPaddingStart;return[this.getOffsetForAlignment(n,t,a.size),t]},this.scrollToOffset=(e,{align:t="start",behavior:s="auto"}={})=>{let r=this.getOffsetForAlignment(e,t),a=this.now();this.scrollState={index:null,align:t,behavior:s,startedAt:a,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[a,n]=r,i=this.now();this.scrollState={index:e,align:n,behavior:s,startedAt:i,lastTargetOffset:a,stableFrames:0},this._scrollToOffset(a,{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.getTotalSize=()=>{var e;let t,s=this.getMeasurements();if(0===s.length)t=this.options.paddingStart;else if(1===this.options.lanes)t=(null==(e=s[s.length-1])?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._scrollToOffset=(e,{adjustments:t,behavior:s})=>{this.options.scrollToFn(e,{behavior:s,adjustments:t},this)},this.measure=()=>{this.itemSizeCache=new Map,this.laneAssignments=new Map,this.notify(!1)},this.setOptions(e)}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.scrollState=null;return}}else this.scrollState.stableFrames=0,s&&(this.scrollState.lastTargetOffset=t,this.scrollState.behavior="auto",this._scrollToOffset(t,{adjustments:void 0,behavior:"auto"}));this.scheduleScrollReconcile()}}let x=(e,t,s,r)=>{for(;e<=t;){let a=(e+t)/2|0,n=s(a);if(n<r)e=a+1;else{if(!(n>r))return a;t=a-1}}return e>0?e-1:0},f="u">typeof document?s.useLayoutEffect:s.useEffect;var g=e.i(64659),y=e.i(75254);let b=(0,y.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"}]]),v=(0,y.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"}]]),j=(0,y.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,y.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"}]]),w=(0,y.default)("clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6l4 2",key:"mmk7yg"}]]);var k=e.i(86311);let S=(0,y.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"}]]),M=s.default.memo(function({entries:e,compact:r=!1}){let a=(0,s.useMemo)(()=>(function(e){let t=0,s=0,r=0,a=0,n=0,i=new Set;for(let l of e)if("user"===l.type&&t++,"queue-operation"===l.type&&n++,"assistant"===l.type){for(let e of(s++,l.message.content))"tool_use"===e.type&&("Task"===e.name&&(e.subagentType||e.subagentId)?a++:r++);l.message.model&&i.add(l.message.model)}let l="";return e.length>=2&&(l=function(e){if(e<1e3)return`${e}ms`;let t=e/1e3;if(t<60)return`${t.toFixed(1)}s`;let s=Math.floor(t/60);if(s>=60){let e=Math.floor(s/60);return`${e}h ${s%60}m`}let r=(t%60).toFixed(0);return`${s}m ${r}s`}(e[e.length-1].timestampMs-e[0].timestampMs)),{turnCount:n,userCount:t,assistantCount:s,toolCallCount:r,subagentCount:a,duration:l,models:Array.from(i)}})(e),[e]),n=r?"w-3.5 h-3.5":"w-4 h-4",i=r?"text-xs font-medium":"text-sm font-medium",l=r?"text-[10px] text-muted-foreground":"text-xs text-muted-foreground",o=[...r?[]:[{Icon:k.MessageSquare,color:"text-primary",v:a.turnCount,l:"Turns"}],{Icon:v,color:"text-[color:var(--chart-1)]",v:a.userCount,l:"User"},{Icon:j,color:"text-[color:var(--chart-2)]",v:a.assistantCount,l:"Assistant"},{Icon:b,color:"text-[color:var(--chart-3)]",v:a.toolCallCount,l:r?"Tools":"Tool Calls"},{Icon:S,color:"text-[color:var(--chart-5)]",v:a.subagentCount,l:"Subagents"},{Icon:w,color:"text-[color:var(--chart-4)]",v:a.duration||"—",l:"Duration"},{Icon:N,color:"text-[color:var(--chart-5)]",v:a.models.length>0?a.models.join(", "):"—",l:r?"Model":"Model(s)"}];return(0,t.jsx)("div",{className:r?"bg-muted/30 border border-border/50 rounded-lg p-3 mb-3":"bg-card border border-border rounded-lg p-4",children:(0,t.jsx)("div",{className:`grid grid-cols-2 ${r?"sm:grid-cols-6 gap-3":"sm:grid-cols-4 lg:grid-cols-7 gap-4"}`,children:o.map(({Icon:e,color:s,v:r,l:a})=>(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(e,{className:`${n} ${s}`}),(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{className:`${i} truncate max-w-[120px]`,children:r}),(0,t.jsx)("div",{className:l,children:a})]})]},a))})})}),C=(0,y.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 E=e.i(63059);function I(e){return JSON.stringify(e.raw,null,2)}let R=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=R.format(t),r=t.getMilliseconds().toString().padStart(3,"0");return`${s}.${r}`}let T=s.default.memo(function({entry:e,isCollapsed:s,entryCount:r,onToggle:a}){let n="function"==typeof a,i=(0,t.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${n?" group-hover:bg-primary/20 transition-colors":""}`,children:[n?(0,t.jsx)(E.ChevronRight,{className:`w-3 h-3 transition-transform ${s?"":"rotate-90"}`}):(0,t.jsx)(C,{className:"w-3 h-3"}),(0,t.jsx)("span",{children:e.label}),(0,t.jsx)("span",{className:"text-muted-foreground",children:$(e.timestampMs)}),n&&s&&"number"==typeof r&&(0,t.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 n?(0,t.jsxs)("button",{type:"button",onClick:a,className:"group flex items-center gap-3 py-3 px-4 w-full cursor-pointer",children:[(0,t.jsx)("div",{className:"flex-1 h-px bg-primary/30"}),i,(0,t.jsx)("div",{className:"flex-1 h-px bg-primary/30"})]}):(0,t.jsxs)("div",{className:"flex items-center gap-3 py-3 px-4",children:[(0,t.jsx)("div",{className:"flex-1 h-px bg-primary/30"}),i,(0,t.jsx)("div",{className:"flex-1 h-px bg-primary/30"})]})});var O=e.i(47163);let A={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"},z={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"},F=(0,y.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"}]]),D=(0,y.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"}]]),q=(0,y.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"}]]);function L({type:e}){let s="w-4 h-4";switch(e){case"user":return(0,t.jsx)(v,{className:s});case"assistant":return(0,t.jsx)(j,{className:s});case"file-history-snapshot":return(0,t.jsx)(F,{className:s});case"progress":return(0,t.jsx)(D,{className:s});case"system":return(0,t.jsx)(q,{className:s});case"queue-operation":return(0,t.jsx)(C,{className:s})}}function U({type:e}){return(0,t.jsxs)("span",{className:`inline-flex items-center gap-1.5 px-2 py-0.5 text-xs font-mono rounded border ${_[e]}`,children:[(0,t.jsx)(L,{type:e}),A[e]]})}var W=e.i(24380);function P({block:e}){let r=(0,s.useMemo)(()=>JSON.stringify(e.input,null,2),[e]);return(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsxs)("details",{open:!0,children:[(0,t.jsx)("summary",{className:"text-xs text-muted-foreground cursor-pointer hover:text-foreground transition-colors",children:(0,t.jsxs)("span",{className:"inline-flex items-center gap-1",children:["Input",(0,t.jsx)(W.CopyButton,{text:r})]})}),(0,t.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:r})]}),e.result?(0,t.jsxs)("div",{className:"border-l-2 border-primary/50 pl-3 space-y-1",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.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,t.jsx)("span",{className:"text-xs text-muted-foreground",children:$(new Date(e.result.timestamp).getTime())})]}),e.result.content&&(0,t.jsxs)("details",{open:!0,children:[(0,t.jsx)("summary",{className:"text-xs text-muted-foreground cursor-pointer hover:text-foreground transition-colors",children:(0,t.jsxs)("span",{className:"inline-flex items-center gap-1",children:["Output",(0,t.jsx)(W.CopyButton,{text:e.result.content})]})}),(0,t.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,s)=>(0,t.jsx)("img",{src:`data:${e.mediaType};base64,${e.base64}`,alt:`Tool result image ${s+1}`,className:"mt-2 max-w-full rounded border border-border"},s))]}):(0,t.jsx)("div",{className:"text-xs text-muted-foreground",children:"Tool did not return a result"})]})}let H=(0,y.default)("circle-check-big",[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]);var V=e.i(73884);let B=(0,y.default)("triangle-alert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]),J=(0,y.default)("chart-column",[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["path",{d:"M18 17V9",key:"2bz60n"}],["path",{d:"M13 17V5",key:"1frdt8"}],["path",{d:"M8 17v-3",key:"17ska0"}]]);var Q=e.i(16715),K=e.i(95187);let X=(0,K.createServerReference)("78e8dc5721f3ea29fa224635c5c4f0218a9cca9d0b",K.callServer,void 0,K.findSourceMapURL,"checkEvalCacheAndList");async function Y(e,t,s,r=!1,a){let n;try{n=await fetch("/api/queue-item",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({type:"eval",projectName:e,sessionId:t,itemName:s,forceRefresh:r,...a&&{agentId:a.agentId,subagentType:a.subagentType,subagentDescription:a.subagentDescription}})})}catch(e){return{ok:!1,error:`Network error: ${e instanceof Error?e.message:String(e)}`}}return 202===n.status?{ok:!1,error:"__queued__"}:n.ok?n.json():{ok:!1,error:`Queue request failed: ${n.status}`}}let G=(0,K.createServerReference)("60619ccd657b7bb3e8b061509b21f6eb177b0f73a1",K.callServer,void 0,K.findSourceMapURL,"clearAlertMarker"),Z=(0,K.createServerReference)("78a4e7d6cf541c9c824ab398e4c5f6039857613b1b",K.callServer,void 0,K.findSourceMapURL,"invalidateSessionItemCaches");function ee({score:e}){let s=Math.round(100*e);return(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("div",{className:"flex-1 h-2 bg-muted rounded-full overflow-hidden max-w-[80px]",children:(0,t.jsx)("div",{className:`h-full rounded-full transition-all ${e>=.8?"bg-green-500":e>=.5?"bg-yellow-500":"bg-red-500"}`,style:{width:`${s}%`}})}),(0,t.jsxs)("span",{className:"text-xs font-mono text-muted-foreground w-8",children:[s,"%"]})]})}function et({result:e}){return e.error?(0,t.jsx)(B,{className:"w-4 h-4 text-yellow-500"}):e.pass?(0,t.jsx)(H,{className:"w-4 h-4 text-green-500"}):(0,t.jsx)(V.XCircle,{className:"w-4 h-4 text-red-500"})}function es({name:e}){return(0,t.jsxs)("div",{className:"flex items-center gap-3 px-3 py-2",children:[(0,t.jsx)("div",{className:"w-4 h-4 rounded-full bg-muted animate-pulse"}),(0,t.jsx)("span",{className:"text-sm font-mono truncate max-w-[200px] text-muted-foreground",children:e}),(0,t.jsx)("div",{className:"flex-1 h-2 bg-muted rounded-full animate-pulse max-w-[80px]"})]})}function er({name:e,error:s}){return(0,t.jsxs)("div",{className:"flex items-center gap-3 px-3 py-2",children:[(0,t.jsx)(B,{className:"w-4 h-4 text-yellow-500"}),(0,t.jsx)("span",{className:"text-sm font-mono truncate max-w-[200px]",children:e}),(0,t.jsx)("span",{className:"text-xs text-yellow-500 truncate",children:s})]})}function ea({result:e,cached:r,onRerun:a,globalLoading:n}){let[i,l]=(0,s.useState)(!1),[o,c]=(0,s.useState)(!1),d=e.error||e.message,u=!!d,m=async t=>{t.stopPropagation(),c(!0);try{await a(e.name)}finally{c(!1)}};return(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:`flex items-center gap-3 px-3 py-2 rounded-md hover:bg-muted/30 transition-colors ${u?"cursor-pointer":""}`,onClick:()=>u&&l(e=>!e),children:[u&&(0,t.jsx)(E.ChevronRight,{className:`w-3.5 h-3.5 text-muted-foreground transition-transform ${i?"rotate-90":""}`}),(0,t.jsx)(et,{result:e}),(0,t.jsx)("span",{className:"text-sm font-mono truncate max-w-[200px]",children:e.name}),(0,t.jsx)(ee,{score:e.score}),r&&(0,t.jsx)("span",{className:"text-[10px] font-medium text-muted-foreground/70 bg-muted px-1 py-0.5 rounded",children:"cached"}),e.error&&(0,t.jsx)("span",{className:"text-xs text-yellow-500 flex-1 truncate min-w-0",children:e.error}),e.message&&!e.error&&(0,t.jsx)("span",{className:"text-xs text-muted-foreground flex-1 truncate min-w-0",children:e.message}),(0,t.jsx)("button",{onClick:m,disabled:o||n,className:"ml-auto flex-shrink-0 p-1 rounded hover:bg-muted/50 transition-colors disabled:opacity-50",title:"Re-run this eval","aria-label":`Re-run eval ${e.name}`,children:(0,t.jsx)(Q.RefreshCw,{className:`w-3.5 h-3.5 text-muted-foreground ${o?"animate-spin":""}`})})]}),i&&d&&(0,t.jsxs)("div",{className:"ml-10 mr-3 mb-2 relative group",children:[(0,t.jsx)("div",{className:"absolute top-1 right-1 opacity-0 group-hover:opacity-100 transition-opacity",children:(0,t.jsx)(W.CopyButton,{text:d})}),(0,t.jsx)("div",{className:"p-2 pr-8 bg-muted/50 rounded text-xs whitespace-pre-wrap break-words select-text",children:d})]})]})}function en({projectName:e,sessionId:r,agentId:a,subagentType:n,subagentDescription:i,compact:l}){let[o,c]=(0,s.useState)([]),[d,u]=(0,s.useState)(!0),[m,h]=(0,s.useState)(!1),[p,x]=(0,s.useState)(!1),[f,y]=(0,s.useState)(!1),[b,v]=(0,s.useState)(null),[j,N]=(0,s.useState)(!0),w=(0,s.useRef)(!0);(0,s.useEffect)(()=>{w.current=!0;let t=!1;return u(!0),v(null),h(!1),c([]),X(e,r,a,n).then(s=>{if(!t&&w.current){if(!s.ok){v(s.error),u(!1);return}if(!s.hasEvals){h(!0),u(!1);return}if(c(s.names.map(e=>{let t=s.cachedResults.find(t=>t.name===e);return t?{status:"done",name:e,result:t,cached:!0}:{status:"loading",name:e}})),x(0===s.uncachedNames.length),u(!1),s.uncachedNames.length>0){let l=a?{agentId:a,subagentType:n,subagentDescription:i}:void 0;Promise.all(s.uncachedNames.map(async s=>{try{let a=await Y(e,r,s,!1,l);if(t||!w.current||!a.ok&&"__queued__"===a.error)return;a.ok?c(e=>e.map(e=>e.name===s?{status:"done",name:s,result:a.result,cached:!1}:e)):c(e=>e.map(e=>e.name===s?{status:"error",name:s,error:a.error}:e))}catch(e){if(t||!w.current)return;c(t=>t.map(t=>t.name===s?{status:"error",name:s,error:e instanceof Error?e.message:"Failed"}:t))}}))}}}).catch(e=>{!t&&w.current&&(v(e instanceof Error?e.message:"Failed to load evals"),u(!1))}),()=>{t=!0,w.current=!1}},[e,r,a,n,i]),(0,s.useEffect)(()=>{if(0===o.filter(e=>"loading"===e.status).map(e=>e.name).length)return;let t=!1,s=setInterval(async()=>{try{let s=await X(e,r,a,n);if(t||!s.ok||!s.hasEvals)return;c(e=>{let t=!1,r=e.map(e=>{if("loading"!==e.status)return e;let r=s.cachedResults.find(t=>t.name===e.name);return r?(t=!0,{status:"done",name:e.name,result:r,cached:!1}):e});return t?r:e})}catch{}},3e3);return()=>{t=!0,clearInterval(s)}},[o,e,r,a,n]);let k=(0,s.useCallback)(async()=>{y(!0),c(e=>e.map(e=>({status:"loading",name:e.name})));let t=a?{agentId:a,subagentType:n,subagentDescription:i}:void 0;try{await Z("evals",e,r,a),await G(e,r);let s=o.map(e=>e.name);await Promise.all(s.map(async s=>{try{let a=await Y(e,r,s,!0,t);if(!w.current||!a.ok&&"__queued__"===a.error)return;a.ok?c(e=>e.map(e=>e.name===s?{status:"done",name:s,result:a.result,cached:!1}:e)):c(e=>e.map(e=>e.name===s?{status:"error",name:s,error:a.error}:e))}catch(e){if(!w.current)return;c(t=>t.map(t=>t.name===s?{status:"error",name:s,error:e instanceof Error?e.message:"Failed"}:t))}})),w.current&&x(!1)}finally{w.current&&y(!1)}},[e,r,a,n,i,o]),S=(0,s.useCallback)(async t=>{x(!1),c(e=>e.map(e=>e.name===t?{status:"loading",name:t}:e));let s=a?{agentId:a,subagentType:n,subagentDescription:i}:void 0;try{let a=await Y(e,r,t,!0,s);if(!w.current||!a.ok&&"__queued__"===a.error)return;a.ok?c(e=>e.map(e=>e.name===t?{status:"done",name:t,result:a.result,cached:!1}:e)):c(e=>e.map(e=>e.name===t?{status:"error",name:t,error:a.error}:e))}catch(e){if(!w.current)return;c(s=>s.map(s=>s.name===t?{status:"error",name:t,error:e instanceof Error?e.message:"Re-run failed"}:s))}},[e,r,a,n,i]),M=o.filter(e=>"done"===e.status),E=o.filter(e=>"loading"===e.status).length,I=M.map(e=>e.result).filter(e=>!e.skipped),R=I.filter(e=>!e.error&&e.pass).length,$=I.filter(e=>!e.error&&!e.pass).length,T=M.filter(e=>!!e.result.error).length+o.filter(e=>"error"===e.status).length,O=d||E>0||f;if(m)return null;let A=l?"p-2.5":"p-4",_=l?"text-xs":"text-sm";if(d)return(0,t.jsx)("div",{className:`bg-card border border-border rounded-lg ${A}`,children:(0,t.jsxs)("div",{className:`flex items-center gap-2 ${_} text-muted-foreground`,children:[(0,t.jsx)(Q.RefreshCw,{className:"w-4 h-4 animate-spin"}),"Loading evals..."]})});if(b&&0===o.length)return(0,t.jsx)("div",{className:`bg-card border border-border rounded-lg ${A}`,children:(0,t.jsxs)("div",{className:`flex items-center gap-2 ${_} text-destructive`,children:[(0,t.jsx)(B,{className:"w-4 h-4"}),b]})});if(0===o.length)return null;let z=o.filter(e=>!("done"===e.status&&e.result.skipped)),F=o.filter(e=>"done"===e.status&&e.result.skipped).length;return(0,t.jsxs)("div",{className:`bg-card border border-border rounded-lg ${A} ${j?"":"space-y-3"}`,children:[(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsxs)("button",{onClick:()=>N(e=>!e),className:"flex items-center gap-2 hover:opacity-80 transition-opacity",children:[(0,t.jsx)(g.ChevronDown,{className:`w-4 h-4 text-muted-foreground transition-transform ${j?"-rotate-90":""}`}),(0,t.jsx)(J,{className:"w-4 h-4 text-primary"}),(0,t.jsx)("span",{className:"text-sm font-medium",children:"Eval Results"})]}),(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[(0,t.jsxs)("div",{className:"flex items-center gap-3 text-xs",children:[R>0&&(0,t.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,t.jsx)(H,{className:"w-3.5 h-3.5 text-green-500"}),(0,t.jsx)("span",{className:"font-medium",children:R}),(0,t.jsx)("span",{className:"text-muted-foreground",children:"passed"})]}),$>0&&(0,t.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,t.jsx)(V.XCircle,{className:"w-3.5 h-3.5 text-red-500"}),(0,t.jsx)("span",{className:"font-medium",children:$}),(0,t.jsx)("span",{className:"text-muted-foreground",children:"failed"})]}),T>0&&(0,t.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,t.jsx)(B,{className:"w-3.5 h-3.5 text-yellow-500"}),(0,t.jsx)("span",{className:"font-medium",children:T}),(0,t.jsx)("span",{className:"text-muted-foreground",children:"errored"})]}),E>0&&(0,t.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,t.jsx)(Q.RefreshCw,{className:"w-3.5 h-3.5 text-muted-foreground animate-spin"}),(0,t.jsxs)("span",{className:"text-muted-foreground",children:[E," running..."]})]}),F>0&&!O&&(0,t.jsxs)("span",{className:"text-[10px] font-medium text-muted-foreground/50 bg-muted px-1.5 py-0.5 rounded",children:[F," skipped"]}),p&&!O&&(0,t.jsx)("span",{className:"text-[10px] font-medium text-muted-foreground/70 bg-muted px-1.5 py-0.5 rounded",children:"cached"})]}),(0,t.jsxs)("button",{onClick:()=>k(),disabled:O,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 disabled:opacity-50",children:[f?(0,t.jsx)(Q.RefreshCw,{className:"w-3 h-3 animate-spin"}):(0,t.jsx)(C,{className:"w-3 h-3"}),f?"Running...":"Re-run"]})]})]}),!j&&(0,t.jsx)("div",{className:"divide-y divide-border/50",children:z.map(e=>"loading"===e.status?(0,t.jsx)(es,{name:e.name},e.name):"error"===e.status?(0,t.jsx)(er,{name:e.name,error:e.error},e.name):(0,t.jsx)(ea,{result:e.result,cached:e.cached,onRerun:S,globalLoading:f},e.name))})]})}let ei=(0,y.default)("database",[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]]),el=(0,K.createServerReference)("78ea8b40c869663e65dec3da9d674f7c47ee0eef10",K.callServer,void 0,K.findSourceMapURL,"checkEnrichmentCacheAndList");async function eo(e,t,s,r=!1,a){let n;try{n=await fetch("/api/queue-item",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({type:"enrichment",projectName:e,sessionId:t,itemName:s,forceRefresh:r,...a&&{agentId:a.agentId,subagentType:a.subagentType,subagentDescription:a.subagentDescription}})})}catch(e){return{ok:!1,error:`Network error: ${e instanceof Error?e.message:String(e)}`}}return 202===n.status?{ok:!1,error:"__queued__"}:n.ok?n.json():{ok:!1,error:`Queue request failed: ${n.status}`}}function ec({name:e}){return(0,t.jsxs)("div",{className:"space-y-1.5",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("span",{className:"text-sm font-mono font-medium text-muted-foreground",children:e}),(0,t.jsx)("div",{className:"w-10 h-3 bg-muted rounded animate-pulse"})]}),(0,t.jsxs)("div",{className:"pl-1 space-y-1",children:[(0,t.jsx)("div",{className:"h-3 bg-muted rounded animate-pulse w-2/3"}),(0,t.jsx)("div",{className:"h-3 bg-muted rounded animate-pulse w-1/2"})]})]})}function ed({name:e,error:s}){return(0,t.jsx)("div",{className:"space-y-1.5",children:(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(B,{className:"w-3.5 h-3.5 text-yellow-500"}),(0,t.jsx)("span",{className:"text-sm font-mono font-medium",children:e}),(0,t.jsx)("span",{className:"text-xs text-yellow-500 truncate",children:s})]})})}function eu({result:e,cached:s}){if(e.error)return(0,t.jsx)("div",{className:"space-y-1.5",children:(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(B,{className:"w-3.5 h-3.5 text-yellow-500"}),(0,t.jsx)("span",{className:"text-sm font-mono font-medium",children:e.name}),(0,t.jsx)("span",{className:"text-xs text-yellow-500 truncate",title:e.error,children:e.error})]})});let r=Object.entries(e.data);return 0===r.length?null:(0,t.jsxs)("div",{className:"space-y-1.5",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("span",{className:"text-sm font-mono font-medium",children:e.name}),(0,t.jsxs)("span",{className:"text-xs text-muted-foreground",children:[e.durationMs,"ms"]}),s&&(0,t.jsx)("span",{className:"text-[10px] font-medium text-muted-foreground/70 bg-muted px-1 py-0.5 rounded",children:"cached"})]}),(0,t.jsx)("div",{className:"grid grid-cols-1 gap-y-1 pl-1",children:r.map(([e,s])=>(0,t.jsxs)("div",{className:"flex items-baseline gap-2 min-w-0 flex-wrap",children:[(0,t.jsxs)("span",{className:"text-xs font-semibold text-primary/70 shrink-0",children:[e,":"]}),(0,t.jsx)("span",{className:"text-sm font-mono break-all",title:String(s),children:"boolean"==typeof s?s?"Yes":"No":"number"==typeof s?s.toLocaleString():String(s)})]},e))})]})}function em({projectName:e,sessionId:r,agentId:a,subagentType:n,subagentDescription:i,compact:l}){let[o,c]=(0,s.useState)([]),[d,u]=(0,s.useState)(!0),[m,h]=(0,s.useState)(!1),[p,x]=(0,s.useState)(!1),[f,y]=(0,s.useState)(!1),[b,v]=(0,s.useState)(null),[j,N]=(0,s.useState)(!0),w=(0,s.useRef)(!0);(0,s.useEffect)(()=>{w.current=!0;let t=!1;return u(!0),v(null),h(!1),c([]),el(e,r,a,n).then(s=>{if(!t&&w.current){if(!s.ok){v(s.error),u(!1);return}if(!s.hasEnrichers){h(!0),u(!1);return}if(c(s.names.map(e=>{let t=s.cachedResults.find(t=>t.name===e);return t?{status:"done",name:e,result:t,cached:!0}:{status:"loading",name:e}})),x(0===s.uncachedNames.length),u(!1),s.uncachedNames.length>0){let l=a?{agentId:a,subagentType:n,subagentDescription:i}:void 0;Promise.all(s.uncachedNames.map(async s=>{try{let a=await eo(e,r,s,!1,l);if(t||!w.current||!a.ok&&"__queued__"===a.error)return;a.ok?c(e=>e.map(e=>e.name===s?{status:"done",name:s,result:a.result,cached:!1}:e)):c(e=>e.map(e=>e.name===s?{status:"error",name:s,error:a.error}:e))}catch(e){if(t||!w.current)return;c(t=>t.map(t=>t.name===s?{status:"error",name:s,error:e instanceof Error?e.message:"Failed"}:t))}}))}}}).catch(e=>{!t&&w.current&&(v(e instanceof Error?e.message:"Failed to load enrichments"),u(!1))}),()=>{t=!0,w.current=!1}},[e,r,a,n,i]);let k=(0,s.useCallback)(async()=>{y(!0),c(e=>e.map(e=>({status:"loading",name:e.name})));let t=a?{agentId:a,subagentType:n,subagentDescription:i}:void 0;try{await Z("enrichments",e,r,a);let s=o.map(e=>e.name);await Promise.all(s.map(async s=>{try{let a=await eo(e,r,s,!0,t);if(!w.current||!a.ok&&"__queued__"===a.error)return;a.ok?c(e=>e.map(e=>e.name===s?{status:"done",name:s,result:a.result,cached:!1}:e)):c(e=>e.map(e=>e.name===s?{status:"error",name:s,error:a.error}:e))}catch(e){if(!w.current)return;c(t=>t.map(t=>t.name===s?{status:"error",name:s,error:e instanceof Error?e.message:"Failed"}:t))}})),w.current&&x(!1)}finally{w.current&&y(!1)}},[e,r,a,n,i,o]),S=o.filter(e=>"done"===e.status),M=o.filter(e=>"loading"===e.status).length,E=S.filter(e=>!!e.result.error).length+o.filter(e=>"error"===e.status).length,I=d||M>0||f;if(m)return null;let R=l?"p-2.5":"p-4",$=l?"text-xs":"text-sm";if(d)return(0,t.jsx)("div",{className:`bg-card border border-border rounded-lg ${R}`,children:(0,t.jsxs)("div",{className:`flex items-center gap-2 ${$} text-muted-foreground`,children:[(0,t.jsx)(Q.RefreshCw,{className:"w-4 h-4 animate-spin"}),"Loading enrichments..."]})});if(b&&0===o.length)return(0,t.jsx)("div",{className:`bg-card border border-border rounded-lg ${R}`,children:(0,t.jsxs)("div",{className:`flex items-center gap-2 ${$} text-destructive`,children:[(0,t.jsx)(B,{className:"w-4 h-4"}),b]})});if(0===o.length)return null;let T=o.filter(e=>!("done"===e.status&&e.result.skipped)),O=o.filter(e=>"done"===e.status&&e.result.skipped).length;return(0,t.jsxs)("div",{className:`bg-card border border-border rounded-lg ${R} ${j?"":"space-y-3"}`,children:[(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsxs)("button",{onClick:()=>N(e=>!e),className:"flex items-center gap-2 hover:opacity-80 transition-opacity",children:[(0,t.jsx)(g.ChevronDown,{className:`w-4 h-4 text-muted-foreground transition-transform ${j?"-rotate-90":""}`}),(0,t.jsx)(ei,{className:"w-4 h-4 text-primary"}),(0,t.jsx)("span",{className:"text-sm font-medium",children:"Enrichment Data"})]}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[E>0&&(0,t.jsxs)("div",{className:"flex items-center gap-1 text-xs text-yellow-500",children:[(0,t.jsx)(B,{className:"w-3.5 h-3.5"}),(0,t.jsxs)("span",{children:[E," errored"]})]}),M>0&&(0,t.jsxs)("div",{className:"flex items-center gap-1 text-xs text-muted-foreground",children:[(0,t.jsx)(Q.RefreshCw,{className:"w-3.5 h-3.5 animate-spin"}),(0,t.jsxs)("span",{children:[M," running..."]})]}),O>0&&!I&&(0,t.jsxs)("span",{className:"text-[10px] font-medium text-muted-foreground/50 bg-muted px-1.5 py-0.5 rounded",children:[O," skipped"]}),p&&!I&&(0,t.jsx)("span",{className:"text-[10px] font-medium text-muted-foreground/70 bg-muted px-1.5 py-0.5 rounded",children:"cached"}),(0,t.jsxs)("button",{onClick:()=>k(),disabled:I,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 disabled:opacity-50",children:[f?(0,t.jsx)(Q.RefreshCw,{className:"w-3 h-3 animate-spin"}):(0,t.jsx)(C,{className:"w-3 h-3"}),f?"Running...":"Re-run"]})]})]}),!j&&(0,t.jsx)("div",{className:"space-y-3 divide-y divide-border/50",children:T.map(e=>(0,t.jsxs)("div",{className:"pt-2 first:pt-0",children:["loading"===e.status&&(0,t.jsx)(ec,{name:e.name}),"error"===e.status&&(0,t.jsx)(ed,{name:e.name,error:e.error}),"done"===e.status&&(0,t.jsx)(eu,{result:e.result,cached:e.cached})]},e.name))})]})}let eh=(0,y.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"}]]),ep=s.default.memo(function({block:e,allEntries:s,projectName:r,sessionId:a,highlightedUuid:n,autoExpandForUuid:i}){switch(e.type){case"text":return(0,t.jsx)("p",{className:"whitespace-pre-wrap text-sm",children:e.text});case"tool_use":if("Task"===e.name&&(e.subagentType||e.subagentId)){let l=e.subagentId&&s?s.filter(t=>t._source===`agent-${e.subagentId}`):void 0;return(0,t.jsx)(ej,{block:e,subagentEntries:l,projectName:r,sessionId:a,highlightedUuid:n,autoExpandForUuid:i})}return(0,t.jsxs)("div",{className:"border border-border/50 rounded-lg p-3 bg-muted/10",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 mb-2",children:[(0,t.jsx)(b,{className:"w-4 h-4 text-primary flex-shrink-0"}),(0,t.jsx)("span",{className:"font-mono text-sm text-primary truncate min-w-0",children:e.name}),e.result&&(0,t.jsx)("span",{className:"text-xs text-muted-foreground ml-auto flex-shrink-0",children:e.result.durationFormatted})]}),(0,t.jsx)(P,{block:e})]});case"thinking":return(0,t.jsx)("div",{className:"border border-[color:var(--chart-5)]/30 rounded-lg p-3 bg-[color:var(--chart-5)]/5",children:(0,t.jsxs)("details",{children:[(0,t.jsxs)("summary",{className:"flex items-center gap-2 text-xs cursor-pointer hover:text-foreground transition-colors text-[color:var(--chart-5)]",children:[(0,t.jsx)(eh,{className:"w-4 h-4"}),(0,t.jsx)("span",{children:"Thinking"}),(0,t.jsxs)("span",{className:"text-muted-foreground ml-1",children:["(",e.thinking.length.toLocaleString()," chars)"]})]}),(0,t.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 ex({entry:e}){return(0,t.jsx)("div",{children:e.message.content&&(0,t.jsx)("p",{className:"whitespace-pre-wrap text-sm",children:e.message.content})})}let ef=s.default.memo(function({entry:e,allEntries:s,projectName:r,sessionId:a,highlightedUuid:n,autoExpandForUuid:i}){let{content:l}=e.message;return(0,t.jsx)("div",{className:"space-y-3",children:l.map((e,l)=>(0,t.jsx)(ep,{block:e,allEntries:s,projectName:r,sessionId:a,highlightedUuid:n,autoExpandForUuid:i},l))})}),eg=s.default.memo(function({entry:e}){let r=(0,s.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,t.jsxs)("div",{className:"text-sm",children:[(0,t.jsx)("span",{className:"text-muted-foreground",children:r}),(0,t.jsxs)("details",{className:"mt-1",children:[(0,t.jsx)("summary",{className:"text-xs text-muted-foreground cursor-pointer hover:text-foreground transition-colors",children:"Show raw JSON"}),(0,t.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:I(e)})]})]})}),ey=(0,y.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 eb=e.i(55574);function ev({uuid:e}){let r=(0,s.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,eb.toast)("Link copied")},[e]);return(0,t.jsx)("button",{onClick:r,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,t.jsx)(ey,{className:"w-3.5 h-3.5"})})}function ej({block:e,subagentEntries:r,projectName:a,sessionId:n,highlightedUuid:i,autoExpandForUuid:l}){let o=!!(l&&r?.some(e=>e.uuid===l)),[c,d]=(0,s.useState)(o);(0,s.useEffect)(()=>{if(!o)return;let e=requestAnimationFrame(()=>d(!0));return()=>cancelAnimationFrame(e)},[o]);let u=(0,s.useCallback)(()=>{d(e=>!e)},[]),m=r&&r.length>0;return(0,t.jsxs)("div",{className:"border border-border/50 rounded-lg p-3 bg-muted/10",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 mb-2",children:[(0,t.jsx)(S,{className:"w-4 h-4 text-[color:var(--chart-5)]"}),(0,t.jsx)("span",{className:"font-mono text-sm text-[color:var(--chart-5)]",children:"Subagent"}),e.subagentType&&(0,t.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,t.jsx)("span",{className:"text-xs text-muted-foreground ml-auto",children:e.result.durationFormatted})]}),e.subagentDescription&&(0,t.jsx)("p",{className:"text-sm text-muted-foreground mb-2",children:e.subagentDescription}),e.subagentId&&r&&(0,t.jsxs)("button",{onClick:u,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,t.jsx)(E.ChevronRight,{className:(0,O.cn)("w-3 h-3 transition-transform",c&&"rotate-90")}),(0,t.jsxs)("span",{children:["agent-",e.subagentId]}),(0,t.jsx)("span",{className:"text-muted-foreground",children:c?"Collapse":"View subagent log"})]}),c&&(0,t.jsxs)("div",{className:"ml-4 pl-3 border-l-2 border-primary/30 mt-2 space-y-2",children:[r&&0===r.length&&(0,t.jsx)("div",{className:"text-xs text-muted-foreground py-2",children:"No entries found in subagent log."}),m&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(M,{entries:r,compact:!0}),(0,t.jsx)(en,{projectName:a,sessionId:n,agentId:e.subagentId,subagentType:e.subagentType,subagentDescription:e.subagentDescription,compact:!0}),(0,t.jsx)(em,{projectName:a,sessionId:n,agentId:e.subagentId,subagentType:e.subagentType,subagentDescription:e.subagentDescription,compact:!0})]}),r&&r.map(e=>"queue-operation"===e.type?(0,t.jsx)(T,{entry:e},e.uuid||e.timestamp):(0,t.jsx)(ew,{entry:e,projectName:a,sessionId:n,isHighlighted:!!i&&e.uuid===i},e.uuid||e.timestamp))]}),(0,t.jsx)(P,{block:e})]})}function eN({entry:e,allEntries:s,projectName:r,sessionId:a,highlightedUuid:n,autoExpandForUuid:i}){switch(e.type){case"user":return(0,t.jsx)(ex,{entry:e});case"assistant":return(0,t.jsx)(ef,{entry:e,allEntries:s,projectName:r,sessionId:a,highlightedUuid:n,autoExpandForUuid:i});case"file-history-snapshot":case"progress":case"system":return(0,t.jsx)(eg,{entry:e})}}let ew=s.default.memo(function({entry:e,allEntries:s,projectName:r,sessionId:a,isHighlighted:n,highlightedUuid:i,autoExpandForUuid:l}){return(0,t.jsxs)("div",{id:e.uuid?`entry-${e.uuid}`:void 0,className:(0,O.cn)(`group border-l-4 ${z[e.type]} bg-card/50 rounded-r-lg mb-2 hover:bg-muted/30 transition-colors`,n&&"entry-highlighted"),children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 px-4 py-2 border-b border-border/30",children:[(0,t.jsx)(U,{type:e.type}),(0,t.jsxs)("div",{className:"flex items-center gap-1 ml-auto",children:[e.uuid&&(0,t.jsx)(ev,{uuid:e.uuid}),(0,t.jsx)(W.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 I(e);case"queue-operation":return e.label}}(e)}),(0,t.jsx)("span",{className:"text-xs font-mono text-muted-foreground whitespace-nowrap",children:$(e.timestampMs)})]})]}),(0,t.jsx)("div",{className:"px-4 py-3",children:(0,t.jsx)(eN,{entry:e,allEntries:s,projectName:r,sessionId:a,highlightedUuid:i,autoExpandForUuid:l})})]})},(e,t)=>e.entry===t.entry&&e.allEntries===t.allEntries&&e.projectName===t.projectName&&e.sessionId===t.sessionId&&e.isHighlighted===t.isHighlighted&&e.highlightedUuid===t.highlightedUuid&&e.autoExpandForUuid===t.autoExpandForUuid),ek=(0,y.default)("zap",[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]]),eS=(0,y.default)("minus",[["path",{d:"M5 12h14",key:"1ays0h"}]]),eM=(0,K.createServerReference)("782491ea6cc6cddf33f4226e888ba9749c471b2c5b",K.callServer,void 0,K.findSourceMapURL,"checkActionCacheAndList");async function eC(e,t,s,r=!1,a){let n;try{n=await fetch("/api/queue-item",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({type:"action",projectName:e,sessionId:t,itemName:s,forceRefresh:r,...a&&{agentId:a.agentId,subagentType:a.subagentType,subagentDescription:a.subagentDescription}})})}catch(e){return{ok:!1,error:`Network error: ${e instanceof Error?e.message:String(e)}`}}return 202===n.status?{ok:!1,error:"__queued__"}:n.ok?n.json():{ok:!1,error:`Queue request failed: ${n.status}`}}let eE=(0,K.createServerReference)("7c164c9b77804c8d2279d6822723d0daeaa0d78ae3",K.callServer,void 0,K.findSourceMapURL,"invalidateSessionItemCache"),eI=(0,K.createServerReference)("00ab954b6b9925c708b52460906eafea4608be5624",K.callServer,void 0,K.findSourceMapURL,"getQueueStatusAction");function eR({name:e}){return(0,t.jsxs)("div",{className:"flex items-center gap-3 px-3 py-2",children:[(0,t.jsx)("div",{className:"w-4 h-4 rounded-full bg-muted animate-pulse"}),(0,t.jsx)("span",{className:"text-sm font-mono truncate max-w-[200px] text-muted-foreground",children:e}),(0,t.jsx)("span",{className:"text-xs text-muted-foreground",children:"running..."})]})}function e$({name:e,error:s}){return(0,t.jsxs)("div",{className:"flex items-center gap-3 px-3 py-2",children:[(0,t.jsx)(B,{className:"w-4 h-4 text-yellow-500"}),(0,t.jsx)("span",{className:"text-sm font-mono truncate max-w-[200px]",children:e}),(0,t.jsx)("span",{className:"text-xs text-yellow-500 truncate",children:s})]})}function eT({name:e,onRun:s,disabled:r}){return(0,t.jsxs)("div",{className:"flex items-center gap-3 px-3 py-2",children:[(0,t.jsx)(eS,{className:"w-4 h-4 text-muted-foreground"}),(0,t.jsx)("span",{className:"text-sm font-mono truncate max-w-[200px] text-muted-foreground",children:e}),(0,t.jsx)("span",{className:"text-[10px] text-muted-foreground/50",children:"not run"}),(0,t.jsxs)("button",{onClick:s,disabled:r,className:"ml-auto flex-shrink-0 inline-flex items-center gap-1 px-2 py-0.5 text-[11px] font-medium rounded border border-primary/30 bg-primary/10 text-primary hover:bg-primary/20 transition-colors disabled:opacity-50",children:[(0,t.jsx)(C,{className:"w-2.5 h-2.5"}),"Run"]})]})}function eO({result:e,cached:r,onRerun:a,globalLoading:n}){let[i,l]=(0,s.useState)(!1),[o,c]=(0,s.useState)(!1),d=e.output||e.message,u=!!d,m=async t=>{t.stopPropagation(),c(!0);try{await a(e.name)}finally{c(!1)}};if(e.error)return(0,t.jsxs)("div",{className:"flex items-center gap-3 px-3 py-2",children:[(0,t.jsx)(B,{className:"w-4 h-4 text-yellow-500"}),(0,t.jsx)("span",{className:"text-sm font-mono truncate max-w-[200px]",children:e.name}),(0,t.jsx)("span",{className:"text-xs text-yellow-500 truncate",title:e.error,children:e.error}),(0,t.jsx)("button",{onClick:m,disabled:o||n,className:"ml-auto flex-shrink-0 p-1 rounded hover:bg-muted/50 transition-colors disabled:opacity-50",title:"Re-run this action","aria-label":`Re-run action ${e.name}`,children:(0,t.jsx)(Q.RefreshCw,{className:`w-3.5 h-3.5 text-muted-foreground ${o?"animate-spin":""}`})})]});let h="success"===e.status?(0,t.jsx)(H,{className:"w-4 h-4 text-green-500"}):(0,t.jsx)(V.XCircle,{className:"w-4 h-4 text-red-500"}),p=`action-result-${e.name}`;return(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"flex items-center gap-3 px-3 py-2 rounded-md hover:bg-muted/30 transition-colors",children:[u&&(0,t.jsx)("button",{onClick:()=>l(e=>!e),"aria-expanded":i,"aria-controls":p,className:"flex-shrink-0 p-0 bg-transparent border-none cursor-pointer","aria-label":`Toggle details for ${e.name}`,children:(0,t.jsx)(E.ChevronRight,{className:`w-3.5 h-3.5 text-muted-foreground transition-transform ${i?"rotate-90":""}`})}),h,(0,t.jsx)("span",{className:"text-sm font-mono truncate max-w-[200px]",children:e.name}),(0,t.jsxs)("span",{className:"text-xs text-muted-foreground",children:[e.durationMs,"ms"]}),r&&(0,t.jsx)("span",{className:"text-[10px] font-medium text-muted-foreground/70 bg-muted px-1 py-0.5 rounded",children:"cached"}),e.message&&(0,t.jsx)("span",{className:"text-xs text-muted-foreground flex-1 truncate min-w-0",children:e.message}),(0,t.jsx)("button",{onClick:m,disabled:o||n,className:"ml-auto flex-shrink-0 p-1 rounded hover:bg-muted/50 transition-colors disabled:opacity-50",title:"Re-run this action","aria-label":`Re-run action ${e.name}`,children:(0,t.jsx)(Q.RefreshCw,{className:`w-3.5 h-3.5 text-muted-foreground ${o?"animate-spin":""}`})})]}),i&&d&&(0,t.jsxs)("div",{id:p,className:"ml-10 mr-3 mb-2 relative group",children:[(0,t.jsx)("div",{className:"absolute top-1 right-1 opacity-0 group-hover:opacity-100 transition-opacity",children:(0,t.jsx)(W.CopyButton,{text:d})}),(0,t.jsx)("div",{className:"p-2 pr-8 bg-muted/50 rounded text-xs whitespace-pre-wrap break-words select-text",children:d})]})]})}function eA({projectName:e,sessionId:r,agentId:a,subagentType:n,subagentDescription:i,compact:l}){let[o,c]=(0,s.useState)([]),[d,u]=(0,s.useState)(!0),[m,h]=(0,s.useState)(!1),[p,x]=(0,s.useState)(!1),[f,y]=(0,s.useState)(!1),[b,v]=(0,s.useState)(null),[j,N]=(0,s.useState)(!0),w=(0,s.useRef)(0);(0,s.useEffect)(()=>{let t=++w.current;return u(!0),v(null),h(!1),c([]),eM(e,r,a,n).then(async s=>{if(t!==w.current)return;if(!s.ok){v(s.error),u(!1);return}if(!s.hasActions){h(!0),u(!1);return}let n=new Set;if(s.uncachedNames.length>0)try{let s=await eI();if(t!==w.current)return;let i=a?`${r}/agent-${a}`:r;for(let t of[...s.pending,...s.processing])"action"===t.type&&t.projectName===e&&t.sessionId===i&&n.add(t.itemName)}catch{}c(s.names.map(e=>{let t=s.cachedResults.find(t=>t.name===e);return t?{status:"done",name:e,result:t,cached:!0}:n.has(e)?{status:"loading",name:e}:{status:"idle",name:e}})),x(0===s.uncachedNames.length),u(!1)}).catch(e=>{t===w.current&&(v(e instanceof Error?e.message:"Failed to load actions"),u(!1))}),()=>{}},[e,r,a,n]),(0,s.useEffect)(()=>{if(0===o.filter(e=>"loading"===e.status).map(e=>e.name).length)return;let t=!1,s=setInterval(async()=>{try{let s=await eM(e,r,a,n);if(t||!s.ok||!s.hasActions)return;c(e=>{let t=!1,r=e.map(e=>{if("loading"!==e.status)return e;let r=s.cachedResults.find(t=>t.name===e.name);return r?(t=!0,{status:"done",name:e.name,result:r,cached:!1}):e});return t?r:e})}catch{}},3e3);return()=>{t=!0,clearInterval(s)}},[o,e,r,a,n]);let k=(0,s.useCallback)(async(t,s=!1)=>{let l=w.current;c(e=>e.map(e=>e.name===t?{status:"loading",name:t}:e));let o=a?{agentId:a,subagentType:n,subagentDescription:i}:void 0;try{s&&await eE("actions",e,r,t,a).catch(e=>console.error("Failed to invalidate action cache:",e));let n=await eC(e,r,t,s,o);if(l!==w.current||!n.ok&&"__queued__"===n.error)return;n.ok?c(e=>e.map(e=>e.name===t?{status:"done",name:t,result:n.result,cached:!1}:e)):c(e=>e.map(e=>e.name===t?{status:"error",name:t,error:n.error}:e))}catch(e){if(l!==w.current)return;c(s=>s.map(s=>s.name===t?{status:"error",name:t,error:e instanceof Error?e.message:"Failed"}:s))}},[e,r,a,n,i]),S=(0,s.useCallback)(async e=>{x(!1),await k(e,!0)},[k]),M=(0,s.useCallback)(async()=>{let t=w.current;y(!0);let s=o.map(e=>e.name);c(e=>e.map(e=>({status:"loading",name:e.name})));let l=a?{agentId:a,subagentType:n,subagentDescription:i}:void 0;try{try{await Z("actions",e,r,a)}catch(e){console.error("Failed to invalidate action caches:",e)}await Promise.all(s.map(async s=>{try{let a=await eC(e,r,s,!0,l);if(t!==w.current||!a.ok&&"__queued__"===a.error)return;a.ok?c(e=>e.map(e=>e.name===s?{status:"done",name:s,result:a.result,cached:!1}:e)):c(e=>e.map(e=>e.name===s?{status:"error",name:s,error:a.error}:e))}catch(e){if(t!==w.current)return;c(t=>t.map(t=>t.name===s?{status:"error",name:s,error:e instanceof Error?e.message:"Failed"}:t))}})),t===w.current&&x(!1)}finally{t===w.current&&y(!1)}},[e,r,a,n,i,o]),E=o.filter(e=>"done"===e.status),I=o.filter(e=>"loading"===e.status).length,R=o.filter(e=>"idle"===e.status).length,$=E.filter(e=>"error"===e.result.status||!!e.result.error).length+o.filter(e=>"error"===e.status).length,T=E.filter(e=>"success"===e.result.status&&!e.result.error).length,O=d||I>0||f;if(m)return null;let A=l?"p-2.5":"p-4",_=l?"text-xs":"text-sm";if(d)return(0,t.jsx)("div",{className:`bg-card border border-border rounded-lg ${A}`,children:(0,t.jsxs)("div",{className:`flex items-center gap-2 ${_} text-muted-foreground`,children:[(0,t.jsx)(Q.RefreshCw,{className:"w-4 h-4 animate-spin"}),"Loading actions..."]})});if(b&&0===o.length)return(0,t.jsx)("div",{className:`bg-card border border-border rounded-lg ${A}`,children:(0,t.jsxs)("div",{className:`flex items-center gap-2 ${_} text-destructive`,children:[(0,t.jsx)(B,{className:"w-4 h-4"}),b]})});if(0===o.length)return null;let z=o.filter(e=>!("done"===e.status&&e.result.skipped)),F=o.filter(e=>"done"===e.status&&e.result.skipped).length;return(0,t.jsxs)("div",{className:`bg-card border border-border rounded-lg ${A} ${j?"":"space-y-3"}`,children:[(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsxs)("button",{onClick:()=>N(e=>!e),"aria-expanded":!j,"aria-controls":"action-results-content",className:"flex items-center gap-2 hover:opacity-80 transition-opacity",children:[(0,t.jsx)(g.ChevronDown,{className:`w-4 h-4 text-muted-foreground transition-transform ${j?"-rotate-90":""}`}),(0,t.jsx)(ek,{className:"w-4 h-4 text-primary"}),(0,t.jsx)("span",{className:"text-sm font-medium",children:"Actions"})]}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[T>0&&(0,t.jsxs)("div",{className:"flex items-center gap-1 text-xs text-green-500",children:[(0,t.jsx)(H,{className:"w-3.5 h-3.5"}),(0,t.jsx)("span",{children:T})]}),$>0&&(0,t.jsxs)("div",{className:"flex items-center gap-1 text-xs text-yellow-500",children:[(0,t.jsx)(B,{className:"w-3.5 h-3.5"}),(0,t.jsxs)("span",{children:[$," errored"]})]}),R>0&&!O&&(0,t.jsxs)("span",{className:"text-[10px] text-muted-foreground/50",children:[R," pending"]}),I>0&&(0,t.jsxs)("div",{className:"flex items-center gap-1 text-xs text-muted-foreground",children:[(0,t.jsx)(Q.RefreshCw,{className:"w-3.5 h-3.5 animate-spin"}),(0,t.jsxs)("span",{children:[I," running..."]})]}),F>0&&!O&&(0,t.jsxs)("span",{className:"text-[10px] font-medium text-muted-foreground/50 bg-muted px-1.5 py-0.5 rounded",children:[F," skipped"]}),p&&!O&&(0,t.jsx)("span",{className:"text-[10px] font-medium text-muted-foreground/70 bg-muted px-1.5 py-0.5 rounded",children:"cached"}),(0,t.jsxs)("button",{onClick:()=>M(),disabled:O,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 disabled:opacity-50",children:[f?(0,t.jsx)(Q.RefreshCw,{className:"w-3 h-3 animate-spin"}):(0,t.jsx)(C,{className:"w-3 h-3"}),f?"Running...":"Run All"]})]})]}),!j&&(0,t.jsx)("div",{id:"action-results-content",className:"divide-y divide-border/50",children:z.map(e=>"idle"===e.status?(0,t.jsx)(eT,{name:e.name,onRun:()=>k(e.name,!0),disabled:O},e.name):"loading"===e.status?(0,t.jsx)(eR,{name:e.name},e.name):"error"===e.status?(0,t.jsx)(e$,{name:e.name,error:e.error},e.name):(0,t.jsx)(eO,{result:e.result,cached:e.cached,onRerun:S,globalLoading:f},e.name))})]})}function e_(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 ez({tools:e,compact:s}){return(0,t.jsx)("div",{className:`bg-card border border-border rounded-lg ${s?"p-3":"p-4"}`,children:(0,t.jsx)("div",{className:`grid grid-cols-[repeat(auto-fit,minmax(200px,1fr))] ${s?"gap-2":"gap-3"}`,children:e.map(e=>(0,t.jsxs)("div",{className:"flex items-center gap-2 min-w-0",children:[(0,t.jsx)(b,{className:"w-3.5 h-3.5 text-muted-foreground flex-shrink-0"}),(0,t.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,t.jsx)("div",{className:`${s?"text-xs":"text-sm"} font-mono font-medium truncate`,children:e.name}),(0,t.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 eF(e){return`${e.uuid}-${e.timestampMs}`}function eD(){let e=window.location.hash;return e.startsWith("#entry-")?e.slice(7):null}function eq({entries:e,allEntries:a,projectName:n,sessionId:i}){let[l,o]=(0,s.useState)(new Set),[d,m]=(0,s.useState)(0),[x,g]=(0,s.useState)(()=>eD()),y=(0,s.useRef)(void 0),b=(0,s.useRef)(!1),v=(0,s.useCallback)(e=>{e&&m(e.offsetTop)},[]),j=(0,s.useMemo)(()=>(function(e){let t=new Map,s=null,r=0;for(let a of e)"queue-operation"===a.type?(null!==s&&t.set(s,r),s=eF(a),r=0):null!==s&&r++;return null!==s&&t.set(s,r),t})(e),[e]),N=(0,s.useMemo)(()=>{let t;return t=!1,e.filter(e=>"queue-operation"===e.type?(t=l.has(eF(e)),!0):!t)},[e,l]),w=(0,s.useMemo)(()=>{let e=new Map;return N.forEach((t,s)=>{t.uuid&&e.set(t.uuid,s)}),e},[N]),k=(0,s.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),a=t.get(e);a&&s.set(r.uuid,a)}return s})(a),[a]),S=(0,s.useMemo)(()=>x&&k.has(x)?x:null,[x,k]),M=S?k.get(S)??null:null;(0,s.useEffect)(()=>{if(x)return y.current=setTimeout(()=>g(null),4e3),()=>{y.current&&clearTimeout(y.current)}},[]),(0,s.useEffect)(()=>{let e=()=>{let e=eD();g(e),b.current=!1,y.current&&clearTimeout(y.current),e&&(y.current=setTimeout(()=>g(null),4e3))};return window.addEventListener("hashchange",e),()=>window.removeEventListener("hashchange",e)},[]);let C=(0,s.useMemo)(()=>{if(!x)return null;let t=M??x,s=e.some(e=>e.uuid===t),r=w.has(t);if(s&&!r){let s=null;for(let r of e)if("queue-operation"===r.type)s=eF(r);else if(r.uuid===t&&s)return s}return null},[x,M,e,w]);(0,s.useEffect)(()=>{if(!C)return;let e=requestAnimationFrame(()=>{o(e=>{if(!e.has(C))return e;let t=new Set(e);return t.delete(C),t})});return()=>cancelAnimationFrame(e)},[C]);let E=(0,s.useCallback)(e=>{o(t=>{let s=new Set(t);return s.has(e)?s.delete(e):s.add(e),s})},[]),I=function({useFlushSync:e=!0,...t}){let a=s.useReducer(()=>({}),{})[1],n={...t,onChange:(s,n)=>{var i;e&&n?(0,r.flushSync)(a):a(),null==(i=t.onChange)||i.call(t,s,n)}},[i]=s.useState(()=>new p(n));return i.setOptions(n),f(()=>i._didMount(),[]),f(()=>i._willUpdate()),i}({getScrollElement:()=>"u">typeof document?window:null,observeElementRect:c,observeElementOffset:u,scrollToFn:h,initialOffset:()=>"u">typeof document?window.scrollY:0,...{count:N.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}})(N[e]),overscan:5,scrollMargin:d}});return(0,s.useEffect)(()=>{if(!x||b.current)return;let e=M??x,t=w.get(e);null!=t&&(b.current=!0,requestAnimationFrame(()=>{I.scrollToIndex(t,{align:"center"})}))},[x,M,w,I]),(0,t.jsx)("div",{ref:v,children:(0,t.jsx)("div",{style:{height:`${I.getTotalSize()}px`,width:"100%",position:"relative"},children:I.getVirtualItems().map(e=>{let s=N[e.index],r=!!x&&s.uuid===(M??x);return(0,t.jsx)("div",{"data-index":e.index,ref:I.measureElement,style:{position:"absolute",top:0,left:0,width:"100%",transform:`translateY(${e.start-I.options.scrollMargin}px)`},children:"queue-operation"===s.type?(0,t.jsx)(T,{entry:s,isCollapsed:l.has(eF(s)),entryCount:j.get(eF(s))??0,onToggle:()=>E(eF(s))}):(0,t.jsx)(ew,{entry:s,allEntries:a,projectName:n,sessionId:i,isHighlighted:!S&&r,highlightedUuid:S,autoExpandForUuid:S})},"queue-operation"===s.type?eF(s):s.uuid||s.timestamp)})})})}function eL({entries:e,projectName:r,sessionId:a}){let n=(0,s.useMemo)(()=>e.filter(e=>"session"===e._source),[e]),i=(0,s.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]),l=(0,s.useMemo)(()=>{let t=new Map;for(let s of i){let r=`agent-${s.id}`;t.set(s.id,e.filter(e=>e._source===r))}return t},[e,i]),o=(0,s.useMemo)(()=>e_(n),[n]),[c,d]=(0,s.useState)(!1),[u,m]=(0,s.useState)(new Set),[h,p]=(0,s.useState)(!1);(0,s.useEffect)(()=>{let e=()=>{window.location.hash.startsWith("#entry-")&&p(!1)};return window.addEventListener("hashchange",e),()=>window.removeEventListener("hashchange",e)},[]);let x=(0,s.useCallback)(e=>{m(t=>{let s=new Set(t);return s.has(e)?s.delete(e):s.add(e),s})},[]);return(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsx)(M,{entries:n}),(0,t.jsx)(en,{projectName:r,sessionId:a}),(0,t.jsx)(em,{projectName:r,sessionId:a}),(0,t.jsx)(eA,{projectName:r,sessionId:a}),i.length>0&&(0,t.jsxs)("div",{className:"space-y-3",children:[(0,t.jsxs)("button",{onClick:()=>d(e=>!e),className:"flex items-center gap-2 hover:opacity-80 transition-opacity",children:[(0,t.jsx)(g.ChevronDown,{className:`w-4 h-4 text-muted-foreground transition-transform ${c?"-rotate-90":""}`}),(0,t.jsx)("span",{className:"text-sm font-semibold text-muted-foreground uppercase tracking-wide",children:"Subagents"}),(0,t.jsxs)("span",{className:"text-xs text-muted-foreground",children:["(",i.length,")"]})]}),!c&&i.map(e=>{let s;return(0,t.jsxs)("div",{className:"pl-3 border-l-2 border-primary/30 space-y-2",children:[(0,t.jsxs)("button",{onClick:()=>x(e.id),className:"flex items-center gap-2 hover:opacity-80 transition-opacity",children:[(0,t.jsx)(g.ChevronDown,{className:`w-3.5 h-3.5 text-muted-foreground transition-transform ${u.has(e.id)?"-rotate-90":""}`}),(0,t.jsx)("span",{className:"text-sm font-bold",children:e.type}),e.description&&(0,t.jsx)("span",{className:"text-xs text-muted-foreground truncate max-w-[400px]",children:e.description})]}),!u.has(e.id)&&(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(M,{entries:l.get(e.id)||[],compact:!0}),(0,t.jsx)(en,{projectName:r,sessionId:a,agentId:e.id,subagentType:e.type,subagentDescription:e.description,compact:!0}),(0,t.jsx)(em,{projectName:r,sessionId:a,agentId:e.id,subagentType:e.type,subagentDescription:e.description,compact:!0}),(0,t.jsx)(eA,{projectName:r,sessionId:a,agentId:e.id,subagentType:e.type,subagentDescription:e.description,compact:!0}),(s=e_(l.get(e.id)||[])).length>0?(0,t.jsx)(ez,{tools:s,compact:!0}):null]})]},e.id)})]}),o.length>0&&(0,t.jsxs)("div",{className:"space-y-3",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("span",{className:"text-sm font-semibold text-muted-foreground uppercase tracking-wide",children:"Tools"}),(0,t.jsxs)("span",{className:"text-xs text-muted-foreground",children:["(",o.reduce((e,t)=>e+t.count,0),")"]})]}),(0,t.jsx)(ez,{tools:o})]}),(0,t.jsxs)("div",{children:[(0,t.jsxs)("button",{onClick:()=>p(e=>!e),className:"flex items-center gap-2 hover:opacity-80 transition-opacity",children:[(0,t.jsx)(g.ChevronDown,{className:`w-4 h-4 text-muted-foreground transition-transform ${h?"-rotate-90":""}`}),(0,t.jsx)("span",{className:"text-sm font-semibold text-muted-foreground uppercase tracking-wide",children:"Logs"})]}),!h&&(0,t.jsx)("div",{className:"mt-2 bg-card border border-border rounded-lg p-4 shadow-sm",children:0===n.length?(0,t.jsx)("p",{className:"text-muted-foreground text-center py-8",children:"No entries found."}):(0,t.jsx)(eq,{entries:n,allEntries:e,projectName:r,sessionId:a})})]})]})}e.s([],76248),e.i(76248),e.s(["default",()=>eL],36406)},5780,e=>{e.n(e.i(36406))}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,24380,e=>{"use strict";var t=e.i(43476),r=e.i(71645),n=e.i(75254);let o=(0,n.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"}]]),l=(0,n.default)("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);var a=e.i(47163);function i(e){let t=document.createElement("textarea");t.value=e,t.style.position="fixed",t.style.opacity="0",document.body.appendChild(t);try{return t.select(),document.execCommand("copy")}finally{document.body.removeChild(t)}}function u({text:e,className:n}){let[u,
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,24380,e=>{"use strict";var t=e.i(43476),r=e.i(71645),n=e.i(75254);let o=(0,n.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"}]]),l=(0,n.default)("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);var a=e.i(47163);function i(e){let t=document.createElement("textarea");t.value=e,t.style.position="fixed",t.style.opacity="0",document.body.appendChild(t);try{return t.select(),document.execCommand("copy")}finally{document.body.removeChild(t)}}function u({text:e,className:n}){let[u,s]=(0,r.useState)(!1),d=(0,r.useCallback)(async()=>{try{if(navigator.clipboard?.writeText)await navigator.clipboard.writeText(e);else if(!i(e))throw Error("Both clipboard methods failed");s(!0),setTimeout(()=>s(!1),2e3)}catch(t){console.error("Failed to copy to clipboard:",t);try{i(e)&&(s(!0),setTimeout(()=>s(!1),2e3))}catch{}}},[e]);return(0,t.jsx)("button",{onClick:d,title:"Copy to clipboard",className:(0,a.cn)("inline-flex items-center justify-center rounded p-1 text-muted-foreground hover:text-foreground hover:bg-muted/80 transition-colors",n),children:u?(0,t.jsx)(l,{className:"w-3.5 h-3.5 text-green-500"}):(0,t.jsx)(o,{className:"w-3.5 h-3.5"})})}e.s(["CopyButton",()=>u],24380)},67585,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"BailoutToCSR",{enumerable:!0,get:function(){return o}});let n=e.r(32061);function o({reason:e,children:t}){if("u"<typeof window)throw Object.defineProperty(new n.BailoutToCSRError(e),"__NEXT_ERROR_CODE",{value:"E394",enumerable:!1,configurable:!0});return t}},9885,(e,t,r)=>{"use strict";function n(e){return e.split("/").map(e=>encodeURIComponent(e)).join("/")}Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"encodeURIPath",{enumerable:!0,get:function(){return n}})},52157,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"PreloadChunks",{enumerable:!0,get:function(){return u}});let n=e.r(43476),o=e.r(74080),l=e.r(63599),a=e.r(9885),i=e.r(43369);function u({moduleIds:e}){if("u">typeof window)return null;let t=l.workAsyncStorage.getStore();if(void 0===t)return null;let r=[];if(t.reactLoadableManifest&&e){let n=t.reactLoadableManifest;for(let t of e){if(!n[t])continue;let e=n[t].files;r.push(...e)}}if(0===r.length)return null;let u=(0,i.getDeploymentIdQueryOrEmptyString)();return(0,n.jsx)(n.Fragment,{children:r.map(e=>{let r=`${t.assetPrefix}/_next/${(0,a.encodeURIPath)(e)}${u}`;return e.endsWith(".css")?(0,n.jsx)("link",{precedence:"dynamic",href:r,rel:"stylesheet",as:"style",nonce:t.nonce},e):((0,o.preload)(r,{as:"script",fetchPriority:"low",nonce:t.nonce}),null)})})}},69093,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"default",{enumerable:!0,get:function(){return s}});let n=e.r(43476),o=e.r(71645),l=e.r(67585),a=e.r(52157);function i(e){return{default:e&&"default"in e?e.default:e}}let u={loader:()=>Promise.resolve(i(()=>null)),loading:null,ssr:!0},s=function(e){let t={...u,...e},r=(0,o.lazy)(()=>t.loader().then(i)),s=t.loading;function d(e){let i=s?(0,n.jsx)(s,{isLoading:!0,pastDelay:!0,error:null}):null,u=!t.ssr||!!t.loading,d=u?o.Suspense:o.Fragment,c=t.ssr?(0,n.jsxs)(n.Fragment,{children:["u"<typeof window?(0,n.jsx)(a.PreloadChunks,{moduleIds:t.modules}):null,(0,n.jsx)(r,{...e})]}):(0,n.jsx)(l.BailoutToCSR,{reason:"next/dynamic",children:(0,n.jsx)(r,{...e})});return(0,n.jsx)(d,{...u?{fallback:i}:{},children:c})}return d.displayName="LoadableComponent",d}},70703,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"default",{enumerable:!0,get:function(){return o}});let n=e.r(55682)._(e.r(69093));function o(e,t){let r={};"function"==typeof e&&(r.loader=e);let o={...r,...t};return(0,n.default)({...o,modules:o.loadableGenerated?.modules})}("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},69186,e=>{"use strict";var t=e.i(43476);let r=(0,e.i(70703).default)(()=>e.A(79348),{loadableGenerated:{modules:[5780]},ssr:!1,loading:()=>(0,t.jsx)("div",{className:"bg-card border border-border rounded-lg p-4 shadow-sm",children:(0,t.jsx)("div",{className:"flex items-center justify-center py-16",children:(0,t.jsx)("div",{className:"animate-pulse text-muted-foreground",children:"Loading log viewer..."})})})});function n({entries:e,projectName:n,sessionId:o}){return(0,t.jsx)(r,{entries:e,projectName:n,sessionId:o})}e.s(["default",()=>n])},79348,e=>{e.v(t=>Promise.all(["static/chunks/97c295191089a1c2.js","static/chunks/5ae59224724682dc.js"].map(t=>e.l(t))).then(()=>t(5780)))}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,89954,e=>{"use strict";var r=e.i(43476),o=e.i(71645),t=e.i(18566),s=e.i(95187);let d=(0,s.createServerReference)("
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,89954,e=>{"use strict";var r=e.i(43476),o=e.i(71645),t=e.i(18566),s=e.i(95187);let d=(0,s.createServerReference)("4042e6f3c27fe2b8c648b50c1ba7efcf91ed4ce164",s.callServer,void 0,s.findSourceMapURL,"login");var a=e.i(15127),n=e.i(22016);function i(){let e=(0,t.useSearchParams)(),s=(0,t.useRouter)(),i=e.get("from")??"/",[l,c]=(0,o.useState)(null),[u,m]=(0,o.useState)(!1);async function x(e){e.preventDefault(),c(null),m(!0);let r=new FormData(e.currentTarget);r.set("redirectTo",i);let o=await d(r);o?.error?(c(o.error),m(!1)):o?.redirectTo&&s.push(o.redirectTo)}return(0,r.jsx)("div",{className:"min-h-screen flex items-center justify-center bg-background px-4",children:(0,r.jsxs)("div",{className:"w-full max-w-sm rounded-lg border border-border bg-card p-8 shadow-lg",children:[(0,r.jsxs)("div",{className:"flex flex-col items-center gap-2 mb-6",children:[(0,r.jsx)(n.default,{href:"/",children:(0,r.jsx)(a.Logo,{width:36,height:36})}),(0,r.jsx)("h2",{className:"text-xl font-semibold text-foreground",children:"Sign in to Claudeye"}),(0,r.jsx)("p",{className:"text-sm text-muted-foreground",children:"Enter your credentials to continue"})]}),(0,r.jsxs)("form",{onSubmit:x,className:"flex flex-col gap-4",children:[(0,r.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,r.jsx)("label",{htmlFor:"username",className:"text-sm font-medium text-foreground",children:"Username"}),(0,r.jsx)("input",{id:"username",name:"username",type:"text",required:!0,autoComplete:"username",autoFocus:!0,className:"rounded-md border border-border bg-background px-3 py-2 text-sm text-foreground placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-primary/50 focus:border-primary",placeholder:"admin"})]}),(0,r.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,r.jsx)("label",{htmlFor:"password",className:"text-sm font-medium text-foreground",children:"Password"}),(0,r.jsx)("input",{id:"password",name:"password",type:"password",required:!0,autoComplete:"current-password",className:"rounded-md border border-border bg-background px-3 py-2 text-sm text-foreground placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-primary/50 focus:border-primary"})]}),l&&(0,r.jsx)("p",{className:"text-sm text-red-500 bg-red-500/10 rounded-md px-3 py-2",children:l}),(0,r.jsx)("button",{type:"submit",disabled:u,className:"mt-1 rounded-md bg-primary px-4 py-2 text-sm font-medium text-primary-foreground hover:bg-primary/90 focus:outline-none focus:ring-2 focus:ring-primary/50 disabled:opacity-50 disabled:cursor-not-allowed transition-colors",children:u?"Signing in...":"Sign in"})]})]})})}e.s(["default",()=>i],89954)}]);
|