@lobehub/chat 0.162.23 → 0.162.24
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 +26 -0
- package/locales/ar/common.json +28 -1
- package/locales/bg-BG/common.json +28 -1
- package/locales/de-DE/common.json +28 -1
- package/locales/en-US/common.json +28 -1
- package/locales/es-ES/common.json +28 -1
- package/locales/fr-FR/common.json +28 -1
- package/locales/it-IT/common.json +28 -1
- package/locales/ja-JP/common.json +28 -1
- package/locales/ko-KR/common.json +28 -1
- package/locales/nl-NL/common.json +28 -1
- package/locales/pl-PL/common.json +28 -1
- package/locales/pt-BR/common.json +28 -1
- package/locales/ru-RU/common.json +28 -1
- package/locales/tr-TR/common.json +28 -1
- package/locales/vi-VN/common.json +28 -1
- package/locales/zh-CN/common.json +28 -1
- package/locales/zh-TW/common.json +28 -1
- package/package.json +1 -1
- package/src/app/(main)/settings/@category/default.tsx +1 -2
- package/src/app/(main)/settings/_layout/Desktop/index.tsx +4 -1
- package/src/app/(main)/settings/_layout/Mobile/index.tsx +7 -1
- package/src/app/(main)/settings/about/features/AboutList.tsx +13 -120
- package/src/app/(main)/settings/about/features/Analytics.tsx +1 -1
- package/src/app/(main)/settings/about/features/ItemCard.tsx +45 -0
- package/src/app/(main)/settings/about/features/ItemLink.tsx +32 -0
- package/src/app/(main)/settings/about/features/Version.tsx +75 -0
- package/src/app/(main)/settings/about/index.tsx +118 -25
- package/src/app/(main)/settings/features/Footer.tsx +80 -10
- package/src/app/(main)/settings/llm/components/Footer.tsx +14 -5
- package/src/app/(main)/settings/llm/index.tsx +3 -0
- package/src/app/(main)/settings/system-agent/page.tsx +11 -11
- package/src/app/@modal/_layout/SettingModalLayout.tsx +4 -2
- package/src/components/GuideModal/index.tsx +77 -0
- package/src/components/GuideVideo/index.tsx +30 -0
- package/src/const/url.ts +6 -1
- package/src/features/Conversation/Error/OllamaBizError/SetupGuide.tsx +177 -173
- package/src/features/Conversation/Error/style.tsx +56 -31
- package/src/features/User/UserPanel/useMenu.tsx +2 -2
- package/src/locales/default/common.ts +27 -2
- package/src/services/ollama.ts +2 -2
- package/src/app/(main)/settings/about/features/Item.tsx +0 -50
|
@@ -7,6 +7,8 @@ import { memo } from 'react';
|
|
|
7
7
|
import { Trans, useTranslation } from 'react-i18next';
|
|
8
8
|
import { Flexbox } from 'react-layout-kit';
|
|
9
9
|
|
|
10
|
+
import { ErrorActionContainer } from '@/features/Conversation/Error/style';
|
|
11
|
+
|
|
10
12
|
const useStyles = createStyles(({ css, prefixCls, token }) => ({
|
|
11
13
|
steps: css`
|
|
12
14
|
margin-top: 32px;
|
|
@@ -30,187 +32,189 @@ const SetupGuide = memo(() => {
|
|
|
30
32
|
const { styles } = useStyles();
|
|
31
33
|
const { t } = useTranslation('modelProvider');
|
|
32
34
|
return (
|
|
33
|
-
<
|
|
34
|
-
|
|
35
|
-
{
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
{
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
{
|
|
35
|
+
<ErrorActionContainer style={{ paddingBlock: 0 }}>
|
|
36
|
+
<TabsNav
|
|
37
|
+
items={[
|
|
38
|
+
{
|
|
39
|
+
children: (
|
|
40
|
+
<Steps
|
|
41
|
+
className={styles.steps}
|
|
42
|
+
direction={'vertical'}
|
|
43
|
+
items={[
|
|
44
|
+
{
|
|
45
|
+
description: (
|
|
46
|
+
<Trans i18nKey={'ollama.setup.install.description'} ns={'modelProvider'}>
|
|
47
|
+
请确认你已经开启 Ollama ,如果没有安装 Ollama ,请前往官网
|
|
48
|
+
<Link href={'https://ollama.com/download'}>下载</Link>
|
|
49
|
+
</Trans>
|
|
50
|
+
),
|
|
51
|
+
status: 'process',
|
|
52
|
+
title: t('ollama.setup.install.title'),
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
description: (
|
|
56
|
+
<Flexbox gap={8}>
|
|
57
|
+
{t('ollama.setup.cors.description')}
|
|
55
58
|
|
|
59
|
+
<Flexbox gap={8}>
|
|
60
|
+
{t('ollama.setup.cors.macos')}
|
|
61
|
+
<Snippet language={'bash'}>
|
|
62
|
+
{/* eslint-disable-next-line react/no-unescaped-entities */}
|
|
63
|
+
launchctl setenv OLLAMA_ORIGINS "*"
|
|
64
|
+
</Snippet>
|
|
65
|
+
{t('ollama.setup.cors.reboot')}
|
|
66
|
+
</Flexbox>
|
|
67
|
+
</Flexbox>
|
|
68
|
+
),
|
|
69
|
+
status: 'process',
|
|
70
|
+
title: t('ollama.setup.cors.title'),
|
|
71
|
+
},
|
|
72
|
+
]}
|
|
73
|
+
size={'small'}
|
|
74
|
+
/>
|
|
75
|
+
),
|
|
76
|
+
key: 'macos',
|
|
77
|
+
label: 'macOS',
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
children: (
|
|
81
|
+
<Steps
|
|
82
|
+
className={styles.steps}
|
|
83
|
+
direction={'vertical'}
|
|
84
|
+
items={[
|
|
85
|
+
{
|
|
86
|
+
description: (
|
|
87
|
+
<Trans i18nKey={'ollama.setup.install.description'} ns={'modelProvider'}>
|
|
88
|
+
请确认你已经开启 Ollama ,如果没有安装 Ollama ,请前往官网
|
|
89
|
+
<Link href={'https://ollama.com/download'}>下载</Link>
|
|
90
|
+
</Trans>
|
|
91
|
+
),
|
|
92
|
+
status: 'process',
|
|
93
|
+
title: t('ollama.setup.install.title'),
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
description: (
|
|
97
|
+
<Flexbox gap={8}>
|
|
98
|
+
{t('ollama.setup.cors.description')}
|
|
99
|
+
<div>{t('ollama.setup.cors.windows')}</div>
|
|
100
|
+
<div>{t('ollama.setup.cors.reboot')}</div>
|
|
101
|
+
</Flexbox>
|
|
102
|
+
),
|
|
103
|
+
status: 'process',
|
|
104
|
+
title: t('ollama.setup.cors.title'),
|
|
105
|
+
},
|
|
106
|
+
]}
|
|
107
|
+
size={'small'}
|
|
108
|
+
/>
|
|
109
|
+
),
|
|
110
|
+
key: 'windows',
|
|
111
|
+
label: t('ollama.setup.install.windowsTab'),
|
|
112
|
+
},
|
|
113
|
+
{
|
|
114
|
+
children: (
|
|
115
|
+
<Steps
|
|
116
|
+
className={styles.steps}
|
|
117
|
+
direction={'vertical'}
|
|
118
|
+
items={[
|
|
119
|
+
{
|
|
120
|
+
description: (
|
|
56
121
|
<Flexbox gap={8}>
|
|
57
|
-
{t('ollama.setup.
|
|
122
|
+
{t('ollama.setup.install.linux.command')}
|
|
58
123
|
<Snippet language={'bash'}>
|
|
59
|
-
|
|
60
|
-
launchctl setenv OLLAMA_ORIGINS "*"
|
|
124
|
+
curl -fsSL https://ollama.com/install.sh | sh
|
|
61
125
|
</Snippet>
|
|
62
|
-
|
|
126
|
+
<div>
|
|
127
|
+
<Trans i18nKey={'ollama.setup.install.linux.manual'} ns={'modelProvider'}>
|
|
128
|
+
或者,你也可以参考
|
|
129
|
+
<Link href={'https://github.com/ollama/ollama/blob/main/docs/linux.md'}>
|
|
130
|
+
Linux 手动安装指南
|
|
131
|
+
</Link>
|
|
132
|
+
。
|
|
133
|
+
</Trans>
|
|
134
|
+
</div>
|
|
63
135
|
</Flexbox>
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
),
|
|
73
|
-
key: 'macos',
|
|
74
|
-
label: 'macOS',
|
|
75
|
-
},
|
|
76
|
-
{
|
|
77
|
-
children: (
|
|
78
|
-
<Steps
|
|
79
|
-
className={styles.steps}
|
|
80
|
-
direction={'vertical'}
|
|
81
|
-
items={[
|
|
82
|
-
{
|
|
83
|
-
description: (
|
|
84
|
-
<Trans i18nKey={'ollama.setup.install.description'} ns={'modelProvider'}>
|
|
85
|
-
请确认你已经开启 Ollama ,如果没有安装 Ollama ,请前往官网
|
|
86
|
-
<Link href={'https://ollama.com/download'}>下载</Link>
|
|
87
|
-
</Trans>
|
|
88
|
-
),
|
|
89
|
-
status: 'process',
|
|
90
|
-
title: t('ollama.setup.install.title'),
|
|
91
|
-
},
|
|
92
|
-
{
|
|
93
|
-
description: (
|
|
94
|
-
<Flexbox gap={8}>
|
|
95
|
-
{t('ollama.setup.cors.description')}
|
|
96
|
-
<div>{t('ollama.setup.cors.windows')}</div>
|
|
97
|
-
<div>{t('ollama.setup.cors.reboot')}</div>
|
|
98
|
-
</Flexbox>
|
|
99
|
-
),
|
|
100
|
-
status: 'process',
|
|
101
|
-
title: t('ollama.setup.cors.title'),
|
|
102
|
-
},
|
|
103
|
-
]}
|
|
104
|
-
size={'small'}
|
|
105
|
-
/>
|
|
106
|
-
),
|
|
107
|
-
key: 'windows',
|
|
108
|
-
label: t('ollama.setup.install.windowsTab'),
|
|
109
|
-
},
|
|
110
|
-
{
|
|
111
|
-
children: (
|
|
112
|
-
<Steps
|
|
113
|
-
className={styles.steps}
|
|
114
|
-
direction={'vertical'}
|
|
115
|
-
items={[
|
|
116
|
-
{
|
|
117
|
-
description: (
|
|
118
|
-
<Flexbox gap={8}>
|
|
119
|
-
{t('ollama.setup.install.linux.command')}
|
|
120
|
-
<Snippet language={'bash'}>
|
|
121
|
-
curl -fsSL https://ollama.com/install.sh | sh
|
|
122
|
-
</Snippet>
|
|
123
|
-
<div>
|
|
124
|
-
<Trans i18nKey={'ollama.setup.install.linux.manual'} ns={'modelProvider'}>
|
|
125
|
-
或者,你也可以参考
|
|
126
|
-
<Link href={'https://github.com/ollama/ollama/blob/main/docs/linux.md'}>
|
|
127
|
-
Linux 手动安装指南
|
|
128
|
-
</Link>
|
|
129
|
-
。
|
|
130
|
-
</Trans>
|
|
131
|
-
</div>
|
|
132
|
-
</Flexbox>
|
|
133
|
-
),
|
|
134
|
-
status: 'process',
|
|
135
|
-
title: t('ollama.setup.install.title'),
|
|
136
|
-
},
|
|
137
|
-
{
|
|
138
|
-
description: (
|
|
139
|
-
<Flexbox gap={8}>
|
|
140
|
-
<div>{t('ollama.setup.cors.description')}</div>
|
|
136
|
+
),
|
|
137
|
+
status: 'process',
|
|
138
|
+
title: t('ollama.setup.install.title'),
|
|
139
|
+
},
|
|
140
|
+
{
|
|
141
|
+
description: (
|
|
142
|
+
<Flexbox gap={8}>
|
|
143
|
+
<div>{t('ollama.setup.cors.description')}</div>
|
|
141
144
|
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
145
|
+
<div>{t('ollama.setup.cors.linux.systemd')}</div>
|
|
146
|
+
{/* eslint-disable-next-line react/no-unescaped-entities */}
|
|
147
|
+
<Snippet language={'bash'}> sudo systemctl edit ollama.service</Snippet>
|
|
148
|
+
{t('ollama.setup.cors.linux.env')}
|
|
149
|
+
<Highlighter
|
|
150
|
+
// eslint-disable-next-line react/no-children-prop
|
|
151
|
+
children={`[Service]
|
|
149
152
|
|
|
150
153
|
Environment="OLLAMA_ORIGINS=*"`}
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
154
|
+
fileName={'ollama.service'}
|
|
155
|
+
fullFeatured
|
|
156
|
+
language={'bash'}
|
|
157
|
+
showLanguage
|
|
158
|
+
/>
|
|
159
|
+
{t('ollama.setup.cors.linux.reboot')}
|
|
160
|
+
</Flexbox>
|
|
161
|
+
),
|
|
162
|
+
status: 'process',
|
|
163
|
+
title: t('ollama.setup.cors.title'),
|
|
164
|
+
},
|
|
165
|
+
]}
|
|
166
|
+
size={'small'}
|
|
167
|
+
/>
|
|
168
|
+
),
|
|
169
|
+
key: 'linux',
|
|
170
|
+
label: 'Linux',
|
|
171
|
+
},
|
|
172
|
+
{
|
|
173
|
+
children: (
|
|
174
|
+
<Steps
|
|
175
|
+
className={styles.steps}
|
|
176
|
+
direction={'vertical'}
|
|
177
|
+
items={[
|
|
178
|
+
{
|
|
179
|
+
description: (
|
|
180
|
+
<Flexbox gap={8}>
|
|
181
|
+
{t('ollama.setup.install.description')}
|
|
182
|
+
<div>{t('ollama.setup.install.docker')}</div>
|
|
183
|
+
<Snippet language={'bash'}>docker pull ollama/ollama</Snippet>
|
|
184
|
+
</Flexbox>
|
|
185
|
+
),
|
|
186
|
+
status: 'process',
|
|
187
|
+
title: t('ollama.setup.install.title'),
|
|
188
|
+
},
|
|
189
|
+
{
|
|
190
|
+
description: (
|
|
191
|
+
<Flexbox gap={8}>
|
|
192
|
+
{t('ollama.setup.cors.description')}
|
|
193
|
+
<Highlighter
|
|
194
|
+
fileName={'ollama.service'}
|
|
195
|
+
fullFeatured
|
|
196
|
+
language={'bash'}
|
|
197
|
+
showLanguage
|
|
198
|
+
>
|
|
199
|
+
{/* eslint-disable-next-line react/no-unescaped-entities */}
|
|
200
|
+
docker run -d --gpus=all -v ollama:/root/.ollama -e OLLAMA_ORIGINS="*" -p
|
|
201
|
+
11434:11434 --name ollama ollama/ollama
|
|
202
|
+
</Highlighter>
|
|
203
|
+
</Flexbox>
|
|
204
|
+
),
|
|
205
|
+
status: 'process',
|
|
206
|
+
title: t('ollama.setup.cors.title'),
|
|
207
|
+
},
|
|
208
|
+
]}
|
|
209
|
+
size={'small'}
|
|
210
|
+
/>
|
|
211
|
+
),
|
|
212
|
+
key: 'docker',
|
|
213
|
+
label: 'Docker',
|
|
214
|
+
},
|
|
215
|
+
]}
|
|
216
|
+
/>
|
|
217
|
+
</ErrorActionContainer>
|
|
214
218
|
);
|
|
215
219
|
});
|
|
216
220
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Avatar } from '@lobehub/ui';
|
|
2
2
|
import { createStyles } from 'antd-style';
|
|
3
3
|
import { ReactNode, memo } from 'react';
|
|
4
|
-
import { Center, Flexbox } from 'react-layout-kit';
|
|
4
|
+
import { Center, CenterProps, Flexbox } from 'react-layout-kit';
|
|
5
5
|
|
|
6
6
|
export const useStyles = createStyles(({ css, token }) => ({
|
|
7
7
|
container: css`
|
|
@@ -14,38 +14,63 @@ export const useStyles = createStyles(({ css, token }) => ({
|
|
|
14
14
|
color: ${token.colorTextTertiary};
|
|
15
15
|
text-align: center;
|
|
16
16
|
`,
|
|
17
|
+
form: css`
|
|
18
|
+
width: 100%;
|
|
19
|
+
max-width: 300px;
|
|
20
|
+
`,
|
|
17
21
|
}));
|
|
18
22
|
|
|
19
|
-
export const ErrorActionContainer = memo<
|
|
20
|
-
|
|
23
|
+
export const ErrorActionContainer = memo<CenterProps>(
|
|
24
|
+
({ children, className, gap = 24, padding = 24, ...rest }) => {
|
|
25
|
+
const { cx, styles } = useStyles();
|
|
21
26
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
}
|
|
27
|
+
return (
|
|
28
|
+
<Center className={cx(styles.container, className)} gap={gap} padding={padding} {...rest}>
|
|
29
|
+
{children}
|
|
30
|
+
</Center>
|
|
31
|
+
);
|
|
32
|
+
},
|
|
33
|
+
);
|
|
28
34
|
|
|
29
|
-
export const FormAction = memo<
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
35
|
+
export const FormAction = memo<
|
|
36
|
+
{
|
|
37
|
+
animation?: boolean;
|
|
38
|
+
avatar: ReactNode;
|
|
39
|
+
background?: string;
|
|
40
|
+
description: string;
|
|
41
|
+
title: string;
|
|
42
|
+
} & CenterProps
|
|
43
|
+
>(
|
|
44
|
+
({
|
|
45
|
+
children,
|
|
46
|
+
background,
|
|
47
|
+
title,
|
|
48
|
+
description,
|
|
49
|
+
avatar,
|
|
50
|
+
animation,
|
|
51
|
+
className,
|
|
52
|
+
gap = 16,
|
|
53
|
+
...rest
|
|
54
|
+
}) => {
|
|
55
|
+
const { cx, styles, theme } = useStyles();
|
|
37
56
|
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
}
|
|
57
|
+
return (
|
|
58
|
+
<Center className={cx(styles.form, className)} gap={gap} {...rest}>
|
|
59
|
+
<Avatar
|
|
60
|
+
animation={animation}
|
|
61
|
+
avatar={avatar}
|
|
62
|
+
background={background ?? theme.colorFillContent}
|
|
63
|
+
gap={12}
|
|
64
|
+
size={80}
|
|
65
|
+
/>
|
|
66
|
+
<Flexbox gap={8} width={'100%'}>
|
|
67
|
+
<Flexbox style={{ fontSize: 18, fontWeight: 'bold', textAlign: 'center' }}>
|
|
68
|
+
{title}
|
|
69
|
+
</Flexbox>
|
|
70
|
+
<Flexbox className={styles.desc}>{description}</Flexbox>
|
|
71
|
+
</Flexbox>
|
|
72
|
+
{children}
|
|
73
|
+
</Center>
|
|
74
|
+
);
|
|
75
|
+
},
|
|
76
|
+
);
|
|
@@ -20,7 +20,7 @@ import { Flexbox } from 'react-layout-kit';
|
|
|
20
20
|
import urlJoin from 'url-join';
|
|
21
21
|
|
|
22
22
|
import type { MenuProps } from '@/components/Menu';
|
|
23
|
-
import { DISCORD, DOCUMENTS, EMAIL_SUPPORT, GITHUB_ISSUES } from '@/const/url';
|
|
23
|
+
import { DISCORD, DOCUMENTS, EMAIL_SUPPORT, GITHUB_ISSUES, mailTo } from '@/const/url';
|
|
24
24
|
import DataImporter from '@/features/DataImporter';
|
|
25
25
|
import { useOpenSettings } from '@/hooks/useInterceptingRoutes';
|
|
26
26
|
import { usePWAInstall } from '@/hooks/usePWAInstall';
|
|
@@ -190,7 +190,7 @@ export const useMenu = () => {
|
|
|
190
190
|
icon: <Icon icon={Mail} />,
|
|
191
191
|
key: 'email',
|
|
192
192
|
label: (
|
|
193
|
-
<Link href={
|
|
193
|
+
<Link href={mailTo(EMAIL_SUPPORT)} target={'_blank'}>
|
|
194
194
|
{t('userPanel.email')}
|
|
195
195
|
</Link>
|
|
196
196
|
),
|
|
@@ -9,6 +9,7 @@ export default {
|
|
|
9
9
|
cancel: '取消',
|
|
10
10
|
changelog: '更新日志',
|
|
11
11
|
close: '关闭',
|
|
12
|
+
contact: '联系我们',
|
|
12
13
|
copy: '复制',
|
|
13
14
|
copyFail: '复制失败',
|
|
14
15
|
copySuccess: '复制成功',
|
|
@@ -35,8 +36,26 @@ export default {
|
|
|
35
36
|
},
|
|
36
37
|
feedback: '反馈与建议',
|
|
37
38
|
follow: '在 {{name}} 上关注我们',
|
|
39
|
+
footer: {
|
|
40
|
+
action: {
|
|
41
|
+
feedback: '分享您宝贵的建议',
|
|
42
|
+
star: '在 GitHub 给添加星标',
|
|
43
|
+
},
|
|
44
|
+
and: '并',
|
|
45
|
+
feedback: {
|
|
46
|
+
action: '分享反馈',
|
|
47
|
+
desc: '您的每一个想法和建议对我们来说都弥足珍贵,我们迫不及待地想知道您的看法!欢迎联系我们提供产品功能和使用体验反馈,帮助我们将 LobeChat 建设得更好。',
|
|
48
|
+
title: '在 GitHub 分享您宝贵的反馈',
|
|
49
|
+
},
|
|
50
|
+
later: '稍后',
|
|
51
|
+
star: {
|
|
52
|
+
action: '点亮星标',
|
|
53
|
+
desc: '如果您喜爱我们的产品,并希望支持我们,可以去 GitHub 给我们点一颗星吗?这个小小的动作对我们来说意义重大,能激励我们为您持续提供特性体验。',
|
|
54
|
+
title: '在 GitHub 为我们点亮星标',
|
|
55
|
+
},
|
|
56
|
+
title: '喜欢我们的产品?',
|
|
57
|
+
},
|
|
38
58
|
fullscreen: '全屏模式',
|
|
39
|
-
|
|
40
59
|
historyRange: '历史范围',
|
|
41
60
|
import: '导入配置',
|
|
42
61
|
importModal: {
|
|
@@ -69,6 +88,7 @@ export default {
|
|
|
69
88
|
speed: '上传速度',
|
|
70
89
|
},
|
|
71
90
|
},
|
|
91
|
+
information: '社区与资讯',
|
|
72
92
|
installPWA: '安装浏览器应用 (PWA)',
|
|
73
93
|
lang: {
|
|
74
94
|
'ar': '阿拉伯语',
|
|
@@ -108,6 +128,11 @@ export default {
|
|
|
108
128
|
'zh-TW': '繁体中文',
|
|
109
129
|
},
|
|
110
130
|
layoutInitializing: '正在加载布局...',
|
|
131
|
+
legal: '法律声明',
|
|
132
|
+
mail: {
|
|
133
|
+
business: '商务合作',
|
|
134
|
+
support: '邮件支持',
|
|
135
|
+
},
|
|
111
136
|
noDescription: '暂无描述',
|
|
112
137
|
oauth: 'SSO 登录',
|
|
113
138
|
officialSite: '官方网站',
|
|
@@ -149,7 +174,6 @@ export default {
|
|
|
149
174
|
title: '同步状态',
|
|
150
175
|
unconnected: { tip: '信令服务器连接失败,将无法建立点对点通信频道,请检查网络后重试' },
|
|
151
176
|
},
|
|
152
|
-
|
|
153
177
|
tab: {
|
|
154
178
|
chat: '会话',
|
|
155
179
|
market: '发现',
|
|
@@ -188,4 +212,5 @@ export default {
|
|
|
188
212
|
setting: '应用设置',
|
|
189
213
|
usages: '用量统计',
|
|
190
214
|
},
|
|
215
|
+
version: '版本',
|
|
191
216
|
};
|
package/src/services/ollama.ts
CHANGED
|
@@ -42,8 +42,8 @@ export class OllamaService {
|
|
|
42
42
|
this._client.abort();
|
|
43
43
|
};
|
|
44
44
|
|
|
45
|
-
pullModel = async (model: string): Promise<
|
|
46
|
-
let response: Response |
|
|
45
|
+
pullModel = async (model: string): Promise<AsyncIterable<ProgressResponse>> => {
|
|
46
|
+
let response: Response | AsyncIterable<ProgressResponse>;
|
|
47
47
|
try {
|
|
48
48
|
response = await this.getOllamaClient().pull({ insecure: true, model, stream: true });
|
|
49
49
|
return response;
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
import { Icon, List } from '@lobehub/ui';
|
|
2
|
-
import { createStyles, useResponsive } from 'antd-style';
|
|
3
|
-
import { ChevronRight, type LucideIcon } from 'lucide-react';
|
|
4
|
-
import { CSSProperties, ReactNode, memo } from 'react';
|
|
5
|
-
|
|
6
|
-
const { Item } = List;
|
|
7
|
-
|
|
8
|
-
const useStyles = createStyles(({ css, token, responsive }) => ({
|
|
9
|
-
container: css`
|
|
10
|
-
position: relative;
|
|
11
|
-
padding-top: 16px;
|
|
12
|
-
padding-bottom: 16px;
|
|
13
|
-
border-radius: ${token.borderRadius}px;
|
|
14
|
-
${responsive.mobile} {
|
|
15
|
-
border-radius: 0;
|
|
16
|
-
}
|
|
17
|
-
`,
|
|
18
|
-
noHover: css`
|
|
19
|
-
pointer-events: none;
|
|
20
|
-
`,
|
|
21
|
-
}));
|
|
22
|
-
|
|
23
|
-
export interface ItemProps {
|
|
24
|
-
active?: boolean;
|
|
25
|
-
className?: string;
|
|
26
|
-
hoverable?: boolean;
|
|
27
|
-
icon: LucideIcon;
|
|
28
|
-
label: ReactNode;
|
|
29
|
-
style?: CSSProperties;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
const SettingItem = memo<ItemProps>(
|
|
33
|
-
({ label, icon, hoverable = true, active = false, style, className }) => {
|
|
34
|
-
const { cx, styles } = useStyles();
|
|
35
|
-
const { mobile } = useResponsive();
|
|
36
|
-
return (
|
|
37
|
-
<Item
|
|
38
|
-
active={active}
|
|
39
|
-
avatar={<Icon icon={icon} size={{ fontSize: 20 }} />}
|
|
40
|
-
className={cx(styles.container, !hoverable && styles.noHover, className)}
|
|
41
|
-
style={style}
|
|
42
|
-
title={label as string}
|
|
43
|
-
>
|
|
44
|
-
{mobile && <Icon icon={ChevronRight} size={{ fontSize: 16 }} />}
|
|
45
|
-
</Item>
|
|
46
|
-
);
|
|
47
|
-
},
|
|
48
|
-
);
|
|
49
|
-
|
|
50
|
-
export default SettingItem;
|