@claudeye/linux-arm64 1.0.6-beta.3 → 1.0.6-beta.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/standalone/.next/BUILD_ID +1 -1
- package/assets/standalone/.next/build-manifest.json +3 -3
- package/assets/standalone/.next/prerender-manifest.json +3 -3
- package/assets/standalone/.next/server/app/_global-error.html +1 -1
- 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 +2 -2
- 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 +15 -15
- package/assets/standalone/.next/server/app/_not-found.segments/_full.segment.rsc +15 -15
- package/assets/standalone/.next/server/app/_not-found.segments/_head.segment.rsc +4 -4
- package/assets/standalone/.next/server/app/_not-found.segments/_index.segment.rsc +10 -10
- package/assets/standalone/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +2 -2
- package/assets/standalone/.next/server/app/_not-found.segments/_not-found.segment.rsc +3 -3
- package/assets/standalone/.next/server/app/_not-found.segments/_tree.segment.rsc +1 -1
- package/assets/standalone/.next/server/app/dashboard/[viewName]/page/server-reference-manifest.json +5 -5
- 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 +5 -5
- package/assets/standalone/.next/server/app/dashboard/page_client-reference-manifest.js +1 -1
- package/assets/standalone/.next/server/app/hooks/page/server-reference-manifest.json +4 -4
- package/assets/standalone/.next/server/app/hooks/page_client-reference-manifest.js +1 -1
- package/assets/standalone/.next/server/app/login/page/server-reference-manifest.json +3 -3
- 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 +18 -18
- package/assets/standalone/.next/server/app/login.segments/_full.segment.rsc +18 -18
- package/assets/standalone/.next/server/app/login.segments/_head.segment.rsc +4 -4
- package/assets/standalone/.next/server/app/login.segments/_index.segment.rsc +10 -10
- 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 +4 -4
- package/assets/standalone/.next/server/app/login.segments/login.segment.rsc +3 -3
- package/assets/standalone/.next/server/app/page/server-reference-manifest.json +2 -2
- 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 +2 -2
- 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 +9 -9
- 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 +4 -4
- package/assets/standalone/.next/server/app/queue/page_client-reference-manifest.js +1 -1
- package/assets/standalone/.next/server/chunks/[root-of-the-server]__0_03u6.._.js +2 -2
- package/assets/standalone/.next/server/chunks/[root-of-the-server]__0f_5ws6._.js +1 -1
- package/assets/standalone/.next/server/chunks/[root-of-the-server]__0g72weg._.js +1 -1
- package/assets/standalone/.next/server/chunks/_0aylu-q._.js +1 -1
- package/assets/standalone/.next/server/chunks/_0lq2_wn._.js +1 -1
- package/assets/standalone/.next/server/chunks/_0oqawqx._.js +1 -1
- package/assets/standalone/.next/server/chunks/_0vt409y._.js +1 -1
- package/assets/standalone/.next/server/chunks/node_modules_next_124cnn1._.js +1 -1
- package/assets/standalone/.next/server/chunks/node_modules_next_dist_esm_build_templates_app-route_0l15kkr.js +1 -1
- package/assets/standalone/.next/server/chunks/node_modules_posthog-node_dist_entrypoints_index_node_mjs_05pz9._._.js +1 -1
- package/assets/standalone/.next/server/chunks/package_json_[json]_cjs_0z7w.hh._.js +1 -1
- package/assets/standalone/.next/server/chunks/ssr/[root-of-the-server]__00r7mh3._.js +1 -1
- package/assets/standalone/.next/server/chunks/ssr/[root-of-the-server]__02x4-91._.js +1 -1
- package/assets/standalone/.next/server/chunks/ssr/[root-of-the-server]__06tqxbp._.js +1 -1
- package/assets/standalone/.next/server/chunks/ssr/[root-of-the-server]__0dsucx_._.js +1 -1
- package/assets/standalone/.next/server/chunks/ssr/[root-of-the-server]__0e9ohz2._.js +1 -1
- package/assets/standalone/.next/server/chunks/ssr/[root-of-the-server]__0fiobs_._.js +1 -1
- package/assets/standalone/.next/server/chunks/ssr/[root-of-the-server]__0fltiz1._.js +1 -1
- package/assets/standalone/.next/server/chunks/ssr/[root-of-the-server]__0ni-as.._.js +1 -1
- package/assets/standalone/.next/server/chunks/ssr/[root-of-the-server]__10_wjge._.js +1 -1
- package/assets/standalone/.next/server/chunks/ssr/_03l0_j6._.js +1 -1
- package/assets/standalone/.next/server/chunks/ssr/_050qnuh._.js +1 -1
- package/assets/standalone/.next/server/chunks/ssr/_0_~1-jh._.js +1 -1
- package/assets/standalone/.next/server/chunks/ssr/_0kfjwwu._.js +1 -1
- package/assets/standalone/.next/server/chunks/ssr/_0ndt7tj._.js +1 -1
- package/assets/standalone/.next/server/chunks/ssr/_0uig1kl._.js +1 -1
- package/assets/standalone/.next/server/chunks/ssr/app_actions_compute-dashboard_ts_13cb_9d._.js +1 -1
- package/assets/standalone/.next/server/chunks/ssr/app_hooks_hooks-client_tsx_0n~.yoz._.js +1 -1
- package/assets/standalone/.next/server/chunks/ssr/app_login_page_tsx_0z71ad3._.js +1 -1
- package/assets/standalone/.next/server/chunks/ssr/app_queue_queue-client_tsx_0c0olxv._.js +1 -1
- package/assets/standalone/.next/server/middleware-build-manifest.js +3 -3
- package/assets/standalone/.next/server/pages/404.html +2 -2
- package/assets/standalone/.next/server/pages/500.html +1 -1
- package/assets/standalone/.next/server/server-reference-manifest.js +1 -1
- package/assets/standalone/.next/server/server-reference-manifest.json +18 -18
- package/assets/standalone/.next/static/chunks/{0w4fkpbblw1m1.js → 08-m031knjk.2.js} +1 -1
- package/assets/standalone/.next/static/chunks/{02~go45pkw5bo.js → 0oemft0-s7nqv.js} +1 -1
- package/assets/standalone/.next/static/chunks/{109q--.n6spry.js → 0p1vxt.2i3k6h.js} +1 -1
- package/assets/standalone/.next/static/chunks/{05r2p.4v0jimg.js → 0s_luev559g4b.js} +1 -1
- package/assets/standalone/.next/static/chunks/{0zv.iq7kr3fdm.js → 0tyqntivqkiwt.js} +1 -1
- package/assets/standalone/.next/static/chunks/{0h2j4fh8jhvjm.js → 11nb_~r_eojyk.js} +1 -1
- package/assets/standalone/.next/static/chunks/{0kicmwe~c~kye.js → 15n7f_2h_nvad.js} +1 -1
- package/assets/standalone/package.json +1 -1
- package/bin/claudeye +0 -0
- package/package.json +1 -1
- /package/assets/standalone/.next/static/{G1y0JaxqBjyBl5RAfaV_d → B9luWx1Z31ygILxMA8k6o}/_buildManifest.js +0 -0
- /package/assets/standalone/.next/static/{G1y0JaxqBjyBl5RAfaV_d → B9luWx1Z31ygILxMA8k6o}/_clientMiddlewareManifest.js +0 -0
- /package/assets/standalone/.next/static/{G1y0JaxqBjyBl5RAfaV_d → B9luWx1Z31ygILxMA8k6o}/_ssgManifest.js +0 -0
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
module.exports=[50871,61542,a=>{"use strict";async function b(a,b,c){let d=[],e=performance.now(),f=globalThis.__CLAUDEYE_CONDITION_REGISTRY__??null,g=!1;if(f)try{await f(b)||(g=!0)}catch{g=!0}if(g)for(let b of a)d.push(c.skipResult(b));else{let e=a.map(async a=>{if(a.condition)try{if(!await a.condition(b))return c.skipResult(a)}catch(b){return c.errorResult(a,`Condition error: ${b instanceof Error?b.message:String(b)}`,0)}let d=performance.now();try{let e=await a.fn(b),f=Math.round(performance.now()-d);return c.successResult(a,e,f)}catch(e){let b=Math.round(performance.now()-d);return c.errorResult(a,e instanceof Error?e.message:String(e),b)}});for(let a of(await Promise.allSettled(e)))d.push("fulfilled"===a.status?a.value:c.unexpectedResult())}let h=Math.round(performance.now()-e);return c.buildSummary(d,h)}a.s(["runAll",0,b],50871);var c=a.i(92246);a.s(["calculateLogStats",0,function(a){let b=0,d=0,e=0,f=0,g=0,h=new Set;for(let c of a)if("user"===c.type&&b++,"queue-operation"===c.type&&g++,"assistant"===c.type){for(let a of(d++,c.message.content))"tool_use"===a.type&&("Task"===a.name&&(a.subagentType||a.subagentId)?f++:e++);c.message.model&&h.add(c.message.model)}let i="";if(a.length>=2){let b=a[a.length-1].timestampMs-a[0].timestampMs;i=(0,c.formatDuration)(b)}return{turnCount:g,userCount:b,assistantCount:d,toolCallCount:e,subagentCount:f,duration:i,models:Array.from(h)}}],61542)},65003,a=>{"use strict";var b=a.i(70467),c=a.i(50871);async function d(a,d,e,f,g,h){let i=g??(0,b.getRegisteredEvals)(),j={entries:a,stats:d,projectName:e,sessionId:f,source:"session",...h};return(0,c.runAll)(i,j,{skipResult:a=>({name:a.name,pass:!1,score:0,durationMs:0,skipped:!0}),successResult:(a,b,c)=>{var d;return{name:a.name,pass:b.pass,score:null==(d=b.score)?1:Math.max(0,Math.min(1,d)),message:b.message,metadata:b.metadata,durationMs:c}},errorResult:(a,b,c)=>({name:a.name,pass:!1,score:0,durationMs:c,error:b}),unexpectedResult:()=>({name:"?",pass:!1,score:0,durationMs:0,error:"Unexpected rejection"}),buildSummary:(a,b)=>{let c=0,d=0,e=0,f=0;for(let b of a)b.skipped?f++:b.error?e++:b.pass?c++:d++;return{results:a,totalDurationMs:b,passCount:c,failCount:d,errorCount:e,skippedCount:f}}})}a.s(["runAllEvals",0,d])},99938,a=>{"use strict";var b=a.i(37936),c=a.i(62733),d=a.i(70467),e=a.i(65003),f=a.i(83397),g=a.i(61542);a.i(651);var h=a.i(46721),i=a.i(70427);async function j(a,b,k,l=!1){try{await (0,c.ensureEvalsLoaded)();let j=(0,d.getSessionScopedEvals)().find(a=>a.name===k);if(!j)return{ok:!1,error:`Eval "${k}" not found`};let m=await (0,h.hashSessionFile)(a,b);if(!l&&m){let c=(0,h.hashItemCode)(j.fn),d=await (0,i.getPerItemCacheWithHook)("evals",a,b,j.name,c,m);if(d)return{ok:!0,result:d.value}}let{entries:n,rawLines:o}=await (0,f.getCachedSessionLog)(a,b),p=(0,g.calculateLogStats)(n),q=(await (0,e.runAllEvals)(o,p,a,b,[j],{source:"session"})).results[0];if(!q)return{ok:!1,error:"No result returned from eval"};if(m){let c=(0,h.hashItemCode)(j.fn);await (0,i.setPerItemCache)("evals",a,b,j.name,c,q,m)}return{ok:!0,result:q}}catch(a){return{ok:!1,error:a instanceof Error?a.message:String(a)}}}(0,a.i(13095).ensureServerEntryExports)([j]),(0,b.registerServerReference)(j,"
|
|
1
|
+
module.exports=[50871,61542,a=>{"use strict";async function b(a,b,c){let d=[],e=performance.now(),f=globalThis.__CLAUDEYE_CONDITION_REGISTRY__??null,g=!1;if(f)try{await f(b)||(g=!0)}catch{g=!0}if(g)for(let b of a)d.push(c.skipResult(b));else{let e=a.map(async a=>{if(a.condition)try{if(!await a.condition(b))return c.skipResult(a)}catch(b){return c.errorResult(a,`Condition error: ${b instanceof Error?b.message:String(b)}`,0)}let d=performance.now();try{let e=await a.fn(b),f=Math.round(performance.now()-d);return c.successResult(a,e,f)}catch(e){let b=Math.round(performance.now()-d);return c.errorResult(a,e instanceof Error?e.message:String(e),b)}});for(let a of(await Promise.allSettled(e)))d.push("fulfilled"===a.status?a.value:c.unexpectedResult())}let h=Math.round(performance.now()-e);return c.buildSummary(d,h)}a.s(["runAll",0,b],50871);var c=a.i(92246);a.s(["calculateLogStats",0,function(a){let b=0,d=0,e=0,f=0,g=0,h=new Set;for(let c of a)if("user"===c.type&&b++,"queue-operation"===c.type&&g++,"assistant"===c.type){for(let a of(d++,c.message.content))"tool_use"===a.type&&("Task"===a.name&&(a.subagentType||a.subagentId)?f++:e++);c.message.model&&h.add(c.message.model)}let i="";if(a.length>=2){let b=a[a.length-1].timestampMs-a[0].timestampMs;i=(0,c.formatDuration)(b)}return{turnCount:g,userCount:b,assistantCount:d,toolCallCount:e,subagentCount:f,duration:i,models:Array.from(h)}}],61542)},65003,a=>{"use strict";var b=a.i(70467),c=a.i(50871);async function d(a,d,e,f,g,h){let i=g??(0,b.getRegisteredEvals)(),j={entries:a,stats:d,projectName:e,sessionId:f,source:"session",...h};return(0,c.runAll)(i,j,{skipResult:a=>({name:a.name,pass:!1,score:0,durationMs:0,skipped:!0}),successResult:(a,b,c)=>{var d;return{name:a.name,pass:b.pass,score:null==(d=b.score)?1:Math.max(0,Math.min(1,d)),message:b.message,metadata:b.metadata,durationMs:c}},errorResult:(a,b,c)=>({name:a.name,pass:!1,score:0,durationMs:c,error:b}),unexpectedResult:()=>({name:"?",pass:!1,score:0,durationMs:0,error:"Unexpected rejection"}),buildSummary:(a,b)=>{let c=0,d=0,e=0,f=0;for(let b of a)b.skipped?f++:b.error?e++:b.pass?c++:d++;return{results:a,totalDurationMs:b,passCount:c,failCount:d,errorCount:e,skippedCount:f}}})}a.s(["runAllEvals",0,d])},99938,a=>{"use strict";var b=a.i(37936),c=a.i(62733),d=a.i(70467),e=a.i(65003),f=a.i(83397),g=a.i(61542);a.i(651);var h=a.i(46721),i=a.i(70427);async function j(a,b,k,l=!1){try{await (0,c.ensureEvalsLoaded)();let j=(0,d.getSessionScopedEvals)().find(a=>a.name===k);if(!j)return{ok:!1,error:`Eval "${k}" not found`};let m=await (0,h.hashSessionFile)(a,b);if(!l&&m){let c=(0,h.hashItemCode)(j.fn),d=await (0,i.getPerItemCacheWithHook)("evals",a,b,j.name,c,m);if(d)return{ok:!0,result:d.value}}let{entries:n,rawLines:o}=await (0,f.getCachedSessionLog)(a,b),p=(0,g.calculateLogStats)(n),q=(await (0,e.runAllEvals)(o,p,a,b,[j],{source:"session"})).results[0];if(!q)return{ok:!1,error:"No result returned from eval"};if(m){let c=(0,h.hashItemCode)(j.fn);await (0,i.setPerItemCache)("evals",a,b,j.name,c,q,m)}return{ok:!0,result:q}}catch(a){return{ok:!1,error:a instanceof Error?a.message:String(a)}}}(0,a.i(13095).ensureServerEntryExports)([j]),(0,b.registerServerReference)(j,"786774517b556264fc82d48cd5b2afbed9c00d5f3f",null),a.s(["processSessionEval",0,j])}];
|
|
2
2
|
|
|
3
3
|
//# sourceMappingURL=_050qnuh._.js.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
module.exports=[50871,61542,a=>{"use strict";async function b(a,b,c){let d=[],e=performance.now(),f=globalThis.__CLAUDEYE_CONDITION_REGISTRY__??null,g=!1;if(f)try{await f(b)||(g=!0)}catch{g=!0}if(g)for(let b of a)d.push(c.skipResult(b));else{let e=a.map(async a=>{if(a.condition)try{if(!await a.condition(b))return c.skipResult(a)}catch(b){return c.errorResult(a,`Condition error: ${b instanceof Error?b.message:String(b)}`,0)}let d=performance.now();try{let e=await a.fn(b),f=Math.round(performance.now()-d);return c.successResult(a,e,f)}catch(e){let b=Math.round(performance.now()-d);return c.errorResult(a,e instanceof Error?e.message:String(e),b)}});for(let a of(await Promise.allSettled(e)))d.push("fulfilled"===a.status?a.value:c.unexpectedResult())}let h=Math.round(performance.now()-e);return c.buildSummary(d,h)}a.s(["runAll",0,b],50871);var c=a.i(92246);a.s(["calculateLogStats",0,function(a){let b=0,d=0,e=0,f=0,g=0,h=new Set;for(let c of a)if("user"===c.type&&b++,"queue-operation"===c.type&&g++,"assistant"===c.type){for(let a of(d++,c.message.content))"tool_use"===a.type&&("Task"===a.name&&(a.subagentType||a.subagentId)?f++:e++);c.message.model&&h.add(c.message.model)}let i="";if(a.length>=2){let b=a[a.length-1].timestampMs-a[0].timestampMs;i=(0,c.formatDuration)(b)}return{turnCount:g,userCount:b,assistantCount:d,toolCallCount:e,subagentCount:f,duration:i,models:Array.from(h)}}],61542)},65003,a=>{"use strict";var b=a.i(70467),c=a.i(50871);async function d(a,d,e,f,g,h){let i=g??(0,b.getRegisteredEvals)(),j={entries:a,stats:d,projectName:e,sessionId:f,source:"session",...h};return(0,c.runAll)(i,j,{skipResult:a=>({name:a.name,pass:!1,score:0,durationMs:0,skipped:!0}),successResult:(a,b,c)=>{var d;return{name:a.name,pass:b.pass,score:null==(d=b.score)?1:Math.max(0,Math.min(1,d)),message:b.message,metadata:b.metadata,durationMs:c}},errorResult:(a,b,c)=>({name:a.name,pass:!1,score:0,durationMs:c,error:b}),unexpectedResult:()=>({name:"?",pass:!1,score:0,durationMs:0,error:"Unexpected rejection"}),buildSummary:(a,b)=>{let c=0,d=0,e=0,f=0;for(let b of a)b.skipped?f++:b.error?e++:b.pass?c++:d++;return{results:a,totalDurationMs:b,passCount:c,failCount:d,errorCount:e,skippedCount:f}}})}a.s(["runAllEvals",0,d])},77333,a=>{"use strict";var b=a.i(37936),c=a.i(62733),d=a.i(70467),e=a.i(65003),f=a.i(83397),g=a.i(61542);a.i(651);var h=a.i(46721),i=a.i(70427);async function j(a,b,k,l,m=!1,n,o){try{await (0,c.ensureEvalsLoaded)();let j=(0,d.getSubagentScopedEvals)(n).find(a=>a.name===l);if(!j)return{ok:!1,error:`Eval "${l}" not found for subagent type "${n??"any"}"`};let p=`${b}/agent-${k}`,q=await (0,h.hashSubagentFile)(a,b,k);if(!m&&q){let b=(0,h.hashItemCode)(j.fn),c=await (0,i.getPerItemCacheWithHook)("evals",a,p,j.name,b,q);if(c)return{ok:!0,result:c.value}}let{entries:r,rawLines:s}=await (0,f.getCachedSessionLog)(a,b),t=(0,g.calculateLogStats)(r),u=(0,f.extractSubagentMeta)(r,k),v=n??u?.type,w=o??u?.description,x=(await (0,e.runAllEvals)(s,t,a,b,[j],{source:`agent-${k}`,subagentType:v,subagentDescription:w,parentSessionId:b})).results[0];if(!x)return{ok:!1,error:"No result returned from eval"};if(q){let b=(0,h.hashItemCode)(j.fn);await (0,i.setPerItemCache)("evals",a,p,j.name,b,x,q)}return{ok:!0,result:x}}catch(a){return{ok:!1,error:a instanceof Error?a.message:String(a)}}}(0,a.i(13095).ensureServerEntryExports)([j]),(0,b.registerServerReference)(j,"
|
|
1
|
+
module.exports=[50871,61542,a=>{"use strict";async function b(a,b,c){let d=[],e=performance.now(),f=globalThis.__CLAUDEYE_CONDITION_REGISTRY__??null,g=!1;if(f)try{await f(b)||(g=!0)}catch{g=!0}if(g)for(let b of a)d.push(c.skipResult(b));else{let e=a.map(async a=>{if(a.condition)try{if(!await a.condition(b))return c.skipResult(a)}catch(b){return c.errorResult(a,`Condition error: ${b instanceof Error?b.message:String(b)}`,0)}let d=performance.now();try{let e=await a.fn(b),f=Math.round(performance.now()-d);return c.successResult(a,e,f)}catch(e){let b=Math.round(performance.now()-d);return c.errorResult(a,e instanceof Error?e.message:String(e),b)}});for(let a of(await Promise.allSettled(e)))d.push("fulfilled"===a.status?a.value:c.unexpectedResult())}let h=Math.round(performance.now()-e);return c.buildSummary(d,h)}a.s(["runAll",0,b],50871);var c=a.i(92246);a.s(["calculateLogStats",0,function(a){let b=0,d=0,e=0,f=0,g=0,h=new Set;for(let c of a)if("user"===c.type&&b++,"queue-operation"===c.type&&g++,"assistant"===c.type){for(let a of(d++,c.message.content))"tool_use"===a.type&&("Task"===a.name&&(a.subagentType||a.subagentId)?f++:e++);c.message.model&&h.add(c.message.model)}let i="";if(a.length>=2){let b=a[a.length-1].timestampMs-a[0].timestampMs;i=(0,c.formatDuration)(b)}return{turnCount:g,userCount:b,assistantCount:d,toolCallCount:e,subagentCount:f,duration:i,models:Array.from(h)}}],61542)},65003,a=>{"use strict";var b=a.i(70467),c=a.i(50871);async function d(a,d,e,f,g,h){let i=g??(0,b.getRegisteredEvals)(),j={entries:a,stats:d,projectName:e,sessionId:f,source:"session",...h};return(0,c.runAll)(i,j,{skipResult:a=>({name:a.name,pass:!1,score:0,durationMs:0,skipped:!0}),successResult:(a,b,c)=>{var d;return{name:a.name,pass:b.pass,score:null==(d=b.score)?1:Math.max(0,Math.min(1,d)),message:b.message,metadata:b.metadata,durationMs:c}},errorResult:(a,b,c)=>({name:a.name,pass:!1,score:0,durationMs:c,error:b}),unexpectedResult:()=>({name:"?",pass:!1,score:0,durationMs:0,error:"Unexpected rejection"}),buildSummary:(a,b)=>{let c=0,d=0,e=0,f=0;for(let b of a)b.skipped?f++:b.error?e++:b.pass?c++:d++;return{results:a,totalDurationMs:b,passCount:c,failCount:d,errorCount:e,skippedCount:f}}})}a.s(["runAllEvals",0,d])},77333,a=>{"use strict";var b=a.i(37936),c=a.i(62733),d=a.i(70467),e=a.i(65003),f=a.i(83397),g=a.i(61542);a.i(651);var h=a.i(46721),i=a.i(70427);async function j(a,b,k,l,m=!1,n,o){try{await (0,c.ensureEvalsLoaded)();let j=(0,d.getSubagentScopedEvals)(n).find(a=>a.name===l);if(!j)return{ok:!1,error:`Eval "${l}" not found for subagent type "${n??"any"}"`};let p=`${b}/agent-${k}`,q=await (0,h.hashSubagentFile)(a,b,k);if(!m&&q){let b=(0,h.hashItemCode)(j.fn),c=await (0,i.getPerItemCacheWithHook)("evals",a,p,j.name,b,q);if(c)return{ok:!0,result:c.value}}let{entries:r,rawLines:s}=await (0,f.getCachedSessionLog)(a,b),t=(0,g.calculateLogStats)(r),u=(0,f.extractSubagentMeta)(r,k),v=n??u?.type,w=o??u?.description,x=(await (0,e.runAllEvals)(s,t,a,b,[j],{source:`agent-${k}`,subagentType:v,subagentDescription:w,parentSessionId:b})).results[0];if(!x)return{ok:!1,error:"No result returned from eval"};if(q){let b=(0,h.hashItemCode)(j.fn);await (0,i.setPerItemCache)("evals",a,p,j.name,b,x,q)}return{ok:!0,result:x}}catch(a){return{ok:!1,error:a instanceof Error?a.message:String(a)}}}(0,a.i(13095).ensureServerEntryExports)([j]),(0,b.registerServerReference)(j,"7fb731ed6237251f5bf6e53419a40bfb2e2f8ad357",null),a.s(["processSubagentEval",0,j])}];
|
|
2
2
|
|
|
3
3
|
//# sourceMappingURL=_0_~1-jh._.js.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
module.exports=[96221,a=>{"use strict";let b=(0,a.i(70106).default)("loader-circle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);a.s(["Loader2",0,b],96221)},68765,a=>{"use strict";var b=a.i(87924),c=a.i(72131),d=a.i(5050);let e=(0,d.createServerReference)("604b9646808a1ed075ddde9947f10d8166dba23da6",d.callServer,void 0,d.findSourceMapURL,"computeDashboard");var f=a.i(90619),g=a.i(95947);let h=["all","true","false"];function i({meta:a,value:c,onChange:d}){return(0,b.jsxs)("div",{className:"bg-card border border-border rounded-lg p-4",children:[(0,b.jsx)("label",{className:"block text-sm font-medium text-foreground mb-2",children:a.label}),(0,b.jsx)("div",{className:"flex gap-1",children:h.map(a=>(0,b.jsx)("button",{onClick:()=>d(a),className:`flex-1 px-3 py-1.5 text-sm rounded-md transition-colors ${c===a?"bg-primary text-primary-foreground":"bg-muted text-muted-foreground hover:bg-muted/80"}`,children:"all"===a?"All":"true"===a?"Yes":"No"},a))})]})}function j({meta:a,value:d,onChange:e}){let f=a.max-a.min,g=!Number.isInteger(a.min)||!Number.isInteger(a.max),h=f<=1?.01:g&&f<=10?.1:g||f<=10?1:f<=100?5:10,i=(0,c.useCallback)(a=>{let b=Number(a.target.value);isNaN(b)||e({...d,min:Math.min(b,d.max)})},[d,e]),k=(0,c.useCallback)(a=>{let b=Number(a.target.value);isNaN(b)||e({...d,max:Math.max(b,d.min)})},[d,e]),l=(0,c.useCallback)(a=>{let b=Number(a.target.value);e({...d,min:Math.min(b,d.max)})},[d,e]),m=(0,c.useCallback)(a=>{let b=Number(a.target.value);e({...d,max:Math.max(b,d.min)})},[d,e]);return(0,b.jsxs)("div",{className:"bg-card border border-border rounded-lg p-4",children:[(0,b.jsx)("label",{className:"block text-sm font-medium text-foreground mb-2",children:a.label}),(0,b.jsxs)("div",{className:"relative mb-3",children:[(0,b.jsx)("input",{type:"range",min:a.min,max:a.max,step:h,value:d.min,onChange:l,className:"absolute w-full pointer-events-none appearance-none bg-transparent [&::-webkit-slider-thumb]:pointer-events-auto [&::-webkit-slider-thumb]:appearance-none [&::-webkit-slider-thumb]:h-4 [&::-webkit-slider-thumb]:w-4 [&::-webkit-slider-thumb]:rounded-full [&::-webkit-slider-thumb]:bg-primary [&::-webkit-slider-thumb]:cursor-pointer [&::-moz-range-thumb]:pointer-events-auto [&::-moz-range-thumb]:appearance-none [&::-moz-range-thumb]:h-4 [&::-moz-range-thumb]:w-4 [&::-moz-range-thumb]:rounded-full [&::-moz-range-thumb]:bg-primary [&::-moz-range-thumb]:border-0 [&::-moz-range-thumb]:cursor-pointer","aria-label":`${a.label} minimum`}),(0,b.jsx)("input",{type:"range",min:a.min,max:a.max,step:h,value:d.max,onChange:m,className:"absolute w-full pointer-events-none appearance-none bg-transparent [&::-webkit-slider-thumb]:pointer-events-auto [&::-webkit-slider-thumb]:appearance-none [&::-webkit-slider-thumb]:h-4 [&::-webkit-slider-thumb]:w-4 [&::-webkit-slider-thumb]:rounded-full [&::-webkit-slider-thumb]:bg-primary [&::-webkit-slider-thumb]:cursor-pointer [&::-moz-range-thumb]:pointer-events-auto [&::-moz-range-thumb]:appearance-none [&::-moz-range-thumb]:h-4 [&::-moz-range-thumb]:w-4 [&::-moz-range-thumb]:rounded-full [&::-moz-range-thumb]:bg-primary [&::-moz-range-thumb]:border-0 [&::-moz-range-thumb]:cursor-pointer","aria-label":`${a.label} maximum`}),(0,b.jsx)("div",{className:"h-1 bg-muted rounded w-full mt-2"})]}),(0,b.jsxs)("div",{className:"flex items-center gap-2",children:[(0,b.jsx)("input",{type:"number",min:a.min,max:a.max,step:h,value:d.min,onChange:i,className:"w-20 px-2 py-1 text-sm bg-input border border-border rounded-md text-foreground focus:outline-none focus:ring-2 focus:ring-ring","aria-label":`${a.label} minimum value`}),(0,b.jsx)("span",{className:"text-muted-foreground text-sm",children:"to"}),(0,b.jsx)("input",{type:"number",min:a.min,max:a.max,step:h,value:d.max,onChange:k,className:"w-20 px-2 py-1 text-sm bg-input border border-border rounded-md text-foreground focus:outline-none focus:ring-2 focus:ring-ring","aria-label":`${a.label} maximum value`})]})]})}var k=a.i(5784);function l({meta:a,value:d,onChange:e}){let[f,g]=(0,c.useState)(!1),h=(0,c.useRef)(null);(0,c.useEffect)(()=>{if(!f)return;let a=a=>{h.current&&!h.current.contains(a.target)&&g(!1)};return document.addEventListener("mousedown",a),()=>document.removeEventListener("mousedown",a)},[f]);let i=(0,c.useCallback)(a=>{let b=new Set(d);b.has(a)?b.delete(a):b.add(a),e(b)},[d,e]),j=(0,c.useCallback)(()=>{e(new Set(a.values))},[a.values,e]),m=(0,c.useCallback)(()=>{e(new Set)},[e]),n=d.size,o=a.values.length,p=0===n?"None selected":n===o?"All selected":`${n} of ${o} selected`;return(0,b.jsxs)("div",{className:"bg-card border border-border rounded-lg p-4",ref:h,children:[(0,b.jsx)("label",{className:"block text-sm font-medium text-foreground mb-2",children:a.label}),(0,b.jsxs)("button",{onClick:()=>g(!f),className:"w-full flex items-center justify-between px-3 py-2 text-sm bg-input border border-border rounded-md text-foreground hover:border-primary/50 transition-colors","aria-expanded":f,children:[(0,b.jsx)("span",{className:"truncate",children:p}),(0,b.jsx)(k.ChevronDown,{className:`w-4 h-4 text-muted-foreground transition-transform ${f?"rotate-180":""}`})]}),f&&(0,b.jsxs)("div",{className:"mt-2 border border-border rounded-md bg-popover shadow-md max-h-60 overflow-y-auto",children:[(0,b.jsxs)("div",{className:"flex items-center gap-2 px-3 py-2 border-b border-border",children:[(0,b.jsx)("button",{onClick:j,className:"text-xs text-primary hover:text-primary/80 transition-colors",children:"Select All"}),(0,b.jsx)("span",{className:"text-muted-foreground text-xs",children:"|"}),(0,b.jsx)("button",{onClick:m,className:"text-xs text-primary hover:text-primary/80 transition-colors",children:"Clear"})]}),a.values.map(a=>(0,b.jsxs)("label",{className:"flex items-center gap-2 px-3 py-1.5 hover:bg-muted/50 cursor-pointer transition-colors",children:[(0,b.jsx)("input",{type:"checkbox",checked:d.has(a),onChange:()=>i(a),className:"rounded border-border text-primary focus:ring-ring"}),(0,b.jsx)("span",{className:"text-sm text-foreground truncate",children:a})]},a)),0===a.values.length&&(0,b.jsx)("div",{className:"px-3 py-2 text-sm text-muted-foreground",children:"No values available"})]})]})}var m=a.i(24451);function n({meta:a,value:c,onChange:d}){let e=null!==c.from||null!==c.to;return(0,b.jsxs)("div",{className:"bg-card border border-border rounded-lg p-4",children:[(0,b.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[(0,b.jsx)("label",{className:"block text-sm font-medium text-foreground",children:a.label}),e&&(0,b.jsx)("button",{onClick:()=>d({from:null,to:null}),className:"text-xs text-primary hover:text-primary/80 transition-colors",children:"Clear"})]}),(0,b.jsxs)("div",{className:"flex items-center gap-2",children:[(0,b.jsx)(m.default,{id:`filter-date-${a.name}-from`,value:null,stringValue:c.from,onChange:a=>d({...c,from:a||null}),"aria-label":`${a.label} from date`}),(0,b.jsx)("span",{className:"text-xs text-muted-foreground",children:"to"}),(0,b.jsx)(m.default,{id:`filter-date-${a.name}-to`,value:null,stringValue:c.to,onChange:a=>d({...c,to:a||null}),"aria-label":`${a.label} to date`})]})]})}var o=a.i(38246),p=a.i(35487),q=a.i(65967);function r({sessions:a,filterMeta:c,totalCount:d,matchingCount:e,page:f,pageSize:g,onPageChange:h}){let i=Math.ceil(e/g),j=(f-1)*g,k=Math.min(j+a.length,e);return(0,b.jsxs)("div",{className:"space-y-2",children:[(0,b.jsx)("div",{className:"text-sm text-muted-foreground",children:0===e?"No sessions match the current filters.":(0,b.jsxs)(b.Fragment,{children:["Showing ",j+1,"-",k," of ",e," sessions",e!==d&&(0,b.jsxs)("span",{className:"ml-1",children:["(filtered from ",d," total)"]})]})}),(0,b.jsxs)("div",{className:"bg-card border border-border rounded-lg overflow-hidden",children:[(0,b.jsx)("div",{className:"overflow-x-auto",children:(0,b.jsxs)("table",{className:"w-full",children:[(0,b.jsx)("thead",{children:(0,b.jsxs)("tr",{className:"border-b border-border bg-muted/50",children:[(0,b.jsx)("th",{scope:"col",className:"px-4 py-3 text-left text-sm font-semibold text-foreground w-12",children:(0,b.jsx)("span",{className:"sr-only",children:"Icon"})}),(0,b.jsx)("th",{scope:"col",className:"px-4 py-3 text-left text-sm font-semibold text-foreground",children:"Project"}),(0,b.jsx)("th",{scope:"col",className:"px-4 py-3 text-left text-sm font-semibold text-foreground",children:"Session ID"}),(0,b.jsx)("th",{scope:"col",className:"px-4 py-3 text-left text-sm font-semibold text-foreground",children:"Modified"}),c.filter(a=>"date"!==a.type).map(a=>(0,b.jsx)("th",{scope:"col",className:"px-4 py-3 text-left text-sm font-semibold text-foreground",children:a.label},a.name))]})}),(0,b.jsx)("tbody",{children:0===a.length?(0,b.jsx)("tr",{children:(0,b.jsx)("td",{colSpan:4+c.filter(a=>"date"!==a.type).length,className:"px-4 py-8 text-center text-muted-foreground",children:"No sessions found matching the filters."})}):a.map(a=>(0,b.jsxs)("tr",{className:"border-b border-border hover:bg-muted/50 transition-colors",children:[(0,b.jsx)("td",{className:"px-4 py-3",children:(0,b.jsx)(p.File,{className:"w-5 h-5 text-primary"})}),(0,b.jsx)("td",{className:"px-4 py-3 text-sm text-foreground",children:(0,b.jsx)(o.default,{href:`/project/${encodeURIComponent(a.projectName)}`,className:"hover:text-primary transition-colors",children:a.projectName})}),(0,b.jsx)("td",{className:"px-4 py-3 text-sm max-w-xs",children:(0,b.jsx)(o.default,{href:`/project/${encodeURIComponent(a.projectName)}/session/${encodeURIComponent(a.sessionId)}`,className:"font-semibold text-foreground hover:text-primary transition-colors break-words break-all",children:a.sessionId})}),(0,b.jsx)("td",{className:"px-4 py-3 text-sm text-muted-foreground",children:a.lastModifiedFormatted}),c.filter(a=>"date"!==a.type).map(c=>{var d;return(0,b.jsx)("td",{className:"px-4 py-3 text-sm text-muted-foreground",children:void 0===(d=a.filterValues[c.name])?"-":"boolean"==typeof d?d?"Yes":"No":String(d)},c.name)})]},`${a.projectName}/${a.sessionId}`))})]})}),e>0&&i>1&&(0,b.jsx)(q.default,{currentPage:f,totalPages:i,onPageChange:h})]})]})}var s=a.i(96221);function t(a,b){let c={};for(let d of b){let b=a[d.name];if(b)switch(d.type){case"boolean":c[d.name]={type:"boolean",value:b};break;case"number":c[d.name]={type:"number",min:b.min,max:b.max};break;case"string":c[d.name]={type:"string",selected:Array.from(b)};break;case"date":c[d.name]={type:"date",from:b.from,to:b.to}}}return c}function u(a,b){for(let c of b){let b=a[c.name];if(b)switch(c.type){case"boolean":if("all"!==b)return!0;break;case"number":if(b.min!==c.min||b.max!==c.max)return!0;break;case"string":if(b.size!==c.values.length)return!0;break;case"date":if(null!==b.from||null!==b.to)return!0}}return!1}a.s(["default",0,function({viewName:a}){let d=(0,f.useUrlParams)(),h=(0,c.useRef)(null);null===h.current&&(h.current=d.getAll());let k=(0,c.useRef)(!1),[m,o]=(0,c.useState)(null),[p,q]=(0,c.useState)([]),[v,w]=(0,c.useState)(!0),[x,y]=(0,c.useState)(null),[z,A]=(0,c.useState)(!1),[B,C]=(0,c.useState)({}),[D,E]=(0,c.useState)(()=>(0,g.paramToPage)(d.get("page"))),F=(0,c.useRef)(null);(0,c.useEffect)(()=>()=>{F.current&&clearTimeout(F.current)},[]);let G=(0,c.useCallback)(async(b,c)=>{w(!0),y(null);try{let d=await e(a,{filters:b,page:c??1,pageSize:25});d.ok?d.hasFilters?(o(d.payload),d.payload.filterMeta.length>0&&q(d.payload.filterMeta)):A(!0):y(d.error)}catch(a){y(a instanceof Error?a.message:String(a))}finally{w(!1)}},[a]);(0,c.useEffect)(()=>{G().then(()=>{})},[G]),(0,c.useEffect)(()=>{if(p.length>0&&0===Object.keys(B).length){let a=function(a){let b={};for(let c of a)switch(c.type){case"boolean":b[c.name]="all";break;case"number":b[c.name]={min:c.min,max:c.max};break;case"string":b[c.name]=new Set(c.values);break;case"date":b[c.name]={from:null,to:null}}return b}(p),b=h.current,c=!1;if(b)for(let d of p){let e=b.get(d.name),f=(0,g.paramToActiveFilter)(d,e);null!==f&&(a[d.name]=f,c=!0)}if(C(a),k.current=!0,c||b&&(0,g.paramToPage)(b.get("page"))>1){let c=b?(0,g.paramToPage)(b.get("page")):1,d=u(a,p)?t(a,p):void 0;E(c),G(d,c)}}},[p]);let H=(0,c.useCallback)((a,b)=>{if(!k.current)return;let c={page:(0,g.pageToParam)(b)};for(let b of p)c[b.name]=(0,g.activeFilterToParam)(b,a[b.name]);d.setAll(c)},[p,d]),I=(0,c.useCallback)((a,b)=>{C(c=>{let d={...c,[a]:b};return F.current&&clearTimeout(F.current),F.current=setTimeout(()=>{let a=u(d,p)?t(d,p):void 0;E(1),G(a,1),H(d,1)},300),d})},[p,G,H]),J=(0,c.useCallback)(a=>{E(a),G(u(B,p)?t(B,p):void 0,a),H(B,a)},[B,p,G,H]);if(z)return(0,b.jsxs)("div",{className:"bg-card border border-border rounded-lg p-6 text-center",children:[(0,b.jsx)("p",{className:"text-muted-foreground mb-2",children:"No filters are registered for this view."}),(0,b.jsxs)("p",{className:"text-sm text-muted-foreground",children:["Use ",(0,b.jsx)("code",{className:"text-foreground bg-muted px-1 py-0.5 rounded",children:"app.dashboard.view()"})," or"," ",(0,b.jsx)("code",{className:"text-foreground bg-muted px-1 py-0.5 rounded",children:"app.dashboard.filter()"})," in your evals file to register filters."]})]});if(v&&!m)return(0,b.jsxs)("div",{className:"flex items-center justify-center py-16",children:[(0,b.jsx)(s.Loader2,{className:"w-6 h-6 text-primary animate-spin mr-2"}),(0,b.jsx)("span",{className:"text-muted-foreground",children:"Computing dashboard filters..."})]});if(x&&!m)return(0,b.jsxs)("div",{className:"bg-destructive/10 border border-destructive/20 rounded-lg p-4",children:[(0,b.jsx)("p",{className:"text-sm text-destructive font-medium",children:"Failed to load dashboard"}),(0,b.jsx)("p",{className:"text-sm text-destructive/80 mt-1",children:x}),(0,b.jsx)("button",{onClick:()=>G(),className:"mt-3 px-3 py-1.5 text-sm bg-primary text-primary-foreground rounded-md hover:bg-primary/90 transition-colors",children:"Retry"})]});if(!m)return null;let K=p.length>0?p:m.filterMeta;return(0,b.jsxs)("div",{className:"space-y-6",children:[K.length>0&&(0,b.jsx)("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:K.map(a=>{switch(a.type){case"boolean":return(0,b.jsx)(i,{meta:a,value:B[a.name]??"all",onChange:b=>I(a.name,b)},a.name);case"number":return(0,b.jsx)(j,{meta:a,value:B[a.name]??{min:a.min,max:a.max},onChange:b=>I(a.name,b)},a.name);case"string":return(0,b.jsx)(l,{meta:a,value:B[a.name]??new Set(a.values),onChange:b=>I(a.name,b)},a.name);case"date":return(0,b.jsx)(n,{meta:a,value:B[a.name]??{from:null,to:null},onChange:b=>I(a.name,b)},a.name)}})}),(0,b.jsxs)("div",{className:"text-xs text-muted-foreground",children:["Computed in ",m.totalDurationMs,"ms",v&&" (updating...)"]}),(0,b.jsx)(r,{sessions:m.sessions,filterMeta:K,totalCount:m.totalCount,matchingCount:m.matchingCount,page:m.page,pageSize:m.pageSize,onPageChange:J})]})}],68765)},43911,a=>{"use strict";var b=a.i(87924),c=a.i(72131),d=a.i(5050);let e=(0,d.createServerReference)("409e689ac65579f16b4769034b04b5e5b765ef94b2",d.callServer,void 0,d.findSourceMapURL,"computeAggregates"),f=(0,a.i(70106).default)("arrow-up-down",[["path",{d:"m21 16-4 4-4-4",key:"f6ql7i"}],["path",{d:"M17 20V4",key:"1ejh1v"}],["path",{d:"m3 8 4-4 4 4",key:"11wl7u"}],["path",{d:"M7 4v16",key:"1glfcx"}]]);function g({rows:a,columns:d}){let[e,h]=(0,c.useState)(null),[i,j]=(0,c.useState)("asc");if(0===a.length)return(0,b.jsx)("p",{className:"text-sm text-muted-foreground",children:"No data returned from reduce function."});let k=e?[...a].sort((a,b)=>{let c="asc"===i?1:-1,d=a[e],f=b[e];return void 0===d&&void 0===f?0:void 0===d?1:void 0===f?-1:"string"==typeof d&&"string"==typeof f?d.localeCompare(f)*c:"boolean"==typeof d&&"boolean"==typeof f?(Number(d)-Number(f))*c:"number"==typeof d&&"number"==typeof f?(d-f)*c:String(d).localeCompare(String(f))*c}):a;return(0,b.jsx)("div",{className:"overflow-x-auto",children:(0,b.jsxs)("table",{className:"w-full text-sm",children:[(0,b.jsx)("thead",{children:(0,b.jsx)("tr",{className:"border-b border-border",children:d.map(a=>(0,b.jsx)("th",{className:"px-3 py-2 text-left text-xs font-medium text-muted-foreground cursor-pointer hover:text-foreground select-none",onClick:()=>{e===a?j(a=>"asc"===a?"desc":"asc"):(h(a),j("desc"))},children:(0,b.jsxs)("span",{className:"inline-flex items-center gap-1",children:[a,(0,b.jsx)(f,{className:"w-3 h-3"})]})},a))})}),(0,b.jsx)("tbody",{children:k.map((a,c)=>(0,b.jsx)("tr",{className:"border-b border-border/50 hover:bg-muted/50",children:d.map(c=>{var d;return(0,b.jsx)("td",{className:"px-3 py-2 text-foreground",children:null==(d=a[c])?"—":"boolean"==typeof d?d?"Yes":"No":"number"==typeof d?Number.isInteger(d)?d.toLocaleString():d.toFixed(4):String(d)},c)})},c))})]})})}function h({aggregate:a}){return(0,b.jsxs)("div",{className:"bg-card border border-border rounded-lg p-4",children:[(0,b.jsx)("h4",{className:"text-sm font-medium text-foreground mb-3",children:a.label}),(0,b.jsx)(g,{rows:a.rows,columns:a.columns})]})}var i=a.i(96221);a.s(["default",0,function({viewName:a}){let[d,f]=(0,c.useState)(null),[g,j]=(0,c.useState)(!0),[k,l]=(0,c.useState)(null),m=(0,c.useCallback)(async()=>{j(!0),l(null);try{let b=await e(a);b.ok?b.hasAggregates&&f(b.payload):l(b.error)}catch(a){l(a instanceof Error?a.message:String(a))}finally{j(!1)}},[a]);return((0,c.useEffect)(()=>{m()},[m]),g&&!d)?(0,b.jsxs)("div",{className:"flex items-center justify-center py-8",children:[(0,b.jsx)(i.Loader2,{className:"w-5 h-5 text-primary animate-spin mr-2"}),(0,b.jsx)("span",{className:"text-sm text-muted-foreground",children:"Computing aggregates..."})]}):k&&!d?(0,b.jsxs)("div",{className:"bg-destructive/10 border border-destructive/20 rounded-lg p-4",children:[(0,b.jsx)("p",{className:"text-sm text-destructive font-medium",children:"Failed to compute aggregates"}),(0,b.jsx)("p",{className:"text-sm text-destructive/80 mt-1",children:k}),(0,b.jsx)("button",{onClick:()=>m(),className:"mt-3 px-3 py-1.5 text-sm bg-primary text-primary-foreground rounded-md hover:bg-primary/90 transition-colors",children:"Retry"})]}):d&&0!==d.aggregates.length?(0,b.jsxs)("div",{className:"space-y-4",children:[(0,b.jsxs)("div",{className:"flex items-center justify-between",children:[(0,b.jsx)("h3",{className:"text-lg font-medium text-foreground",children:"Aggregates"}),(0,b.jsxs)("span",{className:"text-xs text-muted-foreground",children:[d.totalSessions," sessions, ",d.totalDurationMs,"ms",g&&" (updating...)"]})]}),d.aggregates.map(a=>(0,b.jsx)(h,{aggregate:a},a.name))]}):null}],43911)}];
|
|
1
|
+
module.exports=[96221,a=>{"use strict";let b=(0,a.i(70106).default)("loader-circle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);a.s(["Loader2",0,b],96221)},68765,a=>{"use strict";var b=a.i(87924),c=a.i(72131),d=a.i(5050);let e=(0,d.createServerReference)("600018229182742daa9e4f8d63072f23a8417ef9ce",d.callServer,void 0,d.findSourceMapURL,"computeDashboard");var f=a.i(90619),g=a.i(95947);let h=["all","true","false"];function i({meta:a,value:c,onChange:d}){return(0,b.jsxs)("div",{className:"bg-card border border-border rounded-lg p-4",children:[(0,b.jsx)("label",{className:"block text-sm font-medium text-foreground mb-2",children:a.label}),(0,b.jsx)("div",{className:"flex gap-1",children:h.map(a=>(0,b.jsx)("button",{onClick:()=>d(a),className:`flex-1 px-3 py-1.5 text-sm rounded-md transition-colors ${c===a?"bg-primary text-primary-foreground":"bg-muted text-muted-foreground hover:bg-muted/80"}`,children:"all"===a?"All":"true"===a?"Yes":"No"},a))})]})}function j({meta:a,value:d,onChange:e}){let f=a.max-a.min,g=!Number.isInteger(a.min)||!Number.isInteger(a.max),h=f<=1?.01:g&&f<=10?.1:g||f<=10?1:f<=100?5:10,i=(0,c.useCallback)(a=>{let b=Number(a.target.value);isNaN(b)||e({...d,min:Math.min(b,d.max)})},[d,e]),k=(0,c.useCallback)(a=>{let b=Number(a.target.value);isNaN(b)||e({...d,max:Math.max(b,d.min)})},[d,e]),l=(0,c.useCallback)(a=>{let b=Number(a.target.value);e({...d,min:Math.min(b,d.max)})},[d,e]),m=(0,c.useCallback)(a=>{let b=Number(a.target.value);e({...d,max:Math.max(b,d.min)})},[d,e]);return(0,b.jsxs)("div",{className:"bg-card border border-border rounded-lg p-4",children:[(0,b.jsx)("label",{className:"block text-sm font-medium text-foreground mb-2",children:a.label}),(0,b.jsxs)("div",{className:"relative mb-3",children:[(0,b.jsx)("input",{type:"range",min:a.min,max:a.max,step:h,value:d.min,onChange:l,className:"absolute w-full pointer-events-none appearance-none bg-transparent [&::-webkit-slider-thumb]:pointer-events-auto [&::-webkit-slider-thumb]:appearance-none [&::-webkit-slider-thumb]:h-4 [&::-webkit-slider-thumb]:w-4 [&::-webkit-slider-thumb]:rounded-full [&::-webkit-slider-thumb]:bg-primary [&::-webkit-slider-thumb]:cursor-pointer [&::-moz-range-thumb]:pointer-events-auto [&::-moz-range-thumb]:appearance-none [&::-moz-range-thumb]:h-4 [&::-moz-range-thumb]:w-4 [&::-moz-range-thumb]:rounded-full [&::-moz-range-thumb]:bg-primary [&::-moz-range-thumb]:border-0 [&::-moz-range-thumb]:cursor-pointer","aria-label":`${a.label} minimum`}),(0,b.jsx)("input",{type:"range",min:a.min,max:a.max,step:h,value:d.max,onChange:m,className:"absolute w-full pointer-events-none appearance-none bg-transparent [&::-webkit-slider-thumb]:pointer-events-auto [&::-webkit-slider-thumb]:appearance-none [&::-webkit-slider-thumb]:h-4 [&::-webkit-slider-thumb]:w-4 [&::-webkit-slider-thumb]:rounded-full [&::-webkit-slider-thumb]:bg-primary [&::-webkit-slider-thumb]:cursor-pointer [&::-moz-range-thumb]:pointer-events-auto [&::-moz-range-thumb]:appearance-none [&::-moz-range-thumb]:h-4 [&::-moz-range-thumb]:w-4 [&::-moz-range-thumb]:rounded-full [&::-moz-range-thumb]:bg-primary [&::-moz-range-thumb]:border-0 [&::-moz-range-thumb]:cursor-pointer","aria-label":`${a.label} maximum`}),(0,b.jsx)("div",{className:"h-1 bg-muted rounded w-full mt-2"})]}),(0,b.jsxs)("div",{className:"flex items-center gap-2",children:[(0,b.jsx)("input",{type:"number",min:a.min,max:a.max,step:h,value:d.min,onChange:i,className:"w-20 px-2 py-1 text-sm bg-input border border-border rounded-md text-foreground focus:outline-none focus:ring-2 focus:ring-ring","aria-label":`${a.label} minimum value`}),(0,b.jsx)("span",{className:"text-muted-foreground text-sm",children:"to"}),(0,b.jsx)("input",{type:"number",min:a.min,max:a.max,step:h,value:d.max,onChange:k,className:"w-20 px-2 py-1 text-sm bg-input border border-border rounded-md text-foreground focus:outline-none focus:ring-2 focus:ring-ring","aria-label":`${a.label} maximum value`})]})]})}var k=a.i(5784);function l({meta:a,value:d,onChange:e}){let[f,g]=(0,c.useState)(!1),h=(0,c.useRef)(null);(0,c.useEffect)(()=>{if(!f)return;let a=a=>{h.current&&!h.current.contains(a.target)&&g(!1)};return document.addEventListener("mousedown",a),()=>document.removeEventListener("mousedown",a)},[f]);let i=(0,c.useCallback)(a=>{let b=new Set(d);b.has(a)?b.delete(a):b.add(a),e(b)},[d,e]),j=(0,c.useCallback)(()=>{e(new Set(a.values))},[a.values,e]),m=(0,c.useCallback)(()=>{e(new Set)},[e]),n=d.size,o=a.values.length,p=0===n?"None selected":n===o?"All selected":`${n} of ${o} selected`;return(0,b.jsxs)("div",{className:"bg-card border border-border rounded-lg p-4",ref:h,children:[(0,b.jsx)("label",{className:"block text-sm font-medium text-foreground mb-2",children:a.label}),(0,b.jsxs)("button",{onClick:()=>g(!f),className:"w-full flex items-center justify-between px-3 py-2 text-sm bg-input border border-border rounded-md text-foreground hover:border-primary/50 transition-colors","aria-expanded":f,children:[(0,b.jsx)("span",{className:"truncate",children:p}),(0,b.jsx)(k.ChevronDown,{className:`w-4 h-4 text-muted-foreground transition-transform ${f?"rotate-180":""}`})]}),f&&(0,b.jsxs)("div",{className:"mt-2 border border-border rounded-md bg-popover shadow-md max-h-60 overflow-y-auto",children:[(0,b.jsxs)("div",{className:"flex items-center gap-2 px-3 py-2 border-b border-border",children:[(0,b.jsx)("button",{onClick:j,className:"text-xs text-primary hover:text-primary/80 transition-colors",children:"Select All"}),(0,b.jsx)("span",{className:"text-muted-foreground text-xs",children:"|"}),(0,b.jsx)("button",{onClick:m,className:"text-xs text-primary hover:text-primary/80 transition-colors",children:"Clear"})]}),a.values.map(a=>(0,b.jsxs)("label",{className:"flex items-center gap-2 px-3 py-1.5 hover:bg-muted/50 cursor-pointer transition-colors",children:[(0,b.jsx)("input",{type:"checkbox",checked:d.has(a),onChange:()=>i(a),className:"rounded border-border text-primary focus:ring-ring"}),(0,b.jsx)("span",{className:"text-sm text-foreground truncate",children:a})]},a)),0===a.values.length&&(0,b.jsx)("div",{className:"px-3 py-2 text-sm text-muted-foreground",children:"No values available"})]})]})}var m=a.i(24451);function n({meta:a,value:c,onChange:d}){let e=null!==c.from||null!==c.to;return(0,b.jsxs)("div",{className:"bg-card border border-border rounded-lg p-4",children:[(0,b.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[(0,b.jsx)("label",{className:"block text-sm font-medium text-foreground",children:a.label}),e&&(0,b.jsx)("button",{onClick:()=>d({from:null,to:null}),className:"text-xs text-primary hover:text-primary/80 transition-colors",children:"Clear"})]}),(0,b.jsxs)("div",{className:"flex items-center gap-2",children:[(0,b.jsx)(m.default,{id:`filter-date-${a.name}-from`,value:null,stringValue:c.from,onChange:a=>d({...c,from:a||null}),"aria-label":`${a.label} from date`}),(0,b.jsx)("span",{className:"text-xs text-muted-foreground",children:"to"}),(0,b.jsx)(m.default,{id:`filter-date-${a.name}-to`,value:null,stringValue:c.to,onChange:a=>d({...c,to:a||null}),"aria-label":`${a.label} to date`})]})]})}var o=a.i(38246),p=a.i(35487),q=a.i(65967);function r({sessions:a,filterMeta:c,totalCount:d,matchingCount:e,page:f,pageSize:g,onPageChange:h}){let i=Math.ceil(e/g),j=(f-1)*g,k=Math.min(j+a.length,e);return(0,b.jsxs)("div",{className:"space-y-2",children:[(0,b.jsx)("div",{className:"text-sm text-muted-foreground",children:0===e?"No sessions match the current filters.":(0,b.jsxs)(b.Fragment,{children:["Showing ",j+1,"-",k," of ",e," sessions",e!==d&&(0,b.jsxs)("span",{className:"ml-1",children:["(filtered from ",d," total)"]})]})}),(0,b.jsxs)("div",{className:"bg-card border border-border rounded-lg overflow-hidden",children:[(0,b.jsx)("div",{className:"overflow-x-auto",children:(0,b.jsxs)("table",{className:"w-full",children:[(0,b.jsx)("thead",{children:(0,b.jsxs)("tr",{className:"border-b border-border bg-muted/50",children:[(0,b.jsx)("th",{scope:"col",className:"px-4 py-3 text-left text-sm font-semibold text-foreground w-12",children:(0,b.jsx)("span",{className:"sr-only",children:"Icon"})}),(0,b.jsx)("th",{scope:"col",className:"px-4 py-3 text-left text-sm font-semibold text-foreground",children:"Project"}),(0,b.jsx)("th",{scope:"col",className:"px-4 py-3 text-left text-sm font-semibold text-foreground",children:"Session ID"}),(0,b.jsx)("th",{scope:"col",className:"px-4 py-3 text-left text-sm font-semibold text-foreground",children:"Modified"}),c.filter(a=>"date"!==a.type).map(a=>(0,b.jsx)("th",{scope:"col",className:"px-4 py-3 text-left text-sm font-semibold text-foreground",children:a.label},a.name))]})}),(0,b.jsx)("tbody",{children:0===a.length?(0,b.jsx)("tr",{children:(0,b.jsx)("td",{colSpan:4+c.filter(a=>"date"!==a.type).length,className:"px-4 py-8 text-center text-muted-foreground",children:"No sessions found matching the filters."})}):a.map(a=>(0,b.jsxs)("tr",{className:"border-b border-border hover:bg-muted/50 transition-colors",children:[(0,b.jsx)("td",{className:"px-4 py-3",children:(0,b.jsx)(p.File,{className:"w-5 h-5 text-primary"})}),(0,b.jsx)("td",{className:"px-4 py-3 text-sm text-foreground",children:(0,b.jsx)(o.default,{href:`/project/${encodeURIComponent(a.projectName)}`,className:"hover:text-primary transition-colors",children:a.projectName})}),(0,b.jsx)("td",{className:"px-4 py-3 text-sm max-w-xs",children:(0,b.jsx)(o.default,{href:`/project/${encodeURIComponent(a.projectName)}/session/${encodeURIComponent(a.sessionId)}`,className:"font-semibold text-foreground hover:text-primary transition-colors break-words break-all",children:a.sessionId})}),(0,b.jsx)("td",{className:"px-4 py-3 text-sm text-muted-foreground",children:a.lastModifiedFormatted}),c.filter(a=>"date"!==a.type).map(c=>{var d;return(0,b.jsx)("td",{className:"px-4 py-3 text-sm text-muted-foreground",children:void 0===(d=a.filterValues[c.name])?"-":"boolean"==typeof d?d?"Yes":"No":String(d)},c.name)})]},`${a.projectName}/${a.sessionId}`))})]})}),e>0&&i>1&&(0,b.jsx)(q.default,{currentPage:f,totalPages:i,onPageChange:h})]})]})}var s=a.i(96221);function t(a,b){let c={};for(let d of b){let b=a[d.name];if(b)switch(d.type){case"boolean":c[d.name]={type:"boolean",value:b};break;case"number":c[d.name]={type:"number",min:b.min,max:b.max};break;case"string":c[d.name]={type:"string",selected:Array.from(b)};break;case"date":c[d.name]={type:"date",from:b.from,to:b.to}}}return c}function u(a,b){for(let c of b){let b=a[c.name];if(b)switch(c.type){case"boolean":if("all"!==b)return!0;break;case"number":if(b.min!==c.min||b.max!==c.max)return!0;break;case"string":if(b.size!==c.values.length)return!0;break;case"date":if(null!==b.from||null!==b.to)return!0}}return!1}a.s(["default",0,function({viewName:a}){let d=(0,f.useUrlParams)(),h=(0,c.useRef)(null);null===h.current&&(h.current=d.getAll());let k=(0,c.useRef)(!1),[m,o]=(0,c.useState)(null),[p,q]=(0,c.useState)([]),[v,w]=(0,c.useState)(!0),[x,y]=(0,c.useState)(null),[z,A]=(0,c.useState)(!1),[B,C]=(0,c.useState)({}),[D,E]=(0,c.useState)(()=>(0,g.paramToPage)(d.get("page"))),F=(0,c.useRef)(null);(0,c.useEffect)(()=>()=>{F.current&&clearTimeout(F.current)},[]);let G=(0,c.useCallback)(async(b,c)=>{w(!0),y(null);try{let d=await e(a,{filters:b,page:c??1,pageSize:25});d.ok?d.hasFilters?(o(d.payload),d.payload.filterMeta.length>0&&q(d.payload.filterMeta)):A(!0):y(d.error)}catch(a){y(a instanceof Error?a.message:String(a))}finally{w(!1)}},[a]);(0,c.useEffect)(()=>{G().then(()=>{})},[G]),(0,c.useEffect)(()=>{if(p.length>0&&0===Object.keys(B).length){let a=function(a){let b={};for(let c of a)switch(c.type){case"boolean":b[c.name]="all";break;case"number":b[c.name]={min:c.min,max:c.max};break;case"string":b[c.name]=new Set(c.values);break;case"date":b[c.name]={from:null,to:null}}return b}(p),b=h.current,c=!1;if(b)for(let d of p){let e=b.get(d.name),f=(0,g.paramToActiveFilter)(d,e);null!==f&&(a[d.name]=f,c=!0)}if(C(a),k.current=!0,c||b&&(0,g.paramToPage)(b.get("page"))>1){let c=b?(0,g.paramToPage)(b.get("page")):1,d=u(a,p)?t(a,p):void 0;E(c),G(d,c)}}},[p]);let H=(0,c.useCallback)((a,b)=>{if(!k.current)return;let c={page:(0,g.pageToParam)(b)};for(let b of p)c[b.name]=(0,g.activeFilterToParam)(b,a[b.name]);d.setAll(c)},[p,d]),I=(0,c.useCallback)((a,b)=>{C(c=>{let d={...c,[a]:b};return F.current&&clearTimeout(F.current),F.current=setTimeout(()=>{let a=u(d,p)?t(d,p):void 0;E(1),G(a,1),H(d,1)},300),d})},[p,G,H]),J=(0,c.useCallback)(a=>{E(a),G(u(B,p)?t(B,p):void 0,a),H(B,a)},[B,p,G,H]);if(z)return(0,b.jsxs)("div",{className:"bg-card border border-border rounded-lg p-6 text-center",children:[(0,b.jsx)("p",{className:"text-muted-foreground mb-2",children:"No filters are registered for this view."}),(0,b.jsxs)("p",{className:"text-sm text-muted-foreground",children:["Use ",(0,b.jsx)("code",{className:"text-foreground bg-muted px-1 py-0.5 rounded",children:"app.dashboard.view()"})," or"," ",(0,b.jsx)("code",{className:"text-foreground bg-muted px-1 py-0.5 rounded",children:"app.dashboard.filter()"})," in your evals file to register filters."]})]});if(v&&!m)return(0,b.jsxs)("div",{className:"flex items-center justify-center py-16",children:[(0,b.jsx)(s.Loader2,{className:"w-6 h-6 text-primary animate-spin mr-2"}),(0,b.jsx)("span",{className:"text-muted-foreground",children:"Computing dashboard filters..."})]});if(x&&!m)return(0,b.jsxs)("div",{className:"bg-destructive/10 border border-destructive/20 rounded-lg p-4",children:[(0,b.jsx)("p",{className:"text-sm text-destructive font-medium",children:"Failed to load dashboard"}),(0,b.jsx)("p",{className:"text-sm text-destructive/80 mt-1",children:x}),(0,b.jsx)("button",{onClick:()=>G(),className:"mt-3 px-3 py-1.5 text-sm bg-primary text-primary-foreground rounded-md hover:bg-primary/90 transition-colors",children:"Retry"})]});if(!m)return null;let K=p.length>0?p:m.filterMeta;return(0,b.jsxs)("div",{className:"space-y-6",children:[K.length>0&&(0,b.jsx)("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:K.map(a=>{switch(a.type){case"boolean":return(0,b.jsx)(i,{meta:a,value:B[a.name]??"all",onChange:b=>I(a.name,b)},a.name);case"number":return(0,b.jsx)(j,{meta:a,value:B[a.name]??{min:a.min,max:a.max},onChange:b=>I(a.name,b)},a.name);case"string":return(0,b.jsx)(l,{meta:a,value:B[a.name]??new Set(a.values),onChange:b=>I(a.name,b)},a.name);case"date":return(0,b.jsx)(n,{meta:a,value:B[a.name]??{from:null,to:null},onChange:b=>I(a.name,b)},a.name)}})}),(0,b.jsxs)("div",{className:"text-xs text-muted-foreground",children:["Computed in ",m.totalDurationMs,"ms",v&&" (updating...)"]}),(0,b.jsx)(r,{sessions:m.sessions,filterMeta:K,totalCount:m.totalCount,matchingCount:m.matchingCount,page:m.page,pageSize:m.pageSize,onPageChange:J})]})}],68765)},43911,a=>{"use strict";var b=a.i(87924),c=a.i(72131),d=a.i(5050);let e=(0,d.createServerReference)("40ff2663ba3c833203a2219d3ec0e6aa07b07c7303",d.callServer,void 0,d.findSourceMapURL,"computeAggregates"),f=(0,a.i(70106).default)("arrow-up-down",[["path",{d:"m21 16-4 4-4-4",key:"f6ql7i"}],["path",{d:"M17 20V4",key:"1ejh1v"}],["path",{d:"m3 8 4-4 4 4",key:"11wl7u"}],["path",{d:"M7 4v16",key:"1glfcx"}]]);function g({rows:a,columns:d}){let[e,h]=(0,c.useState)(null),[i,j]=(0,c.useState)("asc");if(0===a.length)return(0,b.jsx)("p",{className:"text-sm text-muted-foreground",children:"No data returned from reduce function."});let k=e?[...a].sort((a,b)=>{let c="asc"===i?1:-1,d=a[e],f=b[e];return void 0===d&&void 0===f?0:void 0===d?1:void 0===f?-1:"string"==typeof d&&"string"==typeof f?d.localeCompare(f)*c:"boolean"==typeof d&&"boolean"==typeof f?(Number(d)-Number(f))*c:"number"==typeof d&&"number"==typeof f?(d-f)*c:String(d).localeCompare(String(f))*c}):a;return(0,b.jsx)("div",{className:"overflow-x-auto",children:(0,b.jsxs)("table",{className:"w-full text-sm",children:[(0,b.jsx)("thead",{children:(0,b.jsx)("tr",{className:"border-b border-border",children:d.map(a=>(0,b.jsx)("th",{className:"px-3 py-2 text-left text-xs font-medium text-muted-foreground cursor-pointer hover:text-foreground select-none",onClick:()=>{e===a?j(a=>"asc"===a?"desc":"asc"):(h(a),j("desc"))},children:(0,b.jsxs)("span",{className:"inline-flex items-center gap-1",children:[a,(0,b.jsx)(f,{className:"w-3 h-3"})]})},a))})}),(0,b.jsx)("tbody",{children:k.map((a,c)=>(0,b.jsx)("tr",{className:"border-b border-border/50 hover:bg-muted/50",children:d.map(c=>{var d;return(0,b.jsx)("td",{className:"px-3 py-2 text-foreground",children:null==(d=a[c])?"—":"boolean"==typeof d?d?"Yes":"No":"number"==typeof d?Number.isInteger(d)?d.toLocaleString():d.toFixed(4):String(d)},c)})},c))})]})})}function h({aggregate:a}){return(0,b.jsxs)("div",{className:"bg-card border border-border rounded-lg p-4",children:[(0,b.jsx)("h4",{className:"text-sm font-medium text-foreground mb-3",children:a.label}),(0,b.jsx)(g,{rows:a.rows,columns:a.columns})]})}var i=a.i(96221);a.s(["default",0,function({viewName:a}){let[d,f]=(0,c.useState)(null),[g,j]=(0,c.useState)(!0),[k,l]=(0,c.useState)(null),m=(0,c.useCallback)(async()=>{j(!0),l(null);try{let b=await e(a);b.ok?b.hasAggregates&&f(b.payload):l(b.error)}catch(a){l(a instanceof Error?a.message:String(a))}finally{j(!1)}},[a]);return((0,c.useEffect)(()=>{m()},[m]),g&&!d)?(0,b.jsxs)("div",{className:"flex items-center justify-center py-8",children:[(0,b.jsx)(i.Loader2,{className:"w-5 h-5 text-primary animate-spin mr-2"}),(0,b.jsx)("span",{className:"text-sm text-muted-foreground",children:"Computing aggregates..."})]}):k&&!d?(0,b.jsxs)("div",{className:"bg-destructive/10 border border-destructive/20 rounded-lg p-4",children:[(0,b.jsx)("p",{className:"text-sm text-destructive font-medium",children:"Failed to compute aggregates"}),(0,b.jsx)("p",{className:"text-sm text-destructive/80 mt-1",children:k}),(0,b.jsx)("button",{onClick:()=>m(),className:"mt-3 px-3 py-1.5 text-sm bg-primary text-primary-foreground rounded-md hover:bg-primary/90 transition-colors",children:"Retry"})]}):d&&0!==d.aggregates.length?(0,b.jsxs)("div",{className:"space-y-4",children:[(0,b.jsxs)("div",{className:"flex items-center justify-between",children:[(0,b.jsx)("h3",{className:"text-lg font-medium text-foreground",children:"Aggregates"}),(0,b.jsxs)("span",{className:"text-xs text-muted-foreground",children:[d.totalSessions," sessions, ",d.totalDurationMs,"ms",g&&" (updating...)"]})]}),d.aggregates.map(a=>(0,b.jsx)(h,{aggregate:a},a.name))]}):null}],43911)}];
|
|
2
2
|
|
|
3
3
|
//# sourceMappingURL=_0kfjwwu._.js.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
module.exports=[50871,61542,a=>{"use strict";async function b(a,b,c){let d=[],e=performance.now(),f=globalThis.__CLAUDEYE_CONDITION_REGISTRY__??null,g=!1;if(f)try{await f(b)||(g=!0)}catch{g=!0}if(g)for(let b of a)d.push(c.skipResult(b));else{let e=a.map(async a=>{if(a.condition)try{if(!await a.condition(b))return c.skipResult(a)}catch(b){return c.errorResult(a,`Condition error: ${b instanceof Error?b.message:String(b)}`,0)}let d=performance.now();try{let e=await a.fn(b),f=Math.round(performance.now()-d);return c.successResult(a,e,f)}catch(e){let b=Math.round(performance.now()-d);return c.errorResult(a,e instanceof Error?e.message:String(e),b)}});for(let a of(await Promise.allSettled(e)))d.push("fulfilled"===a.status?a.value:c.unexpectedResult())}let h=Math.round(performance.now()-e);return c.buildSummary(d,h)}a.s(["runAll",0,b],50871);var c=a.i(92246);a.s(["calculateLogStats",0,function(a){let b=0,d=0,e=0,f=0,g=0,h=new Set;for(let c of a)if("user"===c.type&&b++,"queue-operation"===c.type&&g++,"assistant"===c.type){for(let a of(d++,c.message.content))"tool_use"===a.type&&("Task"===a.name&&(a.subagentType||a.subagentId)?f++:e++);c.message.model&&h.add(c.message.model)}let i="";if(a.length>=2){let b=a[a.length-1].timestampMs-a[0].timestampMs;i=(0,c.formatDuration)(b)}return{turnCount:g,userCount:b,assistantCount:d,toolCallCount:e,subagentCount:f,duration:i,models:Array.from(h)}}],61542)},31810,a=>{"use strict";var b=a.i(46325),c=a.i(50871);async function d(a,d,e,f,g,h){let i=g??(0,b.getRegisteredEnrichers)(),j={entries:a,stats:d,projectName:e,sessionId:f,source:"session",...h};return(0,c.runAll)(i,j,{skipResult:a=>({name:a.name,data:{},durationMs:0,skipped:!0}),successResult:(a,b,c)=>({name:a.name,data:b,durationMs:c}),errorResult:(a,b,c)=>({name:a.name,data:{},durationMs:c,error:b}),unexpectedResult:()=>({name:"?",data:{},durationMs:0,error:"Unexpected rejection"}),buildSummary:(a,b)=>{let c=0,d=0;for(let b of a)b.skipped?d++:b.error&&c++;return{results:a,totalDurationMs:b,errorCount:c,skippedCount:d}}})}a.s(["runAllEnrichers",0,d])},86736,a=>{"use strict";var b=a.i(37936),c=a.i(62733),d=a.i(46325),e=a.i(31810),f=a.i(83397),g=a.i(61542);a.i(651);var h=a.i(46721),i=a.i(70427);async function j(a,b,k,l=!1){try{await (0,c.ensureEvalsLoaded)();let j=(0,d.getSessionScopedEnrichers)().find(a=>a.name===k);if(!j)return{ok:!1,error:`Enricher "${k}" not found`};let m=await (0,h.hashSessionFile)(a,b);if(!l&&m){let c=(0,h.hashItemCode)(j.fn),d=await (0,i.getPerItemCacheWithHook)("enrichments",a,b,j.name,c,m);if(d)return{ok:!0,result:d.value}}let{entries:n,rawLines:o}=await (0,f.getCachedSessionLog)(a,b),p=(0,g.calculateLogStats)(n),q=(await (0,e.runAllEnrichers)(o,p,a,b,[j],{source:"session"})).results[0];if(!q)return{ok:!1,error:"No result returned from enricher"};if(m){let c=(0,h.hashItemCode)(j.fn);await (0,i.setPerItemCache)("enrichments",a,b,j.name,c,q,m)}return{ok:!0,result:q}}catch(a){return{ok:!1,error:a instanceof Error?a.message:String(a)}}}(0,a.i(13095).ensureServerEntryExports)([j]),(0,b.registerServerReference)(j,"
|
|
1
|
+
module.exports=[50871,61542,a=>{"use strict";async function b(a,b,c){let d=[],e=performance.now(),f=globalThis.__CLAUDEYE_CONDITION_REGISTRY__??null,g=!1;if(f)try{await f(b)||(g=!0)}catch{g=!0}if(g)for(let b of a)d.push(c.skipResult(b));else{let e=a.map(async a=>{if(a.condition)try{if(!await a.condition(b))return c.skipResult(a)}catch(b){return c.errorResult(a,`Condition error: ${b instanceof Error?b.message:String(b)}`,0)}let d=performance.now();try{let e=await a.fn(b),f=Math.round(performance.now()-d);return c.successResult(a,e,f)}catch(e){let b=Math.round(performance.now()-d);return c.errorResult(a,e instanceof Error?e.message:String(e),b)}});for(let a of(await Promise.allSettled(e)))d.push("fulfilled"===a.status?a.value:c.unexpectedResult())}let h=Math.round(performance.now()-e);return c.buildSummary(d,h)}a.s(["runAll",0,b],50871);var c=a.i(92246);a.s(["calculateLogStats",0,function(a){let b=0,d=0,e=0,f=0,g=0,h=new Set;for(let c of a)if("user"===c.type&&b++,"queue-operation"===c.type&&g++,"assistant"===c.type){for(let a of(d++,c.message.content))"tool_use"===a.type&&("Task"===a.name&&(a.subagentType||a.subagentId)?f++:e++);c.message.model&&h.add(c.message.model)}let i="";if(a.length>=2){let b=a[a.length-1].timestampMs-a[0].timestampMs;i=(0,c.formatDuration)(b)}return{turnCount:g,userCount:b,assistantCount:d,toolCallCount:e,subagentCount:f,duration:i,models:Array.from(h)}}],61542)},31810,a=>{"use strict";var b=a.i(46325),c=a.i(50871);async function d(a,d,e,f,g,h){let i=g??(0,b.getRegisteredEnrichers)(),j={entries:a,stats:d,projectName:e,sessionId:f,source:"session",...h};return(0,c.runAll)(i,j,{skipResult:a=>({name:a.name,data:{},durationMs:0,skipped:!0}),successResult:(a,b,c)=>({name:a.name,data:b,durationMs:c}),errorResult:(a,b,c)=>({name:a.name,data:{},durationMs:c,error:b}),unexpectedResult:()=>({name:"?",data:{},durationMs:0,error:"Unexpected rejection"}),buildSummary:(a,b)=>{let c=0,d=0;for(let b of a)b.skipped?d++:b.error&&c++;return{results:a,totalDurationMs:b,errorCount:c,skippedCount:d}}})}a.s(["runAllEnrichers",0,d])},86736,a=>{"use strict";var b=a.i(37936),c=a.i(62733),d=a.i(46325),e=a.i(31810),f=a.i(83397),g=a.i(61542);a.i(651);var h=a.i(46721),i=a.i(70427);async function j(a,b,k,l=!1){try{await (0,c.ensureEvalsLoaded)();let j=(0,d.getSessionScopedEnrichers)().find(a=>a.name===k);if(!j)return{ok:!1,error:`Enricher "${k}" not found`};let m=await (0,h.hashSessionFile)(a,b);if(!l&&m){let c=(0,h.hashItemCode)(j.fn),d=await (0,i.getPerItemCacheWithHook)("enrichments",a,b,j.name,c,m);if(d)return{ok:!0,result:d.value}}let{entries:n,rawLines:o}=await (0,f.getCachedSessionLog)(a,b),p=(0,g.calculateLogStats)(n),q=(await (0,e.runAllEnrichers)(o,p,a,b,[j],{source:"session"})).results[0];if(!q)return{ok:!1,error:"No result returned from enricher"};if(m){let c=(0,h.hashItemCode)(j.fn);await (0,i.setPerItemCache)("enrichments",a,b,j.name,c,q,m)}return{ok:!0,result:q}}catch(a){return{ok:!1,error:a instanceof Error?a.message:String(a)}}}(0,a.i(13095).ensureServerEntryExports)([j]),(0,b.registerServerReference)(j,"7881b1266c1a74a89f2eb156d8656dc984951c10a7",null),a.s(["processSessionEnrichment",0,j])}];
|
|
2
2
|
|
|
3
3
|
//# sourceMappingURL=_0ndt7tj._.js.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
module.exports=[10765,a=>{"use strict";var b=a.i(87924),c=a.i(72131),d=a.i(50944),e=a.i(5050);let f=(0,e.createServerReference)("000ceea366f533fab7a70153fe8f5b7ecd5dc0fc70",e.callServer,void 0,e.findSourceMapURL,"getTelemetryConfig");function g(a,b){}let h=(0,c.createContext)(void 0);a.s(["PostHogProvider",0,function({children:a}){let e=(0,d.usePathname)(),i=(0,c.useRef)(null),j=(0,c.useRef)(!1);(0,c.useEffect)(()=>{let a=!1;return f().then(b=>{a||(j.current=!0,g("$pageview"),i.current=window.location.pathname)}),()=>{a=!0}},[]),(0,c.useEffect)(()=>{j.current&&i.current!==e&&(i.current=e,g("$pageview"))},[e]);let k=c.default.useCallback((a,b)=>{g(a,b)},[]);return(0,b.jsx)(h.Provider,{value:{capture:k},children:a})},"usePostHog",0,function(){let a=(0,c.useContext)(h);if(void 0===a)throw Error("usePostHog must be used within a PostHogProvider");return a}],10765)},10815,a=>{"use strict";var b=a.i(87924),c=a.i(72131),d=a.i(38246),e=a.i(50944),f=a.i(70106);let g=(0,f.default)("layout-dashboard",[["rect",{width:"7",height:"9",x:"3",y:"3",rx:"1",key:"10lvy0"}],["rect",{width:"7",height:"5",x:"14",y:"3",rx:"1",key:"16une8"}],["rect",{width:"7",height:"9",x:"14",y:"12",rx:"1",key:"1hutg5"}],["rect",{width:"7",height:"5",x:"3",y:"16",rx:"1",key:"ldoo1y"}]]),h=(0,f.default)("folder-open",[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]]),i=(0,f.default)("log-out",[["path",{d:"m16 17 5-5-5-5",key:"1bji2h"}],["path",{d:"M21 12H9",key:"dn1m92"}],["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}]]);var j=a.i(3314),k=a.i(35960);let l=(0,f.default)("sun",[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]]),m=(0,f.default)("moon",[["path",{d:"M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401",key:"kfwtm"}]]);var n=a.i(18200),o=a.i(97895);let p=c.forwardRef(({className:a,variant:c="default",size:d="default",...e},f)=>(0,b.jsx)("button",{className:(0,o.cn)("inline-flex items-center justify-center rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:opacity-50 disabled:pointer-events-none",{"bg-primary text-primary-foreground hover:bg-primary/90":"default"===c,"hover:bg-muted hover:text-muted-foreground":"ghost"===c,"border border-border bg-background hover:bg-muted":"outline"===c,"h-10 py-2 px-4":"default"===d,"h-10 w-10":"icon"===d,"h-9 px-3":"sm"===d,"h-11 px-8":"lg"===d},a),ref:f,...e}));p.displayName="Button";let q=()=>{let{theme:a,setTheme:c}=(0,n.useTheme)();return(0,b.jsxs)(p,{variant:"ghost",size:"icon",onClick:()=>{c("light"===a?"dark":"light")},className:"relative","aria-label":`Switch to ${"light"===a?"dark":"light"} mode`,children:[(0,b.jsx)(l,{className:`h-[1.2rem] w-[1.2rem] transition-all ${"light"===a?"rotate-0 scale-100":"rotate-90 scale-0"}`}),(0,b.jsx)(m,{className:`absolute h-[1.2rem] w-[1.2rem] transition-all ${"dark"===a?"rotate-0 scale-100":"rotate-90 scale-0"}`})]})},r=(0,f.default)("mail",[["path",{d:"m22 7-8.991 5.727a2 2 0 0 1-2.009 0L2 7",key:"132q7q"}],["rect",{x:"2",y:"4",width:"20",height:"16",rx:"2",key:"izxlao"}]]),s=(0,f.default)("lightbulb",[["path",{d:"M15 14c.2-1 .7-1.7 1.5-2.5 1-.9 1.5-2.2 1.5-3.5A6 6 0 0 0 6 8c0 1 .2 2.2 1.5 3.5.7.7 1.3 1.5 1.5 2.5",key:"1gvzjb"}],["path",{d:"M9 18h6",key:"x1upvd"}],["path",{d:"M10 22h4",key:"ceow96"}]]),t=(0,f.default)("bug",[["path",{d:"M12 20v-9",key:"1qisl0"}],["path",{d:"M14 7a4 4 0 0 1 4 4v3a6 6 0 0 1-12 0v-3a4 4 0 0 1 4-4z",key:"uouzyp"}],["path",{d:"M14.12 3.88 16 2",key:"qol33r"}],["path",{d:"M21 21a4 4 0 0 0-3.81-4",key:"1b0z45"}],["path",{d:"M21 5a4 4 0 0 1-3.55 3.97",key:"5cxbf6"}],["path",{d:"M22 13h-4",key:"1jl80f"}],["path",{d:"M3 21a4 4 0 0 1 3.81-4",key:"1fjd4g"}],["path",{d:"M3 5a4 4 0 0 0 3.55 3.97",key:"1d7oge"}],["path",{d:"M6 13H2",key:"82j7cp"}],["path",{d:"m8 2 1.88 1.88",key:"fmnt4t"}],["path",{d:"M9 7.13V6a3 3 0 1 1 6 0v1.13",key:"1vgav8"}]]),u=(0,f.default)("message-square",[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",key:"18887p"}]]);var v=a.i(5784);let w="claudeye@exosphere.host",x=[{label:"Request a Feature",icon:s,subject:"Feature Request: "},{label:"Report a Bug",icon:t,subject:"Bug Report: "},{label:"General Inquiry",icon:u,subject:"General Inquiry: "}],y=()=>{let[a,d]=(0,c.useState)(!1),e=(0,c.useRef)(null);(0,c.useEffect)(()=>{let a=a=>{e.current&&!e.current.contains(a.target)&&d(!1)};return document.addEventListener("mousedown",a),()=>document.removeEventListener("mousedown",a)},[]);let f=(0,c.useCallback)(b=>{"Escape"===b.key&&a&&d(!1)},[a]);return(0,b.jsxs)("div",{ref:e,className:"relative",onKeyDown:f,children:[(0,b.jsxs)(p,{variant:"ghost",size:"sm",onClick:()=>d(a=>!a),"aria-expanded":a,"aria-haspopup":"true",className:"flex items-center gap-1.5 text-muted-foreground hover:text-foreground",children:[(0,b.jsx)(r,{className:"h-4 w-4"}),(0,b.jsx)("span",{className:"hidden sm:inline text-xs",children:"Reach Us"}),(0,b.jsx)(v.ChevronDown,{className:`h-3 w-3 transition-transform ${a?"rotate-180":""}`})]}),a&&(0,b.jsxs)("div",{className:"absolute right-0 mt-2 w-56 rounded-lg border border-border bg-card shadow-lg z-50",role:"menu",children:[(0,b.jsxs)("div",{className:"px-3 py-2 border-b border-border",children:[(0,b.jsx)("p",{className:"text-xs font-medium text-foreground",children:"Reach Developers"}),(0,b.jsx)("p",{className:"text-[0.65rem] text-muted-foreground mt-0.5",children:"We'd love to hear from you"})]}),(0,b.jsx)("div",{className:"py-1",children:x.map(({label:a,icon:c,subject:e})=>(0,b.jsxs)("a",{href:`mailto:${w}?subject=${encodeURIComponent(e)}`,role:"menuitem",className:"flex items-center gap-2.5 px-3 py-2 text-xs text-muted-foreground hover:text-foreground hover:bg-muted/50 transition-colors",onClick:()=>d(!1),children:[(0,b.jsx)(c,{className:"h-3.5 w-3.5 flex-shrink-0"}),a]},a))}),(0,b.jsx)("div",{className:"px-3 py-2 border-t border-border",children:(0,b.jsx)("a",{href:`mailto:${w}`,className:"text-[0.65rem] text-primary hover:text-primary/80 transition-colors",children:w})})]})]})},z=(0,f.default)("list-ordered",[["path",{d:"M11 5h10",key:"1cz7ny"}],["path",{d:"M11 12h10",key:"1438ji"}],["path",{d:"M11 19h10",key:"11t30w"}],["path",{d:"M4 4h1v5",key:"10yrso"}],["path",{d:"M4 9h2",key:"r1h2o0"}],["path",{d:"M6.5 20H3.4c0-1 2.6-1.925 2.6-3.5a1.5 1.5 0 0 0-2.6-1.02",key:"xtkcd5"}]]);function A({type:a}){let c="eval"===a?"bg-blue-100 text-blue-700 dark:bg-blue-900/30 dark:text-blue-400":"action"===a?"bg-amber-100 text-amber-700 dark:bg-amber-900/30 dark:text-amber-400":"bg-purple-100 text-purple-700 dark:bg-purple-900/30 dark:text-purple-400";return(0,b.jsx)("span",{className:`inline-flex items-center rounded px-1 py-0.5 text-[0.6rem] font-medium leading-none ${c}`,children:a.toUpperCase()})}let B=()=>{let[a,e]=(0,c.useState)(!1),[f,g]=(0,c.useState)(null),h=(0,c.useRef)(null),i=(0,c.useCallback)(async()=>{try{let a=await fetch("/api/queue-status",{cache:"no-store"});a.ok&&g(await a.json())}catch{}},[]);(0,c.useEffect)(()=>{let b=a?2e3:5e3,c=setTimeout(i,0),d=setInterval(i,b);return()=>{clearTimeout(c),clearInterval(d)}},[a,i]),(0,c.useEffect)(()=>{let a=a=>{h.current&&!h.current.contains(a.target)&&e(!1)};return document.addEventListener("mousedown",a),()=>document.removeEventListener("mousedown",a)},[]);let j=(0,c.useCallback)(b=>{"Escape"===b.key&&a&&e(!1)},[a]),k=f?.pending.length??0,l=f?.processing.length??0,m=k+l;return(0,b.jsxs)("div",{ref:h,className:"relative",onKeyDown:j,children:[(0,b.jsxs)(p,{variant:"ghost",size:"sm",onClick:()=>e(a=>!a),"aria-expanded":a,"aria-haspopup":"true",className:"relative flex items-center gap-1.5 text-muted-foreground hover:text-foreground",children:[(0,b.jsx)(z,{className:"h-4 w-4"}),m>0?(0,b.jsx)("span",{className:"absolute -top-1 -right-1 flex h-4 min-w-4 items-center justify-center rounded-full bg-primary px-1 text-[0.6rem] font-medium text-primary-foreground",children:m}):null]}),a&&(0,b.jsxs)("div",{className:"absolute right-0 mt-2 w-72 rounded-lg border border-border bg-card shadow-lg z-50",children:[(0,b.jsxs)("div",{className:"px-3 py-2 border-b border-border",children:[(0,b.jsx)("p",{className:"text-xs font-medium text-foreground",children:"Queue"}),f&&(0,b.jsxs)("p",{className:"text-[0.65rem] text-muted-foreground mt-0.5",children:[k," queued · ",l," processing"]})]}),(0,b.jsx)("div",{className:"max-h-64 overflow-y-auto",children:f?0===f.processing.length&&0===f.pending.length?(0,b.jsx)("p",{className:"px-3 py-4 text-xs text-muted-foreground text-center",children:"Queue is empty"}):(0,b.jsxs)("div",{className:"py-1",children:[f.processing.slice(0,7).map(a=>(0,b.jsxs)("div",{className:"flex items-center gap-2 px-3 py-1.5 text-xs",children:[(0,b.jsx)("span",{className:"h-1.5 w-1.5 rounded-full bg-blue-500 animate-pulse flex-shrink-0"}),(0,b.jsx)(A,{type:a.type}),(0,b.jsx)("span",{className:"text-foreground truncate flex-1 font-mono text-[0.65rem]",children:a.itemName})]},a.key)),f.processing.length>7&&(0,b.jsxs)("p",{className:"px-3 py-1 text-[0.6rem] text-muted-foreground",children:["...and ",f.processing.length-7," more"]}),f.pending.slice(0,5).map(a=>(0,b.jsxs)("div",{className:"flex items-center gap-2 px-3 py-1.5 text-xs",children:[(0,b.jsx)("span",{className:"h-1.5 w-1.5 rounded-full bg-muted-foreground/40 flex-shrink-0"}),(0,b.jsx)(A,{type:a.type}),(0,b.jsx)("span",{className:"text-muted-foreground truncate flex-1 font-mono text-[0.65rem]",children:a.itemName}),(0,b.jsx)("span",{className:`text-[0.6rem] font-medium flex-shrink-0 ${a.priority<=0?"text-red-600 dark:text-red-400":"text-muted-foreground"}`,children:a.priority<=0?"HIGH":"LOW"})]},a.key)),f.pending.length>5&&(0,b.jsxs)("p",{className:"px-3 py-1 text-[0.6rem] text-muted-foreground",children:["...and ",f.pending.length-5," more queued"]})]}):(0,b.jsx)("p",{className:"px-3 py-4 text-xs text-muted-foreground text-center",children:"Loading..."})}),f&&f.recentErrors.length>0&&(0,b.jsx)("div",{className:"px-3 py-2 border-t border-border",children:(0,b.jsxs)("p",{className:"text-[0.6rem] text-red-600 dark:text-red-400",children:[f.recentErrors.length," recent error",1!==f.recentErrors.length?"s":""]})}),(0,b.jsx)("div",{className:"px-3 py-2 border-t border-border text-center",children:(0,b.jsx)(d.default,{href:"/queue",className:"text-xs text-muted-foreground hover:text-foreground transition-colors",onClick:()=>e(!1),children:"View details"})})]})]})};var C=a.i(69520),D=a.i(6236);let E=[{label:"Off",value:0},{label:"5s",value:5},{label:"10s",value:10},{label:"30s",value:30}];function F({className:a}){let d=(0,e.useRouter)(),[f,g]=(0,c.useTransition)(),{intervalSec:h,setIntervalSec:i}=(0,D.useAutoRefresh)(),j=(0,c.useCallback)(()=>{g(()=>d.refresh())},[d]);(0,c.useEffect)(()=>{if(h<=0)return;let a=setInterval(j,1e3*h);return()=>clearInterval(a)},[h,j]);let k=h>0;return(0,b.jsxs)("div",{className:(0,o.cn)("inline-flex items-center rounded-lg border border-border bg-muted/50 p-0.5 gap-0.5",a),children:[(0,b.jsx)("button",{onClick:j,title:"Refresh",className:(0,o.cn)("inline-flex items-center justify-center rounded-md p-1.5 transition-colors",k?"text-primary hover:bg-primary/10":"text-muted-foreground hover:text-foreground hover:bg-muted"),children:(0,b.jsx)(C.RefreshCw,{className:(0,o.cn)("w-3.5 h-3.5",f&&"animate-spin")})}),(0,b.jsx)("div",{className:"w-px h-4 bg-border"}),(0,b.jsx)("div",{className:"inline-flex items-center gap-0.5",role:"group","aria-label":"Auto-refresh interval",children:E.map(a=>(0,b.jsx)("button",{onClick:()=>i(a.value),"aria-pressed":h===a.value,className:(0,o.cn)("px-2 py-1 text-[11px] font-medium rounded-md transition-colors",h===a.value?"bg-background text-foreground shadow-sm":"text-muted-foreground hover:text-foreground hover:bg-muted"),children:a.label},a.value))})]})}var G=a.i(5050);let H=(0,G.createServerReference)("00aa012b356878733a4434bfaf41ab00ba51cd2e0a",G.callServer,void 0,G.findSourceMapURL,"logout"),I=[{href:"/",label:"Projects",icon:h},{href:"/dashboard",label:"Dashboard",icon:g},{href:"/hooks",label:"Hooks",icon:j.Shield}];a.s(["Navbar",0,()=>{let a=(0,e.usePathname)(),f=(0,e.useRouter)(),[g,h]=(0,c.useState)(!1);async function j(){let a=await H();h(!1),f.push(a.redirectTo)}return(0,c.useEffect)(()=>{h(document.cookie.split(";").map(a=>a.trim()).some(a=>a.startsWith("claudeye_auth=")))},[a]),(0,b.jsx)("header",{className:"relative z-50 border-b border-border bg-card/50 backdrop-blur supports-[backdrop-filter]:bg-card/50",children:(0,b.jsx)("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:(0,b.jsxs)("div",{className:"flex items-center justify-between h-16",children:[(0,b.jsxs)("div",{className:"flex items-center gap-3",children:[(0,b.jsxs)("a",{href:"https://claudeye.exosphere.host",target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-3 hover:opacity-80 transition-opacity",children:[(0,b.jsx)(k.Logo,{width:28,height:28,className:"flex-shrink-0"}),(0,b.jsx)("h1",{className:"text-lg font-semibold text-foreground leading-tight tracking-tight",children:"Claudeye"})]}),(0,b.jsx)("div",{className:"w-px h-8 bg-border ml-2"}),(0,b.jsx)("nav",{className:"flex items-center h-16",children:I.map(({href:c,label:e,icon:f})=>{let g="/"===c?"/"===a||a.startsWith("/project"):a.startsWith(c);return(0,b.jsxs)(d.default,{href:c,className:`relative flex items-center gap-1.5 px-3 h-full text-sm transition-colors ${g?"text-foreground font-medium":"text-muted-foreground hover:text-foreground"}`,children:[(0,b.jsx)(f,{className:`w-4 h-4 ${g?"text-primary":""}`}),e,(0,b.jsx)("span",{className:`absolute inset-x-1 bottom-0 h-[2px] rounded-full transition-all ${g?"bg-primary":"bg-transparent group-hover:bg-muted"}`})]},c)})})]}),(0,b.jsxs)("div",{className:"flex items-center gap-1",children:[(0,b.jsx)(F,{}),(0,b.jsx)("div",{className:"w-px h-6 bg-border mx-1"}),(0,b.jsx)(y,{}),(0,b.jsx)(q,{}),(0,b.jsx)(B,{}),g&&(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("div",{className:"w-px h-6 bg-border mx-1"}),(0,b.jsxs)("button",{onClick:j,className:"inline-flex items-center gap-1.5 rounded-md px-2.5 py-1.5 text-sm text-muted-foreground hover:text-foreground hover:bg-muted transition-colors",title:"Sign out",children:[(0,b.jsx)(i,{className:"w-4 h-4"}),(0,b.jsx)("span",{className:"hidden sm:inline",children:"Sign out"})]})]})]})]})})})}],10815)},18952,a=>{"use strict";var b=a.i(87924),c=a.i(72131);let d=[],e=0,f=new Set;function g(){for(let a of f)a()}function h(a){return f.add(a),()=>f.delete(a)}function i(){return d}function j({message:a}){let[d,e]=(0,c.useState)(!1);return(0,c.useEffect)(()=>{requestAnimationFrame(()=>e(!0));let a=setTimeout(()=>e(!1),2e3);return()=>clearTimeout(a)},[]),(0,b.jsx)("div",{className:`bg-card border border-border text-foreground text-sm px-4 py-2 rounded-lg shadow-lg transition-opacity duration-300 ${d?"opacity-100":"opacity-0"}`,children:a})}a.s(["Toaster",0,function(){let a=(0,c.useSyncExternalStore)(h,i,i);return(0,b.jsx)("div",{className:"fixed bottom-4 right-4 z-50 flex flex-col gap-2",children:a.map(a=>(0,b.jsx)(j,{message:a.message},a.id))})},"toast",0,function(a){let b=e++;d=[...d,{id:b,message:a}],g(),setTimeout(()=>{d=d.filter(a=>a.id!==b),g()},2500)}])}];
|
|
1
|
+
module.exports=[10765,a=>{"use strict";var b=a.i(87924),c=a.i(72131),d=a.i(50944),e=a.i(5050);let f=(0,e.createServerReference)("00cc4c9d360c53ffac85b77e327e86aa3faefbb566",e.callServer,void 0,e.findSourceMapURL,"getTelemetryConfig");function g(a,b){}let h=(0,c.createContext)(void 0);a.s(["PostHogProvider",0,function({children:a}){let e=(0,d.usePathname)(),i=(0,c.useRef)(null),j=(0,c.useRef)(!1);(0,c.useEffect)(()=>{let a=!1;return f().then(b=>{a||(j.current=!0,g("$pageview"),i.current=window.location.pathname)}),()=>{a=!0}},[]),(0,c.useEffect)(()=>{j.current&&i.current!==e&&(i.current=e,g("$pageview"))},[e]);let k=c.default.useCallback((a,b)=>{g(a,b)},[]);return(0,b.jsx)(h.Provider,{value:{capture:k},children:a})},"usePostHog",0,function(){let a=(0,c.useContext)(h);if(void 0===a)throw Error("usePostHog must be used within a PostHogProvider");return a}],10765)},10815,a=>{"use strict";var b=a.i(87924),c=a.i(72131),d=a.i(38246),e=a.i(50944),f=a.i(70106);let g=(0,f.default)("layout-dashboard",[["rect",{width:"7",height:"9",x:"3",y:"3",rx:"1",key:"10lvy0"}],["rect",{width:"7",height:"5",x:"14",y:"3",rx:"1",key:"16une8"}],["rect",{width:"7",height:"9",x:"14",y:"12",rx:"1",key:"1hutg5"}],["rect",{width:"7",height:"5",x:"3",y:"16",rx:"1",key:"ldoo1y"}]]),h=(0,f.default)("folder-open",[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]]),i=(0,f.default)("log-out",[["path",{d:"m16 17 5-5-5-5",key:"1bji2h"}],["path",{d:"M21 12H9",key:"dn1m92"}],["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}]]);var j=a.i(3314),k=a.i(35960);let l=(0,f.default)("sun",[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]]),m=(0,f.default)("moon",[["path",{d:"M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401",key:"kfwtm"}]]);var n=a.i(18200),o=a.i(97895);let p=c.forwardRef(({className:a,variant:c="default",size:d="default",...e},f)=>(0,b.jsx)("button",{className:(0,o.cn)("inline-flex items-center justify-center rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:opacity-50 disabled:pointer-events-none",{"bg-primary text-primary-foreground hover:bg-primary/90":"default"===c,"hover:bg-muted hover:text-muted-foreground":"ghost"===c,"border border-border bg-background hover:bg-muted":"outline"===c,"h-10 py-2 px-4":"default"===d,"h-10 w-10":"icon"===d,"h-9 px-3":"sm"===d,"h-11 px-8":"lg"===d},a),ref:f,...e}));p.displayName="Button";let q=()=>{let{theme:a,setTheme:c}=(0,n.useTheme)();return(0,b.jsxs)(p,{variant:"ghost",size:"icon",onClick:()=>{c("light"===a?"dark":"light")},className:"relative","aria-label":`Switch to ${"light"===a?"dark":"light"} mode`,children:[(0,b.jsx)(l,{className:`h-[1.2rem] w-[1.2rem] transition-all ${"light"===a?"rotate-0 scale-100":"rotate-90 scale-0"}`}),(0,b.jsx)(m,{className:`absolute h-[1.2rem] w-[1.2rem] transition-all ${"dark"===a?"rotate-0 scale-100":"rotate-90 scale-0"}`})]})},r=(0,f.default)("mail",[["path",{d:"m22 7-8.991 5.727a2 2 0 0 1-2.009 0L2 7",key:"132q7q"}],["rect",{x:"2",y:"4",width:"20",height:"16",rx:"2",key:"izxlao"}]]),s=(0,f.default)("lightbulb",[["path",{d:"M15 14c.2-1 .7-1.7 1.5-2.5 1-.9 1.5-2.2 1.5-3.5A6 6 0 0 0 6 8c0 1 .2 2.2 1.5 3.5.7.7 1.3 1.5 1.5 2.5",key:"1gvzjb"}],["path",{d:"M9 18h6",key:"x1upvd"}],["path",{d:"M10 22h4",key:"ceow96"}]]),t=(0,f.default)("bug",[["path",{d:"M12 20v-9",key:"1qisl0"}],["path",{d:"M14 7a4 4 0 0 1 4 4v3a6 6 0 0 1-12 0v-3a4 4 0 0 1 4-4z",key:"uouzyp"}],["path",{d:"M14.12 3.88 16 2",key:"qol33r"}],["path",{d:"M21 21a4 4 0 0 0-3.81-4",key:"1b0z45"}],["path",{d:"M21 5a4 4 0 0 1-3.55 3.97",key:"5cxbf6"}],["path",{d:"M22 13h-4",key:"1jl80f"}],["path",{d:"M3 21a4 4 0 0 1 3.81-4",key:"1fjd4g"}],["path",{d:"M3 5a4 4 0 0 0 3.55 3.97",key:"1d7oge"}],["path",{d:"M6 13H2",key:"82j7cp"}],["path",{d:"m8 2 1.88 1.88",key:"fmnt4t"}],["path",{d:"M9 7.13V6a3 3 0 1 1 6 0v1.13",key:"1vgav8"}]]),u=(0,f.default)("message-square",[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",key:"18887p"}]]);var v=a.i(5784);let w="claudeye@exosphere.host",x=[{label:"Request a Feature",icon:s,subject:"Feature Request: "},{label:"Report a Bug",icon:t,subject:"Bug Report: "},{label:"General Inquiry",icon:u,subject:"General Inquiry: "}],y=()=>{let[a,d]=(0,c.useState)(!1),e=(0,c.useRef)(null);(0,c.useEffect)(()=>{let a=a=>{e.current&&!e.current.contains(a.target)&&d(!1)};return document.addEventListener("mousedown",a),()=>document.removeEventListener("mousedown",a)},[]);let f=(0,c.useCallback)(b=>{"Escape"===b.key&&a&&d(!1)},[a]);return(0,b.jsxs)("div",{ref:e,className:"relative",onKeyDown:f,children:[(0,b.jsxs)(p,{variant:"ghost",size:"sm",onClick:()=>d(a=>!a),"aria-expanded":a,"aria-haspopup":"true",className:"flex items-center gap-1.5 text-muted-foreground hover:text-foreground",children:[(0,b.jsx)(r,{className:"h-4 w-4"}),(0,b.jsx)("span",{className:"hidden sm:inline text-xs",children:"Reach Us"}),(0,b.jsx)(v.ChevronDown,{className:`h-3 w-3 transition-transform ${a?"rotate-180":""}`})]}),a&&(0,b.jsxs)("div",{className:"absolute right-0 mt-2 w-56 rounded-lg border border-border bg-card shadow-lg z-50",role:"menu",children:[(0,b.jsxs)("div",{className:"px-3 py-2 border-b border-border",children:[(0,b.jsx)("p",{className:"text-xs font-medium text-foreground",children:"Reach Developers"}),(0,b.jsx)("p",{className:"text-[0.65rem] text-muted-foreground mt-0.5",children:"We'd love to hear from you"})]}),(0,b.jsx)("div",{className:"py-1",children:x.map(({label:a,icon:c,subject:e})=>(0,b.jsxs)("a",{href:`mailto:${w}?subject=${encodeURIComponent(e)}`,role:"menuitem",className:"flex items-center gap-2.5 px-3 py-2 text-xs text-muted-foreground hover:text-foreground hover:bg-muted/50 transition-colors",onClick:()=>d(!1),children:[(0,b.jsx)(c,{className:"h-3.5 w-3.5 flex-shrink-0"}),a]},a))}),(0,b.jsx)("div",{className:"px-3 py-2 border-t border-border",children:(0,b.jsx)("a",{href:`mailto:${w}`,className:"text-[0.65rem] text-primary hover:text-primary/80 transition-colors",children:w})})]})]})},z=(0,f.default)("list-ordered",[["path",{d:"M11 5h10",key:"1cz7ny"}],["path",{d:"M11 12h10",key:"1438ji"}],["path",{d:"M11 19h10",key:"11t30w"}],["path",{d:"M4 4h1v5",key:"10yrso"}],["path",{d:"M4 9h2",key:"r1h2o0"}],["path",{d:"M6.5 20H3.4c0-1 2.6-1.925 2.6-3.5a1.5 1.5 0 0 0-2.6-1.02",key:"xtkcd5"}]]);function A({type:a}){let c="eval"===a?"bg-blue-100 text-blue-700 dark:bg-blue-900/30 dark:text-blue-400":"action"===a?"bg-amber-100 text-amber-700 dark:bg-amber-900/30 dark:text-amber-400":"bg-purple-100 text-purple-700 dark:bg-purple-900/30 dark:text-purple-400";return(0,b.jsx)("span",{className:`inline-flex items-center rounded px-1 py-0.5 text-[0.6rem] font-medium leading-none ${c}`,children:a.toUpperCase()})}let B=()=>{let[a,e]=(0,c.useState)(!1),[f,g]=(0,c.useState)(null),h=(0,c.useRef)(null),i=(0,c.useCallback)(async()=>{try{let a=await fetch("/api/queue-status",{cache:"no-store"});a.ok&&g(await a.json())}catch{}},[]);(0,c.useEffect)(()=>{let b=a?2e3:5e3,c=setTimeout(i,0),d=setInterval(i,b);return()=>{clearTimeout(c),clearInterval(d)}},[a,i]),(0,c.useEffect)(()=>{let a=a=>{h.current&&!h.current.contains(a.target)&&e(!1)};return document.addEventListener("mousedown",a),()=>document.removeEventListener("mousedown",a)},[]);let j=(0,c.useCallback)(b=>{"Escape"===b.key&&a&&e(!1)},[a]),k=f?.pending.length??0,l=f?.processing.length??0,m=k+l;return(0,b.jsxs)("div",{ref:h,className:"relative",onKeyDown:j,children:[(0,b.jsxs)(p,{variant:"ghost",size:"sm",onClick:()=>e(a=>!a),"aria-expanded":a,"aria-haspopup":"true",className:"relative flex items-center gap-1.5 text-muted-foreground hover:text-foreground",children:[(0,b.jsx)(z,{className:"h-4 w-4"}),m>0?(0,b.jsx)("span",{className:"absolute -top-1 -right-1 flex h-4 min-w-4 items-center justify-center rounded-full bg-primary px-1 text-[0.6rem] font-medium text-primary-foreground",children:m}):null]}),a&&(0,b.jsxs)("div",{className:"absolute right-0 mt-2 w-72 rounded-lg border border-border bg-card shadow-lg z-50",children:[(0,b.jsxs)("div",{className:"px-3 py-2 border-b border-border",children:[(0,b.jsx)("p",{className:"text-xs font-medium text-foreground",children:"Queue"}),f&&(0,b.jsxs)("p",{className:"text-[0.65rem] text-muted-foreground mt-0.5",children:[k," queued · ",l," processing"]})]}),(0,b.jsx)("div",{className:"max-h-64 overflow-y-auto",children:f?0===f.processing.length&&0===f.pending.length?(0,b.jsx)("p",{className:"px-3 py-4 text-xs text-muted-foreground text-center",children:"Queue is empty"}):(0,b.jsxs)("div",{className:"py-1",children:[f.processing.slice(0,7).map(a=>(0,b.jsxs)("div",{className:"flex items-center gap-2 px-3 py-1.5 text-xs",children:[(0,b.jsx)("span",{className:"h-1.5 w-1.5 rounded-full bg-blue-500 animate-pulse flex-shrink-0"}),(0,b.jsx)(A,{type:a.type}),(0,b.jsx)("span",{className:"text-foreground truncate flex-1 font-mono text-[0.65rem]",children:a.itemName})]},a.key)),f.processing.length>7&&(0,b.jsxs)("p",{className:"px-3 py-1 text-[0.6rem] text-muted-foreground",children:["...and ",f.processing.length-7," more"]}),f.pending.slice(0,5).map(a=>(0,b.jsxs)("div",{className:"flex items-center gap-2 px-3 py-1.5 text-xs",children:[(0,b.jsx)("span",{className:"h-1.5 w-1.5 rounded-full bg-muted-foreground/40 flex-shrink-0"}),(0,b.jsx)(A,{type:a.type}),(0,b.jsx)("span",{className:"text-muted-foreground truncate flex-1 font-mono text-[0.65rem]",children:a.itemName}),(0,b.jsx)("span",{className:`text-[0.6rem] font-medium flex-shrink-0 ${a.priority<=0?"text-red-600 dark:text-red-400":"text-muted-foreground"}`,children:a.priority<=0?"HIGH":"LOW"})]},a.key)),f.pending.length>5&&(0,b.jsxs)("p",{className:"px-3 py-1 text-[0.6rem] text-muted-foreground",children:["...and ",f.pending.length-5," more queued"]})]}):(0,b.jsx)("p",{className:"px-3 py-4 text-xs text-muted-foreground text-center",children:"Loading..."})}),f&&f.recentErrors.length>0&&(0,b.jsx)("div",{className:"px-3 py-2 border-t border-border",children:(0,b.jsxs)("p",{className:"text-[0.6rem] text-red-600 dark:text-red-400",children:[f.recentErrors.length," recent error",1!==f.recentErrors.length?"s":""]})}),(0,b.jsx)("div",{className:"px-3 py-2 border-t border-border text-center",children:(0,b.jsx)(d.default,{href:"/queue",className:"text-xs text-muted-foreground hover:text-foreground transition-colors",onClick:()=>e(!1),children:"View details"})})]})]})};var C=a.i(69520),D=a.i(6236);let E=[{label:"Off",value:0},{label:"5s",value:5},{label:"10s",value:10},{label:"30s",value:30}];function F({className:a}){let d=(0,e.useRouter)(),[f,g]=(0,c.useTransition)(),{intervalSec:h,setIntervalSec:i}=(0,D.useAutoRefresh)(),j=(0,c.useCallback)(()=>{g(()=>d.refresh())},[d]);(0,c.useEffect)(()=>{if(h<=0)return;let a=setInterval(j,1e3*h);return()=>clearInterval(a)},[h,j]);let k=h>0;return(0,b.jsxs)("div",{className:(0,o.cn)("inline-flex items-center rounded-lg border border-border bg-muted/50 p-0.5 gap-0.5",a),children:[(0,b.jsx)("button",{onClick:j,title:"Refresh",className:(0,o.cn)("inline-flex items-center justify-center rounded-md p-1.5 transition-colors",k?"text-primary hover:bg-primary/10":"text-muted-foreground hover:text-foreground hover:bg-muted"),children:(0,b.jsx)(C.RefreshCw,{className:(0,o.cn)("w-3.5 h-3.5",f&&"animate-spin")})}),(0,b.jsx)("div",{className:"w-px h-4 bg-border"}),(0,b.jsx)("div",{className:"inline-flex items-center gap-0.5",role:"group","aria-label":"Auto-refresh interval",children:E.map(a=>(0,b.jsx)("button",{onClick:()=>i(a.value),"aria-pressed":h===a.value,className:(0,o.cn)("px-2 py-1 text-[11px] font-medium rounded-md transition-colors",h===a.value?"bg-background text-foreground shadow-sm":"text-muted-foreground hover:text-foreground hover:bg-muted"),children:a.label},a.value))})]})}var G=a.i(5050);let H=(0,G.createServerReference)("00bbd0dbb80d45a1d568950fbce28a537c9bd5341d",G.callServer,void 0,G.findSourceMapURL,"logout"),I=[{href:"/",label:"Projects",icon:h},{href:"/dashboard",label:"Dashboard",icon:g},{href:"/hooks",label:"Hooks",icon:j.Shield}];a.s(["Navbar",0,()=>{let a=(0,e.usePathname)(),f=(0,e.useRouter)(),[g,h]=(0,c.useState)(!1);async function j(){let a=await H();h(!1),f.push(a.redirectTo)}return(0,c.useEffect)(()=>{h(document.cookie.split(";").map(a=>a.trim()).some(a=>a.startsWith("claudeye_auth=")))},[a]),(0,b.jsx)("header",{className:"relative z-50 border-b border-border bg-card/50 backdrop-blur supports-[backdrop-filter]:bg-card/50",children:(0,b.jsx)("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:(0,b.jsxs)("div",{className:"flex items-center justify-between h-16",children:[(0,b.jsxs)("div",{className:"flex items-center gap-3",children:[(0,b.jsxs)("a",{href:"https://claudeye.exosphere.host",target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-3 hover:opacity-80 transition-opacity",children:[(0,b.jsx)(k.Logo,{width:28,height:28,className:"flex-shrink-0"}),(0,b.jsx)("h1",{className:"text-lg font-semibold text-foreground leading-tight tracking-tight",children:"Claudeye"})]}),(0,b.jsx)("div",{className:"w-px h-8 bg-border ml-2"}),(0,b.jsx)("nav",{className:"flex items-center h-16",children:I.map(({href:c,label:e,icon:f})=>{let g="/"===c?"/"===a||a.startsWith("/project"):a.startsWith(c);return(0,b.jsxs)(d.default,{href:c,className:`relative flex items-center gap-1.5 px-3 h-full text-sm transition-colors ${g?"text-foreground font-medium":"text-muted-foreground hover:text-foreground"}`,children:[(0,b.jsx)(f,{className:`w-4 h-4 ${g?"text-primary":""}`}),e,(0,b.jsx)("span",{className:`absolute inset-x-1 bottom-0 h-[2px] rounded-full transition-all ${g?"bg-primary":"bg-transparent group-hover:bg-muted"}`})]},c)})})]}),(0,b.jsxs)("div",{className:"flex items-center gap-1",children:[(0,b.jsx)(F,{}),(0,b.jsx)("div",{className:"w-px h-6 bg-border mx-1"}),(0,b.jsx)(y,{}),(0,b.jsx)(q,{}),(0,b.jsx)(B,{}),g&&(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("div",{className:"w-px h-6 bg-border mx-1"}),(0,b.jsxs)("button",{onClick:j,className:"inline-flex items-center gap-1.5 rounded-md px-2.5 py-1.5 text-sm text-muted-foreground hover:text-foreground hover:bg-muted transition-colors",title:"Sign out",children:[(0,b.jsx)(i,{className:"w-4 h-4"}),(0,b.jsx)("span",{className:"hidden sm:inline",children:"Sign out"})]})]})]})]})})})}],10815)},18952,a=>{"use strict";var b=a.i(87924),c=a.i(72131);let d=[],e=0,f=new Set;function g(){for(let a of f)a()}function h(a){return f.add(a),()=>f.delete(a)}function i(){return d}function j({message:a}){let[d,e]=(0,c.useState)(!1);return(0,c.useEffect)(()=>{requestAnimationFrame(()=>e(!0));let a=setTimeout(()=>e(!1),2e3);return()=>clearTimeout(a)},[]),(0,b.jsx)("div",{className:`bg-card border border-border text-foreground text-sm px-4 py-2 rounded-lg shadow-lg transition-opacity duration-300 ${d?"opacity-100":"opacity-0"}`,children:a})}a.s(["Toaster",0,function(){let a=(0,c.useSyncExternalStore)(h,i,i);return(0,b.jsx)("div",{className:"fixed bottom-4 right-4 z-50 flex flex-col gap-2",children:a.map(a=>(0,b.jsx)(j,{message:a.message},a.id))})},"toast",0,function(a){let b=e++;d=[...d,{id:b,message:a}],g(),setTimeout(()=>{d=d.filter(a=>a.id!==b),g()},2500)}])}];
|
|
2
2
|
|
|
3
3
|
//# sourceMappingURL=_0uig1kl._.js.map
|
package/assets/standalone/.next/server/chunks/ssr/app_actions_compute-dashboard_ts_13cb_9d._.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
module.exports=[42298,4930,a=>{"use strict";var b=a.i(37936),c=a.i(62733),d=a.i(82762),e=a.i(50871);async function f(a,b,c,f,g,h){let i=g??(0,d.getRegisteredFilters)(),j={entries:a,stats:b,projectName:c,sessionId:f,source:"session"};return h&&(j.evalResults=h),(0,e.runAll)(i,j,{skipResult:a=>({name:a.name,value:!1,durationMs:0,skipped:!0}),successResult:(a,b,c)=>({name:a.name,value:b,durationMs:c}),errorResult:(a,b,c)=>({name:a.name,value:!1,durationMs:c,error:b}),unexpectedResult:()=>({name:"?",value:!1,durationMs:0,error:"Unexpected rejection"}),buildSummary:(a,b)=>{let c=0,d=0;for(let b of a)b.skipped?d++:b.error&&c++;return{results:a,totalDurationMs:b,errorCount:c,skippedCount:d}}})}var g=a.i(83397),h=a.i(61542),i=a.i(69191);a.i(651);var j=a.i(70427),k=a.i(46721),l=a.i(70467),m=a.i(26192),n=a.i(82248),o=a.i(13095);let p="__CLAUDEYE_DASHBOARD_INDEX__";async function q(a,b){try{let q;await (0,c.ensureEvalsLoaded)();let r=(0,d.getFiltersForView)(a??"default"),s=(0,d.getPreBuiltFiltersForView)(a??"default");if(0===r.length&&0===s.length)return{ok:!0,hasFilters:!1};let t=performance.now(),u=a??"default",v=(0,d.getViewOptions)(u),w=v?.cachedOnly??!1,x=w?(0,l.getSessionScopedEvals)():[],y=await (0,k.hashEvalsModule)(),z=r.map(a=>a.name),A={};for(let a of r)A[a.name]=a.label;let B=function(a,b,c,d){let e=globalThis,f=e[p];if(f&&f.viewName===a&&f.evalsHash===b&&f.filterNames.length===c.length&&f.filterNames.every((a,b)=>a===c[b]))return f;let g={};for(let a of c)g[a]={type:"unknown",min:1/0,max:-1/0,uniqueStrings:new Set};let h={viewName:a,evalsHash:b,rows:new Map,contentHashes:new Map,accumulators:g,filterNames:c,filterLabels:d,metaDirty:!0,cachedFilterMeta:null};return e[p]=h,h}(u,y,z,A),C=await (0,i.getCachedProjectFolders)(),D=[];for(let a of(await (0,m.batchAll)(C.map(a=>async()=>{let b=await (0,i.getCachedSessionFiles)(a.path);return{project:a,sessionFiles:b}}),10)))if("fulfilled"===a.status)for(let b of a.value.sessionFiles)b.sessionId&&D.push({project:a.value.project,file:b});let E=new Set,F=new Map;for(let a of D){let b=`${a.project.name}/${a.file.sessionId}`;E.add(b),F.set(b,a)}for(let a of B.rows.keys())E.has(a)||(B.rows.delete(a),B.contentHashes.delete(a),B.metaDirty=!0);let G=[];for(let a of(await (0,m.batchAll)(D.map(({project:a,file:b})=>async()=>{let c,d=b.sessionId,e=`${a.name}/${d}`;try{c=await (0,k.hashSessionFile)(a.name,d)}catch{c=crypto.randomUUID()}return{key:e,contentHash:c,project:a,file:b}}),10))){if("fulfilled"!==a.status)continue;let{key:b,contentHash:c,project:d,file:e}=a.value;B.contentHashes.get(b)===c&&B.rows.has(b)||(G.push({key:b,task:{project:d,file:e}}),B.contentHashes.set(b,c))}if(w&&G.length>0){let a=await (0,m.batchAll)(G.map(({key:a,task:{project:b,file:c}})=>async()=>{let d=c.sessionId,e=B.contentHashes.get(a);return{key:a,cached:await (0,j.isSessionFullyCached)(b.name,d,e)}}),10),b=new Set;for(let c of a)"fulfilled"===c.status&&c.value.cached&&b.add(c.value.key);G=G.filter(({key:a})=>b.has(a))}let H=new Set;if(G.length>0)for(let a=0;a<G.length;a+=10){let b=G.slice(a,a+10);for(let a of(await Promise.allSettled(b.map(async({key:a,task:{project:b,file:c}})=>{let d,e=c.sessionId,i=B.contentHashes.get(a)??"",l=w&&x.length>0?`${u}/eval-ctx/${e}`:`${u}/${e}`,m=await (0,j.getCachedResult)("filters",b.name,l,z,i);if(m)d=m.value;else{let a,{entries:c,rawLines:m}=await (0,g.parseSessionLog)(b.name,e),n=(0,h.calculateLogStats)(c);if(w&&x.length>0){let c=await Promise.all(x.map(a=>(0,j.getPerItemCacheWithHook)("evals",b.name,e,a.name,(0,k.hashItemCode)(a.fn),i)));if(c.every(a=>null!==a))for(let b of(a={},c)){let c=b.value;a[c.name]={pass:c.pass,score:c.score,error:c.error,message:c.message}}}d=await f(m,n,b.name,e,r,a),(0,j.setCachedResult)("filters",b.name,l,d,z,i)}let o={};for(let a of d.results)a.skipped||a.error||(o[a.name]=a.value);let p={projectName:b.name,sessionId:e,lastModified:c.lastModified.toISOString(),lastModifiedFormatted:c.lastModifiedFormatted||(0,n.formatDate)(c.lastModified),filterValues:o};return{key:a,row:p}}))))if("fulfilled"===a.status){let{key:b,row:c}=a.value;B.rows.set(b,c),B.metaDirty=!0,H.add(b)}}let I=[...function(a){if(!a.metaDirty&&a.cachedFilterMeta)return a.cachedFilterMeta;a.metaDirty&&function(a){for(let b of a.filterNames)a.accumulators[b]={type:"unknown",min:1/0,max:-1/0,uniqueStrings:new Set};for(let b of a.rows.values())!function(a,b){for(let[c,d]of Object.entries(b)){let b=a[c];b&&("boolean"==typeof d?b.type="boolean":"number"==typeof d?(b.type="number",d<b.min&&(b.min=d),d>b.max&&(b.max=d)):"string"==typeof d&&(b.type="string",b.uniqueStrings.add(d)))}}(a.accumulators,b.filterValues)}(a);let b=a.filterNames.map(b=>{let c=a.accumulators[b],d=a.filterLabels[b]??b;return"number"===c.type?{type:"number",name:b,label:d,min:c.min,max:c.max}:"string"===c.type?{type:"string",name:b,label:d,values:Array.from(c.uniqueStrings).sort()}:{type:"boolean",name:b,label:d}});return a.cachedFilterMeta=b,a.metaDirty=!1,b}(B)];for(let a of s)if("lastModified"===a.name){let b="",c="";for(let a of B.rows.values())(!b||a.lastModified<b)&&(b=a.lastModified),(!c||a.lastModified>c)&&(c=a.lastModified);b&&c&&I.push({type:"date",name:a.name,label:a.label,min:new Date(b).toLocaleDateString("en-CA"),max:new Date(c).toLocaleDateString("en-CA")})}let J=Array.from(B.rows.values());if(w){let a=J.filter(a=>{let b=`${a.projectName}/${a.sessionId}`;return!H.has(b)});if(a.length>0){let b=await (0,m.batchAll)(a.map(a=>async()=>{let b=`${a.projectName}/${a.sessionId}`,c=B.contentHashes.get(b);return{session:a,key:b,cached:await (0,j.isSessionFullyCached)(a.projectName,a.sessionId,c)}}),10),c=new Set;for(let a of b)"fulfilled"!==a.status||a.value.cached||(c.add(a.value.key),B.rows.delete(a.value.key),B.contentHashes.delete(a.value.key),B.metaDirty=!0);J=J.filter(a=>{let b=`${a.projectName}/${a.sessionId}`;return!c.has(b)})}}let K=b?.page??1,L=b?.pageSize??25;if(b?.filters&&Object.keys(b.filters).length>0){var e,o;e=J,o=b.filters,q=e.filter(a=>{for(let b of I){let c=o[b.name];if(c)switch(c.type){case"boolean":{let d=a.filterValues[b.name];if(void 0===d||"all"===c.value)continue;if("true"===c.value&&!0!==d||"false"===c.value&&!1!==d)return!1;break}case"number":{let d=a.filterValues[b.name];if(void 0===d)continue;if(d<c.min||d>c.max)return!1;break}case"string":{let d=a.filterValues[b.name];if(void 0===d)continue;if(c.selected.length>0&&!c.selected.includes(d))return!1;break}case"date":{let b=new Date(a.lastModified).toLocaleDateString("en-CA");if(c.from&&b<c.from||c.to&&b>c.to)return!1}}}return!0})}else q=J;q.sort((a,b)=>b.lastModified.localeCompare(a.lastModified));let M=J.length,N=q.length,O=(K-1)*L,P=q.slice(O,O+L),Q=Math.round(performance.now()-t);return{ok:!0,hasFilters:!0,payload:{sessions:P,filterMeta:I,totalDurationMs:Q,totalCount:M,matchingCount:N,page:K,pageSize:L}}}catch(a){return{ok:!1,error:a instanceof Error?a.message:String(a)}}}(0,o.ensureServerEntryExports)([q]),(0,b.registerServerReference)(q,"604b9646808a1ed075ddde9947f10d8166dba23da6",null),a.s(["computeDashboard",0,q],42298);var r=a.i(46325),s=a.i(65003),t=a.i(31810);let u="__CLAUDEYE_AGGREGATE_INDEX__";async function v(a){try{await (0,c.ensureEvalsLoaded)();let b=a??"default",e=(0,d.getAggregatesForView)(b);if(0===e.length)return{ok:!0,hasAggregates:!1};let n=performance.now(),o=await (0,k.hashEvalsModule)(),p=e.map(a=>a.name),q=function(a,b,c){let d=globalThis,e=d[u];if(e&&e.viewName===a&&e.evalsHash===b&&e.aggregateNames.length===c.length&&e.aggregateNames.every((a,b)=>a===c[b]))return e;let f={viewName:a,evalsHash:b,aggregateNames:c,collectedSessions:new Map,contentHashes:new Map};return d[u]=f,f}(b,o,p),v=await (0,i.getCachedProjectFolders)(),w=[];for(let a of(await (0,m.batchAll)(v.map(a=>async()=>{let b=await (0,i.getCachedSessionFiles)(a.path);return{project:a,sessionFiles:b}}),10)))if("fulfilled"===a.status)for(let b of a.value.sessionFiles)b.sessionId&&w.push({project:a.value.project,file:b});let x=new Set;for(let a of w){let b=`${a.project.name}/${a.file.sessionId}`;x.add(b)}for(let a of q.collectedSessions.keys())x.has(a)||(q.collectedSessions.delete(a),q.contentHashes.delete(a));let y=[];for(let a of(await (0,m.batchAll)(w.map(({project:a,file:b})=>async()=>{let c,d=b.sessionId,e=`${a.name}/${d}`;try{c=await (0,k.hashSessionFile)(a.name,d)}catch{c=crypto.randomUUID()}return{key:e,contentHash:c,project:a,file:b}}),10))){if("fulfilled"!==a.status)continue;let{key:b,contentHash:c,project:d,file:e}=a.value;q.contentHashes.get(b)===c&&q.collectedSessions.has(b)||y.push({key:b,task:{project:d,file:e},contentHash:c})}if(y.length>0){let a=(0,l.hasEvals)()?(0,l.getSessionScopedEvals)():[],c=(0,r.hasEnrichers)()?(0,r.getSessionScopedEnrichers)():[],i=(0,d.getFiltersForView)(b);for(let d=0;d<y.length;d+=10){let k=y.slice(d,d+10);for(let d of(await Promise.allSettled(k.map(async({key:d,task:{project:k,file:l},contentHash:m})=>{let n=l.sessionId,o=`${b}/agg/${n}`,q=await (0,j.getCachedResult)("aggregates",k.name,o,p,m);if(q){let a={};for(let b of Object.values(q.value))Object.assign(a,b);return{key:d,contentHash:m,collected:{projectName:k.name,sessionId:n,values:a}}}let{entries:r,rawLines:u}=await (0,g.parseSessionLog)(k.name,n),v=(0,h.calculateLogStats)(r),w={};if(a.length>0)for(let b of(await (0,s.runAllEvals)(u,v,k.name,n,a)).results)b.skipped||(w[b.name]={pass:b.pass,score:b.score,error:b.error,message:b.message});let x={};if(c.length>0)for(let a of(await (0,t.runAllEnrichers)(u,v,k.name,n,c)).results)a.skipped||a.error||(x[a.name]=a.data);let y={};if(i.length>0)for(let a of(await f(u,v,k.name,n,i)).results)a.skipped||a.error||(y[a.name]=a.value);let z={entries:u,stats:v,projectName:k.name,sessionId:n,source:"session",evalResults:w,enrichResults:x,filterValues:y},A={},B={};for(let a of e)try{if(a.condition){let b={entries:u,stats:v,projectName:k.name,sessionId:n,source:"session"};if(!await a.condition(b))continue}let b=await a.collect(z);A[a.name]=b,Object.assign(B,b)}catch{}return(0,j.setCachedResult)("aggregates",k.name,o,A,p,m),{key:d,contentHash:m,collected:{projectName:k.name,sessionId:n,values:B}}}))))if("fulfilled"===d.status){let{key:a,contentHash:b,collected:c}=d.value;q.collectedSessions.set(a,c),q.contentHashes.set(a,b)}}}let z=Array.from(q.collectedSessions.values()),A=[];for(let a of e)try{let b=await a.reduce(z),c=b.length>0?Object.keys(b[0]):[];A.push({name:a.name,label:a.label,rows:b,columns:c})}catch{A.push({name:a.name,label:a.label,rows:[],columns:[]})}let B=Math.round(performance.now()-n);return{ok:!0,hasAggregates:!0,payload:{aggregates:A,totalSessions:z.length,totalDurationMs:B}}}catch(a){return{ok:!1,error:a instanceof Error?a.message:String(a)}}}(0,o.ensureServerEntryExports)([v]),(0,b.registerServerReference)(v,"409e689ac65579f16b4769034b04b5e5b765ef94b2",null),a.s(["computeAggregates",0,v],4930)}];
|
|
1
|
+
module.exports=[42298,4930,a=>{"use strict";var b=a.i(37936),c=a.i(62733),d=a.i(82762),e=a.i(50871);async function f(a,b,c,f,g,h){let i=g??(0,d.getRegisteredFilters)(),j={entries:a,stats:b,projectName:c,sessionId:f,source:"session"};return h&&(j.evalResults=h),(0,e.runAll)(i,j,{skipResult:a=>({name:a.name,value:!1,durationMs:0,skipped:!0}),successResult:(a,b,c)=>({name:a.name,value:b,durationMs:c}),errorResult:(a,b,c)=>({name:a.name,value:!1,durationMs:c,error:b}),unexpectedResult:()=>({name:"?",value:!1,durationMs:0,error:"Unexpected rejection"}),buildSummary:(a,b)=>{let c=0,d=0;for(let b of a)b.skipped?d++:b.error&&c++;return{results:a,totalDurationMs:b,errorCount:c,skippedCount:d}}})}var g=a.i(83397),h=a.i(61542),i=a.i(69191);a.i(651);var j=a.i(70427),k=a.i(46721),l=a.i(70467),m=a.i(26192),n=a.i(82248),o=a.i(13095);let p="__CLAUDEYE_DASHBOARD_INDEX__";async function q(a,b){try{let q;await (0,c.ensureEvalsLoaded)();let r=(0,d.getFiltersForView)(a??"default"),s=(0,d.getPreBuiltFiltersForView)(a??"default");if(0===r.length&&0===s.length)return{ok:!0,hasFilters:!1};let t=performance.now(),u=a??"default",v=(0,d.getViewOptions)(u),w=v?.cachedOnly??!1,x=w?(0,l.getSessionScopedEvals)():[],y=await (0,k.hashEvalsModule)(),z=r.map(a=>a.name),A={};for(let a of r)A[a.name]=a.label;let B=function(a,b,c,d){let e=globalThis,f=e[p];if(f&&f.viewName===a&&f.evalsHash===b&&f.filterNames.length===c.length&&f.filterNames.every((a,b)=>a===c[b]))return f;let g={};for(let a of c)g[a]={type:"unknown",min:1/0,max:-1/0,uniqueStrings:new Set};let h={viewName:a,evalsHash:b,rows:new Map,contentHashes:new Map,accumulators:g,filterNames:c,filterLabels:d,metaDirty:!0,cachedFilterMeta:null};return e[p]=h,h}(u,y,z,A),C=await (0,i.getCachedProjectFolders)(),D=[];for(let a of(await (0,m.batchAll)(C.map(a=>async()=>{let b=await (0,i.getCachedSessionFiles)(a.path);return{project:a,sessionFiles:b}}),10)))if("fulfilled"===a.status)for(let b of a.value.sessionFiles)b.sessionId&&D.push({project:a.value.project,file:b});let E=new Set,F=new Map;for(let a of D){let b=`${a.project.name}/${a.file.sessionId}`;E.add(b),F.set(b,a)}for(let a of B.rows.keys())E.has(a)||(B.rows.delete(a),B.contentHashes.delete(a),B.metaDirty=!0);let G=[];for(let a of(await (0,m.batchAll)(D.map(({project:a,file:b})=>async()=>{let c,d=b.sessionId,e=`${a.name}/${d}`;try{c=await (0,k.hashSessionFile)(a.name,d)}catch{c=crypto.randomUUID()}return{key:e,contentHash:c,project:a,file:b}}),10))){if("fulfilled"!==a.status)continue;let{key:b,contentHash:c,project:d,file:e}=a.value;B.contentHashes.get(b)===c&&B.rows.has(b)||(G.push({key:b,task:{project:d,file:e}}),B.contentHashes.set(b,c))}if(w&&G.length>0){let a=await (0,m.batchAll)(G.map(({key:a,task:{project:b,file:c}})=>async()=>{let d=c.sessionId,e=B.contentHashes.get(a);return{key:a,cached:await (0,j.isSessionFullyCached)(b.name,d,e)}}),10),b=new Set;for(let c of a)"fulfilled"===c.status&&c.value.cached&&b.add(c.value.key);G=G.filter(({key:a})=>b.has(a))}let H=new Set;if(G.length>0)for(let a=0;a<G.length;a+=10){let b=G.slice(a,a+10);for(let a of(await Promise.allSettled(b.map(async({key:a,task:{project:b,file:c}})=>{let d,e=c.sessionId,i=B.contentHashes.get(a)??"",l=w&&x.length>0?`${u}/eval-ctx/${e}`:`${u}/${e}`,m=await (0,j.getCachedResult)("filters",b.name,l,z,i);if(m)d=m.value;else{let a,{entries:c,rawLines:m}=await (0,g.parseSessionLog)(b.name,e),n=(0,h.calculateLogStats)(c);if(w&&x.length>0){let c=await Promise.all(x.map(a=>(0,j.getPerItemCacheWithHook)("evals",b.name,e,a.name,(0,k.hashItemCode)(a.fn),i)));if(c.every(a=>null!==a))for(let b of(a={},c)){let c=b.value;a[c.name]={pass:c.pass,score:c.score,error:c.error,message:c.message}}}d=await f(m,n,b.name,e,r,a),(0,j.setCachedResult)("filters",b.name,l,d,z,i)}let o={};for(let a of d.results)a.skipped||a.error||(o[a.name]=a.value);let p={projectName:b.name,sessionId:e,lastModified:c.lastModified.toISOString(),lastModifiedFormatted:c.lastModifiedFormatted||(0,n.formatDate)(c.lastModified),filterValues:o};return{key:a,row:p}}))))if("fulfilled"===a.status){let{key:b,row:c}=a.value;B.rows.set(b,c),B.metaDirty=!0,H.add(b)}}let I=[...function(a){if(!a.metaDirty&&a.cachedFilterMeta)return a.cachedFilterMeta;a.metaDirty&&function(a){for(let b of a.filterNames)a.accumulators[b]={type:"unknown",min:1/0,max:-1/0,uniqueStrings:new Set};for(let b of a.rows.values())!function(a,b){for(let[c,d]of Object.entries(b)){let b=a[c];b&&("boolean"==typeof d?b.type="boolean":"number"==typeof d?(b.type="number",d<b.min&&(b.min=d),d>b.max&&(b.max=d)):"string"==typeof d&&(b.type="string",b.uniqueStrings.add(d)))}}(a.accumulators,b.filterValues)}(a);let b=a.filterNames.map(b=>{let c=a.accumulators[b],d=a.filterLabels[b]??b;return"number"===c.type?{type:"number",name:b,label:d,min:c.min,max:c.max}:"string"===c.type?{type:"string",name:b,label:d,values:Array.from(c.uniqueStrings).sort()}:{type:"boolean",name:b,label:d}});return a.cachedFilterMeta=b,a.metaDirty=!1,b}(B)];for(let a of s)if("lastModified"===a.name){let b="",c="";for(let a of B.rows.values())(!b||a.lastModified<b)&&(b=a.lastModified),(!c||a.lastModified>c)&&(c=a.lastModified);b&&c&&I.push({type:"date",name:a.name,label:a.label,min:new Date(b).toLocaleDateString("en-CA"),max:new Date(c).toLocaleDateString("en-CA")})}let J=Array.from(B.rows.values());if(w){let a=J.filter(a=>{let b=`${a.projectName}/${a.sessionId}`;return!H.has(b)});if(a.length>0){let b=await (0,m.batchAll)(a.map(a=>async()=>{let b=`${a.projectName}/${a.sessionId}`,c=B.contentHashes.get(b);return{session:a,key:b,cached:await (0,j.isSessionFullyCached)(a.projectName,a.sessionId,c)}}),10),c=new Set;for(let a of b)"fulfilled"!==a.status||a.value.cached||(c.add(a.value.key),B.rows.delete(a.value.key),B.contentHashes.delete(a.value.key),B.metaDirty=!0);J=J.filter(a=>{let b=`${a.projectName}/${a.sessionId}`;return!c.has(b)})}}let K=b?.page??1,L=b?.pageSize??25;if(b?.filters&&Object.keys(b.filters).length>0){var e,o;e=J,o=b.filters,q=e.filter(a=>{for(let b of I){let c=o[b.name];if(c)switch(c.type){case"boolean":{let d=a.filterValues[b.name];if(void 0===d||"all"===c.value)continue;if("true"===c.value&&!0!==d||"false"===c.value&&!1!==d)return!1;break}case"number":{let d=a.filterValues[b.name];if(void 0===d)continue;if(d<c.min||d>c.max)return!1;break}case"string":{let d=a.filterValues[b.name];if(void 0===d)continue;if(c.selected.length>0&&!c.selected.includes(d))return!1;break}case"date":{let b=new Date(a.lastModified).toLocaleDateString("en-CA");if(c.from&&b<c.from||c.to&&b>c.to)return!1}}}return!0})}else q=J;q.sort((a,b)=>b.lastModified.localeCompare(a.lastModified));let M=J.length,N=q.length,O=(K-1)*L,P=q.slice(O,O+L),Q=Math.round(performance.now()-t);return{ok:!0,hasFilters:!0,payload:{sessions:P,filterMeta:I,totalDurationMs:Q,totalCount:M,matchingCount:N,page:K,pageSize:L}}}catch(a){return{ok:!1,error:a instanceof Error?a.message:String(a)}}}(0,o.ensureServerEntryExports)([q]),(0,b.registerServerReference)(q,"600018229182742daa9e4f8d63072f23a8417ef9ce",null),a.s(["computeDashboard",0,q],42298);var r=a.i(46325),s=a.i(65003),t=a.i(31810);let u="__CLAUDEYE_AGGREGATE_INDEX__";async function v(a){try{await (0,c.ensureEvalsLoaded)();let b=a??"default",e=(0,d.getAggregatesForView)(b);if(0===e.length)return{ok:!0,hasAggregates:!1};let n=performance.now(),o=await (0,k.hashEvalsModule)(),p=e.map(a=>a.name),q=function(a,b,c){let d=globalThis,e=d[u];if(e&&e.viewName===a&&e.evalsHash===b&&e.aggregateNames.length===c.length&&e.aggregateNames.every((a,b)=>a===c[b]))return e;let f={viewName:a,evalsHash:b,aggregateNames:c,collectedSessions:new Map,contentHashes:new Map};return d[u]=f,f}(b,o,p),v=await (0,i.getCachedProjectFolders)(),w=[];for(let a of(await (0,m.batchAll)(v.map(a=>async()=>{let b=await (0,i.getCachedSessionFiles)(a.path);return{project:a,sessionFiles:b}}),10)))if("fulfilled"===a.status)for(let b of a.value.sessionFiles)b.sessionId&&w.push({project:a.value.project,file:b});let x=new Set;for(let a of w){let b=`${a.project.name}/${a.file.sessionId}`;x.add(b)}for(let a of q.collectedSessions.keys())x.has(a)||(q.collectedSessions.delete(a),q.contentHashes.delete(a));let y=[];for(let a of(await (0,m.batchAll)(w.map(({project:a,file:b})=>async()=>{let c,d=b.sessionId,e=`${a.name}/${d}`;try{c=await (0,k.hashSessionFile)(a.name,d)}catch{c=crypto.randomUUID()}return{key:e,contentHash:c,project:a,file:b}}),10))){if("fulfilled"!==a.status)continue;let{key:b,contentHash:c,project:d,file:e}=a.value;q.contentHashes.get(b)===c&&q.collectedSessions.has(b)||y.push({key:b,task:{project:d,file:e},contentHash:c})}if(y.length>0){let a=(0,l.hasEvals)()?(0,l.getSessionScopedEvals)():[],c=(0,r.hasEnrichers)()?(0,r.getSessionScopedEnrichers)():[],i=(0,d.getFiltersForView)(b);for(let d=0;d<y.length;d+=10){let k=y.slice(d,d+10);for(let d of(await Promise.allSettled(k.map(async({key:d,task:{project:k,file:l},contentHash:m})=>{let n=l.sessionId,o=`${b}/agg/${n}`,q=await (0,j.getCachedResult)("aggregates",k.name,o,p,m);if(q){let a={};for(let b of Object.values(q.value))Object.assign(a,b);return{key:d,contentHash:m,collected:{projectName:k.name,sessionId:n,values:a}}}let{entries:r,rawLines:u}=await (0,g.parseSessionLog)(k.name,n),v=(0,h.calculateLogStats)(r),w={};if(a.length>0)for(let b of(await (0,s.runAllEvals)(u,v,k.name,n,a)).results)b.skipped||(w[b.name]={pass:b.pass,score:b.score,error:b.error,message:b.message});let x={};if(c.length>0)for(let a of(await (0,t.runAllEnrichers)(u,v,k.name,n,c)).results)a.skipped||a.error||(x[a.name]=a.data);let y={};if(i.length>0)for(let a of(await f(u,v,k.name,n,i)).results)a.skipped||a.error||(y[a.name]=a.value);let z={entries:u,stats:v,projectName:k.name,sessionId:n,source:"session",evalResults:w,enrichResults:x,filterValues:y},A={},B={};for(let a of e)try{if(a.condition){let b={entries:u,stats:v,projectName:k.name,sessionId:n,source:"session"};if(!await a.condition(b))continue}let b=await a.collect(z);A[a.name]=b,Object.assign(B,b)}catch{}return(0,j.setCachedResult)("aggregates",k.name,o,A,p,m),{key:d,contentHash:m,collected:{projectName:k.name,sessionId:n,values:B}}}))))if("fulfilled"===d.status){let{key:a,contentHash:b,collected:c}=d.value;q.collectedSessions.set(a,c),q.contentHashes.set(a,b)}}}let z=Array.from(q.collectedSessions.values()),A=[];for(let a of e)try{let b=await a.reduce(z),c=b.length>0?Object.keys(b[0]):[];A.push({name:a.name,label:a.label,rows:b,columns:c})}catch{A.push({name:a.name,label:a.label,rows:[],columns:[]})}let B=Math.round(performance.now()-n);return{ok:!0,hasAggregates:!0,payload:{aggregates:A,totalSessions:z.length,totalDurationMs:B}}}catch(a){return{ok:!1,error:a instanceof Error?a.message:String(a)}}}(0,o.ensureServerEntryExports)([v]),(0,b.registerServerReference)(v,"40ff2663ba3c833203a2219d3ec0e6aa07b07c7303",null),a.s(["computeAggregates",0,v],4930)}];
|
|
2
2
|
|
|
3
3
|
//# sourceMappingURL=app_actions_compute-dashboard_ts_13cb_9d._.js.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
module.exports=[63616,a=>{"use strict";var b=a.i(87924),c=a.i(72131),d=a.i(38246),e=a.i(210),f=a.i(70106);let g=(0,f.default)("shield-check",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]),h=(0,f.default)("shield-x",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m14.5 9.5-5 5",key:"17q4r4"}],["path",{d:"m9.5 9.5 5 5",key:"18nt4w"}]]),i=(0,f.default)("shield-alert",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"M12 8v4",key:"1got3b"}],["path",{d:"M12 16h.01",key:"1drbdi"}]]);var j=a.i(3314),k=a.i(5784),l=a.i(5151),m=a.i(33441),n=a.i(65967),o=a.i(5050);let p=(0,o.createServerReference)("40c280239f4aedff3b71e0fa4064f073bda11c65d1",o.callServer,void 0,o.findSourceMapURL,"getHookActivityAction"),q=(0,o.createServerReference)("609f73283b61b8ad7380c81cc7abd829706371258e",o.callServer,void 0,o.findSourceMapURL,"searchHookActivityAction");var r=a.i(6236),s=a.i(90619),t=a.i(95947);function u({decision:a}){return"deny"===a?(0,b.jsxs)("span",{className:"inline-flex items-center gap-1 rounded px-1.5 py-0.5 text-[0.65rem] font-semibold tracking-wide uppercase bg-red-500/10 text-red-400 border border-red-500/20",children:[(0,b.jsx)(h,{className:"h-3 w-3"}),"Deny"]}):"instruct"===a?(0,b.jsxs)("span",{className:"inline-flex items-center gap-1 rounded px-1.5 py-0.5 text-[0.65rem] font-semibold tracking-wide uppercase bg-amber-500/10 text-amber-400 border border-amber-500/20",children:[(0,b.jsx)(i,{className:"h-3 w-3"}),"Instruct"]}):(0,b.jsxs)("span",{className:"inline-flex items-center gap-1 rounded px-1.5 py-0.5 text-[0.65rem] font-semibold tracking-wide uppercase bg-emerald-500/10 text-emerald-400 border border-emerald-500/20",children:[(0,b.jsx)(g,{className:"h-3 w-3"}),"Allow"]})}function v({eventType:a}){return(0,b.jsx)("span",{className:"inline-flex items-center rounded px-1.5 py-0.5 text-[0.6rem] font-medium bg-muted text-muted-foreground border border-border/50",children:a})}function w({mode:a}){let c="default"===a;return(0,b.jsx)("span",{className:`inline-flex items-center rounded px-1.5 py-0.5 text-[0.6rem] font-medium border ${c?"bg-sky-500/10 text-sky-400 border-sky-500/20":"bg-amber-500/10 text-amber-400 border-amber-500/20"}`,children:a})}function x({ms:a}){return(0,b.jsx)("span",{className:`font-mono text-[0.7rem] ${a>500?"text-red-400":a>100?"text-amber-400":"text-muted-foreground"}`,children:a<1e3?`${a}ms`:`${(a/1e3).toFixed(1)}s`})}function y({text:a}){let[d,e]=(0,c.useState)(!1),f=async b=>{b.stopPropagation();try{await navigator.clipboard.writeText(a),e(!0),setTimeout(()=>e(!1),1500)}catch{let b=document.createElement("textarea");b.value=a,b.style.position="fixed",b.style.opacity="0",document.body.appendChild(b),b.select(),document.execCommand("copy"),document.body.removeChild(b),e(!0),setTimeout(()=>e(!1),1500)}};return(0,b.jsx)("button",{onClick:f,className:"inline-flex items-center justify-center h-5 w-5 rounded hover:bg-muted/50 text-muted-foreground hover:text-foreground transition-colors",title:"Copy",children:d?(0,b.jsx)(m.Check,{className:"h-3 w-3 text-emerald-400"}):(0,b.jsx)(l.Copy,{className:"h-3 w-3"})})}function z({value:a,onChange:c}){return(0,b.jsx)("div",{className:"inline-flex items-center rounded-md border border-border bg-muted/30 p-0.5",children:[{label:"All",value:""},{label:"Allow",value:"allow"},{label:"Instruct",value:"instruct"},{label:"Deny",value:"deny"}].map(d=>(0,b.jsx)("button",{onClick:()=>c(d.value),className:`px-2.5 py-1 text-[0.65rem] font-medium rounded transition-all ${a===d.value?"deny"===d.value?"bg-red-500/15 text-red-400 shadow-sm":"allow"===d.value?"bg-emerald-500/15 text-emerald-400 shadow-sm":"instruct"===d.value?"bg-amber-500/15 text-amber-400 shadow-sm":"bg-background text-foreground shadow-sm":"text-muted-foreground hover:text-foreground"}`,children:d.label},d.value))})}function A({stats:a}){let c=a.totalEvents>0?(a.denyCount/a.totalEvents*100).toFixed(0):"0";return(0,b.jsxs)("div",{className:"flex items-center gap-6 text-[0.7rem] text-muted-foreground",children:[(0,b.jsxs)("div",{children:[(0,b.jsx)("span",{className:"text-foreground font-mono font-semibold",children:a.totalEvents})," total events"]}),(0,b.jsxs)("div",{children:[(0,b.jsxs)("span",{className:`font-mono font-semibold ${a.denyCount>0?"text-red-400":"text-foreground"}`,children:[c,"%"]})," ","deny rate"]}),(0,b.jsxs)("div",{className:"hidden sm:block",children:["top policy:"," ",(0,b.jsx)("span",{className:"font-mono text-foreground",children:a.topPolicy??"—"})]})]})}function B({item:a}){return(0,b.jsx)("tr",{children:(0,b.jsx)("td",{colSpan:10,className:"px-0 py-0",children:(0,b.jsxs)("div",{className:"px-6 py-3 bg-muted/20 border-t border-border/30 space-y-2 text-xs animate-in fade-in slide-in-from-top-1 duration-150",children:[(0,b.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-x-8 gap-y-1.5",children:[(0,b.jsxs)("div",{children:[(0,b.jsx)("span",{className:"text-muted-foreground",children:"Session ID: "}),(0,b.jsx)("span",{className:"font-mono text-foreground",children:a.sessionId??"—"}),a.sessionId&&(0,b.jsx)(y,{text:a.sessionId})]}),(0,b.jsxs)("div",{children:[(0,b.jsx)("span",{className:"text-muted-foreground",children:"CWD: "}),(0,b.jsx)("span",{className:"font-mono text-foreground",children:a.cwd??"—"}),a.cwd&&(0,b.jsx)(y,{text:a.cwd})]}),(0,b.jsxs)("div",{children:[(0,b.jsx)("span",{className:"text-muted-foreground",children:"Transcript: "}),(0,b.jsx)("span",{className:"font-mono text-foreground break-all",children:a.transcriptPath??"—"})]})]}),a.reason&&(0,b.jsxs)("div",{children:[(0,b.jsx)("span",{className:"text-muted-foreground",children:"Full reason: "}),(0,b.jsx)("span",{className:"text-foreground",children:a.reason})]})]})})})}a.s(["default",0,function(){let{intervalSec:a}=(0,r.useAutoRefresh)(),f=(0,s.useUrlParams)(),g=(0,c.useRef)(!1),[h,i]=(0,c.useState)(()=>(0,t.paramToPage)(f.get("page"))),[l,m]=(0,c.useState)(null),[o,y]=(0,c.useState)(null),[C,D]=(0,c.useState)(()=>{let a=f.get("decision");return"allow"===a||"deny"===a||"instruct"===a?a:""}),[E,F]=(0,c.useState)(()=>f.get("event")??""),[G,H]=(0,c.useState)(()=>f.get("policy")??""),I=(0,c.useRef)(null),J=(0,c.useRef)({filterDecision:C,filterEventType:E,filterPolicy:G});J.current={filterDecision:C,filterEventType:E,filterPolicy:G},(0,c.useEffect)(()=>{if(!g.current){g.current=!0;return}f.setAll({decision:C||void 0,event:E||void 0,policy:G||void 0,page:(0,t.pageToParam)(h)})},[C,E,G,h]);let K=""!==C||""!==E||""!==G,L=(0,c.useCallback)(async a=>{try{let b,{filterDecision:c,filterEventType:d,filterPolicy:e}=J.current;b=""!==c||""!==d||""!==e?await q({decision:c||void 0,eventType:d||void 0,policyName:e||void 0},a):await p(a),m(b)}catch{}},[]);(0,c.useEffect)(()=>{L(h);let b=setInterval(()=>L(h),a>0?1e3*a:5e3);return()=>clearInterval(b)},[h,L,a]),(0,c.useEffect)(()=>(I.current&&clearTimeout(I.current),I.current=setTimeout(()=>{i(1),y(null),L(1)},300),()=>{I.current&&clearTimeout(I.current)}),[C,E,G]);let M=l?.entries??[],N=l?.totalPages??1;return(0,b.jsxs)("div",{className:"min-h-screen bg-background px-4 py-6 sm:px-6 lg:px-10",children:[(0,b.jsxs)("div",{className:"mb-6",children:[(0,b.jsxs)(d.default,{href:"/",className:"inline-flex items-center gap-1 text-xs text-muted-foreground hover:text-foreground transition-colors",children:[(0,b.jsx)(e.ArrowLeft,{className:"h-3.5 w-3.5"}),"Back"]}),(0,b.jsxs)("div",{className:"flex items-center gap-3 mt-3",children:[(0,b.jsx)("h1",{className:"text-2xl font-bold text-foreground tracking-tight",children:"Hook Activity"}),(0,b.jsxs)("span",{className:"relative flex h-2.5 w-2.5 mt-0.5",children:[(0,b.jsx)("span",{className:"animate-ping absolute inline-flex h-full w-full rounded-full bg-emerald-400 opacity-75"}),(0,b.jsx)("span",{className:"relative inline-flex rounded-full h-2.5 w-2.5 bg-emerald-500"})]})]}),(0,b.jsx)("p",{className:"text-sm text-muted-foreground mt-1",children:"Policy evaluations from Claude Code hook events"}),l?.stats&&l.stats.totalEvents>0&&(0,b.jsx)("div",{className:"mt-3",children:(0,b.jsx)(A,{stats:l.stats})})]}),(0,b.jsxs)("div",{className:"bg-card border border-border rounded-lg overflow-hidden",children:[(0,b.jsxs)("div",{className:"flex flex-wrap items-center gap-3 px-4 py-2.5 border-b border-border bg-muted/20",children:[(0,b.jsx)(z,{value:C,onChange:D}),(0,b.jsxs)("select",{value:E,onChange:a=>F(a.target.value),className:"h-7 rounded-md border border-border bg-background px-2 text-xs text-foreground focus:outline-none focus:ring-2 focus:ring-primary/40 focus:border-primary/40 transition-shadow",children:[(0,b.jsx)("option",{value:"",children:"All Events"}),(0,b.jsx)("option",{value:"PreToolUse",children:"PreToolUse"}),(0,b.jsx)("option",{value:"PostToolUse",children:"PostToolUse"}),(0,b.jsx)("option",{value:"SessionStart",children:"SessionStart"}),(0,b.jsx)("option",{value:"SessionEnd",children:"SessionEnd"}),(0,b.jsx)("option",{value:"UserPromptSubmit",children:"UserPromptSubmit"}),(0,b.jsx)("option",{value:"PermissionRequest",children:"PermissionRequest"})]}),(0,b.jsx)("div",{className:"relative",children:(0,b.jsx)("input",{type:"text",value:G,onChange:a=>H(a.target.value),placeholder:"Filter by policy\\u2026",className:"h-7 rounded-md border border-border bg-background px-2.5 text-xs text-foreground placeholder:text-muted-foreground w-44 focus:outline-none focus:ring-2 focus:ring-primary/40 focus:border-primary/40 transition-shadow"})})]}),0===M.length?(0,b.jsxs)("div",{className:"flex flex-col items-center justify-center py-16 px-4",children:[(0,b.jsxs)("div",{className:"relative",children:[(0,b.jsx)(j.Shield,{className:"h-12 w-12 text-muted-foreground/30"}),(0,b.jsx)("span",{className:"absolute inset-0 animate-ping",children:(0,b.jsx)(j.Shield,{className:"h-12 w-12 text-muted-foreground/10"})})]}),(0,b.jsx)("p",{className:"text-sm text-muted-foreground mt-4",children:K?"No matching activity.":"Waiting for hook events…"})]}):(0,b.jsx)("div",{className:"overflow-x-auto",children:(0,b.jsxs)("table",{className:"w-full text-xs",children:[(0,b.jsx)("thead",{children:(0,b.jsxs)("tr",{className:"text-left text-muted-foreground border-b border-border bg-muted/30",children:[(0,b.jsx)("th",{className:"px-4 py-2.5 font-medium w-6"}),(0,b.jsx)("th",{className:"px-3 py-2.5 font-medium",children:"Decision"}),(0,b.jsx)("th",{className:"px-3 py-2.5 font-medium",children:"Event"}),(0,b.jsx)("th",{className:"px-3 py-2.5 font-medium",children:"Tool"}),(0,b.jsx)("th",{className:"px-3 py-2.5 font-medium",children:"Policy"}),(0,b.jsx)("th",{className:"px-3 py-2.5 font-medium",children:"Reason"}),(0,b.jsx)("th",{className:"px-3 py-2.5 font-medium",children:"Duration"}),(0,b.jsx)("th",{className:"px-3 py-2.5 font-medium",children:"Session"}),(0,b.jsx)("th",{className:"px-3 py-2.5 font-medium",children:"Mode"}),(0,b.jsx)("th",{className:"px-3 py-2.5 font-medium text-right",children:"Time"})]})}),(0,b.jsx)("tbody",{className:"divide-y divide-border/30",children:M.map((a,d)=>{var e,f;let g,h="deny"===a.decision,i=o===d,j="instruct"===a.decision;return(0,b.jsxs)(c.default.Fragment,{children:[(0,b.jsxs)("tr",{onClick:()=>{y(a=>a===d?null:d)},className:`cursor-pointer transition-colors ${h?"bg-red-500/[0.03] hover:bg-red-500/[0.07] border-l-2 border-l-red-500/40":j?"bg-amber-500/[0.03] hover:bg-amber-500/[0.07] border-l-2 border-l-amber-500/40":d%2==0?"hover:bg-muted/30":"bg-muted/[0.04] hover:bg-muted/30"} ${i?"bg-muted/20":""}`,children:[(0,b.jsx)("td",{className:"px-4 py-2",children:(0,b.jsx)(k.ChevronDown,{className:`h-3.5 w-3.5 text-muted-foreground transition-transform duration-150 ${i?"rotate-0":"-rotate-90"}`})}),(0,b.jsx)("td",{className:"px-3 py-2",children:(0,b.jsx)(u,{decision:a.decision})}),(0,b.jsx)("td",{className:"px-3 py-2",children:(0,b.jsx)(v,{eventType:a.eventType})}),(0,b.jsx)("td",{className:"px-3 py-2 font-mono text-foreground",children:a.toolName??"—"}),(0,b.jsx)("td",{className:"px-3 py-2 font-mono text-foreground",children:a.policyName??"—"}),(0,b.jsx)("td",{className:"px-3 py-2 text-muted-foreground truncate max-w-[240px]",title:a.reason??"",children:a.reason??"—"}),(0,b.jsx)("td",{className:"px-3 py-2",children:(0,b.jsx)(x,{ms:a.durationMs})}),(0,b.jsx)("td",{className:"px-3 py-2 font-mono text-muted-foreground",title:a.sessionId??"",children:(e=a.sessionId)?e.slice(0,8):"—"}),(0,b.jsx)("td",{className:"px-3 py-2",children:a.permissionMode?(0,b.jsx)(w,{mode:a.permissionMode}):"—"}),(0,b.jsx)("td",{className:"px-3 py-2 text-right text-muted-foreground whitespace-nowrap",title:new Date(a.timestamp).toLocaleString(void 0,{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit",second:"2-digit"}),children:(f=a.timestamp,(g=Date.now()-f)<6e4?`${Math.max(1,Math.floor(g/1e3))}s ago`:g<36e5?`${Math.floor(g/6e4)}m ago`:g<864e5?`${Math.floor(g/36e5)}h ago`:`${Math.floor(g/864e5)}d ago`)})]}),i&&(0,b.jsx)(B,{item:a})]},`${a.timestamp}-${d}`)})})]})}),(0,b.jsx)(n.default,{currentPage:h,totalPages:N,onPageChange:a=>{i(a),y(null)}})]})]})}],63616)}];
|
|
1
|
+
module.exports=[63616,a=>{"use strict";var b=a.i(87924),c=a.i(72131),d=a.i(38246),e=a.i(210),f=a.i(70106);let g=(0,f.default)("shield-check",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]),h=(0,f.default)("shield-x",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m14.5 9.5-5 5",key:"17q4r4"}],["path",{d:"m9.5 9.5 5 5",key:"18nt4w"}]]),i=(0,f.default)("shield-alert",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"M12 8v4",key:"1got3b"}],["path",{d:"M12 16h.01",key:"1drbdi"}]]);var j=a.i(3314),k=a.i(5784),l=a.i(5151),m=a.i(33441),n=a.i(65967),o=a.i(5050);let p=(0,o.createServerReference)("401a6f4615fa996c395e4fe5b0d1597381f5f475be",o.callServer,void 0,o.findSourceMapURL,"getHookActivityAction"),q=(0,o.createServerReference)("606deba308dd9e9577914672f11fd58f19dc188018",o.callServer,void 0,o.findSourceMapURL,"searchHookActivityAction");var r=a.i(6236),s=a.i(90619),t=a.i(95947);function u({decision:a}){return"deny"===a?(0,b.jsxs)("span",{className:"inline-flex items-center gap-1 rounded px-1.5 py-0.5 text-[0.65rem] font-semibold tracking-wide uppercase bg-red-500/10 text-red-400 border border-red-500/20",children:[(0,b.jsx)(h,{className:"h-3 w-3"}),"Deny"]}):"instruct"===a?(0,b.jsxs)("span",{className:"inline-flex items-center gap-1 rounded px-1.5 py-0.5 text-[0.65rem] font-semibold tracking-wide uppercase bg-amber-500/10 text-amber-400 border border-amber-500/20",children:[(0,b.jsx)(i,{className:"h-3 w-3"}),"Instruct"]}):(0,b.jsxs)("span",{className:"inline-flex items-center gap-1 rounded px-1.5 py-0.5 text-[0.65rem] font-semibold tracking-wide uppercase bg-emerald-500/10 text-emerald-400 border border-emerald-500/20",children:[(0,b.jsx)(g,{className:"h-3 w-3"}),"Allow"]})}function v({eventType:a}){return(0,b.jsx)("span",{className:"inline-flex items-center rounded px-1.5 py-0.5 text-[0.6rem] font-medium bg-muted text-muted-foreground border border-border/50",children:a})}function w({mode:a}){let c="default"===a;return(0,b.jsx)("span",{className:`inline-flex items-center rounded px-1.5 py-0.5 text-[0.6rem] font-medium border ${c?"bg-sky-500/10 text-sky-400 border-sky-500/20":"bg-amber-500/10 text-amber-400 border-amber-500/20"}`,children:a})}function x({ms:a}){return(0,b.jsx)("span",{className:`font-mono text-[0.7rem] ${a>500?"text-red-400":a>100?"text-amber-400":"text-muted-foreground"}`,children:a<1e3?`${a}ms`:`${(a/1e3).toFixed(1)}s`})}function y({text:a}){let[d,e]=(0,c.useState)(!1),f=async b=>{b.stopPropagation();try{await navigator.clipboard.writeText(a),e(!0),setTimeout(()=>e(!1),1500)}catch{let b=document.createElement("textarea");b.value=a,b.style.position="fixed",b.style.opacity="0",document.body.appendChild(b),b.select(),document.execCommand("copy"),document.body.removeChild(b),e(!0),setTimeout(()=>e(!1),1500)}};return(0,b.jsx)("button",{onClick:f,className:"inline-flex items-center justify-center h-5 w-5 rounded hover:bg-muted/50 text-muted-foreground hover:text-foreground transition-colors",title:"Copy",children:d?(0,b.jsx)(m.Check,{className:"h-3 w-3 text-emerald-400"}):(0,b.jsx)(l.Copy,{className:"h-3 w-3"})})}function z({value:a,onChange:c}){return(0,b.jsx)("div",{className:"inline-flex items-center rounded-md border border-border bg-muted/30 p-0.5",children:[{label:"All",value:""},{label:"Allow",value:"allow"},{label:"Instruct",value:"instruct"},{label:"Deny",value:"deny"}].map(d=>(0,b.jsx)("button",{onClick:()=>c(d.value),className:`px-2.5 py-1 text-[0.65rem] font-medium rounded transition-all ${a===d.value?"deny"===d.value?"bg-red-500/15 text-red-400 shadow-sm":"allow"===d.value?"bg-emerald-500/15 text-emerald-400 shadow-sm":"instruct"===d.value?"bg-amber-500/15 text-amber-400 shadow-sm":"bg-background text-foreground shadow-sm":"text-muted-foreground hover:text-foreground"}`,children:d.label},d.value))})}function A({stats:a}){let c=a.totalEvents>0?(a.denyCount/a.totalEvents*100).toFixed(0):"0";return(0,b.jsxs)("div",{className:"flex items-center gap-6 text-[0.7rem] text-muted-foreground",children:[(0,b.jsxs)("div",{children:[(0,b.jsx)("span",{className:"text-foreground font-mono font-semibold",children:a.totalEvents})," total events"]}),(0,b.jsxs)("div",{children:[(0,b.jsxs)("span",{className:`font-mono font-semibold ${a.denyCount>0?"text-red-400":"text-foreground"}`,children:[c,"%"]})," ","deny rate"]}),(0,b.jsxs)("div",{className:"hidden sm:block",children:["top policy:"," ",(0,b.jsx)("span",{className:"font-mono text-foreground",children:a.topPolicy??"—"})]})]})}function B({item:a}){return(0,b.jsx)("tr",{children:(0,b.jsx)("td",{colSpan:10,className:"px-0 py-0",children:(0,b.jsxs)("div",{className:"px-6 py-3 bg-muted/20 border-t border-border/30 space-y-2 text-xs animate-in fade-in slide-in-from-top-1 duration-150",children:[(0,b.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-x-8 gap-y-1.5",children:[(0,b.jsxs)("div",{children:[(0,b.jsx)("span",{className:"text-muted-foreground",children:"Session ID: "}),(0,b.jsx)("span",{className:"font-mono text-foreground",children:a.sessionId??"—"}),a.sessionId&&(0,b.jsx)(y,{text:a.sessionId})]}),(0,b.jsxs)("div",{children:[(0,b.jsx)("span",{className:"text-muted-foreground",children:"CWD: "}),(0,b.jsx)("span",{className:"font-mono text-foreground",children:a.cwd??"—"}),a.cwd&&(0,b.jsx)(y,{text:a.cwd})]}),(0,b.jsxs)("div",{children:[(0,b.jsx)("span",{className:"text-muted-foreground",children:"Transcript: "}),(0,b.jsx)("span",{className:"font-mono text-foreground break-all",children:a.transcriptPath??"—"})]})]}),a.reason&&(0,b.jsxs)("div",{children:[(0,b.jsx)("span",{className:"text-muted-foreground",children:"Full reason: "}),(0,b.jsx)("span",{className:"text-foreground",children:a.reason})]})]})})})}a.s(["default",0,function(){let{intervalSec:a}=(0,r.useAutoRefresh)(),f=(0,s.useUrlParams)(),g=(0,c.useRef)(!1),[h,i]=(0,c.useState)(()=>(0,t.paramToPage)(f.get("page"))),[l,m]=(0,c.useState)(null),[o,y]=(0,c.useState)(null),[C,D]=(0,c.useState)(()=>{let a=f.get("decision");return"allow"===a||"deny"===a||"instruct"===a?a:""}),[E,F]=(0,c.useState)(()=>f.get("event")??""),[G,H]=(0,c.useState)(()=>f.get("policy")??""),I=(0,c.useRef)(null),J=(0,c.useRef)({filterDecision:C,filterEventType:E,filterPolicy:G});J.current={filterDecision:C,filterEventType:E,filterPolicy:G},(0,c.useEffect)(()=>{if(!g.current){g.current=!0;return}f.setAll({decision:C||void 0,event:E||void 0,policy:G||void 0,page:(0,t.pageToParam)(h)})},[C,E,G,h]);let K=""!==C||""!==E||""!==G,L=(0,c.useCallback)(async a=>{try{let b,{filterDecision:c,filterEventType:d,filterPolicy:e}=J.current;b=""!==c||""!==d||""!==e?await q({decision:c||void 0,eventType:d||void 0,policyName:e||void 0},a):await p(a),m(b)}catch{}},[]);(0,c.useEffect)(()=>{L(h);let b=setInterval(()=>L(h),a>0?1e3*a:5e3);return()=>clearInterval(b)},[h,L,a]),(0,c.useEffect)(()=>(I.current&&clearTimeout(I.current),I.current=setTimeout(()=>{i(1),y(null),L(1)},300),()=>{I.current&&clearTimeout(I.current)}),[C,E,G]);let M=l?.entries??[],N=l?.totalPages??1;return(0,b.jsxs)("div",{className:"min-h-screen bg-background px-4 py-6 sm:px-6 lg:px-10",children:[(0,b.jsxs)("div",{className:"mb-6",children:[(0,b.jsxs)(d.default,{href:"/",className:"inline-flex items-center gap-1 text-xs text-muted-foreground hover:text-foreground transition-colors",children:[(0,b.jsx)(e.ArrowLeft,{className:"h-3.5 w-3.5"}),"Back"]}),(0,b.jsxs)("div",{className:"flex items-center gap-3 mt-3",children:[(0,b.jsx)("h1",{className:"text-2xl font-bold text-foreground tracking-tight",children:"Hook Activity"}),(0,b.jsxs)("span",{className:"relative flex h-2.5 w-2.5 mt-0.5",children:[(0,b.jsx)("span",{className:"animate-ping absolute inline-flex h-full w-full rounded-full bg-emerald-400 opacity-75"}),(0,b.jsx)("span",{className:"relative inline-flex rounded-full h-2.5 w-2.5 bg-emerald-500"})]})]}),(0,b.jsx)("p",{className:"text-sm text-muted-foreground mt-1",children:"Policy evaluations from Claude Code hook events"}),l?.stats&&l.stats.totalEvents>0&&(0,b.jsx)("div",{className:"mt-3",children:(0,b.jsx)(A,{stats:l.stats})})]}),(0,b.jsxs)("div",{className:"bg-card border border-border rounded-lg overflow-hidden",children:[(0,b.jsxs)("div",{className:"flex flex-wrap items-center gap-3 px-4 py-2.5 border-b border-border bg-muted/20",children:[(0,b.jsx)(z,{value:C,onChange:D}),(0,b.jsxs)("select",{value:E,onChange:a=>F(a.target.value),className:"h-7 rounded-md border border-border bg-background px-2 text-xs text-foreground focus:outline-none focus:ring-2 focus:ring-primary/40 focus:border-primary/40 transition-shadow",children:[(0,b.jsx)("option",{value:"",children:"All Events"}),(0,b.jsx)("option",{value:"PreToolUse",children:"PreToolUse"}),(0,b.jsx)("option",{value:"PostToolUse",children:"PostToolUse"}),(0,b.jsx)("option",{value:"SessionStart",children:"SessionStart"}),(0,b.jsx)("option",{value:"SessionEnd",children:"SessionEnd"}),(0,b.jsx)("option",{value:"UserPromptSubmit",children:"UserPromptSubmit"}),(0,b.jsx)("option",{value:"PermissionRequest",children:"PermissionRequest"})]}),(0,b.jsx)("div",{className:"relative",children:(0,b.jsx)("input",{type:"text",value:G,onChange:a=>H(a.target.value),placeholder:"Filter by policy\\u2026",className:"h-7 rounded-md border border-border bg-background px-2.5 text-xs text-foreground placeholder:text-muted-foreground w-44 focus:outline-none focus:ring-2 focus:ring-primary/40 focus:border-primary/40 transition-shadow"})})]}),0===M.length?(0,b.jsxs)("div",{className:"flex flex-col items-center justify-center py-16 px-4",children:[(0,b.jsxs)("div",{className:"relative",children:[(0,b.jsx)(j.Shield,{className:"h-12 w-12 text-muted-foreground/30"}),(0,b.jsx)("span",{className:"absolute inset-0 animate-ping",children:(0,b.jsx)(j.Shield,{className:"h-12 w-12 text-muted-foreground/10"})})]}),(0,b.jsx)("p",{className:"text-sm text-muted-foreground mt-4",children:K?"No matching activity.":"Waiting for hook events…"})]}):(0,b.jsx)("div",{className:"overflow-x-auto",children:(0,b.jsxs)("table",{className:"w-full text-xs",children:[(0,b.jsx)("thead",{children:(0,b.jsxs)("tr",{className:"text-left text-muted-foreground border-b border-border bg-muted/30",children:[(0,b.jsx)("th",{className:"px-4 py-2.5 font-medium w-6"}),(0,b.jsx)("th",{className:"px-3 py-2.5 font-medium",children:"Decision"}),(0,b.jsx)("th",{className:"px-3 py-2.5 font-medium",children:"Event"}),(0,b.jsx)("th",{className:"px-3 py-2.5 font-medium",children:"Tool"}),(0,b.jsx)("th",{className:"px-3 py-2.5 font-medium",children:"Policy"}),(0,b.jsx)("th",{className:"px-3 py-2.5 font-medium",children:"Reason"}),(0,b.jsx)("th",{className:"px-3 py-2.5 font-medium",children:"Duration"}),(0,b.jsx)("th",{className:"px-3 py-2.5 font-medium",children:"Session"}),(0,b.jsx)("th",{className:"px-3 py-2.5 font-medium",children:"Mode"}),(0,b.jsx)("th",{className:"px-3 py-2.5 font-medium text-right",children:"Time"})]})}),(0,b.jsx)("tbody",{className:"divide-y divide-border/30",children:M.map((a,d)=>{var e,f;let g,h="deny"===a.decision,i=o===d,j="instruct"===a.decision;return(0,b.jsxs)(c.default.Fragment,{children:[(0,b.jsxs)("tr",{onClick:()=>{y(a=>a===d?null:d)},className:`cursor-pointer transition-colors ${h?"bg-red-500/[0.03] hover:bg-red-500/[0.07] border-l-2 border-l-red-500/40":j?"bg-amber-500/[0.03] hover:bg-amber-500/[0.07] border-l-2 border-l-amber-500/40":d%2==0?"hover:bg-muted/30":"bg-muted/[0.04] hover:bg-muted/30"} ${i?"bg-muted/20":""}`,children:[(0,b.jsx)("td",{className:"px-4 py-2",children:(0,b.jsx)(k.ChevronDown,{className:`h-3.5 w-3.5 text-muted-foreground transition-transform duration-150 ${i?"rotate-0":"-rotate-90"}`})}),(0,b.jsx)("td",{className:"px-3 py-2",children:(0,b.jsx)(u,{decision:a.decision})}),(0,b.jsx)("td",{className:"px-3 py-2",children:(0,b.jsx)(v,{eventType:a.eventType})}),(0,b.jsx)("td",{className:"px-3 py-2 font-mono text-foreground",children:a.toolName??"—"}),(0,b.jsx)("td",{className:"px-3 py-2 font-mono text-foreground",children:a.policyName??"—"}),(0,b.jsx)("td",{className:"px-3 py-2 text-muted-foreground truncate max-w-[240px]",title:a.reason??"",children:a.reason??"—"}),(0,b.jsx)("td",{className:"px-3 py-2",children:(0,b.jsx)(x,{ms:a.durationMs})}),(0,b.jsx)("td",{className:"px-3 py-2 font-mono text-muted-foreground",title:a.sessionId??"",children:(e=a.sessionId)?e.slice(0,8):"—"}),(0,b.jsx)("td",{className:"px-3 py-2",children:a.permissionMode?(0,b.jsx)(w,{mode:a.permissionMode}):"—"}),(0,b.jsx)("td",{className:"px-3 py-2 text-right text-muted-foreground whitespace-nowrap",title:new Date(a.timestamp).toLocaleString(void 0,{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit",second:"2-digit"}),children:(f=a.timestamp,(g=Date.now()-f)<6e4?`${Math.max(1,Math.floor(g/1e3))}s ago`:g<36e5?`${Math.floor(g/6e4)}m ago`:g<864e5?`${Math.floor(g/36e5)}h ago`:`${Math.floor(g/864e5)}d ago`)})]}),i&&(0,b.jsx)(B,{item:a})]},`${a.timestamp}-${d}`)})})]})}),(0,b.jsx)(n.default,{currentPage:h,totalPages:N,onPageChange:a=>{i(a),y(null)}})]})]})}],63616)}];
|
|
2
2
|
|
|
3
3
|
//# sourceMappingURL=app_hooks_hooks-client_tsx_0n~.yoz._.js.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
module.exports=[83694,a=>{"use strict";var b=a.i(87924),c=a.i(72131),d=a.i(50944),e=a.i(5050);let f=(0,e.createServerReference)("
|
|
1
|
+
module.exports=[83694,a=>{"use strict";var b=a.i(87924),c=a.i(72131),d=a.i(50944),e=a.i(5050);let f=(0,e.createServerReference)("4092695cf29cff2e61f6794f308bf1331507e68463",e.callServer,void 0,e.findSourceMapURL,"login");var g=a.i(35960),h=a.i(38246);a.s(["default",0,function(){let a=(0,d.useSearchParams)(),e=(0,d.useRouter)(),i=a.get("from")??"/",[j,k]=(0,c.useState)(null),[l,m]=(0,c.useState)(!1);async function n(a){a.preventDefault(),k(null),m(!0);let b=new FormData(a.currentTarget);b.set("redirectTo",i);let c=await f(b);c?.error?(k(c.error),m(!1)):c?.redirectTo&&e.push(c.redirectTo)}return(0,b.jsx)("div",{className:"min-h-screen flex items-center justify-center bg-background px-4",children:(0,b.jsxs)("div",{className:"w-full max-w-sm rounded-lg border border-border bg-card p-8 shadow-lg",children:[(0,b.jsxs)("div",{className:"flex flex-col items-center gap-2 mb-6",children:[(0,b.jsx)(h.default,{href:"/",children:(0,b.jsx)(g.Logo,{width:36,height:36})}),(0,b.jsx)("h2",{className:"text-xl font-semibold text-foreground",children:"Sign in to Claudeye"}),(0,b.jsx)("p",{className:"text-sm text-muted-foreground",children:"Enter your credentials to continue"})]}),(0,b.jsxs)("form",{onSubmit:n,className:"flex flex-col gap-4",children:[(0,b.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,b.jsx)("label",{htmlFor:"username",className:"text-sm font-medium text-foreground",children:"Username"}),(0,b.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,b.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,b.jsx)("label",{htmlFor:"password",className:"text-sm font-medium text-foreground",children:"Password"}),(0,b.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"})]}),j&&(0,b.jsx)("p",{className:"text-sm text-red-500 bg-red-500/10 rounded-md px-3 py-2",children:j}),(0,b.jsx)("button",{type:"submit",disabled:l,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:l?"Signing in...":"Sign in"})]})]})})}],83694)}];
|
|
2
2
|
|
|
3
3
|
//# sourceMappingURL=app_login_page_tsx_0z71ad3._.js.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
module.exports=[57730,a=>{"use strict";var b=a.i(87924),c=a.i(72131),d=a.i(38246),e=a.i(210),f=a.i(70106);let g=(0,f.default)("circle-check",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]),h=(0,f.default)("circle-x",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]);var i=a.i(69520),j=a.i(65967),k=a.i(5050);let l=(0,k.createServerReference)("40c66fca7ba0ee1a500d1b8b8c56ded5628e0b7bd7",k.callServer,void 0,k.findSourceMapURL,"getCompletedHistoryAction"),m=(0,k.createServerReference)("6026ef4e4e1a0268c663df4567ebd5e3218cf77c56",k.callServer,void 0,k.findSourceMapURL,"searchCompletedHistoryAction");var n=a.i(6236),o=a.i(90619),p=a.i(95947);function q(a){let b=Math.floor((Date.now()-a)/1e3);if(b<60)return`${b}s ago`;let c=Math.floor(b/60);if(c<60)return`${c}m ago`;let d=Math.floor(c/60);return`${d}h ago`}function r({type:a}){let c="eval"===a?"bg-blue-100 text-blue-700 dark:bg-blue-900/30 dark:text-blue-400":"action"===a?"bg-amber-100 text-amber-700 dark:bg-amber-900/30 dark:text-amber-400":"bg-purple-100 text-purple-700 dark:bg-purple-900/30 dark:text-purple-400";return(0,b.jsx)("span",{className:`inline-flex items-center rounded px-1.5 py-0.5 text-[0.6rem] font-medium ${c}`,children:a.toUpperCase()})}function s({priority:a}){let c=a<=0;return(0,b.jsx)("span",{className:`text-[0.6rem] font-medium px-1.5 py-0.5 rounded ${c?"bg-red-100 text-red-700 dark:bg-red-900/30 dark:text-red-400":"bg-muted text-muted-foreground"}`,children:c?"HIGH":"LOW"})}function t({projectName:a,sessionId:c}){return(0,b.jsx)(d.default,{href:`/project/${encodeURIComponent(a)}/session/${encodeURIComponent(c)}`,className:"text-blue-600 dark:text-blue-400 hover:underline truncate block max-w-[200px]",children:c})}a.s(["default",0,function(){let a,f,{intervalSec:k}=(0,n.useAutoRefresh)(),u=(0,o.useUrlParams)(),v=(0,c.useRef)(!1),[w,x]=(0,c.useState)(null),[y,z]=(0,c.useState)(null),[A,B]=(0,c.useState)(()=>{let a=u.get("tab");return"pending"===a||"processing"===a||"completed"===a?a:"processing"}),[C,D]=(0,c.useState)(()=>(0,p.paramToPage)(u.get("page"))),[E,F]=(0,c.useState)(null),G=(0,c.useRef)(A),[H,I]=(0,c.useState)(()=>{let a=u.get("type");return"eval"===a||"enrichment"===a||"action"===a?a:""}),[J,K]=(0,c.useState)(()=>u.get("item")??""),[L,M]=(0,c.useState)(()=>u.get("session")??""),N=(0,c.useRef)(null),O=(0,c.useRef)({filterType:H,filterItem:J,filterSession:L});O.current={filterType:H,filterItem:J,filterSession:L},(0,c.useEffect)(()=>{if(!v.current){v.current=!0;return}u.setAll({tab:"processing"===A?void 0:A,type:H||void 0,item:J||void 0,session:L||void 0,page:"completed"===A?(0,p.pageToParam)(C):void 0})},[A,H,J,L,C]);let P=(0,c.useCallback)(async()=>{try{let a=await fetch("/api/queue-status",{cache:"no-store"});if(a.ok){let b=await a.json();x(b),z(null)}else z(`Failed to fetch: ${a.status}`)}catch{z("Network error")}},[]),Q=(0,c.useCallback)(async a=>{try{let b,{filterType:c,filterItem:d,filterSession:e}=O.current;b=""!==c||""!==d||""!==e?await m({type:c||void 0,itemName:d||void 0,sessionId:e||void 0},a):await l(a),F(b)}catch{}},[]);(0,c.useEffect)(()=>{P();let a=setInterval(P,k>0?1e3*k:5e3);return()=>clearInterval(a)},[P,k]),(0,c.useEffect)(()=>{"completed"===A&&"completed"!==G.current&&(D(1),Q(1)),G.current=A},[A,Q]),(0,c.useEffect)(()=>{if("completed"===A)return N.current&&clearTimeout(N.current),N.current=setTimeout(()=>{D(1),Q(1)},300),()=>{N.current&&clearTimeout(N.current)}},[H,J,L]),(0,c.useEffect)(()=>{if("completed"!==A)return;Q(C);let a=setInterval(()=>Q(C),k>0?1e3*k:5e3);return()=>clearInterval(a)},[C,A,Q,k]),(0,c.useEffect)(()=>{"completed"===A&&k>0&&1===C&&E&&0===E.entries.length&&E.totalPages>1&&D(2)},[A,k,C,E]);let R=[{key:"pending",label:"In Queue",count:w?.pending.length??0},{key:"processing",label:"Processing",count:w?.processing.length??0},{key:"completed",label:"Processed"}];return(0,b.jsxs)("div",{className:"min-h-screen bg-background p-6 max-w-4xl mx-auto",children:[(0,b.jsxs)("div",{className:"mb-6",children:[(0,b.jsxs)(d.default,{href:"/",className:"inline-flex items-center gap-1 text-sm text-muted-foreground hover:text-foreground transition-colors",children:[(0,b.jsx)(e.ArrowLeft,{className:"h-4 w-4"}),"Back"]}),(0,b.jsx)("h1",{className:"text-2xl font-bold text-foreground mt-2",children:"Queue Details"})]}),y&&!w&&(0,b.jsxs)("div",{className:"bg-card border border-border rounded-lg p-4 text-center",children:[(0,b.jsx)("p",{className:"text-sm text-destructive mb-2",children:y}),(0,b.jsx)("button",{onClick:P,className:"text-xs text-primary hover:underline",children:"Retry"})]}),!w&&!y&&(0,b.jsx)("p",{className:"text-sm text-muted-foreground",children:"Loading..."}),w&&(0,b.jsxs)("div",{className:"space-y-4",children:[(0,b.jsx)("div",{className:"flex gap-1 border-b border-border",children:R.map(a=>(0,b.jsxs)("button",{onClick:()=>B(a.key),className:`px-4 py-2 text-sm font-medium border-b-2 transition-colors ${A===a.key?"border-primary text-foreground":"border-transparent text-muted-foreground hover:text-foreground"}`,children:[a.label,null!=a.count&&(0,b.jsxs)("span",{className:"ml-1.5 text-xs text-muted-foreground",children:["(",a.count,")"]})]},a.key))}),(0,b.jsxs)("div",{className:"bg-card border border-border rounded-lg overflow-hidden",children:["pending"===A&&(0===w.pending.length?(0,b.jsx)("p",{className:"px-4 py-8 text-xs text-muted-foreground text-center",children:"No items in queue."}):(0,b.jsx)("div",{className:"overflow-x-auto",children:(0,b.jsxs)("table",{className:"w-full text-xs",children:[(0,b.jsx)("thead",{children:(0,b.jsxs)("tr",{className:"text-left text-muted-foreground border-b border-border bg-muted/30",children:[(0,b.jsx)("th",{className:"px-3 py-2 font-medium",children:"Type"}),(0,b.jsx)("th",{className:"px-3 py-2 font-medium",children:"Item"}),(0,b.jsx)("th",{className:"px-3 py-2 font-medium",children:"Session"}),(0,b.jsx)("th",{className:"px-3 py-2 font-medium",children:"Priority"}),(0,b.jsx)("th",{className:"px-3 py-2 font-medium text-right",children:"Queued"})]})}),(0,b.jsx)("tbody",{className:"divide-y divide-border/50",children:w.pending.map(a=>(0,b.jsxs)("tr",{className:"hover:bg-muted/20",children:[(0,b.jsx)("td",{className:"px-3 py-2",children:(0,b.jsx)(r,{type:a.type})}),(0,b.jsx)("td",{className:"px-3 py-2 font-mono text-foreground",children:a.itemName}),(0,b.jsx)("td",{className:"px-3 py-2",children:(0,b.jsx)(t,{projectName:a.projectName,sessionId:a.sessionId})}),(0,b.jsx)("td",{className:"px-3 py-2",children:(0,b.jsx)(s,{priority:a.priority})}),(0,b.jsx)("td",{className:"px-3 py-2 text-right text-muted-foreground",children:q(a.addedAt)})]},a.key))})]})})),"processing"===A&&(0===w.processing.length?(0,b.jsx)("p",{className:"px-4 py-8 text-xs text-muted-foreground text-center",children:"No items currently processing."}):(0,b.jsx)("div",{className:"overflow-x-auto",children:(0,b.jsxs)("table",{className:"w-full text-xs",children:[(0,b.jsx)("thead",{children:(0,b.jsxs)("tr",{className:"text-left text-muted-foreground border-b border-border bg-muted/30",children:[(0,b.jsx)("th",{className:"px-3 py-2 font-medium",children:"Type"}),(0,b.jsx)("th",{className:"px-3 py-2 font-medium",children:"Item"}),(0,b.jsx)("th",{className:"px-3 py-2 font-medium",children:"Session"}),(0,b.jsx)("th",{className:"px-3 py-2 font-medium",children:"Priority"}),(0,b.jsx)("th",{className:"px-3 py-2 font-medium text-right",children:"Started"})]})}),(0,b.jsx)("tbody",{className:"divide-y divide-border/50",children:w.processing.map(a=>(0,b.jsxs)("tr",{className:"hover:bg-muted/20",children:[(0,b.jsx)("td",{className:"px-3 py-2",children:(0,b.jsx)(r,{type:a.type})}),(0,b.jsx)("td",{className:"px-3 py-2",children:(0,b.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,b.jsx)(i.RefreshCw,{className:"w-3 h-3 text-blue-500 animate-spin flex-shrink-0"}),(0,b.jsx)("span",{className:"font-mono text-foreground",children:a.itemName})]})}),(0,b.jsx)("td",{className:"px-3 py-2",children:(0,b.jsx)(t,{projectName:a.projectName,sessionId:a.sessionId})}),(0,b.jsx)("td",{className:"px-3 py-2",children:(0,b.jsx)(s,{priority:a.priority})}),(0,b.jsx)("td",{className:"px-3 py-2 text-right text-muted-foreground",children:q(a.startedAt)})]},a.key))})]})})),"completed"===A&&(a=E?.entries??w.completed,f=E?.totalPages??1,(0,b.jsxs)(b.Fragment,{children:[(0,b.jsxs)("div",{className:"flex items-center gap-2 px-3 py-2 border-b border-border bg-muted/30",children:[(0,b.jsxs)("select",{value:H,onChange:a=>I(a.target.value),className:"h-7 rounded border border-border bg-background px-2 text-xs text-foreground",children:[(0,b.jsx)("option",{value:"",children:"All Types"}),(0,b.jsx)("option",{value:"eval",children:"Eval"}),(0,b.jsx)("option",{value:"enrichment",children:"Enrichment"}),(0,b.jsx)("option",{value:"action",children:"Action"})]}),(0,b.jsx)("input",{type:"text",value:J,onChange:a=>K(a.target.value),placeholder:"Filter by item...",className:"h-7 rounded border border-border bg-background px-2 text-xs text-foreground placeholder:text-muted-foreground w-40"}),(0,b.jsx)("input",{type:"text",value:L,onChange:a=>M(a.target.value),placeholder:"Filter by session...",className:"h-7 rounded border border-border bg-background px-2 text-xs text-foreground placeholder:text-muted-foreground w-40"})]}),0===a.length?(0,b.jsx)("p",{className:"px-4 py-8 text-xs text-muted-foreground text-center",children:"No completed items."}):(0,b.jsx)("div",{className:"overflow-x-auto",children:(0,b.jsxs)("table",{className:"w-full text-xs",children:[(0,b.jsx)("thead",{children:(0,b.jsxs)("tr",{className:"text-left text-muted-foreground border-b border-border bg-muted/30",children:[(0,b.jsx)("th",{className:"px-3 py-2 font-medium",children:"Type"}),(0,b.jsx)("th",{className:"px-3 py-2 font-medium",children:"Item"}),(0,b.jsx)("th",{className:"px-3 py-2 font-medium",children:"Session"}),(0,b.jsx)("th",{className:"px-3 py-2 font-medium",children:"Duration"}),(0,b.jsx)("th",{className:"px-3 py-2 font-medium",children:"Status"}),(0,b.jsx)("th",{className:"px-3 py-2 font-medium text-right",children:"Completed"})]})}),(0,b.jsx)("tbody",{className:"divide-y divide-border/50",children:a.map((a,c)=>(0,b.jsxs)("tr",{className:"hover:bg-muted/20",children:[(0,b.jsx)("td",{className:"px-3 py-2",children:(0,b.jsx)(r,{type:a.type})}),(0,b.jsx)("td",{className:"px-3 py-2 font-mono text-foreground",children:a.itemName}),(0,b.jsx)("td",{className:"px-3 py-2",children:(0,b.jsx)(t,{projectName:a.projectName,sessionId:a.sessionId})}),(0,b.jsx)("td",{className:"px-3 py-2 text-muted-foreground",children:function(a){if(a<1e3)return`${a}ms`;let b=(a/1e3).toFixed(1);return`${b}s`}(a.durationMs)}),(0,b.jsx)("td",{className:"px-3 py-2",children:a.success?(0,b.jsx)(g,{className:"h-3.5 w-3.5 text-green-600 dark:text-green-400"}):(0,b.jsx)(h,{className:"h-3.5 w-3.5 text-red-600 dark:text-red-400"})}),(0,b.jsx)("td",{className:"px-3 py-2 text-right text-muted-foreground",children:new Date(a.completedAt).toLocaleString(void 0,{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit",second:"2-digit"})})]},`${a.key}-${a.completedAt}-${c}`))})]})}),(0,b.jsx)(j.default,{currentPage:C,totalPages:f,onPageChange:D})]}))]}),w.recentErrors.length>0&&(0,b.jsxs)("section",{className:"bg-card border border-border rounded-lg p-4",children:[(0,b.jsxs)("h2",{className:"text-sm font-semibold text-foreground mb-2",children:["Recent Errors",(0,b.jsxs)("span",{className:"ml-2 text-xs font-normal text-muted-foreground",children:["(",w.recentErrors.length,")"]})]}),(0,b.jsx)("div",{className:"space-y-1",children:w.recentErrors.map((a,c)=>(0,b.jsxs)("div",{className:"text-xs bg-muted/30 rounded px-2 py-1 flex items-start gap-2",children:[(0,b.jsx)("span",{className:"font-mono text-muted-foreground shrink-0",children:a.key}),(0,b.jsx)("span",{className:"text-red-500 break-all",children:a.error}),(0,b.jsx)("span",{className:"text-muted-foreground shrink-0 ml-auto",children:q(a.at)})]},`${a.key}-${a.at}-${c}`))})]})]})]})}],57730)}];
|
|
1
|
+
module.exports=[57730,a=>{"use strict";var b=a.i(87924),c=a.i(72131),d=a.i(38246),e=a.i(210),f=a.i(70106);let g=(0,f.default)("circle-check",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]),h=(0,f.default)("circle-x",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]);var i=a.i(69520),j=a.i(65967),k=a.i(5050);let l=(0,k.createServerReference)("4065f8732e9f272012c28e8c9a15ccb3998a3c9804",k.callServer,void 0,k.findSourceMapURL,"getCompletedHistoryAction"),m=(0,k.createServerReference)("60ec55b74018ebec91b801c4822c9e7922a7a163a0",k.callServer,void 0,k.findSourceMapURL,"searchCompletedHistoryAction");var n=a.i(6236),o=a.i(90619),p=a.i(95947);function q(a){let b=Math.floor((Date.now()-a)/1e3);if(b<60)return`${b}s ago`;let c=Math.floor(b/60);if(c<60)return`${c}m ago`;let d=Math.floor(c/60);return`${d}h ago`}function r({type:a}){let c="eval"===a?"bg-blue-100 text-blue-700 dark:bg-blue-900/30 dark:text-blue-400":"action"===a?"bg-amber-100 text-amber-700 dark:bg-amber-900/30 dark:text-amber-400":"bg-purple-100 text-purple-700 dark:bg-purple-900/30 dark:text-purple-400";return(0,b.jsx)("span",{className:`inline-flex items-center rounded px-1.5 py-0.5 text-[0.6rem] font-medium ${c}`,children:a.toUpperCase()})}function s({priority:a}){let c=a<=0;return(0,b.jsx)("span",{className:`text-[0.6rem] font-medium px-1.5 py-0.5 rounded ${c?"bg-red-100 text-red-700 dark:bg-red-900/30 dark:text-red-400":"bg-muted text-muted-foreground"}`,children:c?"HIGH":"LOW"})}function t({projectName:a,sessionId:c}){return(0,b.jsx)(d.default,{href:`/project/${encodeURIComponent(a)}/session/${encodeURIComponent(c)}`,className:"text-blue-600 dark:text-blue-400 hover:underline truncate block max-w-[200px]",children:c})}a.s(["default",0,function(){let a,f,{intervalSec:k}=(0,n.useAutoRefresh)(),u=(0,o.useUrlParams)(),v=(0,c.useRef)(!1),[w,x]=(0,c.useState)(null),[y,z]=(0,c.useState)(null),[A,B]=(0,c.useState)(()=>{let a=u.get("tab");return"pending"===a||"processing"===a||"completed"===a?a:"processing"}),[C,D]=(0,c.useState)(()=>(0,p.paramToPage)(u.get("page"))),[E,F]=(0,c.useState)(null),G=(0,c.useRef)(A),[H,I]=(0,c.useState)(()=>{let a=u.get("type");return"eval"===a||"enrichment"===a||"action"===a?a:""}),[J,K]=(0,c.useState)(()=>u.get("item")??""),[L,M]=(0,c.useState)(()=>u.get("session")??""),N=(0,c.useRef)(null),O=(0,c.useRef)({filterType:H,filterItem:J,filterSession:L});O.current={filterType:H,filterItem:J,filterSession:L},(0,c.useEffect)(()=>{if(!v.current){v.current=!0;return}u.setAll({tab:"processing"===A?void 0:A,type:H||void 0,item:J||void 0,session:L||void 0,page:"completed"===A?(0,p.pageToParam)(C):void 0})},[A,H,J,L,C]);let P=(0,c.useCallback)(async()=>{try{let a=await fetch("/api/queue-status",{cache:"no-store"});if(a.ok){let b=await a.json();x(b),z(null)}else z(`Failed to fetch: ${a.status}`)}catch{z("Network error")}},[]),Q=(0,c.useCallback)(async a=>{try{let b,{filterType:c,filterItem:d,filterSession:e}=O.current;b=""!==c||""!==d||""!==e?await m({type:c||void 0,itemName:d||void 0,sessionId:e||void 0},a):await l(a),F(b)}catch{}},[]);(0,c.useEffect)(()=>{P();let a=setInterval(P,k>0?1e3*k:5e3);return()=>clearInterval(a)},[P,k]),(0,c.useEffect)(()=>{"completed"===A&&"completed"!==G.current&&(D(1),Q(1)),G.current=A},[A,Q]),(0,c.useEffect)(()=>{if("completed"===A)return N.current&&clearTimeout(N.current),N.current=setTimeout(()=>{D(1),Q(1)},300),()=>{N.current&&clearTimeout(N.current)}},[H,J,L]),(0,c.useEffect)(()=>{if("completed"!==A)return;Q(C);let a=setInterval(()=>Q(C),k>0?1e3*k:5e3);return()=>clearInterval(a)},[C,A,Q,k]),(0,c.useEffect)(()=>{"completed"===A&&k>0&&1===C&&E&&0===E.entries.length&&E.totalPages>1&&D(2)},[A,k,C,E]);let R=[{key:"pending",label:"In Queue",count:w?.pending.length??0},{key:"processing",label:"Processing",count:w?.processing.length??0},{key:"completed",label:"Processed"}];return(0,b.jsxs)("div",{className:"min-h-screen bg-background p-6 max-w-4xl mx-auto",children:[(0,b.jsxs)("div",{className:"mb-6",children:[(0,b.jsxs)(d.default,{href:"/",className:"inline-flex items-center gap-1 text-sm text-muted-foreground hover:text-foreground transition-colors",children:[(0,b.jsx)(e.ArrowLeft,{className:"h-4 w-4"}),"Back"]}),(0,b.jsx)("h1",{className:"text-2xl font-bold text-foreground mt-2",children:"Queue Details"})]}),y&&!w&&(0,b.jsxs)("div",{className:"bg-card border border-border rounded-lg p-4 text-center",children:[(0,b.jsx)("p",{className:"text-sm text-destructive mb-2",children:y}),(0,b.jsx)("button",{onClick:P,className:"text-xs text-primary hover:underline",children:"Retry"})]}),!w&&!y&&(0,b.jsx)("p",{className:"text-sm text-muted-foreground",children:"Loading..."}),w&&(0,b.jsxs)("div",{className:"space-y-4",children:[(0,b.jsx)("div",{className:"flex gap-1 border-b border-border",children:R.map(a=>(0,b.jsxs)("button",{onClick:()=>B(a.key),className:`px-4 py-2 text-sm font-medium border-b-2 transition-colors ${A===a.key?"border-primary text-foreground":"border-transparent text-muted-foreground hover:text-foreground"}`,children:[a.label,null!=a.count&&(0,b.jsxs)("span",{className:"ml-1.5 text-xs text-muted-foreground",children:["(",a.count,")"]})]},a.key))}),(0,b.jsxs)("div",{className:"bg-card border border-border rounded-lg overflow-hidden",children:["pending"===A&&(0===w.pending.length?(0,b.jsx)("p",{className:"px-4 py-8 text-xs text-muted-foreground text-center",children:"No items in queue."}):(0,b.jsx)("div",{className:"overflow-x-auto",children:(0,b.jsxs)("table",{className:"w-full text-xs",children:[(0,b.jsx)("thead",{children:(0,b.jsxs)("tr",{className:"text-left text-muted-foreground border-b border-border bg-muted/30",children:[(0,b.jsx)("th",{className:"px-3 py-2 font-medium",children:"Type"}),(0,b.jsx)("th",{className:"px-3 py-2 font-medium",children:"Item"}),(0,b.jsx)("th",{className:"px-3 py-2 font-medium",children:"Session"}),(0,b.jsx)("th",{className:"px-3 py-2 font-medium",children:"Priority"}),(0,b.jsx)("th",{className:"px-3 py-2 font-medium text-right",children:"Queued"})]})}),(0,b.jsx)("tbody",{className:"divide-y divide-border/50",children:w.pending.map(a=>(0,b.jsxs)("tr",{className:"hover:bg-muted/20",children:[(0,b.jsx)("td",{className:"px-3 py-2",children:(0,b.jsx)(r,{type:a.type})}),(0,b.jsx)("td",{className:"px-3 py-2 font-mono text-foreground",children:a.itemName}),(0,b.jsx)("td",{className:"px-3 py-2",children:(0,b.jsx)(t,{projectName:a.projectName,sessionId:a.sessionId})}),(0,b.jsx)("td",{className:"px-3 py-2",children:(0,b.jsx)(s,{priority:a.priority})}),(0,b.jsx)("td",{className:"px-3 py-2 text-right text-muted-foreground",children:q(a.addedAt)})]},a.key))})]})})),"processing"===A&&(0===w.processing.length?(0,b.jsx)("p",{className:"px-4 py-8 text-xs text-muted-foreground text-center",children:"No items currently processing."}):(0,b.jsx)("div",{className:"overflow-x-auto",children:(0,b.jsxs)("table",{className:"w-full text-xs",children:[(0,b.jsx)("thead",{children:(0,b.jsxs)("tr",{className:"text-left text-muted-foreground border-b border-border bg-muted/30",children:[(0,b.jsx)("th",{className:"px-3 py-2 font-medium",children:"Type"}),(0,b.jsx)("th",{className:"px-3 py-2 font-medium",children:"Item"}),(0,b.jsx)("th",{className:"px-3 py-2 font-medium",children:"Session"}),(0,b.jsx)("th",{className:"px-3 py-2 font-medium",children:"Priority"}),(0,b.jsx)("th",{className:"px-3 py-2 font-medium text-right",children:"Started"})]})}),(0,b.jsx)("tbody",{className:"divide-y divide-border/50",children:w.processing.map(a=>(0,b.jsxs)("tr",{className:"hover:bg-muted/20",children:[(0,b.jsx)("td",{className:"px-3 py-2",children:(0,b.jsx)(r,{type:a.type})}),(0,b.jsx)("td",{className:"px-3 py-2",children:(0,b.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,b.jsx)(i.RefreshCw,{className:"w-3 h-3 text-blue-500 animate-spin flex-shrink-0"}),(0,b.jsx)("span",{className:"font-mono text-foreground",children:a.itemName})]})}),(0,b.jsx)("td",{className:"px-3 py-2",children:(0,b.jsx)(t,{projectName:a.projectName,sessionId:a.sessionId})}),(0,b.jsx)("td",{className:"px-3 py-2",children:(0,b.jsx)(s,{priority:a.priority})}),(0,b.jsx)("td",{className:"px-3 py-2 text-right text-muted-foreground",children:q(a.startedAt)})]},a.key))})]})})),"completed"===A&&(a=E?.entries??w.completed,f=E?.totalPages??1,(0,b.jsxs)(b.Fragment,{children:[(0,b.jsxs)("div",{className:"flex items-center gap-2 px-3 py-2 border-b border-border bg-muted/30",children:[(0,b.jsxs)("select",{value:H,onChange:a=>I(a.target.value),className:"h-7 rounded border border-border bg-background px-2 text-xs text-foreground",children:[(0,b.jsx)("option",{value:"",children:"All Types"}),(0,b.jsx)("option",{value:"eval",children:"Eval"}),(0,b.jsx)("option",{value:"enrichment",children:"Enrichment"}),(0,b.jsx)("option",{value:"action",children:"Action"})]}),(0,b.jsx)("input",{type:"text",value:J,onChange:a=>K(a.target.value),placeholder:"Filter by item...",className:"h-7 rounded border border-border bg-background px-2 text-xs text-foreground placeholder:text-muted-foreground w-40"}),(0,b.jsx)("input",{type:"text",value:L,onChange:a=>M(a.target.value),placeholder:"Filter by session...",className:"h-7 rounded border border-border bg-background px-2 text-xs text-foreground placeholder:text-muted-foreground w-40"})]}),0===a.length?(0,b.jsx)("p",{className:"px-4 py-8 text-xs text-muted-foreground text-center",children:"No completed items."}):(0,b.jsx)("div",{className:"overflow-x-auto",children:(0,b.jsxs)("table",{className:"w-full text-xs",children:[(0,b.jsx)("thead",{children:(0,b.jsxs)("tr",{className:"text-left text-muted-foreground border-b border-border bg-muted/30",children:[(0,b.jsx)("th",{className:"px-3 py-2 font-medium",children:"Type"}),(0,b.jsx)("th",{className:"px-3 py-2 font-medium",children:"Item"}),(0,b.jsx)("th",{className:"px-3 py-2 font-medium",children:"Session"}),(0,b.jsx)("th",{className:"px-3 py-2 font-medium",children:"Duration"}),(0,b.jsx)("th",{className:"px-3 py-2 font-medium",children:"Status"}),(0,b.jsx)("th",{className:"px-3 py-2 font-medium text-right",children:"Completed"})]})}),(0,b.jsx)("tbody",{className:"divide-y divide-border/50",children:a.map((a,c)=>(0,b.jsxs)("tr",{className:"hover:bg-muted/20",children:[(0,b.jsx)("td",{className:"px-3 py-2",children:(0,b.jsx)(r,{type:a.type})}),(0,b.jsx)("td",{className:"px-3 py-2 font-mono text-foreground",children:a.itemName}),(0,b.jsx)("td",{className:"px-3 py-2",children:(0,b.jsx)(t,{projectName:a.projectName,sessionId:a.sessionId})}),(0,b.jsx)("td",{className:"px-3 py-2 text-muted-foreground",children:function(a){if(a<1e3)return`${a}ms`;let b=(a/1e3).toFixed(1);return`${b}s`}(a.durationMs)}),(0,b.jsx)("td",{className:"px-3 py-2",children:a.success?(0,b.jsx)(g,{className:"h-3.5 w-3.5 text-green-600 dark:text-green-400"}):(0,b.jsx)(h,{className:"h-3.5 w-3.5 text-red-600 dark:text-red-400"})}),(0,b.jsx)("td",{className:"px-3 py-2 text-right text-muted-foreground",children:new Date(a.completedAt).toLocaleString(void 0,{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit",second:"2-digit"})})]},`${a.key}-${a.completedAt}-${c}`))})]})}),(0,b.jsx)(j.default,{currentPage:C,totalPages:f,onPageChange:D})]}))]}),w.recentErrors.length>0&&(0,b.jsxs)("section",{className:"bg-card border border-border rounded-lg p-4",children:[(0,b.jsxs)("h2",{className:"text-sm font-semibold text-foreground mb-2",children:["Recent Errors",(0,b.jsxs)("span",{className:"ml-2 text-xs font-normal text-muted-foreground",children:["(",w.recentErrors.length,")"]})]}),(0,b.jsx)("div",{className:"space-y-1",children:w.recentErrors.map((a,c)=>(0,b.jsxs)("div",{className:"text-xs bg-muted/30 rounded px-2 py-1 flex items-start gap-2",children:[(0,b.jsx)("span",{className:"font-mono text-muted-foreground shrink-0",children:a.key}),(0,b.jsx)("span",{className:"text-red-500 break-all",children:a.error}),(0,b.jsx)("span",{className:"text-muted-foreground shrink-0 ml-auto",children:q(a.at)})]},`${a.key}-${a.at}-${c}`))})]})]})]})}],57730)}];
|
|
2
2
|
|
|
3
3
|
//# sourceMappingURL=app_queue_queue-client_tsx_0c0olxv._.js.map
|
|
@@ -7,9 +7,9 @@ globalThis.__BUILD_MANIFEST = {
|
|
|
7
7
|
"static/chunks/03~yq9q893hmn.js"
|
|
8
8
|
],
|
|
9
9
|
"lowPriorityFiles": [
|
|
10
|
-
"static/
|
|
11
|
-
"static/
|
|
12
|
-
"static/
|
|
10
|
+
"static/B9luWx1Z31ygILxMA8k6o/_buildManifest.js",
|
|
11
|
+
"static/B9luWx1Z31ygILxMA8k6o/_ssgManifest.js",
|
|
12
|
+
"static/B9luWx1Z31ygILxMA8k6o/_clientMiddlewareManifest.js"
|
|
13
13
|
],
|
|
14
14
|
"rootMainFiles": [
|
|
15
15
|
"static/chunks/115dplafwys-z.js",
|