@lobehub/chat 0.79.5 → 0.79.7

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.79.7](https://github.com/lobehub/lobe-chat/compare/v0.79.6...v0.79.7)
6
+
7
+ <sup>Released on **2023-09-27**</sup>
8
+
9
+ #### ♻ Code Refactoring
10
+
11
+ - **misc**: Use hook to check PWA env.
12
+
13
+ <br/>
14
+
15
+ <details>
16
+ <summary><kbd>Improvements and Fixes</kbd></summary>
17
+
18
+ #### Code refactoring
19
+
20
+ - **misc**: Use hook to check PWA env ([b4234db](https://github.com/lobehub/lobe-chat/commit/b4234db))
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.79.6](https://github.com/lobehub/lobe-chat/compare/v0.79.5...v0.79.6)
31
+
32
+ <sup>Released on **2023-09-27**</sup>
33
+
34
+ #### 💄 Styles
35
+
36
+ - **misc**: Optmize PWA style and scroll effect.
37
+
38
+ <br/>
39
+
40
+ <details>
41
+ <summary><kbd>Improvements and Fixes</kbd></summary>
42
+
43
+ #### Styles
44
+
45
+ - **misc**: Optmize PWA style and scroll effect ([0ae05b8](https://github.com/lobehub/lobe-chat/commit/0ae05b8))
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.79.5](https://github.com/lobehub/lobe-chat/compare/v0.79.4...v0.79.5)
6
56
 
7
57
  <sup>Released on **2023-09-26**</sup>
package/docs/Home.md CHANGED
@@ -16,7 +16,7 @@ LobeChat is a open-source, extensible ([Function Calling][fc-url]), high-perform
16
16
 
17
17
  - [Environment Variables](Environment-Variable) | [环境变量](Environment-Variable.zh-CN)
18
18
  - [Maintaining Updates with LobeChat Self-Deployment](Upstream-Sync) | [自部署保持更新](Upstream-Sync.zh-CN)
19
- - [Deploying with Azure OpenAI](Deploy-with-Azure-OpenAI) | [自部署保持更新](Deploy-with-Azure-OpenAI.zh-CN)
19
+ - [Deploying with Azure OpenAI](Deploy-with-Azure-OpenAI) | [使用 Azure OpenAI 部署](Deploy-with-Azure-OpenAI.zh-CN)
20
20
 
21
21
  ---
22
22
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lobehub/chat",
3
- "version": "0.79.5",
3
+ "version": "0.79.7",
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",
@@ -68,8 +68,8 @@
68
68
  "@emoji-mart/data": "^1",
69
69
  "@emoji-mart/react": "^1",
70
70
  "@icons-pack/react-simple-icons": "^9",
71
- "@lobehub/chat-plugin-sdk": "^1.17.7",
72
- "@lobehub/chat-plugins-gateway": "^1.5.3",
71
+ "@lobehub/chat-plugin-sdk": "latest",
72
+ "@lobehub/chat-plugins-gateway": "latest",
73
73
  "@lobehub/ui": "latest",
74
74
  "@vercel/analytics": "^1",
75
75
  "ahooks": "^3",
@@ -88,16 +88,16 @@
88
88
  "lucide-react": "latest",
89
89
  "nanoid": "^5",
90
90
  "next": "^13.5.3",
91
- "openai": "^4.10.0",
91
+ "openai": "^4",
92
92
  "polished": "^4",
93
93
  "react": "^18",
94
94
  "react-dom": "^18",
95
95
  "react-hotkeys-hook": "^4",
96
96
  "react-i18next": "^13",
97
97
  "react-intersection-observer": "^9",
98
- "react-layout-kit": "^1.7.4",
98
+ "react-layout-kit": "^1",
99
99
  "swr": "^2",
100
- "systemjs": "^6.14.2",
100
+ "systemjs": "^6",
101
101
  "ts-md5": "^1",
102
102
  "url-join": "^5",
103
103
  "use-merge-value": "^1",
@@ -118,7 +118,7 @@
118
118
  "@types/node": "^20",
119
119
  "@types/react": "^18",
120
120
  "@types/react-dom": "^18",
121
- "@types/systemjs": "^6.13.3",
121
+ "@types/systemjs": "^6",
122
122
  "@types/uuid": "^9",
123
123
  "@umijs/lint": "^4",
124
124
  "@vitest/coverage-v8": "latest",
@@ -19,7 +19,7 @@ const RootLayout = ({ children }: PropsWithChildren) => {
19
19
  const primaryColor = cookieStore.get(LOBE_THEME_PRIMARY_COLOR);
20
20
 
21
21
  return (
22
- <html lang="en">
22
+ <html lang="en-US">
23
23
  <body>
24
24
  <StyleRegistry>
25
25
  <Layout
@@ -47,7 +47,7 @@ const metadata: Metadata = {
47
47
  width: 960,
48
48
  },
49
49
  ],
50
- locale: 'en_US',
50
+ locale: 'en-US',
51
51
  siteName: title,
52
52
  title: title,
53
53
  type: 'website',
@@ -0,0 +1,15 @@
1
+ import { useEffect, useState } from 'react';
2
+
3
+ export const useIsPWA = () => {
4
+ const [isPWA, setIsPWA] = useState(false);
5
+
6
+ useEffect(() => {
7
+ const isInStandaloneMode = () =>
8
+ 'standalone' in window.navigator && window.navigator['standalone'];
9
+ if (isInStandaloneMode()) {
10
+ setIsPWA(true);
11
+ }
12
+ }, []);
13
+
14
+ return isPWA;
15
+ };
@@ -1,11 +1,19 @@
1
+ import { useTheme } from 'antd-style';
1
2
  import { PropsWithChildren, memo } from 'react';
2
3
  import { Flexbox } from 'react-layout-kit';
3
4
 
4
5
  import SideBar from '@/features/SideBar';
6
+ import { useIsPWA } from '@/hooks/useIsPWA';
5
7
 
6
8
  const AppLayout = memo<PropsWithChildren>(({ children }) => {
9
+ const isPWA = useIsPWA();
10
+ const theme = useTheme();
7
11
  return (
8
- <Flexbox horizontal width={'100%'}>
12
+ <Flexbox
13
+ horizontal
14
+ style={isPWA ? { borderTop: `1px solid ${theme.colorBorder}` } : {}}
15
+ width={'100%'}
16
+ >
9
17
  <SideBar />
10
18
  {children}
11
19
  </Flexbox>
@@ -1,6 +1,7 @@
1
1
  import { css } from 'antd-style';
2
2
 
3
3
  export default () => css`
4
+ html,
4
5
  body,
5
6
  .ant-app {
6
7
  overflow: hidden;