@lobehub/chat 1.96.2 → 1.96.4
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/.cursor/rules/debug-usage.mdc +84 -0
- package/.cursor/rules/desktop-controller-tests.mdc +188 -0
- package/.cursor/rules/desktop-feature-implementation.mdc +1 -1
- package/CHANGELOG.md +34 -0
- package/README.md +1 -1
- package/changelog/v1.json +10 -0
- package/package.json +6 -13
- 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/modelProviders/index.ts +0 -1
- 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/features/InitClientDB/features/DatabaseRepair/Backup.tsx +3 -5
- package/src/features/InitClientDB/features/DatabaseRepair/Repair.tsx +2 -4
- package/src/features/KnowledgeBaseModal/AssignKnowledgeBase/Item/index.tsx +5 -7
- package/src/features/Portal/Artifacts/Header.tsx +4 -4
- package/src/features/Portal/FilePreview/Header.tsx +4 -4
- package/src/features/Portal/Home/Body/Files/FileList/Item.tsx +3 -3
- package/src/features/Portal/Home/Body/Files/FileList/index.tsx +2 -3
- package/src/features/Portal/Home/Body/Files/index.tsx +3 -3
- package/src/features/Portal/Home/Body/Plugins/ArtifactList/Item/index.tsx +3 -4
- package/src/features/Portal/Home/Body/Plugins/ArtifactList/index.tsx +3 -3
- package/src/features/Portal/Home/Body/Plugins/index.tsx +3 -3
- package/src/features/Portal/Home/Title.tsx +3 -3
- package/src/features/Portal/MessageDetail/Header.tsx +3 -3
- package/src/features/Portal/Plugins/Header.tsx +5 -6
- package/src/features/Portal/Thread/Header/Active.tsx +3 -4
- package/src/features/Portal/Thread/Header/New.tsx +4 -4
- package/src/features/SyncStatusInspector/EnableSync.tsx +5 -9
- 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
@@ -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}>
|
@@ -1,7 +1,6 @@
|
|
1
1
|
'use client';
|
2
2
|
|
3
|
-
import { ActionIcon, ScrollShadow } from '@lobehub/ui';
|
4
|
-
import { Typography } from 'antd';
|
3
|
+
import { ActionIcon, ScrollShadow, Text } from '@lobehub/ui';
|
5
4
|
import isEqual from 'fast-deep-equal';
|
6
5
|
import { ArrowDownUpIcon } from 'lucide-react';
|
7
6
|
import { useState } from 'react';
|
@@ -39,9 +38,9 @@ const ProviderList = () => {
|
|
39
38
|
justify={'space-between'}
|
40
39
|
style={{ fontSize: 12, marginTop: 8 }}
|
41
40
|
>
|
42
|
-
<
|
41
|
+
<Text style={{ fontSize: 12 }} type={'secondary'}>
|
43
42
|
{t('menu.list.enabled')}
|
44
|
-
</
|
43
|
+
</Text>
|
45
44
|
<ActionIcon
|
46
45
|
icon={ArrowDownUpIcon}
|
47
46
|
onClick={() => {
|
@@ -63,9 +62,9 @@ const ProviderList = () => {
|
|
63
62
|
{enabledModelProviderList.map((item) => (
|
64
63
|
<ProviderItem {...item} key={item.id} />
|
65
64
|
))}
|
66
|
-
<
|
65
|
+
<Text style={{ fontSize: 12, marginTop: 8 }} type={'secondary'}>
|
67
66
|
{t('menu.list.disabled')}
|
68
|
-
</
|
67
|
+
</Text>
|
69
68
|
{disabledModelProviderList.map((item) => (
|
70
69
|
<ProviderItem {...item} key={item.id} />
|
71
70
|
))}
|
@@ -1,5 +1,4 @@
|
|
1
|
-
import { Button } from '@lobehub/ui';
|
2
|
-
import { Typography } from 'antd';
|
1
|
+
import { Button, Text } from '@lobehub/ui';
|
3
2
|
import isEqual from 'fast-deep-equal';
|
4
3
|
import { ChevronDown } from 'lucide-react';
|
5
4
|
import { memo, useState } from 'react';
|
@@ -22,9 +21,9 @@ const DisabledModels = memo(() => {
|
|
22
21
|
return (
|
23
22
|
disabledModels.length > 0 && (
|
24
23
|
<Flexbox>
|
25
|
-
<
|
24
|
+
<Text style={{ fontSize: 12, marginTop: 8 }} type={'secondary'}>
|
26
25
|
{t('providerModels.list.disabled')}
|
27
|
-
</
|
26
|
+
</Text>
|
28
27
|
{displayModels.map((item) => (
|
29
28
|
<ModelItem {...item} key={item.id} />
|
30
29
|
))}
|
package/src/app/[variants]/(main)/settings/provider/features/ModelList/EnabledModelList/index.tsx
CHANGED
@@ -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 isEqual from 'fast-deep-equal';
|
4
3
|
import { ArrowDownUpIcon, ToggleLeft } from 'lucide-react';
|
5
4
|
import { useState } from 'react';
|
@@ -24,9 +23,9 @@ const EnabledModelList = () => {
|
|
24
23
|
return (
|
25
24
|
<>
|
26
25
|
<Flexbox horizontal justify={'space-between'}>
|
27
|
-
<
|
26
|
+
<Text style={{ fontSize: 12, marginTop: 8 }} type={'secondary'}>
|
28
27
|
{t('providerModels.list.enabled')}
|
29
|
-
</
|
28
|
+
</Text>
|
30
29
|
{!isEmpty && (
|
31
30
|
<Flexbox horizontal>
|
32
31
|
<ActionIcon
|
@@ -66,9 +65,9 @@ const EnabledModelList = () => {
|
|
66
65
|
</Flexbox>
|
67
66
|
{isEmpty ? (
|
68
67
|
<Center padding={12}>
|
69
|
-
<
|
68
|
+
<Text style={{ fontSize: 12 }} type={'secondary'}>
|
70
69
|
{t('providerModels.list.enabledEmpty')}
|
71
|
-
</
|
70
|
+
</Text>
|
72
71
|
</Center>
|
73
72
|
) : (
|
74
73
|
<Flexbox gap={2}>
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { ModelIcon } from '@lobehub/icons';
|
2
|
-
import { ActionIcon, Tag, copyToClipboard } from '@lobehub/ui';
|
3
|
-
import { App, Switch
|
2
|
+
import { ActionIcon, Tag, Text, copyToClipboard } from '@lobehub/ui';
|
3
|
+
import { App, Switch } from 'antd';
|
4
4
|
import { createStyles, useTheme } from 'antd-style';
|
5
5
|
import { LucidePencil, TrashIcon } from 'lucide-react';
|
6
6
|
import { memo, use, useState } from 'react';
|
@@ -297,11 +297,9 @@ const ModelItem = memo<ModelItemProps>(
|
|
297
297
|
</Flexbox>
|
298
298
|
<Flexbox align={'baseline'} gap={8} horizontal>
|
299
299
|
{content.length > 0 && (
|
300
|
-
<
|
301
|
-
style={{ color: theme.colorTextSecondary, fontSize: 12, marginBottom: 0 }}
|
302
|
-
>
|
300
|
+
<Text style={{ color: theme.colorTextSecondary, fontSize: 12, marginBottom: 0 }}>
|
303
301
|
{content.join(' · ')}
|
304
|
-
</
|
302
|
+
</Text>
|
305
303
|
)}
|
306
304
|
</Flexbox>
|
307
305
|
</Flexbox>
|
@@ -1,5 +1,5 @@
|
|
1
|
-
import { ActionIcon, Button, Dropdown } from '@lobehub/ui';
|
2
|
-
import { App, Skeleton, Space
|
1
|
+
import { ActionIcon, Button, Dropdown, Text } from '@lobehub/ui';
|
2
|
+
import { App, Skeleton, Space } from 'antd';
|
3
3
|
import { useTheme } from 'antd-style';
|
4
4
|
import { CircleX, EllipsisVertical, LucideRefreshCcwDot, PlusIcon } from 'lucide-react';
|
5
5
|
import { memo, useState } from 'react';
|
@@ -65,14 +65,14 @@ const ModelTitle = memo<ModelFetcherProps>(
|
|
65
65
|
>
|
66
66
|
<Flexbox align={'center'} gap={0} horizontal justify={'space-between'}>
|
67
67
|
<Flexbox align={'center'} gap={8} horizontal>
|
68
|
-
<
|
68
|
+
<Text strong style={{ fontSize: 16 }}>
|
69
69
|
{t('providerModels.list.title')}
|
70
|
-
</
|
70
|
+
</Text>
|
71
71
|
|
72
72
|
{isLoading ? (
|
73
73
|
<Skeleton.Button active style={{ height: 22 }} />
|
74
74
|
) : (
|
75
|
-
<
|
75
|
+
<Text style={{ fontSize: 12 }} type={'secondary'}>
|
76
76
|
<div style={{ display: 'flex', lineHeight: '24px' }}>
|
77
77
|
{t('providerModels.list.total', { count: totalModels })}
|
78
78
|
{hasRemoteModels && (
|
@@ -89,7 +89,7 @@ const ModelTitle = memo<ModelFetcherProps>(
|
|
89
89
|
/>
|
90
90
|
)}
|
91
91
|
</div>
|
92
|
-
</
|
92
|
+
</Text>
|
93
93
|
)}
|
94
94
|
</Flexbox>
|
95
95
|
{isLoading ? (
|
@@ -1,7 +1,6 @@
|
|
1
1
|
'use client';
|
2
2
|
|
3
|
-
import { ActionIcon } from '@lobehub/ui';
|
4
|
-
import { Typography } from 'antd';
|
3
|
+
import { ActionIcon, Text } from '@lobehub/ui';
|
5
4
|
import isEqual from 'fast-deep-equal';
|
6
5
|
import { ToggleRightIcon } from 'lucide-react';
|
7
6
|
import { memo, useState } from 'react';
|
@@ -26,9 +25,9 @@ const SearchResult = memo(() => {
|
|
26
25
|
return (
|
27
26
|
<>
|
28
27
|
<Flexbox horizontal justify={'space-between'}>
|
29
|
-
<
|
28
|
+
<Text style={{ fontSize: 12, marginTop: 8 }} type={'secondary'}>
|
30
29
|
{t('providerModels.list.searchResult', { count: filteredModels.length })}
|
31
|
-
</
|
30
|
+
</Text>
|
32
31
|
{!isEmpty && (
|
33
32
|
<Flexbox horizontal>
|
34
33
|
<ActionIcon
|
@@ -1,7 +1,6 @@
|
|
1
1
|
'use client';
|
2
2
|
|
3
|
-
import { EditableText } from '@lobehub/ui';
|
4
|
-
import { Typography } from 'antd';
|
3
|
+
import { EditableText, Text } from '@lobehub/ui';
|
5
4
|
import { memo, useState } from 'react';
|
6
5
|
import { useTranslation } from 'react-i18next';
|
7
6
|
import { Flexbox } from 'react-layout-kit';
|
@@ -39,7 +38,7 @@ const DeviceName = memo(() => {
|
|
39
38
|
}}
|
40
39
|
style={{ cursor: 'pointer' }}
|
41
40
|
>
|
42
|
-
<
|
41
|
+
<Text type={'secondary'}>{t('sync.device.deviceName.hint')}</Text>
|
43
42
|
</Flexbox>
|
44
43
|
)}
|
45
44
|
<EditableText
|
@@ -1,6 +1,6 @@
|
|
1
1
|
'use client';
|
2
2
|
|
3
|
-
import {
|
3
|
+
import { Text } from '@lobehub/ui';
|
4
4
|
import { createStyles } from 'antd-style';
|
5
5
|
import { rgba } from 'polished';
|
6
6
|
import { memo } from 'react';
|
@@ -65,9 +65,9 @@ const DeviceCard = memo<DeviceCardProps>(({ browser, os }) => {
|
|
65
65
|
<Flexbox className={styles.container} padding={4}>
|
66
66
|
<Flexbox horizontal paddingBlock={8} paddingInline={12}>
|
67
67
|
<div>
|
68
|
-
<
|
68
|
+
<Text strong style={{ fontSize: 18 }}>
|
69
69
|
{t('sync.device.title')}
|
70
|
-
</
|
70
|
+
</Text>
|
71
71
|
</div>
|
72
72
|
</Flexbox>
|
73
73
|
<Flexbox
|
@@ -1,8 +1,8 @@
|
|
1
1
|
'use client';
|
2
2
|
|
3
3
|
import { SiWebrtc } from '@icons-pack/react-simple-icons';
|
4
|
-
import { Form, type FormGroupItemType, Input, InputPassword, Tooltip } from '@lobehub/ui';
|
5
|
-
import { Form as AntForm, Switch
|
4
|
+
import { Form, type FormGroupItemType, Input, InputPassword, Text, Tooltip } from '@lobehub/ui';
|
5
|
+
import { Form as AntForm, Switch } from 'antd';
|
6
6
|
import { memo } from 'react';
|
7
7
|
import { useTranslation } from 'react-i18next';
|
8
8
|
import { Flexbox } from 'react-layout-kit';
|
@@ -80,9 +80,9 @@ const WebRTC = memo(() => {
|
|
80
80
|
<SiWebrtc style={{ flex: 'none' }} />
|
81
81
|
{t('sync.webrtc.title')}
|
82
82
|
</Flexbox>
|
83
|
-
<
|
83
|
+
<Text style={{ fontWeight: 'normal' }} type={'secondary'}>
|
84
84
|
{t('sync.webrtc.desc')}
|
85
|
-
</
|
85
|
+
</Text>
|
86
86
|
</Flexbox>
|
87
87
|
),
|
88
88
|
};
|
@@ -1,6 +1,6 @@
|
|
1
1
|
'use client';
|
2
2
|
|
3
|
-
import {
|
3
|
+
import { Text } from '@lobehub/ui';
|
4
4
|
import { createStyles } from 'antd-style';
|
5
5
|
import React, { memo } from 'react';
|
6
6
|
import { Center } from 'react-layout-kit';
|
@@ -12,8 +12,6 @@ interface ClientProps {
|
|
12
12
|
};
|
13
13
|
}
|
14
14
|
|
15
|
-
const { Title, Paragraph } = Typography;
|
16
|
-
|
17
15
|
const useStyles = createStyles(({ css, token }) => ({
|
18
16
|
container: css`
|
19
17
|
width: 100%;
|
@@ -32,10 +30,10 @@ const ConsentClientError = memo<ClientProps>(({ error }) => {
|
|
32
30
|
return (
|
33
31
|
<Center className={styles.container}>
|
34
32
|
<div className={styles.error}>
|
35
|
-
<
|
33
|
+
<Text as={'h2'} style={{ color: 'inherit' }}>
|
36
34
|
{error.title}
|
37
|
-
</
|
38
|
-
<
|
35
|
+
</Text>
|
36
|
+
<Text style={{ color: 'inherit' }}>{error.message}</Text>
|
39
37
|
</div>
|
40
38
|
</Center>
|
41
39
|
);
|
@@ -1,7 +1,7 @@
|
|
1
1
|
'use client';
|
2
2
|
|
3
|
-
import { Button } from '@lobehub/ui';
|
4
|
-
import { Card, Divider
|
3
|
+
import { Button, Text } from '@lobehub/ui';
|
4
|
+
import { Card, Divider } from 'antd';
|
5
5
|
import { createStyles } from 'antd-style';
|
6
6
|
import { memo } from 'react';
|
7
7
|
import { useTranslation } from 'react-i18next';
|
@@ -22,8 +22,6 @@ interface ClientProps {
|
|
22
22
|
uid: string;
|
23
23
|
}
|
24
24
|
|
25
|
-
const { Title, Text, Paragraph } = Typography;
|
26
|
-
|
27
25
|
const useStyles = createStyles(({ css, token }) => ({
|
28
26
|
authButton: css`
|
29
27
|
width: 100%;
|
@@ -106,6 +104,7 @@ const useStyles = createStyles(({ css, token }) => ({
|
|
106
104
|
`,
|
107
105
|
title: css`
|
108
106
|
margin-block-end: ${token.marginLG}px;
|
107
|
+
font-size: 24px;
|
109
108
|
color: ${token.colorTextBase};
|
110
109
|
text-align: center;
|
111
110
|
`,
|
@@ -132,17 +131,17 @@ const ConsentClient = memo<ClientProps>(
|
|
132
131
|
isFirstParty={clientMetadata.isFirstParty}
|
133
132
|
logoUrl={clientMetadata.logo}
|
134
133
|
/>
|
135
|
-
<
|
134
|
+
<Text as={'h3'} className={styles.title}>
|
136
135
|
{t('consent.title', { clientName: clientDisplayName })}
|
137
|
-
</
|
136
|
+
</Text>
|
138
137
|
</Flexbox>
|
139
138
|
<Card className={styles.card}>
|
140
139
|
<Flexbox gap={8}>
|
141
140
|
<Flexbox gap={12}>
|
142
|
-
<
|
141
|
+
<Text>{t('consent.description', { clientName: clientDisplayName })}</Text>
|
143
142
|
|
144
143
|
<div className={styles.scopes}>
|
145
|
-
<
|
144
|
+
<Text type={'secondary'}>{t('consent.permissionsTitle')}</Text>
|
146
145
|
{scopes.map((scope) => (
|
147
146
|
<div className={styles.scope} key={scope}>
|
148
147
|
<Text>{getScopeDescription(scope, t)}</Text>
|
@@ -1,7 +1,7 @@
|
|
1
1
|
'use client';
|
2
2
|
|
3
|
-
import { Avatar, Button } from '@lobehub/ui';
|
4
|
-
import { Card, Skeleton
|
3
|
+
import { Avatar, Button, Text } from '@lobehub/ui';
|
4
|
+
import { Card, Skeleton } from 'antd';
|
5
5
|
import { createStyles } from 'antd-style';
|
6
6
|
import React, { memo } from 'react';
|
7
7
|
import { useTranslation } from 'react-i18next';
|
@@ -21,8 +21,6 @@ interface LoginConfirmProps {
|
|
21
21
|
uid: string;
|
22
22
|
}
|
23
23
|
|
24
|
-
const { Title } = Typography;
|
25
|
-
|
26
24
|
const useStyles = createStyles(({ css, token }) => ({
|
27
25
|
authButton: css`
|
28
26
|
width: 100%;
|
@@ -75,9 +73,9 @@ const LoginConfirmClient = memo<LoginConfirmProps>(({ uid, clientMetadata }) =>
|
|
75
73
|
logoUrl={clientMetadata.logo}
|
76
74
|
/>
|
77
75
|
</Flexbox>
|
78
|
-
<
|
76
|
+
<Text as={'h3'} className={styles.title}>
|
79
77
|
{titleText}
|
80
|
-
</
|
78
|
+
</Text>
|
81
79
|
|
82
80
|
<Card className={styles.card}>
|
83
81
|
<Flexbox gap={64}>
|