@lobehub/chat 1.44.3 → 1.45.1

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 (320) hide show
  1. package/.remarkrc.mdx.js +6 -0
  2. package/CHANGELOG.md +50 -0
  3. package/changelog/v1.json +18 -0
  4. package/docs/changelog/2023-09-09-plugin-system.mdx +5 -0
  5. package/docs/changelog/2023-09-09-plugin-system.zh-CN.mdx +5 -0
  6. package/docs/changelog/2023-11-14-gpt4-vision.mdx +6 -0
  7. package/docs/changelog/2023-11-14-gpt4-vision.zh-CN.mdx +6 -0
  8. package/docs/changelog/2023-11-19-tts-stt.mdx +6 -0
  9. package/docs/changelog/2023-11-19-tts-stt.zh-CN.mdx +7 -0
  10. package/docs/changelog/2023-12-22-dalle-3.mdx +6 -0
  11. package/docs/changelog/2023-12-22-dalle-3.zh-CN.mdx +4 -0
  12. package/docs/changelog/2024-02-08-sso-oauth.mdx +6 -0
  13. package/docs/changelog/2024-02-08-sso-oauth.zh-CN.mdx +6 -0
  14. package/docs/changelog/2024-02-14-ollama.mdx +6 -0
  15. package/docs/changelog/2024-02-14-ollama.zh-CN.mdx +5 -0
  16. package/docs/changelog/2024-06-19-lobe-chat-v1.mdx +6 -0
  17. package/docs/changelog/2024-06-19-lobe-chat-v1.zh-CN.mdx +5 -0
  18. package/docs/changelog/2024-07-19-gpt-4o-mini.mdx +5 -0
  19. package/docs/changelog/2024-07-19-gpt-4o-mini.zh-CN.mdx +4 -0
  20. package/docs/changelog/2024-08-02-lobe-chat-database-docker.mdx +6 -0
  21. package/docs/changelog/2024-08-02-lobe-chat-database-docker.zh-CN.mdx +5 -0
  22. package/docs/changelog/2024-08-21-file-upload-and-knowledge-base.mdx +6 -0
  23. package/docs/changelog/2024-08-21-file-upload-and-knowledge-base.zh-CN.mdx +5 -0
  24. package/docs/changelog/2024-09-13-openai-o1-models.mdx +6 -0
  25. package/docs/changelog/2024-09-13-openai-o1-models.zh-CN.mdx +6 -0
  26. package/docs/changelog/2024-09-20-artifacts.mdx +6 -0
  27. package/docs/changelog/2024-09-20-artifacts.zh-CN.mdx +6 -0
  28. package/docs/changelog/2024-10-27-pin-assistant.mdx +5 -0
  29. package/docs/changelog/2024-10-27-pin-assistant.zh-CN.mdx +4 -0
  30. package/docs/changelog/2024-11-06-share-text-json.mdx +4 -0
  31. package/docs/changelog/2024-11-06-share-text-json.zh-CN.mdx +4 -0
  32. package/docs/changelog/2024-11-25-november-providers.mdx +7 -0
  33. package/docs/changelog/2024-11-25-november-providers.zh-CN.mdx +7 -0
  34. package/docs/changelog/2024-11-27-forkable-chat.mdx +4 -0
  35. package/docs/changelog/2024-11-27-forkable-chat.zh-CN.mdx +5 -0
  36. package/docs/changelog/2025-01-03-user-profile.mdx +5 -0
  37. package/docs/changelog/2025-01-03-user-profile.zh-CN.mdx +4 -1
  38. package/docs/self-hosting/advanced/auth/clerk.mdx +25 -41
  39. package/docs/self-hosting/advanced/auth/clerk.zh-CN.mdx +23 -37
  40. package/docs/self-hosting/advanced/auth/next-auth/auth0.mdx +31 -58
  41. package/docs/self-hosting/advanced/auth/next-auth/auth0.zh-CN.mdx +30 -57
  42. package/docs/self-hosting/advanced/auth/next-auth/authelia.mdx +38 -38
  43. package/docs/self-hosting/advanced/auth/next-auth/authelia.zh-CN.mdx +37 -38
  44. package/docs/self-hosting/advanced/auth/next-auth/authentik.mdx +26 -31
  45. package/docs/self-hosting/advanced/auth/next-auth/authentik.zh-CN.mdx +25 -30
  46. package/docs/self-hosting/advanced/auth/next-auth/casdoor.mdx +74 -75
  47. package/docs/self-hosting/advanced/auth/next-auth/casdoor.zh-CN.mdx +72 -73
  48. package/docs/self-hosting/advanced/auth/next-auth/cloudflare-zero-trust.mdx +24 -25
  49. package/docs/self-hosting/advanced/auth/next-auth/cloudflare-zero-trust.zh-CN.mdx +23 -24
  50. package/docs/self-hosting/advanced/auth/next-auth/github.mdx +46 -73
  51. package/docs/self-hosting/advanced/auth/next-auth/github.zh-CN.mdx +43 -70
  52. package/docs/self-hosting/advanced/auth/next-auth/logto.mdx +28 -37
  53. package/docs/self-hosting/advanced/auth/next-auth/logto.zh-CN.mdx +28 -37
  54. package/docs/self-hosting/advanced/auth/next-auth/microsoft-entra-id.mdx +36 -49
  55. package/docs/self-hosting/advanced/auth/next-auth/microsoft-entra-id.zh-CN.mdx +30 -43
  56. package/docs/self-hosting/advanced/auth/next-auth/wechat.mdx +13 -14
  57. package/docs/self-hosting/advanced/auth/next-auth/wechat.zh-CN.mdx +14 -15
  58. package/docs/self-hosting/advanced/auth/next-auth/zitadel.mdx +35 -69
  59. package/docs/self-hosting/advanced/auth/next-auth/zitadel.zh-CN.mdx +34 -68
  60. package/docs/self-hosting/advanced/auth.mdx +14 -13
  61. package/docs/self-hosting/advanced/auth.zh-CN.mdx +15 -14
  62. package/docs/self-hosting/advanced/feature-flags.zh-CN.mdx +15 -15
  63. package/docs/self-hosting/advanced/knowledge-base.mdx +14 -3
  64. package/docs/self-hosting/advanced/knowledge-base.zh-CN.mdx +12 -3
  65. package/docs/self-hosting/advanced/model-list.zh-CN.mdx +5 -5
  66. package/docs/self-hosting/advanced/s3/cloudflare-r2.mdx +52 -81
  67. package/docs/self-hosting/advanced/s3/cloudflare-r2.zh-CN.mdx +51 -80
  68. package/docs/self-hosting/advanced/s3/tencent-cloud.mdx +20 -34
  69. package/docs/self-hosting/advanced/s3/tencent-cloud.zh-CN.mdx +28 -43
  70. package/docs/self-hosting/advanced/s3.mdx +30 -34
  71. package/docs/self-hosting/advanced/s3.zh-CN.mdx +28 -33
  72. package/docs/self-hosting/advanced/settings-url-share.mdx +6 -6
  73. package/docs/self-hosting/advanced/settings-url-share.zh-CN.mdx +19 -19
  74. package/docs/self-hosting/advanced/upstream-sync.mdx +73 -89
  75. package/docs/self-hosting/advanced/upstream-sync.zh-CN.mdx +71 -87
  76. package/docs/self-hosting/advanced/webrtc.mdx +14 -21
  77. package/docs/self-hosting/advanced/webrtc.zh-CN.mdx +19 -26
  78. package/docs/self-hosting/environment-variables/analytics.zh-CN.mdx +0 -3
  79. package/docs/self-hosting/environment-variables/auth.zh-CN.mdx +1 -1
  80. package/docs/self-hosting/environment-variables/basic.mdx +13 -13
  81. package/docs/self-hosting/environment-variables/basic.zh-CN.mdx +15 -15
  82. package/docs/self-hosting/environment-variables/model-provider.mdx +1 -1
  83. package/docs/self-hosting/environment-variables/model-provider.zh-CN.mdx +1 -1
  84. package/docs/self-hosting/environment-variables/s3.mdx +3 -4
  85. package/docs/self-hosting/environment-variables/s3.zh-CN.mdx +5 -7
  86. package/docs/self-hosting/environment-variables.mdx +8 -4
  87. package/docs/self-hosting/environment-variables.zh-CN.mdx +4 -0
  88. package/docs/self-hosting/examples/azure-openai.mdx +9 -12
  89. package/docs/self-hosting/examples/azure-openai.zh-CN.mdx +8 -11
  90. package/docs/self-hosting/examples/ollama.mdx +8 -7
  91. package/docs/self-hosting/examples/ollama.zh-CN.mdx +8 -7
  92. package/docs/self-hosting/platform/alibaba-cloud.mdx +5 -7
  93. package/docs/self-hosting/platform/alibaba-cloud.zh-CN.mdx +5 -7
  94. package/docs/self-hosting/platform/btpanel.mdx +3 -2
  95. package/docs/self-hosting/platform/btpanel.zh-CN.mdx +3 -3
  96. package/docs/self-hosting/platform/docker-compose.mdx +75 -85
  97. package/docs/self-hosting/platform/docker-compose.zh-CN.mdx +75 -85
  98. package/docs/self-hosting/platform/docker.mdx +87 -92
  99. package/docs/self-hosting/platform/docker.zh-CN.mdx +96 -115
  100. package/docs/self-hosting/platform/netlify.mdx +44 -94
  101. package/docs/self-hosting/platform/netlify.zh-CN.mdx +40 -90
  102. package/docs/self-hosting/platform/railway.mdx +6 -7
  103. package/docs/self-hosting/platform/railway.zh-CN.mdx +6 -7
  104. package/docs/self-hosting/platform/repocloud.mdx +6 -7
  105. package/docs/self-hosting/platform/repocloud.zh-CN.mdx +6 -7
  106. package/docs/self-hosting/platform/sealos.mdx +6 -7
  107. package/docs/self-hosting/platform/sealos.zh-CN.mdx +6 -7
  108. package/docs/self-hosting/platform/vercel.mdx +7 -8
  109. package/docs/self-hosting/platform/vercel.zh-CN.mdx +7 -8
  110. package/docs/self-hosting/platform/zeabur.mdx +29 -32
  111. package/docs/self-hosting/platform/zeabur.zh-CN.mdx +29 -32
  112. package/docs/self-hosting/server-database/docker-compose.mdx +44 -71
  113. package/docs/self-hosting/server-database/docker-compose.zh-CN.mdx +44 -71
  114. package/docs/self-hosting/server-database/docker.mdx +84 -88
  115. package/docs/self-hosting/server-database/docker.zh-CN.mdx +87 -91
  116. package/docs/self-hosting/server-database/dokploy.mdx +18 -1
  117. package/docs/self-hosting/server-database/dokploy.zh-CN.mdx +84 -68
  118. package/docs/self-hosting/server-database/repocloud.mdx +7 -9
  119. package/docs/self-hosting/server-database/repocloud.zh-CN.mdx +9 -11
  120. package/docs/self-hosting/server-database/vercel.mdx +158 -243
  121. package/docs/self-hosting/server-database/vercel.zh-CN.mdx +137 -205
  122. package/docs/self-hosting/server-database/zeabur.mdx +21 -23
  123. package/docs/self-hosting/server-database/zeabur.zh-CN.mdx +20 -22
  124. package/docs/self-hosting/server-database.mdx +34 -36
  125. package/docs/self-hosting/server-database.zh-CN.mdx +34 -37
  126. package/docs/self-hosting/start.mdx +1 -4
  127. package/docs/self-hosting/start.zh-CN.mdx +1 -1
  128. package/docs/usage/agents/agent-organization.mdx +5 -21
  129. package/docs/usage/agents/agent-organization.zh-CN.mdx +5 -21
  130. package/docs/usage/agents/concepts.mdx +4 -4
  131. package/docs/usage/agents/concepts.zh-CN.mdx +4 -4
  132. package/docs/usage/agents/custom-agent.mdx +2 -2
  133. package/docs/usage/agents/custom-agent.zh-CN.mdx +2 -2
  134. package/docs/usage/agents/model.mdx +4 -4
  135. package/docs/usage/agents/model.zh-CN.mdx +6 -6
  136. package/docs/usage/agents/prompt.mdx +5 -6
  137. package/docs/usage/agents/prompt.zh-CN.mdx +5 -6
  138. package/docs/usage/agents/topics.mdx +2 -2
  139. package/docs/usage/agents/topics.zh-CN.mdx +2 -2
  140. package/docs/usage/features/agent-market.mdx +2 -2
  141. package/docs/usage/features/agent-market.zh-CN.mdx +2 -2
  142. package/docs/usage/features/auth.mdx +1 -5
  143. package/docs/usage/features/auth.zh-CN.mdx +1 -5
  144. package/docs/usage/features/database.mdx +1 -5
  145. package/docs/usage/features/database.zh-CN.mdx +1 -5
  146. package/docs/usage/features/local-llm.mdx +2 -6
  147. package/docs/usage/features/local-llm.zh-CN.mdx +2 -6
  148. package/docs/usage/features/mobile.mdx +1 -5
  149. package/docs/usage/features/mobile.zh-CN.mdx +1 -5
  150. package/docs/usage/features/multi-ai-providers.mdx +3 -11
  151. package/docs/usage/features/multi-ai-providers.zh-CN.mdx +3 -11
  152. package/docs/usage/features/plugin-system.mdx +9 -10
  153. package/docs/usage/features/plugin-system.zh-CN.mdx +9 -10
  154. package/docs/usage/features/pwa.mdx +11 -25
  155. package/docs/usage/features/pwa.zh-CN.mdx +11 -25
  156. package/docs/usage/features/text-to-image.mdx +2 -2
  157. package/docs/usage/features/text-to-image.zh-CN.mdx +2 -2
  158. package/docs/usage/features/theme.mdx +1 -6
  159. package/docs/usage/features/theme.zh-CN.mdx +1 -6
  160. package/docs/usage/features/tts.mdx +3 -7
  161. package/docs/usage/features/tts.zh-CN.mdx +3 -7
  162. package/docs/usage/features/vision.mdx +2 -2
  163. package/docs/usage/features/vision.zh-CN.mdx +2 -2
  164. package/docs/usage/foundation/basic.mdx +7 -18
  165. package/docs/usage/foundation/basic.zh-CN.mdx +6 -16
  166. package/docs/usage/foundation/share.mdx +3 -13
  167. package/docs/usage/foundation/share.zh-CN.mdx +3 -13
  168. package/docs/usage/foundation/text2image.mdx +3 -12
  169. package/docs/usage/foundation/text2image.zh-CN.mdx +3 -12
  170. package/docs/usage/foundation/translate.mdx +3 -13
  171. package/docs/usage/foundation/translate.zh-CN.mdx +3 -13
  172. package/docs/usage/foundation/tts-stt.mdx +3 -12
  173. package/docs/usage/foundation/tts-stt.zh-CN.mdx +3 -12
  174. package/docs/usage/foundation/vision.mdx +4 -16
  175. package/docs/usage/foundation/vision.zh-CN.mdx +4 -16
  176. package/docs/usage/plugins/basic-usage.mdx +7 -30
  177. package/docs/usage/plugins/basic-usage.zh-CN.mdx +7 -30
  178. package/docs/usage/plugins/development.mdx +30 -78
  179. package/docs/usage/plugins/development.zh-CN.mdx +31 -79
  180. package/docs/usage/plugins/store.mdx +2 -10
  181. package/docs/usage/plugins/store.zh-CN.mdx +2 -10
  182. package/docs/usage/providers/ai21.mdx +17 -33
  183. package/docs/usage/providers/ai21.zh-CN.mdx +17 -33
  184. package/docs/usage/providers/ai360.mdx +17 -33
  185. package/docs/usage/providers/ai360.zh-CN.mdx +20 -36
  186. package/docs/usage/providers/anthropic.mdx +23 -45
  187. package/docs/usage/providers/anthropic.zh-CN.mdx +22 -44
  188. package/docs/usage/providers/azure.mdx +21 -51
  189. package/docs/usage/providers/azure.zh-CN.mdx +19 -48
  190. package/docs/usage/providers/baichuan.mdx +16 -34
  191. package/docs/usage/providers/baichuan.zh-CN.mdx +15 -33
  192. package/docs/usage/providers/bedrock.mdx +38 -87
  193. package/docs/usage/providers/bedrock.zh-CN.mdx +37 -86
  194. package/docs/usage/providers/cloudflare.mdx +25 -48
  195. package/docs/usage/providers/cloudflare.zh-CN.mdx +24 -45
  196. package/docs/usage/providers/deepseek.mdx +25 -51
  197. package/docs/usage/providers/deepseek.zh-CN.mdx +24 -50
  198. package/docs/usage/providers/fireworksai.mdx +23 -43
  199. package/docs/usage/providers/fireworksai.zh-CN.mdx +21 -41
  200. package/docs/usage/providers/gemini.mdx +20 -46
  201. package/docs/usage/providers/gemini.zh-CN.mdx +20 -46
  202. package/docs/usage/providers/giteeai.mdx +24 -45
  203. package/docs/usage/providers/giteeai.zh-CN.mdx +22 -43
  204. package/docs/usage/providers/github.mdx +19 -45
  205. package/docs/usage/providers/github.zh-CN.mdx +19 -44
  206. package/docs/usage/providers/groq.mdx +12 -29
  207. package/docs/usage/providers/groq.zh-CN.mdx +11 -28
  208. package/docs/usage/providers/hunyuan.mdx +19 -39
  209. package/docs/usage/providers/hunyuan.zh-CN.mdx +18 -38
  210. package/docs/usage/providers/internlm.mdx +21 -38
  211. package/docs/usage/providers/internlm.zh-CN.mdx +19 -36
  212. package/docs/usage/providers/minimax.mdx +24 -50
  213. package/docs/usage/providers/minimax.zh-CN.mdx +22 -48
  214. package/docs/usage/providers/mistral.mdx +21 -39
  215. package/docs/usage/providers/mistral.zh-CN.mdx +20 -38
  216. package/docs/usage/providers/moonshot.mdx +20 -38
  217. package/docs/usage/providers/moonshot.zh-CN.mdx +19 -37
  218. package/docs/usage/providers/novita.mdx +20 -43
  219. package/docs/usage/providers/novita.zh-CN.mdx +19 -42
  220. package/docs/usage/providers/ollama/gemma.mdx +12 -29
  221. package/docs/usage/providers/ollama/gemma.zh-CN.mdx +12 -30
  222. package/docs/usage/providers/ollama/qwen.mdx +17 -32
  223. package/docs/usage/providers/ollama/qwen.zh-CN.mdx +12 -27
  224. package/docs/usage/providers/ollama.mdx +67 -99
  225. package/docs/usage/providers/ollama.zh-CN.mdx +67 -99
  226. package/docs/usage/providers/openai.mdx +42 -56
  227. package/docs/usage/providers/openai.zh-CN.mdx +39 -52
  228. package/docs/usage/providers/openrouter.mdx +48 -84
  229. package/docs/usage/providers/openrouter.zh-CN.mdx +31 -67
  230. package/docs/usage/providers/perplexity.mdx +16 -34
  231. package/docs/usage/providers/perplexity.zh-CN.mdx +16 -34
  232. package/docs/usage/providers/qwen.mdx +26 -52
  233. package/docs/usage/providers/qwen.zh-CN.mdx +25 -51
  234. package/docs/usage/providers/sensenova.mdx +24 -45
  235. package/docs/usage/providers/sensenova.zh-CN.mdx +22 -43
  236. package/docs/usage/providers/siliconcloud.mdx +17 -33
  237. package/docs/usage/providers/siliconcloud.zh-CN.mdx +17 -33
  238. package/docs/usage/providers/spark.mdx +20 -40
  239. package/docs/usage/providers/spark.zh-CN.mdx +19 -39
  240. package/docs/usage/providers/stepfun.mdx +17 -35
  241. package/docs/usage/providers/stepfun.zh-CN.mdx +17 -35
  242. package/docs/usage/providers/taichu.mdx +16 -34
  243. package/docs/usage/providers/taichu.zh-CN.mdx +15 -33
  244. package/docs/usage/providers/togetherai.mdx +18 -40
  245. package/docs/usage/providers/togetherai.zh-CN.mdx +18 -40
  246. package/docs/usage/providers/upstage.mdx +18 -34
  247. package/docs/usage/providers/upstage.zh-CN.mdx +17 -33
  248. package/docs/usage/providers/wenxin.mdx +22 -42
  249. package/docs/usage/providers/wenxin.zh-CN.mdx +20 -40
  250. package/docs/usage/providers/xai.mdx +21 -38
  251. package/docs/usage/providers/xai.zh-CN.mdx +20 -37
  252. package/docs/usage/providers/zeroone.mdx +22 -48
  253. package/docs/usage/providers/zeroone.zh-CN.mdx +22 -48
  254. package/docs/usage/providers/zhipu.mdx +17 -35
  255. package/docs/usage/providers/zhipu.zh-CN.mdx +18 -34
  256. package/docs/usage/providers.mdx +1 -6
  257. package/docs/usage/providers.zh-CN.mdx +1 -6
  258. package/docs/usage/start.mdx +4 -18
  259. package/docs/usage/start.zh-CN.mdx +2 -19
  260. package/docs/usage/tools-calling/anthropic.mdx +18 -51
  261. package/docs/usage/tools-calling/anthropic.zh-CN.mdx +22 -55
  262. package/docs/usage/tools-calling/google.mdx +16 -23
  263. package/docs/usage/tools-calling/google.zh-CN.mdx +17 -24
  264. package/docs/usage/tools-calling/groq.mdx +9 -0
  265. package/docs/usage/tools-calling/groq.zh-CN.mdx +44 -70
  266. package/docs/usage/tools-calling/moonshot.mdx +9 -0
  267. package/docs/usage/tools-calling/openai.mdx +19 -44
  268. package/docs/usage/tools-calling/openai.zh-CN.mdx +20 -45
  269. package/docs/usage/tools-calling.mdx +9 -0
  270. package/docs/usage/tools-calling.zh-CN.mdx +60 -68
  271. package/next.config.ts +1 -0
  272. package/package.json +48 -41
  273. package/scripts/mdxWorkflow/index.ts +7 -0
  274. package/src/app/(main)/(mobile)/me/(home)/features/Header.tsx +2 -1
  275. package/src/app/(main)/(mobile)/me/data/features/Header.tsx +1 -1
  276. package/src/app/(main)/(mobile)/me/profile/features/Header.tsx +1 -1
  277. package/src/app/(main)/(mobile)/me/settings/features/Header.tsx +1 -1
  278. package/src/app/(main)/@nav/_layout/Mobile.tsx +2 -1
  279. package/src/app/(main)/chat/(workspace)/@topic/features/SystemRole/SystemRoleContent.tsx +2 -1
  280. package/src/app/(main)/chat/(workspace)/@topic/features/TopicListContent/ByTimeMode/GroupItem.tsx +2 -2
  281. package/src/app/(main)/chat/(workspace)/_layout/Desktop/ChatHeader/Main.tsx +2 -1
  282. package/src/app/(main)/chat/(workspace)/_layout/Desktop/ChatHeader/index.tsx +1 -1
  283. package/src/app/(main)/chat/(workspace)/_layout/Mobile/ChatHeader/ChatHeaderTitle.tsx +2 -1
  284. package/src/app/(main)/chat/(workspace)/_layout/Mobile/ChatHeader/index.tsx +1 -1
  285. package/src/app/(main)/chat/@session/_layout/Mobile/SessionHeader.tsx +2 -1
  286. package/src/app/(main)/chat/settings/_layout/Desktop/Header.tsx +1 -1
  287. package/src/app/(main)/chat/settings/_layout/Mobile/Header.tsx +1 -1
  288. package/src/app/(main)/discover/(detail)/provider/[slug]/features/InfoSidebar/SuggestionItem.tsx +8 -6
  289. package/src/app/(main)/discover/(list)/_layout/Desktop/Nav.tsx +1 -1
  290. package/src/app/(main)/discover/(list)/_layout/Mobile/Header.tsx +2 -1
  291. package/src/app/(main)/discover/_layout/Desktop/Header.tsx +1 -1
  292. package/src/app/(main)/discover/components/VirtuosoGridList/index.tsx +9 -5
  293. package/src/app/(main)/discover/search/_layout/Mobile/Header.tsx +1 -1
  294. package/src/app/(main)/files/(content)/@menu/features/KnowledgeBase/EmptyStatus.tsx +21 -13
  295. package/src/app/(main)/repos/[id]/evals/evaluation/EvaluationList/index.tsx +1 -1
  296. package/src/app/(main)/settings/sync/features/DeviceInfo/SystemIcon.tsx +2 -0
  297. package/src/components/Branding/ProductLogo/Custom.tsx +19 -20
  298. package/src/components/BrowserIcon/index.tsx +19 -30
  299. package/src/components/BubblesLoading/index.tsx +31 -23
  300. package/src/components/FunctionModal/createModalHooks.ts +6 -3
  301. package/src/components/StopLoading.tsx +10 -7
  302. package/src/features/ChatInput/Desktop/InputArea/index.tsx +2 -2
  303. package/src/features/InitClientDB/EnableModal.tsx +2 -2
  304. package/src/features/InitClientDB/{PGliteSVG.tsx → PGliteIcon.tsx} +17 -11
  305. package/src/features/ShareModal/ShareImage/index.tsx +32 -22
  306. package/src/features/ShareModal/ShareJSON/Preview.tsx +2 -2
  307. package/src/features/ShareModal/ShareJSON/index.tsx +49 -37
  308. package/src/features/ShareModal/ShareText/Preview.tsx +4 -1
  309. package/src/features/ShareModal/ShareText/index.tsx +49 -38
  310. package/src/features/ShareModal/index.tsx +1 -1
  311. package/src/features/ShareModal/style.ts +30 -0
  312. package/src/utils/colorUtils.ts +1 -1
  313. package/src/components/BrowserIcon/components/Brave.tsx +0 -56
  314. package/src/components/BrowserIcon/components/Chrome.tsx +0 -14
  315. package/src/components/BrowserIcon/components/Chromium.tsx +0 -14
  316. package/src/components/BrowserIcon/components/Edge.tsx +0 -36
  317. package/src/components/BrowserIcon/components/Firefox.tsx +0 -38
  318. package/src/components/BrowserIcon/components/Opera.tsx +0 -19
  319. package/src/components/BrowserIcon/components/Safari.tsx +0 -23
  320. package/src/components/BrowserIcon/components/Samsung.tsx +0 -21
@@ -19,79 +19,52 @@ tags:
19
19
  <Steps>
20
20
  ### Create a Github Provider
21
21
 
22
- Click [here][github-create-app] to create a new Github App.
23
-
24
- Fill in the Github App name, Homepage URL, and Callback URL.
25
-
26
- <Image
27
- alt="Create a Github Provider"
28
- inStep
29
- src="https://github.com/lobehub/lobe-chat/assets/64475363/2f919f99-2aaa-4fa7-9938-169d3ed09db7"
30
- />
31
-
32
- Set the webhook callback URL according to your needs.
33
-
34
- <Image
35
- alt="Fill in other fields"
36
- inStep
37
- src="https://github.com/lobehub/lobe-chat/assets/64475363/d7ef5ad1-b1a3-435e-b1bc-4436d2b6fecd"
38
- />
39
-
40
- Set the permission to read email addresses.
41
-
42
- <Image
43
- alt="Set required permissions"
44
- inStep
45
- src="https://github.com/lobehub/lobe-chat/assets/64475363/23131ca1-9e84-4a89-a840-ef79c4bc0251"
46
- />
47
- <Image
48
- alt="Set permission to read email addresses"
49
- inStep
50
- src="https://github.com/lobehub/lobe-chat/assets/64475363/358bca8d-3d82-4e76-9a5e-90d16a39efde"
51
- />
52
-
53
- Set whether it is accessible publicly or only accessible to yourself.
54
-
55
- <Image
56
- alt="Set whether it is accessible publicly or only accessible to yourself"
57
- inStep
58
- src="https://github.com/lobehub/lobe-chat/assets/64475363/995780cb-9096-4a36-ab17-d422703ab970"
59
- />
60
-
61
- Click "Create Github App".
62
-
63
- After successful creation, click "Generate a new client secret" to create a client secret.
64
-
65
- <Image
66
- alt="Create a new client secret"
67
- inStep
68
- src="https://github.com/lobehub/lobe-chat/assets/64475363/6d69bdca-7d18-4cbc-b3e0-220d8815cd29"
69
- />
70
-
71
- After successful creation, save the `Client ID` and `Client Secret`.
72
-
73
- <Image
74
- alt="Create a new client secret"
75
- inStep
76
- src="https://github.com/lobehub/lobe-chat/assets/64475363/c6108133-a918-48b0-ab1a-e3fa607572a4"
77
- />
78
-
79
- ### Configure Environment Variables
80
-
81
- When deploying LobeChat, you need to configure the following environment variables:
82
-
83
- | Environment Variable | Type | Description |
84
- | --- | --- | --- |
85
- | `NEXT_AUTH_SECRET` | Required | Key used to encrypt Auth.js session tokens. You can generate the key using the command: `openssl rand -base64 32` |
86
- | `NEXT_AUTH_SSO_PROVIDERS` | Required | Select the Single Sign-On provider for LobeChat. Use `github` for Github. |
87
- | `AUTH_GITHUB_ID` | Required | Client ID in the Github App details page. |
88
- | `AUTH_GITHUB_SECRET` | Required | Client Secret in the Github App details page. |
89
- | `NEXTAUTH_URL` | Required | This URL is used to specify the callback address for Auth.js when performing OAuth authentication. Only set it if the default generated redirect address is incorrect. `https://example.com/api/auth` |
90
-
91
- <Callout type={'tip'}>
92
- Go to [📘 Environment Variables](/docs/self-hosting/environment-variables/auth#github) for detailed
93
- information on these variables.
94
- </Callout>
22
+ Click [here][github-create-app] to create a new Github App.
23
+
24
+ Fill in the Github App name, Homepage URL, and Callback URL.
25
+
26
+ <Image alt="Create a Github Provider" inStep src="https://github.com/lobehub/lobe-chat/assets/64475363/2f919f99-2aaa-4fa7-9938-169d3ed09db7" />
27
+
28
+ Set the webhook callback URL according to your needs.
29
+
30
+ <Image alt="Fill in other fields" inStep src="https://github.com/lobehub/lobe-chat/assets/64475363/d7ef5ad1-b1a3-435e-b1bc-4436d2b6fecd" />
31
+
32
+ Set the permission to read email addresses.
33
+
34
+ <Image alt="Set required permissions" inStep src="https://github.com/lobehub/lobe-chat/assets/64475363/23131ca1-9e84-4a89-a840-ef79c4bc0251" />
35
+
36
+ <Image alt="Set permission to read email addresses" inStep src="https://github.com/lobehub/lobe-chat/assets/64475363/358bca8d-3d82-4e76-9a5e-90d16a39efde" />
37
+
38
+ Set whether it is accessible publicly or only accessible to yourself.
39
+
40
+ <Image alt="Set whether it is accessible publicly or only accessible to yourself" inStep src="https://github.com/lobehub/lobe-chat/assets/64475363/995780cb-9096-4a36-ab17-d422703ab970" />
41
+
42
+ Click "Create Github App".
43
+
44
+ After successful creation, click "Generate a new client secret" to create a client secret.
45
+
46
+ <Image alt="Create a new client secret" inStep src="https://github.com/lobehub/lobe-chat/assets/64475363/6d69bdca-7d18-4cbc-b3e0-220d8815cd29" />
47
+
48
+ After successful creation, save the `Client ID` and `Client Secret`.
49
+
50
+ <Image alt="Create a new client secret" inStep src="https://github.com/lobehub/lobe-chat/assets/64475363/c6108133-a918-48b0-ab1a-e3fa607572a4" />
51
+
52
+ ### Configure Environment Variables
53
+
54
+ When deploying LobeChat, you need to configure the following environment variables:
55
+
56
+ | Environment Variable | Type | Description |
57
+ | ------------------------- | -------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
58
+ | `NEXT_AUTH_SECRET` | Required | Key used to encrypt Auth.js session tokens. You can generate the key using the command: `openssl rand -base64 32` |
59
+ | `NEXT_AUTH_SSO_PROVIDERS` | Required | Select the Single Sign-On provider for LobeChat. Use `github` for Github. |
60
+ | `AUTH_GITHUB_ID` | Required | Client ID in the Github App details page. |
61
+ | `AUTH_GITHUB_SECRET` | Required | Client Secret in the Github App details page. |
62
+ | `NEXTAUTH_URL` | Required | This URL is used to specify the callback address for Auth.js when performing OAuth authentication. Only set it if the default generated redirect address is incorrect. `https://example.com/api/auth` |
63
+
64
+ <Callout type={'tip'}>
65
+ Go to [📘 Environment Variables](/docs/self-hosting/environment-variables/auth#github) for detailed
66
+ information on these variables.
67
+ </Callout>
95
68
  </Steps>
96
69
 
97
70
  <Callout type={'info'}>
@@ -16,78 +16,51 @@ tags:
16
16
  <Steps>
17
17
  ### 创建 Github 提供应用
18
18
 
19
- 点击 [这里](https://github.com/settings/apps/new) 创建一个新的 Github App。
20
-
21
- 填写 Github App name、Homepage URL、Callbak URL
22
-
23
- <Image
24
- alt="创建 Github 提供程序"
25
- inStep
26
- src="https://github.com/lobehub/lobe-chat/assets/64475363/2f919f99-2aaa-4fa7-9938-169d3ed09db7"
27
- />
28
- 按照自己所需设置Webhook回调地址
29
-
30
- <Image
31
- alt="填写其他字段"
32
- inStep
33
- src="https://github.com/lobehub/lobe-chat/assets/64475363/d7ef5ad1-b1a3-435e-b1bc-4436d2b6fecd"
34
- />
35
-
36
- 设置读取邮件地址权限
37
-
38
- <Image
39
- alt="设置所需权限"
40
- inStep
41
- src="https://github.com/lobehub/lobe-chat/assets/64475363/23131ca1-9e84-4a89-a840-ef79c4bc0251"
42
- />
43
- <Image
44
- alt="设置读取邮件地址权限"
45
- inStep
46
- src="https://github.com/lobehub/lobe-chat/assets/64475363/358bca8d-3d82-4e76-9a5e-90d16a39efde"
47
- />
48
-
49
- 设置公开访问还是仅自己访问
50
-
51
- <Image
52
- alt="设置公开访问还是仅自己访问"
53
- inStep
54
- src="https://github.com/lobehub/lobe-chat/assets/64475363/995780cb-9096-4a36-ab17-d422703ab970"
55
- />
56
-
57
- 点击「Create Github App
58
-
59
- 创建成功后,点击「Generate a new client secret」创建客户端Secret
60
-
61
- <Image
62
- alt="创建新的客户端密钥"
63
- inStep
64
- src="https://github.com/lobehub/lobe-chat/assets/64475363/6d69bdca-7d18-4cbc-b3e0-220d8815cd29"
65
- />
66
-
67
- 创建成功后, 将 `客户端 ID` 和 `客户端 Secret` 保存下来。
68
-
69
- <Image
70
- alt="创建新的客户端密钥"
71
- inStep
72
- src="https://github.com/lobehub/lobe-chat/assets/64475363/c6108133-a918-48b0-ab1a-e3fa607572a4"
73
- />
74
-
75
- ### 配置环境变量
76
-
77
- 在部署 LobeChat 时,你需要配置以下环境变量:
78
-
79
- | 环境变量 | 类型 | 描述 |
80
- | --- | --- | --- |
81
- | `NEXT_AUTH_SECRET` | 必选 | 用于加密 Auth.js 会话令牌的密钥。您可以使用以下命令生成秘钥: `openssl rand -base64 32` |
82
- | `NEXT_AUTH_SSO_PROVIDERS` | 必选 | 选择 LoboChat 的单点登录提供商。使用 Github 请填写 `github`。 |
83
- | `AUTH_GITHUB_ID` | 必选 | Github App详情页的 客户端 ID |
84
- | `AUTH_GITHUB_SECRET` | 必选 | Github App详情页的 客户端 Secret |
85
- | `NEXTAUTH_URL` | 必选 | 该 URL 用于指定 Auth.js 在执行 OAuth 验证时的回调地址,当默认生成的重定向地址发生不正确时才需要设置。`https://example.com/api/auth` |
19
+ 点击 [这里](https://github.com/settings/apps/new) 创建一个新的 Github App。
20
+
21
+ 填写 Github App name、Homepage URL、Callbak URL
22
+
23
+ <Image alt="创建 Github 提供程序" inStep src="https://github.com/lobehub/lobe-chat/assets/64475363/2f919f99-2aaa-4fa7-9938-169d3ed09db7" />
24
+
25
+ 按照自己所需设置 Webhook 回调地址
26
+
27
+ <Image alt="填写其他字段" inStep src="https://github.com/lobehub/lobe-chat/assets/64475363/d7ef5ad1-b1a3-435e-b1bc-4436d2b6fecd" />
28
+
29
+ 设置读取邮件地址权限
30
+
31
+ <Image alt="设置所需权限" inStep src="https://github.com/lobehub/lobe-chat/assets/64475363/23131ca1-9e84-4a89-a840-ef79c4bc0251" />
32
+
33
+ <Image alt="设置读取邮件地址权限" inStep src="https://github.com/lobehub/lobe-chat/assets/64475363/358bca8d-3d82-4e76-9a5e-90d16a39efde" />
34
+
35
+ 设置公开访问还是仅自己访问
36
+
37
+ <Image alt="设置公开访问还是仅自己访问" inStep src="https://github.com/lobehub/lobe-chat/assets/64475363/995780cb-9096-4a36-ab17-d422703ab970" />
38
+
39
+ 点击「Create Github App」
40
+
41
+ 创建成功后,点击「Generate a new client secret」创建客户端 Secret
42
+
43
+ <Image alt="创建新的客户端密钥" inStep src="https://github.com/lobehub/lobe-chat/assets/64475363/6d69bdca-7d18-4cbc-b3e0-220d8815cd29" />
44
+
45
+ 创建成功后, 将 `客户端 ID` 和 `客户端 Secret` 保存下来。
46
+
47
+ <Image alt="创建新的客户端密钥" inStep src="https://github.com/lobehub/lobe-chat/assets/64475363/c6108133-a918-48b0-ab1a-e3fa607572a4" />
48
+
49
+ ### 配置环境变量
50
+
51
+ 在部署 LobeChat 时,你需要配置以下环境变量:
52
+
53
+ | 环境变量 | 类型 | 描述 |
54
+ | ------------------------- | -- | ------------------------------------------------------------------------------------------- |
55
+ | `NEXT_AUTH_SECRET` | 必选 | 用于加密 Auth.js 会话令牌的密钥。您可以使用以下命令生成秘钥: `openssl rand -base64 32` |
56
+ | `NEXT_AUTH_SSO_PROVIDERS` | 必选 | 选择 LoboChat 的单点登录提供商。使用 Github 请填写 `github`。 |
57
+ | `AUTH_GITHUB_ID` | 必选 | Github App 详情页的 客户端 ID |
58
+ | `AUTH_GITHUB_SECRET` | 必选 | Github App 详情页的 客户端 Secret |
59
+ | `NEXTAUTH_URL` | 必选 | 该 URL 用于指定 Auth.js 在执行 OAuth 验证时的回调地址,当默认生成的重定向地址发生不正确时才需要设置。`https://example.com/api/auth` |
86
60
 
87
61
  <Callout type={'tip'}>
88
62
  前往 [📘 环境变量](/zh/docs/self-hosting/environment-variables/auth#github) 可查阅相关变量详情。
89
-
90
- </Callout>
63
+ </Callout>
91
64
  </Steps>
92
65
 
93
- <Callout type={'info'}>部署成功后,用户将可以通过Github身份认证并使用 LobeChat。</Callout>
66
+ <Callout type={'info'}>部署成功后,用户将可以通过 Github 身份认证并使用 LobeChat。</Callout>
@@ -31,52 +31,43 @@ If you are using Logto Cloud, assume its endpoint domain is `https://example.log
31
31
  <Steps>
32
32
  ### Create Logto Application
33
33
 
34
- Access your privately deployed Logto WebUI or [Logto Cloud](http://cloud.logto.io/) to enter the console, and create a `Next.js (App Router)` application under `Applications` with any name.
34
+ Access your privately deployed Logto WebUI or [Logto Cloud](http://cloud.logto.io/) to enter the console, and create a `Next.js (App Router)` application under `Applications` with any name.
35
35
 
36
- ### Configure Logto
36
+ ### Configure Logto
37
37
 
38
- Set the `Redirect URI` to `https://lobe.example.com/api/auth/callback/logto` and the `Post sign-out redirect URI` to `https://lobe.example.com/`.
38
+ Set the `Redirect URI` to `https://lobe.example.com/api/auth/callback/logto` and the `Post sign-out redirect URI` to `https://lobe.example.com/`.
39
39
 
40
- Set `CORS allowed origins` to `https://lobe.example.com`.
40
+ Set `CORS allowed origins` to `https://lobe.example.com`.
41
41
 
42
- <Image
43
- alt="Configure Logto"
44
- inStep
45
- src="https://github.com/user-attachments/assets/5b816379-c07b-40ea-bde4-df16e2e4e523"
46
- />
42
+ <Image alt="Configure Logto" inStep src="https://github.com/user-attachments/assets/5b816379-c07b-40ea-bde4-df16e2e4e523" />
47
43
 
48
- After successful creation, save the `Client ID` and `Client Secret`.
44
+ After successful creation, save the `Client ID` and `Client Secret`.
49
45
 
50
- ### Configure Environment Variables
46
+ ### Configure Environment Variables
51
47
 
52
- <Image
53
- alt="Configure Environment Variables"
54
- inStep
55
- src="https://github.com/user-attachments/assets/15af6d94-af4f-4aa9-bbab-7a46e9f9e837"
56
- />
48
+ <Image alt="Configure Environment Variables" inStep src="https://github.com/user-attachments/assets/15af6d94-af4f-4aa9-bbab-7a46e9f9e837" />
57
49
 
58
- Set the obtained `Client ID` and `Client Secret` as `AUTH_LOGTO_ID` and `AUTH_LOGTO_SECRET` in the LobeChat environment variables.
50
+ Set the obtained `Client ID` and `Client Secret` as `AUTH_LOGTO_ID` and `AUTH_LOGTO_SECRET` in the LobeChat environment variables.
59
51
 
60
- Configure `AUTH_LOGTO_ISSUER` in the LobeChat environment variables as follows:
52
+ Configure `AUTH_LOGTO_ISSUER` in the LobeChat environment variables as follows:
61
53
 
62
- - `https://lobe-auth-api.example.com/oidc` if you are using a privately deployed Logto
63
- - `https://example.logto.app/oidc` if you are using Logto Cloud
54
+ - `https://lobe-auth-api.example.com/oidc` if you are using a privately deployed Logto
55
+ - `https://example.logto.app/oidc` if you are using Logto Cloud
64
56
 
65
- When deploying LobeChat, you need to configure the following environment variables:
57
+ When deploying LobeChat, you need to configure the following environment variables:
66
58
 
67
- | Environment Variable | Type | Description |
68
- | --- | --- | --- |
69
- | `NEXT_AUTH_SECRET` | Required | The key used to encrypt Auth.js session tokens. You can generate a key using the command: `openssl rand -base64 32` |
70
- | `NEXT_AUTH_SSO_PROVIDERS` | Required | Select the single sign-on provider for LobeChat. For Logto, enter `logto`. |
71
- | `AUTH_LOGTO_ID` | Required | The Client ID from the Logto App details page |
72
- | `AUTH_LOGTO_SECRET` | Required | The Client Secret from the Logto App details page |
73
- | `AUTH_LOGTO_ISSUER` | Required | OpenID Connect issuer of the Logto provider |
74
- | `NEXTAUTH_URL` | Required | This URL specifies the callback address for Auth.js during OAuth verification, needed only if the default generated redirect address is incorrect. `https://lobe.example.com/api/auth` |
59
+ | Environment Variable | Type | Description |
60
+ | ------------------------- | -------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
61
+ | `NEXT_AUTH_SECRET` | Required | The key used to encrypt Auth.js session tokens. You can generate a key using the command: `openssl rand -base64 32` |
62
+ | `NEXT_AUTH_SSO_PROVIDERS` | Required | Select the single sign-on provider for LobeChat. For Logto, enter `logto`. |
63
+ | `AUTH_LOGTO_ID` | Required | The Client ID from the Logto App details page |
64
+ | `AUTH_LOGTO_SECRET` | Required | The Client Secret from the Logto App details page |
65
+ | `AUTH_LOGTO_ISSUER` | Required | OpenID Connect issuer of the Logto provider |
66
+ | `NEXTAUTH_URL` | Required | This URL specifies the callback address for Auth.js during OAuth verification, needed only if the default generated redirect address is incorrect. `https://lobe.example.com/api/auth` |
75
67
 
76
68
  <Callout type={'tip'}>
77
69
  Visit [📘 Environment Variables](/docs/self-hosting/environment-variables/auth#logto) for details on related variables.
78
-
79
- </Callout>
70
+ </Callout>
80
71
  </Steps>
81
72
 
82
73
  ### Troubleshooting
@@ -84,22 +75,22 @@ When deploying LobeChat, you need to configure the following environment variabl
84
75
  If you encounter issues during the Logto deployment process, refer to the following common problems:
85
76
 
86
77
  - `Only roles with the xxx attribute may create roles`:
87
- Check your database user's permissions and ensure that the user in your Logto database has the `admin` role to create roles.
78
+ Check your database user's permissions and ensure that the user in your Logto database has the `admin` role to create roles.
88
79
 
89
80
  - Error executing `logto db seed` on third-party databases like `Neon`:
90
- Try using the `logto db seed --encrypt-base-role` command.
81
+ Try using the `logto db seed --encrypt-base-role` command.
91
82
 
92
83
  - Database seeding failed:
93
- Try skipping the seeding process with the `--skip-seed` parameter.
84
+ Try skipping the seeding process with the `--skip-seed` parameter.
94
85
 
95
86
  - `Error: role xxx already exists`:
96
- Delete the existing role in the database.
87
+ Delete the existing role in the database.
97
88
 
98
89
  - Database migration failed after a version upgrade:
99
- Try using the command `npx @logto/cli db alteration deploy $version` (e.g., `npx @logto/cli db alteration deploy 1.22.0`).
90
+ Try using the command `npx @logto/cli db alteration deploy $version` (e.g., `npx @logto/cli db alteration deploy 1.22.0`).
100
91
 
101
92
  - I am using Docker deployment and want a one-click upgrade:
102
- Execute the custom command in the container: `sh -c "npm run cli db seed -- --swe --encrypt-base-role" && npx @logto/cli db alteration deploy $version && npm start`
93
+ Execute the custom command in the container: `sh -c "npm run cli db seed -- --swe --encrypt-base-role" && npx @logto/cli db alteration deploy $version && npm start`
103
94
 
104
95
  <Callout type={'info'}>
105
96
  After successful deployment, users will be able to authenticate via Logto and use LobeChat.
@@ -28,52 +28,43 @@ tags:
28
28
  <Steps>
29
29
  ### 创建 Logto 应用
30
30
 
31
- 访问你私有部署的 Logto WebUI 或者 [Logto Cloud](http://cloud.logto.io/) 进入控制台,在 `Applications` 里创建一个 `Next.js (App Router)` 应用,名称随意
31
+ 访问你私有部署的 Logto WebUI 或者 [Logto Cloud](http://cloud.logto.io/) 进入控制台,在 `Applications` 里创建一个 `Next.js (App Router)` 应用,名称随意
32
32
 
33
- ### 配置 Logto
33
+ ### 配置 Logto
34
34
 
35
- 配置 `Redirect URI` 为 `https://lobe.example.com/api/auth/callback/logto`,`Post sign-out redirect URI` 为 `https://lobe.example.com/`
35
+ 配置 `Redirect URI` 为 `https://lobe.example.com/api/auth/callback/logto`,`Post sign-out redirect URI` 为 `https://lobe.example.com/`
36
36
 
37
- 配置 `CORS allowed origins` 为 `https://lobe.example.com`
37
+ 配置 `CORS allowed origins` 为 `https://lobe.example.com`
38
38
 
39
- <Image
40
- alt="配置 Logto"
41
- inStep
42
- src="https://github.com/user-attachments/assets/5b816379-c07b-40ea-bde4-df16e2e4e523"
43
- />
39
+ <Image alt="配置 Logto" inStep src="https://github.com/user-attachments/assets/5b816379-c07b-40ea-bde4-df16e2e4e523" />
44
40
 
45
- 创建成功后, 将 `Client ID` 和 `Client Secret` 保存下来。
41
+ 创建成功后, 将 `Client ID` 和 `Client Secret` 保存下来。
46
42
 
47
- ### 配置环境变量
43
+ ### 配置环境变量
48
44
 
49
- <Image
50
- alt="配置环境变量"
51
- inStep
52
- src="https://github.com/user-attachments/assets/15af6d94-af4f-4aa9-bbab-7a46e9f9e837"
53
- />
45
+ <Image alt="配置环境变量" inStep src="https://github.com/user-attachments/assets/15af6d94-af4f-4aa9-bbab-7a46e9f9e837" />
54
46
 
55
- 将获取到的 `Client ID` 和 `Client Secret`,设为 LobeChat 环境变量中的 `AUTH_LOGTO_ID` 和 `AUTH_LOGTO_SECRET`。
47
+ 将获取到的 `Client ID` 和 `Client Secret`,设为 LobeChat 环境变量中的 `AUTH_LOGTO_ID` 和 `AUTH_LOGTO_SECRET`。
56
48
 
57
- 配置 LobeChat 环境变量中 `AUTH_LOGTO_ISSUER` 为:
49
+ 配置 LobeChat 环境变量中 `AUTH_LOGTO_ISSUER` 为:
58
50
 
59
- - `https://lobe-auth-api.example.com/oidc`,若你是私有部署的 Logto
60
- - `https://example.logto.app/oidc`,若你是使用的 Logto Cloud
51
+ - `https://lobe-auth-api.example.com/oidc`,若你是私有部署的 Logto
52
+ - `https://example.logto.app/oidc`,若你是使用的 Logto Cloud
61
53
 
62
- 在部署 LobeChat 时,你需要配置以下环境变量:
54
+ 在部署 LobeChat 时,你需要配置以下环境变量:
63
55
 
64
- | 环境变量 | 类型 | 描述 |
65
- | --- | --- | --- |
66
- | `NEXT_AUTH_SECRET` | 必选 | 用于加密 Auth.js 会话令牌的密钥。您可以使用以下命令生成秘钥: `openssl rand -base64 32` |
67
- | `NEXT_AUTH_SSO_PROVIDERS` | 必选 | 选择 LoboChat 的单点登录提供商。使用 Logto 请填写 `logto`。 |
68
- | `AUTH_LOGTO_ID` | 必选 | Logto App 详情页的 Client ID |
69
- | `AUTH_LOGTO_SECRET` | 必选 | Logto App 详情页的 Client Secret |
70
- | `AUTH_LOGTO_ISSUER` | 必选 | Logto 提供程序的 OpenID Connect 颁发者 |
71
- | `NEXTAUTH_URL` | 必选 | 该 URL 用于指定 Auth.js 在执行 OAuth 验证时的回调地址,当默认生成的重定向地址发生不正确时才需要设置。`https://lobe.example.com/api/auth` |
56
+ | 环境变量 | 类型 | 描述 |
57
+ | ------------------------- | -- | ------------------------------------------------------------------------------------------------ |
58
+ | `NEXT_AUTH_SECRET` | 必选 | 用于加密 Auth.js 会话令牌的密钥。您可以使用以下命令生成秘钥: `openssl rand -base64 32` |
59
+ | `NEXT_AUTH_SSO_PROVIDERS` | 必选 | 选择 LoboChat 的单点登录提供商。使用 Logto 请填写 `logto`。 |
60
+ | `AUTH_LOGTO_ID` | 必选 | Logto App 详情页的 Client ID |
61
+ | `AUTH_LOGTO_SECRET` | 必选 | Logto App 详情页的 Client Secret |
62
+ | `AUTH_LOGTO_ISSUER` | 必选 | Logto 提供程序的 OpenID Connect 颁发者 |
63
+ | `NEXTAUTH_URL` | 必选 | 该 URL 用于指定 Auth.js 在执行 OAuth 验证时的回调地址,当默认生成的重定向地址发生不正确时才需要设置。`https://lobe.example.com/api/auth` |
72
64
 
73
65
  <Callout type={'tip'}>
74
66
  前往 [📘 环境变量](/zh/docs/self-hosting/environment-variables/auth#logto) 可查阅相关变量详情。
75
-
76
- </Callout>
67
+ </Callout>
77
68
  </Steps>
78
69
 
79
70
  ### 故障排除
@@ -81,21 +72,21 @@ tags:
81
72
  若你在部署 Logto 过程中遇到问题,可以参考以下常见问题:
82
73
 
83
74
  - `Only roles with the xxx attribute may create roles`:
84
- 请检查你的数据库用户权限,确保你的 Logto 数据库中的用户具有 `admin` 角色,以便创建角色。
75
+ 请检查你的数据库用户权限,确保你的 Logto 数据库中的用户具有 `admin` 角色,以便创建角色。
85
76
 
86
77
  - 在第三方数据库例如 `Neon` 上执行`logto db seed`出错:
87
- 尝试使用`logto db seed --encrypt-base-role`命令。
78
+ 尝试使用`logto db seed --encrypt-base-role`命令。
88
79
 
89
80
  - 数据库播种失败:
90
- 请尝试使用`--skip-seed`参数跳过播种。
81
+ 请尝试使用`--skip-seed`参数跳过播种。
91
82
 
92
83
  - `Error: role xxx already exists`:
93
- 在数据库中删除已存在的角色即可。
84
+ 在数据库中删除已存在的角色即可。
94
85
 
95
86
  - 版本升级后,数据库迁移失败:
96
- 请尝试使用` npx @logto/cli db alteration deploy $version`命令(例如`npx @logto/cli db alteration deploy 1.22.0`)
87
+ 请尝试使用` npx @logto/cli db alteration deploy $version`命令 (例如`npx @logto/cli db alteration deploy 1.22.0`)
97
88
 
98
89
  - 我使用 docker 部署 希望一键升级:
99
- 在容器中执行自定义命令:`sh -c "npm run cli db seed -- --swe --encrypt-base-role" && npx @logto/cli db alteration deploy $version && npm start`
90
+ 在容器中执行自定义命令:`sh -c "npm run cli db seed -- --swe --encrypt-base-role" && npx @logto/cli db alteration deploy $version && npm start`
100
91
 
101
92
  <Callout type={'info'}>部署成功后,用户将可以通过 Logto 身份认证并使用 LobeChat。</Callout>
@@ -18,72 +18,59 @@ tags:
18
18
  <Steps>
19
19
  ### Create a Microsoft Entra ID Application
20
20
 
21
- In your [Microsoft Azure Portal][microsoft-azure-portal], go to Microsoft Entra ID -> App registrations -> New registration to create a new application.
21
+ In your [Microsoft Azure Portal][microsoft-azure-portal], go to Microsoft Entra ID -> App registrations -> New registration to create a new application.
22
22
 
23
- Fill in the desired application name to be displayed to organizational users, choose the account types you wish to support, and if only internal users are supported, select `Accounts in this organizational directory only (Default Directory only - Single tenant)`.
23
+ Fill in the desired application name to be displayed to organizational users, choose the account types you wish to support, and if only internal users are supported, select `Accounts in this organizational directory only (Default Directory only - Single tenant)`.
24
24
 
25
- In the `Redirect URI (optional)` section, for the application type, select `Web`, and in the Callback URL, enter:
25
+ In the `Redirect URI (optional)` section, for the application type, select `Web`, and in the Callback URL, enter:
26
26
 
27
- ```bash
28
- https://your-domain/api/auth/callback/microsoft-entra-id
29
- ```
27
+ ```bash
28
+ https://your-domain/api/auth/callback/microsoft-entra-id
29
+ ```
30
30
 
31
- <Callout type={'info'}>
32
- - You can fill in or modify the Redirect URIs after registering, but make sure the URL you enter
33
- matches the deployed URL. - Please replace "your-domain" with your own domain.
34
- </Callout>
35
-
36
- <Image
37
- alt="App Register"
38
- inStep
39
- src="https://github.com/lobehub/lobe-chat/assets/13883964/4f9d83bd-b3fc-4abc-bcf4-ccbad65c219d"
40
- />
31
+ <Callout type={'info'}>
32
+ - You can fill in or modify the Redirect URIs after registering, but make sure the URL you enter
33
+ matches the deployed URL. - Please replace "your-domain" with your own domain.
34
+ </Callout>
41
35
 
42
- Click on "Register".
36
+ <Image alt="App Register" inStep src="https://github.com/lobehub/lobe-chat/assets/13883964/4f9d83bd-b3fc-4abc-bcf4-ccbad65c219d" />
43
37
 
44
- After successfully creating the application, click on the corresponding application to enter the application details page, and switch to the "Overview" tab to view the corresponding configuration information.
38
+ Click on "Register".
45
39
 
46
- <Image
47
- alt="App Overview"
48
- inStep
49
- src="https://github.com/lobehub/lobe-chat/assets/13883964/48a0b702-05bd-4ce4-a007-a8ad00a36e5a"
50
- />
40
+ After successfully creating the application, click on the corresponding application to enter the application details page, and switch to the "Overview" tab to view the corresponding configuration information.
51
41
 
52
- Go to "Certificates & secrets", select the "Client secrets" tab, click on "New client secret", fill in the description, select the expiration time, and click on "Add" to create a new client secret.
42
+ <Image alt="App Overview" inStep src="https://github.com/lobehub/lobe-chat/assets/13883964/48a0b702-05bd-4ce4-a007-a8ad00a36e5a" />
53
43
 
54
- <Image
55
- alt="Create App Client Secret"
56
- inStep
57
- src="https://github.com/lobehub/lobe-chat/assets/13883964/c9d66fa0-158c-4bd3-a1fa-969e638259d2"
58
- />
44
+ Go to "Certificates & secrets", select the "Client secrets" tab, click on "New client secret", fill in the description, select the expiration time, and click on "Add" to create a new client secret.
59
45
 
60
- <Callout type={'important'}>
61
- Please make sure to save your client secret as this is your only chance to view it.
62
- </Callout>
46
+ <Image alt="Create App Client Secret" inStep src="https://github.com/lobehub/lobe-chat/assets/13883964/c9d66fa0-158c-4bd3-a1fa-969e638259d2" />
63
47
 
64
- ### Add Users
48
+ <Callout type={'important'}>
49
+ Please make sure to save your client secret as this is your only chance to view it.
50
+ </Callout>
65
51
 
66
- Go back to the "Microsoft Entra ID" interface, enter "Users", click on "New user", fill in the user information, and click on "Create" to create a user for using LobeChat.
52
+ ### Add Users
67
53
 
68
- ### Configure Environment Variables
54
+ Go back to the "Microsoft Entra ID" interface, enter "Users", click on "New user", fill in the user information, and click on "Create" to create a user for using LobeChat.
69
55
 
70
- When deploying LobeChat, you need to configure the following environment variables:
56
+ ### Configure Environment Variables
71
57
 
72
- | Environment Variable | Type | Description |
73
- | --- | --- | --- |
74
- | `NEXT_AUTH_SECRET` | Required | Key used to encrypt Auth.js session tokens. You can generate the key using the following command: `openssl rand -base64 32` |
75
- | `NEXT_AUTH_SSO_PROVIDERS` | Required | Select the single sign-on provider for LoboChat. Use `microsoft-entra-id` for Microsoft Entra ID. |
76
- | `AUTH_MICROSOFT_ENTRA_ID_ID` | Required | Client ID of the Microsoft Entra ID application. |
77
- | `AUTH_MICROSOFT_ENTRA_ID_SECRET` | Required | Client Secret of the Microsoft Entra ID application. |
78
- | `AUTH_MICROSOFT_ENTRA_ID_TENANT_ID` | Required | Tenant ID of the Microsoft Entra ID application. |
79
- | `NEXTAUTH_URL` | Required | This URL is used to specify the callback address for Auth.js when performing OAuth authentication. It is only necessary to set it when the default generated redirect address is incorrect. `https://example.com/api/auth` |
58
+ When deploying LobeChat, you need to configure the following environment variables:
80
59
 
81
- <Callout type={'tip'}>
82
- You can refer to [📘 environment
83
- variables](/docs/self-hosting/environment-variable#microsoft-entra-id) for details on related
84
- variables.
85
- </Callout>
60
+ | Environment Variable | Type | Description |
61
+ | ----------------------------------- | -------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
62
+ | `NEXT_AUTH_SECRET` | Required | Key used to encrypt Auth.js session tokens. You can generate the key using the following command: `openssl rand -base64 32` |
63
+ | `NEXT_AUTH_SSO_PROVIDERS` | Required | Select the single sign-on provider for LoboChat. Use `microsoft-entra-id` for Microsoft Entra ID. |
64
+ | `AUTH_MICROSOFT_ENTRA_ID_ID` | Required | Client ID of the Microsoft Entra ID application. |
65
+ | `AUTH_MICROSOFT_ENTRA_ID_SECRET` | Required | Client Secret of the Microsoft Entra ID application. |
66
+ | `AUTH_MICROSOFT_ENTRA_ID_TENANT_ID` | Required | Tenant ID of the Microsoft Entra ID application. |
67
+ | `NEXTAUTH_URL` | Required | This URL is used to specify the callback address for Auth.js when performing OAuth authentication. It is only necessary to set it when the default generated redirect address is incorrect. `https://example.com/api/auth` |
86
68
 
69
+ <Callout type={'tip'}>
70
+ You can refer to [📘 environment
71
+ variables](/docs/self-hosting/environment-variable#microsoft-entra-id) for details on related
72
+ variables.
73
+ </Callout>
87
74
  </Steps>
88
75
 
89
76
  <Callout>