@lobehub/lobehub 2.1.2 → 2.1.4

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.
Files changed (174) hide show
  1. package/.env.example +4 -6
  2. package/.env.example.development +0 -3
  3. package/.github/workflows/release-desktop-stable.yml +1 -1
  4. package/CHANGELOG.md +59 -0
  5. package/Dockerfile +6 -4
  6. package/README.md +2 -3
  7. package/README.zh-CN.md +2 -3
  8. package/changelog/v2.json +14 -0
  9. package/docker-compose/deploy/.env.example +3 -1
  10. package/docker-compose/deploy/.env.zh-CN.example +4 -1
  11. package/docker-compose/local/.env.example +0 -1
  12. package/docker-compose/local/.env.zh-CN.example +0 -1
  13. package/docker-compose/local/grafana/.env.example +0 -1
  14. package/docker-compose/local/grafana/.env.zh-CN.example +0 -1
  15. package/docker-compose/local/logto/docker-compose.yml +0 -1
  16. package/docker-compose/local/zitadel/.env.example +1 -2
  17. package/docker-compose/local/zitadel/.env.zh-CN.example +1 -2
  18. package/docker-compose/production/grafana/.env.example +0 -1
  19. package/docker-compose/production/grafana/.env.zh-CN.example +0 -1
  20. package/docker-compose/production/logto/.env.example +0 -2
  21. package/docker-compose/production/logto/.env.zh-CN.example +0 -2
  22. package/docker-compose/production/zitadel/.env.example +0 -2
  23. package/docker-compose/production/zitadel/.env.zh-CN.example +0 -2
  24. package/docker-compose/setup.sh +16 -2
  25. package/docs/development/basic/folder-structure.mdx +23 -14
  26. package/docs/development/basic/folder-structure.zh-CN.mdx +23 -14
  27. package/docs/development/basic/work-with-server-side-database.mdx +0 -1
  28. package/docs/development/basic/work-with-server-side-database.zh-CN.mdx +0 -1
  29. package/docs/development/start.mdx +19 -12
  30. package/docs/development/start.zh-CN.mdx +19 -12
  31. package/docs/self-hosting/advanced/s3/cloudflare-r2.mdx +0 -5
  32. package/docs/self-hosting/advanced/s3/cloudflare-r2.zh-CN.mdx +0 -5
  33. package/docs/self-hosting/advanced/s3/rustfs.mdx +0 -2
  34. package/docs/self-hosting/advanced/s3/rustfs.zh-CN.mdx +0 -2
  35. package/docs/self-hosting/advanced/s3/tencent-cloud.mdx +0 -1
  36. package/docs/self-hosting/advanced/s3/tencent-cloud.zh-CN.mdx +0 -2
  37. package/docs/self-hosting/advanced/s3.mdx +0 -9
  38. package/docs/self-hosting/advanced/s3.zh-CN.mdx +0 -8
  39. package/docs/self-hosting/auth/providers/password.mdx +112 -0
  40. package/docs/self-hosting/auth/providers/password.zh-CN.mdx +103 -0
  41. package/docs/self-hosting/auth.mdx +12 -0
  42. package/docs/self-hosting/auth.zh-CN.mdx +12 -0
  43. package/docs/self-hosting/environment-variables/auth.mdx +7 -0
  44. package/docs/self-hosting/environment-variables/auth.zh-CN.mdx +7 -0
  45. package/docs/self-hosting/environment-variables/basic.mdx +0 -7
  46. package/docs/self-hosting/environment-variables/basic.zh-CN.mdx +0 -7
  47. package/docs/self-hosting/environment-variables/s3.mdx +0 -7
  48. package/docs/self-hosting/environment-variables/s3.zh-CN.mdx +0 -7
  49. package/docs/self-hosting/examples/azure-openai.mdx +0 -1
  50. package/docs/self-hosting/examples/azure-openai.zh-CN.mdx +0 -1
  51. package/docs/self-hosting/platform/docker-compose.mdx +0 -1
  52. package/docs/self-hosting/platform/docker-compose.zh-CN.mdx +0 -1
  53. package/docs/self-hosting/platform/docker.mdx +5 -3
  54. package/docs/self-hosting/platform/docker.zh-CN.mdx +5 -4
  55. package/docs/self-hosting/platform/dokploy.mdx +0 -2
  56. package/docs/self-hosting/platform/dokploy.zh-CN.mdx +0 -2
  57. package/docs/self-hosting/platform/vercel.mdx +0 -7
  58. package/docs/self-hosting/platform/vercel.zh-CN.mdx +0 -7
  59. package/e2e/src/steps/home/sidebarAgent.steps.ts +56 -24
  60. package/locales/ar/authError.json +1 -0
  61. package/locales/ar/models.json +25 -22
  62. package/locales/ar/providers.json +0 -1
  63. package/locales/ar/setting.json +16 -0
  64. package/locales/bg-BG/authError.json +1 -0
  65. package/locales/bg-BG/models.json +18 -21
  66. package/locales/bg-BG/providers.json +0 -1
  67. package/locales/bg-BG/setting.json +16 -0
  68. package/locales/de-DE/authError.json +1 -0
  69. package/locales/de-DE/models.json +20 -20
  70. package/locales/de-DE/providers.json +0 -1
  71. package/locales/de-DE/setting.json +16 -0
  72. package/locales/en-US/auth.json +1 -0
  73. package/locales/en-US/models.json +22 -22
  74. package/locales/en-US/providers.json +0 -1
  75. package/locales/es-ES/authError.json +1 -0
  76. package/locales/es-ES/models.json +84 -20
  77. package/locales/es-ES/providers.json +0 -1
  78. package/locales/es-ES/setting.json +16 -0
  79. package/locales/fa-IR/authError.json +1 -0
  80. package/locales/fa-IR/models.json +43 -20
  81. package/locales/fa-IR/providers.json +0 -1
  82. package/locales/fa-IR/setting.json +16 -0
  83. package/locales/fr-FR/authError.json +1 -0
  84. package/locales/fr-FR/models.json +19 -21
  85. package/locales/fr-FR/providers.json +0 -1
  86. package/locales/fr-FR/setting.json +16 -0
  87. package/locales/it-IT/authError.json +1 -0
  88. package/locales/it-IT/models.json +17 -19
  89. package/locales/it-IT/providers.json +0 -1
  90. package/locales/it-IT/setting.json +16 -0
  91. package/locales/ja-JP/authError.json +1 -0
  92. package/locales/ja-JP/models.json +43 -22
  93. package/locales/ja-JP/providers.json +0 -1
  94. package/locales/ja-JP/setting.json +16 -0
  95. package/locales/ko-KR/authError.json +1 -0
  96. package/locales/ko-KR/models.json +41 -20
  97. package/locales/ko-KR/providers.json +0 -1
  98. package/locales/ko-KR/setting.json +16 -0
  99. package/locales/nl-NL/authError.json +1 -0
  100. package/locales/nl-NL/models.json +48 -20
  101. package/locales/nl-NL/providers.json +0 -1
  102. package/locales/nl-NL/setting.json +16 -0
  103. package/locales/pl-PL/authError.json +1 -0
  104. package/locales/pl-PL/models.json +19 -22
  105. package/locales/pl-PL/providers.json +0 -1
  106. package/locales/pl-PL/setting.json +16 -0
  107. package/locales/pt-BR/authError.json +1 -0
  108. package/locales/pt-BR/models.json +21 -21
  109. package/locales/pt-BR/providers.json +0 -1
  110. package/locales/pt-BR/setting.json +16 -0
  111. package/locales/ru-RU/authError.json +1 -0
  112. package/locales/ru-RU/models.json +23 -20
  113. package/locales/ru-RU/providers.json +0 -1
  114. package/locales/ru-RU/setting.json +16 -0
  115. package/locales/tr-TR/authError.json +1 -0
  116. package/locales/tr-TR/models.json +37 -20
  117. package/locales/tr-TR/providers.json +0 -1
  118. package/locales/tr-TR/setting.json +16 -0
  119. package/locales/vi-VN/authError.json +1 -0
  120. package/locales/vi-VN/models.json +15 -19
  121. package/locales/vi-VN/providers.json +0 -1
  122. package/locales/vi-VN/setting.json +16 -0
  123. package/locales/zh-CN/auth.json +1 -0
  124. package/locales/zh-CN/models.json +20 -20
  125. package/locales/zh-CN/providers.json +0 -1
  126. package/locales/zh-TW/authError.json +1 -0
  127. package/locales/zh-TW/models.json +20 -20
  128. package/locales/zh-TW/providers.json +0 -1
  129. package/locales/zh-TW/setting.json +16 -0
  130. package/netlify.toml +0 -1
  131. package/package.json +1 -1
  132. package/packages/model-bank/src/aiModels/google.ts +0 -19
  133. package/packages/model-bank/src/aiModels/moonshot.ts +56 -5
  134. package/packages/model-bank/src/aiModels/ollamacloud.ts +14 -0
  135. package/packages/model-bank/src/aiModels/openrouter.ts +0 -14
  136. package/packages/model-bank/src/aiModels/qwen.ts +105 -4
  137. package/packages/model-bank/src/aiModels/siliconcloud.ts +39 -0
  138. package/packages/model-bank/src/aiModels/wenxin.ts +0 -99
  139. package/packages/model-runtime/src/core/contextBuilders/openai.test.ts +24 -0
  140. package/packages/model-runtime/src/core/contextBuilders/openai.ts +22 -5
  141. package/packages/model-runtime/src/core/openaiCompatibleFactory/index.ts +10 -3
  142. package/packages/model-runtime/src/core/streams/google/google-ai.test.ts +54 -13
  143. package/packages/model-runtime/src/core/streams/google/index.ts +1 -4
  144. package/packages/model-runtime/src/providers/moonshot/index.ts +24 -2
  145. package/packages/model-runtime/src/providers/qwen/index.ts +16 -15
  146. package/packages/types/src/serverConfig.ts +1 -0
  147. package/src/app/[variants]/(auth)/signin/SignInEmailStep.tsx +56 -49
  148. package/src/app/[variants]/(auth)/signin/page.tsx +2 -0
  149. package/src/app/[variants]/(auth)/signin/useSignIn.ts +2 -0
  150. package/src/app/[variants]/(auth)/signup/[[...signup]]/page.tsx +7 -0
  151. package/src/envs/app.ts +0 -2
  152. package/src/envs/auth.ts +3 -0
  153. package/src/libs/better-auth/define-config.ts +1 -1
  154. package/src/libs/next/proxy/define-config.ts +0 -1
  155. package/src/locales/default/auth.ts +2 -0
  156. package/src/server/globalConfig/index.ts +1 -0
  157. package/src/server/routers/lambda/__tests__/integration/aiAgent/execAgent.integration.test.ts +3 -2
  158. package/src/store/chat/slices/topic/action.ts +1 -1
  159. package/src/store/electron/actions/settings.ts +7 -7
  160. package/src/store/electron/actions/sync.ts +11 -11
  161. package/src/store/global/actions/general.ts +12 -12
  162. package/src/store/global/initialState.ts +11 -11
  163. package/src/store/global/selectors/clientDB.ts +1 -1
  164. package/src/store/global/selectors/systemStatus.ts +1 -1
  165. package/src/store/image/slices/generationConfig/action.ts +12 -12
  166. package/src/store/image/utils/size.ts +11 -11
  167. package/src/store/library/slices/ragEval/actions/dataset.ts +1 -1
  168. package/src/store/serverConfig/selectors.ts +1 -0
  169. package/src/store/session/slices/session/initialState.ts +6 -6
  170. package/src/store/session/slices/session/reducers.ts +1 -1
  171. package/src/store/session/slices/sessionGroup/initialState.ts +2 -2
  172. package/src/store/tool/slices/customPlugin/action.ts +2 -2
  173. package/src/store/tool/slices/oldStore/action.ts +5 -5
  174. package/src/store/userMemory/slices/preference/action.ts +6 -6
package/.env.example CHANGED
@@ -1,6 +1,3 @@
1
- # add a access code to lock your lobe-chat application, you can set a long password to avoid leaking. If this value contains a comma, it is a password array.
2
- # ACCESS_CODE=lobe66
3
-
4
1
  # Specify your API Key selection method, currently supporting `random` and `turn`.
5
2
  # API_KEY_SELECT_MODE=random
6
3
 
@@ -265,9 +262,6 @@ OPENAI_API_KEY=sk-xxxxxxxxx
265
262
  # Bucket request endpoint
266
263
  # S3_ENDPOINT=https://xxxxxxxxxxxxxxxxxxxxxxxxxxxxx.r2.cloudflarestorage.com
267
264
 
268
- # Public access domain for the bucket
269
- # S3_PUBLIC_DOMAIN=https://s3-for-lobechat.your-domain.com
270
-
271
265
  # Bucket region, such as us-west-1, generally not needed to add
272
266
  # but some service providers may require configuration
273
267
  # S3_REGION=us-west-1
@@ -295,6 +289,10 @@ OPENAI_API_KEY=sk-xxxxxxxxx
295
289
  # Leave empty to allow all emails
296
290
  # AUTH_ALLOWED_EMAILS=example.com,admin@other.com
297
291
 
292
+ # Disable email/password authentication (SSO-only mode)
293
+ # Set to '1' to disable email/password sign-in and registration, only allowing SSO login
294
+ # AUTH_DISABLE_EMAIL_PASSWORD=0
295
+
298
296
  # Google OAuth Configuration (for Better-Auth)
299
297
  # Get credentials from: https://console.cloud.google.com/apis/credentials
300
298
  # Authorized redirect URIs:
@@ -85,9 +85,6 @@ S3_ENDPOINT=http://localhost:${MINIO_PORT}
85
85
  # S3 bucket name for storing files
86
86
  S3_BUCKET=${MINIO_LOBE_BUCKET}
87
87
 
88
- # Public domain for S3 file access
89
- S3_PUBLIC_DOMAIN=http://localhost:${MINIO_PORT}
90
-
91
88
  # Enable path-style S3 requests (required for MinIO)
92
89
  S3_ENABLE_PATH_STYLE=1
93
90
 
@@ -148,7 +148,7 @@ jobs:
148
148
  # 使用 GitHub Hosted Runner
149
149
  if [[ "${{ github.event_name }}" != "workflow_dispatch" ]] || [[ "${{ inputs.build_mac }}" == "true" ]]; then
150
150
  echo "Using GitHub-Hosted Runner for macOS ARM64"
151
- arm_entry='{"os": "macos-14", "name": "macos-arm64"}'
151
+ arm_entry='{"os": "macos-15", "name": "macos-arm64"}'
152
152
  static_matrix=$(echo "$static_matrix" | jq -c --argjson entry "$arm_entry" '. + [$entry]')
153
153
  fi
154
154
 
package/CHANGELOG.md CHANGED
@@ -2,6 +2,65 @@
2
2
 
3
3
  # Changelog
4
4
 
5
+ ### [Version 2.1.4](https://github.com/lobehub/lobe-chat/compare/v2.1.3...v2.1.4)
6
+
7
+ <sup>Released on **2026-01-31**</sup>
8
+
9
+ #### 🐛 Bug Fixes
10
+
11
+ - **stream**: Update event handling to use 'text' instead of 'content_part' in gemini 2.5 models.
12
+
13
+ #### 💄 Styles
14
+
15
+ - **misc**: Update i18n, Update Kimi K2.5 & Qwen3 Max Thinking models.
16
+
17
+ <br/>
18
+
19
+ <details>
20
+ <summary><kbd>Improvements and Fixes</kbd></summary>
21
+
22
+ #### What's fixed
23
+
24
+ - **stream**: Update event handling to use 'text' instead of 'content_part' in gemini 2.5 models, closes [#11235](https://github.com/lobehub/lobe-chat/issues/11235) ([a76a630](https://github.com/lobehub/lobe-chat/commit/a76a630))
25
+
26
+ #### Styles
27
+
28
+ - **misc**: Update i18n, closes [#11920](https://github.com/lobehub/lobe-chat/issues/11920) ([1a590a0](https://github.com/lobehub/lobe-chat/commit/1a590a0))
29
+ - **misc**: Update Kimi K2.5 & Qwen3 Max Thinking models, closes [#11925](https://github.com/lobehub/lobe-chat/issues/11925) ([6f9e010](https://github.com/lobehub/lobe-chat/commit/6f9e010))
30
+
31
+ </details>
32
+
33
+ <div align="right">
34
+
35
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top)
36
+
37
+ </div>
38
+
39
+ ### [Version 2.1.3](https://github.com/lobehub/lobe-chat/compare/v2.1.2...v2.1.3)
40
+
41
+ <sup>Released on **2026-01-31**</sup>
42
+
43
+ #### 🐛 Bug Fixes
44
+
45
+ - **auth**: Add AUTH_DISABLE_EMAIL_PASSWORD env to enable SSO-only mode.
46
+
47
+ <br/>
48
+
49
+ <details>
50
+ <summary><kbd>Improvements and Fixes</kbd></summary>
51
+
52
+ #### What's fixed
53
+
54
+ - **auth**: Add AUTH_DISABLE_EMAIL_PASSWORD env to enable SSO-only mode, closes [#12009](https://github.com/lobehub/lobe-chat/issues/12009) ([f3210a3](https://github.com/lobehub/lobe-chat/commit/f3210a3))
55
+
56
+ </details>
57
+
58
+ <div align="right">
59
+
60
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top)
61
+
62
+ </div>
63
+
5
64
  ### [Version 2.1.2](https://github.com/lobehub/lobe-chat/compare/v2.1.1...v2.1.2)
6
65
 
7
66
  <sup>Released on **2026-01-30**</sup>
package/Dockerfile CHANGED
@@ -158,14 +158,12 @@ ENV HOSTNAME="0.0.0.0" \
158
158
  PORT="3210"
159
159
 
160
160
  # General Variables
161
- ENV ACCESS_CODE="" \
162
- APP_URL="" \
161
+ ENV APP_URL="" \
163
162
  API_KEY_SELECT_MODE="" \
164
163
  DEFAULT_AGENT_CONFIG="" \
165
164
  SYSTEM_AGENT="" \
166
165
  FEATURE_FLAGS="" \
167
- PROXY_URL="" \
168
- ENABLE_AUTH_PROTECTION=""
166
+ PROXY_URL=""
169
167
 
170
168
  # Database
171
169
  ENV KEY_VAULTS_SECRET="" \
@@ -176,6 +174,10 @@ ENV KEY_VAULTS_SECRET="" \
176
174
  ENV AUTH_SECRET="" \
177
175
  AUTH_SSO_PROVIDERS="" \
178
176
  AUTH_ALLOWED_EMAILS="" \
177
+ AUTH_TRUSTED_ORIGINS="" \
178
+ AUTH_DISABLE_EMAIL_PASSWORD="" \
179
+ AUTH_EMAIL_VERIFICATION="" \
180
+ AUTH_ENABLE_MAGIC_LINK="" \
179
181
  # Google
180
182
  AUTH_GOOGLE_ID="" \
181
183
  AUTH_GOOGLE_SECRET="" \
package/README.md CHANGED
@@ -581,7 +581,7 @@ LobeHub provides Self-Hosted Version with Vercel, Alibaba Cloud, and [Docker Ima
581
581
  "If you want to deploy this service yourself on Vercel, Zeabur or Alibaba Cloud, you can follow these steps:
582
582
 
583
583
  - Prepare your [OpenAI API Key](https://platform.openai.com/account/api-keys).
584
- - Click the button below to start deployment: Log in directly with your GitHub account, and remember to fill in the `OPENAI_API_KEY`(required) and `ACCESS_CODE` (recommended) on the environment variable section.
584
+ - Click the button below to start deployment: Log in directly with your GitHub account, and remember to fill in the `OPENAI_API_KEY`(required) on the environment variable section.
585
585
  - After deployment, you can start using it.
586
586
  - Bind a custom domain (optional): The DNS of the domain assigned by Vercel is polluted in some areas; binding a custom domain can connect directly.
587
587
 
@@ -647,7 +647,6 @@ This project provides some additional configuration items set with environment v
647
647
  | -------------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- |
648
648
  | `OPENAI_API_KEY` | Yes | This is the API key you apply on the OpenAI account page | `sk-xxxxxx...xxxxxx` |
649
649
  | `OPENAI_PROXY_URL` | No | If you manually configure the OpenAI interface proxy, you can use this configuration item to override the default OpenAI API request base URL | `https://api.chatanywhere.cn` or `https://aihubmix.com/v1` <br/>The default value is<br/>`https://api.openai.com/v1` |
650
- | `ACCESS_CODE` | No | Add a password to access this service; you can set a long password to avoid leaking. If this value contains a comma, it is a password array. | `awCTe)re_r74` or `rtrt_ewee3@09!` or `code1,code2,code3` |
651
650
  | `OPENAI_MODEL_LIST` | No | Used to control the model list. Use `+` to add a model, `-` to hide a model, and `model_name=display_name` to customize the display name of a model, separated by commas. | `qwen-7b-chat,+glm-6b,-gpt-3.5-turbo` |
652
651
 
653
652
  > \[!NOTE]
@@ -829,7 +828,7 @@ This project is [LobeHub Community License](./LICENSE) licensed.
829
828
  [codespaces-link]: https://codespaces.new/lobehub/lobe-chat
830
829
  [codespaces-shield]: https://github.com/codespaces/badge.svg
831
830
  [deploy-button-image]: https://vercel.com/button
832
- [deploy-link]: https://vercel.com/new/clone?repository-url=https%3A%2F%2Fgithub.com%2Flobehub%2Flobe-chat&env=OPENAI_API_KEY,ACCESS_CODE&envDescription=Find%20your%20OpenAI%20API%20Key%20by%20click%20the%20right%20Learn%20More%20button.%20%7C%20Access%20Code%20can%20protect%20your%20website&envLink=https%3A%2F%2Fplatform.openai.com%2Faccount%2Fapi-keys&project-name=lobe-chat&repository-name=lobe-chat
831
+ [deploy-link]: https://vercel.com/new/clone?repository-url=https%3A%2F%2Fgithub.com%2Flobehub%2Flobe-chat&env=OPENAI_API_KEY&envDescription=Find%20your%20OpenAI%20API%20Key%20by%20click%20the%20right%20Learn%20More%20button.&envLink=https%3A%2F%2Fplatform.openai.com%2Faccount%2Fapi-keys&project-name=lobe-chat&repository-name=lobe-chat
833
832
  [deploy-on-alibaba-cloud-button-image]: https://service-info-public.oss-cn-hangzhou.aliyuncs.com/computenest-en.svg
834
833
  [deploy-on-alibaba-cloud-link]: https://computenest.console.aliyun.com/service/instance/create/default?type=user&ServiceName=LobeHub%E7%A4%BE%E5%8C%BA%E7%89%88
835
834
  [deploy-on-repocloud-button-image]: https://d16t0pc4846x52.cloudfront.net/deploylobe.svg
package/README.zh-CN.md CHANGED
@@ -555,7 +555,7 @@ LobeHub 提供了 Vercel 的 自托管版本 和 [Docker 镜像][docker-release-
555
555
  如果想在 Vercel 、 Zeabur 或 阿里云 上部署该服务,可以按照以下步骤进行操作:
556
556
 
557
557
  - 准备好你的 [OpenAI API Key](https://platform.openai.com/account/api-keys) 。
558
- - 点击下方按钮开始部署: 直接使用 GitHub 账号登录即可,记得在环境变量页填入 `OPENAI_API_KEY` (必填) and `ACCESS_CODE`(推荐);
558
+ - 点击下方按钮开始部署: 直接使用 GitHub 账号登录即可,记得在环境变量页填入 `OPENAI_API_KEY` (必填);
559
559
  - 部署完毕后,即可开始使用;
560
560
  - 绑定自定义域名(可选):Vercel 分配的域名 DNS 在某些区域被污染了,绑定自定义域名即可直连。目前 Zeabur 提供的域名还未被污染,大多数地区都可以直连。
561
561
 
@@ -621,7 +621,6 @@ docker compose up -d
621
621
  | ------------------- | ---- | ----------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------ |
622
622
  | `OPENAI_API_KEY` | 必选 | 这是你在 OpenAI 账户页面申请的 API 密钥 | `sk-xxxxxx...xxxxxx` |
623
623
  | `OPENAI_PROXY_URL` | 可选 | 如果你手动配置了 OpenAI 接口代理,可以使用此配置项来覆盖默认的 OpenAI API 请求基础 URL | `https://api.chatanywhere.cn` 或 `https://aihubmix.com/v1`<br/>默认值:<br/>`https://api.openai.com/v1` |
624
- | `ACCESS_CODE` | 可选 | 添加访问此服务的密码,你可以设置一个长密码以防被爆破,该值用逗号分隔时为密码数组 | `awCTe)re_r74` or `rtrt_ewee3@09!` or `code1,code2,code3` |
625
624
  | `OPENAI_MODEL_LIST` | 可选 | 用来控制模型列表,使用 `+` 增加一个模型,使用 `-` 来隐藏一个模型,使用 `模型名=展示名` 来自定义模型的展示名,用英文逗号隔开。 | `qwen-7b-chat,+glm-6b,-gpt-3.5-turbo` |
626
625
 
627
626
  > \[!NOTE]
@@ -843,7 +842,7 @@ This project is [LobeHub Community License](./LICENSE) licensed.
843
842
  [codespaces-link]: https://codespaces.new/lobehub/lobe-chat
844
843
  [codespaces-shield]: https://github.com/codespaces/badge.svg
845
844
  [deploy-button-image]: https://vercel.com/button
846
- [deploy-link]: https://vercel.com/new/clone?repository-url=https%3A%2F%2Fgithub.com%2Flobehub%2Flobe-chat&env=OPENAI_API_KEY,ACCESS_CODE&envDescription=Find%20your%20OpenAI%20API%20Key%20by%20click%20the%20right%20Learn%20More%20button.%20%7C%20Access%20Code%20can%20protect%20your%20website&envLink=https%3A%2F%2Fplatform.openai.com%2Faccount%2Fapi-keys&project-name=lobe-chat&repository-name=lobe-chat
845
+ [deploy-link]: https://vercel.com/new/clone?repository-url=https%3A%2F%2Fgithub.com%2Flobehub%2Flobe-chat&env=OPENAI_API_KEY&envDescription=Find%20your%20OpenAI%20API%20Key%20by%20click%20the%20right%20Learn%20More%20button.&envLink=https%3A%2F%2Fplatform.openai.com%2Faccount%2Fapi-keys&project-name=lobe-chat&repository-name=lobe-chat
847
846
  [deploy-on-alibaba-cloud-button-image]: https://service-info-public.oss-cn-hangzhou.aliyuncs.com/computenest-en.svg
848
847
  [deploy-on-alibaba-cloud-link]: https://computenest.console.aliyun.com/service/instance/create/default?type=user&ServiceName=LobeHub%E7%A4%BE%E5%8C%BA%E7%89%88
849
848
  [deploy-on-sealos-button-image]: https://raw.githubusercontent.com/labring-actions/templates/main/Deploy-on-Sealos.svg
package/changelog/v2.json CHANGED
@@ -1,4 +1,18 @@
1
1
  [
2
+ {
3
+ "children": {
4
+ "improvements": [
5
+ "Update i18n, Update Kimi K2.5 & Qwen3 Max Thinking models."
6
+ ]
7
+ },
8
+ "date": "2026-01-31",
9
+ "version": "2.1.4"
10
+ },
11
+ {
12
+ "children": {},
13
+ "date": "2026-01-31",
14
+ "version": "2.1.3"
15
+ },
2
16
  {
3
17
  "children": {
4
18
  "fixes": [
@@ -7,6 +7,9 @@
7
7
  # Leave empty to allow all users to register
8
8
  # AUTH_ALLOWED_EMAILS=user1@example.com,user2@example.com
9
9
 
10
+ # Disable user registration (SSO-only mode)
11
+ # When set to 1, users cannot register via email/password, only SSO login is allowed
12
+ # AUTH_DISABLE_EMAIL_PASSWORD=1
10
13
 
11
14
  # ===========================
12
15
  # ====== Preset config ======
@@ -28,7 +31,6 @@ RUSTFS_ACCESS_KEY=admin
28
31
  RUSTFS_SECRET_KEY=YOUR_RUSTFS_PASSWORD
29
32
 
30
33
  # Configure the bucket information of RUSTFS
31
- S3_PUBLIC_DOMAIN=http://localhost:9000
32
34
  S3_ENDPOINT=http://localhost:9000
33
35
  RUSTFS_LOBE_BUCKET=lobe
34
36
 
@@ -7,6 +7,10 @@
7
7
  # 留空则允许所有用户注册登录
8
8
  # AUTH_ALLOWED_EMAILS=user1@example.com,user2@example.com
9
9
 
10
+ # 禁用用户注册(仅允许 SSO 登录)
11
+ # 设置为 1 后,用户无法通过邮箱密码注册,只能通过 SSO 登录
12
+ # AUTH_DISABLE_EMAIL_PASSWORD=1
13
+
10
14
  # ===================
11
15
  # ===== 预设配置 =====
12
16
  # ===================
@@ -24,7 +28,6 @@ RUSTFS_ACCESS_KEY=admin
24
28
  RUSTFS_SECRET_KEY=YOUR_RUSTFS_PASSWORD
25
29
 
26
30
  # 在下方配置 rustfs 中添加的桶
27
- S3_PUBLIC_DOMAIN=http://localhost:9000
28
31
  S3_ENDPOINT=http://localhost:9000
29
32
  RUSTFS_LOBE_BUCKET=lobe
30
33
 
@@ -37,7 +37,6 @@ RUSTFS_ACCESS_KEY=admin
37
37
  RUSTFS_SECRET_KEY=YOUR_RUSTFS_PASSWORD
38
38
 
39
39
  # Configure the bucket information of RUSTFS
40
- S3_PUBLIC_DOMAIN=http://localhost:9000
41
40
  S3_ENDPOINT=http://localhost:9000
42
41
  RUSTFS_LOBE_BUCKET=lobe
43
42
 
@@ -34,7 +34,6 @@ RUSTFS_ACCESS_KEY=admin
34
34
  RUSTFS_SECRET_KEY=YOUR_RUSTFS_PASSWORD
35
35
 
36
36
  # 在下方配置 rustfs 中添加的桶
37
- S3_PUBLIC_DOMAIN=http://localhost:9000
38
37
  S3_ENDPOINT=http://localhost:9000
39
38
  RUSTFS_LOBE_BUCKET=lobe
40
39
 
@@ -34,7 +34,6 @@ MINIO_ROOT_USER=admin
34
34
  MINIO_ROOT_PASSWORD=YOUR_MINIO_PASSWORD
35
35
 
36
36
  # Configure the bucket information of MinIO
37
- S3_PUBLIC_DOMAIN=http://localhost:9000
38
37
  S3_ENDPOINT=http://localhost:9000
39
38
  MINIO_LOBE_BUCKET=lobe
40
39
 
@@ -34,7 +34,6 @@ MINIO_ROOT_USER=admin
34
34
  MINIO_ROOT_PASSWORD=YOUR_MINIO_PASSWORD
35
35
 
36
36
  # 在下方配置 minio 中添加的桶
37
- S3_PUBLIC_DOMAIN=http://localhost:9000
38
37
  S3_ENDPOINT=http://localhost:9000
39
38
  MINIO_LOBE_BUCKET=lobe
40
39
 
@@ -103,7 +103,6 @@ services:
103
103
  - 'DATABASE_URL=postgresql://postgres:${POSTGRES_PASSWORD}@postgresql:5432/${LOBE_DB_NAME}'
104
104
  - 'S3_ENDPOINT=http://localhost:${MINIO_PORT}'
105
105
  - 'S3_BUCKET=${MINIO_LOBE_BUCKET}'
106
- - 'S3_PUBLIC_DOMAIN=http://localhost:${MINIO_PORT}'
107
106
  - 'S3_ENABLE_PATH_STYLE=1'
108
107
  - 'REDIS_URL=redis://redis:6379'
109
108
  - 'REDIS_PREFIX=lobechat'
@@ -21,8 +21,7 @@ AUTH_ZITADEL_ISSUER=http://localhost:8080
21
21
  S3_ACCESS_KEY_ID=
22
22
  S3_SECRET_ACCESS_KEY=
23
23
  S3_ENDPOINT=http://localhost:9000
24
- S3_BUCKET=lobe
25
- S3_PUBLIC_DOMAIN=http://localhost:9000
24
+ S3_BUCKET=lobe
26
25
  S3_ENABLE_PATH_STYLE=1
27
26
  LLM_VISION_IMAGE_USE_BASE64=1
28
27
 
@@ -20,8 +20,7 @@ AUTH_ZITADEL_ISSUER=http://localhost:8080
20
20
  S3_ACCESS_KEY_ID=
21
21
  S3_SECRET_ACCESS_KEY=
22
22
  S3_ENDPOINT=http://localhost:9000
23
- S3_BUCKET=lobe
24
- S3_PUBLIC_DOMAIN=http://localhost:9000
23
+ S3_BUCKET=lobe
25
24
  S3_ENABLE_PATH_STYLE=1
26
25
  LLM_VISION_IMAGE_USE_BASE64=1
27
26
 
@@ -34,7 +34,6 @@ MINIO_ROOT_USER=admin
34
34
  MINIO_ROOT_PASSWORD=YOUR_MINIO_PASSWORD
35
35
 
36
36
  # Configure the bucket information of MinIO
37
- S3_PUBLIC_DOMAIN=http://localhost:9000
38
37
  S3_ENDPOINT=http://localhost:9000
39
38
  MINIO_LOBE_BUCKET=lobe
40
39
 
@@ -34,7 +34,6 @@ MINIO_ROOT_USER=admin
34
34
  MINIO_ROOT_PASSWORD=YOUR_MINIO_PASSWORD
35
35
 
36
36
  # 在下方配置 minio 中添加的桶
37
- S3_PUBLIC_DOMAIN=http://localhost:9000
38
37
  S3_ENDPOINT=http://localhost:9000
39
38
  MINIO_LOBE_BUCKET=lobe
40
39
 
@@ -38,8 +38,6 @@ S3_SECRET_ACCESS_KEY=YOUR_S3_SECRET_ACCESS_KEY
38
38
  S3_ENDPOINT=https://lobe-s3-api.example.com
39
39
  # Required: S3 Bucket (invalid until manually created in MinIO UI)
40
40
  S3_BUCKET=lobe
41
- # Required: S3 Public Domain for client access to unstructured data
42
- S3_PUBLIC_DOMAIN=https://lobe-s3-api.example.com
43
41
  # Optional: S3 Enable Path Style
44
42
  # Use 0 for mainstream S3 cloud providers; use 1 for self-hosted MinIO
45
43
  # See: https://lobehub.com/docs/self-hosting/advanced/s3#s-3-enable-path-style
@@ -38,8 +38,6 @@ S3_SECRET_ACCESS_KEY=YOUR_S3_SECRET_ACCESS_KEY
38
38
  S3_ENDPOINT=https://lobe-s3-api.example.com
39
39
  # 必填,S3 的 Bucket,直到在 MinIO UI 中手动创建之前都是无效的
40
40
  S3_BUCKET=lobe
41
- # 必填,S3 的 Public Domain,用于客户端通过公开连接访问非结构化数据
42
- S3_PUBLIC_DOMAIN=https://lobe-s3-api.example.com
43
41
  # 选填,S3 的 Enable Path Style
44
42
  # 对于主流 S3 Cloud 服务商,一般填 0 即可;对于自部署的 MinIO,请填 1
45
43
  # 请参考:https://lobehub.com/zh/docs/self-hosting/advanced/s3#s-3-enable-path-style
@@ -35,8 +35,6 @@ S3_SECRET_ACCESS_KEY=YOUR_S3_SECRET_ACCESS_KEY
35
35
  S3_ENDPOINT=https://lobe-s3-api.example.com
36
36
  # Required: S3 Bucket (invalid until manually created in MinIO UI)
37
37
  S3_BUCKET=lobe
38
- # Required: S3 Public Domain for client access to unstructured data
39
- S3_PUBLIC_DOMAIN=https://lobe-s3-api.example.com
40
38
  # Optional: S3 Enable Path Style
41
39
  # Use 0 for mainstream S3 cloud providers; use 1 for self-hosted MinIO
42
40
  # See: https://lobehub.com/docs/self-hosting/advanced/s3#s-3-enable-path-style
@@ -31,8 +31,6 @@ S3_SECRET_ACCESS_KEY=YOUR_S3_SECRET_ACCESS_KEY
31
31
  S3_ENDPOINT=https://lobe-s3-api.example.com
32
32
  # 必填,S3 的 Bucket,直到在 MinIO UI 中手动创建之前都是无效的
33
33
  S3_BUCKET=lobe
34
- # 必填,S3 的 Public Domain,用于客户端通过公开连接访问非结构化数据
35
- S3_PUBLIC_DOMAIN=https://lobe-s3-api.example.com
36
34
  # 选填,S3 的 Enable Path Style
37
35
  # 对于主流 S3 Cloud 服务商,一般填 0 即可;对于自部署的 MinIO,请填 1
38
36
  # 请参考:https://lobehub.com/zh/docs/self-hosting/advanced/s3#s-3-enable-path-style
@@ -230,6 +230,20 @@ show_message() {
230
230
  ;;
231
231
  esac
232
232
  ;;
233
+ tips_disable_registration)
234
+ case $LANGUAGE in
235
+ zh_CN)
236
+ echo "如需限制用户注册,可在 .env 中配置:"
237
+ echo " - 使用 SSO 登录时,设置 AUTH_DISABLE_EMAIL_PASSWORD=1 可禁用邮箱密码注册"
238
+ echo " - 使用邮箱密码登录时,设置 AUTH_ALLOWED_EMAILS=user1@example.com,user2@example.com 可限制允许登录的邮箱"
239
+ ;;
240
+ *)
241
+ echo "To restrict user registration, configure in .env:"
242
+ echo " - For SSO login: set AUTH_DISABLE_EMAIL_PASSWORD=1 to disable email/password registration"
243
+ echo " - For email/password login: set AUTH_ALLOWED_EMAILS=user1@example.com,user2@example.com to allow specific emails"
244
+ ;;
245
+ esac
246
+ ;;
233
247
  tips_show_documentation)
234
248
  case $LANGUAGE in
235
249
  zh_CN)
@@ -595,7 +609,6 @@ section_configurate_host() {
595
609
  # lobe host
596
610
  sed "${SED_INPLACE_ARGS[@]}" "s#^APP_URL=.*#APP_URL=$PROTOCOL://$LOBE_HOST#" .env
597
611
  # s3 related
598
- sed "${SED_INPLACE_ARGS[@]}" "s#^S3_PUBLIC_DOMAIN=.*#S3_PUBLIC_DOMAIN=$PROTOCOL://$RUSTFS_HOST#" .env
599
612
  sed "${SED_INPLACE_ARGS[@]}" "s#^S3_ENDPOINT=.*#S3_ENDPOINT=$PROTOCOL://$RUSTFS_HOST#" .env
600
613
 
601
614
 
@@ -726,7 +739,8 @@ section_display_configurated_report() {
726
739
  printf "\n%s\n\n" "$(show_message "tips_run_command")"
727
740
  print_centered "docker compose up --no-attach searxng" "green"
728
741
  printf "\n%s\n" "$(show_message "tips_if_run_normally")"
729
- printf "\n%s\n\n" "$(show_message "tips_regen_jwks")"
742
+ printf "\n%s\n" "$(show_message "tips_regen_jwks")"
743
+ printf "\n%s\n\n" "$(show_message "tips_disable_registration")"
730
744
  print_centered "docker compose up -d --no-attach searxng" "green"
731
745
  printf "\n%s\n" "$(show_message "tips_if_want_searxng_logs")"
732
746
  print_centered "docker compose logs -f searxng" "white"
@@ -17,20 +17,29 @@ The directory structure of LobeHub is as follows:
17
17
 
18
18
  ```bash
19
19
  src
20
- ├── app # Next.js App Router implementation with route groups and API routes
21
- ├── components # Reusable UI components
22
- ├── config # Application configuration files, including client-side and server-side environment variables
23
- ├── features # Function modules related to business functions, such as agent settings, plugin development pop-ups, etc.
24
- ├── hooks # Custom utility hooks reused throughout the application
25
- ├── layout # Application layout components, such as navigation bars, sidebars, etc.
26
- ├── libs # Third-party integrations (analytics, OIDC, etc.)
27
- ├── locales # Internationalization language files
28
- ├── server # Server-side modules and services
29
- ├── services # Encapsulated backend service interfaces, such as HTTP requests
30
- ├── store # Zustand store for state management
31
- ├── styles # Global styles and CSS-in-JS configurations
32
- ├── types # TypeScript type definition files
33
- └── utils # Common utility functions
20
+ ├── app # Next.js App Router implementation with route groups and API routes
21
+ ├── business # Business logic modules (client and server)
22
+ ├── components # Reusable UI components
23
+ ├── config # Application configuration files, including client-side and server-side environment variables
24
+ ├── const # Application constants and enums
25
+ ├── envs # Environment variable definitions and validation (analytics, auth, llm, etc.)
26
+ ├── features # Function modules related to business functions, such as agent settings, plugin development pop-ups, etc.
27
+ ├── helpers # Utility helpers for tool engineering, placeholder parsing, etc.
28
+ ├── hooks # Custom utility hooks reused throughout the application
29
+ ├── layout # Application layout components, such as navigation bars, sidebars, etc.
30
+ ├── libs # Third-party integrations (analytics, OIDC, etc.)
31
+ ├── locales # Internationalization language files
32
+ ├── server # Server-side modules and services
33
+ ├── services # Encapsulated backend service interfaces, such as HTTP requests
34
+ ├── store # Zustand store for state management
35
+ ├── styles # Global styles and CSS-in-JS configurations
36
+ ├── tools # Built-in tools (artifacts, inspectors, interventions, etc.)
37
+ ├── types # TypeScript type definition files
38
+ ├── utils # Common utility functions
39
+ ├── auth.ts # Authentication configuration (Better Auth)
40
+ ├── instrumentation.ts # Application monitoring and telemetry setup
41
+ ├── instrumentation.node.ts # Node.js-specific instrumentation
42
+ └── proxy.ts # Next.js middleware proxy configuration
34
43
  ```
35
44
 
36
45
  ## app
@@ -15,20 +15,29 @@ LobeHub 的文件夹目录架构如下:
15
15
 
16
16
  ```bash
17
17
  src
18
- ├── app # Next.js App Router 实现,包含路由组和 API 路由
19
- ├── components # 可复用的 UI 组件
20
- ├── config # 应用的配置文件,包含客户端环境变量与服务端环境变量
21
- ├── features # 与业务功能相关的功能模块,如 Agent 设置、插件开发弹窗等
22
- ├── hooks # 全应用复用自定义的工具 Hooks
23
- ├── layout # 应用的布局组件,如导航栏、侧边栏等
24
- ├── libs # 第三方集成(分析、OIDC 等)
25
- ├── locales # 国际化的语言文件
26
- ├── server # 服务端模块和服务
27
- ├── services # 封装的后端服务接口,如 HTTP 请求
28
- ├── store # 用于状态管理的 zustand store
29
- ├── styles # 全局样式和 CSS-in-JS 配置
30
- ├── types # TypeScript 的类型定义文件
31
- └── utils # 通用的工具函数
18
+ ├── app # Next.js App Router 实现,包含路由组和 API 路由
19
+ ├── business # 业务逻辑模块(客户端和服务端)
20
+ ├── components # 可复用的 UI 组件
21
+ ├── config # 应用的配置文件,包含客户端环境变量与服务端环境变量
22
+ ├── const # 应用常量和枚举
23
+ ├── envs # 环境变量定义和校验(分析、认证、LLM 等)
24
+ ├── features # 与业务功能相关的功能模块,如 Agent 设置、插件开发弹窗等
25
+ ├── helpers # 工具辅助函数,用于工具工程、占位符解析等
26
+ ├── hooks # 全应用复用自定义的工具 Hooks
27
+ ├── layout # 应用的布局组件,如导航栏、侧边栏等
28
+ ├── libs # 第三方集成(分析、OIDC 等)
29
+ ├── locales # 国际化的语言文件
30
+ ├── server # 服务端模块和服务
31
+ ├── services # 封装的后端服务接口,如 HTTP 请求
32
+ ├── store # 用于状态管理的 zustand store
33
+ ├── styles # 全局样式和 CSS-in-JS 配置
34
+ ├── tools # 内置工具(artifacts、inspectors、interventions 等)
35
+ ├── types # TypeScript 的类型定义文件
36
+ ├── utils # 通用的工具函数
37
+ ├── auth.ts # 认证配置(Better Auth)
38
+ ├── instrumentation.ts # 应用监控和遥测设置
39
+ ├── instrumentation.node.ts # Node.js 专用的 instrumentation
40
+ └── proxy.ts # Next.js 中间件代理配置
32
41
  ```
33
42
 
34
43
  ## app
@@ -101,7 +101,6 @@ S3_ACCESS_KEY_ID=${MINIO_ROOT_USER}
101
101
  S3_SECRET_ACCESS_KEY=${MINIO_ROOT_PASSWORD}
102
102
  S3_ENDPOINT=http://localhost:${MINIO_PORT}
103
103
  S3_BUCKET=${MINIO_LOBE_BUCKET}
104
- S3_PUBLIC_DOMAIN=http://localhost:${MINIO_PORT}
105
104
  S3_ENABLE_PATH_STYLE=1 # Required for MinIO
106
105
  S3_SET_ACL=0 # MinIO compatibility
107
106
  ```
@@ -101,7 +101,6 @@ S3_ACCESS_KEY_ID=${MINIO_ROOT_USER}
101
101
  S3_SECRET_ACCESS_KEY=${MINIO_ROOT_PASSWORD}
102
102
  S3_ENDPOINT=http://localhost:${MINIO_PORT}
103
103
  S3_BUCKET=${MINIO_LOBE_BUCKET}
104
- S3_PUBLIC_DOMAIN=http://localhost:${MINIO_PORT}
105
104
  S3_ENABLE_PATH_STYLE=1 # MinIO 必需
106
105
  S3_SET_ACL=0 # MinIO 兼容性
107
106
  ```
@@ -34,18 +34,25 @@ The folder directory structure of LobeHub is as follows:
34
34
 
35
35
  ```bash
36
36
  src
37
- ├── app # Code related to the main logic and state management of the application
38
- ├── components # Reusable UI components
39
- ├── config # Application configuration files, including client and server environment variables
40
- ├── const # Used to define constants, such as action types, route names, etc.
41
- ├── features # Business-related feature modules, such as Agent settings, plugin development pop-ups, etc.
42
- ├── hooks # Custom utility Hooks reusable across the application
43
- ├── layout # Application layout components, such as navigation bars, sidebars, etc.
44
- ├── locales # Language files for internationalization
45
- ├── services # Encapsulated backend service interfaces, such as HTTP requests
46
- ├── store # Zustand store for state management
47
- ├── types # TypeScript type definition files
48
- └── utils # General utility functions
37
+ ├── app # Next.js App Router implementation with route groups and API routes
38
+ ├── business # Business logic modules (client and server)
39
+ ├── components # Reusable UI components
40
+ ├── config # Application configuration files, including client and server environment variables
41
+ ├── const # Application constants and enums
42
+ ├── envs # Environment variable definitions and validation (analytics, auth, llm, etc.)
43
+ ├── features # Business-related feature modules, such as Agent settings, plugin development pop-ups, etc.
44
+ ├── helpers # Utility helpers for tool engineering, placeholder parsing, etc.
45
+ ├── hooks # Custom utility Hooks reusable across the application
46
+ ├── layout # Application layout components, such as navigation bars, sidebars, etc.
47
+ ├── libs # Third-party integrations (analytics, OIDC, etc.)
48
+ ├── locales # Language files for internationalization
49
+ ├── server # Server-side modules and services
50
+ ├── services # Encapsulated backend service interfaces, such as HTTP requests
51
+ ├── store # Zustand store for state management
52
+ ├── styles # Global styles and CSS-in-JS configurations
53
+ ├── tools # Built-in tools (artifacts, inspectors, interventions, etc.)
54
+ ├── types # TypeScript type definition files
55
+ └── utils # General utility functions
49
56
  ```
50
57
 
51
58
  For a detailed introduction to the directory structure, see: [Folder Directory Structure](/docs/development/basic/folder-structure)
@@ -32,18 +32,25 @@ LobeHub 的文件夹目录架构如下:
32
32
 
33
33
  ```bash
34
34
  src
35
- ├── app # 应用主要逻辑和状态管理相关的代码
36
- ├── components # 可复用的 UI 组件
37
- ├── config # 应用的配置文件,包含客户端环境变量与服务端环境变量
38
- ├── const # 用于定义常量,如 action 类型、路由名等
39
- ├── features # 与业务功能相关的功能模块,如 Agent 设置、插件开发弹窗等
40
- ├── hooks # 全应用复用自定义的工具 Hooks
41
- ├── layout # 应用的布局组件,如导航栏、侧边栏等
42
- ├── locales # 国际化的语言文件
43
- ├── services # 封装的后端服务接口,如 HTTP 请求
44
- ├── store # 用于状态管理的 zustand store
45
- ├── types # TypeScript 的类型定义文件
46
- └── utils # 通用的工具函数
35
+ ├── app # Next.js App Router 实现,包含路由组和 API 路由
36
+ ├── business # 业务逻辑模块(客户端和服务端)
37
+ ├── components # 可复用的 UI 组件
38
+ ├── config # 应用的配置文件,包含客户端环境变量与服务端环境变量
39
+ ├── const # 应用常量和枚举
40
+ ├── envs # 环境变量定义和校验(分析、认证、LLM 等)
41
+ ├── features # 与业务功能相关的功能模块,如 Agent 设置、插件开发弹窗等
42
+ ├── helpers # 工具辅助函数,用于工具工程、占位符解析等
43
+ ├── hooks # 全应用复用自定义的工具 Hooks
44
+ ├── layout # 应用的布局组件,如导航栏、侧边栏等
45
+ ├── libs # 第三方集成(分析、OIDC 等)
46
+ ├── locales # 国际化的语言文件
47
+ ├── server # 服务端模块和服务
48
+ ├── services # 封装的后端服务接口,如 HTTP 请求
49
+ ├── store # 用于状态管理的 zustand store
50
+ ├── styles # 全局样式和 CSS-in-JS 配置
51
+ ├── tools # 内置工具(artifacts、inspectors、interventions 等)
52
+ ├── types # TypeScript 的类型定义文件
53
+ └── utils # 通用的工具函数
47
54
  ```
48
55
 
49
56
  有关目录架构的详细介绍,详见: [文件夹目录架构](/zh/docs/development/basic/folder-structure)