@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 +50 -0
- package/README.md +18 -14
- package/README.zh-CN.md +18 -14
- package/docs/Home.md +1 -1
- package/docs/_Sidebar.md +1 -1
- package/package.json +3 -3
- package/src/app/chat/features/SessionListContent/CollapseGroup/Actions.tsx +39 -19
- package/src/app/chat/features/SessionListContent/DefaultMode.tsx +1 -1
- package/src/database/models/session.ts +2 -1
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
|
+
[](#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
|
+
[](#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
|

|
|
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
|
|
188
|
-
|
|
|
189
|
-
| [
|
|
190
|
-
| [
|
|
191
|
-
| [
|
|
192
|
-
| [
|
|
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>**
|
|
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
|
|
227
|
-
|
|
|
228
|
-
| [
|
|
229
|
-
| [
|
|
230
|
-
| [
|
|
231
|
-
| [
|
|
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>**
|
|
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
|

|
|
44
46
|
|
|
45
47
|
</div>
|
|
@@ -168,14 +170,14 @@ LobeChat 的插件生态系统是其核心功能的重要扩展,它极大地
|
|
|
168
170
|
|
|
169
171
|
<!-- PLUGIN LIST -->
|
|
170
172
|
|
|
171
|
-
| 最近新增
|
|
172
|
-
|
|
|
173
|
-
| [
|
|
174
|
-
| [
|
|
175
|
-
| [
|
|
176
|
-
| [
|
|
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>**
|
|
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
|
-
| [
|
|
209
|
-
| [
|
|
210
|
-
| [
|
|
211
|
-
| [
|
|
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>**
|
|
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-
|
|
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-
|
|
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.
|
|
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": "
|
|
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": "^
|
|
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) => [
|
|
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
|
-
|
|
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
|
-
|
|
26
|
+
const dataDB = this.mapToDB_Session(data);
|
|
27
|
+
return this._add(dataDB, id);
|
|
27
28
|
}
|
|
28
29
|
|
|
29
30
|
async batchCreate(sessions: LobeAgentSession[]) {
|