@lobehub/chat 0.81.0 → 0.82.2

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 (83) hide show
  1. package/CHANGELOG.md +75 -0
  2. package/README.md +22 -6
  3. package/README.zh-CN.md +21 -5
  4. package/docs/Environment-Variable.md +45 -9
  5. package/docs/Environment-Variable.zh-CN.md +3 -6
  6. package/locales/en_US/common.json +13 -1
  7. package/locales/ru_RU/common.json +13 -1
  8. package/locales/zh_CN/common.json +13 -1
  9. package/locales/zh_TW/common.json +13 -1
  10. package/package.json +6 -3
  11. package/public/images/screenshot_background.webp +0 -0
  12. package/public/manifest.json +2 -16
  13. package/src/app/chat/features/Conversation/ChatList/Error/InvalidAccess.tsx +16 -6
  14. package/src/app/chat/features/Header/Mobile.tsx +12 -7
  15. package/src/app/chat/features/Header/ShareButton/Inner.tsx +114 -14
  16. package/src/app/chat/features/Header/ShareButton/Preview.tsx +140 -0
  17. package/src/app/chat/features/Header/ShareButton/index.tsx +12 -2
  18. package/src/app/chat/features/Header/ShareButton/style.ts +71 -0
  19. package/src/app/chat/features/SessionList/Header/Desktop.tsx +2 -4
  20. package/src/app/chat/features/SessionList/Header/Mobile.tsx +15 -14
  21. package/src/app/chat/features/Sidebar/Mobile.tsx +3 -17
  22. package/src/app/chat/layout.desktop.tsx +2 -1
  23. package/src/app/chat/layout.mobile.tsx +2 -1
  24. package/src/app/chat/settings/features/Header/index.tsx +3 -3
  25. package/src/app/chat/settings/layout.mobile.tsx +1 -8
  26. package/src/app/market/features/AgentCard/AgentCardBanner.tsx +2 -1
  27. package/src/app/market/features/Header/Mobile.tsx +2 -21
  28. package/src/app/market/features/SideBar/AgentInfo/Header.tsx +2 -1
  29. package/src/app/market/features/SideBar/AgentInfo/index.tsx +10 -2
  30. package/src/app/market/features/SideBar/Mobile.tsx +3 -17
  31. package/src/app/market/layout.desktop.tsx +2 -1
  32. package/src/app/market/layout.mobile.tsx +2 -1
  33. package/src/app/settings/agent/index.tsx +20 -0
  34. package/src/app/settings/agent/page.tsx +7 -0
  35. package/src/app/settings/{features/Settings → common}/Common.tsx +1 -1
  36. package/src/app/settings/common/index.tsx +20 -0
  37. package/src/app/settings/common/page.tsx +7 -0
  38. package/src/app/settings/features/Header/Desktop.tsx +9 -2
  39. package/src/app/settings/features/Header/Mobile.tsx +5 -2
  40. package/src/app/settings/features/SideBar/Item.tsx +39 -0
  41. package/src/app/settings/features/SideBar/List.tsx +30 -0
  42. package/src/app/settings/features/SideBar/index.tsx +38 -0
  43. package/src/app/settings/index.tsx +5 -7
  44. package/src/app/settings/layout.desktop.tsx +6 -2
  45. package/src/app/settings/layout.mobile.tsx +1 -3
  46. package/src/app/settings/{features/Settings → llm}/LLM/index.tsx +4 -2
  47. package/src/app/settings/llm/index.tsx +20 -0
  48. package/src/app/settings/llm/page.tsx +7 -0
  49. package/src/app/settings/mobile/ExtraList.tsx +61 -0
  50. package/src/app/settings/mobile/index.tsx +43 -0
  51. package/src/app/settings/mobile/page.tsx +7 -0
  52. package/src/app/settings/page.tsx +1 -7
  53. package/src/components/MobilePadding/index.tsx +32 -0
  54. package/src/const/layoutTokens.ts +1 -0
  55. package/src/features/AgentSetting/AgentMeta/index.tsx +0 -1
  56. package/src/features/AgentSetting/AgentPlugin/MarketSettingModal.tsx +29 -16
  57. package/src/features/AvatarWithUpload/index.tsx +23 -45
  58. package/src/features/MobileTabBar/index.tsx +15 -3
  59. package/src/features/PluginDevModal/PluginPreview.tsx +11 -4
  60. package/src/features/PluginDevModal/index.tsx +14 -10
  61. package/src/features/SideBar/BottomActions.tsx +3 -3
  62. package/src/features/SideBar/TopActions.tsx +5 -4
  63. package/src/features/SideBar/index.tsx +1 -1
  64. package/src/locales/create.ts +5 -3
  65. package/src/locales/default/common.ts +13 -1
  66. package/src/locales/default/plugin.ts +2 -1
  67. package/src/services/shareGPT.ts +11 -1
  68. package/src/store/global/hooks/useSwitchSettingsOnInit.ts +9 -0
  69. package/src/store/global/initialState.ts +13 -4
  70. package/src/store/global/store.ts +0 -4
  71. package/src/store/session/slices/chat/actions/share.ts +73 -39
  72. package/src/styles/antdOverride.ts +2 -26
  73. package/src/styles/global.ts +9 -0
  74. package/src/utils/imageToBase64.ts +37 -0
  75. package/src/utils/parseMarkdown.ts +9 -0
  76. package/public/icons/icon-maskable-192x192.png +0 -0
  77. package/public/icons/icon-maskable-512x512.png +0 -0
  78. package/src/app/settings/features/Banner/index.tsx +0 -94
  79. package/src/app/settings/features/Settings/index.tsx +0 -53
  80. /package/src/app/settings/{features/Settings → agent}/Agent.tsx +0 -0
  81. /package/src/app/settings/{features/Settings → llm}/LLM/Checker.tsx +0 -0
  82. /package/src/app/settings/{features/Settings → llm}/LLM/ModelList.tsx +0 -0
  83. /package/src/app/settings/{features/Settings → llm}/LLM/getModelList.ts +0 -0
package/CHANGELOG.md CHANGED
@@ -2,6 +2,81 @@
2
2
 
3
3
  # Changelog
4
4
 
5
+ ### [Version 0.82.2](https://github.com/lobehub/lobe-chat/compare/v0.82.1...v0.82.2)
6
+
7
+ <sup>Released on **2023-09-28**</sup>
8
+
9
+ #### ♻ Code Refactoring
10
+
11
+ - **misc**: Refactor settings page and mobile ux.
12
+
13
+ <br/>
14
+
15
+ <details>
16
+ <summary><kbd>Improvements and Fixes</kbd></summary>
17
+
18
+ #### Code refactoring
19
+
20
+ - **misc**: Refactor settings page and mobile ux ([89c5648](https://github.com/lobehub/lobe-chat/commit/89c5648))
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 0.82.1](https://github.com/lobehub/lobe-chat/compare/v0.82.0...v0.82.1)
31
+
32
+ <sup>Released on **2023-09-27**</sup>
33
+
34
+ #### 🐛 Bug Fixes
35
+
36
+ - **misc**: Fix share screenshot scrollbar.
37
+
38
+ <br/>
39
+
40
+ <details>
41
+ <summary><kbd>Improvements and Fixes</kbd></summary>
42
+
43
+ #### What's fixed
44
+
45
+ - **misc**: Fix share screenshot scrollbar ([244b3b4](https://github.com/lobehub/lobe-chat/commit/244b3b4))
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
+
55
+ ## [Version 0.82.0](https://github.com/lobehub/lobe-chat/compare/v0.81.0...v0.82.0)
56
+
57
+ <sup>Released on **2023-09-27**</sup>
58
+
59
+ #### ✨ Features
60
+
61
+ - **share**: Add screenshot.
62
+
63
+ <br/>
64
+
65
+ <details>
66
+ <summary><kbd>Improvements and Fixes</kbd></summary>
67
+
68
+ #### What's improved
69
+
70
+ - **share**: Add screenshot, closes [#152](https://github.com/lobehub/lobe-chat/issues/152) ([f5d21f4](https://github.com/lobehub/lobe-chat/commit/f5d21f4))
71
+
72
+ </details>
73
+
74
+ <div align="right">
75
+
76
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top)
77
+
78
+ </div>
79
+
5
80
  ## [Version 0.81.0](https://github.com/lobehub/lobe-chat/compare/v0.80.2...v0.81.0)
6
81
 
7
82
  <sup>Released on **2023-09-27**</sup>
package/README.md CHANGED
@@ -26,7 +26,13 @@ LobeChat is a open-source, extensible ([Function Calling][fc-link]), high-perfor
26
26
  [![][github-issues-shield]][github-issues-link]
27
27
  [![][github-license-shield]][github-license-link]
28
28
 
29
- [![Deploy with Vercel][deploy-button-image]][deploy-link]
29
+ **Share LobeChat Repository**
30
+
31
+ [![][share-x-shield]][share-x-link]
32
+ [![][share-telegram-shield]][share-telegram-link]
33
+ [![][share-whatsapp-shield]][share-whatsapp-link]
34
+ [![][share-reddit-shield]][share-reddit-link]
35
+ [![][share-weibo-shield]][share-weibo-link]
30
36
 
31
37
  ![](https://gw.alipayobjects.com/zos/kitchen/RKnWrrfuMl/welcome.webp)
32
38
 
@@ -70,7 +76,7 @@ Please be aware that LobeChat is currently under active development,feedback i
70
76
  <details><summary><kbd>Star History</kbd></summary>
71
77
  <picture>
72
78
  <source media="(prefers-color-scheme: dark)" srcset="https://api.star-history.com/svg?repos=lobehub%2Flobe-chat&theme=dark&type=Date">
73
- <img src="https://api.star-history.com/svg?repos=lobehub%2Flobe-chat&type=Date">
79
+ <img width="100%" src="https://api.star-history.com/svg?repos=lobehub%2Flobe-chat&type=Date">
74
80
  </picture>
75
81
  </details>
76
82
 
@@ -138,7 +144,7 @@ LobeChat offers two unique theme modes - Light Mode and Dark Mode, as well as ri
138
144
 
139
145
  #### `5` Mobile Device Adaptation
140
146
 
141
- We have carried out a series of optimization designs for mobile devices to enhance the user's mobile experience. Currently, we are iterating on the mobile user experience to achieve smoother and more intuitive interactions. If you have any suggestions or ideas, we welcome you to provide feedback through Github Issues or Pull Requests.
147
+ We have carried out a series of optimization designs for mobile devices to enhance the user's mobile experience. Currently, we are iterating on the mobile user experience to achieve smoother and more intuitive interactions. If you have any suggestions or ideas, we welcome you to provide feedback through GitHub Issues or Pull Requests.
142
148
 
143
149
  > 🚧 Additional snapshots and demonstrations are being progressively added...
144
150
 
@@ -153,11 +159,11 @@ We have carried out a series of optimization designs for mobile devices to enhan
153
159
  LobeChat provides a [self-hosted version][deploy-link] with Vercel. This allows you to build your own chatbot within a few minutes, without any prior knowledge. If you want to deploy this service yourself, you can follow these steps:
154
160
 
155
161
  - Prepare your [OpenAI API Key](https://platform.openai.com/account/api-keys).
156
- - Click the button below to start deployment: Deploy with Vercel. Log in directly with your Github account and remember to fill in the API Key and access code CODE on the environment variable page;
162
+ - Click the button below to start deployment: Deploy with Vercel. Log in directly with your GitHub account and remember to fill in the API Key and access code CODE on the environment variable page;
157
163
  - After deployment, you can start using it;
158
164
  - 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.
159
165
 
160
- <div align="right">
166
+ <div align="center">
161
167
 
162
168
  [![][deploy-button-image]][deploy-link]
163
169
 
@@ -226,7 +232,7 @@ Plugins provide a means to extend the [Function Calling][fc-link] capabilities o
226
232
 
227
233
  ## ⌨️ Local Development
228
234
 
229
- You can use Github Codespaces for online development:
235
+ You can use GitHub Codespaces for online development:
230
236
 
231
237
  [![][codespaces-shield]][codespaces-link]
232
238
 
@@ -344,6 +350,16 @@ This project is [MIT](./LICENSE) licensed.
344
350
  [pr-welcome-link]: https://github.com/lobehub/lobe-chat/pulls
345
351
  [pr-welcome-shield]: https://img.shields.io/badge/🤯_pr_welcome-%E2%86%92-ffcb47?labelColor=black&style=for-the-badge
346
352
  [profile-link]: https://github.com/lobehub
353
+ [share-reddit-link]: https://www.reddit.com/submit?title=Check%20this%20GitHub%20repository%20out%20%F0%9F%A4%AF%20LobeChat%20-%20An%20open-source%2C%20extensible%20%28Function%20Calling%29%2C%20high-performance%20chatbot%20framework.%20It%20supports%20one-click%20free%20deployment%20of%20your%20private%20ChatGPT%2FLLM%20web%20application.%20%23chatbot%20%23chatGPT%20%23openAI&url=https%3A%2F%2Fgithub.com%2Flobehub%2Flobe-chat
354
+ [share-reddit-shield]: https://img.shields.io/badge/-share%20on%20reddit-black?labelColor=black&logo=reddit&logoColor=white&style=flat-square
355
+ [share-telegram-link]: https://t.me/share/url"?text=Check%20this%20GitHub%20repository%20out%20%F0%9F%A4%AF%20LobeChat%20-%20An%20open-source%2C%20extensible%20%28Function%20Calling%29%2C%20high-performance%20chatbot%20framework.%20It%20supports%20one-click%20free%20deployment%20of%20your%20private%20ChatGPT%2FLLM%20web%20application.%20%23chatbot%20%23chatGPT%20%23openAI&url=https%3A%2F%2Fgithub.com%2Flobehub%2Flobe-chat
356
+ [share-telegram-shield]: https://img.shields.io/badge/-share%20on%20telegram-black?labelColor=black&logo=telegram&logoColor=white&style=flat-square
357
+ [share-weibo-link]: http://service.weibo.com/share/share.php?sharesource=weibo&title=Check%20this%20GitHub%20repository%20out%20%F0%9F%A4%AF%20LobeChat%20-%20An%20open-source%2C%20extensible%20%28Function%20Calling%29%2C%20high-performance%20chatbot%20framework.%20It%20supports%20one-click%20free%20deployment%20of%20your%20private%20ChatGPT%2FLLM%20web%20application.%20%23chatbot%20%23chatGPT%20%23openAI&url=https%3A%2F%2Fgithub.com%2Flobehub%2Flobe-chat
358
+ [share-weibo-shield]: https://img.shields.io/badge/-share%20on%20weibo-black?labelColor=black&logo=sinaweibo&logoColor=white&style=flat-square
359
+ [share-whatsapp-link]: https://api.whatsapp.com/send?text=Check%20this%20GitHub%20repository%20out%20%F0%9F%A4%AF%20LobeChat%20-%20An%20open-source%2C%20extensible%20%28Function%20Calling%29%2C%20high-performance%20chatbot%20framework.%20It%20supports%20one-click%20free%20deployment%20of%20your%20private%20ChatGPT%2FLLM%20web%20application.%20https%3A%2F%2Fgithub.com%2Flobehub%2Flobe-chat%20%23chatbot%20%23chatGPT%20%23openAI
360
+ [share-whatsapp-shield]: https://img.shields.io/badge/-share%20on%20whatsapp-black?labelColor=black&logo=whatsapp&logoColor=white&style=flat-square
361
+ [share-x-link]: https://x.com/intent/tweet?hashtags=chatbot%2CchatGPT%2CopenAI&text=Check%20this%20GitHub%20repository%20out%20%F0%9F%A4%AF%20LobeChat%20-%20An%20open-source%2C%20extensible%20%28Function%20Calling%29%2C%20high-performance%20chatbot%20framework.%20It%20supports%20one-click%20free%20deployment%20of%20your%20private%20ChatGPT%2FLLM%20web%20application.&url=https%3A%2F%2Fgithub.com%2Flobehub%2Flobe-chat
362
+ [share-x-shield]: https://img.shields.io/badge/-share%20on%20x-black?labelColor=black&logo=x&logoColor=white&style=flat-square
347
363
  [submit-agents-link]: https://github.com/lobehub/lobe-chat-agents
348
364
  [submit-agents-shield]: https://img.shields.io/badge/🤖/🏪_submit_agent-%E2%86%92-c4f042?labelColor=black&style=for-the-badge
349
365
  [submit-plugin-link]: https://github.com/lobehub/lobe-chat-plugins
package/README.zh-CN.md CHANGED
@@ -26,7 +26,13 @@ LobeChat 是一个开源的、可扩展的([Function Calling][fc-link])高
26
26
  [![][github-issues-shield]][github-issues-link]
27
27
  [![][github-license-shield]][github-license-link]
28
28
 
29
- [![Deploy with Vercel][deploy-button-image]][deploy-link]
29
+ **感谢分享 LobeChat 仓库**
30
+
31
+ [![][share-x-shield]][share-x-link]
32
+ [![][share-telegram-shield]][share-telegram-link]
33
+ [![][share-whatsapp-shield]][share-whatsapp-link]
34
+ [![][share-reddit-shield]][share-reddit-link]
35
+ [![][share-weibo-shield]][share-weibo-link]
30
36
 
31
37
  ![](https://gw.alipayobjects.com/zos/kitchen/RKnWrrfuMl/welcome.webp)
32
38
 
@@ -140,7 +146,7 @@ LobeChat 提供了两种独特的主题模式 - 明亮模式和暗黑模式,
140
146
 
141
147
  #### `5` 移动设备适配
142
148
 
143
- 针对移动设备进行了一系列的优化设计,以提升用户的移动体验。目前,我们正在对移动端的用户体验进行版本迭代,以实现更加流畅和直观的交互。如果您有任何建议或想法,我们非常欢迎您通过 Github Issues 或者 Pull Requests 提供反馈。
149
+ 针对移动设备进行了一系列的优化设计,以提升用户的移动体验。目前,我们正在对移动端的用户体验进行版本迭代,以实现更加流畅和直观的交互。如果您有任何建议或想法,我们非常欢迎您通过 GitHub Issues 或者 Pull Requests 提供反馈。
144
150
 
145
151
  > 🚧 更多快照和演示正在陆续添加中...
146
152
 
@@ -155,11 +161,11 @@ LobeChat 提供了两种独特的主题模式 - 明亮模式和暗黑模式,
155
161
  LobeChat 提供了 Vercel 的 [自托管版本][deploy-link]。这使你可以在几分钟内构建自己的聊天机器人,无需任何基础知识。如果想自己部署该服务,可以按照以下步骤进行操作:
156
162
 
157
163
  - 准备好你的 [OpenAI API Key](https://platform.openai.com/account/api-keys) 。
158
- - 点击下方按钮开始部署: Deploy with Vercel,直接使用 Github 账号登录即可,记得在环境变量页填入 API Key 和页面访问密码 CODE;
164
+ - 点击下方按钮开始部署: Deploy with Vercel,直接使用 GitHub 账号登录即可,记得在环境变量页填入 API Key 和页面访问密码 CODE;
159
165
  - 部署完毕后,即可开始使用;
160
166
  - 绑定自定义域名(可选):Vercel 分配的域名 DNS 在某些区域被污染了,绑定自定义域名即可直连。
161
167
 
162
- <div align="right">
168
+ <div align="center">
163
169
 
164
170
  [![][deploy-button-image]][deploy-link]
165
171
 
@@ -228,7 +234,7 @@ LobeChat 提供了 Vercel 的 [自托管版本][deploy-link]。这使你可以
228
234
 
229
235
  ## ⌨️ 本地开发
230
236
 
231
- 可以使用 Github Codespaces 进行在线开发:
237
+ 可以使用 GitHub Codespaces 进行在线开发:
232
238
 
233
239
  [![][codespaces-shield]][codespaces-link]
234
240
 
@@ -346,6 +352,16 @@ This project is [MIT](./LICENSE) licensed.
346
352
  [pr-welcome-link]: https://github.com/lobehub/lobe-chat/pulls
347
353
  [pr-welcome-shield]: https://img.shields.io/badge/🤯_pr_welcome-%E2%86%92-ffcb47?labelColor=black&style=for-the-badge
348
354
  [profile-link]: https://github.com/lobehub
355
+ [share-reddit-link]: https://www.reddit.com/submit?title=%E6%8E%A8%E8%8D%90%E4%B8%80%E4%B8%AA%20GitHub%20%E5%BC%80%E6%BA%90%E9%A1%B9%E7%9B%AE%20%F0%9F%A4%AF%20LobeChat%20-%20%E5%BC%80%E6%BA%90%E7%9A%84%E3%80%81%E5%8F%AF%E6%89%A9%E5%B1%95%E7%9A%84%EF%BC%88Function%20Calling%EF%BC%89%E9%AB%98%E6%80%A7%E8%83%BD%E8%81%8A%E5%A4%A9%E6%9C%BA%E5%99%A8%E4%BA%BA%E6%A1%86%E6%9E%B6%E3%80%82%0A%E5%AE%83%E6%94%AF%E6%8C%81%E4%B8%80%E9%94%AE%E5%85%8D%E8%B4%B9%E9%83%A8%E7%BD%B2%E7%A7%81%E4%BA%BA%20ChatGPT%2FLLM%20%E7%BD%91%E9%A1%B5%E5%BA%94%E7%94%A8%E7%A8%8B%E5%BA%8F%20%23chatbot%20%23chatGPT%20%23openAI&url=https%3A%2F%2Fgithub.com%2Flobehub%2Flobe-chat
356
+ [share-reddit-shield]: https://img.shields.io/badge/-share%20on%20reddit-black?labelColor=black&logo=reddit&logoColor=white&style=flat-square
357
+ [share-telegram-link]: https://t.me/share/url"?text=%E6%8E%A8%E8%8D%90%E4%B8%80%E4%B8%AA%20GitHub%20%E5%BC%80%E6%BA%90%E9%A1%B9%E7%9B%AE%20%F0%9F%A4%AF%20LobeChat%20-%20%E5%BC%80%E6%BA%90%E7%9A%84%E3%80%81%E5%8F%AF%E6%89%A9%E5%B1%95%E7%9A%84%EF%BC%88Function%20Calling%EF%BC%89%E9%AB%98%E6%80%A7%E8%83%BD%E8%81%8A%E5%A4%A9%E6%9C%BA%E5%99%A8%E4%BA%BA%E6%A1%86%E6%9E%B6%E3%80%82%0A%E5%AE%83%E6%94%AF%E6%8C%81%E4%B8%80%E9%94%AE%E5%85%8D%E8%B4%B9%E9%83%A8%E7%BD%B2%E7%A7%81%E4%BA%BA%20ChatGPT%2FLLM%20%E7%BD%91%E9%A1%B5%E5%BA%94%E7%94%A8%E7%A8%8B%E5%BA%8F%20%23chatbot%20%23chatGPT%20%23openAI&url=https%3A%2F%2Fgithub.com%2Flobehub%2Flobe-chat
358
+ [share-telegram-shield]: https://img.shields.io/badge/-share%20on%20telegram-black?labelColor=black&logo=telegram&logoColor=white&style=flat-square
359
+ [share-weibo-link]: http://service.weibo.com/share/share.php?sharesource=weibo&title=%E6%8E%A8%E8%8D%90%E4%B8%80%E4%B8%AA%20GitHub%20%E5%BC%80%E6%BA%90%E9%A1%B9%E7%9B%AE%20%F0%9F%A4%AF%20LobeChat%20-%20%E5%BC%80%E6%BA%90%E7%9A%84%E3%80%81%E5%8F%AF%E6%89%A9%E5%B1%95%E7%9A%84%EF%BC%88Function%20Calling%EF%BC%89%E9%AB%98%E6%80%A7%E8%83%BD%E8%81%8A%E5%A4%A9%E6%9C%BA%E5%99%A8%E4%BA%BA%E6%A1%86%E6%9E%B6%E3%80%82%0A%E5%AE%83%E6%94%AF%E6%8C%81%E4%B8%80%E9%94%AE%E5%85%8D%E8%B4%B9%E9%83%A8%E7%BD%B2%E7%A7%81%E4%BA%BA%20ChatGPT%2FLLM%20%E7%BD%91%E9%A1%B5%E5%BA%94%E7%94%A8%E7%A8%8B%E5%BA%8F%20%23chatbot%20%23chatGPT%20%23openAI&url=https%3A%2F%2Fgithub.com%2Flobehub%2Flobe-chat
360
+ [share-weibo-shield]: https://img.shields.io/badge/-share%20on%20weibo-black?labelColor=black&logo=sinaweibo&logoColor=white&style=flat-square
361
+ [share-whatsapp-link]: https://api.whatsapp.com/send?text=%E6%8E%A8%E8%8D%90%E4%B8%80%E4%B8%AA%20GitHub%20%E5%BC%80%E6%BA%90%E9%A1%B9%E7%9B%AE%20%F0%9F%A4%AF%20LobeChat%20-%20%E5%BC%80%E6%BA%90%E7%9A%84%E3%80%81%E5%8F%AF%E6%89%A9%E5%B1%95%E7%9A%84%EF%BC%88Function%20Calling%EF%BC%89%E9%AB%98%E6%80%A7%E8%83%BD%E8%81%8A%E5%A4%A9%E6%9C%BA%E5%99%A8%E4%BA%BA%E6%A1%86%E6%9E%B6%E3%80%82%0A%E5%AE%83%E6%94%AF%E6%8C%81%E4%B8%80%E9%94%AE%E5%85%8D%E8%B4%B9%E9%83%A8%E7%BD%B2%E7%A7%81%E4%BA%BA%20ChatGPT%2FLLM%20%E7%BD%91%E9%A1%B5%E5%BA%94%E7%94%A8%E7%A8%8B%E5%BA%8F%20https%3A%2F%2Fgithub.com%2Flobehub%2Flobe-chat%20%23chatbot%20%23chatGPT%20%23openAI
362
+ [share-whatsapp-shield]: https://img.shields.io/badge/-share%20on%20whatsapp-black?labelColor=black&logo=whatsapp&logoColor=white&style=flat-square
363
+ [share-x-link]: https://x.com/intent/tweet?hashtags=chatbot%2CchatGPT%2CopenAI&text=%E6%8E%A8%E8%8D%90%E4%B8%80%E4%B8%AA%20GitHub%20%E5%BC%80%E6%BA%90%E9%A1%B9%E7%9B%AE%20%F0%9F%A4%AF%20LobeChat%20-%20%E5%BC%80%E6%BA%90%E7%9A%84%E3%80%81%E5%8F%AF%E6%89%A9%E5%B1%95%E7%9A%84%EF%BC%88Function%20Calling%EF%BC%89%E9%AB%98%E6%80%A7%E8%83%BD%E8%81%8A%E5%A4%A9%E6%9C%BA%E5%99%A8%E4%BA%BA%E6%A1%86%E6%9E%B6%E3%80%82%0A%E5%AE%83%E6%94%AF%E6%8C%81%E4%B8%80%E9%94%AE%E5%85%8D%E8%B4%B9%E9%83%A8%E7%BD%B2%E7%A7%81%E4%BA%BA%20ChatGPT%2FLLM%20%E7%BD%91%E9%A1%B5%E5%BA%94%E7%94%A8%E7%A8%8B%E5%BA%8F&url=https%3A%2F%2Fgithub.com%2Flobehub%2Flobe-chat
364
+ [share-x-shield]: https://img.shields.io/badge/-share%20on%20x-black?labelColor=black&logo=x&logoColor=white&style=flat-square
349
365
  [submit-agents-link]: https://github.com/lobehub/lobe-chat-agents
350
366
  [submit-agents-shield]: https://img.shields.io/badge/🤖/🏪_submit_agent-%E2%86%92-c4f042?labelColor=black&style=for-the-badge
351
367
  [submit-plugin-link]: https://github.com/lobehub/lobe-chat-plugins
@@ -17,6 +17,8 @@ LobeChat provides additional configuration options during deployment, which can
17
17
  - [`PLUGINS_INDEX_URL`](#plugins_index_url)
18
18
  - [Agent Service](#agent-service)
19
19
  - [`AGENTS_INDEX_URL`](#agents_index_url)
20
+ - [Data Analytics](#data-analytics)
21
+ - [Posthog Analytics](#posthog-analytics)
20
22
  - [Development Environment](#development-environment)
21
23
  - [`DEV_API_END_PORT_URL`](#dev_api_end_port_url)
22
24
 
@@ -26,7 +28,7 @@ LobeChat provides additional configuration options during deployment, which can
26
28
 
27
29
  - Type: Optional
28
30
  - Description: Add a password to access the LobeChat service, the password should be 6 digits or letters
29
- - Default Value: -
31
+ - Default: -
30
32
  - Example: `awCT74` or `e3@09!`
31
33
 
32
34
  <br/>
@@ -37,14 +39,14 @@ LobeChat provides additional configuration options during deployment, which can
37
39
 
38
40
  - Type: Required
39
41
  - Description: This is the API key you apply for on the OpenAI account page, you can go [here][openai-api-page] to view
40
- - Default Value: -
42
+ - Default: -
41
43
  - Example: `sk-xxxxxx...xxxxxx`
42
44
 
43
45
  ### `OPENAI_PROXY_URL`
44
46
 
45
47
  - Type: Optional
46
48
  - Description: If you manually configure the OpenAI interface proxy, you can use this configuration item to override the default OpenAI API request base URL
47
- - Default Value: `https://api.openai.com`
49
+ - Default: `https://api.openai.com`
48
50
  - Example: `https://api.chatanywhere.cn`
49
51
 
50
52
  <br/>
@@ -57,21 +59,21 @@ If you need to use Azure OpenAI to provide model services, you can refer to the
57
59
 
58
60
  - Type: Optional
59
61
  - Description: Set this value to `1` to enable Azure OpenAI configuration
60
- - Default Value: -
62
+ - Default: -
61
63
  - Example: `1`
62
64
 
63
65
  ### `AZURE_API_KEY`
64
66
 
65
67
  - Type: Optional
66
68
  - Description: This is the API key you apply for on the Azure OpenAI account page
67
- - Default Value: -
69
+ - Default: -
68
70
  - Example: `c55168be3874490ef0565d9779ecd5a6`
69
71
 
70
72
  ### `AZURE_API_VERSION`
71
73
 
72
74
  - Type: Optional
73
75
  - Description: Azure's API version, following the YYYY-MM-DD format
74
- - Default Value: `2023-08-01-preview`
76
+ - Default: `2023-08-01-preview`
75
77
  - Example: `2023-05-15`, refer to [latest version][azure-api-verion-url]
76
78
 
77
79
  <br/>
@@ -82,7 +84,7 @@ If you need to use Azure OpenAI to provide model services, you can refer to the
82
84
 
83
85
  - Type: Optional
84
86
  - Description: The index address of the LobeChat plugin market. If you have deployed the plugin market service yourself, you can use this variable to override the default plugin market address
85
- - Default Value: `https://chat-plugins.lobehub.com`
87
+ - Default: `https://chat-plugins.lobehub.com`
86
88
 
87
89
  <br/>
88
90
 
@@ -92,7 +94,41 @@ If you need to use Azure OpenAI to provide model services, you can refer to the
92
94
 
93
95
  - Type: Optional
94
96
  - Description: The index address of the LobeChat role market. If you have deployed the role market service yourself, you can use this variable to override the default plugin market address
95
- - Default Value: `https://chat-agents.lobehub.com`
97
+ - Default: `https://chat-agents.lobehub.com`
98
+
99
+ <br/>
100
+
101
+ ## Data Analytics
102
+
103
+ ### Posthog Analytics
104
+
105
+ #### `NEXT_PUBLIC_ANALYTICS_POSTHOG`
106
+
107
+ - Type: Optional
108
+ - Description: Environment variable to enable \[PostHog Analytics]\[posthog-analytics-url]. Set to `1` to enable PostHog Analytics.
109
+ - Default: -
110
+ - Example: `1`
111
+
112
+ #### `NEXT_PUBLIC_POSTHOG_KEY`
113
+
114
+ - Type: Optional
115
+ - Description: Set the PostHog project key.
116
+ - Default: -
117
+ - Example: `phc_xxxxxxxx`
118
+
119
+ #### `NEXT_PUBLIC_POSTHOG_HOST`
120
+
121
+ - Type: Optional
122
+ - Description: Set the deployment address of the PostHog service. Default is the official SAAS address.
123
+ - Default: `https://app.posthog.com`
124
+ - Example: `https://example.com`
125
+
126
+ #### `NEXT_PUBLIC_POSTHOG_DEBUG`
127
+
128
+ - Type: Optional
129
+ - Description: Enable debug mode for PostHog.
130
+ - Default: -
131
+ - Example: `1`
96
132
 
97
133
  <br/>
98
134
 
@@ -102,7 +138,7 @@ If you need to use Azure OpenAI to provide model services, you can refer to the
102
138
 
103
139
  - Type: Optional
104
140
  - Description: Define the proxy address of the LobeChat server request forwarding. Using this variable can conveniently forward requests to the line during development. See [configuration code](https://github.com/lobehub/lobe-chat/blob/main/next.config.mjs#L29-L38)
105
- - Default Value: -
141
+ - Default: -
106
142
  - Example: `https://chat-preview.lobehub.com`
107
143
 
108
144
  [azure-api-verion-url]: https://docs.microsoft.com/zh-cn/azure/developer/javascript/api-reference/es-modules/azure-sdk/ai-translation/translationconfiguration?view=azure-node-latest#api-version
@@ -20,10 +20,7 @@ LobeChat 在部署时提供了一些额外的配置项,使用环境变量进
20
20
  - [数据统计](#数据统计)
21
21
  - [Vercel Analytics](#vercel-analytics)
22
22
  - [Mixpanel Analytics](#mixpanel-analytics)
23
- - [`NEXT_PUBLIC_MIXPANEL_PROJECT_TOKEN`](#next_public_mixpanel_project_token)
24
- - [`NEXT_PUBLIC_MIXPANEL_DEBUG`](#next_public_mixpanel_debug)
25
23
  - [Posthog Analytics](#posthog-analytics)
26
- - [`NEXT_PUBLIC_POSTHOG_DEBUG`](#next_public_posthog_debug)
27
24
  - [开发环境](#开发环境)
28
25
  - [`DEV_API_END_PORT_URL`](#dev_api_end_port_url)
29
26
 
@@ -128,14 +125,14 @@ LobeChat 在部署时提供了一些额外的配置项,使用环境变量进
128
125
  - 默认值: -
129
126
  - 示例:`1`
130
127
 
131
- ### `NEXT_PUBLIC_MIXPANEL_PROJECT_TOKEN`
128
+ #### `NEXT_PUBLIC_MIXPANEL_PROJECT_TOKEN`
132
129
 
133
130
  - 类型:可选
134
131
  - 描述:设置 Mixpanel 项目的识别 Token,可以在[这里][mixpanel-project-url]找到
135
132
  - 默认值: -
136
133
  - 示例:`60db2abae7fdd29961f4e8f91b074b3a`
137
134
 
138
- ### `NEXT_PUBLIC_MIXPANEL_DEBUG`
135
+ #### `NEXT_PUBLIC_MIXPANEL_DEBUG`
139
136
 
140
137
  - 类型:可选
141
138
  - 描述:开启 Mixpanel 的调试模式
@@ -165,7 +162,7 @@ LobeChat 在部署时提供了一些额外的配置项,使用环境变量进
165
162
  - 默认值:`https://app.posthog.com`
166
163
  - 示例:`https://example.com`
167
164
 
168
- ### `NEXT_PUBLIC_POSTHOG_DEBUG`
165
+ #### `NEXT_PUBLIC_POSTHOG_DEBUG`
169
166
 
170
167
  - 类型:可选
171
168
  - 描述:开启 PostHog 的调试模式
@@ -36,7 +36,7 @@
36
36
  "historyRange": "History Range",
37
37
  "import": "Import Configuration",
38
38
  "inbox": {
39
- "defaultMessage": "Hello, I'm your intelligent agent. You can ask me any questions and I will do my best to answer you. If you need a more professional or customized agent, you can click <kbd>+</kbd> to create a custom agent.",
39
+ "defaultMessage": "Hello, I'm your intelligent agent. You can ask me any questions and I will do my best to answer you. If you need a more professional or customized agent, you can click `+` to create a custom agent.",
40
40
  "desc": "Activate the brain cluster and spark your thinking. Your intelligent agent is here to communicate with you about everything.",
41
41
  "title": "Chat Freely"
42
42
  },
@@ -47,6 +47,7 @@
47
47
  "newAgent": "New Agent",
48
48
  "noDescription": "No Description",
49
49
  "ok": "OK",
50
+ "password": "Password",
50
51
  "pin": "Pin",
51
52
  "pinOff": "Unpin",
52
53
  "regenerate": "Regenerate",
@@ -60,6 +61,17 @@
60
61
  "sessionList": "Agent List",
61
62
  "setting": "Settings",
62
63
  "share": "Share",
64
+ "shareModal": {
65
+ "download": "Download Screenshot",
66
+ "imageType": "Image Type",
67
+ "screenshot": "Screenshot",
68
+ "settings": "Export Settings",
69
+ "withBackground": "Include Background Image",
70
+ "withPluginInfo": "Include Plugin Information",
71
+ "withSystemRole": "Include Agent Role Setting",
72
+ "withFooter": "Including footer",
73
+ "shareToShareGPT": "Generate ShareGPT sharing link"
74
+ },
63
75
  "stop": "Stop",
64
76
  "tab": {
65
77
  "chat": "Chat",
@@ -36,7 +36,7 @@
36
36
  "historyRange": "Исторический диапазон",
37
37
  "import": "Импорт конфига",
38
38
  "inbox": {
39
- "defaultMessage": "Hello, I'm your intelligent assistant. You can ask me any questions and I will do my best to answer you. If you need a more professional or customized assistant, you can click <kbd>+</kbd> to create a custom assistant.",
39
+ "defaultMessage": "Hello, I'm your intelligent assistant. You can ask me any questions and I will do my best to answer you. If you need a more professional or customized assistant, you can click `+` to create a custom assistant.",
40
40
  "desc": "Activate the brain cluster and spark your thinking. Your intelligent assistant is here to communicate with you about everything.",
41
41
  "title": "Chat Freely"
42
42
  },
@@ -47,6 +47,7 @@
47
47
  "newAgent": "Новый ассистент",
48
48
  "noDescription": "Нет описания",
49
49
  "ok": "ОК",
50
+ "password": "пароль",
50
51
  "pin": "Закрепить",
51
52
  "pinOff": "Открепить",
52
53
  "regenerate": "Ре-генерация",
@@ -60,6 +61,17 @@
60
61
  "sessionList": "Список помощников",
61
62
  "setting": "Настройки",
62
63
  "share": "Поделиться",
64
+ "shareModal": {
65
+ "download": "Скачать скриншот",
66
+ "imageType": "Тип изображения",
67
+ "screenshot": "Скриншот",
68
+ "settings": "Настройки экспорта",
69
+ "withBackground": "С фоновым изображением",
70
+ "withPluginInfo": "С информацией о плагине",
71
+ "withSystemRole": "С настройками роли помощника",
72
+ "withFooter": "с подвалом",
73
+ "shareToShareGPT": "Создать ссылку для обмена ShareGPT"
74
+ },
63
75
  "stop": "Остановить",
64
76
  "tab": {
65
77
  "chat": "Чат",
@@ -36,7 +36,7 @@
36
36
  "historyRange": "历史范围",
37
37
  "import": "导入配置",
38
38
  "inbox": {
39
- "defaultMessage": "你好,我是你的智能助手,你可以问我任何问题,我会尽力回答你。如果需要获得更加专业或定制的助手,可以点击<kbd>+</kbd>创建自定义助手",
39
+ "defaultMessage": "你好,我是你的智能助手,你可以问我任何问题,我会尽力回答你。如果需要获得更加专业或定制的助手,可以点击`+`创建自定义助手",
40
40
  "desc": "开启大脑集群,激发思维火花。你的智能助理,在这里与你交流一切",
41
41
  "title": "随便聊聊"
42
42
  },
@@ -47,6 +47,7 @@
47
47
  "newAgent": "新建助手",
48
48
  "noDescription": "暂无描述",
49
49
  "ok": "确定",
50
+ "password": "密码",
50
51
  "pin": "置顶",
51
52
  "pinOff": "取消置顶",
52
53
  "regenerate": "重新生成",
@@ -60,6 +61,17 @@
60
61
  "sessionList": "助手列表",
61
62
  "setting": "设置",
62
63
  "share": "分享",
64
+ "shareModal": {
65
+ "download": "下载截图",
66
+ "imageType": "图片格式",
67
+ "screenshot": "截图",
68
+ "settings": "导出设置",
69
+ "shareToShareGPT": "生成 ShareGPT 分享链接",
70
+ "withBackground": "包含背景图片",
71
+ "withFooter": "包含页脚",
72
+ "withPluginInfo": "包含插件信息",
73
+ "withSystemRole": "包含助手角色设定"
74
+ },
63
75
  "stop": "停止",
64
76
  "tab": {
65
77
  "chat": "会话",
@@ -36,7 +36,7 @@
36
36
  "historyRange": "歷史範圍",
37
37
  "import": "匯入設定",
38
38
  "inbox": {
39
- "defaultMessage": "您好,我是您的智慧助理。您可以問我任何問題,我會盡力回答您。如果您需要更專業或自訂的助理,您可以點選 <kbd>+</kbd> 來建立一個自訂助理。",
39
+ "defaultMessage": "您好,我是您的智慧助理。您可以問我任何問題,我會盡力回答您。如果您需要更專業或自訂的助理,您可以點選 `+` 來建立一個自訂助理。",
40
40
  "desc": "啟動思維並激發你的創意。你的智慧助理已經準備好與你討論所有事情。",
41
41
  "title": "隨便聊聊"
42
42
  },
@@ -47,6 +47,7 @@
47
47
  "newAgent": "新助理",
48
48
  "noDescription": "無描述",
49
49
  "ok": "確定",
50
+ "password": "密碼",
50
51
  "pin": "置頂",
51
52
  "pinOff": "取消置頂",
52
53
  "regenerate": "重新產生",
@@ -60,6 +61,17 @@
60
61
  "sessionList": "助理列表",
61
62
  "setting": "設定",
62
63
  "share": "分享",
64
+ "shareModal": {
65
+ "download": "下載截圖",
66
+ "imageType": "圖片格式",
67
+ "screenshot": "截圖",
68
+ "settings": "匯出設定",
69
+ "withBackground": "包含背景圖片",
70
+ "withPluginInfo": "包含插件資訊",
71
+ "withSystemRole": "包含助手角色設定",
72
+ "withFooter": "包含頁腳",
73
+ "shareToShareGPT": "生成 ShareGPT 分享連結"
74
+ },
63
75
  "stop": "停止",
64
76
  "tab": {
65
77
  "chat": "聊天",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lobehub/chat",
3
- "version": "0.81.0",
3
+ "version": "0.82.2",
4
4
  "description": "An open-source, extensible (Function Calling), high-performance chatbot framework. It supports one-click free deployment of your private ChatGPT/LLM web application",
5
5
  "keywords": [
6
6
  "chatbot",
@@ -78,9 +78,11 @@
78
78
  "antd-style": "^3",
79
79
  "brotli-wasm": "^1",
80
80
  "chroma-js": "^2",
81
+ "dayjs": "^1",
81
82
  "emoji-mart": "^5",
82
83
  "fast-deep-equal": "^3",
83
84
  "gpt-tokenizer": "^2",
85
+ "html-to-image": "^1",
84
86
  "i18next": "^23",
85
87
  "idb-keyval": "^6",
86
88
  "immer": "^10",
@@ -98,7 +100,9 @@
98
100
  "react-i18next": "^13",
99
101
  "react-intersection-observer": "^9",
100
102
  "react-layout-kit": "^1",
101
- "satori": "^0.10",
103
+ "remark": "^14",
104
+ "remark-gfm": "^3",
105
+ "remark-html": "^15",
102
106
  "swr": "^2",
103
107
  "systemjs": "^6",
104
108
  "ts-md5": "^1",
@@ -138,7 +142,6 @@
138
142
  "next-pwa": "^5",
139
143
  "node-fetch": "^3",
140
144
  "prettier": "^3",
141
- "remark": "^14",
142
145
  "remark-cli": "^11",
143
146
  "semantic-release": "^21",
144
147
  "stylelint": "^15",
@@ -6,26 +6,12 @@
6
6
  {
7
7
  "src": "/icons/icon-192x192.png",
8
8
  "sizes": "192x192",
9
- "type": "image/png",
10
- "purpose": "any"
11
- },
12
- {
13
- "src": "/icons/icon-maskable-192x192.png",
14
- "sizes": "192x192",
15
- "type": "image/png",
16
- "purpose": "maskable"
9
+ "type": "image/png"
17
10
  },
18
11
  {
19
12
  "src": "/icons/icon-512x512.png",
20
13
  "sizes": "512x512",
21
- "type": "image/png",
22
- "purpose": "any"
23
- },
24
- {
25
- "src": "/icons/icon-maskable-512x512.png",
26
- "sizes": "512x512",
27
- "type": "image/png",
28
- "purpose": "maskable"
14
+ "type": "image/png"
29
15
  }
30
16
  ],
31
17
  "id": "/",
@@ -12,9 +12,14 @@ import OtpInput from '../OTPInput';
12
12
  import APIKeyForm from './ApiKeyForm';
13
13
  import { ErrorActionContainer, FormAction } from './style';
14
14
 
15
+ enum Tab {
16
+ Api = 'api',
17
+ Password = 'password',
18
+ }
19
+
15
20
  const InvalidAccess = memo<{ id: string }>(({ id }) => {
16
21
  const { t } = useTranslation('error');
17
- const [mode, setMode] = useState('password');
22
+ const [mode, setMode] = useState<Tab>(Tab.Password);
18
23
  const [password, setSettings] = useGlobalStore((s) => [s.settings.password, s.setSettings]);
19
24
  const [resend, deleteMessage] = useSessionStore((s) => [s.resendMessage, s.deleteMessage]);
20
25
 
@@ -22,16 +27,20 @@ const InvalidAccess = memo<{ id: string }>(({ id }) => {
22
27
  <ErrorActionContainer>
23
28
  <Segmented
24
29
  block
25
- onChange={(value) => setMode(value as string)}
30
+ onChange={(value) => setMode(value as Tab)}
26
31
  options={[
27
- { icon: <Icon icon={KeySquare} />, label: 'OpenAI API Key', value: 'api' },
28
- { icon: <Icon icon={SquareAsterisk} />, label: '密码', value: 'password' },
32
+ { icon: <Icon icon={KeySquare} />, label: 'OpenAI API Key', value: Tab.Api },
33
+ {
34
+ icon: <Icon icon={SquareAsterisk} />,
35
+ label: t('password', { ns: 'common' }),
36
+ value: Tab.Password,
37
+ },
29
38
  ]}
30
39
  style={{ width: '100%' }}
31
40
  value={mode}
32
41
  />
33
42
  <Flexbox gap={24}>
34
- {mode === 'password' ? (
43
+ {mode === Tab.Password && (
35
44
  <>
36
45
  <FormAction
37
46
  avatar={'🗳'}
@@ -56,7 +65,8 @@ const InvalidAccess = memo<{ id: string }>(({ id }) => {
56
65
  {t('unlock.confirm')}
57
66
  </Button>
58
67
  </>
59
- ) : (
68
+ )}
69
+ {mode === Tab.Api && (
60
70
  <APIKeyForm
61
71
  onConfirm={() => {
62
72
  resend(id);