@lobehub/chat 0.83.8 → 0.83.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 +25 -0
- package/package.json +1 -1
- package/src/app/market/{features/SideBar → (desktop)/AgentDetail}/Desktop.tsx +1 -1
- package/src/app/market/(desktop)/AgentDetail/index.tsx +16 -0
- package/src/app/market/(desktop)/Header/index.tsx +13 -0
- package/src/app/market/{layout.desktop → (desktop)/layout}/Desktop.tsx +3 -3
- package/src/app/market/{layout.desktop → (desktop)/layout}/index.tsx +1 -1
- package/src/app/market/(mobile)/AgentDetail.tsx +12 -0
- package/src/app/market/{layout.mobile.tsx → (mobile)/layout.mobile.tsx} +3 -3
- package/src/app/market/{features/SideBar → components/AgentDetail}/AgentInfo/index.tsx +1 -1
- package/src/app/market/components/AgentDetail/index.tsx +10 -0
- package/src/app/market/layout.tsx +2 -2
- package/src/app/settings/mobile/index.tsx +1 -1
- package/src/components/ResponsiveLayout.tsx +1 -1
- package/src/app/market/features/Header/index.tsx +0 -13
- package/src/app/market/features/SideBar/index.tsx +0 -23
- /package/src/app/market/{features → (desktop)}/Header/Desktop.tsx +0 -0
- /package/src/app/market/{features/Header/Mobile.tsx → (mobile)/Header.tsx} +0 -0
- /package/src/app/market/{features/SideBar → components/AgentDetail}/AgentInfo/Comment.tsx +0 -0
- /package/src/app/market/{features/SideBar → components/AgentDetail}/AgentInfo/Header.tsx +0 -0
- /package/src/app/market/{features/SideBar → components/AgentDetail}/AgentInfo/Loading.tsx +0 -0
- /package/src/app/market/{features/SideBar → components/AgentDetail}/AgentInfo/TokenTag.tsx +0 -0
- /package/src/app/market/{features/SideBar → components/AgentDetail}/AgentInfo/style.ts +0 -0
- /package/src/app/market/{features/SideBar → components/AgentDetail}/Mobile.tsx +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,31 @@
|
|
|
2
2
|
|
|
3
3
|
# Changelog
|
|
4
4
|
|
|
5
|
+
### [Version 0.83.9](https://github.com/lobehub/lobe-chat/compare/v0.83.8...v0.83.9)
|
|
6
|
+
|
|
7
|
+
<sup>Released on **2023-10-08**</sup>
|
|
8
|
+
|
|
9
|
+
#### ♻ Code Refactoring
|
|
10
|
+
|
|
11
|
+
- **agent-market**: Refactor desktop and mobile to improve mobile performance.
|
|
12
|
+
|
|
13
|
+
<br/>
|
|
14
|
+
|
|
15
|
+
<details>
|
|
16
|
+
<summary><kbd>Improvements and Fixes</kbd></summary>
|
|
17
|
+
|
|
18
|
+
#### Code refactoring
|
|
19
|
+
|
|
20
|
+
- **agent-market**: Refactor desktop and mobile to improve mobile performance, closes [#278](https://github.com/lobehub/lobe-chat/issues/278) ([82b7f60](https://github.com/lobehub/lobe-chat/commit/82b7f60))
|
|
21
|
+
|
|
22
|
+
</details>
|
|
23
|
+
|
|
24
|
+
<div align="right">
|
|
25
|
+
|
|
26
|
+
[](#readme-top)
|
|
27
|
+
|
|
28
|
+
</div>
|
|
29
|
+
|
|
5
30
|
### [Version 0.83.8](https://github.com/lobehub/lobe-chat/compare/v0.83.7...v0.83.8)
|
|
6
31
|
|
|
7
32
|
<sup>Released on **2023-10-07**</sup>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lobehub/chat",
|
|
3
|
-
"version": "0.83.
|
|
3
|
+
"version": "0.83.9",
|
|
4
4
|
"description": "An open-source, extensible (Function Calling), high-performance chatbot framework. It supports one-click free deployment of your private ChatGPT/LLM web application",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"chatbot",
|
|
@@ -20,7 +20,7 @@ const useStyles = createStyles(({ css, token, stylish }) => ({
|
|
|
20
20
|
noScrollbar: stylish.noScrollbar,
|
|
21
21
|
}));
|
|
22
22
|
|
|
23
|
-
const SideBar = memo<{ children
|
|
23
|
+
const SideBar = memo<{ children?: ReactNode }>(({ children }) => {
|
|
24
24
|
const { styles } = useStyles();
|
|
25
25
|
const [tempId, setTempId] = useState<string>('');
|
|
26
26
|
const [showAgentSidebar, deactivateAgent, activateAgent] = useMarketStore((s) => [
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { memo } from 'react';
|
|
2
|
+
|
|
3
|
+
import Mobile from '@/app/market/components/AgentDetail/Mobile';
|
|
4
|
+
import ResponsiveLayout from '@/components/ResponsiveLayout';
|
|
5
|
+
import { useIsMobile } from '@/hooks/useIsMobile';
|
|
6
|
+
|
|
7
|
+
import { AgentDetailContent } from '../../components/AgentDetail';
|
|
8
|
+
import Desktop from './Desktop';
|
|
9
|
+
|
|
10
|
+
const AgentDetail = memo(() => (
|
|
11
|
+
<ResponsiveLayout Desktop={Desktop} Mobile={Mobile} isMobile={useIsMobile}>
|
|
12
|
+
<AgentDetailContent />
|
|
13
|
+
</ResponsiveLayout>
|
|
14
|
+
));
|
|
15
|
+
|
|
16
|
+
export default AgentDetail;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { memo } from 'react';
|
|
2
|
+
|
|
3
|
+
import ResponsiveLayout from '@/components/ResponsiveLayout';
|
|
4
|
+
import { useIsMobile } from '@/hooks/useIsMobile';
|
|
5
|
+
|
|
6
|
+
import Mobile from '../../(mobile)/Header';
|
|
7
|
+
import Desktop from './Desktop';
|
|
8
|
+
|
|
9
|
+
const Header = memo(() => (
|
|
10
|
+
<ResponsiveLayout Desktop={Desktop} Mobile={Mobile} isMobile={useIsMobile} />
|
|
11
|
+
));
|
|
12
|
+
|
|
13
|
+
export default Header;
|
|
@@ -8,9 +8,9 @@ import { MAX_WIDTH } from '@/const/layoutTokens';
|
|
|
8
8
|
import { useSwitchSideBarOnInit } from '@/store/global';
|
|
9
9
|
import { SidebarTabKey } from '@/store/global/initialState';
|
|
10
10
|
|
|
11
|
-
import AppLayout from '
|
|
12
|
-
import
|
|
13
|
-
import
|
|
11
|
+
import AppLayout from '../../../../layout/AppLayout';
|
|
12
|
+
import SideBar from '../AgentDetail';
|
|
13
|
+
import Header from '../Header';
|
|
14
14
|
|
|
15
15
|
const useStyles = createStyles(({ css }) => ({
|
|
16
16
|
background: css`
|
|
@@ -5,7 +5,7 @@ import { PropsWithChildren } from 'react';
|
|
|
5
5
|
import ResponsiveLayout from '@/components/ResponsiveLayout';
|
|
6
6
|
import { useIsMobile } from '@/hooks/useIsMobile';
|
|
7
7
|
|
|
8
|
-
import Mobile from '
|
|
8
|
+
import Mobile from '../../(mobile)/layout.mobile';
|
|
9
9
|
import Desktop from './Desktop';
|
|
10
10
|
|
|
11
11
|
const Market = ({ children }: PropsWithChildren) => (
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { memo } from 'react';
|
|
2
|
+
|
|
3
|
+
import { AgentDetailContent } from '../components/AgentDetail';
|
|
4
|
+
import Mobile from '../components/AgentDetail/Mobile';
|
|
5
|
+
|
|
6
|
+
const AgentDetail = memo(() => (
|
|
7
|
+
<Mobile>
|
|
8
|
+
<AgentDetailContent />
|
|
9
|
+
</Mobile>
|
|
10
|
+
));
|
|
11
|
+
|
|
12
|
+
export default AgentDetail;
|
|
@@ -7,8 +7,8 @@ import AppMobileLayout from '@/layout/AppMobileLayout';
|
|
|
7
7
|
import { useSwitchSideBarOnInit } from '@/store/global';
|
|
8
8
|
import { SidebarTabKey } from '@/store/global/initialState';
|
|
9
9
|
|
|
10
|
-
import
|
|
11
|
-
import
|
|
10
|
+
import DetailModal from './AgentDetail';
|
|
11
|
+
import Header from './Header';
|
|
12
12
|
|
|
13
13
|
const MarketLayout = ({ children }: PropsWithChildren) => {
|
|
14
14
|
useSwitchSideBarOnInit(SidebarTabKey.Market);
|
|
@@ -18,7 +18,7 @@ const MarketLayout = ({ children }: PropsWithChildren) => {
|
|
|
18
18
|
<Flexbox flex={1} gap={16} style={{ padding: 16 }}>
|
|
19
19
|
{children}
|
|
20
20
|
</Flexbox>
|
|
21
|
-
<
|
|
21
|
+
<DetailModal />
|
|
22
22
|
</AppMobileLayout>
|
|
23
23
|
);
|
|
24
24
|
};
|
|
@@ -6,7 +6,7 @@ import { Flexbox } from 'react-layout-kit';
|
|
|
6
6
|
|
|
7
7
|
import { useMarketStore } from '@/store/market';
|
|
8
8
|
|
|
9
|
-
import AgentCardBanner from '
|
|
9
|
+
import AgentCardBanner from '../../../features/AgentCard/AgentCardBanner';
|
|
10
10
|
import Comment from './Comment';
|
|
11
11
|
import Header from './Header';
|
|
12
12
|
import Loading from './Loading';
|
|
@@ -3,8 +3,8 @@ import { PropsWithChildren } from 'react';
|
|
|
3
3
|
import ResponsiveLayout from '@/components/ResponsiveLayout';
|
|
4
4
|
import { isMobileDevice } from '@/utils/responsive';
|
|
5
5
|
|
|
6
|
-
import Desktop from './layout
|
|
7
|
-
import Mobile from './layout.mobile';
|
|
6
|
+
import Desktop from './(desktop)/layout';
|
|
7
|
+
import Mobile from './(mobile)/layout.mobile';
|
|
8
8
|
|
|
9
9
|
export default ({ children }: PropsWithChildren) => (
|
|
10
10
|
<ResponsiveLayout Desktop={Desktop} Mobile={Mobile} isMobile={isMobileDevice}>
|
|
@@ -6,8 +6,8 @@ import { memo } from 'react';
|
|
|
6
6
|
import { Center } from 'react-layout-kit';
|
|
7
7
|
|
|
8
8
|
import pkg from '@/../package.json';
|
|
9
|
+
import Header from '@/app/market/(mobile)/Header';
|
|
9
10
|
import AgentCardBanner from '@/app/market/features/AgentCard/AgentCardBanner';
|
|
10
|
-
import Header from '@/app/market/features/Header';
|
|
11
11
|
import AvatarWithUpload from '@/features/AvatarWithUpload';
|
|
12
12
|
import AppMobileLayout from '@/layout/AppMobileLayout';
|
|
13
13
|
import { useGlobalStore, useSwitchSideBarOnInit } from '@/store/global';
|
|
@@ -3,7 +3,7 @@ import { PropsWithChildren, ReactNode } from 'react';
|
|
|
3
3
|
interface ServerResponsiveLayoutProps {
|
|
4
4
|
Desktop: (props: PropsWithChildren) => ReactNode;
|
|
5
5
|
Mobile: (props: PropsWithChildren) => ReactNode;
|
|
6
|
-
children
|
|
6
|
+
children?: ReactNode;
|
|
7
7
|
isMobile: () => boolean;
|
|
8
8
|
}
|
|
9
9
|
const ResponsiveLayout = ({ children, Desktop, Mobile, isMobile }: ServerResponsiveLayoutProps) => {
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { useResponsive } from 'antd-style';
|
|
2
|
-
import { memo } from 'react';
|
|
3
|
-
|
|
4
|
-
import Desktop from './Desktop';
|
|
5
|
-
import Mobile from './Mobile';
|
|
6
|
-
|
|
7
|
-
const Header = memo(() => {
|
|
8
|
-
const { mobile } = useResponsive();
|
|
9
|
-
const Render = mobile ? Mobile : Desktop;
|
|
10
|
-
return <Render />;
|
|
11
|
-
});
|
|
12
|
-
|
|
13
|
-
export default Header;
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { useResponsive } from 'antd-style';
|
|
2
|
-
import { memo } from 'react';
|
|
3
|
-
import { Flexbox } from 'react-layout-kit';
|
|
4
|
-
|
|
5
|
-
import AgentInfo from './AgentInfo';
|
|
6
|
-
import Desktop from './Desktop';
|
|
7
|
-
import Mobile from './Mobile';
|
|
8
|
-
|
|
9
|
-
const SideBar = memo(() => {
|
|
10
|
-
const { mobile } = useResponsive();
|
|
11
|
-
|
|
12
|
-
const Render = mobile ? Mobile : Desktop;
|
|
13
|
-
|
|
14
|
-
return (
|
|
15
|
-
<Render>
|
|
16
|
-
<Flexbox>
|
|
17
|
-
<AgentInfo />
|
|
18
|
-
</Flexbox>
|
|
19
|
-
</Render>
|
|
20
|
-
);
|
|
21
|
-
});
|
|
22
|
-
|
|
23
|
-
export default SideBar;
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|