@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
|
@@ -13,6 +13,9 @@ import { UpdateNotice } from "@/components/update/UpdateNotice";
|
|
|
13
13
|
import dynamic from "next/dynamic";
|
|
14
14
|
import { SessionSidebar } from "@/components/SessionSidebar";
|
|
15
15
|
import type { DrawerSection } from "@/components/DrawerPanel";
|
|
16
|
+
import { SideChatPanel } from "@/components/side-chat/SideChatPanel";
|
|
17
|
+
import { SideChatIcon } from "@/components/side-chat/icons";
|
|
18
|
+
import { preserveChatReadingPosition } from "@/components/chat/reading-anchor";
|
|
16
19
|
import { DirectoryPicker } from "@/components/DirectoryPicker";
|
|
17
20
|
|
|
18
21
|
// 首屏不需要的重组件按需加载(设置面板含供应商配置与代码高亮,轨迹/文件只在打开时才用)
|
|
@@ -41,6 +44,9 @@ import { useFileViewer } from "@/hooks/useFileViewer";
|
|
|
41
44
|
import type { TreeNode } from "@/lib/growth-tree";
|
|
42
45
|
import { syncPebrelTheme } from "@/lib/theme";
|
|
43
46
|
import type { ModelChoice } from "@/components/ModelSelector";
|
|
47
|
+
import type { NewSessionDefaults } from "@/lib/model-defaults";
|
|
48
|
+
import { readRememberedHeroModel, writeRememberedHeroModel } from "@/lib/hero-model-memory";
|
|
49
|
+
import { newSessionThinkingLevel } from "@/lib/thinking-level";
|
|
44
50
|
import type { ImageAttachment, TrajEntry } from "@/lib/types";
|
|
45
51
|
|
|
46
52
|
// dsh ui-layout columns.ts 几何常量
|
|
@@ -154,16 +160,28 @@ export function AppShell() {
|
|
|
154
160
|
const [settingsOpen, setSettingsOpen] = useState(false);
|
|
155
161
|
const [selected, setSelected] = useState<TrajEntry | null>(null);
|
|
156
162
|
/** 抽屉当前入口(由这里持有:轨迹详情关掉后要回到同一个入口) */
|
|
157
|
-
|
|
163
|
+
/** 抽屉入口保存在浏览器;新用户先看到旁聊。 */
|
|
158
164
|
const [drawerSection, setDrawerSection] = useState<DrawerSection>("project");
|
|
165
|
+
const chooseDrawerSection = useCallback((section: DrawerSection) => {
|
|
166
|
+
setDrawerSection(section);
|
|
167
|
+
localStorage.setItem("piweb.drawerSection", section);
|
|
168
|
+
setSideChatOpen(false);
|
|
169
|
+
}, []);
|
|
159
170
|
/** 右侧抽屉(最右一列):入口列表 + 内容 */
|
|
160
171
|
const [drawerOpen, setDrawerOpen] = useState(false);
|
|
172
|
+
/**
|
|
173
|
+
* 右侧旁聊面板:和抽屉共用最右一列,所以两者互斥(开一个就关另一个)。
|
|
174
|
+
* 旁聊不再作为抽屉的一个入口 —— 它是独立面板,入口是会话头部那个图标按钮。
|
|
175
|
+
*/
|
|
176
|
+
const [sideChatOpen, setSideChatOpen] = useState(false);
|
|
161
177
|
/** 打开抽屉时「落到最新轮」只跳过这一次(点 badge 指定轮次时用) */
|
|
162
178
|
const skipLatestOnce = useRef(false);
|
|
163
179
|
/** useGrowth 的"落到最新轮":它在 AppShell 里、不随抽屉卸载,所以必须显式调用 */
|
|
164
180
|
const growthSelectLatest = useRef<() => void>(() => {});
|
|
165
181
|
const [heroCwd, setHeroCwd] = useState("");
|
|
166
182
|
const [heroModel, setHeroModel] = useState<{ provider: string; id: string } | null>(null);
|
|
183
|
+
/** 当前工作区的新会话默认值(pi 的初始模型规则 + 设置里的思考档位),切换工作区时重新取 */
|
|
184
|
+
const [heroDefaults, setHeroDefaults] = useState<NewSessionDefaults | null>(null);
|
|
167
185
|
const [heroThinking, setHeroThinking] = useState("");
|
|
168
186
|
const [isNarrow, setIsNarrow] = useState(false);
|
|
169
187
|
const [mobileSidebarOpen, setMobileSidebarOpen] = useState(false);
|
|
@@ -172,23 +190,51 @@ export function AppShell() {
|
|
|
172
190
|
setRightWidth(restoreRightWidth());
|
|
173
191
|
setSidebarCollapsed(localStorage.getItem("piweb.sidebarCollapsed") === "1");
|
|
174
192
|
setDrawerOpen(localStorage.getItem("piweb.drawerOpen") === "1");
|
|
193
|
+
const section = localStorage.getItem("piweb.drawerSection");
|
|
194
|
+
if (["project", "prompts", "git", "import"].includes(section ?? "")) setDrawerSection(section as DrawerSection);
|
|
175
195
|
}, []);
|
|
196
|
+
/** 新会话时加载用户之前的选择,或使用系统建议(第一个认证的) */
|
|
197
|
+
useEffect(() => {
|
|
198
|
+
if (!heroCwd) {
|
|
199
|
+
setHeroModel(null);
|
|
200
|
+
return;
|
|
201
|
+
}
|
|
202
|
+
// 只认这个工作区自己记住的模型;没有就不预选,输入框等用户在新会话页选
|
|
203
|
+
setHeroModel(readRememberedHeroModel(localStorage, heroCwd));
|
|
204
|
+
}, [heroCwd]);
|
|
205
|
+
useEffect(() => {
|
|
206
|
+
setHeroDefaults(null);
|
|
207
|
+
if (!heroCwd) return;
|
|
208
|
+
let stale = false;
|
|
209
|
+
fetch(`/api/models/defaults?cwd=${encodeURIComponent(heroCwd)}`)
|
|
210
|
+
.then((r) => r.json() as Promise<{ success?: boolean; data?: NewSessionDefaults }>)
|
|
211
|
+
.then((json) => {
|
|
212
|
+
if (!stale && json.success && json.data) setHeroDefaults(json.data);
|
|
213
|
+
})
|
|
214
|
+
.catch(() => undefined);
|
|
215
|
+
return () => {
|
|
216
|
+
stale = true;
|
|
217
|
+
};
|
|
218
|
+
}, [heroCwd]);
|
|
176
219
|
/** 右侧抽屉开关(项目栏降级成抽屉入口后,它是"最右一列是否打开"唯一的开关) */
|
|
177
220
|
const toggleDrawer = useCallback((next?: boolean) => {
|
|
221
|
+
preserveChatReadingPosition();
|
|
178
222
|
setDrawerOpen((cur) => {
|
|
179
223
|
const v = next ?? !cur;
|
|
180
224
|
localStorage.setItem("piweb.drawerOpen", v ? "1" : "0");
|
|
225
|
+
// 最右一列只有一个:开抽屉就收起旁聊
|
|
226
|
+
if (v) setSideChatOpen(false);
|
|
181
227
|
return v;
|
|
182
228
|
});
|
|
183
229
|
}, []);
|
|
184
230
|
/** 切到某个抽屉入口并打开抽屉(顶栏图标 / 点 badge 都用这条) */
|
|
185
231
|
const openDrawerSection = useCallback(
|
|
186
232
|
(section: DrawerSection) => {
|
|
187
|
-
|
|
233
|
+
chooseDrawerSection(section);
|
|
188
234
|
setSelected(null);
|
|
189
235
|
toggleDrawer(true);
|
|
190
236
|
},
|
|
191
|
-
[toggleDrawer],
|
|
237
|
+
[toggleDrawer, chooseDrawerSection],
|
|
192
238
|
);
|
|
193
239
|
// Ctrl/⌘+Shift+E:打开抽屉并切到「项目」入口;已经停在该入口时再按收起。
|
|
194
240
|
// 轨迹详情占着这一列时,这个快捷键把抽屉叫回来(而不是切到轨迹详情)。
|
|
@@ -280,11 +326,28 @@ export function AppShell() {
|
|
|
280
326
|
})),
|
|
281
327
|
[models],
|
|
282
328
|
);
|
|
283
|
-
|
|
329
|
+
// 新会话页当前选中的模型:只有在这个工作区选过(或记住过)才有;没有就是 undefined,输入框保持禁用
|
|
330
|
+
const heroChoice = useMemo(
|
|
331
|
+
() => (heroModel ? modelChoices.find((m) => m.provider === heroModel.provider && m.id === heroModel.id) : undefined),
|
|
332
|
+
[heroModel, modelChoices],
|
|
333
|
+
);
|
|
284
334
|
const heroModelLevels = useMemo(
|
|
285
|
-
() =>
|
|
286
|
-
[
|
|
335
|
+
() => heroChoice?.thinkingLevels ?? ["off", "minimal", "low", "medium", "high", "xhigh", "max"],
|
|
336
|
+
[heroChoice],
|
|
287
337
|
);
|
|
338
|
+
/**
|
|
339
|
+
* 新会话实际会用的思考档位:用户显式选过才算选择(下发时才带上);界面平时只显示这里算出的生效值,
|
|
340
|
+
* 不把它当作选择发给服务端。
|
|
341
|
+
*/
|
|
342
|
+
const heroEffectiveThinking = useMemo(() => {
|
|
343
|
+
const choice = heroChoice;
|
|
344
|
+
return newSessionThinkingLevel({
|
|
345
|
+
supported: heroModelLevels,
|
|
346
|
+
requested: heroThinking,
|
|
347
|
+
modelOverride: choice ? heroDefaults?.modelThinkingLevels[`${choice.provider}/${choice.id}`] : undefined,
|
|
348
|
+
defaultLevel: heroDefaults?.defaultThinkingLevel,
|
|
349
|
+
});
|
|
350
|
+
}, [heroChoice, heroModelLevels, heroThinking, heroDefaults]);
|
|
288
351
|
|
|
289
352
|
|
|
290
353
|
// ---------- 拖拽 ----------
|
|
@@ -306,12 +369,14 @@ export function AppShell() {
|
|
|
306
369
|
if (!frame) {
|
|
307
370
|
frame = requestAnimationFrame(() => {
|
|
308
371
|
frame = 0;
|
|
372
|
+
preserveChatReadingPosition();
|
|
309
373
|
commit(latest);
|
|
310
374
|
});
|
|
311
375
|
}
|
|
312
376
|
};
|
|
313
377
|
const up = () => {
|
|
314
378
|
if (frame) cancelAnimationFrame(frame);
|
|
379
|
+
preserveChatReadingPosition();
|
|
315
380
|
commit(latest);
|
|
316
381
|
persist(side === "sidebar" ? "piweb.sidebarW" : "piweb.drawerW", latest);
|
|
317
382
|
window.removeEventListener("pointermove", move);
|
|
@@ -327,6 +392,7 @@ export function AppShell() {
|
|
|
327
392
|
);
|
|
328
393
|
|
|
329
394
|
const toggleSidebar = () => {
|
|
395
|
+
preserveChatReadingPosition();
|
|
330
396
|
const next = !sidebarCollapsed;
|
|
331
397
|
setSidebarCollapsed(next);
|
|
332
398
|
localStorage.setItem("piweb.sidebarCollapsed", next ? "1" : "0");
|
|
@@ -341,6 +407,7 @@ export function AppShell() {
|
|
|
341
407
|
const openToolTrajectory = useCallback((toolCallId: string) => {
|
|
342
408
|
const entry = trajectoryRef.current.find((item) => item.toolCallId === toolCallId);
|
|
343
409
|
if (!entry) return;
|
|
410
|
+
preserveChatReadingPosition();
|
|
344
411
|
// 最右一列与抽屉互斥:选中轨迹详情即接管这一列,关掉后回落回抽屉的当前入口
|
|
345
412
|
setSelected(entry);
|
|
346
413
|
}, []);
|
|
@@ -462,12 +529,14 @@ export function AppShell() {
|
|
|
462
529
|
setError(t.pickWorkspaceFirst);
|
|
463
530
|
return { success: false };
|
|
464
531
|
}
|
|
465
|
-
//
|
|
466
|
-
|
|
467
|
-
|
|
532
|
+
// 没选模型不建会话:输入框本来就禁用,这里再拦一次;模型一律显式下发,不让 SDK 自选
|
|
533
|
+
if (!heroChoice) {
|
|
534
|
+
setError(t.blockedComposer);
|
|
535
|
+
return { success: false };
|
|
536
|
+
}
|
|
468
537
|
const p = await newSession(cwd, {
|
|
469
|
-
provider:
|
|
470
|
-
modelId:
|
|
538
|
+
provider: heroChoice.provider,
|
|
539
|
+
modelId: heroChoice.id,
|
|
471
540
|
thinking: heroThinking || undefined,
|
|
472
541
|
});
|
|
473
542
|
if (!p) return { success: false };
|
|
@@ -519,7 +588,7 @@ export function AppShell() {
|
|
|
519
588
|
void sendCommand({ cmd: "fork" }).then((r) => {
|
|
520
589
|
if (r.success && r.data?.sessionPath) openSession(r.data.sessionPath);
|
|
521
590
|
});
|
|
522
|
-
} else if (name === "reload") void sendCommand({ cmd: "reload" });
|
|
591
|
+
} else if (name === "reload") void sendCommand({ cmd: "reload" }).then(() => refreshModels());
|
|
523
592
|
else setError(t.cmdUnknown.replace("{name}", name));
|
|
524
593
|
},
|
|
525
594
|
[sendCommand, currentId, closeSession, openSession, setError, t],
|
|
@@ -588,7 +657,9 @@ export function AppShell() {
|
|
|
588
657
|
if (!path) return;
|
|
589
658
|
updateDraft(draftKey, (previous) => {
|
|
590
659
|
const references = previous.references ?? [];
|
|
591
|
-
|
|
660
|
+
// 目录在 @ 选择器里存成 `src/lib/`:去重按去掉尾斜杠比较,避免同一目录两条
|
|
661
|
+
const samePath = (a: string, b: string) => a.replace(/[\\/]+$/, "") === b.replace(/[\\/]+$/, "");
|
|
662
|
+
if (references.some((existing) => samePath(existing, path))) return previous;
|
|
592
663
|
return { ...previous, references: [...references, path] };
|
|
593
664
|
});
|
|
594
665
|
requestAnimationFrame(() => document.querySelector<HTMLTextAreaElement>('[data-testid="composer"] textarea')?.focus());
|
|
@@ -624,7 +695,7 @@ export function AppShell() {
|
|
|
624
695
|
watchRounds: Boolean(currentPath),
|
|
625
696
|
connected: state.connected,
|
|
626
697
|
});
|
|
627
|
-
const openFileNode = useCallback((node: TreeNode) => viewer.open(node.path, { from: node.from, lazy: node.lazy }), [viewer]);
|
|
698
|
+
const openFileNode = useCallback((node: TreeNode) => viewer.open(node.path, { from: node.from, lazy: node.lazy, kind: node.kind }), [viewer]);
|
|
628
699
|
// 打开面板时落在最新轮:useGrowth 活在 AppShell 里、不随抽屉卸载,state 不会自己回到最新,
|
|
629
700
|
// 所以每次从「关」变「开」(或换了工作区)都显式选一次最新轮。
|
|
630
701
|
// 新轮次出现时不再自动跳——用户打开面板后停在哪一轮就是哪一轮。
|
|
@@ -655,11 +726,11 @@ export function AppShell() {
|
|
|
655
726
|
const growthSelect = growth.select;
|
|
656
727
|
const showRound = useCallback((commit: string) => {
|
|
657
728
|
skipLatestOnce.current = true;
|
|
658
|
-
|
|
729
|
+
chooseDrawerSection("project");
|
|
659
730
|
setSelected(null);
|
|
660
731
|
toggleDrawer(true);
|
|
661
732
|
growthSelect(commit);
|
|
662
|
-
}, [toggleDrawer, growthSelect]);
|
|
733
|
+
}, [toggleDrawer, growthSelect, chooseDrawerSection]);
|
|
663
734
|
const jumpToChat = useCallback((messageId: string) => {
|
|
664
735
|
requestAnimationFrame(() => {
|
|
665
736
|
const node = document.querySelector<HTMLElement>(`[data-role="user"][data-message-id="${CSS.escape(messageId)}"]`);
|
|
@@ -678,7 +749,7 @@ export function AppShell() {
|
|
|
678
749
|
// 抽屉里的一个入口,不再单独占一列,所以是 3 列而不是 4 列。
|
|
679
750
|
// JSX 里各列的渲染顺序必须与这里严格一致,否则网格会把内容摆错列。
|
|
680
751
|
// 最右一列只有一条宽度(rightWidth):详情栏与抽屉合并后不再各占一列。
|
|
681
|
-
const rightColumnVisible = Boolean(selected) || drawerOpen;
|
|
752
|
+
const rightColumnVisible = Boolean(selected) || drawerOpen || sideChatOpen;
|
|
682
753
|
const gridCols = isNarrow ? "minmax(0,1fr)" : `${sidebarCollapsed ? SIDEBAR_COLLAPSED : sidebarWidth}px minmax(0,1fr) ${
|
|
683
754
|
rightColumnVisible ? `${rightWidth}px` : "0px"}`;
|
|
684
755
|
|
|
@@ -699,11 +770,21 @@ export function AppShell() {
|
|
|
699
770
|
>
|
|
700
771
|
{selected ? (
|
|
701
772
|
<TrajInspector entry={selected} onClose={() => setSelected(null)} />
|
|
773
|
+
) : sideChatOpen ? (
|
|
774
|
+
<SideChatPanel
|
|
775
|
+
sessionId={currentId}
|
|
776
|
+
ready={Boolean(snapshot)}
|
|
777
|
+
mainModel={snapshot?.model}
|
|
778
|
+
models={modelChoices}
|
|
779
|
+
providerNames={providerNames}
|
|
780
|
+
authByProvider={authByProvider}
|
|
781
|
+
onClose={() => setSideChatOpen(false)}
|
|
782
|
+
/>
|
|
702
783
|
) : (
|
|
703
784
|
<DrawerPanel
|
|
704
785
|
cwd={panelCwd}
|
|
705
786
|
section={drawerSection}
|
|
706
|
-
onSectionChange={
|
|
787
|
+
onSectionChange={chooseDrawerSection}
|
|
707
788
|
onClose={() => toggleDrawer(false)}
|
|
708
789
|
sessionId={currentId}
|
|
709
790
|
promptRefreshKey={currentId}
|
|
@@ -823,15 +904,17 @@ export function AppShell() {
|
|
|
823
904
|
providerNames={providerNames}
|
|
824
905
|
authByProvider={authByProvider}
|
|
825
906
|
addWorkspaceByPicker={addWorkspaceByPicker}
|
|
826
|
-
|
|
907
|
+
heroChoice={heroChoice}
|
|
827
908
|
onSelectHeroModel={(provider, id) => {
|
|
828
|
-
|
|
909
|
+
const choice = { provider, id };
|
|
910
|
+
setHeroModel(choice);
|
|
911
|
+
// 只记在当前工作区名下
|
|
912
|
+
if (heroCwd) writeRememberedHeroModel(localStorage, heroCwd, choice);
|
|
829
913
|
const levels = modelChoices.find((model) => model.provider === provider && model.id === id)?.thinkingLevels ?? [];
|
|
830
914
|
if (heroThinking && !levels.includes(heroThinking)) setHeroThinking("");
|
|
831
915
|
}}
|
|
832
|
-
defaultModel={defaultModel}
|
|
833
916
|
heroModelLevels={heroModelLevels}
|
|
834
|
-
|
|
917
|
+
heroEffectiveThinking={heroEffectiveThinking}
|
|
835
918
|
onSelectHeroThinking={setHeroThinking}
|
|
836
919
|
/>
|
|
837
920
|
{/* 草稿阶段的错误行内显示(不再弹右下角) */}
|
|
@@ -856,10 +939,28 @@ export function AppShell() {
|
|
|
856
939
|
<span className="min-w-0 flex-1 truncate" style={{ fontSize: 14.5, fontWeight: 600 }}>
|
|
857
940
|
{title}
|
|
858
941
|
</span>
|
|
859
|
-
{/*
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
942
|
+
{/* 旁聊直达按钮;旁聊与其他入口共用右侧抽屉。 */}
|
|
943
|
+
<button
|
|
944
|
+
type="button"
|
|
945
|
+
className="icon-btn"
|
|
946
|
+
style={{ width: 26, height: 26, color: sideChatOpen ? "var(--dsw-accent)" : "var(--dsw-label-secondary)" }}
|
|
947
|
+
aria-label={t.sideChat}
|
|
948
|
+
title={t.sideChat}
|
|
949
|
+
aria-pressed={sideChatOpen}
|
|
950
|
+
data-testid="side-chat-toggle"
|
|
951
|
+
onClick={() => {
|
|
952
|
+
preserveChatReadingPosition();
|
|
953
|
+
setSelected(null);
|
|
954
|
+
setSideChatOpen((open) => {
|
|
955
|
+
// 最右一列只有一个:开旁聊就收起抽屉
|
|
956
|
+
if (!open) toggleDrawer(false);
|
|
957
|
+
return !open;
|
|
958
|
+
});
|
|
959
|
+
}}
|
|
960
|
+
>
|
|
961
|
+
<SideChatIcon size={16} />
|
|
962
|
+
</button>
|
|
963
|
+
{/* 右侧抽屉的入口与开关 */}
|
|
863
964
|
<button
|
|
864
965
|
type="button"
|
|
865
966
|
className="icon-btn"
|
|
@@ -962,6 +1063,7 @@ export function AppShell() {
|
|
|
962
1063
|
authByProvider={authByProvider}
|
|
963
1064
|
queue={snapshot?.queue ?? { steering: [], followUp: [] }}
|
|
964
1065
|
commands={slashCommands}
|
|
1066
|
+
cwd={panelCwd}
|
|
965
1067
|
onCommand={runSlashCommand}
|
|
966
1068
|
onSend={sendPrompt}
|
|
967
1069
|
onSteer={(text, images) => sendCommand({ cmd: "prompt", text, images, behavior: "steer" })}
|
|
@@ -1013,7 +1115,7 @@ export function AppShell() {
|
|
|
1013
1115
|
{/* 窄屏最右一列:贴右边滑出(轨迹详情与抽屉共用,遮罩关闭回到对话) */}
|
|
1014
1116
|
{isNarrow && rightColumnVisible && (
|
|
1015
1117
|
<>
|
|
1016
|
-
<button className="fixed inset-0 z-[85]" style={{ background: "var(--dsw-mask)" }} onClick={() => (selected ? setSelected(null) : toggleDrawer(false))} aria-label={t.close} />
|
|
1118
|
+
<button className="fixed inset-0 z-[85]" style={{ background: "var(--dsw-mask)" }} onClick={() => (selected ? setSelected(null) : sideChatOpen ? setSideChatOpen(false) : toggleDrawer(false))} aria-label={t.close} />
|
|
1017
1119
|
{rightColumn}
|
|
1018
1120
|
</>
|
|
1019
1121
|
)}
|
|
@@ -1113,11 +1215,10 @@ function Hero({
|
|
|
1113
1215
|
providerNames,
|
|
1114
1216
|
authByProvider,
|
|
1115
1217
|
addWorkspaceByPicker,
|
|
1116
|
-
|
|
1218
|
+
heroChoice,
|
|
1117
1219
|
onSelectHeroModel,
|
|
1118
|
-
defaultModel,
|
|
1119
1220
|
heroModelLevels,
|
|
1120
|
-
|
|
1221
|
+
heroEffectiveThinking,
|
|
1121
1222
|
onSelectHeroThinking,
|
|
1122
1223
|
}: {
|
|
1123
1224
|
draft: ChatDraft;
|
|
@@ -1139,11 +1240,10 @@ function Hero({
|
|
|
1139
1240
|
providerNames: Record<string, string>;
|
|
1140
1241
|
authByProvider: Record<string, boolean>;
|
|
1141
1242
|
addWorkspaceByPicker: () => Promise<string | null>;
|
|
1142
|
-
|
|
1243
|
+
heroChoice?: ModelChoice;
|
|
1143
1244
|
onSelectHeroModel: (provider: string, id: string) => void;
|
|
1144
|
-
defaultModel?: ModelChoice;
|
|
1145
1245
|
heroModelLevels: string[];
|
|
1146
|
-
|
|
1246
|
+
heroEffectiveThinking: string;
|
|
1147
1247
|
onSelectHeroThinking: (level: string) => void;
|
|
1148
1248
|
}) {
|
|
1149
1249
|
const { t } = useI18n();
|
|
@@ -1237,14 +1337,16 @@ function Hero({
|
|
|
1237
1337
|
|
|
1238
1338
|
{/* 输入卡 */}
|
|
1239
1339
|
<ChatInput
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
|
|
1340
|
+
draft={draft}
|
|
1341
|
+
onDraftChange={onDraftChange}
|
|
1342
|
+
onUploadError={onUploadError}
|
|
1343
|
+
onUploadProgress={onUploadProgress}
|
|
1344
|
+
uploadFailure={uploadFailure}
|
|
1345
|
+
pendingUploadCount={pendingUploadCount}
|
|
1346
|
+
pendingSend={pendingSend}
|
|
1347
|
+
onSendPendingChange={onSendPendingChange}
|
|
1348
|
+
// 新会话也能 @ 引用:候选来自上面选中的工作区
|
|
1349
|
+
cwd={cwd}
|
|
1248
1350
|
commands={commands}
|
|
1249
1351
|
onCommand={onCommand}
|
|
1250
1352
|
isStreaming={false}
|
|
@@ -1252,8 +1354,8 @@ function Hero({
|
|
|
1252
1354
|
contextTokens={null}
|
|
1253
1355
|
contextWindow={null}
|
|
1254
1356
|
contextVisible={false}
|
|
1255
|
-
model={
|
|
1256
|
-
thinkingLevel={
|
|
1357
|
+
model={heroChoice}
|
|
1358
|
+
thinkingLevel={heroEffectiveThinking}
|
|
1257
1359
|
thinkingLevels={heroModelLevels}
|
|
1258
1360
|
models={models}
|
|
1259
1361
|
providerNames={providerNames}
|