@lobehub/chat 0.121.3 → 0.122.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.
package/CHANGELOG.md CHANGED
@@ -2,6 +2,56 @@
2
2
 
3
3
  # Changelog
4
4
 
5
+ ## [Version 0.122.0](https://github.com/lobehub/lobe-chat/compare/v0.121.4...v0.122.0)
6
+
7
+ <sup>Released on **2024-01-29**</sup>
8
+
9
+ #### ✨ Features
10
+
11
+ - **misc**: Add create agent action in group menu.
12
+
13
+ <br/>
14
+
15
+ <details>
16
+ <summary><kbd>Improvements and Fixes</kbd></summary>
17
+
18
+ #### What's improved
19
+
20
+ - **misc**: Add create agent action in group menu, closes [#1177](https://github.com/lobehub/lobe-chat/issues/1177) ([17ec1eb](https://github.com/lobehub/lobe-chat/commit/17ec1eb))
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.121.4](https://github.com/lobehub/lobe-chat/compare/v0.121.3...v0.121.4)
31
+
32
+ <sup>Released on **2024-01-29**</sup>
33
+
34
+ #### 🐛 Bug Fixes
35
+
36
+ - **misc**: Pin ahooks to fix test ci and settings crash.
37
+
38
+ <br/>
39
+
40
+ <details>
41
+ <summary><kbd>Improvements and Fixes</kbd></summary>
42
+
43
+ #### What's fixed
44
+
45
+ - **misc**: Pin ahooks to fix test ci and settings crash, closes [#1178](https://github.com/lobehub/lobe-chat/issues/1178) ([bc223a4](https://github.com/lobehub/lobe-chat/commit/bc223a4))
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.121.3](https://github.com/lobehub/lobe-chat/compare/v0.121.2...v0.121.3)
6
56
 
7
57
  <sup>Released on **2024-01-26**</sup>
package/README.md CHANGED
@@ -42,6 +42,8 @@ Supports one-click free deployment of your private ChatGPT/LLM web application.
42
42
 
43
43
  <sup>Pioneering the new age of thinking and creating. Built for you, the Super Individual.</sup>
44
44
 
45
+ [![][github-trending-shield]][github-trending-url]
46
+
45
47
  ![](https://gw.alipayobjects.com/zos/kitchen/RKnWrrfuMl/welcome.webp)
46
48
 
47
49
  </div>
@@ -184,14 +186,14 @@ e-commerce platform data access, and various third-party services.
184
186
 
185
187
  <!-- PLUGIN LIST -->
186
188
 
187
- | Recent Submits | Description |
188
- | --------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------- |
189
- | [GameSight](https://chat-preview.lobehub.com/settings/agent)<br/><sup>By **tapapis** on **2024-01-23**</sup> | Discover games, game-related content, get recommendations, and compare games based on player reviews.<br/>`game` `search` |
190
- | [txyz.ai](https://chat-preview.lobehub.com/settings/agent)<br/><sup>By **txyz** on **2024-01-23**</sup> | Explore the universe of research. Search and compare papers, and answer questions.<br/>`research-paper` `search` |
191
- | [SEO](https://chat-preview.lobehub.com/settings/agent)<br/><sup>By **orrenprunckun** on **2024-01-23**</sup> | Enter any URL and keyword and get an On-Page SEO analysis & insights!<br/>`seo` |
192
- | [Video Captions](https://chat-preview.lobehub.com/settings/agent)<br/><sup>By **maila** on **2024-01-23**</sup> | Convert Youtube links into transcribed text, enable asking questions, create chapters, and summarize its content.<br/>`video-to-text` `youtube` |
189
+ | Recent Submits | Description |
190
+ | -------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
191
+ | [TokenInsights](https://chat-preview.lobehub.com/settings/agent)<br/><sup>By **feednews** on **2024-01-27**</sup> | Get realtime crypto price, BTC, ETH, BNB, and the latest insights.The latest coin news and airdrop opportunities.<br/>`crypto` `btc` `eth` `bnb` |
192
+ | [Bilibili](https://chat-preview.lobehub.com/settings/agent)<br/><sup>By **LobeHub** on **2024-01-27**</sup> | Dive into Bilibili's vast content with features like keyword video search, replay access, interactive danmaku, trending video recommendations, and hot-search insights, all at your fingertips.<br/>`video` `bilibili` `search` |
193
+ | [Steam](https://chat-preview.lobehub.com/settings/agent)<br/><sup>By **LobeHub** on **2024-01-27**</sup> | Obtain game information and user reviews from Steam.<br/>`steam` `game` |
194
+ | [Current Time Assistant](https://chat-preview.lobehub.com/settings/agent)<br/><sup>By **cc** on **2024-01-26**</sup> | A plugin to provide current time information<br/>`time` |
193
195
 
194
- > 📊 Total plugins: [<kbd>**40**</kbd>](https://github.com/lobehub/lobe-chat-plugins)
196
+ > 📊 Total plugins: [<kbd>**60**</kbd>](https://github.com/lobehub/lobe-chat-plugins)
195
197
 
196
198
  <!-- PLUGIN LIST -->
197
199
 
@@ -223,14 +225,14 @@ Our marketplace is not just a showcase platform but also a collaborative space.
223
225
 
224
226
  <!-- AGENT LIST -->
225
227
 
226
- | Recent Submits | Description |
227
- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
228
- | [Intent Resonance GPT](https://chat-preview.lobehub.com/market?agent=intention-resonates-gpt)<br/><sup>By **[AIConductor](https://github.com/AIConductor)** on **2024-01-24**</sup> | An AI focused on deeply understanding user needs, accurately capturing user intent and requirements through continuous intent alignment, and providing the most suitable solutions.<br/>`conversation` `deep-understanding` |
229
- | [Startup Tech Lawyer](https://chat-preview.lobehub.com/market?agent=tech-lawyer)<br/><sup>By **[daniel-jojo](https://github.com/daniel-jojo)** on **2024-01-23**</sup> | In-house legal counsel for a tech startup, offering clear, practical legal advice to support the startup's growth and protect its interests.<br/>`intellectual-property-law` `data-privacy-compliance` `contract-negotiation` `tech-startup-legal-strategy` `employment-law-guidance` |
230
- | [Shopping Assistant](https://chat-preview.lobehub.com/market?agent=shop)<br/><sup>By **[guluahljj](https://github.com/guluahljj)** on **2024-01-22**</sup> | Shopping assistant, specializing in product search, price comparison, and providing purchase links<br/>`shopping-assistant` `product-search` `price-comparison` `purchase-advice` `customer-consultation` `agulu` |
231
- | [Accounting Expert Assistant](https://chat-preview.lobehub.com/market?agent=accounting)<br/><sup>By **[MYSeaIT](https://github.com/MYSeaIT)** on **2024-01-21**</sup> | Accountant Agent: Comprehensive accounting support and expertise for individuals and businesses worldwide.<br/>`accounting` `financial-management` `tax-planning` `budgeting` |
228
+ | Recent Submits | Description |
229
+ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
230
+ | [Territory Promotion Strategist](https://chat-preview.lobehub.com/market?agent=biskaya)<br/><sup>By **[MYSeaIT](https://github.com/MYSeaIT)** on **2024-01-29**</sup> | Territorial Competitiveness and Promotion Expert<br/>`territorial-competitiveness` `promotion` `consulting` `marketing` `event-coordination` |
231
+ | [Bizkaia Entrepreneurship Expert](https://chat-preview.lobehub.com/market?agent=bizkaia-entrepreneurship-expert)<br/><sup>By **[MYSeaIT](https://github.com/MYSeaIT)** on **2024-01-29**</sup> | Entrepreneurship and Competitiveness Expert for Bizkaia Deputation, providing tailored guidance and support to local entrepreneurs.<br/>`bizkaia` `entrepreneurship` `consulting` `mentorship` `local-business-ecosystem` `market-dynamics` `business-plans` `financial-models` `funding-strategies` `marketing` `branding` `sales-strategies` `networking` `entrepreneurship-programs` `guidance` `local-resources` `funding-opportunities` `collaboration` `sustainable-business-practices` `economic-development` |
232
+ | [English Language C1 Mastery Coach](https://chat-preview.lobehub.com/market?agent=english-language-c-1-mastery-coach)<br/><sup>By **[MYSeaIT](https://github.com/MYSeaIT)** on **2024-01-29**</sup> | English Conversation Partner for C1 Level<br/>`english-conversation` `language-proficiency` `advanced-level` `language-coaching` `fluency` |
233
+ | [Software Architecture Strategist](https://chat-preview.lobehub.com/market?agent=software-architecture-strategist)<br/><sup>By **[MYSeaIT](https://github.com/MYSeaIT)** on **2024-01-29**</sup> | Software Development Architect: Designs scalable and secure software systems, guides development teams, and translates business requirements into technical solutions.<br/>`software-development` `architecture` `design` `leadership` `communication` |
232
234
 
233
- > 📊 Total agents: [<kbd>**114**</kbd> ](https://github.com/lobehub/lobe-chat-agents)
235
+ > 📊 Total agents: [<kbd>**139**</kbd> ](https://github.com/lobehub/lobe-chat-agents)
234
236
 
235
237
  <!-- AGENT LIST -->
236
238
 
@@ -633,6 +635,8 @@ This project is [MIT](./LICENSE) licensed.
633
635
  [github-releasedate-shield]: https://img.shields.io/github/release-date/lobehub/lobe-chat?labelColor=black&style=flat-square
634
636
  [github-stars-link]: https://github.com/lobehub/lobe-chat/network/stargazers
635
637
  [github-stars-shield]: https://img.shields.io/github/stars/lobehub/lobe-chat?color=ffcb47&labelColor=black&style=flat-square
638
+ [github-trending-shield]: https://trendshift.io/api/badge/repositories/2256
639
+ [github-trending-url]: https://trendshift.io/repositories/2256
636
640
  [github-wiki-link]: https://github.com/lobehub/lobe-chat/wiki
637
641
  [issues-link]: https://img.shields.io/github/issues/lobehub/lobe-chat.svg?style=flat
638
642
  [lobe-assets-github]: https://github.com/lobehub/lobe-assets
package/README.zh-CN.md CHANGED
@@ -40,6 +40,8 @@ LobeChat 是开源的高性能聊天机器人框架,支持语音合成、多
40
40
 
41
41
  <sup>探索私人生产力的未来。在个体崛起的时代中为你打造.</sup>
42
42
 
43
+ [![][github-trending-shield]][github-trending-url]
44
+
43
45
  ![](https://gw.alipayobjects.com/zos/kitchen/RKnWrrfuMl/welcome.webp)
44
46
 
45
47
  </div>
@@ -168,14 +170,14 @@ LobeChat 的插件生态系统是其核心功能的重要扩展,它极大地
168
170
 
169
171
  <!-- PLUGIN LIST -->
170
172
 
171
- | 最近新增 | 插件描述 |
172
- | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------- |
173
- | [GameSight](https://chat-preview.lobehub.com/settings/agent)<br/><sup>By **tapapis** on **2024-01-23**</sup> | 发现游戏、与游戏相关的内容、获取推荐,并根据玩家评价比较游戏。<br/>`游戏` `搜索` |
174
- | [txyz.ai](https://chat-preview.lobehub.com/settings/agent)<br/><sup>By **txyz** on **2024-01-23**</sup> | 探索研究的宇宙。搜索和比较论文,并回答问题。<br/>`research-paper` `search` |
175
- | [SEO](https://chat-preview.lobehub.com/settings/agent)<br/><sup>By **orrenprunckun** on **2024-01-23**</sup> | 输入任何 URL 和关键词,获取页面 SEO 分析和见解!<br/>`seo` |
176
- | [视频字幕](https://chat-preview.lobehub.com/settings/agent)<br/><sup>By **maila** on **2024-01-23**</sup> | 将 Youtube 链接转换为转录文本,使其能够提问,创建章节,并总结其内容。<br/>`视频转文字` `you-tube` |
173
+ | 最近新增 | 插件描述 |
174
+ | ----------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- |
175
+ | [TokenInsights](https://chat-preview.lobehub.com/settings/agent)<br/><sup>By **feednews** on **2024-01-27**</sup> | 获取实时加密货币价格,BTC,ETH,BNB 和最新见解。最新的币新闻和空投机会。<br/>`加密货币` `btc` `eth` `bnb` |
176
+ | [哔哩哔哩](https://chat-preview.lobehub.com/settings/agent)<br/><sup>By **LobeHub** on **2024-01-27**</sup> | 通过关键词视频搜索、回放访问、互动弹幕、热门视频推荐和热搜洞察等功能,深入体验哔哩哔哩丰富的内容,尽在您的指尖。<br/>`视频` `哔哩哔哩` `搜索` |
177
+ | [Steam](https://chat-preview.lobehub.com/settings/agent)<br/><sup>By **LobeHub** on **2024-01-27**</sup> | 从 Steam 获取游戏信息和用户评论。<br/>`steam` `game` |
178
+ | [当前时间助手](https://chat-preview.lobehub.com/settings/agent)<br/><sup>By **cc** on **2024-01-26**</sup> | 提供当前时间信息的插件<br/>`时间` |
177
179
 
178
- > 📊 Total plugins: [<kbd>**40**</kbd>](https://github.com/lobehub/lobe-chat-plugins)
180
+ > 📊 Total plugins: [<kbd>**60**</kbd>](https://github.com/lobehub/lobe-chat-plugins)
179
181
 
180
182
  <!-- PLUGIN LIST -->
181
183
 
@@ -203,14 +205,14 @@ LobeChat 的插件生态系统是其核心功能的重要扩展,它极大地
203
205
 
204
206
  <!-- AGENT LIST -->
205
207
 
206
- | 最近新增 | 助手说明 |
207
- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- |
208
- | [意图共鸣 GPT](https://chat-preview.lobehub.com/market?agent=intention-resonates-gpt)<br/><sup>By **[AIConductor](https://github.com/AIConductor)** on **2024-01-24**</sup> | 一个专注于深度理解用户需求的 AI,通过不断的意图对齐过程,精确捕捉用户意图和需求,并提供最适合的解决方案。<br/>`对话` `深度理解` |
209
- | [初创科技律师](https://chat-preview.lobehub.com/market?agent=tech-lawyer)<br/><sup>By **[daniel-jojo](https://github.com/daniel-jojo)** on **2024-01-23**</sup> | 初创科技公司的内部法律顾问,提供清晰、实用的法律建议,支持初创公司的增长并保护其利益。<br/>`知识产权法` `数据隐私合规` `合同谈判` `科技初创法律策略` `雇佣法指导` |
210
- | [购物助手](https://chat-preview.lobehub.com/market?agent=shop)<br/><sup>By **[guluahljj](https://github.com/guluahljj)** on **2024-01-22**</sup> | 购物助手,擅长商品搜索、比价和提供购买链接<br/>`购物助手` `商品搜索` `比价` `购买建议` `客户咨询` `agulu` |
211
- | [会计专家助手](https://chat-preview.lobehub.com/market?agent=accounting)<br/><sup>By **[MYSeaIT](https://github.com/MYSeaIT)** on **2024-01-21**</sup> | 会计代理:为全球个人和企业提供全面的会计支持和专业知识。<br/>`会计` `财务管理` `税务规划` `预算编制` |
208
+ | 最近新增 | 助手说明 |
209
+ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
210
+ | [领土推广策略师](https://chat-preview.lobehub.com/market?agent=biskaya)<br/><sup>By **[MYSeaIT](https://github.com/MYSeaIT)** on **2024-01-29**</sup> | 领土竞争力和推广专家<br/>`territorial-competitiveness` `promotion` `consulting` `marketing` `event-coordination` |
211
+ | [毕尔巴鄂创业专家](https://chat-preview.lobehub.com/market?agent=bizkaia-entrepreneurship-expert)<br/><sup>By **[MYSeaIT](https://github.com/MYSeaIT)** on **2024-01-29**</sup> | 毕尔巴鄂代表处的创业和竞争力专家,为当地企业家提供定制指导和支持。<br/>`毕尔巴鄂` `创业` `咨询` `指导` `本地商业生态系统` `市场动态` `商业计划` `财务模型` `融资策略` `营销` `品牌塑造` `销售策略` `社交网络` `创业项目` `指导` `本地资源` `融资机会` `合作` `可持续商业实践` `经济发展` |
212
+ | [英语 C1 级精通教练](https://chat-preview.lobehub.com/market?agent=english-language-c-1-mastery-coach)<br/><sup>By **[MYSeaIT](https://github.com/MYSeaIT)** on **2024-01-29**</sup> | C1 级别的英语会话伙伴<br/>`英语会话` `语言熟练度` `高级水平` `语言辅导` `流利度` |
213
+ | [软件架构策略师](https://chat-preview.lobehub.com/market?agent=software-architecture-strategist)<br/><sup>By **[MYSeaIT](https://github.com/MYSeaIT)** on **2024-01-29**</sup> | 软件开发架构师:设计可扩展和安全的软件系统,指导开发团队,并将业务需求转化为技术解决方案。<br/>`软件开发` `架构` `设计` `领导力` `沟通` |
212
214
 
213
- > 📊 Total agents: [<kbd>**114**</kbd> ](https://github.com/lobehub/lobe-chat-agents)
215
+ > 📊 Total agents: [<kbd>**139**</kbd> ](https://github.com/lobehub/lobe-chat-agents)
214
216
 
215
217
  <!-- AGENT LIST -->
216
218
 
@@ -649,6 +651,8 @@ This project is [MIT](./LICENSE) licensed.
649
651
  [github-releasedate-shield]: https://img.shields.io/github/release-date/lobehub/lobe-chat?labelColor=black&style=flat-square
650
652
  [github-stars-link]: https://github.com/lobehub/lobe-chat/network/stargazers
651
653
  [github-stars-shield]: https://img.shields.io/github/stars/lobehub/lobe-chat?color=ffcb47&labelColor=black&style=flat-square
654
+ [github-trending-shield]: https://trendshift.io/api/badge/repositories/2256
655
+ [github-trending-url]: https://trendshift.io/repositories/2256
652
656
  [github-wiki-link]: https://github.com/lobehub/lobe-chat/wiki
653
657
  [issues-link]: https://img.shields.io/github/issues/lobehub/lobe-chat.svg?style=flat
654
658
  [lobe-assets-github]: https://github.com/lobehub/lobe-assets
package/docs/Home.md CHANGED
@@ -41,7 +41,7 @@ LobeChat is a open-source, extensible ([Function Calling][fc-url]), high-perform
41
41
  - [Architecture Design](https://github.com/lobehub/lobe-chat/wiki/Architecture) | [架构设计](https://github.com/lobehub/lobe-chat/wiki/Architecture.zh-CN)
42
42
  - [Directory Structure](https://github.com/lobehub/lobe-chat/wiki/Folder-Structure) | [目录架构](https://github.com/lobehub/lobe-chat/wiki/Folder-Structure.zh-CN)
43
43
  - [Best Practices for State Management](https://github.com/lobehub/lobe-chat/wiki/State-Management-Intro) | [状态管理最佳实践](https://github.com/lobehub/lobe-chat/wiki/State-Management-Intro.zh-CN)
44
- - [Data Store Selector](https://github.com/lobehub/lobe-chat/wiki/State-Management-Selector) | [数据存储取数模块](https://github.com/lobehub/lobe-chat/wiki/State-Management-Selector.zh-CN)
44
+ - [Data Store Selector](https://github.com/lobehub/lobe-chat/wiki/State-Management-Selectors) | [数据存储取数模块](https://github.com/lobehub/lobe-chat/wiki/State-Management-Selectors.zh-CN)
45
45
  - [Conversation API Implementation Logic](https://github.com/lobehub/lobe-chat/wiki/Chat-API) | [会话 API 实现逻辑](https://github.com/lobehub/lobe-chat/wiki/Chat-API.zh-CN)
46
46
  - [How to Develop a New Feature](https://github.com/lobehub/lobe-chat/wiki/Feature-Development) | [如何开发一个新功能](https://github.com/lobehub/lobe-chat/wiki/Feature-Development.zh-CN)
47
47
  - [Frontend](https://github.com/lobehub/lobe-chat/wiki/Feature-Development-Frontend) | [前端实现](https://github.com/lobehub/lobe-chat/wiki/Feature-Development-Frontend.zh-CN)
package/docs/_Sidebar.md CHANGED
@@ -29,7 +29,7 @@
29
29
  - [Architecture Design](https://github.com/lobehub/lobe-chat/wiki/Architecture) | [架构设计](https://github.com/lobehub/lobe-chat/wiki/Architecture.zh-CN)
30
30
  - [Directory Structure](https://github.com/lobehub/lobe-chat/wiki/Folder-Structure) | [目录架构](https://github.com/lobehub/lobe-chat/wiki/Folder-Structure.zh-CN)
31
31
  - [Best Practices for State Management](https://github.com/lobehub/lobe-chat/wiki/State-Management-Intro) | [状态管理最佳实践](https://github.com/lobehub/lobe-chat/wiki/State-Management-Intro.zh-CN)
32
- - [Data Store Selector](https://github.com/lobehub/lobe-chat/wiki/State-Management-Selector) | [数据存储取数模块](https://github.com/lobehub/lobe-chat/wiki/State-Management-Selector.zh-CN)
32
+ - [Data Store Selector](https://github.com/lobehub/lobe-chat/wiki/State-Management-Selectors) | [数据存储取数模块](https://github.com/lobehub/lobe-chat/wiki/State-Management-Selectors.zh-CN)
33
33
  - [Conversation API Implementation Logic](https://github.com/lobehub/lobe-chat/wiki/Chat-API) | [会话 API 实现逻辑](https://github.com/lobehub/lobe-chat/wiki/Chat-API.zh-CN)
34
34
  - [How to Develop a New Feature](https://github.com/lobehub/lobe-chat/wiki/Feature-Development) | [如何开发一个新功能](https://github.com/lobehub/lobe-chat/wiki/Feature-Development.zh-CN)
35
35
  - [Frontend](https://github.com/lobehub/lobe-chat/wiki/Feature-Development-Frontend) | [前端实现](https://github.com/lobehub/lobe-chat/wiki/Feature-Development-Frontend.zh-CN)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lobehub/chat",
3
- "version": "0.121.3",
3
+ "version": "0.122.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",
@@ -80,7 +80,7 @@
80
80
  "@lobehub/tts": "latest",
81
81
  "@lobehub/ui": "latest",
82
82
  "@vercel/analytics": "^1",
83
- "ahooks": "^3",
83
+ "ahooks": "3.7.8",
84
84
  "ai": "^2",
85
85
  "antd": "^5",
86
86
  "antd-style": "^3",
@@ -166,7 +166,7 @@
166
166
  "fake-indexeddb": "^5",
167
167
  "glob": "^10",
168
168
  "husky": "^8",
169
- "jsdom": "^23",
169
+ "jsdom": "^24.0.0",
170
170
  "just-diff": "^6",
171
171
  "lint-staged": "^15",
172
172
  "lodash": "^4",
@@ -1,7 +1,7 @@
1
1
  import { ActionIcon, Icon } from '@lobehub/ui';
2
2
  import { App, Dropdown, DropdownProps, MenuProps } from 'antd';
3
3
  import { createStyles } from 'antd-style';
4
- import { MoreVertical, PencilLine, Settings2, Trash } from 'lucide-react';
4
+ import { MoreVertical, PencilLine, Plus, Settings2, Trash } from 'lucide-react';
5
5
  import { memo, useMemo } from 'react';
6
6
  import { useTranslation } from 'react-i18next';
7
7
 
@@ -15,19 +15,51 @@ const useStyles = createStyles(({ css }) => ({
15
15
  interface ActionsProps extends Pick<DropdownProps, 'onOpenChange'> {
16
16
  id?: string;
17
17
  isCustomGroup?: boolean;
18
+ isPinned?: boolean;
18
19
  openConfigModal: () => void;
19
20
  openRenameModal?: () => void;
20
21
  }
21
22
 
23
+ type ItemOfType<T> = T extends (infer Item)[] ? Item : never;
24
+ type MenuItemType = ItemOfType<MenuProps['items']>;
25
+
22
26
  const Actions = memo<ActionsProps>(
23
- ({ id, openRenameModal, openConfigModal, onOpenChange, isCustomGroup }) => {
27
+ ({ id, openRenameModal, openConfigModal, onOpenChange, isCustomGroup, isPinned }) => {
24
28
  const { t } = useTranslation('chat');
25
29
  const { styles } = useStyles();
26
30
  const { modal } = App.useApp();
27
31
 
28
- const [removeSessionGroup] = useSessionStore((s) => [s.removeSessionGroup]);
32
+ const [createSession, removeSessionGroup] = useSessionStore((s) => [
33
+ s.createSession,
34
+ s.removeSessionGroup,
35
+ ]);
36
+
37
+ const sessionGroupConfigPublicItem: MenuItemType = {
38
+ icon: <Icon icon={Settings2} />,
39
+ key: 'config',
40
+ label: t('sessionGroup.config'),
41
+ onClick: ({ domEvent }) => {
42
+ domEvent.stopPropagation();
43
+ openConfigModal();
44
+ },
45
+ };
46
+
47
+ const newAgentPublicItem: MenuItemType = {
48
+ icon: <Icon icon={Plus} />,
49
+ key: 'newAgent',
50
+ label: t('newAgent'),
51
+ onClick: ({ domEvent }) => {
52
+ domEvent.stopPropagation();
53
+ createSession({ group: id, pinned: isPinned });
54
+ },
55
+ };
56
+
29
57
  const customGroupItems: MenuProps['items'] = useMemo(
30
58
  () => [
59
+ newAgentPublicItem,
60
+ {
61
+ type: 'divider',
62
+ },
31
63
  {
32
64
  icon: <Icon icon={PencilLine} />,
33
65
  key: 'rename',
@@ -37,15 +69,7 @@ const Actions = memo<ActionsProps>(
37
69
  openRenameModal?.();
38
70
  },
39
71
  },
40
- {
41
- icon: <Icon icon={Settings2} />,
42
- key: 'config',
43
- label: t('sessionGroup.config'),
44
- onClick: ({ domEvent }) => {
45
- domEvent.stopPropagation();
46
- openConfigModal();
47
- },
48
- },
72
+ sessionGroupConfigPublicItem,
49
73
  {
50
74
  type: 'divider',
51
75
  },
@@ -74,15 +98,11 @@ const Actions = memo<ActionsProps>(
74
98
 
75
99
  const defaultItems: MenuProps['items'] = useMemo(
76
100
  () => [
101
+ newAgentPublicItem,
77
102
  {
78
- icon: <Icon icon={Settings2} />,
79
- key: 'config',
80
- label: t('sessionGroup.config'),
81
- onClick: ({ domEvent }) => {
82
- domEvent.stopPropagation();
83
- openConfigModal();
84
- },
103
+ type: 'divider',
85
104
  },
105
+ sessionGroupConfigPublicItem,
86
106
  ],
87
107
  [],
88
108
  );
@@ -40,7 +40,7 @@ const SessionListContent = memo(() => {
40
40
  [
41
41
  pinnedSessions.length > 0 && {
42
42
  children: <SessionList dataSource={pinnedSessions} />,
43
- extra: <Actions openConfigModal={() => setConfigGroupModalOpen(true)} />,
43
+ extra: <Actions isPinned openConfigModal={() => setConfigGroupModalOpen(true)} />,
44
44
  key: SessionDefaultGroup.Pinned,
45
45
  label: t('pin'),
46
46
  },
@@ -23,7 +23,8 @@ class _SessionModel extends BaseModel {
23
23
 
24
24
  async create(type: 'agent' | 'group', defaultValue: Partial<LobeAgentSession>, id = uuid()) {
25
25
  const data = merge(DEFAULT_AGENT_LOBE_SESSION, { type, ...defaultValue });
26
- return this._add(data, id);
26
+ const dataDB = this.mapToDB_Session(data);
27
+ return this._add(dataDB, id);
27
28
  }
28
29
 
29
30
  async batchCreate(sessions: LobeAgentSession[]) {