@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.
Files changed (85) hide show
  1. package/.cursor/rules/debug-usage.mdc +84 -0
  2. package/.cursor/rules/desktop-controller-tests.mdc +188 -0
  3. package/.cursor/rules/desktop-feature-implementation.mdc +1 -1
  4. package/CHANGELOG.md +34 -0
  5. package/README.md +1 -1
  6. package/changelog/v1.json +10 -0
  7. package/package.json +6 -13
  8. package/src/app/[variants]/(auth)/next-auth/signin/AuthSignInBox.tsx +7 -7
  9. package/src/app/[variants]/(main)/chat/(workspace)/@conversation/features/ChatInput/Mobile/Files/FileItem/File.tsx +2 -3
  10. package/src/app/[variants]/(main)/chat/(workspace)/@conversation/features/ChatList/ChatItem/Thread.tsx +3 -3
  11. package/src/app/[variants]/(main)/chat/(workspace)/@topic/features/TopicListContent/SearchResult/index.tsx +2 -2
  12. package/src/app/[variants]/(main)/chat/(workspace)/@topic/features/TopicListContent/ThreadItem/Content.tsx +5 -5
  13. package/src/app/[variants]/(main)/chat/(workspace)/@topic/features/TopicListContent/TopicItem/DefaultContent.tsx +3 -6
  14. package/src/app/[variants]/(main)/chat/(workspace)/@topic/features/TopicListContent/TopicItem/TopicContent.tsx +4 -5
  15. package/src/app/[variants]/(main)/chat/@session/features/SessionSearchBar.tsx +11 -5
  16. package/src/app/[variants]/(main)/files/(content)/@menu/features/KnowledgeBase/Item/Content.tsx +4 -6
  17. package/src/app/[variants]/(main)/files/(content)/NotSupportClient.tsx +6 -5
  18. package/src/app/[variants]/(main)/files/[id]/Header.tsx +5 -5
  19. package/src/app/[variants]/(main)/repos/[id]/evals/dataset/DatasetDetail/index.tsx +3 -3
  20. package/src/app/[variants]/(main)/repos/[id]/evals/evaluation/EvaluationList/index.tsx +4 -3
  21. package/src/app/[variants]/(main)/repos/[id]/features/Menu/Head/index.tsx +4 -2
  22. package/src/app/[variants]/(main)/settings/llm/components/ProviderModelList/CustomModelOption.tsx +5 -5
  23. package/src/app/[variants]/(main)/settings/llm/components/ProviderModelList/ModelFetcher.tsx +3 -4
  24. package/src/app/[variants]/(main)/settings/llm/components/ProviderModelList/Option.tsx +3 -4
  25. package/src/app/[variants]/(main)/settings/provider/(list)/ProviderGrid/Card.tsx +5 -12
  26. package/src/app/[variants]/(main)/settings/provider/(list)/ProviderGrid/index.tsx +7 -8
  27. package/src/app/[variants]/(main)/settings/provider/ProviderMenu/List.tsx +5 -6
  28. package/src/app/[variants]/(main)/settings/provider/features/ModelList/DisabledModels.tsx +3 -4
  29. package/src/app/[variants]/(main)/settings/provider/features/ModelList/EnabledModelList/index.tsx +5 -6
  30. package/src/app/[variants]/(main)/settings/provider/features/ModelList/ModelItem.tsx +4 -6
  31. package/src/app/[variants]/(main)/settings/provider/features/ModelList/ModelTitle/index.tsx +6 -6
  32. package/src/app/[variants]/(main)/settings/provider/features/ModelList/SearchResult.tsx +3 -4
  33. package/src/app/[variants]/(main)/settings/sync/features/DeviceInfo/DeviceName.tsx +2 -3
  34. package/src/app/[variants]/(main)/settings/sync/features/DeviceInfo/index.tsx +3 -3
  35. package/src/app/[variants]/(main)/settings/sync/features/WebRTC/index.tsx +4 -4
  36. package/src/app/[variants]/oauth/consent/[uid]/ClientError.tsx +4 -6
  37. package/src/app/[variants]/oauth/consent/[uid]/Consent.tsx +7 -8
  38. package/src/app/[variants]/oauth/consent/[uid]/Login.tsx +4 -6
  39. package/src/app/[variants]/oauth/handoff/Client.tsx +6 -6
  40. package/src/components/InitProgress/index.tsx +3 -3
  41. package/src/components/Loading/CircleLoading/index.tsx +3 -4
  42. package/src/components/ModelSelect/index.tsx +3 -6
  43. package/src/components/StatisticCard/TitleWithPercentage.tsx +4 -7
  44. package/src/components/StatisticCard/index.tsx +6 -7
  45. package/src/config/modelProviders/index.ts +0 -1
  46. package/src/features/AgentSetting/AgentPlugin/index.tsx +4 -3
  47. package/src/features/ChatInput/Desktop/FilePreview/FileItem/index.tsx +3 -4
  48. package/src/features/ChatInput/components/UploadDetail/UploadStatus.tsx +10 -10
  49. package/src/features/ChatInput/components/UploadDetail/index.tsx +3 -3
  50. package/src/features/Conversation/Messages/Assistant/FileChunks/Item/index.tsx +2 -3
  51. package/src/features/Conversation/Messages/User/BelowMessage.tsx +3 -4
  52. package/src/features/Conversation/Messages/User/FileListViewer/Item.tsx +3 -3
  53. package/src/features/Conversation/components/History/index.tsx +2 -3
  54. package/src/features/DataImporter/ImportDetail.tsx +2 -4
  55. package/src/features/ElectronTitlebar/Connection/Waiting.tsx +3 -6
  56. package/src/features/FileManager/FileList/EmptyStatus.tsx +4 -4
  57. package/src/features/FileManager/FileList/index.tsx +3 -3
  58. package/src/features/FileManager/UploadDock/Item.tsx +11 -11
  59. package/src/features/FileManager/UploadDock/index.tsx +3 -4
  60. package/src/features/FileManager/index.tsx +3 -5
  61. package/src/features/InitClientDB/features/DatabaseRepair/Backup.tsx +3 -5
  62. package/src/features/InitClientDB/features/DatabaseRepair/Repair.tsx +2 -4
  63. package/src/features/KnowledgeBaseModal/AssignKnowledgeBase/Item/index.tsx +5 -7
  64. package/src/features/Portal/Artifacts/Header.tsx +4 -4
  65. package/src/features/Portal/FilePreview/Header.tsx +4 -4
  66. package/src/features/Portal/Home/Body/Files/FileList/Item.tsx +3 -3
  67. package/src/features/Portal/Home/Body/Files/FileList/index.tsx +2 -3
  68. package/src/features/Portal/Home/Body/Files/index.tsx +3 -3
  69. package/src/features/Portal/Home/Body/Plugins/ArtifactList/Item/index.tsx +3 -4
  70. package/src/features/Portal/Home/Body/Plugins/ArtifactList/index.tsx +3 -3
  71. package/src/features/Portal/Home/Body/Plugins/index.tsx +3 -3
  72. package/src/features/Portal/Home/Title.tsx +3 -3
  73. package/src/features/Portal/MessageDetail/Header.tsx +3 -3
  74. package/src/features/Portal/Plugins/Header.tsx +5 -6
  75. package/src/features/Portal/Thread/Header/Active.tsx +3 -4
  76. package/src/features/Portal/Thread/Header/New.tsx +4 -4
  77. package/src/features/SyncStatusInspector/EnableSync.tsx +5 -9
  78. package/src/tools/local-system/Render/ReadLocalFile/ReadFileView.tsx +5 -6
  79. package/src/tools/web-browsing/Portal/PageContent/index.tsx +4 -7
  80. package/src/tools/web-browsing/Portal/Search/ResultList/SearchItem/TitleExtra.tsx +3 -4
  81. package/src/tools/web-browsing/Portal/Search/ResultList/SearchItem/Video.tsx +4 -3
  82. package/src/tools/web-browsing/Portal/Search/ResultList/SearchItem/index.tsx +3 -3
  83. package/src/tools/web-browsing/Render/PageContent/Result.tsx +4 -6
  84. package/src/tools/web-browsing/Render/Search/SearchResult/SearchResultItem.tsx +3 -3
  85. package/src/tools/web-browsing/components/SearchBar.tsx +7 -7
@@ -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
  )
@@ -121,7 +121,6 @@ export const DEFAULT_MODEL_PROVIDER_LIST = [
121
121
  GoogleProvider,
122
122
  VertexAIProvider,
123
123
  DeepSeekProvider,
124
- PPIOProvider,
125
124
  HuggingFaceProvider,
126
125
  OpenRouterProvider,
127
126
  CloudflareProvider,
@@ -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>
@@ -1,6 +1,6 @@
1
1
  import { CheckCircleFilled } from '@ant-design/icons';
2
- import { Icon } from '@lobehub/ui';
3
- import { Progress, Typography } from 'antd';
2
+ import { Icon, Text } from '@lobehub/ui';
3
+ import { Progress } from 'antd';
4
4
  import { useTheme } from 'antd-style';
5
5
  import { Loader2Icon } from 'lucide-react';
6
6
  import { memo } from 'react';
@@ -26,9 +26,9 @@ const UploadStatus = memo<UploadStateProps>(({ status, size, uploadState }) => {
26
26
  return (
27
27
  <Flexbox align={'center'} gap={4} horizontal>
28
28
  <Icon icon={Loader2Icon} size={12} spin />
29
- <Typography.Text style={{ fontSize: 12 }} type={'secondary'}>
29
+ <Text style={{ fontSize: 12 }} type={'secondary'}>
30
30
  {t('upload.preview.status.pending')}
31
- </Typography.Text>
31
+ </Text>
32
32
  </Flexbox>
33
33
  );
34
34
  }
@@ -37,9 +37,9 @@ const UploadStatus = memo<UploadStateProps>(({ status, size, uploadState }) => {
37
37
  return (
38
38
  <Flexbox align={'center'} gap={4} horizontal>
39
39
  <Progress percent={uploadState?.progress} size={14} type="circle" />
40
- <Typography.Text style={{ fontSize: 12 }} type={'secondary'}>
40
+ <Text style={{ fontSize: 12 }} type={'secondary'}>
41
41
  {formatSize(size * ((uploadState?.progress || 0) / 100), 0)} / {formatSize(size)}
42
- </Typography.Text>
42
+ </Text>
43
43
  </Flexbox>
44
44
  );
45
45
  }
@@ -48,9 +48,9 @@ const UploadStatus = memo<UploadStateProps>(({ status, size, uploadState }) => {
48
48
  return (
49
49
  <Flexbox align={'center'} gap={4} horizontal>
50
50
  <Progress percent={uploadState?.progress} size={14} type="circle" />
51
- <Typography.Text style={{ fontSize: 12 }} type={'secondary'}>
51
+ <Text style={{ fontSize: 12 }} type={'secondary'}>
52
52
  {formatSize(size)}
53
- </Typography.Text>
53
+ </Text>
54
54
  </Flexbox>
55
55
  );
56
56
  }
@@ -59,9 +59,9 @@ const UploadStatus = memo<UploadStateProps>(({ status, size, uploadState }) => {
59
59
  return (
60
60
  <Flexbox align={'center'} gap={4} horizontal>
61
61
  <CheckCircleFilled style={{ color: theme.colorSuccess, fontSize: 12 }} />
62
- <Typography.Text style={{ fontSize: 12 }} type={'secondary'}>
62
+ <Text style={{ fontSize: 12 }} type={'secondary'}>
63
63
  {formatSize(size)}
64
- </Typography.Text>
64
+ </Text>
65
65
  </Flexbox>
66
66
  );
67
67
  }
@@ -1,4 +1,4 @@
1
- import { Typography } from 'antd';
1
+ import { Text } from '@lobehub/ui';
2
2
  import { createStyles } from 'antd-style';
3
3
  import { memo } from 'react';
4
4
  import { useTranslation } from 'react-i18next';
@@ -34,9 +34,9 @@ const UploadDetail = memo<UploadDetailProps>(({ uploadState, status, size, tasks
34
34
  <Flexbox align={'center'} gap={8} height={22} horizontal>
35
35
  <UploadStatus size={size} status={status} uploadState={uploadState} />
36
36
  {!!tasks && Object.keys(tasks).length === 0 ? (
37
- <Typography.Text style={{ fontSize: 12 }} type={'secondary'}>
37
+ <Text style={{ fontSize: 12 }} type={'secondary'}>
38
38
  {t('upload.preview.prepareTasks')}
39
- </Typography.Text>
39
+ </Text>
40
40
  ) : (
41
41
  <div>
42
42
  <FileParsingStatus {...tasks} className={styles.status} hideEmbeddingButton />
@@ -1,5 +1,4 @@
1
- import { Tooltip } from '@lobehub/ui';
2
- import { Typography } from 'antd';
1
+ import { Text, Tooltip } from '@lobehub/ui';
3
2
  import { memo } from 'react';
4
3
  import { Center, Flexbox } from 'react-layout-kit';
5
4
 
@@ -33,7 +32,7 @@ const ChunkItem = memo<ChunkItemProps>(({ id, fileId, similarity, text, filename
33
32
  >
34
33
  <FileIcon fileName={filename} fileType={fileType} size={20} variant={'raw'} />
35
34
  <Flexbox gap={12} horizontal justify={'space-between'} style={{ maxWidth: 200 }}>
36
- <Typography.Text ellipsis={{ tooltip: false }}>{filename}</Typography.Text>
35
+ <Text ellipsis>{filename}</Text>
37
36
  {/*<Typography.Text*/}
38
37
  {/* ellipsis={{ suffix: '...' }}*/}
39
38
  {/* style={{ fontSize: 12, lineHeight: 1 }}*/}
@@ -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 isEqual from 'fast-deep-equal';
5
4
  import { RotateCwIcon, Trash2 } from 'lucide-react';
@@ -50,9 +49,9 @@ export const UserBelowMessage = memo<ChatMessage>(({ ragQuery, content, id }) =>
50
49
  !isEqual(ragQuery, content) && (
51
50
  <Flexbox className={styles.container}>
52
51
  <Flexbox align={'center'} className={styles.content} gap={4} horizontal>
53
- <Typography.Text style={{ fontSize: 12 }} type={'secondary'}>
52
+ <Text style={{ fontSize: 12 }} type={'secondary'}>
54
53
  {ragQuery}
55
- </Typography.Text>
54
+ </Text>
56
55
  </Flexbox>
57
56
  <Flexbox className={styles.action} horizontal>
58
57
  <ActionIcon
@@ -1,4 +1,4 @@
1
- import { Typography } from 'antd';
1
+ import { Text } from '@lobehub/ui';
2
2
  import { createStyles } from 'antd-style';
3
3
  import { memo } from 'react';
4
4
  import { Flexbox } from 'react-layout-kit';
@@ -43,8 +43,8 @@ const FileItem = memo<ChatFileItem>(({ id, fileType, size, name }) => {
43
43
  >
44
44
  <FileIcon fileName={name} fileType={fileType} />
45
45
  <Flexbox style={{ overflow: 'hidden' }}>
46
- <Typography.Text ellipsis>{name}</Typography.Text>
47
- <Typography.Text type={'secondary'}>{formatSize(size)}</Typography.Text>
46
+ <Text ellipsis>{name}</Text>
47
+ <Text type={'secondary'}>{formatSize(size)}</Text>
48
48
  </Flexbox>
49
49
  </Flexbox>
50
50
  );
@@ -1,6 +1,5 @@
1
1
  import { ModelTag } from '@lobehub/icons';
2
- import { Icon, Markdown } from '@lobehub/ui';
3
- import { Typography } from 'antd';
2
+ import { Icon, Markdown, Text } from '@lobehub/ui';
4
3
  import { createStyles } from 'antd-style';
5
4
  import { ScrollText } from 'lucide-react';
6
5
  import { memo } from 'react';
@@ -50,7 +49,7 @@ const History = memo(() => {
50
49
  <Center height={20} width={20}>
51
50
  <Icon icon={ScrollText} size={16} style={{ color: theme.colorTextDescription }} />
52
51
  </Center>
53
- <Typography.Text type={'secondary'}>{t('historySummary')}</Typography.Text>
52
+ <Text type={'secondary'}>{t('historySummary')}</Text>
54
53
  {model && (
55
54
  <div>
56
55
  <ModelTag model={model} />
@@ -1,7 +1,7 @@
1
1
  'use client';
2
2
 
3
- import { Button, Modal } from '@lobehub/ui';
4
- import { Table, Typography } from 'antd';
3
+ import { Button, Modal, Text } from '@lobehub/ui';
4
+ import { Table } from 'antd';
5
5
  import { createStyles } from 'antd-style';
6
6
  import { Info } from 'lucide-react';
7
7
  import { useState } from 'react';
@@ -10,8 +10,6 @@ import { Flexbox } from 'react-layout-kit';
10
10
 
11
11
  import { ImportPgDataStructure } from '@/types/export';
12
12
 
13
- const { Text } = Typography;
14
-
15
13
  const getNonEmptyTables = (data: ImportPgDataStructure) => {
16
14
  const result = [];
17
15
 
@@ -1,8 +1,7 @@
1
1
  'use client';
2
2
 
3
3
  import { useWatchBroadcast } from '@lobechat/electron-client-ipc';
4
- import { Button, Icon } from '@lobehub/ui';
5
- import { Typography } from 'antd';
4
+ import { Button, Icon, Text } from '@lobehub/ui';
6
5
  import { createStyles, cx, keyframes } from 'antd-style';
7
6
  import { WifiIcon } from 'lucide-react';
8
7
  import { memo } from 'react';
@@ -10,8 +9,6 @@ import { useTranslation } from 'react-i18next';
10
9
 
11
10
  import { useElectronStore } from '@/store/electron';
12
11
 
13
- const { Text, Title } = Typography;
14
-
15
12
  const airdropPulse = keyframes`
16
13
  0% {
17
14
  transform: translate(-50%, -50%) scale(0.8);
@@ -189,9 +186,9 @@ const WaitingOAuth = memo<WaitingOAuthProps>(({ setWaiting, setIsOpen }) => {
189
186
 
190
187
  <Icon className={styles.radarIcon} icon={WifiIcon} size={40} />
191
188
  </div>
192
- <Title className={styles.title} level={4}>
189
+ <Text as={'h4'} className={styles.title}>
193
190
  {t('waitingOAuth.title')}
194
- </Title>
191
+ </Text>
195
192
  <Text className={styles.description}>{t('waitingOAuth.description')}</Text>
196
193
  <Button onClick={handleCancel}>{t('waitingOAuth.cancel')}</Button>{' '}
197
194
  <Text className={styles.helpText}>{t('waitingOAuth.helpText')}</Text>
@@ -1,5 +1,5 @@
1
- import { FileTypeIcon, Icon } from '@lobehub/ui';
2
- import { Typography, Upload } from 'antd';
1
+ import { FileTypeIcon, Icon, Text } from '@lobehub/ui';
2
+ import { Upload } from 'antd';
3
3
  import { createStyles, useTheme } from 'antd-style';
4
4
  import { ArrowUpIcon, PlusIcon } from 'lucide-react';
5
5
  import { useTranslation } from 'react-i18next';
@@ -76,8 +76,8 @@ const EmptyStatus = ({ showKnowledgeBase, knowledgeBaseId }: EmptyStatusProps) =
76
76
  return (
77
77
  <Center gap={24} height={'100%'} style={{ paddingBottom: 100 }} width={'100%'}>
78
78
  <Flexbox justify={'center'} style={{ textAlign: 'center' }}>
79
- <Typography.Title level={4}>{t('FileManager.emptyStatus.title')}</Typography.Title>
80
- <Typography.Text type={'secondary'}>{t('FileManager.emptyStatus.or')}</Typography.Text>
79
+ <Text as={'h4'}>{t('FileManager.emptyStatus.title')}</Text>
80
+ <Text type={'secondary'}>{t('FileManager.emptyStatus.or')}</Text>
81
81
  </Flexbox>
82
82
  <Flexbox gap={12} horizontal>
83
83
  {showKnowledgeBase && (
@@ -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 { useQueryState } from 'nuqs';
6
6
  import { rgba } from 'polished';
@@ -109,9 +109,9 @@ const FileList = memo<FileListProps>(({ knowledgeBaseId, category }) => {
109
109
  components={{
110
110
  Footer: () => (
111
111
  <Center style={{ height: 64 }}>
112
- <Typography.Text style={{ fontSize: 12 }} type={'secondary'}>
112
+ <Text style={{ fontSize: 12 }} type={'secondary'}>
113
113
  {t('FileManager.bottom')}
114
- </Typography.Text>
114
+ </Text>
115
115
  </Center>
116
116
  ),
117
117
  }}
@@ -1,4 +1,4 @@
1
- import { Typography } from 'antd';
1
+ import { Text } from '@lobehub/ui';
2
2
  import { createStyles } from 'antd-style';
3
3
  import { ReactNode, memo, useMemo } from 'react';
4
4
  import { useTranslation } from 'react-i18next';
@@ -52,41 +52,41 @@ const UploadItem = memo<UploadItemProps>(({ file, status, uploadState }) => {
52
52
  ].filter(Boolean);
53
53
 
54
54
  return (
55
- <Typography.Text style={{ fontSize: 12 }} type={'secondary'}>
55
+ <Text style={{ fontSize: 12 }} type={'secondary'}>
56
56
  {uploadState?.progress ? formatSize(size * (uploadState.progress / 100)) : '-'}/
57
57
  {formatSize(size)}
58
58
  {textArray.length === 0 ? '' : ' · ' + textArray.join(' · ')}
59
- </Typography.Text>
59
+ </Text>
60
60
  );
61
61
  }
62
62
  case 'pending': {
63
63
  return (
64
- <Typography.Text style={{ fontSize: 12 }} type={'secondary'}>
64
+ <Text style={{ fontSize: 12 }} type={'secondary'}>
65
65
  {formatSize(size)} · {t('uploadDock.body.item.pending')}
66
- </Typography.Text>
66
+ </Text>
67
67
  );
68
68
  }
69
69
 
70
70
  case 'processing': {
71
71
  return (
72
- <Typography.Text style={{ fontSize: 12 }} type={'secondary'}>
72
+ <Text style={{ fontSize: 12 }} type={'secondary'}>
73
73
  {formatSize(size)} · {t('uploadDock.body.item.processing')}
74
- </Typography.Text>
74
+ </Text>
75
75
  );
76
76
  }
77
77
 
78
78
  case 'success': {
79
79
  return (
80
- <Typography.Text style={{ fontSize: 12 }} type={'secondary'}>
80
+ <Text style={{ fontSize: 12 }} type={'secondary'}>
81
81
  {formatSize(size)} · {t('uploadDock.body.item.done')}
82
- </Typography.Text>
82
+ </Text>
83
83
  );
84
84
  }
85
85
  case 'error': {
86
86
  return (
87
- <Typography.Text style={{ fontSize: 12 }} type={'danger'}>
87
+ <Text style={{ fontSize: 12 }} type={'danger'}>
88
88
  {formatSize(size)} · {t('uploadDock.body.item.error')}
89
- </Typography.Text>
89
+ </Text>
90
90
  );
91
91
  }
92
92
  default: {
@@ -1,6 +1,5 @@
1
1
  import { CheckCircleFilled, CloseCircleFilled } from '@ant-design/icons';
2
- import { ActionIcon, Icon } from '@lobehub/ui';
3
- import { Typography } from 'antd';
2
+ import { ActionIcon, Icon, Text } from '@lobehub/ui';
4
3
  import { createStyles } from 'antd-style';
5
4
  import isEqual from 'fast-deep-equal';
6
5
  import { UploadIcon, XIcon } from 'lucide-react';
@@ -149,7 +148,7 @@ const UploadDock = memo(() => {
149
148
  ))}
150
149
  </Flexbox>
151
150
  <Center style={{ height: 40, minHeight: 40 }}>
152
- <Typography.Text
151
+ <Text
153
152
  onClick={() => {
154
153
  setExpand(false);
155
154
  }}
@@ -157,7 +156,7 @@ const UploadDock = memo(() => {
157
156
  type={'secondary'}
158
157
  >
159
158
  {t('uploadDock.body.collapse')}
160
- </Typography.Text>
159
+ </Text>
161
160
  </Center>
162
161
  </Flexbox>
163
162
  ) : (
@@ -1,6 +1,6 @@
1
1
  'use client';
2
2
 
3
- import { Typography } from 'antd';
3
+ import { Text } from '@lobehub/ui';
4
4
  import dynamic from 'next/dynamic';
5
5
  import { memo } from 'react';
6
6
  import { Flexbox } from 'react-layout-kit';
@@ -21,11 +21,9 @@ const FileManager = memo<FileManagerProps>(({ title, knowledgeBaseId, category }
21
21
  <>
22
22
  <Header knowledgeBaseId={knowledgeBaseId} />
23
23
  <Flexbox gap={12} height={'100%'}>
24
- <Typography.Text
25
- style={{ fontSize: 16, fontWeight: 'bold', marginBlock: 16, marginInline: 24 }}
26
- >
24
+ <Text strong style={{ fontSize: 16, marginBlock: 16, marginInline: 24 }}>
27
25
  {title}
28
- </Typography.Text>
26
+ </Text>
29
27
  <FileList category={category} knowledgeBaseId={knowledgeBaseId} />
30
28
  </Flexbox>
31
29
  <UploadDock />
@@ -1,5 +1,5 @@
1
- import { Alert, Button } from '@lobehub/ui';
2
- import { App, Card, Typography } from 'antd';
1
+ import { Alert, Button, Text } from '@lobehub/ui';
2
+ import { App, Card } from 'antd';
3
3
  import { createStyles } from 'antd-style';
4
4
  import { AlertCircle } from 'lucide-react';
5
5
  import { useTranslation } from 'react-i18next';
@@ -7,8 +7,6 @@ import { Flexbox } from 'react-layout-kit';
7
7
 
8
8
  import { resetClientDatabase } from '@/database/client/db';
9
9
 
10
- const { Text, Paragraph } = Typography;
11
-
12
10
  const useStyles = createStyles(({ css, token }) => ({
13
11
  card: css`
14
12
  border-radius: ${token.borderRadiusLG}px;
@@ -27,7 +25,7 @@ const Backup = () => {
27
25
  extra={<Text type="secondary">{t('clientDB.solve.backup.desc')}</Text>}
28
26
  title={t('clientDB.solve.backup.title')}
29
27
  >
30
- <Paragraph>{t('clientDB.solve.backup.exportDesc')}</Paragraph>
28
+ <Text as={'p'}>{t('clientDB.solve.backup.exportDesc')}</Text>
31
29
  <Button block type={'primary'}>
32
30
  {t('clientDB.solve.backup.export')}
33
31
  </Button>
@@ -1,7 +1,7 @@
1
1
  'use client';
2
2
 
3
- import { Alert, Button, CodeEditor, Icon } from '@lobehub/ui';
4
- import { Card, List, Typography } from 'antd';
3
+ import { Alert, Button, CodeEditor, Icon, Text } from '@lobehub/ui';
4
+ import { Card, List } from 'antd';
5
5
  import { createStyles } from 'antd-style';
6
6
  import dayjs from 'dayjs';
7
7
  import isEqual from 'fast-deep-equal';
@@ -14,8 +14,6 @@ import { clientDB, updateMigrationRecord } from '@/database/client/db';
14
14
  import { useGlobalStore } from '@/store/global';
15
15
  import { clientDBSelectors } from '@/store/global/selectors';
16
16
 
17
- const { Text } = Typography;
18
-
19
17
  // 使用 antd-style 创建样式
20
18
  const useStyles = createStyles(({ css, token }) => ({
21
19
  actionBar: css`