@qt4798/pi-web 0.9.4 → 0.9.6
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 +15 -8
- package/.next/build-manifest.json +2 -2
- package/.next/required-server-files.js +1 -1
- package/.next/required-server-files.json +1 -1
- package/.next/routes-manifest.json +42 -0
- package/.next/server/app/_global-error/page.js +2 -2
- package/.next/server/app/_global-error/page_client-reference-manifest.js +1 -1
- package/.next/server/app/_global-error.html +1 -1
- package/.next/server/app/_global-error.rsc +1 -1
- package/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_global-error.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/_not-found/page.js +2 -2
- package/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/.next/server/app/_not-found.html +1 -1
- package/.next/server/app/_not-found.rsc +1 -1
- package/.next/server/app/_not-found.segments/_full.segment.rsc +1 -1
- package/.next/server/app/_not-found.segments/_head.segment.rsc +1 -1
- package/.next/server/app/_not-found.segments/_index.segment.rsc +1 -1
- package/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
- package/.next/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
- package/.next/server/app/_not-found.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/api/agent/[id]/bash-output/route.js +1 -1
- package/.next/server/app/api/agent/[id]/events/route.js +2 -2
- package/.next/server/app/api/agent/[id]/route.js +1 -1
- package/.next/server/app/api/agent/new/route.js +1 -1
- package/.next/server/app/api/agent/running/route.js +1 -1
- package/.next/server/app/api/auth/all-providers/route.js +1 -1
- package/.next/server/app/api/auth/api-key/[provider]/route.js +1 -1
- package/.next/server/app/api/auth/login/[provider]/route.js +1 -1
- package/.next/server/app/api/auth/logout/[provider]/route.js +1 -1
- package/.next/server/app/api/auth/providers/route.js +1 -1
- package/.next/server/app/api/backup/export/route.js +1 -0
- package/.next/server/app/api/backup/export/route.js.nft.json +1 -0
- package/.next/server/app/api/backup/export/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/backup/import/route.js +1 -0
- package/.next/server/app/api/backup/import/route.js.nft.json +1 -0
- package/.next/server/app/api/backup/import/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/cwd/browse/route.js +1 -1
- package/.next/server/app/api/cwd/validate/route.js +1 -1
- package/.next/server/app/api/default-cwd/route.js +1 -1
- package/.next/server/app/api/file-index/route.js +1 -1
- package/.next/server/app/api/files/[...path]/route.js +1 -1
- package/.next/server/app/api/git/diff/route.js +1 -1
- package/.next/server/app/api/git/status/route.js +1 -1
- package/.next/server/app/api/home/route.js +1 -1
- package/.next/server/app/api/import/discover/route.js +1 -0
- package/.next/server/app/api/import/discover/route.js.nft.json +1 -0
- package/.next/server/app/api/import/discover/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/import/execute/route.js +1 -0
- package/.next/server/app/api/import/execute/route.js.nft.json +1 -0
- package/.next/server/app/api/import/execute/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/import/status/route.js +1 -0
- package/.next/server/app/api/import/status/route.js.nft.json +1 -0
- package/.next/server/app/api/import/status/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/models/route.js +1 -1
- package/.next/server/app/api/models-config/builtin/route.js +1 -0
- package/.next/server/app/api/models-config/builtin/route.js.nft.json +1 -0
- package/.next/server/app/api/models-config/builtin/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/models-config/catalog/route.js +1 -1
- package/.next/server/app/api/models-config/discover/route.js +1 -1
- package/.next/server/app/api/models-config/route.js +1 -1
- package/.next/server/app/api/models-config/test/route.js +1 -1
- package/.next/server/app/api/plugins/route.js +1 -1
- package/.next/server/app/api/project-trust/route.js +1 -1
- package/.next/server/app/api/sessions/[id]/auto-name/route.js +3 -3
- package/.next/server/app/api/sessions/[id]/context/route.js +1 -1
- package/.next/server/app/api/sessions/[id]/entries/[entryId]/thinking/route.js +1 -1
- package/.next/server/app/api/sessions/[id]/export/route.js +1 -1
- package/.next/server/app/api/sessions/[id]/queue-recovery/route.js +1 -1
- package/.next/server/app/api/sessions/[id]/route.js +1 -1
- package/.next/server/app/api/sessions/[id]/state/route.js +1 -1
- package/.next/server/app/api/sessions/route.js +1 -1
- package/.next/server/app/api/settings/title-model/route.js +1 -0
- package/.next/server/app/api/settings/title-model/route.js.nft.json +1 -0
- package/.next/server/app/api/settings/title-model/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/skills/check/route.js +1 -1
- package/.next/server/app/api/skills/install/route.js +1 -1
- package/.next/server/app/api/skills/route.js +2 -2
- package/.next/server/app/api/skills/search/route.js +1 -1
- package/.next/server/app/api/skills/update/route.js +1 -1
- package/.next/server/app/api/themes/[name]/route.js +1 -1
- package/.next/server/app/api/themes/route.js +1 -1
- package/.next/server/app/api/worktrees/route.js +1 -1
- package/.next/server/app/icon.ico/route.js +1 -1
- package/.next/server/app/icon.png/route.js +1 -1
- package/.next/server/app/icon.svg/route.js +1 -1
- package/.next/server/app/index.html +1 -1
- package/.next/server/app/index.rsc +3 -3
- package/.next/server/app/index.segments/__PAGE__.segment.rsc +3 -3
- package/.next/server/app/index.segments/_full.segment.rsc +3 -3
- package/.next/server/app/index.segments/_head.segment.rsc +1 -1
- package/.next/server/app/index.segments/_index.segment.rsc +1 -1
- package/.next/server/app/index.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/page.js +5 -5
- package/.next/server/app/page_client-reference-manifest.js +1 -1
- package/.next/server/app-paths-manifest.json +15 -8
- package/.next/server/chunks/440.js +1 -0
- package/.next/server/chunks/5582.js +1 -1
- package/.next/server/chunks/6106.js +1 -0
- package/.next/server/chunks/7915.js +2 -0
- package/.next/server/middleware-build-manifest.js +1 -1
- package/.next/server/middleware.js +2 -2
- package/.next/server/pages/404.html +1 -1
- package/.next/server/pages/500.html +1 -1
- package/.next/static/chunks/{8112-57500b5de3c7af0d.js → 5998-7a8029f451fe2049.js} +1 -1
- package/.next/static/chunks/app/_global-error/page-bc5f4c047207b363.js +1 -0
- package/.next/static/chunks/app/api/agent/[id]/bash-output/route-bc5f4c047207b363.js +1 -0
- package/.next/static/chunks/app/api/agent/[id]/events/route-bc5f4c047207b363.js +1 -0
- package/.next/static/chunks/app/api/agent/[id]/route-bc5f4c047207b363.js +1 -0
- package/.next/static/chunks/app/api/agent/new/route-bc5f4c047207b363.js +1 -0
- package/.next/static/chunks/app/api/agent/running/route-bc5f4c047207b363.js +1 -0
- package/.next/static/chunks/app/api/auth/all-providers/route-bc5f4c047207b363.js +1 -0
- package/.next/static/chunks/app/api/auth/api-key/[provider]/route-bc5f4c047207b363.js +1 -0
- package/.next/static/chunks/app/api/auth/login/[provider]/route-bc5f4c047207b363.js +1 -0
- package/.next/static/chunks/app/api/auth/logout/[provider]/route-bc5f4c047207b363.js +1 -0
- package/.next/static/chunks/app/api/auth/providers/route-bc5f4c047207b363.js +1 -0
- package/.next/static/chunks/app/api/backup/export/route-bc5f4c047207b363.js +1 -0
- package/.next/static/chunks/app/api/backup/import/route-bc5f4c047207b363.js +1 -0
- package/.next/static/chunks/app/api/cwd/browse/route-bc5f4c047207b363.js +1 -0
- package/.next/static/chunks/app/api/cwd/validate/route-bc5f4c047207b363.js +1 -0
- package/.next/static/chunks/app/api/default-cwd/route-bc5f4c047207b363.js +1 -0
- package/.next/static/chunks/app/api/file-index/route-bc5f4c047207b363.js +1 -0
- package/.next/static/chunks/app/api/files/[...path]/route-bc5f4c047207b363.js +1 -0
- package/.next/static/chunks/app/api/git/diff/route-bc5f4c047207b363.js +1 -0
- package/.next/static/chunks/app/api/git/status/route-bc5f4c047207b363.js +1 -0
- package/.next/static/chunks/app/api/home/route-bc5f4c047207b363.js +1 -0
- package/.next/static/chunks/app/api/import/discover/route-bc5f4c047207b363.js +1 -0
- package/.next/static/chunks/app/api/import/execute/route-bc5f4c047207b363.js +1 -0
- package/.next/static/chunks/app/api/import/status/route-bc5f4c047207b363.js +1 -0
- package/.next/static/chunks/app/api/models/route-bc5f4c047207b363.js +1 -0
- package/.next/static/chunks/app/api/models-config/builtin/route-bc5f4c047207b363.js +1 -0
- package/.next/static/chunks/app/api/models-config/catalog/route-bc5f4c047207b363.js +1 -0
- package/.next/static/chunks/app/api/models-config/discover/route-bc5f4c047207b363.js +1 -0
- package/.next/static/chunks/app/api/models-config/route-bc5f4c047207b363.js +1 -0
- package/.next/static/chunks/app/api/models-config/test/route-bc5f4c047207b363.js +1 -0
- package/.next/static/chunks/app/api/plugins/route-bc5f4c047207b363.js +1 -0
- package/.next/static/chunks/app/api/project-trust/route-bc5f4c047207b363.js +1 -0
- package/.next/static/chunks/app/api/sessions/[id]/auto-name/route-bc5f4c047207b363.js +1 -0
- package/.next/static/chunks/app/api/sessions/[id]/context/route-bc5f4c047207b363.js +1 -0
- package/.next/static/chunks/app/api/sessions/[id]/entries/[entryId]/thinking/route-bc5f4c047207b363.js +1 -0
- package/.next/static/chunks/app/api/sessions/[id]/export/route-bc5f4c047207b363.js +1 -0
- package/.next/static/chunks/app/api/sessions/[id]/queue-recovery/route-bc5f4c047207b363.js +1 -0
- package/.next/static/chunks/app/api/sessions/[id]/route-bc5f4c047207b363.js +1 -0
- package/.next/static/chunks/app/api/sessions/[id]/state/route-bc5f4c047207b363.js +1 -0
- package/.next/static/chunks/app/api/sessions/route-bc5f4c047207b363.js +1 -0
- package/.next/static/chunks/app/api/settings/title-model/route-bc5f4c047207b363.js +1 -0
- package/.next/static/chunks/app/api/skills/check/route-bc5f4c047207b363.js +1 -0
- package/.next/static/chunks/app/api/skills/install/route-bc5f4c047207b363.js +1 -0
- package/.next/static/chunks/app/api/skills/route-bc5f4c047207b363.js +1 -0
- package/.next/static/chunks/app/api/skills/search/route-bc5f4c047207b363.js +1 -0
- package/.next/static/chunks/app/api/skills/update/route-bc5f4c047207b363.js +1 -0
- package/.next/static/chunks/app/api/themes/[name]/route-bc5f4c047207b363.js +1 -0
- package/.next/static/chunks/app/api/themes/route-bc5f4c047207b363.js +1 -0
- package/.next/static/chunks/app/api/worktrees/route-bc5f4c047207b363.js +1 -0
- package/.next/static/chunks/app/page-765e3f5b8229c631.js +15 -0
- package/.next/static/chunks/next/dist/client/components/builtin/app-error-bc5f4c047207b363.js +1 -0
- package/.next/static/chunks/next/dist/client/components/builtin/forbidden-bc5f4c047207b363.js +1 -0
- package/.next/static/chunks/next/dist/client/components/builtin/not-found-bc5f4c047207b363.js +1 -0
- package/.next/static/chunks/next/dist/client/components/builtin/unauthorized-bc5f4c047207b363.js +1 -0
- package/.next/static/xLWAKUhLB_rDfRzVV1xY2/_buildManifest.js +1 -0
- package/.next/trace +7 -6
- package/.next/trace-build +1 -1
- package/.next/types/app/api/backup/export/route.ts +351 -0
- package/.next/types/app/api/backup/import/route.ts +351 -0
- package/.next/types/app/api/import/discover/route.ts +351 -0
- package/.next/types/app/api/import/execute/route.ts +351 -0
- package/.next/types/app/api/import/status/route.ts +351 -0
- package/.next/types/app/api/models-config/builtin/route.ts +351 -0
- package/.next/types/app/api/settings/title-model/route.ts +351 -0
- package/.next/types/routes.d.ts +8 -1
- package/.next/types/validator.ts +63 -0
- package/README.en.md +5 -2
- package/README.md +25 -2
- package/package.json +19 -7
- package/.next/static/-RoYqrN1Mf4JD9crC9rVq/_buildManifest.js +0 -1
- package/.next/static/chunks/app/_global-error/page-1fddebcafb57d31a.js +0 -1
- package/.next/static/chunks/app/api/agent/[id]/bash-output/route-1fddebcafb57d31a.js +0 -1
- package/.next/static/chunks/app/api/agent/[id]/events/route-1fddebcafb57d31a.js +0 -1
- package/.next/static/chunks/app/api/agent/[id]/route-1fddebcafb57d31a.js +0 -1
- package/.next/static/chunks/app/api/agent/new/route-1fddebcafb57d31a.js +0 -1
- package/.next/static/chunks/app/api/agent/running/route-1fddebcafb57d31a.js +0 -1
- package/.next/static/chunks/app/api/auth/all-providers/route-1fddebcafb57d31a.js +0 -1
- package/.next/static/chunks/app/api/auth/api-key/[provider]/route-1fddebcafb57d31a.js +0 -1
- package/.next/static/chunks/app/api/auth/login/[provider]/route-1fddebcafb57d31a.js +0 -1
- package/.next/static/chunks/app/api/auth/logout/[provider]/route-1fddebcafb57d31a.js +0 -1
- package/.next/static/chunks/app/api/auth/providers/route-1fddebcafb57d31a.js +0 -1
- package/.next/static/chunks/app/api/cwd/browse/route-1fddebcafb57d31a.js +0 -1
- package/.next/static/chunks/app/api/cwd/validate/route-1fddebcafb57d31a.js +0 -1
- package/.next/static/chunks/app/api/default-cwd/route-1fddebcafb57d31a.js +0 -1
- package/.next/static/chunks/app/api/file-index/route-1fddebcafb57d31a.js +0 -1
- package/.next/static/chunks/app/api/files/[...path]/route-1fddebcafb57d31a.js +0 -1
- package/.next/static/chunks/app/api/git/diff/route-1fddebcafb57d31a.js +0 -1
- package/.next/static/chunks/app/api/git/status/route-1fddebcafb57d31a.js +0 -1
- package/.next/static/chunks/app/api/home/route-1fddebcafb57d31a.js +0 -1
- package/.next/static/chunks/app/api/models/route-1fddebcafb57d31a.js +0 -1
- package/.next/static/chunks/app/api/models-config/catalog/route-1fddebcafb57d31a.js +0 -1
- package/.next/static/chunks/app/api/models-config/discover/route-1fddebcafb57d31a.js +0 -1
- package/.next/static/chunks/app/api/models-config/route-1fddebcafb57d31a.js +0 -1
- package/.next/static/chunks/app/api/models-config/test/route-1fddebcafb57d31a.js +0 -1
- package/.next/static/chunks/app/api/plugins/route-1fddebcafb57d31a.js +0 -1
- package/.next/static/chunks/app/api/project-trust/route-1fddebcafb57d31a.js +0 -1
- package/.next/static/chunks/app/api/sessions/[id]/auto-name/route-1fddebcafb57d31a.js +0 -1
- package/.next/static/chunks/app/api/sessions/[id]/context/route-1fddebcafb57d31a.js +0 -1
- package/.next/static/chunks/app/api/sessions/[id]/entries/[entryId]/thinking/route-1fddebcafb57d31a.js +0 -1
- package/.next/static/chunks/app/api/sessions/[id]/export/route-1fddebcafb57d31a.js +0 -1
- package/.next/static/chunks/app/api/sessions/[id]/queue-recovery/route-1fddebcafb57d31a.js +0 -1
- package/.next/static/chunks/app/api/sessions/[id]/route-1fddebcafb57d31a.js +0 -1
- package/.next/static/chunks/app/api/sessions/[id]/state/route-1fddebcafb57d31a.js +0 -1
- package/.next/static/chunks/app/api/sessions/route-1fddebcafb57d31a.js +0 -1
- package/.next/static/chunks/app/api/skills/check/route-1fddebcafb57d31a.js +0 -1
- package/.next/static/chunks/app/api/skills/install/route-1fddebcafb57d31a.js +0 -1
- package/.next/static/chunks/app/api/skills/route-1fddebcafb57d31a.js +0 -1
- package/.next/static/chunks/app/api/skills/search/route-1fddebcafb57d31a.js +0 -1
- package/.next/static/chunks/app/api/skills/update/route-1fddebcafb57d31a.js +0 -1
- package/.next/static/chunks/app/api/themes/[name]/route-1fddebcafb57d31a.js +0 -1
- package/.next/static/chunks/app/api/themes/route-1fddebcafb57d31a.js +0 -1
- package/.next/static/chunks/app/api/worktrees/route-1fddebcafb57d31a.js +0 -1
- package/.next/static/chunks/app/page-47de6c92ff29e268.js +0 -15
- package/.next/static/chunks/next/dist/client/components/builtin/app-error-1fddebcafb57d31a.js +0 -1
- package/.next/static/chunks/next/dist/client/components/builtin/forbidden-1fddebcafb57d31a.js +0 -1
- package/.next/static/chunks/next/dist/client/components/builtin/not-found-1fddebcafb57d31a.js +0 -1
- package/.next/static/chunks/next/dist/client/components/builtin/unauthorized-1fddebcafb57d31a.js +0 -1
- /package/.next/static/{-RoYqrN1Mf4JD9crC9rVq → xLWAKUhLB_rDfRzVV1xY2}/_ssgManifest.js +0 -0
|
@@ -0,0 +1,351 @@
|
|
|
1
|
+
// File: /Volumes/1T 原装/项目研发/pi-web-QT/app/api/settings/title-model/route.ts
|
|
2
|
+
import * as entry from '../../../../../../app/api/settings/title-model/route.js'
|
|
3
|
+
import type { NextRequest } from 'next/server.js'
|
|
4
|
+
|
|
5
|
+
import type { InstantConfigForTypeCheckInternal } from 'next/dist/build/segment-config/app/app-segment-config.js'
|
|
6
|
+
|
|
7
|
+
type TEntry = typeof import('../../../../../../app/api/settings/title-model/route.js')
|
|
8
|
+
|
|
9
|
+
type SegmentParams<T extends Object = any> = T extends Record<string, any>
|
|
10
|
+
? { [K in keyof T]: T[K] extends string ? string | string[] | undefined : never }
|
|
11
|
+
: T
|
|
12
|
+
|
|
13
|
+
// Check that the entry is a valid entry
|
|
14
|
+
checkFields<Diff<{
|
|
15
|
+
GET?: Function
|
|
16
|
+
HEAD?: Function
|
|
17
|
+
OPTIONS?: Function
|
|
18
|
+
POST?: Function
|
|
19
|
+
PUT?: Function
|
|
20
|
+
DELETE?: Function
|
|
21
|
+
PATCH?: Function
|
|
22
|
+
config?: {}
|
|
23
|
+
generateStaticParams?: Function
|
|
24
|
+
unstable_instant?: InstantConfigForTypeCheckInternal
|
|
25
|
+
unstable_dynamicStaleTime?: number
|
|
26
|
+
revalidate?: RevalidateRange<TEntry> | false
|
|
27
|
+
dynamic?: 'auto' | 'force-dynamic' | 'error' | 'force-static'
|
|
28
|
+
dynamicParams?: boolean
|
|
29
|
+
fetchCache?: 'auto' | 'force-no-store' | 'only-no-store' | 'default-no-store' | 'default-cache' | 'only-cache' | 'force-cache'
|
|
30
|
+
preferredRegion?: 'auto' | 'global' | 'home' | string | string[]
|
|
31
|
+
runtime?: 'nodejs' | 'experimental-edge' | 'edge'
|
|
32
|
+
maxDuration?: number
|
|
33
|
+
|
|
34
|
+
}, TEntry, ''>>()
|
|
35
|
+
|
|
36
|
+
type RouteContext = { params: Promise<SegmentParams> }
|
|
37
|
+
// Check the prop type of the entry function
|
|
38
|
+
if ('GET' in entry) {
|
|
39
|
+
checkFields<
|
|
40
|
+
Diff<
|
|
41
|
+
ParamCheck<Request | NextRequest>,
|
|
42
|
+
{
|
|
43
|
+
__tag__: 'GET'
|
|
44
|
+
__param_position__: 'first'
|
|
45
|
+
__param_type__: FirstArg<MaybeField<TEntry, 'GET'>>
|
|
46
|
+
},
|
|
47
|
+
'GET'
|
|
48
|
+
>
|
|
49
|
+
>()
|
|
50
|
+
checkFields<
|
|
51
|
+
Diff<
|
|
52
|
+
ParamCheck<RouteContext>,
|
|
53
|
+
{
|
|
54
|
+
__tag__: 'GET'
|
|
55
|
+
__param_position__: 'second'
|
|
56
|
+
__param_type__: SecondArg<MaybeField<TEntry, 'GET'>>
|
|
57
|
+
},
|
|
58
|
+
'GET'
|
|
59
|
+
>
|
|
60
|
+
>()
|
|
61
|
+
|
|
62
|
+
checkFields<
|
|
63
|
+
Diff<
|
|
64
|
+
{
|
|
65
|
+
__tag__: 'GET',
|
|
66
|
+
__return_type__: Response | void | never | Promise<Response | void | never>
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
__tag__: 'GET',
|
|
70
|
+
__return_type__: ReturnType<MaybeField<TEntry, 'GET'>>
|
|
71
|
+
},
|
|
72
|
+
'GET'
|
|
73
|
+
>
|
|
74
|
+
>()
|
|
75
|
+
}
|
|
76
|
+
// Check the prop type of the entry function
|
|
77
|
+
if ('HEAD' in entry) {
|
|
78
|
+
checkFields<
|
|
79
|
+
Diff<
|
|
80
|
+
ParamCheck<Request | NextRequest>,
|
|
81
|
+
{
|
|
82
|
+
__tag__: 'HEAD'
|
|
83
|
+
__param_position__: 'first'
|
|
84
|
+
__param_type__: FirstArg<MaybeField<TEntry, 'HEAD'>>
|
|
85
|
+
},
|
|
86
|
+
'HEAD'
|
|
87
|
+
>
|
|
88
|
+
>()
|
|
89
|
+
checkFields<
|
|
90
|
+
Diff<
|
|
91
|
+
ParamCheck<RouteContext>,
|
|
92
|
+
{
|
|
93
|
+
__tag__: 'HEAD'
|
|
94
|
+
__param_position__: 'second'
|
|
95
|
+
__param_type__: SecondArg<MaybeField<TEntry, 'HEAD'>>
|
|
96
|
+
},
|
|
97
|
+
'HEAD'
|
|
98
|
+
>
|
|
99
|
+
>()
|
|
100
|
+
|
|
101
|
+
checkFields<
|
|
102
|
+
Diff<
|
|
103
|
+
{
|
|
104
|
+
__tag__: 'HEAD',
|
|
105
|
+
__return_type__: Response | void | never | Promise<Response | void | never>
|
|
106
|
+
},
|
|
107
|
+
{
|
|
108
|
+
__tag__: 'HEAD',
|
|
109
|
+
__return_type__: ReturnType<MaybeField<TEntry, 'HEAD'>>
|
|
110
|
+
},
|
|
111
|
+
'HEAD'
|
|
112
|
+
>
|
|
113
|
+
>()
|
|
114
|
+
}
|
|
115
|
+
// Check the prop type of the entry function
|
|
116
|
+
if ('OPTIONS' in entry) {
|
|
117
|
+
checkFields<
|
|
118
|
+
Diff<
|
|
119
|
+
ParamCheck<Request | NextRequest>,
|
|
120
|
+
{
|
|
121
|
+
__tag__: 'OPTIONS'
|
|
122
|
+
__param_position__: 'first'
|
|
123
|
+
__param_type__: FirstArg<MaybeField<TEntry, 'OPTIONS'>>
|
|
124
|
+
},
|
|
125
|
+
'OPTIONS'
|
|
126
|
+
>
|
|
127
|
+
>()
|
|
128
|
+
checkFields<
|
|
129
|
+
Diff<
|
|
130
|
+
ParamCheck<RouteContext>,
|
|
131
|
+
{
|
|
132
|
+
__tag__: 'OPTIONS'
|
|
133
|
+
__param_position__: 'second'
|
|
134
|
+
__param_type__: SecondArg<MaybeField<TEntry, 'OPTIONS'>>
|
|
135
|
+
},
|
|
136
|
+
'OPTIONS'
|
|
137
|
+
>
|
|
138
|
+
>()
|
|
139
|
+
|
|
140
|
+
checkFields<
|
|
141
|
+
Diff<
|
|
142
|
+
{
|
|
143
|
+
__tag__: 'OPTIONS',
|
|
144
|
+
__return_type__: Response | void | never | Promise<Response | void | never>
|
|
145
|
+
},
|
|
146
|
+
{
|
|
147
|
+
__tag__: 'OPTIONS',
|
|
148
|
+
__return_type__: ReturnType<MaybeField<TEntry, 'OPTIONS'>>
|
|
149
|
+
},
|
|
150
|
+
'OPTIONS'
|
|
151
|
+
>
|
|
152
|
+
>()
|
|
153
|
+
}
|
|
154
|
+
// Check the prop type of the entry function
|
|
155
|
+
if ('POST' in entry) {
|
|
156
|
+
checkFields<
|
|
157
|
+
Diff<
|
|
158
|
+
ParamCheck<Request | NextRequest>,
|
|
159
|
+
{
|
|
160
|
+
__tag__: 'POST'
|
|
161
|
+
__param_position__: 'first'
|
|
162
|
+
__param_type__: FirstArg<MaybeField<TEntry, 'POST'>>
|
|
163
|
+
},
|
|
164
|
+
'POST'
|
|
165
|
+
>
|
|
166
|
+
>()
|
|
167
|
+
checkFields<
|
|
168
|
+
Diff<
|
|
169
|
+
ParamCheck<RouteContext>,
|
|
170
|
+
{
|
|
171
|
+
__tag__: 'POST'
|
|
172
|
+
__param_position__: 'second'
|
|
173
|
+
__param_type__: SecondArg<MaybeField<TEntry, 'POST'>>
|
|
174
|
+
},
|
|
175
|
+
'POST'
|
|
176
|
+
>
|
|
177
|
+
>()
|
|
178
|
+
|
|
179
|
+
checkFields<
|
|
180
|
+
Diff<
|
|
181
|
+
{
|
|
182
|
+
__tag__: 'POST',
|
|
183
|
+
__return_type__: Response | void | never | Promise<Response | void | never>
|
|
184
|
+
},
|
|
185
|
+
{
|
|
186
|
+
__tag__: 'POST',
|
|
187
|
+
__return_type__: ReturnType<MaybeField<TEntry, 'POST'>>
|
|
188
|
+
},
|
|
189
|
+
'POST'
|
|
190
|
+
>
|
|
191
|
+
>()
|
|
192
|
+
}
|
|
193
|
+
// Check the prop type of the entry function
|
|
194
|
+
if ('PUT' in entry) {
|
|
195
|
+
checkFields<
|
|
196
|
+
Diff<
|
|
197
|
+
ParamCheck<Request | NextRequest>,
|
|
198
|
+
{
|
|
199
|
+
__tag__: 'PUT'
|
|
200
|
+
__param_position__: 'first'
|
|
201
|
+
__param_type__: FirstArg<MaybeField<TEntry, 'PUT'>>
|
|
202
|
+
},
|
|
203
|
+
'PUT'
|
|
204
|
+
>
|
|
205
|
+
>()
|
|
206
|
+
checkFields<
|
|
207
|
+
Diff<
|
|
208
|
+
ParamCheck<RouteContext>,
|
|
209
|
+
{
|
|
210
|
+
__tag__: 'PUT'
|
|
211
|
+
__param_position__: 'second'
|
|
212
|
+
__param_type__: SecondArg<MaybeField<TEntry, 'PUT'>>
|
|
213
|
+
},
|
|
214
|
+
'PUT'
|
|
215
|
+
>
|
|
216
|
+
>()
|
|
217
|
+
|
|
218
|
+
checkFields<
|
|
219
|
+
Diff<
|
|
220
|
+
{
|
|
221
|
+
__tag__: 'PUT',
|
|
222
|
+
__return_type__: Response | void | never | Promise<Response | void | never>
|
|
223
|
+
},
|
|
224
|
+
{
|
|
225
|
+
__tag__: 'PUT',
|
|
226
|
+
__return_type__: ReturnType<MaybeField<TEntry, 'PUT'>>
|
|
227
|
+
},
|
|
228
|
+
'PUT'
|
|
229
|
+
>
|
|
230
|
+
>()
|
|
231
|
+
}
|
|
232
|
+
// Check the prop type of the entry function
|
|
233
|
+
if ('DELETE' in entry) {
|
|
234
|
+
checkFields<
|
|
235
|
+
Diff<
|
|
236
|
+
ParamCheck<Request | NextRequest>,
|
|
237
|
+
{
|
|
238
|
+
__tag__: 'DELETE'
|
|
239
|
+
__param_position__: 'first'
|
|
240
|
+
__param_type__: FirstArg<MaybeField<TEntry, 'DELETE'>>
|
|
241
|
+
},
|
|
242
|
+
'DELETE'
|
|
243
|
+
>
|
|
244
|
+
>()
|
|
245
|
+
checkFields<
|
|
246
|
+
Diff<
|
|
247
|
+
ParamCheck<RouteContext>,
|
|
248
|
+
{
|
|
249
|
+
__tag__: 'DELETE'
|
|
250
|
+
__param_position__: 'second'
|
|
251
|
+
__param_type__: SecondArg<MaybeField<TEntry, 'DELETE'>>
|
|
252
|
+
},
|
|
253
|
+
'DELETE'
|
|
254
|
+
>
|
|
255
|
+
>()
|
|
256
|
+
|
|
257
|
+
checkFields<
|
|
258
|
+
Diff<
|
|
259
|
+
{
|
|
260
|
+
__tag__: 'DELETE',
|
|
261
|
+
__return_type__: Response | void | never | Promise<Response | void | never>
|
|
262
|
+
},
|
|
263
|
+
{
|
|
264
|
+
__tag__: 'DELETE',
|
|
265
|
+
__return_type__: ReturnType<MaybeField<TEntry, 'DELETE'>>
|
|
266
|
+
},
|
|
267
|
+
'DELETE'
|
|
268
|
+
>
|
|
269
|
+
>()
|
|
270
|
+
}
|
|
271
|
+
// Check the prop type of the entry function
|
|
272
|
+
if ('PATCH' in entry) {
|
|
273
|
+
checkFields<
|
|
274
|
+
Diff<
|
|
275
|
+
ParamCheck<Request | NextRequest>,
|
|
276
|
+
{
|
|
277
|
+
__tag__: 'PATCH'
|
|
278
|
+
__param_position__: 'first'
|
|
279
|
+
__param_type__: FirstArg<MaybeField<TEntry, 'PATCH'>>
|
|
280
|
+
},
|
|
281
|
+
'PATCH'
|
|
282
|
+
>
|
|
283
|
+
>()
|
|
284
|
+
checkFields<
|
|
285
|
+
Diff<
|
|
286
|
+
ParamCheck<RouteContext>,
|
|
287
|
+
{
|
|
288
|
+
__tag__: 'PATCH'
|
|
289
|
+
__param_position__: 'second'
|
|
290
|
+
__param_type__: SecondArg<MaybeField<TEntry, 'PATCH'>>
|
|
291
|
+
},
|
|
292
|
+
'PATCH'
|
|
293
|
+
>
|
|
294
|
+
>()
|
|
295
|
+
|
|
296
|
+
checkFields<
|
|
297
|
+
Diff<
|
|
298
|
+
{
|
|
299
|
+
__tag__: 'PATCH',
|
|
300
|
+
__return_type__: Response | void | never | Promise<Response | void | never>
|
|
301
|
+
},
|
|
302
|
+
{
|
|
303
|
+
__tag__: 'PATCH',
|
|
304
|
+
__return_type__: ReturnType<MaybeField<TEntry, 'PATCH'>>
|
|
305
|
+
},
|
|
306
|
+
'PATCH'
|
|
307
|
+
>
|
|
308
|
+
>()
|
|
309
|
+
}
|
|
310
|
+
|
|
311
|
+
// Check the arguments and return type of the generateStaticParams function
|
|
312
|
+
if ('generateStaticParams' in entry) {
|
|
313
|
+
checkFields<Diff<{ params: SegmentParams }, FirstArg<MaybeField<TEntry, 'generateStaticParams'>>, 'generateStaticParams'>>()
|
|
314
|
+
checkFields<Diff<{ __tag__: 'generateStaticParams', __return_type__: any[] | Promise<any[]> }, { __tag__: 'generateStaticParams', __return_type__: ReturnType<MaybeField<TEntry, 'generateStaticParams'>> }>>()
|
|
315
|
+
}
|
|
316
|
+
|
|
317
|
+
export interface PageProps {
|
|
318
|
+
params?: Promise<SegmentParams>
|
|
319
|
+
searchParams?: Promise<any>
|
|
320
|
+
}
|
|
321
|
+
export interface LayoutProps {
|
|
322
|
+
children?: React.ReactNode
|
|
323
|
+
|
|
324
|
+
params?: Promise<SegmentParams>
|
|
325
|
+
}
|
|
326
|
+
|
|
327
|
+
// =============
|
|
328
|
+
// Utility types
|
|
329
|
+
type RevalidateRange<T> = T extends { revalidate: any } ? NonNegative<T['revalidate']> : never
|
|
330
|
+
|
|
331
|
+
// If T is unknown or any, it will be an empty {} type. Otherwise, it will be the same as Omit<T, keyof Base>.
|
|
332
|
+
type OmitWithTag<T, K extends keyof any, _M> = Omit<T, K>
|
|
333
|
+
type Diff<Base, T extends Base, Message extends string = ''> = 0 extends (1 & T) ? {} : OmitWithTag<T, keyof Base, Message>
|
|
334
|
+
|
|
335
|
+
type FirstArg<T extends Function> = T extends (...args: [infer T, any]) => any ? unknown extends T ? any : T : never
|
|
336
|
+
type SecondArg<T extends Function> = T extends (...args: [any, infer T]) => any ? unknown extends T ? any : T : never
|
|
337
|
+
type MaybeField<T, K extends string> = T extends { [k in K]: infer G } ? G extends Function ? G : never : never
|
|
338
|
+
|
|
339
|
+
type ParamCheck<T> = {
|
|
340
|
+
__tag__: string
|
|
341
|
+
__param_position__: string
|
|
342
|
+
__param_type__: T
|
|
343
|
+
}
|
|
344
|
+
|
|
345
|
+
function checkFields<_ extends { [k in keyof any]: never }>() {}
|
|
346
|
+
|
|
347
|
+
// https://github.com/sindresorhus/type-fest
|
|
348
|
+
type Numeric = number | bigint
|
|
349
|
+
type Zero = 0 | 0n
|
|
350
|
+
type Negative<T extends Numeric> = T extends Zero ? never : `${T}` extends `-${string}` ? T : never
|
|
351
|
+
type NonNegative<T extends Numeric> = T extends Zero ? T : Negative<T> extends never ? T : '__invalid_negative_number__'
|
package/.next/types/routes.d.ts
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
// Do not edit this file manually
|
|
3
3
|
|
|
4
4
|
type AppRoutes = "/"
|
|
5
|
-
type AppRouteHandlerRoutes = "/api/agent/[id]" | "/api/agent/[id]/bash-output" | "/api/agent/[id]/events" | "/api/agent/new" | "/api/agent/running" | "/api/auth/all-providers" | "/api/auth/api-key/[provider]" | "/api/auth/login/[provider]" | "/api/auth/logout/[provider]" | "/api/auth/providers" | "/api/cwd/browse" | "/api/cwd/validate" | "/api/default-cwd" | "/api/file-index" | "/api/files/[...path]" | "/api/git/diff" | "/api/git/status" | "/api/home" | "/api/models" | "/api/models-config" | "/api/models-config/catalog" | "/api/models-config/discover" | "/api/models-config/test" | "/api/plugins" | "/api/project-trust" | "/api/sessions" | "/api/sessions/[id]" | "/api/sessions/[id]/auto-name" | "/api/sessions/[id]/context" | "/api/sessions/[id]/entries/[entryId]/thinking" | "/api/sessions/[id]/export" | "/api/sessions/[id]/queue-recovery" | "/api/sessions/[id]/state" | "/api/skills" | "/api/skills/check" | "/api/skills/install" | "/api/skills/search" | "/api/skills/update" | "/api/themes" | "/api/themes/[name]" | "/api/worktrees"
|
|
5
|
+
type AppRouteHandlerRoutes = "/api/agent/[id]" | "/api/agent/[id]/bash-output" | "/api/agent/[id]/events" | "/api/agent/new" | "/api/agent/running" | "/api/auth/all-providers" | "/api/auth/api-key/[provider]" | "/api/auth/login/[provider]" | "/api/auth/logout/[provider]" | "/api/auth/providers" | "/api/backup/export" | "/api/backup/import" | "/api/cwd/browse" | "/api/cwd/validate" | "/api/default-cwd" | "/api/file-index" | "/api/files/[...path]" | "/api/git/diff" | "/api/git/status" | "/api/home" | "/api/import/discover" | "/api/import/execute" | "/api/import/status" | "/api/models" | "/api/models-config" | "/api/models-config/builtin" | "/api/models-config/catalog" | "/api/models-config/discover" | "/api/models-config/test" | "/api/plugins" | "/api/project-trust" | "/api/sessions" | "/api/sessions/[id]" | "/api/sessions/[id]/auto-name" | "/api/sessions/[id]/context" | "/api/sessions/[id]/entries/[entryId]/thinking" | "/api/sessions/[id]/export" | "/api/sessions/[id]/queue-recovery" | "/api/sessions/[id]/state" | "/api/settings/title-model" | "/api/skills" | "/api/skills/check" | "/api/skills/install" | "/api/skills/search" | "/api/skills/update" | "/api/themes" | "/api/themes/[name]" | "/api/worktrees"
|
|
6
6
|
type PageRoutes = never
|
|
7
7
|
type LayoutRoutes = "/"
|
|
8
8
|
type RedirectRoutes = never
|
|
@@ -22,6 +22,8 @@ interface ParamMap {
|
|
|
22
22
|
"/api/auth/login/[provider]": { "provider": string; }
|
|
23
23
|
"/api/auth/logout/[provider]": { "provider": string; }
|
|
24
24
|
"/api/auth/providers": {}
|
|
25
|
+
"/api/backup/export": {}
|
|
26
|
+
"/api/backup/import": {}
|
|
25
27
|
"/api/cwd/browse": {}
|
|
26
28
|
"/api/cwd/validate": {}
|
|
27
29
|
"/api/default-cwd": {}
|
|
@@ -30,8 +32,12 @@ interface ParamMap {
|
|
|
30
32
|
"/api/git/diff": {}
|
|
31
33
|
"/api/git/status": {}
|
|
32
34
|
"/api/home": {}
|
|
35
|
+
"/api/import/discover": {}
|
|
36
|
+
"/api/import/execute": {}
|
|
37
|
+
"/api/import/status": {}
|
|
33
38
|
"/api/models": {}
|
|
34
39
|
"/api/models-config": {}
|
|
40
|
+
"/api/models-config/builtin": {}
|
|
35
41
|
"/api/models-config/catalog": {}
|
|
36
42
|
"/api/models-config/discover": {}
|
|
37
43
|
"/api/models-config/test": {}
|
|
@@ -45,6 +51,7 @@ interface ParamMap {
|
|
|
45
51
|
"/api/sessions/[id]/export": { "id": string; }
|
|
46
52
|
"/api/sessions/[id]/queue-recovery": { "id": string; }
|
|
47
53
|
"/api/sessions/[id]/state": { "id": string; }
|
|
54
|
+
"/api/settings/title-model": {}
|
|
48
55
|
"/api/skills": {}
|
|
49
56
|
"/api/skills/check": {}
|
|
50
57
|
"/api/skills/install": {}
|
package/.next/types/validator.ts
CHANGED
|
@@ -146,6 +146,24 @@ type RouteHandlerConfig<Route extends AppRouteHandlerRoutes = AppRouteHandlerRou
|
|
|
146
146
|
type __Unused = __Check
|
|
147
147
|
}
|
|
148
148
|
|
|
149
|
+
// Validate ../../app/api/backup/export/route.ts
|
|
150
|
+
{
|
|
151
|
+
type __IsExpected<Specific extends RouteHandlerConfig<"/api/backup/export">> = Specific
|
|
152
|
+
const handler = {} as typeof import("../../app/api/backup/export/route.js")
|
|
153
|
+
type __Check = __IsExpected<typeof handler>
|
|
154
|
+
// @ts-ignore
|
|
155
|
+
type __Unused = __Check
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
// Validate ../../app/api/backup/import/route.ts
|
|
159
|
+
{
|
|
160
|
+
type __IsExpected<Specific extends RouteHandlerConfig<"/api/backup/import">> = Specific
|
|
161
|
+
const handler = {} as typeof import("../../app/api/backup/import/route.js")
|
|
162
|
+
type __Check = __IsExpected<typeof handler>
|
|
163
|
+
// @ts-ignore
|
|
164
|
+
type __Unused = __Check
|
|
165
|
+
}
|
|
166
|
+
|
|
149
167
|
// Validate ../../app/api/cwd/browse/route.ts
|
|
150
168
|
{
|
|
151
169
|
type __IsExpected<Specific extends RouteHandlerConfig<"/api/cwd/browse">> = Specific
|
|
@@ -218,6 +236,42 @@ type RouteHandlerConfig<Route extends AppRouteHandlerRoutes = AppRouteHandlerRou
|
|
|
218
236
|
type __Unused = __Check
|
|
219
237
|
}
|
|
220
238
|
|
|
239
|
+
// Validate ../../app/api/import/discover/route.ts
|
|
240
|
+
{
|
|
241
|
+
type __IsExpected<Specific extends RouteHandlerConfig<"/api/import/discover">> = Specific
|
|
242
|
+
const handler = {} as typeof import("../../app/api/import/discover/route.js")
|
|
243
|
+
type __Check = __IsExpected<typeof handler>
|
|
244
|
+
// @ts-ignore
|
|
245
|
+
type __Unused = __Check
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
// Validate ../../app/api/import/execute/route.ts
|
|
249
|
+
{
|
|
250
|
+
type __IsExpected<Specific extends RouteHandlerConfig<"/api/import/execute">> = Specific
|
|
251
|
+
const handler = {} as typeof import("../../app/api/import/execute/route.js")
|
|
252
|
+
type __Check = __IsExpected<typeof handler>
|
|
253
|
+
// @ts-ignore
|
|
254
|
+
type __Unused = __Check
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
// Validate ../../app/api/import/status/route.ts
|
|
258
|
+
{
|
|
259
|
+
type __IsExpected<Specific extends RouteHandlerConfig<"/api/import/status">> = Specific
|
|
260
|
+
const handler = {} as typeof import("../../app/api/import/status/route.js")
|
|
261
|
+
type __Check = __IsExpected<typeof handler>
|
|
262
|
+
// @ts-ignore
|
|
263
|
+
type __Unused = __Check
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
// Validate ../../app/api/models-config/builtin/route.ts
|
|
267
|
+
{
|
|
268
|
+
type __IsExpected<Specific extends RouteHandlerConfig<"/api/models-config/builtin">> = Specific
|
|
269
|
+
const handler = {} as typeof import("../../app/api/models-config/builtin/route.js")
|
|
270
|
+
type __Check = __IsExpected<typeof handler>
|
|
271
|
+
// @ts-ignore
|
|
272
|
+
type __Unused = __Check
|
|
273
|
+
}
|
|
274
|
+
|
|
221
275
|
// Validate ../../app/api/models-config/catalog/route.ts
|
|
222
276
|
{
|
|
223
277
|
type __IsExpected<Specific extends RouteHandlerConfig<"/api/models-config/catalog">> = Specific
|
|
@@ -353,6 +407,15 @@ type RouteHandlerConfig<Route extends AppRouteHandlerRoutes = AppRouteHandlerRou
|
|
|
353
407
|
type __Unused = __Check
|
|
354
408
|
}
|
|
355
409
|
|
|
410
|
+
// Validate ../../app/api/settings/title-model/route.ts
|
|
411
|
+
{
|
|
412
|
+
type __IsExpected<Specific extends RouteHandlerConfig<"/api/settings/title-model">> = Specific
|
|
413
|
+
const handler = {} as typeof import("../../app/api/settings/title-model/route.js")
|
|
414
|
+
type __Check = __IsExpected<typeof handler>
|
|
415
|
+
// @ts-ignore
|
|
416
|
+
type __Unused = __Check
|
|
417
|
+
}
|
|
418
|
+
|
|
356
419
|
// Validate ../../app/api/skills/check/route.ts
|
|
357
420
|
{
|
|
358
421
|
type __IsExpected<Specific extends RouteHandlerConfig<"/api/skills/check">> = Specific
|
package/README.en.md
CHANGED
|
@@ -19,8 +19,11 @@
|
|
|
19
19
|
- Model, OAuth/API-key, skill, plugin, theme, language, and Git worktree management in the browser.
|
|
20
20
|
- Mobile layout keeps the selected model and send action visible, while long project and repository labels truncate instead of causing horizontal scrolling.
|
|
21
21
|
|
|
22
|
-
## Latest changes (2026-08-
|
|
22
|
+
## Latest changes (2026-08-04)
|
|
23
23
|
|
|
24
|
+
- **Backup & restore** — a new Backup tab in Settings exports/imports core config, skills, plugins, MCP servers, and sessions (optionally including API keys) as a pi-backup zip; imports remap paths and adapt MCP commands per platform, with per-category selection and per-server skip.
|
|
25
|
+
- **Auto session titles** — hover actions on a session now include a "Generate title" button that names the session from its content via a model; the title model can be set globally.
|
|
26
|
+
- **Security hardening** — auth checks were added to the auto-name, settings/title-model, models-config, and builtin-model routes; backup import gained decompression-bomb limits (per-entry and total, verified against actual bytes), script shebang allow-lists, local-package name validation, and opt-in npm reinstall.
|
|
24
27
|
- The repository now uses the `pi-web-desktop` web baseline only. Electron, desktop packaging, the PWA Service Worker, and tag-triggered desktop releases were removed.
|
|
25
28
|
- **Choose folder** opens a browsable directory picker instead of asking for a manually typed path.
|
|
26
29
|
- On mobile, project and Git worktree labels are smaller and truncate safely; the model selector and send action remain visible.
|
|
@@ -43,7 +46,7 @@ npm ci
|
|
|
43
46
|
npm run dev
|
|
44
47
|
```
|
|
45
48
|
|
|
46
|
-
|
|
49
|
+
`npm run dev` uses a **random port** (`-p 0`); the startup log prints the actual address, e.g. `http://127.0.0.1:<random port>`. The local repo build is for testing only — for daily command-line use, run the globally installed `@qt4798/pi-web` via the `pi-web` command (fixed `http://127.0.0.1:30141`). The development server listens on loopback by default; use `npm run dev:lan` only for trusted LAN testing.
|
|
47
50
|
|
|
48
51
|
## Production deployment
|
|
49
52
|
|
package/README.md
CHANGED
|
@@ -28,21 +28,44 @@
|
|
|
28
28
|
| --- | --- |
|
|
29
29
|
| 实时对话 | 通过 SSE 显示 Pi Agent 的流式输出、工具调用、思考过程与错误状态。 |
|
|
30
30
|
| 会话管理 | 按项目查看会话,支持会话内分支、Fork、重命名、删除、AI 自动生成标题与 HTML 导出。 |
|
|
31
|
+
| 会话导入 | 从 Reasonix 等工具导入历史对话记录,自动发现项目与会话,支持合并或新建项目。 |
|
|
31
32
|
| 项目与文件 | 通过目录选择器加载项目,浏览文件、Diff、图片、音频、PDF、DOCX。 |
|
|
32
33
|
| 模型与认证 | 在网页中管理模型、OAuth/API Key、连通性测试和默认模型;支持从供应商自动获取模型列表与 models.dev 定价预设一键填入。 |
|
|
34
|
+
| 备份恢复 | 一键导出/导入核心配置、技能、插件、MCP 服务器与会话(可选含密钥),跨平台自动适配路径与命令。 |
|
|
33
35
|
| 技能与插件 | 查询、安装、启停 Skills 与 package 插件。 |
|
|
34
36
|
| Git Worktree | 在同一项目下创建、切换和移除 Worktree。 |
|
|
35
37
|
| 主题与语言 | 支持 Pi TUI 主题、亮暗模式及中文/English。 |
|
|
36
38
|
| 移动端 | 适配 Safari/Chrome 窄屏布局;模型选择和发送操作保持可见。 |
|
|
37
39
|
|
|
38
|
-
## 最新更新(2026-08-
|
|
40
|
+
## 最新更新(2026-08-05)
|
|
39
41
|
|
|
42
|
+
- **会话导入**:设置弹窗新增「导入会话」标签页,自动发现 `~/.reasonix/projects/` 下的项目与历史会话,支持按项目勾选批量导入,可选择合并到现有项目或新建项目;导入后可选调用模型生成标题。
|
|
43
|
+
- **Windows 兼容修复**:修复全新安装(无历史会话)时项目选择器消失的问题;修复 `~` 路径缩写和快捷工作区识别的大小写敏感问题。
|
|
44
|
+
|
|
45
|
+
## 历史更新(2026-08-04)
|
|
46
|
+
|
|
47
|
+
- **跨平台备份恢复**:设置弹窗新增「备份」标签页,一键导出/导入核心配置、技能、插件、MCP 与会话;导入按平台自动适配路径与命令,支持类别勾选与 MCP 跳过。
|
|
48
|
+
- **自动生成会话标题**:会话列表新增“生成标题”按钮,基于会话内容调用模型命名;可全局指定标题生成模型。
|
|
49
|
+
- **内置模型覆盖**:模型配置可查看供应商内置模型明细并叠加 models.json 自定义覆盖项。
|
|
50
|
+
- **安全加固**:auto-name / settings / models-config 等 API 补齐请求鉴权;备份导入增加解压炸弹防护(单条目/总量双重上限 + 实际字节校验)、脚本白名单、路径穿越校验与 npm 插件 opt-in 重装。
|
|
40
51
|
- **供应商获取模型**:模型配置中可直接从供应商的 Base URL 拉取模型列表(支持 OpenAI / Anthropic / Google 等协议),筛选、多选后一键添加,无需手写模型 ID。
|
|
41
52
|
- **models.dev 定价预设**:填写模型 ID 后一键从 models.dev 拉取名称、上下文窗口、价格等字段填入,支持撤销;价格来源与可信度一目了然。
|
|
42
53
|
- **对话滚动跟随**:修复 agent 运行时消息列表跳到底部空白的问题;流式输出期间停留在列表底部则自动跟随,滚到上方查看历史不被打断,且最后一条消息与输入框之间保留间距。
|
|
43
54
|
- **快捷操作**:文件标签页支持中间键关闭;会话删除支持 Shift+点击跳过确认;Markdown 中的本地图片可直接预览。
|
|
44
55
|
- **URL 直达目录**:通过 `?cwd=<路径>` 参数打开网页时直接校验并进入指定目录的新会话。
|
|
45
56
|
|
|
57
|
+
## 安装提示(npm 11)
|
|
58
|
+
|
|
59
|
+
使用 npm ≥ 11 安装本包时可能出现两类提示,均为**提示性警告,不影响安装与运行**:
|
|
60
|
+
|
|
61
|
+
- `ERESOLVE overriding peer dependency`:上游 `@lobehub/ui` 依赖的 `@emoji-mart/react@1.1.1` 的 peer 声明仅到 React 18,而本包使用 React 19。npm 会自动 override 并继续安装(实际兼容)。如需彻底消除,可在你的项目 `package.json` 添加:
|
|
62
|
+
|
|
63
|
+
```json
|
|
64
|
+
"overrides": { "@emoji-mart/react": { "react": "$react" } }
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
- `allow-scripts`:npm 11 新增的安装脚本审批提示(sharp / protobufjs / @google/genai 等)。本项目已在包内声明 `allowScripts`,若你的 npm 仍提示,可执行 `npm approve-scripts --all` 审批,或在安装命令加 `--allow-scripts=sharp,protobufjs,@google/genai`。
|
|
68
|
+
|
|
46
69
|
## 最新更新(2026-08-03)
|
|
47
70
|
|
|
48
71
|
- **Web-only 基线**:界面和运行代码已统一为 `pi-web-desktop` 的网页基线;Electron 主进程、桌面端打包、PWA Service Worker 与 tag 驱动的桌面 Release 工作流已移除。
|
|
@@ -103,7 +126,7 @@ npm ci
|
|
|
103
126
|
npm run dev
|
|
104
127
|
```
|
|
105
128
|
|
|
106
|
-
|
|
129
|
+
`npm run dev` 使用**随机端口**(`-p 0`),启动日志会打印实际地址,如 `http://127.0.0.1:<随机端口>`。本地仓库构建仅作为测试环境;日常命令行运行请使用 npm 全局安装的 `@qt4798/pi-web`(`pi-web` 命令,固定 `http://127.0.0.1:30141`)。
|
|
107
130
|
|
|
108
131
|
开发服务器默认只监听本机。局域网调试可使用:
|
|
109
132
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@qt4798/pi-web",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.6",
|
|
4
4
|
"description": "Web workspace for the pi coding agent",
|
|
5
5
|
"homepage": "https://github.com/t479842598/pi-web-QT#readme",
|
|
6
6
|
"repository": {
|
|
@@ -28,11 +28,11 @@
|
|
|
28
28
|
"package.json"
|
|
29
29
|
],
|
|
30
30
|
"scripts": {
|
|
31
|
-
"dev": "next dev -H 127.0.0.1 -p
|
|
32
|
-
"dev:lan": "next dev -H 0.0.0.0 -p
|
|
31
|
+
"dev": "next dev -H 127.0.0.1 -p 0 --turbopack",
|
|
32
|
+
"dev:lan": "next dev -H 0.0.0.0 -p 0 --turbopack",
|
|
33
33
|
"build": "env -u TURBOPACK next build --webpack",
|
|
34
|
-
"start": "next start -H 127.0.0.1 -p
|
|
35
|
-
"start:lan": "next start -H 0.0.0.0 -p
|
|
34
|
+
"start": "next start -H 127.0.0.1 -p 0",
|
|
35
|
+
"start:lan": "next start -H 0.0.0.0 -p 0",
|
|
36
36
|
"lint": "eslint .",
|
|
37
37
|
"release": "npm version patch --no-git-tag-version && npm run build && npm publish --access public",
|
|
38
38
|
"test": "node --experimental-strip-types --test $(find app components hooks lib -name '*.test.mjs' -print)"
|
|
@@ -47,6 +47,7 @@
|
|
|
47
47
|
"@lobehub/icons": "^5.6.0",
|
|
48
48
|
"@phosphor-icons/react": "^2.1.10",
|
|
49
49
|
"@types/react-syntax-highlighter": "^15.5.13",
|
|
50
|
+
"adm-zip": "^0.6.0",
|
|
50
51
|
"katex": "^0.16.47",
|
|
51
52
|
"mammoth": "^1.12.0",
|
|
52
53
|
"mermaid": "^11.14.0",
|
|
@@ -63,6 +64,17 @@
|
|
|
63
64
|
"remark-math": "^6.0.0",
|
|
64
65
|
"undici": "8.5.0"
|
|
65
66
|
},
|
|
67
|
+
"overrides": {
|
|
68
|
+
"@emoji-mart/react": {
|
|
69
|
+
"react": "$react"
|
|
70
|
+
}
|
|
71
|
+
},
|
|
72
|
+
"allowScripts": {
|
|
73
|
+
"@google/genai@1.52.0": true,
|
|
74
|
+
"protobufjs@7.6.5": true,
|
|
75
|
+
"sharp@0.34.5": true,
|
|
76
|
+
"unrs-resolver@1.11.1": true
|
|
77
|
+
},
|
|
66
78
|
"devDependencies": {
|
|
67
79
|
"@resvg/resvg-js": "^2.6.2",
|
|
68
80
|
"@tailwindcss/postcss": "^4.2.2",
|
|
@@ -70,12 +82,12 @@
|
|
|
70
82
|
"@types/proper-lockfile": "4.1.4",
|
|
71
83
|
"@types/react": "^19",
|
|
72
84
|
"@types/react-dom": "^19",
|
|
73
|
-
"eslint": "^9",
|
|
85
|
+
"eslint": "^9.39.5",
|
|
74
86
|
"eslint-config-next": "16.2.12",
|
|
75
87
|
"jiti": "^2.7.0",
|
|
76
88
|
"postcss": "^8",
|
|
77
89
|
"tailwindcss": "^4.2.2",
|
|
78
90
|
"to-ico": "^1.1.5",
|
|
79
|
-
"typescript": "^5"
|
|
91
|
+
"typescript": "^5.9.3"
|
|
80
92
|
}
|
|
81
93
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
self.__BUILD_MANIFEST={__rewrites:{afterFiles:[],beforeFiles:[],fallback:[]},__routerFilterStatic:{numItems:32,errorRate:1e-4,numBits:614,numHashes:14,bitArray:[0,0,1,0,1,1,0,1,0,1,1,0,0,1,0,1,1,0,0,0,1,1,0,1,1,0,0,0,1,1,1,1,0,1,1,0,1,0,1,0,1,0,1,0,0,1,0,0,0,1,1,1,1,1,1,0,1,1,1,1,1,1,1,1,0,1,1,0,0,0,0,0,1,0,0,0,0,1,0,0,1,1,1,0,0,0,0,1,1,0,0,0,0,0,1,0,0,0,0,1,1,1,1,1,1,0,1,0,1,1,0,1,1,0,0,1,0,0,1,1,0,0,0,1,0,1,0,1,1,0,1,1,1,0,0,0,1,1,1,0,0,1,1,0,0,0,0,1,0,0,0,0,0,0,0,0,1,0,1,1,1,0,1,0,1,0,1,0,0,0,1,0,1,1,0,0,0,1,1,1,1,1,1,1,0,0,1,0,1,0,1,1,1,0,0,0,1,1,1,0,0,0,1,0,1,0,1,0,1,1,1,0,0,1,0,1,1,0,0,1,1,1,0,1,1,0,1,1,0,0,0,0,0,0,1,0,1,0,1,1,0,0,0,1,0,0,0,1,0,0,0,1,1,0,1,0,0,1,0,1,1,0,0,0,0,0,1,1,1,1,1,1,0,0,1,0,1,0,0,1,1,0,0,1,1,0,0,1,1,1,1,1,0,0,1,1,0,0,0,0,0,0,0,1,0,1,1,0,1,1,0,1,1,1,0,1,0,0,0,1,0,0,0,1,1,1,1,1,1,1,1,1,0,0,1,0,0,1,1,0,1,1,0,0,0,1,1,1,1,0,0,0,1,0,1,1,0,0,0,1,0,1,1,1,0,1,1,0,0,0,0,0,1,0,1,1,1,0,1,0,0,1,0,0,1,0,0,0,1,0,0,0,0,1,1,0,1,0,1,1,0,1,1,1,0,0,1,1,0,1,0,1,1,0,0,1,0,0,1,1,0,1,1,0,0,0,0,0,0,1,0,0,1,0,0,0,1,1,0,1,0,1,1,1,1,1,0,1,1,0,1,0,1,1,1,0,0,1,1,0,1,1,1,0,0,0,1,0,0,0,1,1,1,1,1,0,1,1,1,0,1,1,0,1,1,1,1,0,1,1,1,0,0,1,1,1,0,0,0,0,1,1,0,1,1,1,1,0,1,1,1,1,1,0,0,0,0,1,1,1,0,1,0,1,1,1,1,0,1,1,0,1,1,1,0,1,0,1,0,1,0,1,1,1,0,0,1,0,0,1,0,1,1,1,0,1,0,0,1,0,0,1,0,1,1,0,1,1,0,1,1,1,1,0,1,0,1,0,0,1,0,1,0,1,1,1,1,1,1,0,0,1,1,0,0,0,1,1,1,0,1,0,1,0,1,1,1,1,1,0,0,0,1,1]},__routerFilterDynamic:{numItems:7,errorRate:1e-4,numBits:135,numHashes:14,bitArray:[0,1,1,0,0,1,0,1,0,0,1,0,0,1,0,1,0,0,0,0,1,0,1,1,1,1,0,0,1,0,0,0,1,1,1,1,1,0,1,0,1,1,1,0,0,0,1,1,1,1,1,0,1,0,0,1,1,1,1,0,1,0,0,1,1,1,1,0,1,1,1,1,1,0,0,0,0,1,0,0,1,0,1,0,0,0,1,0,1,1,1,0,0,1,0,0,0,0,1,0,0,0,0,0,0,0,0,1,1,1,1,1,0,1,1,0,0,0,0,0,1,0,0,1,1,1,1,1,0,0,1,0,1,0,1]},sortedPages:["/_app"]},self.__BUILD_MANIFEST_CB&&self.__BUILD_MANIFEST_CB();
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[552,976,1004,1097,1541,1960,2053,2138,2504,2835,2837,3432,3507,3851,3943,3955,4016,4037,4896,5221,5907,6450,6709,6819,6849,6919,6988,7067,7483,7769,7812,7851,8167,8197,8335,8380,8429,8504,8658,8743,8933,9156,9742,9747,9787,9968],{84441:()=>{}},_=>{_.O(0,[8441,3794,7358],()=>_(_.s=84441)),_N_E=_.O()}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[552,976,1004,1097,1541,1960,2053,2138,2504,2835,2837,3432,3507,3851,3943,3955,4016,4037,4896,5221,5907,6450,6709,6819,6849,6919,6988,7067,7483,7769,7812,7851,8167,8197,8335,8380,8429,8504,8658,8743,8933,9156,9742,9747,9787,9968],{84441:()=>{}},_=>{_.O(0,[8441,3794,7358],()=>_(_.s=84441)),_N_E=_.O()}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[552,976,1004,1097,1541,1960,2053,2138,2504,2835,2837,3432,3507,3851,3943,3955,4016,4037,4896,5221,5907,6450,6709,6819,6849,6919,6988,7067,7483,7769,7812,7851,8167,8197,8335,8380,8429,8504,8658,8743,8933,9156,9742,9747,9787,9968],{84441:()=>{}},_=>{_.O(0,[8441,3794,7358],()=>_(_.s=84441)),_N_E=_.O()}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[552,976,1004,1097,1541,1960,2053,2138,2504,2835,2837,3432,3507,3851,3943,3955,4016,4037,4896,5221,5907,6450,6709,6819,6849,6919,6988,7067,7483,7769,7812,7851,8167,8197,8335,8380,8429,8504,8658,8743,8933,9156,9742,9747,9787,9968],{84441:()=>{}},_=>{_.O(0,[8441,3794,7358],()=>_(_.s=84441)),_N_E=_.O()}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[552,976,1004,1097,1541,1960,2053,2138,2504,2835,2837,3432,3507,3851,3943,3955,4016,4037,4896,5221,5907,6450,6709,6819,6849,6919,6988,7067,7483,7769,7812,7851,8167,8197,8335,8380,8429,8504,8658,8743,8933,9156,9742,9747,9787,9968],{84441:()=>{}},_=>{_.O(0,[8441,3794,7358],()=>_(_.s=84441)),_N_E=_.O()}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[552,976,1004,1097,1541,1960,2053,2138,2504,2835,2837,3432,3507,3851,3943,3955,4016,4037,4896,5221,5907,6450,6709,6819,6849,6919,6988,7067,7483,7769,7812,7851,8167,8197,8335,8380,8429,8504,8658,8743,8933,9156,9742,9747,9787,9968],{84441:()=>{}},_=>{_.O(0,[8441,3794,7358],()=>_(_.s=84441)),_N_E=_.O()}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[552,976,1004,1097,1541,1960,2053,2138,2504,2835,2837,3432,3507,3851,3943,3955,4016,4037,4896,5221,5907,6450,6709,6819,6849,6919,6988,7067,7483,7769,7812,7851,8167,8197,8335,8380,8429,8504,8658,8743,8933,9156,9742,9747,9787,9968],{84441:()=>{}},_=>{_.O(0,[8441,3794,7358],()=>_(_.s=84441)),_N_E=_.O()}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[552,976,1004,1097,1541,1960,2053,2138,2504,2835,2837,3432,3507,3851,3943,3955,4016,4037,4896,5221,5907,6450,6709,6819,6849,6919,6988,7067,7483,7769,7812,7851,8167,8197,8335,8380,8429,8504,8658,8743,8933,9156,9742,9747,9787,9968],{84441:()=>{}},_=>{_.O(0,[8441,3794,7358],()=>_(_.s=84441)),_N_E=_.O()}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[552,976,1004,1097,1541,1960,2053,2138,2504,2835,2837,3432,3507,3851,3943,3955,4016,4037,4896,5221,5907,6450,6709,6819,6849,6919,6988,7067,7483,7769,7812,7851,8167,8197,8335,8380,8429,8504,8658,8743,8933,9156,9742,9747,9787,9968],{84441:()=>{}},_=>{_.O(0,[8441,3794,7358],()=>_(_.s=84441)),_N_E=_.O()}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[552,976,1004,1097,1541,1960,2053,2138,2504,2835,2837,3432,3507,3851,3943,3955,4016,4037,4896,5221,5907,6450,6709,6819,6849,6919,6988,7067,7483,7769,7812,7851,8167,8197,8335,8380,8429,8504,8658,8743,8933,9156,9742,9747,9787,9968],{84441:()=>{}},_=>{_.O(0,[8441,3794,7358],()=>_(_.s=84441)),_N_E=_.O()}]);
|