@lobehub/chat 1.96.1 → 1.96.3
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 +44 -0
- package/README.md +5 -0
- package/changelog/v1.json +14 -0
- package/locales/ar/models.json +9 -0
- package/locales/ar/providers.json +3 -0
- package/locales/bg-BG/models.json +9 -0
- package/locales/bg-BG/providers.json +3 -0
- package/locales/de-DE/models.json +9 -0
- package/locales/de-DE/providers.json +3 -0
- package/locales/en-US/models.json +9 -0
- package/locales/en-US/providers.json +3 -0
- package/locales/es-ES/models.json +9 -0
- package/locales/es-ES/providers.json +3 -0
- package/locales/fa-IR/models.json +9 -0
- package/locales/fa-IR/providers.json +3 -0
- package/locales/fr-FR/models.json +9 -0
- package/locales/fr-FR/providers.json +3 -0
- package/locales/it-IT/models.json +9 -0
- package/locales/it-IT/providers.json +3 -0
- package/locales/ja-JP/models.json +9 -0
- package/locales/ja-JP/providers.json +3 -0
- package/locales/ko-KR/models.json +9 -0
- package/locales/ko-KR/providers.json +3 -0
- package/locales/nl-NL/models.json +9 -0
- package/locales/nl-NL/providers.json +3 -0
- package/locales/pl-PL/models.json +9 -0
- package/locales/pl-PL/providers.json +3 -0
- package/locales/pt-BR/models.json +9 -0
- package/locales/pt-BR/providers.json +3 -0
- package/locales/ru-RU/models.json +9 -0
- package/locales/ru-RU/providers.json +3 -0
- package/locales/tr-TR/models.json +9 -0
- package/locales/tr-TR/providers.json +3 -0
- package/locales/vi-VN/models.json +9 -0
- package/locales/vi-VN/providers.json +3 -0
- package/locales/zh-CN/models.json +9 -0
- package/locales/zh-CN/providers.json +3 -0
- package/locales/zh-TW/models.json +9 -0
- package/locales/zh-TW/providers.json +3 -0
- package/package.json +7 -14
- package/src/app/[variants]/(auth)/next-auth/signin/AuthSignInBox.tsx +7 -7
- package/src/app/[variants]/(main)/chat/(workspace)/@conversation/features/ChatInput/Mobile/Files/FileItem/File.tsx +2 -3
- package/src/app/[variants]/(main)/chat/(workspace)/@conversation/features/ChatList/ChatItem/Thread.tsx +3 -3
- package/src/app/[variants]/(main)/chat/(workspace)/@topic/features/TopicListContent/SearchResult/index.tsx +2 -2
- package/src/app/[variants]/(main)/chat/(workspace)/@topic/features/TopicListContent/ThreadItem/Content.tsx +5 -5
- package/src/app/[variants]/(main)/chat/(workspace)/@topic/features/TopicListContent/TopicItem/DefaultContent.tsx +3 -6
- package/src/app/[variants]/(main)/chat/(workspace)/@topic/features/TopicListContent/TopicItem/TopicContent.tsx +4 -5
- package/src/app/[variants]/(main)/chat/@session/features/SessionSearchBar.tsx +11 -5
- package/src/app/[variants]/(main)/files/(content)/@menu/features/KnowledgeBase/Item/Content.tsx +4 -6
- package/src/app/[variants]/(main)/files/(content)/NotSupportClient.tsx +6 -5
- package/src/app/[variants]/(main)/files/[id]/Header.tsx +5 -5
- package/src/app/[variants]/(main)/repos/[id]/evals/dataset/DatasetDetail/index.tsx +3 -3
- package/src/app/[variants]/(main)/repos/[id]/evals/evaluation/EvaluationList/index.tsx +4 -3
- package/src/app/[variants]/(main)/repos/[id]/features/Menu/Head/index.tsx +4 -2
- package/src/app/[variants]/(main)/settings/llm/components/ProviderModelList/CustomModelOption.tsx +5 -5
- package/src/app/[variants]/(main)/settings/llm/components/ProviderModelList/ModelFetcher.tsx +3 -4
- package/src/app/[variants]/(main)/settings/llm/components/ProviderModelList/Option.tsx +3 -4
- package/src/app/[variants]/(main)/settings/provider/(list)/ProviderGrid/Card.tsx +5 -12
- package/src/app/[variants]/(main)/settings/provider/(list)/ProviderGrid/index.tsx +7 -8
- package/src/app/[variants]/(main)/settings/provider/ProviderMenu/List.tsx +5 -6
- package/src/app/[variants]/(main)/settings/provider/features/ModelList/DisabledModels.tsx +3 -4
- package/src/app/[variants]/(main)/settings/provider/features/ModelList/EnabledModelList/index.tsx +5 -6
- package/src/app/[variants]/(main)/settings/provider/features/ModelList/ModelItem.tsx +4 -6
- package/src/app/[variants]/(main)/settings/provider/features/ModelList/ModelTitle/index.tsx +6 -6
- package/src/app/[variants]/(main)/settings/provider/features/ModelList/SearchResult.tsx +3 -4
- package/src/app/[variants]/(main)/settings/sync/features/DeviceInfo/DeviceName.tsx +2 -3
- package/src/app/[variants]/(main)/settings/sync/features/DeviceInfo/index.tsx +3 -3
- package/src/app/[variants]/(main)/settings/sync/features/WebRTC/index.tsx +4 -4
- package/src/app/[variants]/oauth/consent/[uid]/ClientError.tsx +4 -6
- package/src/app/[variants]/oauth/consent/[uid]/Consent.tsx +7 -8
- package/src/app/[variants]/oauth/consent/[uid]/Login.tsx +4 -6
- package/src/app/[variants]/oauth/handoff/Client.tsx +6 -6
- package/src/components/InitProgress/index.tsx +3 -3
- package/src/components/Loading/CircleLoading/index.tsx +3 -4
- package/src/components/ModelSelect/index.tsx +3 -6
- package/src/components/StatisticCard/TitleWithPercentage.tsx +4 -7
- package/src/components/StatisticCard/index.tsx +6 -7
- package/src/config/aiModels/openrouter.ts +36 -0
- package/src/features/AgentSetting/AgentPlugin/index.tsx +4 -3
- package/src/features/ChatInput/Desktop/FilePreview/FileItem/index.tsx +3 -4
- package/src/features/ChatInput/components/UploadDetail/UploadStatus.tsx +10 -10
- package/src/features/ChatInput/components/UploadDetail/index.tsx +3 -3
- package/src/features/Conversation/Messages/Assistant/FileChunks/Item/index.tsx +2 -3
- package/src/features/Conversation/Messages/User/BelowMessage.tsx +3 -4
- package/src/features/Conversation/Messages/User/FileListViewer/Item.tsx +3 -3
- package/src/features/Conversation/components/History/index.tsx +2 -3
- package/src/features/DataImporter/ImportDetail.tsx +2 -4
- package/src/features/ElectronTitlebar/Connection/Waiting.tsx +3 -6
- package/src/features/FileManager/FileList/EmptyStatus.tsx +4 -4
- package/src/features/FileManager/FileList/index.tsx +3 -3
- package/src/features/FileManager/UploadDock/Item.tsx +11 -11
- package/src/features/FileManager/UploadDock/index.tsx +3 -4
- package/src/features/FileManager/index.tsx +3 -5
- package/src/tools/local-system/Render/ReadLocalFile/ReadFileView.tsx +5 -6
- package/src/tools/web-browsing/Portal/PageContent/index.tsx +4 -7
- package/src/tools/web-browsing/Portal/Search/ResultList/SearchItem/TitleExtra.tsx +3 -4
- package/src/tools/web-browsing/Portal/Search/ResultList/SearchItem/Video.tsx +4 -3
- package/src/tools/web-browsing/Portal/Search/ResultList/SearchItem/index.tsx +3 -3
- package/src/tools/web-browsing/Render/PageContent/Result.tsx +4 -6
- package/src/tools/web-browsing/Render/Search/SearchResult/SearchResultItem.tsx +3 -3
- package/src/tools/web-browsing/components/SearchBar.tsx +7 -7
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@lobehub/chat",
|
3
|
-
"version": "1.96.
|
3
|
+
"version": "1.96.3",
|
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",
|
@@ -150,7 +150,7 @@
|
|
150
150
|
"@lobehub/chat-plugins-gateway": "^1.9.0",
|
151
151
|
"@lobehub/icons": "^2.2.0",
|
152
152
|
"@lobehub/tts": "^2.0.1",
|
153
|
-
"@lobehub/ui": "^2.
|
153
|
+
"@lobehub/ui": "^2.5.6",
|
154
154
|
"@modelcontextprotocol/sdk": "^1.12.1",
|
155
155
|
"@neondatabase/serverless": "^1.0.0",
|
156
156
|
"@next/third-parties": "^15.3.3",
|
@@ -186,6 +186,7 @@
|
|
186
186
|
"file-type": "^20.5.0",
|
187
187
|
"framer-motion": "^12.15.0",
|
188
188
|
"gpt-tokenizer": "^2.9.0",
|
189
|
+
"gray-matter": "^4.0.3",
|
189
190
|
"html-to-text": "^9.0.5",
|
190
191
|
"i18next": "^24.2.3",
|
191
192
|
"i18next-browser-languagedetector": "^8.1.0",
|
@@ -200,8 +201,9 @@
|
|
200
201
|
"langfuse": "^3.37.3",
|
201
202
|
"langfuse-core": "^3.37.3",
|
202
203
|
"lodash-es": "^4.17.21",
|
203
|
-
"lucide-react": "^0.
|
204
|
+
"lucide-react": "^0.522.0",
|
204
205
|
"mammoth": "^1.9.1",
|
206
|
+
"markdown-to-txt": "^2.0.1",
|
205
207
|
"mdast-util-to-markdown": "^2.1.2",
|
206
208
|
"modern-screenshot": "^4.6.0",
|
207
209
|
"nanoid": "^5.1.5",
|
@@ -232,7 +234,7 @@
|
|
232
234
|
"react-confetti": "^6.4.0",
|
233
235
|
"react-dom": "^19.1.0",
|
234
236
|
"react-fast-marquee": "^1.6.5",
|
235
|
-
"react-hotkeys-hook": "^
|
237
|
+
"react-hotkeys-hook": "^5.1.0",
|
236
238
|
"react-i18next": "^15.5.2",
|
237
239
|
"react-layout-kit": "^1.9.1",
|
238
240
|
"react-lazy-load": "^4.0.1",
|
@@ -276,7 +278,7 @@
|
|
276
278
|
"@commitlint/cli": "^19.8.1",
|
277
279
|
"@edge-runtime/vm": "^5.0.0",
|
278
280
|
"@huggingface/tasks": "^0.15.9",
|
279
|
-
"@lobehub/i18n-cli": "^1.
|
281
|
+
"@lobehub/i18n-cli": "^1.23.0",
|
280
282
|
"@lobehub/lint": "^1.26.2",
|
281
283
|
"@lobehub/seo-cli": "^1.6.0",
|
282
284
|
"@next/bundle-analyzer": "^15.3.3",
|
@@ -325,14 +327,12 @@
|
|
325
327
|
"fake-indexeddb": "^6.0.1",
|
326
328
|
"fs-extra": "^11.3.0",
|
327
329
|
"glob": "^11.0.2",
|
328
|
-
"gray-matter": "^4.0.3",
|
329
330
|
"happy-dom": "^17.5.6",
|
330
331
|
"husky": "^9.1.7",
|
331
332
|
"just-diff": "^6.0.2",
|
332
333
|
"lint-staged": "^15.5.2",
|
333
334
|
"lodash": "^4.17.21",
|
334
335
|
"markdown-table": "^3.0.4",
|
335
|
-
"markdown-to-txt": "^2.0.1",
|
336
336
|
"mcp-hello-world": "^1.1.2",
|
337
337
|
"mime": "^4.0.7",
|
338
338
|
"node-fetch": "^3.3.2",
|
@@ -366,13 +366,6 @@
|
|
366
366
|
],
|
367
367
|
"overrides": {
|
368
368
|
"mdast-util-gfm-autolink-literal": "2.0.0"
|
369
|
-
},
|
370
|
-
"packageExtensions": {
|
371
|
-
"@inkjs/ui": {
|
372
|
-
"dependencies": {
|
373
|
-
"react": "^18"
|
374
|
-
}
|
375
|
-
}
|
376
369
|
}
|
377
370
|
}
|
378
371
|
}
|
@@ -1,8 +1,8 @@
|
|
1
1
|
'use client';
|
2
2
|
|
3
|
-
import { Button } from '@lobehub/ui';
|
3
|
+
import { Button, Text } from '@lobehub/ui';
|
4
4
|
import { LobeChat } from '@lobehub/ui/brand';
|
5
|
-
import { Col, Flex, Row, Skeleton
|
5
|
+
import { Col, Flex, Row, Skeleton } from 'antd';
|
6
6
|
import { createStyles } from 'antd-style';
|
7
7
|
import { AuthError } from 'next-auth';
|
8
8
|
import { signIn } from 'next-auth/react';
|
@@ -15,8 +15,6 @@ import AuthIcons from '@/components/NextAuth/AuthIcons';
|
|
15
15
|
import { DOCUMENTS_REFER_URL, PRIVACY_URL, TERMS_URL } from '@/const/url';
|
16
16
|
import { useUserStore } from '@/store/user';
|
17
17
|
|
18
|
-
const { Title, Paragraph } = Typography;
|
19
|
-
|
20
18
|
const useStyles = createStyles(({ css, token }) => ({
|
21
19
|
button: css`
|
22
20
|
text-transform: capitalize;
|
@@ -111,13 +109,15 @@ export default memo(() => {
|
|
111
109
|
<Flex gap="large" vertical>
|
112
110
|
{/* Header */}
|
113
111
|
<div className={styles.text}>
|
114
|
-
<
|
112
|
+
<Text as={'h4'} className={styles.title}>
|
115
113
|
<div>
|
116
114
|
<LobeChat size={48} />
|
117
115
|
</div>
|
118
116
|
{t('signIn.start.title', { applicationName: 'LobeChat' })}
|
119
|
-
</
|
120
|
-
<
|
117
|
+
</Text>
|
118
|
+
<Text as={'p'} className={styles.description}>
|
119
|
+
{t('signIn.start.subtitle')}
|
120
|
+
</Text>
|
121
121
|
</div>
|
122
122
|
{/* Content */}
|
123
123
|
<Flex gap="small" vertical>
|
@@ -1,5 +1,4 @@
|
|
1
|
-
import { ActionIcon } from '@lobehub/ui';
|
2
|
-
import { Typography } from 'antd';
|
1
|
+
import { ActionIcon, Text } from '@lobehub/ui';
|
3
2
|
import { createStyles } from 'antd-style';
|
4
3
|
import { Trash } from 'lucide-react';
|
5
4
|
import { memo } from 'react';
|
@@ -53,7 +52,7 @@ const FileItem = memo<FileItemProps>(({ id, onRemove, file, status, uploadState,
|
|
53
52
|
<Flexbox align={'center'} className={styles.container} gap={12} horizontal key={id}>
|
54
53
|
<FileIcon fileName={file.name} fileType={file.type} />
|
55
54
|
<Flexbox style={{ overflow: 'hidden' }}>
|
56
|
-
<
|
55
|
+
<Text ellipsis>{file.name}</Text>
|
57
56
|
<UploadDetail size={file.size} status={status} tasks={tasks} uploadState={uploadState} />
|
58
57
|
</Flexbox>
|
59
58
|
<ActionIcon
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import {
|
1
|
+
import { Text } from '@lobehub/ui';
|
2
2
|
import { createStyles } from 'antd-style';
|
3
3
|
import isEqual from 'fast-deep-equal';
|
4
4
|
import { CSSProperties, memo } from 'react';
|
@@ -44,10 +44,10 @@ const Thread = memo<ThreadProps>(({ id, placement, style }) => {
|
|
44
44
|
<div style={{ width: 40 }} />
|
45
45
|
<Flexbox className={styles.container} gap={4} padding={4} style={{ width: 'fit-content' }}>
|
46
46
|
<Flexbox gap={8} horizontal paddingInline={6}>
|
47
|
-
<
|
47
|
+
<Text style={{ fontSize: 12 }} type={'secondary'}>
|
48
48
|
{t('thread.title')}
|
49
49
|
{threads.length}
|
50
|
-
</
|
50
|
+
</Text>
|
51
51
|
</Flexbox>
|
52
52
|
<Flexbox>
|
53
53
|
{threads.map((thread) => (
|
@@ -1,6 +1,6 @@
|
|
1
1
|
'use client';
|
2
2
|
|
3
|
-
import {
|
3
|
+
import { Text } from '@lobehub/ui';
|
4
4
|
import isEqual from 'fast-deep-equal';
|
5
5
|
import React, { memo, useCallback, useRef } from 'react';
|
6
6
|
import { useTranslation } from 'react-i18next';
|
@@ -37,7 +37,7 @@ const SearchResult = memo(() => {
|
|
37
37
|
if (topics.length === 0)
|
38
38
|
return (
|
39
39
|
<Center paddingBlock={12}>
|
40
|
-
<
|
40
|
+
<Text type={'secondary'}>{t('searchResultEmpty')}</Text>
|
41
41
|
</Center>
|
42
42
|
);
|
43
43
|
|
@@ -1,5 +1,5 @@
|
|
1
|
-
import { ActionIcon, Dropdown, EditableText, Icon, type MenuProps } from '@lobehub/ui';
|
2
|
-
import { App
|
1
|
+
import { ActionIcon, Dropdown, EditableText, Icon, type MenuProps, Text } from '@lobehub/ui';
|
2
|
+
import { App } from 'antd';
|
3
3
|
import { createStyles } from 'antd-style';
|
4
4
|
import { MoreVertical, PencilLine, Trash } from 'lucide-react';
|
5
5
|
import { memo, useMemo } from 'react';
|
@@ -30,7 +30,6 @@ const useStyles = createStyles(({ css, token }) => ({
|
|
30
30
|
text-align: start;
|
31
31
|
`,
|
32
32
|
}));
|
33
|
-
const { Paragraph } = Typography;
|
34
33
|
|
35
34
|
interface TopicContentProps {
|
36
35
|
active?: boolean;
|
@@ -109,13 +108,14 @@ const Content = memo<TopicContentProps>(({ id, title, active, showMore }) => {
|
|
109
108
|
<BubblesLoading />
|
110
109
|
</Flexbox>
|
111
110
|
) : (
|
112
|
-
<
|
111
|
+
<Text
|
112
|
+
as={'p'}
|
113
113
|
className={cx(styles.title, active && styles.active)}
|
114
114
|
ellipsis={{ rows: 1, tooltip: { placement: 'left', title } }}
|
115
115
|
style={{ margin: 0 }}
|
116
116
|
>
|
117
117
|
{title}
|
118
|
-
</
|
118
|
+
</Text>
|
119
119
|
)
|
120
120
|
) : (
|
121
121
|
<EditableText
|
@@ -1,13 +1,10 @@
|
|
1
|
-
import { Icon, Tag } from '@lobehub/ui';
|
2
|
-
import { Typography } from 'antd';
|
1
|
+
import { Icon, Tag, Text } from '@lobehub/ui';
|
3
2
|
import { useTheme } from 'antd-style';
|
4
3
|
import { MessageSquareDashed } from 'lucide-react';
|
5
4
|
import { memo } from 'react';
|
6
5
|
import { useTranslation } from 'react-i18next';
|
7
6
|
import { Flexbox } from 'react-layout-kit';
|
8
7
|
|
9
|
-
const { Paragraph } = Typography;
|
10
|
-
|
11
8
|
const DefaultContent = memo(() => {
|
12
9
|
const { t } = useTranslation('topic');
|
13
10
|
|
@@ -18,9 +15,9 @@ const DefaultContent = memo(() => {
|
|
18
15
|
<Flexbox align={'center'} height={24} justify={'center'} width={24}>
|
19
16
|
<Icon color={theme.colorTextDescription} icon={MessageSquareDashed} />
|
20
17
|
</Flexbox>
|
21
|
-
<
|
18
|
+
<Text ellipsis={{ rows: 1 }} style={{ margin: 0 }}>
|
22
19
|
{t('defaultTitle')}
|
23
|
-
</
|
20
|
+
</Text>
|
24
21
|
<Tag>{t('temp')}</Tag>
|
25
22
|
</Flexbox>
|
26
23
|
);
|
@@ -1,5 +1,5 @@
|
|
1
|
-
import { ActionIcon, Dropdown, EditableText, Icon, type MenuProps } from '@lobehub/ui';
|
2
|
-
import { App
|
1
|
+
import { ActionIcon, Dropdown, EditableText, Icon, type MenuProps, Text } from '@lobehub/ui';
|
2
|
+
import { App } from 'antd';
|
3
3
|
import { createStyles } from 'antd-style';
|
4
4
|
import {
|
5
5
|
LucideCopy,
|
@@ -32,7 +32,6 @@ const useStyles = createStyles(({ css }) => ({
|
|
32
32
|
text-align: start;
|
33
33
|
`,
|
34
34
|
}));
|
35
|
-
const { Paragraph } = Typography;
|
36
35
|
|
37
36
|
interface TopicContentProps {
|
38
37
|
fav?: boolean;
|
@@ -167,13 +166,13 @@ const TopicContent = memo<TopicContentProps>(({ id, title, fav, showMore }) => {
|
|
167
166
|
<BubblesLoading />
|
168
167
|
</Flexbox>
|
169
168
|
) : (
|
170
|
-
<
|
169
|
+
<Text
|
171
170
|
className={styles.title}
|
172
171
|
ellipsis={{ rows: 1, tooltip: { placement: 'left', title } }}
|
173
172
|
style={{ margin: 0 }}
|
174
173
|
>
|
175
174
|
{title}
|
176
|
-
</
|
175
|
+
</Text>
|
177
176
|
)
|
178
177
|
) : (
|
179
178
|
<EditableText
|
@@ -1,7 +1,7 @@
|
|
1
1
|
'use client';
|
2
2
|
|
3
3
|
import { SearchBar } from '@lobehub/ui';
|
4
|
-
import { memo } from 'react';
|
4
|
+
import { type ChangeEvent, memo, useCallback } from 'react';
|
5
5
|
import { useTranslation } from 'react-i18next';
|
6
6
|
|
7
7
|
import { useSessionStore } from '@/store/session';
|
@@ -11,6 +11,7 @@ import { HotkeyEnum } from '@/types/hotkey';
|
|
11
11
|
|
12
12
|
const SessionSearchBar = memo<{ mobile?: boolean }>(({ mobile }) => {
|
13
13
|
const { t } = useTranslation('chat');
|
14
|
+
const isLoaded = useUserStore((s) => s.isLoaded);
|
14
15
|
const hotkey = useUserStore(settingsSelectors.getHotkeyById(HotkeyEnum.Search));
|
15
16
|
|
16
17
|
const [keywords, useSearchSessions, updateSearchKeywords] = useSessionStore((s) => [
|
@@ -21,14 +22,19 @@ const SessionSearchBar = memo<{ mobile?: boolean }>(({ mobile }) => {
|
|
21
22
|
|
22
23
|
const { isValidating } = useSearchSessions(keywords);
|
23
24
|
|
25
|
+
const handleChange = useCallback(
|
26
|
+
(e: ChangeEvent<HTMLInputElement>) => {
|
27
|
+
updateSearchKeywords(e.target.value);
|
28
|
+
},
|
29
|
+
[updateSearchKeywords],
|
30
|
+
);
|
31
|
+
|
24
32
|
return (
|
25
33
|
<SearchBar
|
26
34
|
allowClear
|
27
35
|
enableShortKey={!mobile}
|
28
|
-
loading={isValidating}
|
29
|
-
onChange={
|
30
|
-
updateSearchKeywords(e.target.value);
|
31
|
-
}}
|
36
|
+
loading={!isLoaded || isValidating}
|
37
|
+
onChange={handleChange}
|
32
38
|
placeholder={t('searchAgentPlaceholder')}
|
33
39
|
shortKey={hotkey}
|
34
40
|
spotlight={!mobile}
|
package/src/app/[variants]/(main)/files/(content)/@menu/features/KnowledgeBase/Item/Content.tsx
CHANGED
@@ -1,5 +1,5 @@
|
|
1
|
-
import { ActionIcon, Dropdown, EditableText, Icon, type MenuProps } from '@lobehub/ui';
|
2
|
-
import { App
|
1
|
+
import { ActionIcon, Dropdown, EditableText, Icon, type MenuProps, Text } from '@lobehub/ui';
|
2
|
+
import { App } from 'antd';
|
3
3
|
import { createStyles } from 'antd-style';
|
4
4
|
import { LucideLoader2, MoreVertical, PencilLine, Trash } from 'lucide-react';
|
5
5
|
import { memo, useMemo } from 'react';
|
@@ -31,8 +31,6 @@ const useStyles = createStyles(({ css }) => ({
|
|
31
31
|
`,
|
32
32
|
}));
|
33
33
|
|
34
|
-
const { Paragraph } = Typography;
|
35
|
-
|
36
34
|
interface KnowledgeBaseItemProps {
|
37
35
|
id: string;
|
38
36
|
name: string;
|
@@ -118,13 +116,13 @@ const Content = memo<KnowledgeBaseItemProps>(({ id, name, showMore }) => {
|
|
118
116
|
<BubblesLoading />
|
119
117
|
</Flexbox>
|
120
118
|
) : (
|
121
|
-
<
|
119
|
+
<Text
|
122
120
|
className={styles.title}
|
123
121
|
ellipsis={{ rows: 1, tooltip: { placement: 'left', title: name } }}
|
124
122
|
style={{ margin: 0, opacity: isLoading ? 0.6 : undefined }}
|
125
123
|
>
|
126
124
|
{name}
|
127
|
-
</
|
125
|
+
</Text>
|
128
126
|
)
|
129
127
|
) : (
|
130
128
|
<EditableText
|
@@ -1,7 +1,6 @@
|
|
1
1
|
'use client';
|
2
2
|
|
3
|
-
import { Icon } from '@lobehub/ui';
|
4
|
-
import { Typography } from 'antd';
|
3
|
+
import { Icon, Text } from '@lobehub/ui';
|
5
4
|
import { createStyles, useTheme } from 'antd-style';
|
6
5
|
import { Database, FileImage, FileText, FileUpIcon, LibraryBig, SearchCheck } from 'lucide-react';
|
7
6
|
import Link from 'next/link';
|
@@ -128,8 +127,10 @@ const NotSupportClient = () => {
|
|
128
127
|
</Flexbox>
|
129
128
|
|
130
129
|
<Flexbox justify={'center'} style={{ textAlign: 'center' }}>
|
131
|
-
<
|
132
|
-
|
130
|
+
<Text as={'h1'} style={{ fontSize: 32 }}>
|
131
|
+
{t('notSupportGuide.title')}
|
132
|
+
</Text>
|
133
|
+
<Text type={'secondary'}>
|
133
134
|
<Trans i18nKey={'notSupportGuide.desc'} ns={'file'}>
|
134
135
|
当前部署实例为客户端数据库模式,无法使用文件管理功能。请切换到
|
135
136
|
<Link href={DATABASE_SELF_HOSTING_URL}>服务端数据库部署模式</Link>
|
@@ -140,7 +141,7 @@ const NotSupportClient = () => {
|
|
140
141
|
{LOBE_CHAT_CLOUD}
|
141
142
|
</Link>
|
142
143
|
</Trans>
|
143
|
-
</
|
144
|
+
</Text>
|
144
145
|
</Flexbox>
|
145
146
|
|
146
147
|
<Flexbox style={{ marginTop: 40 }}>
|
@@ -1,7 +1,7 @@
|
|
1
1
|
'use client';
|
2
2
|
|
3
|
-
import { ActionIcon, Button } from '@lobehub/ui';
|
4
|
-
import { Divider
|
3
|
+
import { ActionIcon, Button, Text } from '@lobehub/ui';
|
4
|
+
import { Divider } from 'antd';
|
5
5
|
import { useTheme } from 'antd-style';
|
6
6
|
import { ArrowLeftIcon, DownloadIcon } from 'lucide-react';
|
7
7
|
import { useRouter } from 'next/navigation';
|
@@ -42,12 +42,12 @@ const Header = memo<HeaderProps>(({ filename, url }) => {
|
|
42
42
|
{t('back')}
|
43
43
|
</Button>
|
44
44
|
<Divider type={'vertical'} />
|
45
|
-
<
|
46
|
-
|
45
|
+
<Text
|
46
|
+
as={'h1'}
|
47
47
|
style={{ fontSize: 16, lineHeight: 1.5, marginBottom: 0, paddingInlineStart: 8 }}
|
48
48
|
>
|
49
49
|
{filename}
|
50
|
-
</
|
50
|
+
</Text>
|
51
51
|
</Flexbox>
|
52
52
|
<Flexbox>
|
53
53
|
<ActionIcon
|
@@ -1,8 +1,8 @@
|
|
1
1
|
'use client';
|
2
2
|
|
3
3
|
import { ProColumns, ProTable } from '@ant-design/pro-components';
|
4
|
-
import { ActionIcon, Button } from '@lobehub/ui';
|
5
|
-
import {
|
4
|
+
import { ActionIcon, Button, Text } from '@lobehub/ui';
|
5
|
+
import { Upload } from 'antd';
|
6
6
|
import { createStyles } from 'antd-style';
|
7
7
|
import { Edit2Icon, Trash2Icon } from 'lucide-react';
|
8
8
|
import { parseAsInteger, useQueryState } from 'nuqs';
|
@@ -64,7 +64,7 @@ const DatasetDetail = () => {
|
|
64
64
|
{referenceFiles?.map((file) => (
|
65
65
|
<Flexbox gap={4} horizontal key={file.id}>
|
66
66
|
<FileIcon fileName={file.name} fileType={file.fileType} size={20} />
|
67
|
-
<
|
67
|
+
<Text ellipsis={{ tooltip: true }}>{file.name}</Text>
|
68
68
|
</Flexbox>
|
69
69
|
))}
|
70
70
|
</Flexbox>
|
@@ -2,9 +2,10 @@
|
|
2
2
|
|
3
3
|
import { ActionType, ProColumns, ProTable } from '@ant-design/pro-components';
|
4
4
|
import { ActionIcon, Button, ButtonProps, Icon } from '@lobehub/ui';
|
5
|
-
import { App
|
5
|
+
import { App } from 'antd';
|
6
6
|
import { createStyles } from 'antd-style';
|
7
7
|
import { DownloadIcon, PlayIcon, RotateCcwIcon, Trash2Icon } from 'lucide-react';
|
8
|
+
import Link from 'next/link';
|
8
9
|
import { useRef, useState } from 'react';
|
9
10
|
import { useTranslation } from 'react-i18next';
|
10
11
|
import { Flexbox } from 'react-layout-kit';
|
@@ -57,13 +58,13 @@ const EvaluationList = ({ knowledgeBaseId }: { knowledgeBaseId: string }) => {
|
|
57
58
|
dataIndex: ['dataset', 'id'],
|
58
59
|
render: (dom, entity) => {
|
59
60
|
return (
|
60
|
-
<
|
61
|
+
<Link
|
61
62
|
href={`/repos/${knowledgeBaseId}/evals/dataset?id=${entity.dataset.id}`}
|
62
63
|
style={{ color: 'initial' }}
|
63
64
|
target={'_blank'}
|
64
65
|
>
|
65
66
|
{entity.dataset.name}
|
66
|
-
</
|
67
|
+
</Link>
|
67
68
|
);
|
68
69
|
},
|
69
70
|
title: t('evaluation.table.columns.datasetId.title'),
|
@@ -1,6 +1,6 @@
|
|
1
1
|
'use client';
|
2
2
|
|
3
|
-
import {
|
3
|
+
import { Text } from '@lobehub/ui';
|
4
4
|
import { memo } from 'react';
|
5
5
|
import { Center, Flexbox } from 'react-layout-kit';
|
6
6
|
|
@@ -16,7 +16,9 @@ const Head = memo<{ name?: string }>(({ name }) => {
|
|
16
16
|
<RepoIcon />
|
17
17
|
</Center>
|
18
18
|
|
19
|
-
<
|
19
|
+
<Text ellipsis strong style={{ fontSize: 16 }}>
|
20
|
+
{name}
|
21
|
+
</Text>
|
20
22
|
</Flexbox>
|
21
23
|
</Flexbox>
|
22
24
|
);
|
package/src/app/[variants]/(main)/settings/llm/components/ProviderModelList/CustomModelOption.tsx
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
import { ModelIcon } from '@lobehub/icons';
|
2
|
-
import { ActionIcon, Icon } from '@lobehub/ui';
|
3
|
-
import { App
|
2
|
+
import { ActionIcon, Icon, Text } from '@lobehub/ui';
|
3
|
+
import { App } from 'antd';
|
4
4
|
import isEqual from 'fast-deep-equal';
|
5
5
|
import { LucideArrowRight, LucideSettings, LucideTrash2 } from 'lucide-react';
|
6
6
|
import { memo } from 'react';
|
@@ -45,10 +45,10 @@ const CustomModelOption = memo<CustomModelOptionProps>(({ id, provider }) => {
|
|
45
45
|
<ModelIcon model={id} size={32} />
|
46
46
|
<Flexbox direction={'vertical'} style={{ flex: 1, overflow: 'hidden' }}>
|
47
47
|
<Flexbox align={'center'} gap={8} horizontal>
|
48
|
-
<
|
48
|
+
<Text ellipsis>{modelCard?.displayName || id}</Text>
|
49
49
|
<ModelInfoTags id={id} {...modelCard} isCustom />
|
50
50
|
</Flexbox>
|
51
|
-
<
|
51
|
+
<Text ellipsis style={{ fontSize: 12, marginTop: '4px' }} type={'secondary'}>
|
52
52
|
{id}
|
53
53
|
{!!modelCard?.deploymentName && (
|
54
54
|
<>
|
@@ -56,7 +56,7 @@ const CustomModelOption = memo<CustomModelOptionProps>(({ id, provider }) => {
|
|
56
56
|
{modelCard?.deploymentName}
|
57
57
|
</>
|
58
58
|
)}
|
59
|
-
</
|
59
|
+
</Text>
|
60
60
|
</Flexbox>
|
61
61
|
</Flexbox>
|
62
62
|
|
package/src/app/[variants]/(main)/settings/llm/components/ProviderModelList/ModelFetcher.tsx
CHANGED
@@ -1,5 +1,4 @@
|
|
1
|
-
import { ActionIcon, Icon, Tooltip } from '@lobehub/ui';
|
2
|
-
import { Typography } from 'antd';
|
1
|
+
import { ActionIcon, Icon, Text, Tooltip } from '@lobehub/ui';
|
3
2
|
import { createStyles } from 'antd-style';
|
4
3
|
import dayjs from 'dayjs';
|
5
4
|
import isEqual from 'fast-deep-equal';
|
@@ -61,7 +60,7 @@ const ModelFetcher = memo<ModelFetcherProps>(({ provider }) => {
|
|
61
60
|
const { mutate, isValidating } = useFetchProviderModelList(provider, enabledAutoFetch);
|
62
61
|
|
63
62
|
return (
|
64
|
-
<
|
63
|
+
<Text style={{ fontSize: 12 }} type={'secondary'}>
|
65
64
|
<Flexbox align={'center'} gap={0} horizontal justify={'space-between'}>
|
66
65
|
<div style={{ display: 'flex', lineHeight: '24px' }}>
|
67
66
|
{t('llm.modelList.total', { count: totalModels })}
|
@@ -100,7 +99,7 @@ const ModelFetcher = memo<ModelFetcherProps>(({ provider }) => {
|
|
100
99
|
</Flexbox>
|
101
100
|
</Tooltip>
|
102
101
|
</Flexbox>
|
103
|
-
</
|
102
|
+
</Text>
|
104
103
|
);
|
105
104
|
});
|
106
105
|
export default ModelFetcher;
|
@@ -1,6 +1,5 @@
|
|
1
1
|
import { ModelIcon } from '@lobehub/icons';
|
2
|
-
import { ActionIcon, Tooltip } from '@lobehub/ui';
|
3
|
-
import { Typography } from 'antd';
|
2
|
+
import { ActionIcon, Text, Tooltip } from '@lobehub/ui';
|
4
3
|
import { useTheme } from 'antd-style';
|
5
4
|
import isEqual from 'fast-deep-equal';
|
6
5
|
import { Recycle } from 'lucide-react';
|
@@ -47,9 +46,9 @@ const OptionRender = memo<OptionRenderProps>(({ displayName, id, provider, isAzu
|
|
47
46
|
{displayName}
|
48
47
|
<ModelInfoTags directionReverse placement={'top'} {...model!} />
|
49
48
|
</Flexbox>
|
50
|
-
<
|
49
|
+
<Text style={{ fontSize: 12 }} type={'secondary'}>
|
51
50
|
{id}
|
52
|
-
</
|
51
|
+
</Text>
|
53
52
|
</Flexbox>
|
54
53
|
</Flexbox>
|
55
54
|
{removed && (
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { ProviderCombine, ProviderIcon } from '@lobehub/icons';
|
2
|
-
import { Avatar } from '@lobehub/ui';
|
3
|
-
import { Divider, Skeleton
|
2
|
+
import { Avatar, Text } from '@lobehub/ui';
|
3
|
+
import { Divider, Skeleton } from 'antd';
|
4
4
|
import Link from 'next/link';
|
5
5
|
import { memo } from 'react';
|
6
6
|
import { useTranslation } from 'react-i18next';
|
@@ -11,8 +11,6 @@ import { AiProviderListItem } from '@/types/aiProvider';
|
|
11
11
|
import EnableSwitch from './EnableSwitch';
|
12
12
|
import { useStyles } from './style';
|
13
13
|
|
14
|
-
const { Paragraph } = Typography;
|
15
|
-
|
16
14
|
interface ProviderCardProps extends AiProviderListItem {
|
17
15
|
loading?: boolean;
|
18
16
|
}
|
@@ -57,23 +55,18 @@ const ProviderCard = memo<ProviderCardProps>(
|
|
57
55
|
type={'avatar'}
|
58
56
|
/>
|
59
57
|
)}
|
60
|
-
<
|
61
|
-
{name || id}
|
62
|
-
</Typography.Text>
|
58
|
+
<Text style={{ fontSize: 16, fontWeight: 'bold' }}>{name || id}</Text>
|
63
59
|
</Flexbox>
|
64
60
|
)}
|
65
61
|
</Flexbox>
|
66
|
-
<
|
62
|
+
<Text
|
67
63
|
className={styles.desc}
|
68
64
|
ellipsis={{
|
69
65
|
rows: 2,
|
70
|
-
tooltip: {
|
71
|
-
arrow: false,
|
72
|
-
},
|
73
66
|
}}
|
74
67
|
>
|
75
68
|
{source === 'custom' ? description : t(`${id}.description`)}
|
76
|
-
</
|
69
|
+
</Text>
|
77
70
|
</Flexbox>
|
78
71
|
</Link>
|
79
72
|
<Divider style={{ margin: '4px 0' }} />
|
@@ -1,7 +1,6 @@
|
|
1
1
|
'use client';
|
2
2
|
|
3
|
-
import { Grid, Tag } from '@lobehub/ui';
|
4
|
-
import { Typography } from 'antd';
|
3
|
+
import { Grid, Tag, Text } from '@lobehub/ui';
|
5
4
|
import isEqual from 'fast-deep-equal';
|
6
5
|
import { memo } from 'react';
|
7
6
|
import { useTranslation } from 'react-i18next';
|
@@ -25,9 +24,9 @@ const List = memo(() => {
|
|
25
24
|
return (
|
26
25
|
<Flexbox gap={24} paddingBlock={'0 16px'}>
|
27
26
|
<Flexbox align={'center'} gap={4} horizontal>
|
28
|
-
<
|
27
|
+
<Text strong style={{ fontSize: 16 }}>
|
29
28
|
{t('list.title.enabled')}
|
30
|
-
</
|
29
|
+
</Text>
|
31
30
|
</Flexbox>
|
32
31
|
<Grid gap={16} rows={3}>
|
33
32
|
{loadingArr.map((item) => (
|
@@ -41,9 +40,9 @@ const List = memo(() => {
|
|
41
40
|
<>
|
42
41
|
<Flexbox gap={24}>
|
43
42
|
<Flexbox align={'center'} gap={8} horizontal>
|
44
|
-
<
|
43
|
+
<Text strong style={{ fontSize: 18 }}>
|
45
44
|
{t('list.title.enabled')}
|
46
|
-
</
|
45
|
+
</Text>
|
47
46
|
<Tag>{enabledList.length}</Tag>
|
48
47
|
</Flexbox>
|
49
48
|
<Grid gap={16} rows={3}>
|
@@ -54,9 +53,9 @@ const List = memo(() => {
|
|
54
53
|
</Flexbox>
|
55
54
|
<Flexbox gap={24}>
|
56
55
|
<Flexbox align={'center'} gap={8} horizontal>
|
57
|
-
<
|
56
|
+
<Text strong style={{ fontSize: 18 }}>
|
58
57
|
{t('list.title.disabled')}
|
59
|
-
</
|
58
|
+
</Text>
|
60
59
|
<Tag>{disabledList.length}</Tag>
|
61
60
|
</Flexbox>
|
62
61
|
<Grid gap={16} rows={3}>
|