@lobehub/chat 1.2.8 → 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,31 @@
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
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top)
27
+
28
+ </div>
29
+
5
30
  ### [Version 1.2.8](https://github.com/lobehub/lobe-chat/compare/v1.2.7...v1.2.8)
6
31
 
7
32
  <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.8",
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",
@@ -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
- export const ToolMessage = memo<ChatMessage>(({ id, content, pluginState, plugin }) => {
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
+ ));