@baique/pi-web-sky 0.1.54 → 0.1.56
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 +14 -10
- package/.next/build-manifest.json +4 -4
- package/.next/next-server.js.nft.json +1 -1
- package/.next/prerender-manifest.json +6 -6
- package/.next/react-loadable-manifest.json +3 -3
- package/.next/required-server-files.js +6 -6
- package/.next/required-server-files.json +6 -6
- package/.next/routes-manifest.json +28 -0
- package/.next/server/app/_global-error/page.js +2 -2
- package/.next/server/app/_global-error/page_client-reference-manifest.js +1 -1
- package/.next/server/app/_global-error.html +1 -1
- package/.next/server/app/_global-error.rsc +1 -1
- package/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/_not-found/page.js +1 -1
- package/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/.next/server/app/_not-found.html +1 -1
- package/.next/server/app/_not-found.rsc +4 -3
- package/.next/server/app/_not-found.segments/_full.segment.rsc +4 -3
- package/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +4 -3
- package/.next/server/app/_not-found.segments/_tree.segment.rsc +3 -2
- package/.next/server/app/api/agent/[id]/bash-output/route.js +2 -2
- package/.next/server/app/api/agent/[id]/bash-output/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/agent/[id]/events/route.js +2 -2
- package/.next/server/app/api/agent/[id]/events/route.js.nft.json +1 -1
- package/.next/server/app/api/agent/[id]/events/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/agent/[id]/route.js +1 -1
- package/.next/server/app/api/agent/[id]/route.js.nft.json +1 -1
- package/.next/server/app/api/agent/[id]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/agent/new/route.js +1 -1
- package/.next/server/app/api/agent/new/route.js.nft.json +1 -1
- package/.next/server/app/api/agent/new/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/agent/running/route.js +1 -1
- package/.next/server/app/api/agent/running/route.js.nft.json +1 -1
- package/.next/server/app/api/agent/running/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/app-update/route.js +1 -1
- package/.next/server/app/api/app-update/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/auth/all-providers/route.js +1 -1
- package/.next/server/app/api/auth/all-providers/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/auth/api-key/[provider]/route.js +1 -1
- package/.next/server/app/api/auth/api-key/[provider]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/auth/login/[provider]/route.js +1 -1
- package/.next/server/app/api/auth/login/[provider]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/auth/logout/[provider]/route.js +1 -1
- package/.next/server/app/api/auth/logout/[provider]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/auth/providers/route.js +1 -1
- package/.next/server/app/api/auth/providers/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/board-assets/[...path]/route.js +2 -2
- package/.next/server/app/api/board-assets/[...path]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/board-assets/route.js +2 -2
- package/.next/server/app/api/board-assets/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/boards/[id]/add-session/route.js +1 -0
- package/.next/server/app/api/boards/[id]/add-session/route.js.nft.json +1 -0
- package/.next/server/app/api/boards/[id]/add-session/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/boards/[id]/reconcile/route.js +1 -1
- package/.next/server/app/api/boards/[id]/reconcile/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/boards/[id]/route.js +1 -1
- package/.next/server/app/api/boards/[id]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/boards/reorder/route.js +2 -2
- package/.next/server/app/api/boards/reorder/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/boards/route.js +2 -2
- package/.next/server/app/api/boards/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/cwd/browse/route.js +1 -1
- package/.next/server/app/api/cwd/browse/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/cwd/validate/route.js +2 -2
- package/.next/server/app/api/cwd/validate/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/default-cwd/route.js +2 -2
- package/.next/server/app/api/default-cwd/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/file-index/route.js +2 -2
- package/.next/server/app/api/file-index/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/files/[...path]/route.js +3 -3
- package/.next/server/app/api/files/[...path]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/git/diff/route.js +1 -1
- package/.next/server/app/api/git/diff/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/git/status/route.js +1 -1
- package/.next/server/app/api/git/status/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/home/route.js +1 -1
- package/.next/server/app/api/home/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/mcp/route.js +2 -2
- package/.next/server/app/api/mcp/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/models/route.js +2 -2
- package/.next/server/app/api/models/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/models-config/catalog/route.js +1 -1
- package/.next/server/app/api/models-config/catalog/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/models-config/discover/route.js +1 -1
- package/.next/server/app/api/models-config/discover/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/models-config/route.js +1 -1
- package/.next/server/app/api/models-config/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/models-config/test/route.js +1 -1
- package/.next/server/app/api/models-config/test/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/plugins/route.js +2 -2
- package/.next/server/app/api/plugins/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/project-trust/route.js +1 -1
- package/.next/server/app/api/project-trust/route.js.nft.json +1 -1
- package/.next/server/app/api/project-trust/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/quota/route.js +1 -1
- package/.next/server/app/api/quota/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/search/route.js +2 -2
- package/.next/server/app/api/search/route_client-reference-manifest.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]/auto-name/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/sessions/[id]/context/route.js +1 -1
- package/.next/server/app/api/sessions/[id]/context/route.js.nft.json +1 -1
- package/.next/server/app/api/sessions/[id]/context/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/sessions/[id]/entries/[entryId]/thinking/route.js +2 -2
- package/.next/server/app/api/sessions/[id]/entries/[entryId]/thinking/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/sessions/[id]/export/route.js +3 -3
- package/.next/server/app/api/sessions/[id]/export/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/sessions/[id]/minimap/route.js +1 -1
- package/.next/server/app/api/sessions/[id]/minimap/route.js.nft.json +1 -1
- package/.next/server/app/api/sessions/[id]/minimap/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/sessions/[id]/route.js +1 -1
- package/.next/server/app/api/sessions/[id]/route.js.nft.json +1 -1
- package/.next/server/app/api/sessions/[id]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/sessions/[id]/state/route.js +1 -1
- package/.next/server/app/api/sessions/[id]/state/route.js.nft.json +1 -1
- package/.next/server/app/api/sessions/[id]/state/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/sessions/[id]/todos/route.js +1 -1
- package/.next/server/app/api/sessions/[id]/todos/route.js.nft.json +1 -1
- package/.next/server/app/api/sessions/[id]/todos/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/sessions/route.js +1 -1
- package/.next/server/app/api/sessions/route.js.nft.json +1 -1
- package/.next/server/app/api/sessions/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/sessions/summary/route.js +2 -2
- package/.next/server/app/api/sessions/summary/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/skills/check/route.js +1 -1
- package/.next/server/app/api/skills/check/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/skills/install/route.js +2 -2
- package/.next/server/app/api/skills/install/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/skills/route.js +1 -1
- package/.next/server/app/api/skills/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/skills/search/route.js +1 -1
- package/.next/server/app/api/skills/search/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/skills/update/route.js +1 -1
- package/.next/server/app/api/skills/update/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/subagents/[id]/route.js +1 -0
- package/.next/server/app/api/subagents/[id]/route.js.nft.json +1 -0
- package/.next/server/app/api/subagents/[id]/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/subagents/profiles/route.js +30 -0
- package/.next/server/app/api/subagents/profiles/route.js.nft.json +1 -0
- package/.next/server/app/api/subagents/profiles/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/subagents/settings/route.js +1 -0
- package/.next/server/app/api/subagents/settings/route.js.nft.json +1 -0
- package/.next/server/app/api/subagents/settings/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/task-card-questions/[id]/answer/route.js +2 -2
- package/.next/server/app/api/task-card-questions/[id]/answer/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/task-card-questions/route.js +2 -2
- package/.next/server/app/api/task-card-questions/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/task-cards/[id]/route.js +1 -1
- package/.next/server/app/api/task-cards/[id]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/task-cards/route.js +1 -1
- package/.next/server/app/api/task-cards/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/task-cards/unbind/route.js +3 -3
- package/.next/server/app/api/task-cards/unbind/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/task-scheduler/status/route.js +1 -1
- package/.next/server/app/api/task-scheduler/status/route.js.nft.json +1 -1
- package/.next/server/app/api/task-scheduler/status/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/tasks/[id]/assign-session/route.js +12 -12
- package/.next/server/app/api/tasks/[id]/assign-session/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/tasks/[id]/board/route.js +1 -1
- package/.next/server/app/api/tasks/[id]/board/route_client-reference-manifest.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/[id]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/tasks/reorder/route.js +12 -12
- package/.next/server/app/api/tasks/reorder/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/tasks/route.js +12 -12
- package/.next/server/app/api/tasks/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/terminal/[id]/events/route.js +3 -3
- package/.next/server/app/api/terminal/[id]/events/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/terminal/[id]/route.js +2 -2
- package/.next/server/app/api/terminal/[id]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/terminal/route.js +2 -2
- package/.next/server/app/api/terminal/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/route.js +2 -2
- package/.next/server/app/api/worktrees/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/yjs-version/route.js +1 -1
- package/.next/server/app/api/yjs-version/route_client-reference-manifest.js +1 -1
- package/.next/server/app/favicon.ico/route.js +1 -1
- package/.next/server/app/index.html +1 -1
- package/.next/server/app/index.rsc +6 -5
- package/.next/server/app/index.segments/__PAGE__.segment.rsc +6 -5
- package/.next/server/app/index.segments/_full.segment.rsc +6 -5
- package/.next/server/app/index.segments/_tree.segment.rsc +3 -2
- package/.next/server/app/manifest.webmanifest/route.js +2 -2
- package/.next/server/app/manifest.webmanifest/route_client-reference-manifest.js +1 -1
- package/.next/server/app/page.js +175 -8
- package/.next/server/app/page_client-reference-manifest.js +1 -1
- package/.next/server/app-paths-manifest.json +14 -10
- package/.next/server/chunks/1937.js +1 -1
- package/.next/server/chunks/2430.js +4 -4
- package/.next/server/chunks/3500.js +1 -1
- package/.next/server/chunks/402.js +13 -3
- package/.next/server/chunks/426.js +14 -0
- package/.next/server/chunks/4457.js +13 -13
- package/.next/server/chunks/542.js +23 -4
- package/.next/server/chunks/5794.js +2 -2
- package/.next/server/chunks/5940.js +1 -1
- package/.next/server/chunks/6429.js +15 -2
- package/.next/server/chunks/6525.js +12 -2
- package/.next/server/chunks/6583.js +1 -1
- package/.next/server/chunks/7048.js +6 -0
- package/.next/server/instrumentation.js +1 -1
- package/.next/server/middleware-build-manifest.js +1 -1
- package/.next/server/middleware-react-loadable-manifest.js +1 -1
- package/.next/server/middleware.js +3 -3
- package/.next/server/next-font-manifest.js +1 -1
- package/.next/server/next-font-manifest.json +1 -1
- package/.next/server/pages/404.html +1 -1
- package/.next/server/pages/500.html +1 -1
- package/.next/server/server-reference-manifest.json +1 -1
- package/.next/static/chunks/752.adce8bc3ebbaf4b6.js +1 -0
- package/.next/static/chunks/8088.0cad1ff2e09fd8ff.js +1 -0
- package/.next/static/chunks/app/_global-error/page-ad6e695deb9de65c.js +1 -0
- package/.next/static/chunks/app/_not-found/page-63a39396532d2582.js +1 -0
- package/.next/static/chunks/app/api/agent/[id]/bash-output/route-ad6e695deb9de65c.js +1 -0
- package/.next/static/chunks/app/api/agent/[id]/events/route-ad6e695deb9de65c.js +1 -0
- package/.next/static/chunks/app/api/agent/[id]/route-ad6e695deb9de65c.js +1 -0
- package/.next/static/chunks/app/api/agent/new/route-ad6e695deb9de65c.js +1 -0
- package/.next/static/chunks/app/api/agent/running/route-ad6e695deb9de65c.js +1 -0
- package/.next/static/chunks/app/api/app-update/route-ad6e695deb9de65c.js +1 -0
- package/.next/static/chunks/app/api/auth/all-providers/route-ad6e695deb9de65c.js +1 -0
- package/.next/static/chunks/app/api/auth/api-key/[provider]/route-ad6e695deb9de65c.js +1 -0
- package/.next/static/chunks/app/api/auth/login/[provider]/route-ad6e695deb9de65c.js +1 -0
- package/.next/static/chunks/app/api/auth/logout/[provider]/route-ad6e695deb9de65c.js +1 -0
- package/.next/static/chunks/app/api/auth/providers/route-ad6e695deb9de65c.js +1 -0
- package/.next/static/chunks/app/api/board-assets/[...path]/route-ad6e695deb9de65c.js +1 -0
- package/.next/static/chunks/app/api/board-assets/route-ad6e695deb9de65c.js +1 -0
- package/.next/static/chunks/app/api/boards/[id]/add-session/route-ad6e695deb9de65c.js +1 -0
- package/.next/static/chunks/app/api/boards/[id]/reconcile/route-ad6e695deb9de65c.js +1 -0
- package/.next/static/chunks/app/api/boards/[id]/route-ad6e695deb9de65c.js +1 -0
- package/.next/static/chunks/app/api/boards/reorder/route-ad6e695deb9de65c.js +1 -0
- package/.next/static/chunks/app/api/boards/route-ad6e695deb9de65c.js +1 -0
- package/.next/static/chunks/app/api/cwd/browse/route-ad6e695deb9de65c.js +1 -0
- package/.next/static/chunks/app/api/cwd/validate/route-ad6e695deb9de65c.js +1 -0
- package/.next/static/chunks/app/api/default-cwd/route-ad6e695deb9de65c.js +1 -0
- package/.next/static/chunks/app/api/file-index/route-ad6e695deb9de65c.js +1 -0
- package/.next/static/chunks/app/api/files/[...path]/route-ad6e695deb9de65c.js +1 -0
- package/.next/static/chunks/app/api/git/diff/route-ad6e695deb9de65c.js +1 -0
- package/.next/static/chunks/app/api/git/status/route-ad6e695deb9de65c.js +1 -0
- package/.next/static/chunks/app/api/home/route-ad6e695deb9de65c.js +1 -0
- package/.next/static/chunks/app/api/mcp/route-ad6e695deb9de65c.js +1 -0
- package/.next/static/chunks/app/api/models/route-ad6e695deb9de65c.js +1 -0
- package/.next/static/chunks/app/api/models-config/catalog/route-ad6e695deb9de65c.js +1 -0
- package/.next/static/chunks/app/api/models-config/discover/route-ad6e695deb9de65c.js +1 -0
- package/.next/static/chunks/app/api/models-config/route-ad6e695deb9de65c.js +1 -0
- package/.next/static/chunks/app/api/models-config/test/route-ad6e695deb9de65c.js +1 -0
- package/.next/static/chunks/app/api/plugins/route-ad6e695deb9de65c.js +1 -0
- package/.next/static/chunks/app/api/project-trust/route-ad6e695deb9de65c.js +1 -0
- package/.next/static/chunks/app/api/quota/route-ad6e695deb9de65c.js +1 -0
- package/.next/static/chunks/app/api/search/route-ad6e695deb9de65c.js +1 -0
- package/.next/static/chunks/app/api/sessions/[id]/auto-name/route-ad6e695deb9de65c.js +1 -0
- package/.next/static/chunks/app/api/sessions/[id]/context/route-ad6e695deb9de65c.js +1 -0
- package/.next/static/chunks/app/api/sessions/[id]/entries/[entryId]/thinking/route-ad6e695deb9de65c.js +1 -0
- package/.next/static/chunks/app/api/sessions/[id]/export/route-ad6e695deb9de65c.js +1 -0
- package/.next/static/chunks/app/api/sessions/[id]/minimap/route-ad6e695deb9de65c.js +1 -0
- package/.next/static/chunks/app/api/sessions/[id]/route-ad6e695deb9de65c.js +1 -0
- package/.next/static/chunks/app/api/sessions/[id]/state/route-ad6e695deb9de65c.js +1 -0
- package/.next/static/chunks/app/api/sessions/[id]/todos/route-ad6e695deb9de65c.js +1 -0
- package/.next/static/chunks/app/api/sessions/route-ad6e695deb9de65c.js +1 -0
- package/.next/static/chunks/app/api/sessions/summary/route-ad6e695deb9de65c.js +1 -0
- package/.next/static/chunks/app/api/skills/check/route-ad6e695deb9de65c.js +1 -0
- package/.next/static/chunks/app/api/skills/install/route-ad6e695deb9de65c.js +1 -0
- package/.next/static/chunks/app/api/skills/route-ad6e695deb9de65c.js +1 -0
- package/.next/static/chunks/app/api/skills/search/route-ad6e695deb9de65c.js +1 -0
- package/.next/static/chunks/app/api/skills/update/route-ad6e695deb9de65c.js +1 -0
- package/.next/static/chunks/app/api/subagents/[id]/route-ad6e695deb9de65c.js +1 -0
- package/.next/static/chunks/app/api/subagents/profiles/route-ad6e695deb9de65c.js +1 -0
- package/.next/static/chunks/app/api/subagents/settings/route-ad6e695deb9de65c.js +1 -0
- package/.next/static/chunks/app/api/task-card-questions/[id]/answer/route-ad6e695deb9de65c.js +1 -0
- package/.next/static/chunks/app/api/task-card-questions/route-ad6e695deb9de65c.js +1 -0
- package/.next/static/chunks/app/api/task-cards/[id]/route-ad6e695deb9de65c.js +1 -0
- package/.next/static/chunks/app/api/task-cards/route-ad6e695deb9de65c.js +1 -0
- package/.next/static/chunks/app/api/task-cards/unbind/route-ad6e695deb9de65c.js +1 -0
- package/.next/static/chunks/app/api/task-scheduler/status/route-ad6e695deb9de65c.js +1 -0
- package/.next/static/chunks/app/api/tasks/[id]/assign-session/route-ad6e695deb9de65c.js +1 -0
- package/.next/static/chunks/app/api/tasks/[id]/board/route-ad6e695deb9de65c.js +1 -0
- package/.next/static/chunks/app/api/tasks/[id]/route-ad6e695deb9de65c.js +1 -0
- package/.next/static/chunks/app/api/tasks/reorder/route-ad6e695deb9de65c.js +1 -0
- package/.next/static/chunks/app/api/tasks/route-ad6e695deb9de65c.js +1 -0
- package/.next/static/chunks/app/api/terminal/[id]/events/route-ad6e695deb9de65c.js +1 -0
- package/.next/static/chunks/app/api/terminal/[id]/route-ad6e695deb9de65c.js +1 -0
- package/.next/static/chunks/app/api/terminal/route-ad6e695deb9de65c.js +1 -0
- package/.next/static/chunks/app/api/worktrees/route-ad6e695deb9de65c.js +1 -0
- package/.next/static/chunks/app/api/yjs-version/route-ad6e695deb9de65c.js +1 -0
- package/.next/static/chunks/app/layout-87087b955e0c9507.js +1 -0
- package/.next/static/chunks/app/manifest.webmanifest/route-ad6e695deb9de65c.js +1 -0
- package/.next/static/chunks/app/page-efca6bf51a5f8ccb.js +256 -0
- package/.next/static/chunks/main-app-1f89e7ad7ae1ff87.js +1 -0
- package/.next/static/chunks/next/dist/client/components/builtin/app-error-ad6e695deb9de65c.js +1 -0
- package/.next/static/chunks/next/dist/client/components/builtin/forbidden-ad6e695deb9de65c.js +1 -0
- package/.next/static/chunks/next/dist/client/components/builtin/global-error-d3784ab2e32f3c6e.js +1 -0
- package/.next/static/chunks/next/dist/client/components/builtin/not-found-ad6e695deb9de65c.js +1 -0
- package/.next/static/chunks/next/dist/client/components/builtin/unauthorized-ad6e695deb9de65c.js +1 -0
- package/.next/static/chunks/{webpack-3df5ae3897959c33.js → webpack-4de8e8dd9f2f3173.js} +1 -1
- package/.next/static/css/bb9361c7f832a89d.css +1 -0
- package/.next/static/css/c6d32b6031181be7.css +1 -0
- package/.next/static/k8ZFqwz7d-bnK0ZiUVgCc/_buildManifest.js +1 -0
- package/.next/trace +7 -8
- package/.next/trace-build +1 -1
- package/.next/types/app/api/agent/[id]/bash-output/route.ts +1 -1
- package/.next/types/app/api/agent/[id]/events/route.ts +1 -1
- package/.next/types/app/api/agent/[id]/route.ts +1 -1
- package/.next/types/app/api/agent/new/route.ts +1 -1
- package/.next/types/app/api/agent/running/route.ts +1 -1
- package/.next/types/app/api/app-update/route.ts +1 -1
- package/.next/types/app/api/auth/all-providers/route.ts +1 -1
- package/.next/types/app/api/auth/api-key/[provider]/route.ts +1 -1
- package/.next/types/app/api/auth/login/[provider]/route.ts +1 -1
- package/.next/types/app/api/auth/logout/[provider]/route.ts +1 -1
- package/.next/types/app/api/auth/providers/route.ts +1 -1
- package/.next/types/app/api/board-assets/[...path]/route.ts +1 -1
- package/.next/types/app/api/board-assets/route.ts +1 -1
- package/.next/types/app/api/boards/[id]/add-session/route.ts +353 -0
- package/.next/types/app/api/boards/[id]/reconcile/route.ts +1 -1
- package/.next/types/app/api/boards/[id]/route.ts +1 -1
- package/.next/types/app/api/boards/reorder/route.ts +1 -1
- package/.next/types/app/api/boards/route.ts +1 -1
- package/.next/types/app/api/cwd/browse/route.ts +1 -1
- package/.next/types/app/api/cwd/validate/route.ts +1 -1
- package/.next/types/app/api/default-cwd/route.ts +1 -1
- package/.next/types/app/api/file-index/route.ts +1 -1
- package/.next/types/app/api/files/[...path]/route.ts +1 -1
- package/.next/types/app/api/git/diff/route.ts +1 -1
- package/.next/types/app/api/git/status/route.ts +1 -1
- package/.next/types/app/api/home/route.ts +1 -1
- package/.next/types/app/api/mcp/route.ts +1 -1
- package/.next/types/app/api/models/route.ts +1 -1
- package/.next/types/app/api/models-config/catalog/route.ts +1 -1
- package/.next/types/app/api/models-config/discover/route.ts +1 -1
- package/.next/types/app/api/models-config/route.ts +1 -1
- package/.next/types/app/api/models-config/test/route.ts +1 -1
- package/.next/types/app/api/plugins/route.ts +1 -1
- package/.next/types/app/api/project-trust/route.ts +1 -1
- package/.next/types/app/api/quota/route.ts +1 -1
- package/.next/types/app/api/search/route.ts +1 -1
- package/.next/types/app/api/sessions/[id]/auto-name/route.ts +1 -1
- package/.next/types/app/api/sessions/[id]/context/route.ts +1 -1
- package/.next/types/app/api/sessions/[id]/entries/[entryId]/thinking/route.ts +1 -1
- package/.next/types/app/api/sessions/[id]/export/route.ts +1 -1
- package/.next/types/app/api/sessions/[id]/minimap/route.ts +1 -1
- package/.next/types/app/api/sessions/[id]/route.ts +1 -1
- package/.next/types/app/api/sessions/[id]/state/route.ts +1 -1
- package/.next/types/app/api/sessions/[id]/todos/route.ts +1 -1
- package/.next/types/app/api/sessions/route.ts +1 -1
- package/.next/types/app/api/sessions/summary/route.ts +1 -1
- package/.next/types/app/api/skills/check/route.ts +1 -1
- package/.next/types/app/api/skills/install/route.ts +1 -1
- package/.next/types/app/api/skills/route.ts +1 -1
- package/.next/types/app/api/skills/search/route.ts +1 -1
- package/.next/types/app/api/skills/update/route.ts +1 -1
- package/.next/types/app/api/subagents/[id]/route.ts +353 -0
- package/.next/types/app/api/subagents/profiles/route.ts +353 -0
- package/.next/types/app/api/subagents/settings/route.ts +353 -0
- package/.next/types/app/api/task-card-questions/[id]/answer/route.ts +1 -1
- package/.next/types/app/api/task-card-questions/route.ts +1 -1
- package/.next/types/app/api/task-cards/[id]/route.ts +1 -1
- package/.next/types/app/api/task-cards/route.ts +1 -1
- package/.next/types/app/api/task-cards/unbind/route.ts +1 -1
- package/.next/types/app/api/task-scheduler/status/route.ts +1 -1
- package/.next/types/app/api/tasks/[id]/assign-session/route.ts +1 -1
- package/.next/types/app/api/tasks/[id]/board/route.ts +1 -1
- package/.next/types/app/api/tasks/[id]/route.ts +1 -1
- package/.next/types/app/api/tasks/reorder/route.ts +1 -1
- package/.next/types/app/api/tasks/route.ts +1 -1
- package/.next/types/app/api/terminal/[id]/events/route.ts +1 -1
- package/.next/types/app/api/terminal/[id]/route.ts +1 -1
- package/.next/types/app/api/terminal/route.ts +1 -1
- package/.next/types/app/api/worktrees/route.ts +1 -1
- package/.next/types/app/api/yjs-version/route.ts +1 -1
- package/.next/types/app/layout.ts +1 -1
- package/.next/types/app/page.ts +1 -1
- package/.next/types/routes.d.ts +5 -1
- package/.next/types/validator.ts +36 -0
- package/lib/api-types.ts +10 -0
- package/lib/board-events.rename.test.mjs +39 -0
- package/lib/board-events.ts +17 -0
- package/lib/board-reconcile.test.mjs +20 -0
- package/lib/board-reconcile.ts +54 -0
- package/lib/chat-lazy-load.test.mjs +0 -62
- package/lib/chat-lazy-load.ts +0 -13
- package/lib/chat-only.ts +23 -0
- package/lib/draft-stash.ts +4 -5
- package/lib/file-types.ts +16 -1
- package/lib/i18n/messages/en.ts +91 -0
- package/lib/i18n/messages/zh-CN.ts +91 -0
- package/lib/id.test.mjs +38 -0
- package/lib/id.ts +17 -0
- package/lib/message-text.ts +24 -0
- package/lib/models-cache.ts +1 -1
- package/lib/pi-types.ts +19 -1
- package/lib/pin-store.ts +85 -0
- package/lib/powershell-settings.ts +106 -0
- package/lib/quoted-selection.ts +4 -0
- package/lib/rpc-manager.ts +208 -22
- package/lib/session-family.test.mjs +49 -0
- package/lib/session-family.ts +80 -0
- package/lib/session-index-scanner.ts +39 -0
- package/lib/session-time-group.test.mjs +38 -0
- package/lib/session-time-group.ts +55 -0
- package/lib/settings-navigation.ts +124 -0
- package/lib/subagent-extension.test.mjs +424 -0
- package/lib/subagent-extension.ts +309 -0
- package/lib/subagent-input.test.mjs +63 -0
- package/lib/subagent-input.ts +71 -0
- package/lib/subagent-isolation.test.mjs +51 -0
- package/lib/subagent-profile-precedence.ts +20 -0
- package/lib/subagent-prompt.test.mjs +64 -0
- package/lib/subagent-prompt.ts +31 -0
- package/lib/subagent-queue.test.mjs +35 -0
- package/lib/subagent-queue.ts +74 -0
- package/lib/subagent-runtime.test.mjs +150 -0
- package/lib/subagent-runtime.ts +587 -0
- package/lib/subagent-settings.test.mjs +50 -0
- package/lib/subagent-settings.ts +93 -0
- package/lib/subagents.test.mjs +601 -0
- package/lib/subagents.ts +602 -0
- package/lib/tool-presets.ts +4 -0
- package/lib/types.ts +19 -0
- package/package.json +1 -1
- package/.next/static/chunks/752.3119700876725f3b.js +0 -1
- package/.next/static/chunks/7975.95edcabc69eee4eb.js +0 -1
- package/.next/static/chunks/app/_global-error/page-2d5f6296c7e693c6.js +0 -1
- package/.next/static/chunks/app/_not-found/page-af4fe23994cb3d66.js +0 -1
- package/.next/static/chunks/app/api/agent/[id]/bash-output/route-2d5f6296c7e693c6.js +0 -1
- package/.next/static/chunks/app/api/agent/[id]/events/route-2d5f6296c7e693c6.js +0 -1
- package/.next/static/chunks/app/api/agent/[id]/route-2d5f6296c7e693c6.js +0 -1
- package/.next/static/chunks/app/api/agent/new/route-2d5f6296c7e693c6.js +0 -1
- package/.next/static/chunks/app/api/agent/running/route-2d5f6296c7e693c6.js +0 -1
- package/.next/static/chunks/app/api/app-update/route-2d5f6296c7e693c6.js +0 -1
- package/.next/static/chunks/app/api/auth/all-providers/route-2d5f6296c7e693c6.js +0 -1
- package/.next/static/chunks/app/api/auth/api-key/[provider]/route-2d5f6296c7e693c6.js +0 -1
- package/.next/static/chunks/app/api/auth/login/[provider]/route-2d5f6296c7e693c6.js +0 -1
- package/.next/static/chunks/app/api/auth/logout/[provider]/route-2d5f6296c7e693c6.js +0 -1
- package/.next/static/chunks/app/api/auth/providers/route-2d5f6296c7e693c6.js +0 -1
- package/.next/static/chunks/app/api/board-assets/[...path]/route-2d5f6296c7e693c6.js +0 -1
- package/.next/static/chunks/app/api/board-assets/route-2d5f6296c7e693c6.js +0 -1
- package/.next/static/chunks/app/api/boards/[id]/reconcile/route-2d5f6296c7e693c6.js +0 -1
- package/.next/static/chunks/app/api/boards/[id]/route-2d5f6296c7e693c6.js +0 -1
- package/.next/static/chunks/app/api/boards/reorder/route-2d5f6296c7e693c6.js +0 -1
- package/.next/static/chunks/app/api/boards/route-2d5f6296c7e693c6.js +0 -1
- package/.next/static/chunks/app/api/cwd/browse/route-2d5f6296c7e693c6.js +0 -1
- package/.next/static/chunks/app/api/cwd/validate/route-2d5f6296c7e693c6.js +0 -1
- package/.next/static/chunks/app/api/default-cwd/route-2d5f6296c7e693c6.js +0 -1
- package/.next/static/chunks/app/api/file-index/route-2d5f6296c7e693c6.js +0 -1
- package/.next/static/chunks/app/api/files/[...path]/route-2d5f6296c7e693c6.js +0 -1
- package/.next/static/chunks/app/api/git/diff/route-2d5f6296c7e693c6.js +0 -1
- package/.next/static/chunks/app/api/git/status/route-2d5f6296c7e693c6.js +0 -1
- package/.next/static/chunks/app/api/home/route-2d5f6296c7e693c6.js +0 -1
- package/.next/static/chunks/app/api/mcp/route-2d5f6296c7e693c6.js +0 -1
- package/.next/static/chunks/app/api/models/route-2d5f6296c7e693c6.js +0 -1
- package/.next/static/chunks/app/api/models-config/catalog/route-2d5f6296c7e693c6.js +0 -1
- package/.next/static/chunks/app/api/models-config/discover/route-2d5f6296c7e693c6.js +0 -1
- package/.next/static/chunks/app/api/models-config/route-2d5f6296c7e693c6.js +0 -1
- package/.next/static/chunks/app/api/models-config/test/route-2d5f6296c7e693c6.js +0 -1
- package/.next/static/chunks/app/api/plugins/route-2d5f6296c7e693c6.js +0 -1
- package/.next/static/chunks/app/api/project-trust/route-2d5f6296c7e693c6.js +0 -1
- package/.next/static/chunks/app/api/quota/route-2d5f6296c7e693c6.js +0 -1
- package/.next/static/chunks/app/api/search/route-2d5f6296c7e693c6.js +0 -1
- package/.next/static/chunks/app/api/sessions/[id]/auto-name/route-2d5f6296c7e693c6.js +0 -1
- package/.next/static/chunks/app/api/sessions/[id]/context/route-2d5f6296c7e693c6.js +0 -1
- package/.next/static/chunks/app/api/sessions/[id]/entries/[entryId]/thinking/route-2d5f6296c7e693c6.js +0 -1
- package/.next/static/chunks/app/api/sessions/[id]/export/route-2d5f6296c7e693c6.js +0 -1
- package/.next/static/chunks/app/api/sessions/[id]/minimap/route-2d5f6296c7e693c6.js +0 -1
- package/.next/static/chunks/app/api/sessions/[id]/route-2d5f6296c7e693c6.js +0 -1
- package/.next/static/chunks/app/api/sessions/[id]/state/route-2d5f6296c7e693c6.js +0 -1
- package/.next/static/chunks/app/api/sessions/[id]/todos/route-2d5f6296c7e693c6.js +0 -1
- package/.next/static/chunks/app/api/sessions/route-2d5f6296c7e693c6.js +0 -1
- package/.next/static/chunks/app/api/sessions/summary/route-2d5f6296c7e693c6.js +0 -1
- package/.next/static/chunks/app/api/skills/check/route-2d5f6296c7e693c6.js +0 -1
- package/.next/static/chunks/app/api/skills/install/route-2d5f6296c7e693c6.js +0 -1
- package/.next/static/chunks/app/api/skills/route-2d5f6296c7e693c6.js +0 -1
- package/.next/static/chunks/app/api/skills/search/route-2d5f6296c7e693c6.js +0 -1
- package/.next/static/chunks/app/api/skills/update/route-2d5f6296c7e693c6.js +0 -1
- package/.next/static/chunks/app/api/task-card-questions/[id]/answer/route-2d5f6296c7e693c6.js +0 -1
- package/.next/static/chunks/app/api/task-card-questions/route-2d5f6296c7e693c6.js +0 -1
- package/.next/static/chunks/app/api/task-cards/[id]/route-2d5f6296c7e693c6.js +0 -1
- package/.next/static/chunks/app/api/task-cards/route-2d5f6296c7e693c6.js +0 -1
- package/.next/static/chunks/app/api/task-cards/unbind/route-2d5f6296c7e693c6.js +0 -1
- package/.next/static/chunks/app/api/task-scheduler/status/route-2d5f6296c7e693c6.js +0 -1
- package/.next/static/chunks/app/api/tasks/[id]/assign-session/route-2d5f6296c7e693c6.js +0 -1
- package/.next/static/chunks/app/api/tasks/[id]/board/route-2d5f6296c7e693c6.js +0 -1
- package/.next/static/chunks/app/api/tasks/[id]/route-2d5f6296c7e693c6.js +0 -1
- package/.next/static/chunks/app/api/tasks/reorder/route-2d5f6296c7e693c6.js +0 -1
- package/.next/static/chunks/app/api/tasks/route-2d5f6296c7e693c6.js +0 -1
- package/.next/static/chunks/app/api/terminal/[id]/events/route-2d5f6296c7e693c6.js +0 -1
- package/.next/static/chunks/app/api/terminal/[id]/route-2d5f6296c7e693c6.js +0 -1
- package/.next/static/chunks/app/api/terminal/route-2d5f6296c7e693c6.js +0 -1
- package/.next/static/chunks/app/api/worktrees/route-2d5f6296c7e693c6.js +0 -1
- package/.next/static/chunks/app/api/yjs-version/route-2d5f6296c7e693c6.js +0 -1
- package/.next/static/chunks/app/layout-636e9e756d0734c7.js +0 -1
- package/.next/static/chunks/app/manifest.webmanifest/route-2d5f6296c7e693c6.js +0 -1
- package/.next/static/chunks/app/page-44daed9dcf9134eb.js +0 -89
- package/.next/static/chunks/main-app-b3e8a8d15d83e1f0.js +0 -1
- package/.next/static/chunks/next/dist/client/components/builtin/app-error-2d5f6296c7e693c6.js +0 -1
- package/.next/static/chunks/next/dist/client/components/builtin/forbidden-2d5f6296c7e693c6.js +0 -1
- package/.next/static/chunks/next/dist/client/components/builtin/global-error-00a4badaccb388e6.js +0 -1
- package/.next/static/chunks/next/dist/client/components/builtin/not-found-2d5f6296c7e693c6.js +0 -1
- package/.next/static/chunks/next/dist/client/components/builtin/unauthorized-2d5f6296c7e693c6.js +0 -1
- package/.next/static/css/4a609fb185e7cff1.css +0 -1
- package/.next/static/h-hr7x0pqNUx3TyuarqWJ/_buildManifest.js +0 -1
- package/lib/extension-command.test.mjs +0 -63
- package/lib/extension-command.ts +0 -81
- package/lib/subagent-widget.test.mjs +0 -87
- package/lib/subagent-widget.ts +0 -109
- /package/.next/static/{h-hr7x0pqNUx3TyuarqWJ → k8ZFqwz7d-bnK0ZiUVgCc}/_ssgManifest.js +0 -0
package/lib/i18n/messages/en.ts
CHANGED
|
@@ -10,6 +10,8 @@ export const enLocale: LocalePlugin = {
|
|
|
10
10
|
"common.models": "Models",
|
|
11
11
|
"common.skills": "Skills",
|
|
12
12
|
"common.plugins": "Plugins",
|
|
13
|
+
"common.settings": "Settings",
|
|
14
|
+
"common.agents": "Agents",
|
|
13
15
|
"appUpdate.releaseNotes": "Pi Web v{version} is available. View release notes",
|
|
14
16
|
"sidebar.hide": "Hide sidebar",
|
|
15
17
|
"sidebar.show": "Show sidebar",
|
|
@@ -146,6 +148,11 @@ export const enLocale: LocalePlugin = {
|
|
|
146
148
|
"sidebar.filesTab": "Files",
|
|
147
149
|
"sidebar.tasks": "Tasks",
|
|
148
150
|
"sidebar.tempSessions": "Chat",
|
|
151
|
+
"sidebar.timeToday": "Today",
|
|
152
|
+
"sidebar.timeYesterday": "Yesterday",
|
|
153
|
+
"sidebar.timeThisWeek": "This week",
|
|
154
|
+
"sidebar.timeThisMonth": "Last 30 days",
|
|
155
|
+
"sidebar.timeOlder": "Older",
|
|
149
156
|
"sidebar.newTask": "New task…",
|
|
150
157
|
"sidebar.taskName": "Task name",
|
|
151
158
|
"sidebar.newTaskSession": "New task session",
|
|
@@ -300,6 +307,17 @@ export const enLocale: LocalePlugin = {
|
|
|
300
307
|
"chat.steer": "Steer",
|
|
301
308
|
"chat.followUp": "Follow-up",
|
|
302
309
|
"chat.send": "Send",
|
|
310
|
+
"chat.askSelection": "Ask about selected text",
|
|
311
|
+
"chat.askInCurrent": "Ask here",
|
|
312
|
+
"chat.askInNewChat": "Ask in new chat",
|
|
313
|
+
"chat.newQuoteChat": "New chat about selected text",
|
|
314
|
+
"chat.quoteIntro": "About this passage:",
|
|
315
|
+
"chat.quoteQuestion": "My question:",
|
|
316
|
+
"chat.quoteForkFailed": "Failed to create quoted chat",
|
|
317
|
+
"chat.quoteSelectionToggle": "Show an ask menu after selecting text",
|
|
318
|
+
"chat.sendQuestion": "Send question",
|
|
319
|
+
"chat.imageNotSupportedTitle": "The selected model does not support images",
|
|
320
|
+
"chat.imageNotSupportedBody": "Model {model} accepts text input only; attached images will not be sent. Switch to a vision-capable model or remove the attachments.",
|
|
303
321
|
"chat.attachImage": "Attach image",
|
|
304
322
|
"chat.previewImage": "Preview image",
|
|
305
323
|
"chat.filterModels": "Filter models…",
|
|
@@ -360,6 +378,79 @@ export const enLocale: LocalePlugin = {
|
|
|
360
378
|
"chat.commandCopy": "Copy the last assistant message",
|
|
361
379
|
"chat.compacted": "Compacted",
|
|
362
380
|
"chat.tokensSaved": "{saved} saved",
|
|
381
|
+
"settings.chatContentWidth": "Chat content width",
|
|
382
|
+
"settings.chatContentWidthDescription": "Set the maximum width of message content and the input box.",
|
|
383
|
+
"settings.chatContentFontSize": "Chat font size",
|
|
384
|
+
"settings.preferences": "Preferences",
|
|
385
|
+
"settings.title": "Settings",
|
|
386
|
+
"settings.general": "General",
|
|
387
|
+
"settings.appearance": "Appearance",
|
|
388
|
+
"settings.chat": "Chat",
|
|
389
|
+
"settings.quoteSelection": "Ask about selected text",
|
|
390
|
+
"settings.resetChatContentWidth": "Reset chat width",
|
|
391
|
+
"settings.resetChatContentFontSize": "Reset chat font size",
|
|
392
|
+
"settings.projectRequired": "Project required",
|
|
393
|
+
"settings.themeLight": "Light",
|
|
394
|
+
"settings.themeDark": "Dark",
|
|
395
|
+
"tools.title": "Tools enabled in the current session",
|
|
396
|
+
"tools.details": "Tool definition details",
|
|
397
|
+
"tools.load": "Tool definitions have not loaded yet",
|
|
398
|
+
"tools.loading": "Loading tool definitions…",
|
|
399
|
+
"tools.noTools": "No active tools",
|
|
400
|
+
"tools.description": "Description",
|
|
401
|
+
"tools.parameters": "Parameters",
|
|
402
|
+
"tools.parameterCount": "{count} parameters",
|
|
403
|
+
"tools.noParameters": "No parameters",
|
|
404
|
+
"tools.required": "Required",
|
|
405
|
+
"tools.optional": "Optional",
|
|
406
|
+
"tools.allowedValues": "Allowed",
|
|
407
|
+
"tools.defaultValue": "Default",
|
|
408
|
+
"tools.guidelines": "Prompt guidelines",
|
|
409
|
+
|
|
410
|
+
"tools.label": "Tools",
|
|
411
|
+
"agents.close": "Close",
|
|
412
|
+
"agents.builtInTitle": "Enable Pi Web built-in sub-agents",
|
|
413
|
+
"agents.builtInDescription": "Provides Pi Web's integrated Agent tools and disables a conflicting pi-subagents extension.",
|
|
414
|
+
"agents.reloadRequired": "Reload the current session to apply this change.",
|
|
415
|
+
"agents.reloadSession": "Reload session",
|
|
416
|
+
"agents.maxConcurrent": "Concurrent sub-agents",
|
|
417
|
+
"agents.maxConcurrentDescription": "Maximum prompts running at once per parent session.",
|
|
418
|
+
"agents.reloading": "Reloading...",
|
|
419
|
+
"agents.loading": "Loading sub-agents...",
|
|
420
|
+
"agents.new": "New sub-agent",
|
|
421
|
+
"agents.empty": "Select or create a sub-agent profile",
|
|
422
|
+
"agents.saveScope": "Save to",
|
|
423
|
+
"agents.name": "Sub-agent ID",
|
|
424
|
+
"agents.displayName": "Display name",
|
|
425
|
+
"agents.description": "Description",
|
|
426
|
+
"agents.prompt": "System instructions",
|
|
427
|
+
"agents.tools": "Tools",
|
|
428
|
+
"agents.resources": "Resources",
|
|
429
|
+
"agents.loadSkills": "Load skills",
|
|
430
|
+
"agents.loadExtensions": "Load extensions",
|
|
431
|
+
"agents.model": "Model override",
|
|
432
|
+
"agents.modelsLoading": "Loading models...",
|
|
433
|
+
"agents.modelUnavailable": "{model} (unavailable)",
|
|
434
|
+
"agents.thinking": "Thinking",
|
|
435
|
+
"agents.maxTurns": "Max turns",
|
|
436
|
+
"agents.inherit": "Parent default",
|
|
437
|
+
"agents.enable": "Enable sub-agent",
|
|
438
|
+
"agents.disable": "Disable sub-agent",
|
|
439
|
+
"agents.builtinPath": "Built-in profile",
|
|
440
|
+
"agents.inheritContext": "Inherit parent context",
|
|
441
|
+
"agents.background": "Run in background by default",
|
|
442
|
+
"agents.duplicate": "Duplicate",
|
|
443
|
+
"agents.copyName": "{name} copy",
|
|
444
|
+
"agents.delete": "Delete",
|
|
445
|
+
"agents.deleteConfirm": "Delete {name}?",
|
|
446
|
+
"agents.save": "Save",
|
|
447
|
+
"agents.saving": "Saving...",
|
|
448
|
+
"agents.scope.builtin": "built-in",
|
|
449
|
+
"agents.scope.global": "global",
|
|
450
|
+
"agents.scope.workspace": "workspace",
|
|
451
|
+
"agents.scope.project": "project",
|
|
452
|
+
"agents.overridden": "Overridden",
|
|
453
|
+
|
|
363
454
|
"i18n.close": "Close",
|
|
364
455
|
"i18n.copy": "Copy",
|
|
365
456
|
"i18n.pin": "Pin",
|
|
@@ -11,6 +11,8 @@ export const zhCNLocale: LocalePlugin = {
|
|
|
11
11
|
"common.models": "模型",
|
|
12
12
|
"common.skills": "技能",
|
|
13
13
|
"common.plugins": "插件",
|
|
14
|
+
"common.settings": "设置",
|
|
15
|
+
"common.agents": "代理",
|
|
14
16
|
"appUpdate.releaseNotes": "Pi Web v{version} 可用,查看更新说明",
|
|
15
17
|
"sidebar.hide": "隐藏侧边栏",
|
|
16
18
|
"sidebar.show": "显示侧边栏",
|
|
@@ -147,6 +149,11 @@ export const zhCNLocale: LocalePlugin = {
|
|
|
147
149
|
"sidebar.filesTab": "文件",
|
|
148
150
|
"sidebar.tasks": "任务",
|
|
149
151
|
"sidebar.tempSessions": "聊天",
|
|
152
|
+
"sidebar.timeToday": "今天",
|
|
153
|
+
"sidebar.timeYesterday": "昨天",
|
|
154
|
+
"sidebar.timeThisWeek": "本周",
|
|
155
|
+
"sidebar.timeThisMonth": "近一月",
|
|
156
|
+
"sidebar.timeOlder": "更久之前",
|
|
150
157
|
"sidebar.newTask": "新建任务…",
|
|
151
158
|
"sidebar.taskName": "任务名称",
|
|
152
159
|
"sidebar.newTaskSession": "新建任务会话",
|
|
@@ -301,6 +308,17 @@ export const zhCNLocale: LocalePlugin = {
|
|
|
301
308
|
"chat.steer": "引导",
|
|
302
309
|
"chat.followUp": "后续消息",
|
|
303
310
|
"chat.send": "发送",
|
|
311
|
+
"chat.askSelection": "询问选中的文字",
|
|
312
|
+
"chat.askInCurrent": "在当前对话询问",
|
|
313
|
+
"chat.askInNewChat": "在新对话询问",
|
|
314
|
+
"chat.newQuoteChat": "关于选中文字的新对话",
|
|
315
|
+
"chat.quoteIntro": "关于这段内容:",
|
|
316
|
+
"chat.quoteQuestion": "我的问题是:",
|
|
317
|
+
"chat.quoteForkFailed": "无法创建引用对话",
|
|
318
|
+
"chat.quoteSelectionToggle": "选中文字后显示询问菜单",
|
|
319
|
+
"chat.sendQuestion": "发送问题",
|
|
320
|
+
"chat.imageNotSupportedTitle": "当前模型不支持图片",
|
|
321
|
+
"chat.imageNotSupportedBody": "模型 {model} 的输入只支持文本,图片不会被发送。请更换支持图片的模型或移除附件。",
|
|
304
322
|
"chat.attachImage": "附加图片",
|
|
305
323
|
"chat.previewImage": "预览图片",
|
|
306
324
|
"chat.filterModels": "筛选模型…",
|
|
@@ -361,6 +379,79 @@ export const zhCNLocale: LocalePlugin = {
|
|
|
361
379
|
"chat.commandCopy": "复制最后一条助手消息",
|
|
362
380
|
"chat.compacted": "已压缩",
|
|
363
381
|
"chat.tokensSaved": "节省 {saved}",
|
|
382
|
+
"settings.chatContentWidth": "聊天内容宽度",
|
|
383
|
+
"settings.chatContentWidthDescription": "设置消息内容和输入框的最大宽度。",
|
|
384
|
+
"settings.chatContentFontSize": "聊天字体大小",
|
|
385
|
+
"settings.preferences": "偏好",
|
|
386
|
+
"settings.title": "设置",
|
|
387
|
+
"settings.general": "通用",
|
|
388
|
+
"settings.appearance": "外观",
|
|
389
|
+
"settings.chat": "聊天",
|
|
390
|
+
"settings.quoteSelection": "选中文字后询问",
|
|
391
|
+
"settings.resetChatContentWidth": "重置聊天宽度",
|
|
392
|
+
"settings.resetChatContentFontSize": "重置聊天字号",
|
|
393
|
+
"settings.projectRequired": "需要项目",
|
|
394
|
+
"settings.themeLight": "浅色",
|
|
395
|
+
"settings.themeDark": "深色",
|
|
396
|
+
"tools.title": "当前会话启用的工具",
|
|
397
|
+
"tools.details": "工具定义详情",
|
|
398
|
+
"tools.load": "工具定义尚未加载",
|
|
399
|
+
"tools.loading": "正在加载工具定义…",
|
|
400
|
+
"tools.noTools": "没有启用的工具",
|
|
401
|
+
"tools.description": "描述",
|
|
402
|
+
"tools.parameters": "参数",
|
|
403
|
+
"tools.parameterCount": "{count} 个参数",
|
|
404
|
+
"tools.noParameters": "无参数",
|
|
405
|
+
"tools.required": "必填",
|
|
406
|
+
"tools.optional": "可选",
|
|
407
|
+
"tools.allowedValues": "可选值",
|
|
408
|
+
"tools.defaultValue": "默认值",
|
|
409
|
+
"tools.guidelines": "提示词规则",
|
|
410
|
+
|
|
411
|
+
"tools.label": "工具",
|
|
412
|
+
"agents.close": "关闭",
|
|
413
|
+
"agents.builtInTitle": "启用 Pi Web 内置子代理",
|
|
414
|
+
"agents.builtInDescription": "提供 Pi Web 集成的 Agent 工具,并停用发生冲突的 pi-subagents 扩展。",
|
|
415
|
+
"agents.reloadRequired": "重新加载当前会话后生效。",
|
|
416
|
+
"agents.reloadSession": "重新加载会话",
|
|
417
|
+
"agents.maxConcurrent": "并发子代理数",
|
|
418
|
+
"agents.maxConcurrentDescription": "每个父会话同时运行的最大任务数。",
|
|
419
|
+
"agents.reloading": "正在重新加载...",
|
|
420
|
+
"agents.loading": "正在加载子代理...",
|
|
421
|
+
"agents.new": "新建子代理",
|
|
422
|
+
"agents.empty": "选择或创建一个子代理配置",
|
|
423
|
+
"agents.saveScope": "保存到",
|
|
424
|
+
"agents.name": "子代理 ID",
|
|
425
|
+
"agents.displayName": "显示名称",
|
|
426
|
+
"agents.description": "描述",
|
|
427
|
+
"agents.prompt": "系统指令",
|
|
428
|
+
"agents.tools": "工具",
|
|
429
|
+
"agents.resources": "资源",
|
|
430
|
+
"agents.loadSkills": "加载技能",
|
|
431
|
+
"agents.loadExtensions": "加载扩展",
|
|
432
|
+
"agents.model": "指定模型",
|
|
433
|
+
"agents.modelsLoading": "正在加载模型...",
|
|
434
|
+
"agents.modelUnavailable": "{model}(不可用)",
|
|
435
|
+
"agents.thinking": "思考级别",
|
|
436
|
+
"agents.maxTurns": "最大轮次",
|
|
437
|
+
"agents.inherit": "跟随父会话",
|
|
438
|
+
"agents.enable": "启用子代理",
|
|
439
|
+
"agents.disable": "停用子代理",
|
|
440
|
+
"agents.builtinPath": "内置配置",
|
|
441
|
+
"agents.inheritContext": "继承父会话上下文",
|
|
442
|
+
"agents.background": "默认在后台运行",
|
|
443
|
+
"agents.duplicate": "创建副本",
|
|
444
|
+
"agents.copyName": "{name} 副本",
|
|
445
|
+
"agents.delete": "删除",
|
|
446
|
+
"agents.deleteConfirm": "删除 {name}?",
|
|
447
|
+
"agents.save": "保存",
|
|
448
|
+
"agents.saving": "正在保存...",
|
|
449
|
+
"agents.scope.builtin": "内置",
|
|
450
|
+
"agents.scope.global": "全局",
|
|
451
|
+
"agents.scope.workspace": "工作区",
|
|
452
|
+
"agents.scope.project": "项目",
|
|
453
|
+
"agents.overridden": "被覆盖",
|
|
454
|
+
|
|
364
455
|
"i18n.close": "关闭",
|
|
365
456
|
"i18n.copy": "复制",
|
|
366
457
|
"i18n.pin": "钉",
|
package/lib/id.test.mjs
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import assert from "node:assert/strict";
|
|
2
|
+
import test from "node:test";
|
|
3
|
+
import { createJiti } from "jiti";
|
|
4
|
+
|
|
5
|
+
const jiti = createJiti(import.meta.url, { tsconfigPaths: true });
|
|
6
|
+
const { newId } = await jiti.import("./id.ts");
|
|
7
|
+
|
|
8
|
+
// 服务端 /api/agent/new 的会话 id 校验(SESSION_ID_RE):兜底 id 必须也能当会话 id 用
|
|
9
|
+
const SESSION_ID_RE = /^[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?$/;
|
|
10
|
+
|
|
11
|
+
const realCrypto = globalThis.crypto;
|
|
12
|
+
|
|
13
|
+
test.afterEach(() => {
|
|
14
|
+
Object.defineProperty(globalThis, "crypto", { value: realCrypto, configurable: true, writable: true });
|
|
15
|
+
});
|
|
16
|
+
|
|
17
|
+
test("prefers crypto.randomUUID when the secure-context API exists", () => {
|
|
18
|
+
Object.defineProperty(globalThis, "crypto", { value: { randomUUID: () => "0b6f2f2e-1111-2222-3333-444455556666" }, configurable: true, writable: true });
|
|
19
|
+
assert.equal(newId(), "0b6f2f2e-1111-2222-3333-444455556666");
|
|
20
|
+
});
|
|
21
|
+
|
|
22
|
+
test("falls back on insecure origins where randomUUID is missing", () => {
|
|
23
|
+
// http://<LAN-IP>:30143 → crypto 在、randomUUID 不在(裸调会 TypeError)
|
|
24
|
+
Object.defineProperty(globalThis, "crypto", { value: { getRandomValues: (a) => a }, configurable: true, writable: true });
|
|
25
|
+
const id = newId();
|
|
26
|
+
assert.match(id, SESSION_ID_RE, `fallback id must be a valid session id, got ${id}`);
|
|
27
|
+
});
|
|
28
|
+
|
|
29
|
+
test("falls back when crypto itself is unavailable", () => {
|
|
30
|
+
Object.defineProperty(globalThis, "crypto", { value: undefined, configurable: true, writable: true });
|
|
31
|
+
assert.match(newId(), SESSION_ID_RE);
|
|
32
|
+
});
|
|
33
|
+
|
|
34
|
+
test("fallback ids stay unique across rapid calls", () => {
|
|
35
|
+
Object.defineProperty(globalThis, "crypto", { value: {}, configurable: true, writable: true });
|
|
36
|
+
const ids = new Set(Array.from({ length: 200 }, () => newId()));
|
|
37
|
+
assert.equal(ids.size, 200);
|
|
38
|
+
});
|
package/lib/id.ts
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 前端 id 生成(会话 id / 画布节点 id / 草稿 id / 通知 id 等)。
|
|
3
|
+
*
|
|
4
|
+
* **一律用它,别裸调 `crypto.randomUUID()`**:该方法只在**安全上下文**存在
|
|
5
|
+
* (https / localhost)。局域网访问(`npm run dev:lan` → `http://192.168.x.x:30143`)
|
|
6
|
+
* 或老浏览器里它是 undefined,裸调直接抛 “crypto.randomUUID is not a function”
|
|
7
|
+
* —— 任务行「新建会话」2026-09-14 就栽在这里(同一批调用里有的做了兜底、有的漏了)。
|
|
8
|
+
*
|
|
9
|
+
* 退化实现产出的 id 仍是 `[A-Za-z0-9-]`,满足服务端会话 id 校验
|
|
10
|
+
* (`SESSION_ID_RE`,见 `app/api/agent/new/route.ts`),可直接当会话 id 用。
|
|
11
|
+
*/
|
|
12
|
+
export function newId(): string {
|
|
13
|
+
if (typeof crypto !== "undefined" && typeof crypto.randomUUID === "function") {
|
|
14
|
+
return crypto.randomUUID();
|
|
15
|
+
}
|
|
16
|
+
return `${Date.now().toString(36)}-${Math.random().toString(36).slice(2, 10)}`;
|
|
17
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { AgentMessage } from "@/lib/types";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* 从消息中提取可渲染的 markdown 文本(钉卡快照用)。
|
|
5
|
+
* 只取 text 块,忽略 thinking / 工具调用 / 图片等结构 —— 钉卡只渲染内容,与消息气泡解耦。
|
|
6
|
+
*/
|
|
7
|
+
export function extractMessageMarkdown(message: AgentMessage): string {
|
|
8
|
+
const content = (message as unknown as { content?: unknown }).content;
|
|
9
|
+
const parts: string[] = [];
|
|
10
|
+
const push = (c: unknown): void => {
|
|
11
|
+
if (typeof c === "string") {
|
|
12
|
+
parts.push(c);
|
|
13
|
+
} else if (Array.isArray(c)) {
|
|
14
|
+
for (const b of c) {
|
|
15
|
+
if (b && typeof b === "object") {
|
|
16
|
+
const t = b as { type?: string; text?: string };
|
|
17
|
+
if (t.type === "text" && typeof t.text === "string") parts.push(t.text);
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
};
|
|
22
|
+
push(content);
|
|
23
|
+
return parts.join("\n\n").trim();
|
|
24
|
+
}
|
package/lib/models-cache.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export interface ModelsData {
|
|
2
2
|
models: Record<string, string>;
|
|
3
|
-
modelList: { id: string; name: string; provider: string }[];
|
|
3
|
+
modelList: { id: string; name: string; provider: string; input?: string[] }[];
|
|
4
4
|
defaultModel: { provider: string; modelId: string } | null;
|
|
5
5
|
thinkingLevels: Record<string, string[]>;
|
|
6
6
|
thinkingLevelMaps: Record<string, Record<string, string | null>>;
|
package/lib/pi-types.ts
CHANGED
|
@@ -6,7 +6,12 @@ import type {
|
|
|
6
6
|
SlashCommandInfo,
|
|
7
7
|
Theme,
|
|
8
8
|
} from "@earendil-works/pi-coding-agent";
|
|
9
|
-
import type {
|
|
9
|
+
import type {
|
|
10
|
+
AgentLoopTurnUpdate,
|
|
11
|
+
AgentMessage as PiAgentMessage,
|
|
12
|
+
PrepareNextTurnContext,
|
|
13
|
+
} from "@earendil-works/pi-agent-core";
|
|
14
|
+
import type { ImageContent, TextContent } from "@earendil-works/pi-ai";
|
|
10
15
|
|
|
11
16
|
export interface ContextUsage {
|
|
12
17
|
percent: number | null;
|
|
@@ -138,6 +143,10 @@ export interface AgentSessionLike {
|
|
|
138
143
|
thinkingLevel?: string;
|
|
139
144
|
streamingMessage?: PiAgentMessage;
|
|
140
145
|
};
|
|
146
|
+
prepareNextTurnWithContext?: (
|
|
147
|
+
context: PrepareNextTurnContext,
|
|
148
|
+
signal?: AbortSignal,
|
|
149
|
+
) => Promise<AgentLoopTurnUpdate | undefined> | AgentLoopTurnUpdate | undefined;
|
|
141
150
|
};
|
|
142
151
|
readonly extensionRunner: ExtensionRunnerLike;
|
|
143
152
|
readonly promptTemplates: readonly PromptTemplateLike[];
|
|
@@ -153,6 +162,15 @@ export interface AgentSessionLike {
|
|
|
153
162
|
source?: "interactive" | "rpc";
|
|
154
163
|
preflightResult?: (success: boolean) => void;
|
|
155
164
|
}): Promise<void>;
|
|
165
|
+
sendCustomMessage<T = unknown>(message: {
|
|
166
|
+
customType: string;
|
|
167
|
+
content: string | (TextContent | ImageContent)[];
|
|
168
|
+
display: boolean;
|
|
169
|
+
details?: T;
|
|
170
|
+
}, options?: {
|
|
171
|
+
triggerTurn?: boolean;
|
|
172
|
+
deliverAs?: "steer" | "followUp" | "nextTurn";
|
|
173
|
+
}): Promise<void>;
|
|
156
174
|
abort(): Promise<void>;
|
|
157
175
|
executeBash(command: string, onChunk?: (chunk: string) => void, options?: {
|
|
158
176
|
excludeFromContext?: boolean;
|
package/lib/pin-store.ts
ADDED
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import { useSyncExternalStore } from "react";
|
|
4
|
+
|
|
5
|
+
export interface PinnedMessageItem {
|
|
6
|
+
id: string;
|
|
7
|
+
/** 快照内容(markdown 文本)——钉卡只渲染内容,与消息气泡/会话解耦 */
|
|
8
|
+
content: string;
|
|
9
|
+
x: number;
|
|
10
|
+
y: number;
|
|
11
|
+
w: number;
|
|
12
|
+
/** 高度:undefined = 初始随内容自适应;缩放/resize 后变为固定值 */
|
|
13
|
+
h?: number;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
type Listener = () => void;
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* 全局钉 store:pins 存活在模块级(与任何会话组件无关)。
|
|
20
|
+
* 跨会话/看板切换保留;刷新页面不持久化(内存态,符合设计)。
|
|
21
|
+
*/
|
|
22
|
+
let pins: PinnedMessageItem[] = [];
|
|
23
|
+
const listeners = new Set<Listener>();
|
|
24
|
+
|
|
25
|
+
function emit() {
|
|
26
|
+
for (const l of listeners) l();
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
function subscribe(listener: Listener) {
|
|
30
|
+
listeners.add(listener);
|
|
31
|
+
return () => {
|
|
32
|
+
listeners.delete(listener);
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
function getSnapshot() {
|
|
37
|
+
return pins;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
let pinCount = 0;
|
|
41
|
+
|
|
42
|
+
/** 钉住内容:卡片出现在鼠标下方,多张级联偏移,clamp 视口内 */
|
|
43
|
+
export function pin(content: string, clientX: number, clientY: number) {
|
|
44
|
+
const vw = window.innerWidth;
|
|
45
|
+
const vh = window.innerHeight;
|
|
46
|
+
const w = Math.min(340, Math.max(240, vw - 40));
|
|
47
|
+
const offset = (pinCount % 8) * 22;
|
|
48
|
+
pinCount += 1;
|
|
49
|
+
const item: PinnedMessageItem = {
|
|
50
|
+
id: `pin-${Date.now()}-${Math.random().toString(36).slice(2, 7)}`,
|
|
51
|
+
content,
|
|
52
|
+
x: Math.min(Math.max(0, clientX + offset), Math.max(0, vw - w - 4)),
|
|
53
|
+
y: Math.min(Math.max(0, clientY + 14 + offset), Math.max(0, vh - 48)),
|
|
54
|
+
w,
|
|
55
|
+
};
|
|
56
|
+
pins = [...pins, item];
|
|
57
|
+
emit();
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
export function closePin(id: string) {
|
|
61
|
+
pins = pins.filter((p) => p.id !== id);
|
|
62
|
+
emit();
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
export function movePin(id: string, patch: Partial<Pick<PinnedMessageItem, "x" | "y" | "w" | "h">>) {
|
|
66
|
+
pins = pins.map((p) => (p.id === id ? { ...p, ...patch } : p));
|
|
67
|
+
emit();
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
/** 激活置顶:把卡片移到数组末尾(zIndex 最高) */
|
|
71
|
+
export function activatePin(id: string) {
|
|
72
|
+
if (pins.length <= 1) return;
|
|
73
|
+
const idx = pins.findIndex((p) => p.id === id);
|
|
74
|
+
if (idx === -1 || idx === pins.length - 1) return;
|
|
75
|
+
const next = [...pins];
|
|
76
|
+
const [item] = next.splice(idx, 1);
|
|
77
|
+
next.push(item);
|
|
78
|
+
pins = next;
|
|
79
|
+
emit();
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
/** 订阅 pins 快照(组件用) */
|
|
83
|
+
export function usePins(): PinnedMessageItem[] {
|
|
84
|
+
return useSyncExternalStore(subscribe, getSnapshot, getSnapshot);
|
|
85
|
+
}
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
import { chmodSync, existsSync, mkdirSync, readFileSync, writeFileSync } from "node:fs";
|
|
2
|
+
import { dirname, join } from "node:path";
|
|
3
|
+
import { getAgentDir } from "@earendil-works/pi-coding-agent";
|
|
4
|
+
import lockfile from "proper-lockfile";
|
|
5
|
+
|
|
6
|
+
const DEFAULT_TOOLS = ["read", "bash", "edit", "write"];
|
|
7
|
+
const SHELL_TOOLS = new Set(["bash", "powershell"]);
|
|
8
|
+
|
|
9
|
+
function isRecord(value: unknown): value is Record<string, unknown> {
|
|
10
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export function isPowerShellToolEnabled(
|
|
14
|
+
defaultTools: readonly string[] | undefined,
|
|
15
|
+
platform: NodeJS.Platform = process.platform,
|
|
16
|
+
): boolean {
|
|
17
|
+
return platform === "win32"
|
|
18
|
+
&& defaultTools?.includes("powershell") === true
|
|
19
|
+
&& !defaultTools.includes("bash");
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export function replaceShellTool(
|
|
23
|
+
toolNames: readonly string[],
|
|
24
|
+
usePowerShell: boolean,
|
|
25
|
+
): string[] {
|
|
26
|
+
const shell = usePowerShell ? "powershell" : "bash";
|
|
27
|
+
const result: string[] = [];
|
|
28
|
+
for (const name of toolNames) {
|
|
29
|
+
const next = SHELL_TOOLS.has(name) ? shell : name;
|
|
30
|
+
if (!result.includes(next)) result.push(next);
|
|
31
|
+
}
|
|
32
|
+
return result;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export function resolveShellTools(
|
|
36
|
+
toolNames: readonly string[],
|
|
37
|
+
defaultTools: readonly string[] | undefined,
|
|
38
|
+
platform: NodeJS.Platform = process.platform,
|
|
39
|
+
): string[] {
|
|
40
|
+
return replaceShellTool(toolNames, isPowerShellToolEnabled(defaultTools, platform));
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export function getPowerShellSettingsPath(agentDir = getAgentDir()): string {
|
|
44
|
+
return join(agentDir, "settings.json");
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
function parseSettings(path: string): Record<string, unknown> {
|
|
48
|
+
if (!existsSync(path)) return {};
|
|
49
|
+
const parsed: unknown = JSON.parse(readFileSync(path, "utf8"));
|
|
50
|
+
if (!isRecord(parsed)) throw new Error("Invalid settings.json: expected an object");
|
|
51
|
+
return parsed;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
function configuredTools(settings: Record<string, unknown>): string[] | undefined {
|
|
55
|
+
if (settings.defaultTools === undefined) return undefined;
|
|
56
|
+
if (
|
|
57
|
+
!Array.isArray(settings.defaultTools)
|
|
58
|
+
|| settings.defaultTools.some((name) => typeof name !== "string")
|
|
59
|
+
) {
|
|
60
|
+
throw new Error("Invalid settings.json: defaultTools must be an array of strings");
|
|
61
|
+
}
|
|
62
|
+
return settings.defaultTools as string[];
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
export async function readPowerShellToolEnabled(
|
|
66
|
+
settingsPath = getPowerShellSettingsPath(),
|
|
67
|
+
platform: NodeJS.Platform = process.platform,
|
|
68
|
+
): Promise<boolean> {
|
|
69
|
+
if (!existsSync(settingsPath)) return false;
|
|
70
|
+
const release = await lockfile.lock(settingsPath, { realpath: false, retries: 10 });
|
|
71
|
+
try {
|
|
72
|
+
return isPowerShellToolEnabled(configuredTools(parseSettings(settingsPath)), platform);
|
|
73
|
+
} finally {
|
|
74
|
+
await release();
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
export async function writePowerShellToolEnabled(
|
|
79
|
+
enabled: boolean,
|
|
80
|
+
settingsPath = getPowerShellSettingsPath(),
|
|
81
|
+
platform: NodeJS.Platform = process.platform,
|
|
82
|
+
): Promise<boolean> {
|
|
83
|
+
if (platform !== "win32") throw new Error("PowerShell tool settings are only available on Windows");
|
|
84
|
+
|
|
85
|
+
mkdirSync(dirname(settingsPath), { recursive: true });
|
|
86
|
+
try {
|
|
87
|
+
writeFileSync(settingsPath, "{}", { flag: "wx", mode: 0o600 });
|
|
88
|
+
} catch (error) {
|
|
89
|
+
if ((error as NodeJS.ErrnoException).code !== "EEXIST") throw error;
|
|
90
|
+
}
|
|
91
|
+
const release = await lockfile.lock(settingsPath, { realpath: false, retries: 10 });
|
|
92
|
+
try {
|
|
93
|
+
const settings = parseSettings(settingsPath);
|
|
94
|
+
const currentTools = configuredTools(settings) ?? DEFAULT_TOOLS;
|
|
95
|
+
const nextTools = replaceShellTool(currentTools, enabled);
|
|
96
|
+
if (!currentTools.some((name) => SHELL_TOOLS.has(name))) {
|
|
97
|
+
nextTools.push(enabled ? "powershell" : "bash");
|
|
98
|
+
}
|
|
99
|
+
settings.defaultTools = nextTools;
|
|
100
|
+
writeFileSync(settingsPath, JSON.stringify(settings, null, 2), "utf8");
|
|
101
|
+
chmodSync(settingsPath, 0o600);
|
|
102
|
+
} finally {
|
|
103
|
+
await release();
|
|
104
|
+
}
|
|
105
|
+
return enabled;
|
|
106
|
+
}
|