@baique/pi-web-sky 0.1.29 → 0.1.30
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 +9 -6
- package/.next/build-manifest.json +4 -4
- package/.next/next-server.js.nft.json +1 -1
- package/.next/prerender-manifest.json +3 -3
- package/.next/react-loadable-manifest.json +1 -1
- package/.next/required-server-files.js +7 -7
- package/.next/required-server-files.json +7 -7
- package/.next/routes-manifest.json +20 -0
- package/.next/server/app/_global-error/page.js +2 -2
- 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.js +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 +3 -3
- package/.next/server/app/_not-found.segments/_full.segment.rsc +3 -3
- package/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +3 -3
- package/.next/server/app/_not-found.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/api/agent/[id]/bash-output/route.js +30 -1
- package/.next/server/app/api/agent/[id]/bash-output/route.js.nft.json +1 -1
- package/.next/server/app/api/agent/[id]/bash-output/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/agent/[id]/events/route.js +2 -2
- package/.next/server/app/api/agent/[id]/events/route.js.nft.json +1 -1
- package/.next/server/app/api/agent/[id]/events/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/agent/[id]/route.js +1 -1
- package/.next/server/app/api/agent/[id]/route.js.nft.json +1 -1
- package/.next/server/app/api/agent/[id]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/agent/new/route.js +1 -1
- package/.next/server/app/api/agent/new/route.js.nft.json +1 -1
- package/.next/server/app/api/agent/new/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/agent/running/route.js +1 -1
- package/.next/server/app/api/agent/running/route.js.nft.json +1 -1
- package/.next/server/app/api/agent/running/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/app-update/route.js +1 -1
- package/.next/server/app/api/app-update/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/auth/all-providers/route.js +1 -1
- package/.next/server/app/api/auth/all-providers/route.js.nft.json +1 -1
- package/.next/server/app/api/auth/all-providers/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/auth/api-key/[provider]/route.js +1 -1
- package/.next/server/app/api/auth/api-key/[provider]/route.js.nft.json +1 -1
- package/.next/server/app/api/auth/api-key/[provider]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/auth/login/[provider]/route.js +2 -2
- package/.next/server/app/api/auth/login/[provider]/route.js.nft.json +1 -1
- package/.next/server/app/api/auth/login/[provider]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/auth/logout/[provider]/route.js +1 -1
- package/.next/server/app/api/auth/logout/[provider]/route.js.nft.json +1 -1
- package/.next/server/app/api/auth/logout/[provider]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/auth/providers/route.js +1 -1
- package/.next/server/app/api/auth/providers/route.js.nft.json +1 -1
- package/.next/server/app/api/auth/providers/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/cwd/browse/route.js +1 -1
- package/.next/server/app/api/cwd/browse/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/cwd/validate/route.js +30 -1
- package/.next/server/app/api/cwd/validate/route.js.nft.json +1 -1
- package/.next/server/app/api/cwd/validate/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/default-cwd/route.js +30 -1
- package/.next/server/app/api/default-cwd/route.js.nft.json +1 -1
- package/.next/server/app/api/default-cwd/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/file-index/route.js +30 -1
- package/.next/server/app/api/file-index/route.js.nft.json +1 -1
- package/.next/server/app/api/file-index/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/files/[...path]/route.js +31 -2
- package/.next/server/app/api/files/[...path]/route.js.nft.json +1 -1
- package/.next/server/app/api/files/[...path]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/git/diff/route.js +31 -2
- package/.next/server/app/api/git/diff/route.js.nft.json +1 -1
- package/.next/server/app/api/git/diff/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/git/status/route.js +31 -2
- package/.next/server/app/api/git/status/route.js.nft.json +1 -1
- package/.next/server/app/api/git/status/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/home/route.js +1 -1
- package/.next/server/app/api/home/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/mcp/route.js +30 -1
- package/.next/server/app/api/mcp/route.js.nft.json +1 -1
- package/.next/server/app/api/mcp/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/models/route.js +30 -1
- package/.next/server/app/api/models/route.js.nft.json +1 -1
- package/.next/server/app/api/models/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/models-config/catalog/route.js +1 -1
- package/.next/server/app/api/models-config/catalog/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/models-config/discover/route.js +1 -1
- package/.next/server/app/api/models-config/discover/route.js.nft.json +1 -1
- package/.next/server/app/api/models-config/discover/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/models-config/route.js +1 -1
- package/.next/server/app/api/models-config/route.js.nft.json +1 -1
- package/.next/server/app/api/models-config/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/models-config/test/route.js +1 -1
- package/.next/server/app/api/models-config/test/route.js.nft.json +1 -1
- package/.next/server/app/api/models-config/test/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/plugins/route.js +30 -1
- package/.next/server/app/api/plugins/route.js.nft.json +1 -1
- package/.next/server/app/api/plugins/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/project-trust/route.js +1 -1
- package/.next/server/app/api/project-trust/route.js.nft.json +1 -1
- package/.next/server/app/api/project-trust/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/quota/route.js +1 -1
- package/.next/server/app/api/quota/route.js.nft.json +1 -1
- package/.next/server/app/api/quota/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/search/route.js +30 -0
- package/.next/server/app/api/search/route.js.nft.json +1 -0
- package/.next/server/app/api/search/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/sessions/[id]/auto-name/route.js +2 -2
- package/.next/server/app/api/sessions/[id]/auto-name/route.js.nft.json +1 -1
- package/.next/server/app/api/sessions/[id]/auto-name/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/sessions/[id]/context/route.js +1 -1
- package/.next/server/app/api/sessions/[id]/context/route.js.nft.json +1 -1
- package/.next/server/app/api/sessions/[id]/context/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/sessions/[id]/entries/[entryId]/thinking/route.js +30 -1
- package/.next/server/app/api/sessions/[id]/entries/[entryId]/thinking/route.js.nft.json +1 -1
- package/.next/server/app/api/sessions/[id]/entries/[entryId]/thinking/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/sessions/[id]/export/route.js +31 -2
- package/.next/server/app/api/sessions/[id]/export/route.js.nft.json +1 -1
- package/.next/server/app/api/sessions/[id]/export/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/sessions/[id]/route.js +1 -1
- package/.next/server/app/api/sessions/[id]/route.js.nft.json +1 -1
- package/.next/server/app/api/sessions/[id]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/sessions/[id]/state/route.js +1 -1
- package/.next/server/app/api/sessions/[id]/state/route.js.nft.json +1 -1
- package/.next/server/app/api/sessions/[id]/state/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/sessions/[id]/todos/route.js +1 -1
- package/.next/server/app/api/sessions/[id]/todos/route.js.nft.json +1 -1
- package/.next/server/app/api/sessions/[id]/todos/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/sessions/route.js +1 -1
- package/.next/server/app/api/sessions/route.js.nft.json +1 -1
- package/.next/server/app/api/sessions/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/skills/check/route.js +1 -1
- package/.next/server/app/api/skills/check/route.js.nft.json +1 -1
- package/.next/server/app/api/skills/check/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/skills/install/route.js +30 -1
- package/.next/server/app/api/skills/install/route.js.nft.json +1 -1
- package/.next/server/app/api/skills/install/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/skills/route.js +31 -2
- package/.next/server/app/api/skills/route.js.nft.json +1 -1
- package/.next/server/app/api/skills/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/skills/search/route.js +1 -1
- package/.next/server/app/api/skills/search/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/skills/update/route.js +1 -1
- package/.next/server/app/api/skills/update/route.js.nft.json +1 -1
- package/.next/server/app/api/skills/update/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/tasks/[id]/route.js +1 -0
- package/.next/server/app/api/tasks/[id]/route.js.nft.json +1 -0
- package/.next/server/app/api/tasks/[id]/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/tasks/route.js +30 -0
- package/.next/server/app/api/tasks/route.js.nft.json +1 -0
- package/.next/server/app/api/tasks/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/terminal/[id]/events/route.js +2 -2
- package/.next/server/app/api/terminal/[id]/events/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/terminal/[id]/route.js +1 -1
- package/.next/server/app/api/terminal/[id]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/terminal/route.js +2 -2
- package/.next/server/app/api/terminal/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/route.js +30 -1
- package/.next/server/app/api/worktrees/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/route_client-reference-manifest.js +1 -1
- package/.next/server/app/favicon.ico/route.js +1 -1
- package/.next/server/app/index.html +1 -1
- package/.next/server/app/index.rsc +5 -5
- package/.next/server/app/index.segments/__PAGE__.segment.rsc +5 -5
- package/.next/server/app/index.segments/_full.segment.rsc +5 -5
- package/.next/server/app/index.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/manifest.webmanifest/route.js +2 -2
- package/.next/server/app/manifest.webmanifest/route_client-reference-manifest.js +1 -1
- package/.next/server/app/page.js +8 -8
- package/.next/server/app/page_client-reference-manifest.js +1 -1
- package/.next/server/app-paths-manifest.json +9 -6
- package/.next/server/chunks/1457.js +30 -0
- package/.next/server/chunks/2430.js +4 -4
- package/.next/server/chunks/3379.js +1 -1
- package/.next/server/chunks/402.js +3 -0
- package/.next/server/chunks/7513.js +30 -0
- package/.next/server/middleware-build-manifest.js +1 -1
- package/.next/server/middleware-react-loadable-manifest.js +1 -1
- package/.next/server/middleware.js +3 -3
- package/.next/server/next-font-manifest.js +1 -1
- package/.next/server/next-font-manifest.json +1 -1
- package/.next/server/pages/404.html +1 -1
- package/.next/server/pages/500.html +1 -1
- package/.next/server/server-reference-manifest.json +1 -1
- package/.next/static/TTcBG2A8ypXXieSlP70n7/_buildManifest.js +1 -0
- package/.next/static/chunks/3266.be4a8006cf72695c.js +1 -0
- package/.next/static/chunks/app/_global-error/page-9217583a4a003fdc.js +1 -0
- package/.next/static/chunks/app/_not-found/{page-af4fe23994cb3d66.js → page-8cea8d8de35f4da4.js} +1 -1
- package/.next/static/chunks/app/api/agent/[id]/bash-output/route-9217583a4a003fdc.js +1 -0
- package/.next/static/chunks/app/api/agent/[id]/events/route-9217583a4a003fdc.js +1 -0
- package/.next/static/chunks/app/api/agent/[id]/route-9217583a4a003fdc.js +1 -0
- package/.next/static/chunks/app/api/agent/new/route-9217583a4a003fdc.js +1 -0
- package/.next/static/chunks/app/api/agent/running/route-9217583a4a003fdc.js +1 -0
- package/.next/static/chunks/app/api/app-update/route-9217583a4a003fdc.js +1 -0
- package/.next/static/chunks/app/api/auth/all-providers/route-9217583a4a003fdc.js +1 -0
- package/.next/static/chunks/app/api/auth/api-key/[provider]/route-9217583a4a003fdc.js +1 -0
- package/.next/static/chunks/app/api/auth/login/[provider]/route-9217583a4a003fdc.js +1 -0
- package/.next/static/chunks/app/api/auth/logout/[provider]/route-9217583a4a003fdc.js +1 -0
- package/.next/static/chunks/app/api/auth/providers/route-9217583a4a003fdc.js +1 -0
- package/.next/static/chunks/app/api/cwd/browse/route-9217583a4a003fdc.js +1 -0
- package/.next/static/chunks/app/api/cwd/validate/route-9217583a4a003fdc.js +1 -0
- package/.next/static/chunks/app/api/default-cwd/route-9217583a4a003fdc.js +1 -0
- package/.next/static/chunks/app/api/file-index/route-9217583a4a003fdc.js +1 -0
- package/.next/static/chunks/app/api/files/[...path]/route-9217583a4a003fdc.js +1 -0
- package/.next/static/chunks/app/api/git/diff/route-9217583a4a003fdc.js +1 -0
- package/.next/static/chunks/app/api/git/status/route-9217583a4a003fdc.js +1 -0
- package/.next/static/chunks/app/api/home/route-9217583a4a003fdc.js +1 -0
- package/.next/static/chunks/app/api/mcp/route-9217583a4a003fdc.js +1 -0
- package/.next/static/chunks/app/api/models/route-9217583a4a003fdc.js +1 -0
- package/.next/static/chunks/app/api/models-config/catalog/route-9217583a4a003fdc.js +1 -0
- package/.next/static/chunks/app/api/models-config/discover/route-9217583a4a003fdc.js +1 -0
- package/.next/static/chunks/app/api/models-config/route-9217583a4a003fdc.js +1 -0
- package/.next/static/chunks/app/api/models-config/test/route-9217583a4a003fdc.js +1 -0
- package/.next/static/chunks/app/api/plugins/route-9217583a4a003fdc.js +1 -0
- package/.next/static/chunks/app/api/project-trust/route-9217583a4a003fdc.js +1 -0
- package/.next/static/chunks/app/api/quota/route-9217583a4a003fdc.js +1 -0
- package/.next/static/chunks/app/api/search/route-9217583a4a003fdc.js +1 -0
- package/.next/static/chunks/app/api/sessions/[id]/auto-name/route-9217583a4a003fdc.js +1 -0
- package/.next/static/chunks/app/api/sessions/[id]/context/route-9217583a4a003fdc.js +1 -0
- package/.next/static/chunks/app/api/sessions/[id]/entries/[entryId]/thinking/route-9217583a4a003fdc.js +1 -0
- package/.next/static/chunks/app/api/sessions/[id]/export/route-9217583a4a003fdc.js +1 -0
- package/.next/static/chunks/app/api/sessions/[id]/route-9217583a4a003fdc.js +1 -0
- package/.next/static/chunks/app/api/sessions/[id]/state/route-9217583a4a003fdc.js +1 -0
- package/.next/static/chunks/app/api/sessions/[id]/todos/route-9217583a4a003fdc.js +1 -0
- package/.next/static/chunks/app/api/sessions/route-9217583a4a003fdc.js +1 -0
- package/.next/static/chunks/app/api/skills/check/route-9217583a4a003fdc.js +1 -0
- package/.next/static/chunks/app/api/skills/install/route-9217583a4a003fdc.js +1 -0
- package/.next/static/chunks/app/api/skills/route-9217583a4a003fdc.js +1 -0
- package/.next/static/chunks/app/api/skills/search/route-9217583a4a003fdc.js +1 -0
- package/.next/static/chunks/app/api/skills/update/route-9217583a4a003fdc.js +1 -0
- package/.next/static/chunks/app/api/tasks/[id]/route-9217583a4a003fdc.js +1 -0
- package/.next/static/chunks/app/api/tasks/route-9217583a4a003fdc.js +1 -0
- package/.next/static/chunks/app/api/terminal/[id]/events/route-9217583a4a003fdc.js +1 -0
- package/.next/static/chunks/app/api/terminal/[id]/route-9217583a4a003fdc.js +1 -0
- package/.next/static/chunks/app/api/terminal/route-9217583a4a003fdc.js +1 -0
- package/.next/static/chunks/app/api/worktrees/route-9217583a4a003fdc.js +1 -0
- package/.next/static/chunks/app/{layout-39ce378956fd5a02.js → layout-4a6dc9d78a818cb5.js} +1 -1
- package/.next/static/chunks/app/manifest.webmanifest/route-9217583a4a003fdc.js +1 -0
- package/.next/static/chunks/app/page-2783998ff89bdbe5.js +89 -0
- package/.next/static/chunks/{main-app-b3e8a8d15d83e1f0.js → main-app-dd2385a1a5a588df.js} +1 -1
- package/.next/static/chunks/next/dist/client/components/builtin/app-error-9217583a4a003fdc.js +1 -0
- package/.next/static/chunks/next/dist/client/components/builtin/forbidden-9217583a4a003fdc.js +1 -0
- package/.next/static/chunks/next/dist/client/components/builtin/global-error-be943dcb89867ab9.js +1 -0
- package/.next/static/chunks/next/dist/client/components/builtin/not-found-9217583a4a003fdc.js +1 -0
- package/.next/static/chunks/next/dist/client/components/builtin/unauthorized-9217583a4a003fdc.js +1 -0
- package/.next/static/chunks/{webpack-943c1769a851c233.js → webpack-3d4b32814d426e7a.js} +1 -1
- package/.next/static/css/f72c938555d9bdff.css +1 -0
- package/.next/trace +40 -7
- package/.next/trace-build +1 -1
- package/.next/types/app/api/agent/[id]/bash-output/route.ts +1 -1
- package/.next/types/app/api/agent/[id]/events/route.ts +1 -1
- package/.next/types/app/api/agent/[id]/route.ts +1 -1
- package/.next/types/app/api/agent/new/route.ts +1 -1
- package/.next/types/app/api/agent/running/route.ts +1 -1
- package/.next/types/app/api/app-update/route.ts +1 -1
- package/.next/types/app/api/auth/all-providers/route.ts +1 -1
- package/.next/types/app/api/auth/api-key/[provider]/route.ts +1 -1
- package/.next/types/app/api/auth/login/[provider]/route.ts +1 -1
- package/.next/types/app/api/auth/logout/[provider]/route.ts +1 -1
- package/.next/types/app/api/auth/providers/route.ts +1 -1
- package/.next/types/app/api/cwd/browse/route.ts +1 -1
- package/.next/types/app/api/cwd/validate/route.ts +1 -1
- package/.next/types/app/api/default-cwd/route.ts +1 -1
- package/.next/types/app/api/file-index/route.ts +1 -1
- package/.next/types/app/api/files/[...path]/route.ts +1 -1
- package/.next/types/app/api/git/diff/route.ts +1 -1
- package/.next/types/app/api/git/status/route.ts +1 -1
- package/.next/types/app/api/home/route.ts +1 -1
- package/.next/types/app/api/mcp/route.ts +1 -1
- package/.next/types/app/api/models/route.ts +1 -1
- package/.next/types/app/api/models-config/catalog/route.ts +1 -1
- package/.next/types/app/api/models-config/discover/route.ts +1 -1
- package/.next/types/app/api/models-config/route.ts +1 -1
- package/.next/types/app/api/models-config/test/route.ts +1 -1
- package/.next/types/app/api/plugins/route.ts +1 -1
- package/.next/types/app/api/project-trust/route.ts +1 -1
- package/.next/types/app/api/quota/route.ts +1 -1
- package/.next/types/app/api/search/route.ts +353 -0
- package/.next/types/app/api/sessions/[id]/auto-name/route.ts +1 -1
- package/.next/types/app/api/sessions/[id]/context/route.ts +1 -1
- package/.next/types/app/api/sessions/[id]/entries/[entryId]/thinking/route.ts +1 -1
- package/.next/types/app/api/sessions/[id]/export/route.ts +1 -1
- package/.next/types/app/api/sessions/[id]/route.ts +1 -1
- package/.next/types/app/api/sessions/[id]/state/route.ts +1 -1
- package/.next/types/app/api/sessions/[id]/todos/route.ts +1 -1
- package/.next/types/app/api/sessions/route.ts +1 -1
- package/.next/types/app/api/skills/check/route.ts +1 -1
- package/.next/types/app/api/skills/install/route.ts +1 -1
- package/.next/types/app/api/skills/route.ts +1 -1
- package/.next/types/app/api/skills/search/route.ts +1 -1
- package/.next/types/app/api/skills/update/route.ts +1 -1
- package/.next/types/app/api/tasks/[id]/route.ts +353 -0
- package/.next/types/app/api/tasks/route.ts +353 -0
- package/.next/types/app/api/terminal/[id]/events/route.ts +1 -1
- package/.next/types/app/api/terminal/[id]/route.ts +1 -1
- package/.next/types/app/api/terminal/route.ts +1 -1
- package/.next/types/app/api/worktrees/route.ts +1 -1
- package/.next/types/app/layout.ts +1 -1
- package/.next/types/app/page.ts +1 -1
- package/.next/types/routes.d.ts +4 -1
- package/.next/types/validator.ts +27 -0
- package/package.json +1 -1
- package/.next/server/chunks/5582.js +0 -3
- package/.next/server/chunks/6429.js +0 -1
- package/.next/static/bJ6XzmAhuZk7Lcv1obacU/_buildManifest.js +0 -1
- package/.next/static/chunks/3266.5b76f9f71c8cef44.js +0 -1
- package/.next/static/chunks/app/_global-error/page-c30a6d7676fbc094.js +0 -1
- package/.next/static/chunks/app/api/agent/[id]/bash-output/route-c30a6d7676fbc094.js +0 -1
- package/.next/static/chunks/app/api/agent/[id]/events/route-c30a6d7676fbc094.js +0 -1
- package/.next/static/chunks/app/api/agent/[id]/route-c30a6d7676fbc094.js +0 -1
- package/.next/static/chunks/app/api/agent/new/route-c30a6d7676fbc094.js +0 -1
- package/.next/static/chunks/app/api/agent/running/route-c30a6d7676fbc094.js +0 -1
- package/.next/static/chunks/app/api/app-update/route-c30a6d7676fbc094.js +0 -1
- package/.next/static/chunks/app/api/auth/all-providers/route-c30a6d7676fbc094.js +0 -1
- package/.next/static/chunks/app/api/auth/api-key/[provider]/route-c30a6d7676fbc094.js +0 -1
- package/.next/static/chunks/app/api/auth/login/[provider]/route-c30a6d7676fbc094.js +0 -1
- package/.next/static/chunks/app/api/auth/logout/[provider]/route-c30a6d7676fbc094.js +0 -1
- package/.next/static/chunks/app/api/auth/providers/route-c30a6d7676fbc094.js +0 -1
- package/.next/static/chunks/app/api/cwd/browse/route-c30a6d7676fbc094.js +0 -1
- package/.next/static/chunks/app/api/cwd/validate/route-c30a6d7676fbc094.js +0 -1
- package/.next/static/chunks/app/api/default-cwd/route-c30a6d7676fbc094.js +0 -1
- package/.next/static/chunks/app/api/file-index/route-c30a6d7676fbc094.js +0 -1
- package/.next/static/chunks/app/api/files/[...path]/route-c30a6d7676fbc094.js +0 -1
- package/.next/static/chunks/app/api/git/diff/route-c30a6d7676fbc094.js +0 -1
- package/.next/static/chunks/app/api/git/status/route-c30a6d7676fbc094.js +0 -1
- package/.next/static/chunks/app/api/home/route-c30a6d7676fbc094.js +0 -1
- package/.next/static/chunks/app/api/mcp/route-c30a6d7676fbc094.js +0 -1
- package/.next/static/chunks/app/api/models/route-c30a6d7676fbc094.js +0 -1
- package/.next/static/chunks/app/api/models-config/catalog/route-c30a6d7676fbc094.js +0 -1
- package/.next/static/chunks/app/api/models-config/discover/route-c30a6d7676fbc094.js +0 -1
- package/.next/static/chunks/app/api/models-config/route-c30a6d7676fbc094.js +0 -1
- package/.next/static/chunks/app/api/models-config/test/route-c30a6d7676fbc094.js +0 -1
- package/.next/static/chunks/app/api/plugins/route-c30a6d7676fbc094.js +0 -1
- package/.next/static/chunks/app/api/project-trust/route-c30a6d7676fbc094.js +0 -1
- package/.next/static/chunks/app/api/quota/route-c30a6d7676fbc094.js +0 -1
- package/.next/static/chunks/app/api/sessions/[id]/auto-name/route-c30a6d7676fbc094.js +0 -1
- package/.next/static/chunks/app/api/sessions/[id]/context/route-c30a6d7676fbc094.js +0 -1
- package/.next/static/chunks/app/api/sessions/[id]/entries/[entryId]/thinking/route-c30a6d7676fbc094.js +0 -1
- package/.next/static/chunks/app/api/sessions/[id]/export/route-c30a6d7676fbc094.js +0 -1
- package/.next/static/chunks/app/api/sessions/[id]/route-c30a6d7676fbc094.js +0 -1
- package/.next/static/chunks/app/api/sessions/[id]/state/route-c30a6d7676fbc094.js +0 -1
- package/.next/static/chunks/app/api/sessions/[id]/todos/route-c30a6d7676fbc094.js +0 -1
- package/.next/static/chunks/app/api/sessions/route-c30a6d7676fbc094.js +0 -1
- package/.next/static/chunks/app/api/skills/check/route-c30a6d7676fbc094.js +0 -1
- package/.next/static/chunks/app/api/skills/install/route-c30a6d7676fbc094.js +0 -1
- package/.next/static/chunks/app/api/skills/route-c30a6d7676fbc094.js +0 -1
- package/.next/static/chunks/app/api/skills/search/route-c30a6d7676fbc094.js +0 -1
- package/.next/static/chunks/app/api/skills/update/route-c30a6d7676fbc094.js +0 -1
- package/.next/static/chunks/app/api/terminal/[id]/events/route-c30a6d7676fbc094.js +0 -1
- package/.next/static/chunks/app/api/terminal/[id]/route-c30a6d7676fbc094.js +0 -1
- package/.next/static/chunks/app/api/terminal/route-c30a6d7676fbc094.js +0 -1
- package/.next/static/chunks/app/api/worktrees/route-c30a6d7676fbc094.js +0 -1
- package/.next/static/chunks/app/manifest.webmanifest/route-c30a6d7676fbc094.js +0 -1
- package/.next/static/chunks/app/page-8f8a15534e6f0b1a.js +0 -89
- package/.next/static/chunks/next/dist/client/components/builtin/app-error-c30a6d7676fbc094.js +0 -1
- package/.next/static/chunks/next/dist/client/components/builtin/forbidden-c30a6d7676fbc094.js +0 -1
- package/.next/static/chunks/next/dist/client/components/builtin/global-error-00a4badaccb388e6.js +0 -1
- package/.next/static/chunks/next/dist/client/components/builtin/not-found-c30a6d7676fbc094.js +0 -1
- package/.next/static/chunks/next/dist/client/components/builtin/unauthorized-c30a6d7676fbc094.js +0 -1
- package/.next/static/css/45519303fb5fd138.css +0 -1
- package/public/icons/apple-touch-icon.png +0 -0
- package/public/icons/icon-192.png +0 -0
- package/public/icons/icon-512.png +0 -0
- /package/.next/static/{bJ6XzmAhuZk7Lcv1obacU → TTcBG2A8ypXXieSlP70n7}/_ssgManifest.js +0 -0
|
@@ -0,0 +1,353 @@
|
|
|
1
|
+
// File: /Users/baique/work/develop/project/pi-web-sky/app/api/tasks/route.ts
|
|
2
|
+
import * as entry from '../../../../../app/api/tasks/route.js'
|
|
3
|
+
import type { NextRequest } from 'next/server.js'
|
|
4
|
+
|
|
5
|
+
import type { InstantConfigForTypeCheckInternal, Prefetch } from 'next/dist/build/segment-config/app/app-segment-config.js'
|
|
6
|
+
|
|
7
|
+
type TEntry = typeof import('../../../../../app/api/tasks/route.js')
|
|
8
|
+
|
|
9
|
+
type SegmentParams<T extends Object = any> = T extends Record<string, any>
|
|
10
|
+
? { [K in keyof T]: T[K] extends string ? string | string[] | undefined : never }
|
|
11
|
+
: T
|
|
12
|
+
|
|
13
|
+
// Check that the entry is a valid entry
|
|
14
|
+
checkFields<Diff<{
|
|
15
|
+
GET?: Function
|
|
16
|
+
HEAD?: Function
|
|
17
|
+
OPTIONS?: Function
|
|
18
|
+
POST?: Function
|
|
19
|
+
PUT?: Function
|
|
20
|
+
DELETE?: Function
|
|
21
|
+
PATCH?: Function
|
|
22
|
+
config?: {}
|
|
23
|
+
generateStaticParams?: Function
|
|
24
|
+
instant?: InstantConfigForTypeCheckInternal
|
|
25
|
+
prefetch?: Prefetch
|
|
26
|
+
unstable_dynamicStaleTime?: number
|
|
27
|
+
revalidate?: RevalidateRange<TEntry> | false
|
|
28
|
+
dynamic?: 'auto' | 'force-dynamic' | 'error' | 'force-static'
|
|
29
|
+
dynamicParams?: boolean
|
|
30
|
+
fetchCache?: 'auto' | 'force-no-store' | 'only-no-store' | 'default-no-store' | 'default-cache' | 'only-cache' | 'force-cache'
|
|
31
|
+
/** @deprecated The `preferredRegion` config is deprecated. Remove this export. */
|
|
32
|
+
preferredRegion?: 'auto' | 'global' | 'home' | string | string[]
|
|
33
|
+
runtime?: 'nodejs' | 'experimental-edge' | 'edge'
|
|
34
|
+
maxDuration?: number
|
|
35
|
+
|
|
36
|
+
}, TEntry, ''>>()
|
|
37
|
+
|
|
38
|
+
type RouteContext = { params: Promise<SegmentParams> }
|
|
39
|
+
// Check the prop type of the entry function
|
|
40
|
+
if ('GET' in entry) {
|
|
41
|
+
checkFields<
|
|
42
|
+
Diff<
|
|
43
|
+
ParamCheck<Request | NextRequest>,
|
|
44
|
+
{
|
|
45
|
+
__tag__: 'GET'
|
|
46
|
+
__param_position__: 'first'
|
|
47
|
+
__param_type__: FirstArg<MaybeField<TEntry, 'GET'>>
|
|
48
|
+
},
|
|
49
|
+
'GET'
|
|
50
|
+
>
|
|
51
|
+
>()
|
|
52
|
+
checkFields<
|
|
53
|
+
Diff<
|
|
54
|
+
ParamCheck<RouteContext>,
|
|
55
|
+
{
|
|
56
|
+
__tag__: 'GET'
|
|
57
|
+
__param_position__: 'second'
|
|
58
|
+
__param_type__: SecondArg<MaybeField<TEntry, 'GET'>>
|
|
59
|
+
},
|
|
60
|
+
'GET'
|
|
61
|
+
>
|
|
62
|
+
>()
|
|
63
|
+
|
|
64
|
+
checkFields<
|
|
65
|
+
Diff<
|
|
66
|
+
{
|
|
67
|
+
__tag__: 'GET',
|
|
68
|
+
__return_type__: Response | void | never | Promise<Response | void | never>
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
__tag__: 'GET',
|
|
72
|
+
__return_type__: ReturnType<MaybeField<TEntry, 'GET'>>
|
|
73
|
+
},
|
|
74
|
+
'GET'
|
|
75
|
+
>
|
|
76
|
+
>()
|
|
77
|
+
}
|
|
78
|
+
// Check the prop type of the entry function
|
|
79
|
+
if ('HEAD' in entry) {
|
|
80
|
+
checkFields<
|
|
81
|
+
Diff<
|
|
82
|
+
ParamCheck<Request | NextRequest>,
|
|
83
|
+
{
|
|
84
|
+
__tag__: 'HEAD'
|
|
85
|
+
__param_position__: 'first'
|
|
86
|
+
__param_type__: FirstArg<MaybeField<TEntry, 'HEAD'>>
|
|
87
|
+
},
|
|
88
|
+
'HEAD'
|
|
89
|
+
>
|
|
90
|
+
>()
|
|
91
|
+
checkFields<
|
|
92
|
+
Diff<
|
|
93
|
+
ParamCheck<RouteContext>,
|
|
94
|
+
{
|
|
95
|
+
__tag__: 'HEAD'
|
|
96
|
+
__param_position__: 'second'
|
|
97
|
+
__param_type__: SecondArg<MaybeField<TEntry, 'HEAD'>>
|
|
98
|
+
},
|
|
99
|
+
'HEAD'
|
|
100
|
+
>
|
|
101
|
+
>()
|
|
102
|
+
|
|
103
|
+
checkFields<
|
|
104
|
+
Diff<
|
|
105
|
+
{
|
|
106
|
+
__tag__: 'HEAD',
|
|
107
|
+
__return_type__: Response | void | never | Promise<Response | void | never>
|
|
108
|
+
},
|
|
109
|
+
{
|
|
110
|
+
__tag__: 'HEAD',
|
|
111
|
+
__return_type__: ReturnType<MaybeField<TEntry, 'HEAD'>>
|
|
112
|
+
},
|
|
113
|
+
'HEAD'
|
|
114
|
+
>
|
|
115
|
+
>()
|
|
116
|
+
}
|
|
117
|
+
// Check the prop type of the entry function
|
|
118
|
+
if ('OPTIONS' in entry) {
|
|
119
|
+
checkFields<
|
|
120
|
+
Diff<
|
|
121
|
+
ParamCheck<Request | NextRequest>,
|
|
122
|
+
{
|
|
123
|
+
__tag__: 'OPTIONS'
|
|
124
|
+
__param_position__: 'first'
|
|
125
|
+
__param_type__: FirstArg<MaybeField<TEntry, 'OPTIONS'>>
|
|
126
|
+
},
|
|
127
|
+
'OPTIONS'
|
|
128
|
+
>
|
|
129
|
+
>()
|
|
130
|
+
checkFields<
|
|
131
|
+
Diff<
|
|
132
|
+
ParamCheck<RouteContext>,
|
|
133
|
+
{
|
|
134
|
+
__tag__: 'OPTIONS'
|
|
135
|
+
__param_position__: 'second'
|
|
136
|
+
__param_type__: SecondArg<MaybeField<TEntry, 'OPTIONS'>>
|
|
137
|
+
},
|
|
138
|
+
'OPTIONS'
|
|
139
|
+
>
|
|
140
|
+
>()
|
|
141
|
+
|
|
142
|
+
checkFields<
|
|
143
|
+
Diff<
|
|
144
|
+
{
|
|
145
|
+
__tag__: 'OPTIONS',
|
|
146
|
+
__return_type__: Response | void | never | Promise<Response | void | never>
|
|
147
|
+
},
|
|
148
|
+
{
|
|
149
|
+
__tag__: 'OPTIONS',
|
|
150
|
+
__return_type__: ReturnType<MaybeField<TEntry, 'OPTIONS'>>
|
|
151
|
+
},
|
|
152
|
+
'OPTIONS'
|
|
153
|
+
>
|
|
154
|
+
>()
|
|
155
|
+
}
|
|
156
|
+
// Check the prop type of the entry function
|
|
157
|
+
if ('POST' in entry) {
|
|
158
|
+
checkFields<
|
|
159
|
+
Diff<
|
|
160
|
+
ParamCheck<Request | NextRequest>,
|
|
161
|
+
{
|
|
162
|
+
__tag__: 'POST'
|
|
163
|
+
__param_position__: 'first'
|
|
164
|
+
__param_type__: FirstArg<MaybeField<TEntry, 'POST'>>
|
|
165
|
+
},
|
|
166
|
+
'POST'
|
|
167
|
+
>
|
|
168
|
+
>()
|
|
169
|
+
checkFields<
|
|
170
|
+
Diff<
|
|
171
|
+
ParamCheck<RouteContext>,
|
|
172
|
+
{
|
|
173
|
+
__tag__: 'POST'
|
|
174
|
+
__param_position__: 'second'
|
|
175
|
+
__param_type__: SecondArg<MaybeField<TEntry, 'POST'>>
|
|
176
|
+
},
|
|
177
|
+
'POST'
|
|
178
|
+
>
|
|
179
|
+
>()
|
|
180
|
+
|
|
181
|
+
checkFields<
|
|
182
|
+
Diff<
|
|
183
|
+
{
|
|
184
|
+
__tag__: 'POST',
|
|
185
|
+
__return_type__: Response | void | never | Promise<Response | void | never>
|
|
186
|
+
},
|
|
187
|
+
{
|
|
188
|
+
__tag__: 'POST',
|
|
189
|
+
__return_type__: ReturnType<MaybeField<TEntry, 'POST'>>
|
|
190
|
+
},
|
|
191
|
+
'POST'
|
|
192
|
+
>
|
|
193
|
+
>()
|
|
194
|
+
}
|
|
195
|
+
// Check the prop type of the entry function
|
|
196
|
+
if ('PUT' in entry) {
|
|
197
|
+
checkFields<
|
|
198
|
+
Diff<
|
|
199
|
+
ParamCheck<Request | NextRequest>,
|
|
200
|
+
{
|
|
201
|
+
__tag__: 'PUT'
|
|
202
|
+
__param_position__: 'first'
|
|
203
|
+
__param_type__: FirstArg<MaybeField<TEntry, 'PUT'>>
|
|
204
|
+
},
|
|
205
|
+
'PUT'
|
|
206
|
+
>
|
|
207
|
+
>()
|
|
208
|
+
checkFields<
|
|
209
|
+
Diff<
|
|
210
|
+
ParamCheck<RouteContext>,
|
|
211
|
+
{
|
|
212
|
+
__tag__: 'PUT'
|
|
213
|
+
__param_position__: 'second'
|
|
214
|
+
__param_type__: SecondArg<MaybeField<TEntry, 'PUT'>>
|
|
215
|
+
},
|
|
216
|
+
'PUT'
|
|
217
|
+
>
|
|
218
|
+
>()
|
|
219
|
+
|
|
220
|
+
checkFields<
|
|
221
|
+
Diff<
|
|
222
|
+
{
|
|
223
|
+
__tag__: 'PUT',
|
|
224
|
+
__return_type__: Response | void | never | Promise<Response | void | never>
|
|
225
|
+
},
|
|
226
|
+
{
|
|
227
|
+
__tag__: 'PUT',
|
|
228
|
+
__return_type__: ReturnType<MaybeField<TEntry, 'PUT'>>
|
|
229
|
+
},
|
|
230
|
+
'PUT'
|
|
231
|
+
>
|
|
232
|
+
>()
|
|
233
|
+
}
|
|
234
|
+
// Check the prop type of the entry function
|
|
235
|
+
if ('DELETE' in entry) {
|
|
236
|
+
checkFields<
|
|
237
|
+
Diff<
|
|
238
|
+
ParamCheck<Request | NextRequest>,
|
|
239
|
+
{
|
|
240
|
+
__tag__: 'DELETE'
|
|
241
|
+
__param_position__: 'first'
|
|
242
|
+
__param_type__: FirstArg<MaybeField<TEntry, 'DELETE'>>
|
|
243
|
+
},
|
|
244
|
+
'DELETE'
|
|
245
|
+
>
|
|
246
|
+
>()
|
|
247
|
+
checkFields<
|
|
248
|
+
Diff<
|
|
249
|
+
ParamCheck<RouteContext>,
|
|
250
|
+
{
|
|
251
|
+
__tag__: 'DELETE'
|
|
252
|
+
__param_position__: 'second'
|
|
253
|
+
__param_type__: SecondArg<MaybeField<TEntry, 'DELETE'>>
|
|
254
|
+
},
|
|
255
|
+
'DELETE'
|
|
256
|
+
>
|
|
257
|
+
>()
|
|
258
|
+
|
|
259
|
+
checkFields<
|
|
260
|
+
Diff<
|
|
261
|
+
{
|
|
262
|
+
__tag__: 'DELETE',
|
|
263
|
+
__return_type__: Response | void | never | Promise<Response | void | never>
|
|
264
|
+
},
|
|
265
|
+
{
|
|
266
|
+
__tag__: 'DELETE',
|
|
267
|
+
__return_type__: ReturnType<MaybeField<TEntry, 'DELETE'>>
|
|
268
|
+
},
|
|
269
|
+
'DELETE'
|
|
270
|
+
>
|
|
271
|
+
>()
|
|
272
|
+
}
|
|
273
|
+
// Check the prop type of the entry function
|
|
274
|
+
if ('PATCH' in entry) {
|
|
275
|
+
checkFields<
|
|
276
|
+
Diff<
|
|
277
|
+
ParamCheck<Request | NextRequest>,
|
|
278
|
+
{
|
|
279
|
+
__tag__: 'PATCH'
|
|
280
|
+
__param_position__: 'first'
|
|
281
|
+
__param_type__: FirstArg<MaybeField<TEntry, 'PATCH'>>
|
|
282
|
+
},
|
|
283
|
+
'PATCH'
|
|
284
|
+
>
|
|
285
|
+
>()
|
|
286
|
+
checkFields<
|
|
287
|
+
Diff<
|
|
288
|
+
ParamCheck<RouteContext>,
|
|
289
|
+
{
|
|
290
|
+
__tag__: 'PATCH'
|
|
291
|
+
__param_position__: 'second'
|
|
292
|
+
__param_type__: SecondArg<MaybeField<TEntry, 'PATCH'>>
|
|
293
|
+
},
|
|
294
|
+
'PATCH'
|
|
295
|
+
>
|
|
296
|
+
>()
|
|
297
|
+
|
|
298
|
+
checkFields<
|
|
299
|
+
Diff<
|
|
300
|
+
{
|
|
301
|
+
__tag__: 'PATCH',
|
|
302
|
+
__return_type__: Response | void | never | Promise<Response | void | never>
|
|
303
|
+
},
|
|
304
|
+
{
|
|
305
|
+
__tag__: 'PATCH',
|
|
306
|
+
__return_type__: ReturnType<MaybeField<TEntry, 'PATCH'>>
|
|
307
|
+
},
|
|
308
|
+
'PATCH'
|
|
309
|
+
>
|
|
310
|
+
>()
|
|
311
|
+
}
|
|
312
|
+
|
|
313
|
+
// Check the arguments and return type of the generateStaticParams function
|
|
314
|
+
if ('generateStaticParams' in entry) {
|
|
315
|
+
checkFields<Diff<{ params: SegmentParams }, FirstArg<MaybeField<TEntry, 'generateStaticParams'>>, 'generateStaticParams'>>()
|
|
316
|
+
checkFields<Diff<{ __tag__: 'generateStaticParams', __return_type__: any[] | Promise<any[]> }, { __tag__: 'generateStaticParams', __return_type__: ReturnType<MaybeField<TEntry, 'generateStaticParams'>> }>>()
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
export interface PageProps {
|
|
320
|
+
params?: Promise<SegmentParams>
|
|
321
|
+
searchParams?: Promise<any>
|
|
322
|
+
}
|
|
323
|
+
export interface LayoutProps {
|
|
324
|
+
children?: React.ReactNode
|
|
325
|
+
|
|
326
|
+
params?: Promise<SegmentParams>
|
|
327
|
+
}
|
|
328
|
+
|
|
329
|
+
// =============
|
|
330
|
+
// Utility types
|
|
331
|
+
type RevalidateRange<T> = T extends { revalidate: any } ? NonNegative<T['revalidate']> : never
|
|
332
|
+
|
|
333
|
+
// If T is unknown or any, it will be an empty {} type. Otherwise, it will be the same as Omit<T, keyof Base>.
|
|
334
|
+
type OmitWithTag<T, K extends keyof any, _M> = Omit<T, K>
|
|
335
|
+
type Diff<Base, T extends Base, Message extends string = ''> = 0 extends (1 & T) ? {} : OmitWithTag<T, keyof Base, Message>
|
|
336
|
+
|
|
337
|
+
type FirstArg<T extends Function> = T extends (...args: [infer T, any]) => any ? unknown extends T ? any : T : never
|
|
338
|
+
type SecondArg<T extends Function> = T extends (...args: [any, infer T]) => any ? unknown extends T ? any : T : never
|
|
339
|
+
type MaybeField<T, K extends string> = T extends { [k in K]: infer G } ? G extends Function ? G : never : never
|
|
340
|
+
|
|
341
|
+
type ParamCheck<T> = {
|
|
342
|
+
__tag__: string
|
|
343
|
+
__param_position__: string
|
|
344
|
+
__param_type__: T
|
|
345
|
+
}
|
|
346
|
+
|
|
347
|
+
function checkFields<_ extends { [k in keyof any]: never }>() {}
|
|
348
|
+
|
|
349
|
+
// https://github.com/sindresorhus/type-fest
|
|
350
|
+
type Numeric = number | bigint
|
|
351
|
+
type Zero = 0 | 0n
|
|
352
|
+
type Negative<T extends Numeric> = T extends Zero ? never : `${T}` extends `-${string}` ? T : never
|
|
353
|
+
type NonNegative<T extends Numeric> = T extends Zero ? T : Negative<T> extends never ? T : '__invalid_negative_number__'
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// File: /
|
|
1
|
+
// File: /Users/baique/work/develop/project/pi-web-sky/app/api/terminal/[id]/events/route.ts
|
|
2
2
|
import * as entry from '../../../../../../../app/api/terminal/[id]/events/route.js'
|
|
3
3
|
import type { NextRequest } from 'next/server.js'
|
|
4
4
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// File: /
|
|
1
|
+
// File: /Users/baique/work/develop/project/pi-web-sky/app/api/terminal/[id]/route.ts
|
|
2
2
|
import * as entry from '../../../../../../app/api/terminal/[id]/route.js'
|
|
3
3
|
import type { NextRequest } from 'next/server.js'
|
|
4
4
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// File: /
|
|
1
|
+
// File: /Users/baique/work/develop/project/pi-web-sky/app/layout.tsx
|
|
2
2
|
import * as entry from '../../../app/layout.js'
|
|
3
3
|
import type { ResolvingMetadata, ResolvingViewport } from 'next/dist/lib/metadata/types/metadata-interface.js'
|
|
4
4
|
|
package/.next/types/app/page.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// File: /
|
|
1
|
+
// File: /Users/baique/work/develop/project/pi-web-sky/app/page.tsx
|
|
2
2
|
import * as entry from '../../../app/page.js'
|
|
3
3
|
import type { ResolvingMetadata, ResolvingViewport } from 'next/dist/lib/metadata/types/metadata-interface.js'
|
|
4
4
|
|
package/.next/types/routes.d.ts
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
// Do not edit this file manually
|
|
3
3
|
|
|
4
4
|
type AppRoutes = "/"
|
|
5
|
-
type AppRouteHandlerRoutes = "/api/agent/[id]" | "/api/agent/[id]/bash-output" | "/api/agent/[id]/events" | "/api/agent/new" | "/api/agent/running" | "/api/app-update" | "/api/auth/all-providers" | "/api/auth/api-key/[provider]" | "/api/auth/login/[provider]" | "/api/auth/logout/[provider]" | "/api/auth/providers" | "/api/cwd/browse" | "/api/cwd/validate" | "/api/default-cwd" | "/api/file-index" | "/api/files/[...path]" | "/api/git/diff" | "/api/git/status" | "/api/home" | "/api/mcp" | "/api/models" | "/api/models-config" | "/api/models-config/catalog" | "/api/models-config/discover" | "/api/models-config/test" | "/api/plugins" | "/api/project-trust" | "/api/quota" | "/api/sessions" | "/api/sessions/[id]" | "/api/sessions/[id]/auto-name" | "/api/sessions/[id]/context" | "/api/sessions/[id]/entries/[entryId]/thinking" | "/api/sessions/[id]/export" | "/api/sessions/[id]/state" | "/api/sessions/[id]/todos" | "/api/skills" | "/api/skills/check" | "/api/skills/install" | "/api/skills/search" | "/api/skills/update" | "/api/terminal" | "/api/terminal/[id]" | "/api/terminal/[id]/events" | "/api/worktrees"
|
|
5
|
+
type AppRouteHandlerRoutes = "/api/agent/[id]" | "/api/agent/[id]/bash-output" | "/api/agent/[id]/events" | "/api/agent/new" | "/api/agent/running" | "/api/app-update" | "/api/auth/all-providers" | "/api/auth/api-key/[provider]" | "/api/auth/login/[provider]" | "/api/auth/logout/[provider]" | "/api/auth/providers" | "/api/cwd/browse" | "/api/cwd/validate" | "/api/default-cwd" | "/api/file-index" | "/api/files/[...path]" | "/api/git/diff" | "/api/git/status" | "/api/home" | "/api/mcp" | "/api/models" | "/api/models-config" | "/api/models-config/catalog" | "/api/models-config/discover" | "/api/models-config/test" | "/api/plugins" | "/api/project-trust" | "/api/quota" | "/api/search" | "/api/sessions" | "/api/sessions/[id]" | "/api/sessions/[id]/auto-name" | "/api/sessions/[id]/context" | "/api/sessions/[id]/entries/[entryId]/thinking" | "/api/sessions/[id]/export" | "/api/sessions/[id]/state" | "/api/sessions/[id]/todos" | "/api/skills" | "/api/skills/check" | "/api/skills/install" | "/api/skills/search" | "/api/skills/update" | "/api/tasks" | "/api/tasks/[id]" | "/api/terminal" | "/api/terminal/[id]" | "/api/terminal/[id]/events" | "/api/worktrees"
|
|
6
6
|
type PageRoutes = never
|
|
7
7
|
type LayoutRoutes = "/"
|
|
8
8
|
type RedirectRoutes = never
|
|
@@ -40,6 +40,7 @@ interface ParamMap {
|
|
|
40
40
|
"/api/plugins": {}
|
|
41
41
|
"/api/project-trust": {}
|
|
42
42
|
"/api/quota": {}
|
|
43
|
+
"/api/search": {}
|
|
43
44
|
"/api/sessions": {}
|
|
44
45
|
"/api/sessions/[id]": { "id": string; }
|
|
45
46
|
"/api/sessions/[id]/auto-name": { "id": string; }
|
|
@@ -53,6 +54,8 @@ interface ParamMap {
|
|
|
53
54
|
"/api/skills/install": {}
|
|
54
55
|
"/api/skills/search": {}
|
|
55
56
|
"/api/skills/update": {}
|
|
57
|
+
"/api/tasks": {}
|
|
58
|
+
"/api/tasks/[id]": { "id": string; }
|
|
56
59
|
"/api/terminal": {}
|
|
57
60
|
"/api/terminal/[id]": { "id": string; }
|
|
58
61
|
"/api/terminal/[id]/events": { "id": string; }
|
package/.next/types/validator.ts
CHANGED
|
@@ -308,6 +308,15 @@ type RouteHandlerConfig<Route extends AppRouteHandlerRoutes = AppRouteHandlerRou
|
|
|
308
308
|
type __Unused = __Check
|
|
309
309
|
}
|
|
310
310
|
|
|
311
|
+
// Validate ../../app/api/search/route.ts
|
|
312
|
+
{
|
|
313
|
+
type __IsExpected<Specific extends RouteHandlerConfig<"/api/search">> = Specific
|
|
314
|
+
const handler = {} as typeof import("../../app/api/search/route.js")
|
|
315
|
+
type __Check = __IsExpected<typeof handler>
|
|
316
|
+
// @ts-ignore
|
|
317
|
+
type __Unused = __Check
|
|
318
|
+
}
|
|
319
|
+
|
|
311
320
|
// Validate ../../app/api/sessions/[id]/auto-name/route.ts
|
|
312
321
|
{
|
|
313
322
|
type __IsExpected<Specific extends RouteHandlerConfig<"/api/sessions/[id]/auto-name">> = Specific
|
|
@@ -425,6 +434,24 @@ type RouteHandlerConfig<Route extends AppRouteHandlerRoutes = AppRouteHandlerRou
|
|
|
425
434
|
type __Unused = __Check
|
|
426
435
|
}
|
|
427
436
|
|
|
437
|
+
// Validate ../../app/api/tasks/[id]/route.ts
|
|
438
|
+
{
|
|
439
|
+
type __IsExpected<Specific extends RouteHandlerConfig<"/api/tasks/[id]">> = Specific
|
|
440
|
+
const handler = {} as typeof import("../../app/api/tasks/[id]/route.js")
|
|
441
|
+
type __Check = __IsExpected<typeof handler>
|
|
442
|
+
// @ts-ignore
|
|
443
|
+
type __Unused = __Check
|
|
444
|
+
}
|
|
445
|
+
|
|
446
|
+
// Validate ../../app/api/tasks/route.ts
|
|
447
|
+
{
|
|
448
|
+
type __IsExpected<Specific extends RouteHandlerConfig<"/api/tasks">> = Specific
|
|
449
|
+
const handler = {} as typeof import("../../app/api/tasks/route.js")
|
|
450
|
+
type __Check = __IsExpected<typeof handler>
|
|
451
|
+
// @ts-ignore
|
|
452
|
+
type __Unused = __Check
|
|
453
|
+
}
|
|
454
|
+
|
|
428
455
|
// Validate ../../app/api/terminal/[id]/events/route.ts
|
|
429
456
|
{
|
|
430
457
|
type __IsExpected<Specific extends RouteHandlerConfig<"/api/terminal/[id]/events">> = Specific
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@baique/pi-web-sky",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.30",
|
|
4
4
|
"description": "Web UI for the pi coding agent — Sky skin edition (fork of @agegr/pi-web / earendil-labs pi-web, MIT)",
|
|
5
5
|
"homepage": "https://github.com/baique/pi-web-sky#readme",
|
|
6
6
|
"repository": {
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
exports.id=5582,exports.ids=[5582],exports.modules={12039:(a,b,c)=>{"use strict";function d(a){return"object"==typeof a&&null!==a&&!Array.isArray(a)}function e(a){return function(a,b={}){if("assistant"!==a.role)return a;let c=a.content;if(!Array.isArray(c))return a;let e=c.map(a=>(function(a,b={}){if(!d(a)||"toolCall"!==a.type)return null;let c={type:"toolCall",toolCallId:"string"==typeof a.toolCallId?a.toolCallId:"string"==typeof a.id?a.id:"",toolName:"string"==typeof a.toolName?a.toolName:"string"==typeof a.name?a.name:"",input:"object"!=typeof a.input||null===a.input||Array.isArray(a.input)?"object"!=typeof a.arguments||null===a.arguments||Array.isArray(a.arguments)?{}:a.arguments:a.input},e=b.includeStreamingRawInput?function(a){if("string"==typeof a.rawInput)return a.rawInput;if("string"==typeof a.partialJson)return a.partialJson;if("string"==typeof a.partialArgs)return a.partialArgs;let b=d(a.customInput)?a.customInput:null,c=b&&"string"==typeof b.property?b.property:null,e=d(a.arguments)?a.arguments:null;return c&&e&&"string"==typeof e[c]?e[c]:void 0}(a):void 0;return void 0===e?c:{...c,rawInput:e}})(a,b)??a);return{...a,content:e}}(a)}c.d(b,{B:()=>e})},24923:(a,b,c)=>{"use strict";c.d(b,{IL:()=>t,KI:()=>n,P9:()=>p,l:()=>s,xw:()=>r});var d=c(79646),e=c(29021),f=c(33873),g=c(28354),h=c(25252),i=c(58864);let j=(0,g.promisify)(d.execFile);function k(){globalThis.__piProjectCache?.clear()}async function l(a,b){let{stdout:c}=await j("git",["-C",a,...b],{timeout:1e4,maxBuffer:1048576,env:{...process.env,LC_ALL:"C"}});return c.trim()}function m(a){try{return(0,e.realpathSync)(a)}catch{return a}}async function n(a){let b,c=(globalThis.__piProjectCache||(globalThis.__piProjectCache=new Map),globalThis.__piProjectCache),d=c.get(a);if(d&&d.expiresAt>Date.now())return d.info;try{if(!(0,e.existsSync)(a))return b=function(a){let b=(0,f.dirname)(a);if(!b.endsWith("-worktrees"))return null;let c=b.slice(0,-10);return c&&(0,e.existsSync)((0,f.join)(c,".git"))?{projectRoot:m(c),branch:(0,f.basename)(a),isWorktree:!0,isTopLevel:!0}:null}(a)??{projectRoot:a,branch:null,isWorktree:!1,isTopLevel:!1},c.set(a,{info:b,expiresAt:Date.now()+6e4}),b;let[d,g,h,j]=(await l(a,["rev-parse","--path-format=absolute","--git-common-dir","--git-dir","--show-toplevel","--abbrev-ref","HEAD"])).split("\n").map(a=>a.trim()),[k,n,o]=[d,g,h].map(i.gB),p=m(a),q=(0,i.Eb)(o,p),r=!(0,i.Eb)(n,k)&&q,s=r?(0,f.dirname)(k):o;b={projectRoot:q?m(s):a,branch:j&&"HEAD"!==j?j:null,isWorktree:r,isTopLevel:q}}catch{b={projectRoot:a,branch:null,isWorktree:!1,isTopLevel:!1}}return c.set(a,{info:b,expiresAt:Date.now()+6e4}),b}async function o(a){let b=await l(a,["rev-parse","--path-format=absolute","--git-common-dir"]);return m((0,f.dirname)((0,i.gB)(b)))}async function p(a){let b=await l(a,["worktree","list","--porcelain"]),c=[],d=null,f=()=>{d?.path&&!d.prunable&&(0,e.existsSync)(d.path)&&c.push({path:d.path,branch:d.branch??null,isMain:0===c.length}),d=null};for(let a of b.split("\n"))a.startsWith("worktree ")?(f(),d={path:(0,i.gB)(a.slice(9).trim())}):a.startsWith("branch ")&&d?d.branch=a.slice(7).trim().replace(/^refs\/heads\//,""):a.startsWith("prunable")&&d?d.prunable=!0:""===a.trim()&&f();return f(),c}function q(a,b){return a.find(a=>(0,i.Eb)(a.path,b))}function r(a,b){return q(a,m(b))?.path??null}async function s(a,b){let c=b.trim();if(!c)throw Error("Branch name is required");let d=c.replace(/[\/\\:*?"<>|\s]+/g,"-").replace(/^-+|-+$/g,"");if(!d)throw Error(`Invalid branch name: ${b}`);let g=await o(a),i=`${(0,f.resolve)(g)}-worktrees`,j=(0,f.join)(i,d);if((0,e.existsSync)(j))throw Error(`Directory already exists: ${j}`);(0,e.mkdirSync)(i,{recursive:!0});let m=!1;try{await l(g,["rev-parse","--verify","--quiet",`refs/heads/${c}`]),m=!0}catch{m=!1}try{m?await l(g,["worktree","add","--",j,c]):await l(g,["worktree","add","-b",c,"--",j])}catch(a){throw Error(u(a))}return(0,h.wz)(j),k(),{path:j,branch:c}}async function t(a,b,c=!1){let d=q(await p(a),b);if(!d)throw Error(`Not a worktree of this repository: ${b}`);if(d.isMain)throw Error("Cannot remove the main worktree");try{await l(a,["worktree","remove",...c?["--force"]:[],d.path])}catch(a){throw Error(u(a))}k()}function u(a){let b=a.stderr;return"string"==typeof b&&b.trim()?b.trim():a instanceof Error?a.message:String(a)}},25252:(a,b,c)=>{"use strict";c.d(b,{HM:()=>f,Nw:()=>e,wz:()=>g});var d=c(58864);function e(a){return(0,d.W3)(a)}function f(){return globalThis.__piAdditionalAllowedRoots||(globalThis.__piAdditionalAllowedRoots=new Set),globalThis.__piAdditionalAllowedRoots}function g(a){if(!a)return;let b=e(a);f().add(b),globalThis.__piAllowedRootsCache?.roots.add(b)}},40402:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.d(b,{B6:()=>D,BR:()=>y,DK:()=>A,Hh:()=>B,O5:()=>o,O8:()=>x,Uv:()=>C,dQ:()=>q,eP:()=>z,mD:()=>r,os:()=>v,u1:()=>w,zH:()=>n});var e=c(75430),f=c(29021),g=c(79748),h=c(33873),i=c(12039),j=c(74244),k=c(45902),l=c(24923),m=a([e]);async function n(a){let b=[...new Set(a.map(a=>a.cwd).filter(Boolean))],c=new Map;return await Promise.all(b.map(async a=>{c.set(a,await (0,l.KI)(a))})),a.map(a=>{let b=a.cwd?c.get(a.cwd):void 0,d=b?.projectRoot??a.cwd;return{...a,projectRoot:d,projectKey:(0,j.z)(d),...b?.isWorktree&&b.branch?{worktreeBranch:b.branch}:{}}})}function o(a,b){let c=new Map(b.map(a=>[a.id,a]));for(let b of a)c.set(b.id,b);return[...c.values()].sort((a,b)=>b.modified.localeCompare(a.modified))}async function p(){let a=await e.SessionManager.listAll(),b=new Map;for(let c of a)b.set((0,k.$)(c.path),c.id);let c=a.map(a=>(x(a.id,a.path),{path:a.path,id:a.id,cwd:a.cwd,name:a.name,created:a.created instanceof Date?a.created.toISOString():String(a.created),modified:a.modified instanceof Date?a.modified.toISOString():String(a.modified),messageCount:a.messageCount,firstMessage:a.firstMessage||"(no messages)",parentSessionId:a.parentSessionPath?b.get((0,k.$)(a.parentSessionPath)):void 0,transient:!1}));return n(c)}async function q(a={}){a.force&&r();let b=globalThis.__piSessionListGeneration??0;if(globalThis.__piSessionListCache&&Date.now()-globalThis.__piSessionListCache.ts<G)return globalThis.__piSessionListCache.data;if(globalThis.__piSessionListPromise&&globalThis.__piSessionListPromiseGeneration===b)return globalThis.__piSessionListPromise;let c=p().then(a=>(globalThis.__piSessionListGeneration??0)!==b?q():(globalThis.__piSessionListCache={data:a,ts:Date.now()},a)).finally(()=>{globalThis.__piSessionListPromise===c&&(globalThis.__piSessionListPromise=void 0,globalThis.__piSessionListPromiseGeneration=void 0)});return globalThis.__piSessionListPromise=c,globalThis.__piSessionListPromiseGeneration=b,c}e=(m.then?(await m)():m)[0];let G=3e5;function r(){globalThis.__piSessionListGeneration=(globalThis.__piSessionListGeneration??0)+1,globalThis.__piSessionListCache=void 0}function s(){return globalThis.__piSessionPathCache||(globalThis.__piSessionPathCache=new Map),globalThis.__piSessionPathCache}function t(){return globalThis.__piPathToSessionIdCache||(globalThis.__piPathToSessionIdCache=new Map),globalThis.__piPathToSessionIdCache}async function u(a){let b,c=(0,h.join)((0,e.getAgentDir)(),"sessions");if(!a||!(0,f.existsSync)(c))return null;let d=`_${a}.jsonl`;try{b=await (0,g.readdir)(c,{withFileTypes:!0})}catch{return null}for(let e of b){let b;if(!e.isDirectory()&&!e.isSymbolicLink())continue;let f=(0,h.join)(c,e.name);try{b=await (0,g.readdir)(f)}catch{continue}let i=b.find(a=>a.endsWith(d));if(!i)continue;let j=(0,h.join)(f,i);try{if(z(j)?.id===a)return j}catch{}}return null}async function v(a){let b=s().get(a);if(b)return b;let c=await u(a);return c?(x(a,c),c):(await q(),s().get(a)??null)}async function w(a){let b=(0,k.$)(a),c=t().get(b);return c||(await q(),t().get(b))}function x(a,b){let c=(0,h.normalize)(b),d=(0,k.$)(c),e=s(),f=t(),g=e.get(a),i=g?(0,k.$)(g):void 0,j=f.get(d),l=j?e.get(j):void 0;i&&i!==d&&f.get(i)===a&&f.delete(i),j&&j!==a&&l&&(0,k.$)(l)===d&&e.delete(j),e.set(a,c),f.set(d,a)}function y(a){let b=s(),c=t(),d=b.get(a);b.delete(a);let e=d?(0,k.$)(d):void 0;e&&c.get(e)===a&&c.delete(e)}function z(a){let b=(0,f.openSync)(a,"r");try{let a=[],c=0,d=!1;for(;c<65536&&!d;){let e=Buffer.allocUnsafe(Math.min(4096,65536-c)),g=(0,f.readSync)(b,e,0,e.length,c);if(0===g)break;let h=e.subarray(0,g),i=h.indexOf(10);a.push(-1===i?h:h.subarray(0,i)),c+=g,d=-1!==i}if(!d&&c>=65536)return null;let e=Buffer.concat(a).toString("utf8").trimEnd();if(!e)return null;try{let a=JSON.parse(e);return"session"===a.type?a:null}catch{return null}}finally{(0,f.closeSync)(b)}}function A(a){return e.SessionManager.open(a).getEntries()}function B(a){let b=[];for(let c of a){if("custom"!==c.type||"pi-todo.state"!==c.customType)continue;let a=c.data;F(a)&&Array.isArray(a.todos)&&(b=a.todos.filter(a=>F(a)&&"string"==typeof a.content))}return b}function C(a,b,c={}){let{tail:d,excludeLeaf:f}=c,g=d&&d>0?function(a,b,c,d=!1){if(c<=0)return a;let e=new Map;for(let b of a)e.set(b.id,b);let f=b?e.get(b):a[a.length-1];if(d&&f?.parentId&&(f=e.get(f.parentId)),!f)return[];let g=[],h=f;for(;h&&g.length<c;)g.push(h),h=h.parentId?e.get(h.parentId):void 0;return g.reverse(),g}(a,b??null,d,f):a,h=new Map;for(let a of g)h.set(a.id,a);let j=(0,e.buildSessionContext)(g,b,h),k=(0,e.buildContextEntries)(g,b,h),l=[],m=[],n=[];for(let a of k){let b=function(a,b){switch(a.type){case"message":{let c=b.deferToolResultImages?function(a){if("toolResult"!==a.role)return a;let b=0,c=0,d=new Set,e=a.content.filter(a=>{let e=function(a){let b,c;if(!F(a)||"image"!==a.type||("string"==typeof a.data?(b=a.data,c="string"==typeof a.mimeType?a.mimeType:void 0):F(a.source)&&"base64"===a.source.type&&"string"==typeof a.source.data&&(b=a.source.data,c="string"==typeof a.source.media_type?a.source.media_type:void 0),!b))return null;let d=b.endsWith("==")?2:+!!b.endsWith("=");return{bytes:Math.max(0,Math.floor(3*b.length/4)-d),mime:c}}(a);return!e||(b+=1,c+=e.bytes,e.mime&&d.add(e.mime),!1)});if(0===b)return a;let f=d.size>0?`: ${[...d].join(", ")}`:"";return e.push({type:"text",text:`[${b} tool result image${1===b?"":"s"} omitted from initial history payload${f}, ~${c} bytes]`}),{...a,content:e}}((0,i.B)(a.message)):(0,i.B)(a.message);if(!b.deferThinking||"assistant"!==c.role)return c;let d=c.content;if(!Array.isArray(d))return c;return{...c,content:d.map(a=>"thinking"===a.type&&""!==a.thinking.trim()?{...a,thinking:"",deferred:!0}:a)}}case"compaction":return{role:"custom",customType:"compaction",content:a.summary,display:!0,details:{tokensBefore:a.tokensBefore,firstKeptEntryId:a.firstKeptEntryId},timestamp:E(a.timestamp)};case"branch_summary":if(!a.summary)return null;return{role:"user",content:`*The conversation briefly explored another branch and returned with this summary:*
|
|
2
|
-
|
|
3
|
-
${a.summary}`,timestamp:E(a.timestamp)};case"custom_message":return{role:"custom",customType:a.customType,content:a.content,display:a.display,details:a.details,timestamp:E(a.timestamp)};default:return null}}(a,c);b&&(l.push(b),m.push(a.id),n.push(a.parentId))}let o=B(k);return{messages:l,entryIds:m,parentIds:n,thinkingLevel:j.thinkingLevel,model:j.model,todos:o}}function D(a,b,c,d=!1){if(c<=0)return!1;let e=new Map;for(let b of a)e.set(b.id,b);let f=b?e.get(b):a[a.length-1];d&&f?.parentId&&(f=e.get(f.parentId));let g=0;for(;f;){if(++g>c)return!0;f=f.parentId?e.get(f.parentId):void 0}return!1}function E(a){let b=Date.parse(a);return Number.isNaN(b)?void 0:b}function F(a){return"object"==typeof a&&null!==a&&!Array.isArray(a)}d()}catch(a){d(a)}})},45902:(a,b,c)=>{"use strict";c.d(b,{$:()=>f});var d=c(76760),e=c.n(d);function f(a,b=process.platform){let c="win32"===b?e().win32.normalize(a):e().posix.normalize(a);return"win32"===b?c.toLowerCase():c}},58864:(a,b,c)=>{"use strict";c.d(b,{Eb:()=>j,W3:()=>h,gB:()=>g,uK:()=>f});var d=c(33873);let e=/^[a-zA-Z]:[\\/]/;function f(a){return e.test(a)||a.startsWith("\\\\")||a.startsWith("//")}function g(a){return a&&"win32"===process.platform?(0,d.normalize)(a):a}function h(a){return a.replace(/\\/g,"/")}function i(a){let b=(0,d.normalize)(g(a)),c=(0,d.parse)(b).root.length,e=b.length;for(;e>c&&b[e-1]===d.sep;)e--;return b.slice(0,e)}function j(a,b){if(a===b)return!0;if(!a||!b)return!1;let c=i(a),d=i(b);return"win32"===process.platform?c.toLowerCase()===d.toLowerCase():c===d}},74244:(a,b,c)=>{"use strict";c.d(b,{z:()=>f});var d=c(76760),e=c.n(d);function f(a,b=process.platform){if(!a)return a;let c="win32"===b?e().win32:e().posix,d=c.normalize(a),g=c.parse(d).root.length,h=d.length;for(;h>g&&d[h-1]===c.sep;)h--;let i=d.slice(0,h);return"win32"===b?i.toLowerCase():i}},78335:()=>{},96487:()=>{}};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";exports.id=6429,exports.ids=[6429],exports.modules={18904:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.d(b,{I:()=>j,p:()=>i});var e=c(75430),f=a([e]);e=(f.then?(await f)():f)[0];let k=new Set(["off","minimal","low","medium","high","xhigh","max"]);function g(a,b){return a.provider===b.provider&&a.id===b.modelId}function h(a,b){let c=a.toLowerCase(),d=b.filter(a=>`${a.provider}/${a.id}`.toLowerCase()===c);return d.length>0?d:b.filter(a=>a.id.toLowerCase()===c)}async function i(a,b){let c=(b??[]).map(a=>a.trim()).filter(Boolean);if(0===c.length)return{visible:await a.getAvailable(),scopedModels:[],thinkingLevelPins:{},warnings:[]};let d=await a.getAvailable();!function(a,b){for(let c of a){if(c.includes("*")||c.includes("?")||c.includes("["))continue;let a=h(c,b);if(0===a.length){let d=c.lastIndexOf(":"),e=d>=0?c.slice(d+1):"";k.has(e)&&(a=h(c.slice(0,d),b))}if(a.length>1){let b=a.map(a=>`${a.provider}/${a.id}`).sort().join(", ");throw Error(`Ambiguous enabledModels entry "${c}" matches multiple models: ${b}. Use provider/modelId.`)}}}(c,d);let{scopedModels:f,diagnostics:g}=await (0,e.resolveModelScopeWithDiagnostics)(c,{getAvailable:async()=>d}),i=g.map(a=>a.message);if(0===f.length)return{visible:d,scopedModels:[],thinkingLevelPins:{},warnings:i};let j={};for(let a of f)a.thinkingLevel&&(j[`${a.model.provider}/${a.model.id}`]=a.thinkingLevel);return{visible:f.map(a=>a.model),scopedModels:f,thinkingLevelPins:j,warnings:i}}function j(a,b={}){let c=b.requestedModel,d=b.defaultModel,e=c?a.visible.find(a=>g(a,c)):void 0;if(c&&!e)throw Error(`Model is not available in the enabled scope: ${c.provider}/${c.modelId}`);let f=e?a.scopedModels.find(a=>a.model===e||g(a.model,{provider:e.provider,modelId:e.id})):void 0,h=!e&&d?a.scopedModels.find(a=>g(a.model,d)):void 0,i=e?void 0:h??a.scopedModels[0],k=e||i||!d?void 0:a.visible.find(a=>g(a,d)),l=e??i?.model??k,m=f??i,n=b.thinkingLevel??m?.thinkingLevel;return{...l?{model:l}:{},...n?{thinkingLevel:n}:{},scopedModels:[...a.scopedModels]}}d()}catch(a){d(a)}})},28967:(a,b,c)=>{function d(){return globalThis.__piModelsCacheState||(globalThis.__piModelsCacheState={entries:new Map,inFlight:new Map,generation:0}),globalThis.__piModelsCacheState}function e(){let a=d();a.generation+=1,a.entries.clear(),a.inFlight.clear()}function f(a,b){return b?{...a,modelError:b}:a}function g(a){return{...a,modelError:"Model list is temporarily unavailable. Check your configuration and try again."}}function h(a,b){let c=d(),e=c.entries.get(a);if(e){if(e.expiresAt>Date.now())return Promise.resolve(e.data);c.entries.delete(a)}let f=c.inFlight.get(a);if(f)return f;let g=c.generation,h=Promise.resolve().then(b).then(b=>{if(c.generation===g&&c.inFlight.get(a)===h){let d=Date.now();for(let[a,b]of c.entries)b.expiresAt<=d&&c.entries.delete(a);for(;c.entries.size>=32;){let a=c.entries.keys().next().value;if(void 0===a)break;c.entries.delete(a)}c.entries.set(a,{data:b,expiresAt:d+6e4})}return b}).finally(()=>{c.inFlight.get(a)===h&&c.inFlight.delete(a)});return c.inFlight.set(a,h),h}c.d(b,{Fw:()=>g,Mx:()=>f,kn:()=>e,rC:()=>h})},30590:(a,b,c)=>{c.d(b,{o:()=>d});async function d(a,b,c){if(!b.model&&!b.thinkingLevel)return{modelDefaultChanged:!1};let d=!1;return b.model&&c.model&&b.model.provider===c.model.provider&&b.model.modelId===c.model.modelId&&(a.setDefaultModelAndProvider(c.model.provider,c.model.modelId),d=!0),b.thinkingLevel&&(c.supportsThinking||"off"!==c.thinkingLevel)&&a.setDefaultThinkingLevel(c.thinkingLevel),await a.flush(),{modelDefaultChanged:d}}},53303:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.d(b,{Ds:()=>j,J1:()=>h,eD:()=>i});var e=c(75430),f=c(76760),g=a([e]);e=(g.then?(await g)():g)[0];let k="pi-web-project-command-environment",l=`<inline:${k}>`;function h(a={}){let{agentBinDir:b=(0,f.join)((0,e.getAgentDir)(),"bin"),baseEnvironment:c=process.env,localOperations:d=(0,e.createLocalBashOperations)({shellPath:a.shellPath}),platform:g=process.platform}=a;return{exec(a,e,f){var h;let i,j,k,l=(h=function(a,b=process.platform){let c={...a};for(let a of Object.keys(c))(function(a,b){let c="win32"===b?a.toUpperCase():a;return"PORT"===c||"NODE_ENV"===c||c.startsWith("NEXT_")})(a,b)&&delete c[a];return c}(f.env??c,g),i="win32"===g?Object.keys(h).find(a=>"PATH"===a.toUpperCase())??"PATH":"PATH",j="win32"===g?";":":",(k=h[i]??"").split(j).filter(Boolean).includes(b)||(h[i]=[b,k].filter(Boolean).join(j)),h);return d.exec(a,e,{...f,env:l})}}}function i(a){return{name:k,hidden:!0,factory:b=>{let c=(0,e.createBashToolDefinition)(a.cwd);b.registerTool({...c,execute:(b,c,d,f,g)=>(0,e.createBashToolDefinition)(a.cwd,{commandPrefix:a.settings.getShellCommandPrefix(),operations:h({shellPath:a.settings.getShellPath()})}).execute(b,c,d,f,g)})}}}function j(a){let b=a.extensions.findIndex(a=>a.path===l);if(b<0)return a;let c=a.extensions.slice(0,b).find(a=>a.tools.has("bash"));return c?{...a,extensions:a.extensions.filter((a,c)=>c!==b),errors:a.errors.filter(a=>a.path!==l||a.error!==`Tool "bash" conflicts with ${c.path}`)}:a}d()}catch(a){d(a)}})},56429:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.d(b,{A4:()=>w,Bp:()=>x,HG:()=>A,OF:()=>B,_I:()=>y,oA:()=>z});var e=c(75430),f=c(29862),g=c(55511),h=c(29021),i=c(33873),j=c(78970),k=c(28967),l=c(18904),m=c(53303),n=c(40402),o=c(72498),p=c(30590),q=c(71069),r=a([e,f,l,m,n,o]);[e,f,l,m,n,o]=r.then?(await r)():r;let C=new Set(["agent_end","agent_settled","auto_compaction_end","compaction_end"]),D=["read","bash","edit","write","grep","find","ls"];class E extends e.Theme{constructor(){super({thinkingXhigh:"",searchMatchText:""},{selectedBg:""},"truecolor")}fg(...[,a]){return a}bg(...[,a]){return a}bold(a){return a}italic(a){return a}underline(a){return a}inverse(a){return a}strikethrough(a){return a}getFgAnsi(){return""}getBgAnsi(){return""}getThinkingBorderColor(){return a=>a}getBashModeBorderColor(){return a=>a}}let F=new E,G=new f.KeybindingsManager(f.TUI_KEYBINDINGS);function s(a,b){if(0===b.length)return[];let c=new Set(D),d=a.getAllTools().map(a=>a.name).filter(a=>!c.has(a));return[...new Set([...b,...d])]}class H{constructor(a){this.inner=a,this.listeners=[],this.pendingUiResponses=new Map,this.pendingUiRequests=new Map,this.activeCustomUis=new Map,this.extensionStatuses=new Map,this.extensionWidgets=new Map,this.activeExtensionWidgets=new Map,this.extensionWidgetGenerations=new Map,this.extensionWidgetsResetting=!1,this.pendingPromptCount=0,this.promptAdmissionTail=Promise.resolve(),this.extensionsBound=!1,this.extensionBindingPromise=null,this.extensionBindingError=null,this.forceEmptySystemPrompt=!1,this.unsubscribe=null,this.idleTimer=null,this.onDestroyCallback=null,this.shutdownPromise=null,this._alive=!0}get sessionId(){return this.inner.sessionId}get sessionFile(){return this.inner.sessionFile??""}get cwd(){return this.inner.sessionManager.getCwd()}get streamingMessage(){return this.inner.agent.state?.streamingMessage}get isStreaming(){return this.inner.isStreaming}isAlive(){return this._alive}isRunning(){return this._alive&&(this.pendingPromptCount>0||this.inner.isStreaming||this.inner.isCompacting||this.inner.isBashRunning)}start(){this.unsubscribe=this.inner.subscribe(a=>{"agent_end"===a.type&&(0,n.mD)(),C.has(a.type)&&this.resetIdleTimer(),this.emit(a)}),this.resetIdleTimer()}setForceEmptySystemPrompt(a){this.forceEmptySystemPrompt=a,this.applyForcedEmptySystemPrompt()}beginExtensionBinding(a={}){this.ensureExtensionsBound(a).catch(a=>{console.error("[pi-web] failed to dispatch session_start to extensions:",a instanceof Error?a.message:a)})}async waitUntilReady(){await this.waitForExtensionsBound()}ensureExtensionsBound(a={}){return(a.forceEmptySystemPrompt&&(this.forceEmptySystemPrompt=!0),this.extensionsBound)?(this.applyForcedEmptySystemPrompt(),Promise.resolve()):(this.extensionBindingPromise||(this.extensionBindingError=null,this.extensionBindingPromise=(async()=>{if(!this._alive)return;let a=this.createExtensionUiContext();if("function"==typeof this.inner.bindExtensions){let b=this.inner.bindExtensions;await b.call(this.inner,{uiContext:a,mode:"rpc",commandContextActions:this.createExtensionCommandContextActions(),shutdownHandler:()=>this.emit({type:"extension_ui_request",id:(0,g.randomUUID)(),method:"notify",notifyType:"warning",message:"Extension requested shutdown, but shutdown is not supported in Pi Web."}),onError:a=>this.emit({type:"extension_error",extensionPath:a.extensionPath,event:a.event,error:a.error})})}else this.inner.extensionRunner.setUIContext?.(a,"rpc");this.extensionsBound=!0,this.applyForcedEmptySystemPrompt(),console.log(`[pi-web] session_start dispatched to extensions for session ${this.inner.sessionId}`)})().catch(a=>{throw this.extensionBindingError=a,a})),this.extensionBindingPromise)}async waitForExtensionsBound(){try{this.extensionBindingPromise&&await this.extensionBindingPromise}catch(a){throw a instanceof Error?a:Error(String(a))}if(this.extensionBindingError)throw this.extensionBindingError instanceof Error?this.extensionBindingError:Error(String(this.extensionBindingError))}shouldWaitForExtensions(a){return"prompt"===a||"steer"===a||"follow_up"===a||"get_commands"===a||"get_state"===a}async withFinalRunningNotification(a){try{return await a()}finally{this.resetIdleTimer()}}applyForcedEmptySystemPrompt(){this.forceEmptySystemPrompt&&this.inner.agent.state&&(this.inner.agent.state.systemPrompt="")}emit(a){for(let b of this.listeners)try{b(a)}catch(b){console.error(`[pi-web] failed to deliver ${a.type} event:`,b instanceof Error?b.message:b)}}async acquirePromptAdmission(){let a,b=this.promptAdmissionTail;return this.promptAdmissionTail=new Promise(b=>{a=b}),await b,a}resetIdleTimer(){this.idleTimer&&clearTimeout(this.idleTimer),this.idleTimer=setTimeout(()=>{this.isRunning()?this.resetIdleTimer():this.shutdown().catch(a=>{console.error("[pi-web] failed to shut down idle session:",a instanceof Error?a.message:a)})},6e5)}persistBashOnlySession(){let a=this.inner.sessionManager,b=a.getSessionFile();if(!b||(0,h.existsSync)(b))return;let c=a.getHeader();if(!c)return;let d=[c,...a.getEntries()].map(a=>JSON.stringify(a)).join("\n")+"\n";(0,h.writeFileSync)(b,d,{encoding:"utf8",flag:"wx"}),a.flushed=!0,(0,n.O8)(this.inner.sessionId,b)}onEvent(a){for(let b of(this.listeners.push(a),this.pendingUiRequests.values()))a(b);return()=>{let b=this.listeners.indexOf(a);-1!==b&&this.listeners.splice(b,1)}}onDestroy(a){this.onDestroyCallback=a}async send(a){this.resetIdleTimer();let b=a.type;if(this.shouldWaitForExtensions(b)&&await this.waitForExtensionsBound(),"prompt"===b||"steer"===b||"follow_up"===b){let b=(0,j.kc)(a.images);if(b)throw Error(b)}switch(b){case"prompt":{let b=await this.acquirePromptAdmission();try{let b,c,d;if(this.inner.isBashRunning)throw Error("Cannot send a prompt while a shell command is running");let e=a.images,f=a.streamingBehavior,g=!1,h=!1,i=!1,j=new Promise((a,d)=>{b=()=>{g=!0,h||(h=!0,a())},c=a=>{h||(h=!0,d(a))}}),k=()=>{i||(i=!0,this.pendingPromptCount=Math.max(0,this.pendingPromptCount-1),this.resetIdleTimer())};this.pendingPromptCount+=1;try{d=this.inner.prompt(a.message,{...e?.length?{images:e}:{},...f?{streamingBehavior:f}:{},source:"rpc",preflightResult:a=>{a&&b()}})}catch(a){throw k(),a}return d.then(()=>{b(),k(),f||this.emit({type:"prompt_done"})},a=>{c(a),k(),(0,n.mD)(),g&&(this.emit({type:"prompt_error",errorMessage:a instanceof Error?a.message:String(a)}),f||this.emit({type:"prompt_done"}))}).catch(a=>{console.error("[pi-web] prompt completion handler failed:",a instanceof Error?a.message:a)}),await j,null}finally{b()}}case"abort":return await this.withFinalRunningNotification(()=>this.inner.abort()),null;case"get_state":{let a=this.inner.model,b=this.inner.getContextUsage();return{sessionId:this.inner.sessionId,sessionFile:this.inner.sessionFile??"",isStreaming:this.inner.isStreaming,isPromptRunning:this.pendingPromptCount>0,isBashRunning:this.inner.isBashRunning,isCompacting:this.inner.isCompacting,autoCompactionEnabled:this.inner.autoCompactionEnabled,autoRetryEnabled:this.inner.autoRetryEnabled,model:a?{id:a.id,provider:a.provider}:void 0,messageCount:0,pendingMessageCount:this.inner.pendingMessageCount,queuedMessages:{steering:[...this.inner.getSteeringMessages()],followUp:[...this.inner.getFollowUpMessages()]},contextUsage:b?{percent:b.percent,contextWindow:b.contextWindow,tokens:b.tokens}:null,systemPrompt:this.inner.agent.state?.systemPrompt??"",thinkingLevel:this.inner.agent.state?.thinkingLevel??"off",extensionStatuses:this.getExtensionStatuses(),extensionWidgets:this.getExtensionWidgets()}}case"set_model":{let{provider:b,modelId:c}=a,d=this.inner.modelRuntime.getModel(b,c);if(d||(await this.inner.modelRuntime.refresh({allowNetwork:!1}),d=this.inner.modelRuntime.getModel(b,c)),!d)throw Error(`Model not found: ${b}/${c}`);return await this.inner.setModel(d),(0,k.kn)(),(0,n.mD)(),{id:d.id,provider:d.provider}}case"fork":{let b;if(this.inner.isBashRunning)throw Error("Cannot fork while a shell command is running");let c=a.entryId,d=this.inner.sessionManager,f=this.inner.sessionFile;if(!d.isPersisted())return{cancelled:!0};if(!f)throw Error("Persisted session is missing a session file");let g=d.getEntry(c);if(!g)throw Error("Invalid entry ID for forking");let h=d.getSessionDir();if(g.parentId){let a=e.SessionManager.open(f,h).createBranchedSession(g.parentId);if(!a)throw Error("Failed to create forked session");b=a}else{let a=e.SessionManager.create(d.getCwd(),h);a.newSession({parentSession:f}),a.getSessionFile()&&a._rewriteFile(),b=a.getSessionFile()}let i=e.SessionManager.open(b,h).getSessionId();return(0,n.O8)(i,b),(0,n.mD)(),await this.shutdown(),{cancelled:!1,newSessionId:i}}case"navigate_tree":if(this.inner.isBashRunning)throw Error("Cannot navigate while a shell command is running");return{cancelled:(await this.inner.navigateTree(a.targetId,{})).cancelled};case"set_thinking_level":{let b=a.level;return this.inner.setThinkingLevel(b),"xhigh"===b&&this.inner.model?.compat?.thinkingFormat==="deepseek"&&this.inner.agent?.state&&(this.inner.agent.state.thinkingLevel="xhigh"),(0,n.mD)(),null}case"compact":try{return await this.withFinalRunningNotification(()=>this.inner.compact(a.customInstructions))}finally{(0,n.mD)()}case"set_session_name":{let b=a.name?.trim();if(!b)throw Error("Session name cannot be empty");return this.inner.setSessionName(b),(0,n.mD)(),null}case"get_session_stats":return{...this.inner.getSessionStats(),sessionName:this.inner.sessionManager.getSessionName()};case"get_last_assistant_text":return{text:this.inner.getLastAssistantText()??""};case"set_auto_compaction":return this.inner.setAutoCompactionEnabled(a.enabled),null;case"clear_queue":return this.inner.clearQueue();case"steer":{let b=a.images;return await this.inner.steer(a.message,b?.length?b:void 0),null}case"follow_up":{let b=a.images;return await this.inner.followUp(a.message,b?.length?b:void 0),null}case"get_tools":{let a=this.inner.getAllTools(),b=new Set(this.inner.getActiveToolNames());return a.map(a=>({name:a.name,description:a.description,active:b.has(a.name)}))}case"get_commands":{let a=[];for(let b of this.inner.extensionRunner.getRegisteredCommands())a.push({name:b.invocationName,description:b.description,source:"extension",sourceInfo:b.sourceInfo});for(let b of this.inner.promptTemplates)a.push({name:b.name,description:b.description,source:"prompt",sourceInfo:b.sourceInfo});for(let b of this.inner.resourceLoader.getSkills().skills)a.push({name:`skill:${b.name}`,description:b.description,source:"skill",sourceInfo:b.sourceInfo});return{commands:a}}case"set_tools":{let b=a.toolNames;return this.setForceEmptySystemPrompt(0===b.length),this.inner.setActiveToolsByName(s(this.inner,b)),this.applyForcedEmptySystemPrompt(),null}case"reload":return await this.waitForExtensionsBound(),this.extensionStatuses.clear(),this.resetExtensionWidgetsForReload(),this.syncProjectTrust(),await this.inner.reload(),"function"!=typeof this.inner.bindExtensions&&this.inner.extensionRunner.setUIContext?.(this.createExtensionUiContext(),"rpc"),this.applyForcedEmptySystemPrompt(),(0,k.kn)(),{success:!0};case"abort_compaction":return this.inner.abortCompaction(),null;case"extension_ui_response":return this.resolveExtensionUiResponse(a),null;case"extension_ui_input":return this.handleExtensionUiInput(a.id,a.data),null;case"set_auto_retry":return this.inner.setAutoRetryEnabled(a.enabled),null;case"bash":{if(this.pendingPromptCount>0||this.inner.isStreaming||this.inner.isCompacting||this.inner.isBashRunning)throw Error("Cannot run a shell command while the session is busy");let b=this.inner.executeBash(a.command,void 0,{excludeFromContext:a.excludeFromContext,operations:(0,m.J1)({shellPath:this.inner.settingsManager.getShellPath()})});try{let a=await b;return this.persistBashOnlySession(),a}finally{this.resetIdleTimer(),(0,n.mD)()}}case"abort_bash":return this.inner.abortBash(),null;default:throw Error(`Unsupported command: ${b}`)}}destroy(){if(this._alive){for(let a of(this._alive=!1,this.idleTimer&&clearTimeout(this.idleTimer),this.inner.isBashRunning&&this.inner.abortBash(),this.unsubscribe?.(),this.pendingUiResponses.values()))a.cancel();for(let a of Array.from(this.activeCustomUis.keys()))this.closeCustomUi(a,void 0);this.pendingUiResponses.clear(),this.pendingUiRequests.clear(),this.clearExtensionWidgets(!1);try{this.inner.dispose()}finally{this.onDestroyCallback?.()}}}async shutdown(){return this.shutdownPromise?this.shutdownPromise:this._alive?(this.shutdownPromise=(async()=>{try{try{await this.waitForExtensionsBound()}catch(a){console.error("[pi-web] extension binding failed before session shutdown:",a instanceof Error?a.message:a)}await this.inner.extensionRunner.emit?.({type:"session_shutdown",reason:"quit"})}finally{this.destroy()}})(),this.shutdownPromise):void 0}resolveExtensionUiResponse(a){let b=this.pendingUiResponses.get(a.id);b&&b.resolve(a)}getExtensionStatuses(){return Array.from(this.extensionStatuses,([a,b])=>({key:a,text:b}))}getExtensionWidgets(){return Array.from(this.extensionWidgets.values())}nextExtensionWidgetGeneration(a){let b=(this.extensionWidgetGenerations.get(a)??0)+1;return this.extensionWidgetGenerations.set(a,b),b}disposeExtensionWidgetComponent(a){if(!a||"object"!=typeof a&&"function"!=typeof a)return;let b=a.dispose;if("function"==typeof b)try{b.call(a)}catch{}}emitExtensionWidgetClear(a){this.emit({type:"extension_ui_request",id:(0,g.randomUUID)(),method:"setWidget",widgetKey:a,widgetLines:void 0,widgetPlacement:void 0})}clearExtensionWidget(a,b=!0){let c=this.nextExtensionWidgetGeneration(a),d=this.activeExtensionWidgets.get(a);return this.activeExtensionWidgets.delete(a),this.extensionWidgets.delete(a),d&&this.disposeExtensionWidgetComponent(d.component),this.extensionWidgetGenerations.get(a)!==c||b&&this.emitExtensionWidgetClear(a),c}clearExtensionWidgets(a){for(let b of new Set([...this.extensionWidgets.keys(),...this.activeExtensionWidgets.keys()]))this.clearExtensionWidget(b,a)}resetExtensionWidgetsForReload(){this.extensionWidgetsResetting=!0;try{for(let a of[...this.activeExtensionWidgets.keys()])this.clearExtensionWidget(a);this.extensionWidgets.clear()}finally{this.extensionWidgetsResetting=!1}}emitExtensionWidgetError(a,b){this.emit({type:"extension_error",extensionPath:`extension-widget:${a}`,event:"setWidget",error:b instanceof Error?b.message:String(b)})}failExtensionWidget(a,b,c,d,e){if(this.extensionWidgetGenerations.get(a)!==b)return void this.disposeExtensionWidgetComponent(e);let f=this.activeExtensionWidgets.get(a),g=!d;f?.generation===b?(g=f.rendered||!f.clearEmitted,this.activeExtensionWidgets.delete(a),this.disposeExtensionWidgetComponent(f.component)):this.disposeExtensionWidgetComponent(e),this.extensionWidgetGenerations.get(a)!==b||(this.extensionWidgets.delete(a),g&&this.emitExtensionWidgetClear(a)),this.emitExtensionWidgetError(a,c)}renderExtensionWidget(a){let b;if(this.activeExtensionWidgets.get(a.key)!==a||this.extensionWidgetGenerations.get(a.key)!==a.generation)return;try{b=a.component.render(q.p1)}catch(b){this.failExtensionWidget(a.key,a.generation,b,a.clearEmitted);return}if(!Array.isArray(b)||!b.every(a=>"string"==typeof a))return void this.failExtensionWidget(a.key,a.generation,Error("Extension widget render must return string[]"),a.clearEmitted);if(this.activeExtensionWidgets.get(a.key)!==a||this.extensionWidgetGenerations.get(a.key)!==a.generation)return;let c=b;this.extensionWidgets.set(a.key,{key:a.key,lines:c,placement:a.placement}),a.rendered=!0,this.emit({type:"extension_ui_request",id:(0,g.randomUUID)(),method:"setWidget",widgetKey:a.key,widgetLines:c,widgetPlacement:a.placement})}setExtensionWidgetFactory(a,b,c){let d,e=this.extensionWidgets.has(a)||this.activeExtensionWidgets.has(a),f=this.clearExtensionWidget(a,e);if(this.extensionWidgetGenerations.get(a)!==f)return;let g=(0,q.TQ)(()=>{let b=this.activeExtensionWidgets.get(a);b?.generation===f&&this.renderExtensionWidget(b)},q.p1);try{d=b(g,F)}catch(b){this.failExtensionWidget(a,f,b,e);return}if(this.extensionWidgetGenerations.get(a)!==f)return void this.disposeExtensionWidgetComponent(d);if(!d||"object"!=typeof d&&"function"!=typeof d||"function"!=typeof d.render)return void this.failExtensionWidget(a,f,Error("Extension widget factory must return a component with render(width)"),e,d);let h={key:a,component:d,placement:c?.placement??"aboveEditor",generation:f,clearEmitted:e,rendered:!1};this.activeExtensionWidgets.set(a,h),this.renderExtensionWidget(h)}getCustomUiWidth(a){if(!a||"object"!=typeof a)return q.p1;let b=a.overlayOptions,c="function"==typeof b?b():b;if(!c||"object"!=typeof c)return q.p1;let d=c.width;return"number"==typeof d&&Number.isFinite(d)?Math.max(40,Math.min(140,Math.round(d))):92}emitCustomUiRender(a,b){let c;try{c=b.component.render(b.width)}catch(a){c=[`Extension custom UI render failed: ${a instanceof Error?a.message:String(a)}`]}let d={type:"extension_ui_request",id:a,method:"custom",lines:c};this.pendingUiRequests.set(a,d),this.emit(d)}closeCustomUi(a,b){let c=this.activeCustomUis.get(a);if(c&&!c.settled){c.settled=!0,this.activeCustomUis.delete(a),this.pendingUiRequests.delete(a);try{c.component.dispose?.()}catch{}this.emit({type:"extension_ui_request",id:a,method:"custom",lines:[],closed:!0}),c.resolve(b)}}handleExtensionUiInput(a,b){let c=this.activeCustomUis.get(a);if(c&&"string"==typeof b)try{c.component.handleInput?.(b),this.activeCustomUis.has(a)&&this.emitCustomUiRender(a,c)}catch(b){this.closeCustomUi(a,void 0),this.emit({type:"extension_error",extensionPath:`custom-ui:${a}`,event:"custom_ui_input",error:b instanceof Error?b.message:String(b)})}}requestExtensionCustomUi(a,b){if("function"!=typeof a)return Promise.resolve(void 0);let c=(0,g.randomUUID)(),d=this.getCustomUiWidth(b);return new Promise(b=>{let e=!1,f=(0,q.TQ)(()=>{let a=this.activeCustomUis.get(c);a&&this.emitCustomUiRender(c,a)},d),g=a=>{e||(e=!0,b(a))},h=a=>{this.activeCustomUis.has(c)?this.closeCustomUi(c,a):g(a)};Promise.resolve().then(()=>a(f,F,G,h)).then(a=>{if(e){try{a?.dispose?.()}catch{}return}if(!a||"object"!=typeof a||"function"!=typeof a.render)return void g(void 0);let b={component:a,width:d,resolve:a=>g(a),settled:!1};this.activeCustomUis.set(c,b),this.emitCustomUiRender(c,b)}).catch(a=>{e||(this.emit({type:"extension_error",extensionPath:`custom-ui:${c}`,event:"custom_ui",error:a instanceof Error?a.message:String(a)}),g(void 0))})})}requestExtensionUi(a,b,c,d,e){if(e?.aborted)return Promise.resolve(b);let f=(0,g.randomUUID)(),h={type:"extension_ui_request",id:f,...a,...d?{timeout:d,expiresAt:Date.now()+d}:{}};return new Promise(a=>{let g,i=()=>{g&&clearTimeout(g),e?.removeEventListener("abort",k),this.pendingUiRequests.delete(f),this.pendingUiResponses.delete(f)},j=b=>{i(),a(b)},k=()=>j(b);d&&(g=setTimeout(()=>j(b),d)),e?.addEventListener("abort",k,{once:!0}),this.pendingUiRequests.set(f,h),this.pendingUiResponses.set(f,{resolve:a=>j(c(a)),cancel:()=>j(b)}),this.emit(h)})}createExtensionUiContext(){return{select:(a,b,c)=>this.requestExtensionUi({method:"select",title:a,options:b,...c?.timeout?{timeout:c.timeout}:{}},void 0,a=>"value"in a?a.value:void 0,c?.timeout,c?.signal),confirm:(a,b,c)=>this.requestExtensionUi({method:"confirm",title:a,message:b,...c?.timeout?{timeout:c.timeout}:{}},!1,a=>"confirmed"in a&&a.confirmed,c?.timeout,c?.signal),input:(a,b,c)=>this.requestExtensionUi({method:"input",title:a,...void 0!==b?{placeholder:b}:{},...c?.timeout?{timeout:c.timeout}:{}},void 0,a=>"value"in a?a.value:void 0,c?.timeout,c?.signal),editor:(a,b,c)=>this.requestExtensionUi({method:"editor",title:a,...void 0!==b?{prefill:b}:{},...c?.timeout?{timeout:c.timeout}:{}},void 0,a=>"value"in a?a.value:void 0,c?.timeout,c?.signal),notify:(a,b)=>{this.emit({type:"extension_ui_request",id:(0,g.randomUUID)(),method:"notify",message:a,notifyType:b})},onTerminalInput:()=>()=>{},setStatus:(a,b)=>{void 0===b?this.extensionStatuses.delete(a):this.extensionStatuses.set(a,b),this.emit({type:"extension_ui_request",id:(0,g.randomUUID)(),method:"setStatus",statusKey:a,statusText:b})},setWorkingMessage:()=>{},setWorkingVisible:()=>{},setWorkingIndicator:()=>{},setHiddenThinkingLabel:()=>{},setWidget:(a,b,c)=>{if(!this._alive||this.extensionWidgetsResetting)return;if("function"==typeof b)return void this.setExtensionWidgetFactory(a,b,c);if(void 0!==b&&!Array.isArray(b))return;if(void 0===b)return void this.clearExtensionWidget(a);let d=this.activeExtensionWidgets.has(a)?this.clearExtensionWidget(a):this.nextExtensionWidgetGeneration(a);this.extensionWidgetGenerations.get(a)===d&&(this.extensionWidgets.set(a,{key:a,lines:b,placement:c?.placement??"aboveEditor"}),this.emit({type:"extension_ui_request",id:(0,g.randomUUID)(),method:"setWidget",widgetKey:a,widgetLines:b,widgetPlacement:c?.placement}))},setFooter:()=>{},setHeader:()=>{},setTitle:a=>{this.emit({type:"extension_ui_request",id:(0,g.randomUUID)(),method:"setTitle",title:a})},custom:(a,b)=>this.requestExtensionCustomUi(a,b),pasteToEditor:a=>{this.emit({type:"extension_ui_request",id:(0,g.randomUUID)(),method:"set_editor_text",text:a})},setEditorText:a=>{this.emit({type:"extension_ui_request",id:(0,g.randomUUID)(),method:"set_editor_text",text:a})},getEditorText:()=>"",addAutocompleteProvider:()=>{},setEditorComponent:()=>{},getEditorComponent:()=>void 0,get theme(){return F},getAllThemes:()=>[],getTheme:()=>void 0,setTheme:()=>({success:!1,error:"Theme switching is not supported in Pi Web extension UI yet"}),getToolsExpanded:()=>!1,setToolsExpanded:()=>{}}}createExtensionCommandContextActions(){return{waitForIdle:async()=>{let a=this.inner.agent;await a.waitForIdle?.()},newSession:async()=>({cancelled:!0}),fork:async()=>({cancelled:!0}),navigateTree:async(a,b)=>({cancelled:(await this.inner.navigateTree(a,{summarize:b?.summarize})).cancelled}),switchSession:async()=>({cancelled:!0}),reload:async()=>{this.extensionStatuses.clear(),this.resetExtensionWidgetsForReload(),this.syncProjectTrust(),await this.inner.reload({beforeSessionStart:()=>{this.inner.extensionRunner.setUIContext?.(this.createExtensionUiContext(),"rpc")}}),this.applyForcedEmptySystemPrompt()}}}syncProjectTrust(){let a=(0,o.Y1)(this.cwd,(0,e.getAgentDir)());this.inner.settingsManager.setProjectTrusted(a.trusted)}}function t(){if(!globalThis.__piSessions){globalThis.__piSessions=new Map;let a=()=>globalThis.__piSessions?.forEach(a=>a.destroy());process.once("exit",a),process.once("SIGINT",a),process.once("SIGTERM",a)}return globalThis.__piSessions}function u(a){let b=(0,i.resolve)(a);try{return(0,h.realpathSync)(b)}catch{return b}}function v(){return globalThis.__piStartingSessionCwds||(globalThis.__piStartingSessionCwds=new Map),globalThis.__piStartingSessionCwds}function w(a){return t().get(a)}function x(){let a=[];for(let b of t().values()){if(!b.isAlive())continue;let c=b.inner.sessionManager,d=c.getHeader(),e=c.getEntries(),f=e.filter(a=>"message"===a.type),g=f.find(a=>"user"===a.message.role),i=c.getSessionFile()??b.sessionFile,j=!!(i&&(0,h.existsSync)(i));if(!j&&(!b.isRunning()||!g))continue;let k=d?.timestamp??e[0]?.timestamp??new Date().toISOString(),l=new Date(k).getTime(),m=Number.isNaN(l)?Date.now():l;for(let a of f){let b=function(a){if("user"!==a.message.role&&"assistant"!==a.message.role)return;if("number"==typeof a.message.timestamp)return a.message.timestamp;let b=new Date(a.timestamp).getTime();return Number.isNaN(b)?void 0:b}(a);void 0!==b&&(m=Math.max(m,b))}a.push({path:i??"",id:d?.id??b.sessionId,cwd:d?.cwd??b.cwd,name:c.getSessionName(),created:k,modified:new Date(m).toISOString(),messageCount:f.length,firstMessage:g&&function(a){if("bashExecution"===a.message.role)return"";let b=a.message.content;return"string"==typeof b?b:b.map(a=>"text"===a.type?a.text:"").filter(Boolean).join(" ")}(g)||"(no messages)",transient:!j})}return a}function y(a){let b=u(a);return!!v().has(b)||Array.from(t().values()).some(a=>u(a.cwd)===b&&a.isRunning())}async function z(a){let b=u(a),c=Array.from(t().values()).filter(a=>u(a.cwd)===b);return await Promise.all(c.map(a=>a.shutdown())),c.length}function A(){let a=new Set;for(let[b,c]of t())c.isRunning()&&a.add(c.sessionId||b);return[...a]}async function B(a,b,c,d={}){let f,g,h,{toolNames:i,initialModel:j,thinkingLevel:q}=d,r=t(),w=(globalThis.__piStartLocks||(globalThis.__piStartLocks=new Map),globalThis.__piStartLocks),x=r.get(a);if(x?.isAlive())return{session:x,realSessionId:a};let y=w.get(a);if(y)return y;if(b)f=e.SessionManager.open(b,void 0);else{if(!c)throw Error("cwd is required for a new session");f=e.SessionManager.create(c,void 0)}let z=f.getCwd(),A=(g=v(),h=u(z),g.set(h,(g.get(h)??0)+1),()=>{let a=(g.get(h)??1)-1;a>0?g.set(h,a):g.delete(h)}),C=(async()=>{let a;(0,e.initTheme)();let b=(0,e.getAgentDir)();void 0!==i&&(a=0===i.length?[]:void 0);let c=(0,o.Fk)(z,b),d=e.SettingsManager.create(z,b),g=await (0,e.createAgentSessionServices)({cwd:z,agentDir:b,settingsManager:d,resourceLoaderOptions:{extensionFactories:[(0,m.eD)({cwd:z,settings:d})],extensionsOverride:m.Ds},...c?{resourceLoaderReloadOptions:c}:{}}),h=await (0,l.p)(g.modelRuntime,g.settingsManager.getEnabledModels()),t=g.settingsManager.getDefaultProvider(),u=g.settingsManager.getDefaultModel(),v=f.getBranch().some(a=>"message"===a.type)?{scopedModels:[...h.scopedModels]}:(0,l.I)(h,{...j?{requestedModel:j}:{},...t&&u?{defaultModel:{provider:t,modelId:u}}:{},...q?{thinkingLevel:q}:{}}),{session:w}=await (0,e.createAgentSessionFromServices)({services:g,sessionManager:f,...v.model?{model:v.model}:{},...v.thinkingLevel?{thinkingLevel:v.thinkingLevel}:{},...v.scopedModels.length>0?{scopedModels:v.scopedModels}:{},...void 0!==a?{tools:a}:{}});(await (0,p.o)(g.settingsManager,{...j?{model:j}:{},...q?{thinkingLevel:q}:{}},{...w.model?{model:{provider:w.model.provider,modelId:w.model.id}}:{},thinkingLevel:w.thinkingLevel,supportsThinking:w.supportsThinking()})).modelDefaultChanged&&(0,k.kn)(),i&&i.length>0&&w.setActiveToolsByName(s(w,i));let x=new H(w);i?.length===0&&x.setForceEmptySystemPrompt(!0),x.start();let y=w.sessionId,A=w.sessionFile;return A&&(0,n.O8)(y,A),x.onDestroy(()=>r.delete(y)),r.set(y,x),x.beginExtensionBinding({forceEmptySystemPrompt:i?.length===0}),{session:x,realSessionId:y}})().finally(()=>{w.delete(a),A()});return w.set(a,C),C}d()}catch(a){d(a)}})},71069:(a,b,c)=>{c.d(b,{TQ:()=>e,p1:()=>d});let d=92;function e(a,b=d,c=40){return Object.freeze({terminal:Object.freeze({columns:b,rows:c,kittyProtocolActive:!1}),requestRender:a})}},72498:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.d(b,{Fk:()=>i,Y1:()=>g,er:()=>h});var e=c(75430),f=a([e]);function g(a,b){if(!(a&&(0,e.hasTrustRequiringProjectResources)(a)))return{requiresTrust:!1,trusted:!0};let c=new e.ProjectTrustStore(b);return{requiresTrust:!0,trusted:!0===c.get(a)}}function h(a,b){let c=g(a,b);return c.requiresTrust?(new e.ProjectTrustStore(b).set(a,!0),{requiresTrust:!0,trusted:!0}):c}function i(a,b){if(!g(a,b).requiresTrust)return;let c=new e.ProjectTrustStore(b);return{resolveProjectTrust:async()=>!0===c.get(a)}}e=(f.then?(await f)():f)[0],d()}catch(a){d(a)}})},78970:(a,b,c)=>{c.d(b,{kc:()=>d});function d(a){if(void 0===a)return null;if(!Array.isArray(a))return"images must be an array";if(a.length>10)return"A message can include at most 10 images";for(let b of a){if(!b||"object"!=typeof b||"image"!==b.type)return"Each attachment must be an image";if(!function(a){if(!a||"object"!=typeof a||"string"!=typeof a.data||"string"!=typeof a.mimeType||!a.mimeType.startsWith("image/"))return!1;let b=function(a){if(!a||a.length%4!=0)return null;let b=a.endsWith("==")?2:+!!a.endsWith("="),c=a.length-b;for(let b=0;b<c;b+=1){var d;if(!((d=a.charCodeAt(b))>=65&&d<=90||d>=97&&d<=122||d>=48&&d<=57||43===d||47===d))return null}for(let b=c;b<a.length;b+=1)if("="!==a[b])return null;return a.length/4*3-b}(a.data);return null!==b&&b<=0xa00000}(b))return"Each image must be valid base64 image data of 10MB or smaller"}return null}}};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
self.__BUILD_MANIFEST={__rewrites:{afterFiles:[],beforeFiles:[],fallback:[]},__routerFilterStatic:{numItems:34,errorRate:1e-4,numBits:652,numHashes:14,bitArray:[1,1,0,0,0,1,1,0,0,0,1,0,1,1,1,1,0,1,0,1,1,1,1,0,0,0,0,0,0,0,1,1,1,0,0,0,0,1,1,0,1,0,1,1,1,1,1,0,0,0,0,1,0,0,1,0,0,1,0,0,0,1,1,1,0,1,1,1,0,1,1,1,1,1,1,0,1,1,0,1,1,0,1,0,1,1,1,0,0,1,0,1,1,1,1,1,0,1,0,1,0,0,1,1,1,0,0,0,1,0,1,0,1,1,1,1,1,0,1,0,0,0,1,1,0,1,1,1,0,1,1,1,0,1,0,0,1,1,1,1,1,0,1,1,1,1,0,0,0,1,1,1,1,0,1,0,1,0,0,0,0,1,1,0,0,1,1,0,1,0,1,1,0,0,0,1,0,1,0,1,1,0,1,0,0,0,1,0,0,0,0,1,0,1,0,0,1,0,1,1,1,0,0,1,1,0,0,1,1,0,0,1,0,1,1,1,1,1,0,0,0,1,1,1,0,0,1,1,1,1,1,0,0,0,0,1,0,0,1,0,1,0,0,0,1,0,1,1,0,0,1,0,1,1,1,0,0,1,1,0,1,1,0,1,0,0,0,0,1,1,0,0,1,0,1,0,0,0,1,0,1,1,0,0,0,0,1,1,0,0,1,1,1,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,0,1,0,1,0,0,1,0,1,0,1,1,1,0,1,0,0,1,0,0,0,0,1,1,1,1,1,1,0,0,1,1,1,0,1,1,1,1,0,0,0,0,1,0,1,1,0,0,1,0,0,1,1,0,1,0,1,1,0,1,0,1,1,1,0,0,1,1,1,0,0,1,0,1,1,1,1,0,1,1,0,1,0,0,0,0,0,1,0,0,1,1,0,1,0,0,0,0,0,0,0,0,1,0,0,1,1,1,1,0,1,1,0,0,0,0,0,1,0,1,0,1,1,0,1,1,1,1,1,1,0,1,1,1,1,0,0,0,1,1,1,0,1,1,1,0,0,1,1,1,1,1,0,1,1,0,0,0,1,1,1,1,1,0,0,1,0,0,1,1,0,0,1,1,0,1,0,0,0,0,0,0,0,0,0,1,1,1,0,0,1,0,1,1,1,1,1,1,1,1,1,0,1,1,1,1,1,0,0,0,1,0,1,1,0,1,1,1,1,0,1,0,0,1,1,0,1,0,1,1,1,1,0,0,0,1,1,0,1,0,1,0,0,0,1,1,1,1,1,1,1,1,0,0,1,1,0,0,0,1,1,0,1,0,0,0,1,0,1,0,1,0,0,1,0,1,1,1,0,0,0,1,1,1,0,0,0,1,1,1,0,0,1,0,1,1,0,0,0,0,1,1,0,1,0,0,1,1,0,0,0,1,0,1,0,0,1,0,1,1,1,0,0,1,0,0,0,0,1,1,1,0,1,0,0,0,0,0,0,1,0,1,1,0]},__routerFilterDynamic:{numItems:7,errorRate:1e-4,numBits:135,numHashes:14,bitArray:[0,0,1,0,0,1,0,0,1,0,1,1,0,1,0,1,0,0,0,0,1,0,1,0,1,1,0,0,1,0,0,0,1,1,1,1,1,0,1,0,1,1,1,1,0,0,1,1,1,1,1,0,1,0,0,1,1,1,1,0,1,1,0,1,1,1,1,0,1,1,1,1,1,0,0,0,0,1,0,0,1,0,1,0,0,0,1,0,0,1,1,0,0,1,0,1,0,1,1,1,1,0,0,0,0,0,0,0,1,1,1,1,0,1,1,0,0,0,0,0,1,0,0,1,1,1,1,1,0,0,1,0,1,0,1]},sortedPages:["/_app"]},self.__BUILD_MANIFEST_CB&&self.__BUILD_MANIFEST_CB();
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3266],{82407:()=>{},83266:(e,t,r)=>{"use strict";r.r(t),r.d(t,{TerminalPanel:()=>m});var n=r(95155),i=r(12115),l=r(47650),a=r(8422);r(82407);var s=class{activate(e){this._terminal=e}dispose(){}fit(){let e=this.proposeDimensions();if(!e||!this._terminal||isNaN(e.cols)||isNaN(e.rows))return;let t=this._terminal._core;(this._terminal.rows!==e.rows||this._terminal.cols!==e.cols)&&(t._renderService.clear(),this._terminal.resize(e.cols,e.rows))}proposeDimensions(){if(!this._terminal||!this._terminal.element||!this._terminal.element.parentElement)return;let e=this._terminal._core._renderService.dimensions;if(0===e.css.cell.width||0===e.css.cell.height)return;let t=0===this._terminal.options.scrollback?0:this._terminal.options.overviewRuler?.width||14,r=window.getComputedStyle(this._terminal.element.parentElement),n=parseInt(r.getPropertyValue("height")),i=Math.max(0,parseInt(r.getPropertyValue("width"))),l=window.getComputedStyle(this._terminal.element),a={top:parseInt(l.getPropertyValue("padding-top")),bottom:parseInt(l.getPropertyValue("padding-bottom")),right:parseInt(l.getPropertyValue("padding-right")),left:parseInt(l.getPropertyValue("padding-left"))},s=a.top+a.bottom;return{cols:Math.max(2,Math.floor((i-(a.right+a.left)-t)/e.css.cell.width)),rows:Math.max(1,Math.floor((n-s)/e.css.cell.height))}}},o=r(39247),c=r(31590);let d={black:"#000000",red:"#cd3131",green:"#0dbc79",yellow:"#e5e510",blue:"#2472c8",magenta:"#bc3fbc",cyan:"#11a8cd",white:"#e5e5e5",brightBlack:"#666666",brightRed:"#f14c4c",brightGreen:"#23d18b",brightYellow:"#f5f543",brightBlue:"#3b8eea",brightMagenta:"#d670d6",brightCyan:"#29b8db",brightWhite:"#ffffff"},u={black:"#000000",red:"#cd3131",green:"#0dbc79",yellow:"#949800",blue:"#0451a5",magenta:"#bc05bc",cyan:"#0598bc",white:"#555555",brightBlack:"#666666",brightRed:"#cd3131",brightGreen:"#14ce14",brightYellow:"#b5ba00",brightBlue:"#0451a5",brightMagenta:"#bc05bc",brightCyan:"#0598bc",brightWhite:"#a5a5a5"};function m({origin:e,anchorRect:t,activeCwd:r,activeProjectLabel:h,hidden:f,onClose:p}){let b,g,w,y=(0,c.a)(),{t:v}=(0,o.s)(),[x,k]=(0,i.useState)([]),[T,j]=(0,i.useState)(null),[E,C]=(0,i.useState)(!1),[S,M]=(0,i.useState)(null),[N,$]=(0,i.useState)(new Set),L=(0,i.useRef)(!0),_=(0,i.useRef)(0),[R,B]=(0,i.useState)(0),P=(0,i.useRef)(new Set),I=(0,i.useRef)(null),V=(0,i.useRef)(null),W=(0,i.useRef)(null),O=(0,i.useRef)(new Map),z=(0,i.useRef)(new Map),D=(0,i.useRef)(null);D.current=T;let F=(0,i.useRef)(f);F.current=f;let A=(0,i.useRef)(new Set),J=(0,i.useMemo)(()=>h?x.filter(e=>e.projectLabel===h):[],[x,h]),H=(0,i.useMemo)(()=>{let e=new Map;for(let t of x){let r=e.get(t.projectLabel)??[];r.push(t),e.set(t.projectLabel,r)}return[...e.entries()]},[x]),Q=(0,i.useMemo)(()=>{if(!T||!J.some(e=>e.id===T)){let e=T?x.find(e=>e.id===T):void 0;return e?[e,...J]:J}return J},[J,x,T]),G=(0,i.useCallback)(async()=>{try{let e=await fetch("/api/terminal"),t=await e.json();if(Array.isArray(t.terminals)){let e=A.current;k(t.terminals.filter(t=>!e.has(t.id))),L.current=!1,_.current+=1,B(e=>e+1)}}catch{}},[]),Y=(0,i.useMemo)(()=>()=>{let e=getComputedStyle(document.documentElement),t=(t,r)=>e.getPropertyValue(t).trim()||r,r=document.documentElement.classList.contains("dark");return{background:`rgba(${t("--assistant-bg-rgb",r?"36, 36, 39":"252, 252, 253")}, ${t("--bubble-alpha",r?"0.55":"0.44")})`,foreground:t("--text",r?"#d4d4d4":"#1f2328"),cursor:t("--accent","#3b82f6"),cursorAccent:t("--bg",r?"#1e1e1e":"#ffffff"),selectionBackground:r?"rgba(128, 128, 128, 0.35)":"rgba(0, 0, 0, 0.15)",...r?d:u}},[]);(0,i.useEffect)(()=>{let e=new MutationObserver(()=>{let e=Y();for(let[,t]of z.current)t.term&&(t.term.options.theme=e)});return e.observe(document.documentElement,{attributes:!0,attributeFilter:["class","style"]}),()=>e.disconnect()},[Y]);let q=(0,i.useCallback)(e=>{let t=z.current.get(e);if(t?.es)return;if(!t){let r=new a.B({convertEol:!1,fontSize:12.5,fontFamily:getComputedStyle(document.documentElement).getPropertyValue("--font-mono").trim()||"'JetBrains Mono', Consolas, monospace",cursorBlink:!0,scrollback:5e3,theme:Y()}),n=new s;r.loadAddon(n),r.onData(r=>{let n=t;n.inputQueue=n.inputQueue.catch(()=>{}).then(async()=>{await fetch(`/api/terminal/${e}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({type:"input",data:r})})}).catch(()=>{})}),t={term:r,fit:n,es:null,offset:null,reconnectTimer:null,fitTimer:null,inputQueue:Promise.resolve(),disposed:!1},z.current.set(e,t)}let r=null!==t.offset?`?since=${t.offset}`:"",n=new EventSource(`/api/terminal/${e}/events${r}`);t.es=n,n.onopen=()=>{$(t=>{if(!t.has(e))return t;let r=new Set(t);return r.delete(e),r})},n.addEventListener("output",e=>{let{d:r,o:n}=JSON.parse(e.data);t.offset=n,t.term.write(r)}),n.addEventListener("gone",()=>{n.close(),t.es=null,G()}),n.onerror=()=>{n.close(),t&&!t.disposed&&(t.es=null,t.reconnectTimer&&clearTimeout(t.reconnectTimer),t.reconnectTimer=setTimeout(()=>{fetch(`/api/terminal/${e}`).then(t=>{t.ok?q(e):G()}).catch(()=>{$(t=>t.has(e)?t:new Set(t).add(e))})},1500))}},[Y,G]),K=(0,i.useCallback)(e=>{let t=z.current.get(e);t&&fetch(`/api/terminal/${e}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({type:"resize",cols:t.term.cols,rows:t.term.rows})})},[]),U=(0,i.useCallback)((e,t=0)=>{let r,n=z.current.get(e),i=W.current;if(n&&i&&!F.current&&!n.disposed){try{r=n.fit.proposeDimensions()}catch{}if(r&&r.cols>2&&r.rows>1){n.fitTimer&&(clearTimeout(n.fitTimer),n.fitTimer=null);try{n.fit.fit()}catch{}K(e),n.term.element?.classList.remove("terminal-attaching"),n.term.focus(),requestAnimationFrame(()=>{if(!n.disposed&&!F.current)try{n.fit.fit()}catch{}});return}if(t>=300){n.fitTimer&&(clearTimeout(n.fitTimer),n.fitTimer=null),n.term.element?.classList.remove("terminal-attaching"),console.warn(`[terminal] fit did not settle for ${e} after ~9s; showing as-is`);return}n.fitTimer&&clearTimeout(n.fitTimer),n.fitTimer=setTimeout(()=>U(e,t+1),30)}},[K]);(0,i.useEffect)(()=>{let e=W.current,t=T?O.current.get(T):void 0;if(!e||!t||!T)return;q(T);let r=z.current.get(T);if(!r||f)return;r.term.element?r.term.element.parentElement!==t&&t.appendChild(r.term.element):r.term.open(t),r.term.element?.classList.add("terminal-attaching"),U(T);let n=new ResizeObserver(()=>{F.current||D.current!==T||U(T)});return n.observe(t),()=>{n.disconnect()}},[T,q,f,U]),(0,i.useEffect)(()=>{V.current=null,I.current=null,L.current=!0,f||G()},[f,h,G]),(0,i.useEffect)(()=>{if(f)return;let e=setInterval(()=>void G(),5e3);return()=>clearInterval(e)},[G,f]),(0,i.useEffect)(()=>{let e=new Set(x.map(e=>e.id));for(let[t,r]of z.current)e.has(t)||(r.disposed=!0,r.reconnectTimer&&clearTimeout(r.reconnectTimer),r.fitTimer&&clearTimeout(r.fitTimer),r.es?.close(),r.term.dispose(),z.current.delete(t),$(e=>{if(!e.has(t))return e;let r=new Set(e);return r.delete(t),r}),D.current===t&&j(x.find(e=>e.id!==t)?.id??null))},[x]),(0,i.useEffect)(()=>()=>{for(let[,e]of z.current)e.disposed=!0,e.reconnectTimer&&clearTimeout(e.reconnectTimer),e.fitTimer&&clearTimeout(e.fitTimer),e.es?.close(),e.term.dispose();z.current.clear()},[]);let X=(0,i.useCallback)(async()=>{C(!0),M(null),h&&P.current.delete(h);try{let e=await fetch("/api/terminal",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({cwd:r||"~"})}),t=await e.json();if(!e.ok||!t.terminal)throw Error(t.error??`HTTP ${e.status}`);await G(),j(t.terminal.id)}catch(e){M(String(e instanceof Error?e.message:e))}finally{C(!1)}},[r,h,G]);(0,i.useEffect)(()=>{if(!L.current&&!E){if(!h){!D.current&&x.length>0&&j(x[x.length-1].id);return}if(!f&&V.current!==h){if(V.current=h,J.length>0){D.current&&J.some(e=>e.id===D.current)||j(J[J.length-1].id);return}P.current.has(h)||I.current!==h&&(I.current=h,X())}}},[E,h,J,x,f,R,X]);let Z=(0,i.useCallback)(async(e,t)=>{P.current.add(t),A.current.add(e),k(t=>t.filter(t=>t.id!==e));try{(await fetch(`/api/terminal/${e}`,{method:"DELETE"})).ok||(A.current.delete(e),G())}catch{A.current.delete(e),G()}},[G]),ee=(0,i.useCallback)(async()=>{let e=[...N];if(0!==e.length){for(let t of e)A.current.add(t),fetch(`/api/terminal/${t}`,{method:"DELETE"}).finally(()=>{A.current.delete(t)});$(new Set),k(t=>t.filter(t=>!e.includes(t.id))),G()}},[N,G]),et=(0,i.useRef)(null),er=(0,i.useRef)(null);(0,i.useEffect)(()=>{er.current=document.getElementById("terminal-bottombar-btn");let e=e=>{let t=e.target;et.current?.contains(t)||er.current?.contains(t)||document.getElementById("terminal-topbar-btn")?.contains(t)||p()},t=e=>{"Escape"===e.key&&p()};return document.addEventListener("pointerdown",e,!0),document.addEventListener("keydown",t,!0),()=>{document.removeEventListener("pointerdown",e,!0),document.removeEventListener("keydown",t,!0)}},[p]);let en=y?{position:"fixed",inset:10,zIndex:1050}:"top"===e?(g=Math.min(780,(b=document.documentElement.clientWidth||window.innerWidth)-48),w=t?Math.max(24,Math.min(t.left,b-g-24)):b-g-24,{position:"fixed",top:t?.bottom??t?.top??46,left:w,width:g,height:465,zIndex:1040}):{position:"fixed",right:t?Math.max(24,window.innerWidth-t.right):24,bottom:t?window.innerHeight-t.top:35,width:Math.min(780,window.innerWidth-48),height:Math.min(465,window.innerHeight-120),zIndex:1040},ei=(0,n.jsxs)("div",{ref:et,className:`terminal-panel terminal-panel-${e}${y?" terminal-panel-mobile":""}${f?" terminal-panel-hidden":""}`,style:{...en,background:"var(--panel-glass)",backdropFilter:"blur(var(--glass-blur-panel)) saturate(var(--glass-saturate))",WebkitBackdropFilter:"blur(var(--glass-blur-panel)) saturate(var(--glass-saturate))"},role:"region","aria-label":v("terminal.title"),children:[(0,n.jsxs)("div",{className:"terminal-tabs",children:[(0,n.jsx)("div",{className:"terminal-tab-scroll",children:Q.map(e=>(0,n.jsxs)("div",{className:`terminal-chip${e.id===T?" is-active":""}${!e.running?" is-dead":""}${N.has(e.id)?" is-disconnected":""}`,onClick:()=>j(e.id),role:"tab","aria-selected":e.id===T,title:`${e.projectLabel} — ${e.cwd}`,children:[(0,n.jsx)("span",{className:`terminal-dot${!e.running?" is-dead":N.has(e.id)?" is-disconnected":""}`}),(0,n.jsx)("span",{className:"terminal-chip-cwd",title:e.cwd,children:e.name||e.cwd.split(/[\\/]/).filter(Boolean).pop()||e.cwd}),(0,n.jsx)("button",{type:"button",className:"terminal-chip-close",title:v("terminal.close"),"aria-label":v("terminal.close"),onClick:t=>{t.stopPropagation(),Z(e.id,e.projectLabel)},children:"\xd7"})]},e.id))}),(0,n.jsx)("button",{type:"button",className:"terminal-new",onClick:()=>void X(),disabled:E,title:v("terminal.new"),"aria-label":v("terminal.new"),children:(0,n.jsxs)("svg",{width:"13",height:"13",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round","aria-hidden":"true",children:[(0,n.jsx)("line",{x1:"12",y1:"5",x2:"12",y2:"19"}),(0,n.jsx)("line",{x1:"5",y1:"12",x2:"19",y2:"12"})]})}),N.size>0&&(0,n.jsx)("button",{type:"button",className:"terminal-cleanup",onClick:()=>void ee(),title:v("terminal.cleanupDisconnected"),"aria-label":v("terminal.cleanupDisconnected"),children:(0,n.jsxs)("svg",{width:"13",height:"13",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[(0,n.jsx)("path",{d:"M3 6h18"}),(0,n.jsx)("path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6"}),(0,n.jsx)("path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"})]})}),!y&&(0,n.jsx)("button",{type:"button",className:"terminal-close",onClick:p,title:v("common.close"),"aria-label":v("common.close"),children:(0,n.jsxs)("svg",{width:"13",height:"13",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round","aria-hidden":"true",children:[(0,n.jsx)("line",{x1:"5",y1:"5",x2:"19",y2:"19"}),(0,n.jsx)("line",{x1:"19",y1:"5",x2:"5",y2:"19"})]})}),(0,n.jsxs)("select",{className:"terminal-all-select",value:T??"",onChange:e=>{let t=e.target.value;t&&j(t)},title:v("terminal.all"),"aria-label":v("terminal.all"),children:[(0,n.jsx)("option",{value:"",disabled:!0,children:v("terminal.all")}),H.map(([e,t])=>(0,n.jsx)("optgroup",{label:e,children:t.map(e=>(0,n.jsxs)("option",{value:e.id,title:`${e.projectLabel} — ${e.cwd}`,children:[e.name||e.cwd.split(/[\\/]/).filter(Boolean).pop()||e.cwd,e.running?"":` \xb7 ${v("terminal.exited")}`]},e.id))},e))]})]}),S&&(0,n.jsx)("div",{className:"terminal-error",children:S}),(0,n.jsxs)("div",{className:"terminal-body",ref:W,children:[x.map(e=>(0,n.jsx)("div",{ref:t=>{t?O.current.set(e.id,t):O.current.delete(e.id)},"data-terminal-view":e.id,style:{display:e.id===T?"block":"none",height:"100%"}},e.id)),!T&&(0,n.jsx)("div",{className:"terminal-placeholder",children:(0,n.jsx)("button",{type:"button",onClick:()=>void X(),disabled:E,children:E?"…":v("terminal.createFirst")})})]})]});return(0,l.createPortal)(ei,document.body)}}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[90,552,976,1004,1097,1337,1541,1960,2053,2138,2504,2614,2835,2837,3432,3507,3851,3943,3955,4016,4037,4524,4896,5221,5843,5907,6252,6450,6709,6819,6849,6919,6988,7067,7483,7769,7812,7851,8167,8197,8429,8658,8743,8933,9156,9183,9742,9747,9787,9822,9968],{84441:()=>{}},_=>{_.O(0,[8441,3794,7358],()=>_(_.s=84441)),_N_E=_.O()}]);
|