@rexvane/piweb 0.3.21 → 0.3.23
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.next/BUILD_ID +1 -1
- package/.next/app-path-routes-manifest.json +9 -6
- package/.next/build-manifest.json +5 -5
- package/.next/next-minimal-server.js.nft.json +1 -1
- package/.next/next-server.js.nft.json +1 -1
- package/.next/prerender-manifest.json +7 -7
- package/.next/react-loadable-manifest.json +18 -11
- package/.next/required-server-files.js +16 -1
- package/.next/required-server-files.json +16 -1
- package/.next/routes-manifest.json +20 -0
- package/.next/server/app/_global-error/page.js +2 -2
- package/.next/server/app/_global-error/page.js.nft.json +1 -1
- package/.next/server/app/_global-error/page_client-reference-manifest.js +1 -1
- package/.next/server/app/_global-error.html +1 -1
- package/.next/server/app/_global-error.meta +8 -0
- package/.next/server/app/_global-error.rsc +15 -11
- package/.next/server/app/_global-error.segments/_full.segment.rsc +15 -11
- package/.next/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +20 -16
- package/.next/server/app/_global-error.segments/_tree.segment.rsc +3 -1
- package/.next/server/app/_not-found/page.js +1 -1
- package/.next/server/app/_not-found/page.js.nft.json +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.meta +8 -0
- package/.next/server/app/_not-found.rsc +17 -13
- package/.next/server/app/_not-found.segments/_full.segment.rsc +17 -13
- package/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +24 -20
- package/.next/server/app/_not-found.segments/_tree.segment.rsc +4 -2
- 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/[id]/side-chat/route.js +5 -0
- package/.next/server/app/api/agent/[id]/side-chat/route.js.nft.json +1 -0
- package/.next/server/app/api/agent/[id]/side-chat/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/agent/[id]/tree/route.js +1 -1
- package/.next/server/app/api/agent/[id]/tree/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/config/route.js +1 -1
- package/.next/server/app/api/config/route.js.nft.json +1 -1
- package/.next/server/app/api/files/route.js +1 -1
- package/.next/server/app/api/files/route.js.nft.json +1 -1
- package/.next/server/app/api/fs/route.js +1 -1
- package/.next/server/app/api/fs/route.js.nft.json +1 -1
- package/.next/server/app/api/git/route.js +4 -4
- package/.next/server/app/api/git/route.js.nft.json +1 -1
- package/.next/server/app/api/github/route.js +5 -0
- package/.next/server/app/api/github/route.js.nft.json +1 -0
- package/.next/server/app/api/github/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/growth/route.js +1 -1
- package/.next/server/app/api/growth/route.js.nft.json +1 -1
- package/.next/server/app/api/health/route.js +1 -1
- package/.next/server/app/api/health/route.js.nft.json +1 -1
- package/.next/server/app/api/models/defaults/route.js +1 -0
- package/.next/server/app/api/models/defaults/route.js.nft.json +1 -0
- package/.next/server/app/api/models/defaults/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/models/route.js +1 -1
- package/.next/server/app/api/models/route.js.nft.json +1 -1
- package/.next/server/app/api/pi-settings/route.js +1 -1
- package/.next/server/app/api/pi-settings/route.js.nft.json +1 -1
- package/.next/server/app/api/plugins/route.js +1 -1
- package/.next/server/app/api/plugins/route.js.nft.json +1 -1
- package/.next/server/app/api/prompts/route.js +1 -1
- package/.next/server/app/api/prompts/route.js.nft.json +1 -1
- package/.next/server/app/api/remote/route.js +4 -4
- package/.next/server/app/api/remote/route.js.nft.json +1 -1
- package/.next/server/app/api/security/route.js +1 -1
- package/.next/server/app/api/security/route.js.nft.json +1 -1
- package/.next/server/app/api/sessions/[id]/export/route.js +1 -1
- package/.next/server/app/api/sessions/[id]/export/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/import/route.js +2 -2
- package/.next/server/app/api/sessions/import/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/skills/route.js +2 -2
- package/.next/server/app/api/skills/route.js.nft.json +1 -1
- package/.next/server/app/api/update/route.js +2 -2
- package/.next/server/app/api/update/route.js.nft.json +1 -1
- package/.next/server/app/api/version/route.js +1 -1
- package/.next/server/app/api/version/route.js.nft.json +1 -1
- package/.next/server/app/api/web-auth/route.js +2 -2
- package/.next/server/app/api/web-auth/route.js.nft.json +1 -1
- package/.next/server/app/api/workspaces/route.js +1 -1
- package/.next/server/app/api/workspaces/route.js.nft.json +1 -1
- package/.next/server/app/icon.svg/route.js +1 -1
- package/.next/server/app/icon.svg/route.js.nft.json +1 -1
- package/.next/server/app/icon.svg.meta +1 -1
- package/.next/server/app/index.html +1 -1
- package/.next/server/app/index.meta +8 -0
- package/.next/server/app/index.rsc +20 -13
- package/.next/server/app/index.segments/__PAGE__.segment.rsc +26 -19
- package/.next/server/app/index.segments/_full.segment.rsc +20 -13
- package/.next/server/app/index.segments/_tree.segment.rsc +4 -2
- package/.next/server/app/login/page.js +1 -1
- package/.next/server/app/login/page.js.nft.json +1 -1
- package/.next/server/app/login/page_client-reference-manifest.js +1 -1
- package/.next/server/app/login.html +1 -1
- package/.next/server/app/login.meta +8 -0
- package/.next/server/app/login.rsc +23 -17
- package/.next/server/app/login.segments/_full.segment.rsc +23 -17
- package/.next/server/app/login.segments/_tree.segment.rsc +4 -2
- package/.next/server/app/login.segments/login/__PAGE__.segment.rsc +30 -24
- package/.next/server/app/page.js +1 -1
- package/.next/server/app/page.js.nft.json +1 -1
- package/.next/server/app/page_client-reference-manifest.js +1 -1
- package/.next/server/app-paths-manifest.json +9 -6
- package/.next/server/chunks/1813.js +23 -0
- package/.next/server/chunks/2430.js +377 -0
- package/.next/server/chunks/2970.js +305 -0
- package/.next/server/chunks/3421.js +1 -0
- package/.next/server/chunks/3924.js +6 -0
- package/.next/server/chunks/4807.js +1 -0
- package/.next/server/chunks/538.js +1 -1
- package/.next/server/chunks/5393.js +1 -0
- package/.next/server/chunks/5802.js +2 -0
- package/.next/server/chunks/6229.js +1 -0
- package/.next/server/chunks/7496.js +1 -0
- package/.next/server/chunks/7662.js +2 -0
- package/.next/server/chunks/8686.js +1 -0
- package/.next/server/chunks/{593.js → 974.js} +1 -1
- package/.next/server/chunks/{920.js → 9920.js} +2 -2
- package/.next/server/functions-config-manifest.json +2 -1
- package/.next/server/instrumentation.js +1 -1
- package/.next/server/instrumentation.js.nft.json +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 +185 -23
- package/.next/server/middleware.js.nft.json +1 -1
- package/.next/server/pages/404.html +1 -1
- package/.next/server/pages/500.html +1 -1
- package/.next/server/preview-props.json +5 -0
- package/.next/server/server-reference-manifest.json +1 -1
- package/.next/server/webpack-runtime.js +1 -1
- package/.next/static/chunks/2716.44fdf1b21454b961.js +1 -0
- package/.next/static/chunks/316-698d10eb465bd8ef.js +1 -0
- package/.next/static/chunks/3794-0978865cda773008.js +52 -0
- package/.next/static/chunks/4673.e261707dce391be7.js +1 -0
- package/.next/static/chunks/4686-0cd87513f9ea3538.js +1 -0
- package/.next/static/chunks/4778.eddd3a5813f85824.js +1 -0
- package/.next/static/chunks/4bd1b696-e199e788e58acf79.js +1 -0
- package/.next/static/chunks/{5173.91ddb803785009f8.js → 5173.dfd1cbb795b9a21c.js} +1 -1
- package/.next/static/chunks/618.949981da99be7182.js +4 -0
- package/.next/static/chunks/7411.5f79671208209b13.js +1 -0
- package/.next/static/chunks/app/_global-error/page-cbaaee0d7aacb85a.js +1 -0
- package/.next/static/chunks/app/api/agent/[id]/events/route-cbaaee0d7aacb85a.js +1 -0
- package/.next/static/chunks/app/api/agent/[id]/route-cbaaee0d7aacb85a.js +1 -0
- package/.next/static/chunks/app/api/agent/[id]/side-chat/route-cbaaee0d7aacb85a.js +1 -0
- package/.next/static/chunks/app/api/agent/[id]/tree/route-cbaaee0d7aacb85a.js +1 -0
- package/.next/static/chunks/app/api/agent/new/route-cbaaee0d7aacb85a.js +1 -0
- package/.next/static/chunks/app/api/config/route-cbaaee0d7aacb85a.js +1 -0
- package/.next/static/chunks/app/api/files/route-cbaaee0d7aacb85a.js +1 -0
- package/.next/static/chunks/app/api/fs/route-cbaaee0d7aacb85a.js +1 -0
- package/.next/static/chunks/app/api/git/route-cbaaee0d7aacb85a.js +1 -0
- package/.next/static/chunks/app/api/github/route-cbaaee0d7aacb85a.js +1 -0
- package/.next/static/chunks/app/api/growth/route-cbaaee0d7aacb85a.js +1 -0
- package/.next/static/chunks/app/api/health/route-cbaaee0d7aacb85a.js +1 -0
- package/.next/static/chunks/app/api/models/defaults/route-cbaaee0d7aacb85a.js +1 -0
- package/.next/static/chunks/app/api/models/route-cbaaee0d7aacb85a.js +1 -0
- package/.next/static/chunks/app/api/pi-settings/route-cbaaee0d7aacb85a.js +1 -0
- package/.next/static/chunks/app/api/plugins/route-cbaaee0d7aacb85a.js +1 -0
- package/.next/static/chunks/app/api/prompts/route-cbaaee0d7aacb85a.js +1 -0
- package/.next/static/chunks/app/api/remote/route-cbaaee0d7aacb85a.js +1 -0
- package/.next/static/chunks/app/api/security/route-cbaaee0d7aacb85a.js +1 -0
- package/.next/static/chunks/app/api/sessions/[id]/export/route-cbaaee0d7aacb85a.js +1 -0
- package/.next/static/chunks/app/api/sessions/[id]/route-cbaaee0d7aacb85a.js +1 -0
- package/.next/static/chunks/app/api/sessions/import/route-cbaaee0d7aacb85a.js +1 -0
- package/.next/static/chunks/app/api/sessions/route-cbaaee0d7aacb85a.js +1 -0
- package/.next/static/chunks/app/api/skills/route-cbaaee0d7aacb85a.js +1 -0
- package/.next/static/chunks/app/api/update/route-cbaaee0d7aacb85a.js +1 -0
- package/.next/static/chunks/app/api/version/route-cbaaee0d7aacb85a.js +1 -0
- package/.next/static/chunks/app/api/web-auth/route-cbaaee0d7aacb85a.js +1 -0
- package/.next/static/chunks/app/api/workspaces/route-cbaaee0d7aacb85a.js +1 -0
- package/.next/static/chunks/app/page-dc3cb41d91c7432e.js +1 -0
- package/.next/static/chunks/framework-47b723d27f4a4963.js +1 -0
- package/.next/static/chunks/main-5403f0764579e5fe.js +5 -0
- package/.next/static/chunks/next/dist/client/components/builtin/app-error-cbaaee0d7aacb85a.js +1 -0
- package/.next/static/chunks/next/dist/client/components/builtin/forbidden-cbaaee0d7aacb85a.js +1 -0
- package/.next/static/chunks/next/dist/client/components/builtin/not-found-cbaaee0d7aacb85a.js +1 -0
- package/.next/static/chunks/next/dist/client/components/builtin/unauthorized-cbaaee0d7aacb85a.js +1 -0
- package/.next/static/chunks/webpack-2ac3d76b81895f5b.js +1 -0
- package/.next/static/css/9fc559c2c4ad1d0f.css +1 -0
- package/.next/static/css/c6e2227c36ec2fd6.css +1 -0
- package/.next/static/css/{2959bd6b626b7ffe.css → f15a853af8b5127f.css} +1 -1
- package/.next/static/hYPL1-dmhKFjLS3f5yoqN/_buildManifest.js +1 -0
- package/.next/types/app/api/agent/[id]/events/route.ts +3 -1
- package/.next/types/app/api/agent/[id]/route.ts +3 -1
- package/.next/types/app/api/agent/[id]/side-chat/route.ts +355 -0
- package/.next/types/app/api/agent/[id]/tree/route.ts +3 -1
- package/.next/types/app/api/agent/new/route.ts +3 -1
- package/.next/types/app/api/config/route.ts +3 -1
- package/.next/types/app/api/files/route.ts +3 -1
- package/.next/types/app/api/fs/route.ts +3 -1
- package/.next/types/app/api/git/route.ts +3 -1
- package/.next/types/app/api/github/route.ts +355 -0
- package/.next/types/app/api/growth/route.ts +3 -1
- package/.next/types/app/api/health/route.ts +3 -1
- package/.next/types/app/api/models/defaults/route.ts +355 -0
- package/.next/types/app/api/models/route.ts +3 -1
- package/.next/types/app/api/pi-settings/route.ts +3 -1
- package/.next/types/app/api/plugins/route.ts +3 -1
- package/.next/types/app/api/prompts/route.ts +3 -1
- package/.next/types/app/api/remote/route.ts +3 -1
- package/.next/types/app/api/security/route.ts +3 -1
- package/.next/types/app/api/sessions/[id]/export/route.ts +3 -1
- package/.next/types/app/api/sessions/[id]/route.ts +3 -1
- package/.next/types/app/api/sessions/import/route.ts +3 -1
- package/.next/types/app/api/sessions/route.ts +3 -1
- package/.next/types/app/api/skills/route.ts +3 -1
- package/.next/types/app/api/update/route.ts +3 -1
- package/.next/types/app/api/version/route.ts +3 -1
- package/.next/types/app/api/web-auth/route.ts +3 -1
- package/.next/types/app/api/workspaces/route.ts +3 -1
- package/.next/types/app/layout.ts +4 -1
- package/.next/types/app/login/page.ts +4 -1
- package/.next/types/app/page.ts +4 -1
- package/.next/types/cache-life.d.ts +11 -43
- package/.next/types/routes.d.ts +4 -1
- package/.next/types/validator.ts +86 -2
- package/next.config.ts +2 -0
- package/package.json +8 -2
- package/scripts/release.mjs +3 -7
- package/scripts/runtime/check-installed.mjs +66 -0
- package/scripts/runtime/pi-packages.mjs +51 -0
- package/scripts/verify-package.mjs +29 -7
- package/src/app/api/agent/[id]/side-chat/route.ts +77 -0
- package/src/app/api/files/route.ts +5 -2
- package/src/app/api/github/route.ts +26 -0
- package/src/app/api/models/defaults/route.ts +18 -0
- package/src/app/api/models/route.ts +24 -1
- package/src/app/globals.css +1748 -0
- package/src/components/AppShell.tsx +145 -43
- package/src/components/ChatInput.tsx +264 -79
- package/src/components/ChatWindow.tsx +13 -23
- package/src/components/ContextMeter.tsx +213 -144
- package/src/components/DrawerPanel.tsx +1 -1
- package/src/components/FileViewer.tsx +89 -8
- package/src/components/GitPanel.tsx +110 -40
- package/src/components/GrowthTree.tsx +30 -5
- package/src/components/ModelSelector.tsx +21 -5
- package/src/components/ProjectPanel.tsx +55 -30
- package/src/components/PromptPanel.tsx +2 -4
- package/src/components/ProviderSetupModal.module.css +20 -0
- package/src/components/ProviderSetupModal.tsx +134 -29
- package/src/components/SettingsPanel.tsx +252 -27
- package/src/components/TrajectoryView.tsx +4 -6
- package/src/components/chat/reading-anchor.ts +81 -0
- package/src/components/composer/ComposerImages.tsx +326 -0
- package/src/components/side-chat/SideChatPanel.module.css +131 -0
- package/src/components/side-chat/SideChatPanel.tsx +189 -0
- package/src/components/side-chat/icons.tsx +8 -0
- package/src/components/side-chat/request-history.ts +29 -0
- package/src/components/side-chat/store.ts +248 -0
- package/src/hooks/useFileViewer.ts +6 -4
- package/src/hooks/useGrowth.ts +3 -0
- package/src/hooks/usePiWeb.ts +12 -2
- package/src/hooks/useWorkspaceFiles.ts +93 -0
- package/src/i18n.tsx +150 -2
- package/src/lib/agent-manager.ts +135 -104
- package/src/lib/files-service.ts +166 -3
- package/src/lib/format.ts +56 -0
- package/src/lib/git-service.ts +45 -13
- package/src/lib/github-identity.ts +245 -0
- package/src/lib/growth-service.ts +6 -2
- package/src/lib/hero-model-memory.ts +28 -0
- package/src/lib/model-defaults.ts +105 -0
- package/src/lib/model-draft.ts +257 -9
- package/src/lib/model-endpoint.ts +23 -0
- package/src/lib/model-files.ts +33 -0
- package/src/lib/models-service.ts +240 -78
- package/src/lib/path-security.ts +24 -32
- package/src/lib/pi.ts +27 -2
- package/src/lib/process-format.ts +3 -2
- package/src/lib/session/metrics.ts +31 -0
- package/src/lib/session-reader.ts +1 -1
- package/src/lib/side-chat/context.ts +123 -0
- package/src/lib/side-chat/service.ts +191 -0
- package/src/lib/side-chat/types.ts +61 -0
- package/src/lib/thinking-level.ts +39 -0
- package/src/lib/trajectory.ts +17 -3
- package/src/lib/types.ts +12 -1
- package/src/lib/update-service.ts +4 -6
- package/src/lib/workspace-index.ts +270 -0
- package/.next/server/chunks/229.js +0 -1
- package/.next/server/chunks/393.js +0 -1
- package/.next/server/chunks/421.js +0 -1
- package/.next/server/chunks/430.js +0 -193
- package/.next/server/chunks/496.js +0 -1
- package/.next/server/chunks/662.js +0 -2
- package/.next/server/chunks/686.js +0 -1
- package/.next/server/chunks/741.js +0 -165
- package/.next/server/chunks/802.js +0 -2
- package/.next/server/chunks/807.js +0 -1
- package/.next/server/chunks/813.js +0 -1
- package/.next/server/chunks/924.js +0 -6
- package/.next/static/chunks/2716.7ad073038e94a802.js +0 -1
- package/.next/static/chunks/316-5ea443ee6b512aa9.js +0 -1
- package/.next/static/chunks/3794-3679f1c05160977c.js +0 -52
- package/.next/static/chunks/4673.8a5a9e6855350e34.js +0 -1
- package/.next/static/chunks/4686-882531aef1d2e250.js +0 -1
- package/.next/static/chunks/4778.305dc6abb9889627.js +0 -1
- package/.next/static/chunks/4bd1b696-93bf506b236d6248.js +0 -1
- package/.next/static/chunks/618.ee5d5bf1c647e483.js +0 -4
- package/.next/static/chunks/839.bfd2db36483faa3e.js +0 -1
- package/.next/static/chunks/app/_global-error/page-b179d9f7f6f2daf9.js +0 -1
- package/.next/static/chunks/app/api/agent/[id]/events/route-b179d9f7f6f2daf9.js +0 -1
- package/.next/static/chunks/app/api/agent/[id]/route-b179d9f7f6f2daf9.js +0 -1
- package/.next/static/chunks/app/api/agent/[id]/tree/route-b179d9f7f6f2daf9.js +0 -1
- package/.next/static/chunks/app/api/agent/new/route-b179d9f7f6f2daf9.js +0 -1
- package/.next/static/chunks/app/api/config/route-b179d9f7f6f2daf9.js +0 -1
- package/.next/static/chunks/app/api/files/route-b179d9f7f6f2daf9.js +0 -1
- package/.next/static/chunks/app/api/fs/route-b179d9f7f6f2daf9.js +0 -1
- package/.next/static/chunks/app/api/git/route-b179d9f7f6f2daf9.js +0 -1
- package/.next/static/chunks/app/api/growth/route-b179d9f7f6f2daf9.js +0 -1
- package/.next/static/chunks/app/api/health/route-b179d9f7f6f2daf9.js +0 -1
- package/.next/static/chunks/app/api/models/route-b179d9f7f6f2daf9.js +0 -1
- package/.next/static/chunks/app/api/pi-settings/route-b179d9f7f6f2daf9.js +0 -1
- package/.next/static/chunks/app/api/plugins/route-b179d9f7f6f2daf9.js +0 -1
- package/.next/static/chunks/app/api/prompts/route-b179d9f7f6f2daf9.js +0 -1
- package/.next/static/chunks/app/api/remote/route-b179d9f7f6f2daf9.js +0 -1
- package/.next/static/chunks/app/api/security/route-b179d9f7f6f2daf9.js +0 -1
- package/.next/static/chunks/app/api/sessions/[id]/export/route-b179d9f7f6f2daf9.js +0 -1
- package/.next/static/chunks/app/api/sessions/[id]/route-b179d9f7f6f2daf9.js +0 -1
- package/.next/static/chunks/app/api/sessions/import/route-b179d9f7f6f2daf9.js +0 -1
- package/.next/static/chunks/app/api/sessions/route-b179d9f7f6f2daf9.js +0 -1
- package/.next/static/chunks/app/api/skills/route-b179d9f7f6f2daf9.js +0 -1
- package/.next/static/chunks/app/api/update/route-b179d9f7f6f2daf9.js +0 -1
- package/.next/static/chunks/app/api/version/route-b179d9f7f6f2daf9.js +0 -1
- package/.next/static/chunks/app/api/web-auth/route-b179d9f7f6f2daf9.js +0 -1
- package/.next/static/chunks/app/api/workspaces/route-b179d9f7f6f2daf9.js +0 -1
- package/.next/static/chunks/app/page-c04af72e549695bd.js +0 -1
- package/.next/static/chunks/framework-c4e651fe89edfa91.js +0 -1
- package/.next/static/chunks/main-6159b22a8cb0b7c5.js +0 -5
- package/.next/static/chunks/next/dist/client/components/builtin/app-error-b179d9f7f6f2daf9.js +0 -1
- package/.next/static/chunks/next/dist/client/components/builtin/forbidden-b179d9f7f6f2daf9.js +0 -1
- package/.next/static/chunks/next/dist/client/components/builtin/not-found-b179d9f7f6f2daf9.js +0 -1
- package/.next/static/chunks/next/dist/client/components/builtin/unauthorized-b179d9f7f6f2daf9.js +0 -1
- package/.next/static/chunks/webpack-9b4bb574e5817654.js +0 -1
- package/.next/static/css/ea27b9e30f76303f.css +0 -1
- package/.next/static/sNX5GQkOWuK5YEID1hT-C/_buildManifest.js +0 -1
- /package/.next/static/{sNX5GQkOWuK5YEID1hT-C → hYPL1-dmhKFjLS3f5yoqN}/_ssgManifest.js +0 -0
|
@@ -0,0 +1,270 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @ 引用的候选与匹配(纯逻辑,便于单测):照搬 pi 终端的 `@` 补全
|
|
3
|
+
* (pi-tui `CombinedAutocompleteProvider.getFuzzyFileSuggestions` + `extractAtPrefix`),
|
|
4
|
+
* 同一个 `@que` 在终端和网页里给出同一批、同一顺序的候选。
|
|
5
|
+
*
|
|
6
|
+
* pi 的做法:`@` 后的文字按最后一个 `/` 拆成「目录 + 查询」(目录存在才算),
|
|
7
|
+
* 在该目录下用 fd 过滤(查询当正则、smart case,默认只匹配文件名,带 `/` 时匹配整条路径),
|
|
8
|
+
* 再用 scoreEntry 打分(文件名全等 100 / 前缀 80 / 包含 50 / 路径包含 30,目录 +10),
|
|
9
|
+
* 按分数、层级、路径长度、字典序排,取前 20。
|
|
10
|
+
*
|
|
11
|
+
* 有意的差别(tests/mention-parity.test.ts 里逐条对照,差别也写在那里):
|
|
12
|
+
* - 候选来自服务端给的工作区清单(git 可见文件 + 推导出的文件夹),不现场跑 fd;
|
|
13
|
+
* pi 每次 fd 只取前 100 条再打分,这里对整份清单打分——结果是「fd 不截断时 pi 会给的」,而且稳定。
|
|
14
|
+
* - 不支持 `~/`、绝对路径和跳出工作区的 `../`:引用只针对当前工作区。
|
|
15
|
+
* - fd 的 `--full-path` 匹配绝对路径,这里匹配相对路径(只差在工作区自身路径恰好命中的极端情况)。
|
|
16
|
+
*/
|
|
17
|
+
|
|
18
|
+
export interface PathCandidate {
|
|
19
|
+
/** 工作区根的相对路径("/" 分隔),目录不带尾斜杠 */
|
|
20
|
+
path: string;
|
|
21
|
+
dir: boolean;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
/** 显示用:目录带尾斜杠 */
|
|
25
|
+
export function candidateText(candidate: PathCandidate): string {
|
|
26
|
+
return candidate.dir ? `${candidate.path}/` : candidate.path;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
/** 文件路径 → 全部父目录(去重、不含 ".") */
|
|
30
|
+
export function dirsOfPaths(files: string[]): string[] {
|
|
31
|
+
const dirs = new Set<string>();
|
|
32
|
+
for (const file of files) {
|
|
33
|
+
const parts = file.split("/");
|
|
34
|
+
for (let i = 1; i < parts.length; i += 1) dirs.add(parts.slice(0, i).join("/"));
|
|
35
|
+
}
|
|
36
|
+
return [...dirs];
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export function buildCandidates(files: string[], dirs: string[]): PathCandidate[] {
|
|
40
|
+
const out: PathCandidate[] = [];
|
|
41
|
+
for (const dir of dirs) out.push({ path: dir, dir: true });
|
|
42
|
+
for (const file of files) out.push({ path: file, dir: false });
|
|
43
|
+
return out;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
// ---------- 匹配与排序(pi-tui autocomplete.js) ----------
|
|
47
|
+
|
|
48
|
+
/** pi 一次最多列 20 条 */
|
|
49
|
+
export const MENTION_LIMIT = 20;
|
|
50
|
+
|
|
51
|
+
export interface MentionSuggestion {
|
|
52
|
+
candidate: PathCandidate;
|
|
53
|
+
/** 文件名,目录带尾斜杠(pi 的 label) */
|
|
54
|
+
label: string;
|
|
55
|
+
/** 路径(pi 的 description):按用户打的目录前缀显示,如 `./src/lib` */
|
|
56
|
+
description: string;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
function toDisplayPath(value: string): string {
|
|
60
|
+
return value.replace(/\\/g, "/");
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
function baseName(path: string): string {
|
|
64
|
+
const trimmed = path.replace(/\/+$/, "");
|
|
65
|
+
return trimmed.slice(trimmed.lastIndexOf("/") + 1);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
function escapeRegex(value: string): string {
|
|
69
|
+
return value.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
/** pi 的 buildFdPathQuery:带 `/` 的查询按段转义、段间允许 `/` 或 `\` */
|
|
73
|
+
function buildFdPathQuery(query: string): string {
|
|
74
|
+
const normalized = toDisplayPath(query);
|
|
75
|
+
if (!normalized.includes("/")) return normalized;
|
|
76
|
+
const trimmed = normalized.replace(/^\/+|\/+$/g, "");
|
|
77
|
+
if (!trimmed) return normalized;
|
|
78
|
+
const segments = trimmed.split("/").filter(Boolean).map(escapeRegex);
|
|
79
|
+
if (!segments.length) return normalized;
|
|
80
|
+
const separator = "[\\\\/]";
|
|
81
|
+
return segments.join(separator) + (normalized.endsWith("/") ? separator : "");
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
/**
|
|
85
|
+
* fd 的过滤:模式当正则,smart case(模式里有大写字母才区分大小写,转义序列如 `\W` 不算)。
|
|
86
|
+
* fd 用的是 Rust 正则,`c++` 这种叠加量词它能编(等于 `(c+)+`),JS 会报错:
|
|
87
|
+
* 编不过就退回字面包含——之后 scoreEntry 本来就要求查询按字面出现,所以 `c++` 的结果和 pi 一样;
|
|
88
|
+
* Rust 也编不过的(未闭合的括号等)pi 没有候选,这里按字面给,算有意放宽。
|
|
89
|
+
*/
|
|
90
|
+
function fdFilter(pattern: string): (target: string) => boolean {
|
|
91
|
+
const caseSensitive = /\p{Lu}/u.test(pattern.replace(/\\./g, ""));
|
|
92
|
+
try {
|
|
93
|
+
const regex = new RegExp(pattern, caseSensitive ? "" : "i");
|
|
94
|
+
return (target) => regex.test(target);
|
|
95
|
+
} catch {
|
|
96
|
+
const literal = caseSensitive ? pattern : pattern.toLowerCase();
|
|
97
|
+
return (target) => (caseSensitive ? target : target.toLowerCase()).includes(literal);
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
/** pi 的 scoreEntry:文件名全等 100 / 前缀 80 / 包含 50 / 整条路径包含 30,目录命中再 +10 */
|
|
102
|
+
export function scoreEntry(filePath: string, query: string, isDirectory: boolean): number {
|
|
103
|
+
const lowerFileName = baseName(filePath).toLowerCase();
|
|
104
|
+
const lowerQuery = query.toLowerCase();
|
|
105
|
+
let score = 0;
|
|
106
|
+
if (lowerFileName === lowerQuery) score = 100;
|
|
107
|
+
else if (lowerFileName.startsWith(lowerQuery)) score = 80;
|
|
108
|
+
else if (lowerFileName.includes(lowerQuery)) score = 50;
|
|
109
|
+
else if (filePath.toLowerCase().includes(lowerQuery)) score = 30;
|
|
110
|
+
if (isDirectory && score > 0) score += 10;
|
|
111
|
+
return score;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
/**
|
|
115
|
+
* pi 的 resolveScopedFuzzyQuery:最后一个 `/` 之前是目录(必须存在),之后是查询。
|
|
116
|
+
* 返回 base = 工作区相对路径("" 为根),displayBase = 用户打的原样前缀。
|
|
117
|
+
*/
|
|
118
|
+
function resolveScopedQuery(rawQuery: string, dirs: ReadonlySet<string>): { base: string; query: string; displayBase: string } | null {
|
|
119
|
+
const normalized = toDisplayPath(rawQuery);
|
|
120
|
+
const slash = normalized.lastIndexOf("/");
|
|
121
|
+
if (slash === -1) return null;
|
|
122
|
+
const displayBase = normalized.slice(0, slash + 1);
|
|
123
|
+
if (displayBase.startsWith("/") || displayBase.startsWith("~/")) return null;
|
|
124
|
+
const segments: string[] = [];
|
|
125
|
+
for (const segment of displayBase.split("/")) {
|
|
126
|
+
if (!segment || segment === ".") continue;
|
|
127
|
+
if (segment === "..") {
|
|
128
|
+
if (!segments.length) return null;
|
|
129
|
+
segments.pop();
|
|
130
|
+
} else segments.push(segment);
|
|
131
|
+
}
|
|
132
|
+
const base = segments.join("/");
|
|
133
|
+
if (base && !dirs.has(base)) return null;
|
|
134
|
+
return { base, query: normalized.slice(slash + 1), displayBase };
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
interface Entry {
|
|
138
|
+
candidate: PathCandidate;
|
|
139
|
+
/** 相对 fd 搜索目录的路径,目录带尾斜杠(和 fd 的输出一致,长度和字典序都按它算) */
|
|
140
|
+
path: string;
|
|
141
|
+
score: number;
|
|
142
|
+
depth: number;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
/**
|
|
146
|
+
* 候选排序与截断,和 pi 一致:空查询全部 1 分,按层级 → 路径长度 → 字典序(先看当前目录、名字短的在前)。
|
|
147
|
+
* 不在模块里缓存目录集合:调用方用 useMemo 包住整次计算。
|
|
148
|
+
*/
|
|
149
|
+
export function suggestPaths(candidates: readonly PathCandidate[], rawQuery: string, limit = MENTION_LIMIT): MentionSuggestion[] {
|
|
150
|
+
const dirs = new Set<string>();
|
|
151
|
+
for (const candidate of candidates) if (candidate.dir) dirs.add(candidate.path);
|
|
152
|
+
const scoped = resolveScopedQuery(rawQuery, dirs);
|
|
153
|
+
const query = scoped ? scoped.query : rawQuery;
|
|
154
|
+
const prefix = scoped?.base ? `${scoped.base}/` : "";
|
|
155
|
+
|
|
156
|
+
let filter: ((relative: string) => boolean) | null = null;
|
|
157
|
+
if (query) {
|
|
158
|
+
// 默认只拿文件名去匹配;查询带 `/` 时(目录不存在、没走上面的限定目录)匹配整条路径
|
|
159
|
+
const fullPath = toDisplayPath(query).includes("/");
|
|
160
|
+
const matches = fdFilter(buildFdPathQuery(query));
|
|
161
|
+
filter = fullPath ? matches : (relative) => matches(baseName(relative));
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
const entries: Entry[] = [];
|
|
165
|
+
for (const candidate of candidates) {
|
|
166
|
+
if (prefix && !candidate.path.startsWith(prefix)) continue;
|
|
167
|
+
const relative = candidate.path.slice(prefix.length);
|
|
168
|
+
if (!relative || (filter && !filter(relative))) continue;
|
|
169
|
+
const path = candidate.dir ? `${relative}/` : relative;
|
|
170
|
+
const score = query ? scoreEntry(path, query, candidate.dir) : 1;
|
|
171
|
+
if (score <= 0) continue;
|
|
172
|
+
entries.push({ candidate, path, score, depth: relative.split("/").filter(Boolean).length });
|
|
173
|
+
}
|
|
174
|
+
entries.sort((a, b) => b.score - a.score || a.depth - b.depth || a.path.length - b.path.length || a.path.localeCompare(b.path));
|
|
175
|
+
|
|
176
|
+
return entries.slice(0, limit).map(({ candidate, path }) => {
|
|
177
|
+
const withoutSlash = candidate.dir ? path.slice(0, -1) : path;
|
|
178
|
+
return {
|
|
179
|
+
candidate,
|
|
180
|
+
label: baseName(withoutSlash) + (candidate.dir ? "/" : ""),
|
|
181
|
+
description: scoped ? `${scoped.displayBase}${withoutSlash}` : withoutSlash,
|
|
182
|
+
};
|
|
183
|
+
});
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
// ---------- @ token(pi-tui extractAtPrefix) ----------
|
|
187
|
+
|
|
188
|
+
/** pi 的 PATH_DELIMITERS */
|
|
189
|
+
const PATH_DELIMITERS = new Set([" ", "\t", '"', "'", "="]);
|
|
190
|
+
/** pi-tui utils.js 的 cjkBreakRegex / cjkPunctuationRegex / autocompleteSeparatorRegex(原样抄来,测试里核对 source) */
|
|
191
|
+
export const CJK_BREAK_REGEX = /[\p{Script_Extensions=Han}\p{Script_Extensions=Hiragana}\p{Script_Extensions=Katakana}\p{Script_Extensions=Hangul}\p{Script_Extensions=Bopomofo}]/u;
|
|
192
|
+
const CJK_PUNCTUATION_REGEX = new RegExp(`(?:(?=\\p{Punctuation})${CJK_BREAK_REGEX.source}|[,.:;!?()[]{}“”‘’…—])`, "u");
|
|
193
|
+
export const AUTOCOMPLETE_SEPARATOR_REGEX = new RegExp(`(?:\\s|${CJK_PUNCTUATION_REGEX.source})`, "u");
|
|
194
|
+
const TOKEN_START_REGEX = new RegExp(`(?:^|${AUTOCOMPLETE_SEPARATOR_REGEX.source})$`, "u");
|
|
195
|
+
/** 正文里路径前常见的左括号类:`(@src` 也能触发;token 里有对应的右括号就保留(`app/[slug]`) */
|
|
196
|
+
const PATH_WRAPPERS: Record<string, string> = { "(": ")", "[": "]", "{": "}", "<": ">", "`": "`" };
|
|
197
|
+
|
|
198
|
+
function isDelimiter(character: string): boolean {
|
|
199
|
+
return PATH_DELIMITERS.has(character) || AUTOCOMPLETE_SEPARATOR_REGEX.test(character);
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
/** 最后一个分隔符的位置(按码点走,返回它最后一个 UTF-16 单元的下标),没有则 -1 */
|
|
203
|
+
function findLastDelimiter(text: string): number {
|
|
204
|
+
let last = -1;
|
|
205
|
+
let index = 0;
|
|
206
|
+
for (const character of text) {
|
|
207
|
+
index += character.length;
|
|
208
|
+
if (isDelimiter(character)) last = index - 1;
|
|
209
|
+
}
|
|
210
|
+
return last;
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
function stripLeadingWrappers(token: string): string {
|
|
214
|
+
let result = token;
|
|
215
|
+
while (result.length > 0) {
|
|
216
|
+
const closer = PATH_WRAPPERS[result[0]];
|
|
217
|
+
if (!closer || result.includes(closer, 1)) break;
|
|
218
|
+
result = result.slice(1);
|
|
219
|
+
}
|
|
220
|
+
return result;
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
function findUnclosedQuoteStart(text: string): number | null {
|
|
224
|
+
let inQuotes = false;
|
|
225
|
+
let quoteStart = -1;
|
|
226
|
+
for (let i = 0; i < text.length; i += 1) {
|
|
227
|
+
if (text[i] === '"') {
|
|
228
|
+
inQuotes = !inQuotes;
|
|
229
|
+
if (inQuotes) quoteStart = i;
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
return inQuotes ? quoteStart : null;
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
function isTokenStart(text: string, index: number): boolean {
|
|
236
|
+
let start = index;
|
|
237
|
+
while (start > 0 && PATH_WRAPPERS[text[start - 1]]) start -= 1;
|
|
238
|
+
return PATH_DELIMITERS.has(text[start - 1] ?? "") || TOKEN_START_REGEX.test(text.slice(0, start));
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
/**
|
|
242
|
+
* 光标前的 `@` 引用 token,规则同 pi:
|
|
243
|
+
* 从最后一个分隔符(空白、`"` `'` `=`、中日韩标点)之后取一段,去掉开头的左括号类,以 `@` 开头才算
|
|
244
|
+
* (`foo@bar` 这种邮箱不触发);另支持 `@"带空格 的路径`。返回 null 表示当前不该弹候选。
|
|
245
|
+
* pi 只看光标所在的那一行;光标在 token 中间时(`@lib|bar`)删除范围盖住整个 token,免得留下半截。
|
|
246
|
+
*/
|
|
247
|
+
export function atToken(text: string, caret: number): { query: string; start: number; end: number; tokenEnd: number } | null {
|
|
248
|
+
const end = Math.max(0, Math.min(caret, text.length));
|
|
249
|
+
const lineStart = text.lastIndexOf("\n", end - 1) + 1;
|
|
250
|
+
const line = text.slice(lineStart, end);
|
|
251
|
+
|
|
252
|
+
const quoteStart = findUnclosedQuoteStart(line);
|
|
253
|
+
if (quoteStart !== null && quoteStart > 0 && line[quoteStart - 1] === "@" && isTokenStart(line, quoteStart - 1)) {
|
|
254
|
+
const close = text.indexOf('"', end);
|
|
255
|
+
const lineEnd = text.indexOf("\n", end);
|
|
256
|
+
const closed = close !== -1 && (lineEnd === -1 || close < lineEnd);
|
|
257
|
+
return { query: line.slice(quoteStart + 1), start: lineStart + quoteStart - 1, end, tokenEnd: closed ? close + 1 : end };
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
const tokenStart = findLastDelimiter(line) + 1;
|
|
261
|
+
const raw = line.slice(tokenStart);
|
|
262
|
+
const token = stripLeadingWrappers(raw);
|
|
263
|
+
if (!token.startsWith("@")) return null;
|
|
264
|
+
let tokenEnd = end;
|
|
265
|
+
for (const character of text.slice(end)) {
|
|
266
|
+
if (isDelimiter(character)) break;
|
|
267
|
+
tokenEnd += character.length;
|
|
268
|
+
}
|
|
269
|
+
return { query: token.slice(1), start: lineStart + tokenStart + raw.length - token.length, end, tokenEnd };
|
|
270
|
+
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";exports.id=229,exports.ids=[229],exports.modules={66229:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.d(b,{GW:()=>t,deleteSession:()=>u,lx:()=>v});var e=c(73024),f=c(51455),g=c.n(f),h=c(76760),i=c.n(h),j=c(80481),k=c(75430),l=c(28686),m=c(87982),n=c(62433),o=a([k,l,m,n]);async function p(a,b){try{var c;let d,f,g=null,h=0,i="";for await(let b of(0,j.createInterface)({input:(0,e.createReadStream)(a,{encoding:"utf8"}),crlfDelay:1/0})){let a;if(!b.trim())continue;try{a=JSON.parse(b)}catch{continue}if(!g){if(a?.type!=="session")return null;g=a;continue}if(a?.type==="session_info"&&(d="string"==typeof a.name&&a.name.trim()?a.name.trim():void 0),a?.type!=="message")continue;h+=1;let c=a.message;if(!c||"string"!=typeof c.role||!("content"in c)||"user"!==c.role&&"assistant"!==c.role)continue;let e="number"==typeof c.timestamp?c.timestamp:new Date(a.timestamp).getTime();if(Number.isFinite(e)&&(f=Math.max(f??0,e)),!i&&"user"===c.role){let a=c.content;i="string"==typeof a?a:Array.isArray(a)?a.filter(a=>a?.type==="text").map(a=>a.text).join(" "):""}}if(!g)return null;let k="string"==typeof g.timestamp?new Date(g.timestamp).getTime():NaN,l=f&&f>0?new Date(f):Number.isNaN(k)?b.mtime:new Date(k);return{path:(c={path:a,name:d,cwd:"string"==typeof g.cwd?g.cwd:"",created:new Date(String(g.timestamp)),modified:l,messageCount:h,firstMessage:function(a){if(a.length<=300)return a;let b=300,c=a.charCodeAt(b-1);return c>=55296&&c<=56319&&(b-=1),`${a.slice(0,b)}…`}(i)||"(no messages)"}).path,name:c.name,cwd:c.cwd,created:c.created.toISOString(),modified:c.modified.toISOString(),messageCount:c.messageCount,firstMessage:c.firstMessage}}catch{return null}}[k,l,m,n]=o.then?(await o)():o;let w=new Map,x=null,y=null,z=!1,A=null;async function q(){let a=i().join((0,m.$M)(),"piweb-session-index.json");if(y!==a){y=a,w.clear();try{let b=JSON.parse(await g().readFile(a,"utf8"));if(b?.version!==2||!b.entries||"object"!=typeof b.entries||Array.isArray(b.entries))return;for(let[a,c]of Object.entries(b.entries)){if(!Array.isArray(c)||3!==c.length)continue;let[b,d,e]=c;"number"==typeof b&&"number"==typeof d&&w.set(a,{mtimeMs:b,size:d,summary:e&&"object"==typeof e?e:null})}}catch{}}}async function r(){if(!z)return;z=!1;let a=y;if(!a)return;let b={};for(let[a,c]of[...w.entries()].sort((a,b)=>b[1].mtimeMs-a[1].mtimeMs).slice(0,5e3))b[a]=[c.mtimeMs,c.size,c.summary];try{await g().mkdir(i().dirname(a),{recursive:!0});let c=`${a}.${process.pid}.tmp`;try{await g().writeFile(c,JSON.stringify({version:2,entries:b}),"utf8"),await g().rename(c,a)}finally{await g().rm(c,{force:!0}).catch(()=>void 0)}}catch{}}async function s(){let a=i().join((0,m.$M)(),"sessions"),b=[],c=[];try{c=await g().readdir(a,{withFileTypes:!0})}catch{return[]}await Promise.all(c.filter(a=>a.isDirectory()||a.isSymbolicLink()).map(async c=>{try{for(let d of(await g().readdir(i().join(a,c.name))))d.endsWith(".jsonl")&&b.push(i().join(a,c.name,d))}catch{}}));let d=new Set,e=[],f=!1;for(let a=0;a<b.length;a+=16)await Promise.all(b.slice(a,a+16).map(async a=>{d.add(a);let b=await g().stat(a).catch(()=>null);if(!b?.isFile())return;let c=w.get(a);if(c&&c.mtimeMs===b.mtimeMs&&c.size===b.size){c.summary&&e.push(c.summary);return}let h=await p(a,b);w.set(a,{mtimeMs:b.mtimeMs,size:b.size,summary:h}),f=!0,h&&e.push(h)}));for(let a of w.keys())d.has(a)||(w.delete(a),f=!0);return f&&(z=!0,A||(A=setTimeout(()=>{A=null,r()},1500),A.unref?.())),e}let B=null;async function t(a){let b;if(B&&Date.now()-B.at<1200?b=B.list:(await q(),x??=s().finally(()=>{x=null}),b=await x,B={at:Date.now(),list:b}),a?.trim()){let c=a.trim().toLowerCase();b=b.filter(a=>a.name?.toLowerCase().includes(c)||a.firstMessage.toLowerCase().includes(c)||a.cwd.toLowerCase().includes(c))}return b.sort((a,b)=>b.modified.localeCompare(a.modified)||a.path.localeCompare(b.path)),b}async function u(a){let b=i().join((0,m.$M)(),"sessions"),c=await g().realpath(b).catch(()=>i().resolve(b)),d=i().resolve(a);if(".jsonl"!==i().extname(d).toLowerCase()||!(0,n.CN)(i().resolve(b),d))throw new n.BV("session path is outside the Pi session store");let e=await g().realpath(d).catch(a=>{if("ENOENT"===a.code)return d;throw a});if(e!==d&&!(0,n.CN)(c,e))throw new n.BV("session path escapes the Pi session store");try{await g().unlink(d)}catch(a){if("ENOENT"!==a.code)throw a}}async function v(a){let b=k.SessionManager.open(a),c=[];try{c=b.buildContextEntries().filter(a=>"message"===a.type&&a.message).map(a=>(0,l.H$)(a.message,a.id))}catch{c=[]}let d="";try{d=b.getSessionName?.()??""}catch{d=""}return{cwd:b.getCwd(),name:d,messages:c}}d()}catch(a){d(a)}})}};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";exports.id=393,exports.ids=[393],exports.modules={75393:(a,b,c)=>{function d(a=process.env){let b=(a.PI_WEB_AUTH??"").trim().toLowerCase();return"1"===b||"true"===b||"on"===b||"yes"===b}c.d(b,{authEnabled:()=>d}),c(77598)}};
|