@lobehub/chat 1.96.2 → 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.
Files changed (64) hide show
  1. package/CHANGELOG.md +17 -0
  2. package/README.md +5 -0
  3. package/changelog/v1.json +5 -0
  4. package/package.json +6 -13
  5. package/src/app/[variants]/(auth)/next-auth/signin/AuthSignInBox.tsx +7 -7
  6. package/src/app/[variants]/(main)/chat/(workspace)/@conversation/features/ChatInput/Mobile/Files/FileItem/File.tsx +2 -3
  7. package/src/app/[variants]/(main)/chat/(workspace)/@conversation/features/ChatList/ChatItem/Thread.tsx +3 -3
  8. package/src/app/[variants]/(main)/chat/(workspace)/@topic/features/TopicListContent/SearchResult/index.tsx +2 -2
  9. package/src/app/[variants]/(main)/chat/(workspace)/@topic/features/TopicListContent/ThreadItem/Content.tsx +5 -5
  10. package/src/app/[variants]/(main)/chat/(workspace)/@topic/features/TopicListContent/TopicItem/DefaultContent.tsx +3 -6
  11. package/src/app/[variants]/(main)/chat/(workspace)/@topic/features/TopicListContent/TopicItem/TopicContent.tsx +4 -5
  12. package/src/app/[variants]/(main)/chat/@session/features/SessionSearchBar.tsx +11 -5
  13. package/src/app/[variants]/(main)/files/(content)/@menu/features/KnowledgeBase/Item/Content.tsx +4 -6
  14. package/src/app/[variants]/(main)/files/(content)/NotSupportClient.tsx +6 -5
  15. package/src/app/[variants]/(main)/files/[id]/Header.tsx +5 -5
  16. package/src/app/[variants]/(main)/repos/[id]/evals/dataset/DatasetDetail/index.tsx +3 -3
  17. package/src/app/[variants]/(main)/repos/[id]/evals/evaluation/EvaluationList/index.tsx +4 -3
  18. package/src/app/[variants]/(main)/repos/[id]/features/Menu/Head/index.tsx +4 -2
  19. package/src/app/[variants]/(main)/settings/llm/components/ProviderModelList/CustomModelOption.tsx +5 -5
  20. package/src/app/[variants]/(main)/settings/llm/components/ProviderModelList/ModelFetcher.tsx +3 -4
  21. package/src/app/[variants]/(main)/settings/llm/components/ProviderModelList/Option.tsx +3 -4
  22. package/src/app/[variants]/(main)/settings/provider/(list)/ProviderGrid/Card.tsx +5 -12
  23. package/src/app/[variants]/(main)/settings/provider/(list)/ProviderGrid/index.tsx +7 -8
  24. package/src/app/[variants]/(main)/settings/provider/ProviderMenu/List.tsx +5 -6
  25. package/src/app/[variants]/(main)/settings/provider/features/ModelList/DisabledModels.tsx +3 -4
  26. package/src/app/[variants]/(main)/settings/provider/features/ModelList/EnabledModelList/index.tsx +5 -6
  27. package/src/app/[variants]/(main)/settings/provider/features/ModelList/ModelItem.tsx +4 -6
  28. package/src/app/[variants]/(main)/settings/provider/features/ModelList/ModelTitle/index.tsx +6 -6
  29. package/src/app/[variants]/(main)/settings/provider/features/ModelList/SearchResult.tsx +3 -4
  30. package/src/app/[variants]/(main)/settings/sync/features/DeviceInfo/DeviceName.tsx +2 -3
  31. package/src/app/[variants]/(main)/settings/sync/features/DeviceInfo/index.tsx +3 -3
  32. package/src/app/[variants]/(main)/settings/sync/features/WebRTC/index.tsx +4 -4
  33. package/src/app/[variants]/oauth/consent/[uid]/ClientError.tsx +4 -6
  34. package/src/app/[variants]/oauth/consent/[uid]/Consent.tsx +7 -8
  35. package/src/app/[variants]/oauth/consent/[uid]/Login.tsx +4 -6
  36. package/src/app/[variants]/oauth/handoff/Client.tsx +6 -6
  37. package/src/components/InitProgress/index.tsx +3 -3
  38. package/src/components/Loading/CircleLoading/index.tsx +3 -4
  39. package/src/components/ModelSelect/index.tsx +3 -6
  40. package/src/components/StatisticCard/TitleWithPercentage.tsx +4 -7
  41. package/src/components/StatisticCard/index.tsx +6 -7
  42. package/src/features/AgentSetting/AgentPlugin/index.tsx +4 -3
  43. package/src/features/ChatInput/Desktop/FilePreview/FileItem/index.tsx +3 -4
  44. package/src/features/ChatInput/components/UploadDetail/UploadStatus.tsx +10 -10
  45. package/src/features/ChatInput/components/UploadDetail/index.tsx +3 -3
  46. package/src/features/Conversation/Messages/Assistant/FileChunks/Item/index.tsx +2 -3
  47. package/src/features/Conversation/Messages/User/BelowMessage.tsx +3 -4
  48. package/src/features/Conversation/Messages/User/FileListViewer/Item.tsx +3 -3
  49. package/src/features/Conversation/components/History/index.tsx +2 -3
  50. package/src/features/DataImporter/ImportDetail.tsx +2 -4
  51. package/src/features/ElectronTitlebar/Connection/Waiting.tsx +3 -6
  52. package/src/features/FileManager/FileList/EmptyStatus.tsx +4 -4
  53. package/src/features/FileManager/FileList/index.tsx +3 -3
  54. package/src/features/FileManager/UploadDock/Item.tsx +11 -11
  55. package/src/features/FileManager/UploadDock/index.tsx +3 -4
  56. package/src/features/FileManager/index.tsx +3 -5
  57. package/src/tools/local-system/Render/ReadLocalFile/ReadFileView.tsx +5 -6
  58. package/src/tools/web-browsing/Portal/PageContent/index.tsx +4 -7
  59. package/src/tools/web-browsing/Portal/Search/ResultList/SearchItem/TitleExtra.tsx +3 -4
  60. package/src/tools/web-browsing/Portal/Search/ResultList/SearchItem/Video.tsx +4 -3
  61. package/src/tools/web-browsing/Portal/Search/ResultList/SearchItem/index.tsx +3 -3
  62. package/src/tools/web-browsing/Render/PageContent/Result.tsx +4 -6
  63. package/src/tools/web-browsing/Render/Search/SearchResult/SearchResultItem.tsx +3 -3
  64. package/src/tools/web-browsing/components/SearchBar.tsx +7 -7
@@ -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
- <Typography.Text style={{ fontSize: 16, fontWeight: 'bold' }}>
27
+ <Text strong style={{ fontSize: 16 }}>
29
28
  {t('list.title.enabled')}
30
- </Typography.Text>
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
- <Typography.Text style={{ fontSize: 18, fontWeight: 'bold' }}>
43
+ <Text strong style={{ fontSize: 18 }}>
45
44
  {t('list.title.enabled')}
46
- </Typography.Text>
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
- <Typography.Text style={{ fontSize: 18, fontWeight: 'bold' }}>
56
+ <Text strong style={{ fontSize: 18 }}>
58
57
  {t('list.title.disabled')}
59
- </Typography.Text>
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
- <Typography.Text style={{ fontSize: 12 }} type={'secondary'}>
41
+ <Text style={{ fontSize: 12 }} type={'secondary'}>
43
42
  {t('menu.list.enabled')}
44
- </Typography.Text>
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
- <Typography.Text style={{ fontSize: 12, marginTop: 8 }} type={'secondary'}>
65
+ <Text style={{ fontSize: 12, marginTop: 8 }} type={'secondary'}>
67
66
  {t('menu.list.disabled')}
68
- </Typography.Text>
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
- <Typography.Text style={{ fontSize: 12, marginTop: 8 }} type={'secondary'}>
24
+ <Text style={{ fontSize: 12, marginTop: 8 }} type={'secondary'}>
26
25
  {t('providerModels.list.disabled')}
27
- </Typography.Text>
26
+ </Text>
28
27
  {displayModels.map((item) => (
29
28
  <ModelItem {...item} key={item.id} />
30
29
  ))}
@@ -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
- <Typography.Text style={{ fontSize: 12, marginTop: 8 }} type={'secondary'}>
26
+ <Text style={{ fontSize: 12, marginTop: 8 }} type={'secondary'}>
28
27
  {t('providerModels.list.enabled')}
29
- </Typography.Text>
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
- <Typography.Text style={{ fontSize: 12 }} type={'secondary'}>
68
+ <Text style={{ fontSize: 12 }} type={'secondary'}>
70
69
  {t('providerModels.list.enabledEmpty')}
71
- </Typography.Text>
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, Typography } from 'antd';
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
- <Typography.Text
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
- </Typography.Text>
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, Typography } from 'antd';
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
- <Typography.Text style={{ fontSize: 16, fontWeight: 'bold' }}>
68
+ <Text strong style={{ fontSize: 16 }}>
69
69
  {t('providerModels.list.title')}
70
- </Typography.Text>
70
+ </Text>
71
71
 
72
72
  {isLoading ? (
73
73
  <Skeleton.Button active style={{ height: 22 }} />
74
74
  ) : (
75
- <Typography.Text style={{ fontSize: 12 }} type={'secondary'}>
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
- </Typography.Text>
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
- <Typography.Text style={{ fontSize: 12, marginTop: 8 }} type={'secondary'}>
28
+ <Text style={{ fontSize: 12, marginTop: 8 }} type={'secondary'}>
30
29
  {t('providerModels.list.searchResult', { count: filteredModels.length })}
31
- </Typography.Text>
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
- <Typography.Text type={'secondary'}>{t('sync.device.deviceName.hint')}</Typography.Text>
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 { Typography } from 'antd';
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
- <Typography style={{ fontSize: 18, fontWeight: 'bold' }}>
68
+ <Text strong style={{ fontSize: 18 }}>
69
69
  {t('sync.device.title')}
70
- </Typography>
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, Typography } from 'antd';
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
- <Typography.Text style={{ fontWeight: 'normal' }} type={'secondary'}>
83
+ <Text style={{ fontWeight: 'normal' }} type={'secondary'}>
84
84
  {t('sync.webrtc.desc')}
85
- </Typography.Text>
85
+ </Text>
86
86
  </Flexbox>
87
87
  ),
88
88
  };
@@ -1,6 +1,6 @@
1
1
  'use client';
2
2
 
3
- import { Typography } from 'antd';
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
- <Title level={2} style={{ color: 'inherit' }}>
33
+ <Text as={'h2'} style={{ color: 'inherit' }}>
36
34
  {error.title}
37
- </Title>
38
- <Paragraph style={{ color: 'inherit' }}>{error.message}</Paragraph>
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, Typography } from 'antd';
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
- <Title className={styles.title} level={3}>
134
+ <Text as={'h3'} className={styles.title}>
136
135
  {t('consent.title', { clientName: clientDisplayName })}
137
- </Title>
136
+ </Text>
138
137
  </Flexbox>
139
138
  <Card className={styles.card}>
140
139
  <Flexbox gap={8}>
141
140
  <Flexbox gap={12}>
142
- <Paragraph>{t('consent.description', { clientName: clientDisplayName })}</Paragraph>
141
+ <Text>{t('consent.description', { clientName: clientDisplayName })}</Text>
143
142
 
144
143
  <div className={styles.scopes}>
145
- <Paragraph type={'secondary'}>{t('consent.permissionsTitle')}</Paragraph>
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, Typography } from 'antd';
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
- <Title className={styles.title} level={3}>
76
+ <Text as={'h3'} className={styles.title}>
79
77
  {titleText}
80
- </Title>
78
+ </Text>
81
79
 
82
80
  <Card className={styles.card}>
83
81
  <Flexbox gap={64}>
@@ -1,14 +1,13 @@
1
1
  'use client';
2
2
 
3
- import { Spin, Typography } from 'antd';
3
+ import { Text } from '@lobehub/ui';
4
+ import { Spin } from 'antd';
4
5
  import { createStyles } from 'antd-style';
5
6
  import { useSearchParams } from 'next/navigation';
6
7
  import React, { useEffect, useState } from 'react';
7
8
  import { useTranslation } from 'react-i18next';
8
9
  import { Center, Flexbox } from 'react-layout-kit';
9
10
 
10
- const { Title, Paragraph } = Typography;
11
-
12
11
  const useStyles = createStyles(({ css, token }) => ({
13
12
  container: css`
14
13
  width: 100%;
@@ -30,6 +29,7 @@ const useStyles = createStyles(({ css, token }) => ({
30
29
  `,
31
30
  title: css`
32
31
  margin-block-end: ${token.marginLG}px;
32
+ font-size: 24px;
33
33
  `,
34
34
  }));
35
35
 
@@ -86,10 +86,10 @@ const AuthHandoffPage = () => {
86
86
  <Center className={styles.container} gap={12}>
87
87
  {!isError && <Spin size="large" />}
88
88
  <Flexbox align="center" className={styles.content} gap={16}>
89
- <Title className={styles.title} level={3}>
89
+ <Text as={'h3'} className={styles.title}>
90
90
  {status.title}
91
- </Title>
92
- <Paragraph className={styles.message}>{status.desc}</Paragraph>
91
+ </Text>
92
+ <Text className={styles.message}>{status.desc}</Text>
93
93
  </Flexbox>
94
94
  </Center>
95
95
  );
@@ -1,5 +1,5 @@
1
- import { Icon } from '@lobehub/ui';
2
- import { Progress, Typography } from 'antd';
1
+ import { Icon, Text } from '@lobehub/ui';
2
+ import { Progress } from 'antd';
3
3
  import { useTheme } from 'antd-style';
4
4
  import { Loader2 } from 'lucide-react';
5
5
  import { ReactNode, memo } from 'react';
@@ -33,7 +33,7 @@ const InitProgress = memo<InitingProps>(({ activeStage, stages }) => {
33
33
  />
34
34
  <Flexbox align={'center'} gap={4} horizontal>
35
35
  {stage?.icon ? stage?.icon : <Icon icon={Loader2} spin />}
36
- <Typography.Text type={'secondary'}>{stage?.text}</Typography.Text>
36
+ <Text type={'secondary'}>{stage?.text}</Text>
37
37
  </Flexbox>
38
38
  </Center>
39
39
  );
@@ -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 { LoaderCircle } from 'lucide-react';
6
5
  import { useTranslation } from 'react-i18next';
7
6
  import { Center, Flexbox } from 'react-layout-kit';
@@ -14,9 +13,9 @@ export default () => {
14
13
  <div>
15
14
  <Icon icon={LoaderCircle} size={'large'} spin />
16
15
  </div>
17
- <Typography.Text style={{ letterSpacing: '0.1em' }} type={'secondary'}>
16
+ <Text style={{ letterSpacing: '0.1em' }} type={'secondary'}>
18
17
  {t('loading')}
19
- </Typography.Text>
18
+ </Text>
20
19
  </Flexbox>
21
20
  </Center>
22
21
  );
@@ -1,6 +1,5 @@
1
1
  import { IconAvatarProps, ModelIcon, ProviderIcon } from '@lobehub/icons';
2
- import { Avatar, Icon, Tag, Tooltip } from '@lobehub/ui';
3
- import { Typography } from 'antd';
2
+ import { Avatar, Icon, Tag, Text, Tooltip } from '@lobehub/ui';
4
3
  import { createStyles, useResponsive } from 'antd-style';
5
4
  import {
6
5
  Infinity,
@@ -188,11 +187,9 @@ export const ModelItemRender = memo<ModelItemRenderProps>(({ showInfoTag = true,
188
187
  style={{ flexShrink: 1, minWidth: 0, overflow: 'hidden' }}
189
188
  >
190
189
  <ModelIcon model={model.id} size={20} />
191
- <Typography.Text
192
- style={mobile ? { maxWidth: '60vw', overflowX: 'auto', whiteSpace: 'nowrap' } : {}}
193
- >
190
+ <Text style={mobile ? { maxWidth: '60vw', overflowX: 'auto', whiteSpace: 'nowrap' } : {}}>
194
191
  {model.displayName || model.id}
195
- </Typography.Text>
192
+ </Text>
196
193
  </Flexbox>
197
194
  {showInfoTag && <ModelInfoTags {...model} />}
198
195
  </Flexbox>
@@ -1,13 +1,10 @@
1
- import { Tag } from '@lobehub/ui';
2
- import { Typography } from 'antd';
1
+ import { Tag, Text } from '@lobehub/ui';
3
2
  import { useTheme } from 'antd-style';
4
3
  import { CSSProperties, memo } from 'react';
5
4
  import { Flexbox } from 'react-layout-kit';
6
5
 
7
6
  import { calcGrowthPercentage } from './growthPercentage';
8
7
 
9
- const { Title } = Typography;
10
-
11
8
  interface TitleWithPercentageProps {
12
9
  count?: number;
13
10
  inverseColor?: boolean;
@@ -43,9 +40,9 @@ const TitleWithPercentage = memo<TitleWithPercentageProps>(
43
40
  position: 'inherit',
44
41
  }}
45
42
  >
46
- <Title
43
+ <Text
44
+ as={'h2'}
47
45
  ellipsis={{ rows: 1, tooltip: title }}
48
- level={2}
49
46
  style={{
50
47
  fontSize: 'inherit',
51
48
  fontWeight: 'inherit',
@@ -55,7 +52,7 @@ const TitleWithPercentage = memo<TitleWithPercentageProps>(
55
52
  }}
56
53
  >
57
54
  {title}
58
- </Title>
55
+ </Text>
59
56
  {count && prvCount && percentage && percentage !== 0 ? (
60
57
  <Tag
61
58
  style={{
@@ -2,13 +2,12 @@ import {
2
2
  StatisticCard as AntdStatisticCard,
3
3
  StatisticCardProps as AntdStatisticCardProps,
4
4
  } from '@ant-design/pro-components';
5
- import { Spin, Typography } from 'antd';
5
+ import { Text } from '@lobehub/ui';
6
+ import { Spin } from 'antd';
6
7
  import { createStyles, useResponsive } from 'antd-style';
7
8
  import { adjustHue } from 'polished';
8
9
  import { memo } from 'react';
9
10
 
10
- const { Title } = Typography;
11
-
12
11
  const useStyles = createStyles(
13
12
  ({ isDarkMode, css, token, prefixCls, responsive }, highlight: string = '#000') => ({
14
13
  card: css`
@@ -182,9 +181,9 @@ const StatisticCard = memo<StatisticCardProps>(
182
181
  extra={loading ? <Spin percent={'auto'} size={'small'} /> : extra}
183
182
  title={
184
183
  typeof title === 'string' ? (
185
- <Title
186
- ellipsis={{ rows: 1, tooltip: title }}
187
- level={2}
184
+ <Text
185
+ as={'h2'}
186
+ ellipsis={{ rows: 1, tooltip: true }}
188
187
  style={{
189
188
  fontSize: 'inherit',
190
189
  fontWeight: 'inherit',
@@ -194,7 +193,7 @@ const StatisticCard = memo<StatisticCardProps>(
194
193
  }}
195
194
  >
196
195
  {title}
197
- </Title>
196
+ </Text>
198
197
  ) : (
199
198
  title
200
199
  )
@@ -1,9 +1,10 @@
1
1
  'use client';
2
2
 
3
3
  import { Avatar, Button, Form, type FormGroupItemType, Tag, Tooltip } from '@lobehub/ui';
4
- import { Empty, Space, Switch, Typography } from 'antd';
4
+ import { Empty, Space, Switch } from 'antd';
5
5
  import isEqual from 'fast-deep-equal';
6
6
  import { LucideTrash2, Store } from 'lucide-react';
7
+ import Link from 'next/link';
7
8
  import { memo, useState } from 'react';
8
9
  import { Trans, useTranslation } from 'react-i18next';
9
10
  import { Center, Flexbox } from 'react-layout-kit';
@@ -130,7 +131,7 @@ const AgentPlugin = memo(() => {
130
131
  description={
131
132
  <Trans i18nKey={'plugin.empty'} ns={'setting'}>
132
133
  暂无安装插件,
133
- <Typography.Link
134
+ <Link
134
135
  href={'/'}
135
136
  onClick={(e) => {
136
137
  e.preventDefault();
@@ -138,7 +139,7 @@ const AgentPlugin = memo(() => {
138
139
  }}
139
140
  >
140
141
  前往插件市场
141
- </Typography.Link>
142
+ </Link>
142
143
  安装
143
144
  </Trans>
144
145
  }
@@ -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 { Trash2Icon } from 'lucide-react';
5
4
  import { memo } from 'react';
@@ -64,9 +63,9 @@ const FileItem = memo<FileItemProps>((props) => {
64
63
  <Content {...props} />
65
64
  </Center>
66
65
  <Flexbox flex={1} gap={4} style={{ paddingBottom: 4, paddingInline: 4 }}>
67
- <Typography.Text ellipsis={{ tooltip: true }} style={{ fontSize: 12, maxWidth: 100 }}>
66
+ <Text ellipsis={{ tooltip: true }} style={{ fontSize: 12, maxWidth: 100 }}>
68
67
  {file.name}
69
- </Typography.Text>
68
+ </Text>
70
69
 
71
70
  <UploadDetail size={file.size} status={status} tasks={tasks} uploadState={uploadState} />
72
71
  </Flexbox>