@pricening/pi-web 0.12.1 → 0.12.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.next/BUILD_ID +1 -1
- package/.next/app-path-routes-manifest.json +7 -5
- package/.next/build-manifest.json +2 -2
- package/.next/next-server.js.nft.json +1 -1
- package/.next/prerender-manifest.json +6 -6
- package/.next/required-server-files.js +1 -1
- package/.next/required-server-files.json +1 -1
- package/.next/routes-manifest.json +12 -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 +4 -4
- package/.next/server/app/_not-found.segments/_full.segment.rsc +4 -4
- package/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +9 -7
- package/.next/server/app/_not-found.segments/_tree.segment.rsc +3 -3
- package/.next/server/app/api/agent/[id]/bash-output/route.js +1 -1
- package/.next/server/app/api/agent/[id]/events/route.js +2 -2
- package/.next/server/app/api/agent/[id]/lease/route.js +1 -1
- package/.next/server/app/api/agent/[id]/route.js +1 -1
- package/.next/server/app/api/agent/new/route.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/app-update/route.js +1 -1
- package/.next/server/app/api/archives/route.js +1 -1
- package/.next/server/app/api/archives/route.js.nft.json +1 -1
- package/.next/server/app/api/archives/sessions/route.js +1 -1
- package/.next/server/app/api/archives/sessions/route.js.nft.json +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/login/[provider]/route.js +2 -2
- 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/providers/route.js +1 -1
- package/.next/server/app/api/cache-miss-notices/route.js +1 -0
- package/.next/server/app/api/cache-miss-notices/route.js.nft.json +1 -0
- package/.next/server/app/api/cache-miss-notices/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/cwd/browse/route.js +1 -1
- package/.next/server/app/api/cwd/validate/route.js +1 -1
- package/.next/server/app/api/default-cwd/route.js +1 -1
- package/.next/server/app/api/file-index/route.js +1 -1
- package/.next/server/app/api/files/[...path]/route.js +2 -2
- package/.next/server/app/api/git/diff/route.js +2 -2
- package/.next/server/app/api/git/status/route.js +2 -2
- package/.next/server/app/api/home/route.js +1 -1
- package/.next/server/app/api/mcp/route.js +1 -1
- package/.next/server/app/api/mcp/sign-in/[flowId]/route.js +1 -1
- package/.next/server/app/api/mcp/sign-in/route.js +1 -1
- package/.next/server/app/api/mcp/test/route.js +1 -1
- package/.next/server/app/api/models/default/route.js +1 -1
- package/.next/server/app/api/models/enabled/route.js +1 -1
- package/.next/server/app/api/models/refresh/route.js +1 -1
- package/.next/server/app/api/models/route.js +1 -1
- package/.next/server/app/api/models-config/catalog/route.js +1 -1
- package/.next/server/app/api/models-config/discover/route.js +1 -1
- package/.next/server/app/api/models-config/route.js +1 -1
- package/.next/server/app/api/models-config/test/route.js +1 -1
- package/.next/server/app/api/open-in-explorer/route.js +1 -1
- package/.next/server/app/api/pins/route.js +1 -1
- package/.next/server/app/api/plugins/check/route.js +1 -1
- package/.next/server/app/api/plugins/route.js +1 -1
- package/.next/server/app/api/project-trust/route.js +1 -1
- package/.next/server/app/api/provider-usage/query/route.js +1 -1
- package/.next/server/app/api/push/config/route.js +1 -1
- package/.next/server/app/api/push/subscribe/route.js +1 -1
- package/.next/server/app/api/sessions/[id]/auto-name/route.js +2 -2
- package/.next/server/app/api/sessions/[id]/context/route.js +1 -1
- package/.next/server/app/api/sessions/[id]/entries/[entryId]/thinking/route.js +1 -1
- package/.next/server/app/api/sessions/[id]/entries/[entryId]/tool-result-image/route.js +1 -1
- package/.next/server/app/api/sessions/[id]/export/route.js +2 -2
- package/.next/server/app/api/sessions/[id]/fork/route.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]/state/route.js +1 -1
- package/.next/server/app/api/sessions/delete/route.js +1 -1
- package/.next/server/app/api/sessions/delete/route.js.nft.json +1 -1
- package/.next/server/app/api/sessions/route.js +1 -1
- package/.next/server/app/api/sessions/search/route.js +1 -1
- package/.next/server/app/api/sessions/stats/route.js +1 -0
- package/.next/server/app/api/sessions/stats/route.js.nft.json +1 -0
- package/.next/server/app/api/sessions/stats/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/sessions/ui-state/route.js +1 -1
- package/.next/server/app/api/sessions/ui-state/route.js.nft.json +1 -1
- package/.next/server/app/api/skills/check/route.js +1 -1
- package/.next/server/app/api/skills/content/route.js +1 -1
- package/.next/server/app/api/skills/install/route.js +1 -1
- package/.next/server/app/api/skills/route.js +1 -1
- package/.next/server/app/api/skills/search/route.js +1 -1
- package/.next/server/app/api/skills/update/route.js +1 -1
- package/.next/server/app/api/subagents/[id]/route.js +1 -1
- package/.next/server/app/api/subagents/profiles/route.js +1 -1
- package/.next/server/app/api/subagents/settings/route.js +1 -1
- package/.next/server/app/api/terminal/[id]/events/route.js +2 -2
- package/.next/server/app/api/terminal/[id]/route.js +1 -1
- package/.next/server/app/api/terminal/route.js +1 -1
- package/.next/server/app/api/tools/settings/route.js +1 -1
- package/.next/server/app/api/web-auth/route.js +1 -1
- package/.next/server/app/api/worktrees/route.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 +6 -6
- package/.next/server/app/index.segments/__PAGE__.segment.rsc +7 -6
- package/.next/server/app/index.segments/_full.segment.rsc +6 -6
- package/.next/server/app/index.segments/_tree.segment.rsc +3 -3
- package/.next/server/app/login/page.js +1 -1
- package/.next/server/app/login/page_client-reference-manifest.js +1 -1
- package/.next/server/app/login.html +1 -1
- package/.next/server/app/login.rsc +5 -5
- package/.next/server/app/login.segments/_full.segment.rsc +5 -5
- package/.next/server/app/login.segments/_tree.segment.rsc +3 -3
- package/.next/server/app/login.segments/login/__PAGE__.segment.rsc +10 -8
- package/.next/server/app/manifest.webmanifest/route.js +2 -2
- package/.next/server/app/page.js +23 -23
- package/.next/server/app/page_client-reference-manifest.js +1 -1
- package/.next/server/app-paths-manifest.json +7 -5
- package/.next/server/chunks/1207.js +1 -1
- package/.next/server/chunks/1906.js +1 -0
- package/.next/server/chunks/2069.js +1 -0
- package/.next/server/chunks/2243.js +1 -1
- package/.next/server/chunks/27.js +1 -1
- package/.next/server/chunks/3757.js +1 -1
- package/.next/server/chunks/3824.js +1 -0
- package/.next/server/chunks/5582.js +3 -3
- package/.next/server/chunks/5799.js +1 -1
- package/.next/server/chunks/6429.js +13 -10
- package/.next/server/chunks/7492.js +1 -1
- package/.next/server/chunks/9280.js +3 -3
- package/.next/server/middleware-build-manifest.js +1 -1
- package/.next/server/middleware.js +4 -4
- package/.next/server/pages/404.html +1 -1
- package/.next/server/pages/500.html +1 -1
- package/.next/server/server-reference-manifest.json +1 -1
- package/.next/static/chunks/1278-069285b48cad19f3.js +1 -0
- package/.next/static/chunks/app/{api/agent/[id]/events/route-543f76df48110b10.js → _global-error/page-e8a55ff457853821.js} +1 -1
- package/.next/static/chunks/app/api/agent/[id]/{lease/route-543f76df48110b10.js → bash-output/route-e8a55ff457853821.js} +1 -1
- package/.next/static/chunks/app/{_global-error/page-543f76df48110b10.js → api/agent/[id]/events/route-e8a55ff457853821.js} +1 -1
- package/.next/static/chunks/app/api/agent/[id]/{bash-output/route-543f76df48110b10.js → lease/route-e8a55ff457853821.js} +1 -1
- package/.next/static/chunks/app/api/agent/[id]/route-e8a55ff457853821.js +1 -0
- package/.next/static/chunks/app/api/agent/new/route-e8a55ff457853821.js +1 -0
- package/.next/static/chunks/app/api/agent/running/route-e8a55ff457853821.js +1 -0
- package/.next/static/chunks/app/api/app-update/route-e8a55ff457853821.js +1 -0
- package/.next/static/chunks/app/api/archives/route-e8a55ff457853821.js +1 -0
- package/.next/static/chunks/app/api/archives/sessions/route-e8a55ff457853821.js +1 -0
- package/.next/static/chunks/app/api/auth/api-key/[provider]/route-e8a55ff457853821.js +1 -0
- package/.next/static/chunks/app/api/auth/login/[provider]/route-e8a55ff457853821.js +1 -0
- package/.next/static/chunks/app/api/auth/logout/[provider]/route-e8a55ff457853821.js +1 -0
- package/.next/static/chunks/app/api/auth/providers/route-e8a55ff457853821.js +1 -0
- package/.next/static/chunks/app/api/cache-miss-notices/route-e8a55ff457853821.js +1 -0
- package/.next/static/chunks/app/api/cwd/browse/route-e8a55ff457853821.js +1 -0
- package/.next/static/chunks/app/api/cwd/validate/route-e8a55ff457853821.js +1 -0
- package/.next/static/chunks/app/api/default-cwd/route-e8a55ff457853821.js +1 -0
- package/.next/static/chunks/app/api/file-index/route-e8a55ff457853821.js +1 -0
- package/.next/static/chunks/app/api/files/[...path]/route-e8a55ff457853821.js +1 -0
- package/.next/static/chunks/app/api/git/diff/route-e8a55ff457853821.js +1 -0
- package/.next/static/chunks/app/api/git/status/route-e8a55ff457853821.js +1 -0
- package/.next/static/chunks/app/api/home/route-e8a55ff457853821.js +1 -0
- package/.next/static/chunks/app/api/mcp/route-e8a55ff457853821.js +1 -0
- package/.next/static/chunks/app/api/mcp/sign-in/[flowId]/route-e8a55ff457853821.js +1 -0
- package/.next/static/chunks/app/api/mcp/sign-in/route-e8a55ff457853821.js +1 -0
- package/.next/static/chunks/app/api/mcp/test/route-e8a55ff457853821.js +1 -0
- package/.next/static/chunks/app/api/models/default/route-e8a55ff457853821.js +1 -0
- package/.next/static/chunks/app/api/models/enabled/route-e8a55ff457853821.js +1 -0
- package/.next/static/chunks/app/api/models/refresh/route-e8a55ff457853821.js +1 -0
- package/.next/static/chunks/app/api/models/route-e8a55ff457853821.js +1 -0
- package/.next/static/chunks/app/api/models-config/catalog/route-e8a55ff457853821.js +1 -0
- package/.next/static/chunks/app/api/models-config/discover/route-e8a55ff457853821.js +1 -0
- package/.next/static/chunks/app/api/models-config/route-e8a55ff457853821.js +1 -0
- package/.next/static/chunks/app/api/models-config/test/route-e8a55ff457853821.js +1 -0
- package/.next/static/chunks/app/api/open-in-explorer/route-e8a55ff457853821.js +1 -0
- package/.next/static/chunks/app/api/pins/route-e8a55ff457853821.js +1 -0
- package/.next/static/chunks/app/api/plugins/check/route-e8a55ff457853821.js +1 -0
- package/.next/static/chunks/app/api/plugins/route-e8a55ff457853821.js +1 -0
- package/.next/static/chunks/app/api/project-trust/route-e8a55ff457853821.js +1 -0
- package/.next/static/chunks/app/api/provider-usage/query/route-e8a55ff457853821.js +1 -0
- package/.next/static/chunks/app/api/push/config/route-e8a55ff457853821.js +1 -0
- package/.next/static/chunks/app/api/push/subscribe/route-e8a55ff457853821.js +1 -0
- package/.next/static/chunks/app/api/sessions/[id]/auto-name/route-e8a55ff457853821.js +1 -0
- package/.next/static/chunks/app/api/sessions/[id]/context/route-e8a55ff457853821.js +1 -0
- package/.next/static/chunks/app/api/sessions/[id]/entries/[entryId]/thinking/route-e8a55ff457853821.js +1 -0
- package/.next/static/chunks/app/api/sessions/[id]/entries/[entryId]/tool-result-image/route-e8a55ff457853821.js +1 -0
- package/.next/static/chunks/app/api/sessions/[id]/export/route-e8a55ff457853821.js +1 -0
- package/.next/static/chunks/app/api/sessions/[id]/fork/route-e8a55ff457853821.js +1 -0
- package/.next/static/chunks/app/api/sessions/[id]/route-e8a55ff457853821.js +1 -0
- package/.next/static/chunks/app/api/sessions/[id]/state/route-e8a55ff457853821.js +1 -0
- package/.next/static/chunks/app/api/sessions/delete/route-e8a55ff457853821.js +1 -0
- package/.next/static/chunks/app/api/sessions/route-e8a55ff457853821.js +1 -0
- package/.next/static/chunks/app/api/sessions/search/route-e8a55ff457853821.js +1 -0
- package/.next/static/chunks/app/api/sessions/stats/route-e8a55ff457853821.js +1 -0
- package/.next/static/chunks/app/api/sessions/ui-state/route-e8a55ff457853821.js +1 -0
- package/.next/static/chunks/app/api/skills/check/route-e8a55ff457853821.js +1 -0
- package/.next/static/chunks/app/api/skills/content/route-e8a55ff457853821.js +1 -0
- package/.next/static/chunks/app/api/skills/install/route-e8a55ff457853821.js +1 -0
- package/.next/static/chunks/app/api/skills/route-e8a55ff457853821.js +1 -0
- package/.next/static/chunks/app/api/skills/search/route-e8a55ff457853821.js +1 -0
- package/.next/static/chunks/app/api/skills/update/route-e8a55ff457853821.js +1 -0
- package/.next/static/chunks/app/api/subagents/[id]/route-e8a55ff457853821.js +1 -0
- package/.next/static/chunks/app/api/subagents/profiles/route-e8a55ff457853821.js +1 -0
- package/.next/static/chunks/app/api/subagents/settings/route-e8a55ff457853821.js +1 -0
- package/.next/static/chunks/app/api/terminal/[id]/events/route-e8a55ff457853821.js +1 -0
- package/.next/static/chunks/app/api/terminal/[id]/route-e8a55ff457853821.js +1 -0
- package/.next/static/chunks/app/api/terminal/route-e8a55ff457853821.js +1 -0
- package/.next/static/chunks/app/api/tools/settings/route-e8a55ff457853821.js +1 -0
- package/.next/static/chunks/app/api/web-auth/route-e8a55ff457853821.js +1 -0
- package/.next/static/chunks/app/api/worktrees/route-e8a55ff457853821.js +1 -0
- package/.next/static/chunks/app/{layout-e692afda7372fba3.js → layout-7494b1af2d31b9d3.js} +1 -1
- package/.next/static/chunks/app/manifest.webmanifest/route-e8a55ff457853821.js +1 -0
- package/.next/static/chunks/app/page-5ba76dad2ed46124.js +286 -0
- package/.next/static/chunks/next/dist/client/components/builtin/app-error-e8a55ff457853821.js +1 -0
- package/.next/static/chunks/next/dist/client/components/builtin/forbidden-e8a55ff457853821.js +1 -0
- package/.next/static/chunks/next/dist/client/components/builtin/not-found-e8a55ff457853821.js +1 -0
- package/.next/static/chunks/next/dist/client/components/builtin/unauthorized-e8a55ff457853821.js +1 -0
- package/.next/static/css/375a9b52d89c0bac.css +1 -0
- package/.next/static/css/bf49b4e87f26e436.css +1 -0
- package/.next/static/efO5oAUn5csYLU8nsXCq7/_buildManifest.js +1 -0
- package/.next/trace +83 -83
- package/.next/trace-build +1 -1
- package/.next/types/app/api/cache-miss-notices/route.ts +353 -0
- package/.next/types/app/api/sessions/stats/route.ts +353 -0
- package/.next/types/routes.d.ts +3 -1
- package/.next/types/validator.ts +18 -0
- package/README.ja.md +4 -4
- package/README.md +1 -1
- package/README.ru.md +4 -4
- package/README.zh-CN.md +14 -12
- package/package.json +3 -3
- package/.next/server/chunks/879.js +0 -1
- package/.next/static/chunks/1278-55cf58be60d11a5c.js +0 -1
- package/.next/static/chunks/app/api/agent/[id]/route-543f76df48110b10.js +0 -1
- package/.next/static/chunks/app/api/agent/new/route-543f76df48110b10.js +0 -1
- package/.next/static/chunks/app/api/agent/running/route-543f76df48110b10.js +0 -1
- package/.next/static/chunks/app/api/app-update/route-543f76df48110b10.js +0 -1
- package/.next/static/chunks/app/api/archives/route-543f76df48110b10.js +0 -1
- package/.next/static/chunks/app/api/archives/sessions/route-543f76df48110b10.js +0 -1
- package/.next/static/chunks/app/api/auth/api-key/[provider]/route-543f76df48110b10.js +0 -1
- package/.next/static/chunks/app/api/auth/login/[provider]/route-543f76df48110b10.js +0 -1
- package/.next/static/chunks/app/api/auth/logout/[provider]/route-543f76df48110b10.js +0 -1
- package/.next/static/chunks/app/api/auth/providers/route-543f76df48110b10.js +0 -1
- package/.next/static/chunks/app/api/cwd/browse/route-543f76df48110b10.js +0 -1
- package/.next/static/chunks/app/api/cwd/validate/route-543f76df48110b10.js +0 -1
- package/.next/static/chunks/app/api/default-cwd/route-543f76df48110b10.js +0 -1
- package/.next/static/chunks/app/api/file-index/route-543f76df48110b10.js +0 -1
- package/.next/static/chunks/app/api/files/[...path]/route-543f76df48110b10.js +0 -1
- package/.next/static/chunks/app/api/git/diff/route-543f76df48110b10.js +0 -1
- package/.next/static/chunks/app/api/git/status/route-543f76df48110b10.js +0 -1
- package/.next/static/chunks/app/api/home/route-543f76df48110b10.js +0 -1
- package/.next/static/chunks/app/api/mcp/route-543f76df48110b10.js +0 -1
- package/.next/static/chunks/app/api/mcp/sign-in/[flowId]/route-543f76df48110b10.js +0 -1
- package/.next/static/chunks/app/api/mcp/sign-in/route-543f76df48110b10.js +0 -1
- package/.next/static/chunks/app/api/mcp/test/route-543f76df48110b10.js +0 -1
- package/.next/static/chunks/app/api/models/default/route-543f76df48110b10.js +0 -1
- package/.next/static/chunks/app/api/models/enabled/route-543f76df48110b10.js +0 -1
- package/.next/static/chunks/app/api/models/refresh/route-543f76df48110b10.js +0 -1
- package/.next/static/chunks/app/api/models/route-543f76df48110b10.js +0 -1
- package/.next/static/chunks/app/api/models-config/catalog/route-543f76df48110b10.js +0 -1
- package/.next/static/chunks/app/api/models-config/discover/route-543f76df48110b10.js +0 -1
- package/.next/static/chunks/app/api/models-config/route-543f76df48110b10.js +0 -1
- package/.next/static/chunks/app/api/models-config/test/route-543f76df48110b10.js +0 -1
- package/.next/static/chunks/app/api/open-in-explorer/route-543f76df48110b10.js +0 -1
- package/.next/static/chunks/app/api/pins/route-543f76df48110b10.js +0 -1
- package/.next/static/chunks/app/api/plugins/check/route-543f76df48110b10.js +0 -1
- package/.next/static/chunks/app/api/plugins/route-543f76df48110b10.js +0 -1
- package/.next/static/chunks/app/api/project-trust/route-543f76df48110b10.js +0 -1
- package/.next/static/chunks/app/api/provider-usage/query/route-543f76df48110b10.js +0 -1
- package/.next/static/chunks/app/api/push/config/route-543f76df48110b10.js +0 -1
- package/.next/static/chunks/app/api/push/subscribe/route-543f76df48110b10.js +0 -1
- package/.next/static/chunks/app/api/sessions/[id]/auto-name/route-543f76df48110b10.js +0 -1
- package/.next/static/chunks/app/api/sessions/[id]/context/route-543f76df48110b10.js +0 -1
- package/.next/static/chunks/app/api/sessions/[id]/entries/[entryId]/thinking/route-543f76df48110b10.js +0 -1
- package/.next/static/chunks/app/api/sessions/[id]/entries/[entryId]/tool-result-image/route-543f76df48110b10.js +0 -1
- package/.next/static/chunks/app/api/sessions/[id]/export/route-543f76df48110b10.js +0 -1
- package/.next/static/chunks/app/api/sessions/[id]/fork/route-543f76df48110b10.js +0 -1
- package/.next/static/chunks/app/api/sessions/[id]/route-543f76df48110b10.js +0 -1
- package/.next/static/chunks/app/api/sessions/[id]/state/route-543f76df48110b10.js +0 -1
- package/.next/static/chunks/app/api/sessions/delete/route-543f76df48110b10.js +0 -1
- package/.next/static/chunks/app/api/sessions/route-543f76df48110b10.js +0 -1
- package/.next/static/chunks/app/api/sessions/search/route-543f76df48110b10.js +0 -1
- package/.next/static/chunks/app/api/sessions/ui-state/route-543f76df48110b10.js +0 -1
- package/.next/static/chunks/app/api/skills/check/route-543f76df48110b10.js +0 -1
- package/.next/static/chunks/app/api/skills/content/route-543f76df48110b10.js +0 -1
- package/.next/static/chunks/app/api/skills/install/route-543f76df48110b10.js +0 -1
- package/.next/static/chunks/app/api/skills/route-543f76df48110b10.js +0 -1
- package/.next/static/chunks/app/api/skills/search/route-543f76df48110b10.js +0 -1
- package/.next/static/chunks/app/api/skills/update/route-543f76df48110b10.js +0 -1
- package/.next/static/chunks/app/api/subagents/[id]/route-543f76df48110b10.js +0 -1
- package/.next/static/chunks/app/api/subagents/profiles/route-543f76df48110b10.js +0 -1
- package/.next/static/chunks/app/api/subagents/settings/route-543f76df48110b10.js +0 -1
- package/.next/static/chunks/app/api/terminal/[id]/events/route-543f76df48110b10.js +0 -1
- package/.next/static/chunks/app/api/terminal/[id]/route-543f76df48110b10.js +0 -1
- package/.next/static/chunks/app/api/terminal/route-543f76df48110b10.js +0 -1
- package/.next/static/chunks/app/api/tools/settings/route-543f76df48110b10.js +0 -1
- package/.next/static/chunks/app/api/web-auth/route-543f76df48110b10.js +0 -1
- package/.next/static/chunks/app/api/worktrees/route-543f76df48110b10.js +0 -1
- package/.next/static/chunks/app/manifest.webmanifest/route-543f76df48110b10.js +0 -1
- package/.next/static/chunks/app/page-99b2f8f3deb70669.js +0 -286
- package/.next/static/chunks/next/dist/client/components/builtin/app-error-543f76df48110b10.js +0 -1
- package/.next/static/chunks/next/dist/client/components/builtin/forbidden-543f76df48110b10.js +0 -1
- package/.next/static/chunks/next/dist/client/components/builtin/not-found-543f76df48110b10.js +0 -1
- package/.next/static/chunks/next/dist/client/components/builtin/unauthorized-543f76df48110b10.js +0 -1
- package/.next/static/css/50e617b3b293bda2.css +0 -1
- package/.next/static/css/f2a33b7e4c23b666.css +0 -1
- package/.next/static/gGuZClTW88ZA3nCpTpHXv/_buildManifest.js +0 -1
- /package/.next/static/{gGuZClTW88ZA3nCpTpHXv → efO5oAUn5csYLU8nsXCq7}/_ssgManifest.js +0 -0
|
@@ -0,0 +1,353 @@
|
|
|
1
|
+
// File: /home/runner/work/pi-web/pi-web/app/api/sessions/stats/route.ts
|
|
2
|
+
import * as entry from '../../../../../../app/api/sessions/stats/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/sessions/stats/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__'
|
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 = "/" | "/login"
|
|
5
|
-
type AppRouteHandlerRoutes = "/api/agent/[id]" | "/api/agent/[id]/bash-output" | "/api/agent/[id]/events" | "/api/agent/[id]/lease" | "/api/agent/new" | "/api/agent/running" | "/api/app-update" | "/api/archives" | "/api/archives/sessions" | "/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/mcp/sign-in" | "/api/mcp/sign-in/[flowId]" | "/api/mcp/test" | "/api/models" | "/api/models-config" | "/api/models-config/catalog" | "/api/models-config/discover" | "/api/models-config/test" | "/api/models/default" | "/api/models/enabled" | "/api/models/refresh" | "/api/open-in-explorer" | "/api/pins" | "/api/plugins" | "/api/plugins/check" | "/api/project-trust" | "/api/provider-usage/query" | "/api/push/config" | "/api/push/subscribe" | "/api/sessions" | "/api/sessions/[id]" | "/api/sessions/[id]/auto-name" | "/api/sessions/[id]/context" | "/api/sessions/[id]/entries/[entryId]/thinking" | "/api/sessions/[id]/entries/[entryId]/tool-result-image" | "/api/sessions/[id]/export" | "/api/sessions/[id]/fork" | "/api/sessions/[id]/state" | "/api/sessions/delete" | "/api/sessions/search" | "/api/sessions/ui-state" | "/api/skills" | "/api/skills/check" | "/api/skills/content" | "/api/skills/install" | "/api/skills/search" | "/api/skills/update" | "/api/subagents/[id]" | "/api/subagents/profiles" | "/api/subagents/settings" | "/api/terminal" | "/api/terminal/[id]" | "/api/terminal/[id]/events" | "/api/tools/settings" | "/api/web-auth" | "/api/worktrees"
|
|
5
|
+
type AppRouteHandlerRoutes = "/api/agent/[id]" | "/api/agent/[id]/bash-output" | "/api/agent/[id]/events" | "/api/agent/[id]/lease" | "/api/agent/new" | "/api/agent/running" | "/api/app-update" | "/api/archives" | "/api/archives/sessions" | "/api/auth/api-key/[provider]" | "/api/auth/login/[provider]" | "/api/auth/logout/[provider]" | "/api/auth/providers" | "/api/cache-miss-notices" | "/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/mcp/sign-in" | "/api/mcp/sign-in/[flowId]" | "/api/mcp/test" | "/api/models" | "/api/models-config" | "/api/models-config/catalog" | "/api/models-config/discover" | "/api/models-config/test" | "/api/models/default" | "/api/models/enabled" | "/api/models/refresh" | "/api/open-in-explorer" | "/api/pins" | "/api/plugins" | "/api/plugins/check" | "/api/project-trust" | "/api/provider-usage/query" | "/api/push/config" | "/api/push/subscribe" | "/api/sessions" | "/api/sessions/[id]" | "/api/sessions/[id]/auto-name" | "/api/sessions/[id]/context" | "/api/sessions/[id]/entries/[entryId]/thinking" | "/api/sessions/[id]/entries/[entryId]/tool-result-image" | "/api/sessions/[id]/export" | "/api/sessions/[id]/fork" | "/api/sessions/[id]/state" | "/api/sessions/delete" | "/api/sessions/search" | "/api/sessions/stats" | "/api/sessions/ui-state" | "/api/skills" | "/api/skills/check" | "/api/skills/content" | "/api/skills/install" | "/api/skills/search" | "/api/skills/update" | "/api/subagents/[id]" | "/api/subagents/profiles" | "/api/subagents/settings" | "/api/terminal" | "/api/terminal/[id]" | "/api/terminal/[id]/events" | "/api/tools/settings" | "/api/web-auth" | "/api/worktrees"
|
|
6
6
|
type PageRoutes = never
|
|
7
7
|
type LayoutRoutes = "/"
|
|
8
8
|
type RedirectRoutes = never
|
|
@@ -25,6 +25,7 @@ interface ParamMap {
|
|
|
25
25
|
"/api/auth/login/[provider]": { "provider": string; }
|
|
26
26
|
"/api/auth/logout/[provider]": { "provider": string; }
|
|
27
27
|
"/api/auth/providers": {}
|
|
28
|
+
"/api/cache-miss-notices": {}
|
|
28
29
|
"/api/cwd/browse": {}
|
|
29
30
|
"/api/cwd/validate": {}
|
|
30
31
|
"/api/default-cwd": {}
|
|
@@ -64,6 +65,7 @@ interface ParamMap {
|
|
|
64
65
|
"/api/sessions/[id]/state": { "id": string; }
|
|
65
66
|
"/api/sessions/delete": {}
|
|
66
67
|
"/api/sessions/search": {}
|
|
68
|
+
"/api/sessions/stats": {}
|
|
67
69
|
"/api/sessions/ui-state": {}
|
|
68
70
|
"/api/skills": {}
|
|
69
71
|
"/api/skills/check": {}
|
package/.next/types/validator.ts
CHANGED
|
@@ -182,6 +182,15 @@ type RouteHandlerConfig<Route extends AppRouteHandlerRoutes = AppRouteHandlerRou
|
|
|
182
182
|
type __Unused = __Check
|
|
183
183
|
}
|
|
184
184
|
|
|
185
|
+
// Validate ../../app/api/cache-miss-notices/route.ts
|
|
186
|
+
{
|
|
187
|
+
type __IsExpected<Specific extends RouteHandlerConfig<"/api/cache-miss-notices">> = Specific
|
|
188
|
+
const handler = {} as typeof import("../../app/api/cache-miss-notices/route.js")
|
|
189
|
+
type __Check = __IsExpected<typeof handler>
|
|
190
|
+
// @ts-ignore
|
|
191
|
+
type __Unused = __Check
|
|
192
|
+
}
|
|
193
|
+
|
|
185
194
|
// Validate ../../app/api/cwd/browse/route.ts
|
|
186
195
|
{
|
|
187
196
|
type __IsExpected<Specific extends RouteHandlerConfig<"/api/cwd/browse">> = Specific
|
|
@@ -533,6 +542,15 @@ type RouteHandlerConfig<Route extends AppRouteHandlerRoutes = AppRouteHandlerRou
|
|
|
533
542
|
type __Unused = __Check
|
|
534
543
|
}
|
|
535
544
|
|
|
545
|
+
// Validate ../../app/api/sessions/stats/route.ts
|
|
546
|
+
{
|
|
547
|
+
type __IsExpected<Specific extends RouteHandlerConfig<"/api/sessions/stats">> = Specific
|
|
548
|
+
const handler = {} as typeof import("../../app/api/sessions/stats/route.js")
|
|
549
|
+
type __Check = __IsExpected<typeof handler>
|
|
550
|
+
// @ts-ignore
|
|
551
|
+
type __Unused = __Check
|
|
552
|
+
}
|
|
553
|
+
|
|
536
554
|
// Validate ../../app/api/sessions/ui-state/route.ts
|
|
537
555
|
{
|
|
538
556
|
type __IsExpected<Specific extends RouteHandlerConfig<"/api/sessions/ui-state">> = Specific
|
package/README.ja.md
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
# @pricening/pi-web
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
このリポジトリは [agegr/pi-web](https://github.com/agegr/pi-web) の**個人フォーク**です。
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
请点击:
|
|
6
6
|
|
|
7
7
|
- [README.md](./README.md) (English)
|
|
8
8
|
- [README.zh-CN.md](./README.zh-CN.md) (简体中文)
|
|
9
|
-
-
|
|
9
|
+
- 保守ルール: [docs/FORK.md](./docs/FORK.md)
|
|
10
10
|
|
|
11
|
-
npm
|
|
11
|
+
npm パッケージ: **`@pricening/pi-web`** (`@agegr/pi-web` ではありません)。
|
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# @pricening/pi-web
|
|
2
2
|
|
|
3
|
-
[简体中文](./README.zh-CN.md)
|
|
3
|
+
[English](./README.md) | [简体中文](./README.zh-CN.md) | [日本語](./README.ja.md) | [Русский](./README.ru.md)
|
|
4
4
|
|
|
5
5
|
A **personal fork** of [agegr/pi-web](https://github.com/agegr/pi-web), the local browser UI for the [pi coding agent](https://github.com/earendil-works/pi).
|
|
6
6
|
|
package/README.ru.md
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
# @pricening/pi-web
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Этот репозиторий — **личный форк** [agegr/pi-web](https://github.com/agegr/pi-web).
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
Пожалуйста, прочитайте:
|
|
6
6
|
|
|
7
7
|
- [README.md](./README.md) (English)
|
|
8
8
|
- [README.zh-CN.md](./README.zh-CN.md) (简体中文)
|
|
9
|
-
-
|
|
9
|
+
- Правила сопровождения: [docs/FORK.md](./docs/FORK.md)
|
|
10
10
|
|
|
11
|
-
npm
|
|
11
|
+
npm-пакет: **`@pricening/pi-web`** (не `@agegr/pi-web`).
|
package/README.zh-CN.md
CHANGED
|
@@ -1,29 +1,31 @@
|
|
|
1
1
|
# @pricening/pi-web
|
|
2
2
|
|
|
3
|
-
[English](./README.md)
|
|
3
|
+
[English](./README.md) | [日本語](./README.ja.md) | [Русский](./README.ru.md)
|
|
4
4
|
|
|
5
|
-
这是 [agegr/pi-web](https://github.com/agegr/pi-web) 的**个人 fork**。上游是 [pi
|
|
5
|
+
这是 [agegr/pi-web](https://github.com/agegr/pi-web) 的**个人 fork**。上游是 [pi 编程智能体](https://github.com/earendil-works/pi)的本地浏览器界面。
|
|
6
6
|
|
|
7
7
|
## 为什么要 fork
|
|
8
8
|
|
|
9
|
-
上游 Pi Web
|
|
9
|
+
上游 Pi Web 本身很好,也非常活跃。这个仓库的目的是:**在跟得上上游的前提下,加上我自己真正常用的高级功能**,而不是等上游合并(历史上 pin / 收藏一类的会话组织 PR 都被关掉了,维护者计划另做一轮设计)。
|
|
10
|
+
|
|
11
|
+
这个 fork 的目标是**持续跟上上游**,而不是取代它:
|
|
10
12
|
|
|
11
13
|
| | |
|
|
12
14
|
|---|---|
|
|
13
|
-
| 上游 | [agegr/pi-web](https://github.com/agegr/pi-web)
|
|
15
|
+
| 上游 | [agegr/pi-web](https://github.com/agegr/pi-web) —— 只 fetch,不 push |
|
|
14
16
|
| 本仓库 | [PriceNing/pi-web](https://github.com/PriceNing/pi-web) |
|
|
15
|
-
| npm 包 | **`@pricening/pi-web
|
|
16
|
-
| 上游基线 | `package.json`
|
|
17
|
+
| npm 包 | **`@pricening/pi-web`**(不是 `@agegr/pi-web`) |
|
|
18
|
+
| 上游基线 | `package.json` → `forkedFrom` |
|
|
17
19
|
|
|
18
20
|
只想要官方行为,请直接用上游包。只有需要下面这些额外功能时才用本包。
|
|
19
21
|
|
|
20
|
-
同步、版本、发布与补丁纪律见 **[docs/FORK.md](./docs/FORK.md)
|
|
22
|
+
同步、版本、发布与补丁纪律见 **[docs/FORK.md](./docs/FORK.md)**(维护规范)。
|
|
21
23
|
|
|
22
24
|
## 本 fork 多出来的功能
|
|
23
25
|
|
|
24
|
-
-
|
|
25
|
-
- **本 fork
|
|
26
|
-
-
|
|
26
|
+
- **置顶与归档来自上游**(自 v0.11.0 起):一个服务端状态文件 `~/.pi/agent/pi-web-session-state.json` 保存置顶/归档的会话族、置顶项目、手动项目顺序、折叠状态和版本号,同一台服务器上的 PC / 手机 / Pad 看到的是同一份。本 fork 直接读写它。
|
|
27
|
+
- **本 fork 在其上额外做的**:全局 **设置 → 归档** 管理页(不需要先打开某个项目),以及按项目**批量删除**该项目会话:需要输入确认词(`confirm` / `确认` / `確認`),有 agent 在跑时返回 409,subagent 级联删除,**绝不删除磁盘上的代码目录**。此外仍保留置顶优先排序(上游只按活跃度和手动调整排序组)、以及旧存储的一次性导入器 `lib/ui-state-migrate.ts`。
|
|
28
|
+
- 采纳上游时接受的语义位移:归档项以**会话族根 id** 为键,兄弟会话折叠到最早的时间戳;迁移来的项目置顶取迁移时刻;迁移不生成手动顺序。详见 [docs/FORK.md](./docs/FORK.md)。
|
|
27
29
|
|
|
28
30
|
其余能力与上游相同:与本地 pi CLI 共享 `~/.pi/agent`、同一套会话文件、同一套模型 / 登录 / 技能。
|
|
29
31
|
|
|
@@ -46,7 +48,7 @@ npx @pricening/pi-web@latest --registry=https://registry.npmjs.org/
|
|
|
46
48
|
|
|
47
49
|
还没配模型时,打开 **模型(Models)** 面板登录或填 API Key。
|
|
48
50
|
|
|
49
|
-
|
|
51
|
+
更新:先停掉正在跑的进程(`Ctrl+C`)再装同一条命令。卸载:`npm uninstall -g @pricening/pi-web`。
|
|
50
52
|
|
|
51
53
|
生产机请锁精确版本(Windows 用 `PI_WEB_PIN`,Linux 的 systemd 本来就不会 `npm update`)。不要每台机器都追 `@latest`,见 [docs/FORK.md §7](./docs/FORK.md)。
|
|
52
54
|
|
|
@@ -83,7 +85,7 @@ PI_WEB_PASSWORD='足够长的随机密码' pi-web --hostname 0.0.0.0
|
|
|
83
85
|
## 注意事项
|
|
84
86
|
|
|
85
87
|
- **智能体数据**:默认读 `~/.pi/agent`,会话在 `sessions/<编码后的工作目录>/<时间戳>_<uuid>.jsonl`。可用 `PI_CODING_AGENT_DIR` 改目录。
|
|
86
|
-
- **与本地 pi 共享**:模型、设置、凭据仍是 pi 的文件。本 fork
|
|
88
|
+
- **与本地 pi 共享**:模型、设置、凭据仍是 pi 的文件。本 fork 不再写自己的状态——置顶、归档和顺序都放在上游的 `~/.pi/agent/pi-web-session-state.json` 里。本 fork 曾用的两个旧文件(`~/.pi/agent/pi-web/` 下)只导入一次,然后改名为 `*.migrated-<utc>`,不删除。不改 `settings.json` / `auth.json` / 会话 jsonl 内容。
|
|
87
89
|
- **文件访问**仅限已知的项目 / 会话根目录,不是通用文件浏览器。
|
|
88
90
|
- **Git worktree**:见 [Pi Web 里的 Worktree](./docs/worktrees.zh-CN.md)。
|
|
89
91
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pricening/pi-web",
|
|
3
|
-
"version": "0.12.
|
|
3
|
+
"version": "0.12.3",
|
|
4
4
|
"description": "Web UI for the pi coding agent (personal fork of @agegr/pi-web with a global Archives page that bulk-deletes a project's sessions)",
|
|
5
5
|
"homepage": "https://github.com/PriceNing/pi-web#readme",
|
|
6
6
|
"repository": {
|
|
@@ -16,8 +16,8 @@
|
|
|
16
16
|
},
|
|
17
17
|
"forkedFrom": {
|
|
18
18
|
"name": "@agegr/pi-web",
|
|
19
|
-
"version": "0.12.
|
|
20
|
-
"commit": "
|
|
19
|
+
"version": "0.12.2",
|
|
20
|
+
"commit": "df163cdb422f3c3c3c50e7357e8bc7c7354a5f64",
|
|
21
21
|
"url": "https://github.com/agegr/pi-web"
|
|
22
22
|
},
|
|
23
23
|
"license": "MIT",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";exports.id=879,exports.ids=[879],exports.modules={10879:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.d(b,{$q:()=>x,Vy:()=>v,bA:()=>y,ej:()=>u,yh:()=>C});var e=c(73024),f=c(76760),g=c(75430),h=c(80974),i=c.n(h),j=c(8102),k=c(63108),l=c(37431),m=c(12069),n=a([g]);g=(n.then?(await n)():n)[0];let z=new Set(["version","revision","sessions","projects","projectOrder","projectNames","__proto__"]),A=Symbol.for("pi-web:session-ui-state-write-queue"),B={realpath:!1,stale:1e4,retries:{retries:10,factor:2,minTimeout:25,maxTimeout:500},onCompromised:a=>{console.warn(`[pi-web] the session UI state lock was compromised: ${a.message}`)}};class C extends Error{constructor(a="Another process holds the session UI state lock"){super(a),this.name="SessionUiStateLockedError"}}function o(){return globalThis.__piWebSessionUiStateCache??={reads:new Map,revisions:new Map}}function p(a,b){let c=o().revisions;b>(c.get(a)??-1)&&c.set(a,b)}function q(a){return structuredClone(a)}function r(a=(0,g.getAgentDir)()){return(0,f.join)(a,"pi-web-session-state.json")}function s(a){let b;try{b=JSON.parse(a)}catch{return{ok:!1}}let c=(0,m.Jx)(b);return c?{ok:!0,state:c,raw:b}:{ok:!1}}function t(a){let b,c;try{b=(0,e.statSync)(a)}catch(c){let b=c?.code;if("ENOENT"===b||"ENOTDIR"===b)return o().reads.delete(a),(0,m.ly)();throw c}let d=o().reads.get(a);if(d&&d.mtimeMs===b.mtimeMs&&d.size===b.size&&d.ino===b.ino)return d.state;let f=(0,l.y)(a,4194304);if(void 0===f)return o().reads.delete(a),(0,m.ly)();let g=s(f);return g.ok?(c=g.state,p(a,c.revision)):(console.warn(`[pi-web] ${a} is not valid session UI state; reading it as empty until the next change sets it aside`),c=(0,m.ly)()),o().reads.set(a,{mtimeMs:b.mtimeMs,size:b.size,ino:b.ino,state:c}),c}function u(a){try{return q(t(a??r()))}catch(a){return console.warn(`[pi-web] could not read the session UI state: ${a instanceof Error?a.message:String(a)}`),(0,m.ly)()}}function v(a){try{return t(a??r()).revision}catch{return null}}function w(a,b){return(0,k.T)(A,a,async()=>{let c;(0,e.mkdirSync)((0,f.dirname)(a),{recursive:!0});try{c=await i().lock(a,B)}catch(a){if("ELOCKED"===a?.code)throw new C;throw a}try{let c,d=o().revisions.get(a)??0,f=(0,l.y)(a,4194304),g={},h=!1;if(void 0===f)c={...(0,m.ly)(),revision:d};else{let b=s(f);if(b.ok)for(let[a,d]of(c=b.state,Object.entries(b.raw)))z.has(a)||(g[a]=d);else{let b=`${a}.corrupt-${Date.now()}`;try{(0,e.renameSync)(a,b),console.warn(`[pi-web] ${a} could not be parsed; moved it to ${b} and started from an empty session UI state`)}catch(b){console.warn(`[pi-web] ${a} could not be parsed and could not be moved aside (${b instanceof Error?b.message:String(b)}); starting from an empty session UI state`)}c={...(0,m.ly)(),revision:d+1},h=!0}}let i=b(c);if(!i.changed&&!h)return q(c);let k={...i.state,version:m.fS,revision:c.revision+ +!!i.changed},n={version:k.version,revision:k.revision,sessions:k.sessions,projects:k.projects,...k.projectOrder?.length?{projectOrder:k.projectOrder}:{},...k.projectNames&&Object.keys(k.projectNames).length>0?{projectNames:k.projectNames}:{},...g};(0,j.$)(a,JSON.stringify(n,null,2)+"\n"),p(a,k.revision);try{let b=(0,e.statSync)(a);o().reads.set(a,{mtimeMs:b.mtimeMs,size:b.size,ino:b.ino,state:q(k)})}catch{o().reads.delete(a)}return q(k)}finally{try{await c()}catch{}}})}function x(a,b){let c;try{c=b??r()}catch(a){return Promise.reject(a)}return w(c,b=>(0,m.D7)(b,a,Date.now()))}async function y(a,b){let c=b??r(),d=[...new Set(a)];if(0===d.length)return;let e=a=>d.some(b=>Object.prototype.hasOwnProperty.call(a.sessions,b));e(t(c))&&await w(c,a=>{if(!e(a))return{state:a,changed:!1};let b={...a.sessions};for(let a of d)delete b[a];return{state:{...a,sessions:b},changed:!0}})}d()}catch(a){d(a)}})},12069:(a,b,c)=>{c.d(b,{D7:()=>D,Id:()=>e,Jx:()=>w,KI:()=>z,Kk:()=>g,Q3:()=>o,cx:()=>f,fS:()=>d,ly:()=>v});let d=1,e=/^[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?$/,f=1e3,g=262144,h=(a,b)=>Object.prototype.hasOwnProperty.call(a,b);function i(a){return"object"==typeof a&&null!==a&&!Array.isArray(a)}function j(a){return"number"==typeof a&&Number.isFinite(a)&&a>=0}function k(a){return"string"==typeof a&&e.test(a)}function l(a){return"string"==typeof a&&a.length>0&&a.length<=4096&&"__proto__"!==a}let m=/[\u0000-\u001f\u007f-\u009f\u2028\u2029]/;function n(a){if(null===a)return null;if("string"!=typeof a)return;let b=a.trim();return b?m.test(b)||[...b].length>80?void 0:b:null}function o(a,b){let c=a.projectNames;return c&&h(c,b)?c[b]:void 0}let p=new TextEncoder;function q(a){return p.encode(JSON.stringify(a)).length+1}function r(a){let b=1;for(let c of a)b+=q(c);return b}function s(a,b){return a<=1e3&&b<=262144}function t(a){let b=[],c=1;for(let d of a){if(b.length>=1e3)break;let a=q(d);c+a>262144||(b.push(d),c+=a)}return b}function u(a,b){return p.encode(JSON.stringify(a)).length+p.encode(JSON.stringify(b)).length+2}function v(){return{version:d,revision:0,sessions:{},projects:{}}}function w(a){var b,c;if(!i(a)||void 0!==a.version&&a.version!==d||void 0!==a.sessions&&!i(a.sessions)||void 0!==a.projects&&!i(a.projects))return null;let e=v(),h=a.revision;for(let[b,c]of("number"==typeof h&&Number.isSafeInteger(h)&&h>=0&&(e.revision=h),Object.entries(a.sessions??{}))){if(!k(b))continue;let a=function(a){if(!i(a))return null;let b={};return j(a.pinnedAt)&&(b.pinnedAt=a.pinnedAt),j(a.archivedAt)&&(b.archivedAt=a.archivedAt),void 0===b.pinnedAt&&void 0===b.archivedAt?null:b}(c);a&&(e.sessions[b]=a)}for(let[b,c]of Object.entries(a.projects??{})){if(!l(b))continue;let a=i(c)&&j(c.pinnedAt)&&l(c.root)?{pinnedAt:c.pinnedAt,root:c.root}:null;a&&(e.projects[b]=a)}if(Array.isArray(a.projectOrder)){let b=new Set,c=t(a.projectOrder.filter(a=>!(!l(a)||b.has(a))&&(b.add(a),!0)));c.length>0&&(e.projectOrder=c)}if(i(a.projectNames)){let d={},h=0,i=1;for(let[e,j]of Object.entries(a.projectNames)){let a=n(j);if(!l(e)||"string"!=typeof a)continue;let k=u(e,a);b=h+1,c=i+k,b<=f&&c<=g&&(d[e]=a,h++,i+=k)}h>0&&(e.projectNames=d)}return e}function x(a){return null===a?null:j(a)?a:void 0}function y(a,b,c){if(!Array.isArray(a)||!c&&0===a.length)return{ok:!1,error:`${b} must be ${c?"an":"a non-empty"} array`};if(a.length>500)return{ok:!1,error:`${b} may hold at most 500 projectKeys`};let d=[],e=new Set;for(let c of a){if(!l(c))return{ok:!1,error:`${b} must hold non-empty strings of at most 4096 characters`};e.has(c)||(e.add(c),d.push(c))}return{ok:!0,keys:d}}function z(a){if(!i(a))return{ok:!1,error:"Expected a JSON object"};switch(a.action){case"set":{let b=h(a,"pinned");if(b===h(a,"archived"))return{ok:!1,error:"Send exactly one of pinned or archived"};let c=b?a.pinned:a.archived;if("boolean"!=typeof c)return{ok:!1,error:`${b?"pinned":"archived"} must be a boolean`};let d=function(a){if(!Array.isArray(a)||0===a.length)return{ok:!1,error:"ids must be a non-empty array"};if(a.length>500)return{ok:!1,error:"ids may hold at most 500 session ids"};let b=[],c=new Set;for(let d of a){if(!k(d))return{ok:!1,error:"ids must be session ids"};c.has(d)||(c.add(d),b.push(d))}return{ok:!0,ids:b}}(a.ids);if(!d.ok)return d;return{ok:!0,request:b?{action:"set",ids:d.ids,pinned:c}:{action:"set",ids:d.ids,archived:c}}}case"restore":{let b=a.entries;if(!Array.isArray(b))return{ok:!1,error:"entries must be an array"};if(b.length>500)return{ok:!1,error:"entries may hold at most 500 sessions"};let c=[],d=new Set;for(let a of b){if(!i(a)||!k(a.id))return{ok:!1,error:"Each entry needs a session id"};if(d.has(a.id))return{ok:!1,error:"entries must name each session once"};d.add(a.id);let b=x(a.pinnedAt),e=x(a.archivedAt);if(void 0===b||void 0===e)return{ok:!1,error:"pinnedAt and archivedAt must be timestamps or null"};c.push({id:a.id,pinnedAt:b,archivedAt:e})}return{ok:!0,request:{action:"restore",entries:c}}}case"pin-project":if(!l(a.projectKey))return{ok:!1,error:"projectKey must be a non-empty string of at most 4096 characters"};if(!l(a.root))return{ok:!1,error:"root must be a non-empty string of at most 4096 characters"};if("boolean"!=typeof a.pinned)return{ok:!1,error:"pinned must be a boolean"};return{ok:!0,request:{action:"pin-project",projectKey:a.projectKey,root:a.root,pinned:a.pinned}};case"add-projects":{let b=y(a.keys,"keys",!1);if(!b.ok)return b;return{ok:!0,request:{action:"add-projects",keys:b.keys}}}case"move-project":{let{projectKey:b,anchorKey:c,position:d}=a;if(!l(b)||!l(c))return{ok:!1,error:"projectKey and anchorKey must be non-empty strings of at most 4096 characters"};if(b===c)return{ok:!1,error:"projectKey and anchorKey must differ"};if("before"!==d&&"after"!==d)return{ok:!1,error:'position must be "before" or "after"'};let e=void 0===a.add?{ok:!0,keys:[]}:y(a.add,"add",!0);if(!e.ok)return e;return{ok:!0,request:{action:"move-project",projectKey:b,anchorKey:c,position:d,add:e.keys}}}case"rename-project":{if(!l(a.projectKey))return{ok:!1,error:"projectKey must be a non-empty string of at most 4096 characters"};let b=n(a.name);if(void 0===b)return{ok:!1,error:"name must be null or one line of at most 80 characters"};return{ok:!0,request:{action:"rename-project",projectKey:a.projectKey,name:b}}}default:return{ok:!1,error:'action must be "set", "restore", "pin-project", "add-projects", "move-project" or "rename-project"'}}}function A(a,b,c){let d=h(a,b)?a[b]:void 0;return void 0===c.pinnedAt&&void 0===c.archivedAt?!!d&&(delete a[b],!0):(d?.pinnedAt!==c.pinnedAt||d?.archivedAt!==c.archivedAt)&&(a[b]=c,!0)}function B(a,b){var c;return c=a.projectOrder??[],!(c.length===b.length&&c.every((a,c)=>a===b[c]))&&(0===b.length?delete a.projectOrder:a.projectOrder=b,!0)}function C(a,b){let c=new Set(a),d=[];for(let a of b)c.has(a)||(c.add(a),d.push(a));return d}function D(a,b,c){var d,e,i,j;let k=function(a){let b={};for(let[c,d]of Object.entries(a.sessions))b[c]={...d};let c={};for(let[b,d]of Object.entries(a.projects))c[b]={...d};let d={...a,sessions:b,projects:c};return a.projectOrder&&(d.projectOrder=[...a.projectOrder]),a.projectNames&&(d.projectNames={...a.projectNames}),d}(a),l=!1;switch(b.action){case"set":for(let a of b.ids){let d=h(k.sessions,a)?k.sessions[a]:void 0;A(k.sessions,a,function(a,b,c){let d={...a};return"pinned"in b?b.pinned?(void 0===d.pinnedAt||void 0!==d.archivedAt)&&(d.pinnedAt=c,delete d.archivedAt):delete d.pinnedAt:b.archived?(d.archivedAt=c,delete d.pinnedAt):delete d.archivedAt,d}(d,b,c))&&(l=!0)}break;case"restore":for(let a of b.entries){let b={};null!==a.pinnedAt&&(b.pinnedAt=a.pinnedAt),null!==a.archivedAt&&(b.archivedAt=a.archivedAt),A(k.sessions,a.id,b)&&(l=!0)}break;case"pin-project":{let{projectKey:a,root:f}=b,g=h(k.projects,a)?k.projects[a]:void 0;if(b.pinned?g?.root!==f&&(k.projects[a]={pinnedAt:c,root:f},l=!0):g&&(delete k.projects[a],l=!0),(b.pinned?void 0===g:void 0!==g)&&k.projectOrder){let c,f,g=(d=k.projectOrder,e=k.projects,i=b.pinned,f=d.filter(b=>b!==a),i?(c=0,f.forEach((a,b)=>{h(e,a)&&(c=b+1)})):(c=f.findIndex(a=>!h(e,a)))<0&&(c=f.length),f.splice(c,0,a),f);s(g.length,r(g))&&B(k,g)&&(l=!0)}break}case"add-projects":B(k,function(a,b){let c=C(a,b),d=a.length,e=r(a),f=c.length;for(;f>0;){let a=q(c[f-1]);if(!s(d+1,e+a))break;d++,e+=a,f--}return[...c.slice(f),...a]}(k.projectOrder??[],b.keys))&&(l=!0);break;case"move-project":{let a,c,{projectKey:d,anchorKey:e,position:f,add:g}=b,h=k.projectOrder??[];B(k,function(a,b){let c=a.length,d=r(a);if(s(c,d))return a;let e=new Set;for(let f=a.length-1;f>=0&&!s(c,d);f--)b.has(a[f])||(e.add(f),c--,d-=q(a[f]));let f=a.filter((a,b)=>!e.has(b));return s(c,d)?f:t(f)}((j=[...C(h,g),...h],(a=j.filter(a=>a!==d)).includes(e)||a.unshift(e),c=a.indexOf(e),a.splice("before"===f?c:c+1,0,d),a),new Set([d,e,...g])))&&(l=!0);break}case"rename-project":{let a=n(b.name);void 0!==a&&function(a,b,c){let d={...a.projectNames};if((h(d,b)?d[b]:void 0)===(c??void 0))return!1;if(null===c)delete d[b];else{var e,i;if(d[b]=c,e=Object.keys(d).length,i=function(a){let b=1;for(let[c,d]of Object.entries(a))b+=u(c,d);return b}(d),!(e<=f)||!(i<=g))return!1}return 0===Object.keys(d).length?delete a.projectNames:a.projectNames=d,!0}(k,b.projectKey,a)&&(l=!0)}}return{state:k,changed:l}}}};
|