@lobehub/lobehub 2.0.0-next.5 → 2.0.0-next.7

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.
@@ -2,6 +2,7 @@ name: Desktop PR Build
2
2
 
3
3
  on:
4
4
  pull_request:
5
+ pull_request_target:
5
6
  types: [synchronize, labeled, unlabeled] # PR 更新或标签变化时触发
6
7
 
7
8
  # 确保同一时间只运行一个相同的 workflow,取消正在进行的旧的运行
@@ -10,7 +11,9 @@ concurrency:
10
11
  cancel-in-progress: true
11
12
 
12
13
  # Add default permissions
13
- permissions: read-all
14
+ permissions:
15
+ contents: write
16
+ pull-requests: write
14
17
 
15
18
  env:
16
19
  PR_TAG_PREFIX: pr- # PR 构建版本的前缀标识
@@ -1,12 +1,14 @@
1
1
  name: Publish Docker Image
2
2
  permissions:
3
3
  contents: read
4
+ pull-requests: write
4
5
 
5
6
  on:
6
7
  workflow_dispatch:
7
8
  release:
8
9
  types: [published]
9
10
  pull_request:
11
+ pull_request_target:
10
12
  types: [synchronize, labeled, unlabeled]
11
13
 
12
14
  concurrency:
@@ -52,9 +54,10 @@ jobs:
52
54
  - name: Generate PR metadata
53
55
  if: github.event_name == 'pull_request'
54
56
  id: pr_meta
57
+ env:
58
+ BRANCH_NAME: ${{ github.head_ref }}
55
59
  run: |
56
- branch_name="${{ github.head_ref }}"
57
- sanitized_branch=$(echo "${branch_name}" | sed -E 's/[^a-zA-Z0-9_.-]+/-/g')
60
+ sanitized_branch=$(echo "${BRANCH_NAME}" | sed -E 's/[^a-zA-Z0-9_.-]+/-/g')
58
61
  echo "pr_tag=${sanitized_branch}-$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
59
62
 
60
63
  - name: Docker meta
@@ -131,9 +134,10 @@ jobs:
131
134
  - name: Generate PR metadata
132
135
  if: github.event_name == 'pull_request'
133
136
  id: pr_meta
137
+ env:
138
+ BRANCH_NAME: ${{ github.head_ref }}
134
139
  run: |
135
- branch_name="${{ github.head_ref }}"
136
- sanitized_branch=$(echo "${branch_name}" | sed -E 's/[^a-zA-Z0-9_.-]+/-/g')
140
+ sanitized_branch=$(echo "${BRANCH_NAME}" | sed -E 's/[^a-zA-Z0-9_.-]+/-/g')
137
141
  echo "pr_tag=${sanitized_branch}-$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
138
142
 
139
143
  - name: Docker meta
package/CHANGELOG.md CHANGED
@@ -2,6 +2,56 @@
2
2
 
3
3
  # Changelog
4
4
 
5
+ ## [Version 2.0.0-next.7](https://github.com/lobehub/lobe-chat/compare/v2.0.0-next.6...v2.0.0-next.7)
6
+
7
+ <sup>Released on **2025-11-01**</sup>
8
+
9
+ #### ✨ Features
10
+
11
+ - **misc**: Upgrade to Next 16.
12
+
13
+ <br/>
14
+
15
+ <details>
16
+ <summary><kbd>Improvements and Fixes</kbd></summary>
17
+
18
+ #### What's improved
19
+
20
+ - **misc**: Upgrade to Next 16, closes [#9851](https://github.com/lobehub/lobe-chat/issues/9851) ([abb71ec](https://github.com/lobehub/lobe-chat/commit/abb71ec))
21
+
22
+ </details>
23
+
24
+ <div align="right">
25
+
26
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top)
27
+
28
+ </div>
29
+
30
+ ## [Version 2.0.0-next.6](https://github.com/lobehub/lobe-chat/compare/v2.0.0-next.5...v2.0.0-next.6)
31
+
32
+ <sup>Released on **2025-10-31**</sup>
33
+
34
+ #### 🐛 Bug Fixes
35
+
36
+ - **AssistantStore**: Add missing identifier parameter.
37
+
38
+ <br/>
39
+
40
+ <details>
41
+ <summary><kbd>Improvements and Fixes</kbd></summary>
42
+
43
+ #### What's fixed
44
+
45
+ - **AssistantStore**: Add missing identifier parameter, closes [#9948](https://github.com/lobehub/lobe-chat/issues/9948) ([2e40855](https://github.com/lobehub/lobe-chat/commit/2e40855))
46
+
47
+ </details>
48
+
49
+ <div align="right">
50
+
51
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top)
52
+
53
+ </div>
54
+
5
55
  ## [Version 2.0.0-next.5](https://github.com/lobehub/lobe-chat/compare/v2.0.0-next.4...v2.0.0-next.5)
6
56
 
7
57
  <sup>Released on **2025-10-31**</sup>
@@ -1,6 +1,6 @@
1
1
  // copy from https://github.com/kirill-konshin/next-electron-rsc
2
2
  import { serialize as serializeCookie } from 'cookie';
3
- import { type Protocol, type Session, protocol } from 'electron';
3
+ import { type Protocol, type Session } from 'electron';
4
4
  import type { NextConfig } from 'next';
5
5
  import type NextNodeServer from 'next/dist/server/next-server';
6
6
  import assert from 'node:assert';
@@ -202,6 +202,11 @@ export function createHandler({
202
202
 
203
203
  if (!isDev) {
204
204
  logger.info('Initializing Next.js app for production');
205
+
206
+ // https://github.com/lobehub/lobe-chat/pull/9851
207
+ // @ts-expect-error
208
+ // noinspection JSConstantReassignment
209
+ process.env.NODE_ENV = 'production';
205
210
  const next = require(resolve.sync('next', { basedir: standaloneDir }));
206
211
 
207
212
  // @see https://github.com/vercel/next.js/issues/64031#issuecomment-2078708340
@@ -209,10 +214,7 @@ export function createHandler({
209
214
  .config as NextConfig;
210
215
  process.env.__NEXT_PRIVATE_STANDALONE_CONFIG = JSON.stringify(config);
211
216
 
212
- app = next({
213
- dev: false,
214
- dir: standaloneDir,
215
- }) as NextNodeServer;
217
+ app = next({ dir: standaloneDir }) as NextNodeServer;
216
218
 
217
219
  handler = app.getRequestHandler();
218
220
  preparePromise = app.prepare();
package/changelog/v1.json CHANGED
@@ -1,4 +1,18 @@
1
1
  [
2
+ {
3
+ "children": {
4
+ "features": [
5
+ "Upgrade to Next 16."
6
+ ]
7
+ },
8
+ "date": "2025-11-01",
9
+ "version": "2.0.0-next.7"
10
+ },
11
+ {
12
+ "children": {},
13
+ "date": "2025-10-31",
14
+ "version": "2.0.0-next.6"
15
+ },
2
16
  {
3
17
  "children": {
4
18
  "improvements": [
package/next.config.ts CHANGED
@@ -28,9 +28,6 @@ const nextConfig: NextConfig = {
28
28
  emotion: true,
29
29
  },
30
30
  compress: isProd,
31
- eslint: {
32
- ignoreDuringBuilds: true,
33
- },
34
31
  experimental: {
35
32
  optimizePackageImports: [
36
33
  'emoji-mart',
@@ -46,6 +43,7 @@ const nextConfig: NextConfig = {
46
43
  // so we need to disable it
47
44
  // refs: https://github.com/lobehub/lobe-chat/pull/7430
48
45
  serverMinification: false,
46
+ turbopackFileSystemCacheForDev: true,
49
47
  webVitalsAttribution: ['CLS', 'LCP'],
50
48
  webpackBuildWorker: true,
51
49
  webpackMemoryOptimizations: true,
@@ -273,6 +271,7 @@ const nextConfig: NextConfig = {
273
271
  // when external packages in dev mode with turbopack, this config will lead to bundle error
274
272
  serverExternalPackages: isProd ? ['@electric-sql/pglite', "pdfkit"] : ["pdfkit"],
275
273
  transpilePackages: ['pdfjs-dist', 'mermaid'],
274
+ turbopack: {},
276
275
 
277
276
  typescript: {
278
277
  ignoreBuildErrors: true,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lobehub/lobehub",
3
- "version": "2.0.0-next.5",
3
+ "version": "2.0.0-next.7",
4
4
  "description": "LobeHub - an open-source,comprehensive AI Agent framework that supports speech synthesis, multimodal, and extensible Function Call plugin system. Supports one-click free deployment of your private ChatGPT/LLM web application.",
5
5
  "keywords": [
6
6
  "framework",
@@ -31,14 +31,14 @@
31
31
  ],
32
32
  "scripts": {
33
33
  "prebuild": "tsx scripts/prebuild.mts && npm run lint",
34
- "build": "cross-env NODE_OPTIONS=--max-old-space-size=6144 next build",
34
+ "build": "cross-env NODE_OPTIONS=--max-old-space-size=6144 next build --webpack",
35
35
  "postbuild": "npm run build-sitemap && npm run build-migrate-db",
36
36
  "build-migrate-db": "bun run db:migrate",
37
37
  "build-sitemap": "tsx ./scripts/buildSitemapIndex/index.ts",
38
- "build:analyze": "NODE_OPTIONS=--max-old-space-size=6144 ANALYZE=true next build",
39
- "build:docker": "npm run prebuild && NODE_OPTIONS=--max-old-space-size=6144 DOCKER=true next build && npm run build-sitemap",
38
+ "build:analyze": "NODE_OPTIONS=--max-old-space-size=6144 ANALYZE=true next build --webpack",
39
+ "build:docker": "npm run prebuild && NODE_OPTIONS=--max-old-space-size=6144 DOCKER=true next build --webpack && npm run build-sitemap",
40
40
  "prebuild:electron": "cross-env NEXT_PUBLIC_IS_DESKTOP_APP=1 tsx scripts/prebuild.mts",
41
- "build:electron": "cross-env NODE_OPTIONS=--max-old-space-size=6144 NEXT_PUBLIC_IS_DESKTOP_APP=1 NEXT_PUBLIC_SERVICE_MODE=server next build",
41
+ "build:electron": "cross-env NODE_OPTIONS=--max-old-space-size=6144 NEXT_PUBLIC_IS_DESKTOP_APP=1 NEXT_PUBLIC_SERVICE_MODE=server next build --webpack",
42
42
  "clean:node_modules": "bash -lc 'set -e; echo \"Removing all node_modules...\"; rm -rf node_modules; pnpm -r exec rm -rf node_modules; rm -rf apps/desktop/node_modules; echo \"All node_modules removed.\"'",
43
43
  "db:generate": "drizzle-kit generate && npm run db:generate-client && npm run workflow:dbml",
44
44
  "db:generate-client": "tsx ./scripts/migrateClientDB/compile-migrations.ts",
@@ -50,9 +50,9 @@
50
50
  "desktop:build-local": "npm run desktop:build-next && npm run desktop:prepare-dist && npm run build-local --prefix=./apps/desktop",
51
51
  "desktop:build-next": "npm run build:electron",
52
52
  "desktop:prepare-dist": "tsx scripts/electronWorkflow/moveNextStandalone.ts",
53
- "dev": "next dev --turbopack -p 3010",
54
- "dev:desktop": "next dev --turbopack -p 3015",
55
- "dev:mobile": "next dev --turbopack -p 3018",
53
+ "dev": "next dev -p 3010",
54
+ "dev:desktop": "next dev -p 3015",
55
+ "dev:mobile": "next dev -p 3018",
56
56
  "docs:i18n": "lobe-i18n md && npm run lint:md && npm run lint:mdx && prettier -c --write locales/**/*",
57
57
  "docs:seo": "lobe-seo && npm run lint:mdx",
58
58
  "e2e": "cd e2e && npm run test:smoke",
@@ -123,9 +123,6 @@
123
123
  "eslint --fix"
124
124
  ]
125
125
  },
126
- "overrides": {
127
- "mdast-util-gfm-autolink-literal": "2.0.0"
128
- },
129
126
  "dependencies": {
130
127
  "@ant-design/icons": "^5.6.1",
131
128
  "@ant-design/pro-components": "^2.8.10",
@@ -174,7 +171,7 @@
174
171
  "@lobehub/ui": "^2.13.2",
175
172
  "@modelcontextprotocol/sdk": "^1.20.0",
176
173
  "@neondatabase/serverless": "^1.0.2",
177
- "@next/third-parties": "^15.5.4",
174
+ "@next/third-parties": "^16.0.1",
178
175
  "@opentelemetry/exporter-jaeger": "^2.1.0",
179
176
  "@opentelemetry/winston-transport": "^0.18.0",
180
177
  "@react-pdf/renderer": "^4.3.0",
@@ -235,7 +232,7 @@
235
232
  "model-bank": "workspace:*",
236
233
  "modern-screenshot": "^4.6.6",
237
234
  "nanoid": "^5.1.6",
238
- "next": "~15.3.5",
235
+ "next": "^16.0.1",
239
236
  "next-auth": "5.0.0-beta.30",
240
237
  "next-mdx-remote": "^5.0.0",
241
238
  "nextjs-toploader": "^3.9.17",
@@ -261,9 +258,9 @@
261
258
  "pwa-install-handler": "^2.6.3",
262
259
  "query-string": "^9.3.1",
263
260
  "random-words": "^2.0.1",
264
- "react": "^19.2.0",
261
+ "react": "19.2.0",
265
262
  "react-confetti": "^6.4.0",
266
- "react-dom": "^19.2.0",
263
+ "react-dom": "19.2.0",
267
264
  "react-fast-marquee": "^1.6.5",
268
265
  "react-hotkeys-hook": "^5.1.0",
269
266
  "react-i18next": "^15.7.4",
@@ -313,8 +310,8 @@
313
310
  "@lobehub/lint": "^1.26.2",
314
311
  "@lobehub/market-types": "^1.11.4",
315
312
  "@lobehub/seo-cli": "^1.7.0",
316
- "@next/bundle-analyzer": "^15.5.4",
317
- "@next/eslint-plugin-next": "^15.5.4",
313
+ "@next/bundle-analyzer": "^16.0.1",
314
+ "@next/eslint-plugin-next": "^15.5.6",
318
315
  "@peculiar/webcrypto": "^1.5.0",
319
316
  "@playwright/test": "^1.49.1",
320
317
  "@prettier/sync": "^0.6.1",
@@ -335,8 +332,8 @@
335
332
  "@types/oidc-provider": "^9.5.0",
336
333
  "@types/pdfkit": "^0.17.3",
337
334
  "@types/pg": "^8.15.5",
338
- "@types/react": "^19.2.2",
339
- "@types/react-dom": "^19.2.1",
335
+ "@types/react": "19.2.2",
336
+ "@types/react-dom": "19.2.2",
340
337
  "@types/rtl-detect": "^1.0.3",
341
338
  "@types/semver": "^7.7.1",
342
339
  "@types/systemjs": "^6.15.3",
@@ -399,9 +396,6 @@
399
396
  "pnpm": {
400
397
  "onlyBuiltDependencies": [
401
398
  "@vercel/speed-insights"
402
- ],
403
- "overrides": {
404
- "mdast-util-gfm-autolink-literal": "2.0.0"
405
- }
399
+ ]
406
400
  }
407
401
  }
@@ -3,5 +3,8 @@
3
3
  "version": "1.0.0",
4
4
  "private": true,
5
5
  "main": "src/index.ts",
6
- "types": "src/index.ts"
6
+ "types": "src/index.ts",
7
+ "peerDependencies": {
8
+ "react": "^19"
9
+ }
7
10
  }
@@ -28,6 +28,7 @@
28
28
  "@napi-rs/canvas": "^0.1.70",
29
29
  "@xmldom/xmldom": "^0.9.8",
30
30
  "concat-stream": "^2.0.0",
31
+ "debug": "^4.3.4",
31
32
  "mammoth": "^1.8.0",
32
33
  "officeparser": "5.1.1",
33
34
  "pdfjs-dist": "4.10.38",
@@ -18,7 +18,7 @@ export const GET = async (request: NextRequest) => {
18
18
  return NextResponse.json('tag query parameter is required', { status: 400 });
19
19
  }
20
20
 
21
- revalidateTag(tag);
21
+ revalidateTag(tag, 'max');
22
22
 
23
23
  return Response.json({ now: Date.now(), revalidated: true });
24
24
  };
@@ -73,6 +73,7 @@ export const generateViewport = async (props: DynamicLayoutProps): ResolvingView
73
73
 
74
74
  return {
75
75
  ...dynamicScale,
76
+ colorScheme: null,
76
77
  initialScale: 1,
77
78
  minimumScale: 1,
78
79
  themeColor: [
@@ -47,7 +47,13 @@ export function parsePaginatedId(id: string): { page?: number; type: SitemapType
47
47
  return { type: id as SitemapType };
48
48
  }
49
49
 
50
- export default async function sitemap({ id }: { id: string }): Promise<MetadataRoute.Sitemap> {
50
+ export default async function sitemap({
51
+ id: idPromise,
52
+ }: {
53
+ id: string;
54
+ }): Promise<MetadataRoute.Sitemap> {
55
+ const id = await idPromise;
56
+
51
57
  const { type, page } = parsePaginatedId(id);
52
58
  const sitemapModule = new Sitemap();
53
59
 
@@ -93,7 +93,7 @@ export class AssistantStore {
93
93
  },
94
94
  });
95
95
  if (!res.ok) {
96
- res = await fetch(this.getAgentUrl(DEFAULT_LANG), {
96
+ res = await fetch(this.getAgentUrl(identifier, DEFAULT_LANG), {
97
97
  cache: 'force-cache',
98
98
  next: {
99
99
  revalidate: CacheRevalidate.Details,
package/tsconfig.json CHANGED
@@ -13,7 +13,7 @@
13
13
  "moduleResolution": "bundler",
14
14
  "resolveJsonModule": true,
15
15
  "isolatedModules": true,
16
- "jsx": "preserve",
16
+ "jsx": "react-jsx",
17
17
  "incremental": true,
18
18
  "baseUrl": ".",
19
19
  "types": ["vitest/globals", "@serwist/next/typings"],
@@ -41,5 +41,12 @@
41
41
  ".temp",
42
42
  "e2e"
43
43
  ],
44
- "include": ["**/*.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts", "next-env.d.ts"]
44
+ "include": [
45
+ "**/*.d.ts",
46
+ "**/*.ts",
47
+ "**/*.tsx",
48
+ ".next/types/**/*.ts",
49
+ "next-env.d.ts",
50
+ ".next/dev/types/**/*.ts"
51
+ ]
45
52
  }
File without changes