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.

chore: update antd v6

canisminor1990511d6acef5e6
diff --git a/package.json b/package.json
index 5205c5839fe..b80fa3ff790 100644
--- a/package.json
+++ b/package.json
@@ -132,7 +132,7 @@
"stylelint-config-clean-order": "7.0.0"
},
"dependencies": {
- "@ant-design/icons": "^5.6.1",
+ "@ant-design/icons": "^6.1.0",
"@ant-design/pro-components": "^2.8.10",
"@anthropic-ai/sdk": "^0.67.1",
"@atlaskit/pragmatic-drag-and-drop": "^1.7.7",
@@ -145,18 +145,18 @@
"@better-auth/expo": "^1.4.6",
"@better-auth/passkey": "^1.4.6",
"@cfworker/json-schema": "^4.1.1",
- "@clerk/localizations": "^3.30.1",
- "@clerk/nextjs": "^6.36.2",
- "@clerk/themes": "^2.4.43",
+ "@clerk/localizations": "^3.32.1",
+ "@clerk/nextjs": "^6.36.5",
+ "@clerk/themes": "^2.4.46",
"@codesandbox/sandpack-react": "^2.20.0",
"@cyntler/react-doc-viewer": "^1.17.1",
"@dnd-kit/core": "^6.3.1",
"@dnd-kit/utilities": "^3.2.2",
"@electric-sql/pglite": "0.2.17",
"@emotion/react": "^11.14.0",
- "@fal-ai/client": "^1.7.2",
+ "@fal-ai/client": "^1.8.0",
"@formkit/auto-animate": "^0.9.0",
- "@google/genai": "^1.33.0",
+ "@google/genai": "^1.34.0",
"@henrygd/queue": "^1.2.0",
"@huggingface/inference": "^4.13.5",
"@icons-pack/react-simple-icons": "^13.8.0",
@@ -188,32 +188,31 @@
"@lobechat/utils": "workspace:*",
"@lobechat/web-crawler": "workspace:*",
"@lobehub/analytics": "^1.6.0",
- "@lobehub/charts": "^2.1.2",
+ "@lobehub/charts": "^3.0.0",
"@lobehub/chat-plugin-sdk": "^1.32.4",
"@lobehub/chat-plugins-gateway": "^1.9.0",
"@lobehub/desktop-ipc-typings": "workspace:*",
- "@lobehub/editor": "^1.34.4",
- "@lobehub/icons": "^2.45.0",
+ "@lobehub/editor": "^2.0.1",
+ "@lobehub/icons": "^3.0.0",
"@lobehub/market-sdk": "^0.23.8",
- "@lobehub/tts": "^2.0.1",
- "@lobehub/ui": "^2.24.2",
- "@modelcontextprotocol/sdk": "^1.24.3",
+ "@lobehub/tts": "^3.0.0",
+ "@lobehub/ui": "^3.2.0",
+ "@modelcontextprotocol/sdk": "^1.25.1",
"@neondatabase/serverless": "^1.0.2",
- "@next/third-parties": "^16.0.10",
+ "@next/third-parties": "^16.1.0",
"@opentelemetry/exporter-jaeger": "^2.2.0",
"@opentelemetry/winston-transport": "^0.19.0",
"@react-pdf/renderer": "^4.3.1",
- "@react-spring/web": "^9.7.5",
"@react-three/drei": "^10.7.7",
"@react-three/fiber": "^9.4.2",
"@saintno/comfyui-sdk": "^0.2.49",
- "@serwist/next": "^9.2.3",
- "@t3-oss/env-nextjs": "^0.13.8",
+ "@serwist/next": "^9.3.0",
+ "@t3-oss/env-nextjs": "^0.13.10",
"@tanstack/react-query": "^5.90.12",
- "@trpc/client": "^11.7.2",
- "@trpc/next": "^11.7.2",
- "@trpc/react-query": "^11.7.2",
- "@trpc/server": "^11.7.2",
+ "@trpc/client": "^11.8.1",
+ "@trpc/next": "^11.8.1",
+ "@trpc/react-query": "^11.8.1",
+ "@trpc/server": "^11.8.1",
"@upstash/qstash": "^2.8.4",
"@upstash/redis": "^1.35.8",
"@upstash/workflow": "^0.2.23",
@@ -225,10 +224,10 @@
"@xterm/xterm": "^5.5.0",
"@zumer/snapdom": "^1.9.14",
"ahooks": "^3.9.6",
- "antd": "^5.29.1",
+ "antd": "^6.1.1",
"antd-style": "^3.7.1",
"async-retry": "^1.3.3",
- "better-auth": "^1.4.6",
+ "better-auth": "^1.4.7",
"better-auth-harmony": "^1.2.5",
"brotli-wasm": "^3.0.1",
"chroma-js": "^3.2.0",
@@ -248,10 +247,10 @@
"file-type": "^21.1.1",
"gray-matter": "^4.0.3",
"html-to-text": "^9.0.5",
- "i18next": "^25.7.2",
+ "i18next": "^25.7.3",
"i18next-browser-languagedetector": "^8.2.0",
"i18next-resources-to-backend": "^1.2.1",
- "immer": "^10.2.0",
+ "immer": "^11.1.0",
"ioredis": "^5.8.2",
"jose": "^6.1.3",
"js-sha256": "^0.11.1",
@@ -260,15 +259,15 @@
"langchain": "^0.3.36",
"langfuse": "^3.38.6",
"langfuse-core": "^3.38.6",
- "lucide-react": "^0.553.0",
+ "lucide-react": "^0.562.0",
"mammoth": "^1.11.0",
"markdown-to-txt": "^2.0.1",
- "marked": "^16.4.2",
+ "marked": "^17.0.1",
"mdast-util-to-markdown": "^2.1.2",
"model-bank": "workspace:*",
"motion": "^12.23.26",
"nanoid": "^5.1.6",
- "next": "^16.0.10",
+ "next": "^16.1.0",
"next-auth": "5.0.0-beta.30",
"next-mdx-remote": "^5.0.0",
"nextjs-toploader": "^3.9.17",
@@ -304,13 +303,13 @@
"react-dom": "^19.2.3",
"react-fast-marquee": "^1.6.5",
"react-hotkeys-hook": "^5.2.1",
- "react-i18next": "^15.7.4",
+ "react-i18next": "^16.5.0",
"react-layout-kit": "^2.0.1",
"react-lazy-load": "^4.0.1",
"react-pdf": "^9.2.1",
"react-responsive": "^10.0.1",
"react-rnd": "^10.5.2",
- "react-router-dom": "^7.10.1",
+ "react-router-dom": "^7.11.0",
"react-scan": "^0.4.3",
"react-virtuoso": "^4.17.0",
"react-wrap-balancer": "^1.1.1",
@@ -327,7 +326,7 @@
"stripe": "^17.7.0",
"superjson": "^2.2.6",
"svix": "^1.82.0",
- "swr": "^2.3.7",
+ "swr": "^2.3.8",
"systemjs": "^6.15.1",
"three": "^0.181.2",
"tokenx": "^1.2.1",
@@ -338,7 +337,7 @@
"url-join": "^5.0.0",
"use-merge-value": "^1.2.0",
"uuid": "^13.0.0",
- "virtua": "^0.47.2",
+ "virtua": "^0.48.2",
"word-extractor": "^1.0.4",
"ws": "^8.18.3",
"xast-util-to-xml": "^4.0.0",
@@ -350,23 +349,23 @@
"zustand-utils": "^2.1.1"
},
"devDependencies": {
- "@ast-grep/napi": "^0.40.0",
+ "@ast-grep/napi": "^0.40.3",
"@commitlint/cli": "^19.8.1",
"@edge-runtime/vm": "^5.0.0",
- "@huggingface/tasks": "^0.19.69",
+ "@huggingface/tasks": "^0.19.74",
"@lobechat/types": "workspace:*",
"@lobehub/i18n-cli": "^1.25.1",
"@lobehub/lint": "^1.26.3",
"@lobehub/market-types": "^1.11.5",
"@lobehub/seo-cli": "^1.7.0",
- "@next/bundle-analyzer": "^16.0.10",
+ "@next/bundle-analyzer": "^16.1.0",
"@next/eslint-plugin-next": "^15.5.9",
"@peculiar/webcrypto": "^1.5.0",
"@playwright/test": "^1.57.0",
"@prettier/sync": "^0.6.1",
"@semantic-release/exec": "^6.0.3",
"@testing-library/jest-dom": "^6.9.1",
- "@testing-library/react": "^16.3.0",
+ "@testing-library/react": "^16.3.1",
"@testing-library/user-event": "^14.6.1",
"@types/async-retry": "^1.4.9",
"@types/chroma-js": "^3.1.2",
@@ -375,7 +374,7 @@
"@types/fs-extra": "^11.0.4",
"@types/ip": "^1.1.3",
"@types/json-schema": "^7.0.15",
- "@types/node": "^24.10.3",
+ "@types/node": "^24.10.4",
"@types/nodemailer": "^7.0.4",
"@types/numeral": "^2.0.5",
"@types/oidc-provider": "^9.5.0",
@@ -408,13 +407,13 @@
"eslint": "^8.57.1",
"eslint-plugin-mdx": "^3.6.2",
"fake-indexeddb": "^6.2.5",
- "fs-extra": "^11.3.2",
+ "fs-extra": "^11.3.3",
"glob": "^11.1.0",
"happy-dom": "^20.0.11",
"husky": "^9.1.7",
- "import-in-the-middle": "^2.0.0",
+ "import-in-the-middle": "^2.0.1",
"just-diff": "^6.0.2",
- "knip": "^5.73.4",
+ "knip": "^5.76.1",
"lint-staged": "^16.2.7",
"markdown-table": "^3.0.4",
"mcp-hello-world": "^1.1.2",
@@ -430,14 +429,14 @@
"remark-parse": "^11.0.0",
"require-in-the-middle": "^8.0.1",
"semantic-release": "^21.1.2",
- "serwist": "^9.2.3",
+ "serwist": "^9.3.0",
"stylelint": "^15.11.0",
"tsx": "^4.21.0",
"type-fest": "^5.3.1",
"typescript": "^5.9.3",
"unified": "^11.0.5",
"unist-util-visit": "^5.0.0",
- "vite": "^7.2.7",
+ "vite": "^7.3.0",
"vitest": "^3.2.4"
},
"packageManager": "[email protected]",
diff --git a/packages/builtin-tool-agent-builder/package.json b/packages/builtin-tool-agent-builder/package.json
index 2a1744d8b79..4901d1b6535 100644
--- a/packages/builtin-tool-agent-builder/package.json
+++ b/packages/builtin-tool-agent-builder/package.json
@@ -16,7 +16,7 @@
},
"peerDependencies": {
"@lobehub/ui": "*",
- "antd": "^5",
+ "antd": "*",
"lucide-react": "*",
"next": "*",
"react": "*",
diff --git a/packages/builtin-tool-knowledge-base/package.json b/packages/builtin-tool-knowledge-base/package.json
index 33e03dc2373..e02aa54ca9c 100644
--- a/packages/builtin-tool-knowledge-base/package.json
+++ b/packages/builtin-tool-knowledge-base/package.json
@@ -14,7 +14,7 @@
},
"peerDependencies": {
"@lobehub/ui": "*",
- "antd": "^5",
+ "antd": "*",
"antd-style": "*",
"polished": "*",
"react": "*",
diff --git a/src/app/[variants]/(main)/chat/_layout/Sidebar/Header/Agent/SwitchPanel.tsx b/src/app/[variants]/(main)/chat/_layout/Sidebar/Header/Agent/SwitchPanel.tsx
index 64d5a7d765a..487ed1d0bf2 100644
--- a/src/app/[variants]/(main)/chat/_layout/Sidebar/Header/Agent/SwitchPanel.tsx
+++ b/src/app/[variants]/(main)/chat/_layout/Sidebar/Header/Agent/SwitchPanel.tsx
@@ -30,7 +30,7 @@ const SwitchPanel = memo<PropsWithChildren>(({ children }) => {
}
placement={'bottomLeft'}
styles={{
- body: {
+ container: {
padding: 0,
width: 240,
},
diff --git a/src/app/[variants]/(main)/chat/_layout/Sidebar/Topic/List/Item/Editing.tsx b/src/app/[variants]/(main)/chat/_layout/Sidebar/Topic/List/Item/Editing.tsx
index c9af4d443f7..84290ae40e9 100644
--- a/src/app/[variants]/(main)/chat/_layout/Sidebar/Topic/List/Item/Editing.tsx
+++ b/src/app/[variants]/(main)/chat/_layout/Sidebar/Topic/List/Item/Editing.tsx
@@ -72,7 +72,7 @@ const Editing = memo<EditingProps>(({ id, title, toggleEditing }) => {
open={editing}
placement={'bottomLeft'}
styles={{
- body: {
+ container: {
padding: 4,
width: 320,
},
diff --git a/src/app/[variants]/(main)/chat/_layout/Sidebar/Topic/TopicListContent/ThreadList/ThreadItem/Editing.tsx b/src/app/[variants]/(main)/chat/_layout/Sidebar/Topic/TopicListContent/ThreadList/ThreadItem/Editing.tsx
index ff665e84074..f7cc96a894d 100644
--- a/src/app/[variants]/(main)/chat/_layout/Sidebar/Topic/TopicListContent/ThreadList/ThreadItem/Editing.tsx
+++ b/src/app/[variants]/(main)/chat/_layout/Sidebar/Topic/TopicListContent/ThreadList/ThreadItem/Editing.tsx
@@ -51,7 +51,7 @@ const Editing = memo<EditingProps>(({ id, title, toggleEditing }) => {
open={editing}
placement={'bottomLeft'}
styles={{
- body: {
+ container: {
padding: 4,
width: 320,
},
diff --git a/src/app/[variants]/(main)/chat/features/Conversation/ChatMinimap/MinimapIndicator.tsx b/src/app/[variants]/(main)/chat/features/Conversation/ChatMinimap/MinimapIndicator.tsx
index 95638009239..96407b8ec40 100644
--- a/src/app/[variants]/(main)/chat/features/Conversation/ChatMinimap/MinimapIndicator.tsx
+++ b/src/app/[variants]/(main)/chat/features/Conversation/ChatMinimap/MinimapIndicator.tsx
@@ -33,7 +33,7 @@ export const MinimapIndicator = memo<MinimapIndicatorProps>(
mouseEnterDelay={0.1}
placement={'left'}
styles={{
- body: {
+ container: {
width: 320,
},
}}
diff --git a/src/app/[variants]/(main)/group/_layout/Sidebar/GroupConfig/AgentProfilePopup.tsx b/src/app/[variants]/(main)/group/_layout/Sidebar/GroupConfig/AgentProfilePopup.tsx
index e7c36b36b81..4c78b1f1ab2 100644
--- a/src/app/[variants]/(main)/group/_layout/Sidebar/GroupConfig/AgentProfilePopup.tsx
+++ b/src/app/[variants]/(main)/group/_layout/Sidebar/GroupConfig/AgentProfilePopup.tsx
@@ -175,7 +175,7 @@ const AgentProfilePopup = memo<AgentProfilePopupProps>(({ agent, groupId, childr
open={open}
placement="right"
styles={{
- body: { overflow: 'hidden', padding: 0 },
+ container: { overflow: 'hidden', padding: 0 },
}}
trigger={['click']}
>
diff --git a/src/app/[variants]/(main)/group/_layout/Sidebar/Header/Agent/SwitchPanel.tsx b/src/app/[variants]/(main)/group/_layout/Sidebar/Header/Agent/SwitchPanel.tsx
index 64d5a7d765a..487ed1d0bf2 100644
--- a/src/app/[variants]/(main)/group/_layout/Sidebar/Header/Agent/SwitchPanel.tsx
+++ b/src/app/[variants]/(main)/group/_layout/Sidebar/Header/Agent/SwitchPanel.tsx
@@ -30,7 +30,7 @@ const SwitchPanel = memo<PropsWithChildren>(({ children }) => {
}
placement={'bottomLeft'}
styles={{
- body: {
+ container: {
padding: 0,
width: 240,
},
diff --git a/src/app/[variants]/(main)/group/_layout/Sidebar/Topic/List/Item/Editing.tsx b/src/app/[variants]/(main)/group/_layout/Sidebar/Topic/List/Item/Editing.tsx
index c9af4d443f7..84290ae40e9 100644
--- a/src/app/[variants]/(main)/group/_layout/Sidebar/Topic/List/Item/Editing.tsx
+++ b/src/app/[variants]/(main)/group/_layout/Sidebar/Topic/List/Item/Editing.tsx
@@ -72,7 +72,7 @@ const Editing = memo<EditingProps>(({ id, title, toggleEditing }) => {
open={editing}
placement={'bottomLeft'}
styles={{
- body: {
+ container: {
padding: 4,
width: 320,
},
diff --git a/src/app/[variants]/(main)/group/_layout/Sidebar/Topic/TopicListContent/ThreadList/ThreadItem/Editing.tsx b/src/app/[variants]/(main)/group/_layout/Sidebar/Topic/TopicListContent/ThreadList/ThreadItem/Editing.tsx
index ff665e84074..f7cc96a894d 100644
--- a/src/app/[variants]/(main)/group/_layout/Sidebar/Topic/TopicListContent/ThreadList/ThreadItem/Editing.tsx
+++ b/src/app/[variants]/(main)/group/_layout/Sidebar/Topic/TopicListContent/ThreadList/ThreadItem/Editing.tsx
@@ -51,7 +51,7 @@ const Editing = memo<EditingProps>(({ id, title, toggleEditing }) => {
open={editing}
placement={'bottomLeft'}
styles={{
- body: {
+ container: {
padding: 4,
width: 320,
},
diff --git a/src/app/[variants]/(main)/home/_layout/Body/Agent/List/AgentGroupItem/Editing.tsx b/src/app/[variants]/(main)/home/_layout/Body/Agent/List/AgentGroupItem/Editing.tsx
index 1aa0872233c..d199644b816 100644
--- a/src/app/[variants]/(main)/home/_layout/Body/Agent/List/AgentGroupItem/Editing.tsx
+++ b/src/app/[variants]/(main)/home/_layout/Body/Agent/List/AgentGroupItem/Editing.tsx
@@ -62,7 +62,7 @@ const Editing = memo<EditingProps>(({ id, title, toggleEditing }) => {
open={editing}
placement={'bottomLeft'}
styles={{
- body: {
+ container: {
padding: 4,
},
}}
diff --git a/src/app/[variants]/(main)/home/_layout/Body/Agent/List/AgentItem/Editing.tsx b/src/app/[variants]/(main)/home/_layout/Body/Agent/List/AgentItem/Editing.tsx
index f6abe8c0553..71d57928ea4 100644
--- a/src/app/[variants]/(main)/home/_layout/Body/Agent/List/AgentItem/Editing.tsx
+++ b/src/app/[variants]/(main)/home/_layout/Body/Agent/List/AgentItem/Editing.tsx
@@ -98,7 +98,7 @@ const Editing = memo<EditingProps>(({ id, title, avatar, toggleEditing }) => {
open={editing}
placement={'bottomLeft'}
styles={{
- body: {
+ container: {
padding: 4,
},
}}
diff --git a/src/app/[variants]/(main)/home/_layout/Body/Agent/List/Group/Editing.tsx b/src/app/[variants]/(main)/home/_layout/Body/Agent/List/Group/Editing.tsx
index 91590acf991..603e7abc6a9 100644
--- a/src/app/[variants]/(main)/home/_layout/Body/Agent/List/Group/Editing.tsx
+++ b/src/app/[variants]/(main)/home/_layout/Body/Agent/List/Group/Editing.tsx
@@ -58,7 +58,7 @@ const Editing = memo<EditingProps>(({ id, name, toggleEditing }) => {
open={editing}
placement={'bottomLeft'}
styles={{
- body: {
+ container: {
padding: 4,
width: 320,
},
diff --git a/src/app/[variants]/(main)/home/_layout/Body/Project/List/Editing.tsx b/src/app/[variants]/(main)/home/_layout/Body/Project/List/Editing.tsx
index 51b05b6d000..a421bdfd9f1 100644
--- a/src/app/[variants]/(main)/home/_layout/Body/Project/List/Editing.tsx
+++ b/src/app/[variants]/(main)/home/_layout/Body/Project/List/Editing.tsx
@@ -51,7 +51,7 @@ const Editing = memo<EditingProps>(({ id, name, toggleEditing }) => {
open={editing}
placement={'bottomLeft'}
styles={{
- body: {
+ container: {
padding: 4,
width: 320,
},
diff --git a/src/app/[variants]/(main)/home/_layout/hooks/useSessionGroupMenuItems.tsx b/src/app/[variants]/(main)/home/_layout/hooks/useSessionGroupMenuItems.tsx
index a8c61a7868a..bdce87533a9 100644
--- a/src/app/[variants]/(main)/home/_layout/hooks/useSessionGroupMenuItems.tsx
+++ b/src/app/[variants]/(main)/home/_layout/hooks/useSessionGroupMenuItems.tsx
@@ -93,11 +93,13 @@ export const useSessionGroupMenuItems = () => {
info.domEvent?.stopPropagation();
modal.confirm({
centered: true,
+ classNames: {
+ root: styles.modalRoot,
+ },
okButtonProps: { danger: true },
onOk: async () => {
await removeGroup(groupId);
},
- rootClassName: styles.modalRoot,
title: t('sessionGroup.confirmRemoveGroupAlert'),
});
},
diff --git a/src/app/[variants]/(main)/home/_layout/hooks/useSessionItemMenuItems.tsx b/src/app/[variants]/(main)/home/_layout/hooks/useSessionItemMenuItems.tsx
index 68cc316d0e0..5a2c350be65 100644
--- a/src/app/[variants]/(main)/home/_layout/hooks/useSessionItemMenuItems.tsx
+++ b/src/app/[variants]/(main)/home/_layout/hooks/useSessionItemMenuItems.tsx
@@ -201,6 +201,9 @@ export const useSessionItemMenuItems = () => {
domEvent.stopPropagation();
modal.confirm({
centered: true,
+ classNames: {
+ root: styles.modalRoot,
+ },
okButtonProps: { danger: true },
onOk: async () => {
if (parentType === 'group') {
@@ -211,7 +214,6 @@ export const useSessionItemMenuItems = () => {
message.success(t('confirmRemoveSessionSuccess'));
}
},
- rootClassName: styles.modalRoot,
title:
sessionType === 'group'
? t('confirmRemoveChatGroupItemAlert')
diff --git a/src/app/[variants]/(main)/image/_layout/Topics/TopicItem.tsx b/src/app/[variants]/(main)/image/_layout/Topics/TopicItem.tsx
index 92ac046a927..4f4d9c84fc3 100644
--- a/src/app/[variants]/(main)/image/_layout/Topics/TopicItem.tsx
+++ b/src/app/[variants]/(main)/image/_layout/Topics/TopicItem.tsx
@@ -98,7 +98,7 @@ const TopicItem = memo<TopicItemProps>(({ topic, showMoreInfo, style }) => {
content={tooltipContent}
placement={'left'}
styles={{
- body: {
+ container: {
width: 200,
},
}}
diff --git a/src/app/[variants]/(main)/page/_layout/Body/List/Item/Editing.tsx b/src/app/[variants]/(main)/page/_layout/Body/List/Item/Editing.tsx
index 98a9c18d573..4e0c58ade26 100644
--- a/src/app/[variants]/(main)/page/_layout/Body/List/Item/Editing.tsx
+++ b/src/app/[variants]/(main)/page/_layout/Body/List/Item/Editing.tsx
@@ -96,7 +96,7 @@ const Editing = memo<EditingProps>(({ documentId, title, currentEmoji, toggleEdi
open={editing}
placement={'bottomLeft'}
styles={{
- body: {
+ container: {
padding: 4,
},
}}
diff --git a/src/app/[variants]/(main)/resource/(home)/_layout/Body/KnowledgeBaseList/List/Item/Editing.tsx b/src/app/[variants]/(main)/resource/(home)/_layout/Body/KnowledgeBaseList/List/Item/Editing.tsx
index 005743d05cd..2e64d566a0e 100644
--- a/src/app/[variants]/(main)/resource/(home)/_layout/Body/KnowledgeBaseList/List/Item/Editing.tsx
+++ b/src/app/[variants]/(main)/resource/(home)/_layout/Body/KnowledgeBaseList/List/Item/Editing.tsx
@@ -60,7 +60,7 @@ const Editing = memo<EditingProps>(({ id, name, toggleEditing }) => {
open={editing}
placement={'bottomLeft'}
styles={{
- body: {
+ container: {
padding: 4,
width: 320,
},
diff --git a/src/app/[variants]/(main)/resource/features/modal/FullscreenModal.tsx b/src/app/[variants]/(main)/resource/features/modal/FullscreenModal.tsx
index 8c437002478..f9147c074f6 100644
--- a/src/app/[variants]/(main)/resource/features/modal/FullscreenModal.tsx
+++ b/src/app/[variants]/(main)/resource/features/modal/FullscreenModal.tsx
@@ -70,7 +70,7 @@ const FullscreenModal = ({ children, detail, onClose }: FullscreenModalProps) =>
<ConfigProvider theme={{ token: { motion: false } }}>
<Modal
className={styles.modal}
- classNames={{ body: styles.body, content: styles.content, header: styles.header }}
+ classNames={{ body: styles.body, header: styles.header, wrapper: styles.content }}
footer={false}
onCancel={handleCancel}
open={open}
diff --git a/src/app/[variants]/(main)/settings/apikey/features/ApiKeyDatePicker/index.tsx b/src/app/[variants]/(main)/settings/apikey/features/ApiKeyDatePicker/index.tsx
index a4cddd715a8..c5125ee360d 100644
--- a/src/app/[variants]/(main)/settings/apikey/features/ApiKeyDatePicker/index.tsx
+++ b/src/app/[variants]/(main)/settings/apikey/features/ApiKeyDatePicker/index.tsx
@@ -11,17 +11,21 @@ interface ApiKeyDatePickerProps extends Omit<DatePickerProps, 'onChange'> {
const ApiKeyDatePicker: FC<ApiKeyDatePickerProps> = ({ value, onChange, ...props }) => {
const { t } = useTranslation('auth');
- const handleOnChange = (date: Dayjs | null) => {
+ const handleOnChange = (date: Dayjs[] | Dayjs | null) => {
+ // Handle both single date and array (for compatibility)
+ const actualDate = Array.isArray(date) ? date[0] : date;
// 如果选择了日期,设置为当天的 23:59:59
- const submitData = date ? date.hour(23).minute(59).second(59).millisecond(999) : null;
+ const submitData = actualDate
+ ? actualDate.hour(23).minute(59).second(59).millisecond(999)
+ : null;
onChange?.(submitData);
};
return (
<DatePicker
- key={value?.valueOf() || 'EMPTY'}
- value={value}
+ key={(value?.valueOf() as any) || 'EMPTY'}
+ value={value as any}
{...props}
minDate={dayjs()}
onChange={handleOnChange}
diff --git a/src/app/[variants]/(main)/settings/provider/features/ModelList/CreateNewModelModal/index.tsx b/src/app/[variants]/(main)/settings/provider/features/ModelList/CreateNewModelModal/index.tsx
index 9f753076fa5..05feb8b72af 100644
--- a/src/app/[variants]/(main)/settings/provider/features/ModelList/CreateNewModelModal/index.tsx
+++ b/src/app/[variants]/(main)/settings/provider/features/ModelList/CreateNewModelModal/index.tsx
@@ -65,7 +65,7 @@ const ModelConfigModal = memo<ModelConfigModalProps>(({ open, setOpen }) => {
onCancel={closeModal}
open={open}
styles={{
- content: {
+ body: {
display: 'flex',
flexDirection: 'column',
maxHeight: 'calc(100vh - 150px)',
diff --git a/src/app/[variants]/(main)/settings/provider/features/ModelList/ModelConfigModal/index.tsx b/src/app/[variants]/(main)/settings/provider/features/ModelList/ModelConfigModal/index.tsx
index 6cac5c5c247..2aa1702d516 100644
--- a/src/app/[variants]/(main)/settings/provider/features/ModelList/ModelConfigModal/index.tsx
+++ b/src/app/[variants]/(main)/settings/provider/features/ModelList/ModelConfigModal/index.tsx
@@ -60,7 +60,7 @@ const ModelConfigModal = memo<ModelConfigModalProps>(({ id, open, setOpen }) =>
onCancel={closeModal}
open={open}
styles={{
- content: {
+ body: {
display: 'flex',
flexDirection: 'column',
maxHeight: 'calc(100vh - 150px)',
diff --git a/src/app/[variants]/(main)/settings/usage/Client.tsx b/src/app/[variants]/(main)/settings/usage/Client.tsx
index 02c32a8d04a..10abe0d6bad 100644
--- a/src/app/[variants]/(main)/settings/usage/Client.tsx
+++ b/src/app/[variants]/(main)/settings/usage/Client.tsx
@@ -50,7 +50,11 @@ const Client = memo<{ mobile?: boolean }>(({ mobile }) => {
}, [dateStrings]);
const handleDateChange: DatePickerProps['onChange'] = (dates, dateStrings) => {
- setDateRange(dates);
+ // Handle both single date and array
+ const actualDate = Array.isArray(dates) ? dates[0] : dates;
+ if (actualDate) {
+ setDateRange(actualDate);
+ }
if (typeof dateStrings === 'string') {
setDateStrings(dateStrings);
}
diff --git a/src/app/[variants]/(mobile)/(home)/features/SessionListContent/CollapseGroup/Actions.tsx b/src/app/[variants]/(mobile)/(home)/features/SessionListContent/CollapseGroup/Actions.tsx
index bd6b4388c76..d737dd43350 100644
--- a/src/app/[variants]/(mobile)/(home)/features/SessionListContent/CollapseGroup/Actions.tsx
+++ b/src/app/[variants]/(mobile)/(home)/features/SessionListContent/CollapseGroup/Actions.tsx
@@ -142,12 +142,14 @@ const Actions = memo<ActionsProps>(
domEvent.stopPropagation();
modal.confirm({
centered: true,
+ classNames: {
+ root: styles.modalRoot,
+ },
okButtonProps: { danger: true },
onOk: async () => {
if (!id) return;
await removeSessionGroup(id);
},
- rootClassName: styles.modalRoot,
title: t('sessionGroup.confirmRemoveGroupAlert'),
});
},
diff --git a/src/app/[variants]/(mobile)/(home)/features/SessionListContent/List/Item/Actions.tsx b/src/app/[variants]/(mobile)/(home)/features/SessionListContent/List/Item/Actions.tsx
index a1a1632824d..d4856518651 100644
--- a/src/app/[variants]/(mobile)/(home)/features/SessionListContent/List/Item/Actions.tsx
+++ b/src/app/[variants]/(mobile)/(home)/features/SessionListContent/List/Item/Actions.tsx
@@ -157,6 +157,9 @@ const Actions = memo<ActionProps>(({ group, id, openCreateGroupModal, parentType
domEvent.stopPropagation();
modal.confirm({
centered: true,
+ classNames: {
+ root: styles.modalRoot,
+ },
okButtonProps: { danger: true },
onOk: async () => {
if (parentType === 'group') {
@@ -167,7 +170,6 @@ const Actions = memo<ActionProps>(({ group, id, openCreateGroupModal, parentType
message.success(t('confirmRemoveSessionSuccess'));
}
},
- rootClassName: styles.modalRoot,
title:
sessionType === 'group'
? t('confirmRemoveChatGroupItemAlert')
diff --git a/src/components/ImageItem/index.tsx b/src/components/ImageItem/index.tsx
index 2c18b1d960d..61c66d0a3fb 100644
--- a/src/components/ImageItem/index.tsx
+++ b/src/components/ImageItem/index.tsx
@@ -70,14 +70,13 @@ const ImageItem = memo<ImageItemProps>(
}
alt={alt || ''}
alwaysShowActions={alwaysShowClose}
- className={className}
+ classNames={{ wrapper: cx(styles.image, editable && styles.editableImage, className) }}
height={isSafari ? 'auto' : '100%'}
isLoading={loading}
preview={preview}
size={IMAGE_SIZE as any}
src={url}
style={{ height: isSafari ? 'auto' : '100%', width: '100%', ...style }}
- wrapperClassName={cx(styles.image, editable && styles.editableImage)}
/>
);
},
diff --git a/src/components/Loading/SkeletonLoading/index.tsx b/src/components/Loading/SkeletonLoading/index.tsx
index 72acd2a5611..69cef908c17 100644
--- a/src/components/Loading/SkeletonLoading/index.tsx
+++ b/src/components/Loading/SkeletonLoading/index.tsx
@@ -13,10 +13,21 @@ const useStyles = createStyles(
`,
);
-const SkeletonLoading = memo<SkeletonProps>(({ className, ...rest }) => {
- const { cx, styles } = useStyles();
+const SkeletonLoading = memo<SkeletonProps>(
+ ({ className, classNames, styles: customStyles, ...rest }) => {
+ const { cx, styles } = useStyles();
- return <Skeleton active className={cx(styles, className)} paragraph={{ rows: 8 }} {...rest} />;
-});
+ return (
+ <Skeleton
+ active
+ className={cx(styles, className)}
+ classNames={classNames as any}
+ paragraph={{ rows: 8 }}
+ styles={customStyles as any}
+ {...rest}
+ />
+ );
+ },
+);
export default SkeletonLoading;
diff --git a/src/features/ChatInput/ActionBar/Search/index.tsx b/src/features/ChatInput/ActionBar/Search/index.tsx
index 8fe0ff5b49e..dc5d91bbe8d 100644
--- a/src/features/ChatInput/ActionBar/Search/index.tsx
+++ b/src/features/ChatInput/ActionBar/Search/index.tsx
@@ -48,7 +48,7 @@ const Search = memo(() => {
minWidth: 320,
placement: 'topLeft',
styles: {
- body: {
+ container: {
padding: 4,
},
},
diff --git a/src/features/ChatInput/ActionBar/components/ActionPopover.tsx b/src/features/ChatInput/ActionBar/components/ActionPopover.tsx
index 00d2c5413d6..46ee2a213de 100644
--- a/src/features/ChatInput/ActionBar/components/ActionPopover.tsx
+++ b/src/features/ChatInput/ActionBar/components/ActionPopover.tsx
@@ -38,7 +38,7 @@ const ActionPopover = memo<ActionPopoverProps>(
maxWidth,
minWidth,
children,
- classNames,
+ classNames: customClassNames,
title,
placement,
loading,
@@ -47,22 +47,38 @@ const ActionPopover = memo<ActionPopoverProps>(
}) => {
const { cx, styles, theme } = useStyles();
const isMobile = useIsMobile();
+
+ // Properly handle classNames (can be object or function)
+ const resolvedClassNames =
+ typeof customClassNames === 'function' ? customClassNames : customClassNames;
+ const containerClassName =
+ typeof resolvedClassNames === 'object' && resolvedClassNames?.container
+ ? cx(styles.popoverContent, resolvedClassNames.container)
+ : styles.popoverContent;
+
+ // Properly handle styles (can be object or function)
+ const resolvedStyles = typeof customStyles === 'function' ? customStyles : customStyles;
+ const containerStyle =
+ typeof resolvedStyles === 'object' && resolvedStyles?.container
+ ? resolvedStyles.container
+ : {};
+
return (
<Popover
arrow={false}
classNames={{
- ...classNames,
- body: cx(styles.popoverContent, classNames?.body),
+ ...(typeof resolvedClassNames === 'object' ? resolvedClassNames : {}),
+ container: containerClassName,
}}
placement={isMobile ? 'top' : placement}
styles={{
- ...customStyles,
- body: {
+ ...(typeof resolvedStyles === 'object' ? resolvedStyles : {}),
+ container: {
maxHeight,
maxWidth: isMobile ? undefined : maxWidth,
minWidth: isMobile ? undefined : minWidth,
width: isMobile ? '100vw' : undefined,
- ...customStyles?.body,
+ ...containerStyle,
},
}}
title={
diff --git a/src/features/ChatInput/Desktop/ContextContainer/ContextItem/Content.tsx b/src/features/ChatInput/Desktop/ContextContainer/ContextItem/Content.tsx
index c6558d3b9d8..6a210cfd8d5 100644
--- a/src/features/ChatInput/Desktop/ContextContainer/ContextItem/Content.tsx
+++ b/src/features/ChatInput/Desktop/ContextContainer/ContextItem/Content.tsx
@@ -31,7 +31,7 @@ const Content = memo<UploadFileItem>(({ file, previewUrl }) => {
const { styles } = useStyles();
if (file.type.startsWith('image')) {
- return <Image alt={file.name} src={previewUrl} wrapperClassName={styles.image} />;
+ return <Image alt={file.name} classNames={{ wrapper: styles.image }} src={previewUrl} />;
}
if (file.type.startsWith('video')) {
diff --git a/src/features/ChatInput/Desktop/FilePreview/FileItem/Content.tsx b/src/features/ChatInput/Desktop/FilePreview/FileItem/Content.tsx
index d3852e762d6..f1f8c0143b9 100644
--- a/src/features/ChatInput/Desktop/FilePreview/FileItem/Content.tsx
+++ b/src/features/ChatInput/Desktop/FilePreview/FileItem/Content.tsx
@@ -24,7 +24,7 @@ const Content = memo<UploadFileItem>(({ file, previewUrl }) => {
const { styles } = useStyles();
if (file.type.startsWith('image')) {
- return <Image alt={file.name} src={previewUrl} wrapperClassName={styles.image} />;
+ return <Image alt={file.name} classNames={{ wrapper: styles.image }} src={previewUrl} />;
}
if (file.type.startsWith('video')) {
diff --git a/src/features/ChatInput/Desktop/FilePreview/FileItem/index.tsx b/src/features/ChatInput/Desktop/FilePreview/FileItem/index.tsx
index 8e9df2fc9d6..ca433b4bded 100644
--- a/src/features/ChatInput/Desktop/FilePreview/FileItem/index.tsx
+++ b/src/features/ChatInput/Desktop/FilePreview/FileItem/index.tsx
@@ -61,16 +61,7 @@ const FileItem = memo<FileItemProps>((props) => {
<Flexbox flex={1} gap={4} style={{ paddingBottom: 4, paddingInline: 4 }}>
<Text
ellipsis={{
- tooltip: {
- styles: {
- body: {
- fontSize: 12,
- whiteSpace: 'balance',
- wordBreak: 'break-all',
- },
- },
- title: file.name,
- },
+ tooltip: file.name,
}}
style={{ fontSize: 12, maxWidth: 88 }}
>
diff --git a/src/features/ChatInput/Mobile/FilePreview/FileItem/Image.tsx b/src/features/ChatInput/Mobile/FilePreview/FileItem/Image.tsx
index 48962214419..dac6ff439b9 100644
--- a/src/features/ChatInput/Mobile/FilePreview/FileItem/Image.tsx
+++ b/src/features/ChatInput/Mobile/FilePreview/FileItem/Image.tsx
@@ -52,13 +52,13 @@ const FileItem = memo<FileItemProps>(({ alt, onRemove, src, loading }) => {
}
alt={alt || ''}
alwaysShowActions
+ classNames={{ wrapper: cx(styles.image, styles.editableImage) }}
height={64}
isLoading={loading}
objectFit={'cover'}
size={IMAGE_SIZE as any}
src={src}
width={64}
- wrapperClassName={cx(styles.image, styles.editableImage)}
/>
);
});
diff --git a/src/features/Conversation/ChatItem/components/MessageContent/EditableModal.tsx b/src/features/Conversation/ChatItem/components/MessageContent/EditableModal.tsx
index a190afbdca2..d6e97be5174 100644
--- a/src/features/Conversation/ChatItem/components/MessageContent/EditableModal.tsx
+++ b/src/features/Conversation/ChatItem/components/MessageContent/EditableModal.tsx
@@ -66,7 +66,6 @@ const EditableMessage = memo<EditableMessageProps>(
<Modal
cancelText={t('cancel')}
closable={false}
- destroyOnClose
destroyOnHidden
okText={t('ok')}
onCancel={() => onEditingChange?.(false)}
diff --git a/src/features/Conversation/ChatList/components/VirtualizedList.tsx b/src/features/Conversation/ChatList/components/VirtualizedList.tsx
index 5495cbfd906..c79477d431a 100644
--- a/src/features/Conversation/ChatList/components/VirtualizedList.tsx
+++ b/src/features/Conversation/ChatList/components/VirtualizedList.tsx
@@ -123,7 +123,6 @@ const VirtualizedList = memo<VirtualizedListProps>(({ dataSource, itemContent, i
onScroll={handleScroll}
onScrollEnd={handleScrollEnd}
ref={virtuaRef}
- reverse
style={{ height: '100%', paddingBottom: 24 }}
>
{(messageId, index): ReactElement => {
diff --git a/src/features/ElectronTitlebar/index.tsx b/src/features/ElectronTitlebar/index.tsx
index bc736c899f4..de8c149bbfe 100644
--- a/src/features/ElectronTitlebar/index.tsx
+++ b/src/features/ElectronTitlebar/index.tsx
@@ -46,7 +46,7 @@ const TitleBar = memo(() => {
</Flexbox>
{showWinControl && (
<>
- <Divider type={'vertical'} />
+ <Divider orientation={'vertical'} />
<WinControl />
</>
)}
diff --git a/src/features/LocalFile/LocalFile.tsx b/src/features/LocalFile/LocalFile.tsx
index f22becbf713..9424ba591da 100644
--- a/src/features/LocalFile/LocalFile.tsx
+++ b/src/features/LocalFile/LocalFile.tsx
@@ -103,7 +103,7 @@ export const LocalFile = ({ name, path, isDirectory = false }: LocalFileProps) =
arrow={false}
content={popoverContent}
styles={{
- body: { padding: 0 },
+ container: { padding: 0 },
}}
trigger={['hover']}
>
diff --git a/src/features/NavPanel/SideBarDrawer.tsx b/src/features/NavPanel/SideBarDrawer.tsx
index 19a1d61c466..36fcf95e32d 100644
--- a/src/features/NavPanel/SideBarDrawer.tsx
+++ b/src/features/NavPanel/SideBarDrawer.tsx
@@ -40,10 +40,8 @@ const SideBarDrawer = memo<SideBarDrawerProps>(
}}
styles={{
body: {
- padding: 0,
- },
- content: {
background: theme.colorBgLayout,
+ padding: 0,
},
header: {
borderBottom: 'none',
diff --git a/src/features/PageEditor/Copilot/Toolbar.tsx b/src/features/PageEditor/Copilot/Toolbar.tsx
index 4837d843699..2065a4a314f 100644
--- a/src/features/PageEditor/Copilot/Toolbar.tsx
+++ b/src/features/PageEditor/Copilot/Toolbar.tsx
@@ -121,7 +121,7 @@ const AgentSelector = memo<AgentSelectorProps>(({ agentId, onAgentChange }) => {
open={open}
placement="bottomLeft"
styles={{
- body: {
+ container: {
padding: 0,
width: 240,
},
@@ -226,7 +226,7 @@ const CopilotToolbar = memo<CopilotToolbarProps>(({ agentId, isHovered }) => {
open={topicPopoverOpen}
placement="bottomRight"
styles={{
- body: {
+ container: {
padding: 0,
width: 240,
},
diff --git a/src/features/ShareModal/SharePdf/PdfPreview.tsx b/src/features/ShareModal/SharePdf/PdfPreview.tsx
index 801b62288f5..3efd60f76ea 100644
--- a/src/features/ShareModal/SharePdf/PdfPreview.tsx
+++ b/src/features/ShareModal/SharePdf/PdfPreview.tsx
@@ -296,7 +296,6 @@ const PdfPreview = memo<PdfPreviewProps>(({ loading, pdfData, onGeneratePdf }) =
open={fullscreenOpen}
styles={{
body: { padding: 0 },
- content: { padding: 0 },
}}
width="95vw"
>
diff --git a/src/features/User/UserPanel/LangButton.tsx b/src/features/User/UserPanel/LangButton.tsx
index 0b9f18438e2..ae098622082 100644
--- a/src/features/User/UserPanel/LangButton.tsx
+++ b/src/features/User/UserPanel/LangButton.tsx
@@ -60,7 +60,7 @@ const LangButton = memo<{ placement?: PopoverProps['placement']; size?: number }
content={<Menu items={items} selectable selectedKeys={[language]} />}
placement={placement}
styles={{
- body: {
+ container: {
maxHeight: 360,
minWidth: 240,
overflow: 'auto',
diff --git a/src/features/User/UserPanel/ThemeButton.tsx b/src/features/User/UserPanel/ThemeButton.tsx
index c7df340e9fd..00b2fb28500 100644
--- a/src/features/User/UserPanel/ThemeButton.tsx
+++ b/src/features/User/UserPanel/ThemeButton.tsx
@@ -53,7 +53,7 @@ const ThemeButton = memo<{ placement?: PopoverProps['placement']; size?: number
content={<Menu items={items} selectable selectedKeys={[themeMode]} />}
placement={placement}
styles={{
- body: {
+ container: {
padding: 0,
},
}}
diff --git a/src/features/User/UserPanel/index.tsx b/src/features/User/UserPanel/index.tsx
index 05d143dd84d..50474672535 100644
--- a/src/features/User/UserPanel/index.tsx
+++ b/src/features/User/UserPanel/index.tsx
@@ -29,13 +29,15 @@ const UserPanel = memo<PropsWithChildren>(({ children }) => {
<UpgradeBadge showBadge={hasNewVersion}>
<Popover
arrow={false}
+ classNames={{
+ root: styles.popover,
+ }}
content={<PanelContent closePopover={() => setOpen(false)} />}
onOpenChange={setOpen}
open={open}
placement={'topRight'}
- rootClassName={styles.popover}
styles={{
- body: { padding: 0 },
+ container: { padding: 0 },
}}
trigger={['click']}
>
diff --git a/src/layout/GlobalProvider/AntdV5MonkeyPatch.tsx b/src/layout/GlobalProvider/AntdV5MonkeyPatch.tsx
deleted file mode 100644
index 71f10c73888..00000000000
--- a/src/layout/GlobalProvider/AntdV5MonkeyPatch.tsx
+++ /dev/null
@@ -1,20 +0,0 @@
-'use client';
-
-import { unstableSetRender } from 'antd';
-import { useEffect } from 'react';
-import { createRoot } from 'react-dom/client';
-
-const AntdV5MonkeyPatch = () => {
- useEffect(() => {
- unstableSetRender((node, container) => {
- const root = createRoot(container);
- root.render(node);
- return async () => {
- root.unmount();
- };
- });
- }, []);
- return null;
-};
-
-export default AntdV5MonkeyPatch;
diff --git a/src/layout/GlobalProvider/AppTheme.tsx b/src/layout/GlobalProvider/AppTheme.tsx
index 0a5c23a0a18..363cf94c68c 100644
--- a/src/layout/GlobalProvider/AppTheme.tsx
+++ b/src/layout/GlobalProvider/AppTheme.tsx
@@ -133,7 +133,6 @@ const AppTheme = memo<AppThemeProps>(
setCookie(LOBE_THEME_APPEARANCE, appearance);
}}
theme={{
- cssVar: true,
token: {
fontFamily: customFontFamily ? `${customFontFamily},${theme.fontFamily}` : undefined,
motion: animationMode !== 'disabled',
diff --git a/src/layout/GlobalProvider/index.tsx b/src/layout/GlobalProvider/index.tsx
index 09fc11bb54f..481f2674ac5 100644
--- a/src/layout/GlobalProvider/index.tsx
+++ b/src/layout/GlobalProvider/index.tsx
@@ -9,7 +9,6 @@ import { getServerGlobalConfig } from '@/server/globalConfig';
import { ServerConfigStoreProvider } from '@/store/serverConfig/Provider';
import { getAntdLocale } from '@/utils/locale';
-import AntdV5MonkeyPatch from './AntdV5MonkeyPatch';
import AppTheme from './AppTheme';
import ImportSettings from './ImportSettings';
import Locale from './Locale';
@@ -71,7 +70,6 @@ const GlobalLayout = async ({
</ServerConfigStoreProvider>
</AppTheme>
</Locale>
- <AntdV5MonkeyPatch />
</StyleRegistry>
);
};