@pricening/pi-web 0.12.4 → 0.12.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.next/BUILD_ID +1 -1
- package/.next/app-path-routes-manifest.json +16 -16
- package/.next/build-manifest.json +2 -2
- package/.next/prerender-manifest.json +3 -3
- package/.next/required-server-files.js +1 -1
- package/.next/required-server-files.json +1 -1
- package/.next/server/app/_global-error/page_client-reference-manifest.js +1 -1
- package/.next/server/app/_global-error.html +1 -1
- package/.next/server/app/_global-error.rsc +1 -1
- package/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/.next/server/app/_not-found.html +1 -1
- package/.next/server/app/_not-found.rsc +2 -2
- package/.next/server/app/_not-found.segments/_full.segment.rsc +2 -2
- package/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +2 -2
- package/.next/server/app/_not-found.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/api/agent/[id]/events/route.js +2 -2
- package/.next/server/app/api/agent/[id]/lease/route.js +1 -1
- package/.next/server/app/api/agent/[id]/lease/route.js.nft.json +1 -1
- package/.next/server/app/api/app-update/route.js +1 -1
- package/.next/server/app/api/files/[...path]/route.js +1 -1
- package/.next/server/app/api/models-config/route.js +1 -1
- package/.next/server/app/api/sessions/[id]/route.js +1 -1
- package/.next/server/app/api/sessions/search/route.js +1 -1
- package/.next/server/app/api/sessions/stats/route.js +1 -1
- package/.next/server/app/index.html +1 -1
- package/.next/server/app/index.rsc +4 -4
- package/.next/server/app/index.segments/__PAGE__.segment.rsc +4 -4
- package/.next/server/app/index.segments/_full.segment.rsc +4 -4
- package/.next/server/app/index.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/login/page_client-reference-manifest.js +1 -1
- package/.next/server/app/login.html +1 -1
- package/.next/server/app/login.rsc +2 -2
- package/.next/server/app/login.segments/_full.segment.rsc +2 -2
- package/.next/server/app/login.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/login.segments/login/__PAGE__.segment.rsc +2 -2
- package/.next/server/app/page.js +23 -23
- package/.next/server/app/page_client-reference-manifest.js +1 -1
- package/.next/server/app-paths-manifest.json +16 -16
- package/.next/server/chunks/5582.js +1 -1
- package/.next/server/chunks/5924.js +1 -0
- package/.next/server/chunks/6429.js +8 -7
- package/.next/server/instrumentation.js +1 -1
- package/.next/server/instrumentation.js.nft.json +1 -1
- package/.next/server/middleware-build-manifest.js +1 -1
- package/.next/server/pages/404.html +1 -1
- package/.next/server/pages/500.html +1 -1
- package/.next/server/server-reference-manifest.json +1 -1
- package/.next/static/chunks/app/{layout-9d6993813bf86a1b.js → layout-ada8395c0dd27f01.js} +1 -1
- package/.next/static/chunks/app/page-88e5d2c5affba2f7.js +286 -0
- package/.next/trace +83 -83
- package/.next/trace-build +1 -1
- package/package.json +2 -2
- package/.next/server/chunks/7492.js +0 -1
- package/.next/static/chunks/app/page-6bdc383a2a0e75cd.js +0 -286
- /package/.next/static/{PnFO9KT71uRqS9PQ-IyCa → 297ATGH77_vEym6tRQh_6}/_buildManifest.js +0 -0
- /package/.next/static/{PnFO9KT71uRqS9PQ-IyCa → 297ATGH77_vEym6tRQh_6}/_ssgManifest.js +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
(()=>{var a={};a.id=9183,a.ids=[9183],a.modules={261:a=>{"use strict";a.exports=require("next/dist/shared/lib/router/utils/app-paths")},3295:a=>{"use strict";a.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},8128:a=>{"use strict";a.exports=require("next/dist/server/runtime-reacts.external.js")},10846:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},19121:a=>{"use strict";a.exports=require("next/dist/server/app-render/action-async-storage.external.js")},29294:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},33873:a=>{"use strict";a.exports=require("path")},44870:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},45319:(a,b,c)=>{"use strict";c.r(b),c.d(b,{handler:()=>A,patchFetch:()=>z,routeModule:()=>v,serverHooks:()=>y,workAsyncStorage:()=>w,workUnitAsyncStorage:()=>x});var d=c(19225),e=c(84006),f=c(8317),g=c(99373),h=c(34775),i=c(24235),j=c(261),k=c(54365),l=c(90771),m=c(73461),n=c(67798),o=c(92280),p=c(62018),q=c(45696),r=c(47929),s=c(86439),t=c(10246),u=c(37527);let v=new d.AppRouteRouteModule({definition:{kind:e.RouteKind.APP_ROUTE,page:"/api/app-update/route",pathname:"/api/app-update",filename:"route",bundlePath:"app/api/app-update/route"},distDir:".next",relativeProjectDir:"",resolvedPagePath:"/home/runner/work/pi-web/pi-web/app/api/app-update/route.ts",nextConfigOutput:"",userland:()=>c(62445),...{}}),{workAsyncStorage:w,workUnitAsyncStorage:x,serverHooks:y}=v;function z(){return(0,f.patchFetch)({workAsyncStorage:w,workUnitAsyncStorage:x})}async function A(a,b,c){c.requestMeta&&(0,g.setRequestMeta)(a,c.requestMeta),v.isDev&&(0,g.addRequestMeta)(a,"devRequestTimingInternalsEnd",process.hrtime.bigint());let d="/api/app-update/route";"/index"===d&&(d="/");let f=await v.prepare(a,b,{srcPage:d,multiZoneDraftMode:!1});if(!f)return b.statusCode=400,b.end("Bad Request"),null==c.waitUntil||c.waitUntil.call(c,Promise.resolve()),null;let{buildId:w,deploymentId:x,params:y,nextConfig:z,parsedUrl:A,isDraftMode:B,prerenderManifest:C,routerServerContext:D,isOnDemandRevalidate:E,revalidateOnlyGenerated:F,resolvedPathname:G,clientReferenceManifest:H,serverActionsManifest:I}=f,J=(0,j.normalizeAppPath)(d),K=!!C.routes[G]&&(v.isDev||(0,t.isRouteCacheOwner)(G,v.cacheOwner,C.routes[G])),L=!!(C.dynamicRoutes[J]||K),M=async()=>((null==D?void 0:D.render404)?await D.render404(a,b,A,!1):b.end("This page could not be found"),null);if(L&&!B){let a=C.dynamicRoutes[J];if(a&&!1===a.fallback&&!K){if(z.adapterPath)return await M();throw new s.NoFallbackError}}let N=null;!L||v.isDev||B||(N="/index"===(N=G)?"/":N);let O=!0===v.isDev||!L,P=L&&!O;I&&H&&(0,i.setManifestsSingleton)({page:d,clientReferenceManifest:H,serverActionsManifest:I});let Q=a.method||"GET",R=(0,h.getTracer)(),S=R.getActiveScopeSpan(),T=!!(null==D?void 0:D.isWrappedByNextServer),U=!!(0,g.getRequestMeta)(a,"minimalMode"),V=(0,g.getRequestMeta)(a,"incrementalCache")||await v.getIncrementalCache(a,z,C,U);null==V||V.resetRequestCache(),globalThis.__incrementalCache=V;let W={params:y,previewProps:C.preview,renderOpts:{experimental:{authInterrupts:!!z.experimental.authInterrupts,useCacheTimeout:z.experimental.useCacheTimeout},cacheComponents:!!z.cacheComponents,validationLevel:z.experimental.instantInsights.validationLevel,isDraftMode:B,supportsDynamicResponse:O,incrementalCache:V,hmrRefreshHash:(0,g.getRequestMeta)(a,"hmrRefreshHash"),cacheLifeProfiles:z.cacheLife,staticPageGenerationTimeout:z.staticPageGenerationTimeout,waitUntil:c.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:void 0,onInstrumentationRequestError:(b,c,d,e)=>v.onRequestError(a,b,d,e,D)},sharedContext:{buildId:w,deploymentId:x}},X=new k.NodeNextRequest(a),Y=new k.NodeNextResponse(b),Z=l.NextRequestAdapter.fromNodeNextRequest(X,(0,l.signalFromNodeResponse)(b)),$=async({previousCacheEntry:e})=>{try{if(!U&&E&&F&&!e)return b.statusCode=404,b.setHeader("x-nextjs-cache","REVALIDATED"),b.end("This page could not be found"),null;let d=await v.handle(Z,W);a.fetchMetrics=W.renderOpts.fetchMetrics;let f=W.renderOpts.pendingWaitUntil;f&&c.waitUntil&&(c.waitUntil(f),f=void 0);let g=W.renderOpts.collectedTags;if(!L)return await (0,o.I)(X,Y,d,f),null;{let a=await d.blob(),b=(0,p.toNodeOutgoingHttpHeaders)(d.headers);g&&(b[r.NEXT_CACHE_TAGS_HEADER]=g),!b["content-type"]&&a.type&&(b["content-type"]=a.type);let c=void 0!==W.renderOpts.collectedRevalidate&&!(W.renderOpts.collectedRevalidate>=r.INFINITE_CACHE)&&W.renderOpts.collectedRevalidate,e=void 0===W.renderOpts.collectedExpire||W.renderOpts.collectedExpire>=r.INFINITE_CACHE?!1!==c&&c>0?z.expireTime:void 0:W.renderOpts.collectedExpire;return{value:{kind:u.CachedRouteKind.APP_ROUTE,status:d.status,body:Buffer.from(await a.arrayBuffer()),headers:b},cacheControl:{revalidate:c,expire:e}}}}catch(b){throw(null==e?void 0:e.isStale)&&await v.onRequestError(a,b,{routerKind:"App Router",routePath:d,routeType:"route",revalidateReason:(0,n.getRevalidateReason)({isStaticGeneration:P,isOnDemandRevalidate:E})},!1,D),b}},_=async(d,f)=>{try{var g,i;let d=await v.handleResponse({req:a,nextConfig:z,cacheKey:N,routeKind:e.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:C,isRoutePPREnabled:!1,isOnDemandRevalidate:E,revalidateOnlyGenerated:F,responseGenerator:$,waitUntil:c.waitUntil,isMinimalMode:U});if(!L)return;if((null==d||null==(g=d.value)?void 0:g.kind)!==u.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==d||null==(i=d.value)?void 0:i.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});U||b.setHeader("x-nextjs-cache",E?"REVALIDATED":d.isMiss?"MISS":d.isStale?"STALE":"HIT"),B&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let f=(0,p.fromNodeOutgoingHttpHeaders)(d.value.headers);U&&L||f.delete(r.NEXT_CACHE_TAGS_HEADER),!d.cacheControl||b.getHeader("Cache-Control")||f.get("Cache-Control")||f.set("Cache-Control",(0,q.getCacheControlHeader)(d.cacheControl)),await (0,o.I)(X,Y,new Response(d.value.body,{headers:f,status:d.value.status||200}));return}catch(b){if(b instanceof s.NoFallbackError||await v.onRequestError(a,b,{routerKind:"App Router",routePath:J,routeType:"route",revalidateReason:(0,n.getRevalidateReason)({isStaticGeneration:P,isOnDemandRevalidate:E})},!1,D),L)throw b;await (0,o.I)(X,Y,new Response(null,{status:500}));return}finally{(()=>{if(!d)return;let a=b.statusCode;d.setAttributes({"http.status_code":a,"next.rsc":!1}),a&&a>=500&&(d.setStatus({code:h.SpanStatusCode.ERROR}),d.setAttribute("error.type",a.toString()));let c=R.getRootSpanAttributes();if(!c)return;if(c.get("next.span_type")!==m.BaseServerSpan.handleRequest)return console.warn(`Unexpected root span type '${c.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let e=c.get("next.route")||J,g=`${Q} ${e}`;d.setAttributes({"next.route":e,"http.route":e,"next.span_name":g}),d.updateName(g),f&&f!==d&&(f.setAttribute("http.route",e),f.updateName(g))})()}};if(T&&S)await _(S,void 0);else{let b=R.getActiveScopeSpan();await R.withPropagatedContext(a.headers,()=>R.trace(m.BaseServerSpan.handleRequest,{spanName:`${Q} ${d}`,kind:h.SpanKind.SERVER,attributes:{"http.method":Q,"http.target":a.url}},a=>_(a,b)),void 0,!T)}}},55511:a=>{"use strict";a.exports=require("crypto")},62445:(a,b,c)=>{"use strict";c.r(b),c.d(b,{GET:()=>l,dynamic:()=>g});var d=c(23211);let e=/^(\d+)\.(\d+)\.(\d+)$/;function f(a){let b=e.exec(a);if(!b)return null;let c=b.slice(1).map(Number);return c.some(a=>!Number.isSafeInteger(a))?null:c}let g="force-dynamic",h="0.12.
|
|
1
|
+
(()=>{var a={};a.id=9183,a.ids=[9183],a.modules={261:a=>{"use strict";a.exports=require("next/dist/shared/lib/router/utils/app-paths")},3295:a=>{"use strict";a.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},8128:a=>{"use strict";a.exports=require("next/dist/server/runtime-reacts.external.js")},10846:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},19121:a=>{"use strict";a.exports=require("next/dist/server/app-render/action-async-storage.external.js")},29294:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},33873:a=>{"use strict";a.exports=require("path")},44870:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},45319:(a,b,c)=>{"use strict";c.r(b),c.d(b,{handler:()=>A,patchFetch:()=>z,routeModule:()=>v,serverHooks:()=>y,workAsyncStorage:()=>w,workUnitAsyncStorage:()=>x});var d=c(19225),e=c(84006),f=c(8317),g=c(99373),h=c(34775),i=c(24235),j=c(261),k=c(54365),l=c(90771),m=c(73461),n=c(67798),o=c(92280),p=c(62018),q=c(45696),r=c(47929),s=c(86439),t=c(10246),u=c(37527);let v=new d.AppRouteRouteModule({definition:{kind:e.RouteKind.APP_ROUTE,page:"/api/app-update/route",pathname:"/api/app-update",filename:"route",bundlePath:"app/api/app-update/route"},distDir:".next",relativeProjectDir:"",resolvedPagePath:"/home/runner/work/pi-web/pi-web/app/api/app-update/route.ts",nextConfigOutput:"",userland:()=>c(62445),...{}}),{workAsyncStorage:w,workUnitAsyncStorage:x,serverHooks:y}=v;function z(){return(0,f.patchFetch)({workAsyncStorage:w,workUnitAsyncStorage:x})}async function A(a,b,c){c.requestMeta&&(0,g.setRequestMeta)(a,c.requestMeta),v.isDev&&(0,g.addRequestMeta)(a,"devRequestTimingInternalsEnd",process.hrtime.bigint());let d="/api/app-update/route";"/index"===d&&(d="/");let f=await v.prepare(a,b,{srcPage:d,multiZoneDraftMode:!1});if(!f)return b.statusCode=400,b.end("Bad Request"),null==c.waitUntil||c.waitUntil.call(c,Promise.resolve()),null;let{buildId:w,deploymentId:x,params:y,nextConfig:z,parsedUrl:A,isDraftMode:B,prerenderManifest:C,routerServerContext:D,isOnDemandRevalidate:E,revalidateOnlyGenerated:F,resolvedPathname:G,clientReferenceManifest:H,serverActionsManifest:I}=f,J=(0,j.normalizeAppPath)(d),K=!!C.routes[G]&&(v.isDev||(0,t.isRouteCacheOwner)(G,v.cacheOwner,C.routes[G])),L=!!(C.dynamicRoutes[J]||K),M=async()=>((null==D?void 0:D.render404)?await D.render404(a,b,A,!1):b.end("This page could not be found"),null);if(L&&!B){let a=C.dynamicRoutes[J];if(a&&!1===a.fallback&&!K){if(z.adapterPath)return await M();throw new s.NoFallbackError}}let N=null;!L||v.isDev||B||(N="/index"===(N=G)?"/":N);let O=!0===v.isDev||!L,P=L&&!O;I&&H&&(0,i.setManifestsSingleton)({page:d,clientReferenceManifest:H,serverActionsManifest:I});let Q=a.method||"GET",R=(0,h.getTracer)(),S=R.getActiveScopeSpan(),T=!!(null==D?void 0:D.isWrappedByNextServer),U=!!(0,g.getRequestMeta)(a,"minimalMode"),V=(0,g.getRequestMeta)(a,"incrementalCache")||await v.getIncrementalCache(a,z,C,U);null==V||V.resetRequestCache(),globalThis.__incrementalCache=V;let W={params:y,previewProps:C.preview,renderOpts:{experimental:{authInterrupts:!!z.experimental.authInterrupts,useCacheTimeout:z.experimental.useCacheTimeout},cacheComponents:!!z.cacheComponents,validationLevel:z.experimental.instantInsights.validationLevel,isDraftMode:B,supportsDynamicResponse:O,incrementalCache:V,hmrRefreshHash:(0,g.getRequestMeta)(a,"hmrRefreshHash"),cacheLifeProfiles:z.cacheLife,staticPageGenerationTimeout:z.staticPageGenerationTimeout,waitUntil:c.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:void 0,onInstrumentationRequestError:(b,c,d,e)=>v.onRequestError(a,b,d,e,D)},sharedContext:{buildId:w,deploymentId:x}},X=new k.NodeNextRequest(a),Y=new k.NodeNextResponse(b),Z=l.NextRequestAdapter.fromNodeNextRequest(X,(0,l.signalFromNodeResponse)(b)),$=async({previousCacheEntry:e})=>{try{if(!U&&E&&F&&!e)return b.statusCode=404,b.setHeader("x-nextjs-cache","REVALIDATED"),b.end("This page could not be found"),null;let d=await v.handle(Z,W);a.fetchMetrics=W.renderOpts.fetchMetrics;let f=W.renderOpts.pendingWaitUntil;f&&c.waitUntil&&(c.waitUntil(f),f=void 0);let g=W.renderOpts.collectedTags;if(!L)return await (0,o.I)(X,Y,d,f),null;{let a=await d.blob(),b=(0,p.toNodeOutgoingHttpHeaders)(d.headers);g&&(b[r.NEXT_CACHE_TAGS_HEADER]=g),!b["content-type"]&&a.type&&(b["content-type"]=a.type);let c=void 0!==W.renderOpts.collectedRevalidate&&!(W.renderOpts.collectedRevalidate>=r.INFINITE_CACHE)&&W.renderOpts.collectedRevalidate,e=void 0===W.renderOpts.collectedExpire||W.renderOpts.collectedExpire>=r.INFINITE_CACHE?!1!==c&&c>0?z.expireTime:void 0:W.renderOpts.collectedExpire;return{value:{kind:u.CachedRouteKind.APP_ROUTE,status:d.status,body:Buffer.from(await a.arrayBuffer()),headers:b},cacheControl:{revalidate:c,expire:e}}}}catch(b){throw(null==e?void 0:e.isStale)&&await v.onRequestError(a,b,{routerKind:"App Router",routePath:d,routeType:"route",revalidateReason:(0,n.getRevalidateReason)({isStaticGeneration:P,isOnDemandRevalidate:E})},!1,D),b}},_=async(d,f)=>{try{var g,i;let d=await v.handleResponse({req:a,nextConfig:z,cacheKey:N,routeKind:e.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:C,isRoutePPREnabled:!1,isOnDemandRevalidate:E,revalidateOnlyGenerated:F,responseGenerator:$,waitUntil:c.waitUntil,isMinimalMode:U});if(!L)return;if((null==d||null==(g=d.value)?void 0:g.kind)!==u.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==d||null==(i=d.value)?void 0:i.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});U||b.setHeader("x-nextjs-cache",E?"REVALIDATED":d.isMiss?"MISS":d.isStale?"STALE":"HIT"),B&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let f=(0,p.fromNodeOutgoingHttpHeaders)(d.value.headers);U&&L||f.delete(r.NEXT_CACHE_TAGS_HEADER),!d.cacheControl||b.getHeader("Cache-Control")||f.get("Cache-Control")||f.set("Cache-Control",(0,q.getCacheControlHeader)(d.cacheControl)),await (0,o.I)(X,Y,new Response(d.value.body,{headers:f,status:d.value.status||200}));return}catch(b){if(b instanceof s.NoFallbackError||await v.onRequestError(a,b,{routerKind:"App Router",routePath:J,routeType:"route",revalidateReason:(0,n.getRevalidateReason)({isStaticGeneration:P,isOnDemandRevalidate:E})},!1,D),L)throw b;await (0,o.I)(X,Y,new Response(null,{status:500}));return}finally{(()=>{if(!d)return;let a=b.statusCode;d.setAttributes({"http.status_code":a,"next.rsc":!1}),a&&a>=500&&(d.setStatus({code:h.SpanStatusCode.ERROR}),d.setAttribute("error.type",a.toString()));let c=R.getRootSpanAttributes();if(!c)return;if(c.get("next.span_type")!==m.BaseServerSpan.handleRequest)return console.warn(`Unexpected root span type '${c.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let e=c.get("next.route")||J,g=`${Q} ${e}`;d.setAttributes({"next.route":e,"http.route":e,"next.span_name":g}),d.updateName(g),f&&f!==d&&(f.setAttribute("http.route",e),f.updateName(g))})()}};if(T&&S)await _(S,void 0);else{let b=R.getActiveScopeSpan();await R.withPropagatedContext(a.headers,()=>R.trace(m.BaseServerSpan.handleRequest,{spanName:`${Q} ${d}`,kind:h.SpanKind.SERVER,attributes:{"http.method":Q,"http.target":a.url}},a=>_(a,b)),void 0,!T)}}},55511:a=>{"use strict";a.exports=require("crypto")},62445:(a,b,c)=>{"use strict";c.r(b),c.d(b,{GET:()=>l,dynamic:()=>g});var d=c(23211);let e=/^(\d+)\.(\d+)\.(\d+)$/;function f(a){let b=e.exec(a);if(!b)return null;let c=b.slice(1).map(Number);return c.some(a=>!Number.isSafeInteger(a))?null:c}let g="force-dynamic",h="0.12.6",i="1"===process.env.PI_WEB_SKIP_VERSION_CHECK;async function j(){let a=await fetch("https://registry.npmjs.org/@pricening%2Fpi-web/latest",{cache:"no-store",headers:{Accept:"application/json"},signal:AbortSignal.timeout(5e3)});if(!a.ok)throw Error(`npm registry returned HTTP ${a.status}`);let b=await a.json(),c="string"==typeof b.version?b.version:"",d=f(c)?`https://github.com/PriceNing/pi-web/releases/tag/v${c}`:null;if(!d)throw Error("npm registry returned an invalid version");return{currentVersion:h,latestVersion:c,updateAvailable:function(a,b){let c=f(a),d=f(b);if(!c||!d)return!1;for(let a=0;a<c.length;a+=1)if(c[a]!==d[a])return c[a]>d[a];return!1}(c,h),releaseUrl:d}}async function k(){let a=globalThis.__piWebAppUpdateCache??={expiresAt:0};if(a.value&&a.expiresAt>Date.now())return a.value;a.inFlight||(a.inFlight=j().then(b=>(a.value=b,a.expiresAt=Date.now()+432e5,b)).finally(()=>{a.inFlight=void 0}));try{return await a.inFlight}catch(b){if(a.value)return a.value;throw b}}async function l(){if(i)return d.NextResponse.json({currentVersion:h,latestVersion:h,updateAvailable:!1,releaseUrl:""});try{return d.NextResponse.json(await k())}catch(a){return d.NextResponse.json({error:a instanceof Error?a.message:String(a)},{status:502})}}},63033:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},78335:()=>{},86439:a=>{"use strict";a.exports=require("next/dist/shared/lib/no-fallback-error.external")},96487:()=>{}};var b=require("../../../webpack-runtime.js");b.C(a);var c=b.X(0,[2970,1813],()=>b(b.s=45319));module.exports=c})();
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";(()=>{var a={};a.id=4037,a.ids=[4037],a.modules={261:a=>{a.exports=require("next/dist/shared/lib/router/utils/app-paths")},1060:(a,b,c)=>{c.d(b,{Ac:()=>p,GO:()=>k,X:()=>m,_4:()=>d,cV:()=>l,jL:()=>f,k2:()=>n,kv:()=>e,oC:()=>o});let d=262144,e=0xa00000,f=0xa00000,g={png:"image/png",jpg:"image/jpeg",jpeg:"image/jpeg",gif:"image/gif",webp:"image/webp",svg:"image/svg+xml",bmp:"image/bmp",ico:"image/x-icon",avif:"image/avif"},h={mp3:"audio/mpeg",wav:"audio/wav",ogg:"audio/ogg",oga:"audio/ogg",opus:"audio/ogg",m4a:"audio/mp4",aac:"audio/aac",flac:"audio/flac",weba:"audio/webm"},i={mp4:"video/mp4",m4v:"video/mp4",webm:"video/webm",mov:"video/quicktime",ogv:"video/ogg"},j={pdf:"application/pdf",docx:"application/vnd.openxmlformats-officedocument.wordprocessingml.document"};function k(a){return(a.replace(/\\/g,"/").split("/").pop()??"").toLowerCase().split(".").pop()??""}function l(a){return g[k(a)]??null}function m(a){return h[k(a)]??null}function n(a){return i[k(a)]??null}function o(a){return j[k(a)]??null}function p(a){let b=k(a);return"pdf"===b||"docx"===b?b:null}},1304:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{GET:()=>C,POST:()=>z});var e=c(23211),f=c(29021),g=c.n(f),h=c(33873),i=c.n(h),j=c(80547),k=c(93057),l=c(1060),m=c(88473),n=c(72330),o=c(65630),p=c(66544),q=c(55484),r=c(66829),s=c(58864),t=c(82536),u=c(37688),v=a([j,o]);[j,o]=v.then?(await v)():v;let D=new Set(["list","read","download","meta","preview","watch"]),E={ts:"typescript",tsx:"tsx",mts:"typescript",cts:"typescript",js:"javascript",jsx:"jsx",mjs:"javascript",cjs:"javascript",py:"python",rb:"ruby",php:"php",lua:"lua",pl:"perl",r:"r",go:"go",rs:"rust",java:"java",kt:"kotlin",kts:"kotlin",swift:"swift",scala:"scala",groovy:"groovy",gradle:"groovy",dart:"dart",zig:"zig",c:"c",cpp:"cpp",h:"c",hpp:"cpp",cs:"csharp",mm:"objectivec",ex:"elixir",exs:"elixir",hs:"haskell",ml:"ocaml",clj:"clojure",nix:"nix",html:"html",htm:"html",vue:"markup",svelte:"markup",astro:"markup",css:"css",scss:"scss",less:"less",json:"json",jsonl:"json",yaml:"yaml",yml:"yaml",toml:"toml",ini:"ini",cfg:"ini",properties:"properties",xml:"xml",md:"markdown",mdx:"markdown",tex:"latex",sh:"bash",bash:"bash",zsh:"bash",fish:"bash",ps1:"powershell",psm1:"powershell",bat:"batch",cmd:"batch",sql:"sql",graphql:"graphql",gql:"graphql",proto:"protobuf",dockerfile:"dockerfile",tf:"hcl",hcl:"hcl",diff:"diff",patch:"diff",env:"bash",gitignore:"bash",txt:"text",pdf:"pdf",docx:"word"};function w(a){let b=i().basename(a).toLowerCase();return"dockerfile"===b||b.startsWith("dockerfile.")?"dockerfile":".env"===b||b.startsWith(".env.")?"bash":"makefile"===b||"gnumakefile"===b?"makefile":E[b.split(".").pop()??""]??"text"}async function x(a){let b,c=(0,s.A_)(a),d=await (0,j.mc)();if(!(0,j.A$)(c,d))return{response:e.NextResponse.json({error:"Access denied"},{status:403})};try{b=g().statSync(c)}catch{return{response:e.NextResponse.json({error:"Upload directory not found"},{status:404})}}if(!b.isDirectory())return{response:e.NextResponse.json({error:"Upload target is not a directory"},{status:400})};let f=g().realpathSync(c),h=new Set;for(let a of d)try{h.add(g().realpathSync(a))}catch{}return(0,j.A$)(f,h)?{directory:f}:{response:e.NextResponse.json({error:"Access denied"},{status:403})}}async function y(a,b){if(!(0,p.E2)(a))return e.NextResponse.json({error:"Content-Type must be application/json"},{status:415});let c=await a.json().catch(()=>null);if("string"!=typeof c?.target||!c.target)return e.NextResponse.json({error:"target must be the link target shown in the listing"},{status:400});let d=(0,k.uZ)((0,s.A_)(b),c.target,await (0,j.mc)());return d.ok?(d.alreadyAllowed||(0,j.wz)(d.target),e.NextResponse.json({path:d.target})):e.NextResponse.json({error:d.error},{status:d.status})}async function z(a,{params:b}){if(!(0,p.EN)(a))return e.NextResponse.json({error:"Untrusted API request"},{status:403});try{let d,{path:f}=await b,h=a.nextUrl.searchParams.get("type")??"upload";if("allow-link"===h)return y(a,f);let j=await x(f);if("response"in j)return j.response;let{directory:k}=j;if("upload-check"===h){var c;let b=await a.json().catch(()=>null),d=(c=b?.fileNames,Array.isArray(c)&&c.every(a=>"string"==typeof a)?c:null);if(!d)return e.NextResponse.json({error:"fileNames must be an array of strings"},{status:400});let f=(0,q.SI)(d);if(f)return e.NextResponse.json({error:f},{status:400});return e.NextResponse.json((0,q.Gu)(k,d))}if("upload"!==h)return e.NextResponse.json({error:"Invalid upload request type"},{status:400});let l=(0,q.Ey)(a.nextUrl.searchParams.get("conflict"));if(!l)return e.NextResponse.json({error:"Invalid conflict strategy"},{status:400});try{d=await (0,r.s)(a,0x6500000)}catch(a){if(a instanceof r.H)return e.NextResponse.json({error:"Uploads must total 100MB or less"},{status:413});throw a}let m=d.getAll("files").filter(a=>"string"!=typeof a);if(m.some(a=>a.size>0x1900000))return e.NextResponse.json({error:"Each upload must be 25MB or smaller"},{status:413});if(m.reduce((a,b)=>a+b.size,0)>0x6400000)return e.NextResponse.json({error:"Uploads must total 100MB or less"},{status:413});let n=m.map(a=>a.name),o=(0,q.SI)(n);if(o)return e.NextResponse.json({error:o},{status:400});let p=(0,q.Gu)(k,n);if("error"===l&&p.conflicts.length>0)return e.NextResponse.json({error:"One or more files already exist",conflicts:p.conflicts,nonReplaceable:p.nonReplaceable},{status:409});let s=new Set(p.conflicts),t=new Set(p.nonReplaceable),u=[],v=[],w=[];for(let a of m){let b,c=i().join(k,a.name);if(s.has(a.name)&&"skip"===l){v.push(a.name);continue}if(s.has(a.name)&&t.has(a.name)){w.push({name:a.name,error:"Cannot replace a directory or symbolic link"});continue}try{b=Buffer.from(await a.arrayBuffer())}catch(b){w.push({name:a.name,error:b instanceof Error?b.message:String(b)});continue}try{s.has(a.name)?(0,q.mU)(c,b):g().writeFileSync(c,b,{flag:"wx"}),u.push(a.name)}catch(b){w.push({name:a.name,error:b instanceof Error?b.message:String(b)})}}return e.NextResponse.json({uploaded:u,skipped:v,errors:w},{status:w.length>0?207:200})}catch(a){return e.NextResponse.json({error:a instanceof Error?a.message:String(a)},{status:500})}}function A(a,b){let c=g().createReadStream(a,b),d=!1;return new ReadableStream({start(a){c.on("data",b=>{if(!d)try{a.enqueue(new Uint8Array(b))}catch{d=!0,c.destroy()}}),c.once("end",()=>{if(!d){d=!0;try{a.close()}catch{}}}),c.once("error",b=>{if(!d){d=!0;try{a.error(b)}catch{}}})},cancel(){d=!0,c.destroy()}})}function B(a,b,c,d,e=!1){let f={"Content-Type":c,"Cache-Control":"no-cache","Accept-Ranges":"bytes","Content-Disposition":function(a,b=!1){let c=i().basename(a),d=c.replace(/[^\x20-\x7E]|["\\;\r\n]/g,"_")||"download";return`${b?"attachment":"inline"}; filename="${d}"; filename*=UTF-8''${encodeURIComponent(c).replace(/[!'()*]/g,a=>`%${a.charCodeAt(0).toString(16).toUpperCase()}`)}`}(a,e),"X-Content-Type-Options":"nosniff"};if("image/svg+xml"===c&&(f["Content-Security-Policy"]="default-src 'none'; img-src data:; style-src 'unsafe-inline'; base-uri 'none'; form-action 'none'; frame-ancestors 'self'",f["Referrer-Policy"]="no-referrer"),!d)return new Response(A(a),{headers:{...f,"Content-Length":String(b.size)}});let g=/^bytes=(\d*)-(\d*)$/.exec(d);if(!g)return new Response(null,{status:416,headers:{...f,"Content-Range":`bytes */${b.size}`}});let h=g[1]?Number(g[1]):0,j=g[2]?Number(g[2]):b.size-1;if(!g[1]&&g[2]){let a=Number(g[2]);h=Math.max(b.size-a,0),j=b.size-1}if(!Number.isFinite(h)||!Number.isFinite(j)||h<0||j<h||h>=b.size)return new Response(null,{status:416,headers:{...f,"Content-Range":`bytes */${b.size}`}});let k=(j=Math.min(j,b.size-1))-h+1;return new Response(A(a,{start:h,end:j}),{status:206,headers:{...f,"Content-Length":String(k),"Content-Range":`bytes ${h}-${j}/${b.size}`}})}async function C(a,{params:b}){try{var d,f,h;let p,{path:q}=await b,r=(0,s.A_)(q);if((0,t.TU)(r))return e.NextResponse.json({error:"Access denied"},{status:403});let v=(d=a.nextUrl.searchParams.get("type")??"list",D.has(d)?d:null);if(!v)return e.NextResponse.json({error:"Invalid file request type"},{status:400});let x=a.nextUrl.searchParams.get("sessionId"),y=await (0,j.mc)(),z=(0,j.A$)(r,y),A=!z&&"list"!==v&&await (0,o.Iq)(r,x);if(!z&&!A)return e.NextResponse.json({error:"Access denied"},{status:403});try{p=g().statSync(r)}catch{if("watch"!==v)return e.NextResponse.json({error:"Not found"},{status:404})}let C=p?r:i().dirname(r);if(!A&&!(0,j.B7)(C,y))return e.NextResponse.json({error:"Access denied"},{status:403});if("read"===v){if(!p?.isFile())return e.NextResponse.json({error:"Not a file"},{status:400});let b=(0,l.cV)(r);if(b){if(p.size>l.kv)return e.NextResponse.json({error:"Image too large (>10MB)"},{status:413});return B(r,p,b,a.headers.get("range"))}let c=(0,l.X)(r);if(c)return B(r,p,c,a.headers.get("range"));let d=(0,l.k2)(r);if(d)return B(r,p,d,a.headers.get("range"));let f=(0,l.oC)(r);if(f)return B(r,p,f,a.headers.get("range"));let g=a.nextUrl.searchParams.get("offset");if(null!==g&&!/^\d+$/.test(g))return e.NextResponse.json({error:"Invalid text preview offset"},{status:400});let h=Number(g??0);if(!Number.isSafeInteger(h)||h>p.size)return e.NextResponse.json({error:"Invalid text preview offset"},{status:400});let i=(0,u.P)(r,p.size,h),j=w(r);return e.NextResponse.json({...i,language:j,size:p.size})}if("download"===v){if(!p?.isFile())return e.NextResponse.json({error:"Not a file"},{status:400});let b=(0,l.cV)(r)||(0,l.X)(r)||(0,l.k2)(r)||(0,l.oC)(r)||"application/octet-stream";return B(r,p,b,a.headers.get("range"),!0)}if("meta"===v){if(!p?.isFile())return e.NextResponse.json({error:"Not a file"},{status:400});let a=(0,l.cV)(r),b=(0,l.X)(r),c=(0,l.k2)(r),d=(0,l.oC)(r);return e.NextResponse.json({size:p.size,language:w(r),mime:a||b||c||d||"text/plain",previewKind:(0,l.Ac)(r)})}if("preview"===v){if(!p?.isFile())return e.NextResponse.json({error:"Not a file"},{status:400});if("docx"!==(0,l.GO)(r))return e.NextResponse.json({error:"Preview not available for this file type"},{status:400});if(p.size>l.jL)return e.NextResponse.json({error:"DOCX too large for preview (>10MB)"},{status:413});let a=await c.e(3379).then(c.t.bind(c,53379,19)),b=(f=(await a.convertToHtml({path:r},{externalFileAccess:!1,convertImage:a.images.dataUri})).value,h=i().basename(r),`<!doctype html>
|
|
1
|
+
"use strict";(()=>{var a={};a.id=4037,a.ids=[4037],a.modules={261:a=>{a.exports=require("next/dist/shared/lib/router/utils/app-paths")},1060:(a,b,c)=>{c.d(b,{Ac:()=>p,GO:()=>k,X:()=>m,_4:()=>d,cV:()=>l,jL:()=>f,k2:()=>n,kv:()=>e,oC:()=>o});let d=262144,e=0xa00000,f=0xa00000,g={png:"image/png",jpg:"image/jpeg",jpeg:"image/jpeg",gif:"image/gif",webp:"image/webp",svg:"image/svg+xml",bmp:"image/bmp",ico:"image/x-icon",avif:"image/avif"},h={mp3:"audio/mpeg",wav:"audio/wav",ogg:"audio/ogg",oga:"audio/ogg",opus:"audio/ogg",m4a:"audio/mp4",aac:"audio/aac",flac:"audio/flac",weba:"audio/webm"},i={mp4:"video/mp4",m4v:"video/mp4",webm:"video/webm",mov:"video/quicktime",ogv:"video/ogg"},j={pdf:"application/pdf",docx:"application/vnd.openxmlformats-officedocument.wordprocessingml.document"};function k(a){return(a.replace(/\\/g,"/").split("/").pop()??"").toLowerCase().split(".").pop()??""}function l(a){return g[k(a)]??null}function m(a){return h[k(a)]??null}function n(a){return i[k(a)]??null}function o(a){return j[k(a)]??null}function p(a){let b=k(a);return"pdf"===b||"docx"===b?b:null}},1304:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{GET:()=>C,POST:()=>z});var e=c(23211),f=c(29021),g=c.n(f),h=c(33873),i=c.n(h),j=c(80547),k=c(93057),l=c(1060),m=c(88473),n=c(72330),o=c(65630),p=c(66544),q=c(55484),r=c(66829),s=c(58864),t=c(82536),u=c(37688),v=a([j,o]);[j,o]=v.then?(await v)():v;let D=new Set(["list","read","download","meta","preview","watch"]),E={ts:"typescript",tsx:"tsx",mts:"typescript",cts:"typescript",js:"javascript",jsx:"jsx",mjs:"javascript",cjs:"javascript",py:"python",rb:"ruby",php:"php",lua:"lua",pl:"perl",r:"r",go:"go",rs:"rust",java:"java",kt:"kotlin",kts:"kotlin",swift:"swift",scala:"scala",groovy:"groovy",gradle:"groovy",dart:"dart",zig:"zig",c:"c",cpp:"cpp",h:"c",hpp:"cpp",cs:"csharp",mm:"objectivec",ex:"elixir",exs:"elixir",hs:"haskell",ml:"ocaml",clj:"clojure",nix:"nix",html:"html",htm:"html",vue:"markup",svelte:"markup",astro:"markup",css:"css",scss:"scss",less:"less",json:"json",jsonl:"json",yaml:"yaml",yml:"yaml",toml:"toml",ini:"ini",cfg:"ini",properties:"properties",xml:"xml",md:"markdown",mdx:"markdown",tex:"latex",sh:"bash",bash:"bash",zsh:"bash",fish:"bash",ps1:"powershell",psm1:"powershell",bat:"batch",cmd:"batch",sql:"sql",graphql:"graphql",gql:"graphql",proto:"protobuf",dockerfile:"dockerfile",tf:"hcl",hcl:"hcl",diff:"diff",patch:"diff",env:"bash",gitignore:"bash",txt:"text",pdf:"pdf",docx:"word"};function w(a){let b=i().basename(a).toLowerCase();return"dockerfile"===b||b.startsWith("dockerfile.")?"dockerfile":".env"===b||b.startsWith(".env.")?"bash":"makefile"===b||"gnumakefile"===b?"makefile":E[b.split(".").pop()??""]??"text"}async function x(a){let b,c=(0,s.A_)(a),d=await (0,j.mc)();if(!(0,j.A$)(c,d))return{response:e.NextResponse.json({error:"Access denied"},{status:403})};try{b=g().statSync(c)}catch{return{response:e.NextResponse.json({error:"Upload directory not found"},{status:404})}}if(!b.isDirectory())return{response:e.NextResponse.json({error:"Upload target is not a directory"},{status:400})};let f=g().realpathSync(c),h=new Set;for(let a of d)try{h.add(g().realpathSync(a))}catch{}return(0,j.A$)(f,h)?{directory:f}:{response:e.NextResponse.json({error:"Access denied"},{status:403})}}async function y(a,b){if(!(0,p.E2)(a))return e.NextResponse.json({error:"Content-Type must be application/json"},{status:415});let c=await a.json().catch(()=>null);if("string"!=typeof c?.target||!c.target)return e.NextResponse.json({error:"target must be the link target shown in the listing"},{status:400});let d=(0,k.uZ)((0,s.A_)(b),c.target,await (0,j.mc)());return d.ok?(d.alreadyAllowed||(0,j.wz)(d.target),e.NextResponse.json({path:d.target})):e.NextResponse.json({error:d.error},{status:d.status})}async function z(a,{params:b}){if(!(0,p.EN)(a))return e.NextResponse.json({error:"Untrusted API request"},{status:403});try{let d,{path:f}=await b,h=a.nextUrl.searchParams.get("type")??"upload";if("allow-link"===h)return y(a,f);let j=await x(f);if("response"in j)return j.response;let{directory:k}=j;if("upload-check"===h){var c;let b=await a.json().catch(()=>null),d=(c=b?.fileNames,Array.isArray(c)&&c.every(a=>"string"==typeof a)?c:null);if(!d)return e.NextResponse.json({error:"fileNames must be an array of strings"},{status:400});let f=(0,q.SI)(d);if(f)return e.NextResponse.json({error:f},{status:400});return e.NextResponse.json((0,q.Gu)(k,d))}if("upload"!==h)return e.NextResponse.json({error:"Invalid upload request type"},{status:400});let l=(0,q.Ey)(a.nextUrl.searchParams.get("conflict"));if(!l)return e.NextResponse.json({error:"Invalid conflict strategy"},{status:400});try{d=await (0,r.s)(a,0x6500000)}catch(a){if(a instanceof r.H)return e.NextResponse.json({error:"Uploads must total 100MB or less"},{status:413});throw a}let m=d.getAll("files").filter(a=>"string"!=typeof a);if(m.some(a=>a.size>0x1900000))return e.NextResponse.json({error:"Each upload must be 25MB or smaller"},{status:413});if(m.reduce((a,b)=>a+b.size,0)>0x6400000)return e.NextResponse.json({error:"Uploads must total 100MB or less"},{status:413});let n=m.map(a=>a.name),o=(0,q.SI)(n);if(o)return e.NextResponse.json({error:o},{status:400});let p=(0,q.Gu)(k,n);if("error"===l&&p.conflicts.length>0)return e.NextResponse.json({error:"One or more files already exist",conflicts:p.conflicts,nonReplaceable:p.nonReplaceable},{status:409});let s=new Set(p.conflicts),t=new Set(p.nonReplaceable),u=[],v=[],w=[];for(let a of m){let b,c=i().join(k,a.name);if(s.has(a.name)&&"skip"===l){v.push(a.name);continue}if(s.has(a.name)&&t.has(a.name)){w.push({name:a.name,error:"Cannot replace a directory or symbolic link"});continue}try{b=Buffer.from(await a.arrayBuffer())}catch(b){w.push({name:a.name,error:b instanceof Error?b.message:String(b)});continue}try{s.has(a.name)?(0,q.mU)(c,b):g().writeFileSync(c,b,{flag:"wx"}),u.push(a.name)}catch(b){w.push({name:a.name,error:b instanceof Error?b.message:String(b)})}}return e.NextResponse.json({uploaded:u,skipped:v,errors:w},{status:w.length>0?207:200})}catch(a){return e.NextResponse.json({error:a instanceof Error?a.message:String(a)},{status:500})}}function A(a,b){let c=g().createReadStream(a,b),d=!1;return new ReadableStream({start(a){c.on("data",b=>{if(!d)try{a.enqueue(new Uint8Array(b))}catch{d=!0,c.destroy()}}),c.once("end",()=>{if(!d){d=!0;try{a.close()}catch{}}}),c.once("error",b=>{if(!d){d=!0;try{a.error(b)}catch{}}})},cancel(){d=!0,c.destroy()}})}function B(a,b,c,d,e=!1){let f={"Content-Type":c,"Cache-Control":"no-cache","Accept-Ranges":"bytes","Content-Disposition":function(a,b=!1){let c=i().basename(a),d=c.replace(/[^\x20-\x7E]|["\\;\r\n]/g,"_")||"download";return`${b?"attachment":"inline"}; filename="${d}"; filename*=UTF-8''${encodeURIComponent(c).replace(/[!'()*]/g,a=>`%${a.charCodeAt(0).toString(16).toUpperCase()}`)}`}(a,e),"X-Content-Type-Options":"nosniff"};if("image/svg+xml"===c&&(f["Content-Security-Policy"]="default-src 'none'; img-src data:; style-src 'unsafe-inline'; base-uri 'none'; form-action 'none'; frame-ancestors 'self'",f["Referrer-Policy"]="no-referrer"),!d)return new Response(A(a),{headers:{...f,"Content-Length":String(b.size)}});let g=/^bytes=(\d*)-(\d*)$/.exec(d);if(!g)return new Response(null,{status:416,headers:{...f,"Content-Range":`bytes */${b.size}`}});let h=g[1]?Number(g[1]):0,j=g[2]?Number(g[2]):b.size-1;if(!g[1]&&g[2]){let a=Number(g[2]);h=Math.max(b.size-a,0),j=b.size-1}if(!Number.isFinite(h)||!Number.isFinite(j)||h<0||j<h||h>=b.size)return new Response(null,{status:416,headers:{...f,"Content-Range":`bytes */${b.size}`}});let k=(j=Math.min(j,b.size-1))-h+1;return new Response(A(a,{start:h,end:j}),{status:206,headers:{...f,"Content-Length":String(k),"Content-Range":`bytes ${h}-${j}/${b.size}`}})}async function C(a,{params:b}){try{var d,f,h;let p,{path:q}=await b,r=(0,s.A_)(q);if((0,t.TU)(r))return e.NextResponse.json({error:"Access denied"},{status:403});let v=(d=a.nextUrl.searchParams.get("type")??"list",D.has(d)?d:null);if(!v)return e.NextResponse.json({error:"Invalid file request type"},{status:400});let x=a.nextUrl.searchParams.get("sessionId"),y=await (0,j.mc)(),z=(0,j.A$)(r,y),A=!z&&"list"!==v&&await (0,o.Iq)(r,x);if(!z&&!A)return e.NextResponse.json({error:"Access denied"},{status:403});try{p=g().statSync(r)}catch{if("watch"!==v)return e.NextResponse.json({error:"Not found"},{status:404})}let C=p?r:i().dirname(r);if(!A&&!(0,j.B7)(C,y))return e.NextResponse.json({error:"Access denied"},{status:403});if("read"===v){if(!p?.isFile())return e.NextResponse.json({error:"Not a file"},{status:400});let b=(0,l.cV)(r);if(b){if(p.size>l.kv)return e.NextResponse.json({error:"Image too large (>10MB)"},{status:413});return B(r,p,b,a.headers.get("range"))}let c=(0,l.X)(r);if(c)return B(r,p,c,a.headers.get("range"));let d=(0,l.k2)(r);if(d)return B(r,p,d,a.headers.get("range"));let f=(0,l.oC)(r);if(f)return B(r,p,f,a.headers.get("range"));let g=a.nextUrl.searchParams.get("offset");if(null!==g&&!/^\d+$/.test(g))return e.NextResponse.json({error:"Invalid text preview offset"},{status:400});let h=Number(g??0);if(!Number.isSafeInteger(h)||h>p.size)return e.NextResponse.json({error:"Invalid text preview offset"},{status:400});let i=(0,u.P)(r,p.size,h),j=w(r);return e.NextResponse.json({...i,language:j,size:p.size,mtime:p.mtime.toISOString()})}if("download"===v){if(!p?.isFile())return e.NextResponse.json({error:"Not a file"},{status:400});let b=(0,l.cV)(r)||(0,l.X)(r)||(0,l.k2)(r)||(0,l.oC)(r)||"application/octet-stream";return B(r,p,b,a.headers.get("range"),!0)}if("meta"===v){if(!p?.isFile())return e.NextResponse.json({error:"Not a file"},{status:400});let a=(0,l.cV)(r),b=(0,l.X)(r),c=(0,l.k2)(r),d=(0,l.oC)(r);return e.NextResponse.json({size:p.size,mtime:p.mtime.toISOString(),language:w(r),mime:a||b||c||d||"text/plain",previewKind:(0,l.Ac)(r)})}if("preview"===v){if(!p?.isFile())return e.NextResponse.json({error:"Not a file"},{status:400});if("docx"!==(0,l.GO)(r))return e.NextResponse.json({error:"Preview not available for this file type"},{status:400});if(p.size>l.jL)return e.NextResponse.json({error:"DOCX too large for preview (>10MB)"},{status:413});let a=await c.e(3379).then(c.t.bind(c,53379,19)),b=(f=(await a.convertToHtml({path:r},{externalFileAccess:!1,convertImage:a.images.dataUri})).value,h=i().basename(r),`<!doctype html>
|
|
2
2
|
<html>
|
|
3
3
|
<head>
|
|
4
4
|
<meta charset="utf-8">
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(()=>{var a={};a.id=7483,a.ids=[7483],a.modules={261:a=>{"use strict";a.exports=require("next/dist/shared/lib/router/utils/app-paths")},3295:a=>{"use strict";a.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},8102:(a,b,c)=>{"use strict";c.d(b,{$:()=>g});var d=c(55511),e=c(29021),f=c(33873);function g(a,b){let c=(0,f.dirname)(a),g=(0,f.join)(c,`.${(0,f.basename)(a)}-${(0,d.randomUUID)()}.tmp`),h=!1;try{(0,e.writeFileSync)(g,b,{encoding:"utf8",flag:"wx",mode:384,flush:!0}),(0,e.renameSync)(g,a)}catch(a){throw h=!0,a}finally{try{(0,e.unlinkSync)(g)}catch(a){if("ENOENT"!==a.code&&!h)throw a}}}},8128:a=>{"use strict";a.exports=require("next/dist/server/runtime-reacts.external.js")},10846:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},17551:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.d(b,{IX:()=>o,LB:()=>q,V6:()=>n});var e=c(73024),f=c(76760),g=c(75430),h=c(8102),i=c(35975),j=c(28967),k=a([g]);g=(k.then?(await k)():k)[0];let p=["input","output","cacheRead","cacheWrite"];function l(a){return"object"==typeof a&&null!==a&&!Array.isArray(a)}function m(){return(0,f.join)((0,g.getAgentDir)(),"models.json")}class q extends Error{constructor(a){super(a),this.name="ModelsConfigReadError"}}function n(a=m()){let b;if(!(0,e.existsSync)(a))return{providers:{}};try{let c=(0,e.readFileSync)(a,"utf8").replace(/^\uFEFF/,"");if(!c.trim())return{providers:{}};b=JSON.parse((0,i.R)(c))}catch(b){throw new q(`Failed to read ${a}: ${b instanceof Error?b.message:String(b)}`)}if(!l(b))throw new q(`Failed to read ${a}: expected a JSON object`);return b}function o(a,b=m()){n(b);let c=(0,f.dirname)(b);(0,e.existsSync)(c)||(0,e.mkdirSync)(c,{recursive:!0});let d=function(a){let b=structuredClone(a);if(!l(b.providers))return b;for(let a of Object.values(b.providers))if(l(a)&&Array.isArray(a.models))for(let b of a.models){if(!l(b)||!("cost"in b))continue;let a=function(a){if(!l(a))return;let b=p.filter(b=>void 0!==a[b]);if(0!==b.length&&!b.some(b=>"number"!=typeof a[b]||!Number.isFinite(a[b])))return Object.fromEntries([...Object.entries(a),...p.map(b=>[b,a[b]??0])])}(b.cost);a?b.cost=a:delete b.cost}return b}(function(a){if(!l(a.providers))return a;let b=Object.fromEntries(Object.entries(a.providers).map(([a,b])=>{if(!l(b)||!Array.isArray(b.models))return[a,b];let c=b.models.filter(a=>!l(a)||"string"!=typeof a.id||a.id.trim().length>0);return[a,{...b,models:c}]}));return{...a,providers:b}}(a));(0,h.$)(b,JSON.stringify(d,null,2)),(0,j.kn)()}d()}catch(a){d(a)}})},19121:a=>{"use strict";a.exports=require("next/dist/server/app-render/action-async-storage.external.js")},28967:(a,b,c)=>{"use strict";function d(){return globalThis.__piModelsCacheState||(globalThis.__piModelsCacheState={entries:new Map,inFlight:new Map,generation:0}),globalThis.__piModelsCacheState}function e(){let a=d();a.generation+=1,a.entries.clear(),a.inFlight.clear()}function f(a,b){return b?{...a,modelError:b}:a}function g(a){return{...a,modelError:"Model list is temporarily unavailable. Check your configuration and try again."}}function h(a,b){let c=d(),e=c.entries.get(a);if(e){if(e.expiresAt>Date.now())return Promise.resolve(e.data);c.entries.delete(a)}let f=c.inFlight.get(a);if(f)return f;let g=c.generation,h=Promise.resolve().then(b).then(b=>{if(c.generation===g&&c.inFlight.get(a)===h){let d=Date.now();for(let[a,b]of c.entries)b.expiresAt<=d&&c.entries.delete(a);for(;c.entries.size>=32;){let a=c.entries.keys().next().value;if(void 0===a)break;c.entries.delete(a)}c.entries.set(a,{data:b,expiresAt:d+6e4})}return b}).finally(()=>{c.inFlight.get(a)===h&&c.inFlight.delete(a)});return c.inFlight.set(a,h),h}c.d(b,{Fw:()=>g,Mx:()=>f,kn:()=>e,rC:()=>h})},29021:a=>{"use strict";a.exports=require("fs")},29294:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},33873:a=>{"use strict";a.exports=require("path")},35639:(a,b,c)=>{"use strict";function d(a){return"object"==typeof a&&null!==a&&!Array.isArray(a)}c.d(b,{ad:()=>e,kB:()=>f});class e extends Error{constructor(a){super(`Context window of ${a} must be a positive number of tokens`),this.name="ContextWindowError",this.model=a}}function f(a){let b=structuredClone(a);if(!d(b.providers))return b;for(let[a,c]of Object.entries(b.providers))if(d(c)&&d(c.modelOverrides))for(let[b,f]of Object.entries(c.modelOverrides)){if(!d(f)||!Object.hasOwn(f,"contextWindow"))continue;let c=function(a){if("string"==typeof a){let b=/^\d+$/.test(a.trim())?Number(a.trim()):0;return Number.isSafeInteger(b)&&b>0?b:void 0}return"number"==typeof a&&Number.isFinite(a)&&a>0?a:void 0}(f.contextWindow);if(void 0===c)throw new e(`${a}/${b}`);f.contextWindow=c}return b}},35975:(a,b,c)=>{"use strict";function d(a){return a.replace(/"(?:\\.|[^"\\])*"|\/\/[^\n]*|\/\*[\s\S]*?\*\//g,a=>'"'===a[0]?a:"*"===a[1]?" ":"").replace(/"(?:\\.|[^"\\])*"|,(\s*[}\]])/g,(a,b)=>b??('"'===a[0]?a:""))}function e(a){return JSON.parse(d(a.replace(/^\uFEFF/,"")))}c.d(b,{R:()=>d,p:()=>e})},44870:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},53718:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{GET:()=>i,PUT:()=>j,dynamic:()=>k});var e=c(23211),f=c(17551),g=c(35639),h=a([f]);f=(h.then?(await h)():h)[0];let k="force-dynamic";async function i(){try{return e.NextResponse.json((0,f.V6)())}catch(a){if(a instanceof f.LB)return e.NextResponse.json({error:a.message},{status:422});return e.NextResponse.json({error:String(a)},{status:500})}}async function j(a){try{let b=await a.json();return(0,f.IX)((0,g.kB)(b)),e.NextResponse.json({success:!0})}catch(a){if(a instanceof g.ad)return e.NextResponse.json({error:a.message},{status:400});if(a instanceof f.LB)return e.NextResponse.json({error:a.message},{status:409});return e.NextResponse.json({error:String(a)},{status:500})}}d()}catch(a){d(a)}})},55511:a=>{"use strict";a.exports=require("crypto")},63033:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},73024:a=>{"use strict";a.exports=require("node:fs")},75430:a=>{"use strict";a.exports=import("@earendil-works/pi-coding-agent")},76760:a=>{"use strict";a.exports=require("node:path")},78335:()=>{},86439:a=>{"use strict";a.exports=require("next/dist/shared/lib/no-fallback-error.external")},96487:()=>{},98115:(a,b,c)=>{"use strict";c.r(b),c.d(b,{handler:()=>A,patchFetch:()=>z,routeModule:()=>v,serverHooks:()=>y,workAsyncStorage:()=>w,workUnitAsyncStorage:()=>x});var d=c(19225),e=c(84006),f=c(8317),g=c(99373),h=c(34775),i=c(24235),j=c(261),k=c(54365),l=c(90771),m=c(73461),n=c(67798),o=c(92280),p=c(62018),q=c(45696),r=c(47929),s=c(86439),t=c(10246),u=c(37527);let v=new d.AppRouteRouteModule({definition:{kind:e.RouteKind.APP_ROUTE,page:"/api/models-config/route",pathname:"/api/models-config",filename:"route",bundlePath:"app/api/models-config/route"},distDir:".next",relativeProjectDir:"",resolvedPagePath:"/home/runner/work/pi-web/pi-web/app/api/models-config/route.ts",nextConfigOutput:"",userland:()=>c(53718),...{}}),{workAsyncStorage:w,workUnitAsyncStorage:x,serverHooks:y}=v;function z(){return(0,f.patchFetch)({workAsyncStorage:w,workUnitAsyncStorage:x})}async function A(a,b,c){c.requestMeta&&(0,g.setRequestMeta)(a,c.requestMeta),v.isDev&&(0,g.addRequestMeta)(a,"devRequestTimingInternalsEnd",process.hrtime.bigint());let d="/api/models-config/route";"/index"===d&&(d="/");let f=await v.prepare(a,b,{srcPage:d,multiZoneDraftMode:!1});if(!f)return b.statusCode=400,b.end("Bad Request"),null==c.waitUntil||c.waitUntil.call(c,Promise.resolve()),null;let{buildId:w,deploymentId:x,params:y,nextConfig:z,parsedUrl:A,isDraftMode:B,prerenderManifest:C,routerServerContext:D,isOnDemandRevalidate:E,revalidateOnlyGenerated:F,resolvedPathname:G,clientReferenceManifest:H,serverActionsManifest:I}=f,J=(0,j.normalizeAppPath)(d),K=!!C.routes[G]&&(v.isDev||(0,t.isRouteCacheOwner)(G,v.cacheOwner,C.routes[G])),L=!!(C.dynamicRoutes[J]||K),M=async()=>((null==D?void 0:D.render404)?await D.render404(a,b,A,!1):b.end("This page could not be found"),null);if(L&&!B){let a=C.dynamicRoutes[J];if(a&&!1===a.fallback&&!K){if(z.adapterPath)return await M();throw new s.NoFallbackError}}let N=null;!L||v.isDev||B||(N="/index"===(N=G)?"/":N);let O=!0===v.isDev||!L,P=L&&!O;I&&H&&(0,i.setManifestsSingleton)({page:d,clientReferenceManifest:H,serverActionsManifest:I});let Q=a.method||"GET",R=(0,h.getTracer)(),S=R.getActiveScopeSpan(),T=!!(null==D?void 0:D.isWrappedByNextServer),U=!!(0,g.getRequestMeta)(a,"minimalMode"),V=(0,g.getRequestMeta)(a,"incrementalCache")||await v.getIncrementalCache(a,z,C,U);null==V||V.resetRequestCache(),globalThis.__incrementalCache=V;let W={params:y,previewProps:C.preview,renderOpts:{experimental:{authInterrupts:!!z.experimental.authInterrupts,useCacheTimeout:z.experimental.useCacheTimeout},cacheComponents:!!z.cacheComponents,validationLevel:z.experimental.instantInsights.validationLevel,isDraftMode:B,supportsDynamicResponse:O,incrementalCache:V,hmrRefreshHash:(0,g.getRequestMeta)(a,"hmrRefreshHash"),cacheLifeProfiles:z.cacheLife,staticPageGenerationTimeout:z.staticPageGenerationTimeout,waitUntil:c.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:void 0,onInstrumentationRequestError:(b,c,d,e)=>v.onRequestError(a,b,d,e,D)},sharedContext:{buildId:w,deploymentId:x}},X=new k.NodeNextRequest(a),Y=new k.NodeNextResponse(b),Z=l.NextRequestAdapter.fromNodeNextRequest(X,(0,l.signalFromNodeResponse)(b)),$=async({previousCacheEntry:e})=>{try{if(!U&&E&&F&&!e)return b.statusCode=404,b.setHeader("x-nextjs-cache","REVALIDATED"),b.end("This page could not be found"),null;let d=await v.handle(Z,W);a.fetchMetrics=W.renderOpts.fetchMetrics;let f=W.renderOpts.pendingWaitUntil;f&&c.waitUntil&&(c.waitUntil(f),f=void 0);let g=W.renderOpts.collectedTags;if(!L)return await (0,o.I)(X,Y,d,f),null;{let a=await d.blob(),b=(0,p.toNodeOutgoingHttpHeaders)(d.headers);g&&(b[r.NEXT_CACHE_TAGS_HEADER]=g),!b["content-type"]&&a.type&&(b["content-type"]=a.type);let c=void 0!==W.renderOpts.collectedRevalidate&&!(W.renderOpts.collectedRevalidate>=r.INFINITE_CACHE)&&W.renderOpts.collectedRevalidate,e=void 0===W.renderOpts.collectedExpire||W.renderOpts.collectedExpire>=r.INFINITE_CACHE?!1!==c&&c>0?z.expireTime:void 0:W.renderOpts.collectedExpire;return{value:{kind:u.CachedRouteKind.APP_ROUTE,status:d.status,body:Buffer.from(await a.arrayBuffer()),headers:b},cacheControl:{revalidate:c,expire:e}}}}catch(b){throw(null==e?void 0:e.isStale)&&await v.onRequestError(a,b,{routerKind:"App Router",routePath:d,routeType:"route",revalidateReason:(0,n.getRevalidateReason)({isStaticGeneration:P,isOnDemandRevalidate:E})},!1,D),b}},_=async(d,f)=>{try{var g,i;let d=await v.handleResponse({req:a,nextConfig:z,cacheKey:N,routeKind:e.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:C,isRoutePPREnabled:!1,isOnDemandRevalidate:E,revalidateOnlyGenerated:F,responseGenerator:$,waitUntil:c.waitUntil,isMinimalMode:U});if(!L)return;if((null==d||null==(g=d.value)?void 0:g.kind)!==u.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==d||null==(i=d.value)?void 0:i.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});U||b.setHeader("x-nextjs-cache",E?"REVALIDATED":d.isMiss?"MISS":d.isStale?"STALE":"HIT"),B&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let f=(0,p.fromNodeOutgoingHttpHeaders)(d.value.headers);U&&L||f.delete(r.NEXT_CACHE_TAGS_HEADER),!d.cacheControl||b.getHeader("Cache-Control")||f.get("Cache-Control")||f.set("Cache-Control",(0,q.getCacheControlHeader)(d.cacheControl)),await (0,o.I)(X,Y,new Response(d.value.body,{headers:f,status:d.value.status||200}));return}catch(b){if(b instanceof s.NoFallbackError||await v.onRequestError(a,b,{routerKind:"App Router",routePath:J,routeType:"route",revalidateReason:(0,n.getRevalidateReason)({isStaticGeneration:P,isOnDemandRevalidate:E})},!1,D),L)throw b;await (0,o.I)(X,Y,new Response(null,{status:500}));return}finally{(()=>{if(!d)return;let a=b.statusCode;d.setAttributes({"http.status_code":a,"next.rsc":!1}),a&&a>=500&&(d.setStatus({code:h.SpanStatusCode.ERROR}),d.setAttribute("error.type",a.toString()));let c=R.getRootSpanAttributes();if(!c)return;if(c.get("next.span_type")!==m.BaseServerSpan.handleRequest)return console.warn(`Unexpected root span type '${c.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let e=c.get("next.route")||J,g=`${Q} ${e}`;d.setAttributes({"next.route":e,"http.route":e,"next.span_name":g}),d.updateName(g),f&&f!==d&&(f.setAttribute("http.route",e),f.updateName(g))})()}};if(T&&S)await _(S,void 0);else{let b=R.getActiveScopeSpan();await R.withPropagatedContext(a.headers,()=>R.trace(m.BaseServerSpan.handleRequest,{spanName:`${Q} ${d}`,kind:h.SpanKind.SERVER,attributes:{"http.method":Q,"http.target":a.url}},a=>_(a,b)),void 0,!T)}}}};var b=require("../../../webpack-runtime.js");b.C(a);var c=b.X(0,[2970,1813],()=>b(b.s=98115));module.exports=c})();
|
|
1
|
+
(()=>{var a={};a.id=7483,a.ids=[7483],a.modules={261:a=>{"use strict";a.exports=require("next/dist/shared/lib/router/utils/app-paths")},3295:a=>{"use strict";a.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},8102:(a,b,c)=>{"use strict";c.d(b,{$:()=>g});var d=c(55511),e=c(29021),f=c(33873);function g(a,b){let c=(0,f.dirname)(a),g=(0,f.join)(c,`.${(0,f.basename)(a)}-${(0,d.randomUUID)()}.tmp`),h=!1;try{(0,e.writeFileSync)(g,b,{encoding:"utf8",flag:"wx",mode:384,flush:!0}),(0,e.renameSync)(g,a)}catch(a){throw h=!0,a}finally{try{(0,e.unlinkSync)(g)}catch(a){if("ENOENT"!==a.code&&!h)throw a}}}},8128:a=>{"use strict";a.exports=require("next/dist/server/runtime-reacts.external.js")},10846:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},17551:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.d(b,{IX:()=>o,LB:()=>q,V6:()=>n});var e=c(73024),f=c(76760),g=c(75430),h=c(8102),i=c(35975),j=c(28967),k=a([g]);g=(k.then?(await k)():k)[0];let p=["input","output","cacheRead","cacheWrite"];function l(a){return"object"==typeof a&&null!==a&&!Array.isArray(a)}function m(){return(0,f.join)((0,g.getAgentDir)(),"models.json")}class q extends Error{constructor(a){super(a),this.name="ModelsConfigReadError"}}function n(a=m()){let b;if(!(0,e.existsSync)(a))return{providers:{}};try{let c=(0,e.readFileSync)(a,"utf8").replace(/^\uFEFF/,"");if(!c.trim())return{providers:{}};b=JSON.parse((0,i.R)(c))}catch(b){throw new q(`Failed to read ${a}: ${b instanceof Error?b.message:String(b)}`)}if(!l(b))throw new q(`Failed to read ${a}: expected a JSON object`);return b}function o(a,b=m()){n(b);let c=(0,f.dirname)(b);(0,e.existsSync)(c)||(0,e.mkdirSync)(c,{recursive:!0});let d=function(a){let b=structuredClone(a);if(!l(b.providers))return b;for(let a of Object.values(b.providers))if(l(a)&&Array.isArray(a.models))for(let b of a.models){if(!l(b)||!("cost"in b))continue;let a=function(a){if(!l(a))return;let b=p.filter(b=>void 0!==a[b]);if(0!==b.length&&!b.some(b=>"number"!=typeof a[b]||!Number.isFinite(a[b])))return Object.fromEntries([...Object.entries(a),...p.map(b=>[b,a[b]??0])])}(b.cost);a?b.cost=a:delete b.cost}return b}(function(a){if(!l(a.providers))return a;let b=Object.fromEntries(Object.entries(a.providers).map(([a,b])=>{if(!l(b)||!Array.isArray(b.models))return[a,b];let c=b.models.filter(a=>!l(a)||"string"!=typeof a.id||a.id.trim().length>0);return[a,{...b,models:c}]}));return{...a,providers:b}}(a)),g=b;if((0,e.lstatSync)(b,{throwIfNoEntry:!1})?.isSymbolicLink())try{g=(0,e.realpathSync)(b)}catch{throw new q(`Failed to write ${b}: dangling symbolic link`)}(0,h.$)(g,JSON.stringify(d,null,2)),(0,j.kn)()}d()}catch(a){d(a)}})},19121:a=>{"use strict";a.exports=require("next/dist/server/app-render/action-async-storage.external.js")},28967:(a,b,c)=>{"use strict";function d(){return globalThis.__piModelsCacheState||(globalThis.__piModelsCacheState={entries:new Map,inFlight:new Map,generation:0}),globalThis.__piModelsCacheState}function e(){let a=d();a.generation+=1,a.entries.clear(),a.inFlight.clear()}function f(a,b){return b?{...a,modelError:b}:a}function g(a){return{...a,modelError:"Model list is temporarily unavailable. Check your configuration and try again."}}function h(a,b){let c=d(),e=c.entries.get(a);if(e){if(e.expiresAt>Date.now())return Promise.resolve(e.data);c.entries.delete(a)}let f=c.inFlight.get(a);if(f)return f;let g=c.generation,h=Promise.resolve().then(b).then(b=>{if(c.generation===g&&c.inFlight.get(a)===h){let d=Date.now();for(let[a,b]of c.entries)b.expiresAt<=d&&c.entries.delete(a);for(;c.entries.size>=32;){let a=c.entries.keys().next().value;if(void 0===a)break;c.entries.delete(a)}c.entries.set(a,{data:b,expiresAt:d+6e4})}return b}).finally(()=>{c.inFlight.get(a)===h&&c.inFlight.delete(a)});return c.inFlight.set(a,h),h}c.d(b,{Fw:()=>g,Mx:()=>f,kn:()=>e,rC:()=>h})},29021:a=>{"use strict";a.exports=require("fs")},29294:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},33873:a=>{"use strict";a.exports=require("path")},35639:(a,b,c)=>{"use strict";function d(a){return"object"==typeof a&&null!==a&&!Array.isArray(a)}c.d(b,{ad:()=>e,kB:()=>f});class e extends Error{constructor(a){super(`Context window of ${a} must be a positive number of tokens`),this.name="ContextWindowError",this.model=a}}function f(a){let b=structuredClone(a);if(!d(b.providers))return b;for(let[a,c]of Object.entries(b.providers))if(d(c)&&d(c.modelOverrides))for(let[b,f]of Object.entries(c.modelOverrides)){if(!d(f)||!Object.hasOwn(f,"contextWindow"))continue;let c=function(a){if("string"==typeof a){let b=/^\d+$/.test(a.trim())?Number(a.trim()):0;return Number.isSafeInteger(b)&&b>0?b:void 0}return"number"==typeof a&&Number.isFinite(a)&&a>0?a:void 0}(f.contextWindow);if(void 0===c)throw new e(`${a}/${b}`);f.contextWindow=c}return b}},35975:(a,b,c)=>{"use strict";function d(a){return a.replace(/"(?:\\.|[^"\\])*"|\/\/[^\n]*|\/\*[\s\S]*?\*\//g,a=>'"'===a[0]?a:"*"===a[1]?" ":"").replace(/"(?:\\.|[^"\\])*"|,(\s*[}\]])/g,(a,b)=>b??('"'===a[0]?a:""))}function e(a){return JSON.parse(d(a.replace(/^\uFEFF/,"")))}c.d(b,{R:()=>d,p:()=>e})},44870:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},53718:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{GET:()=>i,PUT:()=>j,dynamic:()=>k});var e=c(23211),f=c(17551),g=c(35639),h=a([f]);f=(h.then?(await h)():h)[0];let k="force-dynamic";async function i(){try{return e.NextResponse.json((0,f.V6)())}catch(a){if(a instanceof f.LB)return e.NextResponse.json({error:a.message},{status:422});return e.NextResponse.json({error:String(a)},{status:500})}}async function j(a){try{let b=await a.json();return(0,f.IX)((0,g.kB)(b)),e.NextResponse.json({success:!0})}catch(a){if(a instanceof g.ad)return e.NextResponse.json({error:a.message},{status:400});if(a instanceof f.LB)return e.NextResponse.json({error:a.message},{status:409});return e.NextResponse.json({error:String(a)},{status:500})}}d()}catch(a){d(a)}})},55511:a=>{"use strict";a.exports=require("crypto")},63033:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},73024:a=>{"use strict";a.exports=require("node:fs")},75430:a=>{"use strict";a.exports=import("@earendil-works/pi-coding-agent")},76760:a=>{"use strict";a.exports=require("node:path")},78335:()=>{},86439:a=>{"use strict";a.exports=require("next/dist/shared/lib/no-fallback-error.external")},96487:()=>{},98115:(a,b,c)=>{"use strict";c.r(b),c.d(b,{handler:()=>A,patchFetch:()=>z,routeModule:()=>v,serverHooks:()=>y,workAsyncStorage:()=>w,workUnitAsyncStorage:()=>x});var d=c(19225),e=c(84006),f=c(8317),g=c(99373),h=c(34775),i=c(24235),j=c(261),k=c(54365),l=c(90771),m=c(73461),n=c(67798),o=c(92280),p=c(62018),q=c(45696),r=c(47929),s=c(86439),t=c(10246),u=c(37527);let v=new d.AppRouteRouteModule({definition:{kind:e.RouteKind.APP_ROUTE,page:"/api/models-config/route",pathname:"/api/models-config",filename:"route",bundlePath:"app/api/models-config/route"},distDir:".next",relativeProjectDir:"",resolvedPagePath:"/home/runner/work/pi-web/pi-web/app/api/models-config/route.ts",nextConfigOutput:"",userland:()=>c(53718),...{}}),{workAsyncStorage:w,workUnitAsyncStorage:x,serverHooks:y}=v;function z(){return(0,f.patchFetch)({workAsyncStorage:w,workUnitAsyncStorage:x})}async function A(a,b,c){c.requestMeta&&(0,g.setRequestMeta)(a,c.requestMeta),v.isDev&&(0,g.addRequestMeta)(a,"devRequestTimingInternalsEnd",process.hrtime.bigint());let d="/api/models-config/route";"/index"===d&&(d="/");let f=await v.prepare(a,b,{srcPage:d,multiZoneDraftMode:!1});if(!f)return b.statusCode=400,b.end("Bad Request"),null==c.waitUntil||c.waitUntil.call(c,Promise.resolve()),null;let{buildId:w,deploymentId:x,params:y,nextConfig:z,parsedUrl:A,isDraftMode:B,prerenderManifest:C,routerServerContext:D,isOnDemandRevalidate:E,revalidateOnlyGenerated:F,resolvedPathname:G,clientReferenceManifest:H,serverActionsManifest:I}=f,J=(0,j.normalizeAppPath)(d),K=!!C.routes[G]&&(v.isDev||(0,t.isRouteCacheOwner)(G,v.cacheOwner,C.routes[G])),L=!!(C.dynamicRoutes[J]||K),M=async()=>((null==D?void 0:D.render404)?await D.render404(a,b,A,!1):b.end("This page could not be found"),null);if(L&&!B){let a=C.dynamicRoutes[J];if(a&&!1===a.fallback&&!K){if(z.adapterPath)return await M();throw new s.NoFallbackError}}let N=null;!L||v.isDev||B||(N="/index"===(N=G)?"/":N);let O=!0===v.isDev||!L,P=L&&!O;I&&H&&(0,i.setManifestsSingleton)({page:d,clientReferenceManifest:H,serverActionsManifest:I});let Q=a.method||"GET",R=(0,h.getTracer)(),S=R.getActiveScopeSpan(),T=!!(null==D?void 0:D.isWrappedByNextServer),U=!!(0,g.getRequestMeta)(a,"minimalMode"),V=(0,g.getRequestMeta)(a,"incrementalCache")||await v.getIncrementalCache(a,z,C,U);null==V||V.resetRequestCache(),globalThis.__incrementalCache=V;let W={params:y,previewProps:C.preview,renderOpts:{experimental:{authInterrupts:!!z.experimental.authInterrupts,useCacheTimeout:z.experimental.useCacheTimeout},cacheComponents:!!z.cacheComponents,validationLevel:z.experimental.instantInsights.validationLevel,isDraftMode:B,supportsDynamicResponse:O,incrementalCache:V,hmrRefreshHash:(0,g.getRequestMeta)(a,"hmrRefreshHash"),cacheLifeProfiles:z.cacheLife,staticPageGenerationTimeout:z.staticPageGenerationTimeout,waitUntil:c.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:void 0,onInstrumentationRequestError:(b,c,d,e)=>v.onRequestError(a,b,d,e,D)},sharedContext:{buildId:w,deploymentId:x}},X=new k.NodeNextRequest(a),Y=new k.NodeNextResponse(b),Z=l.NextRequestAdapter.fromNodeNextRequest(X,(0,l.signalFromNodeResponse)(b)),$=async({previousCacheEntry:e})=>{try{if(!U&&E&&F&&!e)return b.statusCode=404,b.setHeader("x-nextjs-cache","REVALIDATED"),b.end("This page could not be found"),null;let d=await v.handle(Z,W);a.fetchMetrics=W.renderOpts.fetchMetrics;let f=W.renderOpts.pendingWaitUntil;f&&c.waitUntil&&(c.waitUntil(f),f=void 0);let g=W.renderOpts.collectedTags;if(!L)return await (0,o.I)(X,Y,d,f),null;{let a=await d.blob(),b=(0,p.toNodeOutgoingHttpHeaders)(d.headers);g&&(b[r.NEXT_CACHE_TAGS_HEADER]=g),!b["content-type"]&&a.type&&(b["content-type"]=a.type);let c=void 0!==W.renderOpts.collectedRevalidate&&!(W.renderOpts.collectedRevalidate>=r.INFINITE_CACHE)&&W.renderOpts.collectedRevalidate,e=void 0===W.renderOpts.collectedExpire||W.renderOpts.collectedExpire>=r.INFINITE_CACHE?!1!==c&&c>0?z.expireTime:void 0:W.renderOpts.collectedExpire;return{value:{kind:u.CachedRouteKind.APP_ROUTE,status:d.status,body:Buffer.from(await a.arrayBuffer()),headers:b},cacheControl:{revalidate:c,expire:e}}}}catch(b){throw(null==e?void 0:e.isStale)&&await v.onRequestError(a,b,{routerKind:"App Router",routePath:d,routeType:"route",revalidateReason:(0,n.getRevalidateReason)({isStaticGeneration:P,isOnDemandRevalidate:E})},!1,D),b}},_=async(d,f)=>{try{var g,i;let d=await v.handleResponse({req:a,nextConfig:z,cacheKey:N,routeKind:e.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:C,isRoutePPREnabled:!1,isOnDemandRevalidate:E,revalidateOnlyGenerated:F,responseGenerator:$,waitUntil:c.waitUntil,isMinimalMode:U});if(!L)return;if((null==d||null==(g=d.value)?void 0:g.kind)!==u.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==d||null==(i=d.value)?void 0:i.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});U||b.setHeader("x-nextjs-cache",E?"REVALIDATED":d.isMiss?"MISS":d.isStale?"STALE":"HIT"),B&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let f=(0,p.fromNodeOutgoingHttpHeaders)(d.value.headers);U&&L||f.delete(r.NEXT_CACHE_TAGS_HEADER),!d.cacheControl||b.getHeader("Cache-Control")||f.get("Cache-Control")||f.set("Cache-Control",(0,q.getCacheControlHeader)(d.cacheControl)),await (0,o.I)(X,Y,new Response(d.value.body,{headers:f,status:d.value.status||200}));return}catch(b){if(b instanceof s.NoFallbackError||await v.onRequestError(a,b,{routerKind:"App Router",routePath:J,routeType:"route",revalidateReason:(0,n.getRevalidateReason)({isStaticGeneration:P,isOnDemandRevalidate:E})},!1,D),L)throw b;await (0,o.I)(X,Y,new Response(null,{status:500}));return}finally{(()=>{if(!d)return;let a=b.statusCode;d.setAttributes({"http.status_code":a,"next.rsc":!1}),a&&a>=500&&(d.setStatus({code:h.SpanStatusCode.ERROR}),d.setAttribute("error.type",a.toString()));let c=R.getRootSpanAttributes();if(!c)return;if(c.get("next.span_type")!==m.BaseServerSpan.handleRequest)return console.warn(`Unexpected root span type '${c.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let e=c.get("next.route")||J,g=`${Q} ${e}`;d.setAttributes({"next.route":e,"http.route":e,"next.span_name":g}),d.updateName(g),f&&f!==d&&(f.setAttribute("http.route",e),f.updateName(g))})()}};if(T&&S)await _(S,void 0);else{let b=R.getActiveScopeSpan();await R.withPropagatedContext(a.headers,()=>R.trace(m.BaseServerSpan.handleRequest,{spanName:`${Q} ${d}`,kind:h.SpanKind.SERVER,attributes:{"http.method":Q,"http.target":a.url}},a=>_(a,b)),void 0,!T)}}}};var b=require("../../../webpack-runtime.js");b.C(a);var c=b.X(0,[2970,1813],()=>b(b.s=98115));module.exports=c})();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(()=>{var a={};a.id=6849,a.ids=[6849],a.modules={261:a=>{a.exports=require("next/dist/shared/lib/router/utils/app-paths")},3295:a=>{a.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},8128:a=>{a.exports=require("next/dist/server/runtime-reacts.external.js")},10846:a=>{a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},12412:a=>{a.exports=require("assert")},14858:(a,b,c)=>{c.d(b,{eW:()=>e,yP:()=>i});var d=c(85963);function e(a){let b=[],c=[];for(let d=a.length-1;d>=0;d--)c.push({input:a[d],into:b});for(;c.length>0;){let a=c.pop(),{input:b}=a,d={entry:{id:b.entry.id,parentId:b.entry.parentId??null,type:b.entry.type,timestamp:b.entry.timestamp??""},children:[],...b.compressedEntryIds?.length?{compressedEntryIds:b.compressedEntryIds}:{},...b.branchPreview?{branchPreview:b.branchPreview}:{}};a.into.push(d);for(let a=b.children.length-1;a>=0;a--)c.push({input:b.children[a],into:d.children})}return b}function f(a){return"object"==typeof a&&null!==a&&!Array.isArray(a)}function g(a,b){if("string"!=typeof b||a.length>40)return a;let c=b.replace(/\s+/g," ").trim();if(!c)return a;let d=a?" ":"",e=a+d;if(e.length>=41)return e.slice(0,41);let f=41-e.length;return e+c.slice(0,f)}function h(a){if("message"!==a.type||!f(a.message)||"string"!=typeof a.message.role||"system"===a.message.role)return;let b=a.message.content,c="",d=!1;if("string"==typeof b)c=g(c,b);else if(Array.isArray(b)){for(let a of b)if(f(a)&&("image"===a.type&&(d=!0),"text"===a.type&&(c=g(c,a.text)),c.length>40))break}c.length>40?c=c.slice(0,40)+"…":c||(c=d?"[image]":"assistant"===a.message.role?"[assistant]":"message");let e="user"===a.message.role||"assistant"===a.message.role?a.message.role:void 0;return{...e?{role:e}:{},text:c}}function i(a){let b=new Set,c=new Set(a),e=new Set,f=[...a];for(;f.length>0;){let a=f.pop();if(!e.has(a))for(let d of(e.add(a),(c.has(a)||1!==a.children.length)&&b.add(a),a.children))f.push(d)}let g=(a,b,c)=>{let e="message"===a.entry.type?(0,d.r)(a.entry.message):a.entry.message;return{...a,entry:e===a.entry.message?a.entry:{...a.entry,message:e},children:[],...b?.length?{compressedEntryIds:b}:{},...c?{branchPreview:c}:{}}},i=a.map(a=>g(a,void 0,h(a.entry))),j=a.map((a,b)=>({source:a,projected:i[b],depth:1})),k=(a,c)=>{let d=[{node:a,compressedEntryIds:[],branchPreview:void 0}],e=new Set;for(;d.length>0;){let{node:a,compressedEntryIds:f,branchPreview:i}=d.pop();if(e.has(a))continue;e.add(a);let j=i??h(a.entry);b.has(a)&&c.children.push(g(a,f,j));for(let c=a.children.length-1;c>=0;c--)d.push({node:a.children[c],compressedEntryIds:b.has(a)?[]:[...f,a.entry.id],branchPreview:b.has(a)?void 0:j})}};for(;j.length>0;){let{source:a,projected:c,depth:d}=j.pop();for(let e of a.children){let a=e;if(d>=200){k(a,c);continue}let f=[],i=h(a.entry);for(;!b.has(a)&&1===a.children.length;)f.push(a.entry.id),a=a.children[0],i??=h(a.entry);if(!b.has(a))continue;let l=g(a,f,i);c.children.push(l),j.push({source:a,projected:l,depth:d+1})}}return i}},19121:a=>{a.exports=require("next/dist/server/app-render/action-async-storage.external.js")},27910:a=>{a.exports=require("stream")},28354:a=>{a.exports=require("util")},28802:a=>{a.exports=import("@earendil-works/pi-ai")},29021:a=>{a.exports=require("fs")},29294:a=>{a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},29862:a=>{a.exports=import("@earendil-works/pi-tui")},33873:a=>{a.exports=require("path")},44870:a=>{a.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},45648:(a,b,c)=>{c.d(b,{T:()=>f});var d=c(55511),e=c(29021);function f(a){try{return(0,d.createHash)("sha1").update(JSON.stringify({fp:function(a){try{let b=(0,e.statSync)(a);return`${b.size}:${b.mtimeMs}:${b.ctimeMs}`}catch{return"missing"}}(a.filePath),source:a.sourceId,entries:a.entryCount,latest:a.latestEntryId,leaf:a.leafId})).digest("base64url").slice(0,22)}catch{return null}}},48161:a=>{a.exports=require("node:os")},51181:a=>{a.exports=require("web-push")},51455:a=>{a.exports=require("node:fs/promises")},55511:a=>{a.exports=require("crypto")},63033:a=>{a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},73024:a=>{a.exports=require("node:fs")},73136:a=>{a.exports=require("node:url")},74683:(a,b,c)=>{c.r(b),c.d(b,{handler:()=>A,patchFetch:()=>z,routeModule:()=>v,serverHooks:()=>y,workAsyncStorage:()=>w,workUnitAsyncStorage:()=>x});var d=c(19225),e=c(84006),f=c(8317),g=c(99373),h=c(34775),i=c(24235),j=c(261),k=c(54365),l=c(90771),m=c(73461),n=c(67798),o=c(92280),p=c(62018),q=c(45696),r=c(47929),s=c(86439),t=c(10246),u=c(37527);let v=new d.AppRouteRouteModule({definition:{kind:e.RouteKind.APP_ROUTE,page:"/api/sessions/[id]/route",pathname:"/api/sessions/[id]",filename:"route",bundlePath:"app/api/sessions/[id]/route"},distDir:".next",relativeProjectDir:"",resolvedPagePath:"/home/runner/work/pi-web/pi-web/app/api/sessions/[id]/route.ts",nextConfigOutput:"",userland:()=>c(98192),...{}}),{workAsyncStorage:w,workUnitAsyncStorage:x,serverHooks:y}=v;function z(){return(0,f.patchFetch)({workAsyncStorage:w,workUnitAsyncStorage:x})}async function A(a,b,c){c.requestMeta&&(0,g.setRequestMeta)(a,c.requestMeta),v.isDev&&(0,g.addRequestMeta)(a,"devRequestTimingInternalsEnd",process.hrtime.bigint());let d="/api/sessions/[id]/route";"/index"===d&&(d="/");let f=await v.prepare(a,b,{srcPage:d,multiZoneDraftMode:!1});if(!f)return b.statusCode=400,b.end("Bad Request"),null==c.waitUntil||c.waitUntil.call(c,Promise.resolve()),null;let{buildId:w,deploymentId:x,params:y,nextConfig:z,parsedUrl:A,isDraftMode:B,prerenderManifest:C,routerServerContext:D,isOnDemandRevalidate:E,revalidateOnlyGenerated:F,resolvedPathname:G,clientReferenceManifest:H,serverActionsManifest:I}=f,J=(0,j.normalizeAppPath)(d),K=!!C.routes[G]&&(v.isDev||(0,t.isRouteCacheOwner)(G,v.cacheOwner,C.routes[G])),L=!!(C.dynamicRoutes[J]||K),M=async()=>((null==D?void 0:D.render404)?await D.render404(a,b,A,!1):b.end("This page could not be found"),null);if(L&&!B){let a=C.dynamicRoutes[J];if(a&&!1===a.fallback&&!K){if(z.adapterPath)return await M();throw new s.NoFallbackError}}let N=null;!L||v.isDev||B||(N="/index"===(N=G)?"/":N);let O=!0===v.isDev||!L,P=L&&!O;I&&H&&(0,i.setManifestsSingleton)({page:d,clientReferenceManifest:H,serverActionsManifest:I});let Q=a.method||"GET",R=(0,h.getTracer)(),S=R.getActiveScopeSpan(),T=!!(null==D?void 0:D.isWrappedByNextServer),U=!!(0,g.getRequestMeta)(a,"minimalMode"),V=(0,g.getRequestMeta)(a,"incrementalCache")||await v.getIncrementalCache(a,z,C,U);null==V||V.resetRequestCache(),globalThis.__incrementalCache=V;let W={params:y,previewProps:C.preview,renderOpts:{experimental:{authInterrupts:!!z.experimental.authInterrupts,useCacheTimeout:z.experimental.useCacheTimeout},cacheComponents:!!z.cacheComponents,validationLevel:z.experimental.instantInsights.validationLevel,isDraftMode:B,supportsDynamicResponse:O,incrementalCache:V,hmrRefreshHash:(0,g.getRequestMeta)(a,"hmrRefreshHash"),cacheLifeProfiles:z.cacheLife,staticPageGenerationTimeout:z.staticPageGenerationTimeout,waitUntil:c.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:void 0,onInstrumentationRequestError:(b,c,d,e)=>v.onRequestError(a,b,d,e,D)},sharedContext:{buildId:w,deploymentId:x}},X=new k.NodeNextRequest(a),Y=new k.NodeNextResponse(b),Z=l.NextRequestAdapter.fromNodeNextRequest(X,(0,l.signalFromNodeResponse)(b)),$=async({previousCacheEntry:e})=>{try{if(!U&&E&&F&&!e)return b.statusCode=404,b.setHeader("x-nextjs-cache","REVALIDATED"),b.end("This page could not be found"),null;let d=await v.handle(Z,W);a.fetchMetrics=W.renderOpts.fetchMetrics;let f=W.renderOpts.pendingWaitUntil;f&&c.waitUntil&&(c.waitUntil(f),f=void 0);let g=W.renderOpts.collectedTags;if(!L)return await (0,o.I)(X,Y,d,f),null;{let a=await d.blob(),b=(0,p.toNodeOutgoingHttpHeaders)(d.headers);g&&(b[r.NEXT_CACHE_TAGS_HEADER]=g),!b["content-type"]&&a.type&&(b["content-type"]=a.type);let c=void 0!==W.renderOpts.collectedRevalidate&&!(W.renderOpts.collectedRevalidate>=r.INFINITE_CACHE)&&W.renderOpts.collectedRevalidate,e=void 0===W.renderOpts.collectedExpire||W.renderOpts.collectedExpire>=r.INFINITE_CACHE?!1!==c&&c>0?z.expireTime:void 0:W.renderOpts.collectedExpire;return{value:{kind:u.CachedRouteKind.APP_ROUTE,status:d.status,body:Buffer.from(await a.arrayBuffer()),headers:b},cacheControl:{revalidate:c,expire:e}}}}catch(b){throw(null==e?void 0:e.isStale)&&await v.onRequestError(a,b,{routerKind:"App Router",routePath:d,routeType:"route",revalidateReason:(0,n.getRevalidateReason)({isStaticGeneration:P,isOnDemandRevalidate:E})},!1,D),b}},_=async(d,f)=>{try{var g,i;let d=await v.handleResponse({req:a,nextConfig:z,cacheKey:N,routeKind:e.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:C,isRoutePPREnabled:!1,isOnDemandRevalidate:E,revalidateOnlyGenerated:F,responseGenerator:$,waitUntil:c.waitUntil,isMinimalMode:U});if(!L)return;if((null==d||null==(g=d.value)?void 0:g.kind)!==u.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==d||null==(i=d.value)?void 0:i.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});U||b.setHeader("x-nextjs-cache",E?"REVALIDATED":d.isMiss?"MISS":d.isStale?"STALE":"HIT"),B&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let f=(0,p.fromNodeOutgoingHttpHeaders)(d.value.headers);U&&L||f.delete(r.NEXT_CACHE_TAGS_HEADER),!d.cacheControl||b.getHeader("Cache-Control")||f.get("Cache-Control")||f.set("Cache-Control",(0,q.getCacheControlHeader)(d.cacheControl)),await (0,o.I)(X,Y,new Response(d.value.body,{headers:f,status:d.value.status||200}));return}catch(b){if(b instanceof s.NoFallbackError||await v.onRequestError(a,b,{routerKind:"App Router",routePath:J,routeType:"route",revalidateReason:(0,n.getRevalidateReason)({isStaticGeneration:P,isOnDemandRevalidate:E})},!1,D),L)throw b;await (0,o.I)(X,Y,new Response(null,{status:500}));return}finally{(()=>{if(!d)return;let a=b.statusCode;d.setAttributes({"http.status_code":a,"next.rsc":!1}),a&&a>=500&&(d.setStatus({code:h.SpanStatusCode.ERROR}),d.setAttribute("error.type",a.toString()));let c=R.getRootSpanAttributes();if(!c)return;if(c.get("next.span_type")!==m.BaseServerSpan.handleRequest)return console.warn(`Unexpected root span type '${c.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let e=c.get("next.route")||J,g=`${Q} ${e}`;d.setAttributes({"next.route":e,"http.route":e,"next.span_name":g}),d.updateName(g),f&&f!==d&&(f.setAttribute("http.route",e),f.updateName(g))})()}};if(T&&S)await _(S,void 0);else{let b=R.getActiveScopeSpan();await R.withPropagatedContext(a.headers,()=>R.trace(m.BaseServerSpan.handleRequest,{spanName:`${Q} ${d}`,kind:h.SpanKind.SERVER,attributes:{"http.method":Q,"http.target":a.url}},a=>_(a,b)),void 0,!T)}}},75430:a=>{a.exports=import("@earendil-works/pi-coding-agent")},76760:a=>{a.exports=require("node:path")},77598:a=>{a.exports=require("node:crypto")},77850:(a,b,c)=>{c.d(b,{Y:()=>d});function d(a,b,c={}){var e;let f,g=JSON.stringify(b),h=Buffer.byteLength(g)>=1024,i=new Headers(c.headers);return i.set("Content-Type","application/json; charset=utf-8"),(h&&(e="Accept-Encoding",(f=i.get("Vary"))?f.split(",").some(a=>a.trim().toLowerCase()===e.toLowerCase())||i.set("Vary",`${f}, ${e}`):i.set("Vary",e)),h&&function(a,b){let c;for(let d of a.split(",")){let[a,...e]=d.trim().split(";"),f=a.trim().toLowerCase(),g=1;for(let a of e){let b=/^\s*q\s*=\s*(.*?)\s*$/i.exec(a);if(!b)continue;let c=b[1];g=/^(?:0(?:\.\d{0,3})?|1(?:\.0{0,3})?)$/.test(c)?Number(c):0}if(f===b)return g;"*"===f&&(c=g)}return c??0}(a.headers.get("Accept-Encoding")??"","gzip")>0)?(i.set("Content-Encoding","gzip"),new Response(new Blob([g]).stream().pipeThrough(new CompressionStream("gzip")),{...c,headers:i})):new Response(g,{...c,headers:i})}},79646:a=>{a.exports=require("child_process")},79748:a=>{a.exports=require("fs/promises")},81115:a=>{a.exports=require("constants")},86439:a=>{a.exports=require("next/dist/shared/lib/no-fallback-error.external")},88914:(a,b,c)=>{function d(a,b){b&&(a.tokens.input+=b.input??0,a.tokens.output+=b.output??0,a.tokens.cacheRead+=b.cacheRead??0,a.tokens.cacheWrite+=b.cacheWrite??0,a.cost+=b.cost?.total??0)}function e(a){var b;let c={userMessages:0,assistantMessages:0,toolCalls:0,toolResults:0,totalMessages:0,tokens:{input:0,output:0,cacheRead:0,cacheWrite:0,total:0},cost:0};for(let e of a){if("compaction"===e.type||"branch_summary"===e.type||"usage"===e.type){d(c,e.usage);continue}"message"===e.type&&(b=e.message,c.totalMessages+=1,"user"===b.role?c.userMessages+=1:"toolResult"===b.role?(c.toolResults+=1,d(c,b.usage)):"assistant"===b.role&&(c.assistantMessages+=1,Array.isArray(b.content)&&(c.toolCalls+=b.content.filter(a=>"toolCall"===a.type).length),d(c,b.usage)))}return c.tokens.total=c.tokens.input+c.tokens.output+c.tokens.cacheRead+c.tokens.cacheWrite,c}c.d(b,{P:()=>e})},89691:(a,b,c)=>{function d(a){let b,c=0;for(let e of a){var d;if("message"!==(d=e.type)&&"compaction"!==d&&"branch_summary"!==d&&"custom_message"!==d)continue;let a=Date.parse(e.timestamp);if(!Number.isFinite(a))continue;let f="message"===e.type?e.message?.role:void 0;if("user"===f||"bashExecution"===f){b=a;continue}void 0!==b&&a>b&&(c+=a-b),b=a}return c}c.d(b,{c:()=>d})},94735:a=>{a.exports=require("events")},95337:(a,b,c)=>{c.d(b,{h:()=>e});let d="1"===process.env.PI_WEB_PERF;function e(a){if(!d)return;let b=crypto.randomUUID().slice(0,8),c=performance.now(),e=c,f=new Map;return{span(a){let b=performance.now();f.set(a,(f.get(a)??0)+(b-e)),e=b},totalMs:()=>performance.now()-c,attach(d){let e=performance.now()-c,g=[...f.entries()].map(([a,b])=>`${a};dur=${b.toFixed(1)}`).join(", ");d.headers.set("Server-Timing",g?`${g}, total;dur=${e.toFixed(1)}`:`total;dur=${e.toFixed(1)}`);let h={};for(let[a,b]of f)h[a]=Number(b.toFixed(1));return console.log(JSON.stringify({perf:!0,route:a,requestId:b,totalMs:Number(e.toFixed(1)),phases:h})),d}}}},98192:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{DELETE:()=>v,GET:()=>t,PATCH:()=>u});var e=c(23211),f=c(29021),g=c(40402),h=c(56429),i=c(14858),j=c(89691),k=c(88914),l=c(95337),m=c(45648),n=c(7048),o=c(21560),p=c(77850),q=c(21906),r=c(59506),s=a([g,h,n,q,r]);async function t(a,{params:b}){let{id:c}=await b,d=(0,l.h)("GET /api/sessions/[id]");try{let b;d?.span("resolve");let l=(0,h.A4)(c),q=new URL(a.url).searchParams,s="1"===q.get("force"),t=l?.isAlive()?l:void 0,u=!1;s&&t?.evictIfDiskAhead()&&(u=!0,t=void 0);let v=t,w=v?null:await (0,g.os)(c);if(!v&&!w)return e.NextResponse.json({error:"Session not found"},{status:404});let x=v?.inner.sessionManager??(0,g.G1)(w);d?.span("open");let y=v?.sessionFile||x.getSessionFile()||w||"",z=x.getEntries(),A=x.getLeafId(),B="summary"===q.get("tree"),C=B?(0,i.eW)((0,i.yP)(x.getTree())):(0,i.yP)(x.getTree());d?.span("tree");let D=q.has("deferThinking"),E=q.has("deferMedia"),F=Number(q.get("tail")),G=Number.isFinite(F)&&F>0?Math.min(F,1e3):50,H=(0,r.Kp)({entries:z,cwd:x.getHeader()?.cwd??"",leafId:A,models:v?.inner.modelRuntime}),I=(0,r.dt)((0,g.Uv)(z,A,{deferThinking:D,deferToolResultImages:E,tail:G,sessionId:c}),H);d?.span("context");let J=(0,j.c)(z),K=(0,k.P)(z);d?.span("stats");let L=z[z.length-1],M=(0,m.T)({filePath:y,sourceId:`${v?`runtime:${String(v.inner.sessionId)}`:"disk"}${H?"+notices":""}`,entryCount:z.length,latestEntryId:"string"==typeof L?.id?L.id:null,leafId:A??null}),N=x.getSessionName(),O=z.find(a=>"message"===a.type&&"user"===a.message.role),P=O?.type==="message"?O.message:void 0,Q=x.getHeader(),R=Q?.timestamp??new Date().toISOString();try{R=(0,f.statSync)(y).mtime.toISOString()}catch{}let S=Q?.parentSession?await (0,g.u1)(Q.parentSession):void 0,T=Q?(0,n.$u)(z,Q.id,y):null,U=(0,n.ph)(z)?.tools??(0,o.dS)(z),V=Q?(await (0,g.zH)([{path:y,id:Q.id,cwd:Q.cwd??"",name:N,created:Q.timestamp,modified:R,messageCount:K.totalMessages,firstMessage:P?(b=P.content,"string"==typeof b?b:(Array.isArray(b)?b.find(a=>"text"===a.type)?.text??"":"")||"(no messages)"):"(no messages)",parentSessionId:S,...T?{relation:{kind:"subagent",parentSessionId:T.parentSessionId,profile:T.profile,description:T.description,status:v?.isRunning()?"running":T.status}}:Q.parentSession?{relation:{kind:"fork",...S?{originSessionId:S}:{}}}:{},transient:!y||!(0,f.existsSync)(y)}]))[0]:null;return d?.attach((0,p.Y)(a,{sessionId:c,filePath:y,info:V,leafId:A,tree:C,...B?{treeFormat:"summary"}:{},snapshotRevision:M,context:I,stats:K,totalActiveMs:J,...void 0!==U?{toolNames:U}:{},...u?{wrapperRebuilt:!0}:{}}))??(0,p.Y)(a,{sessionId:c,filePath:y,info:V,leafId:A,tree:C,...B?{treeFormat:"summary"}:{},snapshotRevision:M,context:I,stats:K,totalActiveMs:J,...void 0!==U?{toolNames:U}:{},...u?{wrapperRebuilt:!0}:{}})}catch(a){return e.NextResponse.json({error:String(a)},{status:500})}}async function u(a,{params:b}){let{id:c}=await b;try{let{name:b}=await a.json();if("string"!=typeof b)return e.NextResponse.json({error:"name is required"},{status:400});let d=await (0,g.os)(c);if(!d)return e.NextResponse.json({error:"Session not found"},{status:404});return(0,g.G1)(d,{mutable:!0}).appendSessionInfo(b.trim()),(0,g.j6)(d),(0,g.mD)(),e.NextResponse.json({ok:!0})}catch(a){return e.NextResponse.json({error:String(a)},{status:500})}}async function v(a,{params:b}){let{id:c}=await b;try{let{missing:a}=await (0,q.j)([c]);if(a.length>0)return e.NextResponse.json({error:"Session not found"},{status:404});return e.NextResponse.json({ok:!0})}catch(a){return e.NextResponse.json({error:String(a)},{status:500})}}[g,h,n,q,r]=s.then?(await s)():s,d()}catch(a){d(a)}})},98995:a=>{a.exports=require("node:module")}};var b=require("../../../../webpack-runtime.js");b.C(a);var c=b.X(0,[2970,1813,426,974,5582,2498,3757,4698,2243,6429,2069,1906],()=>b(b.s=74683));module.exports=c})();
|
|
1
|
+
"use strict";(()=>{var a={};a.id=6849,a.ids=[6849],a.modules={261:a=>{a.exports=require("next/dist/shared/lib/router/utils/app-paths")},3295:a=>{a.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},8128:a=>{a.exports=require("next/dist/server/runtime-reacts.external.js")},10846:a=>{a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},12412:a=>{a.exports=require("assert")},14858:(a,b,c)=>{c.d(b,{eW:()=>e,yP:()=>i});var d=c(85963);function e(a){let b=[],c=[];for(let d=a.length-1;d>=0;d--)c.push({input:a[d],into:b});for(;c.length>0;){let a=c.pop(),{input:b}=a,d={entry:{id:b.entry.id,parentId:b.entry.parentId??null,type:b.entry.type,timestamp:b.entry.timestamp??""},children:[],...b.compressedEntryIds?.length?{compressedEntryIds:b.compressedEntryIds}:{},...b.branchPreview?{branchPreview:b.branchPreview}:{}};a.into.push(d);for(let a=b.children.length-1;a>=0;a--)c.push({input:b.children[a],into:d.children})}return b}function f(a){return"object"==typeof a&&null!==a&&!Array.isArray(a)}function g(a,b){if("string"!=typeof b||a.length>40)return a;let c=b.replace(/\s+/g," ").trim();if(!c)return a;let d=a?" ":"",e=a+d;if(e.length>=41)return e.slice(0,41);let f=41-e.length;return e+c.slice(0,f)}function h(a){if("message"!==a.type||!f(a.message)||"string"!=typeof a.message.role||"system"===a.message.role)return;let b=a.message.content,c="",d=!1;if("string"==typeof b)c=g(c,b);else if(Array.isArray(b)){for(let a of b)if(f(a)&&("image"===a.type&&(d=!0),"text"===a.type&&(c=g(c,a.text)),c.length>40))break}c.length>40?c=c.slice(0,40)+"…":c||(c=d?"[image]":"assistant"===a.message.role?"[assistant]":"message");let e="user"===a.message.role||"assistant"===a.message.role?a.message.role:void 0;return{...e?{role:e}:{},text:c}}function i(a){let b=new Set,c=new Set(a),e=new Set,f=[...a];for(;f.length>0;){let a=f.pop();if(!e.has(a))for(let d of(e.add(a),(c.has(a)||1!==a.children.length)&&b.add(a),a.children))f.push(d)}let g=(a,b,c)=>{let e="message"===a.entry.type?(0,d.r)(a.entry.message):a.entry.message;return{...a,entry:e===a.entry.message?a.entry:{...a.entry,message:e},children:[],...b?.length?{compressedEntryIds:b}:{},...c?{branchPreview:c}:{}}},i=a.map(a=>g(a,void 0,h(a.entry))),j=a.map((a,b)=>({source:a,projected:i[b],depth:1})),k=(a,c)=>{let d=[{node:a,compressedEntryIds:[],branchPreview:void 0}],e=new Set;for(;d.length>0;){let{node:a,compressedEntryIds:f,branchPreview:i}=d.pop();if(e.has(a))continue;e.add(a);let j=i??h(a.entry);b.has(a)&&c.children.push(g(a,f,j));for(let c=a.children.length-1;c>=0;c--)d.push({node:a.children[c],compressedEntryIds:b.has(a)?[]:[...f,a.entry.id],branchPreview:b.has(a)?void 0:j})}};for(;j.length>0;){let{source:a,projected:c,depth:d}=j.pop();for(let e of a.children){let a=e;if(d>=200){k(a,c);continue}let f=[],i=h(a.entry);for(;!b.has(a)&&1===a.children.length;)f.push(a.entry.id),a=a.children[0],i??=h(a.entry);if(!b.has(a))continue;let l=g(a,f,i);c.children.push(l),j.push({source:a,projected:l,depth:d+1})}}return i}},19121:a=>{a.exports=require("next/dist/server/app-render/action-async-storage.external.js")},27910:a=>{a.exports=require("stream")},28354:a=>{a.exports=require("util")},28802:a=>{a.exports=import("@earendil-works/pi-ai")},29021:a=>{a.exports=require("fs")},29294:a=>{a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},29862:a=>{a.exports=import("@earendil-works/pi-tui")},33873:a=>{a.exports=require("path")},44870:a=>{a.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},45648:(a,b,c)=>{c.d(b,{T:()=>f});var d=c(55511),e=c(29021);function f(a){try{return(0,d.createHash)("sha1").update(JSON.stringify({fp:function(a){try{let b=(0,e.statSync)(a);return`${b.size}:${b.mtimeMs}:${b.ctimeMs}`}catch{return"missing"}}(a.filePath),source:a.sourceId,entries:a.entryCount,latest:a.latestEntryId,leaf:a.leafId})).digest("base64url").slice(0,22)}catch{return null}}},48161:a=>{a.exports=require("node:os")},51181:a=>{a.exports=require("web-push")},51455:a=>{a.exports=require("node:fs/promises")},55511:a=>{a.exports=require("crypto")},63033:a=>{a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},73024:a=>{a.exports=require("node:fs")},73136:a=>{a.exports=require("node:url")},74683:(a,b,c)=>{c.r(b),c.d(b,{handler:()=>A,patchFetch:()=>z,routeModule:()=>v,serverHooks:()=>y,workAsyncStorage:()=>w,workUnitAsyncStorage:()=>x});var d=c(19225),e=c(84006),f=c(8317),g=c(99373),h=c(34775),i=c(24235),j=c(261),k=c(54365),l=c(90771),m=c(73461),n=c(67798),o=c(92280),p=c(62018),q=c(45696),r=c(47929),s=c(86439),t=c(10246),u=c(37527);let v=new d.AppRouteRouteModule({definition:{kind:e.RouteKind.APP_ROUTE,page:"/api/sessions/[id]/route",pathname:"/api/sessions/[id]",filename:"route",bundlePath:"app/api/sessions/[id]/route"},distDir:".next",relativeProjectDir:"",resolvedPagePath:"/home/runner/work/pi-web/pi-web/app/api/sessions/[id]/route.ts",nextConfigOutput:"",userland:()=>c(98192),...{}}),{workAsyncStorage:w,workUnitAsyncStorage:x,serverHooks:y}=v;function z(){return(0,f.patchFetch)({workAsyncStorage:w,workUnitAsyncStorage:x})}async function A(a,b,c){c.requestMeta&&(0,g.setRequestMeta)(a,c.requestMeta),v.isDev&&(0,g.addRequestMeta)(a,"devRequestTimingInternalsEnd",process.hrtime.bigint());let d="/api/sessions/[id]/route";"/index"===d&&(d="/");let f=await v.prepare(a,b,{srcPage:d,multiZoneDraftMode:!1});if(!f)return b.statusCode=400,b.end("Bad Request"),null==c.waitUntil||c.waitUntil.call(c,Promise.resolve()),null;let{buildId:w,deploymentId:x,params:y,nextConfig:z,parsedUrl:A,isDraftMode:B,prerenderManifest:C,routerServerContext:D,isOnDemandRevalidate:E,revalidateOnlyGenerated:F,resolvedPathname:G,clientReferenceManifest:H,serverActionsManifest:I}=f,J=(0,j.normalizeAppPath)(d),K=!!C.routes[G]&&(v.isDev||(0,t.isRouteCacheOwner)(G,v.cacheOwner,C.routes[G])),L=!!(C.dynamicRoutes[J]||K),M=async()=>((null==D?void 0:D.render404)?await D.render404(a,b,A,!1):b.end("This page could not be found"),null);if(L&&!B){let a=C.dynamicRoutes[J];if(a&&!1===a.fallback&&!K){if(z.adapterPath)return await M();throw new s.NoFallbackError}}let N=null;!L||v.isDev||B||(N="/index"===(N=G)?"/":N);let O=!0===v.isDev||!L,P=L&&!O;I&&H&&(0,i.setManifestsSingleton)({page:d,clientReferenceManifest:H,serverActionsManifest:I});let Q=a.method||"GET",R=(0,h.getTracer)(),S=R.getActiveScopeSpan(),T=!!(null==D?void 0:D.isWrappedByNextServer),U=!!(0,g.getRequestMeta)(a,"minimalMode"),V=(0,g.getRequestMeta)(a,"incrementalCache")||await v.getIncrementalCache(a,z,C,U);null==V||V.resetRequestCache(),globalThis.__incrementalCache=V;let W={params:y,previewProps:C.preview,renderOpts:{experimental:{authInterrupts:!!z.experimental.authInterrupts,useCacheTimeout:z.experimental.useCacheTimeout},cacheComponents:!!z.cacheComponents,validationLevel:z.experimental.instantInsights.validationLevel,isDraftMode:B,supportsDynamicResponse:O,incrementalCache:V,hmrRefreshHash:(0,g.getRequestMeta)(a,"hmrRefreshHash"),cacheLifeProfiles:z.cacheLife,staticPageGenerationTimeout:z.staticPageGenerationTimeout,waitUntil:c.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:void 0,onInstrumentationRequestError:(b,c,d,e)=>v.onRequestError(a,b,d,e,D)},sharedContext:{buildId:w,deploymentId:x}},X=new k.NodeNextRequest(a),Y=new k.NodeNextResponse(b),Z=l.NextRequestAdapter.fromNodeNextRequest(X,(0,l.signalFromNodeResponse)(b)),$=async({previousCacheEntry:e})=>{try{if(!U&&E&&F&&!e)return b.statusCode=404,b.setHeader("x-nextjs-cache","REVALIDATED"),b.end("This page could not be found"),null;let d=await v.handle(Z,W);a.fetchMetrics=W.renderOpts.fetchMetrics;let f=W.renderOpts.pendingWaitUntil;f&&c.waitUntil&&(c.waitUntil(f),f=void 0);let g=W.renderOpts.collectedTags;if(!L)return await (0,o.I)(X,Y,d,f),null;{let a=await d.blob(),b=(0,p.toNodeOutgoingHttpHeaders)(d.headers);g&&(b[r.NEXT_CACHE_TAGS_HEADER]=g),!b["content-type"]&&a.type&&(b["content-type"]=a.type);let c=void 0!==W.renderOpts.collectedRevalidate&&!(W.renderOpts.collectedRevalidate>=r.INFINITE_CACHE)&&W.renderOpts.collectedRevalidate,e=void 0===W.renderOpts.collectedExpire||W.renderOpts.collectedExpire>=r.INFINITE_CACHE?!1!==c&&c>0?z.expireTime:void 0:W.renderOpts.collectedExpire;return{value:{kind:u.CachedRouteKind.APP_ROUTE,status:d.status,body:Buffer.from(await a.arrayBuffer()),headers:b},cacheControl:{revalidate:c,expire:e}}}}catch(b){throw(null==e?void 0:e.isStale)&&await v.onRequestError(a,b,{routerKind:"App Router",routePath:d,routeType:"route",revalidateReason:(0,n.getRevalidateReason)({isStaticGeneration:P,isOnDemandRevalidate:E})},!1,D),b}},_=async(d,f)=>{try{var g,i;let d=await v.handleResponse({req:a,nextConfig:z,cacheKey:N,routeKind:e.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:C,isRoutePPREnabled:!1,isOnDemandRevalidate:E,revalidateOnlyGenerated:F,responseGenerator:$,waitUntil:c.waitUntil,isMinimalMode:U});if(!L)return;if((null==d||null==(g=d.value)?void 0:g.kind)!==u.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==d||null==(i=d.value)?void 0:i.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});U||b.setHeader("x-nextjs-cache",E?"REVALIDATED":d.isMiss?"MISS":d.isStale?"STALE":"HIT"),B&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let f=(0,p.fromNodeOutgoingHttpHeaders)(d.value.headers);U&&L||f.delete(r.NEXT_CACHE_TAGS_HEADER),!d.cacheControl||b.getHeader("Cache-Control")||f.get("Cache-Control")||f.set("Cache-Control",(0,q.getCacheControlHeader)(d.cacheControl)),await (0,o.I)(X,Y,new Response(d.value.body,{headers:f,status:d.value.status||200}));return}catch(b){if(b instanceof s.NoFallbackError||await v.onRequestError(a,b,{routerKind:"App Router",routePath:J,routeType:"route",revalidateReason:(0,n.getRevalidateReason)({isStaticGeneration:P,isOnDemandRevalidate:E})},!1,D),L)throw b;await (0,o.I)(X,Y,new Response(null,{status:500}));return}finally{(()=>{if(!d)return;let a=b.statusCode;d.setAttributes({"http.status_code":a,"next.rsc":!1}),a&&a>=500&&(d.setStatus({code:h.SpanStatusCode.ERROR}),d.setAttribute("error.type",a.toString()));let c=R.getRootSpanAttributes();if(!c)return;if(c.get("next.span_type")!==m.BaseServerSpan.handleRequest)return console.warn(`Unexpected root span type '${c.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let e=c.get("next.route")||J,g=`${Q} ${e}`;d.setAttributes({"next.route":e,"http.route":e,"next.span_name":g}),d.updateName(g),f&&f!==d&&(f.setAttribute("http.route",e),f.updateName(g))})()}};if(T&&S)await _(S,void 0);else{let b=R.getActiveScopeSpan();await R.withPropagatedContext(a.headers,()=>R.trace(m.BaseServerSpan.handleRequest,{spanName:`${Q} ${d}`,kind:h.SpanKind.SERVER,attributes:{"http.method":Q,"http.target":a.url}},a=>_(a,b)),void 0,!T)}}},75430:a=>{a.exports=import("@earendil-works/pi-coding-agent")},76760:a=>{a.exports=require("node:path")},77598:a=>{a.exports=require("node:crypto")},77850:(a,b,c)=>{c.d(b,{Y:()=>d});function d(a,b,c={}){var e;let f,g=JSON.stringify(b),h=Buffer.byteLength(g)>=1024,i=new Headers(c.headers);return i.set("Content-Type","application/json; charset=utf-8"),(h&&(e="Accept-Encoding",(f=i.get("Vary"))?f.split(",").some(a=>a.trim().toLowerCase()===e.toLowerCase())||i.set("Vary",`${f}, ${e}`):i.set("Vary",e)),h&&function(a,b){let c;for(let d of a.split(",")){let[a,...e]=d.trim().split(";"),f=a.trim().toLowerCase(),g=1;for(let a of e){let b=/^\s*q\s*=\s*(.*?)\s*$/i.exec(a);if(!b)continue;let c=b[1];g=/^(?:0(?:\.\d{0,3})?|1(?:\.0{0,3})?)$/.test(c)?Number(c):0}if(f===b)return g;"*"===f&&(c=g)}return c??0}(a.headers.get("Accept-Encoding")??"","gzip")>0)?(i.set("Content-Encoding","gzip"),new Response(new Blob([g]).stream().pipeThrough(new CompressionStream("gzip")),{...c,headers:i})):new Response(g,{...c,headers:i})}},79646:a=>{a.exports=require("child_process")},79748:a=>{a.exports=require("fs/promises")},81115:a=>{a.exports=require("constants")},86439:a=>{a.exports=require("next/dist/shared/lib/no-fallback-error.external")},88914:(a,b,c)=>{function d(a,b){b&&(a.tokens.input+=b.input??0,a.tokens.output+=b.output??0,a.tokens.cacheRead+=b.cacheRead??0,a.tokens.cacheWrite+=b.cacheWrite??0,a.cost+=b.cost?.total??0)}function e(a){var b;let c={userMessages:0,assistantMessages:0,toolCalls:0,toolResults:0,totalMessages:0,tokens:{input:0,output:0,cacheRead:0,cacheWrite:0,total:0},cost:0};for(let e of a){if("compaction"===e.type||"branch_summary"===e.type||"usage"===e.type){d(c,e.usage);continue}"message"===e.type&&(b=e.message,c.totalMessages+=1,"user"===b.role?c.userMessages+=1:"toolResult"===b.role?(c.toolResults+=1,d(c,b.usage)):"assistant"===b.role&&(c.assistantMessages+=1,Array.isArray(b.content)&&(c.toolCalls+=b.content.filter(a=>"toolCall"===a.type).length),d(c,b.usage)))}return c.tokens.total=c.tokens.input+c.tokens.output+c.tokens.cacheRead+c.tokens.cacheWrite,c}c.d(b,{P:()=>e})},94735:a=>{a.exports=require("events")},95337:(a,b,c)=>{c.d(b,{h:()=>e});let d="1"===process.env.PI_WEB_PERF;function e(a){if(!d)return;let b=crypto.randomUUID().slice(0,8),c=performance.now(),e=c,f=new Map;return{span(a){let b=performance.now();f.set(a,(f.get(a)??0)+(b-e)),e=b},totalMs:()=>performance.now()-c,attach(d){let e=performance.now()-c,g=[...f.entries()].map(([a,b])=>`${a};dur=${b.toFixed(1)}`).join(", ");d.headers.set("Server-Timing",g?`${g}, total;dur=${e.toFixed(1)}`:`total;dur=${e.toFixed(1)}`);let h={};for(let[a,b]of f)h[a]=Number(b.toFixed(1));return console.log(JSON.stringify({perf:!0,route:a,requestId:b,totalMs:Number(e.toFixed(1)),phases:h})),d}}}},98192:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{DELETE:()=>v,GET:()=>t,PATCH:()=>u});var e=c(23211),f=c(29021),g=c(40402),h=c(56429),i=c(14858),j=c(89691),k=c(88914),l=c(95337),m=c(45648),n=c(7048),o=c(21560),p=c(77850),q=c(21906),r=c(59506),s=a([g,h,n,q,r]);async function t(a,{params:b}){let{id:c}=await b,d=(0,l.h)("GET /api/sessions/[id]");try{let b;d?.span("resolve");let l=(0,h.A4)(c),q=new URL(a.url).searchParams,s="1"===q.get("force"),t=l?.isAlive()?l:void 0,u=!1;s&&t?.evictIfDiskAhead()&&(u=!0,t=void 0);let v=t,w=v?null:await (0,g.os)(c);if(!v&&!w)return e.NextResponse.json({error:"Session not found"},{status:404});let x=v?.inner.sessionManager??(0,g.G1)(w);d?.span("open");let y=v?.sessionFile||x.getSessionFile()||w||"",z=x.getEntries(),A=x.getLeafId(),B="summary"===q.get("tree"),C=B?(0,i.eW)((0,i.yP)(x.getTree())):(0,i.yP)(x.getTree());d?.span("tree");let D=q.has("deferThinking"),E=q.has("deferMedia"),F=Number(q.get("tail")),G=Number.isFinite(F)&&F>0?Math.min(F,1e3):50,H=(0,r.Kp)({entries:z,cwd:x.getHeader()?.cwd??"",leafId:A,models:v?.inner.modelRuntime}),I=(0,r.dt)((0,g.Uv)(z,A,{deferThinking:D,deferToolResultImages:E,tail:G,sessionId:c}),H);d?.span("context");let J=(0,j.c)(z),K=(0,k.P)(z);d?.span("stats");let L=z[z.length-1],M=(0,m.T)({filePath:y,sourceId:`${v?`runtime:${String(v.inner.sessionId)}`:"disk"}${H?"+notices":""}`,entryCount:z.length,latestEntryId:"string"==typeof L?.id?L.id:null,leafId:A??null}),N=x.getSessionName(),O=z.find(a=>"message"===a.type&&"user"===a.message.role),P=O?.type==="message"?O.message:void 0,Q=x.getHeader(),R=Q?.timestamp??new Date().toISOString();try{R=(0,f.statSync)(y).mtime.toISOString()}catch{}let S=Q?.parentSession?await (0,g.u1)(Q.parentSession):void 0,T=Q?(0,n.$u)(z,Q.id,y):null,U=(0,n.ph)(z)?.tools??(0,o.dS)(z),V=Q?(await (0,g.zH)([{path:y,id:Q.id,cwd:Q.cwd??"",name:N,created:Q.timestamp,modified:R,messageCount:K.totalMessages,firstMessage:P?(b=P.content,"string"==typeof b?b:(Array.isArray(b)?b.find(a=>"text"===a.type)?.text??"":"")||"(no messages)"):"(no messages)",parentSessionId:S,...T?{relation:{kind:"subagent",parentSessionId:T.parentSessionId,profile:T.profile,description:T.description,status:v?.isRunning()?"running":T.status}}:Q.parentSession?{relation:{kind:"fork",...S?{originSessionId:S}:{}}}:{},transient:!y||!(0,f.existsSync)(y)}]))[0]:null;return d?.attach((0,p.Y)(a,{sessionId:c,filePath:y,info:V,leafId:A,tree:C,...B?{treeFormat:"summary"}:{},snapshotRevision:M,context:I,stats:K,totalActiveMs:J,...void 0!==U?{toolNames:U}:{},...u?{wrapperRebuilt:!0}:{}}))??(0,p.Y)(a,{sessionId:c,filePath:y,info:V,leafId:A,tree:C,...B?{treeFormat:"summary"}:{},snapshotRevision:M,context:I,stats:K,totalActiveMs:J,...void 0!==U?{toolNames:U}:{},...u?{wrapperRebuilt:!0}:{}})}catch(a){return e.NextResponse.json({error:String(a)},{status:500})}}async function u(a,{params:b}){let{id:c}=await b;try{let{name:b}=await a.json();if("string"!=typeof b)return e.NextResponse.json({error:"name is required"},{status:400});let d=await (0,g.os)(c);if(!d)return e.NextResponse.json({error:"Session not found"},{status:404});return(0,g.G1)(d,{mutable:!0}).appendSessionInfo(b.trim()),(0,g.j6)(d),(0,g.mD)(),e.NextResponse.json({ok:!0})}catch(a){return e.NextResponse.json({error:String(a)},{status:500})}}async function v(a,{params:b}){let{id:c}=await b;try{let{missing:a}=await (0,q.j)([c]);if(a.length>0)return e.NextResponse.json({error:"Session not found"},{status:404});return e.NextResponse.json({ok:!0})}catch(a){return e.NextResponse.json({error:String(a)},{status:500})}}[g,h,n,q,r]=s.then?(await s)():s,d()}catch(a){d(a)}})},98995:a=>{a.exports=require("node:module")}};var b=require("../../../../webpack-runtime.js");b.C(a);var c=b.X(0,[2970,1813,426,974,5582,2498,3757,4698,2243,6429,2069,1906],()=>b(b.s=74683));module.exports=c})();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(()=>{var a={};a.id=6444,a.ids=[6444],a.modules={261:a=>{a.exports=require("next/dist/shared/lib/router/utils/app-paths")},1031:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{GET:()=>i,dynamic:()=>j});var e=c(23211),f=c(40402),g=c(47169),h=a([f]);f=(h.then?(await h)():h)[0];let j="force-dynamic";async function i(a){let b=(new URL(a.url).searchParams.get("q")??"").trim(),c={"Cache-Control":"no-store"};if(b.length>200)return e.NextResponse.json({error:"Search query exceeds 200 characters"},{status:400,headers:c});try{let d=b&&!a.signal.aborted?await (0,f.dQ)({allowStale:!0}):[];return e.NextResponse.json(await (0,g.H)(d,b,a.signal),{headers:c})}catch(a){return e.NextResponse.json({error:String(a)},{status:500,headers:c})}}d()}catch(a){d(a)}})},3295:a=>{a.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},8128:a=>{a.exports=require("next/dist/server/runtime-reacts.external.js")},10846:a=>{a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},19121:a=>{a.exports=require("next/dist/server/app-render/action-async-storage.external.js")},28354:a=>{a.exports=require("util")},29021:a=>{a.exports=require("fs")},29294:a=>{a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},33873:a=>{a.exports=require("path")},39817:(a,b,c)=>{c.r(b),c.d(b,{handler:()=>A,patchFetch:()=>z,routeModule:()=>v,serverHooks:()=>y,workAsyncStorage:()=>w,workUnitAsyncStorage:()=>x});var d=c(19225),e=c(84006),f=c(8317),g=c(99373),h=c(34775),i=c(24235),j=c(261),k=c(54365),l=c(90771),m=c(73461),n=c(67798),o=c(92280),p=c(62018),q=c(45696),r=c(47929),s=c(86439),t=c(10246),u=c(37527);let v=new d.AppRouteRouteModule({definition:{kind:e.RouteKind.APP_ROUTE,page:"/api/sessions/search/route",pathname:"/api/sessions/search",filename:"route",bundlePath:"app/api/sessions/search/route"},distDir:".next",relativeProjectDir:"",resolvedPagePath:"/home/runner/work/pi-web/pi-web/app/api/sessions/search/route.ts",nextConfigOutput:"",userland:()=>c(1031),...{}}),{workAsyncStorage:w,workUnitAsyncStorage:x,serverHooks:y}=v;function z(){return(0,f.patchFetch)({workAsyncStorage:w,workUnitAsyncStorage:x})}async function A(a,b,c){c.requestMeta&&(0,g.setRequestMeta)(a,c.requestMeta),v.isDev&&(0,g.addRequestMeta)(a,"devRequestTimingInternalsEnd",process.hrtime.bigint());let d="/api/sessions/search/route";"/index"===d&&(d="/");let f=await v.prepare(a,b,{srcPage:d,multiZoneDraftMode:!1});if(!f)return b.statusCode=400,b.end("Bad Request"),null==c.waitUntil||c.waitUntil.call(c,Promise.resolve()),null;let{buildId:w,deploymentId:x,params:y,nextConfig:z,parsedUrl:A,isDraftMode:B,prerenderManifest:C,routerServerContext:D,isOnDemandRevalidate:E,revalidateOnlyGenerated:F,resolvedPathname:G,clientReferenceManifest:H,serverActionsManifest:I}=f,J=(0,j.normalizeAppPath)(d),K=!!C.routes[G]&&(v.isDev||(0,t.isRouteCacheOwner)(G,v.cacheOwner,C.routes[G])),L=!!(C.dynamicRoutes[J]||K),M=async()=>((null==D?void 0:D.render404)?await D.render404(a,b,A,!1):b.end("This page could not be found"),null);if(L&&!B){let a=C.dynamicRoutes[J];if(a&&!1===a.fallback&&!K){if(z.adapterPath)return await M();throw new s.NoFallbackError}}let N=null;!L||v.isDev||B||(N="/index"===(N=G)?"/":N);let O=!0===v.isDev||!L,P=L&&!O;I&&H&&(0,i.setManifestsSingleton)({page:d,clientReferenceManifest:H,serverActionsManifest:I});let Q=a.method||"GET",R=(0,h.getTracer)(),S=R.getActiveScopeSpan(),T=!!(null==D?void 0:D.isWrappedByNextServer),U=!!(0,g.getRequestMeta)(a,"minimalMode"),V=(0,g.getRequestMeta)(a,"incrementalCache")||await v.getIncrementalCache(a,z,C,U);null==V||V.resetRequestCache(),globalThis.__incrementalCache=V;let W={params:y,previewProps:C.preview,renderOpts:{experimental:{authInterrupts:!!z.experimental.authInterrupts,useCacheTimeout:z.experimental.useCacheTimeout},cacheComponents:!!z.cacheComponents,validationLevel:z.experimental.instantInsights.validationLevel,isDraftMode:B,supportsDynamicResponse:O,incrementalCache:V,hmrRefreshHash:(0,g.getRequestMeta)(a,"hmrRefreshHash"),cacheLifeProfiles:z.cacheLife,staticPageGenerationTimeout:z.staticPageGenerationTimeout,waitUntil:c.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:void 0,onInstrumentationRequestError:(b,c,d,e)=>v.onRequestError(a,b,d,e,D)},sharedContext:{buildId:w,deploymentId:x}},X=new k.NodeNextRequest(a),Y=new k.NodeNextResponse(b),Z=l.NextRequestAdapter.fromNodeNextRequest(X,(0,l.signalFromNodeResponse)(b)),$=async({previousCacheEntry:e})=>{try{if(!U&&E&&F&&!e)return b.statusCode=404,b.setHeader("x-nextjs-cache","REVALIDATED"),b.end("This page could not be found"),null;let d=await v.handle(Z,W);a.fetchMetrics=W.renderOpts.fetchMetrics;let f=W.renderOpts.pendingWaitUntil;f&&c.waitUntil&&(c.waitUntil(f),f=void 0);let g=W.renderOpts.collectedTags;if(!L)return await (0,o.I)(X,Y,d,f),null;{let a=await d.blob(),b=(0,p.toNodeOutgoingHttpHeaders)(d.headers);g&&(b[r.NEXT_CACHE_TAGS_HEADER]=g),!b["content-type"]&&a.type&&(b["content-type"]=a.type);let c=void 0!==W.renderOpts.collectedRevalidate&&!(W.renderOpts.collectedRevalidate>=r.INFINITE_CACHE)&&W.renderOpts.collectedRevalidate,e=void 0===W.renderOpts.collectedExpire||W.renderOpts.collectedExpire>=r.INFINITE_CACHE?!1!==c&&c>0?z.expireTime:void 0:W.renderOpts.collectedExpire;return{value:{kind:u.CachedRouteKind.APP_ROUTE,status:d.status,body:Buffer.from(await a.arrayBuffer()),headers:b},cacheControl:{revalidate:c,expire:e}}}}catch(b){throw(null==e?void 0:e.isStale)&&await v.onRequestError(a,b,{routerKind:"App Router",routePath:d,routeType:"route",revalidateReason:(0,n.getRevalidateReason)({isStaticGeneration:P,isOnDemandRevalidate:E})},!1,D),b}},_=async(d,f)=>{try{var g,i;let d=await v.handleResponse({req:a,nextConfig:z,cacheKey:N,routeKind:e.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:C,isRoutePPREnabled:!1,isOnDemandRevalidate:E,revalidateOnlyGenerated:F,responseGenerator:$,waitUntil:c.waitUntil,isMinimalMode:U});if(!L)return;if((null==d||null==(g=d.value)?void 0:g.kind)!==u.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==d||null==(i=d.value)?void 0:i.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});U||b.setHeader("x-nextjs-cache",E?"REVALIDATED":d.isMiss?"MISS":d.isStale?"STALE":"HIT"),B&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let f=(0,p.fromNodeOutgoingHttpHeaders)(d.value.headers);U&&L||f.delete(r.NEXT_CACHE_TAGS_HEADER),!d.cacheControl||b.getHeader("Cache-Control")||f.get("Cache-Control")||f.set("Cache-Control",(0,q.getCacheControlHeader)(d.cacheControl)),await (0,o.I)(X,Y,new Response(d.value.body,{headers:f,status:d.value.status||200}));return}catch(b){if(b instanceof s.NoFallbackError||await v.onRequestError(a,b,{routerKind:"App Router",routePath:J,routeType:"route",revalidateReason:(0,n.getRevalidateReason)({isStaticGeneration:P,isOnDemandRevalidate:E})},!1,D),L)throw b;await (0,o.I)(X,Y,new Response(null,{status:500}));return}finally{(()=>{if(!d)return;let a=b.statusCode;d.setAttributes({"http.status_code":a,"next.rsc":!1}),a&&a>=500&&(d.setStatus({code:h.SpanStatusCode.ERROR}),d.setAttribute("error.type",a.toString()));let c=R.getRootSpanAttributes();if(!c)return;if(c.get("next.span_type")!==m.BaseServerSpan.handleRequest)return console.warn(`Unexpected root span type '${c.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let e=c.get("next.route")||J,g=`${Q} ${e}`;d.setAttributes({"next.route":e,"http.route":e,"next.span_name":g}),d.updateName(g),f&&f!==d&&(f.setAttribute("http.route",e),f.updateName(g))})()}};if(T&&S)await _(S,void 0);else{let b=R.getActiveScopeSpan();await R.withPropagatedContext(a.headers,()=>R.trace(m.BaseServerSpan.handleRequest,{spanName:`${Q} ${d}`,kind:h.SpanKind.SERVER,attributes:{"http.method":Q,"http.target":a.url}},a=>_(a,b)),void 0,!T)}}},44870:a=>{a.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},47169:(a,b,c)=>{c.d(b,{H:()=>f});var d=c(73024);let e=require("node:readline");async function f(a,b,c){let f={results:[],truncated:!1},g=b.trim();if(!g)return f;if(g.length>200)throw RangeError("Search query exceeds 200 characters");let h=RegExp(g.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),"i"),i=Date.now()+3e3,j=AbortSignal.timeout(3e3),k=c?AbortSignal.any([c,j]):j;for(let[b,c]of a.filter(a=>!a.transient&&a.path).sort((a,b)=>b.modified.localeCompare(a.modified)).entries()){if(b>=500||f.results.length>=30||k.aborted||Date.now()>=i){f.truncated=!0;break}let a=(0,d.createReadStream)(c.path,{encoding:"utf8",end:0xffffff,signal:k}),g=(0,e.createInterface)({input:a,crlfDelay:1/0}),j=!1;try{for await(let a of g){let b;if(k.aborted||Date.now()>=i){f.truncated=!0;break}if(a.length>1048576){f.truncated=!0;continue}try{b=JSON.parse(a)}catch{continue}if(b?.type!=="message"||!["user","assistant"].includes(b.message?.role))continue;let d=b.message.content,e=("string"==typeof d?[{type:"text",text:d}]:Array.isArray(d)?d:[]).flatMap((a,b)=>a?.type==="text"&&"string"==typeof a.text?[{text:a.text,blockIndex:b}]:[]),g=e.map(a=>a.text).join("\n"),l=h.exec(g);if(!l)continue;let m=l.index,n=m+l[0].length,o=0,p=e.find(a=>{let b=o+a.text.length;return o=b+1,m<=b});f.results.push({session:c,..."string"==typeof b.id?{entryId:b.id}:{},blockIndex:p.blockIndex,before:(m>80?"...":"")+g.slice(Math.max(0,m-80),m).replace(/\s+/g," ").trimStart(),match:l[0].replace(/\s+/g," "),after:g.slice(n,n+80).replace(/\s+/g," ").trimEnd()+(n+80<g.length?"...":"")}),j=!0;break}}catch{f.truncated=!0}finally{g.close(),a.destroy()}!j&&a.bytesRead>=0x1000000&&(f.truncated=!0)}return f}},51455:a=>{a.exports=require("node:fs/promises")},55511:a=>{a.exports=require("crypto")},63033:a=>{a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},73024:a=>{a.exports=require("node:fs")},75430:a=>{a.exports=import("@earendil-works/pi-coding-agent")},76760:a=>{a.exports=require("node:path")},77598:a=>{a.exports=require("node:crypto")},79646:a=>{a.exports=require("child_process")},79748:a=>{a.exports=require("fs/promises")},86439:a=>{a.exports=require("next/dist/shared/lib/no-fallback-error.external")}};var b=require("../../../../webpack-runtime.js");b.C(a);var c=b.X(0,[2970,1813,426,5582],()=>b(b.s=39817));module.exports=c})();
|
|
1
|
+
"use strict";(()=>{var a={};a.id=6444,a.ids=[6444],a.modules={261:a=>{a.exports=require("next/dist/shared/lib/router/utils/app-paths")},1031:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{GET:()=>i,dynamic:()=>j});var e=c(23211),f=c(40402),g=c(47169),h=a([f]);f=(h.then?(await h)():h)[0];let j="force-dynamic";async function i(a){let b=(new URL(a.url).searchParams.get("q")??"").trim(),c={"Cache-Control":"no-store"};if(b.length>200)return e.NextResponse.json({error:"Search query exceeds 200 characters"},{status:400,headers:c});try{let d=b&&!a.signal.aborted?await (0,f.dQ)({allowStale:!0}):[];return e.NextResponse.json(await (0,g.H)(d,b,a.signal),{headers:c})}catch(a){return e.NextResponse.json({error:String(a)},{status:500,headers:c})}}d()}catch(a){d(a)}})},3295:a=>{a.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},8128:a=>{a.exports=require("next/dist/server/runtime-reacts.external.js")},10846:a=>{a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},19121:a=>{a.exports=require("next/dist/server/app-render/action-async-storage.external.js")},28354:a=>{a.exports=require("util")},29021:a=>{a.exports=require("fs")},29294:a=>{a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},33873:a=>{a.exports=require("path")},39817:(a,b,c)=>{c.r(b),c.d(b,{handler:()=>A,patchFetch:()=>z,routeModule:()=>v,serverHooks:()=>y,workAsyncStorage:()=>w,workUnitAsyncStorage:()=>x});var d=c(19225),e=c(84006),f=c(8317),g=c(99373),h=c(34775),i=c(24235),j=c(261),k=c(54365),l=c(90771),m=c(73461),n=c(67798),o=c(92280),p=c(62018),q=c(45696),r=c(47929),s=c(86439),t=c(10246),u=c(37527);let v=new d.AppRouteRouteModule({definition:{kind:e.RouteKind.APP_ROUTE,page:"/api/sessions/search/route",pathname:"/api/sessions/search",filename:"route",bundlePath:"app/api/sessions/search/route"},distDir:".next",relativeProjectDir:"",resolvedPagePath:"/home/runner/work/pi-web/pi-web/app/api/sessions/search/route.ts",nextConfigOutput:"",userland:()=>c(1031),...{}}),{workAsyncStorage:w,workUnitAsyncStorage:x,serverHooks:y}=v;function z(){return(0,f.patchFetch)({workAsyncStorage:w,workUnitAsyncStorage:x})}async function A(a,b,c){c.requestMeta&&(0,g.setRequestMeta)(a,c.requestMeta),v.isDev&&(0,g.addRequestMeta)(a,"devRequestTimingInternalsEnd",process.hrtime.bigint());let d="/api/sessions/search/route";"/index"===d&&(d="/");let f=await v.prepare(a,b,{srcPage:d,multiZoneDraftMode:!1});if(!f)return b.statusCode=400,b.end("Bad Request"),null==c.waitUntil||c.waitUntil.call(c,Promise.resolve()),null;let{buildId:w,deploymentId:x,params:y,nextConfig:z,parsedUrl:A,isDraftMode:B,prerenderManifest:C,routerServerContext:D,isOnDemandRevalidate:E,revalidateOnlyGenerated:F,resolvedPathname:G,clientReferenceManifest:H,serverActionsManifest:I}=f,J=(0,j.normalizeAppPath)(d),K=!!C.routes[G]&&(v.isDev||(0,t.isRouteCacheOwner)(G,v.cacheOwner,C.routes[G])),L=!!(C.dynamicRoutes[J]||K),M=async()=>((null==D?void 0:D.render404)?await D.render404(a,b,A,!1):b.end("This page could not be found"),null);if(L&&!B){let a=C.dynamicRoutes[J];if(a&&!1===a.fallback&&!K){if(z.adapterPath)return await M();throw new s.NoFallbackError}}let N=null;!L||v.isDev||B||(N="/index"===(N=G)?"/":N);let O=!0===v.isDev||!L,P=L&&!O;I&&H&&(0,i.setManifestsSingleton)({page:d,clientReferenceManifest:H,serverActionsManifest:I});let Q=a.method||"GET",R=(0,h.getTracer)(),S=R.getActiveScopeSpan(),T=!!(null==D?void 0:D.isWrappedByNextServer),U=!!(0,g.getRequestMeta)(a,"minimalMode"),V=(0,g.getRequestMeta)(a,"incrementalCache")||await v.getIncrementalCache(a,z,C,U);null==V||V.resetRequestCache(),globalThis.__incrementalCache=V;let W={params:y,previewProps:C.preview,renderOpts:{experimental:{authInterrupts:!!z.experimental.authInterrupts,useCacheTimeout:z.experimental.useCacheTimeout},cacheComponents:!!z.cacheComponents,validationLevel:z.experimental.instantInsights.validationLevel,isDraftMode:B,supportsDynamicResponse:O,incrementalCache:V,hmrRefreshHash:(0,g.getRequestMeta)(a,"hmrRefreshHash"),cacheLifeProfiles:z.cacheLife,staticPageGenerationTimeout:z.staticPageGenerationTimeout,waitUntil:c.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:void 0,onInstrumentationRequestError:(b,c,d,e)=>v.onRequestError(a,b,d,e,D)},sharedContext:{buildId:w,deploymentId:x}},X=new k.NodeNextRequest(a),Y=new k.NodeNextResponse(b),Z=l.NextRequestAdapter.fromNodeNextRequest(X,(0,l.signalFromNodeResponse)(b)),$=async({previousCacheEntry:e})=>{try{if(!U&&E&&F&&!e)return b.statusCode=404,b.setHeader("x-nextjs-cache","REVALIDATED"),b.end("This page could not be found"),null;let d=await v.handle(Z,W);a.fetchMetrics=W.renderOpts.fetchMetrics;let f=W.renderOpts.pendingWaitUntil;f&&c.waitUntil&&(c.waitUntil(f),f=void 0);let g=W.renderOpts.collectedTags;if(!L)return await (0,o.I)(X,Y,d,f),null;{let a=await d.blob(),b=(0,p.toNodeOutgoingHttpHeaders)(d.headers);g&&(b[r.NEXT_CACHE_TAGS_HEADER]=g),!b["content-type"]&&a.type&&(b["content-type"]=a.type);let c=void 0!==W.renderOpts.collectedRevalidate&&!(W.renderOpts.collectedRevalidate>=r.INFINITE_CACHE)&&W.renderOpts.collectedRevalidate,e=void 0===W.renderOpts.collectedExpire||W.renderOpts.collectedExpire>=r.INFINITE_CACHE?!1!==c&&c>0?z.expireTime:void 0:W.renderOpts.collectedExpire;return{value:{kind:u.CachedRouteKind.APP_ROUTE,status:d.status,body:Buffer.from(await a.arrayBuffer()),headers:b},cacheControl:{revalidate:c,expire:e}}}}catch(b){throw(null==e?void 0:e.isStale)&&await v.onRequestError(a,b,{routerKind:"App Router",routePath:d,routeType:"route",revalidateReason:(0,n.getRevalidateReason)({isStaticGeneration:P,isOnDemandRevalidate:E})},!1,D),b}},_=async(d,f)=>{try{var g,i;let d=await v.handleResponse({req:a,nextConfig:z,cacheKey:N,routeKind:e.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:C,isRoutePPREnabled:!1,isOnDemandRevalidate:E,revalidateOnlyGenerated:F,responseGenerator:$,waitUntil:c.waitUntil,isMinimalMode:U});if(!L)return;if((null==d||null==(g=d.value)?void 0:g.kind)!==u.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==d||null==(i=d.value)?void 0:i.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});U||b.setHeader("x-nextjs-cache",E?"REVALIDATED":d.isMiss?"MISS":d.isStale?"STALE":"HIT"),B&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let f=(0,p.fromNodeOutgoingHttpHeaders)(d.value.headers);U&&L||f.delete(r.NEXT_CACHE_TAGS_HEADER),!d.cacheControl||b.getHeader("Cache-Control")||f.get("Cache-Control")||f.set("Cache-Control",(0,q.getCacheControlHeader)(d.cacheControl)),await (0,o.I)(X,Y,new Response(d.value.body,{headers:f,status:d.value.status||200}));return}catch(b){if(b instanceof s.NoFallbackError||await v.onRequestError(a,b,{routerKind:"App Router",routePath:J,routeType:"route",revalidateReason:(0,n.getRevalidateReason)({isStaticGeneration:P,isOnDemandRevalidate:E})},!1,D),L)throw b;await (0,o.I)(X,Y,new Response(null,{status:500}));return}finally{(()=>{if(!d)return;let a=b.statusCode;d.setAttributes({"http.status_code":a,"next.rsc":!1}),a&&a>=500&&(d.setStatus({code:h.SpanStatusCode.ERROR}),d.setAttribute("error.type",a.toString()));let c=R.getRootSpanAttributes();if(!c)return;if(c.get("next.span_type")!==m.BaseServerSpan.handleRequest)return console.warn(`Unexpected root span type '${c.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let e=c.get("next.route")||J,g=`${Q} ${e}`;d.setAttributes({"next.route":e,"http.route":e,"next.span_name":g}),d.updateName(g),f&&f!==d&&(f.setAttribute("http.route",e),f.updateName(g))})()}};if(T&&S)await _(S,void 0);else{let b=R.getActiveScopeSpan();await R.withPropagatedContext(a.headers,()=>R.trace(m.BaseServerSpan.handleRequest,{spanName:`${Q} ${d}`,kind:h.SpanKind.SERVER,attributes:{"http.method":Q,"http.target":a.url}},a=>_(a,b)),void 0,!T)}}},44870:a=>{a.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},47169:(a,b,c)=>{c.d(b,{H:()=>f});var d=c(73024);let e=require("node:readline");async function f(a,b,c){let f={results:[],truncated:!1},g=b.trim();if(!g)return f;if(g.length>200)throw RangeError("Search query exceeds 200 characters");let h=RegExp(g.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),"i"),i=Date.now()+3e3,j=AbortSignal.timeout(3e3),k=c?AbortSignal.any([c,j]):j;for(let[b,c]of a.filter(a=>!a.transient&&a.path).sort((a,b)=>b.modified.localeCompare(a.modified)).entries()){if(b>=500||f.results.length>=30||k.aborted||Date.now()>=i){f.truncated=!0;break}let a=(0,d.createReadStream)(c.path,{encoding:"utf8",end:0xffffff,signal:k}),g=(0,e.createInterface)({input:a,crlfDelay:1/0}),j=!1;try{for await(let a of g){let b;if(k.aborted||Date.now()>=i){f.truncated=!0;break}if(a.length>1048576){f.truncated=!0;continue}try{b=JSON.parse(a)}catch{continue}if(b?.type!=="message"||!["user","assistant"].includes(b.message?.role))continue;let d=b.message.content,e=("string"==typeof d?[{type:"text",text:d}]:Array.isArray(d)?d:[]).flatMap((a,b)=>a?.type==="text"&&"string"==typeof a.text?[{text:a.text,blockIndex:b}]:[]),g=e.map(a=>a.text).join("\n"),l=h.exec(g);if(!l)continue;let m=l.index,n=m+l[0].length,o=0,p=e.find(a=>{let b=o+a.text.length;return o=b+1,m<=b});f.results.push({session:c,..."string"==typeof b.id?{entryId:b.id}:{},blockIndex:p.blockIndex,before:(m>80?"...":"")+g.slice(Math.max(0,m-80),m).replace(/\s+/g," ").trimStart(),match:l[0].replace(/\s+/g," "),after:g.slice(n,n+80).replace(/\s+/g," ").trimEnd()+(n+80<g.length?"...":"")}),j=!0;break}}catch{f.truncated=!0}finally{g.close(),a.destroy()}if(!j&&a.bytesRead>=0x1000000&&(f.truncated=!0),!j&&!k.aborted&&Date.now()<i){let a=c.name||c.firstMessage||"",b=h.exec(a);b&&f.results.push({session:c,blockIndex:0,titleMatch:!0,before:a.slice(0,b.index),match:b[0],after:a.slice(b.index+b[0].length)})}}return f}},51455:a=>{a.exports=require("node:fs/promises")},55511:a=>{a.exports=require("crypto")},63033:a=>{a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},73024:a=>{a.exports=require("node:fs")},75430:a=>{a.exports=import("@earendil-works/pi-coding-agent")},76760:a=>{a.exports=require("node:path")},77598:a=>{a.exports=require("node:crypto")},79646:a=>{a.exports=require("child_process")},79748:a=>{a.exports=require("fs/promises")},86439:a=>{a.exports=require("next/dist/shared/lib/no-fallback-error.external")}};var b=require("../../../../webpack-runtime.js");b.C(a);var c=b.X(0,[2970,1813,426,5582],()=>b(b.s=39817));module.exports=c})();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(()=>{var a={};a.id=6945,a.ids=[6945],a.modules={261:a=>{a.exports=require("next/dist/shared/lib/router/utils/app-paths")},3295:a=>{a.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},6623:(a,b,c)=>{c.r(b),c.d(b,{handler:()=>A,patchFetch:()=>z,routeModule:()=>v,serverHooks:()=>y,workAsyncStorage:()=>w,workUnitAsyncStorage:()=>x});var d=c(19225),e=c(84006),f=c(8317),g=c(99373),h=c(34775),i=c(24235),j=c(261),k=c(54365),l=c(90771),m=c(73461),n=c(67798),o=c(92280),p=c(62018),q=c(45696),r=c(47929),s=c(86439),t=c(10246),u=c(37527);let v=new d.AppRouteRouteModule({definition:{kind:e.RouteKind.APP_ROUTE,page:"/api/sessions/stats/route",pathname:"/api/sessions/stats",filename:"route",bundlePath:"app/api/sessions/stats/route"},distDir:".next",relativeProjectDir:"",resolvedPagePath:"/home/runner/work/pi-web/pi-web/app/api/sessions/stats/route.ts",nextConfigOutput:"",userland:()=>c(93752),...{}}),{workAsyncStorage:w,workUnitAsyncStorage:x,serverHooks:y}=v;function z(){return(0,f.patchFetch)({workAsyncStorage:w,workUnitAsyncStorage:x})}async function A(a,b,c){c.requestMeta&&(0,g.setRequestMeta)(a,c.requestMeta),v.isDev&&(0,g.addRequestMeta)(a,"devRequestTimingInternalsEnd",process.hrtime.bigint());let d="/api/sessions/stats/route";"/index"===d&&(d="/");let f=await v.prepare(a,b,{srcPage:d,multiZoneDraftMode:!1});if(!f)return b.statusCode=400,b.end("Bad Request"),null==c.waitUntil||c.waitUntil.call(c,Promise.resolve()),null;let{buildId:w,deploymentId:x,params:y,nextConfig:z,parsedUrl:A,isDraftMode:B,prerenderManifest:C,routerServerContext:D,isOnDemandRevalidate:E,revalidateOnlyGenerated:F,resolvedPathname:G,clientReferenceManifest:H,serverActionsManifest:I}=f,J=(0,j.normalizeAppPath)(d),K=!!C.routes[G]&&(v.isDev||(0,t.isRouteCacheOwner)(G,v.cacheOwner,C.routes[G])),L=!!(C.dynamicRoutes[J]||K),M=async()=>((null==D?void 0:D.render404)?await D.render404(a,b,A,!1):b.end("This page could not be found"),null);if(L&&!B){let a=C.dynamicRoutes[J];if(a&&!1===a.fallback&&!K){if(z.adapterPath)return await M();throw new s.NoFallbackError}}let N=null;!L||v.isDev||B||(N="/index"===(N=G)?"/":N);let O=!0===v.isDev||!L,P=L&&!O;I&&H&&(0,i.setManifestsSingleton)({page:d,clientReferenceManifest:H,serverActionsManifest:I});let Q=a.method||"GET",R=(0,h.getTracer)(),S=R.getActiveScopeSpan(),T=!!(null==D?void 0:D.isWrappedByNextServer),U=!!(0,g.getRequestMeta)(a,"minimalMode"),V=(0,g.getRequestMeta)(a,"incrementalCache")||await v.getIncrementalCache(a,z,C,U);null==V||V.resetRequestCache(),globalThis.__incrementalCache=V;let W={params:y,previewProps:C.preview,renderOpts:{experimental:{authInterrupts:!!z.experimental.authInterrupts,useCacheTimeout:z.experimental.useCacheTimeout},cacheComponents:!!z.cacheComponents,validationLevel:z.experimental.instantInsights.validationLevel,isDraftMode:B,supportsDynamicResponse:O,incrementalCache:V,hmrRefreshHash:(0,g.getRequestMeta)(a,"hmrRefreshHash"),cacheLifeProfiles:z.cacheLife,staticPageGenerationTimeout:z.staticPageGenerationTimeout,waitUntil:c.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:void 0,onInstrumentationRequestError:(b,c,d,e)=>v.onRequestError(a,b,d,e,D)},sharedContext:{buildId:w,deploymentId:x}},X=new k.NodeNextRequest(a),Y=new k.NodeNextResponse(b),Z=l.NextRequestAdapter.fromNodeNextRequest(X,(0,l.signalFromNodeResponse)(b)),$=async({previousCacheEntry:e})=>{try{if(!U&&E&&F&&!e)return b.statusCode=404,b.setHeader("x-nextjs-cache","REVALIDATED"),b.end("This page could not be found"),null;let d=await v.handle(Z,W);a.fetchMetrics=W.renderOpts.fetchMetrics;let f=W.renderOpts.pendingWaitUntil;f&&c.waitUntil&&(c.waitUntil(f),f=void 0);let g=W.renderOpts.collectedTags;if(!L)return await (0,o.I)(X,Y,d,f),null;{let a=await d.blob(),b=(0,p.toNodeOutgoingHttpHeaders)(d.headers);g&&(b[r.NEXT_CACHE_TAGS_HEADER]=g),!b["content-type"]&&a.type&&(b["content-type"]=a.type);let c=void 0!==W.renderOpts.collectedRevalidate&&!(W.renderOpts.collectedRevalidate>=r.INFINITE_CACHE)&&W.renderOpts.collectedRevalidate,e=void 0===W.renderOpts.collectedExpire||W.renderOpts.collectedExpire>=r.INFINITE_CACHE?!1!==c&&c>0?z.expireTime:void 0:W.renderOpts.collectedExpire;return{value:{kind:u.CachedRouteKind.APP_ROUTE,status:d.status,body:Buffer.from(await a.arrayBuffer()),headers:b},cacheControl:{revalidate:c,expire:e}}}}catch(b){throw(null==e?void 0:e.isStale)&&await v.onRequestError(a,b,{routerKind:"App Router",routePath:d,routeType:"route",revalidateReason:(0,n.getRevalidateReason)({isStaticGeneration:P,isOnDemandRevalidate:E})},!1,D),b}},_=async(d,f)=>{try{var g,i;let d=await v.handleResponse({req:a,nextConfig:z,cacheKey:N,routeKind:e.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:C,isRoutePPREnabled:!1,isOnDemandRevalidate:E,revalidateOnlyGenerated:F,responseGenerator:$,waitUntil:c.waitUntil,isMinimalMode:U});if(!L)return;if((null==d||null==(g=d.value)?void 0:g.kind)!==u.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==d||null==(i=d.value)?void 0:i.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});U||b.setHeader("x-nextjs-cache",E?"REVALIDATED":d.isMiss?"MISS":d.isStale?"STALE":"HIT"),B&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let f=(0,p.fromNodeOutgoingHttpHeaders)(d.value.headers);U&&L||f.delete(r.NEXT_CACHE_TAGS_HEADER),!d.cacheControl||b.getHeader("Cache-Control")||f.get("Cache-Control")||f.set("Cache-Control",(0,q.getCacheControlHeader)(d.cacheControl)),await (0,o.I)(X,Y,new Response(d.value.body,{headers:f,status:d.value.status||200}));return}catch(b){if(b instanceof s.NoFallbackError||await v.onRequestError(a,b,{routerKind:"App Router",routePath:J,routeType:"route",revalidateReason:(0,n.getRevalidateReason)({isStaticGeneration:P,isOnDemandRevalidate:E})},!1,D),L)throw b;await (0,o.I)(X,Y,new Response(null,{status:500}));return}finally{(()=>{if(!d)return;let a=b.statusCode;d.setAttributes({"http.status_code":a,"next.rsc":!1}),a&&a>=500&&(d.setStatus({code:h.SpanStatusCode.ERROR}),d.setAttribute("error.type",a.toString()));let c=R.getRootSpanAttributes();if(!c)return;if(c.get("next.span_type")!==m.BaseServerSpan.handleRequest)return console.warn(`Unexpected root span type '${c.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let e=c.get("next.route")||J,g=`${Q} ${e}`;d.setAttributes({"next.route":e,"http.route":e,"next.span_name":g}),d.updateName(g),f&&f!==d&&(f.setAttribute("http.route",e),f.updateName(g))})()}};if(T&&S)await _(S,void 0);else{let b=R.getActiveScopeSpan();await R.withPropagatedContext(a.headers,()=>R.trace(m.BaseServerSpan.handleRequest,{spanName:`${Q} ${d}`,kind:h.SpanKind.SERVER,attributes:{"http.method":Q,"http.target":a.url}},a=>_(a,b)),void 0,!T)}}},8128:a=>{a.exports=require("next/dist/server/runtime-reacts.external.js")},10846:a=>{a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},12412:a=>{a.exports=require("assert")},19121:a=>{a.exports=require("next/dist/server/app-render/action-async-storage.external.js")},27910:a=>{a.exports=require("stream")},28354:a=>{a.exports=require("util")},28802:a=>{a.exports=import("@earendil-works/pi-ai")},29021:a=>{a.exports=require("fs")},29294:a=>{a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},29862:a=>{a.exports=import("@earendil-works/pi-tui")},33873:a=>{a.exports=require("path")},44870:a=>{a.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},48161:a=>{a.exports=require("node:os")},51181:a=>{a.exports=require("web-push")},51455:a=>{a.exports=require("node:fs/promises")},55511:a=>{a.exports=require("crypto")},63033:a=>{a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},66544:(a,b,c)=>{c.d(b,{E2:()=>k,EN:()=>j});var d=c(77030);function e(a){return(a.startsWith("[")&&a.endsWith("]")?a.slice(1,-1):a).toLowerCase().replace(/\.$/,"")}function f(a){if(!a||/[\s/@\\]/.test(a))return null;try{let b=new URL(`http://${a}`);if(b.username||b.password||"/"!==b.pathname||b.search||b.hash)return null;return e(b.hostname)}catch{return null}}function g(a){if(!a||/[\s/@\\]/.test(a))return null;try{let b=new URL(`http://${a}`);if(b.username||b.password||"/"!==b.pathname||b.search||b.hash)return null;let c=e(b.hostname);return b.port?`${c}:${b.port}`:c}catch{return null}}function h(){return[process.env.PI_WEB_HOSTNAME,...process.env.PI_WEB_ALLOWED_HOSTS?.split(",")??[]].filter(a=>!!a?.trim())}function i(a){try{return new URL(a).origin}catch{return null}}function j(a,b=h()){return!!function(a,b=h()){let c=a.headers.get("host"),g=c?f(c):null;return!!g&&(!!("localhost"===g||g.endsWith(".localhost")||(0,d.isIP)(g))||b.some(a=>{let b;return((b=a?.trim())?(0,d.isIP)(b)?e(b):f(b):null)===g}))}(a,b)&&(!!function(a){if("GET"!==a.method||"navigate"!==a.headers.get("sec-fetch-mode")||"document"!==a.headers.get("sec-fetch-dest")||"?1"!==a.headers.get("sec-fetch-user"))return!1;try{let b=new URL(a.url);return/^\/api\/sessions\/[^/]+\/export$/.test(b.pathname)||function(a){if(!a.pathname.startsWith("/api/files/")||"read"!==a.searchParams.get("type"))return!1;let b=a.pathname.slice(a.pathname.lastIndexOf("/")+1);try{return decodeURIComponent(b).toLowerCase().endsWith(".pdf")}catch{return!1}}(b)}catch{return!1}}(a)||!(a.headers.has("origin")||a.headers.has("sec-fetch-site"))||function(a){let b,c,d,e=a.headers.get("origin");if("cross-site"===a.headers.get("sec-fetch-site"))return!1;if(!e)return!0;let f=(b=new URL(a.url),(c=a.headers.get("host"))?i(`${b.protocol}//${c}`):null);if(null!==f&&i(e)===f)return!0;if("same-origin"!==a.headers.get("sec-fetch-site")||!a.headers.get("x-forwarded-proto"))return!1;let h=a.headers.get("host");if(!h)return!1;try{d=new URL(e).host}catch{return!1}let j=g(d);return null!==j&&j===g(h)}(a))}function k(a){let b=a.headers.get("content-type")?.split(";",1)[0]?.trim().toLowerCase();return"application/json"===b||!!(b?.startsWith("application/")&&b.endsWith("+json"))}},73024:a=>{a.exports=require("node:fs")},73136:a=>{a.exports=require("node:url")},75430:a=>{a.exports=import("@earendil-works/pi-coding-agent")},76760:a=>{a.exports=require("node:path")},77030:a=>{a.exports=require("node:net")},77598:a=>{a.exports=require("node:crypto")},79646:a=>{a.exports=require("child_process")},79748:a=>{a.exports=require("fs/promises")},81115:a=>{a.exports=require("constants")},86439:a=>{a.exports=require("next/dist/shared/lib/no-fallback-error.external")},88914:(a,b,c)=>{function d(a,b){b&&(a.tokens.input+=b.input??0,a.tokens.output+=b.output??0,a.tokens.cacheRead+=b.cacheRead??0,a.tokens.cacheWrite+=b.cacheWrite??0,a.cost+=b.cost?.total??0)}function e(a){var b;let c={userMessages:0,assistantMessages:0,toolCalls:0,toolResults:0,totalMessages:0,tokens:{input:0,output:0,cacheRead:0,cacheWrite:0,total:0},cost:0};for(let e of a){if("compaction"===e.type||"branch_summary"===e.type||"usage"===e.type){d(c,e.usage);continue}"message"===e.type&&(b=e.message,c.totalMessages+=1,"user"===b.role?c.userMessages+=1:"toolResult"===b.role?(c.toolResults+=1,d(c,b.usage)):"assistant"===b.role&&(c.assistantMessages+=1,Array.isArray(b.content)&&(c.toolCalls+=b.content.filter(a=>"toolCall"===a.type).length),d(c,b.usage)))}return c.tokens.total=c.tokens.input+c.tokens.output+c.tokens.cacheRead+c.tokens.cacheWrite,c}c.d(b,{P:()=>e})},89691:(a,b,c)=>{function d(a){let b,c=0;for(let e of a){var d;if("message"!==(d=e.type)&&"compaction"!==d&&"branch_summary"!==d&&"custom_message"!==d)continue;let a=Date.parse(e.timestamp);if(!Number.isFinite(a))continue;let f="message"===e.type?e.message?.role:void 0;if("user"===f||"bashExecution"===f){b=a;continue}void 0!==b&&a>b&&(c+=a-b),b=a}return c}c.d(b,{c:()=>d})},93752:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{POST:()=>o,dynamic:()=>p});var e=c(23211),f=c(66544),g=c(56429),h=c(40402),i=c(88914),j=c(89691),k=c(12069),l=a([g,h]);[g,h]=l.then?(await l)():l;let p="force-dynamic",q={"Cache-Control":"no-store"},r=new WeakMap;function m(a,b){return e.NextResponse.json({error:b},{status:a,headers:q})}async function n(a){let b,c=(0,g.A4)(a);if(c?.isAlive())b=c.inner.sessionManager;else{let c=await (0,h.os)(a);if(!c)return null;b=(0,h.G1)(c)}let d=b.getEntries(),e=d[d.length-1]?.id,f=r.get(b);if(f&&f.entryCount===d.length&&f.lastEntryId===e)return f.summary;let k=(0,i.P)(d),l={tokens:k.tokens,cost:k.cost,toolCalls:k.toolCalls,totalActiveMs:(0,j.c)(d)};return r.set(b,{entryCount:d.length,lastEntryId:e,summary:l}),l}async function o(a){let b;if(!(0,f.EN)(a))return m(403,"Untrusted API request");if(!(0,f.E2)(a))return m(415,"Content-Type must be application/json");try{b=await a.json()}catch{return m(400,"Invalid JSON body")}let c="object"!=typeof b||null===b||Array.isArray(b)?void 0:b.ids;if(!Array.isArray(c)||0===c.length)return m(400,"ids must be a non-empty array");if(c.length>200)return m(400,"ids may hold at most 200 session ids");if(!c.every(a=>"string"==typeof a&&k.Id.test(a)))return m(400,"ids must be session ids");let d={};for(let a of new Set(c))try{let b=await n(a);b&&(d[a]=b)}catch{}return e.NextResponse.json({stats:d},{headers:q})}d()}catch(a){d(a)}})},94735:a=>{a.exports=require("events")},98995:a=>{a.exports=require("node:module")}};var b=require("../../../../webpack-runtime.js");b.C(a);var c=b.X(0,[2970,1813,426,974,5582,2498,3757,4698,2243,6429,2069],()=>b(b.s=6623));module.exports=c})();
|
|
1
|
+
"use strict";(()=>{var a={};a.id=6945,a.ids=[6945],a.modules={261:a=>{a.exports=require("next/dist/shared/lib/router/utils/app-paths")},3295:a=>{a.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},6623:(a,b,c)=>{c.r(b),c.d(b,{handler:()=>A,patchFetch:()=>z,routeModule:()=>v,serverHooks:()=>y,workAsyncStorage:()=>w,workUnitAsyncStorage:()=>x});var d=c(19225),e=c(84006),f=c(8317),g=c(99373),h=c(34775),i=c(24235),j=c(261),k=c(54365),l=c(90771),m=c(73461),n=c(67798),o=c(92280),p=c(62018),q=c(45696),r=c(47929),s=c(86439),t=c(10246),u=c(37527);let v=new d.AppRouteRouteModule({definition:{kind:e.RouteKind.APP_ROUTE,page:"/api/sessions/stats/route",pathname:"/api/sessions/stats",filename:"route",bundlePath:"app/api/sessions/stats/route"},distDir:".next",relativeProjectDir:"",resolvedPagePath:"/home/runner/work/pi-web/pi-web/app/api/sessions/stats/route.ts",nextConfigOutput:"",userland:()=>c(93752),...{}}),{workAsyncStorage:w,workUnitAsyncStorage:x,serverHooks:y}=v;function z(){return(0,f.patchFetch)({workAsyncStorage:w,workUnitAsyncStorage:x})}async function A(a,b,c){c.requestMeta&&(0,g.setRequestMeta)(a,c.requestMeta),v.isDev&&(0,g.addRequestMeta)(a,"devRequestTimingInternalsEnd",process.hrtime.bigint());let d="/api/sessions/stats/route";"/index"===d&&(d="/");let f=await v.prepare(a,b,{srcPage:d,multiZoneDraftMode:!1});if(!f)return b.statusCode=400,b.end("Bad Request"),null==c.waitUntil||c.waitUntil.call(c,Promise.resolve()),null;let{buildId:w,deploymentId:x,params:y,nextConfig:z,parsedUrl:A,isDraftMode:B,prerenderManifest:C,routerServerContext:D,isOnDemandRevalidate:E,revalidateOnlyGenerated:F,resolvedPathname:G,clientReferenceManifest:H,serverActionsManifest:I}=f,J=(0,j.normalizeAppPath)(d),K=!!C.routes[G]&&(v.isDev||(0,t.isRouteCacheOwner)(G,v.cacheOwner,C.routes[G])),L=!!(C.dynamicRoutes[J]||K),M=async()=>((null==D?void 0:D.render404)?await D.render404(a,b,A,!1):b.end("This page could not be found"),null);if(L&&!B){let a=C.dynamicRoutes[J];if(a&&!1===a.fallback&&!K){if(z.adapterPath)return await M();throw new s.NoFallbackError}}let N=null;!L||v.isDev||B||(N="/index"===(N=G)?"/":N);let O=!0===v.isDev||!L,P=L&&!O;I&&H&&(0,i.setManifestsSingleton)({page:d,clientReferenceManifest:H,serverActionsManifest:I});let Q=a.method||"GET",R=(0,h.getTracer)(),S=R.getActiveScopeSpan(),T=!!(null==D?void 0:D.isWrappedByNextServer),U=!!(0,g.getRequestMeta)(a,"minimalMode"),V=(0,g.getRequestMeta)(a,"incrementalCache")||await v.getIncrementalCache(a,z,C,U);null==V||V.resetRequestCache(),globalThis.__incrementalCache=V;let W={params:y,previewProps:C.preview,renderOpts:{experimental:{authInterrupts:!!z.experimental.authInterrupts,useCacheTimeout:z.experimental.useCacheTimeout},cacheComponents:!!z.cacheComponents,validationLevel:z.experimental.instantInsights.validationLevel,isDraftMode:B,supportsDynamicResponse:O,incrementalCache:V,hmrRefreshHash:(0,g.getRequestMeta)(a,"hmrRefreshHash"),cacheLifeProfiles:z.cacheLife,staticPageGenerationTimeout:z.staticPageGenerationTimeout,waitUntil:c.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:void 0,onInstrumentationRequestError:(b,c,d,e)=>v.onRequestError(a,b,d,e,D)},sharedContext:{buildId:w,deploymentId:x}},X=new k.NodeNextRequest(a),Y=new k.NodeNextResponse(b),Z=l.NextRequestAdapter.fromNodeNextRequest(X,(0,l.signalFromNodeResponse)(b)),$=async({previousCacheEntry:e})=>{try{if(!U&&E&&F&&!e)return b.statusCode=404,b.setHeader("x-nextjs-cache","REVALIDATED"),b.end("This page could not be found"),null;let d=await v.handle(Z,W);a.fetchMetrics=W.renderOpts.fetchMetrics;let f=W.renderOpts.pendingWaitUntil;f&&c.waitUntil&&(c.waitUntil(f),f=void 0);let g=W.renderOpts.collectedTags;if(!L)return await (0,o.I)(X,Y,d,f),null;{let a=await d.blob(),b=(0,p.toNodeOutgoingHttpHeaders)(d.headers);g&&(b[r.NEXT_CACHE_TAGS_HEADER]=g),!b["content-type"]&&a.type&&(b["content-type"]=a.type);let c=void 0!==W.renderOpts.collectedRevalidate&&!(W.renderOpts.collectedRevalidate>=r.INFINITE_CACHE)&&W.renderOpts.collectedRevalidate,e=void 0===W.renderOpts.collectedExpire||W.renderOpts.collectedExpire>=r.INFINITE_CACHE?!1!==c&&c>0?z.expireTime:void 0:W.renderOpts.collectedExpire;return{value:{kind:u.CachedRouteKind.APP_ROUTE,status:d.status,body:Buffer.from(await a.arrayBuffer()),headers:b},cacheControl:{revalidate:c,expire:e}}}}catch(b){throw(null==e?void 0:e.isStale)&&await v.onRequestError(a,b,{routerKind:"App Router",routePath:d,routeType:"route",revalidateReason:(0,n.getRevalidateReason)({isStaticGeneration:P,isOnDemandRevalidate:E})},!1,D),b}},_=async(d,f)=>{try{var g,i;let d=await v.handleResponse({req:a,nextConfig:z,cacheKey:N,routeKind:e.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:C,isRoutePPREnabled:!1,isOnDemandRevalidate:E,revalidateOnlyGenerated:F,responseGenerator:$,waitUntil:c.waitUntil,isMinimalMode:U});if(!L)return;if((null==d||null==(g=d.value)?void 0:g.kind)!==u.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==d||null==(i=d.value)?void 0:i.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});U||b.setHeader("x-nextjs-cache",E?"REVALIDATED":d.isMiss?"MISS":d.isStale?"STALE":"HIT"),B&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let f=(0,p.fromNodeOutgoingHttpHeaders)(d.value.headers);U&&L||f.delete(r.NEXT_CACHE_TAGS_HEADER),!d.cacheControl||b.getHeader("Cache-Control")||f.get("Cache-Control")||f.set("Cache-Control",(0,q.getCacheControlHeader)(d.cacheControl)),await (0,o.I)(X,Y,new Response(d.value.body,{headers:f,status:d.value.status||200}));return}catch(b){if(b instanceof s.NoFallbackError||await v.onRequestError(a,b,{routerKind:"App Router",routePath:J,routeType:"route",revalidateReason:(0,n.getRevalidateReason)({isStaticGeneration:P,isOnDemandRevalidate:E})},!1,D),L)throw b;await (0,o.I)(X,Y,new Response(null,{status:500}));return}finally{(()=>{if(!d)return;let a=b.statusCode;d.setAttributes({"http.status_code":a,"next.rsc":!1}),a&&a>=500&&(d.setStatus({code:h.SpanStatusCode.ERROR}),d.setAttribute("error.type",a.toString()));let c=R.getRootSpanAttributes();if(!c)return;if(c.get("next.span_type")!==m.BaseServerSpan.handleRequest)return console.warn(`Unexpected root span type '${c.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let e=c.get("next.route")||J,g=`${Q} ${e}`;d.setAttributes({"next.route":e,"http.route":e,"next.span_name":g}),d.updateName(g),f&&f!==d&&(f.setAttribute("http.route",e),f.updateName(g))})()}};if(T&&S)await _(S,void 0);else{let b=R.getActiveScopeSpan();await R.withPropagatedContext(a.headers,()=>R.trace(m.BaseServerSpan.handleRequest,{spanName:`${Q} ${d}`,kind:h.SpanKind.SERVER,attributes:{"http.method":Q,"http.target":a.url}},a=>_(a,b)),void 0,!T)}}},8128:a=>{a.exports=require("next/dist/server/runtime-reacts.external.js")},10846:a=>{a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},12412:a=>{a.exports=require("assert")},19121:a=>{a.exports=require("next/dist/server/app-render/action-async-storage.external.js")},27910:a=>{a.exports=require("stream")},28354:a=>{a.exports=require("util")},28802:a=>{a.exports=import("@earendil-works/pi-ai")},29021:a=>{a.exports=require("fs")},29294:a=>{a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},29862:a=>{a.exports=import("@earendil-works/pi-tui")},33873:a=>{a.exports=require("path")},44870:a=>{a.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},48161:a=>{a.exports=require("node:os")},51181:a=>{a.exports=require("web-push")},51455:a=>{a.exports=require("node:fs/promises")},55511:a=>{a.exports=require("crypto")},63033:a=>{a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},66544:(a,b,c)=>{c.d(b,{E2:()=>k,EN:()=>j});var d=c(77030);function e(a){return(a.startsWith("[")&&a.endsWith("]")?a.slice(1,-1):a).toLowerCase().replace(/\.$/,"")}function f(a){if(!a||/[\s/@\\]/.test(a))return null;try{let b=new URL(`http://${a}`);if(b.username||b.password||"/"!==b.pathname||b.search||b.hash)return null;return e(b.hostname)}catch{return null}}function g(a){if(!a||/[\s/@\\]/.test(a))return null;try{let b=new URL(`http://${a}`);if(b.username||b.password||"/"!==b.pathname||b.search||b.hash)return null;let c=e(b.hostname);return b.port?`${c}:${b.port}`:c}catch{return null}}function h(){return[process.env.PI_WEB_HOSTNAME,...process.env.PI_WEB_ALLOWED_HOSTS?.split(",")??[]].filter(a=>!!a?.trim())}function i(a){try{return new URL(a).origin}catch{return null}}function j(a,b=h()){return!!function(a,b=h()){let c=a.headers.get("host"),g=c?f(c):null;return!!g&&(!!("localhost"===g||g.endsWith(".localhost")||(0,d.isIP)(g))||b.some(a=>{let b;return((b=a?.trim())?(0,d.isIP)(b)?e(b):f(b):null)===g}))}(a,b)&&(!!function(a){if("GET"!==a.method||"navigate"!==a.headers.get("sec-fetch-mode")||"document"!==a.headers.get("sec-fetch-dest")||"?1"!==a.headers.get("sec-fetch-user"))return!1;try{let b=new URL(a.url);return/^\/api\/sessions\/[^/]+\/export$/.test(b.pathname)||function(a){if(!a.pathname.startsWith("/api/files/")||"read"!==a.searchParams.get("type"))return!1;let b=a.pathname.slice(a.pathname.lastIndexOf("/")+1);try{return decodeURIComponent(b).toLowerCase().endsWith(".pdf")}catch{return!1}}(b)}catch{return!1}}(a)||!(a.headers.has("origin")||a.headers.has("sec-fetch-site"))||function(a){let b,c,d,e=a.headers.get("origin");if("cross-site"===a.headers.get("sec-fetch-site"))return!1;if(!e)return!0;let f=(b=new URL(a.url),(c=a.headers.get("host"))?i(`${b.protocol}//${c}`):null);if(null!==f&&i(e)===f)return!0;if("same-origin"!==a.headers.get("sec-fetch-site")||!a.headers.get("x-forwarded-proto"))return!1;let h=a.headers.get("host");if(!h)return!1;try{d=new URL(e).host}catch{return!1}let j=g(d);return null!==j&&j===g(h)}(a))}function k(a){let b=a.headers.get("content-type")?.split(";",1)[0]?.trim().toLowerCase();return"application/json"===b||!!(b?.startsWith("application/")&&b.endsWith("+json"))}},73024:a=>{a.exports=require("node:fs")},73136:a=>{a.exports=require("node:url")},75430:a=>{a.exports=import("@earendil-works/pi-coding-agent")},76760:a=>{a.exports=require("node:path")},77030:a=>{a.exports=require("node:net")},77598:a=>{a.exports=require("node:crypto")},79646:a=>{a.exports=require("child_process")},79748:a=>{a.exports=require("fs/promises")},81115:a=>{a.exports=require("constants")},86439:a=>{a.exports=require("next/dist/shared/lib/no-fallback-error.external")},88914:(a,b,c)=>{function d(a,b){b&&(a.tokens.input+=b.input??0,a.tokens.output+=b.output??0,a.tokens.cacheRead+=b.cacheRead??0,a.tokens.cacheWrite+=b.cacheWrite??0,a.cost+=b.cost?.total??0)}function e(a){var b;let c={userMessages:0,assistantMessages:0,toolCalls:0,toolResults:0,totalMessages:0,tokens:{input:0,output:0,cacheRead:0,cacheWrite:0,total:0},cost:0};for(let e of a){if("compaction"===e.type||"branch_summary"===e.type||"usage"===e.type){d(c,e.usage);continue}"message"===e.type&&(b=e.message,c.totalMessages+=1,"user"===b.role?c.userMessages+=1:"toolResult"===b.role?(c.toolResults+=1,d(c,b.usage)):"assistant"===b.role&&(c.assistantMessages+=1,Array.isArray(b.content)&&(c.toolCalls+=b.content.filter(a=>"toolCall"===a.type).length),d(c,b.usage)))}return c.tokens.total=c.tokens.input+c.tokens.output+c.tokens.cacheRead+c.tokens.cacheWrite,c}c.d(b,{P:()=>e})},93752:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{POST:()=>o,dynamic:()=>p});var e=c(23211),f=c(66544),g=c(56429),h=c(40402),i=c(88914),j=c(89691),k=c(12069),l=a([g,h]);[g,h]=l.then?(await l)():l;let p="force-dynamic",q={"Cache-Control":"no-store"},r=new WeakMap;function m(a,b){return e.NextResponse.json({error:b},{status:a,headers:q})}async function n(a){let b,c=(0,g.A4)(a);if(c?.isAlive())b=c.inner.sessionManager;else{let c=await (0,h.os)(a);if(!c)return null;b=(0,h.G1)(c)}let d=b.getEntries(),e=d[d.length-1]?.id,f=r.get(b);if(f&&f.entryCount===d.length&&f.lastEntryId===e)return f.summary;let k=(0,i.P)(d),l={tokens:k.tokens,cost:k.cost,toolCalls:k.toolCalls,totalActiveMs:(0,j.c)(d)};return r.set(b,{entryCount:d.length,lastEntryId:e,summary:l}),l}async function o(a){let b;if(!(0,f.EN)(a))return m(403,"Untrusted API request");if(!(0,f.E2)(a))return m(415,"Content-Type must be application/json");try{b=await a.json()}catch{return m(400,"Invalid JSON body")}let c="object"!=typeof b||null===b||Array.isArray(b)?void 0:b.ids;if(!Array.isArray(c)||0===c.length)return m(400,"ids must be a non-empty array");if(c.length>200)return m(400,"ids may hold at most 200 session ids");if(!c.every(a=>"string"==typeof a&&k.Id.test(a)))return m(400,"ids must be session ids");let d={};for(let a of new Set(c))try{let b=await n(a);b&&(d[a]=b)}catch{}return e.NextResponse.json({stats:d},{headers:q})}d()}catch(a){d(a)}})},94735:a=>{a.exports=require("events")},98995:a=>{a.exports=require("node:module")}};var b=require("../../../../webpack-runtime.js");b.C(a);var c=b.X(0,[2970,1813,426,974,5582,2498,3757,4698,2243,6429,2069],()=>b(b.s=6623));module.exports=c})();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
<!DOCTYPE html><html lang="en" translate="no" class="__variable_9e44ca notranslate"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover, interactive-widget=resizes-content"/><link rel="preload" href="/_next/static/media/7deddc85b7ffd1dc-s.p.woff2" as="font" crossorigin="" type="font/woff2"/><link rel="preload" href="/_next/static/media/ec14413c594b3356-s.p.woff2" as="font" crossorigin="" type="font/woff2"/><link rel="stylesheet" href="/_next/static/css/9bcd6051db4f8890.css" data-precedence="next"/><link rel="stylesheet" href="/_next/static/css/375a9b52d89c0bac.css" data-precedence="next"/><link rel="stylesheet" href="/_next/static/css/bf49b4e87f26e436.css" data-precedence="next"/><link rel="stylesheet" href="/_next/static/css/2c3ed27b408ff881.css" data-precedence="next"/><link rel="stylesheet" href="/_next/static/css/49692dbfa6f26eeb.css" data-precedence="next"/><link rel="preload" as="script" fetchPriority="low" href="/_next/static/chunks/webpack-4b9870824e5acfb3.js"/><script src="/_next/static/chunks/4bd1b696-8a4ab4fdf0ae305a.js" async=""></script><script src="/_next/static/chunks/3794-6f271a1eb27dfa20.js" async=""></script><script src="/_next/static/chunks/main-app-a98576891fdd8f60.js" async=""></script><script src="/_next/static/chunks/app/layout-9d6993813bf86a1b.js" async=""></script><script src="/_next/static/chunks/d3ac728e-7964f816a1ca64e5.js" async=""></script><script src="/_next/static/chunks/e868780c-1584512c612787d7.js" async=""></script><script src="/_next/static/chunks/5772-c8175d2fabf63b95.js" async=""></script><script src="/_next/static/chunks/9932-60e21347ba9f8664.js" async=""></script><script src="/_next/static/chunks/1278-069285b48cad19f3.js" async=""></script><script src="/_next/static/chunks/app/page-6bdc383a2a0e75cd.js" async=""></script><meta name="theme-color" content="#ffffff" media="(prefers-color-scheme: light)"/><meta name="theme-color" content="#1a1a1a" media="(prefers-color-scheme: dark)"/><title>Pi Web</title><meta name="description" content="Pi Web interface for the pi coding agent"/><meta name="application-name" content="Pi Web"/><link rel="manifest" href="/manifest.webmanifest"/><meta name="format-detection" content="telephone=no"/><meta name="mobile-web-app-capable" content="yes"/><meta name="apple-mobile-web-app-title" content="Pi Web"/><meta name="apple-mobile-web-app-status-bar-style" content="black-translucent"/><link rel="icon" href="/favicon.ico?c16c14206ecd3374" type="image/x-icon" sizes="512x512"/><link rel="icon" href="/icons/icon-192.png" sizes="192x192" type="image/png"/><link rel="apple-touch-icon" href="/icons/apple-touch-icon.png" sizes="180x180" type="image/png"/><meta name="next-size-adjust" content=""/><meta name="google" content="notranslate"/><script>(function(){var t="auto";try{var s=localStorage.getItem("pi-theme");if(["auto","light","mist","lilac","sand","rose","dark","pine","dusk","ember","slate","contrast-light","contrast-dark","zenburn"].includes(s))t=s}catch(e){}if(t==="auto")t=window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light";var r=document.documentElement;r.dataset.theme=t;r.classList.toggle("dark",["dark","pine","dusk","ember","slate","contrast-dark","zenburn"].includes(t))})();</script><script src="/_next/static/chunks/polyfills-42372ed130431b0a.js" noModule=""></script></head><body translate="no" class="notranslate"><div hidden=""><!--$--><!--/$--></div><!--$!--><template data-dgst="BAILOUT_TO_CLIENT_SIDE_RENDERING"></template><!--/$--><!--$--><!--/$--><script src="/_next/static/chunks/webpack-4b9870824e5acfb3.js" id="_R_" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0])</script><script>self.__next_f.push([1,"1:\"$Sreact.fragment\"\n2:I[57121,[],\"\"]\n3:I[74581,[],\"\"]\n4:I[57788,[\"7177\",\"static/chunks/app/layout-9d6993813bf86a1b.js\"],\"PwaRegistration\"]\n5:\"$Sreact.suspense\"\n6:I[21278,[\"7330\",\"static/chunks/d3ac728e-7964f816a1ca64e5.js\",\"3888\",\"static/chunks/e868780c-1584512c612787d7.js\",\"5772\",\"static/chunks/5772-c8175d2fabf63b95.js\",\"9932\",\"static/chunks/9932-60e21347ba9f8664.js\",\"1278\",\"static/chunks/1278-069285b48cad19f3.js\",\"8974\",\"static/chunks/app/page-6bdc383a2a0e75cd.js\"],\"I18nProvider\"]\n7:I[99086,[\"7330\",\"static/chunks/d3ac728e-7964f816a1ca64e5.js\",\"3888\",\"static/chunks/e868780c-1584512c612787d7.js\",\"5772\",\"static/chunks/5772-c8175d2fabf63b95.js\",\"9932\",\"static/chunks/9932-60e21347ba9f8664.js\",\"1278\",\"static/chunks/1278-069285b48cad19f3.js\",\"8974\",\"static/chunks/app/page-6bdc383a2a0e75cd.js\"],\"AppShell\"]\n8:I[90484,[],\"OutletBoundary\"]\na:I[90484,[],\"ViewportBoundary\"]\nc:I[90484,[],\"MetadataBoundary\"]\ne:I[27123,[],\"default\",1]\n:HL[\"/_next/static/media/7deddc85b7ffd1dc-s.p.woff2\",\"font\",{\"crossOrigin\":\"\",\"type\":\"font/woff2\"}]\n:HL[\"/_next/static/media/ec14413c594b3356-s.p.woff2\",\"font\",{\"crossOrigin\":\"\",\"type\":\"font/woff2\"}]\n:HL[\"/_next/static/css/9bcd6051db4f8890.css\",\"style\"]\n:HL[\"/_next/static/css/375a9b52d89c0bac.css\",\"style\"]\n:HL[\"/_next/static/css/bf49b4e87f26e436.css\",\"style\"]\n:HL[\"/_next/static/css/2c3ed27b408ff881.css\",\"style\"]\n:HL[\"/_next/static/css/49692dbfa6f26eeb.css\",\"style\"]\n0:{\"P\":null,\"c\":[\"\",\"\"],\"q\":\"\",\"i\":false,\"f\":[[[\"\",{\"children\":[\"__PAGE__\",{},\"$undefined\",\"$undefined\",4608]},\"$undefined\",\"$undefined\",4624],[[\"$\",\"$1\",\"c\",{\"children\":[[[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/css/9bcd6051db4f8890.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\",\"nonce\":\"$undefined\"}],[\"$\",\"link\",\"1\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/css/375a9b52d89c0bac.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\",\"nonce\":\"$undefined\"}],[\"$\",\"link\",\"2\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/css/bf49b4e87f26e436.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\",\"nonce\":\"$undefined\"}],[\"$\",\"link\",\"3\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/css/2c3ed27b408ff881.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\",\"nonce\":\"$undefined\"}]],[\"$\",\"html\",null,{\"lang\":\"en\",\"translate\":\"no\",\"className\":\"__variable_9e44ca notranslate\",\"suppressHydrationWarning\":true,\"children\":[[\"$\",\"head\",null,{\"children\":[[\"$\",\"meta\",null,{\"name\":\"google\",\"content\":\"notranslate\"}],[\"$\",\"script\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"(function(){var t=\\\"auto\\\";try{var s=localStorage.getItem(\\\"pi-theme\\\");if([\\\"auto\\\",\\\"light\\\",\\\"mist\\\",\\\"lilac\\\",\\\"sand\\\",\\\"rose\\\",\\\"dark\\\",\\\"pine\\\",\\\"dusk\\\",\\\"ember\\\",\\\"slate\\\",\\\"contrast-light\\\",\\\"contrast-dark\\\",\\\"zenburn\\\"].includes(s))t=s}catch(e){}if(t===\\\"auto\\\")t=window.matchMedia(\\\"(prefers-color-scheme: dark)\\\").matches?\\\"dark\\\":\\\"light\\\";var r=document.documentElement;r.dataset.theme=t;r.classList.toggle(\\\"dark\\\",[\\\"dark\\\",\\\"pine\\\",\\\"dusk\\\",\\\"ember\\\",\\\"slate\\\",\\\"contrast-dark\\\",\\\"zenburn\\\"].includes(t))})();\"}}]]}],[\"$\",\"body\",null,{\"translate\":\"no\",\"className\":\"notranslate\",\"suppressHydrationWarning\":true,\"children\":[[\"$\",\"$L2\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L3\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":[[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"textAlign\":\"center\",\"display\":\"flex\",\"flexDirection\":\"column\",\"alignItems\":\"center\",\"justifyContent\":\"center\"},\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":{\"display\":\"inline-block\",\"margin\":\"0 20px 0 0\",\"padding\":\"0 23px 0 0\",\"fontSize\":24,\"fontWeight\":500,\"verticalAlign\":\"top\",\"lineHeight\":\"49px\"},\"children\":404}],[\"$\",\"div\",null,{\"style\":{\"display\":\"inline-block\"},\"children\":[\"$\",\"h2\",null,{\"style\":{\"fontSize\":14,\"fontWeight\":400,\"lineHeight\":\"49px\",\"margin\":0},\"children\":\"This page could not be found.\"}]}]]}]}]],[]],\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}],[\"$\",\"$L4\",null,{}]]}]]}]]}],{\"children\":[[\"$\",\"$1\",\"c\",{\"children\":[[\"$\",\"$5\",null,{\"children\":[\"$\",\"$L6\",null,{\"children\":[\"$\",\"$L7\",null,{}]}]}],[[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/css/49692dbfa6f26eeb.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\",\"nonce\":\"$undefined\"}]],[\"$\",\"$L8\",null,{\"children\":[\"$\",\"$5\",null,{\"name\":\"Next.MetadataOutlet\",\"children\":\"$@9\"}]}]]}],{},null,false,null]},null,false,null],[\"$\",\"$1\",\"h\",{\"children\":[null,[\"$\",\"$La\",null,{\"children\":\"$Lb\"}],[\"$\",\"div\",null,{\"hidden\":true,\"children\":[\"$\",\"$Lc\",null,{\"children\":[\"$\",\"$5\",null,{\"name\":\"Next.Metadata\",\"children\":\"$Ld\"}]}]}],[\"$\",\"meta\",null,{\"name\":\"next-size-adjust\",\"content\":\"\"}]]}],false]],\"m\":\"$undefined\",\"G\":[\"$e\",[]],\"S\":true,\"h\":null,\"r\":\"$undefined\",\"s\":\"$undefined\",\"a\":\"$undefined\",\"l\":\"$undefined\",\"p\":\"$undefined\",\"d\":\"$undefined\",\"b\":\"PnFO9KT71uRqS9PQ-IyCa\"}\nb:[[\"$\",\"meta\",\"0\",{\"charSet\":\"utf-8\"}],[\"$\",\"meta\",\"1\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1, viewport-fit=cover, interactive-widget=resizes-content\"}],[\"$\",\"meta\",\"2\",{\"name\":\"theme-color\",\"content\":\"#ffffff\",\"media\":\"(prefers-color-scheme: light)\"}],[\"$\",\"meta\",\"3\",{\"name\":\"theme-color\",\"content\":\"#1a1a1a\",\"media\":\"(prefers-color-scheme: dark)\"}]]\nf:I[86869,[],\"IconMark\"]\n9:null\nd:[[\"$\",\"title\",\"0\",{\"children\":\"Pi Web\"}],[\"$\",\"meta\",\"1\",{\"name\":\"description\",\"content\":\"Pi Web interface for the pi coding agent\"}],[\"$\",\"meta\",\"2\",{\"name\":\"application-name\",\"content\":\"Pi Web\"}],[\"$\",\"link\",\"3\",{\"rel\":\"manifest\",\"href\":\"/manifest.webmanifest\",\"crossOrigin\":\"$undefined\"}],[\"$\",\"meta\",\"4\",{\"name\":\"format-detection\",\"content\":\"telephone=no\"}],[\"$\",\"meta\",\"5\",{\"name\":\"mobile-web-app-capable\",\"content\":\"yes\"}],[\"$\",\"meta\",\"6\",{\"name\":\"apple-mobile-web-app-title\",\"content\":\"Pi Web\"}],[\"$\",\"meta\",\"7\",{\"name\":\"apple-mobile-web-app-status-bar-style\",\"content\":\"black-translucent\"}],[\"$\",\"link\",\"8\",{\"rel\":\"icon\",\"href\":\"/favicon.ico?c16c14206ecd3374\",\"type\":\"image/x-icon\",\"sizes\":\"512x512\"}],[\"$\",\"link\",\"9\",{\"rel\":\"icon\",\"href\":\"/icons/icon-192.png\",\"sizes\":\"192x192\",\"type\":\"image/png\"}],[\"$\",\"link\",\"10\",{\"rel\":\"apple-touch-icon\",\"href\":\"/icons/apple-touch-icon.png\",\"sizes\":\"180x180\",\"type\":\"image/png\"}],[\"$\",\"$Lf\",\"11\",{}]]\n"])</script></body></html>
|
|
1
|
+
<!DOCTYPE html><html lang="en" translate="no" class="__variable_9e44ca notranslate"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover, interactive-widget=resizes-content"/><link rel="preload" href="/_next/static/media/7deddc85b7ffd1dc-s.p.woff2" as="font" crossorigin="" type="font/woff2"/><link rel="preload" href="/_next/static/media/ec14413c594b3356-s.p.woff2" as="font" crossorigin="" type="font/woff2"/><link rel="stylesheet" href="/_next/static/css/9bcd6051db4f8890.css" data-precedence="next"/><link rel="stylesheet" href="/_next/static/css/375a9b52d89c0bac.css" data-precedence="next"/><link rel="stylesheet" href="/_next/static/css/bf49b4e87f26e436.css" data-precedence="next"/><link rel="stylesheet" href="/_next/static/css/2c3ed27b408ff881.css" data-precedence="next"/><link rel="stylesheet" href="/_next/static/css/49692dbfa6f26eeb.css" data-precedence="next"/><link rel="preload" as="script" fetchPriority="low" href="/_next/static/chunks/webpack-4b9870824e5acfb3.js"/><script src="/_next/static/chunks/4bd1b696-8a4ab4fdf0ae305a.js" async=""></script><script src="/_next/static/chunks/3794-6f271a1eb27dfa20.js" async=""></script><script src="/_next/static/chunks/main-app-a98576891fdd8f60.js" async=""></script><script src="/_next/static/chunks/app/layout-ada8395c0dd27f01.js" async=""></script><script src="/_next/static/chunks/d3ac728e-7964f816a1ca64e5.js" async=""></script><script src="/_next/static/chunks/e868780c-1584512c612787d7.js" async=""></script><script src="/_next/static/chunks/5772-c8175d2fabf63b95.js" async=""></script><script src="/_next/static/chunks/9932-60e21347ba9f8664.js" async=""></script><script src="/_next/static/chunks/1278-069285b48cad19f3.js" async=""></script><script src="/_next/static/chunks/app/page-88e5d2c5affba2f7.js" async=""></script><meta name="theme-color" content="#ffffff" media="(prefers-color-scheme: light)"/><meta name="theme-color" content="#1a1a1a" media="(prefers-color-scheme: dark)"/><title>Pi Web</title><meta name="description" content="Pi Web interface for the pi coding agent"/><meta name="application-name" content="Pi Web"/><link rel="manifest" href="/manifest.webmanifest"/><meta name="format-detection" content="telephone=no"/><meta name="mobile-web-app-capable" content="yes"/><meta name="apple-mobile-web-app-title" content="Pi Web"/><meta name="apple-mobile-web-app-status-bar-style" content="black-translucent"/><link rel="icon" href="/favicon.ico?c16c14206ecd3374" type="image/x-icon" sizes="512x512"/><link rel="icon" href="/icons/icon-192.png" sizes="192x192" type="image/png"/><link rel="apple-touch-icon" href="/icons/apple-touch-icon.png" sizes="180x180" type="image/png"/><meta name="next-size-adjust" content=""/><meta name="google" content="notranslate"/><script>(function(){var t="auto";try{var s=localStorage.getItem("pi-theme");if(["auto","light","mist","lilac","sand","rose","dark","pine","dusk","ember","slate","contrast-light","contrast-dark","zenburn"].includes(s))t=s}catch(e){}if(t==="auto")t=window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light";var r=document.documentElement;r.dataset.theme=t;r.classList.toggle("dark",["dark","pine","dusk","ember","slate","contrast-dark","zenburn"].includes(t))})();</script><script src="/_next/static/chunks/polyfills-42372ed130431b0a.js" noModule=""></script></head><body translate="no" class="notranslate"><div hidden=""><!--$--><!--/$--></div><!--$!--><template data-dgst="BAILOUT_TO_CLIENT_SIDE_RENDERING"></template><!--/$--><!--$--><!--/$--><script src="/_next/static/chunks/webpack-4b9870824e5acfb3.js" id="_R_" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0])</script><script>self.__next_f.push([1,"1:\"$Sreact.fragment\"\n2:I[57121,[],\"\"]\n3:I[74581,[],\"\"]\n4:I[57788,[\"7177\",\"static/chunks/app/layout-ada8395c0dd27f01.js\"],\"PwaRegistration\"]\n5:\"$Sreact.suspense\"\n6:I[21278,[\"7330\",\"static/chunks/d3ac728e-7964f816a1ca64e5.js\",\"3888\",\"static/chunks/e868780c-1584512c612787d7.js\",\"5772\",\"static/chunks/5772-c8175d2fabf63b95.js\",\"9932\",\"static/chunks/9932-60e21347ba9f8664.js\",\"1278\",\"static/chunks/1278-069285b48cad19f3.js\",\"8974\",\"static/chunks/app/page-88e5d2c5affba2f7.js\"],\"I18nProvider\"]\n7:I[91038,[\"7330\",\"static/chunks/d3ac728e-7964f816a1ca64e5.js\",\"3888\",\"static/chunks/e868780c-1584512c612787d7.js\",\"5772\",\"static/chunks/5772-c8175d2fabf63b95.js\",\"9932\",\"static/chunks/9932-60e21347ba9f8664.js\",\"1278\",\"static/chunks/1278-069285b48cad19f3.js\",\"8974\",\"static/chunks/app/page-88e5d2c5affba2f7.js\"],\"AppShell\"]\n8:I[90484,[],\"OutletBoundary\"]\na:I[90484,[],\"ViewportBoundary\"]\nc:I[90484,[],\"MetadataBoundary\"]\ne:I[27123,[],\"default\",1]\n:HL[\"/_next/static/media/7deddc85b7ffd1dc-s.p.woff2\",\"font\",{\"crossOrigin\":\"\",\"type\":\"font/woff2\"}]\n:HL[\"/_next/static/media/ec14413c594b3356-s.p.woff2\",\"font\",{\"crossOrigin\":\"\",\"type\":\"font/woff2\"}]\n:HL[\"/_next/static/css/9bcd6051db4f8890.css\",\"style\"]\n:HL[\"/_next/static/css/375a9b52d89c0bac.css\",\"style\"]\n:HL[\"/_next/static/css/bf49b4e87f26e436.css\",\"style\"]\n:HL[\"/_next/static/css/2c3ed27b408ff881.css\",\"style\"]\n:HL[\"/_next/static/css/49692dbfa6f26eeb.css\",\"style\"]\n0:{\"P\":null,\"c\":[\"\",\"\"],\"q\":\"\",\"i\":false,\"f\":[[[\"\",{\"children\":[\"__PAGE__\",{},\"$undefined\",\"$undefined\",4608]},\"$undefined\",\"$undefined\",4624],[[\"$\",\"$1\",\"c\",{\"children\":[[[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/css/9bcd6051db4f8890.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\",\"nonce\":\"$undefined\"}],[\"$\",\"link\",\"1\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/css/375a9b52d89c0bac.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\",\"nonce\":\"$undefined\"}],[\"$\",\"link\",\"2\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/css/bf49b4e87f26e436.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\",\"nonce\":\"$undefined\"}],[\"$\",\"link\",\"3\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/css/2c3ed27b408ff881.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\",\"nonce\":\"$undefined\"}]],[\"$\",\"html\",null,{\"lang\":\"en\",\"translate\":\"no\",\"className\":\"__variable_9e44ca notranslate\",\"suppressHydrationWarning\":true,\"children\":[[\"$\",\"head\",null,{\"children\":[[\"$\",\"meta\",null,{\"name\":\"google\",\"content\":\"notranslate\"}],[\"$\",\"script\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"(function(){var t=\\\"auto\\\";try{var s=localStorage.getItem(\\\"pi-theme\\\");if([\\\"auto\\\",\\\"light\\\",\\\"mist\\\",\\\"lilac\\\",\\\"sand\\\",\\\"rose\\\",\\\"dark\\\",\\\"pine\\\",\\\"dusk\\\",\\\"ember\\\",\\\"slate\\\",\\\"contrast-light\\\",\\\"contrast-dark\\\",\\\"zenburn\\\"].includes(s))t=s}catch(e){}if(t===\\\"auto\\\")t=window.matchMedia(\\\"(prefers-color-scheme: dark)\\\").matches?\\\"dark\\\":\\\"light\\\";var r=document.documentElement;r.dataset.theme=t;r.classList.toggle(\\\"dark\\\",[\\\"dark\\\",\\\"pine\\\",\\\"dusk\\\",\\\"ember\\\",\\\"slate\\\",\\\"contrast-dark\\\",\\\"zenburn\\\"].includes(t))})();\"}}]]}],[\"$\",\"body\",null,{\"translate\":\"no\",\"className\":\"notranslate\",\"suppressHydrationWarning\":true,\"children\":[[\"$\",\"$L2\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L3\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":[[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"textAlign\":\"center\",\"display\":\"flex\",\"flexDirection\":\"column\",\"alignItems\":\"center\",\"justifyContent\":\"center\"},\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":{\"display\":\"inline-block\",\"margin\":\"0 20px 0 0\",\"padding\":\"0 23px 0 0\",\"fontSize\":24,\"fontWeight\":500,\"verticalAlign\":\"top\",\"lineHeight\":\"49px\"},\"children\":404}],[\"$\",\"div\",null,{\"style\":{\"display\":\"inline-block\"},\"children\":[\"$\",\"h2\",null,{\"style\":{\"fontSize\":14,\"fontWeight\":400,\"lineHeight\":\"49px\",\"margin\":0},\"children\":\"This page could not be found.\"}]}]]}]}]],[]],\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}],[\"$\",\"$L4\",null,{}]]}]]}]]}],{\"children\":[[\"$\",\"$1\",\"c\",{\"children\":[[\"$\",\"$5\",null,{\"children\":[\"$\",\"$L6\",null,{\"children\":[\"$\",\"$L7\",null,{}]}]}],[[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/css/49692dbfa6f26eeb.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\",\"nonce\":\"$undefined\"}]],[\"$\",\"$L8\",null,{\"children\":[\"$\",\"$5\",null,{\"name\":\"Next.MetadataOutlet\",\"children\":\"$@9\"}]}]]}],{},null,false,null]},null,false,null],[\"$\",\"$1\",\"h\",{\"children\":[null,[\"$\",\"$La\",null,{\"children\":\"$Lb\"}],[\"$\",\"div\",null,{\"hidden\":true,\"children\":[\"$\",\"$Lc\",null,{\"children\":[\"$\",\"$5\",null,{\"name\":\"Next.Metadata\",\"children\":\"$Ld\"}]}]}],[\"$\",\"meta\",null,{\"name\":\"next-size-adjust\",\"content\":\"\"}]]}],false]],\"m\":\"$undefined\",\"G\":[\"$e\",[]],\"S\":true,\"h\":null,\"r\":\"$undefined\",\"s\":\"$undefined\",\"a\":\"$undefined\",\"l\":\"$undefined\",\"p\":\"$undefined\",\"d\":\"$undefined\",\"b\":\"297ATGH77_vEym6tRQh_6\"}\nb:[[\"$\",\"meta\",\"0\",{\"charSet\":\"utf-8\"}],[\"$\",\"meta\",\"1\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1, viewport-fit=cover, interactive-widget=resizes-content\"}],[\"$\",\"meta\",\"2\",{\"name\":\"theme-color\",\"content\":\"#ffffff\",\"media\":\"(prefers-color-scheme: light)\"}],[\"$\",\"meta\",\"3\",{\"name\":\"theme-color\",\"content\":\"#1a1a1a\",\"media\":\"(prefers-color-scheme: dark)\"}]]\nf:I[86869,[],\"IconMark\"]\n9:null\nd:[[\"$\",\"title\",\"0\",{\"children\":\"Pi Web\"}],[\"$\",\"meta\",\"1\",{\"name\":\"description\",\"content\":\"Pi Web interface for the pi coding agent\"}],[\"$\",\"meta\",\"2\",{\"name\":\"application-name\",\"content\":\"Pi Web\"}],[\"$\",\"link\",\"3\",{\"rel\":\"manifest\",\"href\":\"/manifest.webmanifest\",\"crossOrigin\":\"$undefined\"}],[\"$\",\"meta\",\"4\",{\"name\":\"format-detection\",\"content\":\"telephone=no\"}],[\"$\",\"meta\",\"5\",{\"name\":\"mobile-web-app-capable\",\"content\":\"yes\"}],[\"$\",\"meta\",\"6\",{\"name\":\"apple-mobile-web-app-title\",\"content\":\"Pi Web\"}],[\"$\",\"meta\",\"7\",{\"name\":\"apple-mobile-web-app-status-bar-style\",\"content\":\"black-translucent\"}],[\"$\",\"link\",\"8\",{\"rel\":\"icon\",\"href\":\"/favicon.ico?c16c14206ecd3374\",\"type\":\"image/x-icon\",\"sizes\":\"512x512\"}],[\"$\",\"link\",\"9\",{\"rel\":\"icon\",\"href\":\"/icons/icon-192.png\",\"sizes\":\"192x192\",\"type\":\"image/png\"}],[\"$\",\"link\",\"10\",{\"rel\":\"apple-touch-icon\",\"href\":\"/icons/apple-touch-icon.png\",\"sizes\":\"180x180\",\"type\":\"image/png\"}],[\"$\",\"$Lf\",\"11\",{}]]\n"])</script></body></html>
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
1:"$Sreact.fragment"
|
|
2
2
|
2:I[57121,[],""]
|
|
3
3
|
3:I[74581,[],""]
|
|
4
|
-
4:I[57788,["7177","static/chunks/app/layout-
|
|
4
|
+
4:I[57788,["7177","static/chunks/app/layout-ada8395c0dd27f01.js"],"PwaRegistration"]
|
|
5
5
|
5:"$Sreact.suspense"
|
|
6
|
-
6:I[21278,["7330","static/chunks/d3ac728e-7964f816a1ca64e5.js","3888","static/chunks/e868780c-1584512c612787d7.js","5772","static/chunks/5772-c8175d2fabf63b95.js","9932","static/chunks/9932-60e21347ba9f8664.js","1278","static/chunks/1278-069285b48cad19f3.js","8974","static/chunks/app/page-
|
|
7
|
-
7:I[
|
|
6
|
+
6:I[21278,["7330","static/chunks/d3ac728e-7964f816a1ca64e5.js","3888","static/chunks/e868780c-1584512c612787d7.js","5772","static/chunks/5772-c8175d2fabf63b95.js","9932","static/chunks/9932-60e21347ba9f8664.js","1278","static/chunks/1278-069285b48cad19f3.js","8974","static/chunks/app/page-88e5d2c5affba2f7.js"],"I18nProvider"]
|
|
7
|
+
7:I[91038,["7330","static/chunks/d3ac728e-7964f816a1ca64e5.js","3888","static/chunks/e868780c-1584512c612787d7.js","5772","static/chunks/5772-c8175d2fabf63b95.js","9932","static/chunks/9932-60e21347ba9f8664.js","1278","static/chunks/1278-069285b48cad19f3.js","8974","static/chunks/app/page-88e5d2c5affba2f7.js"],"AppShell"]
|
|
8
8
|
8:I[90484,[],"OutletBoundary"]
|
|
9
9
|
a:I[90484,[],"ViewportBoundary"]
|
|
10
10
|
c:I[90484,[],"MetadataBoundary"]
|
|
@@ -16,7 +16,7 @@ e:I[27123,[],"default",1]
|
|
|
16
16
|
:HL["/_next/static/css/bf49b4e87f26e436.css","style"]
|
|
17
17
|
:HL["/_next/static/css/2c3ed27b408ff881.css","style"]
|
|
18
18
|
:HL["/_next/static/css/49692dbfa6f26eeb.css","style"]
|
|
19
|
-
0:{"P":null,"c":["",""],"q":"","i":false,"f":[[["",{"children":["__PAGE__",{},"$undefined","$undefined",4608]},"$undefined","$undefined",4624],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/_next/static/css/9bcd6051db4f8890.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/_next/static/css/375a9b52d89c0bac.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","2",{"rel":"stylesheet","href":"/_next/static/css/bf49b4e87f26e436.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","3",{"rel":"stylesheet","href":"/_next/static/css/2c3ed27b408ff881.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}]],["$","html",null,{"lang":"en","translate":"no","className":"__variable_9e44ca notranslate","suppressHydrationWarning":true,"children":[["$","head",null,{"children":[["$","meta",null,{"name":"google","content":"notranslate"}],["$","script",null,{"dangerouslySetInnerHTML":{"__html":"(function(){var t=\"auto\";try{var s=localStorage.getItem(\"pi-theme\");if([\"auto\",\"light\",\"mist\",\"lilac\",\"sand\",\"rose\",\"dark\",\"pine\",\"dusk\",\"ember\",\"slate\",\"contrast-light\",\"contrast-dark\",\"zenburn\"].includes(s))t=s}catch(e){}if(t===\"auto\")t=window.matchMedia(\"(prefers-color-scheme: dark)\").matches?\"dark\":\"light\";var r=document.documentElement;r.dataset.theme=t;r.classList.toggle(\"dark\",[\"dark\",\"pine\",\"dusk\",\"ember\",\"slate\",\"contrast-dark\",\"zenburn\"].includes(t))})();"}}]]}],["$","body",null,{"translate":"no","className":"notranslate","suppressHydrationWarning":true,"children":[["$","$L2",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L3",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":404}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}],["$","$L4",null,{}]]}]]}]]}],{"children":[["$","$1","c",{"children":[["$","$5",null,{"children":["$","$L6",null,{"children":["$","$L7",null,{}]}]}],[["$","link","0",{"rel":"stylesheet","href":"/_next/static/css/49692dbfa6f26eeb.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}]],["$","$L8",null,{"children":["$","$5",null,{"name":"Next.MetadataOutlet","children":"$@9"}]}]]}],{},null,false,null]},null,false,null],["$","$1","h",{"children":[null,["$","$La",null,{"children":"$Lb"}],["$","div",null,{"hidden":true,"children":["$","$Lc",null,{"children":["$","$5",null,{"name":"Next.Metadata","children":"$Ld"}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}],false]],"m":"$undefined","G":["$e",[]],"S":true,"h":null,"r":"$undefined","s":"$undefined","a":"$undefined","l":"$undefined","p":"$undefined","d":"$undefined","b":"
|
|
19
|
+
0:{"P":null,"c":["",""],"q":"","i":false,"f":[[["",{"children":["__PAGE__",{},"$undefined","$undefined",4608]},"$undefined","$undefined",4624],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/_next/static/css/9bcd6051db4f8890.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/_next/static/css/375a9b52d89c0bac.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","2",{"rel":"stylesheet","href":"/_next/static/css/bf49b4e87f26e436.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","3",{"rel":"stylesheet","href":"/_next/static/css/2c3ed27b408ff881.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}]],["$","html",null,{"lang":"en","translate":"no","className":"__variable_9e44ca notranslate","suppressHydrationWarning":true,"children":[["$","head",null,{"children":[["$","meta",null,{"name":"google","content":"notranslate"}],["$","script",null,{"dangerouslySetInnerHTML":{"__html":"(function(){var t=\"auto\";try{var s=localStorage.getItem(\"pi-theme\");if([\"auto\",\"light\",\"mist\",\"lilac\",\"sand\",\"rose\",\"dark\",\"pine\",\"dusk\",\"ember\",\"slate\",\"contrast-light\",\"contrast-dark\",\"zenburn\"].includes(s))t=s}catch(e){}if(t===\"auto\")t=window.matchMedia(\"(prefers-color-scheme: dark)\").matches?\"dark\":\"light\";var r=document.documentElement;r.dataset.theme=t;r.classList.toggle(\"dark\",[\"dark\",\"pine\",\"dusk\",\"ember\",\"slate\",\"contrast-dark\",\"zenburn\"].includes(t))})();"}}]]}],["$","body",null,{"translate":"no","className":"notranslate","suppressHydrationWarning":true,"children":[["$","$L2",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L3",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":404}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}],["$","$L4",null,{}]]}]]}]]}],{"children":[["$","$1","c",{"children":[["$","$5",null,{"children":["$","$L6",null,{"children":["$","$L7",null,{}]}]}],[["$","link","0",{"rel":"stylesheet","href":"/_next/static/css/49692dbfa6f26eeb.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}]],["$","$L8",null,{"children":["$","$5",null,{"name":"Next.MetadataOutlet","children":"$@9"}]}]]}],{},null,false,null]},null,false,null],["$","$1","h",{"children":[null,["$","$La",null,{"children":"$Lb"}],["$","div",null,{"hidden":true,"children":["$","$Lc",null,{"children":["$","$5",null,{"name":"Next.Metadata","children":"$Ld"}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}],false]],"m":"$undefined","G":["$e",[]],"S":true,"h":null,"r":"$undefined","s":"$undefined","a":"$undefined","l":"$undefined","p":"$undefined","d":"$undefined","b":"297ATGH77_vEym6tRQh_6"}
|
|
20
20
|
b:[["$","meta","0",{"charSet":"utf-8"}],["$","meta","1",{"name":"viewport","content":"width=device-width, initial-scale=1, viewport-fit=cover, interactive-widget=resizes-content"}],["$","meta","2",{"name":"theme-color","content":"#ffffff","media":"(prefers-color-scheme: light)"}],["$","meta","3",{"name":"theme-color","content":"#1a1a1a","media":"(prefers-color-scheme: dark)"}]]
|
|
21
21
|
f:I[86869,[],"IconMark"]
|
|
22
22
|
9:null
|