@lobehub/chat 0.82.1 → 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.
- package/CHANGELOG.md +25 -0
- package/README.md +22 -6
- package/README.zh-CN.md +21 -5
- package/docs/Environment-Variable.md +45 -9
- package/locales/en_US/common.json +1 -1
- package/locales/ru_RU/common.json +1 -1
- package/locales/zh_CN/common.json +1 -1
- package/locales/zh_TW/common.json +1 -1
- package/package.json +1 -1
- package/public/images/screenshot_background.webp +0 -0
- package/src/app/chat/features/Header/Mobile.tsx +12 -7
- package/src/app/chat/features/Header/ShareButton/Inner.tsx +31 -26
- package/src/app/chat/features/Header/ShareButton/index.tsx +6 -1
- package/src/app/chat/features/SessionList/Header/Desktop.tsx +2 -4
- package/src/app/chat/features/SessionList/Header/Mobile.tsx +15 -14
- package/src/app/chat/features/Sidebar/Mobile.tsx +3 -17
- package/src/app/chat/layout.desktop.tsx +2 -1
- package/src/app/chat/layout.mobile.tsx +2 -1
- package/src/app/chat/settings/features/Header/index.tsx +3 -3
- package/src/app/chat/settings/layout.mobile.tsx +1 -8
- package/src/app/market/features/AgentCard/AgentCardBanner.tsx +2 -1
- package/src/app/market/features/Header/Mobile.tsx +2 -21
- package/src/app/market/features/SideBar/AgentInfo/Header.tsx +2 -1
- package/src/app/market/features/SideBar/AgentInfo/index.tsx +10 -2
- package/src/app/market/features/SideBar/Mobile.tsx +3 -17
- package/src/app/market/layout.desktop.tsx +2 -1
- package/src/app/market/layout.mobile.tsx +2 -1
- package/src/app/settings/agent/index.tsx +20 -0
- package/src/app/settings/agent/page.tsx +7 -0
- package/src/app/settings/{features/Settings → common}/Common.tsx +1 -1
- package/src/app/settings/common/index.tsx +20 -0
- package/src/app/settings/common/page.tsx +7 -0
- package/src/app/settings/features/Header/Desktop.tsx +9 -2
- package/src/app/settings/features/Header/Mobile.tsx +5 -2
- package/src/app/settings/features/SideBar/Item.tsx +39 -0
- package/src/app/settings/features/SideBar/List.tsx +30 -0
- package/src/app/settings/features/SideBar/index.tsx +38 -0
- package/src/app/settings/index.tsx +5 -7
- package/src/app/settings/layout.desktop.tsx +6 -2
- package/src/app/settings/layout.mobile.tsx +1 -3
- package/src/app/settings/{features/Settings → llm}/LLM/index.tsx +4 -2
- package/src/app/settings/llm/index.tsx +20 -0
- package/src/app/settings/llm/page.tsx +7 -0
- package/src/app/settings/mobile/ExtraList.tsx +61 -0
- package/src/app/settings/mobile/index.tsx +43 -0
- package/src/app/settings/mobile/page.tsx +7 -0
- package/src/app/settings/page.tsx +1 -7
- package/src/components/MobilePadding/index.tsx +32 -0
- package/src/const/layoutTokens.ts +1 -0
- package/src/features/AgentSetting/AgentMeta/index.tsx +0 -1
- package/src/features/AgentSetting/AgentPlugin/MarketSettingModal.tsx +29 -16
- package/src/features/MobileTabBar/index.tsx +15 -3
- package/src/features/PluginDevModal/PluginPreview.tsx +11 -4
- package/src/features/PluginDevModal/index.tsx +14 -10
- package/src/features/SideBar/BottomActions.tsx +3 -3
- package/src/features/SideBar/TopActions.tsx +5 -4
- package/src/locales/default/common.ts +1 -1
- package/src/locales/default/plugin.ts +2 -1
- package/src/store/global/hooks/useSwitchSettingsOnInit.ts +9 -0
- package/src/store/global/initialState.ts +13 -4
- package/src/store/global/store.ts +0 -4
- package/src/store/session/slices/chat/actions/share.ts +1 -1
- package/src/styles/antdOverride.ts +2 -26
- package/src/styles/global.ts +9 -0
- package/src/app/settings/features/Banner/index.tsx +0 -94
- package/src/app/settings/features/Settings/index.tsx +0 -53
- /package/src/app/settings/{features/Settings → agent}/Agent.tsx +0 -0
- /package/src/app/settings/{features/Settings → llm}/LLM/Checker.tsx +0 -0
- /package/src/app/settings/{features/Settings → llm}/LLM/ModelList.tsx +0 -0
- /package/src/app/settings/{features/Settings → llm}/LLM/getModelList.ts +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,31 @@
|
|
|
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
|
+
[](#readme-top)
|
|
27
|
+
|
|
28
|
+
</div>
|
|
29
|
+
|
|
5
30
|
### [Version 0.82.1](https://github.com/lobehub/lobe-chat/compare/v0.82.0...v0.82.1)
|
|
6
31
|
|
|
7
32
|
<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
|
-
|
|
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
|

|
|
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
|
|
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
|
|
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="
|
|
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
|
|
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
|
-
|
|
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
|

|
|
32
38
|
|
|
@@ -140,7 +146,7 @@ LobeChat 提供了两种独特的主题模式 - 明亮模式和暗黑模式,
|
|
|
140
146
|
|
|
141
147
|
#### `5` 移动设备适配
|
|
142
148
|
|
|
143
|
-
针对移动设备进行了一系列的优化设计,以提升用户的移动体验。目前,我们正在对移动端的用户体验进行版本迭代,以实现更加流畅和直观的交互。如果您有任何建议或想法,我们非常欢迎您通过
|
|
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,直接使用
|
|
164
|
+
- 点击下方按钮开始部署: Deploy with Vercel,直接使用 GitHub 账号登录即可,记得在环境变量页填入 API Key 和页面访问密码 CODE;
|
|
159
165
|
- 部署完毕后,即可开始使用;
|
|
160
166
|
- 绑定自定义域名(可选):Vercel 分配的域名 DNS 在某些区域被污染了,绑定自定义域名即可直连。
|
|
161
167
|
|
|
162
|
-
<div align="
|
|
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
|
-
可以使用
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
@@ -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
|
|
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
|
},
|
|
@@ -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
|
|
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
|
},
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
"historyRange": "历史范围",
|
|
37
37
|
"import": "导入配置",
|
|
38
38
|
"inbox": {
|
|
39
|
-
"defaultMessage": "
|
|
39
|
+
"defaultMessage": "你好,我是你的智能助手,你可以问我任何问题,我会尽力回答你。如果需要获得更加专业或定制的助手,可以点击`+`创建自定义助手",
|
|
40
40
|
"desc": "开启大脑集群,激发思维火花。你的智能助理,在这里与你交流一切",
|
|
41
41
|
"title": "随便聊聊"
|
|
42
42
|
},
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
"historyRange": "歷史範圍",
|
|
37
37
|
"import": "匯入設定",
|
|
38
38
|
"inbox": {
|
|
39
|
-
"defaultMessage": "您好,我是您的智慧助理。您可以問我任何問題,我會盡力回答您。如果您需要更專業或自訂的助理,您可以點選
|
|
39
|
+
"defaultMessage": "您好,我是您的智慧助理。您可以問我任何問題,我會盡力回答您。如果您需要更專業或自訂的助理,您可以點選 `+` 來建立一個自訂助理。",
|
|
40
40
|
"desc": "啟動思維並激發你的創意。你的智慧助理已經準備好與你討論所有事情。",
|
|
41
41
|
"title": "隨便聊聊"
|
|
42
42
|
},
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lobehub/chat",
|
|
3
|
-
"version": "0.82.
|
|
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",
|
|
Binary file
|
|
@@ -4,6 +4,8 @@ import { useRouter } from 'next/navigation';
|
|
|
4
4
|
import { memo } from 'react';
|
|
5
5
|
import { useTranslation } from 'react-i18next';
|
|
6
6
|
|
|
7
|
+
import ShareButton from '@/app/chat/features/Header/ShareButton';
|
|
8
|
+
import { MOBILE_HEADER_ICON_SIZE } from '@/const/layoutTokens';
|
|
7
9
|
import { useGlobalStore } from '@/store/global';
|
|
8
10
|
import { useSessionStore } from '@/store/session';
|
|
9
11
|
import { agentSelectors, sessionSelectors } from '@/store/session/selectors';
|
|
@@ -13,10 +15,9 @@ const MobileHeader = memo(() => {
|
|
|
13
15
|
const { t } = useTranslation('common');
|
|
14
16
|
const router = useRouter();
|
|
15
17
|
|
|
16
|
-
const [isInbox, title
|
|
18
|
+
const [isInbox, title] = useSessionStore((s) => [
|
|
17
19
|
sessionSelectors.isInboxSession(s),
|
|
18
20
|
agentSelectors.currentAgentTitle(s),
|
|
19
|
-
agentSelectors.currentAgentModel(s),
|
|
20
21
|
]);
|
|
21
22
|
|
|
22
23
|
const [toggleConfig] = useGlobalStore((s) => [s.toggleMobileTopic]);
|
|
@@ -25,17 +26,21 @@ const MobileHeader = memo(() => {
|
|
|
25
26
|
|
|
26
27
|
return (
|
|
27
28
|
<MobileNavBar
|
|
28
|
-
center={<MobileNavBarTitle
|
|
29
|
+
center={<MobileNavBarTitle title={displayTitle} />}
|
|
29
30
|
onBackClick={() => router.push('/chat')}
|
|
30
31
|
right={
|
|
31
32
|
<>
|
|
32
|
-
<
|
|
33
|
+
<ShareButton />
|
|
34
|
+
<ActionIcon
|
|
35
|
+
icon={LayoutList}
|
|
36
|
+
onClick={() => toggleConfig()}
|
|
37
|
+
size={MOBILE_HEADER_ICON_SIZE}
|
|
38
|
+
/>
|
|
33
39
|
{!isInbox && (
|
|
34
40
|
<ActionIcon
|
|
35
41
|
icon={Settings}
|
|
36
|
-
onClick={() => {
|
|
37
|
-
|
|
38
|
-
}}
|
|
42
|
+
onClick={() => router.push(pathString('/chat/settings', { hash: location.hash }))}
|
|
43
|
+
size={MOBILE_HEADER_ICON_SIZE}
|
|
39
44
|
/>
|
|
40
45
|
)}
|
|
41
46
|
</>
|
|
@@ -5,6 +5,7 @@ import { memo, useMemo, useState } from 'react';
|
|
|
5
5
|
import { useTranslation } from 'react-i18next';
|
|
6
6
|
import { Flexbox } from 'react-layout-kit';
|
|
7
7
|
|
|
8
|
+
import MobilePadding from '@/components/MobilePadding';
|
|
8
9
|
import { FORM_STYLE } from '@/const/layoutTokens';
|
|
9
10
|
import { useGlobalStore } from '@/store/global';
|
|
10
11
|
import { useSessionStore } from '@/store/session';
|
|
@@ -89,33 +90,37 @@ const Inner = memo(() => {
|
|
|
89
90
|
|
|
90
91
|
return (
|
|
91
92
|
<Flexbox gap={16}>
|
|
92
|
-
<
|
|
93
|
-
|
|
94
|
-
onChange={(value) => setTab(value as Tab)}
|
|
95
|
-
options={options}
|
|
96
|
-
style={{ width: '100%' }}
|
|
97
|
-
value={tab}
|
|
98
|
-
/>
|
|
99
|
-
<Form items={[settings]} {...FORM_STYLE} />
|
|
100
|
-
{tab === Tab.Screenshot && (
|
|
101
|
-
<Preview
|
|
102
|
-
imageType={imageType}
|
|
103
|
-
withBackground={withBackground}
|
|
104
|
-
withFooter={withFooter}
|
|
105
|
-
withSystemRole={withSystemRole}
|
|
106
|
-
/>
|
|
107
|
-
)}
|
|
108
|
-
{tab === Tab.ShareGPT && (
|
|
109
|
-
<Button
|
|
93
|
+
<MobilePadding bottom={0}>
|
|
94
|
+
<Segmented
|
|
110
95
|
block
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
96
|
+
onChange={(value) => setTab(value as Tab)}
|
|
97
|
+
options={options}
|
|
98
|
+
style={{ width: '100%' }}
|
|
99
|
+
value={tab}
|
|
100
|
+
/>
|
|
101
|
+
</MobilePadding>
|
|
102
|
+
<Form items={[settings]} {...FORM_STYLE} />
|
|
103
|
+
<MobilePadding gap={16} top={0}>
|
|
104
|
+
{tab === Tab.Screenshot && (
|
|
105
|
+
<Preview
|
|
106
|
+
imageType={imageType}
|
|
107
|
+
withBackground={withBackground}
|
|
108
|
+
withFooter={withFooter}
|
|
109
|
+
withSystemRole={withSystemRole}
|
|
110
|
+
/>
|
|
111
|
+
)}
|
|
112
|
+
{tab === Tab.ShareGPT && (
|
|
113
|
+
<Button
|
|
114
|
+
block
|
|
115
|
+
loading={shareLoading}
|
|
116
|
+
onClick={() => shareToShareGPT({ avatar, withPluginInfo, withSystemRole })}
|
|
117
|
+
size={'large'}
|
|
118
|
+
type={'primary'}
|
|
119
|
+
>
|
|
120
|
+
{t('shareModal.shareToShareGPT')}
|
|
121
|
+
</Button>
|
|
122
|
+
)}
|
|
123
|
+
</MobilePadding>
|
|
119
124
|
</Flexbox>
|
|
120
125
|
);
|
|
121
126
|
});
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { ActionIcon, Modal } from '@lobehub/ui';
|
|
2
|
+
import { useResponsive } from 'antd-style';
|
|
2
3
|
import { Share2 } from 'lucide-react';
|
|
3
4
|
import { memo, useState } from 'react';
|
|
4
5
|
import { useTranslation } from 'react-i18next';
|
|
5
6
|
|
|
7
|
+
import { MOBILE_HEADER_ICON_SIZE } from '@/const/layoutTokens';
|
|
6
8
|
import { useSessionStore } from '@/store/session';
|
|
7
9
|
|
|
8
10
|
import Inner from './Inner';
|
|
@@ -11,6 +13,9 @@ const ShareButton = memo(() => {
|
|
|
11
13
|
const [isModalOpen, setIsModalOpen] = useState(false);
|
|
12
14
|
const { t } = useTranslation('common');
|
|
13
15
|
const [shareLoading] = useSessionStore((s) => [s.shareLoading]);
|
|
16
|
+
const { mobile } = useResponsive();
|
|
17
|
+
|
|
18
|
+
const size = mobile ? MOBILE_HEADER_ICON_SIZE : { fontSize: 24 };
|
|
14
19
|
|
|
15
20
|
return (
|
|
16
21
|
<>
|
|
@@ -18,7 +23,7 @@ const ShareButton = memo(() => {
|
|
|
18
23
|
icon={Share2}
|
|
19
24
|
loading={shareLoading}
|
|
20
25
|
onClick={() => setIsModalOpen(true)}
|
|
21
|
-
size={
|
|
26
|
+
size={size}
|
|
22
27
|
title={t('share')}
|
|
23
28
|
/>
|
|
24
29
|
<Modal
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { ActionIcon, Logo } from '@lobehub/ui';
|
|
2
2
|
import { createStyles } from 'antd-style';
|
|
3
3
|
import { MessageSquarePlus } from 'lucide-react';
|
|
4
|
-
import Link from 'next/link';
|
|
5
4
|
import { memo } from 'react';
|
|
6
5
|
import { useTranslation } from 'react-i18next';
|
|
7
6
|
import { Flexbox } from 'react-layout-kit';
|
|
@@ -28,9 +27,8 @@ const Header = memo(() => {
|
|
|
28
27
|
return (
|
|
29
28
|
<Flexbox className={styles.top} gap={16} padding={16}>
|
|
30
29
|
<Flexbox distribution={'space-between'} horizontal>
|
|
31
|
-
<
|
|
32
|
-
|
|
33
|
-
</Link>
|
|
30
|
+
<Logo className={styles.logo} size={36} type={'text'} />
|
|
31
|
+
|
|
34
32
|
<ActionIcon
|
|
35
33
|
icon={MessageSquarePlus}
|
|
36
34
|
onClick={() => createSession()}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import { ActionIcon, Logo, MobileNavBar } from '@lobehub/ui';
|
|
1
|
+
import { ActionIcon, Avatar, Logo, MobileNavBar } from '@lobehub/ui';
|
|
2
2
|
import { createStyles } from 'antd-style';
|
|
3
|
-
import { MessageSquarePlus
|
|
3
|
+
import { MessageSquarePlus } from 'lucide-react';
|
|
4
4
|
import { useRouter } from 'next/navigation';
|
|
5
5
|
import { memo } from 'react';
|
|
6
6
|
|
|
7
|
-
import
|
|
7
|
+
import { MOBILE_HEADER_ICON_SIZE } from '@/const/layoutTokens';
|
|
8
|
+
import { useGlobalStore } from '@/store/global';
|
|
8
9
|
import { useSessionStore } from '@/store/session';
|
|
9
10
|
|
|
10
11
|
export const useStyles = createStyles(({ css, token }) => ({
|
|
@@ -20,21 +21,21 @@ export const useStyles = createStyles(({ css, token }) => ({
|
|
|
20
21
|
const Header = memo(() => {
|
|
21
22
|
const [createSession] = useSessionStore((s) => [s.createSession]);
|
|
22
23
|
const router = useRouter();
|
|
23
|
-
|
|
24
|
+
const avatar = useGlobalStore((st) => st.settings.avatar);
|
|
24
25
|
return (
|
|
25
26
|
<MobileNavBar
|
|
26
27
|
center={<Logo type={'text'} />}
|
|
27
|
-
left={
|
|
28
|
+
left={
|
|
29
|
+
<div onClick={() => router.push('/settings/mobile')} style={{ marginLeft: 8 }}>
|
|
30
|
+
{avatar ? <Avatar avatar={avatar} size={28} /> : <Logo size={28} />}
|
|
31
|
+
</div>
|
|
32
|
+
}
|
|
28
33
|
right={
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
router.push('/settings');
|
|
35
|
-
}}
|
|
36
|
-
/>
|
|
37
|
-
</>
|
|
34
|
+
<ActionIcon
|
|
35
|
+
icon={MessageSquarePlus}
|
|
36
|
+
onClick={() => createSession()}
|
|
37
|
+
size={MOBILE_HEADER_ICON_SIZE}
|
|
38
|
+
/>
|
|
38
39
|
}
|
|
39
40
|
/>
|
|
40
41
|
);
|
|
@@ -1,14 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { Drawer } from 'antd';
|
|
3
|
-
import { useTheme } from 'antd-style';
|
|
4
|
-
import { X } from 'lucide-react';
|
|
1
|
+
import { Modal } from '@lobehub/ui';
|
|
5
2
|
import { PropsWithChildren, memo } from 'react';
|
|
6
3
|
import { useTranslation } from 'react-i18next';
|
|
7
4
|
|
|
8
5
|
import { useGlobalStore } from '@/store/global';
|
|
9
6
|
|
|
10
7
|
const Mobile = memo<PropsWithChildren>(({ children }) => {
|
|
11
|
-
const theme = useTheme();
|
|
12
8
|
const [showAgentSettings, toggleConfig] = useGlobalStore((s) => [
|
|
13
9
|
s.preference.mobileShowTopic,
|
|
14
10
|
s.toggleMobileTopic,
|
|
@@ -17,19 +13,9 @@ const Mobile = memo<PropsWithChildren>(({ children }) => {
|
|
|
17
13
|
const { t } = useTranslation('common');
|
|
18
14
|
|
|
19
15
|
return (
|
|
20
|
-
<
|
|
21
|
-
bodyStyle={{ padding: 0 }}
|
|
22
|
-
closeIcon={<ActionIcon icon={X} size={{ blockSize: 32, fontSize: 20 }} />}
|
|
23
|
-
drawerStyle={{ background: theme.colorBgContainer }}
|
|
24
|
-
headerStyle={{ padding: '8px 4px' }}
|
|
25
|
-
height={'75vh'}
|
|
26
|
-
onClose={() => toggleConfig(false)}
|
|
27
|
-
open={showAgentSettings}
|
|
28
|
-
placement={'bottom'}
|
|
29
|
-
title={t('topic.title')}
|
|
30
|
-
>
|
|
16
|
+
<Modal onCancel={() => toggleConfig(false)} open={showAgentSettings} title={t('topic.title')}>
|
|
31
17
|
{children}
|
|
32
|
-
</
|
|
18
|
+
</Modal>
|
|
33
19
|
);
|
|
34
20
|
});
|
|
35
21
|
|
|
@@ -3,11 +3,12 @@ import { Flexbox } from 'react-layout-kit';
|
|
|
3
3
|
|
|
4
4
|
import AppLayout from '@/layout/AppLayout';
|
|
5
5
|
import { useSwitchSideBarOnInit } from '@/store/global';
|
|
6
|
+
import { SidebarTabKey } from '@/store/global/initialState';
|
|
6
7
|
|
|
7
8
|
import { Sessions } from './features/SessionList';
|
|
8
9
|
|
|
9
10
|
const ChatLayout = memo<PropsWithChildren>(({ children }) => {
|
|
10
|
-
useSwitchSideBarOnInit(
|
|
11
|
+
useSwitchSideBarOnInit(SidebarTabKey.Chat);
|
|
11
12
|
|
|
12
13
|
return (
|
|
13
14
|
<AppLayout>
|
|
@@ -2,12 +2,13 @@ import { memo } from 'react';
|
|
|
2
2
|
|
|
3
3
|
import AppMobileLayout from '@/layout/AppMobileLayout';
|
|
4
4
|
import { useSwitchSideBarOnInit } from '@/store/global';
|
|
5
|
+
import { SidebarTabKey } from '@/store/global/initialState';
|
|
5
6
|
|
|
6
7
|
import { Sessions } from './features/SessionList';
|
|
7
8
|
import Header from './features/SessionList/Header';
|
|
8
9
|
|
|
9
10
|
const ChatMobileLayout = memo(() => {
|
|
10
|
-
useSwitchSideBarOnInit(
|
|
11
|
+
useSwitchSideBarOnInit(SidebarTabKey.Chat);
|
|
11
12
|
|
|
12
13
|
return (
|
|
13
14
|
<AppMobileLayout navBar={<Header />} showTabBar>
|