@calmabacus/pi-web 1.2.2 → 1.2.3
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 +10 -10
- package/.next/build-manifest.json +2 -2
- 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 +4 -4
- package/.next/server/app/_not-found.segments/_full.segment.rsc +4 -4
- package/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +4 -4
- package/.next/server/app/_not-found.segments/_tree.segment.rsc +3 -3
- package/.next/server/app/api/app-update/route.js +1 -1
- package/.next/server/app/api/sessions/[id]/route.js +1 -1
- package/.next/server/app/api/sessions/route.js +1 -1
- package/.next/server/app/index.html +1 -1
- package/.next/server/app/index.rsc +6 -6
- package/.next/server/app/index.segments/__PAGE__.segment.rsc +6 -6
- package/.next/server/app/index.segments/_full.segment.rsc +6 -6
- package/.next/server/app/index.segments/_tree.segment.rsc +3 -3
- 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 +5 -5
- package/.next/server/app/login.segments/_full.segment.rsc +5 -5
- package/.next/server/app/login.segments/_tree.segment.rsc +3 -3
- package/.next/server/app/login.segments/login/__PAGE__.segment.rsc +5 -5
- package/.next/server/app/page.js +23 -21
- package/.next/server/app/page_client-reference-manifest.js +1 -1
- package/.next/server/app-paths-manifest.json +10 -10
- package/.next/server/chunks/2243.js +1 -1
- package/.next/server/chunks/6429.js +1 -1
- package/.next/server/chunks/8759.js +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/static/chunks/1278-cee1a583acfdbbe3.js +1 -0
- package/.next/static/chunks/app/{layout-784aeba1512001f4.js → layout-27fe292fb4ac13b1.js} +1 -1
- package/.next/static/chunks/app/page-5fed5824645066c6.js +232 -0
- package/.next/static/css/491a0a5a0e53b1a3.css +1 -0
- package/.next/static/css/f8fa1f54e8c1b29d.css +1 -0
- package/.next/trace +7 -42
- package/.next/trace-build +1 -1
- package/package.json +1 -1
- package/.next/static/chunks/1278-497845aeb7531287.js +0 -1
- package/.next/static/chunks/app/page-3e5eeae6263d1d85.js +0 -230
- package/.next/static/css/64b5dad00e57cbf2.css +0 -1
- package/.next/static/css/b38207f874cd6169.css +0 -1
- /package/.next/static/{b8SGxsoAxmt_qKP0W83xq → bgANcYaziFYzUL8D6omlF}/_buildManifest.js +0 -0
- /package/.next/static/{b8SGxsoAxmt_qKP0W83xq → bgANcYaziFYzUL8D6omlF}/_ssgManifest.js +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
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-27fe292fb4ac13b1.js"],"PwaRegistration"]
|
|
5
5
|
5:I[90484,[],"OutletBoundary"]
|
|
6
6
|
6:"$Sreact.suspense"
|
|
7
7
|
9:I[90484,[],"ViewportBoundary"]
|
|
@@ -10,10 +10,10 @@ d:I[27123,[],"default",1]
|
|
|
10
10
|
:HL["/_next/static/media/7deddc85b7ffd1dc-s.p.woff2","font",{"crossOrigin":"","type":"font/woff2"}]
|
|
11
11
|
:HL["/_next/static/media/ec14413c594b3356-s.p.woff2","font",{"crossOrigin":"","type":"font/woff2"}]
|
|
12
12
|
:HL["/_next/static/css/88714c00e109ce28.css","style"]
|
|
13
|
-
:HL["/_next/static/css/
|
|
14
|
-
:HL["/_next/static/css/
|
|
13
|
+
:HL["/_next/static/css/f8fa1f54e8c1b29d.css","style"]
|
|
14
|
+
:HL["/_next/static/css/491a0a5a0e53b1a3.css","style"]
|
|
15
15
|
8:X
|
|
16
|
-
0:{"P":null,"c":["","_not-found"],"q":"","i":false,"f":[[["",{"children":["_not-found",{"children":["__PAGE__",{},"$undefined","$undefined",4608]},"$undefined","$undefined",4608]},"$undefined","$undefined",4624],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/_next/static/css/88714c00e109ce28.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/_next/static/css/
|
|
16
|
+
0:{"P":null,"c":["","_not-found"],"q":"","i":false,"f":[[["",{"children":["_not-found",{"children":["__PAGE__",{},"$undefined","$undefined",4608]},"$undefined","$undefined",4608]},"$undefined","$undefined",4624],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/_next/static/css/88714c00e109ce28.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/_next/static/css/f8fa1f54e8c1b29d.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","2",{"rel":"stylesheet","href":"/_next/static/css/491a0a5a0e53b1a3.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}]],["$","html",null,{"lang":"en","translate":"no","className":"__variable_66b8ca notranslate","suppressHydrationWarning":true,"children":[["$","head",null,{"children":[["$","meta",null,{"name":"google","content":"notranslate"}],["$","script",null,{"dangerouslySetInnerHTML":{"__html":"(function(){try{if(localStorage.getItem(\"pi-web-sarasa-enabled\")===\"1\")document.documentElement.classList.add(\"sarasa-term-webfont\");var t=localStorage.getItem(\"pi-theme\");var dark=t===\"dark\"||((t==null||t===\"\"||t===\"auto\")&&window.matchMedia(\"(prefers-color-scheme: dark)\").matches);if(dark)document.documentElement.classList.add(\"dark\");var c=dark?\"#242424\":\"#f5f5f5\";var ms=document.querySelectorAll('meta[name=\"theme-color\"]');if(ms.length===0){var m=document.createElement(\"meta\");m.name=\"theme-color\";m.content=c;document.head.appendChild(m)}else{for(var i=0;i<ms.length;i++){ms[i].removeAttribute(\"media\");ms[i].content=c}}}catch(e){}})();"}}]]}],["$","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":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}],["$","$L4",null,{}]]}]]}]]}],{"children":[["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L3",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":[["$","$1","c",{"children":[[["$","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."}]}]]}]}]],null,["$","$L5",null,{"children":["$","$6",null,{"name":"Next.MetadataOutlet","children":"$@7"}]}]]}],{},null,false,null]},null,false,"$8"]},null,false,null],["$","$1","h",{"children":[["$","meta",null,{"name":"robots","content":"noindex"}],["$","$L9",null,{"children":"$La"}],["$","div",null,{"hidden":true,"children":["$","$Lb",null,{"children":["$","$6",null,{"name":"Next.Metadata","children":"$Lc"}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}],false]],"m":"$undefined","G":["$d",[]],"S":true,"h":null,"r":"$undefined","s":"$undefined","a":"$undefined","l":"$undefined","p":"$undefined","d":"$undefined","b":"bgANcYaziFYzUL8D6omlF"}
|
|
17
17
|
8:C
|
|
18
18
|
a:[["$","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":"#f5f5f5"}]]
|
|
19
19
|
e:I[86869,[],"IconMark"]
|
|
@@ -7,13 +7,13 @@
|
|
|
7
7
|
b:I[57121,[],""]
|
|
8
8
|
c:I[74581,[],""]
|
|
9
9
|
:HL["/_next/static/css/88714c00e109ce28.css","style"]
|
|
10
|
-
:HL["/_next/static/css/
|
|
11
|
-
:HL["/_next/static/css/
|
|
10
|
+
:HL["/_next/static/css/f8fa1f54e8c1b29d.css","style"]
|
|
11
|
+
:HL["/_next/static/css/491a0a5a0e53b1a3.css","style"]
|
|
12
12
|
6:X
|
|
13
13
|
e:X
|
|
14
14
|
e:C
|
|
15
|
-
0:{"buildId":"
|
|
16
|
-
14:I[57788,["7177","static/chunks/app/layout-
|
|
15
|
+
0:{"buildId":"bgANcYaziFYzUL8D6omlF","data":[{"rsc":["$","$1","c",{"children":[[["$","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."}]}]]}]}]],null,["$","$L2",null,{"children":["$","$3",null,{"name":"Next.MetadataOutlet","children":"$@4"}]}]]}],"isPartial":"$@5","staleTime":"$6","varyParams":null},{"rsc":["$","$1","h",{"children":[["$","meta",null,{"name":"robots","content":"noindex"}],["$","$L7",null,{"children":[["$","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":"#f5f5f5"}]]}],["$","div",null,{"hidden":true,"children":["$","$L8",null,{"children":["$","$3",null,{"name":"Next.Metadata","children":[["$","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"}],["$","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.svg?v=b1e5fdfb","type":"image/svg+xml"}],["$","link","9",{"rel":"icon","href":"/icons/icon-192.png?v=b1e5fdfb","sizes":"192x192","type":"image/png"}],["$","link","10",{"rel":"icon","href":"/favicon.ico?v=b1e5fdfb","sizes":"any"}],["$","link","11",{"rel":"apple-touch-icon","href":"/icons/apple-touch-icon.png?v=b1e5fdfb","sizes":"180x180","type":"image/png"}],["$","$L9","12",{}]]}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}],"isPartial":"$@a","staleTime":"$6","varyParams":null},{"rsc":["$","$1","c",{"children":[null,["$","$Lb",null,{"parallelRouterKey":"children","template":["$","$Lc",null,{}]}]]}],"isPartial":"$@d","staleTime":"$6","varyParams":"$e"},{"rsc":["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/_next/static/css/88714c00e109ce28.css","precedence":"next"}],["$","link","1",{"rel":"stylesheet","href":"/_next/static/css/f8fa1f54e8c1b29d.css","precedence":"next"}],["$","link","2",{"rel":"stylesheet","href":"/_next/static/css/491a0a5a0e53b1a3.css","precedence":"next"}]],["$","html",null,{"lang":"en","translate":"no","className":"__variable_66b8ca notranslate","suppressHydrationWarning":true,"children":[["$","head",null,{"children":[["$","meta",null,{"name":"google","content":"notranslate"}],["$","script",null,{"dangerouslySetInnerHTML":{"__html":"(function(){try{if(localStorage.getItem(\"pi-web-sarasa-enabled\")===\"1\")document.documentElement.classList.add(\"sarasa-term-webfont\");var t=localStorage.getItem(\"pi-theme\");var dark=t===\"dark\"||((t==null||t===\"\"||t===\"auto\")&&window.matchMedia(\"(prefers-color-scheme: dark)\").matches);if(dark)document.documentElement.classList.add(\"dark\");var c=dark?\"#242424\":\"#f5f5f5\";var ms=document.querySelectorAll('meta[name=\"theme-color\"]');if(ms.length===0){var m=document.createElement(\"meta\");m.name=\"theme-color\";m.content=c;document.head.appendChild(m)}else{for(var i=0;i<ms.length;i++){ms[i].removeAttribute(\"media\");ms[i].content=c}}}catch(e){}})();"}}]]}],["$","body",null,{"translate":"no","className":"notranslate","suppressHydrationWarning":true,"children":["$Lf","$L10"]}]]}]]}],"isPartial":"$@11","staleTime":"$6","varyParams":null}],"isUpgradeableISRFallback":false,"a":"$@12","rootVaryParams":null,"needsRuntimeRequest":"$@13"}
|
|
16
|
+
14:I[57788,["7177","static/chunks/app/layout-27fe292fb4ac13b1.js"],"PwaRegistration"]
|
|
17
17
|
4:null
|
|
18
18
|
f:["$","$Lb",null,{"parallelRouterKey":"children","template":["$","$Lc",null,{}]}]
|
|
19
19
|
10:["$","$L14",null,{}]
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
:HL["/_next/static/media/7deddc85b7ffd1dc-s.p.woff2","font",{"crossOrigin":"","type":"font/woff2"}]
|
|
2
2
|
:HL["/_next/static/media/ec14413c594b3356-s.p.woff2","font",{"crossOrigin":"","type":"font/woff2"}]
|
|
3
3
|
:HL["/_next/static/css/88714c00e109ce28.css","style"]
|
|
4
|
-
:HL["/_next/static/css/
|
|
5
|
-
:HL["/_next/static/css/
|
|
6
|
-
0:{"tree":{"name":"","param":null,"prefetchHints":4176,"slots":{"children":{"name":"_not-found","param":null,"prefetchHints":4192,"slots":{"children":{"name":"__PAGE__","param":null,"prefetchHints":4256,"slots":null}}}}},"staleTime":300,"buildId":"
|
|
4
|
+
:HL["/_next/static/css/f8fa1f54e8c1b29d.css","style"]
|
|
5
|
+
:HL["/_next/static/css/491a0a5a0e53b1a3.css","style"]
|
|
6
|
+
0:{"tree":{"name":"","param":null,"prefetchHints":4176,"slots":{"children":{"name":"_not-found","param":null,"prefetchHints":4192,"slots":{"children":{"name":"__PAGE__","param":null,"prefetchHints":4256,"slots":null}}}}},"staleTime":300,"buildId":"bgANcYaziFYzUL8D6omlF"}
|
|
@@ -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")},1932:a=>{"use strict";a.exports=require("url")},3295:a=>{"use strict";a.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},4573:a=>{"use strict";a.exports=require("node:buffer")},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")},12412:a=>{"use strict";a.exports=require("assert")},14566:a=>{"use strict";a.exports=require("node-pty")},19121:a=>{"use strict";a.exports=require("next/dist/server/app-render/action-async-storage.external.js")},21820:a=>{"use strict";a.exports=require("os")},25076:(a,b,c)=>{"use strict";c.r(b),c.d(b,{handler:()=>z,patchFetch:()=>y,routeModule:()=>u,serverHooks:()=>x,workAsyncStorage:()=>v,workUnitAsyncStorage:()=>w});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(37527);let u=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/zhujunshen/pi-web/app/api/app-update/route.ts",nextConfigOutput:"",userland:()=>c(62445),...{}}),{workAsyncStorage:v,workUnitAsyncStorage:w,serverHooks:x}=u;function y(){return(0,f.patchFetch)({workAsyncStorage:v,workUnitAsyncStorage:w})}async function z(a,b,c){c.requestMeta&&(0,g.setRequestMeta)(a,c.requestMeta),u.isDev&&(0,g.addRequestMeta)(a,"devRequestTimingInternalsEnd",process.hrtime.bigint());let d="/api/app-update/route";"/index"===d&&(d="/");let f=await u.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:v,deploymentId:w,params:x,nextConfig:y,parsedUrl:z,isDraftMode:A,prerenderManifest:B,routerServerContext:C,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,resolvedPathname:F,clientReferenceManifest:G,serverActionsManifest:H}=f,I=(0,j.normalizeAppPath)(d),J=!!(B.dynamicRoutes[I]||B.routes[F]),K=async()=>((null==C?void 0:C.render404)?await C.render404(a,b,z,!1):b.end("This page could not be found"),null);if(J&&!A){let a=!!B.routes[F],b=B.dynamicRoutes[I];if(b&&!1===b.fallback&&!a){if(y.adapterPath)return await K();throw new s.NoFallbackError}}let L=null;!J||u.isDev||A||(L="/index"===(L=F)?"/":L);let M=!0===u.isDev||!J,N=J&&!M;H&&G&&(0,i.setManifestsSingleton)({page:d,clientReferenceManifest:G,serverActionsManifest:H});let O=a.method||"GET",P=(0,h.getTracer)(),Q=P.getActiveScopeSpan(),R=!!(null==C?void 0:C.isWrappedByNextServer),S=!!(0,g.getRequestMeta)(a,"minimalMode"),T=(0,g.getRequestMeta)(a,"incrementalCache")||await u.getIncrementalCache(a,y,B,S);null==T||T.resetRequestCache(),globalThis.__incrementalCache=T;let U={params:x,previewProps:B.preview,renderOpts:{experimental:{authInterrupts:!!y.experimental.authInterrupts,useCacheTimeout:y.experimental.useCacheTimeout},cacheComponents:!!y.cacheComponents,validationLevel:y.experimental.instantInsights.validationLevel,supportsDynamicResponse:M,incrementalCache:T,hmrRefreshHash:(0,g.getRequestMeta)(a,"hmrRefreshHash"),cacheLifeProfiles:y.cacheLife,staticPageGenerationTimeout:y.staticPageGenerationTimeout,waitUntil:c.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:void 0,onInstrumentationRequestError:(b,c,d,e)=>u.onRequestError(a,b,d,e,C)},sharedContext:{buildId:v,deploymentId:w}},V=new k.NodeNextRequest(a),W=new k.NodeNextResponse(b),X=l.NextRequestAdapter.fromNodeNextRequest(V,(0,l.signalFromNodeResponse)(b)),Y=async({previousCacheEntry:e})=>{try{if(!S&&D&&E&&!e)return b.statusCode=404,b.setHeader("x-nextjs-cache","REVALIDATED"),b.end("This page could not be found"),null;let d=await u.handle(X,U);a.fetchMetrics=U.renderOpts.fetchMetrics;let f=U.renderOpts.pendingWaitUntil;f&&c.waitUntil&&(c.waitUntil(f),f=void 0);let g=U.renderOpts.collectedTags;if(!J)return await (0,o.I)(V,W,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!==U.renderOpts.collectedRevalidate&&!(U.renderOpts.collectedRevalidate>=r.INFINITE_CACHE)&&U.renderOpts.collectedRevalidate,e=void 0===U.renderOpts.collectedExpire||U.renderOpts.collectedExpire>=r.INFINITE_CACHE?!1!==c&&c>0?y.expireTime:void 0:U.renderOpts.collectedExpire;return{value:{kind:t.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 u.onRequestError(a,b,{routerKind:"App Router",routePath:d,routeType:"route",revalidateReason:(0,n.getRevalidateReason)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),b}},Z=async(d,f)=>{try{var g,i;let d=await u.handleResponse({req:a,nextConfig:y,cacheKey:L,routeKind:e.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:B,isRoutePPREnabled:!1,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,responseGenerator:Y,waitUntil:c.waitUntil,isMinimalMode:S});if(!J)return;if((null==d||null==(g=d.value)?void 0:g.kind)!==t.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});S||b.setHeader("x-nextjs-cache",D?"REVALIDATED":d.isMiss?"MISS":d.isStale?"STALE":"HIT"),A&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let f=(0,p.fromNodeOutgoingHttpHeaders)(d.value.headers);S&&J||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)(V,W,new Response(d.value.body,{headers:f,status:d.value.status||200}));return}catch(b){if(b instanceof s.NoFallbackError||await u.onRequestError(a,b,{routerKind:"App Router",routePath:I,routeType:"route",revalidateReason:(0,n.getRevalidateReason)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),J)throw b;await (0,o.I)(V,W,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=P.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")||I,g=`${O} ${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(R&&Q)await Z(Q,void 0);else{let b=P.getActiveScopeSpan();await P.withPropagatedContext(a.headers,()=>P.trace(m.BaseServerSpan.handleRequest,{spanName:`${O} ${d}`,kind:h.SpanKind.SERVER,attributes:{"http.method":O,"http.target":a.url}},a=>Z(a,b)),void 0,!R)}}},27910:a=>{"use strict";a.exports=require("stream")},28354:a=>{"use strict";a.exports=require("util")},28802:a=>{"use strict";a.exports=import("@earendil-works/pi-ai")},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")},29862:a=>{"use strict";a.exports=import("@earendil-works/pi-tui")},31421:a=>{"use strict";a.exports=require("node:child_process")},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")},48161:a=>{"use strict";a.exports=require("node:os")},51181:a=>{"use strict";a.exports=require("web-push")},51455:a=>{"use strict";a.exports=require("node:fs/promises")},55511:a=>{"use strict";a.exports=require("crypto")},57975:a=>{"use strict";a.exports=require("node:util")},62445:(a,b,c)=>{"use strict";c.r(b),c.d(b,{GET:()=>o,POST:()=>p,dynamic:()=>g});var d=c(23211),e=c(43618);function f(a){return(0,e.valid)(a)===a&&null===(0,e.prerelease)(a)}let g="force-dynamic",h="1.2.2",i="1"===process.env.PI_WEB_SKIP_VERSION_CHECK,j="1"===process.env.PI_WEB_CAN_UPDATE&&"function"==typeof process.send,k={readonly:"sudo npm install -g @calmabacus/pi-web@latest"};function l(a){let b=k[process.env.PI_WEB_UPDATE_BLOCKED??""];return d.NextResponse.json({...a,canUpdate:j,...b?{manualCommand:b}:{}},{headers:{"Cache-Control":"no-store"}})}async function m(){let a=await fetch("https://registry.npmjs.org/@calmabacus%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/zhudatou630/pi-web/releases/tag/v${c}`:null;if(!d)throw Error("npm registry returned an invalid version");return{currentVersion:h,latestVersion:c,updateAvailable:f(c)&&f(h)&&(0,e.gt)(c,h),releaseUrl:d}}async function n(a){let b=globalThis.__piWebAppUpdateCache??={expiresAt:0};if(!a&&b.value&&b.expiresAt>Date.now())return b.value;b.inFlight||(b.inFlight=m().then(a=>(b.value=a,b.expiresAt=Date.now()+18e5,a)).finally(()=>{b.inFlight=void 0}));try{return await b.inFlight}catch(c){if(!a&&b.value)return b.value;throw c}}async function o(a){let b=new URL(a.url).searchParams;if(i||"1"===b.get("status"))return l({currentVersion:h,latestVersion:h,updateAvailable:!1,releaseUrl:""});try{return l(await n("1"===b.get("force")))}catch(a){return d.NextResponse.json({error:a instanceof Error?a.message:String(a)},{status:502})}}async function p(){if(!j||!process.connected)return d.NextResponse.json({error:"Use a writable npm global installation started with pi-web to update here."},{status:409});let[{hasAppUpdateBlockingSessions:a},{hasAppUpdateBlockingTerminals:b}]=await Promise.all([Promise.all([c.e(426),c.e(974),c.e(402),c.e(6759),c.e(2243),c.e(6429)]).then(c.bind(c,56429)),c.e(3968).then(c.bind(c,73968))]);return globalThis.__piWebUpdating?d.NextResponse.json({error:"Pi Web is already updating."},{status:409}):a()||b()?d.NextResponse.json({error:"Finish running Agent tasks and close terminal sessions before updating."},{status:409}):(globalThis.__piWebUpdating=!0,(0,d.after)(()=>{process.send({type:"pi-web:update"},a=>{a&&(globalThis.__piWebUpdating=!1,console.error("[pi-web] Could not request update:",a))})}),d.NextResponse.json({updating:!0},{status:202}))}},63033:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},72322:a=>{"use strict";a.exports=import("@earendil-works/pi-ai/utils/pi-user-agent")},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")},77598:a=>{"use strict";a.exports=require("node:crypto")},78335:()=>{},79646:a=>{"use strict";a.exports=require("child_process")},79748:a=>{"use strict";a.exports=require("fs/promises")},80481:a=>{"use strict";a.exports=require("node:readline")},81115:a=>{"use strict";a.exports=require("constants")},86439:a=>{"use strict";a.exports=require("next/dist/shared/lib/no-fallback-error.external")},94735:a=>{"use strict";a.exports=require("events")},96487:()=>{}};var b=require("../../../webpack-runtime.js");b.C(a);var c=b.X(0,[4741,1813,3618],()=>b(b.s=25076));module.exports=c})();
|
|
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")},1932:a=>{"use strict";a.exports=require("url")},3295:a=>{"use strict";a.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},4573:a=>{"use strict";a.exports=require("node:buffer")},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")},12412:a=>{"use strict";a.exports=require("assert")},14566:a=>{"use strict";a.exports=require("node-pty")},19121:a=>{"use strict";a.exports=require("next/dist/server/app-render/action-async-storage.external.js")},21820:a=>{"use strict";a.exports=require("os")},25076:(a,b,c)=>{"use strict";c.r(b),c.d(b,{handler:()=>z,patchFetch:()=>y,routeModule:()=>u,serverHooks:()=>x,workAsyncStorage:()=>v,workUnitAsyncStorage:()=>w});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(37527);let u=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/zhujunshen/pi-web/app/api/app-update/route.ts",nextConfigOutput:"",userland:()=>c(62445),...{}}),{workAsyncStorage:v,workUnitAsyncStorage:w,serverHooks:x}=u;function y(){return(0,f.patchFetch)({workAsyncStorage:v,workUnitAsyncStorage:w})}async function z(a,b,c){c.requestMeta&&(0,g.setRequestMeta)(a,c.requestMeta),u.isDev&&(0,g.addRequestMeta)(a,"devRequestTimingInternalsEnd",process.hrtime.bigint());let d="/api/app-update/route";"/index"===d&&(d="/");let f=await u.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:v,deploymentId:w,params:x,nextConfig:y,parsedUrl:z,isDraftMode:A,prerenderManifest:B,routerServerContext:C,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,resolvedPathname:F,clientReferenceManifest:G,serverActionsManifest:H}=f,I=(0,j.normalizeAppPath)(d),J=!!(B.dynamicRoutes[I]||B.routes[F]),K=async()=>((null==C?void 0:C.render404)?await C.render404(a,b,z,!1):b.end("This page could not be found"),null);if(J&&!A){let a=!!B.routes[F],b=B.dynamicRoutes[I];if(b&&!1===b.fallback&&!a){if(y.adapterPath)return await K();throw new s.NoFallbackError}}let L=null;!J||u.isDev||A||(L="/index"===(L=F)?"/":L);let M=!0===u.isDev||!J,N=J&&!M;H&&G&&(0,i.setManifestsSingleton)({page:d,clientReferenceManifest:G,serverActionsManifest:H});let O=a.method||"GET",P=(0,h.getTracer)(),Q=P.getActiveScopeSpan(),R=!!(null==C?void 0:C.isWrappedByNextServer),S=!!(0,g.getRequestMeta)(a,"minimalMode"),T=(0,g.getRequestMeta)(a,"incrementalCache")||await u.getIncrementalCache(a,y,B,S);null==T||T.resetRequestCache(),globalThis.__incrementalCache=T;let U={params:x,previewProps:B.preview,renderOpts:{experimental:{authInterrupts:!!y.experimental.authInterrupts,useCacheTimeout:y.experimental.useCacheTimeout},cacheComponents:!!y.cacheComponents,validationLevel:y.experimental.instantInsights.validationLevel,supportsDynamicResponse:M,incrementalCache:T,hmrRefreshHash:(0,g.getRequestMeta)(a,"hmrRefreshHash"),cacheLifeProfiles:y.cacheLife,staticPageGenerationTimeout:y.staticPageGenerationTimeout,waitUntil:c.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:void 0,onInstrumentationRequestError:(b,c,d,e)=>u.onRequestError(a,b,d,e,C)},sharedContext:{buildId:v,deploymentId:w}},V=new k.NodeNextRequest(a),W=new k.NodeNextResponse(b),X=l.NextRequestAdapter.fromNodeNextRequest(V,(0,l.signalFromNodeResponse)(b)),Y=async({previousCacheEntry:e})=>{try{if(!S&&D&&E&&!e)return b.statusCode=404,b.setHeader("x-nextjs-cache","REVALIDATED"),b.end("This page could not be found"),null;let d=await u.handle(X,U);a.fetchMetrics=U.renderOpts.fetchMetrics;let f=U.renderOpts.pendingWaitUntil;f&&c.waitUntil&&(c.waitUntil(f),f=void 0);let g=U.renderOpts.collectedTags;if(!J)return await (0,o.I)(V,W,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!==U.renderOpts.collectedRevalidate&&!(U.renderOpts.collectedRevalidate>=r.INFINITE_CACHE)&&U.renderOpts.collectedRevalidate,e=void 0===U.renderOpts.collectedExpire||U.renderOpts.collectedExpire>=r.INFINITE_CACHE?!1!==c&&c>0?y.expireTime:void 0:U.renderOpts.collectedExpire;return{value:{kind:t.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 u.onRequestError(a,b,{routerKind:"App Router",routePath:d,routeType:"route",revalidateReason:(0,n.getRevalidateReason)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),b}},Z=async(d,f)=>{try{var g,i;let d=await u.handleResponse({req:a,nextConfig:y,cacheKey:L,routeKind:e.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:B,isRoutePPREnabled:!1,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,responseGenerator:Y,waitUntil:c.waitUntil,isMinimalMode:S});if(!J)return;if((null==d||null==(g=d.value)?void 0:g.kind)!==t.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});S||b.setHeader("x-nextjs-cache",D?"REVALIDATED":d.isMiss?"MISS":d.isStale?"STALE":"HIT"),A&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let f=(0,p.fromNodeOutgoingHttpHeaders)(d.value.headers);S&&J||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)(V,W,new Response(d.value.body,{headers:f,status:d.value.status||200}));return}catch(b){if(b instanceof s.NoFallbackError||await u.onRequestError(a,b,{routerKind:"App Router",routePath:I,routeType:"route",revalidateReason:(0,n.getRevalidateReason)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),J)throw b;await (0,o.I)(V,W,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=P.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")||I,g=`${O} ${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(R&&Q)await Z(Q,void 0);else{let b=P.getActiveScopeSpan();await P.withPropagatedContext(a.headers,()=>P.trace(m.BaseServerSpan.handleRequest,{spanName:`${O} ${d}`,kind:h.SpanKind.SERVER,attributes:{"http.method":O,"http.target":a.url}},a=>Z(a,b)),void 0,!R)}}},27910:a=>{"use strict";a.exports=require("stream")},28354:a=>{"use strict";a.exports=require("util")},28802:a=>{"use strict";a.exports=import("@earendil-works/pi-ai")},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")},29862:a=>{"use strict";a.exports=import("@earendil-works/pi-tui")},31421:a=>{"use strict";a.exports=require("node:child_process")},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")},48161:a=>{"use strict";a.exports=require("node:os")},51181:a=>{"use strict";a.exports=require("web-push")},51455:a=>{"use strict";a.exports=require("node:fs/promises")},55511:a=>{"use strict";a.exports=require("crypto")},57975:a=>{"use strict";a.exports=require("node:util")},62445:(a,b,c)=>{"use strict";c.r(b),c.d(b,{GET:()=>o,POST:()=>p,dynamic:()=>g});var d=c(23211),e=c(43618);function f(a){return(0,e.valid)(a)===a&&null===(0,e.prerelease)(a)}let g="force-dynamic",h="1.2.3",i="1"===process.env.PI_WEB_SKIP_VERSION_CHECK,j="1"===process.env.PI_WEB_CAN_UPDATE&&"function"==typeof process.send,k={readonly:"sudo npm install -g @calmabacus/pi-web@latest"};function l(a){let b=k[process.env.PI_WEB_UPDATE_BLOCKED??""];return d.NextResponse.json({...a,canUpdate:j,...b?{manualCommand:b}:{}},{headers:{"Cache-Control":"no-store"}})}async function m(){let a=await fetch("https://registry.npmjs.org/@calmabacus%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/zhudatou630/pi-web/releases/tag/v${c}`:null;if(!d)throw Error("npm registry returned an invalid version");return{currentVersion:h,latestVersion:c,updateAvailable:f(c)&&f(h)&&(0,e.gt)(c,h),releaseUrl:d}}async function n(a){let b=globalThis.__piWebAppUpdateCache??={expiresAt:0};if(!a&&b.value&&b.expiresAt>Date.now())return b.value;b.inFlight||(b.inFlight=m().then(a=>(b.value=a,b.expiresAt=Date.now()+18e5,a)).finally(()=>{b.inFlight=void 0}));try{return await b.inFlight}catch(c){if(!a&&b.value)return b.value;throw c}}async function o(a){let b=new URL(a.url).searchParams;if(i||"1"===b.get("status"))return l({currentVersion:h,latestVersion:h,updateAvailable:!1,releaseUrl:""});try{return l(await n("1"===b.get("force")))}catch(a){return d.NextResponse.json({error:a instanceof Error?a.message:String(a)},{status:502})}}async function p(){if(!j||!process.connected)return d.NextResponse.json({error:"Use a writable npm global installation started with pi-web to update here."},{status:409});let[{hasAppUpdateBlockingSessions:a},{hasAppUpdateBlockingTerminals:b}]=await Promise.all([Promise.all([c.e(426),c.e(974),c.e(402),c.e(6759),c.e(2243),c.e(6429)]).then(c.bind(c,56429)),c.e(3968).then(c.bind(c,73968))]);return globalThis.__piWebUpdating?d.NextResponse.json({error:"Pi Web is already updating."},{status:409}):a()||b()?d.NextResponse.json({error:"Finish running Agent tasks and close terminal sessions before updating."},{status:409}):(globalThis.__piWebUpdating=!0,(0,d.after)(()=>{process.send({type:"pi-web:update"},a=>{a&&(globalThis.__piWebUpdating=!1,console.error("[pi-web] Could not request update:",a))})}),d.NextResponse.json({updating:!0},{status:202}))}},63033:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},72322:a=>{"use strict";a.exports=import("@earendil-works/pi-ai/utils/pi-user-agent")},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")},77598:a=>{"use strict";a.exports=require("node:crypto")},78335:()=>{},79646:a=>{"use strict";a.exports=require("child_process")},79748:a=>{"use strict";a.exports=require("fs/promises")},80481:a=>{"use strict";a.exports=require("node:readline")},81115:a=>{"use strict";a.exports=require("constants")},86439:a=>{"use strict";a.exports=require("next/dist/shared/lib/no-fallback-error.external")},94735:a=>{"use strict";a.exports=require("events")},96487:()=>{}};var b=require("../../../webpack-runtime.js");b.C(a);var c=b.X(0,[4741,1813,3618],()=>b(b.s=25076));module.exports=c})();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(()=>{var a={};a.id=6849,a.ids=[6849],a.modules={261:a=>{"use strict";a.exports=require("next/dist/shared/lib/router/utils/app-paths")},1932:a=>{"use strict";a.exports=require("url")},3295:a=>{"use strict";a.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},4573:a=>{"use strict";a.exports=require("node:buffer")},4896:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.d(b,{a:()=>i});var e=c(75430),f=a([e]);function g(a){return a?"totalTokens"in a&&"number"==typeof a.totalTokens&&a.totalTokens>0?a.totalTokens:(a.input??0)+(a.output??0)+(a.cacheRead??0)+(a.cacheWrite??0):0}async function h(a,b,c){if(!b)return 0;try{let d=c??await (!globalThis.__piStaticModelRuntime&&(globalThis.__piStaticModelRuntime=e.ModelRuntime.create().catch(a=>{throw delete globalThis.__piStaticModelRuntime,a})),globalThis.__piStaticModelRuntime),f=d.getModel(a,b);if(f?.contextWindow&&f.contextWindow>0)return f.contextWindow;let g=d.getModels(),h=g.find(a=>a.id===b&&a.contextWindow>0);if(h?.contextWindow)return h.contextWindow;let i=g.find(a=>(a.id.endsWith(`/${b}`)||b.endsWith(`/${a.id}`))&&a.contextWindow>0);if(i?.contextWindow)return i.contextWindow;let j=b.toLowerCase();if(j.includes("gemini"))return 1048576;if(j.includes("claude-3-7")||j.includes("claude-sonnet-4")||j.includes("claude-opus-4"))return j.includes("opus-4-6")||j.includes("sonnet-4-6")?1e6:2e5;if(j.includes("gpt-4o")||j.includes("o1")||j.includes("o3"))return 128e3;if(j.includes("deepseek"))return 64e3}catch{}return 0}async function i(a,b,c){try{let d;if(Array.isArray(a))if(b){let c=new Map;for(let b of a)"id"in b&&"string"==typeof b.id&&c.set(b.id,b);let e=[],f=b;for(;f;){let a=c.get(f);if(!a)break;e.push(a),f="parentId"in a?a.parentId:void 0}e.reverse(),d=e}else d=a;else d="getBranch"in a&&"function"==typeof a.getBranch?b?a.getBranch(b):a.getBranch():"getEntries"in a&&"function"==typeof a.getEntries?a.getEntries()??[]:[];if(0===d.length)return null;let f=function(a){for(let b=a.length-1;b>=0;b--){let c=a[b];if("model_change"===c.type&&c.modelId)return{provider:c.provider||"",modelId:c.modelId};if("message"===c.type&&"assistant"===c.message.role&&c.message.model)return{provider:c.message.provider||"",modelId:c.message.model}}return null}(d),i=f?await h(f.provider,f.modelId,c):0,j=function(a){for(let b=a.length-1;b>=0;b--)if("compaction"===a[b].type)return a[b];return null}(d);if(j){let a=d.lastIndexOf(j),b=!1;for(let c=d.length-1;c>a;c--){let a=d[c];if("message"===a.type&&"assistant"===a.message.role){let c=a.message.usage;if(c&&g(c)>0){b=!0;break}}}if(!b)return i>0?{tokens:null,contextWindow:i,percent:null}:null}let k=(0,e.getLastAssistantUsage)(d),l=k?g(k):null;if(null===l&&i<=0)return null;let m=null!==l&&i>0?Math.min(100,Math.round(l/i*1e3)/10):null;return{tokens:l,contextWindow:i,percent:m}}catch{return null}}e=(f.then?(await f)():f)[0],d()}catch(a){d(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")},12412:a=>{"use strict";a.exports=require("assert")},14858:(a,b,c)=>{"use strict";function d(a){return"object"==typeof a&&null!==a&&!Array.isArray(a)}function e(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 f(a){if("message"!==a.type||!d(a.message)||"string"!=typeof a.message.role||"system"===a.message.role)return;let b=a.message.content,c="",f=!1;if("string"==typeof b)c=e(c,b);else if(Array.isArray(b)){for(let a of b)if(d(a)&&("image"===a.type&&(f=!0),"text"===a.type&&(c=e(c,a.text)),c.length>40))break}c.length>40?c=c.slice(0,40)+"…":c||(c=f?"[image]":"assistant"===a.message.role?"[assistant]":"message");let g="user"===a.message.role||"assistant"===a.message.role?a.message.role:void 0;return{...g?{role:g}:{},text:c}}function g(a){let b=new Set,c=new Set(a),d=new Set,e=[...a];for(;e.length>0;){let a=e.pop();if(!d.has(a))for(let f of(d.add(a),(c.has(a)||1!==a.children.length)&&b.add(a),a.children))e.push(f)}let g=(a,b,c)=>({...a,children:[],...b?.length?{compressedEntryIds:b}:{},...c?{branchPreview:c}:{}}),h=a.map(a=>g(a,void 0,f(a.entry))),i=a.map((a,b)=>({source:a,projected:h[b],depth:1})),j=(a,c)=>{let d=[{node:a,compressedEntryIds:[],branchPreview:void 0}],e=new Set;for(;d.length>0;){let{node:a,compressedEntryIds:h,branchPreview:i}=d.pop();if(e.has(a))continue;e.add(a);let j=i??f(a.entry);b.has(a)&&c.children.push(g(a,h,j));for(let c=a.children.length-1;c>=0;c--)d.push({node:a.children[c],compressedEntryIds:b.has(a)?[]:[...h,a.entry.id],branchPreview:b.has(a)?void 0:j})}};for(;i.length>0;){let{source:a,projected:c,depth:d}=i.pop();for(let e of a.children){let a=e;if(d>=200){j(a,c);continue}let h=[],k=f(a.entry);for(;!b.has(a)&&1===a.children.length;)h.push(a.entry.id),a=a.children[0],k??=f(a.entry);if(!b.has(a))continue;let l=g(a,h,k);c.children.push(l),i.push({source:a,projected:l,depth:d+1})}}return h}c.d(b,{y:()=>g})},19121:a=>{"use strict";a.exports=require("next/dist/server/app-render/action-async-storage.external.js")},21906:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.d(b,{CQ:()=>k,GW:()=>m,JS:()=>l});var e=c(55511),f=c(29021),g=c(33873),h=c(45902),i=c(7048),j=a([i]);function k(a){let b=(0,f.readFileSync)(a,"utf8"),c=b.split("\n"),d=c.map(a=>{if(!a.trim())return null;try{return JSON.parse(a)}catch{return null}}),e=d[0];if(e?.type!=="session"||"string"!=typeof e.id)return null;let g=d.slice(1).filter(a=>null!==a);return{path:a,pathKey:(0,h.$)(a),id:e.id,parentPath:"string"==typeof e.parentSession?e.parentSession:void 0,lines:c,entries:g,original:b,isSubagent:!!(0,i.$u)(g,e.id,a)}}function l(a,b,c){let d=[...a.lines],e=JSON.parse(d[0]);if(b?e.parentSession=b:delete e.parentSession,d[0]=JSON.stringify(e),a.isSubagent){if(!b||!c)throw Error("Cannot reparent a subagent without a valid parent session");for(let a=1;a<d.length;a+=1){let e;try{e=JSON.parse(d[a])}catch{continue}"custom"!==e.type||e.customType!==i.tP||"object"!=typeof e.data||null===e.data||Array.isArray(e.data)||(e.data={...e.data,parentSessionId:c,parentSessionPath:b},d[a]=JSON.stringify(e))}}return d.join("\n")}function m(a){let b=[];try{for(let c of a){if(!(0,f.existsSync)(c))continue;let a=(0,g.join)((0,g.dirname)(c),`.${(0,g.basename)(c)}-${(0,e.randomUUID)()}.deleting`);try{(0,f.renameSync)(c,a)}catch(a){if("ENOENT"===a.code)continue;throw a}b.push({original:c,staged:a})}}catch(a){for(let a of b.reverse())try{(0,f.renameSync)(a.staged,a.original)}catch{}throw a}for(let a of b)try{(0,f.unlinkSync)(a.staged)}catch{}}i=(j.then?(await j)():j)[0],d()}catch(a){d(a)}})},27910:a=>{"use strict";a.exports=require("stream")},28354:a=>{"use strict";a.exports=require("util")},28802:a=>{"use strict";a.exports=import("@earendil-works/pi-ai")},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")},29862:a=>{"use strict";a.exports=import("@earendil-works/pi-tui")},31421:a=>{"use strict";a.exports=require("node:child_process")},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")},48161:a=>{"use strict";a.exports=require("node:os")},51181:a=>{"use strict";a.exports=require("web-push")},51455:a=>{"use strict";a.exports=require("node:fs/promises")},55511:a=>{"use strict";a.exports=require("crypto")},57975:a=>{"use strict";a.exports=require("node:util")},63033:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},63406:(a,b,c)=>{"use strict";c.r(b),c.d(b,{handler:()=>z,patchFetch:()=>y,routeModule:()=>u,serverHooks:()=>x,workAsyncStorage:()=>v,workUnitAsyncStorage:()=>w});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(37527);let u=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/zhujunshen/pi-web/app/api/sessions/[id]/route.ts",nextConfigOutput:"",userland:()=>c(98192),...{}}),{workAsyncStorage:v,workUnitAsyncStorage:w,serverHooks:x}=u;function y(){return(0,f.patchFetch)({workAsyncStorage:v,workUnitAsyncStorage:w})}async function z(a,b,c){c.requestMeta&&(0,g.setRequestMeta)(a,c.requestMeta),u.isDev&&(0,g.addRequestMeta)(a,"devRequestTimingInternalsEnd",process.hrtime.bigint());let d="/api/sessions/[id]/route";"/index"===d&&(d="/");let f=await u.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:v,deploymentId:w,params:x,nextConfig:y,parsedUrl:z,isDraftMode:A,prerenderManifest:B,routerServerContext:C,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,resolvedPathname:F,clientReferenceManifest:G,serverActionsManifest:H}=f,I=(0,j.normalizeAppPath)(d),J=!!(B.dynamicRoutes[I]||B.routes[F]),K=async()=>((null==C?void 0:C.render404)?await C.render404(a,b,z,!1):b.end("This page could not be found"),null);if(J&&!A){let a=!!B.routes[F],b=B.dynamicRoutes[I];if(b&&!1===b.fallback&&!a){if(y.adapterPath)return await K();throw new s.NoFallbackError}}let L=null;!J||u.isDev||A||(L="/index"===(L=F)?"/":L);let M=!0===u.isDev||!J,N=J&&!M;H&&G&&(0,i.setManifestsSingleton)({page:d,clientReferenceManifest:G,serverActionsManifest:H});let O=a.method||"GET",P=(0,h.getTracer)(),Q=P.getActiveScopeSpan(),R=!!(null==C?void 0:C.isWrappedByNextServer),S=!!(0,g.getRequestMeta)(a,"minimalMode"),T=(0,g.getRequestMeta)(a,"incrementalCache")||await u.getIncrementalCache(a,y,B,S);null==T||T.resetRequestCache(),globalThis.__incrementalCache=T;let U={params:x,previewProps:B.preview,renderOpts:{experimental:{authInterrupts:!!y.experimental.authInterrupts,useCacheTimeout:y.experimental.useCacheTimeout},cacheComponents:!!y.cacheComponents,validationLevel:y.experimental.instantInsights.validationLevel,supportsDynamicResponse:M,incrementalCache:T,hmrRefreshHash:(0,g.getRequestMeta)(a,"hmrRefreshHash"),cacheLifeProfiles:y.cacheLife,staticPageGenerationTimeout:y.staticPageGenerationTimeout,waitUntil:c.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:void 0,onInstrumentationRequestError:(b,c,d,e)=>u.onRequestError(a,b,d,e,C)},sharedContext:{buildId:v,deploymentId:w}},V=new k.NodeNextRequest(a),W=new k.NodeNextResponse(b),X=l.NextRequestAdapter.fromNodeNextRequest(V,(0,l.signalFromNodeResponse)(b)),Y=async({previousCacheEntry:e})=>{try{if(!S&&D&&E&&!e)return b.statusCode=404,b.setHeader("x-nextjs-cache","REVALIDATED"),b.end("This page could not be found"),null;let d=await u.handle(X,U);a.fetchMetrics=U.renderOpts.fetchMetrics;let f=U.renderOpts.pendingWaitUntil;f&&c.waitUntil&&(c.waitUntil(f),f=void 0);let g=U.renderOpts.collectedTags;if(!J)return await (0,o.I)(V,W,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!==U.renderOpts.collectedRevalidate&&!(U.renderOpts.collectedRevalidate>=r.INFINITE_CACHE)&&U.renderOpts.collectedRevalidate,e=void 0===U.renderOpts.collectedExpire||U.renderOpts.collectedExpire>=r.INFINITE_CACHE?!1!==c&&c>0?y.expireTime:void 0:U.renderOpts.collectedExpire;return{value:{kind:t.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 u.onRequestError(a,b,{routerKind:"App Router",routePath:d,routeType:"route",revalidateReason:(0,n.getRevalidateReason)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),b}},Z=async(d,f)=>{try{var g,i;let d=await u.handleResponse({req:a,nextConfig:y,cacheKey:L,routeKind:e.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:B,isRoutePPREnabled:!1,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,responseGenerator:Y,waitUntil:c.waitUntil,isMinimalMode:S});if(!J)return;if((null==d||null==(g=d.value)?void 0:g.kind)!==t.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});S||b.setHeader("x-nextjs-cache",D?"REVALIDATED":d.isMiss?"MISS":d.isStale?"STALE":"HIT"),A&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let f=(0,p.fromNodeOutgoingHttpHeaders)(d.value.headers);S&&J||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)(V,W,new Response(d.value.body,{headers:f,status:d.value.status||200}));return}catch(b){if(b instanceof s.NoFallbackError||await u.onRequestError(a,b,{routerKind:"App Router",routePath:I,routeType:"route",revalidateReason:(0,n.getRevalidateReason)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),J)throw b;await (0,o.I)(V,W,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=P.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")||I,g=`${O} ${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(R&&Q)await Z(Q,void 0);else{let b=P.getActiveScopeSpan();await P.withPropagatedContext(a.headers,()=>P.trace(m.BaseServerSpan.handleRequest,{spanName:`${O} ${d}`,kind:h.SpanKind.SERVER,attributes:{"http.method":O,"http.target":a.url}},a=>Z(a,b)),void 0,!R)}}},72322:a=>{"use strict";a.exports=import("@earendil-works/pi-ai/utils/pi-user-agent")},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")},77598:a=>{"use strict";a.exports=require("node:crypto")},78335:()=>{},79646:a=>{"use strict";a.exports=require("child_process")},79748:a=>{"use strict";a.exports=require("fs/promises")},80481:a=>{"use strict";a.exports=require("node:readline")},81115:a=>{"use strict";a.exports=require("constants")},86439:a=>{"use strict";a.exports=require("next/dist/shared/lib/no-fallback-error.external")},88914:(a,b,c)=>{"use strict";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("usage"===e.type||"compaction"===e.type||"branch_summary"===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)=>{"use strict";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=>{"use strict";a.exports=require("events")},96487:()=>{},98192:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{DELETE:()=>w,GET:()=>u,PATCH:()=>v});var e=c(23211),f=c(29021),g=c(33873),h=c(21906),i=c(75430),j=c(40402),k=c(45902),l=c(56429),m=c(14858),n=c(89691),o=c(88914),p=c(4896),q=c(7048),r=c(21560),s=c(8102),t=a([h,i,j,l,p,q]);async function u(a,{params:b}){let{id:c}=await b;try{let b,d="1"===new URL(a.url).searchParams.get("force"),g=function(a,b){let c=(0,l.getRpcSession)(a);if(!c?.isAlive())return;if(!b)return c;let d=c.sessionFile;if(!d||c.isRunning())return c;let e=(0,j.xL)(d);return e.overlongLine?(console.log(`[pi-web] session ${a} tail exceeds the probe window; rebuilding from the file`),(0,l.releaseRpcSessionForExternalWrite)(a)?void 0:c):!e.entryId||c.inner.sessionManager.getEntries().some(a=>a?.id===e.entryId)?c:(console.log(`[pi-web] session ${a} changed on disk; rebuilding from the file`),(0,l.releaseRpcSessionForExternalWrite)(a)?void 0:c)}(c,d),h=g?null:await (0,j.os)(c);if(!g&&!h)return e.NextResponse.json({error:"Session not found"},{status:404});let k=g?.inner.sessionManager??i.SessionManager.open(h),s=g?.sessionFile||k.getSessionFile()||h||"",t=k.getEntries(),u=k.getLeafId(),v=(0,m.y)(k.getTree()),w=new URL(a.url).searchParams,x=w.has("deferThinking"),y=w.has("deferMedia"),z=Number(w.get("tail")),A=Number.isFinite(z)&&z>0?Math.min(z,1e3):200,B=(0,j.Uv)(t,u,{deferThinking:x,deferToolResultImages:y,tail:A,sessionId:c}),C=(0,n.c)(t),D=(0,o.P)(t),E=g?.inner?.getContextUsage?.()??await (0,p.a)(k,u),F=k.getSessionName(),G=t.find(a=>"message"===a.type&&"user"===a.message.role),H=G?.type==="message"?G.message:void 0,I=k.getHeader(),J=I?.timestamp??new Date().toISOString();try{J=(0,f.statSync)(s).mtime.toISOString()}catch{}let K=I?.parentSession?await (0,j.u1)(I.parentSession):void 0,L=I?(0,q.$u)(t,I.id,s):null,M=L?await (0,l.getSubagentRun)(c):null,N=(0,q.ph)(t)?.tools??(0,r.dS)(t),O=I?(await (0,j.zH)([{path:s,id:I.id,cwd:I.cwd??"",name:F,created:I.timestamp,modified:J,messageCount:D.totalMessages,firstMessage:H?(b=H.content,"string"==typeof b?b:(Array.isArray(b)?b.find(a=>"text"===a.type)?.text??"":"")||"(no messages)"):"(no messages)",parentSessionId:K,...L?{relation:{kind:"subagent",parentSessionId:L.parentSessionId,profile:L.profile,description:L.description,status:M?.status??L.status}}:I.parentSession?{relation:{kind:"fork",...K?{originSessionId:K}:{}}}:{},transient:!s||!(0,f.existsSync)(s)}]))[0]:null;return e.NextResponse.json({sessionId:c,filePath:s,info:O,leafId:u,tree:v,context:B,stats:D,...E?{contextUsage:E}:{},totalActiveMs:C,...void 0!==N?{toolNames:N}:{}})}catch(a){return e.NextResponse.json({error:String(a)},{status:500})}}async function v(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,j.os)(c);if(!d)return e.NextResponse.json({error:"Session not found"},{status:404});return i.SessionManager.open(d).appendSessionInfo(b.trim()),(0,j.mD)(),e.NextResponse.json({ok:!0})}catch(a){return e.NextResponse.json({error:String(a)},{status:500})}}async function w(a,{params:b}){let{id:c}=await b;try{let a,b=await (0,j.os)(c);if(!b||!(0,f.existsSync)(b)){let a=(0,l.getRpcSession)(c);if(!a)return b&&(0,j.BR)(c),e.NextResponse.json({error:"Session not found"},{status:404});let d=a.sessionFile||b;if(await a.shutdown(),d)try{(0,f.unlinkSync)(d)}catch(a){if("ENOENT"!==a.code)throw a}return(0,j.BR)(c),(0,j.mD)(),e.NextResponse.json({ok:!0})}let d=(0,j.eP)(b)?.parentSession;if(d)try{a=(0,j.eP)(d)?.id}catch{a=void 0}let i=(0,k.$)(b),m=(0,g.dirname)(b),n=(0,f.readdirSync)(m).filter(a=>a.endsWith(".jsonl")).map(a=>(0,h.CQ)((0,g.join)(m,a))).filter(a=>null!==a),o=n.find(a=>a.pathKey===i);if(!o||o.id!==c)return e.NextResponse.json({error:"Session changed while preparing deletion"},{status:409});let p=new Map;for(let a of n){if(!a.parentPath)continue;let b=(0,k.$)(a.parentPath);p.set(b,[...p.get(b)??[],a])}let q=p.get(i)??[],r=new Set;if(!d){let a=q.filter(a=>a.isSubagent);for(;a.length>0;){let b=a.shift();r.has(b.pathKey)||(r.add(b.pathKey),a.push(...p.get(b.pathKey)??[]))}}let t=n.filter(a=>r.has(a.pathKey)),u=q.filter(a=>!r.has(a.pathKey));if(u.some(a=>a.isSubagent)&&(!d||!a))return e.NextResponse.json({error:"Cannot reparent subagent session"},{status:409});let v=[o,...t,...u],w=await (0,l.reserveRpcSessionFileMutation)(v.map(a=>a.id));if(!w)return e.NextResponse.json({error:"Session is busy"},{status:409});try{if(v.some(a=>{try{return(0,f.readFileSync)(a.path,"utf8")!==a.original}catch{return!0}}))return e.NextResponse.json({error:"Session changed while preparing deletion"},{status:409});let g=u.map(b=>({record:b,updated:(0,h.JS)(b,d,a)})),i=[];try{for(let{record:a,updated:b}of g)(0,s.$)(a.path,b),i.push(a);(0,h.GW)([b,...t.map(a=>a.path)])}catch(a){for(let a of i.reverse())try{(0,s.$)(a.path,a.original)}catch{}throw a}for(let a of((0,j.BR)(c),t))(0,j.BR)(a.id);return(0,j.mD)(),e.NextResponse.json({ok:!0})}finally{w()}}catch(a){return e.NextResponse.json({error:String(a)},{status:500})}}[h,i,j,l,p,q]=t.then?(await t)():t,d()}catch(a){d(a)}})}};var b=require("../../../../webpack-runtime.js");b.C(a);var c=b.X(0,[4741,1813,426,974,402,6759,2243,6429],()=>b(b.s=63406));module.exports=c})();
|
|
1
|
+
(()=>{var a={};a.id=6849,a.ids=[6849],a.modules={261:a=>{"use strict";a.exports=require("next/dist/shared/lib/router/utils/app-paths")},1932:a=>{"use strict";a.exports=require("url")},3295:a=>{"use strict";a.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},4573:a=>{"use strict";a.exports=require("node:buffer")},4896:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.d(b,{a:()=>i});var e=c(75430),f=a([e]);function g(a){return a?"totalTokens"in a&&"number"==typeof a.totalTokens&&a.totalTokens>0?a.totalTokens:(a.input??0)+(a.output??0)+(a.cacheRead??0)+(a.cacheWrite??0):0}async function h(a,b,c){if(!b)return 0;try{let d=c??await (!globalThis.__piStaticModelRuntime&&(globalThis.__piStaticModelRuntime=e.ModelRuntime.create().catch(a=>{throw delete globalThis.__piStaticModelRuntime,a})),globalThis.__piStaticModelRuntime),f=d.getModel(a,b);if(f?.contextWindow&&f.contextWindow>0)return f.contextWindow;let g=d.getModels(),h=g.find(a=>a.id===b&&a.contextWindow>0);if(h?.contextWindow)return h.contextWindow;let i=g.find(a=>(a.id.endsWith(`/${b}`)||b.endsWith(`/${a.id}`))&&a.contextWindow>0);if(i?.contextWindow)return i.contextWindow;let j=b.toLowerCase();if(j.includes("gemini"))return 1048576;if(j.includes("claude-3-7")||j.includes("claude-sonnet-4")||j.includes("claude-opus-4"))return j.includes("opus-4-6")||j.includes("sonnet-4-6")?1e6:2e5;if(j.includes("gpt-4o")||j.includes("o1")||j.includes("o3"))return 128e3;if(j.includes("deepseek"))return 64e3}catch{}return 0}async function i(a,b,c){try{let d;if(Array.isArray(a))if(b){let c=new Map;for(let b of a)"id"in b&&"string"==typeof b.id&&c.set(b.id,b);let e=[],f=b;for(;f;){let a=c.get(f);if(!a)break;e.push(a),f="parentId"in a?a.parentId:void 0}e.reverse(),d=e}else d=a;else d="getBranch"in a&&"function"==typeof a.getBranch?b?a.getBranch(b):a.getBranch():"getEntries"in a&&"function"==typeof a.getEntries?a.getEntries()??[]:[];if(0===d.length)return null;let f=function(a){for(let b=a.length-1;b>=0;b--){let c=a[b];if("model_change"===c.type&&c.modelId)return{provider:c.provider||"",modelId:c.modelId};if("message"===c.type&&"assistant"===c.message.role&&c.message.model)return{provider:c.message.provider||"",modelId:c.message.model}}return null}(d),i=f?await h(f.provider,f.modelId,c):0,j=function(a){for(let b=a.length-1;b>=0;b--)if("compaction"===a[b].type)return a[b];return null}(d);if(j){let a=d.lastIndexOf(j),b=!1;for(let c=d.length-1;c>a;c--){let a=d[c];if("message"===a.type&&"assistant"===a.message.role){let c=a.message.usage;if(c&&g(c)>0){b=!0;break}}}if(!b)return i>0?{tokens:null,contextWindow:i,percent:null}:null}let k=(0,e.getLastAssistantUsage)(d),l=k?g(k):null;if(null===l&&i<=0)return null;let m=null!==l&&i>0?Math.min(100,Math.round(l/i*1e3)/10):null;return{tokens:l,contextWindow:i,percent:m}}catch{return null}}e=(f.then?(await f)():f)[0],d()}catch(a){d(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")},12412:a=>{"use strict";a.exports=require("assert")},14858:(a,b,c)=>{"use strict";function d(a){return"object"==typeof a&&null!==a&&!Array.isArray(a)}function e(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 f(a){if("message"!==a.type||!d(a.message)||"string"!=typeof a.message.role||"system"===a.message.role)return;let b=a.message.content,c="",f=!1;if("string"==typeof b)c=e(c,b);else if(Array.isArray(b)){for(let a of b)if(d(a)&&("image"===a.type&&(f=!0),"text"===a.type&&(c=e(c,a.text)),c.length>40))break}c.length>40?c=c.slice(0,40)+"…":c||(c=f?"[image]":"assistant"===a.message.role?"[assistant]":"message");let g="user"===a.message.role||"assistant"===a.message.role?a.message.role:void 0;return{...g?{role:g}:{},text:c}}function g(a){let b=new Set,c=new Set(a),d=new Set,e=[...a];for(;e.length>0;){let a=e.pop();if(!d.has(a))for(let f of(d.add(a),(c.has(a)||1!==a.children.length)&&b.add(a),a.children))e.push(f)}let g=(a,b,c)=>({...a,children:[],...b?.length?{compressedEntryIds:b}:{},...c?{branchPreview:c}:{}}),h=a.map(a=>g(a,void 0,f(a.entry))),i=a.map((a,b)=>({source:a,projected:h[b],depth:1})),j=(a,c)=>{let d=[{node:a,compressedEntryIds:[],branchPreview:void 0}],e=new Set;for(;d.length>0;){let{node:a,compressedEntryIds:h,branchPreview:i}=d.pop();if(e.has(a))continue;e.add(a);let j=i??f(a.entry);b.has(a)&&c.children.push(g(a,h,j));for(let c=a.children.length-1;c>=0;c--)d.push({node:a.children[c],compressedEntryIds:b.has(a)?[]:[...h,a.entry.id],branchPreview:b.has(a)?void 0:j})}};for(;i.length>0;){let{source:a,projected:c,depth:d}=i.pop();for(let e of a.children){let a=e;if(d>=200){j(a,c);continue}let h=[],k=f(a.entry);for(;!b.has(a)&&1===a.children.length;)h.push(a.entry.id),a=a.children[0],k??=f(a.entry);if(!b.has(a))continue;let l=g(a,h,k);c.children.push(l),i.push({source:a,projected:l,depth:d+1})}}return h}c.d(b,{y:()=>g})},19121:a=>{"use strict";a.exports=require("next/dist/server/app-render/action-async-storage.external.js")},21906:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.d(b,{CQ:()=>k,GW:()=>m,JS:()=>l});var e=c(55511),f=c(29021),g=c(33873),h=c(45902),i=c(7048),j=a([i]);function k(a){let b=(0,f.readFileSync)(a,"utf8"),c=b.split("\n"),d=c.map(a=>{if(!a.trim())return null;try{return JSON.parse(a)}catch{return null}}),e=d[0];if(e?.type!=="session"||"string"!=typeof e.id)return null;let g=d.slice(1).filter(a=>null!==a);return{path:a,pathKey:(0,h.$)(a),id:e.id,parentPath:"string"==typeof e.parentSession?e.parentSession:void 0,lines:c,entries:g,original:b,isSubagent:!!(0,i.$u)(g,e.id,a)}}function l(a,b,c){let d=[...a.lines],e=JSON.parse(d[0]);if(b?e.parentSession=b:delete e.parentSession,d[0]=JSON.stringify(e),a.isSubagent){if(!b||!c)throw Error("Cannot reparent a subagent without a valid parent session");for(let a=1;a<d.length;a+=1){let e;try{e=JSON.parse(d[a])}catch{continue}"custom"!==e.type||e.customType!==i.tP||"object"!=typeof e.data||null===e.data||Array.isArray(e.data)||(e.data={...e.data,parentSessionId:c,parentSessionPath:b},d[a]=JSON.stringify(e))}}return d.join("\n")}function m(a){let b=[];try{for(let c of a){if(!(0,f.existsSync)(c))continue;let a=(0,g.join)((0,g.dirname)(c),`.${(0,g.basename)(c)}-${(0,e.randomUUID)()}.deleting`);try{(0,f.renameSync)(c,a)}catch(a){if("ENOENT"===a.code)continue;throw a}b.push({original:c,staged:a})}}catch(a){for(let a of b.reverse())try{(0,f.renameSync)(a.staged,a.original)}catch{}throw a}for(let a of b)try{(0,f.unlinkSync)(a.staged)}catch{}}i=(j.then?(await j)():j)[0],d()}catch(a){d(a)}})},27910:a=>{"use strict";a.exports=require("stream")},28354:a=>{"use strict";a.exports=require("util")},28802:a=>{"use strict";a.exports=import("@earendil-works/pi-ai")},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")},29862:a=>{"use strict";a.exports=import("@earendil-works/pi-tui")},31421:a=>{"use strict";a.exports=require("node:child_process")},33873:a=>{"use strict";a.exports=require("path")},33920:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.d(b,{Zg:()=>k,fi:()=>l});var e=c(29021),f=c(33873),g=c(75430),h=c(8102),i=a([g]);function j(a=(0,g.getAgentDir)()){return(0,f.join)(a,"pi-web","pinned-sessions.json")}function k(a=j()){let b;try{b=(0,e.readFileSync)(a,"utf8")}catch(a){if("ENOENT"===a.code)return[];throw a}let c=JSON.parse(b);return Array.isArray(c)?c.filter(a=>"string"==typeof a):[]}function l(a,b,c=j()){let d=k(c).filter(b=>b!==a);return b&&d.push(a),(0,e.mkdirSync)((0,f.dirname)(c),{recursive:!0}),(0,h.$)(c,JSON.stringify(d)),d}g=(i.then?(await i)():i)[0],d()}catch(a){d(a)}})},44870:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},48161:a=>{"use strict";a.exports=require("node:os")},51181:a=>{"use strict";a.exports=require("web-push")},51455:a=>{"use strict";a.exports=require("node:fs/promises")},55511:a=>{"use strict";a.exports=require("crypto")},57975:a=>{"use strict";a.exports=require("node:util")},63033:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},63406:(a,b,c)=>{"use strict";c.r(b),c.d(b,{handler:()=>z,patchFetch:()=>y,routeModule:()=>u,serverHooks:()=>x,workAsyncStorage:()=>v,workUnitAsyncStorage:()=>w});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(37527);let u=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/zhujunshen/pi-web/app/api/sessions/[id]/route.ts",nextConfigOutput:"",userland:()=>c(98192),...{}}),{workAsyncStorage:v,workUnitAsyncStorage:w,serverHooks:x}=u;function y(){return(0,f.patchFetch)({workAsyncStorage:v,workUnitAsyncStorage:w})}async function z(a,b,c){c.requestMeta&&(0,g.setRequestMeta)(a,c.requestMeta),u.isDev&&(0,g.addRequestMeta)(a,"devRequestTimingInternalsEnd",process.hrtime.bigint());let d="/api/sessions/[id]/route";"/index"===d&&(d="/");let f=await u.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:v,deploymentId:w,params:x,nextConfig:y,parsedUrl:z,isDraftMode:A,prerenderManifest:B,routerServerContext:C,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,resolvedPathname:F,clientReferenceManifest:G,serverActionsManifest:H}=f,I=(0,j.normalizeAppPath)(d),J=!!(B.dynamicRoutes[I]||B.routes[F]),K=async()=>((null==C?void 0:C.render404)?await C.render404(a,b,z,!1):b.end("This page could not be found"),null);if(J&&!A){let a=!!B.routes[F],b=B.dynamicRoutes[I];if(b&&!1===b.fallback&&!a){if(y.adapterPath)return await K();throw new s.NoFallbackError}}let L=null;!J||u.isDev||A||(L="/index"===(L=F)?"/":L);let M=!0===u.isDev||!J,N=J&&!M;H&&G&&(0,i.setManifestsSingleton)({page:d,clientReferenceManifest:G,serverActionsManifest:H});let O=a.method||"GET",P=(0,h.getTracer)(),Q=P.getActiveScopeSpan(),R=!!(null==C?void 0:C.isWrappedByNextServer),S=!!(0,g.getRequestMeta)(a,"minimalMode"),T=(0,g.getRequestMeta)(a,"incrementalCache")||await u.getIncrementalCache(a,y,B,S);null==T||T.resetRequestCache(),globalThis.__incrementalCache=T;let U={params:x,previewProps:B.preview,renderOpts:{experimental:{authInterrupts:!!y.experimental.authInterrupts,useCacheTimeout:y.experimental.useCacheTimeout},cacheComponents:!!y.cacheComponents,validationLevel:y.experimental.instantInsights.validationLevel,supportsDynamicResponse:M,incrementalCache:T,hmrRefreshHash:(0,g.getRequestMeta)(a,"hmrRefreshHash"),cacheLifeProfiles:y.cacheLife,staticPageGenerationTimeout:y.staticPageGenerationTimeout,waitUntil:c.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:void 0,onInstrumentationRequestError:(b,c,d,e)=>u.onRequestError(a,b,d,e,C)},sharedContext:{buildId:v,deploymentId:w}},V=new k.NodeNextRequest(a),W=new k.NodeNextResponse(b),X=l.NextRequestAdapter.fromNodeNextRequest(V,(0,l.signalFromNodeResponse)(b)),Y=async({previousCacheEntry:e})=>{try{if(!S&&D&&E&&!e)return b.statusCode=404,b.setHeader("x-nextjs-cache","REVALIDATED"),b.end("This page could not be found"),null;let d=await u.handle(X,U);a.fetchMetrics=U.renderOpts.fetchMetrics;let f=U.renderOpts.pendingWaitUntil;f&&c.waitUntil&&(c.waitUntil(f),f=void 0);let g=U.renderOpts.collectedTags;if(!J)return await (0,o.I)(V,W,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!==U.renderOpts.collectedRevalidate&&!(U.renderOpts.collectedRevalidate>=r.INFINITE_CACHE)&&U.renderOpts.collectedRevalidate,e=void 0===U.renderOpts.collectedExpire||U.renderOpts.collectedExpire>=r.INFINITE_CACHE?!1!==c&&c>0?y.expireTime:void 0:U.renderOpts.collectedExpire;return{value:{kind:t.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 u.onRequestError(a,b,{routerKind:"App Router",routePath:d,routeType:"route",revalidateReason:(0,n.getRevalidateReason)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),b}},Z=async(d,f)=>{try{var g,i;let d=await u.handleResponse({req:a,nextConfig:y,cacheKey:L,routeKind:e.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:B,isRoutePPREnabled:!1,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,responseGenerator:Y,waitUntil:c.waitUntil,isMinimalMode:S});if(!J)return;if((null==d||null==(g=d.value)?void 0:g.kind)!==t.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});S||b.setHeader("x-nextjs-cache",D?"REVALIDATED":d.isMiss?"MISS":d.isStale?"STALE":"HIT"),A&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let f=(0,p.fromNodeOutgoingHttpHeaders)(d.value.headers);S&&J||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)(V,W,new Response(d.value.body,{headers:f,status:d.value.status||200}));return}catch(b){if(b instanceof s.NoFallbackError||await u.onRequestError(a,b,{routerKind:"App Router",routePath:I,routeType:"route",revalidateReason:(0,n.getRevalidateReason)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),J)throw b;await (0,o.I)(V,W,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=P.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")||I,g=`${O} ${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(R&&Q)await Z(Q,void 0);else{let b=P.getActiveScopeSpan();await P.withPropagatedContext(a.headers,()=>P.trace(m.BaseServerSpan.handleRequest,{spanName:`${O} ${d}`,kind:h.SpanKind.SERVER,attributes:{"http.method":O,"http.target":a.url}},a=>Z(a,b)),void 0,!R)}}},72322:a=>{"use strict";a.exports=import("@earendil-works/pi-ai/utils/pi-user-agent")},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")},77598:a=>{"use strict";a.exports=require("node:crypto")},78335:()=>{},79646:a=>{"use strict";a.exports=require("child_process")},79748:a=>{"use strict";a.exports=require("fs/promises")},80481:a=>{"use strict";a.exports=require("node:readline")},81115:a=>{"use strict";a.exports=require("constants")},86439:a=>{"use strict";a.exports=require("next/dist/shared/lib/no-fallback-error.external")},89691:(a,b,c)=>{"use strict";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=>{"use strict";a.exports=require("events")},96487:()=>{},98192:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{DELETE:()=>x,GET:()=>v,PATCH:()=>w});var e=c(23211),f=c(29021),g=c(33873),h=c(21906),i=c(75430),j=c(40402),k=c(45902),l=c(56429),m=c(14858),n=c(89691),o=c(88914),p=c(4896),q=c(7048),r=c(21560),s=c(8102),t=c(33920),u=a([h,i,j,l,p,q,t]);async function v(a,{params:b}){let{id:c}=await b;try{let b,d="1"===new URL(a.url).searchParams.get("force"),g=function(a,b){let c=(0,l.getRpcSession)(a);if(!c?.isAlive())return;if(!b)return c;let d=c.sessionFile;if(!d||c.isRunning())return c;let e=(0,j.xL)(d);return e.overlongLine?(console.log(`[pi-web] session ${a} tail exceeds the probe window; rebuilding from the file`),(0,l.releaseRpcSessionForExternalWrite)(a)?void 0:c):!e.entryId||c.inner.sessionManager.getEntries().some(a=>a?.id===e.entryId)?c:(console.log(`[pi-web] session ${a} changed on disk; rebuilding from the file`),(0,l.releaseRpcSessionForExternalWrite)(a)?void 0:c)}(c,d),h=g?null:await (0,j.os)(c);if(!g&&!h)return e.NextResponse.json({error:"Session not found"},{status:404});let k=g?.inner.sessionManager??i.SessionManager.open(h),s=g?.sessionFile||k.getSessionFile()||h||"",t=k.getEntries(),u=k.getLeafId(),v=(0,m.y)(k.getTree()),w=new URL(a.url).searchParams,x=w.has("deferThinking"),y=w.has("deferMedia"),z=Number(w.get("tail")),A=Number.isFinite(z)&&z>0?Math.min(z,1e3):200,B=(0,j.Uv)(t,u,{deferThinking:x,deferToolResultImages:y,tail:A,sessionId:c}),C=(0,n.c)(t),D=(0,o.P)(t),E=g?.inner?.getContextUsage?.()??await (0,p.a)(k,u),F=k.getSessionName(),G=t.find(a=>"message"===a.type&&"user"===a.message.role),H=G?.type==="message"?G.message:void 0,I=k.getHeader(),J=I?.timestamp??new Date().toISOString();try{J=(0,f.statSync)(s).mtime.toISOString()}catch{}let K=I?.parentSession?await (0,j.u1)(I.parentSession):void 0,L=I?(0,q.$u)(t,I.id,s):null,M=L?await (0,l.getSubagentRun)(c):null,N=(0,q.ph)(t)?.tools??(0,r.dS)(t),O=I?(await (0,j.zH)([{path:s,id:I.id,cwd:I.cwd??"",name:F,created:I.timestamp,modified:J,messageCount:D.totalMessages,firstMessage:H?(b=H.content,"string"==typeof b?b:(Array.isArray(b)?b.find(a=>"text"===a.type)?.text??"":"")||"(no messages)"):"(no messages)",parentSessionId:K,...L?{relation:{kind:"subagent",parentSessionId:L.parentSessionId,profile:L.profile,description:L.description,status:M?.status??L.status}}:I.parentSession?{relation:{kind:"fork",...K?{originSessionId:K}:{}}}:{},transient:!s||!(0,f.existsSync)(s)}]))[0]:null;return e.NextResponse.json({sessionId:c,filePath:s,info:O,leafId:u,tree:v,context:B,stats:D,...E?{contextUsage:E}:{},totalActiveMs:C,...void 0!==N?{toolNames:N}:{}})}catch(a){return e.NextResponse.json({error:String(a)},{status:500})}}async function w(a,{params:b}){let{id:c}=await b;try{let{name:b,pinned:d}=await a.json();if("string"!=typeof b&&"boolean"!=typeof d)return e.NextResponse.json({error:"name or pinned is required"},{status:400});let f=await (0,j.os)(c);if(!f)return e.NextResponse.json({error:"Session not found"},{status:404});return"boolean"==typeof d&&(0,t.fi)(c,d),"string"==typeof b&&i.SessionManager.open(f).appendSessionInfo(b.trim()),(0,j.mD)(),e.NextResponse.json({ok:!0})}catch(a){return e.NextResponse.json({error:String(a)},{status:500})}}async function x(a,{params:b}){let{id:c}=await b;try{let a,b=await (0,j.os)(c);if(!b||!(0,f.existsSync)(b)){let a=(0,l.getRpcSession)(c);if(!a)return b&&(0,j.BR)(c),e.NextResponse.json({error:"Session not found"},{status:404});let d=a.sessionFile||b;if(await a.shutdown(),d)try{(0,f.unlinkSync)(d)}catch(a){if("ENOENT"!==a.code)throw a}return(0,j.BR)(c),(0,j.mD)(),e.NextResponse.json({ok:!0})}let d=(0,j.eP)(b)?.parentSession;if(d)try{a=(0,j.eP)(d)?.id}catch{a=void 0}let i=(0,k.$)(b),m=(0,g.dirname)(b),n=(0,f.readdirSync)(m).filter(a=>a.endsWith(".jsonl")).map(a=>(0,h.CQ)((0,g.join)(m,a))).filter(a=>null!==a),o=n.find(a=>a.pathKey===i);if(!o||o.id!==c)return e.NextResponse.json({error:"Session changed while preparing deletion"},{status:409});let p=new Map;for(let a of n){if(!a.parentPath)continue;let b=(0,k.$)(a.parentPath);p.set(b,[...p.get(b)??[],a])}let q=p.get(i)??[],r=new Set;if(!d){let a=q.filter(a=>a.isSubagent);for(;a.length>0;){let b=a.shift();r.has(b.pathKey)||(r.add(b.pathKey),a.push(...p.get(b.pathKey)??[]))}}let t=n.filter(a=>r.has(a.pathKey)),u=q.filter(a=>!r.has(a.pathKey));if(u.some(a=>a.isSubagent)&&(!d||!a))return e.NextResponse.json({error:"Cannot reparent subagent session"},{status:409});let v=[o,...t,...u],w=await (0,l.reserveRpcSessionFileMutation)(v.map(a=>a.id));if(!w)return e.NextResponse.json({error:"Session is busy"},{status:409});try{if(v.some(a=>{try{return(0,f.readFileSync)(a.path,"utf8")!==a.original}catch{return!0}}))return e.NextResponse.json({error:"Session changed while preparing deletion"},{status:409});let g=u.map(b=>({record:b,updated:(0,h.JS)(b,d,a)})),i=[];try{for(let{record:a,updated:b}of g)(0,s.$)(a.path,b),i.push(a);(0,h.GW)([b,...t.map(a=>a.path)])}catch(a){for(let a of i.reverse())try{(0,s.$)(a.path,a.original)}catch{}throw a}for(let a of((0,j.BR)(c),t))(0,j.BR)(a.id);return(0,j.mD)(),e.NextResponse.json({ok:!0})}finally{w()}}catch(a){return e.NextResponse.json({error:String(a)},{status:500})}}[h,i,j,l,p,q,t]=u.then?(await u)():u,d()}catch(a){d(a)}})}};var b=require("../../../../webpack-runtime.js");b.C(a);var c=b.X(0,[4741,1813,426,974,402,6759,2243,6429],()=>b(b.s=63406));module.exports=c})();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(()=>{var a={};a.id=1097,a.ids=[1097],a.modules={261:a=>{"use strict";a.exports=require("next/dist/shared/lib/router/utils/app-paths")},1932:a=>{"use strict";a.exports=require("url")},3295:a=>{"use strict";a.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},4573:a=>{"use strict";a.exports=require("node:buffer")},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")},12412:a=>{"use strict";a.exports=require("assert")},19121:a=>{"use strict";a.exports=require("next/dist/server/app-render/action-async-storage.external.js")},27910:a=>{"use strict";a.exports=require("stream")},28354:a=>{"use strict";a.exports=require("util")},28802:a=>{"use strict";a.exports=import("@earendil-works/pi-ai")},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")},29862:a=>{"use strict";a.exports=import("@earendil-works/pi-tui")},31421:a=>{"use strict";a.exports=require("node:child_process")},33873:a=>{"use strict";a.exports=require("path")},40228:(a,b,c)=>{"use strict";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(56429),h=a([f,g]);[f,g]=h.then?(await h)():h;let j="force-dynamic";async function i(a){try{let b="1"===new URL(a.url).searchParams.get("force"),c=(0,f.dQ)({force:b}),d=(0,f.bA)(),[h,i]=await Promise.all([c,(0,f.zH)((0,g.getRpcSessionInfos)())]),j=(0,f.O5)(h,i);return e.NextResponse.json({sessions:j,sessionListVersion:d,runningSessionIds:(0,g.getRunningRpcSessionIds)(),completionNotificationSuppressedSessionIds:(0,g.getCompletionNotificationSuppressedRpcSessionIds)()},{headers:{"Cache-Control":"no-store"}})}catch(a){return e.NextResponse.json({error:String(a)},{status:500,headers:{"Cache-Control":"no-store"}})}}d()}catch(a){d(a)}})},44870:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},48161:a=>{"use strict";a.exports=require("node:os")},51181:a=>{"use strict";a.exports=require("web-push")},51455:a=>{"use strict";a.exports=require("node:fs/promises")},55511:a=>{"use strict";a.exports=require("crypto")},57975:a=>{"use strict";a.exports=require("node:util")},63033:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},68568:(a,b,c)=>{"use strict";c.r(b),c.d(b,{handler:()=>z,patchFetch:()=>y,routeModule:()=>u,serverHooks:()=>x,workAsyncStorage:()=>v,workUnitAsyncStorage:()=>w});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(37527);let u=new d.AppRouteRouteModule({definition:{kind:e.RouteKind.APP_ROUTE,page:"/api/sessions/route",pathname:"/api/sessions",filename:"route",bundlePath:"app/api/sessions/route"},distDir:".next",relativeProjectDir:"",resolvedPagePath:"/home/zhujunshen/pi-web/app/api/sessions/route.ts",nextConfigOutput:"",userland:()=>c(40228),...{}}),{workAsyncStorage:v,workUnitAsyncStorage:w,serverHooks:x}=u;function y(){return(0,f.patchFetch)({workAsyncStorage:v,workUnitAsyncStorage:w})}async function z(a,b,c){c.requestMeta&&(0,g.setRequestMeta)(a,c.requestMeta),u.isDev&&(0,g.addRequestMeta)(a,"devRequestTimingInternalsEnd",process.hrtime.bigint());let d="/api/sessions/route";"/index"===d&&(d="/");let f=await u.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:v,deploymentId:w,params:x,nextConfig:y,parsedUrl:z,isDraftMode:A,prerenderManifest:B,routerServerContext:C,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,resolvedPathname:F,clientReferenceManifest:G,serverActionsManifest:H}=f,I=(0,j.normalizeAppPath)(d),J=!!(B.dynamicRoutes[I]||B.routes[F]),K=async()=>((null==C?void 0:C.render404)?await C.render404(a,b,z,!1):b.end("This page could not be found"),null);if(J&&!A){let a=!!B.routes[F],b=B.dynamicRoutes[I];if(b&&!1===b.fallback&&!a){if(y.adapterPath)return await K();throw new s.NoFallbackError}}let L=null;!J||u.isDev||A||(L="/index"===(L=F)?"/":L);let M=!0===u.isDev||!J,N=J&&!M;H&&G&&(0,i.setManifestsSingleton)({page:d,clientReferenceManifest:G,serverActionsManifest:H});let O=a.method||"GET",P=(0,h.getTracer)(),Q=P.getActiveScopeSpan(),R=!!(null==C?void 0:C.isWrappedByNextServer),S=!!(0,g.getRequestMeta)(a,"minimalMode"),T=(0,g.getRequestMeta)(a,"incrementalCache")||await u.getIncrementalCache(a,y,B,S);null==T||T.resetRequestCache(),globalThis.__incrementalCache=T;let U={params:x,previewProps:B.preview,renderOpts:{experimental:{authInterrupts:!!y.experimental.authInterrupts,useCacheTimeout:y.experimental.useCacheTimeout},cacheComponents:!!y.cacheComponents,validationLevel:y.experimental.instantInsights.validationLevel,supportsDynamicResponse:M,incrementalCache:T,hmrRefreshHash:(0,g.getRequestMeta)(a,"hmrRefreshHash"),cacheLifeProfiles:y.cacheLife,staticPageGenerationTimeout:y.staticPageGenerationTimeout,waitUntil:c.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:void 0,onInstrumentationRequestError:(b,c,d,e)=>u.onRequestError(a,b,d,e,C)},sharedContext:{buildId:v,deploymentId:w}},V=new k.NodeNextRequest(a),W=new k.NodeNextResponse(b),X=l.NextRequestAdapter.fromNodeNextRequest(V,(0,l.signalFromNodeResponse)(b)),Y=async({previousCacheEntry:e})=>{try{if(!S&&D&&E&&!e)return b.statusCode=404,b.setHeader("x-nextjs-cache","REVALIDATED"),b.end("This page could not be found"),null;let d=await u.handle(X,U);a.fetchMetrics=U.renderOpts.fetchMetrics;let f=U.renderOpts.pendingWaitUntil;f&&c.waitUntil&&(c.waitUntil(f),f=void 0);let g=U.renderOpts.collectedTags;if(!J)return await (0,o.I)(V,W,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!==U.renderOpts.collectedRevalidate&&!(U.renderOpts.collectedRevalidate>=r.INFINITE_CACHE)&&U.renderOpts.collectedRevalidate,e=void 0===U.renderOpts.collectedExpire||U.renderOpts.collectedExpire>=r.INFINITE_CACHE?!1!==c&&c>0?y.expireTime:void 0:U.renderOpts.collectedExpire;return{value:{kind:t.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 u.onRequestError(a,b,{routerKind:"App Router",routePath:d,routeType:"route",revalidateReason:(0,n.getRevalidateReason)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),b}},Z=async(d,f)=>{try{var g,i;let d=await u.handleResponse({req:a,nextConfig:y,cacheKey:L,routeKind:e.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:B,isRoutePPREnabled:!1,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,responseGenerator:Y,waitUntil:c.waitUntil,isMinimalMode:S});if(!J)return;if((null==d||null==(g=d.value)?void 0:g.kind)!==t.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});S||b.setHeader("x-nextjs-cache",D?"REVALIDATED":d.isMiss?"MISS":d.isStale?"STALE":"HIT"),A&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let f=(0,p.fromNodeOutgoingHttpHeaders)(d.value.headers);S&&J||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)(V,W,new Response(d.value.body,{headers:f,status:d.value.status||200}));return}catch(b){if(b instanceof s.NoFallbackError||await u.onRequestError(a,b,{routerKind:"App Router",routePath:I,routeType:"route",revalidateReason:(0,n.getRevalidateReason)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),J)throw b;await (0,o.I)(V,W,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=P.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")||I,g=`${O} ${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(R&&Q)await Z(Q,void 0);else{let b=P.getActiveScopeSpan();await P.withPropagatedContext(a.headers,()=>P.trace(m.BaseServerSpan.handleRequest,{spanName:`${O} ${d}`,kind:h.SpanKind.SERVER,attributes:{"http.method":O,"http.target":a.url}},a=>Z(a,b)),void 0,!R)}}},72322:a=>{"use strict";a.exports=import("@earendil-works/pi-ai/utils/pi-user-agent")},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")},77598:a=>{"use strict";a.exports=require("node:crypto")},78335:()=>{},79646:a=>{"use strict";a.exports=require("child_process")},79748:a=>{"use strict";a.exports=require("fs/promises")},80481:a=>{"use strict";a.exports=require("node:readline")},81115:a=>{"use strict";a.exports=require("constants")},86439:a=>{"use strict";a.exports=require("next/dist/shared/lib/no-fallback-error.external")},94735:a=>{"use strict";a.exports=require("events")},96487:()=>{}};var b=require("../../../webpack-runtime.js");b.C(a);var c=b.X(0,[4741,1813,426,974,402,6759,2243,6429],()=>b(b.s=68568));module.exports=c})();
|
|
1
|
+
(()=>{var a={};a.id=1097,a.ids=[1097],a.modules={261:a=>{"use strict";a.exports=require("next/dist/shared/lib/router/utils/app-paths")},1932:a=>{"use strict";a.exports=require("url")},3295:a=>{"use strict";a.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},4573:a=>{"use strict";a.exports=require("node:buffer")},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")},12412:a=>{"use strict";a.exports=require("assert")},19121:a=>{"use strict";a.exports=require("next/dist/server/app-render/action-async-storage.external.js")},27910:a=>{"use strict";a.exports=require("stream")},28354:a=>{"use strict";a.exports=require("util")},28802:a=>{"use strict";a.exports=import("@earendil-works/pi-ai")},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")},29862:a=>{"use strict";a.exports=import("@earendil-works/pi-tui")},31421:a=>{"use strict";a.exports=require("node:child_process")},33873:a=>{"use strict";a.exports=require("path")},33920:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.d(b,{Zg:()=>k,fi:()=>l});var e=c(29021),f=c(33873),g=c(75430),h=c(8102),i=a([g]);function j(a=(0,g.getAgentDir)()){return(0,f.join)(a,"pi-web","pinned-sessions.json")}function k(a=j()){let b;try{b=(0,e.readFileSync)(a,"utf8")}catch(a){if("ENOENT"===a.code)return[];throw a}let c=JSON.parse(b);return Array.isArray(c)?c.filter(a=>"string"==typeof a):[]}function l(a,b,c=j()){let d=k(c).filter(b=>b!==a);return b&&d.push(a),(0,e.mkdirSync)((0,f.dirname)(c),{recursive:!0}),(0,h.$)(c,JSON.stringify(d)),d}g=(i.then?(await i)():i)[0],d()}catch(a){d(a)}})},40228:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{GET:()=>j,dynamic:()=>k});var e=c(23211),f=c(40402),g=c(56429),h=c(33920),i=a([f,g,h]);[f,g,h]=i.then?(await i)():i;let k="force-dynamic";async function j(a){try{let b="1"===new URL(a.url).searchParams.get("force"),c=(0,f.dQ)({force:b}),d=(0,f.bA)(),[i,j]=await Promise.all([c,(0,f.zH)((0,g.getRpcSessionInfos)())]),k=(0,f.O5)(i,j);return e.NextResponse.json({sessions:k,sessionListVersion:d,pinnedSessionIds:(0,h.Zg)(),runningSessionIds:(0,g.getRunningRpcSessionIds)(),completionNotificationSuppressedSessionIds:(0,g.getCompletionNotificationSuppressedRpcSessionIds)()},{headers:{"Cache-Control":"no-store"}})}catch(a){return e.NextResponse.json({error:String(a)},{status:500,headers:{"Cache-Control":"no-store"}})}}d()}catch(a){d(a)}})},44870:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},48161:a=>{"use strict";a.exports=require("node:os")},51181:a=>{"use strict";a.exports=require("web-push")},51455:a=>{"use strict";a.exports=require("node:fs/promises")},55511:a=>{"use strict";a.exports=require("crypto")},57975:a=>{"use strict";a.exports=require("node:util")},63033:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},68568:(a,b,c)=>{"use strict";c.r(b),c.d(b,{handler:()=>z,patchFetch:()=>y,routeModule:()=>u,serverHooks:()=>x,workAsyncStorage:()=>v,workUnitAsyncStorage:()=>w});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(37527);let u=new d.AppRouteRouteModule({definition:{kind:e.RouteKind.APP_ROUTE,page:"/api/sessions/route",pathname:"/api/sessions",filename:"route",bundlePath:"app/api/sessions/route"},distDir:".next",relativeProjectDir:"",resolvedPagePath:"/home/zhujunshen/pi-web/app/api/sessions/route.ts",nextConfigOutput:"",userland:()=>c(40228),...{}}),{workAsyncStorage:v,workUnitAsyncStorage:w,serverHooks:x}=u;function y(){return(0,f.patchFetch)({workAsyncStorage:v,workUnitAsyncStorage:w})}async function z(a,b,c){c.requestMeta&&(0,g.setRequestMeta)(a,c.requestMeta),u.isDev&&(0,g.addRequestMeta)(a,"devRequestTimingInternalsEnd",process.hrtime.bigint());let d="/api/sessions/route";"/index"===d&&(d="/");let f=await u.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:v,deploymentId:w,params:x,nextConfig:y,parsedUrl:z,isDraftMode:A,prerenderManifest:B,routerServerContext:C,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,resolvedPathname:F,clientReferenceManifest:G,serverActionsManifest:H}=f,I=(0,j.normalizeAppPath)(d),J=!!(B.dynamicRoutes[I]||B.routes[F]),K=async()=>((null==C?void 0:C.render404)?await C.render404(a,b,z,!1):b.end("This page could not be found"),null);if(J&&!A){let a=!!B.routes[F],b=B.dynamicRoutes[I];if(b&&!1===b.fallback&&!a){if(y.adapterPath)return await K();throw new s.NoFallbackError}}let L=null;!J||u.isDev||A||(L="/index"===(L=F)?"/":L);let M=!0===u.isDev||!J,N=J&&!M;H&&G&&(0,i.setManifestsSingleton)({page:d,clientReferenceManifest:G,serverActionsManifest:H});let O=a.method||"GET",P=(0,h.getTracer)(),Q=P.getActiveScopeSpan(),R=!!(null==C?void 0:C.isWrappedByNextServer),S=!!(0,g.getRequestMeta)(a,"minimalMode"),T=(0,g.getRequestMeta)(a,"incrementalCache")||await u.getIncrementalCache(a,y,B,S);null==T||T.resetRequestCache(),globalThis.__incrementalCache=T;let U={params:x,previewProps:B.preview,renderOpts:{experimental:{authInterrupts:!!y.experimental.authInterrupts,useCacheTimeout:y.experimental.useCacheTimeout},cacheComponents:!!y.cacheComponents,validationLevel:y.experimental.instantInsights.validationLevel,supportsDynamicResponse:M,incrementalCache:T,hmrRefreshHash:(0,g.getRequestMeta)(a,"hmrRefreshHash"),cacheLifeProfiles:y.cacheLife,staticPageGenerationTimeout:y.staticPageGenerationTimeout,waitUntil:c.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:void 0,onInstrumentationRequestError:(b,c,d,e)=>u.onRequestError(a,b,d,e,C)},sharedContext:{buildId:v,deploymentId:w}},V=new k.NodeNextRequest(a),W=new k.NodeNextResponse(b),X=l.NextRequestAdapter.fromNodeNextRequest(V,(0,l.signalFromNodeResponse)(b)),Y=async({previousCacheEntry:e})=>{try{if(!S&&D&&E&&!e)return b.statusCode=404,b.setHeader("x-nextjs-cache","REVALIDATED"),b.end("This page could not be found"),null;let d=await u.handle(X,U);a.fetchMetrics=U.renderOpts.fetchMetrics;let f=U.renderOpts.pendingWaitUntil;f&&c.waitUntil&&(c.waitUntil(f),f=void 0);let g=U.renderOpts.collectedTags;if(!J)return await (0,o.I)(V,W,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!==U.renderOpts.collectedRevalidate&&!(U.renderOpts.collectedRevalidate>=r.INFINITE_CACHE)&&U.renderOpts.collectedRevalidate,e=void 0===U.renderOpts.collectedExpire||U.renderOpts.collectedExpire>=r.INFINITE_CACHE?!1!==c&&c>0?y.expireTime:void 0:U.renderOpts.collectedExpire;return{value:{kind:t.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 u.onRequestError(a,b,{routerKind:"App Router",routePath:d,routeType:"route",revalidateReason:(0,n.getRevalidateReason)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),b}},Z=async(d,f)=>{try{var g,i;let d=await u.handleResponse({req:a,nextConfig:y,cacheKey:L,routeKind:e.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:B,isRoutePPREnabled:!1,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,responseGenerator:Y,waitUntil:c.waitUntil,isMinimalMode:S});if(!J)return;if((null==d||null==(g=d.value)?void 0:g.kind)!==t.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});S||b.setHeader("x-nextjs-cache",D?"REVALIDATED":d.isMiss?"MISS":d.isStale?"STALE":"HIT"),A&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let f=(0,p.fromNodeOutgoingHttpHeaders)(d.value.headers);S&&J||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)(V,W,new Response(d.value.body,{headers:f,status:d.value.status||200}));return}catch(b){if(b instanceof s.NoFallbackError||await u.onRequestError(a,b,{routerKind:"App Router",routePath:I,routeType:"route",revalidateReason:(0,n.getRevalidateReason)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),J)throw b;await (0,o.I)(V,W,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=P.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")||I,g=`${O} ${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(R&&Q)await Z(Q,void 0);else{let b=P.getActiveScopeSpan();await P.withPropagatedContext(a.headers,()=>P.trace(m.BaseServerSpan.handleRequest,{spanName:`${O} ${d}`,kind:h.SpanKind.SERVER,attributes:{"http.method":O,"http.target":a.url}},a=>Z(a,b)),void 0,!R)}}},72322:a=>{"use strict";a.exports=import("@earendil-works/pi-ai/utils/pi-user-agent")},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")},77598:a=>{"use strict";a.exports=require("node:crypto")},78335:()=>{},79646:a=>{"use strict";a.exports=require("child_process")},79748:a=>{"use strict";a.exports=require("fs/promises")},80481:a=>{"use strict";a.exports=require("node:readline")},81115:a=>{"use strict";a.exports=require("constants")},86439:a=>{"use strict";a.exports=require("next/dist/shared/lib/no-fallback-error.external")},94735:a=>{"use strict";a.exports=require("events")},96487:()=>{}};var b=require("../../../webpack-runtime.js");b.C(a);var c=b.X(0,[4741,1813,426,974,402,6759,2243,6429],()=>b(b.s=68568));module.exports=c})();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
<!DOCTYPE html><html lang="en" translate="no" class="__variable_66b8ca 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/88714c00e109ce28.css" data-precedence="next"/><link rel="stylesheet" href="/_next/static/css/64b5dad00e57cbf2.css" data-precedence="next"/><link rel="stylesheet" href="/_next/static/css/b38207f874cd6169.css" data-precedence="next"/><link rel="stylesheet" href="/_next/static/css/b121d2362092b3ab.css" data-precedence="next"/><link rel="preload" as="script" fetchPriority="low" href="/_next/static/chunks/webpack-1b16208bb4ccd9c1.js"/><script src="/_next/static/chunks/4bd1b696-8a4ab4fdf0ae305a.js" async=""></script><script src="/_next/static/chunks/3794-0a1186eb85c3950f.js" async=""></script><script src="/_next/static/chunks/main-app-eb01db97120cdb49.js" async=""></script><script src="/_next/static/chunks/app/layout-784aeba1512001f4.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/5931-831e2811b884c6c3.js" async=""></script><script src="/_next/static/chunks/1278-497845aeb7531287.js" async=""></script><script src="/_next/static/chunks/app/page-3e5eeae6263d1d85.js" async=""></script><meta name="theme-color" content="#f5f5f5"/><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.svg?v=b1e5fdfb" type="image/svg+xml"/><link rel="icon" href="/icons/icon-192.png?v=b1e5fdfb" sizes="192x192" type="image/png"/><link rel="icon" href="/favicon.ico?v=b1e5fdfb" sizes="any"/><link rel="apple-touch-icon" href="/icons/apple-touch-icon.png?v=b1e5fdfb" sizes="180x180" type="image/png"/><meta name="next-size-adjust" content=""/><meta name="google" content="notranslate"/><script>(function(){try{if(localStorage.getItem("pi-web-sarasa-enabled")==="1")document.documentElement.classList.add("sarasa-term-webfont");var t=localStorage.getItem("pi-theme");var dark=t==="dark"||((t==null||t===""||t==="auto")&&window.matchMedia("(prefers-color-scheme: dark)").matches);if(dark)document.documentElement.classList.add("dark");var c=dark?"#242424":"#f5f5f5";var ms=document.querySelectorAll('meta[name="theme-color"]');if(ms.length===0){var m=document.createElement("meta");m.name="theme-color";m.content=c;document.head.appendChild(m)}else{for(var i=0;i<ms.length;i++){ms[i].removeAttribute("media");ms[i].content=c}}}catch(e){}})();</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-1b16208bb4ccd9c1.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-784aeba1512001f4.js\"],\"PwaRegistration\"]\n5:\"$Sreact.suspense\"\n6:I[21278,[\"7330\",\"static/chunks/d3ac728e-7964f816a1ca64e5.js\",\"3888\",\"static/chunks/e868780c-1584512c612787d7.js\",\"5931\",\"static/chunks/5931-831e2811b884c6c3.js\",\"1278\",\"static/chunks/1278-497845aeb7531287.js\",\"8974\",\"static/chunks/app/page-3e5eeae6263d1d85.js\"],\"I18nProvider\"]\n7:I[40871,[\"7330\",\"static/chunks/d3ac728e-7964f816a1ca64e5.js\",\"3888\",\"static/chunks/e868780c-1584512c612787d7.js\",\"5931\",\"static/chunks/5931-831e2811b884c6c3.js\",\"1278\",\"static/chunks/1278-497845aeb7531287.js\",\"8974\",\"static/chunks/app/page-3e5eeae6263d1d85.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/88714c00e109ce28.css\",\"style\"]\n:HL[\"/_next/static/css/64b5dad00e57cbf2.css\",\"style\"]\n:HL[\"/_next/static/css/b38207f874cd6169.css\",\"style\"]\n:HL[\"/_next/static/css/b121d2362092b3ab.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/88714c00e109ce28.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\",\"nonce\":\"$undefined\"}],[\"$\",\"link\",\"1\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/css/64b5dad00e57cbf2.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\",\"nonce\":\"$undefined\"}],[\"$\",\"link\",\"2\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/css/b38207f874cd6169.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\",\"nonce\":\"$undefined\"}]],[\"$\",\"html\",null,{\"lang\":\"en\",\"translate\":\"no\",\"className\":\"__variable_66b8ca notranslate\",\"suppressHydrationWarning\":true,\"children\":[[\"$\",\"head\",null,{\"children\":[[\"$\",\"meta\",null,{\"name\":\"google\",\"content\":\"notranslate\"}],[\"$\",\"script\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"(function(){try{if(localStorage.getItem(\\\"pi-web-sarasa-enabled\\\")===\\\"1\\\")document.documentElement.classList.add(\\\"sarasa-term-webfont\\\");var t=localStorage.getItem(\\\"pi-theme\\\");var dark=t===\\\"dark\\\"||((t==null||t===\\\"\\\"||t===\\\"auto\\\")\u0026\u0026window.matchMedia(\\\"(prefers-color-scheme: dark)\\\").matches);if(dark)document.documentElement.classList.add(\\\"dark\\\");var c=dark?\\\"#242424\\\":\\\"#f5f5f5\\\";var ms=document.querySelectorAll('meta[name=\\\"theme-color\\\"]');if(ms.length===0){var m=document.createElement(\\\"meta\\\");m.name=\\\"theme-color\\\";m.content=c;document.head.appendChild(m)}else{for(var i=0;i\u003cms.length;i++){ms[i].removeAttribute(\\\"media\\\");ms[i].content=c}}}catch(e){}})();\"}}]]}],[\"$\",\"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/b121d2362092b3ab.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\":\"b8SGxsoAxmt_qKP0W83xq\"}\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\":\"#f5f5f5\"}]]\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.svg?v=b1e5fdfb\",\"type\":\"image/svg+xml\"}],[\"$\",\"link\",\"9\",{\"rel\":\"icon\",\"href\":\"/icons/icon-192.png?v=b1e5fdfb\",\"sizes\":\"192x192\",\"type\":\"image/png\"}],[\"$\",\"link\",\"10\",{\"rel\":\"icon\",\"href\":\"/favicon.ico?v=b1e5fdfb\",\"sizes\":\"any\"}],[\"$\",\"link\",\"11\",{\"rel\":\"apple-touch-icon\",\"href\":\"/icons/apple-touch-icon.png?v=b1e5fdfb\",\"sizes\":\"180x180\",\"type\":\"image/png\"}],[\"$\",\"$Lf\",\"12\",{}]]\n"])</script></body></html>
|
|
1
|
+
<!DOCTYPE html><html lang="en" translate="no" class="__variable_66b8ca 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/88714c00e109ce28.css" data-precedence="next"/><link rel="stylesheet" href="/_next/static/css/f8fa1f54e8c1b29d.css" data-precedence="next"/><link rel="stylesheet" href="/_next/static/css/491a0a5a0e53b1a3.css" data-precedence="next"/><link rel="stylesheet" href="/_next/static/css/b121d2362092b3ab.css" data-precedence="next"/><link rel="preload" as="script" fetchPriority="low" href="/_next/static/chunks/webpack-1b16208bb4ccd9c1.js"/><script src="/_next/static/chunks/4bd1b696-8a4ab4fdf0ae305a.js" async=""></script><script src="/_next/static/chunks/3794-0a1186eb85c3950f.js" async=""></script><script src="/_next/static/chunks/main-app-eb01db97120cdb49.js" async=""></script><script src="/_next/static/chunks/app/layout-27fe292fb4ac13b1.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/5931-831e2811b884c6c3.js" async=""></script><script src="/_next/static/chunks/1278-cee1a583acfdbbe3.js" async=""></script><script src="/_next/static/chunks/app/page-5fed5824645066c6.js" async=""></script><meta name="theme-color" content="#f5f5f5"/><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.svg?v=b1e5fdfb" type="image/svg+xml"/><link rel="icon" href="/icons/icon-192.png?v=b1e5fdfb" sizes="192x192" type="image/png"/><link rel="icon" href="/favicon.ico?v=b1e5fdfb" sizes="any"/><link rel="apple-touch-icon" href="/icons/apple-touch-icon.png?v=b1e5fdfb" sizes="180x180" type="image/png"/><meta name="next-size-adjust" content=""/><meta name="google" content="notranslate"/><script>(function(){try{if(localStorage.getItem("pi-web-sarasa-enabled")==="1")document.documentElement.classList.add("sarasa-term-webfont");var t=localStorage.getItem("pi-theme");var dark=t==="dark"||((t==null||t===""||t==="auto")&&window.matchMedia("(prefers-color-scheme: dark)").matches);if(dark)document.documentElement.classList.add("dark");var c=dark?"#242424":"#f5f5f5";var ms=document.querySelectorAll('meta[name="theme-color"]');if(ms.length===0){var m=document.createElement("meta");m.name="theme-color";m.content=c;document.head.appendChild(m)}else{for(var i=0;i<ms.length;i++){ms[i].removeAttribute("media");ms[i].content=c}}}catch(e){}})();</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-1b16208bb4ccd9c1.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-27fe292fb4ac13b1.js\"],\"PwaRegistration\"]\n5:\"$Sreact.suspense\"\n6:I[21278,[\"7330\",\"static/chunks/d3ac728e-7964f816a1ca64e5.js\",\"3888\",\"static/chunks/e868780c-1584512c612787d7.js\",\"5931\",\"static/chunks/5931-831e2811b884c6c3.js\",\"1278\",\"static/chunks/1278-cee1a583acfdbbe3.js\",\"8974\",\"static/chunks/app/page-5fed5824645066c6.js\"],\"I18nProvider\"]\n7:I[40871,[\"7330\",\"static/chunks/d3ac728e-7964f816a1ca64e5.js\",\"3888\",\"static/chunks/e868780c-1584512c612787d7.js\",\"5931\",\"static/chunks/5931-831e2811b884c6c3.js\",\"1278\",\"static/chunks/1278-cee1a583acfdbbe3.js\",\"8974\",\"static/chunks/app/page-5fed5824645066c6.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/88714c00e109ce28.css\",\"style\"]\n:HL[\"/_next/static/css/f8fa1f54e8c1b29d.css\",\"style\"]\n:HL[\"/_next/static/css/491a0a5a0e53b1a3.css\",\"style\"]\n:HL[\"/_next/static/css/b121d2362092b3ab.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/88714c00e109ce28.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\",\"nonce\":\"$undefined\"}],[\"$\",\"link\",\"1\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/css/f8fa1f54e8c1b29d.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\",\"nonce\":\"$undefined\"}],[\"$\",\"link\",\"2\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/css/491a0a5a0e53b1a3.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\",\"nonce\":\"$undefined\"}]],[\"$\",\"html\",null,{\"lang\":\"en\",\"translate\":\"no\",\"className\":\"__variable_66b8ca notranslate\",\"suppressHydrationWarning\":true,\"children\":[[\"$\",\"head\",null,{\"children\":[[\"$\",\"meta\",null,{\"name\":\"google\",\"content\":\"notranslate\"}],[\"$\",\"script\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"(function(){try{if(localStorage.getItem(\\\"pi-web-sarasa-enabled\\\")===\\\"1\\\")document.documentElement.classList.add(\\\"sarasa-term-webfont\\\");var t=localStorage.getItem(\\\"pi-theme\\\");var dark=t===\\\"dark\\\"||((t==null||t===\\\"\\\"||t===\\\"auto\\\")\u0026\u0026window.matchMedia(\\\"(prefers-color-scheme: dark)\\\").matches);if(dark)document.documentElement.classList.add(\\\"dark\\\");var c=dark?\\\"#242424\\\":\\\"#f5f5f5\\\";var ms=document.querySelectorAll('meta[name=\\\"theme-color\\\"]');if(ms.length===0){var m=document.createElement(\\\"meta\\\");m.name=\\\"theme-color\\\";m.content=c;document.head.appendChild(m)}else{for(var i=0;i\u003cms.length;i++){ms[i].removeAttribute(\\\"media\\\");ms[i].content=c}}}catch(e){}})();\"}}]]}],[\"$\",\"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/b121d2362092b3ab.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\":\"bgANcYaziFYzUL8D6omlF\"}\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\":\"#f5f5f5\"}]]\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.svg?v=b1e5fdfb\",\"type\":\"image/svg+xml\"}],[\"$\",\"link\",\"9\",{\"rel\":\"icon\",\"href\":\"/icons/icon-192.png?v=b1e5fdfb\",\"sizes\":\"192x192\",\"type\":\"image/png\"}],[\"$\",\"link\",\"10\",{\"rel\":\"icon\",\"href\":\"/favicon.ico?v=b1e5fdfb\",\"sizes\":\"any\"}],[\"$\",\"link\",\"11\",{\"rel\":\"apple-touch-icon\",\"href\":\"/icons/apple-touch-icon.png?v=b1e5fdfb\",\"sizes\":\"180x180\",\"type\":\"image/png\"}],[\"$\",\"$Lf\",\"12\",{}]]\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-27fe292fb4ac13b1.js"],"PwaRegistration"]
|
|
5
5
|
5:"$Sreact.suspense"
|
|
6
|
-
6:I[21278,["7330","static/chunks/d3ac728e-7964f816a1ca64e5.js","3888","static/chunks/e868780c-1584512c612787d7.js","5931","static/chunks/5931-831e2811b884c6c3.js","1278","static/chunks/1278-
|
|
7
|
-
7:I[40871,["7330","static/chunks/d3ac728e-7964f816a1ca64e5.js","3888","static/chunks/e868780c-1584512c612787d7.js","5931","static/chunks/5931-831e2811b884c6c3.js","1278","static/chunks/1278-
|
|
6
|
+
6:I[21278,["7330","static/chunks/d3ac728e-7964f816a1ca64e5.js","3888","static/chunks/e868780c-1584512c612787d7.js","5931","static/chunks/5931-831e2811b884c6c3.js","1278","static/chunks/1278-cee1a583acfdbbe3.js","8974","static/chunks/app/page-5fed5824645066c6.js"],"I18nProvider"]
|
|
7
|
+
7:I[40871,["7330","static/chunks/d3ac728e-7964f816a1ca64e5.js","3888","static/chunks/e868780c-1584512c612787d7.js","5931","static/chunks/5931-831e2811b884c6c3.js","1278","static/chunks/1278-cee1a583acfdbbe3.js","8974","static/chunks/app/page-5fed5824645066c6.js"],"AppShell"]
|
|
8
8
|
8:I[90484,[],"OutletBoundary"]
|
|
9
9
|
a:I[90484,[],"ViewportBoundary"]
|
|
10
10
|
c:I[90484,[],"MetadataBoundary"]
|
|
@@ -12,10 +12,10 @@ e:I[27123,[],"default",1]
|
|
|
12
12
|
:HL["/_next/static/media/7deddc85b7ffd1dc-s.p.woff2","font",{"crossOrigin":"","type":"font/woff2"}]
|
|
13
13
|
:HL["/_next/static/media/ec14413c594b3356-s.p.woff2","font",{"crossOrigin":"","type":"font/woff2"}]
|
|
14
14
|
:HL["/_next/static/css/88714c00e109ce28.css","style"]
|
|
15
|
-
:HL["/_next/static/css/
|
|
16
|
-
:HL["/_next/static/css/
|
|
15
|
+
:HL["/_next/static/css/f8fa1f54e8c1b29d.css","style"]
|
|
16
|
+
:HL["/_next/static/css/491a0a5a0e53b1a3.css","style"]
|
|
17
17
|
:HL["/_next/static/css/b121d2362092b3ab.css","style"]
|
|
18
|
-
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/88714c00e109ce28.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/_next/static/css/
|
|
18
|
+
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/88714c00e109ce28.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/_next/static/css/f8fa1f54e8c1b29d.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","2",{"rel":"stylesheet","href":"/_next/static/css/491a0a5a0e53b1a3.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}]],["$","html",null,{"lang":"en","translate":"no","className":"__variable_66b8ca notranslate","suppressHydrationWarning":true,"children":[["$","head",null,{"children":[["$","meta",null,{"name":"google","content":"notranslate"}],["$","script",null,{"dangerouslySetInnerHTML":{"__html":"(function(){try{if(localStorage.getItem(\"pi-web-sarasa-enabled\")===\"1\")document.documentElement.classList.add(\"sarasa-term-webfont\");var t=localStorage.getItem(\"pi-theme\");var dark=t===\"dark\"||((t==null||t===\"\"||t===\"auto\")&&window.matchMedia(\"(prefers-color-scheme: dark)\").matches);if(dark)document.documentElement.classList.add(\"dark\");var c=dark?\"#242424\":\"#f5f5f5\";var ms=document.querySelectorAll('meta[name=\"theme-color\"]');if(ms.length===0){var m=document.createElement(\"meta\");m.name=\"theme-color\";m.content=c;document.head.appendChild(m)}else{for(var i=0;i<ms.length;i++){ms[i].removeAttribute(\"media\");ms[i].content=c}}}catch(e){}})();"}}]]}],["$","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/b121d2362092b3ab.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":"bgANcYaziFYzUL8D6omlF"}
|
|
19
19
|
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":"#f5f5f5"}]]
|
|
20
20
|
f:I[86869,[],"IconMark"]
|
|
21
21
|
9:null
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
1:"$Sreact.fragment"
|
|
2
2
|
2:"$Sreact.suspense"
|
|
3
|
-
3:I[21278,["7330","static/chunks/d3ac728e-7964f816a1ca64e5.js","3888","static/chunks/e868780c-1584512c612787d7.js","5931","static/chunks/5931-831e2811b884c6c3.js","1278","static/chunks/1278-
|
|
4
|
-
4:I[40871,["7330","static/chunks/d3ac728e-7964f816a1ca64e5.js","3888","static/chunks/e868780c-1584512c612787d7.js","5931","static/chunks/5931-831e2811b884c6c3.js","1278","static/chunks/1278-
|
|
3
|
+
3:I[21278,["7330","static/chunks/d3ac728e-7964f816a1ca64e5.js","3888","static/chunks/e868780c-1584512c612787d7.js","5931","static/chunks/5931-831e2811b884c6c3.js","1278","static/chunks/1278-cee1a583acfdbbe3.js","8974","static/chunks/app/page-5fed5824645066c6.js"],"I18nProvider"]
|
|
4
|
+
4:I[40871,["7330","static/chunks/d3ac728e-7964f816a1ca64e5.js","3888","static/chunks/e868780c-1584512c612787d7.js","5931","static/chunks/5931-831e2811b884c6c3.js","1278","static/chunks/1278-cee1a583acfdbbe3.js","8974","static/chunks/app/page-5fed5824645066c6.js"],"AppShell"]
|
|
5
5
|
5:I[90484,[],"OutletBoundary"]
|
|
6
6
|
9:I[90484,[],"ViewportBoundary"]
|
|
7
7
|
a:I[90484,[],"MetadataBoundary"]
|
|
@@ -10,11 +10,11 @@ d:I[57121,[],""]
|
|
|
10
10
|
e:I[74581,[],""]
|
|
11
11
|
:HL["/_next/static/css/b121d2362092b3ab.css","style"]
|
|
12
12
|
:HL["/_next/static/css/88714c00e109ce28.css","style"]
|
|
13
|
-
:HL["/_next/static/css/
|
|
14
|
-
:HL["/_next/static/css/
|
|
13
|
+
:HL["/_next/static/css/f8fa1f54e8c1b29d.css","style"]
|
|
14
|
+
:HL["/_next/static/css/491a0a5a0e53b1a3.css","style"]
|
|
15
15
|
8:X
|
|
16
|
-
0:{"buildId":"
|
|
17
|
-
14:I[57788,["7177","static/chunks/app/layout-
|
|
16
|
+
0:{"buildId":"bgANcYaziFYzUL8D6omlF","data":[{"rsc":["$","$1","c",{"children":[["$","$2",null,{"children":["$","$L3",null,{"children":["$","$L4",null,{}]}]}],[["$","link","0",{"rel":"stylesheet","href":"/_next/static/css/b121d2362092b3ab.css","precedence":"next"}]],["$","$L5",null,{"children":["$","$2",null,{"name":"Next.MetadataOutlet","children":"$@6"}]}]]}],"isPartial":"$@7","staleTime":"$8","varyParams":null},{"rsc":["$","$1","h",{"children":[null,["$","$L9",null,{"children":[["$","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":"#f5f5f5"}]]}],["$","div",null,{"hidden":true,"children":["$","$La",null,{"children":["$","$2",null,{"name":"Next.Metadata","children":[["$","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"}],["$","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.svg?v=b1e5fdfb","type":"image/svg+xml"}],["$","link","9",{"rel":"icon","href":"/icons/icon-192.png?v=b1e5fdfb","sizes":"192x192","type":"image/png"}],["$","link","10",{"rel":"icon","href":"/favicon.ico?v=b1e5fdfb","sizes":"any"}],["$","link","11",{"rel":"apple-touch-icon","href":"/icons/apple-touch-icon.png?v=b1e5fdfb","sizes":"180x180","type":"image/png"}],["$","$Lb","12",{}]]}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}],"isPartial":"$@c","staleTime":"$8","varyParams":null},{"rsc":["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/_next/static/css/88714c00e109ce28.css","precedence":"next"}],["$","link","1",{"rel":"stylesheet","href":"/_next/static/css/f8fa1f54e8c1b29d.css","precedence":"next"}],["$","link","2",{"rel":"stylesheet","href":"/_next/static/css/491a0a5a0e53b1a3.css","precedence":"next"}]],["$","html",null,{"lang":"en","translate":"no","className":"__variable_66b8ca notranslate","suppressHydrationWarning":true,"children":[["$","head",null,{"children":[["$","meta",null,{"name":"google","content":"notranslate"}],["$","script",null,{"dangerouslySetInnerHTML":{"__html":"(function(){try{if(localStorage.getItem(\"pi-web-sarasa-enabled\")===\"1\")document.documentElement.classList.add(\"sarasa-term-webfont\");var t=localStorage.getItem(\"pi-theme\");var dark=t===\"dark\"||((t==null||t===\"\"||t===\"auto\")&&window.matchMedia(\"(prefers-color-scheme: dark)\").matches);if(dark)document.documentElement.classList.add(\"dark\");var c=dark?\"#242424\":\"#f5f5f5\";var ms=document.querySelectorAll('meta[name=\"theme-color\"]');if(ms.length===0){var m=document.createElement(\"meta\");m.name=\"theme-color\";m.content=c;document.head.appendChild(m)}else{for(var i=0;i<ms.length;i++){ms[i].removeAttribute(\"media\");ms[i].content=c}}}catch(e){}})();"}}]]}],["$","body",null,{"translate":"no","className":"notranslate","suppressHydrationWarning":true,"children":[["$","$Ld",null,{"parallelRouterKey":"children","template":["$","$Le",null,{}],"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":"$Lf"}]]}]}]],[]]}],"$L10"]}]]}]]}],"isPartial":"$@11","staleTime":"$8","varyParams":null}],"isUpgradeableISRFallback":false,"a":"$@12","rootVaryParams":null,"needsRuntimeRequest":"$@13"}
|
|
17
|
+
14:I[57788,["7177","static/chunks/app/layout-27fe292fb4ac13b1.js"],"PwaRegistration"]
|
|
18
18
|
6:null
|
|
19
19
|
f:["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]
|
|
20
20
|
10:["$","$L14",null,{}]
|