@lobehub/chat 0.85.3 โ 0.86.0-beta.2
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/.dockerignore +10 -0
- package/.github/workflows/issue-check-inactive.yml +0 -1
- package/.github/workflows/issue-close-require.yml +0 -3
- package/.github/workflows/issue-remove-inactive.yml +0 -1
- package/.github/workflows/pre-welcome.yml +4 -5
- package/.github/workflows/release.yml +3 -0
- package/.releaserc.js +14 -1
- package/CHANGELOG.md +6 -6
- package/Dockerfile +47 -0
- package/next.config.mjs +3 -0
- package/package.json +3 -3
- package/public/manifest.json +1 -1
- package/scripts/i18nWorkflow/genDiff.ts +1 -2
- package/scripts/i18nWorkflow/utils.ts +9 -3
- 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 +0 -1
- package/src/app/chat/features/SessionListContent/List/index.tsx +0 -1
- 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 +0 -1
- 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 +0 -4
- package/src/app/settings/features/SideBar/List.tsx +0 -1
- 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 +25 -7
- package/src/app/settings/llm/index.tsx +1 -16
- 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 +0 -1
- package/src/layout/AppLayout.mobile.tsx +2 -1
- package/src/layout/GlobalLayout/LocaleLoading.tsx +1 -1
- package/src/styles/global.ts +5 -6
- package/src/app/settings/features/Footer.tsx +0 -24
package/.dockerignore
ADDED
|
@@ -18,7 +18,6 @@ jobs:
|
|
|
18
18
|
uses: actions-cool/issues-helper@v3
|
|
19
19
|
with:
|
|
20
20
|
actions: 'close-issues'
|
|
21
|
-
token: ${{ secrets.GH_TOKEN }}
|
|
22
21
|
labels: 'โ
Fixed'
|
|
23
22
|
inactive-day: 3
|
|
24
23
|
body: |
|
|
@@ -29,7 +28,6 @@ jobs:
|
|
|
29
28
|
uses: actions-cool/issues-helper@v3
|
|
30
29
|
with:
|
|
31
30
|
actions: 'close-issues'
|
|
32
|
-
token: ${{ secrets.GH_TOKEN }}
|
|
33
31
|
labels: '๐ค Need Reproduce'
|
|
34
32
|
inactive-day: 3
|
|
35
33
|
body: |
|
|
@@ -40,7 +38,6 @@ jobs:
|
|
|
40
38
|
uses: actions-cool/issues-helper@v3
|
|
41
39
|
with:
|
|
42
40
|
actions: 'close-issues'
|
|
43
|
-
token: ${{ secrets.GH_TOKEN }}
|
|
44
41
|
labels: "๐
๐ปโโ๏ธ WON'T DO"
|
|
45
42
|
inactive-day: 3
|
|
46
43
|
body: |
|
|
@@ -14,10 +14,9 @@ jobs:
|
|
|
14
14
|
with:
|
|
15
15
|
token: ${{ secrets.GITHUB_TOKEN }}
|
|
16
16
|
comment: |
|
|
17
|
-
|
|
17
|
+
Great PR @${{ github.event.pull_request.user.login }}. The growth of project is inseparable from user feedback and contribution, thanks for your contribution โค๏ธ
|
|
18
18
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
้กน็ฎ็ๆ้ฟ็ฆปไธๅผ็จๆทๅ้ฆๅ่ดก็ฎ๏ผๆ่ฐขๆจ็่ดก็ฎ โค๏ธ
|
|
22
|
-
emoji: 'hooray'
|
|
19
|
+
้ๅธธๆฃ็ PR @${{ github.event.pull_request.user.login }}. ้กน็ฎ็ๆ้ฟ็ฆปไธๅผ็จๆทๅ้ฆๅ่ดก็ฎ๏ผๆ่ฐขๆจ็่ดก็ฎ โค๏ธ
|
|
20
|
+
emoji: 'heart'
|
|
23
21
|
pr-emoji: '+1, heart'
|
|
22
|
+
close: true
|
|
@@ -3,6 +3,7 @@ on:
|
|
|
3
3
|
push:
|
|
4
4
|
branches:
|
|
5
5
|
- main
|
|
6
|
+
- beta
|
|
6
7
|
|
|
7
8
|
jobs:
|
|
8
9
|
release:
|
|
@@ -28,3 +29,5 @@ jobs:
|
|
|
28
29
|
env:
|
|
29
30
|
GH_TOKEN: ${{ secrets.GH_TOKEN }}
|
|
30
31
|
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
|
|
32
|
+
DOCKER_REGISTRY_PASSWORD: ${{ secrets.DOCKER_REGISTRY_PASSWORD }}
|
|
33
|
+
DOCKER_REGISTRY_USER: ${{ secrets.DOCKER_REGISTRY_USER }}
|
package/.releaserc.js
CHANGED
|
@@ -1 +1,14 @@
|
|
|
1
|
-
|
|
1
|
+
const release = require('@lobehub/lint').semanticRelease;
|
|
2
|
+
|
|
3
|
+
module.exports = {
|
|
4
|
+
...release,
|
|
5
|
+
plugins: [
|
|
6
|
+
...release.plugins,
|
|
7
|
+
[
|
|
8
|
+
'@codedependant/semantic-release-docker',
|
|
9
|
+
{
|
|
10
|
+
dockerImage: 'lobe-chat',
|
|
11
|
+
},
|
|
12
|
+
],
|
|
13
|
+
],
|
|
14
|
+
};
|
package/CHANGELOG.md
CHANGED
|
@@ -2,23 +2,23 @@
|
|
|
2
2
|
|
|
3
3
|
# Changelog
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
## [Version 0.86.0-beta.2](https://github.com/lobehub/lobe-chat/compare/v0.86.0-beta.1...v0.86.0-beta.2)
|
|
6
6
|
|
|
7
7
|
<sup>Released on **2023-10-10**</sup>
|
|
8
8
|
|
|
9
|
-
####
|
|
9
|
+
#### ๐ Bug Fixes
|
|
10
10
|
|
|
11
|
-
- **misc**: Add
|
|
11
|
+
- **misc**: Add apikey form when there is no default api key in env, Fix mobile safearea (fix.
|
|
12
12
|
|
|
13
13
|
<br/>
|
|
14
14
|
|
|
15
15
|
<details>
|
|
16
16
|
<summary><kbd>Improvements and Fixes</kbd></summary>
|
|
17
17
|
|
|
18
|
-
####
|
|
18
|
+
#### What's fixed
|
|
19
19
|
|
|
20
|
-
- **misc**: Add
|
|
21
|
-
- **misc**:
|
|
20
|
+
- **misc**: Add apikey form when there is no default api key in env, closes [#290](https://github.com/lobehub/lobe-chat/issues/290) ([2c907e9](https://github.com/lobehub/lobe-chat/commit/2c907e9))
|
|
21
|
+
- **misc**: Fix mobile safearea (fix, closes [#211](https://github.com/lobehub/lobe-chat/issues/211) ([68775b8](https://github.com/lobehub/lobe-chat/commit/68775b8))
|
|
22
22
|
|
|
23
23
|
</details>
|
|
24
24
|
|
package/Dockerfile
ADDED
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
FROM node:20-slim AS base
|
|
2
|
+
ENV PNPM_HOME="/pnpm"
|
|
3
|
+
ENV PATH="$PNPM_HOME:$PATH"
|
|
4
|
+
RUN corepack enable
|
|
5
|
+
|
|
6
|
+
## Install dependencies only when needed
|
|
7
|
+
FROM base AS builder
|
|
8
|
+
WORKDIR /app
|
|
9
|
+
|
|
10
|
+
COPY package.json ./
|
|
11
|
+
|
|
12
|
+
RUN pnpm i -g bun
|
|
13
|
+
# If you want to build docker in China
|
|
14
|
+
#RUN npm config set registry https://registry.npmmirror.com/
|
|
15
|
+
RUN bun i
|
|
16
|
+
|
|
17
|
+
COPY . .
|
|
18
|
+
RUN pnpm run build:docker # run build standalone for docker version
|
|
19
|
+
|
|
20
|
+
## Production image, copy all the files and run next
|
|
21
|
+
FROM base AS runner
|
|
22
|
+
WORKDIR /app
|
|
23
|
+
|
|
24
|
+
ENV NODE_ENV production
|
|
25
|
+
|
|
26
|
+
RUN addgroup --system --gid 1001 nodejs
|
|
27
|
+
RUN adduser --system --uid 1001 nextjs
|
|
28
|
+
|
|
29
|
+
COPY --from=builder /app/public ./public
|
|
30
|
+
|
|
31
|
+
# Set the correct permission for prerender cache
|
|
32
|
+
RUN mkdir .next
|
|
33
|
+
RUN chown nextjs:nodejs .next
|
|
34
|
+
|
|
35
|
+
# Automatically leverage output traces to reduce image size
|
|
36
|
+
# https://nextjs.org/docs/advanced-features/output-file-tracing
|
|
37
|
+
COPY --from=builder --chown=nextjs:nodejs /app/.next/standalone ./
|
|
38
|
+
COPY --from=builder --chown=nextjs:nodejs /app/.next/static ./.next/static
|
|
39
|
+
|
|
40
|
+
USER nextjs
|
|
41
|
+
|
|
42
|
+
EXPOSE 3000
|
|
43
|
+
|
|
44
|
+
# set hostname to localhost
|
|
45
|
+
ENV HOSTNAME "0.0.0.0"
|
|
46
|
+
|
|
47
|
+
CMD ["node", "server.js"]
|
package/next.config.mjs
CHANGED
|
@@ -2,6 +2,7 @@ import analyzer from '@next/bundle-analyzer';
|
|
|
2
2
|
import nextPWA from 'next-pwa';
|
|
3
3
|
|
|
4
4
|
const isProd = process.env.NODE_ENV === 'production';
|
|
5
|
+
const buildWithDocker = process.env.DOCKER === 'true';
|
|
5
6
|
|
|
6
7
|
const withBundleAnalyzer = analyzer({
|
|
7
8
|
enabled: process.env.ANALYZE === 'true',
|
|
@@ -32,6 +33,8 @@ const nextConfig = {
|
|
|
32
33
|
AGENTS_INDEX_URL: process.env.AGENTS_INDEX_URL,
|
|
33
34
|
PLUGINS_INDEX_URL: process.env.PLUGINS_INDEX_URL,
|
|
34
35
|
},
|
|
36
|
+
|
|
37
|
+
output: buildWithDocker ? 'standalone' : undefined,
|
|
35
38
|
};
|
|
36
39
|
|
|
37
40
|
export default isProd ? withBundleAnalyzer(withPWA(nextConfig)) : nextConfig;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lobehub/chat",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.86.0-beta.2",
|
|
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",
|
|
@@ -25,6 +25,7 @@
|
|
|
25
25
|
"scripts": {
|
|
26
26
|
"build": "next build",
|
|
27
27
|
"build:analyze": "ANALYZE=true next build",
|
|
28
|
+
"build:docker": "DOCKER=true next build",
|
|
28
29
|
"dev": "next dev -p 3010",
|
|
29
30
|
"i18n": "npm run i18n:workflow && lobe-i18n",
|
|
30
31
|
"i18n:workflow": "ts-node --project ./tsconfig.json scripts/i18nWorkflow/index.ts",
|
|
@@ -120,6 +121,7 @@
|
|
|
120
121
|
"zustand-utils": "^1"
|
|
121
122
|
},
|
|
122
123
|
"devDependencies": {
|
|
124
|
+
"@codedependant/semantic-release-docker": "^4",
|
|
123
125
|
"@commitlint/cli": "^17",
|
|
124
126
|
"@lobehub/i18n-cli": "latest",
|
|
125
127
|
"@lobehub/lint": "latest",
|
|
@@ -128,7 +130,6 @@
|
|
|
128
130
|
"@testing-library/jest-dom": "^6",
|
|
129
131
|
"@testing-library/react": "^14",
|
|
130
132
|
"@types/chroma-js": "^2",
|
|
131
|
-
"@types/lodash": "^4",
|
|
132
133
|
"@types/lodash-es": "^4",
|
|
133
134
|
"@types/mixpanel-browser": "^2",
|
|
134
135
|
"@types/node": "^20",
|
|
@@ -147,7 +148,6 @@
|
|
|
147
148
|
"husky": "^8",
|
|
148
149
|
"jsdom": "^22",
|
|
149
150
|
"lint-staged": "^14",
|
|
150
|
-
"lodash": "^4",
|
|
151
151
|
"next-pwa": "^5",
|
|
152
152
|
"node-fetch": "^3",
|
|
153
153
|
"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": "fullscreen",
|
|
5
5
|
"icons": [
|
|
6
6
|
{
|
|
7
7
|
"src": "/icons/icon-192x192.png",
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { consola } from 'consola';
|
|
2
2
|
import { colors } from 'consola/utils';
|
|
3
|
-
import { unset } from 'lodash';
|
|
4
3
|
import { existsSync } from 'node:fs';
|
|
5
4
|
|
|
6
5
|
import {
|
|
@@ -9,7 +8,7 @@ import {
|
|
|
9
8
|
localesResourcesFilepath,
|
|
10
9
|
outputLocaleJsonFilepath,
|
|
11
10
|
} from './const';
|
|
12
|
-
import { diff, readJSON, tagWhite, tagYellow, writeJSON } from './utils';
|
|
11
|
+
import { diff, readJSON, tagWhite, tagYellow, unset, writeJSON } from './utils';
|
|
13
12
|
|
|
14
13
|
export const genDiff = () => {
|
|
15
14
|
consola.start(`Diff between Dev/Prod local...`);
|
|
@@ -1,7 +1,6 @@
|
|
|
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';
|
|
5
4
|
import { readFileSync, writeFileSync } from 'node:fs';
|
|
6
5
|
import { resolve } from 'node:path';
|
|
7
6
|
|
|
@@ -59,8 +58,8 @@ export const diff = (obj1: any, obj2: any, prefix: string = ''): string[] => {
|
|
|
59
58
|
let result: string[] = [];
|
|
60
59
|
for (const key in obj1) {
|
|
61
60
|
if (!obj2[key]) continue;
|
|
62
|
-
if (
|
|
63
|
-
result =
|
|
61
|
+
if (typeof obj1[key] === 'object' && obj1[key] !== null && obj2[key]) {
|
|
62
|
+
result = result.concat(diff(obj1[key], obj2[key], `${key}.`));
|
|
64
63
|
} else if (obj1[key] !== obj2[key]) {
|
|
65
64
|
result.push(`${prefix}${key}`);
|
|
66
65
|
}
|
|
@@ -68,6 +67,13 @@ export const diff = (obj1: any, obj2: any, prefix: string = ''): string[] => {
|
|
|
68
67
|
return result;
|
|
69
68
|
};
|
|
70
69
|
|
|
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
|
+
|
|
71
77
|
export const tagBlue = (text: string) => colors.bgBlueBright(colors.black(` ${text} `));
|
|
72
78
|
export const tagYellow = (text: string) => colors.bgYellowBright(colors.black(` ${text} `));
|
|
73
79
|
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(100vh - 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(100vh - 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={'100vh'} 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={'100vh'}
|
|
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(100vh - 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
|
|
50
|
+
<Link 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={'100vh'} style={{ position: 'relative' }}>
|
|
18
18
|
<Header />
|
|
19
19
|
<Flexbox align={'center'} flex={1} padding={24} style={{ overflow: 'auto' }}>
|
|
20
20
|
<SafeSpacing />
|
|
@@ -4,24 +4,20 @@ 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';
|
|
8
7
|
import { useSwitchSideBarOnInit } from '@/store/global/hooks/useSwitchSettingsOnInit';
|
|
9
8
|
import { SettingsTabs } from '@/store/global/initialState';
|
|
10
9
|
import { genSiteHeadTitle } from '@/utils/genSiteHeadTitle';
|
|
11
10
|
|
|
12
|
-
import Footer from '../features/Footer';
|
|
13
11
|
import Common from './Common';
|
|
14
12
|
|
|
15
13
|
export default memo(() => {
|
|
16
14
|
useSwitchSideBarOnInit(SettingsTabs.Common);
|
|
17
15
|
const { t } = useTranslation('setting');
|
|
18
16
|
const pageTitle = genSiteHeadTitle(t('tab.common'));
|
|
19
|
-
|
|
20
17
|
return (
|
|
21
18
|
<>
|
|
22
19
|
<PageTitle title={pageTitle} />
|
|
23
20
|
<Common />
|
|
24
|
-
<Footer>LobeChat v{CURRENT_VERSION}</Footer>
|
|
25
21
|
</>
|
|
26
22
|
);
|
|
27
23
|
});
|
|
@@ -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}
|
|
30
|
+
<Logo className={styles.logo} 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
|
|
17
|
+
<Link href={MANUAL_UPGRADE_URL} target={'_blank'}>
|
|
18
18
|
<Button size={'small'} type={'primary'}>
|
|
19
19
|
{t('upgradeVersion.action')}
|
|
20
20
|
</Button>
|
|
@@ -3,8 +3,10 @@ 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';
|
|
6
7
|
import { memo } from 'react';
|
|
7
|
-
import { useTranslation } from 'react-i18next';
|
|
8
|
+
import { Trans, useTranslation } from 'react-i18next';
|
|
9
|
+
import { Flexbox } from 'react-layout-kit';
|
|
8
10
|
|
|
9
11
|
import { FORM_STYLE } from '@/const/layoutTokens';
|
|
10
12
|
import { settingsSelectors, useEffectAfterGlobalHydrated, useGlobalStore } from '@/store/global';
|
|
@@ -22,6 +24,9 @@ const useStyles = createStyles(({ css, token }) => ({
|
|
|
22
24
|
color: ${token.colorTextDescription} !important;
|
|
23
25
|
}
|
|
24
26
|
`,
|
|
27
|
+
plan: css`
|
|
28
|
+
color: ${token.colorTextDescription};
|
|
29
|
+
`,
|
|
25
30
|
tip: css`
|
|
26
31
|
font-size: 12px;
|
|
27
32
|
color: ${token.colorTextDescription};
|
|
@@ -134,12 +139,25 @@ const LLM = memo(() => {
|
|
|
134
139
|
};
|
|
135
140
|
|
|
136
141
|
return (
|
|
137
|
-
<
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
142
|
+
<Flexbox align={'center'} gap={24} width={'100%'}>
|
|
143
|
+
<Form
|
|
144
|
+
form={form}
|
|
145
|
+
items={[openAI]}
|
|
146
|
+
onValuesChange={debounce(setSettings, 100)}
|
|
147
|
+
{...FORM_STYLE}
|
|
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>
|
|
143
161
|
);
|
|
144
162
|
});
|
|
145
163
|
|
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
|
-
import Link from 'next/link';
|
|
4
3
|
import { memo } from 'react';
|
|
5
|
-
import {
|
|
4
|
+
import { useTranslation } from 'react-i18next';
|
|
6
5
|
|
|
7
|
-
import Footer from '@/app/settings/features/Footer';
|
|
8
6
|
import PageTitle from '@/components/PageTitle';
|
|
9
7
|
import { useSwitchSideBarOnInit } from '@/store/global/hooks/useSwitchSettingsOnInit';
|
|
10
8
|
import { SettingsTabs } from '@/store/global/initialState';
|
|
@@ -20,19 +18,6 @@ export default memo(() => {
|
|
|
20
18
|
<>
|
|
21
19
|
<PageTitle title={pageTitle} />
|
|
22
20
|
<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>
|
|
36
21
|
</>
|
|
37
22
|
);
|
|
38
23
|
});
|
|
@@ -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(100vh - 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={{
|
|
15
|
+
<div style={{ 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: 100vh;
|
|
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: '100vh', 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: '100vh' }}
|
|
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: 100vh;
|
|
20
20
|
`,
|
|
21
21
|
),
|
|
22
22
|
mobileNavBar: css`
|
|
@@ -62,6 +62,7 @@ const AppLayoutMobile = memo<AppMobileLayoutProps>(
|
|
|
62
62
|
<MobileTabBar className={styles.mobileTabBar} />
|
|
63
63
|
</>
|
|
64
64
|
)}
|
|
65
|
+
<SafeSpacing mobile position={'bottom'} />
|
|
65
66
|
</Flexbox>
|
|
66
67
|
);
|
|
67
68
|
},
|
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,
|
|
7
6
|
.${prefixCls}-app {
|
|
8
|
-
|
|
7
|
+
overflow: hidden;
|
|
9
8
|
overscroll-behavior: none;
|
|
10
|
-
height: 100% !important;
|
|
11
|
-
min-height: 100% !important;
|
|
12
9
|
|
|
13
10
|
::-webkit-scrollbar {
|
|
14
|
-
display: none;
|
|
15
11
|
width: 0;
|
|
16
12
|
height: 0;
|
|
17
13
|
}
|
|
18
14
|
}
|
|
19
15
|
|
|
16
|
+
#__next {
|
|
17
|
+
height: 100%;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
20
|
p {
|
|
21
21
|
margin-bottom: 0;
|
|
22
22
|
}
|
|
@@ -24,7 +24,6 @@ export default ({ prefixCls }: { prefixCls: string }) => css`
|
|
|
24
24
|
@media (max-width: 575px) {
|
|
25
25
|
* {
|
|
26
26
|
::-webkit-scrollbar {
|
|
27
|
-
display: none;
|
|
28
27
|
width: 0;
|
|
29
28
|
height: 0;
|
|
30
29
|
}
|
|
@@ -1,24 +0,0 @@
|
|
|
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;
|