@lobehub/chat 0.149.5 → 0.150.0

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 (61) hide show
  1. package/CHANGELOG.md +50 -0
  2. package/README.md +8 -8
  3. package/README.zh-CN.md +8 -8
  4. package/docs/self-hosting/examples/ollama.mdx +7 -5
  5. package/docs/self-hosting/examples/ollama.zh-CN.mdx +7 -5
  6. package/docs/self-hosting/platform/docker-compose.zh-CN.mdx +15 -21
  7. package/locales/ar/chat.json +1 -0
  8. package/locales/bg-BG/chat.json +1 -0
  9. package/locales/de-DE/chat.json +1 -0
  10. package/locales/en-US/chat.json +1 -0
  11. package/locales/es-ES/chat.json +1 -0
  12. package/locales/fr-FR/chat.json +1 -0
  13. package/locales/it-IT/chat.json +1 -0
  14. package/locales/ja-JP/chat.json +1 -0
  15. package/locales/ko-KR/chat.json +1 -0
  16. package/locales/nl-NL/chat.json +1 -0
  17. package/locales/pl-PL/chat.json +1 -0
  18. package/locales/pt-BR/chat.json +1 -0
  19. package/locales/ru-RU/chat.json +1 -0
  20. package/locales/tr-TR/chat.json +1 -0
  21. package/locales/vi-VN/chat.json +1 -0
  22. package/locales/zh-CN/chat.json +1 -0
  23. package/locales/zh-TW/chat.json +1 -0
  24. package/package.json +2 -1
  25. package/src/app/chat/(desktop)/features/ChatHeader/HeaderAction.tsx +4 -1
  26. package/src/app/chat/(desktop)/features/SideBar/index.tsx +3 -1
  27. package/src/app/chat/(mobile)/features/SessionHeader.tsx +10 -5
  28. package/src/app/chat/(mobile)/mobile/ChatHeader/index.tsx +5 -1
  29. package/src/app/chat/_layout/Desktop/SessionHeader.tsx +13 -9
  30. package/src/app/chat/features/PluginTag/index.tsx +3 -1
  31. package/src/app/chat/features/SessionListContent/List/index.tsx +11 -1
  32. package/src/app/chat/settings/layout.tsx +14 -0
  33. package/src/app/settings/features/SettingList/index.tsx +11 -3
  34. package/src/app/settings/llm/OpenAI/index.tsx +15 -8
  35. package/src/app/settings/llm/layout.tsx +11 -0
  36. package/src/app/settings/sync/components/SystemIcon.tsx +11 -3
  37. package/src/app/settings/sync/layout.tsx +12 -0
  38. package/src/app/settings/sync/page.tsx +8 -3
  39. package/src/config/featureFlags/index.test.ts +55 -0
  40. package/src/config/featureFlags/index.ts +48 -0
  41. package/src/config/server/featureFlags/index.ts +29 -0
  42. package/src/config/server/featureFlags/parser.test.ts +88 -0
  43. package/src/config/server/featureFlags/parser.ts +32 -0
  44. package/src/features/AgentSetting/AgentPlugin/index.tsx +3 -1
  45. package/src/features/AgentSetting/store/index.ts +3 -9
  46. package/src/features/ChatInput/ActionBar/Tools/index.tsx +65 -63
  47. package/src/layout/GlobalProvider/index.tsx +7 -1
  48. package/src/libs/agent-runtime/ollama/index.ts +1 -1
  49. package/src/locales/default/chat.ts +1 -0
  50. package/src/services/ollama.ts +1 -2
  51. package/src/store/featureFlags/Provider.tsx +18 -0
  52. package/src/store/featureFlags/index.ts +3 -0
  53. package/src/store/featureFlags/selectors.ts +5 -0
  54. package/src/store/featureFlags/store.ts +42 -0
  55. package/src/store/global/selectors.ts +8 -3
  56. package/src/store/tool/selectors/tool.test.ts +75 -21
  57. package/src/store/tool/selectors/tool.ts +8 -6
  58. package/src/store/tool/slices/builtin/initialState.ts +1 -2
  59. package/src/store/tool/slices/builtin/selectors.test.ts +41 -58
  60. package/src/store/tool/slices/builtin/selectors.ts +12 -12
  61. package/src/utils/zustand.ts +8 -0
package/CHANGELOG.md CHANGED
@@ -2,6 +2,56 @@
2
2
 
3
3
  # Changelog
4
4
 
5
+ ## [Version 0.150.0](https://github.com/lobehub/lobe-chat/compare/v0.149.6...v0.150.0)
6
+
7
+ <sup>Released on **2024-04-26**</sup>
8
+
9
+ #### ✨ Features
10
+
11
+ - **misc**: Support feature flags.
12
+
13
+ <br/>
14
+
15
+ <details>
16
+ <summary><kbd>Improvements and Fixes</kbd></summary>
17
+
18
+ #### What's improved
19
+
20
+ - **misc**: Support feature flags, closes [#2213](https://github.com/lobehub/lobe-chat/issues/2213) ([4532be5](https://github.com/lobehub/lobe-chat/commit/4532be5))
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.149.6](https://github.com/lobehub/lobe-chat/compare/v0.149.5...v0.149.6)
31
+
32
+ <sup>Released on **2024-04-26**</sup>
33
+
34
+ #### 🐛 Bug Fixes
35
+
36
+ - **misc**: Fix ollama host issue.
37
+
38
+ <br/>
39
+
40
+ <details>
41
+ <summary><kbd>Improvements and Fixes</kbd></summary>
42
+
43
+ #### What's fixed
44
+
45
+ - **misc**: Fix ollama host issue, closes [#2210](https://github.com/lobehub/lobe-chat/issues/2210) ([c49d4c7](https://github.com/lobehub/lobe-chat/commit/c49d4c7))
46
+
47
+ </details>
48
+
49
+ <div align="right">
50
+
51
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top)
52
+
53
+ </div>
54
+
5
55
  ### [Version 0.149.5](https://github.com/lobehub/lobe-chat/compare/v0.149.4...v0.149.5)
6
56
 
7
57
  <sup>Released on **2024-04-25**</sup>
package/README.md CHANGED
@@ -260,14 +260,14 @@ Our marketplace is not just a showcase platform but also a collaborative space.
260
260
 
261
261
  <!-- AGENT LIST -->
262
262
 
263
- | Recent Submits | Description |
264
- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
265
- | [Chinese Academic Paper Editor](https://chat-preview.lobehub.com/market?agent=chinese-paper-polishing)<br/><sup>By **[y22emc2](https://github.com/y22emc2)** on **2024-04-15**</sup> | As an assistant for improving Chinese academic paper writing, your task is to enhance the provided text in terms of spelling, grammar, clarity, conciseness, and overall readability, to improve the text's academic standards and literary quality. This includes breaking down long sentences, reducing repetition, and providing improvement suggestions. Please provide the corrected version of the text first, then list the modifications in the markdown table below, along with the reasons for the changes.<br/>`academic-paper-writing` `proofreading` `text-editing` |
266
- | [Biology Professor](https://chat-preview.lobehub.com/market?agent=bio-professor)<br/><sup>By **[luxiangze](https://github.com/luxiangze)** on **2024-04-13**</sup> | As a biology professor, you will receive questions and concepts about biology. Please explain these questions and concepts in specific and concise language, and try to use practical examples to illustrate them to help your audience better understand. Please ensure that your explanations are accurate and clear, and try to encourage creative and flexible answers. Respond in Chinese.<br/>`biology` |
267
- | [Master of Fortune Telling](https://chat-preview.lobehub.com/market?agent=fortune-teller)<br/><sup>By **[kamilkenrich](https://github.com/kamilkenrich)** on **2024-04-13**</sup> | Specializes in numerology, divination, astrology, and blood type analysis<br/>`numerology` `divination` `astrology` `psychology` `blood-type` `constellation` |
268
- | [High School Science Study Assistant](https://chat-preview.lobehub.com/market?agent=highschool-master)<br/><sup>By **[cnliucheng](https://github.com/cnliucheng)** on **2024-04-13**</sup> | I am a study assistant AI specially designed for Chinese high school students. Whether you encounter difficulties in physics, chemistry, mathematics, or biology, I can provide detailed answers and explanations for you. Not only that, I can also recommend suitable practice questions based on your learning progress to help you consolidate knowledge and improve learning efficiency. Additionally, I will use LaTeX format as much as possible to present the solution process and formulas.<br/>`high-school-study` `science-assistant` `problem-solving` `learning-progress` `la-te-x` |
269
-
270
- > 📊 Total agents: [<kbd>**240**</kbd> ](https://github.com/lobehub/lobe-chat-agents)
263
+ | Recent Submits | Description |
264
+ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
265
+ | [yapi JSON-SCHEMA to Typescript](https://chat-preview.lobehub.com/market?agent=yapi-ts-helper)<br/><sup>By **[zcf0508](https://github.com/zcf0508)** on **2024-04-26**</sup> | Specializes in converting JSON schema to TypeScript types.<br/>`typescript` `development` |
266
+ | [Chinese Academic Paper Editor](https://chat-preview.lobehub.com/market?agent=chinese-paper-polishing)<br/><sup>By **[y22emc2](https://github.com/y22emc2)** on **2024-04-15**</sup> | As an assistant for improving Chinese academic paper writing, your task is to enhance the provided text in terms of spelling, grammar, clarity, conciseness, and overall readability, to improve the text's academic standards and literary quality. This includes breaking down long sentences, reducing repetition, and providing improvement suggestions. Please provide the corrected version of the text first, then list the modifications in the markdown table below, along with the reasons for the changes.<br/>`academic-paper-writing` `proofreading` `text-editing` |
267
+ | [Biology Professor](https://chat-preview.lobehub.com/market?agent=bio-professor)<br/><sup>By **[luxiangze](https://github.com/luxiangze)** on **2024-04-13**</sup> | As a biology professor, you will receive questions and concepts about biology. Please explain these questions and concepts in specific and concise language, and try to use practical examples to illustrate them to help your audience better understand. Please ensure that your explanations are accurate and clear, and try to encourage creative and flexible answers. Respond in Chinese.<br/>`biology` |
268
+ | [Master of Fortune Telling](https://chat-preview.lobehub.com/market?agent=fortune-teller)<br/><sup>By **[kamilkenrich](https://github.com/kamilkenrich)** on **2024-04-13**</sup> | Specializes in numerology, divination, astrology, and blood type analysis<br/>`numerology` `divination` `astrology` `psychology` `blood-type` `constellation` |
269
+
270
+ > 📊 Total agents: [<kbd>**241**</kbd> ](https://github.com/lobehub/lobe-chat-agents)
271
271
 
272
272
  <!-- AGENT LIST -->
273
273
 
package/README.zh-CN.md CHANGED
@@ -248,14 +248,14 @@ LobeChat 的插件生态系统是其核心功能的重要扩展,它极大地
248
248
 
249
249
  <!-- AGENT LIST -->
250
250
 
251
- | 最近新增 | 助手说明 |
252
- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
253
- | [中文论文编辑师](https://chat-preview.lobehub.com/market?agent=chinese-paper-polishing)<br/><sup>By **[y22emc2](https://github.com/y22emc2)** on **2024-04-15**</sup> | 作为一名中文学术论文写作改进助理,你的任务是改进所提供文本的拼写、语法、清晰、简洁和整体可读性,提高文本的学术规范性、文学性,同时分解长句,减少重复,并提供改进建议。请先提供文本的更正版本,然后在 markdown 表格中列出修改的内容,并给出修改的理由。<br/>`学术论文写作` `校对` `文本编辑` |
254
- | [生物学教授](https://chat-preview.lobehub.com/market?agent=bio-professor)<br/><sup>By **[luxiangze](https://github.com/luxiangze)** on **2024-04-13**</sup> | 作为一位生物学教授,您将收到关于生物学的问题和概念,请用具体而简明的语言解释这些问题和概念,并尽量使用实际例子进行说明,以帮助您的听众更好地理解。请确保您的解释准确而清晰,并试图鼓励创造性和灵活性的答案。用中文回答<br/>`生物` |
255
- | [命理大师](https://chat-preview.lobehub.com/market?agent=fortune-teller)<br/><sup>By **[kamilkenrich](https://github.com/kamilkenrich)** on **2024-04-13**</sup> | 擅长命理学、占卜预测、占星术和血型学分析<br/>`命理学、占卜、占星学、心理学、血型、星座` |
256
- | [高中理科学习助手](https://chat-preview.lobehub.com/market?agent=highschool-master)<br/><sup>By **[cnliucheng](https://github.com/cnliucheng)** on **2024-04-13**</sup> | 我是一个专门为中国高中生设计的学习辅助 AI。无论你在物理、化学、数学还是生物上遇到难题,我都能为你提供详细的解答和解析。不仅如此,我还能根据你的学习进度,推荐合适的练习题,帮助我巩固知识,提升学习效率。同时,我会尽可能使用 LaTeX 格式来呈现解题过程和公式<br/>`高中学习` `理科辅助` `题目解答` `学习进度` `la-te-x` |
257
-
258
- > 📊 Total agents: [<kbd>**240**</kbd> ](https://github.com/lobehub/lobe-chat-agents)
251
+ | 最近新增 | 助手说明 |
252
+ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
253
+ | [yapi JSON-SCHEMA to Typescript](https://chat-preview.lobehub.com/market?agent=yapi-ts-helper)<br/><sup>By **[zcf0508](https://github.com/zcf0508)** on **2024-04-26**</sup> | 擅长将 JSON schema 转换为 TypeScript 类型。<br/>`typescript` `开发` |
254
+ | [中文论文编辑师](https://chat-preview.lobehub.com/market?agent=chinese-paper-polishing)<br/><sup>By **[y22emc2](https://github.com/y22emc2)** on **2024-04-15**</sup> | 作为一名中文学术论文写作改进助理,你的任务是改进所提供文本的拼写、语法、清晰、简洁和整体可读性,提高文本的学术规范性、文学性,同时分解长句,减少重复,并提供改进建议。请先提供文本的更正版本,然后在 markdown 表格中列出修改的内容,并给出修改的理由。<br/>`学术论文写作` `校对` `文本编辑` |
255
+ | [生物学教授](https://chat-preview.lobehub.com/market?agent=bio-professor)<br/><sup>By **[luxiangze](https://github.com/luxiangze)** on **2024-04-13**</sup> | 作为一位生物学教授,您将收到关于生物学的问题和概念,请用具体而简明的语言解释这些问题和概念,并尽量使用实际例子进行说明,以帮助您的听众更好地理解。请确保您的解释准确而清晰,并试图鼓励创造性和灵活性的答案。用中文回答<br/>`生物` |
256
+ | [命理大师](https://chat-preview.lobehub.com/market?agent=fortune-teller)<br/><sup>By **[kamilkenrich](https://github.com/kamilkenrich)** on **2024-04-13**</sup> | 擅长命理学、占卜预测、占星术和血型学分析<br/>`命理学、占卜、占星学、心理学、血型、星座` |
257
+
258
+ > 📊 Total agents: [<kbd>**241**</kbd> ](https://github.com/lobehub/lobe-chat-agents)
259
259
 
260
260
  <!-- AGENT LIST -->
261
261
 
@@ -40,11 +40,13 @@ When you first initiate Ollama, it is configured to allow access only from the l
40
40
 
41
41
  ### Ollama Environment Variables
42
42
 
43
- `OLLAMA_HOST` The host:port to bind to (default "127.0.0.1:11434")
44
- `OLLAMA_ORIGINS` A comma separated list of allowed origins.
45
- `OLLAMA_MODELS` The path to the models directory (default is "~/.ollama/models")
46
- `OLLAMA_KEEP_ALIVE` The duration that models stay loaded in memory (default is "5m")
47
- `OLLAMA_DEBUG` Set to 1 to enable additional debug logging
43
+ | Environment Variable | Description | Default Value | Additional Information |
44
+ | -------------------- | ----------------------------------- | --------------------------------------------------- | ---------------------------------------------------- |
45
+ | `OLLAMA_HOST` | Specifies the host and port for binding | "127.0.0.1:11434" | Use "0.0.0.0:port" to make the service accessible from any machine |
46
+ | `OLLAMA_ORIGINS` | Comma-separated list of permitted cross-origin sources | Restricted to local access | Set to "*" to avoid CORS, please set on demand |
47
+ | `OLLAMA_MODELS` | Path to the directory where models are located | "~/.ollama/models" or "/usr/share/ollama/.ollama/models" | Can be customized based on requirements |
48
+ | `OLLAMA_KEEP_ALIVE` | Duration that the model stays loaded in GPU memory | "5m" | Dynamically loading and unloading models can reduce GPU load but may increase disk I/O |
49
+ | `OLLAMA_DEBUG` | Enable additional debugging logs by setting to 1 | Typically disabled | |
48
50
 
49
51
  ### Setting environment variables on Windows
50
52
 
@@ -38,11 +38,13 @@ docker run -d -p 3210:3210 -e OLLAMA_PROXY_URL=http://host.docker.internal:11434
38
38
 
39
39
  ### Ollama 环境变量
40
40
 
41
- `OLLAMA_HOST` 绑定的主机:端口 (默认 "127.0.0.1:11434")
42
- `OLLAMA_ORIGINS` 允许的源的逗号分隔列表。
43
- `OLLAMA_MODELS` 模型目录的路径 (默认是 "~/.ollama/models")
44
- `OLLAMA_KEEP_ALIVE` 模型在内存中保持加载的持续时间 (默认是 "5m")
45
- `OLLAMA_DEBUG` 设置为 1 以启用额外的调试日志
41
+ | 环境变量 | 描述 | 默认值 | 附加说明 |
42
+ | ---------- | -------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- |
43
+ | `OLLAMA_HOST` | 绑定的主机和端口 | "127.0.0.1:11434" | 设置 0.0.0.0:端口号 可以指定所有人访问特定端口 |
44
+ | `OLLAMA_ORIGINS` | 允许的跨域源列表,逗号分隔 | 仅本地访问 | 设置 "*" 可以避免 CORS 跨域错误,按需设置 |
45
+ | `OLLAMA_MODELS` | 模型存放的路径 | "~/.ollama/models" 或 "/usr/share/ollama/.ollama/models" | 按需指定 |
46
+ | `OLLAMA_KEEP_ALIVE` | 模型在显存中保持加载的持续时间 | "5m" | 按需加载和释放显存可以有效降低显卡压力,但会增加硬盘读写 |
47
+ | `OLLAMA_DEBUG` | 设置为 1 以启用额外的调试日志 | 默认关闭 | |
46
48
 
47
49
  ### 在 Windows 上设置环境变量
48
50
 
@@ -13,15 +13,15 @@ tags:
13
13
 
14
14
  <div style={{display:"flex", gap: 4}}>
15
15
 
16
- [![][docker-release-shield]][docker-release-link]
16
+ [![](https://img.shields.io/docker/v/lobehub/lobe-chat?color=369eff&label=docker&labelColor=black&logo=docker&logoColor=white&style=flat-square)](https://hub.docker.com/r/lobehub/lobe-chat)
17
17
 
18
- [![][docker-size-shield]][docker-size-link]
18
+ [![](https://img.shields.io/docker/image-size/lobehub/lobe-chat?color=369eff&labelColor=black&style=flat-square)](https://img.shields.io/docker/image-size/lobehub/lobe-chat?color=369eff&labelColor=black&style=flat-square)
19
19
 
20
- [![][docker-pulls-shield]][docker-pulls-link]
20
+ [![](https://img.shields.io/docker/pulls/lobehub/lobe-chat?color=45cc11&labelColor=black&style=flat-square)](https://img.shields.io/docker/pulls/lobehub/lobe-chat?color=45cc11&labelColor=black&style=flat-square)
21
21
 
22
22
  </div>
23
23
 
24
- 我们提供了 [Docker 镜像][docker-release-link],供你在自己的私有设备上部署 LobeChat 服务。
24
+ 我们提供了 [Docker 镜像](https://hub.docker.com/r/lobehub/lobe-chat) ,供你在自己的私有设备上部署 LobeChat 服务。
25
25
 
26
26
  <Steps>
27
27
 
@@ -57,16 +57,17 @@ $ yum install docker
57
57
  version: '3.8'
58
58
 
59
59
  services:
60
- lobe-chat:
61
- image: lobehub/lobe-chat
62
- container_name: lobe-chat
63
- restart: always
64
- ports:
65
- - '3210:3210'
66
- environment:
67
- OPENAI_API_KEY: sk-xxxx
68
- OPENAI_PROXY_URL: https://api-proxy.com/v1
69
- ACCESS_CODE: lobe66
60
+ lobe-chat:
61
+ image: lobehub/lobe-chat
62
+ container_name: lobe-chat
63
+ restart: always
64
+ ports:
65
+ - '3210:3210'
66
+ environment:
67
+ OPENAI_API_KEY: sk-xxxx
68
+ OPENAI_PROXY_URL: https://api-proxy.com/v1
69
+ ACCESS_CODE: lobe66
70
+
70
71
  ```
71
72
 
72
73
  运行以下命令启动 Lobe Chat 服务:
@@ -131,10 +132,3 @@ Configure Crontab to execute the script every 5 minutes:
131
132
  ```
132
133
 
133
134
  </Steps>
134
-
135
- [docker-pulls-link]: https://hub.docker.com/r/lobehub/lobe-chat
136
- [docker-pulls-shield]: https://img.shields.io/docker/pulls/lobehub/lobe-chat?color=45cc11&labelColor=black&style=flat-square
137
- [docker-release-link]: https://hub.docker.com/r/lobehub/lobe-chat
138
- [docker-release-shield]: https://img.shields.io/docker/v/lobehub/lobe-chat?color=369eff&label=docker&labelColor=black&logo=docker&logoColor=white&style=flat-square
139
- [docker-size-link]: https://hub.docker.com/r/lobehub/lobe-chat
140
- [docker-size-shield]: https://img.shields.io/docker/image-size/lobehub/lobe-chat?color=369eff&labelColor=black&style=flat-square
@@ -18,6 +18,7 @@
18
18
  "title": "{{title}} نسخة"
19
19
  },
20
20
  "duplicateTitle": "{{title}} نسخة",
21
+ "emptyAgent": "لا يوجد مساعد",
21
22
  "historyRange": "نطاق التاريخ",
22
23
  "inbox": {
23
24
  "defaultMessage": "مرحبًا، أنا مساعدك الذكي، يمكنك أن تسألني أي شيء وسأحاول الإجابة عليك. إذا كنت بحاجة إلى مساعد أكثر احترافية أو مخصصة، يمكنك النقر على `+` لإنشاء مساعد مخصص",
@@ -18,6 +18,7 @@
18
18
  "title": "{{title}} Копие"
19
19
  },
20
20
  "duplicateTitle": "{{title}} Копие",
21
+ "emptyAgent": "Няма наличен асистент",
21
22
  "historyRange": "Диапазон на историята",
22
23
  "inbox": {
23
24
  "defaultMessage": "Здравей, аз съм твоят виртуален агент. Можеш да ме питаш всичко и аз ще направя всичко възможно да ти отговоря. Ако имаш нужда от по-професионален или персонализиран агент, кликни върху `+` за да създадеш такъв.",
@@ -18,6 +18,7 @@
18
18
  "title": "{{title}} Kopie"
19
19
  },
20
20
  "duplicateTitle": "{{title}} Kopie",
21
+ "emptyAgent": "Kein Assistent verfügbar",
21
22
  "historyRange": "Verlaufsbereich",
22
23
  "inbox": {
23
24
  "defaultMessage": "Hallo, ich bin dein intelligenter Assistent. Du kannst mir jede Frage stellen, und ich werde mein Bestes tun, um sie zu beantworten. Wenn du einen professionelleren oder maßgeschneiderten Assistenten benötigst, klicke auf das `+`, um einen benutzerdefinierten Assistenten zu erstellen.",
@@ -18,6 +18,7 @@
18
18
  "title": "{{title}} Copy"
19
19
  },
20
20
  "duplicateTitle": "{{title}} Copy",
21
+ "emptyAgent": "No assistant available",
21
22
  "historyRange": "History Range",
22
23
  "inbox": {
23
24
  "defaultMessage": "Hello, I'm your virtual agent. You can ask me anything, and I'll do my best to answer you. If you need a more professional or customized agent, click on `+` to create a custom agent.",
@@ -18,6 +18,7 @@
18
18
  "title": "{{title}} Copia"
19
19
  },
20
20
  "duplicateTitle": "{{title}} Copia",
21
+ "emptyAgent": "No hay asistente disponible",
21
22
  "historyRange": "Rango de historial",
22
23
  "inbox": {
23
24
  "defaultMessage": "Hola, soy tu asistente virtual, puedes preguntarme cualquier cosa y haré todo lo posible para responderte. Si necesitas un asistente más profesional o personalizado, haz clic en `+` para crear un asistente personalizado.",
@@ -18,6 +18,7 @@
18
18
  "title": "{{title}} Copie"
19
19
  },
20
20
  "duplicateTitle": "{{title}} Copie",
21
+ "emptyAgent": "Aucun assistant disponible",
21
22
  "historyRange": "Plage d'historique",
22
23
  "inbox": {
23
24
  "defaultMessage": "Bonjour, je suis votre agent virtuel. Vous pouvez me poser n'importe quelle question et je ferai de mon mieux pour vous répondre. Si vous avez besoin d'un agent plus professionnel ou personnalisé, cliquez sur le `+` pour créer un agent personnalisé.",
@@ -18,6 +18,7 @@
18
18
  "title": "{{title}} Copia"
19
19
  },
20
20
  "duplicateTitle": "{{title}} Copia",
21
+ "emptyAgent": "Nessun assistente disponibile",
21
22
  "historyRange": "Intervallo cronologico",
22
23
  "inbox": {
23
24
  "defaultMessage": "Ciao, sono il tuo assistente virtuale, puoi chiedermi qualsiasi cosa e farò del mio meglio per risponderti. Se hai bisogno di un assistente più professionale o personalizzato, clicca su `+` per creare un assistente personalizzato.",
@@ -18,6 +18,7 @@
18
18
  "title": "{{title}} のコピー"
19
19
  },
20
20
  "duplicateTitle": "{{title}} のコピー",
21
+ "emptyAgent": "エージェントがいません",
21
22
  "historyRange": "履歴範囲",
22
23
  "inbox": {
23
24
  "defaultMessage": "こんにちは、私はあなたのスマートアシスタントです。何か質問があれば遠慮なく聞いてください。より専門的でカスタマイズされたアシスタントが必要な場合は、`+` をクリックしてカスタムエージェントを作成できます。",
@@ -18,6 +18,7 @@
18
18
  "title": "{{title}} 복사본"
19
19
  },
20
20
  "duplicateTitle": "{{title}} 복사본",
21
+ "emptyAgent": "도우미가 없습니다",
21
22
  "historyRange": "대화 기록 범위",
22
23
  "inbox": {
23
24
  "defaultMessage": "안녕하세요, 저는 당신의 인공지능 도우미입니다. 어떤 질문이든 물어보세요. 최선을 다해 답변해 드리겠습니다. 더 전문적이거나 맞춤형 도우미가 필요하다면 `+`를 클릭하여 사용자 정의 도우미를 만들 수 있습니다.",
@@ -18,6 +18,7 @@
18
18
  "title": "{{title}} Kopie"
19
19
  },
20
20
  "duplicateTitle": "{{title}} Kopie",
21
+ "emptyAgent": "Geen assistent beschikbaar",
21
22
  "historyRange": "Geschiedenisbereik",
22
23
  "inbox": {
23
24
  "defaultMessage": "Hallo, ik ben je slimme assistent. Je kunt me alles vragen en ik zal mijn best doen om je te antwoorden. Als je een meer professionele of op maat gemaakte assistent nodig hebt, klik dan op het `+`-teken om een aangepaste assistent te maken.",
@@ -18,6 +18,7 @@
18
18
  "title": "{{title}} - kopia"
19
19
  },
20
20
  "duplicateTitle": "{{title}} kopia",
21
+ "emptyAgent": "Brak asystenta",
21
22
  "historyRange": "Zakres historii",
22
23
  "inbox": {
23
24
  "defaultMessage": "Cześć, jestem twoim inteligentnym asystentem, możesz zadać mi dowolne pytanie, postaram się na nie odpowiedzieć. Jeśli potrzebujesz bardziej profesjonalnego lub spersonalizowanego asystenta, kliknij `+`, aby utworzyć niestandardowego asystenta.",
@@ -18,6 +18,7 @@
18
18
  "title": "{{title}} Cópia"
19
19
  },
20
20
  "duplicateTitle": "{{title}} Cópia",
21
+ "emptyAgent": "Sem assistente disponível",
21
22
  "historyRange": "Intervalo de Histórico",
22
23
  "inbox": {
23
24
  "defaultMessage": "Olá, eu sou seu assistente virtual, você pode me perguntar qualquer coisa e eu farei o meu melhor para responder. Se precisar de um assistente mais profissional ou personalizado, clique em `+` para criar um assistente personalizado.",
@@ -18,6 +18,7 @@
18
18
  "title": "{{title}} Копия"
19
19
  },
20
20
  "duplicateTitle": "{{title}} Копия",
21
+ "emptyAgent": "Нет ассистента",
21
22
  "historyRange": "История сообщений",
22
23
  "inbox": {
23
24
  "defaultMessage": "Привет, я твой виртуальный помощник. Ты можешь задать мне любой вопрос, и я постараюсь на него ответить. Если тебе нужен более профессиональный или настраиваемый помощник, нажми на `+`, чтобы создать пользовательского помощника.",
@@ -18,6 +18,7 @@
18
18
  "title": "{{title}} Kopyası"
19
19
  },
20
20
  "duplicateTitle": "{{title}} Kopya",
21
+ "emptyAgent": "Asistan yok",
21
22
  "historyRange": "Geçmiş Aralığı",
22
23
  "inbox": {
23
24
  "defaultMessage": "Merhaba, ben sanal asistanınızım. Bana herhangi bir şey sorabilirsiniz ve size cevap vermek için elimden geleni yapacağım. Daha profesyonel veya özelleştirilmiş bir asistana ihtiyacınız varsa, özel bir asistan oluşturmak için `+` simgesine tıklayabilirsiniz.",
@@ -18,6 +18,7 @@
18
18
  "title": "{{title}} Bản sao"
19
19
  },
20
20
  "duplicateTitle": "{{title}} Bản sao",
21
+ "emptyAgent": "Không có trợ lý",
21
22
  "historyRange": "Phạm vi lịch sử",
22
23
  "inbox": {
23
24
  "defaultMessage": "Xin chào, tôi là trợ lý thông minh của bạn, bạn có thể hỏi tôi bất kỳ câu hỏi nào và tôi sẽ cố gắng trả lời. Nếu bạn cần một trợ lý chuyên nghiệp hoặc tùy chỉnh hơn, hãy nhấn `+` để tạo trợ lý tùy chỉnh.",
@@ -18,6 +18,7 @@
18
18
  "title": "{{title}} 副本"
19
19
  },
20
20
  "duplicateTitle": "{{title}} 副本",
21
+ "emptyAgent": "暂无助手",
21
22
  "historyRange": "历史范围",
22
23
  "inbox": {
23
24
  "defaultMessage": "你好,我是你的智能助手,你可以问我任何问题,我会尽力回答你。如果需要获得更加专业或定制的助手,可以点击`+`创建自定义助手",
@@ -18,6 +18,7 @@
18
18
  "title": "{{title}} 副本"
19
19
  },
20
20
  "duplicateTitle": "{{title}} 副本",
21
+ "emptyAgent": "暫無助手",
21
22
  "historyRange": "歷史範圍",
22
23
  "inbox": {
23
24
  "defaultMessage": "你好,我是你的智能助手,你可以問我任何問題,我會盡力回答你。如果需要獲得更專業或定制的助手,可以點擊`+`創建自定義助手",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lobehub/chat",
3
- "version": "0.149.5",
3
+ "version": "0.150.0",
4
4
  "description": "Lobe Chat - an open-source, high-performance chatbot framework that supports speech synthesis, multimodal, and extensible Function Call plugin system. Supports one-click free deployment of your private ChatGPT/LLM web application.",
5
5
  "keywords": [
6
6
  "framework",
@@ -95,6 +95,7 @@
95
95
  "@lobehub/ui": "^1.138.8",
96
96
  "@next/third-parties": "^14.2.2",
97
97
  "@sentry/nextjs": "^7.111.0",
98
+ "@t3-oss/env-nextjs": "^0.10.1",
98
99
  "@vercel/analytics": "^1.2.2",
99
100
  "@vercel/speed-insights": "^1.0.10",
100
101
  "ahooks": "^3.7.11",
@@ -4,6 +4,7 @@ import { memo } from 'react';
4
4
  import { useTranslation } from 'react-i18next';
5
5
 
6
6
  import { DESKTOP_HEADER_ICON_SIZE } from '@/const/layoutTokens';
7
+ import { featureFlagsSelectors, useFeatureFlagStore } from '@/store/featureFlags';
7
8
  import { useGlobalStore } from '@/store/global';
8
9
 
9
10
  import SettingButton from '../../../features/SettingButton';
@@ -17,6 +18,8 @@ const HeaderAction = memo(() => {
17
18
  s.toggleChatSideBar,
18
19
  ]);
19
20
 
21
+ const { isAgentEditable } = useFeatureFlagStore(featureFlagsSelectors);
22
+
20
23
  return (
21
24
  <>
22
25
  <ShareButton />
@@ -26,7 +29,7 @@ const HeaderAction = memo(() => {
26
29
  size={DESKTOP_HEADER_ICON_SIZE}
27
30
  title={t('roleAndArchive')}
28
31
  />
29
- <SettingButton />
32
+ {isAgentEditable && <SettingButton />}
30
33
  </>
31
34
  );
32
35
  });
@@ -6,6 +6,7 @@ import { memo } from 'react';
6
6
  import TopicListContent from '@/app/chat/features/TopicListContent';
7
7
  import SafeSpacing from '@/components/SafeSpacing';
8
8
  import { CHAT_SIDEBAR_WIDTH } from '@/const/layoutTokens';
9
+ import { featureFlagsSelectors, useFeatureFlagStore } from '@/store/featureFlags';
9
10
  import { useGlobalStore } from '@/store/global';
10
11
  import { useSessionStore } from '@/store/session';
11
12
  import { sessionSelectors } from '@/store/session/selectors';
@@ -34,6 +35,7 @@ const Desktop = memo(() => {
34
35
  s.toggleChatSideBar,
35
36
  ]);
36
37
 
38
+ const { isAgentEditable: showSystemRole } = useFeatureFlagStore(featureFlagsSelectors);
37
39
  const isInbox = useSessionStore(sessionSelectors.isInboxSession);
38
40
 
39
41
  return (
@@ -58,7 +60,7 @@ const Desktop = memo(() => {
58
60
  }}
59
61
  >
60
62
  <SafeSpacing />
61
- {!isInbox && <SystemRole />}
63
+ {showSystemRole && !isInbox && <SystemRole />}
62
64
  <TopicListContent />
63
65
  </DraggablePanelContainer>
64
66
  </DraggablePanel>
@@ -7,6 +7,7 @@ import { Flexbox } from 'react-layout-kit';
7
7
 
8
8
  import { MOBILE_HEADER_ICON_SIZE } from '@/const/layoutTokens';
9
9
  import SyncStatusInspector from '@/features/SyncStatusInspector';
10
+ import { featureFlagsSelectors, useFeatureFlagStore } from '@/store/featureFlags';
10
11
  import { useGlobalStore } from '@/store/global';
11
12
  import { commonSelectors } from '@/store/global/selectors';
12
13
  import { useSessionStore } from '@/store/session';
@@ -26,6 +27,8 @@ const Header = memo(() => {
26
27
  const [createSession] = useSessionStore((s) => [s.createSession]);
27
28
  const router = useRouter();
28
29
  const avatar = useGlobalStore(commonSelectors.userAvatar);
30
+ const { showCreateSession } = useFeatureFlagStore(featureFlagsSelectors);
31
+
29
32
  return (
30
33
  <MobileNavBar
31
34
  left={
@@ -38,11 +41,13 @@ const Header = memo(() => {
38
41
  </Flexbox>
39
42
  }
40
43
  right={
41
- <ActionIcon
42
- icon={MessageSquarePlus}
43
- onClick={() => createSession()}
44
- size={MOBILE_HEADER_ICON_SIZE}
45
- />
44
+ showCreateSession && (
45
+ <ActionIcon
46
+ icon={MessageSquarePlus}
47
+ onClick={() => createSession()}
48
+ size={MOBILE_HEADER_ICON_SIZE}
49
+ />
50
+ )
46
51
  }
47
52
  style={mobileHeaderSticky}
48
53
  />
@@ -2,6 +2,8 @@ import { MobileNavBar } from '@lobehub/ui';
2
2
  import { useRouter } from 'next/navigation';
3
3
  import { memo, useState } from 'react';
4
4
 
5
+ import { featureFlagsSelectors, useFeatureFlagStore } from '@/store/featureFlags';
6
+
5
7
  import SettingButton from '../../../features/SettingButton';
6
8
  import ShareButton from '../../../features/ShareButton';
7
9
  import ChatHeaderTitle from './ChatHeaderTitle';
@@ -10,6 +12,8 @@ const MobileHeader = memo(() => {
10
12
  const router = useRouter();
11
13
  const [open, setOpen] = useState(false);
12
14
 
15
+ const { isAgentEditable } = useFeatureFlagStore(featureFlagsSelectors);
16
+
13
17
  // const items: MenuProps['items'] = [
14
18
  // {
15
19
  // icon: <Icon icon={Share2} />,
@@ -32,7 +36,7 @@ const MobileHeader = memo(() => {
32
36
  right={
33
37
  <>
34
38
  <ShareButton mobile open={open} setOpen={setOpen} />
35
- <SettingButton mobile />
39
+ {isAgentEditable && <SettingButton mobile />}
36
40
  {/*<Dropdown*/}
37
41
  {/* menu={{*/}
38
42
  {/* items,*/}
@@ -8,6 +8,7 @@ import { Flexbox } from 'react-layout-kit';
8
8
  import { DESKTOP_HEADER_ICON_SIZE } from '@/const/layoutTokens';
9
9
  import SyncStatusTag from '@/features/SyncStatusInspector';
10
10
  import { useActionSWR } from '@/libs/swr';
11
+ import { featureFlagsSelectors, useFeatureFlagStore } from '@/store/featureFlags';
11
12
  import { useSessionStore } from '@/store/session';
12
13
 
13
14
  import SessionSearchBar from '../../features/SessionSearchBar';
@@ -26,6 +27,7 @@ const Header = memo(() => {
26
27
  const { styles } = useStyles();
27
28
  const { t } = useTranslation('chat');
28
29
  const [createSession] = useSessionStore((s) => [s.createSession]);
30
+ const { enableWebrtc, showCreateSession } = useFeatureFlagStore(featureFlagsSelectors);
29
31
 
30
32
  const { mutate, isValidating } = useActionSWR('session.createSession', () => createSession());
31
33
 
@@ -34,16 +36,18 @@ const Header = memo(() => {
34
36
  <Flexbox distribution={'space-between'} horizontal>
35
37
  <Flexbox align={'center'} gap={4} horizontal>
36
38
  <Logo className={styles.logo} size={36} type={'text'} />
37
- <SyncStatusTag />
39
+ {enableWebrtc && <SyncStatusTag />}
38
40
  </Flexbox>
39
- <ActionIcon
40
- icon={MessageSquarePlus}
41
- loading={isValidating}
42
- onClick={() => mutate()}
43
- size={DESKTOP_HEADER_ICON_SIZE}
44
- style={{ flex: 'none' }}
45
- title={t('newAgent')}
46
- />
41
+ {showCreateSession && (
42
+ <ActionIcon
43
+ icon={MessageSquarePlus}
44
+ loading={isValidating}
45
+ onClick={() => mutate()}
46
+ size={DESKTOP_HEADER_ICON_SIZE}
47
+ style={{ flex: 'none' }}
48
+ title={t('newAgent')}
49
+ />
50
+ )}
47
51
  </Flexbox>
48
52
  <SessionSearchBar />
49
53
  </Flexbox>
@@ -5,6 +5,7 @@ import isEqual from 'fast-deep-equal';
5
5
  import { LucideToyBrick } from 'lucide-react';
6
6
  import { memo } from 'react';
7
7
 
8
+ import { featureFlagsSelectors, useFeatureFlagStore } from '@/store/featureFlags';
8
9
  import { pluginHelpers, useToolStore } from '@/store/tool';
9
10
  import { toolSelectors } from '@/store/tool/selectors';
10
11
 
@@ -15,7 +16,8 @@ export interface PluginTagProps {
15
16
  }
16
17
 
17
18
  const PluginTag = memo<PluginTagProps>(({ plugins }) => {
18
- const list = useToolStore(toolSelectors.metaList, isEqual);
19
+ const { showDalle } = useFeatureFlagStore(featureFlagsSelectors);
20
+ const list = useToolStore(toolSelectors.metaList(showDalle), isEqual);
19
21
  const displayPlugin = useToolStore(toolSelectors.getMetaById(plugins[0]), isEqual);
20
22
 
21
23
  if (plugins.length === 0) return null;