Skip to content

🤯 LobeHub - Super-Agents on Your Team. Add super-agents to the chats your team already uses.They take on work by themselves and get better every week.

style: fix some style issues

canisminor19901b0b49cc1a34
diff --git a/package.json b/package.json
index 28fb6aa6b91..8fdcb41f8c6 100644
--- a/package.json
+++ b/package.json
@@ -192,11 +192,11 @@
"@lobehub/chat-plugin-sdk": "^1.32.4",
"@lobehub/chat-plugins-gateway": "^1.9.0",
"@lobehub/desktop-ipc-typings": "workspace:*",
- "@lobehub/editor": "^2.0.3",
+ "@lobehub/editor": "^2.0.5",
"@lobehub/icons": "^3.0.0",
"@lobehub/market-sdk": "^0.23.8",
"@lobehub/tts": "^3.0.0",
- "@lobehub/ui": "^3.3.5",
+ "@lobehub/ui": "^3.4.1",
"@modelcontextprotocol/sdk": "^1.25.1",
"@neondatabase/serverless": "^1.0.2",
"@next/third-parties": "^16.1.0",
diff --git a/packages/builtin-tool-agent-builder/src/client/Render/GetAvailableModels.tsx b/packages/builtin-tool-agent-builder/src/client/Render/GetAvailableModels.tsx
index 605f75e03d5..247d841d5e0 100644
--- a/packages/builtin-tool-agent-builder/src/client/Render/GetAvailableModels.tsx
+++ b/packages/builtin-tool-agent-builder/src/client/Render/GetAvailableModels.tsx
@@ -1,6 +1,5 @@
import { BuiltinRenderProps } from '@lobechat/types';
-import { Flexbox } from '@lobehub/ui';
-import { Tag } from 'antd';
+import { Flexbox , Tag } from '@lobehub/ui';
import { memo } from 'react';
import type { GetAvailableModelsParams, GetAvailableModelsState } from '../../types';
diff --git a/packages/builtin-tool-group-management/src/client/Intervention/ExecuteTask.tsx b/packages/builtin-tool-group-management/src/client/Intervention/ExecuteTask.tsx
index 54379031a35..d1cd264bbf1 100644
--- a/packages/builtin-tool-group-management/src/client/Intervention/ExecuteTask.tsx
+++ b/packages/builtin-tool-group-management/src/client/Intervention/ExecuteTask.tsx
@@ -1,8 +1,8 @@
'use client';
import { BuiltinInterventionProps } from '@lobechat/types';
-import { Avatar, Flexbox } from '@lobehub/ui';
-import { Input, InputNumber, Tooltip } from 'antd';
+import { Avatar, Flexbox , Tooltip } from '@lobehub/ui';
+import { Input, InputNumber } from 'antd';
import { createStyles } from 'antd-style';
import isEqual from 'fast-deep-equal';
import { Clock } from 'lucide-react';
diff --git a/src/app/[variants]/(auth)/auth-error/page.tsx b/src/app/[variants]/(auth)/auth-error/page.tsx
index 1b7c21d42f8..4d6567ad671 100644
--- a/src/app/[variants]/(auth)/auth-error/page.tsx
+++ b/src/app/[variants]/(auth)/auth-error/page.tsx
@@ -45,7 +45,7 @@ const AuthErrorPage = memo(() => {
subtitle={description}
title={t('title')}
>
- <Alert message={error || 'UNKNOWN'} type={'error'} />
+ <Alert title={error || 'UNKNOWN'} type={'error'} />
</AuthCard>
);
});
diff --git a/src/app/[variants]/(main)/chat/features/Conversation/AgentWelcome/ToolAuthAlert.tsx b/src/app/[variants]/(main)/chat/features/Conversation/AgentWelcome/ToolAuthAlert.tsx
index 449d05b629e..e6cd299a98d 100644
--- a/src/app/[variants]/(main)/chat/features/Conversation/AgentWelcome/ToolAuthAlert.tsx
+++ b/src/app/[variants]/(main)/chat/features/Conversation/AgentWelcome/ToolAuthAlert.tsx
@@ -1,10 +1,11 @@
'use client';
import { KLAVIS_SERVER_TYPES, KlavisServerType } from '@lobechat/const';
-import { Block, Button, Flexbox, Icon, Image, Text } from '@lobehub/ui';
+import { Alert, Avatar, Button, Flexbox, Icon, Text } from '@lobehub/ui';
+import { Divider } from 'antd';
import { useTheme } from 'antd-style';
import isEqual from 'fast-deep-equal';
-import { Loader2, LogIn, SquareArrowOutUpRight, TriangleAlert } from 'lucide-react';
+import { PlusIcon } from 'lucide-react';
import { memo, useCallback, useEffect, useMemo, useRef, useState } from 'react';
import { useTranslation } from 'react-i18next';
@@ -193,9 +194,7 @@ const KlavisToolAuthItem = memo<KlavisToolAuthItemProps>(({ tool, onAuthComplete
const renderIcon = () => {
if (typeof tool.icon === 'string') {
- return (
- <Image alt={tool.label} height={20} src={tool.icon} style={{ flex: 'none' }} width={20} />
- );
+ return <Avatar alt={tool.label} avatar={tool.icon} size={20} style={{ flex: 'none' }} />;
}
return <Icon fill={theme.colorText} icon={tool.icon} size={20} />;
};
@@ -203,17 +202,27 @@ const KlavisToolAuthItem = memo<KlavisToolAuthItemProps>(({ tool, onAuthComplete
const isLoading = isConnecting || isWaitingAuth;
return (
- <Flexbox align="center" gap={12} horizontal justify="space-between">
+ <Flexbox
+ align="center"
+ gap={12}
+ horizontal
+ justify="space-between"
+ onClick={handleAuthorize}
+ style={{
+ cursor: 'pointer',
+ }}
+ >
<Flexbox align="center" gap={8} horizontal>
{renderIcon()}
- <span>{tool.label}</span>
+ <Text>{tool.label}</Text>
</Flexbox>
<Button
disabled={isLoading}
- icon={isLoading ? <Icon icon={Loader2} spin /> : <Icon icon={SquareArrowOutUpRight} />}
+ icon={PlusIcon}
+ loading={isLoading}
onClick={handleAuthorize}
size="small"
- type="primary"
+ type="text"
>
{isLoading ? t('toolAuth.authorizing') : t('toolAuth.authorize')}
</Button>
@@ -240,17 +249,27 @@ const MarketToolAuthItem = memo<MarketToolAuthItemProps>(({ tool }) => {
};
return (
- <Flexbox align="center" gap={12} horizontal justify="space-between">
+ <Flexbox
+ align="center"
+ gap={12}
+ horizontal
+ justify="space-between"
+ onClick={handleSignIn}
+ style={{
+ cursor: 'pointer',
+ }}
+ >
<Flexbox align="center" gap={8} horizontal>
- <Image alt={tool.label} height={20} src={tool.avatar} style={{ flex: 'none' }} width={20} />
- <span>{tool.label}</span>
+ <Avatar alt={tool.label} avatar={tool.avatar} size={20} style={{ flex: 'none' }} />
+ <Text>{tool.label}</Text>
</Flexbox>
<Button
disabled={isLoading}
- icon={isLoading ? <Icon icon={Loader2} spin /> : <Icon icon={LogIn} />}
+ icon={PlusIcon}
+ loading={isLoading}
onClick={handleSignIn}
size="small"
- type="primary"
+ type="text"
>
{isLoading ? t('toolAuth.authorizing') : t('toolAuth.signIn')}
</Button>
@@ -262,7 +281,6 @@ MarketToolAuthItem.displayName = 'MarketToolAuthItem';
const ToolAuthAlert = memo(() => {
const { t } = useTranslation('chat');
- const theme = useTheme();
const plugins = useAgentStore(agentSelectors.currentAgentPlugins, isEqual);
const klavisServers = useToolStore(klavisStoreSelectors.getServers, isEqual);
@@ -300,37 +318,37 @@ const ToolAuthAlert = memo(() => {
}
return (
- <Block
- gap={12}
- padding={12}
- style={{
- width: '100%',
- }}
- variant={'filled'}
- >
- <Flexbox align="center" gap={6} horizontal style={{ fontWeight: 500 }}>
- <Icon color={theme.colorWarning} icon={TriangleAlert} size={18} />
- {t('toolAuth.title')}
- </Flexbox>
- <Text style={{ fontSize: 12 }} type="secondary">
- {t('toolAuth.hint')}
- </Text>
- <Block gap={12} padding={12} variant={'outlined'}>
- {pendingAuthTools.map((tool) =>
- tool.authType === 'klavis' ? (
- <KlavisToolAuthItem
- key={tool.identifier}
- onAuthComplete={() => {
- // Component will re-render and tool will be removed from list
- }}
- tool={tool}
- />
- ) : (
- <MarketToolAuthItem key={tool.identifier} tool={tool} />
- ),
- )}
- </Block>
- </Block>
+ <Alert
+ description={
+ <>
+ {t('toolAuth.hint')}
+ <Divider dashed style={{ marginBlock: 12 }} />
+ <Flexbox gap={12} style={{ marginTop: 8 }}>
+ {pendingAuthTools.map((tool) =>
+ tool.authType === 'klavis' ? (
+ <KlavisToolAuthItem
+ key={tool.identifier}
+ onAuthComplete={() => {
+ // Component will re-render and tool will be removed from list
+ }}
+ tool={tool}
+ />
+ ) : (
+ <MarketToolAuthItem key={tool.identifier} tool={tool} />
+ ),
+ )}
+ </Flexbox>
+ </>
+ }
+ showIcon={false}
+ style={{ width: '100%' }}
+ title={
+ <Flexbox align="center" gap={6} horizontal>
+ {t('toolAuth.title')}
+ </Flexbox>
+ }
+ type="secondary"
+ />
);
});
diff --git a/src/app/[variants]/(main)/chat/features/Conversation/ChatMinimap/index.tsx b/src/app/[variants]/(main)/chat/features/Conversation/ChatMinimap/index.tsx
deleted file mode 100644
index 0efae344cc1..00000000000
--- a/src/app/[variants]/(main)/chat/features/Conversation/ChatMinimap/index.tsx
+++ /dev/null
@@ -1 +0,0 @@
-export { default } from '@/features/ChatMiniMap';
diff --git a/src/app/[variants]/(main)/chat/features/Conversation/ConversationArea.tsx b/src/app/[variants]/(main)/chat/features/Conversation/ConversationArea.tsx
index 257aa545fe7..a965293e0ab 100644
--- a/src/app/[variants]/(main)/chat/features/Conversation/ConversationArea.tsx
+++ b/src/app/[variants]/(main)/chat/features/Conversation/ConversationArea.tsx
@@ -4,7 +4,9 @@ import { MemoryManifest } from '@lobechat/builtin-tool-memory';
import { Flexbox } from '@lobehub/ui';
import { Suspense, memo, useEffect, useMemo } from 'react';
+import ChatMiniMap from '@/features/ChatMiniMap';
import { ChatList, ConversationProvider } from '@/features/Conversation';
+import ZenModeToast from '@/features/ZenModeToast';
import { useOperationState } from '@/hooks/useOperationState';
import { useAgentStore } from '@/store/agent';
import { agentSelectors } from '@/store/agent/selectors';
@@ -15,11 +17,9 @@ import { useUserMemoryStore } from '@/store/userMemory';
import WelcomeChatItem from './AgentWelcome';
import ChatHydration from './ChatHydration';
-import ChatMinimap from './ChatMinimap';
import MainChatInput from './MainChatInput';
import MessageFromUrl from './MainChatInput/MessageFromUrl';
import ThreadHydration from './ThreadHydration';
-import ZenModeToast from './ZenModeToast';
import { useActionsBarConfig } from './useActionsBarConfig';
import { useAgentContext } from './useAgentContext';
@@ -103,7 +103,7 @@ const Conversation = memo(() => {
<MainChatInput />
<ChatHydration />
<ThreadHydration />
- <ChatMinimap />
+ <ChatMiniMap />
<Suspense>
<MessageFromUrl />
</Suspense>
diff --git a/src/app/[variants]/(main)/chat/features/Conversation/GroupWelcome/useTemplateMatching.ts b/src/app/[variants]/(main)/chat/features/Conversation/GroupWelcome/useTemplateMatching.ts
deleted file mode 100644
index bd850f5e585..00000000000
--- a/src/app/[variants]/(main)/chat/features/Conversation/GroupWelcome/useTemplateMatching.ts
+++ /dev/null
@@ -1,74 +0,0 @@
-import { useMemo } from 'react';
-import { useTranslation } from 'react-i18next';
-
-import { useGroupTemplates } from '@/components/ChatGroupWizard/templates';
-import { useSessionStore } from '@/store/session';
-import { sessionSelectors } from '@/store/session/selectors';
-import { LobeGroupSession } from '@/types/session';
-
-interface TemplateMatch {
- activities: Record<string, { description: string; emoji: string; prompt: string; title: string }>;
- templateId: string;
-}
-
-export const useTemplateMatching = (): TemplateMatch | null => {
- const { t } = useTranslation('welcome');
- const groupTemplates = useGroupTemplates();
- const currentSession = useSessionStore(
- sessionSelectors.currentSession,
- ) as LobeGroupSession | null;
-
- return useMemo(() => {
- if (!currentSession || currentSession.type !== 'group') {
- console.warn('No group session found:', { currentSession });
- return null;
- }
-
- const currentTitle = currentSession.meta?.title || '';
- const currentMemberCount = currentSession.members?.length || 0;
-
- // Try to match by title and member count
- for (const template of groupTemplates) {
- const templateTitle = template.title;
- const templateMemberCount = template.members.length;
-
- // Check if titles match (case-insensitive) and member counts are similar (±1)
- if (
- templateTitle.toLowerCase() === currentTitle.toLowerCase() &&
- Math.abs(templateMemberCount - currentMemberCount) <= 1
- ) {
- console.warn('Found exact match for template:', template.id);
- // Get template-specific activities from i18n
- const templateActivities = (t as any)(`guide.groupActivities.${template.id}`, {
- returnObjects: true,
- }) as Record<string, { description: string; emoji: string; prompt: string; title: string }>;
-
- return {
- activities: templateActivities || {},
- templateId: template.id,
- };
- }
- }
-
- // If no exact match, try partial title matching
- console.warn('No exact match found, trying partial matching...');
- for (const template of groupTemplates) {
- const templateTitle = template.title;
-
- const currentIncludes = currentTitle.toLowerCase().includes(templateTitle.toLowerCase());
- const templateIncludes = templateTitle.toLowerCase().includes(currentTitle.toLowerCase());
-
- if (currentIncludes || templateIncludes) {
- const templateActivities = (t as any)(`guide.groupActivities.${template.id}`, {
- returnObjects: true,
- }) as Record<string, { description: string; emoji: string; prompt: string; title: string }>;
-
- return {
- activities: templateActivities || {},
- templateId: template.id,
- };
- }
- }
- return null;
- }, [currentSession, groupTemplates, t]);
-};
diff --git a/src/app/[variants]/(main)/community/(detail)/assistant/features/StatusPage/index.tsx b/src/app/[variants]/(main)/community/(detail)/assistant/features/StatusPage/index.tsx
index 859a7c7a2be..6261ef57d3e 100644
--- a/src/app/[variants]/(main)/community/(detail)/assistant/features/StatusPage/index.tsx
+++ b/src/app/[variants]/(main)/community/(detail)/assistant/features/StatusPage/index.tsx
@@ -1,8 +1,8 @@
'use client';
import { ExclamationCircleOutlined, FolderOpenOutlined } from '@ant-design/icons';
-import { FluentEmoji, Text } from '@lobehub/ui';
-import { Button, Result } from 'antd';
+import { FluentEmoji, Text , Button } from '@lobehub/ui';
+import { Result } from 'antd';
import { memo } from 'react';
import { Trans, useTranslation } from 'react-i18next';
import { useNavigate } from 'react-router-dom';
diff --git a/src/app/[variants]/(main)/community/(detail)/mcp/features/Sidebar/ActionButton/index.tsx b/src/app/[variants]/(main)/community/(detail)/mcp/features/Sidebar/ActionButton/index.tsx
index c6867b4e0b3..d777a5baf10 100644
--- a/src/app/[variants]/(main)/community/(detail)/mcp/features/Sidebar/ActionButton/index.tsx
+++ b/src/app/[variants]/(main)/community/(detail)/mcp/features/Sidebar/ActionButton/index.tsx
@@ -1,7 +1,6 @@
'use client';
-import { Flexbox, Icon } from '@lobehub/ui';
-import { Button } from 'antd';
+import { Flexbox, Icon , Button } from '@lobehub/ui';
import { createStyles } from 'antd-style';
import { Trash2Icon } from 'lucide-react';
import { memo, useState } from 'react';
diff --git a/src/app/[variants]/(main)/community/(detail)/mcp/features/Sidebar/ConnectionTypeAlert.tsx b/src/app/[variants]/(main)/community/(detail)/mcp/features/Sidebar/ConnectionTypeAlert.tsx
index 280ff409d96..05ca5390f82 100644
--- a/src/app/[variants]/(main)/community/(detail)/mcp/features/Sidebar/ConnectionTypeAlert.tsx
+++ b/src/app/[variants]/(main)/community/(detail)/mcp/features/Sidebar/ConnectionTypeAlert.tsx
@@ -20,13 +20,13 @@ const ConnectionTypeAlert = memo(() => {
return (
<Alert
description={t(`mcp.details.connectionType.${connectionType}.desc`)}
- message={
+ showIcon={false}
+ title={
<Flexbox align={'center'} gap={6} horizontal>
<Icon icon={icons[connectionType]} size={20} />
{t(`mcp.details.connectionType.${connectionType}.title`)}
</Flexbox>
}
- showIcon={false}
/>
);
});
diff --git a/src/app/[variants]/(main)/community/(detail)/user/features/Header/index.tsx b/src/app/[variants]/(main)/community/(detail)/user/features/Header/index.tsx
index 14d3cd6102b..c84db34713d 100644
--- a/src/app/[variants]/(main)/community/(detail)/user/features/Header/index.tsx
+++ b/src/app/[variants]/(main)/community/(detail)/user/features/Header/index.tsx
@@ -1,8 +1,7 @@
'use client';
import { SiGithub, SiX } from '@icons-pack/react-simple-icons';
-import { ActionIcon, Avatar, Flexbox, Text, Tooltip } from '@lobehub/ui';
-import { Button } from 'antd';
+import { ActionIcon, Avatar, Flexbox, Text, Tooltip , Button } from '@lobehub/ui';
import { useTheme } from 'antd-style';
import { Globe } from 'lucide-react';
import { memo } from 'react';
diff --git a/src/app/[variants]/(main)/community/(detail)/user/features/UserAgentCard.tsx b/src/app/[variants]/(main)/community/(detail)/user/features/UserAgentCard.tsx
index caff327f5b5..3b199068d87 100644
--- a/src/app/[variants]/(main)/community/(detail)/user/features/UserAgentCard.tsx
+++ b/src/app/[variants]/(main)/community/(detail)/user/features/UserAgentCard.tsx
@@ -1,7 +1,7 @@
'use client';
-import { Avatar, Block, Flexbox, Icon, Tag, Text, Tooltip } from '@lobehub/ui';
-import { Tag as AntTag, App, Dropdown } from 'antd';
+import { Avatar, Block, Flexbox, Icon, Tag, Text, Tooltip , Tag as AntTag } from '@lobehub/ui';
+import { App, Dropdown } from 'antd';
import { createStyles } from 'antd-style';
import {
AlertTriangle,
diff --git a/src/app/[variants]/(main)/community/(list)/assistant/features/MarketSourceSwitch.tsx b/src/app/[variants]/(main)/community/(list)/assistant/features/MarketSourceSwitch.tsx
index 215acc1ab49..fb387042592 100644
--- a/src/app/[variants]/(main)/community/(list)/assistant/features/MarketSourceSwitch.tsx
+++ b/src/app/[variants]/(main)/community/(list)/assistant/features/MarketSourceSwitch.tsx
@@ -1,7 +1,6 @@
'use client';
-import { Dropdown, DropdownMenuItemType, Icon } from '@lobehub/ui';
-import { Button } from 'antd';
+import { Dropdown, DropdownMenuItemType, Icon , Button } from '@lobehub/ui';
import { ChevronDown, Store } from 'lucide-react';
import { memo, useMemo } from 'react';
import { useTranslation } from 'react-i18next';
diff --git a/src/app/[variants]/(main)/community/(list)/features/SortButton/index.tsx b/src/app/[variants]/(main)/community/(list)/features/SortButton/index.tsx
index 1f650341eb5..d1ef8bbf560 100644
--- a/src/app/[variants]/(main)/community/(list)/features/SortButton/index.tsx
+++ b/src/app/[variants]/(main)/community/(list)/features/SortButton/index.tsx
@@ -1,5 +1,4 @@
-import { Dropdown, DropdownMenuItemType, Icon } from '@lobehub/ui';
-import { Button } from 'antd';
+import { Dropdown, DropdownMenuItemType, Icon , Button } from '@lobehub/ui';
import { ArrowDownWideNarrow, ChevronDown } from 'lucide-react';
import { memo, useMemo } from 'react';
import { useTranslation } from 'react-i18next';
diff --git a/src/app/[variants]/(main)/group/_layout/Sidebar/AddGroupMemberModal/AgentItem.tsx b/src/app/[variants]/(main)/group/_layout/Sidebar/AddGroupMemberModal/AgentItem.tsx
index 4a633bc24b3..7bfd3fc2935 100644
--- a/src/app/[variants]/(main)/group/_layout/Sidebar/AddGroupMemberModal/AgentItem.tsx
+++ b/src/app/[variants]/(main)/group/_layout/Sidebar/AddGroupMemberModal/AgentItem.tsx
@@ -1,8 +1,8 @@
'use client';
-import { Avatar, Flexbox } from '@lobehub/ui';
+import { Avatar, Flexbox, Text } from '@lobehub/ui';
import { useHover } from 'ahooks';
-import { Checkbox, Typography } from 'antd';
+import { Checkbox } from 'antd';
import { createStyles } from 'antd-style';
import { X } from 'lucide-react';
import { memo, useRef } from 'react';
@@ -11,8 +11,6 @@ import { DEFAULT_AVATAR } from '@/const/meta';
import { useAgentSelectionStore } from './store';
-const { Text } = Typography;
-
const useStyles = createStyles(({ css, token }) => ({
item: css`
cursor: pointer;
diff --git a/src/app/[variants]/(main)/group/_layout/Sidebar/AddGroupMemberModal/index.tsx b/src/app/[variants]/(main)/group/_layout/Sidebar/AddGroupMemberModal/index.tsx
index baf52d40b6a..b7eab46228d 100644
--- a/src/app/[variants]/(main)/group/_layout/Sidebar/AddGroupMemberModal/index.tsx
+++ b/src/app/[variants]/(main)/group/_layout/Sidebar/AddGroupMemberModal/index.tsx
@@ -1,7 +1,6 @@
'use client';
-import { Flexbox, Modal } from '@lobehub/ui';
-import { Button } from 'antd';
+import { Flexbox, Modal , Button } from '@lobehub/ui';
import { createStyles } from 'antd-style';
import { memo, useEffect, useMemo, useState } from 'react';
import { useTranslation } from 'react-i18next';
diff --git a/src/app/[variants]/(main)/group/features/Conversation/ChatMinimap/index.tsx b/src/app/[variants]/(main)/group/features/Conversation/ChatMinimap/index.tsx
deleted file mode 100644
index 0efae344cc1..00000000000
--- a/src/app/[variants]/(main)/group/features/Conversation/ChatMinimap/index.tsx
+++ /dev/null
@@ -1 +0,0 @@
-export { default } from '@/features/ChatMiniMap';
diff --git a/src/app/[variants]/(main)/group/features/Conversation/ConversationArea.tsx b/src/app/[variants]/(main)/group/features/Conversation/ConversationArea.tsx
index c9f172951de..bf9916c22af 100644
--- a/src/app/[variants]/(main)/group/features/Conversation/ConversationArea.tsx
+++ b/src/app/[variants]/(main)/group/features/Conversation/ConversationArea.tsx
@@ -4,7 +4,9 @@ import { MemoryManifest } from '@lobechat/builtin-tool-memory';
import { Flexbox } from '@lobehub/ui';
import { Suspense, memo, useEffect, useMemo } from 'react';
+import ChatMiniMap from '@/features/ChatMiniMap';
import { ChatList, ConversationProvider } from '@/features/Conversation';
+import ZenModeToast from '@/features/ZenModeToast';
import { useOperationState } from '@/hooks/useOperationState';
import { useAgentStore } from '@/store/agent';
import { agentSelectors } from '@/store/agent/selectors';
@@ -15,11 +17,9 @@ import { useUserMemoryStore } from '@/store/userMemory';
import WelcomeChatItem from './AgentWelcome';
import ChatHydration from './ChatHydration';
-import ChatMinimap from './ChatMinimap';
import MainChatInput from './MainChatInput';
import MessageFromUrl from './MainChatInput/MessageFromUrl';
import ThreadHydration from './ThreadHydration';
-import ZenModeToast from './ZenModeToast';
import { useActionsBarConfig } from './useActionsBarConfig';
import { useGroupContext } from './useGroupContext';
@@ -115,7 +115,7 @@ const Conversation = memo<ConversationAreaProps>(({ mobile = false }) => {
<ThreadHydration />
{!mobile && (
<>
- <ChatMinimap />
+ <ChatMiniMap />
<Suspense>
<MessageFromUrl />
</Suspense>
diff --git a/src/app/[variants]/(main)/group/features/Conversation/GroupWelcome/useTemplateMatching.ts b/src/app/[variants]/(main)/group/features/Conversation/GroupWelcome/useTemplateMatching.ts
deleted file mode 100644
index 6902b9bf446..00000000000
--- a/src/app/[variants]/(main)/group/features/Conversation/GroupWelcome/useTemplateMatching.ts
+++ /dev/null
@@ -1,72 +0,0 @@
-import { useMemo } from 'react';
-import { useTranslation } from 'react-i18next';
-
-import { useGroupTemplates } from '@/components/ChatGroupWizard/templates';
-import { useAgentGroupStore } from '@/store/agentGroup';
-import { agentGroupSelectors } from '@/store/agentGroup/selectors';
-
-interface TemplateMatch {
- activities: Record<string, { description: string; emoji: string; prompt: string; title: string }>;
- templateId: string;
-}
-
-export const useTemplateMatching = (): TemplateMatch | null => {
- const { t } = useTranslation('welcome');
- const groupTemplates = useGroupTemplates();
- const currentGroup = useAgentGroupStore(agentGroupSelectors.currentGroup);
- const currentGroupAgents = useAgentGroupStore(agentGroupSelectors.currentGroupAgents);
-
- return useMemo(() => {
- if (!currentGroup) {
- console.warn('No group found:', { currentGroup });
- return null;
- }
-
- const currentTitle = currentGroup.title || '';
- const currentMemberCount = currentGroupAgents?.length || 0;
-
- // Try to match by title and member count
- for (const template of groupTemplates) {
- const templateTitle = template.title;
- const templateMemberCount = template.members.length;
-
- // Check if titles match (case-insensitive) and member counts are similar (±1)
- if (
- templateTitle.toLowerCase() === currentTitle.toLowerCase() &&
- Math.abs(templateMemberCount - currentMemberCount) <= 1
- ) {
- console.warn('Found exact match for template:', template.id);
- // Get template-specific activities from i18n
- const templateActivities = (t as any)(`guide.groupActivities.${template.id}`, {
- returnObjects: true,
- }) as Record<string, { description: string; emoji: string; prompt: string; title: string }>;
-
- return {
- activities: templateActivities || {},
- templateId: template.id,
- };
- }
- }
-
- // If no exact match, try partial title matching
- console.warn('No exact match found, trying partial matching...');
- for (const template of groupTemplates) {
- const templateTitle = template.title;
-
- const currentIncludes = currentTitle.toLowerCase().includes(templateTitle.toLowerCase());
- const templateIncludes = templateTitle.toLowerCase().includes(currentTitle.toLowerCase());
-
- if (currentIncludes || templateIncludes) {
- const templateActivities = (t as any)(`guide.groupActivities.${template.id}`, {
- returnObjects: true,
- }) as Record<string, { description: string; emoji: string; prompt: string; title: string }>;
-
- return {
- activities: templateActivities || {},
- templateId: template.id,
- };
- }
- }
- return null;
- }, [currentGroup, currentGroupAgents, groupTemplates, t]);
-};
diff --git a/src/app/[variants]/(main)/group/features/Conversation/MainChatInput/GroupChat.tsx b/src/app/[variants]/(main)/group/features/Conversation/MainChatInput/GroupChat.tsx
index 1cd391da447..a3b8470af0a 100644
--- a/src/app/[variants]/(main)/group/features/Conversation/MainChatInput/GroupChat.tsx
+++ b/src/app/[variants]/(main)/group/features/Conversation/MainChatInput/GroupChat.tsx
@@ -107,8 +107,8 @@ const Desktop = memo((props: { targetMemberId?: string }) => {
<Flexbox paddingBlock={'0 6px'} paddingInline={12}>
<Alert
closable
- message={t('input.errorMsg', { errorMsg: mainInputSendErrorMsg })}
onClose={clearSendMessageError}
+ title={t('input.errorMsg', { errorMsg: mainInputSendErrorMsg })}
type={'warning'}
/>
</Flexbox>
diff --git a/src/app/[variants]/(main)/group/features/Conversation/ZenModeToast/Toast.tsx b/src/app/[variants]/(main)/group/features/Conversation/ZenModeToast/Toast.tsx
deleted file mode 100644
index 2c3f63d329e..00000000000
--- a/src/app/[variants]/(main)/group/features/Conversation/ZenModeToast/Toast.tsx
+++ /dev/null
@@ -1,90 +0,0 @@
-'use client';
-
-import { Flexbox, Hotkey } from '@lobehub/ui';
-import { createStyles } from 'antd-style';
-import { useEffect, useState } from 'react';
-import { useTranslation } from 'react-i18next';
-
-import { useUserStore } from '@/store/user';
-import { settingsSelectors } from '@/store/user/selectors';
-import { HotkeyEnum } from '@/types/hotkey';
-
-const useStyles = createStyles(({ css, token }) => ({
- closeButton: css`
- color: ${token.colorTextSecondary};
- transition: color 0.2s;
-
- &:hover {
- color: ${token.colorTextQuaternary};
- }
- `,
-
- container: css`
- position: fixed;
- z-index: 50;
- inset-block-start: 16px;
- inset-inline-start: 50%;
- transform: translateX(-50%);
-
- animation: fade-in-slide-down 300ms ease;
-
- @keyframes fade-in-slide-down {
- from {
- transform: translate(-50%, -16px);
- opacity: 0;
- }
-
- to {
- transform: translate(-50%, 0);
- opacity: 1;
- }
- }
- `,
-
- text: css`
- font-size: 16px;
- font-weight: 500;
- color: ${token.colorBgBase};
- `,
-
- toast: css`
- display: flex;
- align-items: center;
-
- padding-block: 8px;
- padding-inline: 24px;
- border-radius: 9999px;
-
- background: ${token.colorText};
- box-shadow: ${token.boxShadowSecondary};
- `,
-}));
-
-const Toast = () => {
- const { t } = useTranslation('chat');
- const { styles } = useStyles();
- const [isVisible, setIsVisible] = useState(true);
- const hotkey = useUserStore(settingsSelectors.getHotkeyById(HotkeyEnum.ToggleZenMode));
-
- useEffect(() => {
- const timer = setTimeout(() => {
- setIsVisible(false);
- }, 2000);
-
- return () => clearTimeout(timer);
- }, []);
-
- if (!isVisible) return null;
-
- return (
- <div className={styles.container}>
- <div className={styles.toast}>
- <Flexbox align={'center'} className={styles.text} gap={8} horizontal>
- {t('zenMode')} <Hotkey inverseTheme keys={hotkey} />
- </Flexbox>
- </div>
- </div>
- );
-};
-
-export default Toast;
diff --git a/src/app/[variants]/(main)/group/features/Conversation/ZenModeToast/index.tsx b/src/app/[variants]/(main)/group/features/Conversation/ZenModeToast/index.tsx
deleted file mode 100644
index 28558c64573..00000000000
--- a/src/app/[variants]/(main)/group/features/Conversation/ZenModeToast/index.tsx
+++ /dev/null
@@ -1,16 +0,0 @@
-'use client';
-
-import { memo } from 'react';
-
-import { useGlobalStore } from '@/store/global';
-import { systemStatusSelectors } from '@/store/global/selectors';
-
-import Toast from './Toast';
-
-const ZenModeToast = memo(() => {
- const inZenMode = useGlobalStore(systemStatusSelectors.inZenMode);
-
- return inZenMode && <Toast />;
-});
-
-export default ZenModeToast;
diff --git a/src/app/[variants]/(main)/home/_layout/CreateGroupModal/AgentItem.tsx b/src/app/[variants]/(main)/home/_layout/CreateGroupModal/AgentItem.tsx
index 5c5c173065a..3da4d9659a6 100644
--- a/src/app/[variants]/(main)/home/_layout/CreateGroupModal/AgentItem.tsx
+++ b/src/app/[variants]/(main)/home/_layout/CreateGroupModal/AgentItem.tsx
@@ -1,8 +1,8 @@
'use client';
-import { Avatar, Flexbox } from '@lobehub/ui';
+import { Avatar, Flexbox, Text } from '@lobehub/ui';
import { useHover } from 'ahooks';
-import { Checkbox, Typography } from 'antd';
+import { Checkbox } from 'antd';
import { createStyles } from 'antd-style';
import { X } from 'lucide-react';
import { memo, useRef } from 'react';
@@ -11,8 +11,6 @@ import { DEFAULT_AVATAR } from '@/const/meta';
import { useAgentSelectionStore } from './store';
-const { Text } = Typography;
-
const useStyles = createStyles(({ css, token }) => ({
item: css`
cursor: pointer;
diff --git a/src/app/[variants]/(main)/home/_layout/CreateGroupModal/index.tsx b/src/app/[variants]/(main)/home/_layout/CreateGroupModal/index.tsx
index ea0e77bf951..0d609039d36 100644
--- a/src/app/[variants]/(main)/home/_layout/CreateGroupModal/index.tsx
+++ b/src/app/[variants]/(main)/home/_layout/CreateGroupModal/index.tsx
@@ -1,7 +1,7 @@
'use client';
-import { Flexbox, Modal } from '@lobehub/ui';
-import { App, Button } from 'antd';
+import { Flexbox, Modal , Button } from '@lobehub/ui';
+import { App } from 'antd';
import { createStyles } from 'antd-style';
import { memo, useEffect, useState } from 'react';
import { useTranslation } from 'react-i18next';
diff --git a/src/app/[variants]/(main)/home/features/InputArea/StarterList.tsx b/src/app/[variants]/(main)/home/features/InputArea/StarterList.tsx
index 32ca34f286c..0890f2d5e89 100644
--- a/src/app/[variants]/(main)/home/features/InputArea/StarterList.tsx
+++ b/src/app/[variants]/(main)/home/features/InputArea/StarterList.tsx
@@ -1,6 +1,5 @@
import { BUILTIN_AGENT_SLUGS } from '@lobechat/builtin-agents';
-import { Button, ButtonProps, Center } from '@lobehub/ui';
-import { Tooltip } from 'antd';
+import { Button, ButtonProps, Center , Tooltip } from '@lobehub/ui';
import { createStyles } from 'antd-style';
import { BotIcon, ImageIcon, MicroscopeIcon, PenLineIcon } from 'lucide-react';
import { memo, useCallback, useMemo } from 'react';
diff --git a/src/app/[variants]/(main)/image/NotSupportClient.tsx b/src/app/[variants]/(main)/image/NotSupportClient.tsx
index 7e3737c6eac..4167301521b 100644
--- a/src/app/[variants]/(main)/image/NotSupportClient.tsx
+++ b/src/app/[variants]/(main)/image/NotSupportClient.tsx
@@ -1,7 +1,6 @@
'use client';
-import { Center, Flexbox, Icon } from '@lobehub/ui';
-import { Typography } from 'antd';
+import { Center, Flexbox, Icon, Text } from '@lobehub/ui';
import { createStyles, useTheme } from 'antd-style';
import { Database, FileImage, Network, Sparkles } from 'lucide-react';
import Link from 'next/link';
@@ -127,8 +126,10 @@ const NotSupportClient = () => {
</Flexbox>
<Flexbox justify={'center'} style={{ textAlign: 'center' }}>
- <Typography.Title>{t('notSupportGuide.title')}</Typography.Title>
- <Typography.Text type={'secondary'}>
+ <Text fontSize={18} strong>
+ {t('notSupportGuide.title')}
+ </Text>
+ <Text type={'secondary'}>
<Trans i18nKey={'notSupportGuide.desc'} ns={'image'}>
当前部署实例为客户端数据库模式,无法使用 AI 图像生成功能。请切换到
<Link href={DATABASE_SELF_HOSTING_URL}>服务端数据库部署模式</Link>
@@ -139,7 +140,7 @@ const NotSupportClient = () => {
{LOBE_CHAT_CLOUD}
</Link>
</Trans>
- </Typography.Text>
+ </Text>
</Flexbox>
<Flexbox style={{ marginTop: 40 }}>
diff --git a/src/app/[variants]/(main)/settings/features/UpgradeAlert.tsx b/src/app/[variants]/(main)/settings/features/UpgradeAlert.tsx
index 9488836ffcf..62e5702f583 100644
--- a/src/app/[variants]/(main)/settings/features/UpgradeAlert.tsx
+++ b/src/app/[variants]/(main)/settings/features/UpgradeAlert.tsx
@@ -17,7 +17,7 @@ const UpgradeAlert = memo(() => {
return (
<Alert
closable
- message={
+ title={
<Flexbox gap={8}>
<p>{t('upgradeVersion.newVersion', { version: `v${latestVersion}` })}</p>
<Link
diff --git a/src/app/[variants]/(main)/settings/profile/Client.tsx b/src/app/[variants]/(main)/settings/profile/Client.tsx
index ffa1d60fc72..1fb2a286b28 100644
--- a/src/app/[variants]/(main)/settings/profile/Client.tsx
+++ b/src/app/[variants]/(main)/settings/profile/Client.tsx
@@ -2,8 +2,8 @@
import { LoadingOutlined } from '@ant-design/icons';
import { isDesktop } from '@lobechat/const';
-import { Block, Flexbox, Icon, Skeleton, Tag, Text } from '@lobehub/ui';
-import { Button, Divider, Input, Spin, Typography, Upload } from 'antd';
+import { Block, Button, Flexbox, Icon, Input, Skeleton, Tag, Text } from '@lobehub/ui';
+import { Divider, Spin, Upload } from 'antd';
import { useTheme } from 'antd-style';
import { BriefcaseIcon } from 'lucide-react';
import { AnimatePresence, m as motion } from 'motion/react';
@@ -56,7 +56,7 @@ const ProfileRow = memo<ProfileRowProps>(({ label, children, action, mobile }) =
return (
<Flexbox gap={12} style={rowStyle}>
<Flexbox align="center" horizontal justify="space-between">
- <Typography.Text strong>{label}</Typography.Text>
+ <Text strong>{label}</Text>
{action}
</Flexbox>
<Flexbox>{children}</Flexbox>
@@ -67,7 +67,7 @@ const ProfileRow = memo<ProfileRowProps>(({ label, children, action, mobile }) =
return (
<Flexbox align="center" gap={24} horizontal justify="space-between" style={rowStyle}>
<Flexbox align="center" gap={24} horizontal style={{ flex: 1 }}>
- <Typography.Text style={labelStyle}>{label}</Typography.Text>
+ <Text style={labelStyle}>{label}</Text>
<Flexbox style={{ flex: 1 }}>{children}</Flexbox>
</Flexbox>
{action && <Flexbox>{action}</Flexbox>}
@@ -123,9 +123,9 @@ const AvatarRow = memo<{ mobile?: boolean }>(({ mobile }) => {
const updateAction = canUpload ? (
<Upload beforeUpload={handleUploadAvatar} itemRender={() => void 0} maxCount={1}>
- <Typography.Text style={{ cursor: 'pointer', fontSize: 13 }}>
+ <Text fontSize={13} style={{ cursor: 'pointer' }}>
{t('profile.updateAvatar')}
- </Typography.Text>
+ </Text>
</Upload>
) : null;
@@ -133,7 +133,7 @@ const AvatarRow = memo<{ mobile?: boolean }>(({ mobile }) => {
return (
<Flexbox gap={12} style={rowStyle}>
<Flexbox align="center" horizontal justify="space-between">
- <Typography.Text strong>{t('profile.avatar')}</Typography.Text>
+ <Text strong>{t('profile.avatar')}</Text>
{updateAction}
</Flexbox>
<Flexbox>{avatarContent}</Flexbox>
@@ -144,7 +144,7 @@ const AvatarRow = memo<{ mobile?: boolean }>(({ mobile }) => {
return (
<Flexbox align="center" gap={24} horizontal justify="space-between" style={rowStyle}>
<Flexbox align="center" gap={24} horizontal style={{ flex: 1 }}>
- <Typography.Text style={labelStyle}>{t('profile.avatar')}</Typography.Text>
+ <Text style={labelStyle}>{t('profile.avatar')}</Text>
<Flexbox style={{ flex: 1 }}>{avatarContent}</Flexbox>
</Flexbox>
{updateAction}
@@ -197,7 +197,7 @@ const FullNameRow = memo<{ mobile?: boolean }>(({ mobile }) => {
transition={{ duration: 0.2 }}
>
<Flexbox gap={12}>
- {!mobile && <Typography.Text strong>{t('profile.fullNameInputHint')}</Typography.Text>}
+ {!mobile && <Text strong>{t('profile.fullNameInputHint')}</Text>}
<Input
autoFocus
onChange={(e) => setEditValue(e.target.value)}
@@ -226,13 +226,13 @@ const FullNameRow = memo<{ mobile?: boolean }>(({ mobile }) => {
transition={{ duration: 0.2 }}
>
{mobile ? (
- <Typography.Text>{fullName || '--'}</Typography.Text>
+ <Text>{fullName || '--'}</Text>
) : (
<Flexbox align="center" horizontal justify="space-between">
- <Typography.Text>{fullName || '--'}</Typography.Text>
- <Typography.Text onClick={handleStartEdit} style={{ cursor: 'pointer', fontSize: 13 }}>
+ <Text>{fullName || '--'}</Text>
+ <Text onClick={handleStartEdit} style={{ cursor: 'pointer', fontSize: 13 }}>
{t('profile.updateFullName')}
- </Typography.Text>
+ </Text>
</Flexbox>
)}
</motion.div>
@@ -242,11 +242,11 @@ const FullNameRow = memo<{ mobile?: boolean }>(({ mobile }) => {
return (
<Flexbox gap={12} style={rowStyle}>
<Flexbox align="center" horizontal justify="space-between">
- <Typography.Text strong>{t('profile.fullName')}</Typography.Text>
+ <Text strong>{t('profile.fullName')}</Text>
{!isEditing && (
- <Typography.Text onClick={handleStartEdit} style={{ cursor: 'pointer', fontSize: 13 }}>
+ <Text onClick={handleStartEdit} style={{ cursor: 'pointer', fontSize: 13 }}>
{t('profile.updateFullName')}
- </Typography.Text>
+ </Text>
)}
</Flexbox>
<AnimatePresence mode="wait">{isEditing ? editingContent : displayContent}</AnimatePresence>
@@ -256,7 +256,7 @@ const FullNameRow = memo<{ mobile?: boolean }>(({ mobile }) => {
return (
<Flexbox gap={24} horizontal style={rowStyle}>
- <Typography.Text style={labelStyle}>{t('profile.fullName')}</Typography.Text>
+ <Text style={labelStyle}>{t('profile.fullName')}</Text>
<Flexbox style={{ flex: 1 }}>
<AnimatePresence mode="wait">{isEditing ? editingContent : displayContent}</AnimatePresence>
</Flexbox>
@@ -454,7 +454,7 @@ const InterestsRow = memo<{ mobile?: boolean }>(({ mobile }) => {
))}
</Flexbox>
) : (
- <Typography.Text>--</Typography.Text>
+ <Text>--</Text>
)
) : (
<Flexbox align="center" horizontal justify="space-between">
@@ -465,11 +465,11 @@ const InterestsRow = memo<{ mobile?: boolean }>(({ mobile }) => {
))}
</Flexbox>
) : (
- <Typography.Text>--</Typography.Text>
+ <Text>--</Text>
)}
- <Typography.Text onClick={handleStartEdit} style={{ cursor: 'pointer', fontSize: 13 }}>
+ <Text onClick={handleStartEdit} style={{ cursor: 'pointer', fontSize: 13 }}>
{t('profile.updateInterests')}
- </Typography.Text>
+ </Text>
</Flexbox>
)}
</motion.div>
@@ -479,11 +479,11 @@ const InterestsRow = memo<{ mobile?: boolean }>(({ mobile }) => {
return (
<Flexbox gap={12} style={rowStyle}>
<Flexbox align="center" horizontal justify="space-between">
- <Typography.Text strong>{t('profile.interests')}</Typography.Text>
+ <Text strong>{t('profile.interests')}</Text>
{!isEditing && (
- <Typography.Text onClick={handleStartEdit} style={{ cursor: 'pointer', fontSize: 13 }}>
+ <Text onClick={handleStartEdit} style={{ cursor: 'pointer', fontSize: 13 }}>
{t('profile.updateInterests')}
- </Typography.Text>
+ </Text>
)}
</Flexbox>
<AnimatePresence mode="wait">{isEditing ? editingContent : displayContent}</AnimatePresence>
@@ -493,7 +493,7 @@ const InterestsRow = memo<{ mobile?: boolean }>(({ mobile }) => {
return (
<Flexbox gap={24} horizontal style={rowStyle}>
- <Typography.Text style={labelStyle}>{t('profile.interests')}</Typography.Text>
+ <Text style={labelStyle}>{t('profile.interests')}</Text>
<Flexbox style={{ flex: 1 }}>
<AnimatePresence mode="wait">{isEditing ? editingContent : displayContent}</AnimatePresence>
</Flexbox>
@@ -582,7 +582,7 @@ const UsernameRow = memo<{ mobile?: boolean }>(({ mobile }) => {
transition={{ duration: 0.2 }}
>
<Flexbox gap={12}>
- {!mobile && <Typography.Text strong>{t('profile.usernameInputHint')}</Typography.Text>}
+ {!mobile && <Text strong>{t('profile.usernameInputHint')}</Text>}
<Input
autoFocus
onChange={handleInputChange}
@@ -592,9 +592,9 @@ const UsernameRow = memo<{ mobile?: boolean }>(({ mobile }) => {
value={editValue}
/>
{error && (
- <Typography.Text style={{ fontSize: 12 }} type="danger">
+ <Text style={{ fontSize: 12 }} type="danger">
{error}
- </Typography.Text>
+ </Text>
)}
<Flexbox gap={8} horizontal justify="flex-end">
<Button disabled={saving} onClick={handleCancel} size="small">
@@ -617,13 +617,13 @@ const UsernameRow = memo<{ mobile?: boolean }>(({ mobile }) => {
transition={{ duration: 0.2 }}
>
{mobile ? (
- <Typography.Text>{username || '--'}</Typography.Text>
+ <Text>{username || '--'}</Text>
) : (
<Flexbox align="center" horizontal justify="space-between">
- <Typography.Text>{username || '--'}</Typography.Text>
- <Typography.Text onClick={handleStartEdit} style={{ cursor: 'pointer', fontSize: 13 }}>
+ <Text>{username || '--'}</Text>
+ <Text onClick={handleStartEdit} style={{ cursor: 'pointer', fontSize: 13 }}>
{t('profile.updateUsername')}
- </Typography.Text>
+ </Text>
</Flexbox>
)}
</motion.div>
@@ -633,11 +633,11 @@ const UsernameRow = memo<{ mobile?: boolean }>(({ mobile }) => {
return (
<Flexbox gap={12} style={rowStyle}>
<Flexbox align="center" horizontal justify="space-between">
- <Typography.Text strong>{t('profile.username')}</Typography.Text>
+ <Text strong>{t('profile.username')}</Text>
{!isEditing && (
- <Typography.Text onClick={handleStartEdit} style={{ cursor: 'pointer', fontSize: 13 }}>
+ <Text onClick={handleStartEdit} style={{ cursor: 'pointer', fontSize: 13 }}>
{t('profile.updateUsername')}
- </Typography.Text>
+ </Text>
)}
</Flexbox>
<AnimatePresence mode="wait">{isEditing ? editingContent : displayContent}</AnimatePresence>
@@ -647,7 +647,7 @@ const UsernameRow = memo<{ mobile?: boolean }>(({ mobile }) => {
return (
<Flexbox gap={24} horizontal style={rowStyle}>
- <Typography.Text style={labelStyle}>{t('profile.username')}</Typography.Text>
+ <Text style={labelStyle}>{t('profile.username')}</Text>
<Flexbox style={{ flex: 1 }}>
<AnimatePresence mode="wait">{isEditing ? editingContent : displayContent}</AnimatePresence>
</Flexbox>
@@ -687,7 +687,7 @@ const PasswordRow = memo<{ mobile?: boolean }>(({ mobile }) => {
return (
<ProfileRow
action={
- <Typography.Text
+ <Text
onClick={sending ? undefined : handleChangePassword}
style={{
cursor: sending ? 'default' : 'pointer',
@@ -696,12 +696,12 @@ const PasswordRow = memo<{ mobile?: boolean }>(({ mobile }) => {
}}
>
{hasPasswordAccount ? t('profile.changePassword') : t('profile.setPassword')}
- </Typography.Text>
+ </Text>
}
label={t('profile.password')}
mobile={mobile}
>
- <Typography.Text>{hasPasswordAccount ? '••••••' : '--'}</Typography.Text>
+ <Text>{hasPasswordAccount ? '••••••' : '--'}</Text>
</ProfileRow>
);
});
@@ -742,9 +742,9 @@ const Client = memo<{ mobile?: boolean }>(({ mobile }) => {
return (
<Flexbox gap={0} paddingInline={mobile ? 16 : 0} width={'100%'}>
- <Typography.Title level={4} style={{ marginBottom: 32 }}>
+ <Text fontSize={16} strong style={{ marginBottom: 32 }}>
{t('profile.title')}
- </Typography.Title>
+ </Text>
<Divider style={{ marginBlock: 0 }} />
@@ -780,7 +780,7 @@ const Client = memo<{ mobile?: boolean }>(({ mobile }) => {
{isLoginWithAuth && userProfile?.email && (
<>
<ProfileRow label={t('profile.email')} mobile={mobile}>
- <Typography.Text>{userProfile.email}</Typography.Text>
+ <Text>{userProfile.email}</Text>
</ProfileRow>
<Divider style={{ margin: 0 }} />
</>
diff --git a/src/app/[variants]/(main)/settings/profile/features/SSOProvidersList/index.tsx b/src/app/[variants]/(main)/settings/profile/features/SSOProvidersList/index.tsx
index ddffba7cae4..0363282a9bb 100644
--- a/src/app/[variants]/(main)/settings/profile/features/SSOProvidersList/index.tsx
+++ b/src/app/[variants]/(main)/settings/profile/features/SSOProvidersList/index.tsx
@@ -1,6 +1,5 @@
import { isDesktop } from '@lobechat/const';
-import { ActionIcon, Flexbox } from '@lobehub/ui';
-import { Dropdown, type MenuProps, Typography } from 'antd';
+import { ActionIcon, Dropdown, Flexbox, type MenuProps, Text } from '@lobehub/ui';
import { ArrowRight, Plus, Unlink } from 'lucide-react';
import { CSSProperties, memo, useMemo } from 'react';
import { useTranslation } from 'react-i18next';
@@ -103,9 +102,9 @@ export const SSOProvidersList = memo(() => {
{AuthIcons(item.provider, 16)}
<span style={providerNameStyle}>{item.provider}</span>
{item.email && (
- <Typography.Text style={{ fontSize: 11 }} type="secondary">
+ <Text fontSize={11} type="secondary">
· {item.email}
- </Typography.Text>
+ </Text>
)}
</Flexbox>
{!(isDesktop && isLoginWithBetterAuth) && (
diff --git a/src/app/[variants]/(main)/settings/provider/features/ProviderConfig/Checker.tsx b/src/app/[variants]/(main)/settings/provider/features/ProviderConfig/Checker.tsx
index 00f1892299d..7351becf7e7 100644
--- a/src/app/[variants]/(main)/settings/provider/features/ProviderConfig/Checker.tsx
+++ b/src/app/[variants]/(main)/settings/provider/features/ProviderConfig/Checker.tsx
@@ -32,8 +32,8 @@ const Error = memo<{ error: ChatMessageError }>(({ error }) => {
</Highlighter>
</Flexbox>
}
- message={t(`response.${error.type}` as any, { provider: providerName })}
showIcon
+ title={t(`response.${error.type}` as any, { provider: providerName })}
type={'error'}
/>
</Flexbox>
diff --git a/src/app/[variants]/(main)/settings/proxy/features/ProxyForm.tsx b/src/app/[variants]/(main)/settings/proxy/features/ProxyForm.tsx
index c34c708b881..1fe2b3e448d 100644
--- a/src/app/[variants]/(main)/settings/proxy/features/ProxyForm.tsx
+++ b/src/app/[variants]/(main)/settings/proxy/features/ProxyForm.tsx
@@ -1,8 +1,8 @@
'use client';
import { NetworkProxySettings } from '@lobechat/electron-client-ipc';
-import { Alert, Block, Flexbox, Skeleton, Text } from '@lobehub/ui';
-import { App, Button, Divider, Form, Input, Radio, Space, Switch } from 'antd';
+import { Alert, Block, Flexbox, Skeleton, Text , Button } from '@lobehub/ui';
+import { App, Divider, Form, Input, Radio, Space, Switch } from 'antd';
import isEqual from 'fast-deep-equal';
import { useCallback, useEffect, useState } from 'react';
import { useTranslation } from 'react-i18next';
@@ -316,7 +316,7 @@ const ProxyForm = () => {
{!testResult ? null : testResult.success ? (
<Alert
closable
- message={
+ title={
<Flexbox align="center" gap={8} horizontal>
{t('proxy.testSuccessWithTime', { time: testResult.responseTime })}
</Flexbox>
@@ -326,7 +326,7 @@ const ProxyForm = () => {
) : (
<Alert
closable
- message={
+ title={
<Flexbox align="center" gap={8} horizontal>
{t('proxy.testFailed')}: {testResult.message}
</Flexbox>
diff --git a/src/app/[variants]/(main)/settings/usage/features/UsageTable.tsx b/src/app/[variants]/(main)/settings/usage/features/UsageTable.tsx
index 01526b6da1c..802c25919cc 100644
--- a/src/app/[variants]/(main)/settings/usage/features/UsageTable.tsx
+++ b/src/app/[variants]/(main)/settings/usage/features/UsageTable.tsx
@@ -1,6 +1,6 @@
import { ProviderIcon } from '@lobehub/icons';
-import { Flexbox, Tag } from '@lobehub/ui';
-import { Table, TableColumnType, Typography } from 'antd';
+import { Flexbox, Tag, Text } from '@lobehub/ui';
+import { Table, TableColumnType } from 'antd';
import { useTheme } from 'antd-style';
import { memo, useEffect } from 'react';
import { useTranslation } from 'react-i18next';
@@ -53,9 +53,7 @@ const UsageTable = memo<UsageChartProps>(({ dateStrings }) => {
marginRight: -8,
}}
/>
- <Typography.Text>
- {value?.length > 12 ? `${value.slice(0, 12)}...` : value}
- </Typography.Text>
+ <Text>{value?.length > 12 ? `${value.slice(0, 12)}...` : value}</Text>
</Flexbox>
),
title: t('usage.table.model'),
diff --git a/src/app/[variants]/(main)/settings/usage/features/components/UsageBarChart.tsx b/src/app/[variants]/(main)/settings/usage/features/components/UsageBarChart.tsx
index c65e54f4784..c0a58497f55 100644
--- a/src/app/[variants]/(main)/settings/usage/features/components/UsageBarChart.tsx
+++ b/src/app/[variants]/(main)/settings/usage/features/components/UsageBarChart.tsx
@@ -1,6 +1,6 @@
import { BarChart, type BarChartProps, ChartTooltipFrame, ChartTooltipRow } from '@lobehub/charts';
-import { Flexbox } from '@lobehub/ui';
-import { Divider, Typography } from 'antd';
+import { Flexbox, Text } from '@lobehub/ui';
+import { Divider } from 'antd';
export const UsageBarChart = ({ ...props }: BarChartProps) => (
<BarChart
@@ -10,9 +10,9 @@ export const UsageBarChart = ({ ...props }: BarChartProps) => (
return (
<ChartTooltipFrame>
<Flexbox horizontal justify={'space-between'} paddingBlock={8} paddingInline={16}>
- <Typography.Paragraph ellipsis style={{ margin: 0 }}>
+ <Text as={'p'} ellipsis style={{ margin: 0 }}>
{label}
- </Typography.Paragraph>
+ </Text>
<span style={{ fontWeight: 'bold' }}>
{payload.reduce((acc: number, cur: any) => acc + cur.value, 0)}
</span>
diff --git a/src/app/[variants]/(mobile)/chat/settings/features/AgentInfoDescription/index.tsx b/src/app/[variants]/(mobile)/chat/settings/features/AgentInfoDescription/index.tsx
index f41034fa645..7d268a4416c 100644
--- a/src/app/[variants]/(mobile)/chat/settings/features/AgentInfoDescription/index.tsx
+++ b/src/app/[variants]/(mobile)/chat/settings/features/AgentInfoDescription/index.tsx
@@ -2,8 +2,7 @@
import { ProDescriptions } from '@ant-design/pro-components';
import { AgentItemDetail } from '@lobehub/market-sdk';
-import { Flexbox } from '@lobehub/ui';
-import { Tag } from 'antd';
+import { Flexbox , Tag } from '@lobehub/ui';
import Image from 'next/image';
import { memo } from 'react';
import { useTranslation } from 'react-i18next';
diff --git a/src/components/ChatGroupWizard/ChatGroupWizard.tsx b/src/components/ChatGroupWizard/ChatGroupWizard.tsx
index d170838fddf..746a9ed1e42 100644
--- a/src/components/ChatGroupWizard/ChatGroupWizard.tsx
+++ b/src/components/ChatGroupWizard/ChatGroupWizard.tsx
@@ -11,8 +11,8 @@ import {
SearchBar,
Text,
Tooltip,
-} from '@lobehub/ui';
-import { Button, Checkbox, Switch } from 'antd';
+ Button } from '@lobehub/ui';
+import { Checkbox, Switch } from 'antd';
import { createStyles, useTheme } from 'antd-style';
import { omit } from 'es-toolkit/compat';
import { Users } from 'lucide-react';
diff --git a/src/components/KeyValueEditor/index.tsx b/src/components/KeyValueEditor/index.tsx
index 2bca7528e49..209c9acebc5 100644
--- a/src/components/KeyValueEditor/index.tsx
+++ b/src/components/KeyValueEditor/index.tsx
@@ -1,5 +1,4 @@
-import { ActionIcon, Flexbox, Icon } from '@lobehub/ui';
-import { Button } from 'antd';
+import { ActionIcon, Flexbox, Icon , Button } from '@lobehub/ui';
import { createStyles } from 'antd-style';
import fastDeepEqual from 'fast-deep-equal';
import { LucidePlus, LucideTrash } from 'lucide-react';
diff --git a/src/components/MemberSelectionModal/MemberSelectionModal.tsx b/src/components/MemberSelectionModal/MemberSelectionModal.tsx
index 685049c0132..78400981fbc 100644
--- a/src/components/MemberSelectionModal/MemberSelectionModal.tsx
+++ b/src/components/MemberSelectionModal/MemberSelectionModal.tsx
@@ -1,8 +1,18 @@
'use client';
-import { ActionIcon, Avatar, Flexbox, List, Modal, SearchBar, Text, Tooltip } from '@lobehub/ui';
+import {
+ ActionIcon,
+ Avatar,
+ Button,
+ Flexbox,
+ List,
+ Modal,
+ SearchBar,
+ Text,
+ Tooltip,
+} from '@lobehub/ui';
import { useHover } from 'ahooks';
-import { List as AntdList, Button, Checkbox, Switch, Typography } from 'antd';
+import { List as AntdList, Checkbox, Switch } from 'antd';
import { createStyles } from 'antd-style';
import { X } from 'lucide-react';
import { type ChangeEvent, memo, useCallback, useMemo, useRef, useState } from 'react';
@@ -15,8 +25,6 @@ import { useEnabledChatModels } from '@/hooks/useEnabledChatModels';
import { useSessionStore } from '@/store/session';
import { LobeAgentSession, LobeSessionType } from '@/types/session';
-const { Text: AntText } = Typography;
-
const AvailableAgentItem = memo<{
agent: LobeAgentSession;
cx: any;
@@ -52,11 +60,13 @@ const AvailableAgentItem = memo<{
<Avatar animation={isHovering} avatar={avatar} background={avatarBackground} size={40} />
</Flexbox>
<Flexbox flex={1} gap={2} style={{ minWidth: 0 }}>
- <AntText className={styles.title}>{title}</AntText>
+ <Text className={styles.title} weight={500}>
+ {title}
+ </Text>
{description && (
- <AntText className={styles.description} ellipsis>
+ <Text className={styles.description} ellipsis>
{description}
- </AntText>
+ </Text>
)}
</Flexbox>
</Flexbox>
diff --git a/src/features/AgentSetting/AgentTTS/SelectWithTTSPreview.tsx b/src/features/AgentSetting/AgentTTS/SelectWithTTSPreview.tsx
index 58982f49192..691b6ec7a12 100644
--- a/src/features/AgentSetting/AgentTTS/SelectWithTTSPreview.tsx
+++ b/src/features/AgentSetting/AgentTTS/SelectWithTTSPreview.tsx
@@ -108,9 +108,9 @@ const SelectWithTTSPreview = forwardRef<RefSelectProps, SelectWithTTSPreviewProp
</Highlighter>
)
}
- message={error.message}
onClose={handleCloseError}
style={{ alignItems: 'center', width: '100%' }}
+ title={error.message}
type="error"
/>
)}
diff --git a/src/features/ChatInput/ActionBar/STT/common.tsx b/src/features/ChatInput/ActionBar/STT/common.tsx
index 7460c0a61f4..5744b138f50 100644
--- a/src/features/ChatInput/ActionBar/STT/common.tsx
+++ b/src/features/ChatInput/ActionBar/STT/common.tsx
@@ -98,9 +98,9 @@ const CommonSTT = memo<{
</Highlighter>
)
}
- message={error.message}
onClose={handleCloseError}
style={{ alignItems: 'center' }}
+ title={error.message}
type="error"
/>
)
diff --git a/src/features/Conversation/ChatInput/index.tsx b/src/features/Conversation/ChatInput/index.tsx
index 90814bed4b9..70479153f52 100644
--- a/src/features/Conversation/ChatInput/index.tsx
+++ b/src/features/Conversation/ChatInput/index.tsx
@@ -130,8 +130,8 @@ const ChatInput = memo<ChatInputProps>(
<Flexbox paddingBlock={'0 6px'} paddingInline={12}>
<Alert
closable
- message={t('input.errorMsg', { errorMsg: sendMessageErrorMsg })}
onClose={clearSendMessageError}
+ title={t('input.errorMsg', { errorMsg: sendMessageErrorMsg })}
type={'secondary'}
/>
</Flexbox>
diff --git a/src/features/Conversation/Messages/AssistantGroup/Tool/Render/ErrorResponse.tsx b/src/features/Conversation/Messages/AssistantGroup/Tool/Render/ErrorResponse.tsx
index fde1ea1ae49..075c6613ad7 100644
--- a/src/features/Conversation/Messages/AssistantGroup/Tool/Render/ErrorResponse.tsx
+++ b/src/features/Conversation/Messages/AssistantGroup/Tool/Render/ErrorResponse.tsx
@@ -25,8 +25,8 @@ const ErrorResponse = memo<ErrorResponseProps>(({ id, type, body, message, plugi
</Highlighter>
</Flexbox>
}
- message={t(`response.${type}` as any)}
showIcon
+ title={t(`response.${type}` as any)}
type={'secondary'}
/>
);
diff --git a/src/features/Conversation/Messages/Tool/index.tsx b/src/features/Conversation/Messages/Tool/index.tsx
index 276ff0dbb95..bd47f13cde9 100644
--- a/src/features/Conversation/Messages/Tool/index.tsx
+++ b/src/features/Conversation/Messages/Tool/index.tsx
@@ -1,6 +1,5 @@
import { UIChatMessage } from '@lobechat/types';
-import { Alert, Flexbox } from '@lobehub/ui';
-import { Button } from 'antd';
+import { Alert, Flexbox , Button } from '@lobehub/ui';
import isEqual from 'fast-deep-equal';
import { memo, useState } from 'react';
import { useTranslation } from 'react-i18next';
@@ -36,7 +35,7 @@ const ToolMessage = memo<ToolMessageProps>(({ id, index }) => {
{t('inspector.delete')}
</Button>
}
- message={t('inspector.orphanedToolCall')}
+ title={t('inspector.orphanedToolCall')}
type={'secondary'}
/>
{item.plugin && (
diff --git a/src/features/Conversation/Messages/components/Extras/TTS/Player.tsx b/src/features/Conversation/Messages/components/Extras/TTS/Player.tsx
index 6baab870d1b..d906c09c740 100644
--- a/src/features/Conversation/Messages/components/Extras/TTS/Player.tsx
+++ b/src/features/Conversation/Messages/components/Extras/TTS/Player.tsx
@@ -31,9 +31,9 @@ const Player = memo<PlayerProps>(({ onRetry, error, onDelete, audio, isLoading,
</Highlighter>
)
}
- message={error.message}
onClose={onDelete}
style={{ alignItems: 'center', width: '100%' }}
+ title={error.message}
type="error"
/>
) : (
diff --git a/src/features/DataImporter/Error.tsx b/src/features/DataImporter/Error.tsx
index 015f40a15ce..c5e09430b29 100644
--- a/src/features/DataImporter/Error.tsx
+++ b/src/features/DataImporter/Error.tsx
@@ -27,8 +27,8 @@ const Error = memo<ErrorProps>(({ error, onClick }) => {
{JSON.stringify(error, null, 2)}
</Highlighter>
}
- message={error?.message}
style={{ flex: 1 }}
+ title={error?.message}
type={'error'}
/>
<Button onClick={onClick}>{t('close')}</Button>
diff --git a/src/features/DesktopOnboarding/Navigation.tsx b/src/features/DesktopOnboarding/Navigation.tsx
index 9a1d78f972c..75452f9ba7e 100644
--- a/src/features/DesktopOnboarding/Navigation.tsx
+++ b/src/features/DesktopOnboarding/Navigation.tsx
@@ -1,4 +1,4 @@
-import { Button } from 'antd';
+import { Button } from '@lobehub/ui';
import { createStyles } from 'antd-style';
import { ChevronLeft, ChevronRight } from 'lucide-react';
import { m as motion } from 'motion/react';
diff --git a/src/features/MCP/MCPInstallProgress/InstallError/ErrorDetails.tsx b/src/features/MCP/MCPInstallProgress/InstallError/ErrorDetails.tsx
index 7a951464efa..dfdaf473372 100644
--- a/src/features/MCP/MCPInstallProgress/InstallError/ErrorDetails.tsx
+++ b/src/features/MCP/MCPInstallProgress/InstallError/ErrorDetails.tsx
@@ -1,5 +1,4 @@
-import { Flexbox, Highlighter, Icon } from '@lobehub/ui';
-import { Button, Tag } from 'antd';
+import { Flexbox, Highlighter, Icon , Tag , Button } from '@lobehub/ui';
import { useTheme } from 'antd-style';
import { ChevronDown, ChevronRight } from 'lucide-react';
import { m as motion } from 'motion/react';
diff --git a/src/features/MCP/MCPInstallProgress/InstallError/index.tsx b/src/features/MCP/MCPInstallProgress/InstallError/index.tsx
index aea53bb32a6..36d601fb544 100644
--- a/src/features/MCP/MCPInstallProgress/InstallError/index.tsx
+++ b/src/features/MCP/MCPInstallProgress/InstallError/index.tsx
@@ -1,5 +1,4 @@
-import { Alert, Flexbox } from '@lobehub/ui';
-import { Button } from 'antd';
+import { Alert, Flexbox , Button } from '@lobehub/ui';
import { memo } from 'react';
import { useTranslation } from 'react-i18next';
@@ -35,7 +34,7 @@ const InstallError = memo<InstallErrorProps>(({ errorInfo, identifier }) => {
</Button>
</Flexbox>
}
- message={t('mcpInstall.installError', {
+ title={t('mcpInstall.installError', {
detail: t(`mcpInstall.errorTypes.${errorInfo.type}`),
})}
type="error"
diff --git a/src/features/MCP/MCPInstallProgress/MCPConfigForm.tsx b/src/features/MCP/MCPInstallProgress/MCPConfigForm.tsx
index 8a60c394b5a..d46392dcea2 100644
--- a/src/features/MCP/MCPInstallProgress/MCPConfigForm.tsx
+++ b/src/features/MCP/MCPInstallProgress/MCPConfigForm.tsx
@@ -1,5 +1,5 @@
-import { Flexbox, Form, Markdown } from '@lobehub/ui';
-import { Form as AForm, Button } from 'antd';
+import { Flexbox, Form, Markdown , Button } from '@lobehub/ui';
+import { Form as AForm } from 'antd';
import { createStyles } from 'antd-style';
import { m as motion } from 'motion/react';
import { memo, useState } from 'react';
diff --git a/src/features/ModelParamsControl/Temperature.tsx b/src/features/ModelParamsControl/Temperature.tsx
index d80e8c8544e..e0313a30de1 100644
--- a/src/features/ModelParamsControl/Temperature.tsx
+++ b/src/features/ModelParamsControl/Temperature.tsx
@@ -30,8 +30,8 @@ const Warning = memo(() => {
temperature >= 1.5 && (
<Alert
classNames={{ alert: cx(alertCls) }}
- message={t('settingModel.temperature.warning')}
style={{ fontSize: 12 }}
+ title={t('settingModel.temperature.warning')}
type={'warning'}
variant={'borderless'}
/>
diff --git a/src/features/OllamaModelDownloader/index.tsx b/src/features/OllamaModelDownloader/index.tsx
index f24827f2ab5..16c9cdd4d75 100644
--- a/src/features/OllamaModelDownloader/index.tsx
+++ b/src/features/OllamaModelDownloader/index.tsx
@@ -104,8 +104,8 @@ const OllamaModelDownloader = memo<OllamaModelDownloaderProps>(
<Alert
closable
description={error.message}
- message={t('ollama.download.failed')}
showIcon={false}
+ title={t('ollama.download.failed')}
type={'error'}
/>
)}
diff --git a/src/features/PlanIcon/index.tsx b/src/features/PlanIcon/index.tsx
index 8892f109748..1e9fe1fd357 100644
--- a/src/features/PlanIcon/index.tsx
+++ b/src/features/PlanIcon/index.tsx
@@ -1,5 +1,4 @@
-import { Center, Flexbox, Icon } from '@lobehub/ui';
-import { Tag } from 'antd';
+import { Center, Flexbox, Icon , Tag } from '@lobehub/ui';
import { createStyles } from 'antd-style';
import { Atom, Box, CircleSlash, Sparkle, Zap } from 'lucide-react';
import { CSSProperties, MouseEvent, memo } from 'react';
diff --git a/src/features/PluginDevModal/MCPManifestForm/QuickImportSection.tsx b/src/features/PluginDevModal/MCPManifestForm/QuickImportSection.tsx
index d5e6073d6a6..709fa43cd43 100644
--- a/src/features/PluginDevModal/MCPManifestForm/QuickImportSection.tsx
+++ b/src/features/PluginDevModal/MCPManifestForm/QuickImportSection.tsx
@@ -1,5 +1,5 @@
-import { Alert, Flexbox, TextArea } from '@lobehub/ui';
-import { Button, FormInstance } from 'antd';
+import { Alert, Flexbox, TextArea , Button } from '@lobehub/ui';
+import { FormInstance } from 'antd';
import { useState } from 'react';
import { useTranslation } from 'react-i18next';
@@ -112,7 +112,7 @@ const QuickImportSection = ({
return (
<Flexbox gap={8}>
{importError && (
- <Alert message={importError} showIcon style={{ marginBottom: 8 }} type="error" />
+ <Alert showIcon style={{ marginBottom: 8 }} title={importError} type="error" />
)}
<TextArea
autoSize={{ maxRows: 15, minRows: 10 }}
diff --git a/src/features/PluginDevModal/MCPManifestForm/index.tsx b/src/features/PluginDevModal/MCPManifestForm/index.tsx
index 6f2477557a3..8d4fdcd2089 100644
--- a/src/features/PluginDevModal/MCPManifestForm/index.tsx
+++ b/src/features/PluginDevModal/MCPManifestForm/index.tsx
@@ -1,5 +1,5 @@
-import { Alert, Flexbox, FormItem, Input, InputPassword } from '@lobehub/ui';
-import { Button, Divider, Form, FormInstance, Radio } from 'antd';
+import { Alert, Flexbox, FormItem, Input, InputPassword , Button } from '@lobehub/ui';
+import { Divider, Form, FormInstance, Radio } from 'antd';
import isEqual from 'fast-deep-equal';
import { useState } from 'react';
import { useTranslation } from 'react-i18next';
@@ -270,10 +270,10 @@ const MCPManifestForm = ({ form, isEditMode }: MCPManifestFormProps) => {
{(connectionError || testState.error) && (
<Alert
closable
- message={connectionError || testState.error}
onClose={() => setConnectionError(null)}
showIcon
style={{ marginBottom: 16 }}
+ title={connectionError || testState.error}
type="error"
/>
)}
diff --git a/src/features/PluginDevModal/PluginPreview/index.tsx b/src/features/PluginDevModal/PluginPreview/index.tsx
index 4cb908dd82d..74c0a2bbc63 100644
--- a/src/features/PluginDevModal/PluginPreview/index.tsx
+++ b/src/features/PluginDevModal/PluginPreview/index.tsx
@@ -1,6 +1,6 @@
import { LobeChatPluginManifest } from '@lobehub/chat-plugin-sdk';
-import { Block, Flexbox, Icon, Text } from '@lobehub/ui';
-import { Form as AForm, Button, FormInstance } from 'antd';
+import { Block, Flexbox, Icon, Text , Button } from '@lobehub/ui';
+import { Form as AForm, FormInstance } from 'antd';
import { useTheme } from 'antd-style';
import { FileCode } from 'lucide-react';
import { memo } from 'react';
diff --git a/src/features/PluginDevModal/index.tsx b/src/features/PluginDevModal/index.tsx
index b91b3741946..6f7ead1bb43 100644
--- a/src/features/PluginDevModal/index.tsx
+++ b/src/features/PluginDevModal/index.tsx
@@ -172,7 +172,8 @@ const DevModal = memo<DevModalProps>(
{configMode === 'url' && (
<>
<Alert
- message={
+ showIcon
+ title={
<Trans i18nKey={'dev.modalDesc'} ns={'plugin'}>
添加自定义插件后,可用于插件开发验证,也可直接在会话中使用。插件开发文档请参考:
<a
@@ -186,7 +187,6 @@ const DevModal = memo<DevModalProps>(
<Icon icon={MoveUpRight} />
</Trans>
}
- showIcon
type={'info'}
/>
<UrlManifestForm form={form} isEditMode={isEditMode} />
diff --git a/src/features/PluginStore/McpList/Detail/Settings/index.tsx b/src/features/PluginStore/McpList/Detail/Settings/index.tsx
index 2fc9cd52e44..7d02d5c4ae7 100644
--- a/src/features/PluginStore/McpList/Detail/Settings/index.tsx
+++ b/src/features/PluginStore/McpList/Detail/Settings/index.tsx
@@ -1,5 +1,5 @@
-import { Flexbox, Icon, Input, Text } from '@lobehub/ui';
-import { Form as AForm, App, Button, Space } from 'antd';
+import { Button, Flexbox, Icon, Input, Text } from '@lobehub/ui';
+import { Form as AForm, App, Space } from 'antd';
import { createStyles } from 'antd-style';
import { EditIcon, LinkIcon, SaveIcon, Settings2Icon, TerminalIcon } from 'lucide-react';
import { memo, useState } from 'react';
diff --git a/src/features/ProtocolUrlHandler/InstallPlugin/CustomPluginInstallModal.tsx b/src/features/ProtocolUrlHandler/InstallPlugin/CustomPluginInstallModal.tsx
index aa28be6bb09..782e5615721 100644
--- a/src/features/ProtocolUrlHandler/InstallPlugin/CustomPluginInstallModal.tsx
+++ b/src/features/ProtocolUrlHandler/InstallPlugin/CustomPluginInstallModal.tsx
@@ -140,8 +140,8 @@ const CustomPluginInstallModal = memo<CustomPluginInstallModalProps>(
if (!isMarketplace) {
return (
<Alert
- message={t('protocolInstall.custom.security.description')}
showIcon
+ title={t('protocolInstall.custom.security.description')}
type="warning"
variant={'borderless'}
/>
@@ -151,15 +151,15 @@ const CustomPluginInstallModal = memo<CustomPluginInstallModalProps>(
// marketplace 类型
return marketplace ? (
<Alert
- message={t('protocolInstall.marketplace.trustedBy', { name: marketplace.name })}
showIcon
+ title={t('protocolInstall.marketplace.trustedBy', { name: marketplace.name })}
type="success"
variant={'borderless'}
/>
) : (
<Alert
- message={t('protocolInstall.marketplace.unverified.warning')}
showIcon
+ title={t('protocolInstall.marketplace.unverified.warning')}
type="warning"
variant={'borderless'}
/>
@@ -209,8 +209,8 @@ const CustomPluginInstallModal = memo<CustomPluginInstallModalProps>(
<Alert
closable
description={testState.error}
- message={t('protocolInstall.messages.connectionTestFailed')}
showIcon
+ title={t('protocolInstall.messages.connectionTestFailed')}
type="error"
variant={'filled'}
/>
diff --git a/src/features/ResourceManager/components/Explorer/MoveToFolderModal.tsx b/src/features/ResourceManager/components/Explorer/MoveToFolderModal.tsx
index ebafa31cfd5..a940517a3f7 100644
--- a/src/features/ResourceManager/components/Explorer/MoveToFolderModal.tsx
+++ b/src/features/ResourceManager/components/Explorer/MoveToFolderModal.tsx
@@ -1,5 +1,5 @@
-import { Flexbox, Modal } from '@lobehub/ui';
-import { App, Button } from 'antd';
+import { Flexbox, Modal , Button } from '@lobehub/ui';
+import { App } from 'antd';
import { memo, useCallback, useEffect, useState } from 'react';
import { useTranslation } from 'react-i18next';
diff --git a/src/app/[variants]/(main)/chat/features/Conversation/ZenModeToast/Toast.tsx b/src/features/ZenModeToast/Toast.tsx
similarity index 100%
rename from src/app/[variants]/(main)/chat/features/Conversation/ZenModeToast/Toast.tsx
rename to src/features/ZenModeToast/Toast.tsx
diff --git a/src/app/[variants]/(main)/chat/features/Conversation/ZenModeToast/index.tsx b/src/features/ZenModeToast/index.tsx
similarity index 100%
rename from src/app/[variants]/(main)/chat/features/Conversation/ZenModeToast/index.tsx
rename to src/features/ZenModeToast/index.tsx
diff --git a/src/layout/AuthProvider/MarketAuth/ProfileSetupModal.tsx b/src/layout/AuthProvider/MarketAuth/ProfileSetupModal.tsx
index 0ef4d085386..cc9ac9bfc1e 100644
--- a/src/layout/AuthProvider/MarketAuth/ProfileSetupModal.tsx
+++ b/src/layout/AuthProvider/MarketAuth/ProfileSetupModal.tsx
@@ -1,8 +1,8 @@
'use client';
import { SiGithub, SiX } from '@icons-pack/react-simple-icons';
-import { Center, Flexbox, Modal, Text } from '@lobehub/ui';
-import { App, Divider, Form, Input, Tooltip, Upload, UploadProps } from 'antd';
+import { Center, Flexbox, Modal, Text , Tooltip } from '@lobehub/ui';
+import { App, Divider, Form, Input, Upload, UploadProps } from 'antd';
import { useTheme } from 'antd-style';
import { CircleHelp, Globe, ImagePlus, Trash2 } from 'lucide-react';
import { memo, useCallback, useEffect, useState } from 'react';
diff --git a/src/tools/code-interpreter-draft/Render/index.tsx b/src/tools/code-interpreter-draft/Render/index.tsx
index 0c1b05234ea..80d796026ac 100644
--- a/src/tools/code-interpreter-draft/Render/index.tsx
+++ b/src/tools/code-interpreter-draft/Render/index.tsx
@@ -53,8 +53,8 @@ const CodeInterpreter = memo<
{!isExecuting && pluginState?.error && (
<Alert
description={String(pluginState.error)}
- message={t('codeInterpreter.error')}
showIcon
+ title={t('codeInterpreter.error')}
type="error"
/>
)}
diff --git a/src/tools/local-system/Render/EditLocalFile/index.tsx b/src/tools/local-system/Render/EditLocalFile/index.tsx
index 1103af4acd9..f331c463b50 100644
--- a/src/tools/local-system/Render/EditLocalFile/index.tsx
+++ b/src/tools/local-system/Render/EditLocalFile/index.tsx
@@ -42,8 +42,8 @@ const EditLocalFile = memo<BuiltinRenderProps<EditLocalFileParams, EditLocalFile
{pluginError ? (
<Alert
description={pluginError.message || 'Unknown error occurred'}
- message="Edit Failed"
showIcon
+ title="Edit Failed"
type="error"
/>
) : (
diff --git a/src/tools/web-browsing/Portal/PageContent/index.tsx b/src/tools/web-browsing/Portal/PageContent/index.tsx
index a35891acbe2..a625c603b98 100644
--- a/src/tools/web-browsing/Portal/PageContent/index.tsx
+++ b/src/tools/web-browsing/Portal/PageContent/index.tsx
@@ -130,7 +130,7 @@ const PageContent = memo<PageContentProps>(({ result }) => {
<Highlighter language={'json'}>{JSON.stringify(result.data, null, 2)}</Highlighter>
</div>
}
- message={
+ title={
<div style={{ textAlign: 'start' }}>
{result.data.errorMessage || result.data.content}
</div>
@@ -212,7 +212,7 @@ const PageContent = memo<PageContentProps>(({ result }) => {
</Flexbox>
{content.length > CRAWL_CONTENT_LIMITED_COUNT && (
<Alert
- message={t('search.crawPages.detail.tooLong', {
+ title={t('search.crawPages.detail.tooLong', {
characters: CRAWL_CONTENT_LIMITED_COUNT,
})}
variant={'borderless'}
diff --git a/src/tools/web-browsing/Portal/Search/ResultList/SearchItem/Video.tsx b/src/tools/web-browsing/Portal/Search/ResultList/SearchItem/Video.tsx
index 3df74b2748d..51ad9a551f1 100644
--- a/src/tools/web-browsing/Portal/Search/ResultList/SearchItem/Video.tsx
+++ b/src/tools/web-browsing/Portal/Search/ResultList/SearchItem/Video.tsx
@@ -1,6 +1,5 @@
import { UniformSearchResult } from '@lobechat/types';
-import { Flexbox, Text } from '@lobehub/ui';
-import { Avatar as AntAvatar } from 'antd';
+import { Avatar, Flexbox, Text } from '@lobehub/ui';
import { createStyles } from 'antd-style';
import { memo, useState } from 'react';
@@ -98,20 +97,15 @@ const VideoItem = memo<SearchResultProps>(
<Flexbox flex={1} gap={8}>
<Flexbox align={'center'} distribution={'space-between'} gap={12} horizontal>
<Flexbox align={'center'} gap={8} horizontal>
- <AntAvatar.Group>
- {engines.map((engine) => (
- <AntAvatar
- key={engine}
- src={ENGINE_ICON_MAP[engine]}
- style={{
- background: theme.colorBgLayout,
- height: 20,
- padding: 3,
- width: 20,
- }}
- />
- ))}
- </AntAvatar.Group>
+ <Avatar.Group
+ items={engines.map((engine) => ({
+ avatar: ENGINE_ICON_MAP[engine],
+ background: theme.colorBgLayout,
+ key: engine,
+ title: engine,
+ }))}
+ size={20}
+ />
<Flexbox className={styles.title}>{title}</Flexbox>
</Flexbox>
<TitleExtra
diff --git a/src/tools/web-browsing/Render/PageContent/Result.tsx b/src/tools/web-browsing/Render/PageContent/Result.tsx
index 99ce5f8e6ba..87a26ccce94 100644
--- a/src/tools/web-browsing/Render/PageContent/Result.tsx
+++ b/src/tools/web-browsing/Render/PageContent/Result.tsx
@@ -96,9 +96,7 @@ const CrawlerResultCard = memo<CrawlerData>(({ result, messageId, crawler, origi
return (
<Flexbox className={styles.footer} gap={8}>
<Alert
- message={
- <div style={{ textAlign: 'start' }}>{result.errorMessage || result.content}</div>
- }
+ title={<div style={{ textAlign: 'start' }}>{result.errorMessage || result.content}</div>}
type={'error'}
variant={'borderless'}
/>
diff --git a/src/tools/web-browsing/Render/Search/SearchResult/index.tsx b/src/tools/web-browsing/Render/Search/SearchResult/index.tsx
index 2cd5b8c0578..dec01306654 100644
--- a/src/tools/web-browsing/Render/Search/SearchResult/index.tsx
+++ b/src/tools/web-browsing/Render/Search/SearchResult/index.tsx
@@ -1,6 +1,5 @@
import { SearchQuery, UniformSearchResponse } from '@lobechat/types';
-import { Flexbox, Icon, Skeleton, Text } from '@lobehub/ui';
-import { Button } from 'antd';
+import { Flexbox, Icon, Skeleton, Text , Button } from '@lobehub/ui';
import { uniq } from 'es-toolkit/compat';
import { Edit2Icon } from 'lucide-react';
import { memo } from 'react';
diff --git a/src/tools/web-browsing/Render/Search/index.tsx b/src/tools/web-browsing/Render/Search/index.tsx
index 38e04d0d6c3..561126cd6a9 100644
--- a/src/tools/web-browsing/Render/Search/index.tsx
+++ b/src/tools/web-browsing/Render/Search/index.tsx
@@ -24,7 +24,7 @@ const Search = memo<BuiltinRenderProps<SearchQuery, UniformSearchResponse>>(
</Highlighter>
</Flexbox>
}
- message={pluginError?.message}
+ title={pluginError?.message}
type={'error'}
/>
);
diff --git a/src/tools/web-browsing/components/CategoryAvatar.tsx b/src/tools/web-browsing/components/CategoryAvatar.tsx
index 2fab7a7740a..8d3709f91e4 100644
--- a/src/tools/web-browsing/components/CategoryAvatar.tsx
+++ b/src/tools/web-browsing/components/CategoryAvatar.tsx
@@ -1,4 +1,4 @@
-import { Avatar } from 'antd';
+import { Avatar } from '@lobehub/ui';
import { useTheme } from 'antd-style';
import { memo } from 'react';
diff --git a/src/tools/web-browsing/components/EngineAvatar.tsx b/src/tools/web-browsing/components/EngineAvatar.tsx
index ac955a7ddfc..a9c14b42129 100644
--- a/src/tools/web-browsing/components/EngineAvatar.tsx
+++ b/src/tools/web-browsing/components/EngineAvatar.tsx
@@ -1,4 +1,4 @@
-import { Avatar } from 'antd';
+import { Avatar } from '@lobehub/ui';
import { useTheme } from 'antd-style';
import { memo } from 'react';
@@ -19,20 +19,14 @@ export const EngineAvatar = memo<EngineAvatarProps>(({ engine }) => (
export const EngineAvatarGroup = memo<EngineAvatarGroupProps>(({ engines }) => {
const theme = useTheme();
return (
- <Avatar.Group>
- {engines.map((engine, index) => (
- <Avatar
- key={engine}
- src={ENGINE_ICON_MAP[engine]}
- style={{
- background: theme.colorBgLayout,
- height: 20,
- padding: 3,
- width: 20,
- zIndex: 100 - index,
- }}
- />
- ))}
- </Avatar.Group>
+ <Avatar.Group
+ items={engines.map((engine) => ({
+ avatar: ENGINE_ICON_MAP[engine],
+ background: theme.colorBgLayout,
+ key: engine,
+ title: engine,
+ }))}
+ size={20}
+ />
);
});