@lobehub/chat 0.119.6 → 0.119.8
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/package.json +1 -1
- package/src/app/chat/features/ChatHeader/ShareButton/ShareModal.tsx +2 -2
- package/src/features/Conversation/components/ChatList/index.tsx +1 -1
- package/src/layout/GlobalLayout/Locale.tsx +2 -8
- package/src/store/chat/slices/message/action.ts +13 -1
- package/src/layout/GlobalLayout/LocaleLoading.tsx +0 -21
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,56 @@
|
|
|
2
2
|
|
|
3
3
|
# Changelog
|
|
4
4
|
|
|
5
|
+
### [Version 0.119.8](https://github.com/lobehub/lobe-chat/compare/v0.119.7...v0.119.8)
|
|
6
|
+
|
|
7
|
+
<sup>Released on **2024-01-07**</sup>
|
|
8
|
+
|
|
9
|
+
#### 🐛 Bug Fixes
|
|
10
|
+
|
|
11
|
+
- **misc**: Fix spotting tool call correctly.
|
|
12
|
+
|
|
13
|
+
<br/>
|
|
14
|
+
|
|
15
|
+
<details>
|
|
16
|
+
<summary><kbd>Improvements and Fixes</kbd></summary>
|
|
17
|
+
|
|
18
|
+
#### What's fixed
|
|
19
|
+
|
|
20
|
+
- **misc**: Fix spotting tool call correctly, closes [#972](https://github.com/lobehub/lobe-chat/issues/972) ([216e700](https://github.com/lobehub/lobe-chat/commit/216e700))
|
|
21
|
+
|
|
22
|
+
</details>
|
|
23
|
+
|
|
24
|
+
<div align="right">
|
|
25
|
+
|
|
26
|
+
[](#readme-top)
|
|
27
|
+
|
|
28
|
+
</div>
|
|
29
|
+
|
|
30
|
+
### [Version 0.119.7](https://github.com/lobehub/lobe-chat/compare/v0.119.6...v0.119.7)
|
|
31
|
+
|
|
32
|
+
<sup>Released on **2024-01-07**</sup>
|
|
33
|
+
|
|
34
|
+
#### 💄 Styles
|
|
35
|
+
|
|
36
|
+
- **misc**: Improve share modal style.
|
|
37
|
+
|
|
38
|
+
<br/>
|
|
39
|
+
|
|
40
|
+
<details>
|
|
41
|
+
<summary><kbd>Improvements and Fixes</kbd></summary>
|
|
42
|
+
|
|
43
|
+
#### Styles
|
|
44
|
+
|
|
45
|
+
- **misc**: Improve share modal style, closes [#965](https://github.com/lobehub/lobe-chat/issues/965) ([62c0573](https://github.com/lobehub/lobe-chat/commit/62c0573))
|
|
46
|
+
|
|
47
|
+
</details>
|
|
48
|
+
|
|
49
|
+
<div align="right">
|
|
50
|
+
|
|
51
|
+
[](#readme-top)
|
|
52
|
+
|
|
53
|
+
</div>
|
|
54
|
+
|
|
5
55
|
### [Version 0.119.6](https://github.com/lobehub/lobe-chat/compare/v0.119.5...v0.119.6)
|
|
6
56
|
|
|
7
57
|
<sup>Released on **2024-01-06**</sup>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lobehub/chat",
|
|
3
|
-
"version": "0.119.
|
|
3
|
+
"version": "0.119.8",
|
|
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",
|
|
@@ -4,13 +4,13 @@ import { memo, useMemo, useState } from 'react';
|
|
|
4
4
|
import { useTranslation } from 'react-i18next';
|
|
5
5
|
import { Flexbox } from 'react-layout-kit';
|
|
6
6
|
|
|
7
|
-
import { useScreenshot } from '@/app/chat/features/ChatHeader/ShareButton/useScreenshot';
|
|
8
7
|
import { FORM_STYLE } from '@/const/layoutTokens';
|
|
9
8
|
import { useChatStore } from '@/store/chat';
|
|
10
9
|
import { useGlobalStore } from '@/store/global';
|
|
11
10
|
|
|
12
11
|
import Preview from './Preview';
|
|
13
12
|
import { FieldType, ImageType } from './type';
|
|
13
|
+
import { useScreenshot } from './useScreenshot';
|
|
14
14
|
|
|
15
15
|
enum Tab {
|
|
16
16
|
Screenshot = 'screenshot',
|
|
@@ -147,6 +147,7 @@ const ShareModal = memo<ModalProps>(({ onCancel, open }) => {
|
|
|
147
147
|
style={{ width: '100%' }}
|
|
148
148
|
value={tab}
|
|
149
149
|
/>
|
|
150
|
+
{tab === Tab.Screenshot && <Preview title={title} {...fieldValue} />}
|
|
150
151
|
<Form
|
|
151
152
|
initialValues={DEFAULT_FIELD_VALUE}
|
|
152
153
|
items={settings}
|
|
@@ -154,7 +155,6 @@ const ShareModal = memo<ModalProps>(({ onCancel, open }) => {
|
|
|
154
155
|
onValuesChange={(_, v) => setFieldValue(v)}
|
|
155
156
|
{...FORM_STYLE}
|
|
156
157
|
/>
|
|
157
|
-
{tab === Tab.Screenshot && <Preview title={title} {...fieldValue} />}
|
|
158
158
|
</Flexbox>
|
|
159
159
|
</Modal>
|
|
160
160
|
);
|
|
@@ -10,7 +10,7 @@ const ChatList = memo(() => {
|
|
|
10
10
|
const ids = useChatStore(chatSelectors.currentChatIDsWithGuideMessage);
|
|
11
11
|
|
|
12
12
|
return (
|
|
13
|
-
<Flexbox height={'100%'} style={{ position: 'relative' }}>
|
|
13
|
+
<Flexbox height={'100%'} style={{ paddingTop: 24, position: 'relative' }}>
|
|
14
14
|
{ids.map((id, index) => (
|
|
15
15
|
<Item id={id} index={index} key={id} />
|
|
16
16
|
))}
|
|
@@ -11,7 +11,7 @@ interface LocaleLayoutProps extends PropsWithChildren {
|
|
|
11
11
|
lang?: string;
|
|
12
12
|
}
|
|
13
13
|
|
|
14
|
-
const
|
|
14
|
+
const Locale = memo<LocaleLayoutProps>(({ children, lang }) => {
|
|
15
15
|
const { data: locale } = useSWR(
|
|
16
16
|
lang,
|
|
17
17
|
async () =>
|
|
@@ -41,10 +41,4 @@ const InnerLocale = memo<LocaleLayoutProps>(({ children, lang }) => {
|
|
|
41
41
|
return <ConfigProvider locale={locale}>{children}</ConfigProvider>;
|
|
42
42
|
});
|
|
43
43
|
|
|
44
|
-
|
|
45
|
-
// <Suspense fallback={<Loading />}>
|
|
46
|
-
// <InnerLocale {...props} />
|
|
47
|
-
// </Suspense>
|
|
48
|
-
// ));
|
|
49
|
-
|
|
50
|
-
export default InnerLocale;
|
|
44
|
+
export default Locale;
|
|
@@ -303,7 +303,13 @@ export const chatMessage: StateCreator<
|
|
|
303
303
|
set({ messages }, false, n(`dispatchMessage/${payload.type}`, payload));
|
|
304
304
|
},
|
|
305
305
|
fetchAIChatMessage: async (messages, assistantId) => {
|
|
306
|
-
const {
|
|
306
|
+
const {
|
|
307
|
+
toggleChatLoading,
|
|
308
|
+
refreshMessages,
|
|
309
|
+
updateMessageContent,
|
|
310
|
+
dispatchMessage,
|
|
311
|
+
createSmoothMessage,
|
|
312
|
+
} = get();
|
|
307
313
|
|
|
308
314
|
const abortController = toggleChatLoading(
|
|
309
315
|
true,
|
|
@@ -403,6 +409,12 @@ export const chatMessage: StateCreator<
|
|
|
403
409
|
// is this message is just a function call
|
|
404
410
|
if (isFunctionMessageAtStart(output)) {
|
|
405
411
|
stopAnimation();
|
|
412
|
+
dispatchMessage({
|
|
413
|
+
id: assistantId,
|
|
414
|
+
key: 'content',
|
|
415
|
+
type: 'updateMessage',
|
|
416
|
+
value: output,
|
|
417
|
+
});
|
|
406
418
|
isFunctionCall = true;
|
|
407
419
|
}
|
|
408
420
|
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { Icon } from '@lobehub/ui';
|
|
2
|
-
import { Loader2 } from 'lucide-react';
|
|
3
|
-
import { memo } from 'react';
|
|
4
|
-
import { Center } from 'react-layout-kit';
|
|
5
|
-
|
|
6
|
-
const Loading = memo(() => (
|
|
7
|
-
<div
|
|
8
|
-
style={{
|
|
9
|
-
backdropFilter: 'blur(3px)',
|
|
10
|
-
height: '100%',
|
|
11
|
-
width: '100vw',
|
|
12
|
-
zIndex: 100,
|
|
13
|
-
}}
|
|
14
|
-
>
|
|
15
|
-
<Center flex={1} gap={12} width={'100%'}>
|
|
16
|
-
<Icon icon={Loader2} spin />
|
|
17
|
-
</Center>
|
|
18
|
-
</div>
|
|
19
|
-
));
|
|
20
|
-
|
|
21
|
-
export default Loading;
|