@lobehub/chat 0.152.8 → 0.152.10
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 +42 -0
- package/package.json +3 -3
- package/src/app/(main)/(mobile)/me/features/AvatarBanner.tsx +9 -5
- package/src/app/(main)/(mobile)/me/features/Cate.tsx +1 -3
- package/src/app/(main)/(mobile)/me/features/ExtraCate.tsx +1 -3
- package/src/app/(main)/(mobile)/me/page.tsx +2 -2
- package/src/app/(main)/chat/features/SessionListContent/ListItem/index.tsx +5 -1
- package/src/app/(main)/market/features/AgentCard/index.tsx +4 -2
- package/src/app/(main)/market/features/AgentList.tsx +10 -1
- package/src/app/(main)/market/features/TagList.tsx +8 -4
- package/src/app/(main)/settings/_layout/Desktop/Header.tsx +1 -0
- package/src/app/(main)/settings/_layout/Mobile/Header.tsx +1 -1
- package/src/components/Cell/Divider.tsx +2 -2
- package/src/components/Cell/index.tsx +2 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,48 @@
|
|
|
2
2
|
|
|
3
3
|
# Changelog
|
|
4
4
|
|
|
5
|
+
### [Version 0.152.10](https://github.com/lobehub/lobe-chat/compare/v0.152.9...v0.152.10)
|
|
6
|
+
|
|
7
|
+
<sup>Released on **2024-05-03**</sup>
|
|
8
|
+
|
|
9
|
+
#### 💄 Styles
|
|
10
|
+
|
|
11
|
+
- **misc**: Improve market layout styles and mobile style.
|
|
12
|
+
|
|
13
|
+
<br/>
|
|
14
|
+
|
|
15
|
+
<details>
|
|
16
|
+
<summary><kbd>Improvements and Fixes</kbd></summary>
|
|
17
|
+
|
|
18
|
+
#### Styles
|
|
19
|
+
|
|
20
|
+
- **misc**: Improve market layout styles and mobile style, closes [#2347](https://github.com/lobehub/lobe-chat/issues/2347) ([79b8115](https://github.com/lobehub/lobe-chat/commit/79b8115))
|
|
21
|
+
|
|
22
|
+
</details>
|
|
23
|
+
|
|
24
|
+
<div align="right">
|
|
25
|
+
|
|
26
|
+
[](#readme-top)
|
|
27
|
+
|
|
28
|
+
</div>
|
|
29
|
+
|
|
30
|
+
### [Version 0.152.9](https://github.com/lobehub/lobe-chat/compare/v0.152.8...v0.152.9)
|
|
31
|
+
|
|
32
|
+
<sup>Released on **2024-05-03**</sup>
|
|
33
|
+
|
|
34
|
+
<br/>
|
|
35
|
+
|
|
36
|
+
<details>
|
|
37
|
+
<summary><kbd>Improvements and Fixes</kbd></summary>
|
|
38
|
+
|
|
39
|
+
</details>
|
|
40
|
+
|
|
41
|
+
<div align="right">
|
|
42
|
+
|
|
43
|
+
[](#readme-top)
|
|
44
|
+
|
|
45
|
+
</div>
|
|
46
|
+
|
|
5
47
|
### [Version 0.152.8](https://github.com/lobehub/lobe-chat/compare/v0.152.7...v0.152.8)
|
|
6
48
|
|
|
7
49
|
<sup>Released on **2024-05-03**</sup>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lobehub/chat",
|
|
3
|
-
"version": "0.152.
|
|
3
|
+
"version": "0.152.10",
|
|
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",
|
|
@@ -103,7 +103,7 @@
|
|
|
103
103
|
"@vercel/speed-insights": "^1.0.10",
|
|
104
104
|
"ahooks": "^3.7.11",
|
|
105
105
|
"ai": "3.0.19",
|
|
106
|
-
"antd": "
|
|
106
|
+
"antd": "5.16.5",
|
|
107
107
|
"antd-style": "^3.6.2",
|
|
108
108
|
"brotli-wasm": "^3.0.0",
|
|
109
109
|
"chroma-js": "^2.4.2",
|
|
@@ -179,7 +179,7 @@
|
|
|
179
179
|
"@next/bundle-analyzer": "^14.2.3",
|
|
180
180
|
"@next/eslint-plugin-next": "^14.2.3",
|
|
181
181
|
"@peculiar/webcrypto": "^1.4.6",
|
|
182
|
-
"@testing-library/jest-dom": "
|
|
182
|
+
"@testing-library/jest-dom": "6.4.2",
|
|
183
183
|
"@testing-library/react": "^15.0.5",
|
|
184
184
|
"@types/chroma-js": "^2.4.4",
|
|
185
185
|
"@types/debug": "^4.1.12",
|
|
@@ -4,20 +4,24 @@ import { createStyles } from 'antd-style';
|
|
|
4
4
|
import { PropsWithChildren, memo } from 'react';
|
|
5
5
|
import { Center, Flexbox } from 'react-layout-kit';
|
|
6
6
|
|
|
7
|
-
export const
|
|
7
|
+
export const AVATAR_SIZE = 80;
|
|
8
|
+
|
|
9
|
+
export const useStyles = createStyles(({ css, token, isDarkMode }) => ({
|
|
8
10
|
avatar: css`
|
|
9
|
-
position: absolute;
|
|
10
11
|
z-index: 10;
|
|
11
12
|
|
|
12
13
|
flex: none;
|
|
13
14
|
|
|
14
|
-
|
|
15
|
-
|
|
15
|
+
margin-top: -${AVATAR_SIZE / 2 + 6}px;
|
|
16
|
+
|
|
17
|
+
background: ${isDarkMode ? token.colorBgLayout : token.colorBgContainer};
|
|
18
|
+
border: 6px solid ${isDarkMode ? token.colorBgLayout : token.colorBgContainer};
|
|
16
19
|
border-radius: 50%;
|
|
17
20
|
`,
|
|
18
21
|
banner: css`
|
|
19
22
|
position: relative;
|
|
20
23
|
flex: none;
|
|
24
|
+
background: ${isDarkMode ? token.colorBgLayout : token.colorBgContainer};
|
|
21
25
|
`,
|
|
22
26
|
bannerBox: css`
|
|
23
27
|
position: relative;
|
|
@@ -25,7 +29,7 @@ export const useStyles = createStyles(({ css, token }) => ({
|
|
|
25
29
|
overflow: hidden;
|
|
26
30
|
|
|
27
31
|
width: 100%;
|
|
28
|
-
height:
|
|
32
|
+
height: 100px;
|
|
29
33
|
|
|
30
34
|
background: ${token.colorBgLayout};
|
|
31
35
|
`,
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
|
-
import { useTheme } from 'antd-style';
|
|
4
3
|
import { useRouter } from 'next/navigation';
|
|
5
4
|
import { memo } from 'react';
|
|
6
5
|
import { Flexbox } from 'react-layout-kit';
|
|
@@ -11,12 +10,11 @@ import Cell from '@/components/Cell';
|
|
|
11
10
|
import Divider from '@/components/Cell/Divider';
|
|
12
11
|
|
|
13
12
|
const SettingCate = memo(() => {
|
|
14
|
-
const theme = useTheme();
|
|
15
13
|
const settingItems = useCategory({ mobile: true });
|
|
16
14
|
const router = useRouter();
|
|
17
15
|
|
|
18
16
|
return (
|
|
19
|
-
<Flexbox
|
|
17
|
+
<Flexbox width={'100%'}>
|
|
20
18
|
{settingItems?.map(({ key, icon, label, type }: any, index) => {
|
|
21
19
|
if (type === 'divider') return <Divider key={index} />;
|
|
22
20
|
return (
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
|
-
import { useTheme } from 'antd-style';
|
|
4
3
|
import { memo } from 'react';
|
|
5
4
|
import { Flexbox } from 'react-layout-kit';
|
|
6
5
|
|
|
@@ -10,11 +9,10 @@ import Divider from '@/components/Cell/Divider';
|
|
|
10
9
|
import { useExtraCate } from './useExtraCate';
|
|
11
10
|
|
|
12
11
|
const ExtraCate = memo(() => {
|
|
13
|
-
const theme = useTheme();
|
|
14
12
|
const mainItems = useExtraCate();
|
|
15
13
|
|
|
16
14
|
return (
|
|
17
|
-
<Flexbox
|
|
15
|
+
<Flexbox width={'100%'}>
|
|
18
16
|
{mainItems?.map(({ key, icon, label, type, onClick }: any, index) => {
|
|
19
17
|
if (type === 'divider') return <Divider key={index} />;
|
|
20
18
|
return <Cell icon={icon} key={key} label={label} onClick={onClick} />;
|
|
@@ -5,7 +5,7 @@ import BrandWatermark from '@/components/BrandWatermark';
|
|
|
5
5
|
import Avatar from '@/features/AvatarWithUpload';
|
|
6
6
|
import { isMobileDevice } from '@/utils/responsive';
|
|
7
7
|
|
|
8
|
-
import AvatarBanner from './features/AvatarBanner';
|
|
8
|
+
import AvatarBanner, { AVATAR_SIZE } from './features/AvatarBanner';
|
|
9
9
|
import Cate from './features/Cate';
|
|
10
10
|
import ExtraCate from './features/ExtraCate';
|
|
11
11
|
|
|
@@ -17,7 +17,7 @@ const Page = () => {
|
|
|
17
17
|
return (
|
|
18
18
|
<>
|
|
19
19
|
<AvatarBanner>
|
|
20
|
-
<Avatar size={
|
|
20
|
+
<Avatar size={AVATAR_SIZE} />
|
|
21
21
|
</AvatarBanner>
|
|
22
22
|
<Cate />
|
|
23
23
|
<ExtraCate />
|
|
@@ -21,11 +21,14 @@ const useStyles = createStyles(({ css, token, responsive }) => {
|
|
|
21
21
|
border-radius: 0;
|
|
22
22
|
}
|
|
23
23
|
`,
|
|
24
|
+
title: css`
|
|
25
|
+
line-height: 1.2;
|
|
26
|
+
`,
|
|
24
27
|
};
|
|
25
28
|
});
|
|
26
29
|
|
|
27
30
|
const ListItem = memo<ListItemProps & { avatar: string; avatarBackground?: string }>(
|
|
28
|
-
({ avatar, avatarBackground, active, showAction, actions, ...props }) => {
|
|
31
|
+
({ avatar, avatarBackground, active, showAction, actions, title, ...props }) => {
|
|
29
32
|
const ref = useRef(null);
|
|
30
33
|
const isHovering = useHover(ref);
|
|
31
34
|
const { mobile } = useResponsive();
|
|
@@ -52,6 +55,7 @@ const ListItem = memo<ListItemProps & { avatar: string; avatarBackground?: strin
|
|
|
52
55
|
className={styles.container}
|
|
53
56
|
ref={ref}
|
|
54
57
|
showAction={actions && (isHovering || showAction)}
|
|
58
|
+
title={<span className={styles.title}>{title}</span>}
|
|
55
59
|
{...(props as any)}
|
|
56
60
|
/>
|
|
57
61
|
);
|
|
@@ -28,12 +28,13 @@ const useStyles = createStyles(({ css, token, isDarkMode }) => ({
|
|
|
28
28
|
|
|
29
29
|
background: ${token.colorBgContainer};
|
|
30
30
|
border-radius: ${token.borderRadiusLG}px;
|
|
31
|
-
box-shadow: 0 0 1px 1px ${token.colorFillQuaternary}
|
|
31
|
+
box-shadow: 0 0 1px 1px ${isDarkMode ? token.colorFillQuaternary : token.colorFillSecondary}
|
|
32
|
+
inset;
|
|
32
33
|
|
|
33
34
|
transition: box-shadow 0.2s ${token.motionEaseInOut};
|
|
34
35
|
|
|
35
36
|
&:hover {
|
|
36
|
-
box-shadow: 0 0 1px 1px ${token.colorFillSecondary} inset;
|
|
37
|
+
box-shadow: 0 0 1px 1px ${isDarkMode ? token.colorFillSecondary : token.colorFill} inset;
|
|
37
38
|
}
|
|
38
39
|
`,
|
|
39
40
|
desc: css`
|
|
@@ -50,6 +51,7 @@ const useStyles = createStyles(({ css, token, isDarkMode }) => ({
|
|
|
50
51
|
title: css`
|
|
51
52
|
margin-bottom: 0 !important;
|
|
52
53
|
font-size: 18px !important;
|
|
54
|
+
font-weight: bold;
|
|
53
55
|
`,
|
|
54
56
|
}));
|
|
55
57
|
|
|
@@ -58,7 +58,16 @@ const AgentList = memo<AgentListProps>(({ mobile }) => {
|
|
|
58
58
|
[],
|
|
59
59
|
);
|
|
60
60
|
|
|
61
|
-
if (isLoading
|
|
61
|
+
if (isLoading || (!searchKeywords && agentList?.length === 0)) {
|
|
62
|
+
return (
|
|
63
|
+
<>
|
|
64
|
+
<h2 className={styles.title}>{t('title.recentSubmits')}</h2>
|
|
65
|
+
<Skeleton paragraph={{ rows: 8 }} title={false} />
|
|
66
|
+
<h2 className={styles.title}>{t('title.allAgents')}</h2>
|
|
67
|
+
<Skeleton paragraph={{ rows: 8 }} title={false} />
|
|
68
|
+
</>
|
|
69
|
+
);
|
|
70
|
+
}
|
|
62
71
|
|
|
63
72
|
if (searchKeywords) {
|
|
64
73
|
if (agentList.length === 0) return <Empty image={Empty.PRESENTED_IMAGE_SIMPLE} />;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
|
-
import { Button } from 'antd';
|
|
3
|
+
import { Button, Skeleton } from 'antd';
|
|
4
4
|
import { createStyles, useResponsive } from 'antd-style';
|
|
5
5
|
import isEqual from 'fast-deep-equal';
|
|
6
6
|
import { startCase } from 'lodash-es';
|
|
@@ -9,7 +9,7 @@ import { Flexbox } from 'react-layout-kit';
|
|
|
9
9
|
|
|
10
10
|
import { agentMarketSelectors, useMarketStore } from '@/store/market';
|
|
11
11
|
|
|
12
|
-
const useStyles = createStyles(({ css, token }) => ({
|
|
12
|
+
const useStyles = createStyles(({ css, token, isDarkMode }) => ({
|
|
13
13
|
active: css`
|
|
14
14
|
color: ${token.colorBgLayout};
|
|
15
15
|
background: ${token.colorPrimary};
|
|
@@ -20,11 +20,11 @@ const useStyles = createStyles(({ css, token }) => ({
|
|
|
20
20
|
}
|
|
21
21
|
`,
|
|
22
22
|
tag: css`
|
|
23
|
-
background: ${token.colorBgContainer};
|
|
23
|
+
background: ${isDarkMode ? token.colorBgContainer : token.colorFillTertiary};
|
|
24
24
|
border: none;
|
|
25
25
|
|
|
26
26
|
&:hover {
|
|
27
|
-
background: ${token.colorBgElevated} !important;
|
|
27
|
+
background: ${isDarkMode ? token.colorBgElevated : token.colorFill} !important;
|
|
28
28
|
}
|
|
29
29
|
`,
|
|
30
30
|
}));
|
|
@@ -38,6 +38,10 @@ const TagList = memo(() => {
|
|
|
38
38
|
]);
|
|
39
39
|
const agentTagList = useMarketStore(agentMarketSelectors.getAgentTagList, isEqual);
|
|
40
40
|
|
|
41
|
+
if (agentTagList?.length === 0) {
|
|
42
|
+
return <Skeleton paragraph={{ rows: 4 }} title={false} />;
|
|
43
|
+
}
|
|
44
|
+
|
|
41
45
|
const list = md ? agentTagList : agentTagList.slice(0, 20);
|
|
42
46
|
|
|
43
47
|
return (
|
|
@@ -22,7 +22,7 @@ const Header = memo(() => {
|
|
|
22
22
|
<MobileNavBarTitle
|
|
23
23
|
title={
|
|
24
24
|
<Flexbox align={'center'} gap={4} horizontal>
|
|
25
|
-
{t(`tab.${activeSettingsKey}`)}
|
|
25
|
+
<span style={{ lineHeight: 1.2 }}> {t(`tab.${activeSettingsKey}`)}</span>
|
|
26
26
|
{activeSettingsKey === SettingsTabs.Sync && (
|
|
27
27
|
<Tag color={'gold'}>{t('tab.experiment')}</Tag>
|
|
28
28
|
)}
|
|
@@ -4,9 +4,9 @@ import { createStyles } from 'antd-style';
|
|
|
4
4
|
import { memo } from 'react';
|
|
5
5
|
|
|
6
6
|
const useStyles = createStyles(
|
|
7
|
-
({ css, token }) => css`
|
|
7
|
+
({ css, token, isDarkMode }) => css`
|
|
8
8
|
height: 6px;
|
|
9
|
-
background: ${token.colorBgLayout};
|
|
9
|
+
background: ${isDarkMode ? token.colorBgContainer : token.colorBgLayout};
|
|
10
10
|
`,
|
|
11
11
|
);
|
|
12
12
|
|
|
@@ -5,10 +5,11 @@ import { ReactNode, memo } from 'react';
|
|
|
5
5
|
|
|
6
6
|
const { Item } = List;
|
|
7
7
|
|
|
8
|
-
const useStyles = createStyles(({ css }) => ({
|
|
8
|
+
const useStyles = createStyles(({ css, token, isDarkMode }) => ({
|
|
9
9
|
container: css`
|
|
10
10
|
position: relative;
|
|
11
11
|
padding-block: 16px !important;
|
|
12
|
+
background: ${isDarkMode ? token.colorBgLayout : token.colorBgContainer};
|
|
12
13
|
border-radius: 0;
|
|
13
14
|
`,
|
|
14
15
|
}));
|