@lobehub/chat 0.122.7 → 0.122.9
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 +8 -8
- package/README.zh-CN.md +2 -2
- package/locales/ar/market.json +2 -0
- package/locales/de-DE/market.json +2 -0
- package/locales/en-US/market.json +2 -0
- package/locales/es-ES/market.json +2 -0
- package/locales/fr-FR/market.json +2 -0
- package/locales/it-IT/market.json +2 -0
- package/locales/ja-JP/market.json +2 -0
- package/locales/ko-KR/market.json +2 -0
- package/locales/nl-NL/market.json +2 -0
- package/locales/pl-PL/market.json +2 -0
- package/locales/pt-BR/market.json +2 -0
- package/locales/ru-RU/market.json +2 -0
- package/locales/tr-TR/market.json +2 -0
- package/locales/vi-VN/market.json +2 -0
- package/locales/zh-CN/market.json +2 -0
- package/locales/zh-TW/market.json +2 -0
- package/package.json +1 -1
- package/src/app/market/features/AgentDetailContent/AgentInfo/Header.tsx +13 -1
- package/src/app/market/features/AgentDetailContent/AgentInfo/Loading.tsx +1 -0
- package/src/app/settings/llm/LLM/Checker.tsx +10 -9
- package/src/app/settings/llm/LLM/index.tsx +1 -1
- package/src/locales/default/market.ts +2 -0
- package/src/store/session/slices/session/action.test.ts +24 -0
- package/src/store/session/slices/session/action.ts +8 -9
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,56 @@
|
|
|
2
2
|
|
|
3
3
|
# Changelog
|
|
4
4
|
|
|
5
|
+
### [Version 0.122.9](https://github.com/lobehub/lobe-chat/compare/v0.122.8...v0.122.9)
|
|
6
|
+
|
|
7
|
+
<sup>Released on **2024-02-05**</sup>
|
|
8
|
+
|
|
9
|
+
#### 💄 Styles
|
|
10
|
+
|
|
11
|
+
- **settings**: Improve LLM connection checker style.
|
|
12
|
+
|
|
13
|
+
<br/>
|
|
14
|
+
|
|
15
|
+
<details>
|
|
16
|
+
<summary><kbd>Improvements and Fixes</kbd></summary>
|
|
17
|
+
|
|
18
|
+
#### Styles
|
|
19
|
+
|
|
20
|
+
- **settings**: Improve LLM connection checker style, closes [#1222](https://github.com/lobehub/lobe-chat/issues/1222) ([8c349a1](https://github.com/lobehub/lobe-chat/commit/8c349a1))
|
|
21
|
+
|
|
22
|
+
</details>
|
|
23
|
+
|
|
24
|
+
<div align="right">
|
|
25
|
+
|
|
26
|
+
[](#readme-top)
|
|
27
|
+
|
|
28
|
+
</div>
|
|
29
|
+
|
|
30
|
+
### [Version 0.122.8](https://github.com/lobehub/lobe-chat/compare/v0.122.7...v0.122.8)
|
|
31
|
+
|
|
32
|
+
<sup>Released on **2024-02-03**</sup>
|
|
33
|
+
|
|
34
|
+
#### 💄 Styles
|
|
35
|
+
|
|
36
|
+
- **misc**: Allow user to add agent without redirection.
|
|
37
|
+
|
|
38
|
+
<br/>
|
|
39
|
+
|
|
40
|
+
<details>
|
|
41
|
+
<summary><kbd>Improvements and Fixes</kbd></summary>
|
|
42
|
+
|
|
43
|
+
#### Styles
|
|
44
|
+
|
|
45
|
+
- **misc**: Allow user to add agent without redirection, closes [#1199](https://github.com/lobehub/lobe-chat/issues/1199) ([6577ca1](https://github.com/lobehub/lobe-chat/commit/6577ca1))
|
|
46
|
+
|
|
47
|
+
</details>
|
|
48
|
+
|
|
49
|
+
<div align="right">
|
|
50
|
+
|
|
51
|
+
[](#readme-top)
|
|
52
|
+
|
|
53
|
+
</div>
|
|
54
|
+
|
|
5
55
|
### [Version 0.122.7](https://github.com/lobehub/lobe-chat/compare/v0.122.6...v0.122.7)
|
|
6
56
|
|
|
7
57
|
<sup>Released on **2024-02-02**</sup>
|
package/README.md
CHANGED
|
@@ -186,14 +186,14 @@ e-commerce platform data access, and various third-party services.
|
|
|
186
186
|
|
|
187
187
|
<!-- PLUGIN LIST -->
|
|
188
188
|
|
|
189
|
-
| Recent Submits
|
|
190
|
-
|
|
|
191
|
-
| [
|
|
192
|
-
| [
|
|
193
|
-
| [
|
|
194
|
-
| [
|
|
195
|
-
|
|
196
|
-
> 📊 Total plugins: [<kbd>**
|
|
189
|
+
| Recent Submits | Description |
|
|
190
|
+
| ----------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
191
|
+
| [Social Search](https://chat-preview.lobehub.com/settings/agent)<br/><sup>By **say-apps** on **2024-02-02**</sup> | The Social Search provides access to tweets, users, followers, images, media and more.<br/>`social` `twitter` `x` `search` |
|
|
192
|
+
| [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` |
|
|
193
|
+
| [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` |
|
|
194
|
+
| [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` |
|
|
195
|
+
|
|
196
|
+
> 📊 Total plugins: [<kbd>**61**</kbd>](https://github.com/lobehub/lobe-chat-plugins)
|
|
197
197
|
|
|
198
198
|
<!-- PLUGIN LIST -->
|
|
199
199
|
|
package/README.zh-CN.md
CHANGED
|
@@ -172,12 +172,12 @@ LobeChat 的插件生态系统是其核心功能的重要扩展,它极大地
|
|
|
172
172
|
|
|
173
173
|
| 最近新增 | 插件描述 |
|
|
174
174
|
| ----------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
175
|
+
| [社交搜索](https://chat-preview.lobehub.com/settings/agent)<br/><sup>By **say-apps** on **2024-02-02**</sup> | 社交搜索提供访问推文、用户、关注者、图片、媒体等功能。<br/>`社交` `推特` `x` `搜索` |
|
|
175
176
|
| [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
177
|
| [哔哩哔哩](https://chat-preview.lobehub.com/settings/agent)<br/><sup>By **LobeHub** on **2024-01-27**</sup> | 通过关键词视频搜索、回放访问、互动弹幕、热门视频推荐和热搜洞察等功能,深入体验哔哩哔哩丰富的内容,尽在您的指尖。<br/>`视频` `哔哩哔哩` `搜索` |
|
|
177
178
|
| [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/>`时间` |
|
|
179
179
|
|
|
180
|
-
> 📊 Total plugins: [<kbd>**
|
|
180
|
+
> 📊 Total plugins: [<kbd>**61**</kbd>](https://github.com/lobehub/lobe-chat-plugins)
|
|
181
181
|
|
|
182
182
|
<!-- PLUGIN LIST -->
|
|
183
183
|
|
package/locales/ar/market.json
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"addAgent": "Helfer hinzufügen",
|
|
3
|
+
"addAgentAndConverse": "Assistent hinzufügen und Konversation starten",
|
|
4
|
+
"addAgentSuccess": "Erfolgreich hinzugefügt",
|
|
3
5
|
"guide": {
|
|
4
6
|
"func1": {
|
|
5
7
|
"desc1": "Gehen Sie im Chatfenster über das Einstellungssymbol oben rechts zur Seite, auf der Sie die Einstellungen für Ihren Helfer einreichen können.",
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"addAgent": "Add Agent",
|
|
3
|
+
"addAgentAndConverse": "Add Agent and Converse",
|
|
4
|
+
"addAgentSuccess": "Successfully Added",
|
|
3
5
|
"guide": {
|
|
4
6
|
"func1": {
|
|
5
7
|
"desc1": "Enter the settings page you want to submit to the assistant by clicking on the settings icon in the upper right corner of the chat window.",
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"addAgent": "Añadir asistente",
|
|
3
|
+
"addAgentAndConverse": "Agregar agente y conversar",
|
|
4
|
+
"addAgentSuccess": "Agente agregado con éxito",
|
|
3
5
|
"guide": {
|
|
4
6
|
"func1": {
|
|
5
7
|
"desc1": "En la ventana de chat, accede a la página de configuración del asistente a través del icono de ajustes en la esquina superior derecha.",
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"addAgent": "Ajouter un assistant",
|
|
3
|
+
"addAgentAndConverse": "Ajouter un agent et converser",
|
|
4
|
+
"addAgentSuccess": "Ajout réussi",
|
|
3
5
|
"guide": {
|
|
4
6
|
"func1": {
|
|
5
7
|
"desc1": "Accédez à la page de configuration de l'assistant que vous souhaitez soumettre en cliquant sur l'icône Paramètres en haut à droite de la fenêtre de conversation.",
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"addAgent": "Aggiungi assistente",
|
|
3
|
+
"addAgentAndConverse": "Aggiungi assistente e avvia la conversazione",
|
|
4
|
+
"addAgentSuccess": "Aggiunta riuscita",
|
|
3
5
|
"guide": {
|
|
4
6
|
"func1": {
|
|
5
7
|
"desc1": "Nella finestra di chat, accedi alle impostazioni nell'angolo in alto a destra per accedere alla pagina di configurazione dell'assistente che desideri inviare;",
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"addAgent": "Voeg een assistent toe",
|
|
3
|
+
"addAgentAndConverse": "Voeg een assistent toe en start een gesprek",
|
|
4
|
+
"addAgentSuccess": "Succesvol toegevoegd",
|
|
3
5
|
"guide": {
|
|
4
6
|
"func1": {
|
|
5
7
|
"desc1": "Ga naar de instellingen in de rechterbovenhoek van het chatvenster om naar de pagina te gaan waar je de assistent kunt toevoegen.",
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"addAgent": "Dodaj asystenta",
|
|
3
|
+
"addAgentAndConverse": "Dodaj asystenta i rozpocznij rozmowę",
|
|
4
|
+
"addAgentSuccess": "Dodano pomyślnie",
|
|
3
5
|
"guide": {
|
|
4
6
|
"func1": {
|
|
5
7
|
"desc1": "Przejdź do strony ustawień, klikając prawy górny róg okna rozmowy, aby przejść do strony ustawień asystenta, którego chcesz złożyć.",
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"addAgent": "Adicionar assistente",
|
|
3
|
+
"addAgentAndConverse": "Adicionar assistente e conversar",
|
|
4
|
+
"addAgentSuccess": "Adição bem-sucedida",
|
|
3
5
|
"guide": {
|
|
4
6
|
"func1": {
|
|
5
7
|
"desc1": "Na janela de conversa, acesse a página de configurações que você deseja enviar para o assistente através do ícone no canto superior direito;",
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"addAgent": "Asistan Ekle",
|
|
3
|
+
"addAgentAndConverse": "Asistan Ekle ve Konuşma Başlat",
|
|
4
|
+
"addAgentSuccess": "Ekleme Başarılı",
|
|
3
5
|
"guide": {
|
|
4
6
|
"func1": {
|
|
5
7
|
"desc1": "Sohbet penceresinin sağ üst köşesindeki ayarlar simgesine tıklayarak asistana göndermek istediğiniz ayarlar sayfasına girin.",
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"addAgent": "Thêm trợ lý",
|
|
3
|
+
"addAgentAndConverse": "Thêm trợ lý và trò chuyện",
|
|
4
|
+
"addAgentSuccess": "Thêm thành công",
|
|
3
5
|
"guide": {
|
|
4
6
|
"func1": {
|
|
5
7
|
"desc1": "Trong cửa sổ trò chuyện, nhấp vào cài đặt ở góc trên bên phải để vào trang cài đặt trợ lý bạn muốn gửi;",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lobehub/chat",
|
|
3
|
-
"version": "0.122.
|
|
3
|
+
"version": "0.122.9",
|
|
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",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Avatar, Tag } from '@lobehub/ui';
|
|
2
|
-
import { Button, Typography } from 'antd';
|
|
2
|
+
import { App, Button, Typography } from 'antd';
|
|
3
3
|
import { startCase } from 'lodash-es';
|
|
4
4
|
import { memo } from 'react';
|
|
5
5
|
import { useTranslation } from 'react-i18next';
|
|
@@ -20,6 +20,7 @@ const Header = memo(() => {
|
|
|
20
20
|
const createSession = useSessionStore((s) => s.createSession);
|
|
21
21
|
const switchSideBar = useGlobalStore((s) => s.switchSideBar);
|
|
22
22
|
const agentItem = useMarketStore(agentMarketSelectors.currentAgentItem);
|
|
23
|
+
const { message } = App.useApp();
|
|
23
24
|
|
|
24
25
|
const { meta, createAt, author, homepage, config } = agentItem;
|
|
25
26
|
const { avatar, title, description, tags, backgroundColor } = meta;
|
|
@@ -58,6 +59,17 @@ const Header = memo(() => {
|
|
|
58
59
|
switchSideBar(SidebarTabKey.Chat);
|
|
59
60
|
}}
|
|
60
61
|
type={'primary'}
|
|
62
|
+
>
|
|
63
|
+
{t('addAgentAndConverse')}
|
|
64
|
+
</Button>
|
|
65
|
+
<Button
|
|
66
|
+
block
|
|
67
|
+
onClick={() => {
|
|
68
|
+
if (!agentItem) return;
|
|
69
|
+
|
|
70
|
+
createSession({ config, meta }, false);
|
|
71
|
+
message.success(t('addAgentSuccess'));
|
|
72
|
+
}}
|
|
61
73
|
>
|
|
62
74
|
{t('addAgent')}
|
|
63
75
|
</Button>
|
|
@@ -6,6 +6,7 @@ import { memo, useState } from 'react';
|
|
|
6
6
|
import { useTranslation } from 'react-i18next';
|
|
7
7
|
import { Flexbox } from 'react-layout-kit';
|
|
8
8
|
|
|
9
|
+
import { useIsMobile } from '@/hooks/useIsMobile';
|
|
9
10
|
import { chatService } from '@/services/chat';
|
|
10
11
|
import { ChatMessageError } from '@/types/message';
|
|
11
12
|
|
|
@@ -52,13 +53,11 @@ const Checker = memo<CheckerProps>(({ checkModel }) => {
|
|
|
52
53
|
setPass(true);
|
|
53
54
|
}
|
|
54
55
|
};
|
|
55
|
-
|
|
56
|
-
<Flexbox gap={8}>
|
|
57
|
-
<Flexbox align={'center'} gap={12} horizontal>
|
|
58
|
-
<Button loading={loading} onClick={checkConnection}>
|
|
59
|
-
{t('llm.OpenAI.check.button')}
|
|
60
|
-
</Button>
|
|
56
|
+
const isMobile = useIsMobile();
|
|
61
57
|
|
|
58
|
+
return (
|
|
59
|
+
<Flexbox align={isMobile ? 'flex-start' : 'flex-end'} gap={8}>
|
|
60
|
+
<Flexbox align={'center'} direction={isMobile ? 'horizontal-reverse' : 'horizontal'} gap={12}>
|
|
62
61
|
{pass && (
|
|
63
62
|
<Flexbox gap={4} horizontal>
|
|
64
63
|
<CheckCircleFilled
|
|
@@ -69,14 +68,16 @@ const Checker = memo<CheckerProps>(({ checkModel }) => {
|
|
|
69
68
|
{t('llm.OpenAI.check.pass')}
|
|
70
69
|
</Flexbox>
|
|
71
70
|
)}
|
|
71
|
+
<Button loading={loading} onClick={checkConnection}>
|
|
72
|
+
{t('llm.OpenAI.check.button')}
|
|
73
|
+
</Button>
|
|
72
74
|
</Flexbox>
|
|
73
|
-
|
|
74
75
|
{error && (
|
|
75
|
-
<Flexbox gap={8}>
|
|
76
|
+
<Flexbox gap={8} style={{ maxWidth: '600px', width: '100%' }}>
|
|
76
77
|
<Alert
|
|
77
78
|
banner
|
|
78
79
|
extra={
|
|
79
|
-
<Flexbox
|
|
80
|
+
<Flexbox>
|
|
80
81
|
<Highlighter copyButtonSize={'small'} language={'json'} type={'pure'}>
|
|
81
82
|
{JSON.stringify(error.body, null, 2)}
|
|
82
83
|
</Highlighter>
|
|
@@ -139,7 +139,7 @@ const LLM = memo(() => {
|
|
|
139
139
|
children: <Checker checkModel={!useAzure} />,
|
|
140
140
|
desc: t('llm.OpenAI.check.desc'),
|
|
141
141
|
label: t('llm.OpenAI.check.title'),
|
|
142
|
-
minWidth:
|
|
142
|
+
minWidth: '100%',
|
|
143
143
|
},
|
|
144
144
|
// {
|
|
145
145
|
// children: useAzure ? <Flexbox>{t('llm.OpenAI.models.notSupport')}</Flexbox> : <ModelList />,
|
|
@@ -76,6 +76,30 @@ describe('SessionAction', () => {
|
|
|
76
76
|
SESSION_CHAT_URL(newSessionId, result.current.isMobile),
|
|
77
77
|
);
|
|
78
78
|
});
|
|
79
|
+
|
|
80
|
+
it('should create a new session but not switch to it if isSwitchSession is false', async () => {
|
|
81
|
+
const { result } = renderHook(() => useSessionStore());
|
|
82
|
+
const newSessionId = 'new-session-id';
|
|
83
|
+
vi.mocked(sessionService.createNewSession).mockResolvedValue(newSessionId);
|
|
84
|
+
|
|
85
|
+
let createdSessionId;
|
|
86
|
+
|
|
87
|
+
await act(async () => {
|
|
88
|
+
createdSessionId = await result.current.createSession(
|
|
89
|
+
{ config: { displayMode: 'docs' } },
|
|
90
|
+
false,
|
|
91
|
+
);
|
|
92
|
+
});
|
|
93
|
+
|
|
94
|
+
const call = vi.mocked(sessionService.createNewSession).mock.calls[0];
|
|
95
|
+
expect(call[0]).toEqual(LobeSessionType.Agent);
|
|
96
|
+
expect(call[1]).toMatchObject({ config: { displayMode: 'docs' } });
|
|
97
|
+
|
|
98
|
+
expect(createdSessionId).toBe(newSessionId);
|
|
99
|
+
expect(mockRouterPush).not.toHaveBeenCalledWith(
|
|
100
|
+
SESSION_CHAT_URL(newSessionId, result.current.isMobile),
|
|
101
|
+
);
|
|
102
|
+
});
|
|
79
103
|
});
|
|
80
104
|
|
|
81
105
|
describe('duplicateSession', () => {
|
|
@@ -10,12 +10,7 @@ import { sessionService } from '@/services/session';
|
|
|
10
10
|
import { useGlobalStore } from '@/store/global';
|
|
11
11
|
import { settingsSelectors } from '@/store/global/selectors';
|
|
12
12
|
import { SessionStore } from '@/store/session';
|
|
13
|
-
import {
|
|
14
|
-
ChatSessionList,
|
|
15
|
-
LobeAgentSession,
|
|
16
|
-
LobeSessionType,
|
|
17
|
-
LobeSessions,
|
|
18
|
-
} from '@/types/session';
|
|
13
|
+
import { ChatSessionList, LobeAgentSession, LobeSessionType, LobeSessions } from '@/types/session';
|
|
19
14
|
import { merge } from '@/utils/merge';
|
|
20
15
|
import { setNamespace } from '@/utils/storeDebug';
|
|
21
16
|
|
|
@@ -42,7 +37,10 @@ export interface SessionAction {
|
|
|
42
37
|
* @param agent
|
|
43
38
|
* @returns sessionId
|
|
44
39
|
*/
|
|
45
|
-
createSession: (
|
|
40
|
+
createSession: (
|
|
41
|
+
session?: DeepPartial<LobeAgentSession>,
|
|
42
|
+
isSwitchSession?: boolean,
|
|
43
|
+
) => Promise<string>;
|
|
46
44
|
duplicateSession: (id: string) => Promise<void>;
|
|
47
45
|
/**
|
|
48
46
|
* Pins or unpins a session.
|
|
@@ -86,7 +84,7 @@ export const createSessionSlice: StateCreator<
|
|
|
86
84
|
get().refreshSessions();
|
|
87
85
|
},
|
|
88
86
|
|
|
89
|
-
createSession: async (agent) => {
|
|
87
|
+
createSession: async (agent, isSwitchSession = true) => {
|
|
90
88
|
const { switchSession, refreshSessions } = get();
|
|
91
89
|
|
|
92
90
|
// 合并 settings 里的 defaultAgent
|
|
@@ -100,7 +98,8 @@ export const createSessionSlice: StateCreator<
|
|
|
100
98
|
const id = await sessionService.createNewSession(LobeSessionType.Agent, newSession);
|
|
101
99
|
await refreshSessions();
|
|
102
100
|
|
|
103
|
-
|
|
101
|
+
// 创建后是否跳转到对应会话,默认跳转
|
|
102
|
+
if (isSwitchSession) switchSession(id);
|
|
104
103
|
|
|
105
104
|
return id;
|
|
106
105
|
},
|