@rexvane/piweb 0.3.20 → 0.3.22
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.next/BUILD_ID +1 -1
- package/.next/app-path-routes-manifest.json +6 -4
- 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 +12 -12
- package/.next/required-server-files.js +18 -2
- package/.next/required-server-files.json +18 -2
- package/.next/routes-manifest.json +12 -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 +3 -3
- 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]/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 +3 -3
- 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 +1 -1
- 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 +19 -13
- package/.next/server/app/index.segments/__PAGE__.segment.rsc +25 -19
- package/.next/server/app/index.segments/_full.segment.rsc +19 -13
- package/.next/server/app/index.segments/_tree.segment.rsc +3 -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 +6 -4
- package/.next/server/chunks/229.js +1 -1
- package/.next/server/chunks/421.js +1 -0
- package/.next/server/chunks/430.js +215 -31
- package/.next/server/chunks/496.js +1 -1
- package/.next/server/chunks/538.js +1 -1
- package/.next/server/chunks/662.js +2 -0
- package/.next/server/chunks/686.js +1 -1
- package/.next/server/chunks/807.js +1 -1
- package/.next/server/chunks/813.js +23 -1
- package/.next/server/chunks/920.js +2 -2
- package/.next/server/chunks/924.js +1 -1
- package/.next/server/chunks/970.js +305 -0
- 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/static/WMazYvD-gbeLsCUfUxvvM/_buildManifest.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.4cf66cbdd8364c57.js +1 -0
- package/.next/static/chunks/4686-09fcd0028079006c.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.67366dc5032a141d.js +1 -0
- package/.next/static/chunks/8552.25c39ef4c995eba0.js +1 -0
- package/.next/static/chunks/app/_global-error/page-f977af7f858990a2.js +1 -0
- package/.next/static/chunks/app/api/agent/[id]/events/route-f977af7f858990a2.js +1 -0
- package/.next/static/chunks/app/api/agent/[id]/route-f977af7f858990a2.js +1 -0
- package/.next/static/chunks/app/api/agent/[id]/tree/route-f977af7f858990a2.js +1 -0
- package/.next/static/chunks/app/api/agent/new/route-f977af7f858990a2.js +1 -0
- package/.next/static/chunks/app/api/config/route-f977af7f858990a2.js +1 -0
- package/.next/static/chunks/app/api/files/route-f977af7f858990a2.js +1 -0
- package/.next/static/chunks/app/api/fs/route-f977af7f858990a2.js +1 -0
- package/.next/static/chunks/app/api/git/route-f977af7f858990a2.js +1 -0
- package/.next/static/chunks/app/api/github/route-f977af7f858990a2.js +1 -0
- package/.next/static/chunks/app/api/growth/route-f977af7f858990a2.js +1 -0
- package/.next/static/chunks/app/api/health/route-f977af7f858990a2.js +1 -0
- package/.next/static/chunks/app/api/models/defaults/route-f977af7f858990a2.js +1 -0
- package/.next/static/chunks/app/api/models/route-f977af7f858990a2.js +1 -0
- package/.next/static/chunks/app/api/pi-settings/route-f977af7f858990a2.js +1 -0
- package/.next/static/chunks/app/api/plugins/route-f977af7f858990a2.js +1 -0
- package/.next/static/chunks/app/api/prompts/route-f977af7f858990a2.js +1 -0
- package/.next/static/chunks/app/api/remote/route-f977af7f858990a2.js +1 -0
- package/.next/static/chunks/app/api/security/route-f977af7f858990a2.js +1 -0
- package/.next/static/chunks/app/api/sessions/[id]/export/route-f977af7f858990a2.js +1 -0
- package/.next/static/chunks/app/api/sessions/[id]/route-f977af7f858990a2.js +1 -0
- package/.next/static/chunks/app/api/sessions/import/route-f977af7f858990a2.js +1 -0
- package/.next/static/chunks/app/api/sessions/route-f977af7f858990a2.js +1 -0
- package/.next/static/chunks/app/api/skills/route-f977af7f858990a2.js +1 -0
- package/.next/static/chunks/app/api/update/route-f977af7f858990a2.js +1 -0
- package/.next/static/chunks/app/api/version/route-f977af7f858990a2.js +1 -0
- package/.next/static/chunks/app/api/web-auth/route-f977af7f858990a2.js +1 -0
- package/.next/static/chunks/app/api/workspaces/route-f977af7f858990a2.js +1 -0
- package/.next/static/chunks/app/page-fc4ed2ff29b6235e.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-f977af7f858990a2.js +1 -0
- package/.next/static/chunks/next/dist/client/components/builtin/forbidden-f977af7f858990a2.js +1 -0
- package/.next/static/chunks/next/dist/client/components/builtin/not-found-f977af7f858990a2.js +1 -0
- package/.next/static/chunks/next/dist/client/components/builtin/unauthorized-f977af7f858990a2.js +1 -0
- package/.next/static/chunks/webpack-22ebffc20adb44ae.js +1 -0
- package/.next/static/css/6671d0d1589fdc0e.css +1 -0
- package/.next/static/css/{2959bd6b626b7ffe.css → f15a853af8b5127f.css} +1 -1
- 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]/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 +3 -1
- package/.next/types/validator.ts +76 -2
- package/README.md +14 -5
- package/next.config.ts +4 -2
- package/package.json +2 -2
- package/scripts/release.mjs +1 -1
- package/src/app/api/agent/[id]/events/route.ts +42 -13
- 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/api/update/route.ts +18 -2
- package/src/app/globals.css +275 -0
- package/src/components/AppShell.tsx +89 -33
- package/src/components/ChatInput.tsx +245 -63
- package/src/components/ChatWindow.tsx +123 -108
- package/src/components/ContextMeter.tsx +204 -123
- package/src/components/DrawerPanel.tsx +19 -26
- package/src/components/ExtensionUI.tsx +8 -2
- package/src/components/GitPanel.tsx +110 -40
- package/src/components/MarkdownBlock.tsx +333 -37
- 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 +365 -80
- package/src/components/TrajectoryView.tsx +4 -6
- package/src/components/chat/chat-scroll.ts +18 -0
- package/src/components/composer/ComposerImages.tsx +306 -0
- package/src/components/update/CopyCommand.tsx +34 -0
- package/src/components/update/UpdateNotice.tsx +130 -0
- package/src/components/update/update-store.ts +155 -0
- package/src/hooks/useGrowth.ts +3 -0
- package/src/hooks/usePiWeb.ts +54 -27
- package/src/hooks/useWorkspaceFiles.ts +93 -0
- package/src/i18n.tsx +182 -6
- package/src/instrumentation-node.ts +3 -0
- package/src/lib/agent-manager.ts +193 -119
- package/src/lib/chat/event-stream.ts +113 -0
- package/src/lib/chat/stream-settings.ts +192 -0
- package/src/lib/files-service.ts +100 -1
- 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/pi.ts +27 -2
- package/src/lib/process-format.ts +3 -2
- package/src/lib/session/metrics.ts +31 -0
- package/src/lib/thinking-level.ts +39 -0
- package/src/lib/trajectory.ts +17 -3
- package/src/lib/types.ts +19 -1
- package/src/lib/update/startup-check.ts +117 -0
- package/src/lib/update-service.ts +23 -3
- package/src/lib/workspace-index.ts +270 -0
- package/.next/server/chunks/131.js +0 -1
- package/.next/server/chunks/243.js +0 -1
- package/.next/server/chunks/741.js +0 -165
- package/.next/static/_Y3Lq0lI5RJ1tFSOnDi0L/_buildManifest.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-b1e9fa876d0ea671.js +0 -1
- package/.next/static/chunks/4778.e4c9ed093a413bc4.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.d3fe337a9117c325.js +0 -1
- package/.next/static/chunks/8552.6bfe3e101250b20f.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-2e425ef83fba0782.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-3614a8337843456b.js +0 -1
- package/.next/static/css/7391c42e1ae617f9.css +0 -1
- /package/.next/static/{_Y3Lq0lI5RJ1tFSOnDi0L → WMazYvD-gbeLsCUfUxvvM}/_ssgManifest.js +0 -0
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { NextResponse } from "next/server";
|
|
2
|
+
import { repoRoot } from "@/lib/git-service";
|
|
3
|
+
import { awaitGithubIdentity } from "@/lib/github-identity";
|
|
4
|
+
import { BoundaryError, resolveWorkspacePath } from "@/lib/path-security";
|
|
5
|
+
|
|
6
|
+
export const dynamic = "force-dynamic";
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Git 面板头部的 GitHub 身份(头像 + 账号)。
|
|
10
|
+
*
|
|
11
|
+
* 与 /api/git 分开:身份要走网络(gh / 头像),不该拖慢分支与文件状态那条纯本地读取。
|
|
12
|
+
* 取不到就回 identity: null,前端只显示分支信息,不报错。
|
|
13
|
+
*/
|
|
14
|
+
export async function GET(req: Request) {
|
|
15
|
+
const cwd = new URL(req.url).searchParams.get("cwd");
|
|
16
|
+
try {
|
|
17
|
+
const resolved = await resolveWorkspacePath(cwd);
|
|
18
|
+
const { root } = await repoRoot(resolved);
|
|
19
|
+
if (!root) return NextResponse.json({ success: true, data: { identity: null } });
|
|
20
|
+
return NextResponse.json({ success: true, data: { identity: await awaitGithubIdentity(root) } });
|
|
21
|
+
} catch (err: any) {
|
|
22
|
+
if (err instanceof BoundaryError) return NextResponse.json({ success: false, error: err.message }, { status: 400 });
|
|
23
|
+
// 身份只是装饰:任何失败都不该让面板变红
|
|
24
|
+
return NextResponse.json({ success: true, data: { identity: null } });
|
|
25
|
+
}
|
|
26
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { NextResponse } from "next/server";
|
|
2
|
+
import { newSessionDefaults } from "@/lib/model-defaults";
|
|
3
|
+
import { BoundaryError, resolveWorkspacePath } from "@/lib/path-security";
|
|
4
|
+
|
|
5
|
+
export const dynamic = "force-dynamic";
|
|
6
|
+
|
|
7
|
+
/** 新会话页的默认模型与思考档位:按工作区读 pi 的设置 */
|
|
8
|
+
export async function GET(req: Request) {
|
|
9
|
+
try {
|
|
10
|
+
const cwd = await resolveWorkspacePath(new URL(req.url).searchParams.get("cwd"));
|
|
11
|
+
return NextResponse.json({ success: true, data: await newSessionDefaults(cwd) });
|
|
12
|
+
} catch (error) {
|
|
13
|
+
return NextResponse.json(
|
|
14
|
+
{ success: false, error: error instanceof Error ? error.message : "request failed" },
|
|
15
|
+
{ status: error instanceof BoundaryError ? 400 : 500 },
|
|
16
|
+
);
|
|
17
|
+
}
|
|
18
|
+
}
|
|
@@ -2,7 +2,9 @@ import { gzipSync } from "node:zlib";
|
|
|
2
2
|
import { NextResponse } from "next/server";
|
|
3
3
|
import {
|
|
4
4
|
answerLogin,
|
|
5
|
+
builtinCatalogModelIds,
|
|
5
6
|
cancelLogin,
|
|
7
|
+
contextWindowInfo,
|
|
6
8
|
CustomProvidersConflictError,
|
|
7
9
|
CustomProvidersValidationError,
|
|
8
10
|
discoverModels,
|
|
@@ -14,6 +16,7 @@ import {
|
|
|
14
16
|
readCustomProviders,
|
|
15
17
|
removeApiKey,
|
|
16
18
|
setApiKey,
|
|
19
|
+
setModelContextWindow,
|
|
17
20
|
startLogin,
|
|
18
21
|
writeCustomProviders,
|
|
19
22
|
} from "@/lib/models-service";
|
|
@@ -58,7 +61,13 @@ export async function GET(req: Request) {
|
|
|
58
61
|
const providers = full
|
|
59
62
|
? data.providers
|
|
60
63
|
: data.providers.map((p) => ({ id: p.id, name: p.name, authReady: p.authReady, builtIn: p.builtIn, modelCount: p.modelCount }));
|
|
61
|
-
|
|
64
|
+
// 设置页编辑内置 provider 时据此把「覆盖已有模型」写进 modelOverrides,而不是 models[]
|
|
65
|
+
const catalogModelIds = customProviders ? await builtinCatalogModelIds(customProviders.content, data.models) : undefined;
|
|
66
|
+
return jsonMaybeGzip(
|
|
67
|
+
req,
|
|
68
|
+
{ success: true, data: { providers, models, customProviders, ...(catalogModelIds ? { catalogModelIds } : {}) } },
|
|
69
|
+
`${modelListStamp()}:${custom ? "custom" : full ? "full" : "piweb"}`,
|
|
70
|
+
);
|
|
62
71
|
} catch (err: any) {
|
|
63
72
|
return NextResponse.json({ success: false, error: String(err?.message ?? err) }, { status: 500 });
|
|
64
73
|
}
|
|
@@ -73,11 +82,15 @@ export async function POST(req: Request) {
|
|
|
73
82
|
| "saveCustomProviders"
|
|
74
83
|
| "discoverModels"
|
|
75
84
|
| "providerUsage"
|
|
85
|
+
| "contextWindowInfo"
|
|
86
|
+
| "setContextWindow"
|
|
76
87
|
| "loginStart"
|
|
77
88
|
| "loginState"
|
|
78
89
|
| "loginAnswer"
|
|
79
90
|
| "loginCancel";
|
|
80
91
|
providerId?: string;
|
|
92
|
+
modelId?: string;
|
|
93
|
+
contextWindow?: number;
|
|
81
94
|
apiKey?: string;
|
|
82
95
|
baseUrl?: string;
|
|
83
96
|
api?: string;
|
|
@@ -115,6 +128,16 @@ export async function POST(req: Request) {
|
|
|
115
128
|
const usage = await providerUsage(body.providerId, body.force === true);
|
|
116
129
|
return NextResponse.json({ success: true, data: { usage } });
|
|
117
130
|
}
|
|
131
|
+
if (body.action === "contextWindowInfo" || body.action === "setContextWindow") {
|
|
132
|
+
if (typeof body.providerId !== "string" || !body.providerId || typeof body.modelId !== "string" || !body.modelId) {
|
|
133
|
+
return NextResponse.json({ success: false, error: "missing providerId or modelId" }, { status: 400 });
|
|
134
|
+
}
|
|
135
|
+
if (body.action === "contextWindowInfo") {
|
|
136
|
+
return NextResponse.json({ success: true, data: await contextWindowInfo(body.providerId, body.modelId) });
|
|
137
|
+
}
|
|
138
|
+
if (typeof body.contextWindow !== "number") return NextResponse.json({ success: false, error: "missing contextWindow" }, { status: 400 });
|
|
139
|
+
return NextResponse.json({ success: true, data: await setModelContextWindow(body.providerId, body.modelId, body.contextWindow) });
|
|
140
|
+
}
|
|
118
141
|
if (body.action === "loginStart") {
|
|
119
142
|
if (!body.providerId) return NextResponse.json({ success: false, error: "missing providerId" }, { status: 400 });
|
|
120
143
|
await startLogin(body.providerId);
|
|
@@ -1,9 +1,19 @@
|
|
|
1
1
|
import { NextResponse } from "next/server";
|
|
2
2
|
import { checkForUpdate, runUpdate, UpdateBusyError, type UpdateTarget } from "@/lib/update-service";
|
|
3
|
+
import { ensureStartupCheck, markUpdated, recordCheck } from "@/lib/update/startup-check";
|
|
3
4
|
import { activeStatus } from "@/lib/agent-manager";
|
|
4
5
|
|
|
5
6
|
export const dynamic = "force-dynamic";
|
|
6
7
|
|
|
8
|
+
/**
|
|
9
|
+
* 启动时那次检查的结果(还在查就等它查完):设置页和右下角提示条据此直接显示「可更新到 vX」。
|
|
10
|
+
* 关掉启动检查时 startId 为 null、没有结果,页面退回手动「检查更新」。
|
|
11
|
+
*/
|
|
12
|
+
export async function GET() {
|
|
13
|
+
const updates = await ensureStartupCheck();
|
|
14
|
+
return NextResponse.json({ success: true, data: updates ?? { startId: null, results: {} } }, { headers: { "Cache-Control": "no-store" } });
|
|
15
|
+
}
|
|
16
|
+
|
|
7
17
|
/** Fixed targets/actions only. Runtime authorization and origin checks live in proxy. */
|
|
8
18
|
export async function POST(req: Request) {
|
|
9
19
|
let body: unknown;
|
|
@@ -16,7 +26,11 @@ export async function POST(req: Request) {
|
|
|
16
26
|
if (target !== "piweb" && target !== "pi") return NextResponse.json({ success: false, error: "unknown target" }, { status: 400 });
|
|
17
27
|
if (action !== "check" && action !== "update") return NextResponse.json({ success: false, error: "unknown action" }, { status: 400 });
|
|
18
28
|
try {
|
|
19
|
-
if (action === "check")
|
|
29
|
+
if (action === "check") {
|
|
30
|
+
const check = await checkForUpdate(target);
|
|
31
|
+
recordCheck(target, check);
|
|
32
|
+
return NextResponse.json({ success: true, data: check });
|
|
33
|
+
}
|
|
20
34
|
const assertIdle = async () => {
|
|
21
35
|
if (Object.values(activeStatus()).some((session) => session.streaming)) {
|
|
22
36
|
throw new UpdateBusyError("An agent session is running. Wait for it to finish and update in a maintenance window; do not start new sessions until the release is ready.");
|
|
@@ -24,7 +38,9 @@ export async function POST(req: Request) {
|
|
|
24
38
|
};
|
|
25
39
|
// Check before even taking a release lock; rechecked before each mutating step.
|
|
26
40
|
await assertIdle();
|
|
27
|
-
|
|
41
|
+
const result = await runUpdate(target, { assertIdle });
|
|
42
|
+
markUpdated(target, result.version);
|
|
43
|
+
return NextResponse.json({ success: true, data: result });
|
|
28
44
|
} catch (error) {
|
|
29
45
|
return NextResponse.json({ success: false, error: error instanceof Error ? error.message : String(error) }, {
|
|
30
46
|
status: error instanceof UpdateBusyError ? 409 : 500,
|
package/src/app/globals.css
CHANGED
|
@@ -532,6 +532,22 @@ textarea::placeholder {
|
|
|
532
532
|
.settings-tab-underline[data-active="true"]::after {
|
|
533
533
|
background: var(--dsw-label-primary);
|
|
534
534
|
}
|
|
535
|
+
/* 应用外壳占满「实际可见」的高度。100vh 在手机浏览器里是工具栏收起时的大视口:
|
|
536
|
+
地址栏在底部的浏览器(如手机 Edge)里,最下面的输入框正好被工具栏盖住、页面又不滚动,
|
|
537
|
+
看起来就是没有输入框。dvh 是实际可见高度,不认它的老浏览器退回 100vh。
|
|
538
|
+
兜底必须放进 @supports:写成两行 height,构建时的 CSS 压缩会只留后一行,老浏览器就没了高度。 */
|
|
539
|
+
.pw-app-shell {
|
|
540
|
+
height: 100vh;
|
|
541
|
+
}
|
|
542
|
+
@supports (height: 100dvh) {
|
|
543
|
+
.pw-app-shell {
|
|
544
|
+
height: 100dvh;
|
|
545
|
+
}
|
|
546
|
+
}
|
|
547
|
+
/* 右侧抽屉的入口条:未选中项悬停给底色(设置页的同款下划线 tab 没有底色) */
|
|
548
|
+
.drawer-tab:hover:not([data-active="true"]) {
|
|
549
|
+
background: var(--dsw-hover);
|
|
550
|
+
}
|
|
535
551
|
|
|
536
552
|
.btn-primary-circle {
|
|
537
553
|
display: inline-flex;
|
|
@@ -810,6 +826,68 @@ textarea::placeholder {
|
|
|
810
826
|
margin: 1em 0;
|
|
811
827
|
}
|
|
812
828
|
|
|
829
|
+
/* ---------- 流式正文:稳定块 + 未闭合代码围栏的纯文本尾巴共用一个 .md 容器 ---------- */
|
|
830
|
+
.pw-stream {
|
|
831
|
+
display: flow-root;
|
|
832
|
+
}
|
|
833
|
+
/* 打字光标模式下尾巴外面包了一层:包层不能改变原有排版,
|
|
834
|
+
.md > *:first-child/:last-child 的边距归零要透传到最后那个内容元素上 */
|
|
835
|
+
.pw-stream > .pw-stream-tail:first-child > :first-child {
|
|
836
|
+
margin-top: 0;
|
|
837
|
+
}
|
|
838
|
+
.pw-stream > .pw-stream-tail:last-child > :last-child {
|
|
839
|
+
margin-bottom: 0;
|
|
840
|
+
}
|
|
841
|
+
/* 渐显样式:只让尾巴里新出现的元素柔和淡入。
|
|
842
|
+
动画若挂在容器全部直接子级上,块升级(段落从尾巴进入稳定块)会重建 DOM,
|
|
843
|
+
已经显示过的内容就把入场动画重播一遍——那正是输出时「闪烁几下」的来源;
|
|
844
|
+
收窄到 .pw-stream-tail 内部后,升级进来的块不再带动画,视觉无缝。 */
|
|
845
|
+
.pw-stream[data-stream-style="fade"] .pw-stream-tail > * {
|
|
846
|
+
animation: pw-stream-enter 240ms ease-out both;
|
|
847
|
+
}
|
|
848
|
+
@keyframes pw-stream-enter {
|
|
849
|
+
from {
|
|
850
|
+
opacity: 0;
|
|
851
|
+
transform: translateY(2px);
|
|
852
|
+
}
|
|
853
|
+
to {
|
|
854
|
+
opacity: 1;
|
|
855
|
+
transform: none;
|
|
856
|
+
}
|
|
857
|
+
}
|
|
858
|
+
|
|
859
|
+
/* 打字光标:挂在尾巴最后一个元素的行内末尾(不会另起一行)。
|
|
860
|
+
代码块和列表是块级容器,挂在外层会落到下一行,改挂到代码文字 / 最后一项的末尾 */
|
|
861
|
+
.pw-stream-caret .pw-stream-tail > :last-child:not(.md-code-block, ul, ol)::after,
|
|
862
|
+
.pw-stream-caret .pw-stream-tail > .md-code-block:last-child code::after,
|
|
863
|
+
.pw-stream-caret .pw-stream-tail > :is(ul, ol):last-child > li:last-child::after {
|
|
864
|
+
content: "";
|
|
865
|
+
display: inline-block;
|
|
866
|
+
width: 2px;
|
|
867
|
+
height: 1.05em;
|
|
868
|
+
margin-left: 2px;
|
|
869
|
+
vertical-align: -0.18em;
|
|
870
|
+
border-radius: 1px;
|
|
871
|
+
background: var(--dsw-accent);
|
|
872
|
+
animation: pw-stream-caret 1.1s steps(2, start) infinite;
|
|
873
|
+
}
|
|
874
|
+
@keyframes pw-stream-caret {
|
|
875
|
+
50% {
|
|
876
|
+
opacity: 0;
|
|
877
|
+
}
|
|
878
|
+
}
|
|
879
|
+
|
|
880
|
+
@media (prefers-reduced-motion: reduce) {
|
|
881
|
+
.pw-stream[data-stream-style="fade"] .pw-stream-tail > * {
|
|
882
|
+
animation: none;
|
|
883
|
+
}
|
|
884
|
+
.pw-stream-caret .pw-stream-tail > :last-child:not(.md-code-block, ul, ol)::after,
|
|
885
|
+
.pw-stream-caret .pw-stream-tail > .md-code-block:last-child code::after,
|
|
886
|
+
.pw-stream-caret .pw-stream-tail > :is(ul, ol):last-child > li:last-child::after {
|
|
887
|
+
animation: none;
|
|
888
|
+
}
|
|
889
|
+
}
|
|
890
|
+
|
|
813
891
|
/* ---------- 代码高亮(highlight.js):VS Code 式的分类着色,配色跟 Pi 自己的主题走 ---------- */
|
|
814
892
|
:root {
|
|
815
893
|
--hl-comment: rgb(130, 136, 146);
|
|
@@ -1634,6 +1712,192 @@ body[data-pebrel-theme="pebrel"][data-ds-dark-theme] {
|
|
|
1634
1712
|
pointer-events: none;
|
|
1635
1713
|
}
|
|
1636
1714
|
|
|
1715
|
+
/* 输入卡待发送图片:平铺缩略图 / 牌堆 / 扇形(src/components/composer/ComposerImages.tsx) */
|
|
1716
|
+
.pw-image-thumb {
|
|
1717
|
+
position: relative;
|
|
1718
|
+
flex: none;
|
|
1719
|
+
}
|
|
1720
|
+
.pw-image-thumb img {
|
|
1721
|
+
display: block;
|
|
1722
|
+
box-shadow: 0 0 0 0.5px var(--dsw-border-l2);
|
|
1723
|
+
}
|
|
1724
|
+
.pw-image-fan {
|
|
1725
|
+
position: relative;
|
|
1726
|
+
flex: none;
|
|
1727
|
+
transition: width 320ms cubic-bezier(0.2, 0.8, 0.2, 1), height 320ms cubic-bezier(0.2, 0.8, 0.2, 1);
|
|
1728
|
+
}
|
|
1729
|
+
.pw-image-card {
|
|
1730
|
+
position: absolute;
|
|
1731
|
+
left: 0;
|
|
1732
|
+
top: 0;
|
|
1733
|
+
width: 96px;
|
|
1734
|
+
height: 96px;
|
|
1735
|
+
transition: transform 360ms cubic-bezier(0.2, 0.8, 0.2, 1), opacity 200ms ease;
|
|
1736
|
+
}
|
|
1737
|
+
.pw-image-card[data-hidden="true"] {
|
|
1738
|
+
opacity: 0;
|
|
1739
|
+
pointer-events: none;
|
|
1740
|
+
}
|
|
1741
|
+
.pw-image-face {
|
|
1742
|
+
display: block;
|
|
1743
|
+
width: 100%;
|
|
1744
|
+
height: 100%;
|
|
1745
|
+
overflow: hidden;
|
|
1746
|
+
border-radius: 10px;
|
|
1747
|
+
/* 不透明的底:长图上下留白的地方不能透出后面那张 */
|
|
1748
|
+
background: linear-gradient(var(--dsw-selector), var(--dsw-selector)), var(--dsw-glass-input);
|
|
1749
|
+
box-shadow: 0 0 0 0.5px var(--dsw-border-l3), 0 1px 3px rgba(0, 0, 0, 0.12);
|
|
1750
|
+
transition: box-shadow var(--ds-duration-fast) var(--ds-ease-in-out);
|
|
1751
|
+
}
|
|
1752
|
+
.pw-image-card[data-lifted="true"] .pw-image-face {
|
|
1753
|
+
box-shadow: 0 0 0 0.5px var(--dsw-border-l4), 0 10px 24px rgba(0, 0, 0, 0.22);
|
|
1754
|
+
}
|
|
1755
|
+
.pw-image-face img {
|
|
1756
|
+
transition: opacity 240ms ease;
|
|
1757
|
+
}
|
|
1758
|
+
/* 牌堆里后面几张只露空白卡边,一眼看出是一叠;扇开时图淡入 */
|
|
1759
|
+
.pw-image-fan:not([data-expanded="true"]) .pw-image-card + .pw-image-card .pw-image-face img {
|
|
1760
|
+
opacity: 0;
|
|
1761
|
+
}
|
|
1762
|
+
.pw-image-face:focus-visible {
|
|
1763
|
+
outline: 2px solid var(--dsw-accent);
|
|
1764
|
+
outline-offset: 2px;
|
|
1765
|
+
}
|
|
1766
|
+
/* 张数多、露出的条带太窄:删除按钮只在悬停 / 聚焦那张上出现,免得挤成一排 */
|
|
1767
|
+
.pw-image-fan[data-crowded="true"] .pw-image-delete {
|
|
1768
|
+
opacity: 0;
|
|
1769
|
+
pointer-events: none;
|
|
1770
|
+
transition: opacity var(--ds-duration-fast) var(--ds-ease-in-out);
|
|
1771
|
+
}
|
|
1772
|
+
.pw-image-fan[data-crowded="true"] .pw-image-card:hover .pw-image-delete,
|
|
1773
|
+
.pw-image-fan[data-crowded="true"] .pw-image-card:focus-within .pw-image-delete {
|
|
1774
|
+
opacity: 1;
|
|
1775
|
+
pointer-events: auto;
|
|
1776
|
+
}
|
|
1777
|
+
.pw-image-delete {
|
|
1778
|
+
position: absolute;
|
|
1779
|
+
top: -6px;
|
|
1780
|
+
right: -6px;
|
|
1781
|
+
display: flex;
|
|
1782
|
+
align-items: center;
|
|
1783
|
+
justify-content: center;
|
|
1784
|
+
width: 22px;
|
|
1785
|
+
height: 22px;
|
|
1786
|
+
border-radius: 999px;
|
|
1787
|
+
font-size: 11px;
|
|
1788
|
+
background: var(--dsw-label-primary);
|
|
1789
|
+
color: var(--dsw-bg-base);
|
|
1790
|
+
/* 一圈底色描边:压在别的图片上也看得清 */
|
|
1791
|
+
box-shadow: 0 0 0 1.5px var(--dsw-glass-input);
|
|
1792
|
+
}
|
|
1793
|
+
.pw-image-delete:disabled {
|
|
1794
|
+
opacity: 0.4;
|
|
1795
|
+
}
|
|
1796
|
+
/* 放大预览 */
|
|
1797
|
+
.pw-viewer {
|
|
1798
|
+
position: fixed;
|
|
1799
|
+
inset: 0;
|
|
1800
|
+
z-index: 200;
|
|
1801
|
+
display: flex;
|
|
1802
|
+
align-items: center;
|
|
1803
|
+
justify-content: center;
|
|
1804
|
+
padding: 56px 16px 24px;
|
|
1805
|
+
background: rgba(0, 0, 0, 0.78);
|
|
1806
|
+
}
|
|
1807
|
+
.pw-viewer-bar {
|
|
1808
|
+
position: absolute;
|
|
1809
|
+
top: 12px;
|
|
1810
|
+
left: 16px;
|
|
1811
|
+
right: 16px;
|
|
1812
|
+
display: flex;
|
|
1813
|
+
align-items: center;
|
|
1814
|
+
gap: 8px;
|
|
1815
|
+
}
|
|
1816
|
+
.pw-viewer-count {
|
|
1817
|
+
flex: 1;
|
|
1818
|
+
font-size: 13px;
|
|
1819
|
+
font-variant-numeric: tabular-nums;
|
|
1820
|
+
color: rgba(255, 255, 255, 0.78);
|
|
1821
|
+
}
|
|
1822
|
+
.pw-viewer-btn {
|
|
1823
|
+
height: 30px;
|
|
1824
|
+
min-width: 30px;
|
|
1825
|
+
padding: 0 12px;
|
|
1826
|
+
border-radius: 999px;
|
|
1827
|
+
font-size: 13px;
|
|
1828
|
+
color: #fff;
|
|
1829
|
+
background: rgba(255, 255, 255, 0.14);
|
|
1830
|
+
transition: background var(--ds-duration-fast) var(--ds-ease-in-out);
|
|
1831
|
+
}
|
|
1832
|
+
.pw-viewer-btn:hover {
|
|
1833
|
+
background: rgba(255, 255, 255, 0.24);
|
|
1834
|
+
}
|
|
1835
|
+
.pw-viewer-btn:disabled {
|
|
1836
|
+
opacity: 0.4;
|
|
1837
|
+
}
|
|
1838
|
+
.pw-viewer-image {
|
|
1839
|
+
max-width: 100%;
|
|
1840
|
+
max-height: 100%;
|
|
1841
|
+
object-fit: contain;
|
|
1842
|
+
border-radius: 12px;
|
|
1843
|
+
}
|
|
1844
|
+
.pw-viewer-nav {
|
|
1845
|
+
position: absolute;
|
|
1846
|
+
top: 50%;
|
|
1847
|
+
width: 40px;
|
|
1848
|
+
height: 40px;
|
|
1849
|
+
margin-top: -20px;
|
|
1850
|
+
border-radius: 999px;
|
|
1851
|
+
font-size: 26px;
|
|
1852
|
+
line-height: 38px;
|
|
1853
|
+
color: #fff;
|
|
1854
|
+
background: rgba(255, 255, 255, 0.14);
|
|
1855
|
+
transition: background var(--ds-duration-fast) var(--ds-ease-in-out);
|
|
1856
|
+
}
|
|
1857
|
+
.pw-viewer-nav:hover {
|
|
1858
|
+
background: rgba(255, 255, 255, 0.24);
|
|
1859
|
+
}
|
|
1860
|
+
.pw-viewer-nav[data-side="prev"] {
|
|
1861
|
+
left: 16px;
|
|
1862
|
+
}
|
|
1863
|
+
.pw-viewer-nav[data-side="next"] {
|
|
1864
|
+
right: 16px;
|
|
1865
|
+
}
|
|
1866
|
+
.pw-viewer-btn:focus-visible,
|
|
1867
|
+
.pw-viewer-nav:focus-visible {
|
|
1868
|
+
outline: 2px solid #fff;
|
|
1869
|
+
outline-offset: 2px;
|
|
1870
|
+
}
|
|
1871
|
+
@media (prefers-reduced-motion: reduce) {
|
|
1872
|
+
.pw-image-fan,
|
|
1873
|
+
.pw-image-card {
|
|
1874
|
+
transition: none;
|
|
1875
|
+
}
|
|
1876
|
+
}
|
|
1877
|
+
|
|
1878
|
+
/* 设置页模型体检卡片里的小输入框 / 下拉(容量、视觉) */
|
|
1879
|
+
.pw-audit-field {
|
|
1880
|
+
width: 100%;
|
|
1881
|
+
height: 30px;
|
|
1882
|
+
padding: 0 8px;
|
|
1883
|
+
border: 0.5px solid var(--dsw-border-l2);
|
|
1884
|
+
border-radius: 9px;
|
|
1885
|
+
background: var(--dsw-glass-input);
|
|
1886
|
+
color: var(--dsw-label-primary);
|
|
1887
|
+
font-size: 12.5px;
|
|
1888
|
+
transition: border-color var(--ds-duration-fast) var(--ds-ease-in-out), box-shadow var(--ds-duration-fast) var(--ds-ease-in-out);
|
|
1889
|
+
}
|
|
1890
|
+
.pw-audit-field:focus {
|
|
1891
|
+
border-color: var(--dsw-accent);
|
|
1892
|
+
box-shadow: 0 0 0 2px var(--dsw-accent-soft);
|
|
1893
|
+
}
|
|
1894
|
+
.pw-audit-field[aria-invalid="true"] {
|
|
1895
|
+
border-color: var(--dsw-danger);
|
|
1896
|
+
}
|
|
1897
|
+
.pw-audit-field:disabled {
|
|
1898
|
+
opacity: 0.55;
|
|
1899
|
+
}
|
|
1900
|
+
|
|
1637
1901
|
/* 项目栏 */
|
|
1638
1902
|
.pw-project {
|
|
1639
1903
|
background: var(--dsw-sidebar-fill);
|
|
@@ -2135,3 +2399,14 @@ body[data-pebrel-theme="pebrel"][data-ds-dark-theme] {
|
|
|
2135
2399
|
border-radius: 0;
|
|
2136
2400
|
}
|
|
2137
2401
|
}
|
|
2402
|
+
/* 全屏查看器同样按实际可见高度铺满(理由见 .pw-app-shell);放在上面两条之后才压得住它们 */
|
|
2403
|
+
@supports (height: 100dvh) {
|
|
2404
|
+
.pw-viewer[data-fullscreen] {
|
|
2405
|
+
height: 100dvh;
|
|
2406
|
+
}
|
|
2407
|
+
@media (max-width: 840px) {
|
|
2408
|
+
.pw-viewer {
|
|
2409
|
+
height: 100dvh;
|
|
2410
|
+
}
|
|
2411
|
+
}
|
|
2412
|
+
}
|