@lobehub/chat 0.86.0-beta.5 → 0.86.0-beta.6
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/.github/workflows/docker.yml +45 -0
- package/.github/workflows/issue-check-inactive.yml +1 -0
- package/.github/workflows/issue-close-require.yml +3 -0
- package/.github/workflows/issue-remove-inactive.yml +1 -0
- package/.github/workflows/pre-welcome.yml +5 -4
- package/.github/workflows/release.yml +2 -2
- package/.releaserc.js +6 -6
- package/CHANGELOG.md +15 -48
- package/next.config.mjs +1 -2
- package/package.json +3 -1
- package/public/manifest.json +1 -1
- package/scripts/i18nWorkflow/genDiff.ts +2 -1
- package/scripts/i18nWorkflow/utils.ts +3 -9
- package/src/app/chat/(desktop)/index.tsx +1 -1
- package/src/app/chat/(desktop)/layout.desktop.tsx +1 -1
- package/src/app/chat/(mobile)/mobile/index.tsx +1 -1
- package/src/app/chat/features/SessionListContent/Inbox/index.tsx +1 -0
- package/src/app/chat/features/SessionListContent/List/index.tsx +1 -0
- package/src/app/home/index.tsx +1 -1
- package/src/app/market/(desktop)/features/AgentDetail.tsx +1 -1
- package/src/app/market/(desktop)/features/Header.tsx +1 -1
- package/src/app/market/(desktop)/layout.desktop.tsx +2 -2
- package/src/app/market/features/AgentCard/AgentCardBanner.tsx +1 -0
- package/src/app/market/features/AgentDetailContent/AgentInfo/Header.tsx +1 -1
- package/src/app/settings/(desktop)/layout.desktop.tsx +1 -1
- package/src/app/settings/common/index.tsx +4 -0
- package/src/app/settings/features/Footer.tsx +24 -0
- package/src/app/settings/features/SideBar/List.tsx +1 -0
- package/src/app/settings/features/SideBar/index.tsx +1 -1
- package/src/app/settings/features/UpgradeAlert.tsx +1 -1
- package/src/app/settings/llm/LLM/index.tsx +7 -25
- package/src/app/settings/llm/index.tsx +16 -1
- package/src/app/welcome/(desktop)/features/Showcase.tsx +1 -1
- package/src/app/welcome/(desktop)/layout.desktop.tsx +1 -1
- package/src/app/welcome/(mobile)/features/Showcase.tsx +1 -1
- package/src/app/welcome/(mobile)/layout.mobile.tsx +1 -1
- package/src/app/welcome/features/Banner/style.ts +1 -1
- package/src/features/FolderPanel/index.tsx +2 -2
- package/src/features/SideBar/index.tsx +1 -1
- package/src/layout/AppLayout.desktop.tsx +1 -0
- package/src/layout/AppLayout.mobile.tsx +1 -2
- package/src/layout/GlobalLayout/LocaleLoading.tsx +1 -1
- package/src/styles/global.ts +6 -5
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
name: Publish Docker image
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
workflow_dispatch:
|
|
5
|
+
release:
|
|
6
|
+
types: [published]
|
|
7
|
+
|
|
8
|
+
jobs:
|
|
9
|
+
push_to_registry:
|
|
10
|
+
name: Push Docker image to Docker Hub
|
|
11
|
+
runs-on: ubuntu-latest
|
|
12
|
+
steps:
|
|
13
|
+
- name: Check out the repo
|
|
14
|
+
uses: actions/checkout@v3
|
|
15
|
+
- name: Log in to Docker Hub
|
|
16
|
+
uses: docker/login-action@v2
|
|
17
|
+
with:
|
|
18
|
+
username: ${{ secrets.DOCKER_REGISTRY_USER }}
|
|
19
|
+
password: ${{ secrets.DOCKER_REGISTRY_PASSWORD }}
|
|
20
|
+
|
|
21
|
+
- name: Extract metadata (tags, labels) for Docker
|
|
22
|
+
id: meta
|
|
23
|
+
uses: docker/metadata-action@v4
|
|
24
|
+
with:
|
|
25
|
+
images: lobehub/lobe-chat
|
|
26
|
+
tags: |
|
|
27
|
+
type=raw,value=latest
|
|
28
|
+
type=ref,event=tag
|
|
29
|
+
|
|
30
|
+
- name: Set up QEMU
|
|
31
|
+
uses: docker/setup-qemu-action@v2
|
|
32
|
+
|
|
33
|
+
- name: Set up Docker Buildx
|
|
34
|
+
uses: docker/setup-buildx-action@v2
|
|
35
|
+
|
|
36
|
+
- name: Build and push Docker image
|
|
37
|
+
uses: docker/build-push-action@v4
|
|
38
|
+
with:
|
|
39
|
+
context: .
|
|
40
|
+
platforms: linux/amd64,linux/arm64
|
|
41
|
+
push: true
|
|
42
|
+
tags: ${{ steps.meta.outputs.tags }}
|
|
43
|
+
labels: ${{ steps.meta.outputs.labels }}
|
|
44
|
+
cache-from: type=gha
|
|
45
|
+
cache-to: type=gha,mode=max
|
|
@@ -18,6 +18,7 @@ jobs:
|
|
|
18
18
|
uses: actions-cool/issues-helper@v3
|
|
19
19
|
with:
|
|
20
20
|
actions: 'close-issues'
|
|
21
|
+
token: ${{ secrets.GH_TOKEN }}
|
|
21
22
|
labels: '✅ Fixed'
|
|
22
23
|
inactive-day: 3
|
|
23
24
|
body: |
|
|
@@ -28,6 +29,7 @@ jobs:
|
|
|
28
29
|
uses: actions-cool/issues-helper@v3
|
|
29
30
|
with:
|
|
30
31
|
actions: 'close-issues'
|
|
32
|
+
token: ${{ secrets.GH_TOKEN }}
|
|
31
33
|
labels: '🤔 Need Reproduce'
|
|
32
34
|
inactive-day: 3
|
|
33
35
|
body: |
|
|
@@ -38,6 +40,7 @@ jobs:
|
|
|
38
40
|
uses: actions-cool/issues-helper@v3
|
|
39
41
|
with:
|
|
40
42
|
actions: 'close-issues'
|
|
43
|
+
token: ${{ secrets.GH_TOKEN }}
|
|
41
44
|
labels: "🙅🏻♀️ WON'T DO"
|
|
42
45
|
inactive-day: 3
|
|
43
46
|
body: |
|
|
@@ -14,9 +14,10 @@ jobs:
|
|
|
14
14
|
with:
|
|
15
15
|
token: ${{ secrets.GITHUB_TOKEN }}
|
|
16
16
|
comment: |
|
|
17
|
-
Great PR @${{ github.event.pull_request.user.login }}
|
|
17
|
+
🎉 Great PR @${{ github.event.pull_request.user.login }} 🎉
|
|
18
18
|
|
|
19
|
-
|
|
20
|
-
|
|
19
|
+
The growth of project is inseparable from user feedback and contribution, thanks for your contribution ❤️
|
|
20
|
+
|
|
21
|
+
项目的成长离不开用户反馈和贡献,感谢您的贡献 ❤️
|
|
22
|
+
emoji: 'hooray'
|
|
21
23
|
pr-emoji: '+1, heart'
|
|
22
|
-
close: true
|
|
@@ -29,5 +29,5 @@ jobs:
|
|
|
29
29
|
env:
|
|
30
30
|
GH_TOKEN: ${{ secrets.GH_TOKEN }}
|
|
31
31
|
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
|
|
32
|
-
DOCKER_REGISTRY_PASSWORD: ${{ secrets.DOCKER_REGISTRY_PASSWORD }}
|
|
33
|
-
DOCKER_REGISTRY_USER: ${{ secrets.DOCKER_REGISTRY_USER }}
|
|
32
|
+
# DOCKER_REGISTRY_PASSWORD: ${{ secrets.DOCKER_REGISTRY_PASSWORD }}
|
|
33
|
+
# DOCKER_REGISTRY_USER: ${{ secrets.DOCKER_REGISTRY_USER }}
|
package/.releaserc.js
CHANGED
|
@@ -4,11 +4,11 @@ module.exports = {
|
|
|
4
4
|
...release,
|
|
5
5
|
plugins: [
|
|
6
6
|
...release.plugins,
|
|
7
|
-
[
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
],
|
|
7
|
+
// [
|
|
8
|
+
// '@codedependant/semantic-release-docker',
|
|
9
|
+
// {
|
|
10
|
+
// dockerImage: 'lobe-chat',
|
|
11
|
+
// },
|
|
12
|
+
// ],
|
|
13
13
|
],
|
|
14
14
|
};
|
package/CHANGELOG.md
CHANGED
|
@@ -2,64 +2,31 @@
|
|
|
2
2
|
|
|
3
3
|
# Changelog
|
|
4
4
|
|
|
5
|
-
## [Version 0.86.0-beta.
|
|
5
|
+
## [Version 0.86.0-beta.6](https://github.com/lobehub/lobe-chat/compare/v0.86.0-beta.5...v0.86.0-beta.6)
|
|
6
6
|
|
|
7
7
|
<sup>Released on **2023-10-10**</sup>
|
|
8
8
|
|
|
9
9
|
#### ✨ Features
|
|
10
10
|
|
|
11
|
-
- **misc**:
|
|
11
|
+
- **misc**: Try with docker ci.
|
|
12
12
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
<details>
|
|
16
|
-
<summary><kbd>Improvements and Fixes</kbd></summary>
|
|
17
|
-
|
|
18
|
-
#### What's improved
|
|
19
|
-
|
|
20
|
-
- **misc**: Add default ACCESS_CODE=lobe66 ([3ebec4a](https://github.com/lobehub/lobe-chat/commit/3ebec4a))
|
|
21
|
-
|
|
22
|
-
</details>
|
|
23
|
-
|
|
24
|
-
<div align="right">
|
|
25
|
-
|
|
26
|
-
[](#readme-top)
|
|
27
|
-
|
|
28
|
-
</div>
|
|
13
|
+
#### 💄 Styles
|
|
29
14
|
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
<sup>Released on **2023-10-10**</sup>
|
|
15
|
+
- **misc**: Add new components, modify display properties, and update settings feature, Replace 100vh with 100% to fix mobile scroll problem.
|
|
33
16
|
|
|
34
17
|
<br/>
|
|
35
18
|
|
|
36
19
|
<details>
|
|
37
20
|
<summary><kbd>Improvements and Fixes</kbd></summary>
|
|
38
21
|
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
<div align="right">
|
|
42
|
-
|
|
43
|
-
[](#readme-top)
|
|
44
|
-
|
|
45
|
-
</div>
|
|
46
|
-
|
|
47
|
-
## [Version 0.86.0-beta.3](https://github.com/lobehub/lobe-chat/compare/v0.86.0-beta.2...v0.86.0-beta.3)
|
|
48
|
-
|
|
49
|
-
<sup>Released on **2023-10-10**</sup>
|
|
50
|
-
|
|
51
|
-
#### ✨ Features
|
|
52
|
-
|
|
53
|
-
- **misc**: Try with new docker ci.
|
|
54
|
-
|
|
55
|
-
<br/>
|
|
22
|
+
#### What's improved
|
|
56
23
|
|
|
57
|
-
|
|
58
|
-
<summary><kbd>Improvements and Fixes</kbd></summary>
|
|
24
|
+
- **misc**: Try with docker ci ([0e1ecf7](https://github.com/lobehub/lobe-chat/commit/0e1ecf7))
|
|
59
25
|
|
|
60
|
-
####
|
|
26
|
+
#### Styles
|
|
61
27
|
|
|
62
|
-
- **misc**:
|
|
28
|
+
- **misc**: Add new components, modify display properties, and update settings feature ([87a4a46](https://github.com/lobehub/lobe-chat/commit/87a4a46))
|
|
29
|
+
- **misc**: Replace 100vh with 100% to fix mobile scroll problem ([2ef3c94](https://github.com/lobehub/lobe-chat/commit/2ef3c94))
|
|
63
30
|
|
|
64
31
|
</details>
|
|
65
32
|
|
|
@@ -69,23 +36,23 @@
|
|
|
69
36
|
|
|
70
37
|
</div>
|
|
71
38
|
|
|
72
|
-
|
|
39
|
+
### [Version 0.85.3](https://github.com/lobehub/lobe-chat/compare/v0.85.2...v0.85.3)
|
|
73
40
|
|
|
74
41
|
<sup>Released on **2023-10-10**</sup>
|
|
75
42
|
|
|
76
|
-
####
|
|
43
|
+
#### 💄 Styles
|
|
77
44
|
|
|
78
|
-
- **misc**: Add
|
|
45
|
+
- **misc**: Add new components, modify display properties, and update settings feature, Replace 100vh with 100% to fix mobile scroll problem.
|
|
79
46
|
|
|
80
47
|
<br/>
|
|
81
48
|
|
|
82
49
|
<details>
|
|
83
50
|
<summary><kbd>Improvements and Fixes</kbd></summary>
|
|
84
51
|
|
|
85
|
-
####
|
|
52
|
+
#### Styles
|
|
86
53
|
|
|
87
|
-
- **misc**: Add
|
|
88
|
-
- **misc**:
|
|
54
|
+
- **misc**: Add new components, modify display properties, and update settings feature ([87a4a46](https://github.com/lobehub/lobe-chat/commit/87a4a46))
|
|
55
|
+
- **misc**: Replace 100vh with 100% to fix mobile scroll problem ([2ef3c94](https://github.com/lobehub/lobe-chat/commit/2ef3c94))
|
|
89
56
|
|
|
90
57
|
</details>
|
|
91
58
|
|
package/next.config.mjs
CHANGED
|
@@ -17,8 +17,7 @@ const withPWA = nextPWA({
|
|
|
17
17
|
/** @type {import('next').NextConfig} */
|
|
18
18
|
const nextConfig = {
|
|
19
19
|
reactStrictMode: true,
|
|
20
|
-
|
|
21
|
-
// So we need to transpile it to lib mode
|
|
20
|
+
swcMinify: true,
|
|
22
21
|
transpilePackages: ['@lobehub/ui', 'antd-style'],
|
|
23
22
|
webpack(config) {
|
|
24
23
|
config.experiments = {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lobehub/chat",
|
|
3
|
-
"version": "0.86.0-beta.
|
|
3
|
+
"version": "0.86.0-beta.6",
|
|
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",
|
|
@@ -130,6 +130,7 @@
|
|
|
130
130
|
"@testing-library/jest-dom": "^6",
|
|
131
131
|
"@testing-library/react": "^14",
|
|
132
132
|
"@types/chroma-js": "^2",
|
|
133
|
+
"@types/lodash": "^4",
|
|
133
134
|
"@types/lodash-es": "^4",
|
|
134
135
|
"@types/mixpanel-browser": "^2",
|
|
135
136
|
"@types/node": "^20",
|
|
@@ -148,6 +149,7 @@
|
|
|
148
149
|
"husky": "^8",
|
|
149
150
|
"jsdom": "^22",
|
|
150
151
|
"lint-staged": "^14",
|
|
152
|
+
"lodash": "^4",
|
|
151
153
|
"next-pwa": "^5",
|
|
152
154
|
"node-fetch": "^3",
|
|
153
155
|
"prettier": "^3",
|
package/public/manifest.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"background_color": "#000000",
|
|
3
3
|
"description": "An open-source, extensible (Function Calling), high-performance chatbot framework. It supports one-click free deployment of your private ChatGPT/LLM web application",
|
|
4
|
-
"display": "
|
|
4
|
+
"display": "standalone",
|
|
5
5
|
"icons": [
|
|
6
6
|
{
|
|
7
7
|
"src": "/icons/icon-192x192.png",
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { consola } from 'consola';
|
|
2
2
|
import { colors } from 'consola/utils';
|
|
3
|
+
import { unset } from 'lodash';
|
|
3
4
|
import { existsSync } from 'node:fs';
|
|
4
5
|
|
|
5
6
|
import {
|
|
@@ -8,7 +9,7 @@ import {
|
|
|
8
9
|
localesResourcesFilepath,
|
|
9
10
|
outputLocaleJsonFilepath,
|
|
10
11
|
} from './const';
|
|
11
|
-
import { diff, readJSON, tagWhite, tagYellow,
|
|
12
|
+
import { diff, readJSON, tagWhite, tagYellow, writeJSON } from './utils';
|
|
12
13
|
|
|
13
14
|
export const genDiff = () => {
|
|
14
15
|
consola.start(`Diff between Dev/Prod local...`);
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { consola } from 'consola';
|
|
2
2
|
import { colors } from 'consola/utils';
|
|
3
3
|
import { tocForResources } from 'i18next-resources-for-ts';
|
|
4
|
+
import { isObject } from 'lodash';
|
|
4
5
|
import { readFileSync, writeFileSync } from 'node:fs';
|
|
5
6
|
import { resolve } from 'node:path';
|
|
6
7
|
|
|
@@ -58,8 +59,8 @@ export const diff = (obj1: any, obj2: any, prefix: string = ''): string[] => {
|
|
|
58
59
|
let result: string[] = [];
|
|
59
60
|
for (const key in obj1) {
|
|
60
61
|
if (!obj2[key]) continue;
|
|
61
|
-
if (
|
|
62
|
-
result = result
|
|
62
|
+
if (isObject(obj1[key]) && isObject(obj2[key])) {
|
|
63
|
+
result = [...result, ...diff(obj1[key], obj2[key], `${prefix}${key}.`)];
|
|
63
64
|
} else if (obj1[key] !== obj2[key]) {
|
|
64
65
|
result.push(`${prefix}${key}`);
|
|
65
66
|
}
|
|
@@ -67,13 +68,6 @@ export const diff = (obj1: any, obj2: any, prefix: string = ''): string[] => {
|
|
|
67
68
|
return result;
|
|
68
69
|
};
|
|
69
70
|
|
|
70
|
-
export const unset = (obj: any, key: string) => {
|
|
71
|
-
const keys = key.split('.');
|
|
72
|
-
const lastKey = keys.pop();
|
|
73
|
-
const lastObj = keys.reduce((obj, key) => (obj[key] = obj[key] || {}), obj);
|
|
74
|
-
if (lastKey) delete lastObj[lastKey];
|
|
75
|
-
};
|
|
76
|
-
|
|
77
71
|
export const tagBlue = (text: string) => colors.bgBlueBright(colors.black(` ${text} `));
|
|
78
72
|
export const tagYellow = (text: string) => colors.bgYellowBright(colors.black(` ${text} `));
|
|
79
73
|
export const tagGreen = (text: string) => colors.bgGreenBright(colors.black(` ${text} `));
|
|
@@ -18,7 +18,7 @@ const DesktopPage = memo(() => (
|
|
|
18
18
|
<Layout>
|
|
19
19
|
<PageTitle />
|
|
20
20
|
<ChatHeader />
|
|
21
|
-
<Flexbox flex={1} height={'calc(
|
|
21
|
+
<Flexbox flex={1} height={'calc(100% - 64px)'} horizontal>
|
|
22
22
|
<Conversation chatInput={<ChatInput />} />
|
|
23
23
|
<SideBar />
|
|
24
24
|
</Flexbox>
|
|
@@ -10,7 +10,7 @@ import Layout from './layout.mobile';
|
|
|
10
10
|
|
|
11
11
|
const Chat = memo(() => (
|
|
12
12
|
<Layout>
|
|
13
|
-
<Flexbox height={'calc(
|
|
13
|
+
<Flexbox height={'calc(100% - 44px)'} horizontal>
|
|
14
14
|
<Conversation chatInput={<ChatInput />} mobile />
|
|
15
15
|
<TopicList />
|
|
16
16
|
</Flexbox>
|
package/src/app/home/index.tsx
CHANGED
|
@@ -9,7 +9,7 @@ const Loading = () => {
|
|
|
9
9
|
const { t } = useTranslation();
|
|
10
10
|
|
|
11
11
|
return (
|
|
12
|
-
<Flexbox height={'
|
|
12
|
+
<Flexbox height={'100%'} width={'100%'}>
|
|
13
13
|
<Center flex={1} gap={12} width={'100%'}>
|
|
14
14
|
<Logo extra={'Chat'} size={48} type={'combine'} />
|
|
15
15
|
<Center gap={16} horizontal>
|
|
@@ -34,12 +34,12 @@ const MarketLayout = memo<PropsWithChildren>(({ children }) => {
|
|
|
34
34
|
<AppLayoutDesktop>
|
|
35
35
|
<Flexbox
|
|
36
36
|
flex={1}
|
|
37
|
-
height={'
|
|
37
|
+
height={'100%'}
|
|
38
38
|
id={'lobe-market-container'}
|
|
39
39
|
style={{ position: 'relative' }}
|
|
40
40
|
>
|
|
41
41
|
<Header />
|
|
42
|
-
<Flexbox flex={1} height={'calc(
|
|
42
|
+
<Flexbox flex={1} height={'calc(100% - 64px)'} horizontal>
|
|
43
43
|
<Flexbox align={'center'} flex={1} style={{ overflow: 'auto', padding: 16 }}>
|
|
44
44
|
<SafeSpacing />
|
|
45
45
|
|
|
@@ -47,7 +47,7 @@ const Header = memo(() => {
|
|
|
47
47
|
))}
|
|
48
48
|
</Center>
|
|
49
49
|
<div className={styles.desc}>{description}</div>
|
|
50
|
-
<Link className={styles.author} href={homepage} target={'_blank'}>
|
|
50
|
+
<Link aria-label={author} className={styles.author} href={homepage} target={'_blank'}>
|
|
51
51
|
@{author}
|
|
52
52
|
</Link>
|
|
53
53
|
<Button
|
|
@@ -14,7 +14,7 @@ export default memo(({ children }: PropsWithChildren) => {
|
|
|
14
14
|
return (
|
|
15
15
|
<AppLayoutDesktop>
|
|
16
16
|
<SideBar />
|
|
17
|
-
<Flexbox flex={1} height={'
|
|
17
|
+
<Flexbox flex={1} height={'100%'} style={{ position: 'relative' }}>
|
|
18
18
|
<Header />
|
|
19
19
|
<Flexbox align={'center'} flex={1} padding={24} style={{ overflow: 'auto' }}>
|
|
20
20
|
<SafeSpacing />
|
|
@@ -4,20 +4,24 @@ import { memo } from 'react';
|
|
|
4
4
|
import { useTranslation } from 'react-i18next';
|
|
5
5
|
|
|
6
6
|
import PageTitle from '@/components/PageTitle';
|
|
7
|
+
import { CURRENT_VERSION } from '@/const/version';
|
|
7
8
|
import { useSwitchSideBarOnInit } from '@/store/global/hooks/useSwitchSettingsOnInit';
|
|
8
9
|
import { SettingsTabs } from '@/store/global/initialState';
|
|
9
10
|
import { genSiteHeadTitle } from '@/utils/genSiteHeadTitle';
|
|
10
11
|
|
|
12
|
+
import Footer from '../features/Footer';
|
|
11
13
|
import Common from './Common';
|
|
12
14
|
|
|
13
15
|
export default memo(() => {
|
|
14
16
|
useSwitchSideBarOnInit(SettingsTabs.Common);
|
|
15
17
|
const { t } = useTranslation('setting');
|
|
16
18
|
const pageTitle = genSiteHeadTitle(t('tab.common'));
|
|
19
|
+
|
|
17
20
|
return (
|
|
18
21
|
<>
|
|
19
22
|
<PageTitle title={pageTitle} />
|
|
20
23
|
<Common />
|
|
24
|
+
<Footer>LobeChat v{CURRENT_VERSION}</Footer>
|
|
21
25
|
</>
|
|
22
26
|
);
|
|
23
27
|
});
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { Divider } from 'antd';
|
|
2
|
+
import { createStyles } from 'antd-style';
|
|
3
|
+
import { PropsWithChildren, memo } from 'react';
|
|
4
|
+
import { Center } from 'react-layout-kit';
|
|
5
|
+
|
|
6
|
+
const useStyles = createStyles(
|
|
7
|
+
({ css, token }) => css`
|
|
8
|
+
font-size: 14px;
|
|
9
|
+
color: ${token.colorTextDescription};
|
|
10
|
+
`,
|
|
11
|
+
);
|
|
12
|
+
|
|
13
|
+
const Footer = memo<PropsWithChildren>(({ children }) => {
|
|
14
|
+
const { styles } = useStyles();
|
|
15
|
+
return (
|
|
16
|
+
<Center style={{ maxWidth: 600, width: '100%' }}>
|
|
17
|
+
<Divider>
|
|
18
|
+
<span className={styles}>{children}</span>
|
|
19
|
+
</Divider>
|
|
20
|
+
</Center>
|
|
21
|
+
);
|
|
22
|
+
});
|
|
23
|
+
|
|
24
|
+
export default Footer;
|
|
@@ -27,7 +27,7 @@ const SideBar = memo(() => {
|
|
|
27
27
|
<DraggablePanelBody className={styles.body} style={{ padding: 0 }}>
|
|
28
28
|
<Flexbox className={styles.top} padding={16}>
|
|
29
29
|
<div>
|
|
30
|
-
<Logo className={styles.logo} size={36} type={'text'} />
|
|
30
|
+
<Logo className={styles.logo} extra={'Settings'} size={36} type={'text'} />
|
|
31
31
|
</div>
|
|
32
32
|
</Flexbox>
|
|
33
33
|
<UpgradeAlert />
|
|
@@ -14,7 +14,7 @@ const UpgradeAlert = memo(() => {
|
|
|
14
14
|
hasNewVersion && (
|
|
15
15
|
<Alert
|
|
16
16
|
action={
|
|
17
|
-
<Link href={MANUAL_UPGRADE_URL} target={'_blank'}>
|
|
17
|
+
<Link aria-label={t('upgradeVersion.action')} href={MANUAL_UPGRADE_URL} target={'_blank'}>
|
|
18
18
|
<Button size={'small'} type={'primary'}>
|
|
19
19
|
{t('upgradeVersion.action')}
|
|
20
20
|
</Button>
|
|
@@ -3,10 +3,8 @@ import { Form as AntForm, AutoComplete, Input, Switch } from 'antd';
|
|
|
3
3
|
import { createStyles } from 'antd-style';
|
|
4
4
|
import { debounce } from 'lodash-es';
|
|
5
5
|
import { Webhook } from 'lucide-react';
|
|
6
|
-
import Link from 'next/link';
|
|
7
6
|
import { memo } from 'react';
|
|
8
|
-
import {
|
|
9
|
-
import { Flexbox } from 'react-layout-kit';
|
|
7
|
+
import { useTranslation } from 'react-i18next';
|
|
10
8
|
|
|
11
9
|
import { FORM_STYLE } from '@/const/layoutTokens';
|
|
12
10
|
import { settingsSelectors, useEffectAfterGlobalHydrated, useGlobalStore } from '@/store/global';
|
|
@@ -24,9 +22,6 @@ const useStyles = createStyles(({ css, token }) => ({
|
|
|
24
22
|
color: ${token.colorTextDescription} !important;
|
|
25
23
|
}
|
|
26
24
|
`,
|
|
27
|
-
plan: css`
|
|
28
|
-
color: ${token.colorTextDescription};
|
|
29
|
-
`,
|
|
30
25
|
tip: css`
|
|
31
26
|
font-size: 12px;
|
|
32
27
|
color: ${token.colorTextDescription};
|
|
@@ -139,25 +134,12 @@ const LLM = memo(() => {
|
|
|
139
134
|
};
|
|
140
135
|
|
|
141
136
|
return (
|
|
142
|
-
<
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
/>
|
|
149
|
-
<Flexbox align={'center'} className={styles.plan}>
|
|
150
|
-
<div>
|
|
151
|
-
<Trans i18nKey="llm.waitingForMore" ns={'setting'}>
|
|
152
|
-
更多模型正在
|
|
153
|
-
<Link href="https://github.com/lobehub/lobe-chat/issues/151" target="_blank">
|
|
154
|
-
计划接入
|
|
155
|
-
</Link>
|
|
156
|
-
中 ,敬请期待 ✨
|
|
157
|
-
</Trans>
|
|
158
|
-
</div>
|
|
159
|
-
</Flexbox>
|
|
160
|
-
</Flexbox>
|
|
137
|
+
<Form
|
|
138
|
+
form={form}
|
|
139
|
+
items={[openAI]}
|
|
140
|
+
onValuesChange={debounce(setSettings, 100)}
|
|
141
|
+
{...FORM_STYLE}
|
|
142
|
+
/>
|
|
161
143
|
);
|
|
162
144
|
});
|
|
163
145
|
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
|
+
import Link from 'next/link';
|
|
3
4
|
import { memo } from 'react';
|
|
4
|
-
import { useTranslation } from 'react-i18next';
|
|
5
|
+
import { Trans, useTranslation } from 'react-i18next';
|
|
5
6
|
|
|
7
|
+
import Footer from '@/app/settings/features/Footer';
|
|
6
8
|
import PageTitle from '@/components/PageTitle';
|
|
7
9
|
import { useSwitchSideBarOnInit } from '@/store/global/hooks/useSwitchSettingsOnInit';
|
|
8
10
|
import { SettingsTabs } from '@/store/global/initialState';
|
|
@@ -18,6 +20,19 @@ export default memo(() => {
|
|
|
18
20
|
<>
|
|
19
21
|
<PageTitle title={pageTitle} />
|
|
20
22
|
<LLM />
|
|
23
|
+
<Footer>
|
|
24
|
+
<Trans i18nKey="llm.waitingForMore" ns={'setting'}>
|
|
25
|
+
更多模型正在
|
|
26
|
+
<Link
|
|
27
|
+
aria-label={'todo'}
|
|
28
|
+
href="https://github.com/lobehub/lobe-chat/issues/151"
|
|
29
|
+
target="_blank"
|
|
30
|
+
>
|
|
31
|
+
计划接入
|
|
32
|
+
</Link>
|
|
33
|
+
中 ,敬请期待 ✨
|
|
34
|
+
</Trans>
|
|
35
|
+
</Footer>
|
|
21
36
|
</>
|
|
22
37
|
);
|
|
23
38
|
});
|
|
@@ -4,7 +4,7 @@ import { Center, Flexbox } from 'react-layout-kit';
|
|
|
4
4
|
import Banner from '@/app/welcome/features/Banner';
|
|
5
5
|
|
|
6
6
|
const Showcase = memo(() => (
|
|
7
|
-
<Flexbox align={'center'} justify={'center'} style={{ height: 'calc(
|
|
7
|
+
<Flexbox align={'center'} justify={'center'} style={{ height: 'calc(100% - 44px)' }}>
|
|
8
8
|
<Center gap={16}>
|
|
9
9
|
<Banner mobile />
|
|
10
10
|
</Center>
|
|
@@ -12,7 +12,7 @@ const MobileLayout = memo<PropsWithChildren>(({ children }) => {
|
|
|
12
12
|
|
|
13
13
|
return (
|
|
14
14
|
<AppLayoutMobile navBar={<Header />} showTabBar style={{ background: theme.colorBgLayout }}>
|
|
15
|
-
<div style={{ paddingInline: 16 }}>{children}</div>
|
|
15
|
+
<div style={{ height: '100%', paddingInline: 16 }}>{children}</div>
|
|
16
16
|
</AppLayoutMobile>
|
|
17
17
|
);
|
|
18
18
|
});
|
|
@@ -8,7 +8,7 @@ import { useGlobalStore } from '@/store/global';
|
|
|
8
8
|
|
|
9
9
|
export const useStyles = createStyles(({ css, token }) => ({
|
|
10
10
|
panel: css`
|
|
11
|
-
height:
|
|
11
|
+
height: 100%;
|
|
12
12
|
color: ${token.colorTextSecondary};
|
|
13
13
|
background: ${token.colorBgContainer};
|
|
14
14
|
`,
|
|
@@ -48,7 +48,7 @@ const FolderPanel = memo<PropsWithChildren>(({ children }) => {
|
|
|
48
48
|
updatePreference({ sessionsWidth: nextWidth });
|
|
49
49
|
}}
|
|
50
50
|
placement="left"
|
|
51
|
-
size={{ height: '
|
|
51
|
+
size={{ height: '100%', width: sessionsWidth }}
|
|
52
52
|
>
|
|
53
53
|
<DraggablePanelContainer style={{ flex: 'none', height: '100%', minWidth: FOLDER_WIDTH }}>
|
|
54
54
|
{children}
|
|
@@ -14,7 +14,7 @@ export default memo(() => {
|
|
|
14
14
|
<SideNav
|
|
15
15
|
avatar={<AvatarWithUpload id={'avatar'} />}
|
|
16
16
|
bottomActions={<BottomActions setTab={setTab} tab={tab} />}
|
|
17
|
-
style={{ height: '
|
|
17
|
+
style={{ height: '100%' }}
|
|
18
18
|
topActions={<TopActions setTab={setTab} tab={tab} />}
|
|
19
19
|
/>
|
|
20
20
|
);
|
|
@@ -16,7 +16,7 @@ const useStyles = createStyles(({ css, cx, stylish }) => ({
|
|
|
16
16
|
overflow-y: auto;
|
|
17
17
|
|
|
18
18
|
width: 100vw;
|
|
19
|
-
height:
|
|
19
|
+
height: 100%;
|
|
20
20
|
`,
|
|
21
21
|
),
|
|
22
22
|
mobileNavBar: css`
|
|
@@ -62,7 +62,6 @@ const AppLayoutMobile = memo<AppMobileLayoutProps>(
|
|
|
62
62
|
<MobileTabBar className={styles.mobileTabBar} />
|
|
63
63
|
</>
|
|
64
64
|
)}
|
|
65
|
-
<SafeSpacing mobile position={'bottom'} />
|
|
66
65
|
</Flexbox>
|
|
67
66
|
);
|
|
68
67
|
},
|
package/src/styles/global.ts
CHANGED
|
@@ -3,20 +3,20 @@ import { css } from 'antd-style';
|
|
|
3
3
|
export default ({ prefixCls }: { prefixCls: string }) => css`
|
|
4
4
|
html,
|
|
5
5
|
body,
|
|
6
|
+
#__next,
|
|
6
7
|
.${prefixCls}-app {
|
|
7
|
-
|
|
8
|
+
position: relative;
|
|
8
9
|
overscroll-behavior: none;
|
|
10
|
+
height: 100% !important;
|
|
11
|
+
min-height: 100% !important;
|
|
9
12
|
|
|
10
13
|
::-webkit-scrollbar {
|
|
14
|
+
display: none;
|
|
11
15
|
width: 0;
|
|
12
16
|
height: 0;
|
|
13
17
|
}
|
|
14
18
|
}
|
|
15
19
|
|
|
16
|
-
#__next {
|
|
17
|
-
height: 100%;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
20
|
p {
|
|
21
21
|
margin-bottom: 0;
|
|
22
22
|
}
|
|
@@ -24,6 +24,7 @@ export default ({ prefixCls }: { prefixCls: string }) => css`
|
|
|
24
24
|
@media (max-width: 575px) {
|
|
25
25
|
* {
|
|
26
26
|
::-webkit-scrollbar {
|
|
27
|
+
display: none;
|
|
27
28
|
width: 0;
|
|
28
29
|
height: 0;
|
|
29
30
|
}
|