@lobehub/chat 1.2.7 → 1.2.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
CHANGED
|
@@ -2,6 +2,56 @@
|
|
|
2
2
|
|
|
3
3
|
# Changelog
|
|
4
4
|
|
|
5
|
+
### [Version 1.2.9](https://github.com/lobehub/lobe-chat/compare/v1.2.8...v1.2.9)
|
|
6
|
+
|
|
7
|
+
<sup>Released on **2024-07-04**</sup>
|
|
8
|
+
|
|
9
|
+
#### 💄 Styles
|
|
10
|
+
|
|
11
|
+
- **misc**: Fix tool message suspense loading.
|
|
12
|
+
|
|
13
|
+
<br/>
|
|
14
|
+
|
|
15
|
+
<details>
|
|
16
|
+
<summary><kbd>Improvements and Fixes</kbd></summary>
|
|
17
|
+
|
|
18
|
+
#### Styles
|
|
19
|
+
|
|
20
|
+
- **misc**: Fix tool message suspense loading, closes [#3138](https://github.com/lobehub/lobe-chat/issues/3138) ([3ce59ca](https://github.com/lobehub/lobe-chat/commit/3ce59ca))
|
|
21
|
+
|
|
22
|
+
</details>
|
|
23
|
+
|
|
24
|
+
<div align="right">
|
|
25
|
+
|
|
26
|
+
[](#readme-top)
|
|
27
|
+
|
|
28
|
+
</div>
|
|
29
|
+
|
|
30
|
+
### [Version 1.2.8](https://github.com/lobehub/lobe-chat/compare/v1.2.7...v1.2.8)
|
|
31
|
+
|
|
32
|
+
<sup>Released on **2024-07-03**</sup>
|
|
33
|
+
|
|
34
|
+
#### 🐛 Bug Fixes
|
|
35
|
+
|
|
36
|
+
- **misc**: Allow builtin tools to trigger AI message.
|
|
37
|
+
|
|
38
|
+
<br/>
|
|
39
|
+
|
|
40
|
+
<details>
|
|
41
|
+
<summary><kbd>Improvements and Fixes</kbd></summary>
|
|
42
|
+
|
|
43
|
+
#### What's fixed
|
|
44
|
+
|
|
45
|
+
- **misc**: Allow builtin tools to trigger AI message, closes [#3135](https://github.com/lobehub/lobe-chat/issues/3135) ([6c4c8f7](https://github.com/lobehub/lobe-chat/commit/6c4c8f7))
|
|
46
|
+
|
|
47
|
+
</details>
|
|
48
|
+
|
|
49
|
+
<div align="right">
|
|
50
|
+
|
|
51
|
+
[](#readme-top)
|
|
52
|
+
|
|
53
|
+
</div>
|
|
54
|
+
|
|
5
55
|
### [Version 1.2.7](https://github.com/lobehub/lobe-chat/compare/v1.2.6...v1.2.7)
|
|
6
56
|
|
|
7
57
|
<sup>Released on **2024-07-03**</sup>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lobehub/chat",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.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",
|
|
@@ -106,7 +106,7 @@
|
|
|
106
106
|
"@azure/openai": "1.0.0-beta.12",
|
|
107
107
|
"@cfworker/json-schema": "^1.12.8",
|
|
108
108
|
"@clerk/localizations": "2.0.0",
|
|
109
|
-
"@clerk/nextjs": "
|
|
109
|
+
"@clerk/nextjs": "5.1.6",
|
|
110
110
|
"@clerk/themes": "^2.1.10",
|
|
111
111
|
"@google/generative-ai": "^0.13.0",
|
|
112
112
|
"@icons-pack/react-simple-icons": "^9.5.0",
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Icon } from '@lobehub/ui';
|
|
2
|
-
import { ConfigProvider, Empty } from 'antd';
|
|
2
|
+
import { ConfigProvider, Empty, Skeleton } from 'antd';
|
|
3
3
|
import { useTheme } from 'antd-style';
|
|
4
4
|
import { LucideSquareArrowLeft, LucideSquareArrowRight } from 'lucide-react';
|
|
5
|
-
import { memo, useContext, useState } from 'react';
|
|
5
|
+
import { Suspense, memo, useContext, useState } from 'react';
|
|
6
6
|
import { useTranslation } from 'react-i18next';
|
|
7
7
|
import { Center, Flexbox } from 'react-layout-kit';
|
|
8
8
|
|
|
@@ -14,7 +14,7 @@ import { ChatMessage } from '@/types/message';
|
|
|
14
14
|
import Arguments from '../components/Arguments';
|
|
15
15
|
import Inspector from './Inspector';
|
|
16
16
|
|
|
17
|
-
|
|
17
|
+
const Message = memo<ChatMessage>(({ id, content, pluginState, plugin }) => {
|
|
18
18
|
const [loading, isMessageToolUIOpen] = useChatStore((s) => [
|
|
19
19
|
chatSelectors.isPluginApiInvoking(id)(s),
|
|
20
20
|
chatPortalSelectors.isArtifactMessageUIOpen(id)(s),
|
|
@@ -68,3 +68,11 @@ export const ToolMessage = memo<ChatMessage>(({ id, content, pluginState, plugin
|
|
|
68
68
|
</Flexbox>
|
|
69
69
|
);
|
|
70
70
|
});
|
|
71
|
+
|
|
72
|
+
export const ToolMessage = memo<ChatMessage>((props) => (
|
|
73
|
+
<Suspense
|
|
74
|
+
fallback={<Skeleton.Button active style={{ height: 46, minWidth: 200, width: '100%' }} />}
|
|
75
|
+
>
|
|
76
|
+
<Message {...props} />
|
|
77
|
+
</Suspense>
|
|
78
|
+
));
|
|
@@ -117,7 +117,7 @@ export const chatPlugin: StateCreator<
|
|
|
117
117
|
|
|
118
118
|
if (!content) return;
|
|
119
119
|
|
|
120
|
-
await action(id, content);
|
|
120
|
+
return await action(id, content);
|
|
121
121
|
},
|
|
122
122
|
|
|
123
123
|
invokeDefaultTypePlugin: async (id, payload) => {
|
|
@@ -220,7 +220,7 @@ export const chatPlugin: StateCreator<
|
|
|
220
220
|
// trigger the plugin call
|
|
221
221
|
const data = await get().internal_invokeDifferentTypePlugin(id, payload);
|
|
222
222
|
|
|
223
|
-
if (payload.type === 'default' && data) {
|
|
223
|
+
if ((payload.type === 'default' || payload.type === 'builtin') && data) {
|
|
224
224
|
shouldCreateMessage = true;
|
|
225
225
|
latestToolId = id;
|
|
226
226
|
}
|