@lobehub/chat 0.155.6 → 0.155.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 CHANGED
@@ -2,6 +2,56 @@
2
2
 
3
3
  # Changelog
4
4
 
5
+ ### [Version 0.155.8](https://github.com/lobehub/lobe-chat/compare/v0.155.7...v0.155.8)
6
+
7
+ <sup>Released on **2024-05-09**</sup>
8
+
9
+ #### 🐛 Bug Fixes
10
+
11
+ - **misc**: Fix mobile session style.
12
+
13
+ <br/>
14
+
15
+ <details>
16
+ <summary><kbd>Improvements and Fixes</kbd></summary>
17
+
18
+ #### What's fixed
19
+
20
+ - **misc**: Fix mobile session style ([998a191](https://github.com/lobehub/lobe-chat/commit/998a191))
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
+
30
+ ### [Version 0.155.7](https://github.com/lobehub/lobe-chat/compare/v0.155.6...v0.155.7)
31
+
32
+ <sup>Released on **2024-05-08**</sup>
33
+
34
+ #### 🐛 Bug Fixes
35
+
36
+ - **misc**: Fix panel expand.
37
+
38
+ <br/>
39
+
40
+ <details>
41
+ <summary><kbd>Improvements and Fixes</kbd></summary>
42
+
43
+ #### What's fixed
44
+
45
+ - **misc**: Fix panel expand ([5e78089](https://github.com/lobehub/lobe-chat/commit/5e78089))
46
+
47
+ </details>
48
+
49
+ <div align="right">
50
+
51
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top)
52
+
53
+ </div>
54
+
5
55
  ### [Version 0.155.6](https://github.com/lobehub/lobe-chat/compare/v0.155.5...v0.155.6)
6
56
 
7
57
  <sup>Released on **2024-05-08**</sup>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lobehub/chat",
3
- "version": "0.155.6",
3
+ "version": "0.155.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",
@@ -33,6 +33,11 @@ const TopicPanel = memo(({ children }: PropsWithChildren) => {
33
33
  ]);
34
34
  const [expand, setExpand] = useState(showAgentSettings);
35
35
 
36
+ const handleExpand = (e: boolean) => {
37
+ toggleConfig(e);
38
+ setExpand(e);
39
+ };
40
+
36
41
  useLayoutEffect(() => {
37
42
  if (!isPreferenceInit) return;
38
43
  setExpand(showAgentSettings);
@@ -52,7 +57,7 @@ const TopicPanel = memo(({ children }: PropsWithChildren) => {
52
57
  expand={expand}
53
58
  minWidth={CHAT_SIDEBAR_WIDTH}
54
59
  mode={md ? 'fixed' : 'float'}
55
- onExpandChange={toggleConfig}
60
+ onExpandChange={handleExpand}
56
61
  placement={'right'}
57
62
  showHandlerWideArea={false}
58
63
  >
@@ -31,11 +31,12 @@ const SessionPanel = memo<PropsWithChildren>(({ children }) => {
31
31
  const [tmpWidth, setWidth] = useState(sessionsWidth);
32
32
  if (tmpWidth !== sessionsWidth) setWidth(sessionsWidth);
33
33
 
34
- const handleExpand: DraggablePanelProps['onExpandChange'] = (expand) => {
34
+ const handleExpand: DraggablePanelProps['onExpandChange'] = (e) => {
35
35
  updatePreference({
36
- sessionsWidth: expand ? 320 : 0,
37
- showSessionPanel: expand,
36
+ sessionsWidth: e ? 320 : 0,
37
+ showSessionPanel: e,
38
38
  });
39
+ setExpand(e);
39
40
  };
40
41
 
41
42
  const handleSizeChange: DraggablePanelProps['onSizeChange'] = (_, size) => {
@@ -10,34 +10,31 @@ import { useQuery } from '@/hooks/useQuery';
10
10
  import { LayoutProps } from './type';
11
11
 
12
12
  const useStyles = createStyles(({ css, token }) => ({
13
- active: css`
14
- display: unset;
15
- `,
16
13
  main: css`
17
14
  position: relative;
18
15
  overflow: hidden;
19
- display: none;
20
16
  background: ${token.colorBgLayout};
21
17
  `,
22
18
  }));
23
19
 
24
20
  const Layout = memo<LayoutProps>(({ children, session }) => {
25
21
  const { showMobileWorkspace } = useQuery();
26
- const { cx, styles } = useStyles();
22
+ const { styles } = useStyles();
27
23
 
28
24
  return (
29
25
  <>
30
26
  <Flexbox
31
- className={cx(styles.main, !showMobileWorkspace && styles.active)}
27
+ className={styles.main}
32
28
  height="100%"
29
+ style={showMobileWorkspace ? { display: 'none' } : undefined}
33
30
  width="100%"
34
31
  >
35
32
  {session}
36
33
  </Flexbox>
37
34
  <Flexbox
38
- className={cx(styles.main, showMobileWorkspace && styles.active)}
35
+ className={styles.main}
39
36
  height="100%"
40
- id={'lobe-workspace-mobile'}
37
+ style={showMobileWorkspace ? undefined : { display: 'none' }}
41
38
  width="100%"
42
39
  >
43
40
  {children}