@lobehub/chat 1.51.0 → 1.51.1
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 +17 -0
- package/changelog/v1.json +5 -0
- package/next.config.ts +6 -0
- package/package.json +1 -1
- package/src/app/(main)/_layout/Desktop/SideBar/Avatar.tsx +7 -4
- package/src/features/User/UserInfo.tsx +3 -2
- package/src/features/User/UserPanel/PanelContent.tsx +1 -3
- package/src/app/(main)/repos/page.tsx +0 -5
package/CHANGELOG.md
CHANGED
@@ -2,6 +2,23 @@
|
|
2
2
|
|
3
3
|
# Changelog
|
4
4
|
|
5
|
+
### [Version 1.51.1](https://github.com/lobehub/lobe-chat/compare/v1.51.0...v1.51.1)
|
6
|
+
|
7
|
+
<sup>Released on **2025-02-05**</sup>
|
8
|
+
|
9
|
+
<br/>
|
10
|
+
|
11
|
+
<details>
|
12
|
+
<summary><kbd>Improvements and Fixes</kbd></summary>
|
13
|
+
|
14
|
+
</details>
|
15
|
+
|
16
|
+
<div align="right">
|
17
|
+
|
18
|
+
[](#readme-top)
|
19
|
+
|
20
|
+
</div>
|
21
|
+
|
5
22
|
## [Version 1.51.0](https://github.com/lobehub/lobe-chat/compare/v1.50.5...v1.51.0)
|
6
23
|
|
7
24
|
<sup>Released on **2025-02-05**</sup>
|
package/changelog/v1.json
CHANGED
package/next.config.ts
CHANGED
@@ -164,6 +164,12 @@ const nextConfig: NextConfig = {
|
|
164
164
|
permanent: true,
|
165
165
|
source: '/welcome',
|
166
166
|
},
|
167
|
+
// we need back /repos url in the further
|
168
|
+
{
|
169
|
+
destination: '/files',
|
170
|
+
permanent: false,
|
171
|
+
source: '/repos',
|
172
|
+
},
|
167
173
|
],
|
168
174
|
// when external packages in dev mode with turbopack, this config will lead to bundle error
|
169
175
|
serverExternalPackages: isProd ? ['@electric-sql/pglite'] : undefined,
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@lobehub/chat",
|
3
|
-
"version": "1.51.
|
3
|
+
"version": "1.51.1",
|
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,7 +1,7 @@
|
|
1
1
|
import { ActionIcon } from '@lobehub/ui';
|
2
2
|
import { Tooltip } from 'antd';
|
3
3
|
import { LucideX } from 'lucide-react';
|
4
|
-
import { memo } from 'react';
|
4
|
+
import { Suspense, memo } from 'react';
|
5
5
|
import { useTranslation } from 'react-i18next';
|
6
6
|
import { Flexbox } from 'react-layout-kit';
|
7
7
|
|
@@ -14,10 +14,13 @@ const Avatar = memo(() => {
|
|
14
14
|
const { t } = useTranslation('common');
|
15
15
|
const hideSettingsMoveGuide = useUserStore(preferenceSelectors.hideSettingsMoveGuide);
|
16
16
|
const updateGuideState = useUserStore((s) => s.updateGuideState);
|
17
|
+
|
17
18
|
const content = (
|
18
|
-
<
|
19
|
-
<
|
20
|
-
|
19
|
+
<Suspense fallback={<UserAvatar />}>
|
20
|
+
<UserPanel>
|
21
|
+
<UserAvatar clickable />
|
22
|
+
</UserPanel>
|
23
|
+
</Suspense>
|
21
24
|
);
|
22
25
|
|
23
26
|
return hideSettingsMoveGuide ? (
|
@@ -24,9 +24,10 @@ const useStyles = createStyles(({ css, token }) => ({
|
|
24
24
|
|
25
25
|
export interface UserInfoProps extends FlexboxProps {
|
26
26
|
avatarProps?: Partial<UserAvatarProps>;
|
27
|
+
onClick?: () => void;
|
27
28
|
}
|
28
29
|
|
29
|
-
const UserInfo = memo<UserInfoProps>(({ avatarProps, ...rest }) => {
|
30
|
+
const UserInfo = memo<UserInfoProps>(({ avatarProps, onClick, ...rest }) => {
|
30
31
|
const { styles, theme } = useStyles();
|
31
32
|
const isSignedIn = useUserStore(authSelectors.isLogin);
|
32
33
|
const [nickname, username] = useUserStore((s) => [
|
@@ -44,7 +45,7 @@ const UserInfo = memo<UserInfoProps>(({ avatarProps, ...rest }) => {
|
|
44
45
|
paddingInline={12}
|
45
46
|
{...rest}
|
46
47
|
>
|
47
|
-
<Flexbox align={'center'} gap={12} horizontal>
|
48
|
+
<Flexbox align={'center'} gap={12} horizontal onClick={onClick}>
|
48
49
|
<UserAvatar background={theme.colorFill} size={48} {...avatarProps} />
|
49
50
|
<Flexbox flex={1} gap={6}>
|
50
51
|
<div className={styles.nickname}>{nickname}</div>
|
@@ -44,9 +44,7 @@ const PanelContent = memo<{ closePopover: () => void }>(({ closePopover }) => {
|
|
44
44
|
<Flexbox gap={2} style={{ minWidth: 300 }}>
|
45
45
|
{!enableAuth || (enableAuth && isLoginWithAuth) ? (
|
46
46
|
<>
|
47
|
-
<
|
48
|
-
<UserInfo />
|
49
|
-
</Link>
|
47
|
+
<UserInfo avatarProps={{ clickable: false }} />
|
50
48
|
{!isDeprecatedEdition && (
|
51
49
|
<Link href={'/profile/stats'} style={{ color: 'inherit' }}>
|
52
50
|
<DataStatistics />
|