@qt4798/pi-web 0.9.24 → 0.9.26-fix
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 +6 -5
- package/.next/build-manifest.json +2 -2
- package/.next/required-server-files.js +1 -1
- package/.next/required-server-files.json +1 -1
- package/.next/routes-manifest.json +6 -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/_global-error.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/_not-found/page.js +2 -2
- 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 +1 -1
- package/.next/server/app/_not-found.segments/_full.segment.rsc +1 -1
- package/.next/server/app/_not-found.segments/_head.segment.rsc +1 -1
- package/.next/server/app/_not-found.segments/_index.segment.rsc +1 -1
- package/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
- package/.next/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
- package/.next/server/app/_not-found.segments/_tree.segment.rsc +1 -1
- 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]/events/route.js.nft.json +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/new/route.js +1 -1
- package/.next/server/app/api/agent/new/route.js.nft.json +1 -1
- package/.next/server/app/api/agent/running/events/route.js +1 -1
- package/.next/server/app/api/agent/running/events/route.js.nft.json +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/auth/all-providers/route.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/combined/route.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/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/backup/export/route.js +1 -1
- package/.next/server/app/api/backup/import/route.js +1 -1
- 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/deepseek/balance/route.js +1 -1
- package/.next/server/app/api/default-cwd/route.js +1 -1
- package/.next/server/app/api/events/route.js +2 -2
- package/.next/server/app/api/events/route.js.nft.json +1 -1
- package/.next/server/app/api/features/route.js +1 -1
- package/.next/server/app/api/file-index/route.js +1 -1
- package/.next/server/app/api/files/[...path]/route.js +1 -1
- package/.next/server/app/api/git/diff/route.js +1 -1
- package/.next/server/app/api/git/push/route.js +1 -1
- package/.next/server/app/api/git/stash/route.js +1 -1
- 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/import/discover/route.js +1 -1
- package/.next/server/app/api/import/execute/route.js +1 -1
- package/.next/server/app/api/import/status/route.js +1 -1
- package/.next/server/app/api/logs/route.js +1 -1
- package/.next/server/app/api/mcp/restart/route.js +1 -1
- package/.next/server/app/api/mcp/restart/route.js.nft.json +1 -1
- package/.next/server/app/api/mcp/route.js +2 -2
- package/.next/server/app/api/models/route.js +1 -1
- package/.next/server/app/api/models-config/builtin/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/modes/route.js +1 -1
- package/.next/server/app/api/plugins/route.js +1 -1
- package/.next/server/app/api/project-aliases/route.js +1 -1
- package/.next/server/app/api/project-aliases/route.js.nft.json +1 -1
- package/.next/server/app/api/project-state/route.js +1 -0
- package/.next/server/app/api/project-state/route.js.nft.json +1 -0
- package/.next/server/app/api/project-state/route_client-reference-manifest.js +1 -0
- 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/proxy/route.js +1 -1
- package/.next/server/app/api/proxy/test/route.js +1 -1
- 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]/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]/export/route.js +2 -2
- package/.next/server/app/api/sessions/[id]/queue-recovery/route.js +1 -1
- package/.next/server/app/api/sessions/[id]/queue-recovery/route.js.nft.json +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/[id]/state/route.js.nft.json +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/settings/title-model/route.js +1 -1
- package/.next/server/app/api/skills/check/route.js +1 -1
- package/.next/server/app/api/skills/install/route.js +1 -1
- package/.next/server/app/api/skills/route.js +2 -2
- 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/snippets/[id]/route.js +1 -1
- package/.next/server/app/api/snippets/route.js +1 -1
- package/.next/server/app/api/subagents/agents/[name]/route.js +2 -2
- package/.next/server/app/api/subagents/route.js +2 -2
- package/.next/server/app/api/subagents/transcript/route.js +1 -1
- package/.next/server/app/api/tasks/[id]/[action]/route.js +1 -1
- package/.next/server/app/api/tasks/[id]/[action]/route.js.nft.json +1 -1
- package/.next/server/app/api/tasks/[id]/changed-files/route.js +2 -2
- package/.next/server/app/api/tasks/[id]/diff/route.js +2 -2
- package/.next/server/app/api/tasks/[id]/events/route.js +1 -1
- package/.next/server/app/api/tasks/[id]/route.js +1 -1
- package/.next/server/app/api/tasks/[id]/route.js.nft.json +1 -1
- package/.next/server/app/api/tasks/batch/route.js +1 -1
- package/.next/server/app/api/tasks/batch/route.js.nft.json +1 -1
- package/.next/server/app/api/tasks/events/route.js +2 -2
- package/.next/server/app/api/tasks/events/route.js.nft.json +1 -1
- package/.next/server/app/api/tasks/route.js +1 -1
- package/.next/server/app/api/tasks/route.js.nft.json +1 -1
- package/.next/server/app/api/tasks/settings/route.js +1 -1
- package/.next/server/app/api/tasks/settings/route.js.nft.json +1 -1
- package/.next/server/app/api/tasks/templates/route.js +1 -1
- package/.next/server/app/api/themes/[name]/route.js +1 -1
- package/.next/server/app/api/themes/route.js +1 -1
- package/.next/server/app/api/usage/route.js +1 -1
- package/.next/server/app/api/vision-config/route.js +2 -2
- package/.next/server/app/api/worktrees/route.js +1 -1
- package/.next/server/app/icon.ico/route.js +1 -1
- package/.next/server/app/icon.png/route.js +1 -1
- package/.next/server/app/icon.svg/route.js +1 -1
- package/.next/server/app/index.html +1 -1
- package/.next/server/app/index.rsc +3 -3
- package/.next/server/app/index.segments/__PAGE__.segment.rsc +3 -3
- package/.next/server/app/index.segments/_full.segment.rsc +3 -3
- package/.next/server/app/index.segments/_head.segment.rsc +1 -1
- package/.next/server/app/index.segments/_index.segment.rsc +1 -1
- package/.next/server/app/index.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/page.js +9 -12
- package/.next/server/app/page_client-reference-manifest.js +1 -1
- package/.next/server/app-paths-manifest.json +6 -5
- package/.next/server/chunks/4229.js +1 -0
- package/.next/server/chunks/4253.js +11 -2
- package/.next/server/chunks/4564.js +1 -0
- package/.next/server/chunks/6429.js +10 -1
- package/.next/server/chunks/7915.js +1 -1
- package/.next/server/instrumentation.js +1 -1
- package/.next/server/middleware-build-manifest.js +1 -1
- package/.next/server/pages/404.html +1 -1
- package/.next/server/pages/500.html +1 -1
- package/.next/static/1qey_1awoTMsTqORIbBD0/_buildManifest.js +1 -0
- package/.next/static/chunks/app/_global-error/page-aec7cf234e39d3fc.js +1 -0
- package/.next/static/chunks/app/api/agent/[id]/bash-output/route-aec7cf234e39d3fc.js +1 -0
- package/.next/static/chunks/app/api/agent/[id]/events/route-aec7cf234e39d3fc.js +1 -0
- package/.next/static/chunks/app/api/agent/[id]/route-aec7cf234e39d3fc.js +1 -0
- package/.next/static/chunks/app/api/agent/new/route-aec7cf234e39d3fc.js +1 -0
- package/.next/static/chunks/app/api/agent/running/events/route-aec7cf234e39d3fc.js +1 -0
- package/.next/static/chunks/app/api/agent/running/route-aec7cf234e39d3fc.js +1 -0
- package/.next/static/chunks/app/api/auth/all-providers/route-aec7cf234e39d3fc.js +1 -0
- package/.next/static/chunks/app/api/auth/api-key/[provider]/route-aec7cf234e39d3fc.js +1 -0
- package/.next/static/chunks/app/api/auth/combined/route-aec7cf234e39d3fc.js +1 -0
- package/.next/static/chunks/app/api/auth/login/[provider]/route-aec7cf234e39d3fc.js +1 -0
- package/.next/static/chunks/app/api/auth/logout/[provider]/route-aec7cf234e39d3fc.js +1 -0
- package/.next/static/chunks/app/api/auth/providers/route-aec7cf234e39d3fc.js +1 -0
- package/.next/static/chunks/app/api/backup/export/route-aec7cf234e39d3fc.js +1 -0
- package/.next/static/chunks/app/api/backup/import/route-aec7cf234e39d3fc.js +1 -0
- package/.next/static/chunks/app/api/cwd/browse/route-aec7cf234e39d3fc.js +1 -0
- package/.next/static/chunks/app/api/cwd/validate/route-aec7cf234e39d3fc.js +1 -0
- package/.next/static/chunks/app/api/deepseek/balance/route-aec7cf234e39d3fc.js +1 -0
- package/.next/static/chunks/app/api/default-cwd/route-aec7cf234e39d3fc.js +1 -0
- package/.next/static/chunks/app/api/events/route-aec7cf234e39d3fc.js +1 -0
- package/.next/static/chunks/app/api/features/route-aec7cf234e39d3fc.js +1 -0
- package/.next/static/chunks/app/api/file-index/route-aec7cf234e39d3fc.js +1 -0
- package/.next/static/chunks/app/api/files/[...path]/route-aec7cf234e39d3fc.js +1 -0
- package/.next/static/chunks/app/api/git/diff/route-aec7cf234e39d3fc.js +1 -0
- package/.next/static/chunks/app/api/git/push/route-aec7cf234e39d3fc.js +1 -0
- package/.next/static/chunks/app/api/git/stash/route-aec7cf234e39d3fc.js +1 -0
- package/.next/static/chunks/app/api/git/status/route-aec7cf234e39d3fc.js +1 -0
- package/.next/static/chunks/app/api/home/route-aec7cf234e39d3fc.js +1 -0
- package/.next/static/chunks/app/api/import/discover/route-aec7cf234e39d3fc.js +1 -0
- package/.next/static/chunks/app/api/import/execute/route-aec7cf234e39d3fc.js +1 -0
- package/.next/static/chunks/app/api/import/status/route-aec7cf234e39d3fc.js +1 -0
- package/.next/static/chunks/app/api/logs/route-aec7cf234e39d3fc.js +1 -0
- package/.next/static/chunks/app/api/mcp/restart/route-aec7cf234e39d3fc.js +1 -0
- package/.next/static/chunks/app/api/mcp/route-aec7cf234e39d3fc.js +1 -0
- package/.next/static/chunks/app/api/models/route-aec7cf234e39d3fc.js +1 -0
- package/.next/static/chunks/app/api/models-config/builtin/route-aec7cf234e39d3fc.js +1 -0
- package/.next/static/chunks/app/api/models-config/catalog/route-aec7cf234e39d3fc.js +1 -0
- package/.next/static/chunks/app/api/models-config/discover/route-aec7cf234e39d3fc.js +1 -0
- package/.next/static/chunks/app/api/models-config/route-aec7cf234e39d3fc.js +1 -0
- package/.next/static/chunks/app/api/models-config/test/route-aec7cf234e39d3fc.js +1 -0
- package/.next/static/chunks/app/api/modes/route-aec7cf234e39d3fc.js +1 -0
- package/.next/static/chunks/app/api/plugins/route-aec7cf234e39d3fc.js +1 -0
- package/.next/static/chunks/app/api/project-aliases/route-aec7cf234e39d3fc.js +1 -0
- package/.next/static/chunks/app/api/project-state/route-aec7cf234e39d3fc.js +1 -0
- package/.next/static/chunks/app/api/project-trust/route-aec7cf234e39d3fc.js +1 -0
- package/.next/static/chunks/app/api/proxy/route-aec7cf234e39d3fc.js +1 -0
- package/.next/static/chunks/app/api/proxy/test/route-aec7cf234e39d3fc.js +1 -0
- package/.next/static/chunks/app/api/sessions/[id]/auto-name/route-aec7cf234e39d3fc.js +1 -0
- package/.next/static/chunks/app/api/sessions/[id]/context/route-aec7cf234e39d3fc.js +1 -0
- package/.next/static/chunks/app/api/sessions/[id]/entries/[entryId]/thinking/route-aec7cf234e39d3fc.js +1 -0
- package/.next/static/chunks/app/api/sessions/[id]/export/route-aec7cf234e39d3fc.js +1 -0
- package/.next/static/chunks/app/api/sessions/[id]/queue-recovery/route-aec7cf234e39d3fc.js +1 -0
- package/.next/static/chunks/app/api/sessions/[id]/route-aec7cf234e39d3fc.js +1 -0
- package/.next/static/chunks/app/api/sessions/[id]/state/route-aec7cf234e39d3fc.js +1 -0
- package/.next/static/chunks/app/api/sessions/route-aec7cf234e39d3fc.js +1 -0
- package/.next/static/chunks/app/api/settings/title-model/route-aec7cf234e39d3fc.js +1 -0
- package/.next/static/chunks/app/api/skills/check/route-aec7cf234e39d3fc.js +1 -0
- package/.next/static/chunks/app/api/skills/install/route-aec7cf234e39d3fc.js +1 -0
- package/.next/static/chunks/app/api/skills/route-aec7cf234e39d3fc.js +1 -0
- package/.next/static/chunks/app/api/skills/search/route-aec7cf234e39d3fc.js +1 -0
- package/.next/static/chunks/app/api/skills/update/route-aec7cf234e39d3fc.js +1 -0
- package/.next/static/chunks/app/api/snippets/[id]/route-aec7cf234e39d3fc.js +1 -0
- package/.next/static/chunks/app/api/snippets/route-aec7cf234e39d3fc.js +1 -0
- package/.next/static/chunks/app/api/subagents/agents/[name]/route-aec7cf234e39d3fc.js +1 -0
- package/.next/static/chunks/app/api/subagents/route-aec7cf234e39d3fc.js +1 -0
- package/.next/static/chunks/app/api/subagents/transcript/route-aec7cf234e39d3fc.js +1 -0
- package/.next/static/chunks/app/api/tasks/[id]/[action]/route-aec7cf234e39d3fc.js +1 -0
- package/.next/static/chunks/app/api/tasks/[id]/changed-files/route-aec7cf234e39d3fc.js +1 -0
- package/.next/static/chunks/app/api/tasks/[id]/diff/route-aec7cf234e39d3fc.js +1 -0
- package/.next/static/chunks/app/api/tasks/[id]/events/route-aec7cf234e39d3fc.js +1 -0
- package/.next/static/chunks/app/api/tasks/[id]/route-aec7cf234e39d3fc.js +1 -0
- package/.next/static/chunks/app/api/tasks/batch/route-aec7cf234e39d3fc.js +1 -0
- package/.next/static/chunks/app/api/tasks/events/route-aec7cf234e39d3fc.js +1 -0
- package/.next/static/chunks/app/api/tasks/route-aec7cf234e39d3fc.js +1 -0
- package/.next/static/chunks/app/api/tasks/settings/route-aec7cf234e39d3fc.js +1 -0
- package/.next/static/chunks/app/api/tasks/templates/route-aec7cf234e39d3fc.js +1 -0
- package/.next/static/chunks/app/api/themes/[name]/route-aec7cf234e39d3fc.js +1 -0
- package/.next/static/chunks/app/api/themes/route-aec7cf234e39d3fc.js +1 -0
- package/.next/static/chunks/app/api/usage/route-aec7cf234e39d3fc.js +1 -0
- package/.next/static/chunks/app/api/vision-config/route-aec7cf234e39d3fc.js +1 -0
- package/.next/static/chunks/app/api/worktrees/route-aec7cf234e39d3fc.js +1 -0
- package/.next/static/chunks/app/{page-2f893cab26ad0f25.js → page-2fa9b3ea0569832e.js} +9 -12
- package/.next/static/chunks/next/dist/client/components/builtin/app-error-aec7cf234e39d3fc.js +1 -0
- package/.next/static/chunks/next/dist/client/components/builtin/forbidden-aec7cf234e39d3fc.js +1 -0
- package/.next/static/chunks/next/dist/client/components/builtin/not-found-aec7cf234e39d3fc.js +1 -0
- package/.next/static/chunks/next/dist/client/components/builtin/unauthorized-aec7cf234e39d3fc.js +1 -0
- package/.next/trace +9 -10
- package/.next/trace-build +1 -1
- package/.next/types/app/api/project-state/route.ts +351 -0
- package/.next/types/routes.d.ts +2 -1
- package/.next/types/validator.ts +9 -0
- package/package.json +1 -1
- package/.next/static/chunks/app/_global-error/page-598d211f381122d6.js +0 -1
- package/.next/static/chunks/app/api/agent/[id]/bash-output/route-598d211f381122d6.js +0 -1
- package/.next/static/chunks/app/api/agent/[id]/events/route-598d211f381122d6.js +0 -1
- package/.next/static/chunks/app/api/agent/[id]/route-598d211f381122d6.js +0 -1
- package/.next/static/chunks/app/api/agent/new/route-598d211f381122d6.js +0 -1
- package/.next/static/chunks/app/api/agent/running/events/route-598d211f381122d6.js +0 -1
- package/.next/static/chunks/app/api/agent/running/route-598d211f381122d6.js +0 -1
- package/.next/static/chunks/app/api/auth/all-providers/route-598d211f381122d6.js +0 -1
- package/.next/static/chunks/app/api/auth/api-key/[provider]/route-598d211f381122d6.js +0 -1
- package/.next/static/chunks/app/api/auth/combined/route-598d211f381122d6.js +0 -1
- package/.next/static/chunks/app/api/auth/login/[provider]/route-598d211f381122d6.js +0 -1
- package/.next/static/chunks/app/api/auth/logout/[provider]/route-598d211f381122d6.js +0 -1
- package/.next/static/chunks/app/api/auth/providers/route-598d211f381122d6.js +0 -1
- package/.next/static/chunks/app/api/backup/export/route-598d211f381122d6.js +0 -1
- package/.next/static/chunks/app/api/backup/import/route-598d211f381122d6.js +0 -1
- package/.next/static/chunks/app/api/cwd/browse/route-598d211f381122d6.js +0 -1
- package/.next/static/chunks/app/api/cwd/validate/route-598d211f381122d6.js +0 -1
- package/.next/static/chunks/app/api/deepseek/balance/route-598d211f381122d6.js +0 -1
- package/.next/static/chunks/app/api/default-cwd/route-598d211f381122d6.js +0 -1
- package/.next/static/chunks/app/api/events/route-598d211f381122d6.js +0 -1
- package/.next/static/chunks/app/api/features/route-598d211f381122d6.js +0 -1
- package/.next/static/chunks/app/api/file-index/route-598d211f381122d6.js +0 -1
- package/.next/static/chunks/app/api/files/[...path]/route-598d211f381122d6.js +0 -1
- package/.next/static/chunks/app/api/git/diff/route-598d211f381122d6.js +0 -1
- package/.next/static/chunks/app/api/git/push/route-598d211f381122d6.js +0 -1
- package/.next/static/chunks/app/api/git/stash/route-598d211f381122d6.js +0 -1
- package/.next/static/chunks/app/api/git/status/route-598d211f381122d6.js +0 -1
- package/.next/static/chunks/app/api/home/route-598d211f381122d6.js +0 -1
- package/.next/static/chunks/app/api/import/discover/route-598d211f381122d6.js +0 -1
- package/.next/static/chunks/app/api/import/execute/route-598d211f381122d6.js +0 -1
- package/.next/static/chunks/app/api/import/status/route-598d211f381122d6.js +0 -1
- package/.next/static/chunks/app/api/logs/route-598d211f381122d6.js +0 -1
- package/.next/static/chunks/app/api/mcp/restart/route-598d211f381122d6.js +0 -1
- package/.next/static/chunks/app/api/mcp/route-598d211f381122d6.js +0 -1
- package/.next/static/chunks/app/api/models/route-598d211f381122d6.js +0 -1
- package/.next/static/chunks/app/api/models-config/builtin/route-598d211f381122d6.js +0 -1
- package/.next/static/chunks/app/api/models-config/catalog/route-598d211f381122d6.js +0 -1
- package/.next/static/chunks/app/api/models-config/discover/route-598d211f381122d6.js +0 -1
- package/.next/static/chunks/app/api/models-config/route-598d211f381122d6.js +0 -1
- package/.next/static/chunks/app/api/models-config/test/route-598d211f381122d6.js +0 -1
- package/.next/static/chunks/app/api/modes/route-598d211f381122d6.js +0 -1
- package/.next/static/chunks/app/api/plugins/route-598d211f381122d6.js +0 -1
- package/.next/static/chunks/app/api/project-aliases/route-598d211f381122d6.js +0 -1
- package/.next/static/chunks/app/api/project-trust/route-598d211f381122d6.js +0 -1
- package/.next/static/chunks/app/api/proxy/route-598d211f381122d6.js +0 -1
- package/.next/static/chunks/app/api/proxy/test/route-598d211f381122d6.js +0 -1
- package/.next/static/chunks/app/api/sessions/[id]/auto-name/route-598d211f381122d6.js +0 -1
- package/.next/static/chunks/app/api/sessions/[id]/context/route-598d211f381122d6.js +0 -1
- package/.next/static/chunks/app/api/sessions/[id]/entries/[entryId]/thinking/route-598d211f381122d6.js +0 -1
- package/.next/static/chunks/app/api/sessions/[id]/export/route-598d211f381122d6.js +0 -1
- package/.next/static/chunks/app/api/sessions/[id]/queue-recovery/route-598d211f381122d6.js +0 -1
- package/.next/static/chunks/app/api/sessions/[id]/route-598d211f381122d6.js +0 -1
- package/.next/static/chunks/app/api/sessions/[id]/state/route-598d211f381122d6.js +0 -1
- package/.next/static/chunks/app/api/sessions/route-598d211f381122d6.js +0 -1
- package/.next/static/chunks/app/api/settings/title-model/route-598d211f381122d6.js +0 -1
- package/.next/static/chunks/app/api/skills/check/route-598d211f381122d6.js +0 -1
- package/.next/static/chunks/app/api/skills/install/route-598d211f381122d6.js +0 -1
- package/.next/static/chunks/app/api/skills/route-598d211f381122d6.js +0 -1
- package/.next/static/chunks/app/api/skills/search/route-598d211f381122d6.js +0 -1
- package/.next/static/chunks/app/api/skills/update/route-598d211f381122d6.js +0 -1
- package/.next/static/chunks/app/api/snippets/[id]/route-598d211f381122d6.js +0 -1
- package/.next/static/chunks/app/api/snippets/route-598d211f381122d6.js +0 -1
- package/.next/static/chunks/app/api/subagents/agents/[name]/route-598d211f381122d6.js +0 -1
- package/.next/static/chunks/app/api/subagents/route-598d211f381122d6.js +0 -1
- package/.next/static/chunks/app/api/subagents/transcript/route-598d211f381122d6.js +0 -1
- package/.next/static/chunks/app/api/tasks/[id]/[action]/route-598d211f381122d6.js +0 -1
- package/.next/static/chunks/app/api/tasks/[id]/changed-files/route-598d211f381122d6.js +0 -1
- package/.next/static/chunks/app/api/tasks/[id]/diff/route-598d211f381122d6.js +0 -1
- package/.next/static/chunks/app/api/tasks/[id]/events/route-598d211f381122d6.js +0 -1
- package/.next/static/chunks/app/api/tasks/[id]/route-598d211f381122d6.js +0 -1
- package/.next/static/chunks/app/api/tasks/batch/route-598d211f381122d6.js +0 -1
- package/.next/static/chunks/app/api/tasks/events/route-598d211f381122d6.js +0 -1
- package/.next/static/chunks/app/api/tasks/route-598d211f381122d6.js +0 -1
- package/.next/static/chunks/app/api/tasks/settings/route-598d211f381122d6.js +0 -1
- package/.next/static/chunks/app/api/tasks/templates/route-598d211f381122d6.js +0 -1
- package/.next/static/chunks/app/api/themes/[name]/route-598d211f381122d6.js +0 -1
- package/.next/static/chunks/app/api/themes/route-598d211f381122d6.js +0 -1
- package/.next/static/chunks/app/api/usage/route-598d211f381122d6.js +0 -1
- package/.next/static/chunks/app/api/vision-config/route-598d211f381122d6.js +0 -1
- package/.next/static/chunks/app/api/worktrees/route-598d211f381122d6.js +0 -1
- package/.next/static/chunks/next/dist/client/components/builtin/app-error-598d211f381122d6.js +0 -1
- package/.next/static/chunks/next/dist/client/components/builtin/forbidden-598d211f381122d6.js +0 -1
- package/.next/static/chunks/next/dist/client/components/builtin/not-found-598d211f381122d6.js +0 -1
- package/.next/static/chunks/next/dist/client/components/builtin/unauthorized-598d211f381122d6.js +0 -1
- package/.next/static/eSK4TP4AB-BVe--a0MDcL/_buildManifest.js +0 -1
- /package/.next/static/{eSK4TP4AB-BVe--a0MDcL → 1qey_1awoTMsTqORIbBD0}/_ssgManifest.js +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
(()=>{var a={};a.id=2246,a.ids=[2246],a.modules={261:a=>{"use strict";a.exports=require("next/dist/shared/lib/router/utils/app-paths")},643:a=>{"use strict";a.exports=require("node:perf_hooks")},3295:a=>{"use strict";a.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},4573:a=>{"use strict";a.exports=require("node:buffer")},8102:(a,b,c)=>{"use strict";c.d(b,{$:()=>g});var d=c(55511),e=c(29021),f=c(33873);function g(a,b){let c=(0,f.dirname)(a),g=(0,f.join)(c,`.${(0,f.basename)(a)}-${(0,d.randomUUID)()}.tmp`),h=!1;try{(0,e.writeFileSync)(g,b,{encoding:"utf8",flag:"wx",mode:384,flush:!0}),(0,e.renameSync)(g,a)}catch(a){throw h=!0,a}finally{try{(0,e.unlinkSync)(g)}catch(a){if("ENOENT"!==a.code&&!h)throw a}}}},9153:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{DELETE:()=>k,GET:()=>i,PUT:()=>j,dynamic:()=>l});var e=c(23211),f=c(87831),g=c(33458),h=a([f]);f=(h.then?(await h)():h)[0];let l="force-dynamic";async function i(){let{password:a,...b}=(0,f.li)();return e.NextResponse.json({...b,hasPassword:!!a})}async function j(a){try{let b=await a.json(),c=(0,f.li)(),d={enabled:"boolean"==typeof b.enabled?b.enabled:c.enabled,protocol:["http","https","socks5"].includes(b.protocol)?b.protocol:c.protocol,host:"string"==typeof b.host?b.host:c.host,port:"number"==typeof b.port?b.port:c.port,username:"string"==typeof b.username?b.username:c.username,password:"string"==typeof b.password?b.password:c.password,noProxy:"string"==typeof b.noProxy?b.noProxy:c.noProxy};if(d.enabled){if(!d.host||!d.host.trim())return e.NextResponse.json({error:"Host is required when proxy is enabled"},{status:400});if(!Number.isInteger(d.port)||d.port<1||d.port>65535)return e.NextResponse.json({error:"Port must be between 1 and 65535"},{status:400});if(!["http","https","socks5"].includes(d.protocol))return e.NextResponse.json({error:"Protocol must be http, https, or socks5"},{status:400})}return(0,f.IA)(d),(0,f.m4)(d),(0,g.rt)(),e.NextResponse.json({success:!0})}catch(b){let a=b instanceof Error?b.message:String(b);return e.NextResponse.json({error:a},{status:500})}}async function k(){try{let a={...(0,f.li)(),enabled:!1};return(0,f.IA)(a),(0,f.m4)(a),(0,g.rt)(),e.NextResponse.json({success:!0})}catch(b){let a=b instanceof Error?b.message:String(b);return e.NextResponse.json({error:a},{status:500})}}d()}catch(a){d(a)}})},10846:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},16698:a=>{"use strict";a.exports=require("node:async_hooks")},29021:a=>{"use strict";a.exports=require("fs")},29294:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},31108:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{handler:()=>y,patchFetch:()=>x,routeModule:()=>z,serverHooks:()=>C,workAsyncStorage:()=>A,workUnitAsyncStorage:()=>B});var e=c(19225),f=c(84006),g=c(8317),h=c(99373),i=c(34775),j=c(24235),k=c(261),l=c(54365),m=c(90771),n=c(73461),o=c(67798),p=c(92280),q=c(62018),r=c(45696),s=c(47929),t=c(86439),u=c(37527),v=c(9153),w=a([v]);v=(w.then?(await w)():w)[0];let z=new e.AppRouteRouteModule({definition:{kind:f.RouteKind.APP_ROUTE,page:"/api/proxy/route",pathname:"/api/proxy",filename:"route",bundlePath:"app/api/proxy/route"},distDir:".next",relativeProjectDir:"",resolvedPagePath:"/Volumes/1T 原装/项目研发/pi-web-QT/app/api/proxy/route.ts",nextConfigOutput:"",userland:v,...{}}),{workAsyncStorage:A,workUnitAsyncStorage:B,serverHooks:C}=z;function x(){return(0,g.patchFetch)({workAsyncStorage:A,workUnitAsyncStorage:B})}async function y(a,b,c){c.requestMeta&&(0,h.setRequestMeta)(a,c.requestMeta),z.isDev&&(0,h.addRequestMeta)(a,"devRequestTimingInternalsEnd",process.hrtime.bigint());let d="/api/proxy/route";"/index"===d&&(d="/");let e=await z.prepare(a,b,{srcPage:d,multiZoneDraftMode:!1});if(!e)return b.statusCode=400,b.end("Bad Request"),null==c.waitUntil||c.waitUntil.call(c,Promise.resolve()),null;let{buildId:g,deploymentId:v,params:w,nextConfig:x,parsedUrl:y,isDraftMode:A,prerenderManifest:B,routerServerContext:C,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,resolvedPathname:F,clientReferenceManifest:G,serverActionsManifest:H}=e,I=(0,k.normalizeAppPath)(d),J=!!(B.dynamicRoutes[I]||B.routes[F]),K=async()=>((null==C?void 0:C.render404)?await C.render404(a,b,y,!1):b.end("This page could not be found"),null);if(J&&!A){let a=!!B.routes[F],b=B.dynamicRoutes[I];if(b&&!1===b.fallback&&!a){if(x.adapterPath)return await K();throw new t.NoFallbackError}}let L=null;!J||z.isDev||A||(L=F,L="/index"===L?"/":L);let M=!0===z.isDev||!J,N=J&&!M;H&&G&&(0,j.setManifestsSingleton)({page:d,clientReferenceManifest:G,serverActionsManifest:H});let O=a.method||"GET",P=(0,i.getTracer)(),Q=P.getActiveScopeSpan(),R=!!(null==C?void 0:C.isWrappedByNextServer),S=!!(0,h.getRequestMeta)(a,"minimalMode"),T=(0,h.getRequestMeta)(a,"incrementalCache")||await z.getIncrementalCache(a,x,B,S);null==T||T.resetRequestCache(),globalThis.__incrementalCache=T;let U={params:w,previewProps:B.preview,renderOpts:{experimental:{authInterrupts:!!x.experimental.authInterrupts},cacheComponents:!!x.cacheComponents,supportsDynamicResponse:M,incrementalCache:T,cacheLifeProfiles:x.cacheLife,waitUntil:c.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:void 0,onInstrumentationRequestError:(b,c,d,e)=>z.onRequestError(a,b,d,e,C)},sharedContext:{buildId:g,deploymentId:v}},V=new l.NodeNextRequest(a),W=new l.NodeNextResponse(b),X=m.NextRequestAdapter.fromNodeNextRequest(V,(0,m.signalFromNodeResponse)(b));try{let e,g=async a=>z.handle(X,U).finally(()=>{if(!a)return;a.setAttributes({"http.status_code":b.statusCode,"next.rsc":!1});let c=P.getRootSpanAttributes();if(!c)return;if(c.get("next.span_type")!==n.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${c.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let f=c.get("next.route");if(f){let b=`${O} ${f}`;a.setAttributes({"next.route":f,"http.route":f,"next.span_name":b}),a.updateName(b),e&&e!==a&&(e.setAttribute("http.route",f),e.updateName(b))}else a.updateName(`${O} ${d}`)}),h=async e=>{var h,i;let j=async({previousCacheEntry:f})=>{try{if(!S&&D&&E&&!f)return b.statusCode=404,b.setHeader("x-nextjs-cache","REVALIDATED"),b.end("This page could not be found"),null;let d=await g(e);a.fetchMetrics=U.renderOpts.fetchMetrics;let h=U.renderOpts.pendingWaitUntil;h&&c.waitUntil&&(c.waitUntil(h),h=void 0);let i=U.renderOpts.collectedTags;if(!J)return await (0,p.I)(V,W,d,U.renderOpts.pendingWaitUntil),null;{let a=await d.blob(),b=(0,q.toNodeOutgoingHttpHeaders)(d.headers);i&&(b[s.NEXT_CACHE_TAGS_HEADER]=i),!b["content-type"]&&a.type&&(b["content-type"]=a.type);let c=void 0!==U.renderOpts.collectedRevalidate&&!(U.renderOpts.collectedRevalidate>=s.INFINITE_CACHE)&&U.renderOpts.collectedRevalidate,e=void 0===U.renderOpts.collectedExpire||U.renderOpts.collectedExpire>=s.INFINITE_CACHE?void 0:U.renderOpts.collectedExpire;return{value:{kind:u.CachedRouteKind.APP_ROUTE,status:d.status,body:Buffer.from(await a.arrayBuffer()),headers:b},cacheControl:{revalidate:c,expire:e}}}}catch(b){throw(null==f?void 0:f.isStale)&&await z.onRequestError(a,b,{routerKind:"App Router",routePath:d,routeType:"route",revalidateReason:(0,o.c)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),b}},k=await z.handleResponse({req:a,nextConfig:x,cacheKey:L,routeKind:f.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:B,isRoutePPREnabled:!1,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,responseGenerator:j,waitUntil:c.waitUntil,isMinimalMode:S});if(!J)return null;if((null==k||null==(h=k.value)?void 0:h.kind)!==u.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==k||null==(i=k.value)?void 0:i.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});S||b.setHeader("x-nextjs-cache",D?"REVALIDATED":k.isMiss?"MISS":k.isStale?"STALE":"HIT"),A&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let l=(0,q.fromNodeOutgoingHttpHeaders)(k.value.headers);return S&&J||l.delete(s.NEXT_CACHE_TAGS_HEADER),!k.cacheControl||b.getHeader("Cache-Control")||l.get("Cache-Control")||l.set("Cache-Control",(0,r.getCacheControlHeader)(k.cacheControl)),await (0,p.I)(V,W,new Response(k.value.body,{headers:l,status:k.value.status||200})),null};R&&Q?await h(Q):(e=P.getActiveScopeSpan(),await P.withPropagatedContext(a.headers,()=>P.trace(n.BaseServerSpan.handleRequest,{spanName:`${O} ${d}`,kind:i.SpanKind.SERVER,attributes:{"http.method":O,"http.target":a.url}},h),void 0,!R))}catch(b){if(b instanceof t.NoFallbackError||await z.onRequestError(a,b,{routerKind:"App Router",routePath:I,routeType:"route",revalidateReason:(0,o.c)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),J)throw b;return await (0,p.I)(V,W,new Response(null,{status:500})),null}}d()}catch(a){d(a)}})},32467:a=>{"use strict";a.exports=require("node:http2")},33458:(a,b,c)=>{"use strict";c.d(b,{rt:()=>l});var d=c(78474),e=c(47774);let f=globalThis,g=()=>{},h=null;function i(a){return a instanceof d.EventEmitter&&d.EventEmitter.prototype.on.call(a,"error",g),a}function j(a,b){return i(new e.Kj(a,b))}function k(a,b){return 1===b.connections?j(a,b):i(new e.bC(a,{...b,factory:j}))}function l(a=3e5){f.__piWebHttpDispatcherConfigured=!1,function(a=3e5){var b;let c;if(f.__piWebHttpDispatcherConfigured)return;let d=function a(b){if("string"==typeof b){let c=b.trim();if("disabled"===c.toLowerCase())return 0;if(0===c.length)return;return a(Number(c))}if("number"==typeof b&&Number.isFinite(b)&&!(b<0))return Math.floor(b)}(a);if(void 0===d)throw Error(`Invalid HTTP idle timeout: ${String(a)}`);b=i(new e.J2({allowH2:!1,bodyTimeout:d,headersTimeout:d,clientFactory:j,factory:k})),e.bj(b),c=h,h=b,c&&c.close().catch(()=>{}),f.__piWebHttpDispatcherConfigured=!0}(a)}},33873:a=>{"use strict";a.exports=require("path")},34589:a=>{"use strict";a.exports=require("node:assert")},37067:a=>{"use strict";a.exports=require("node:http")},37540:a=>{"use strict";a.exports=require("node:console")},37830:a=>{"use strict";a.exports=require("node:stream/web")},38522:a=>{"use strict";a.exports=require("node:zlib")},40610:a=>{"use strict";a.exports=require("node:dns")},41692:a=>{"use strict";a.exports=require("node:tls")},41792:a=>{"use strict";a.exports=require("node:querystring")},44870:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},51455:a=>{"use strict";a.exports=require("node:fs/promises")},53053:a=>{"use strict";a.exports=require("node:diagnostics_channel")},55511:a=>{"use strict";a.exports=require("crypto")},57075:a=>{"use strict";a.exports=require("node:stream")},57975:a=>{"use strict";a.exports=require("node:util")},63033:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},73136:a=>{"use strict";a.exports=require("node:url")},73429:a=>{"use strict";a.exports=require("node:util/types")},75430:a=>{"use strict";a.exports=import("@earendil-works/pi-coding-agent")},75919:a=>{"use strict";a.exports=require("node:worker_threads")},76760:a=>{"use strict";a.exports=require("node:path")},77030:a=>{"use strict";a.exports=require("node:net")},77598:a=>{"use strict";a.exports=require("node:crypto")},78335:()=>{},78474:a=>{"use strict";a.exports=require("node:events")},79868:a=>{"use strict";a.exports=require("node:sqlite")},86439:a=>{"use strict";a.exports=require("next/dist/shared/lib/no-fallback-error.external")},87831:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.d(b,{IA:()=>m,iV:()=>n,li:()=>l,m4:()=>o});var e=c(29021),f=c(33873),g=c(75430),h=c(8102),i=a([g]);g=(i.then?(await i)():i)[0];let p="proxy",q=["http","https","socks5"];function j(){return(0,f.join)((0,g.getAgentDir)(),"settings.json")}function k(){let a=j();if(!(0,e.existsSync)(a))return{};try{let b=JSON.parse((0,e.readFileSync)(a,"utf8"));return null===b||"object"!=typeof b||Array.isArray(b)?{}:b}catch{return{}}}function l(){let a=k()[p],b={enabled:!1,protocol:"http",host:"127.0.0.1",port:7890,username:"",password:"",noProxy:"localhost,127.0.0.1,.local"};if(!a||"object"!=typeof a||Array.isArray(a))return b;let c=q.includes(a.protocol)?a.protocol:b.protocol,d=Number(a.port),e=Number.isInteger(d)&&d>=1&&d<=65535;return{enabled:"boolean"==typeof a.enabled?a.enabled:b.enabled,protocol:c,host:"string"==typeof a.host&&a.host.length>0?a.host:b.host,port:e?d:b.port,username:"string"==typeof a.username?a.username:"",password:"string"==typeof a.password?a.password:"",noProxy:"string"==typeof a.noProxy?a.noProxy:b.noProxy}}function m(a){let b=k();b[p]=a,(0,h.$)(j(),JSON.stringify(b,null,2))}function n(a){if(!a.enabled||!a.host||!a.port)return null;let b="";if(a.username){let c=encodeURIComponent(a.username);b=a.password?`${c}:${encodeURIComponent(a.password)}@`:`${c}@`}return`${a.protocol}://${b}${a.host}:${a.port}`}function o(a){let b=n(a);b?(process.env.HTTP_PROXY=b,process.env.HTTPS_PROXY=b,process.env.NO_PROXY=a.noProxy||""):(delete process.env.HTTP_PROXY,delete process.env.HTTPS_PROXY,process.env.NO_PROXY="")}d()}catch(a){d(a)}})},87997:a=>{"use strict";a.exports=require("node:timers")},96487:()=>{}};var b=require("../../../webpack-runtime.js");b.C(a);var c=b.X(0,[4741,1813,7774],()=>b(b.s=31108));module.exports=c})();
|
|
1
|
+
(()=>{var a={};a.id=2246,a.ids=[2246],a.modules={261:a=>{"use strict";a.exports=require("next/dist/shared/lib/router/utils/app-paths")},643:a=>{"use strict";a.exports=require("node:perf_hooks")},3295:a=>{"use strict";a.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},4573:a=>{"use strict";a.exports=require("node:buffer")},8102:(a,b,c)=>{"use strict";c.d(b,{$:()=>g});var d=c(55511),e=c(29021),f=c(33873);function g(a,b){let c=(0,f.dirname)(a),g=(0,f.join)(c,`.${(0,f.basename)(a)}-${(0,d.randomUUID)()}.tmp`),h=!1;try{(0,e.writeFileSync)(g,b,{encoding:"utf8",flag:"wx",mode:384,flush:!0}),(0,e.renameSync)(g,a)}catch(a){throw h=!0,a}finally{try{(0,e.unlinkSync)(g)}catch(a){if("ENOENT"!==a.code&&!h)throw a}}}},9153:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{DELETE:()=>k,GET:()=>i,PUT:()=>j,dynamic:()=>l});var e=c(23211),f=c(87831),g=c(33458),h=a([f]);f=(h.then?(await h)():h)[0];let l="force-dynamic";async function i(){let{password:a,...b}=(0,f.li)();return e.NextResponse.json({...b,hasPassword:!!a})}async function j(a){try{let b=await a.json(),c=(0,f.li)(),d={enabled:"boolean"==typeof b.enabled?b.enabled:c.enabled,protocol:["http","https","socks5"].includes(b.protocol)?b.protocol:c.protocol,host:"string"==typeof b.host?b.host:c.host,port:"number"==typeof b.port?b.port:c.port,username:"string"==typeof b.username?b.username:c.username,password:"string"==typeof b.password?b.password:c.password,noProxy:"string"==typeof b.noProxy?b.noProxy:c.noProxy};if(d.enabled){if(!d.host||!d.host.trim())return e.NextResponse.json({error:"Host is required when proxy is enabled"},{status:400});if(!Number.isInteger(d.port)||d.port<1||d.port>65535)return e.NextResponse.json({error:"Port must be between 1 and 65535"},{status:400});if(!["http","https","socks5"].includes(d.protocol))return e.NextResponse.json({error:"Protocol must be http, https, or socks5"},{status:400})}return(0,f.IA)(d),(0,f.m4)(d),(0,g.rt)(),e.NextResponse.json({success:!0})}catch(b){let a=b instanceof Error?b.message:String(b);return e.NextResponse.json({error:a},{status:500})}}async function k(){try{let a={...(0,f.li)(),enabled:!1};return(0,f.IA)(a),(0,f.m4)(a),(0,g.rt)(),e.NextResponse.json({success:!0})}catch(b){let a=b instanceof Error?b.message:String(b);return e.NextResponse.json({error:a},{status:500})}}d()}catch(a){d(a)}})},10846:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},16698:a=>{"use strict";a.exports=require("node:async_hooks")},16875:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{handler:()=>y,patchFetch:()=>x,routeModule:()=>z,serverHooks:()=>C,workAsyncStorage:()=>A,workUnitAsyncStorage:()=>B});var e=c(19225),f=c(84006),g=c(8317),h=c(99373),i=c(34775),j=c(24235),k=c(261),l=c(54365),m=c(90771),n=c(73461),o=c(67798),p=c(92280),q=c(62018),r=c(45696),s=c(47929),t=c(86439),u=c(37527),v=c(9153),w=a([v]);v=(w.then?(await w)():w)[0];let z=new e.AppRouteRouteModule({definition:{kind:f.RouteKind.APP_ROUTE,page:"/api/proxy/route",pathname:"/api/proxy",filename:"route",bundlePath:"app/api/proxy/route"},distDir:".next",relativeProjectDir:"",resolvedPagePath:"/Volumes/1T 原装/项目研发/pi-web-QT/app/api/proxy/route.ts",nextConfigOutput:"",userland:v,...{}}),{workAsyncStorage:A,workUnitAsyncStorage:B,serverHooks:C}=z;function x(){return(0,g.patchFetch)({workAsyncStorage:A,workUnitAsyncStorage:B})}async function y(a,b,c){c.requestMeta&&(0,h.setRequestMeta)(a,c.requestMeta),z.isDev&&(0,h.addRequestMeta)(a,"devRequestTimingInternalsEnd",process.hrtime.bigint());let d="/api/proxy/route";"/index"===d&&(d="/");let e=await z.prepare(a,b,{srcPage:d,multiZoneDraftMode:!1});if(!e)return b.statusCode=400,b.end("Bad Request"),null==c.waitUntil||c.waitUntil.call(c,Promise.resolve()),null;let{buildId:g,deploymentId:v,params:w,nextConfig:x,parsedUrl:y,isDraftMode:A,prerenderManifest:B,routerServerContext:C,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,resolvedPathname:F,clientReferenceManifest:G,serverActionsManifest:H}=e,I=(0,k.normalizeAppPath)(d),J=!!(B.dynamicRoutes[I]||B.routes[F]),K=async()=>((null==C?void 0:C.render404)?await C.render404(a,b,y,!1):b.end("This page could not be found"),null);if(J&&!A){let a=!!B.routes[F],b=B.dynamicRoutes[I];if(b&&!1===b.fallback&&!a){if(x.adapterPath)return await K();throw new t.NoFallbackError}}let L=null;!J||z.isDev||A||(L=F,L="/index"===L?"/":L);let M=!0===z.isDev||!J,N=J&&!M;H&&G&&(0,j.setManifestsSingleton)({page:d,clientReferenceManifest:G,serverActionsManifest:H});let O=a.method||"GET",P=(0,i.getTracer)(),Q=P.getActiveScopeSpan(),R=!!(null==C?void 0:C.isWrappedByNextServer),S=!!(0,h.getRequestMeta)(a,"minimalMode"),T=(0,h.getRequestMeta)(a,"incrementalCache")||await z.getIncrementalCache(a,x,B,S);null==T||T.resetRequestCache(),globalThis.__incrementalCache=T;let U={params:w,previewProps:B.preview,renderOpts:{experimental:{authInterrupts:!!x.experimental.authInterrupts},cacheComponents:!!x.cacheComponents,supportsDynamicResponse:M,incrementalCache:T,cacheLifeProfiles:x.cacheLife,waitUntil:c.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:void 0,onInstrumentationRequestError:(b,c,d,e)=>z.onRequestError(a,b,d,e,C)},sharedContext:{buildId:g,deploymentId:v}},V=new l.NodeNextRequest(a),W=new l.NodeNextResponse(b),X=m.NextRequestAdapter.fromNodeNextRequest(V,(0,m.signalFromNodeResponse)(b));try{let e,g=async a=>z.handle(X,U).finally(()=>{if(!a)return;a.setAttributes({"http.status_code":b.statusCode,"next.rsc":!1});let c=P.getRootSpanAttributes();if(!c)return;if(c.get("next.span_type")!==n.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${c.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let f=c.get("next.route");if(f){let b=`${O} ${f}`;a.setAttributes({"next.route":f,"http.route":f,"next.span_name":b}),a.updateName(b),e&&e!==a&&(e.setAttribute("http.route",f),e.updateName(b))}else a.updateName(`${O} ${d}`)}),h=async e=>{var h,i;let j=async({previousCacheEntry:f})=>{try{if(!S&&D&&E&&!f)return b.statusCode=404,b.setHeader("x-nextjs-cache","REVALIDATED"),b.end("This page could not be found"),null;let d=await g(e);a.fetchMetrics=U.renderOpts.fetchMetrics;let h=U.renderOpts.pendingWaitUntil;h&&c.waitUntil&&(c.waitUntil(h),h=void 0);let i=U.renderOpts.collectedTags;if(!J)return await (0,p.I)(V,W,d,U.renderOpts.pendingWaitUntil),null;{let a=await d.blob(),b=(0,q.toNodeOutgoingHttpHeaders)(d.headers);i&&(b[s.NEXT_CACHE_TAGS_HEADER]=i),!b["content-type"]&&a.type&&(b["content-type"]=a.type);let c=void 0!==U.renderOpts.collectedRevalidate&&!(U.renderOpts.collectedRevalidate>=s.INFINITE_CACHE)&&U.renderOpts.collectedRevalidate,e=void 0===U.renderOpts.collectedExpire||U.renderOpts.collectedExpire>=s.INFINITE_CACHE?void 0:U.renderOpts.collectedExpire;return{value:{kind:u.CachedRouteKind.APP_ROUTE,status:d.status,body:Buffer.from(await a.arrayBuffer()),headers:b},cacheControl:{revalidate:c,expire:e}}}}catch(b){throw(null==f?void 0:f.isStale)&&await z.onRequestError(a,b,{routerKind:"App Router",routePath:d,routeType:"route",revalidateReason:(0,o.c)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),b}},k=await z.handleResponse({req:a,nextConfig:x,cacheKey:L,routeKind:f.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:B,isRoutePPREnabled:!1,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,responseGenerator:j,waitUntil:c.waitUntil,isMinimalMode:S});if(!J)return null;if((null==k||null==(h=k.value)?void 0:h.kind)!==u.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==k||null==(i=k.value)?void 0:i.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});S||b.setHeader("x-nextjs-cache",D?"REVALIDATED":k.isMiss?"MISS":k.isStale?"STALE":"HIT"),A&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let l=(0,q.fromNodeOutgoingHttpHeaders)(k.value.headers);return S&&J||l.delete(s.NEXT_CACHE_TAGS_HEADER),!k.cacheControl||b.getHeader("Cache-Control")||l.get("Cache-Control")||l.set("Cache-Control",(0,r.getCacheControlHeader)(k.cacheControl)),await (0,p.I)(V,W,new Response(k.value.body,{headers:l,status:k.value.status||200})),null};R&&Q?await h(Q):(e=P.getActiveScopeSpan(),await P.withPropagatedContext(a.headers,()=>P.trace(n.BaseServerSpan.handleRequest,{spanName:`${O} ${d}`,kind:i.SpanKind.SERVER,attributes:{"http.method":O,"http.target":a.url}},h),void 0,!R))}catch(b){if(b instanceof t.NoFallbackError||await z.onRequestError(a,b,{routerKind:"App Router",routePath:I,routeType:"route",revalidateReason:(0,o.c)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),J)throw b;return await (0,p.I)(V,W,new Response(null,{status:500})),null}}d()}catch(a){d(a)}})},29021:a=>{"use strict";a.exports=require("fs")},29294:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},32467:a=>{"use strict";a.exports=require("node:http2")},33458:(a,b,c)=>{"use strict";c.d(b,{rt:()=>l});var d=c(78474),e=c(47774);let f=globalThis,g=()=>{},h=null;function i(a){return a instanceof d.EventEmitter&&d.EventEmitter.prototype.on.call(a,"error",g),a}function j(a,b){return i(new e.Kj(a,b))}function k(a,b){return 1===b.connections?j(a,b):i(new e.bC(a,{...b,factory:j}))}function l(a=3e5){f.__piWebHttpDispatcherConfigured=!1,function(a=3e5){var b;let c;if(f.__piWebHttpDispatcherConfigured)return;let d=function a(b){if("string"==typeof b){let c=b.trim();if("disabled"===c.toLowerCase())return 0;if(0===c.length)return;return a(Number(c))}if("number"==typeof b&&Number.isFinite(b)&&!(b<0))return Math.floor(b)}(a);if(void 0===d)throw Error(`Invalid HTTP idle timeout: ${String(a)}`);b=i(new e.J2({allowH2:!1,bodyTimeout:d,headersTimeout:d,clientFactory:j,factory:k})),e.bj(b),c=h,h=b,c&&c.close().catch(()=>{}),f.__piWebHttpDispatcherConfigured=!0}(a)}},33873:a=>{"use strict";a.exports=require("path")},34589:a=>{"use strict";a.exports=require("node:assert")},37067:a=>{"use strict";a.exports=require("node:http")},37540:a=>{"use strict";a.exports=require("node:console")},37830:a=>{"use strict";a.exports=require("node:stream/web")},38522:a=>{"use strict";a.exports=require("node:zlib")},40610:a=>{"use strict";a.exports=require("node:dns")},41692:a=>{"use strict";a.exports=require("node:tls")},41792:a=>{"use strict";a.exports=require("node:querystring")},44870:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},51455:a=>{"use strict";a.exports=require("node:fs/promises")},53053:a=>{"use strict";a.exports=require("node:diagnostics_channel")},55511:a=>{"use strict";a.exports=require("crypto")},57075:a=>{"use strict";a.exports=require("node:stream")},57975:a=>{"use strict";a.exports=require("node:util")},63033:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},73136:a=>{"use strict";a.exports=require("node:url")},73429:a=>{"use strict";a.exports=require("node:util/types")},75430:a=>{"use strict";a.exports=import("@earendil-works/pi-coding-agent")},75919:a=>{"use strict";a.exports=require("node:worker_threads")},76760:a=>{"use strict";a.exports=require("node:path")},77030:a=>{"use strict";a.exports=require("node:net")},77598:a=>{"use strict";a.exports=require("node:crypto")},78335:()=>{},78474:a=>{"use strict";a.exports=require("node:events")},79868:a=>{"use strict";a.exports=require("node:sqlite")},86439:a=>{"use strict";a.exports=require("next/dist/shared/lib/no-fallback-error.external")},87831:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.d(b,{IA:()=>m,iV:()=>n,li:()=>l,m4:()=>o});var e=c(29021),f=c(33873),g=c(75430),h=c(8102),i=a([g]);g=(i.then?(await i)():i)[0];let p="proxy",q=["http","https","socks5"];function j(){return(0,f.join)((0,g.getAgentDir)(),"settings.json")}function k(){let a=j();if(!(0,e.existsSync)(a))return{};try{let b=JSON.parse((0,e.readFileSync)(a,"utf8"));return null===b||"object"!=typeof b||Array.isArray(b)?{}:b}catch{return{}}}function l(){let a=k()[p],b={enabled:!1,protocol:"http",host:"127.0.0.1",port:7890,username:"",password:"",noProxy:"localhost,127.0.0.1,.local"};if(!a||"object"!=typeof a||Array.isArray(a))return b;let c=q.includes(a.protocol)?a.protocol:b.protocol,d=Number(a.port),e=Number.isInteger(d)&&d>=1&&d<=65535;return{enabled:"boolean"==typeof a.enabled?a.enabled:b.enabled,protocol:c,host:"string"==typeof a.host&&a.host.length>0?a.host:b.host,port:e?d:b.port,username:"string"==typeof a.username?a.username:"",password:"string"==typeof a.password?a.password:"",noProxy:"string"==typeof a.noProxy?a.noProxy:b.noProxy}}function m(a){let b=k();b[p]=a,(0,h.$)(j(),JSON.stringify(b,null,2))}function n(a){if(!a.enabled||!a.host||!a.port)return null;let b="";if(a.username){let c=encodeURIComponent(a.username);b=a.password?`${c}:${encodeURIComponent(a.password)}@`:`${c}@`}return`${a.protocol}://${b}${a.host}:${a.port}`}function o(a){let b=n(a);b?(process.env.HTTP_PROXY=b,process.env.HTTPS_PROXY=b,process.env.NO_PROXY=a.noProxy||""):(delete process.env.HTTP_PROXY,delete process.env.HTTPS_PROXY,process.env.NO_PROXY="")}d()}catch(a){d(a)}})},87997:a=>{"use strict";a.exports=require("node:timers")},96487:()=>{}};var b=require("../../../webpack-runtime.js");b.C(a);var c=b.X(0,[4741,1813,7774],()=>b(b.s=16875));module.exports=c})();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(()=>{var a={};a.id=1225,a.ids=[1225],a.modules={261:a=>{"use strict";a.exports=require("next/dist/shared/lib/router/utils/app-paths")},643:a=>{"use strict";a.exports=require("node:perf_hooks")},3295:a=>{"use strict";a.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},4573:a=>{"use strict";a.exports=require("node:buffer")},8102:(a,b,c)=>{"use strict";c.d(b,{$:()=>g});var d=c(55511),e=c(29021),f=c(33873);function g(a,b){let c=(0,f.dirname)(a),g=(0,f.join)(c,`.${(0,f.basename)(a)}-${(0,d.randomUUID)()}.tmp`),h=!1;try{(0,e.writeFileSync)(g,b,{encoding:"utf8",flag:"wx",mode:384,flush:!0}),(0,e.renameSync)(g,a)}catch(a){throw h=!0,a}finally{try{(0,e.unlinkSync)(g)}catch(a){if("ENOENT"!==a.code&&!h)throw a}}}},10846:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},16698:a=>{"use strict";a.exports=require("node:async_hooks")},21078:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{handler:()=>y,patchFetch:()=>x,routeModule:()=>z,serverHooks:()=>C,workAsyncStorage:()=>A,workUnitAsyncStorage:()=>B});var e=c(19225),f=c(84006),g=c(8317),h=c(99373),i=c(34775),j=c(24235),k=c(261),l=c(54365),m=c(90771),n=c(73461),o=c(67798),p=c(92280),q=c(62018),r=c(45696),s=c(47929),t=c(86439),u=c(37527),v=c(80924),w=a([v]);v=(w.then?(await w)():w)[0];let z=new e.AppRouteRouteModule({definition:{kind:f.RouteKind.APP_ROUTE,page:"/api/proxy/test/route",pathname:"/api/proxy/test",filename:"route",bundlePath:"app/api/proxy/test/route"},distDir:".next",relativeProjectDir:"",resolvedPagePath:"/Volumes/1T 原装/项目研发/pi-web-QT/app/api/proxy/test/route.ts",nextConfigOutput:"",userland:v,...{}}),{workAsyncStorage:A,workUnitAsyncStorage:B,serverHooks:C}=z;function x(){return(0,g.patchFetch)({workAsyncStorage:A,workUnitAsyncStorage:B})}async function y(a,b,c){c.requestMeta&&(0,h.setRequestMeta)(a,c.requestMeta),z.isDev&&(0,h.addRequestMeta)(a,"devRequestTimingInternalsEnd",process.hrtime.bigint());let d="/api/proxy/test/route";"/index"===d&&(d="/");let e=await z.prepare(a,b,{srcPage:d,multiZoneDraftMode:!1});if(!e)return b.statusCode=400,b.end("Bad Request"),null==c.waitUntil||c.waitUntil.call(c,Promise.resolve()),null;let{buildId:g,deploymentId:v,params:w,nextConfig:x,parsedUrl:y,isDraftMode:A,prerenderManifest:B,routerServerContext:C,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,resolvedPathname:F,clientReferenceManifest:G,serverActionsManifest:H}=e,I=(0,k.normalizeAppPath)(d),J=!!(B.dynamicRoutes[I]||B.routes[F]),K=async()=>((null==C?void 0:C.render404)?await C.render404(a,b,y,!1):b.end("This page could not be found"),null);if(J&&!A){let a=!!B.routes[F],b=B.dynamicRoutes[I];if(b&&!1===b.fallback&&!a){if(x.adapterPath)return await K();throw new t.NoFallbackError}}let L=null;!J||z.isDev||A||(L=F,L="/index"===L?"/":L);let M=!0===z.isDev||!J,N=J&&!M;H&&G&&(0,j.setManifestsSingleton)({page:d,clientReferenceManifest:G,serverActionsManifest:H});let O=a.method||"GET",P=(0,i.getTracer)(),Q=P.getActiveScopeSpan(),R=!!(null==C?void 0:C.isWrappedByNextServer),S=!!(0,h.getRequestMeta)(a,"minimalMode"),T=(0,h.getRequestMeta)(a,"incrementalCache")||await z.getIncrementalCache(a,x,B,S);null==T||T.resetRequestCache(),globalThis.__incrementalCache=T;let U={params:w,previewProps:B.preview,renderOpts:{experimental:{authInterrupts:!!x.experimental.authInterrupts},cacheComponents:!!x.cacheComponents,supportsDynamicResponse:M,incrementalCache:T,cacheLifeProfiles:x.cacheLife,waitUntil:c.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:void 0,onInstrumentationRequestError:(b,c,d,e)=>z.onRequestError(a,b,d,e,C)},sharedContext:{buildId:g,deploymentId:v}},V=new l.NodeNextRequest(a),W=new l.NodeNextResponse(b),X=m.NextRequestAdapter.fromNodeNextRequest(V,(0,m.signalFromNodeResponse)(b));try{let e,g=async a=>z.handle(X,U).finally(()=>{if(!a)return;a.setAttributes({"http.status_code":b.statusCode,"next.rsc":!1});let c=P.getRootSpanAttributes();if(!c)return;if(c.get("next.span_type")!==n.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${c.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let f=c.get("next.route");if(f){let b=`${O} ${f}`;a.setAttributes({"next.route":f,"http.route":f,"next.span_name":b}),a.updateName(b),e&&e!==a&&(e.setAttribute("http.route",f),e.updateName(b))}else a.updateName(`${O} ${d}`)}),h=async e=>{var h,i;let j=async({previousCacheEntry:f})=>{try{if(!S&&D&&E&&!f)return b.statusCode=404,b.setHeader("x-nextjs-cache","REVALIDATED"),b.end("This page could not be found"),null;let d=await g(e);a.fetchMetrics=U.renderOpts.fetchMetrics;let h=U.renderOpts.pendingWaitUntil;h&&c.waitUntil&&(c.waitUntil(h),h=void 0);let i=U.renderOpts.collectedTags;if(!J)return await (0,p.I)(V,W,d,U.renderOpts.pendingWaitUntil),null;{let a=await d.blob(),b=(0,q.toNodeOutgoingHttpHeaders)(d.headers);i&&(b[s.NEXT_CACHE_TAGS_HEADER]=i),!b["content-type"]&&a.type&&(b["content-type"]=a.type);let c=void 0!==U.renderOpts.collectedRevalidate&&!(U.renderOpts.collectedRevalidate>=s.INFINITE_CACHE)&&U.renderOpts.collectedRevalidate,e=void 0===U.renderOpts.collectedExpire||U.renderOpts.collectedExpire>=s.INFINITE_CACHE?void 0:U.renderOpts.collectedExpire;return{value:{kind:u.CachedRouteKind.APP_ROUTE,status:d.status,body:Buffer.from(await a.arrayBuffer()),headers:b},cacheControl:{revalidate:c,expire:e}}}}catch(b){throw(null==f?void 0:f.isStale)&&await z.onRequestError(a,b,{routerKind:"App Router",routePath:d,routeType:"route",revalidateReason:(0,o.c)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),b}},k=await z.handleResponse({req:a,nextConfig:x,cacheKey:L,routeKind:f.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:B,isRoutePPREnabled:!1,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,responseGenerator:j,waitUntil:c.waitUntil,isMinimalMode:S});if(!J)return null;if((null==k||null==(h=k.value)?void 0:h.kind)!==u.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==k||null==(i=k.value)?void 0:i.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});S||b.setHeader("x-nextjs-cache",D?"REVALIDATED":k.isMiss?"MISS":k.isStale?"STALE":"HIT"),A&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let l=(0,q.fromNodeOutgoingHttpHeaders)(k.value.headers);return S&&J||l.delete(s.NEXT_CACHE_TAGS_HEADER),!k.cacheControl||b.getHeader("Cache-Control")||l.get("Cache-Control")||l.set("Cache-Control",(0,r.getCacheControlHeader)(k.cacheControl)),await (0,p.I)(V,W,new Response(k.value.body,{headers:l,status:k.value.status||200})),null};R&&Q?await h(Q):(e=P.getActiveScopeSpan(),await P.withPropagatedContext(a.headers,()=>P.trace(n.BaseServerSpan.handleRequest,{spanName:`${O} ${d}`,kind:i.SpanKind.SERVER,attributes:{"http.method":O,"http.target":a.url}},h),void 0,!R))}catch(b){if(b instanceof t.NoFallbackError||await z.onRequestError(a,b,{routerKind:"App Router",routePath:I,routeType:"route",revalidateReason:(0,o.c)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),J)throw b;return await (0,p.I)(V,W,new Response(null,{status:500})),null}}d()}catch(a){d(a)}})},29021:a=>{"use strict";a.exports=require("fs")},29294:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},32467:a=>{"use strict";a.exports=require("node:http2")},33873:a=>{"use strict";a.exports=require("path")},34589:a=>{"use strict";a.exports=require("node:assert")},37067:a=>{"use strict";a.exports=require("node:http")},37540:a=>{"use strict";a.exports=require("node:console")},37830:a=>{"use strict";a.exports=require("node:stream/web")},38522:a=>{"use strict";a.exports=require("node:zlib")},40610:a=>{"use strict";a.exports=require("node:dns")},41692:a=>{"use strict";a.exports=require("node:tls")},41792:a=>{"use strict";a.exports=require("node:querystring")},44870:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},51455:a=>{"use strict";a.exports=require("node:fs/promises")},53053:a=>{"use strict";a.exports=require("node:diagnostics_channel")},55511:a=>{"use strict";a.exports=require("crypto")},57075:a=>{"use strict";a.exports=require("node:stream")},57975:a=>{"use strict";a.exports=require("node:util")},63033:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},73136:a=>{"use strict";a.exports=require("node:url")},73429:a=>{"use strict";a.exports=require("node:util/types")},75430:a=>{"use strict";a.exports=import("@earendil-works/pi-coding-agent")},75919:a=>{"use strict";a.exports=require("node:worker_threads")},76760:a=>{"use strict";a.exports=require("node:path")},77030:a=>{"use strict";a.exports=require("node:net")},77598:a=>{"use strict";a.exports=require("node:crypto")},78335:()=>{},78474:a=>{"use strict";a.exports=require("node:events")},79868:a=>{"use strict";a.exports=require("node:sqlite")},80924:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{POST:()=>j,dynamic:()=>k});var e=c(23211),f=c(78474),g=c(87831),h=c(47774),i=a([g]);g=(i.then?(await i)():i)[0];let k="force-dynamic";async function j(){let a=(0,g.li)();if(!a.enabled)return e.NextResponse.json({success:!1,error:"Proxy is disabled"},{status:400});if(!(0,g.iV)(a))return e.NextResponse.json({success:!1,error:"Proxy URL is invalid (missing host or port)"},{status:400});let b=Date.now();try{let a=new h.J2({allowH2:!1,bodyTimeout:1e4,headersTimeout:1e4});a instanceof f.EventEmitter&&f.EventEmitter.prototype.on.call(a,"error",()=>{});let c=new AbortController,d=setTimeout(()=>c.abort(),1e4);try{let{statusCode:d,body:f}=await h.Em("https://api.github.com",{dispatcher:a,signal:c.signal,headers:{"User-Agent":"pi-web-proxy-test"}}),g=await f.text();if(d>=400){let a=g.slice(0,200);return e.NextResponse.json({success:!1,error:`HTTP ${d}${a?": "+a:""}`,latencyMs:Date.now()-b})}let i=Date.now()-b;return e.NextResponse.json({success:!0,latencyMs:i,status:d})}finally{clearTimeout(d)}}catch(c){let a=c instanceof Error?c.message:String(c);return c instanceof DOMException&&"TimeoutError"===c.name&&(a="Test timed out after 10000ms"),e.NextResponse.json({success:!1,error:a,latencyMs:Date.now()-b})}}d()}catch(a){d(a)}})},86439:a=>{"use strict";a.exports=require("next/dist/shared/lib/no-fallback-error.external")},87831:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.d(b,{IA:()=>m,iV:()=>n,li:()=>l,m4:()=>o});var e=c(29021),f=c(33873),g=c(75430),h=c(8102),i=a([g]);g=(i.then?(await i)():i)[0];let p="proxy",q=["http","https","socks5"];function j(){return(0,f.join)((0,g.getAgentDir)(),"settings.json")}function k(){let a=j();if(!(0,e.existsSync)(a))return{};try{let b=JSON.parse((0,e.readFileSync)(a,"utf8"));return null===b||"object"!=typeof b||Array.isArray(b)?{}:b}catch{return{}}}function l(){let a=k()[p],b={enabled:!1,protocol:"http",host:"127.0.0.1",port:7890,username:"",password:"",noProxy:"localhost,127.0.0.1,.local"};if(!a||"object"!=typeof a||Array.isArray(a))return b;let c=q.includes(a.protocol)?a.protocol:b.protocol,d=Number(a.port),e=Number.isInteger(d)&&d>=1&&d<=65535;return{enabled:"boolean"==typeof a.enabled?a.enabled:b.enabled,protocol:c,host:"string"==typeof a.host&&a.host.length>0?a.host:b.host,port:e?d:b.port,username:"string"==typeof a.username?a.username:"",password:"string"==typeof a.password?a.password:"",noProxy:"string"==typeof a.noProxy?a.noProxy:b.noProxy}}function m(a){let b=k();b[p]=a,(0,h.$)(j(),JSON.stringify(b,null,2))}function n(a){if(!a.enabled||!a.host||!a.port)return null;let b="";if(a.username){let c=encodeURIComponent(a.username);b=a.password?`${c}:${encodeURIComponent(a.password)}@`:`${c}@`}return`${a.protocol}://${b}${a.host}:${a.port}`}function o(a){let b=n(a);b?(process.env.HTTP_PROXY=b,process.env.HTTPS_PROXY=b,process.env.NO_PROXY=a.noProxy||""):(delete process.env.HTTP_PROXY,delete process.env.HTTPS_PROXY,process.env.NO_PROXY="")}d()}catch(a){d(a)}})},87997:a=>{"use strict";a.exports=require("node:timers")},96487:()=>{}};var b=require("../../../../webpack-runtime.js");b.C(a);var c=b.X(0,[4741,1813,7774],()=>b(b.s=21078));module.exports=c})();
|
|
1
|
+
(()=>{var a={};a.id=1225,a.ids=[1225],a.modules={261:a=>{"use strict";a.exports=require("next/dist/shared/lib/router/utils/app-paths")},643:a=>{"use strict";a.exports=require("node:perf_hooks")},3295:a=>{"use strict";a.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},3373:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{handler:()=>y,patchFetch:()=>x,routeModule:()=>z,serverHooks:()=>C,workAsyncStorage:()=>A,workUnitAsyncStorage:()=>B});var e=c(19225),f=c(84006),g=c(8317),h=c(99373),i=c(34775),j=c(24235),k=c(261),l=c(54365),m=c(90771),n=c(73461),o=c(67798),p=c(92280),q=c(62018),r=c(45696),s=c(47929),t=c(86439),u=c(37527),v=c(80924),w=a([v]);v=(w.then?(await w)():w)[0];let z=new e.AppRouteRouteModule({definition:{kind:f.RouteKind.APP_ROUTE,page:"/api/proxy/test/route",pathname:"/api/proxy/test",filename:"route",bundlePath:"app/api/proxy/test/route"},distDir:".next",relativeProjectDir:"",resolvedPagePath:"/Volumes/1T 原装/项目研发/pi-web-QT/app/api/proxy/test/route.ts",nextConfigOutput:"",userland:v,...{}}),{workAsyncStorage:A,workUnitAsyncStorage:B,serverHooks:C}=z;function x(){return(0,g.patchFetch)({workAsyncStorage:A,workUnitAsyncStorage:B})}async function y(a,b,c){c.requestMeta&&(0,h.setRequestMeta)(a,c.requestMeta),z.isDev&&(0,h.addRequestMeta)(a,"devRequestTimingInternalsEnd",process.hrtime.bigint());let d="/api/proxy/test/route";"/index"===d&&(d="/");let e=await z.prepare(a,b,{srcPage:d,multiZoneDraftMode:!1});if(!e)return b.statusCode=400,b.end("Bad Request"),null==c.waitUntil||c.waitUntil.call(c,Promise.resolve()),null;let{buildId:g,deploymentId:v,params:w,nextConfig:x,parsedUrl:y,isDraftMode:A,prerenderManifest:B,routerServerContext:C,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,resolvedPathname:F,clientReferenceManifest:G,serverActionsManifest:H}=e,I=(0,k.normalizeAppPath)(d),J=!!(B.dynamicRoutes[I]||B.routes[F]),K=async()=>((null==C?void 0:C.render404)?await C.render404(a,b,y,!1):b.end("This page could not be found"),null);if(J&&!A){let a=!!B.routes[F],b=B.dynamicRoutes[I];if(b&&!1===b.fallback&&!a){if(x.adapterPath)return await K();throw new t.NoFallbackError}}let L=null;!J||z.isDev||A||(L=F,L="/index"===L?"/":L);let M=!0===z.isDev||!J,N=J&&!M;H&&G&&(0,j.setManifestsSingleton)({page:d,clientReferenceManifest:G,serverActionsManifest:H});let O=a.method||"GET",P=(0,i.getTracer)(),Q=P.getActiveScopeSpan(),R=!!(null==C?void 0:C.isWrappedByNextServer),S=!!(0,h.getRequestMeta)(a,"minimalMode"),T=(0,h.getRequestMeta)(a,"incrementalCache")||await z.getIncrementalCache(a,x,B,S);null==T||T.resetRequestCache(),globalThis.__incrementalCache=T;let U={params:w,previewProps:B.preview,renderOpts:{experimental:{authInterrupts:!!x.experimental.authInterrupts},cacheComponents:!!x.cacheComponents,supportsDynamicResponse:M,incrementalCache:T,cacheLifeProfiles:x.cacheLife,waitUntil:c.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:void 0,onInstrumentationRequestError:(b,c,d,e)=>z.onRequestError(a,b,d,e,C)},sharedContext:{buildId:g,deploymentId:v}},V=new l.NodeNextRequest(a),W=new l.NodeNextResponse(b),X=m.NextRequestAdapter.fromNodeNextRequest(V,(0,m.signalFromNodeResponse)(b));try{let e,g=async a=>z.handle(X,U).finally(()=>{if(!a)return;a.setAttributes({"http.status_code":b.statusCode,"next.rsc":!1});let c=P.getRootSpanAttributes();if(!c)return;if(c.get("next.span_type")!==n.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${c.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let f=c.get("next.route");if(f){let b=`${O} ${f}`;a.setAttributes({"next.route":f,"http.route":f,"next.span_name":b}),a.updateName(b),e&&e!==a&&(e.setAttribute("http.route",f),e.updateName(b))}else a.updateName(`${O} ${d}`)}),h=async e=>{var h,i;let j=async({previousCacheEntry:f})=>{try{if(!S&&D&&E&&!f)return b.statusCode=404,b.setHeader("x-nextjs-cache","REVALIDATED"),b.end("This page could not be found"),null;let d=await g(e);a.fetchMetrics=U.renderOpts.fetchMetrics;let h=U.renderOpts.pendingWaitUntil;h&&c.waitUntil&&(c.waitUntil(h),h=void 0);let i=U.renderOpts.collectedTags;if(!J)return await (0,p.I)(V,W,d,U.renderOpts.pendingWaitUntil),null;{let a=await d.blob(),b=(0,q.toNodeOutgoingHttpHeaders)(d.headers);i&&(b[s.NEXT_CACHE_TAGS_HEADER]=i),!b["content-type"]&&a.type&&(b["content-type"]=a.type);let c=void 0!==U.renderOpts.collectedRevalidate&&!(U.renderOpts.collectedRevalidate>=s.INFINITE_CACHE)&&U.renderOpts.collectedRevalidate,e=void 0===U.renderOpts.collectedExpire||U.renderOpts.collectedExpire>=s.INFINITE_CACHE?void 0:U.renderOpts.collectedExpire;return{value:{kind:u.CachedRouteKind.APP_ROUTE,status:d.status,body:Buffer.from(await a.arrayBuffer()),headers:b},cacheControl:{revalidate:c,expire:e}}}}catch(b){throw(null==f?void 0:f.isStale)&&await z.onRequestError(a,b,{routerKind:"App Router",routePath:d,routeType:"route",revalidateReason:(0,o.c)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),b}},k=await z.handleResponse({req:a,nextConfig:x,cacheKey:L,routeKind:f.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:B,isRoutePPREnabled:!1,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,responseGenerator:j,waitUntil:c.waitUntil,isMinimalMode:S});if(!J)return null;if((null==k||null==(h=k.value)?void 0:h.kind)!==u.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==k||null==(i=k.value)?void 0:i.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});S||b.setHeader("x-nextjs-cache",D?"REVALIDATED":k.isMiss?"MISS":k.isStale?"STALE":"HIT"),A&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let l=(0,q.fromNodeOutgoingHttpHeaders)(k.value.headers);return S&&J||l.delete(s.NEXT_CACHE_TAGS_HEADER),!k.cacheControl||b.getHeader("Cache-Control")||l.get("Cache-Control")||l.set("Cache-Control",(0,r.getCacheControlHeader)(k.cacheControl)),await (0,p.I)(V,W,new Response(k.value.body,{headers:l,status:k.value.status||200})),null};R&&Q?await h(Q):(e=P.getActiveScopeSpan(),await P.withPropagatedContext(a.headers,()=>P.trace(n.BaseServerSpan.handleRequest,{spanName:`${O} ${d}`,kind:i.SpanKind.SERVER,attributes:{"http.method":O,"http.target":a.url}},h),void 0,!R))}catch(b){if(b instanceof t.NoFallbackError||await z.onRequestError(a,b,{routerKind:"App Router",routePath:I,routeType:"route",revalidateReason:(0,o.c)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),J)throw b;return await (0,p.I)(V,W,new Response(null,{status:500})),null}}d()}catch(a){d(a)}})},4573:a=>{"use strict";a.exports=require("node:buffer")},8102:(a,b,c)=>{"use strict";c.d(b,{$:()=>g});var d=c(55511),e=c(29021),f=c(33873);function g(a,b){let c=(0,f.dirname)(a),g=(0,f.join)(c,`.${(0,f.basename)(a)}-${(0,d.randomUUID)()}.tmp`),h=!1;try{(0,e.writeFileSync)(g,b,{encoding:"utf8",flag:"wx",mode:384,flush:!0}),(0,e.renameSync)(g,a)}catch(a){throw h=!0,a}finally{try{(0,e.unlinkSync)(g)}catch(a){if("ENOENT"!==a.code&&!h)throw a}}}},10846:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},16698:a=>{"use strict";a.exports=require("node:async_hooks")},29021:a=>{"use strict";a.exports=require("fs")},29294:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},32467:a=>{"use strict";a.exports=require("node:http2")},33873:a=>{"use strict";a.exports=require("path")},34589:a=>{"use strict";a.exports=require("node:assert")},37067:a=>{"use strict";a.exports=require("node:http")},37540:a=>{"use strict";a.exports=require("node:console")},37830:a=>{"use strict";a.exports=require("node:stream/web")},38522:a=>{"use strict";a.exports=require("node:zlib")},40610:a=>{"use strict";a.exports=require("node:dns")},41692:a=>{"use strict";a.exports=require("node:tls")},41792:a=>{"use strict";a.exports=require("node:querystring")},44870:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},51455:a=>{"use strict";a.exports=require("node:fs/promises")},53053:a=>{"use strict";a.exports=require("node:diagnostics_channel")},55511:a=>{"use strict";a.exports=require("crypto")},57075:a=>{"use strict";a.exports=require("node:stream")},57975:a=>{"use strict";a.exports=require("node:util")},63033:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},73136:a=>{"use strict";a.exports=require("node:url")},73429:a=>{"use strict";a.exports=require("node:util/types")},75430:a=>{"use strict";a.exports=import("@earendil-works/pi-coding-agent")},75919:a=>{"use strict";a.exports=require("node:worker_threads")},76760:a=>{"use strict";a.exports=require("node:path")},77030:a=>{"use strict";a.exports=require("node:net")},77598:a=>{"use strict";a.exports=require("node:crypto")},78335:()=>{},78474:a=>{"use strict";a.exports=require("node:events")},79868:a=>{"use strict";a.exports=require("node:sqlite")},80924:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{POST:()=>j,dynamic:()=>k});var e=c(23211),f=c(78474),g=c(87831),h=c(47774),i=a([g]);g=(i.then?(await i)():i)[0];let k="force-dynamic";async function j(){let a=(0,g.li)();if(!a.enabled)return e.NextResponse.json({success:!1,error:"Proxy is disabled"},{status:400});if(!(0,g.iV)(a))return e.NextResponse.json({success:!1,error:"Proxy URL is invalid (missing host or port)"},{status:400});let b=Date.now();try{let a=new h.J2({allowH2:!1,bodyTimeout:1e4,headersTimeout:1e4});a instanceof f.EventEmitter&&f.EventEmitter.prototype.on.call(a,"error",()=>{});let c=new AbortController,d=setTimeout(()=>c.abort(),1e4);try{let{statusCode:d,body:f}=await h.Em("https://api.github.com",{dispatcher:a,signal:c.signal,headers:{"User-Agent":"pi-web-proxy-test"}}),g=await f.text();if(d>=400){let a=g.slice(0,200);return e.NextResponse.json({success:!1,error:`HTTP ${d}${a?": "+a:""}`,latencyMs:Date.now()-b})}let i=Date.now()-b;return e.NextResponse.json({success:!0,latencyMs:i,status:d})}finally{clearTimeout(d)}}catch(c){let a=c instanceof Error?c.message:String(c);return c instanceof DOMException&&"TimeoutError"===c.name&&(a="Test timed out after 10000ms"),e.NextResponse.json({success:!1,error:a,latencyMs:Date.now()-b})}}d()}catch(a){d(a)}})},86439:a=>{"use strict";a.exports=require("next/dist/shared/lib/no-fallback-error.external")},87831:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.d(b,{IA:()=>m,iV:()=>n,li:()=>l,m4:()=>o});var e=c(29021),f=c(33873),g=c(75430),h=c(8102),i=a([g]);g=(i.then?(await i)():i)[0];let p="proxy",q=["http","https","socks5"];function j(){return(0,f.join)((0,g.getAgentDir)(),"settings.json")}function k(){let a=j();if(!(0,e.existsSync)(a))return{};try{let b=JSON.parse((0,e.readFileSync)(a,"utf8"));return null===b||"object"!=typeof b||Array.isArray(b)?{}:b}catch{return{}}}function l(){let a=k()[p],b={enabled:!1,protocol:"http",host:"127.0.0.1",port:7890,username:"",password:"",noProxy:"localhost,127.0.0.1,.local"};if(!a||"object"!=typeof a||Array.isArray(a))return b;let c=q.includes(a.protocol)?a.protocol:b.protocol,d=Number(a.port),e=Number.isInteger(d)&&d>=1&&d<=65535;return{enabled:"boolean"==typeof a.enabled?a.enabled:b.enabled,protocol:c,host:"string"==typeof a.host&&a.host.length>0?a.host:b.host,port:e?d:b.port,username:"string"==typeof a.username?a.username:"",password:"string"==typeof a.password?a.password:"",noProxy:"string"==typeof a.noProxy?a.noProxy:b.noProxy}}function m(a){let b=k();b[p]=a,(0,h.$)(j(),JSON.stringify(b,null,2))}function n(a){if(!a.enabled||!a.host||!a.port)return null;let b="";if(a.username){let c=encodeURIComponent(a.username);b=a.password?`${c}:${encodeURIComponent(a.password)}@`:`${c}@`}return`${a.protocol}://${b}${a.host}:${a.port}`}function o(a){let b=n(a);b?(process.env.HTTP_PROXY=b,process.env.HTTPS_PROXY=b,process.env.NO_PROXY=a.noProxy||""):(delete process.env.HTTP_PROXY,delete process.env.HTTPS_PROXY,process.env.NO_PROXY="")}d()}catch(a){d(a)}})},87997:a=>{"use strict";a.exports=require("node:timers")},96487:()=>{}};var b=require("../../../../webpack-runtime.js");b.C(a);var c=b.X(0,[4741,1813,7774],()=>b(b.s=3373));module.exports=c})();
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";(()=>{var a={};a.id=2835,a.ids=[2835],a.modules={261:a=>{a.exports=require("next/dist/shared/lib/router/utils/app-paths")},3295:a=>{a.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},10846:a=>{a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},12412:a=>{a.exports=require("assert")},25846:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{POST:()=>m});var e=c(23211),f=c(79495),g=c(67264),h=c(66544),i=c(7859),j=c(56429),k=c(40402),l=a([f,i,j,k]);async function m(a,{params:b}){if(!(0,h.EN)(a))return e.NextResponse.json({error:"Access denied"},{status:403});let{id:c}=await b;try{let a=await (0,k.os)(c);if(!a)return e.NextResponse.json({error:"Session not found"},{status:404});let b=(0,j.A4)(c),{session:d}=b?.isAlive()?{session:b}:await (0,j.OF)(c,a,void 0),h=function(a){let b=(0,i.YB)();if(!b)return;let c=b.indexOf("/");if(c<=0||c===b.length-1)return;let d=b.slice(0,c),e=b.slice(c+1);return a.modelRuntime.getModel(d,e)}(d.inner),l=await (0,f.gp)(d.inner,h);if(!d.isAlive())return e.NextResponse.json({error:"The session was closed while its title was being generated. Please try again."},{status:409});return d.inner.setSessionName((0,g.CS)(l.title)),(0,k.mD)(),e.NextResponse.json({title:(0,g.CS)(l.title),usage:l.usage??null})}catch(a){return e.NextResponse.json({error:a instanceof Error?a.message:String(a)},{status:500})}}[f,i,j,k]=l.then?(await l)():l,d()}catch(a){d(a)}})},27910:a=>{a.exports=require("stream")},28354:a=>{a.exports=require("util")},29021:a=>{a.exports=require("fs")},29294:a=>{a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},29862:a=>{a.exports=import("@earendil-works/pi-tui")},33873:a=>{a.exports=require("path")},44870:a=>{a.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},55511:a=>{a.exports=require("crypto")},63033:a=>{a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},66544:(a,b,c)=>{c.d(b,{E2:()=>k,EN:()=>j});var d=c(77030);function e(a){return(a.startsWith("[")&&a.endsWith("]")?a.slice(1,-1):a).toLowerCase().replace(/\.$/,"")}function f(a){if(!a||/[\s/@\\]/.test(a))return null;try{let b=new URL(`http://${a}`);if(b.username||b.password||"/"!==b.pathname||b.search||b.hash)return null;return e(b.hostname)}catch{return null}}function g(){return[process.env.PI_WEB_HOSTNAME,...process.env.PI_WEB_ALLOWED_HOSTS?.split(",")??[]].filter(a=>!!a?.trim())}function h(a){try{return new URL(a).origin}catch{return null}}let i=new Set(["POST","PUT","PATCH","DELETE"]);function j(a,b=g()){return!!function(a,b=g()){let c=a.headers.get("host"),h=c?f(c):null;return!!h&&(!!("localhost"===h||h.endsWith(".localhost")||(0,d.isIP)(h))||b.some(a=>{let b;return((b=a?.trim())?(0,d.isIP)(b)?e(b):f(b):null)===h}))}(a,b)&&(!!function(a){if("GET"!==a.method||"navigate"!==a.headers.get("sec-fetch-mode")||"document"!==a.headers.get("sec-fetch-dest")||"?1"!==a.headers.get("sec-fetch-user"))return!1;try{return/^\/api\/sessions\/[^/]+\/export$/.test(new URL(a.url).pathname)}catch{return!1}}(a)||(a.headers.has("origin")||a.headers.has("sec-fetch-site")?function(a){let b,c;if("cross-site"===a.headers.get("sec-fetch-site"))return!1;let d=a.headers.get("origin");if(!d)return!0;let e=(b=new URL(a.url),(c=a.headers.get("host"))?h(`${b.protocol}//${c}`):null);return null!==e&&h(d)===e}(a):!i.has((a.method??"GET").toUpperCase())))}function k(a){let b=a.headers.get("content-type")?.split(";",1)[0]?.trim().toLowerCase();return"application/json"===b||!!(b?.startsWith("application/")&&b.endsWith("+json"))}},73024:a=>{a.exports=require("node:fs")},75430:a=>{a.exports=import("@earendil-works/pi-coding-agent")},76760:a=>{a.exports=require("node:path")},77030:a=>{a.exports=require("node:net")},79495:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.d(b,{gp:()=>j});var e=c(86123),f=c(67264),g=a([e]);e=(g.then?(await g)():g)[0];let k=`Create a concise title for this session based on the conversation above.
|
|
1
|
+
"use strict";(()=>{var a={};a.id=2835,a.ids=[2835],a.modules={261:a=>{a.exports=require("next/dist/shared/lib/router/utils/app-paths")},3295:a=>{a.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},10846:a=>{a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},12412:a=>{a.exports=require("assert")},25846:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{POST:()=>m});var e=c(23211),f=c(79495),g=c(67264),h=c(66544),i=c(7859),j=c(56429),k=c(40402),l=a([f,i,j,k]);async function m(a,{params:b}){if(!(0,h.EN)(a))return e.NextResponse.json({error:"Access denied"},{status:403});let{id:c}=await b;try{let a=await (0,k.os)(c);if(!a)return e.NextResponse.json({error:"Session not found"},{status:404});let b=(0,j.A4)(c),{session:d}=b?.isAlive()?{session:b}:await (0,j.OF)(c,a,void 0),h=function(a){let b=(0,i.YB)();if(!b)return;let c=b.indexOf("/");if(c<=0||c===b.length-1)return;let d=b.slice(0,c),e=b.slice(c+1);return a.modelRuntime.getModel(d,e)}(d.inner),l=await (0,f.gp)(d.inner,h);if(!d.isAlive())return e.NextResponse.json({error:"The session was closed while its title was being generated. Please try again."},{status:409});return d.inner.setSessionName((0,g.CS)(l.title)),(0,k.mD)(),e.NextResponse.json({title:(0,g.CS)(l.title),usage:l.usage??null})}catch(a){return e.NextResponse.json({error:a instanceof Error?a.message:String(a)},{status:500})}}[f,i,j,k]=l.then?(await l)():l,d()}catch(a){d(a)}})},27910:a=>{a.exports=require("stream")},28354:a=>{a.exports=require("util")},29021:a=>{a.exports=require("fs")},29294:a=>{a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},29862:a=>{a.exports=import("@earendil-works/pi-tui")},31421:a=>{a.exports=require("node:child_process")},33873:a=>{a.exports=require("path")},44870:a=>{a.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},55511:a=>{a.exports=require("crypto")},63033:a=>{a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},66544:(a,b,c)=>{c.d(b,{E2:()=>k,EN:()=>j});var d=c(77030);function e(a){return(a.startsWith("[")&&a.endsWith("]")?a.slice(1,-1):a).toLowerCase().replace(/\.$/,"")}function f(a){if(!a||/[\s/@\\]/.test(a))return null;try{let b=new URL(`http://${a}`);if(b.username||b.password||"/"!==b.pathname||b.search||b.hash)return null;return e(b.hostname)}catch{return null}}function g(){return[process.env.PI_WEB_HOSTNAME,...process.env.PI_WEB_ALLOWED_HOSTS?.split(",")??[]].filter(a=>!!a?.trim())}function h(a){try{return new URL(a).origin}catch{return null}}let i=new Set(["POST","PUT","PATCH","DELETE"]);function j(a,b=g()){return!!function(a,b=g()){let c=a.headers.get("host"),h=c?f(c):null;return!!h&&(!!("localhost"===h||h.endsWith(".localhost")||(0,d.isIP)(h))||b.some(a=>{let b;return((b=a?.trim())?(0,d.isIP)(b)?e(b):f(b):null)===h}))}(a,b)&&(!!function(a){if("GET"!==a.method||"navigate"!==a.headers.get("sec-fetch-mode")||"document"!==a.headers.get("sec-fetch-dest")||"?1"!==a.headers.get("sec-fetch-user"))return!1;try{return/^\/api\/sessions\/[^/]+\/export$/.test(new URL(a.url).pathname)}catch{return!1}}(a)||(a.headers.has("origin")||a.headers.has("sec-fetch-site")?function(a){let b,c;if("cross-site"===a.headers.get("sec-fetch-site"))return!1;let d=a.headers.get("origin");if(!d)return!0;let e=(b=new URL(a.url),(c=a.headers.get("host"))?h(`${b.protocol}//${c}`):null);return null!==e&&h(d)===e}(a):!i.has((a.method??"GET").toUpperCase())))}function k(a){let b=a.headers.get("content-type")?.split(";",1)[0]?.trim().toLowerCase();return"application/json"===b||!!(b?.startsWith("application/")&&b.endsWith("+json"))}},73024:a=>{a.exports=require("node:fs")},75430:a=>{a.exports=import("@earendil-works/pi-coding-agent")},76760:a=>{a.exports=require("node:path")},77030:a=>{a.exports=require("node:net")},78829:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{handler:()=>y,patchFetch:()=>x,routeModule:()=>z,serverHooks:()=>C,workAsyncStorage:()=>A,workUnitAsyncStorage:()=>B});var e=c(19225),f=c(84006),g=c(8317),h=c(99373),i=c(34775),j=c(24235),k=c(261),l=c(54365),m=c(90771),n=c(73461),o=c(67798),p=c(92280),q=c(62018),r=c(45696),s=c(47929),t=c(86439),u=c(37527),v=c(25846),w=a([v]);v=(w.then?(await w)():w)[0];let z=new e.AppRouteRouteModule({definition:{kind:f.RouteKind.APP_ROUTE,page:"/api/sessions/[id]/auto-name/route",pathname:"/api/sessions/[id]/auto-name",filename:"route",bundlePath:"app/api/sessions/[id]/auto-name/route"},distDir:".next",relativeProjectDir:"",resolvedPagePath:"/Volumes/1T 原装/项目研发/pi-web-QT/app/api/sessions/[id]/auto-name/route.ts",nextConfigOutput:"",userland:v,...{}}),{workAsyncStorage:A,workUnitAsyncStorage:B,serverHooks:C}=z;function x(){return(0,g.patchFetch)({workAsyncStorage:A,workUnitAsyncStorage:B})}async function y(a,b,c){c.requestMeta&&(0,h.setRequestMeta)(a,c.requestMeta),z.isDev&&(0,h.addRequestMeta)(a,"devRequestTimingInternalsEnd",process.hrtime.bigint());let d="/api/sessions/[id]/auto-name/route";"/index"===d&&(d="/");let e=await z.prepare(a,b,{srcPage:d,multiZoneDraftMode:!1});if(!e)return b.statusCode=400,b.end("Bad Request"),null==c.waitUntil||c.waitUntil.call(c,Promise.resolve()),null;let{buildId:g,deploymentId:v,params:w,nextConfig:x,parsedUrl:y,isDraftMode:A,prerenderManifest:B,routerServerContext:C,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,resolvedPathname:F,clientReferenceManifest:G,serverActionsManifest:H}=e,I=(0,k.normalizeAppPath)(d),J=!!(B.dynamicRoutes[I]||B.routes[F]),K=async()=>((null==C?void 0:C.render404)?await C.render404(a,b,y,!1):b.end("This page could not be found"),null);if(J&&!A){let a=!!B.routes[F],b=B.dynamicRoutes[I];if(b&&!1===b.fallback&&!a){if(x.adapterPath)return await K();throw new t.NoFallbackError}}let L=null;!J||z.isDev||A||(L=F,L="/index"===L?"/":L);let M=!0===z.isDev||!J,N=J&&!M;H&&G&&(0,j.setManifestsSingleton)({page:d,clientReferenceManifest:G,serverActionsManifest:H});let O=a.method||"GET",P=(0,i.getTracer)(),Q=P.getActiveScopeSpan(),R=!!(null==C?void 0:C.isWrappedByNextServer),S=!!(0,h.getRequestMeta)(a,"minimalMode"),T=(0,h.getRequestMeta)(a,"incrementalCache")||await z.getIncrementalCache(a,x,B,S);null==T||T.resetRequestCache(),globalThis.__incrementalCache=T;let U={params:w,previewProps:B.preview,renderOpts:{experimental:{authInterrupts:!!x.experimental.authInterrupts},cacheComponents:!!x.cacheComponents,supportsDynamicResponse:M,incrementalCache:T,cacheLifeProfiles:x.cacheLife,waitUntil:c.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:void 0,onInstrumentationRequestError:(b,c,d,e)=>z.onRequestError(a,b,d,e,C)},sharedContext:{buildId:g,deploymentId:v}},V=new l.NodeNextRequest(a),W=new l.NodeNextResponse(b),X=m.NextRequestAdapter.fromNodeNextRequest(V,(0,m.signalFromNodeResponse)(b));try{let e,g=async a=>z.handle(X,U).finally(()=>{if(!a)return;a.setAttributes({"http.status_code":b.statusCode,"next.rsc":!1});let c=P.getRootSpanAttributes();if(!c)return;if(c.get("next.span_type")!==n.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${c.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let f=c.get("next.route");if(f){let b=`${O} ${f}`;a.setAttributes({"next.route":f,"http.route":f,"next.span_name":b}),a.updateName(b),e&&e!==a&&(e.setAttribute("http.route",f),e.updateName(b))}else a.updateName(`${O} ${d}`)}),h=async e=>{var h,i;let j=async({previousCacheEntry:f})=>{try{if(!S&&D&&E&&!f)return b.statusCode=404,b.setHeader("x-nextjs-cache","REVALIDATED"),b.end("This page could not be found"),null;let d=await g(e);a.fetchMetrics=U.renderOpts.fetchMetrics;let h=U.renderOpts.pendingWaitUntil;h&&c.waitUntil&&(c.waitUntil(h),h=void 0);let i=U.renderOpts.collectedTags;if(!J)return await (0,p.I)(V,W,d,U.renderOpts.pendingWaitUntil),null;{let a=await d.blob(),b=(0,q.toNodeOutgoingHttpHeaders)(d.headers);i&&(b[s.NEXT_CACHE_TAGS_HEADER]=i),!b["content-type"]&&a.type&&(b["content-type"]=a.type);let c=void 0!==U.renderOpts.collectedRevalidate&&!(U.renderOpts.collectedRevalidate>=s.INFINITE_CACHE)&&U.renderOpts.collectedRevalidate,e=void 0===U.renderOpts.collectedExpire||U.renderOpts.collectedExpire>=s.INFINITE_CACHE?void 0:U.renderOpts.collectedExpire;return{value:{kind:u.CachedRouteKind.APP_ROUTE,status:d.status,body:Buffer.from(await a.arrayBuffer()),headers:b},cacheControl:{revalidate:c,expire:e}}}}catch(b){throw(null==f?void 0:f.isStale)&&await z.onRequestError(a,b,{routerKind:"App Router",routePath:d,routeType:"route",revalidateReason:(0,o.c)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),b}},k=await z.handleResponse({req:a,nextConfig:x,cacheKey:L,routeKind:f.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:B,isRoutePPREnabled:!1,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,responseGenerator:j,waitUntil:c.waitUntil,isMinimalMode:S});if(!J)return null;if((null==k||null==(h=k.value)?void 0:h.kind)!==u.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==k||null==(i=k.value)?void 0:i.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});S||b.setHeader("x-nextjs-cache",D?"REVALIDATED":k.isMiss?"MISS":k.isStale?"STALE":"HIT"),A&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let l=(0,q.fromNodeOutgoingHttpHeaders)(k.value.headers);return S&&J||l.delete(s.NEXT_CACHE_TAGS_HEADER),!k.cacheControl||b.getHeader("Cache-Control")||l.get("Cache-Control")||l.set("Cache-Control",(0,r.getCacheControlHeader)(k.cacheControl)),await (0,p.I)(V,W,new Response(k.value.body,{headers:l,status:k.value.status||200})),null};R&&Q?await h(Q):(e=P.getActiveScopeSpan(),await P.withPropagatedContext(a.headers,()=>P.trace(n.BaseServerSpan.handleRequest,{spanName:`${O} ${d}`,kind:i.SpanKind.SERVER,attributes:{"http.method":O,"http.target":a.url}},h),void 0,!R))}catch(b){if(b instanceof t.NoFallbackError||await z.onRequestError(a,b,{routerKind:"App Router",routePath:I,routeType:"route",revalidateReason:(0,o.c)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),J)throw b;return await (0,p.I)(V,W,new Response(null,{status:500})),null}}d()}catch(a){d(a)}})},79495:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.d(b,{gp:()=>j});var e=c(86123),f=c(67264),g=a([e]);e=(g.then?(await g)():g)[0];let k=`Create a concise title for this session based on the conversation above.
|
|
2
2
|
|
|
3
3
|
Requirements:
|
|
4
4
|
- Match the primary language used by the user.
|
|
@@ -7,4 +7,4 @@ Requirements:
|
|
|
7
7
|
- Do not call any tools.
|
|
8
8
|
- Return only the title as plain text, with no quotes, label, markdown, or explanation.`;function h(a){let b=a.content;if(!Array.isArray(b))return a;let c=i(b);return c===b?a:{...a,content:c}}function i(a){let b=!1,c=a.map(a=>"text"===a.type&&"string"!=typeof a.text?(b=!0,{...a,text:""}):a);return b?c:a}async function j(a,b){var c,d;let g,j,l,m=a.agent;await Promise.race([m.waitForIdle(),new Promise(a=>setTimeout(a,1e4))]);let n=m.state.messages,o=n.length>40?n.slice(n.length-40):n;o.some(a=>"user"===a.role)||(o=n);let p=(d=function(a){let b,c=[];for(let d=0;d<a.length;d++){let e=a[d];if("assistant"===e.role){let f=new Set;for(let b=d+1;b<a.length;b++){let c=a[b];if("toolResult"!==c.role)break;f.add(c.toolCallId)}b=new Set;let g=e.content.filter(a=>"toolCall"!==a.type||!!f.has(a.id)&&(b.add(a.id),!0));g.length>0&&c.push({...e,content:i(g)});continue}if("toolResult"===e.role){b?.delete(e.toolCallId)&&c.push(h(e));continue}b=void 0,c.push(h(e))}return c}(o),l=0,d.map(a=>{let b=a.content;if(!Array.isArray(b))return a;let c=!1,d=b.map(a=>{if(a&&"object"==typeof a&&"text"===a.type){let b="string"==typeof a.text?a.text:"";if(b.length>600){c=!0;let d=b.slice(0,600)+"\n…[truncated]";return l+=d.length,{...a,text:d}}l+=b.length}return a});return c?{...a,content:d}:a}).map(a=>{if(l<=8e3)return a;let b=a.content;if(!Array.isArray(b))return a;let c=8e3,d=!1,e=b.map(a=>{if(a&&"object"==typeof a&&"text"===a.type){let b="string"==typeof a.text?a.text:"";if(b.length<=c)return c-=b.length,a;if(c<=0)return d=!0,{...a,text:""};d=!0;let e=b.slice(0,c);return c=0,{...a,text:e}}return a});return d?{...a,content:e}:a})),q=p.length;if(!p.some(a=>"user"===a.role||"custom"===a.role&&"compaction"===a.customType))throw Error("The session has no user messages to name");let r={initialState:{systemPrompt:(g=(c=m).state).systemPrompt,model:g.model,thinkingLevel:g.thinkingLevel,tools:g.tools.map(a=>({...a,execute:async()=>{throw Error("Tools cannot be executed while generating a session title")}})),messages:g.messages},convertToLlm:c.convertToLlm,transformContext:c.transformContext,streamFn:c.streamFunction,getApiKey:c.getApiKey,onPayload:c.onPayload,onResponse:c.onResponse,steeringMode:c.steeringMode,followUpMode:c.followUpMode,sessionId:c.sessionId,thinkingBudgets:c.thinkingBudgets,transport:c.transport,maxRetryDelayMs:c.maxRetryDelayMs,toolExecution:c.toolExecution};b&&(r.initialState.model=b),r.initialState.messages=p;let s=p.at(-1)?.role==="user";s&&(r.initialState.messages=function(a){let b=a.at(-1);if(!b||"user"!==b.role)return a;let c="string"==typeof b.content?`${b.content}
|
|
9
9
|
|
|
10
|
-
${k}`:[...b.content,{type:"text",text:k}];return[...a.slice(0,-1),{...b,content:c}]}(p));let t=new e.Agent(r),u=s?t.continue():t.prompt(k);try{await Promise.race([u,new Promise((a,b)=>{j=setTimeout(()=>{t.abort(),b(Error("Session title generation timed out"))},8e4)})])}catch(a){throw t.abort(),await u.catch(()=>{}),a}finally{j&&clearTimeout(j)}let v=t.state.messages.slice(q);for(let a=v.length-1;a>=0;a--){let b=v[a];if("assistant"!==b.role)continue;if("error"===b.stopReason)throw Error(b.errorMessage||"The title model request failed");let c=b.content.filter(a=>"text"===a.type).map(a=>a.text).join("\n").trim();if(c)return{title:function(a){let b=a.trim(),c=b.match(/^```(?:json|text)?\s*([\s\S]*?)\s*```$/i);if(c&&(b=c[1].trim()),b.startsWith("{"))try{let a=JSON.parse(b);"string"==typeof a.title&&(b=a.title.trim())}catch{}if(b=(b=b.split(/\r?\n/,1)[0]??"").replace(/^(?:session\s+title|title|标题)\s*[::-]\s*/i,""),b=(b=(function(a){for(let[b,c]of[['"','"'],["'","'"],["`","`"],["“","”"],["「","」"],["『","』"]])if(a.startsWith(b)&&a.endsWith(c)&&a.length>b.length+c.length)return a.slice(b.length,-c.length).trim();return a})(b).replace(/\s+/g," ").trim()).replace(/[。.!]+$/u,"").trim(),b=(0,f.CS)(b),!/[\p{L}\p{N}]/u.test(b))throw Error("The model did not return a usable session title");let d=Array.from(b);return d.length>80&&(b=d.slice(0,80).join("").trim()),b}(c),...b.usage?{usage:{input:b.usage.input,output:b.usage.output,cacheRead:b.usage.cacheRead,cacheWrite:b.usage.cacheWrite,total:b.usage.totalTokens}}:{}}}throw Error("The model did not return a session title")}d()}catch(a){d(a)}})},79646:a=>{a.exports=require("child_process")},81115:a=>{a.exports=require("constants")},86123:a=>{a.exports=import("@earendil-works/pi-agent-core")},86439:a=>{a.exports=require("next/dist/shared/lib/no-fallback-error.external")},
|
|
10
|
+
${k}`:[...b.content,{type:"text",text:k}];return[...a.slice(0,-1),{...b,content:c}]}(p));let t=new e.Agent(r),u=s?t.continue():t.prompt(k);try{await Promise.race([u,new Promise((a,b)=>{j=setTimeout(()=>{t.abort(),b(Error("Session title generation timed out"))},8e4)})])}catch(a){throw t.abort(),await u.catch(()=>{}),a}finally{j&&clearTimeout(j)}let v=t.state.messages.slice(q);for(let a=v.length-1;a>=0;a--){let b=v[a];if("assistant"!==b.role)continue;if("error"===b.stopReason)throw Error(b.errorMessage||"The title model request failed");let c=b.content.filter(a=>"text"===a.type).map(a=>a.text).join("\n").trim();if(c)return{title:function(a){let b=a.trim(),c=b.match(/^```(?:json|text)?\s*([\s\S]*?)\s*```$/i);if(c&&(b=c[1].trim()),b.startsWith("{"))try{let a=JSON.parse(b);"string"==typeof a.title&&(b=a.title.trim())}catch{}if(b=(b=b.split(/\r?\n/,1)[0]??"").replace(/^(?:session\s+title|title|标题)\s*[::-]\s*/i,""),b=(b=(function(a){for(let[b,c]of[['"','"'],["'","'"],["`","`"],["“","”"],["「","」"],["『","』"]])if(a.startsWith(b)&&a.endsWith(c)&&a.length>b.length+c.length)return a.slice(b.length,-c.length).trim();return a})(b).replace(/\s+/g," ").trim()).replace(/[。.!]+$/u,"").trim(),b=(0,f.CS)(b),!/[\p{L}\p{N}]/u.test(b))throw Error("The model did not return a usable session title");let d=Array.from(b);return d.length>80&&(b=d.slice(0,80).join("").trim()),b}(c),...b.usage?{usage:{input:b.usage.input,output:b.usage.output,cacheRead:b.usage.cacheRead,cacheWrite:b.usage.cacheWrite,total:b.usage.totalTokens}}:{}}}throw Error("The model did not return a session title")}d()}catch(a){d(a)}})},79646:a=>{a.exports=require("child_process")},81115:a=>{a.exports=require("constants")},86123:a=>{a.exports=import("@earendil-works/pi-agent-core")},86439:a=>{a.exports=require("next/dist/shared/lib/no-fallback-error.external")},94735:a=>{a.exports=require("events")}};var b=require("../../../../../webpack-runtime.js");b.C(a);var c=b.X(0,[4741,1813,974,4229,5582,6429],()=>b(b.s=78829));module.exports=c})();
|