@lobehub/lobehub 2.0.0-next.298 → 2.0.0-next.299

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (82) hide show
  1. package/CHANGELOG.md +33 -0
  2. package/changelog/v1.json +9 -0
  3. package/package.json +2 -2
  4. package/src/app/[variants]/(main)/agent/_layout/Sidebar/Cron/Actions.tsx +4 -13
  5. package/src/app/[variants]/(main)/agent/_layout/Sidebar/Topic/Actions.tsx +4 -13
  6. package/src/app/[variants]/(main)/agent/_layout/Sidebar/Topic/index.tsx +2 -9
  7. package/src/app/[variants]/(main)/agent/features/Conversation/ConversationArea.tsx +2 -2
  8. package/src/app/[variants]/(main)/agent/features/Conversation/Header/Tags/KnowledgeTag.tsx +3 -4
  9. package/src/app/[variants]/(main)/agent/profile/features/ProfileEditor/MentionList/types.ts +4 -2
  10. package/src/app/[variants]/(main)/community/(detail)/model/features/Sidebar/ActionButton/ChatWithModel.tsx +3 -8
  11. package/src/app/[variants]/(main)/community/(list)/assistant/features/MarketSourceSwitch.tsx +44 -23
  12. package/src/app/[variants]/(main)/community/(list)/features/SortButton/index.tsx +40 -19
  13. package/src/app/[variants]/(main)/group/_layout/Sidebar/Topic/Actions.tsx +4 -13
  14. package/src/app/[variants]/(main)/group/_layout/Sidebar/Topic/index.tsx +2 -9
  15. package/src/app/[variants]/(main)/group/features/Conversation/ConversationArea.tsx +2 -2
  16. package/src/app/[variants]/(main)/group/features/Conversation/Header/Tags/KnowledgeTag.tsx +3 -4
  17. package/src/app/[variants]/(main)/group/profile/features/AgentBuilder/AgentBuilderProvider.tsx +2 -2
  18. package/src/app/[variants]/(main)/group/profile/features/MemberProfile/MentionList/types.ts +4 -2
  19. package/src/app/[variants]/(main)/home/_layout/Body/Agent/Actions.tsx +3 -11
  20. package/src/app/[variants]/(main)/home/_layout/Body/Agent/List/Group/Actions.tsx +3 -12
  21. package/src/app/[variants]/(main)/home/_layout/Body/Agent/List/Group/Item.tsx +2 -9
  22. package/src/app/[variants]/(main)/home/_layout/Body/Agent/index.tsx +2 -9
  23. package/src/app/[variants]/(main)/home/_layout/Body/Project/index.tsx +2 -9
  24. package/src/app/[variants]/(main)/home/features/CommunityAgents/index.tsx +11 -13
  25. package/src/app/[variants]/(main)/home/features/FeaturedPlugins/index.tsx +11 -13
  26. package/src/app/[variants]/(main)/home/features/RecentPage/index.tsx +12 -14
  27. package/src/app/[variants]/(main)/home/features/RecentResource/index.tsx +12 -14
  28. package/src/app/[variants]/(main)/memory/contexts/features/ContextDropdown.tsx +5 -3
  29. package/src/app/[variants]/(main)/memory/experiences/features/ExperienceDropdown.tsx +5 -3
  30. package/src/app/[variants]/(main)/memory/identities/features/IdentityDropdown.tsx +5 -3
  31. package/src/app/[variants]/(main)/memory/preferences/features/PreferenceDropdown.tsx +5 -3
  32. package/src/app/[variants]/(main)/page/_layout/Body/Actions.tsx +3 -13
  33. package/src/app/[variants]/(main)/page/_layout/Body/index.tsx +2 -9
  34. package/src/app/[variants]/(main)/resource/features/DndContextWrapper.tsx +1 -1
  35. package/src/app/[variants]/(main)/settings/profile/features/SSOProvidersList/index.tsx +3 -3
  36. package/src/app/[variants]/(main)/settings/provider/ProviderMenu/Actions.tsx +3 -11
  37. package/src/app/[variants]/(main)/settings/provider/ProviderMenu/List.tsx +12 -28
  38. package/src/app/[variants]/(main)/settings/provider/features/ModelList/DisabledModels.tsx +7 -8
  39. package/src/app/[variants]/(main)/settings/provider/features/ModelList/ModelTitle/index.tsx +18 -20
  40. package/src/app/[variants]/(mobile)/(home)/features/SessionListContent/CollapseGroup/Actions.tsx +10 -14
  41. package/src/app/[variants]/(mobile)/(home)/features/SessionListContent/List/Item/Actions.tsx +3 -13
  42. package/src/app/[variants]/share/t/[id]/SharedMessageList.tsx +2 -2
  43. package/src/business/server/lambda-routers/file.ts +1 -1
  44. package/src/features/AgentBuilder/AgentBuilderProvider.tsx +2 -2
  45. package/src/features/ChatInput/ActionBar/History/index.tsx +1 -1
  46. package/src/features/ChatInput/ActionBar/STT/common.tsx +1 -1
  47. package/src/features/ChatInput/ActionBar/Search/index.tsx +1 -1
  48. package/src/features/ChatInput/ActionBar/Upload/ServerMode.tsx +1 -0
  49. package/src/features/ChatInput/ActionBar/components/Action.tsx +4 -8
  50. package/src/features/ChatInput/ActionBar/components/ActionDropdown.tsx +225 -37
  51. package/src/features/Conversation/ConversationProvider.tsx +2 -1
  52. package/src/features/Conversation/Messages/Assistant/Actions/index.tsx +10 -6
  53. package/src/features/Conversation/Messages/AssistantGroup/Actions/index.tsx +10 -6
  54. package/src/features/Conversation/Messages/AssistantGroup/Tool/Detail/Intervention/ApprovalActions.tsx +11 -13
  55. package/src/features/Conversation/Messages/AssistantGroup/Tool/Detail/Intervention/ModeSelector.tsx +8 -10
  56. package/src/features/Conversation/Messages/Supervisor/Actions/index.tsx +10 -6
  57. package/src/features/Conversation/Messages/Task/Actions/index.tsx +10 -6
  58. package/src/features/Conversation/Messages/User/Actions/index.tsx +10 -6
  59. package/src/features/Conversation/StoreUpdater.tsx +1 -1
  60. package/src/features/Conversation/store/initialState.ts +3 -1
  61. package/src/features/Conversation/store/slices/data/action.ts +6 -5
  62. package/src/features/LibraryModal/AssignKnowledgeBase/Item/Action.tsx +23 -26
  63. package/src/features/ModelSwitchPanel/components/List/MultipleProvidersModelItem.tsx +16 -18
  64. package/src/features/ModelSwitchPanel/styles.ts +18 -1
  65. package/src/features/PageEditor/Copilot/AgentSelector/Actions.tsx +6 -13
  66. package/src/features/PageEditor/PageAgentProvider.tsx +2 -2
  67. package/src/features/PluginStore/InstalledList/List/Item/Action.tsx +33 -36
  68. package/src/features/PluginStore/McpList/List/Action.tsx +25 -28
  69. package/src/features/PluginStore/PluginList/List/Action.tsx +25 -28
  70. package/src/features/PluginTag/index.tsx +3 -4
  71. package/src/features/Portal/Artifacts/Body/Renderer/SVG.tsx +14 -11
  72. package/src/features/Portal/Thread/Chat/index.tsx +2 -2
  73. package/src/features/ProfileEditor/AgentTool.tsx +1 -1
  74. package/src/features/ResourceManager/components/Explorer/ToolBar/SortDropdown.tsx +21 -18
  75. package/src/features/ResourceManager/components/Explorer/ToolBar/ViewSwitcher.tsx +7 -13
  76. package/src/features/ResourceManager/components/Header/AddButton.tsx +4 -11
  77. package/src/features/User/UserPanel/LangButton.tsx +56 -44
  78. package/src/layout/AuthProvider/MarketAuth/MarketAuthProvider.tsx +1 -1
  79. package/src/services/document/index.ts +11 -1
  80. package/src/store/page/slices/crud/action.ts +0 -48
  81. package/src/styles/global.ts +2 -2
  82. package/src/types/shim-lobe-ui.d.ts +7 -0
@@ -1,6 +1,6 @@
1
1
  'use client';
2
2
 
3
- import { AccordionItem, Dropdown, Flexbox, Text } from '@lobehub/ui';
3
+ import { AccordionItem, ContextMenuTrigger, Flexbox, Text } from '@lobehub/ui';
4
4
  import React, { Suspense, memo, useCallback } from 'react';
5
5
  import { useTranslation } from 'react-i18next';
6
6
 
@@ -39,14 +39,7 @@ const Agent = memo<AgentProps>(({ itemKey }) => {
39
39
  <AccordionItem
40
40
  action={<Actions dropdownMenu={dropdownMenu} isLoading={isLoading} />}
41
41
  headerWrapper={(header) => (
42
- <Dropdown
43
- menu={{
44
- items: dropdownMenu,
45
- }}
46
- trigger={['contextMenu']}
47
- >
48
- {header}
49
- </Dropdown>
42
+ <ContextMenuTrigger items={dropdownMenu}>{header}</ContextMenuTrigger>
50
43
  )}
51
44
  itemKey={itemKey}
52
45
  paddingBlock={4}
@@ -1,6 +1,6 @@
1
1
  'use client';
2
2
 
3
- import { AccordionItem, Dropdown, Text } from '@lobehub/ui';
3
+ import { AccordionItem, ContextMenuTrigger, Text } from '@lobehub/ui';
4
4
  import React, { Suspense, memo } from 'react';
5
5
  import { useTranslation } from 'react-i18next';
6
6
 
@@ -21,14 +21,7 @@ const Project = memo<ProjectProps>(({ itemKey }) => {
21
21
  <AccordionItem
22
22
  action={<Actions />}
23
23
  headerWrapper={(header) => (
24
- <Dropdown
25
- menu={{
26
- items: dropdownMenu,
27
- }}
28
- trigger={['contextMenu']}
29
- >
30
- {header}
31
- </Dropdown>
24
+ <ContextMenuTrigger items={dropdownMenu}>{header}</ContextMenuTrigger>
32
25
  )}
33
26
  itemKey={itemKey}
34
27
  paddingBlock={4}
@@ -1,6 +1,6 @@
1
1
  'use client';
2
2
 
3
- import { ActionIcon, Dropdown } from '@lobehub/ui';
3
+ import { ActionIcon, DropdownMenu } from '@lobehub/ui';
4
4
  import { BotIcon, MoreHorizontal } from 'lucide-react';
5
5
  import { Suspense, memo } from 'react';
6
6
  import { useTranslation } from 'react-i18next';
@@ -18,21 +18,19 @@ const CommunityAgents = memo(() => {
18
18
  return (
19
19
  <GroupBlock
20
20
  action={
21
- <Dropdown
22
- menu={{
23
- items: [
24
- {
25
- key: 'all-assistants',
26
- label: t('home.more'),
27
- onClick: () => {
28
- navigate('/community/assistant');
29
- },
21
+ <DropdownMenu
22
+ items={[
23
+ {
24
+ key: 'all-assistants',
25
+ label: t('home.more'),
26
+ onClick: () => {
27
+ navigate('/community/assistant');
30
28
  },
31
- ],
32
- }}
29
+ },
30
+ ]}
33
31
  >
34
32
  <ActionIcon icon={MoreHorizontal} size="small" />
35
- </Dropdown>
33
+ </DropdownMenu>
36
34
  }
37
35
  icon={BotIcon}
38
36
  title={t('home.communityAgents')}
@@ -1,7 +1,7 @@
1
1
  'use client';
2
2
 
3
3
  import { MCP } from '@lobehub/icons';
4
- import { ActionIcon, Dropdown, Grid } from '@lobehub/ui';
4
+ import { ActionIcon, DropdownMenu, Grid } from '@lobehub/ui';
5
5
  import { cssVar } from 'antd-style';
6
6
  import { MoreHorizontal } from 'lucide-react';
7
7
  import { Suspense, memo } from 'react';
@@ -20,21 +20,19 @@ const FeaturedPlugins = memo(() => {
20
20
  return (
21
21
  <GroupBlock
22
22
  action={
23
- <Dropdown
24
- menu={{
25
- items: [
26
- {
27
- key: 'all-plugins',
28
- label: t('home.more'),
29
- onClick: () => {
30
- navigate('/community/mcp');
31
- },
23
+ <DropdownMenu
24
+ items={[
25
+ {
26
+ key: 'all-plugins',
27
+ label: t('home.more'),
28
+ onClick: () => {
29
+ navigate('/community/mcp');
32
30
  },
33
- ],
34
- }}
31
+ },
32
+ ]}
35
33
  >
36
34
  <ActionIcon icon={MoreHorizontal} size="small" />
37
- </Dropdown>
35
+ </DropdownMenu>
38
36
  }
39
37
  icon={<MCP color={cssVar.colorTextDescription} size={18} />}
40
38
  title={t('home.featuredPlugins')}
@@ -1,6 +1,6 @@
1
1
  'use client';
2
2
 
3
- import { ActionIcon, Dropdown } from '@lobehub/ui';
3
+ import { ActionIcon, DropdownMenu } from '@lobehub/ui';
4
4
  import { FileTextIcon, MoreHorizontal } from 'lucide-react';
5
5
  import { Suspense, memo } from 'react';
6
6
  import { useTranslation } from 'react-i18next';
@@ -37,22 +37,20 @@ const RecentPage = memo(() => {
37
37
  action={
38
38
  <>
39
39
  {isRevalidating && <NeuralNetworkLoading size={14} />}
40
- <Dropdown
41
- menu={{
42
- items: [
43
- {
44
- key: 'all-documents',
45
- label: t('menu.allPages'),
46
- onClick: () => {
47
- setCategory(FilesTabs.Pages);
48
- navigate('/resource');
49
- },
40
+ <DropdownMenu
41
+ items={[
42
+ {
43
+ key: 'all-documents',
44
+ label: t('menu.allPages'),
45
+ onClick: () => {
46
+ setCategory(FilesTabs.Pages);
47
+ navigate('/resource');
50
48
  },
51
- ],
52
- }}
49
+ },
50
+ ]}
53
51
  >
54
52
  <ActionIcon icon={MoreHorizontal} size="small" />
55
- </Dropdown>
53
+ </DropdownMenu>
56
54
  </>
57
55
  }
58
56
  icon={FileTextIcon}
@@ -1,6 +1,6 @@
1
1
  'use client';
2
2
 
3
- import { ActionIcon, Dropdown } from '@lobehub/ui';
3
+ import { ActionIcon, DropdownMenu } from '@lobehub/ui';
4
4
  import { Clock, MoreHorizontal } from 'lucide-react';
5
5
  import { Suspense, memo } from 'react';
6
6
  import { useTranslation } from 'react-i18next';
@@ -37,22 +37,20 @@ const RecentResource = memo(() => {
37
37
  action={
38
38
  <>
39
39
  {isRevalidating && <NeuralNetworkLoading size={14} />}
40
- <Dropdown
41
- menu={{
42
- items: [
43
- {
44
- key: 'all-files',
45
- label: t('menu.allFiles'),
46
- onClick: () => {
47
- setCategory(FilesTabs.All);
48
- navigate('/resource');
49
- },
40
+ <DropdownMenu
41
+ items={[
42
+ {
43
+ key: 'all-files',
44
+ label: t('menu.allFiles'),
45
+ onClick: () => {
46
+ setCategory(FilesTabs.All);
47
+ navigate('/resource');
50
48
  },
51
- ],
52
- }}
49
+ },
50
+ ]}
53
51
  >
54
52
  <ActionIcon icon={MoreHorizontal} size="small" />
55
- </Dropdown>
53
+ </DropdownMenu>
56
54
  </>
57
55
  }
58
56
  icon={Clock}
@@ -1,4 +1,4 @@
1
- import { ActionIcon, type ActionIconProps, Dropdown } from '@lobehub/ui';
1
+ import { ActionIcon, type ActionIconProps, DropdownMenu } from '@lobehub/ui';
2
2
  import { App } from 'antd';
3
3
  import { MoreHorizontal, Pencil, Trash2 } from 'lucide-react';
4
4
  import { type KeyboardEvent, type MouseEvent, memo } from 'react';
@@ -47,19 +47,21 @@ const ContextDropdown = memo<ContextDropdownProps>(({ id, size = 'small' }) => {
47
47
  icon: <Pencil size={14} />,
48
48
  key: 'edit',
49
49
  label: t('context.actions.edit'),
50
+ onClick: handleMenuClick,
50
51
  },
51
52
  {
52
53
  danger: true,
53
54
  icon: <Trash2 size={14} />,
54
55
  key: 'delete',
55
56
  label: t('context.actions.delete'),
57
+ onClick: handleMenuClick,
56
58
  },
57
59
  ];
58
60
 
59
61
  return (
60
- <Dropdown menu={{ items: menuItems, onClick: handleMenuClick }} trigger={['click']}>
62
+ <DropdownMenu items={menuItems}>
61
63
  <ActionIcon icon={MoreHorizontal} size={size} />
62
- </Dropdown>
64
+ </DropdownMenu>
63
65
  );
64
66
  });
65
67
 
@@ -1,4 +1,4 @@
1
- import { ActionIcon, type ActionIconProps, Dropdown } from '@lobehub/ui';
1
+ import { ActionIcon, type ActionIconProps, DropdownMenu } from '@lobehub/ui';
2
2
  import { App } from 'antd';
3
3
  import { MoreHorizontal, Pencil, Trash2 } from 'lucide-react';
4
4
  import { type KeyboardEvent, type MouseEvent, memo } from 'react';
@@ -47,19 +47,21 @@ const ExperienceDropdown = memo<ExperienceDropdownProps>(({ id, size = 'small' }
47
47
  icon: <Pencil size={14} />,
48
48
  key: 'edit',
49
49
  label: t('experience.actions.edit'),
50
+ onClick: handleMenuClick,
50
51
  },
51
52
  {
52
53
  danger: true,
53
54
  icon: <Trash2 size={14} />,
54
55
  key: 'delete',
55
56
  label: t('experience.actions.delete'),
57
+ onClick: handleMenuClick,
56
58
  },
57
59
  ];
58
60
 
59
61
  return (
60
- <Dropdown menu={{ items: menuItems, onClick: handleMenuClick }} trigger={['click']}>
62
+ <DropdownMenu items={menuItems}>
61
63
  <ActionIcon icon={MoreHorizontal} size={size} />
62
- </Dropdown>
64
+ </DropdownMenu>
63
65
  );
64
66
  });
65
67
 
@@ -1,4 +1,4 @@
1
- import { ActionIcon, type ActionIconProps, Dropdown } from '@lobehub/ui';
1
+ import { ActionIcon, type ActionIconProps, DropdownMenu } from '@lobehub/ui';
2
2
  import { App } from 'antd';
3
3
  import { MoreHorizontal, Pencil, Trash2 } from 'lucide-react';
4
4
  import { type KeyboardEvent, type MouseEvent, memo } from 'react';
@@ -47,19 +47,21 @@ const IdentityDropdown = memo<IdentityDropdownProps>(({ id, size = 'small' }) =>
47
47
  icon: <Pencil size={14} />,
48
48
  key: 'edit',
49
49
  label: t('edit', { ns: 'common' }),
50
+ onClick: handleMenuClick,
50
51
  },
51
52
  {
52
53
  danger: true,
53
54
  icon: <Trash2 size={14} />,
54
55
  key: 'delete',
55
56
  label: t('delete', { ns: 'common' }),
57
+ onClick: handleMenuClick,
56
58
  },
57
59
  ];
58
60
 
59
61
  return (
60
- <Dropdown menu={{ items: menuItems, onClick: handleMenuClick }} trigger={['click']}>
62
+ <DropdownMenu items={menuItems}>
61
63
  <ActionIcon icon={MoreHorizontal} size={size} />
62
- </Dropdown>
64
+ </DropdownMenu>
63
65
  );
64
66
  });
65
67
 
@@ -1,4 +1,4 @@
1
- import { ActionIcon, type ActionIconProps, Dropdown } from '@lobehub/ui';
1
+ import { ActionIcon, type ActionIconProps, DropdownMenu } from '@lobehub/ui';
2
2
  import { App } from 'antd';
3
3
  import { MoreHorizontal, Pencil, Trash2 } from 'lucide-react';
4
4
  import { type KeyboardEvent, type MouseEvent, memo } from 'react';
@@ -47,19 +47,21 @@ const PreferenceDropdown = memo<PreferenceDropdownProps>(({ id, size = 'small' }
47
47
  icon: <Pencil size={14} />,
48
48
  key: 'edit',
49
49
  label: t('preference.actions.edit'),
50
+ onClick: handleMenuClick,
50
51
  },
51
52
  {
52
53
  danger: true,
53
54
  icon: <Trash2 size={14} />,
54
55
  key: 'delete',
55
56
  label: t('preference.actions.delete'),
57
+ onClick: handleMenuClick,
56
58
  },
57
59
  ];
58
60
 
59
61
  return (
60
- <Dropdown menu={{ items: menuItems, onClick: handleMenuClick }} trigger={['click']}>
62
+ <DropdownMenu items={menuItems}>
61
63
  <ActionIcon icon={MoreHorizontal} size={size} />
62
- </Dropdown>
64
+ </DropdownMenu>
63
65
  );
64
66
  });
65
67
 
@@ -1,7 +1,6 @@
1
1
  'use client';
2
2
 
3
- import { ActionIcon, Dropdown } from '@lobehub/ui';
4
- import type { MenuProps } from '@lobehub/ui';
3
+ import { ActionIcon, DropdownMenu, type MenuProps } from '@lobehub/ui';
5
4
  import { MoreHorizontal } from 'lucide-react';
6
5
  import { memo } from 'react';
7
6
 
@@ -11,18 +10,9 @@ const Actions = memo(() => {
11
10
  const items: MenuProps['items'] = useDropdownMenu();
12
11
 
13
12
  return (
14
- <Dropdown
15
- arrow={false}
16
- menu={{
17
- items,
18
- onClick: ({ domEvent }) => {
19
- domEvent.stopPropagation();
20
- },
21
- }}
22
- trigger={['click']}
23
- >
13
+ <DropdownMenu items={items}>
24
14
  <ActionIcon icon={MoreHorizontal} size={'small'} />
25
- </Dropdown>
15
+ </DropdownMenu>
26
16
  );
27
17
  });
28
18
 
@@ -1,6 +1,6 @@
1
1
  'use client';
2
2
 
3
- import { Accordion, AccordionItem, Dropdown, Flexbox, Text } from '@lobehub/ui';
3
+ import { Accordion, AccordionItem, ContextMenuTrigger, Flexbox, Text } from '@lobehub/ui';
4
4
  import React, { Suspense, memo } from 'react';
5
5
  import { useTranslation } from 'react-i18next';
6
6
 
@@ -44,14 +44,7 @@ const Body = memo(() => {
44
44
  <AccordionItem
45
45
  action={<Actions />}
46
46
  headerWrapper={(header) => (
47
- <Dropdown
48
- menu={{
49
- items: dropdownMenu,
50
- }}
51
- trigger={['contextMenu']}
52
- >
53
- {header}
54
- </Dropdown>
47
+ <ContextMenuTrigger items={dropdownMenu}>{header}</ContextMenuTrigger>
55
48
  )}
56
49
  itemKey={GroupKey.AllPages}
57
50
  paddingBlock={4}
@@ -61,7 +61,7 @@ interface DragState {
61
61
  const DragStateContext = createContext<{
62
62
  currentDrag: DragState | null;
63
63
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
64
- setCurrentDrag: (state: DragState | null) => void;
64
+ setCurrentDrag: (_state: DragState | null) => void;
65
65
  }>({
66
66
  currentDrag: null,
67
67
  setCurrentDrag: () => {},
@@ -1,5 +1,5 @@
1
1
  import { isDesktop } from '@lobechat/const';
2
- import { ActionIcon, Dropdown, Flexbox, type MenuProps, Text } from '@lobehub/ui';
2
+ import { ActionIcon, DropdownMenu, Flexbox, type MenuProps, Text } from '@lobehub/ui';
3
3
  import { ArrowRight, Plus, Unlink } from 'lucide-react';
4
4
  import { type CSSProperties, memo, useMemo } from 'react';
5
5
  import { useTranslation } from 'react-i18next';
@@ -120,13 +120,13 @@ export const SSOProvidersList = memo(() => {
120
120
 
121
121
  {/* Link Account Button - Only show for Better-Auth users with available providers */}
122
122
  {enableBetterAuthActions && availableProviders.length > 0 && (
123
- <Dropdown menu={{ items: linkMenuItems, style: { maxWidth: '200px' } }} trigger={['click']}>
123
+ <DropdownMenu items={linkMenuItems} popupProps={{ style: { maxWidth: '200px' } }}>
124
124
  <Flexbox align={'center'} gap={6} horizontal style={{ cursor: 'pointer', fontSize: 12 }}>
125
125
  <Plus size={14} />
126
126
  <span>{t('profile.sso.link.button')}</span>
127
127
  <ArrowRight size={14} />
128
128
  </Flexbox>
129
- </Dropdown>
129
+ </DropdownMenu>
130
130
  )}
131
131
  </Flexbox>
132
132
  );
@@ -1,4 +1,4 @@
1
- import { ActionIcon, Dropdown, type MenuProps } from '@lobehub/ui';
1
+ import { ActionIcon, DropdownMenu, type MenuProps } from '@lobehub/ui';
2
2
  import { MoreHorizontalIcon } from 'lucide-react';
3
3
  import { memo } from 'react';
4
4
 
@@ -8,17 +8,9 @@ interface ActionsProps {
8
8
 
9
9
  const Actions = memo<ActionsProps>(({ dropdownMenu }) => {
10
10
  return (
11
- <Dropdown
12
- menu={{
13
- items: dropdownMenu,
14
- onClick: ({ domEvent }) => {
15
- domEvent.stopPropagation();
16
- },
17
- }}
18
- trigger={['click']}
19
- >
11
+ <DropdownMenu items={dropdownMenu}>
20
12
  <ActionIcon icon={MoreHorizontalIcon} size={'small'} style={{ flex: 'none' }} />
21
- </Dropdown>
13
+ </DropdownMenu>
22
14
  );
23
15
  });
24
16
 
@@ -1,6 +1,13 @@
1
1
  'use client';
2
2
 
3
- import { Accordion, AccordionItem, ActionIcon, Dropdown, Flexbox, Text } from '@lobehub/ui';
3
+ import {
4
+ Accordion,
5
+ AccordionItem,
6
+ ActionIcon,
7
+ ContextMenuTrigger,
8
+ Flexbox,
9
+ Text,
10
+ } from '@lobehub/ui';
4
11
  import isEqual from 'fast-deep-equal';
5
12
  import { ArrowDownUpIcon } from 'lucide-react';
6
13
  import { useCallback, useMemo, useState } from 'react';
@@ -113,16 +120,7 @@ const ProviderList = (props: {
113
120
  />
114
121
  </div>
115
122
  }
116
- headerWrapper={(header) => (
117
- <Dropdown
118
- menu={{
119
- items: [],
120
- }}
121
- trigger={['contextMenu']}
122
- >
123
- {header}
124
- </Dropdown>
125
- )}
123
+ headerWrapper={(header) => <ContextMenuTrigger items={[]}>{header}</ContextMenuTrigger>}
126
124
  itemKey="enabled"
127
125
  paddingBlock={4}
128
126
  paddingInline={'8px 4px'}
@@ -142,16 +140,7 @@ const ProviderList = (props: {
142
140
  {/* Custom Providers */}
143
141
  {disabledCustomProviderList.length > 0 && (
144
142
  <AccordionItem
145
- headerWrapper={(header) => (
146
- <Dropdown
147
- menu={{
148
- items: [],
149
- }}
150
- trigger={['contextMenu']}
151
- >
152
- {header}
153
- </Dropdown>
154
- )}
143
+ headerWrapper={(header) => <ContextMenuTrigger items={[]}>{header}</ContextMenuTrigger>}
155
144
  itemKey="custom"
156
145
  paddingBlock={4}
157
146
  paddingInline={'8px 4px'}
@@ -177,14 +166,9 @@ const ProviderList = (props: {
177
166
  ) : undefined
178
167
  }
179
168
  headerWrapper={(header) => (
180
- <Dropdown
181
- menu={{
182
- items: disabledModelProviderList.length > 1 ? dropdownMenu : [],
183
- }}
184
- trigger={['contextMenu']}
185
- >
169
+ <ContextMenuTrigger items={disabledModelProviderList.length > 1 ? dropdownMenu : []}>
186
170
  {header}
187
- </Dropdown>
171
+ </ContextMenuTrigger>
188
172
  )}
189
173
  itemKey="disabled"
190
174
  paddingBlock={4}
@@ -1,4 +1,4 @@
1
- import { ActionIcon, Dropdown, Flexbox, Icon, Text, TooltipGroup } from '@lobehub/ui';
1
+ import { ActionIcon, DropdownMenu, Flexbox, Icon, Text, TooltipGroup } from '@lobehub/ui';
2
2
  import type { ItemType } from 'antd/es/menu/interface';
3
3
  import isEqual from 'fast-deep-equal';
4
4
  import { ArrowDownUpIcon, LucideCheck } from 'lucide-react';
@@ -240,9 +240,9 @@ const DisabledModels = memo<DisabledModelsProps>(({ activeTab, providerId }) =>
240
240
  {t('providerModels.list.disabled')}
241
241
  </Text>
242
242
  {sourceDisabledModels.length > 1 && (
243
- <Dropdown
244
- menu={{
245
- items: [
243
+ <DropdownMenu
244
+ items={
245
+ [
246
246
  {
247
247
  icon: sortType === SortType.Default ? <Icon icon={LucideCheck} /> : <div />,
248
248
  key: 'default',
@@ -286,16 +286,15 @@ const DisabledModels = memo<DisabledModelsProps>(({ activeTab, providerId }) =>
286
286
  label: t('providerModels.list.disabledActions.sortReleasedAtDesc'),
287
287
  onClick: () => updateSortType(SortType.ReleasedAtDesc),
288
288
  },
289
- ] as ItemType[],
290
- }}
291
- trigger={['click']}
289
+ ] as ItemType[]
290
+ }
292
291
  >
293
292
  <ActionIcon
294
293
  icon={ArrowDownUpIcon}
295
294
  size={'small'}
296
295
  title={t('providerModels.list.disabledActions.sort')}
297
296
  />
298
- </Dropdown>
297
+ </DropdownMenu>
299
298
  )}
300
299
  </Flexbox>
301
300
  <TooltipGroup>
@@ -1,4 +1,4 @@
1
- import { ActionIcon, Button, Dropdown, Flexbox, Skeleton, Text } from '@lobehub/ui';
1
+ import { ActionIcon, Button, DropdownMenu, Flexbox, Skeleton, Text } from '@lobehub/ui';
2
2
  import { App, Space } from 'antd';
3
3
  import { cssVar } from 'antd-style';
4
4
  import { CircleX, EllipsisVertical, LucideRefreshCcwDot, PlusIcon } from 'lucide-react';
@@ -137,28 +137,26 @@ const ModelTitle = memo<ModelFetcherProps>(
137
137
  <CreateNewModelModal open={showModal} setOpen={setShowModal} />
138
138
  </>
139
139
  )}
140
- <Dropdown
141
- menu={{
142
- items: [
143
- {
144
- key: 'reset',
145
- label: t('providerModels.list.resetAll.title'),
146
- onClick: async () => {
147
- modal.confirm({
148
- content: t('providerModels.list.resetAll.conform'),
149
- onOk: async () => {
150
- await clearModelsByProvider(provider);
151
- message.success(t('providerModels.list.resetAll.success'));
152
- },
153
- title: t('providerModels.list.resetAll.title'),
154
- });
155
- },
140
+ <DropdownMenu
141
+ items={[
142
+ {
143
+ key: 'reset',
144
+ label: t('providerModels.list.resetAll.title'),
145
+ onClick: async () => {
146
+ modal.confirm({
147
+ content: t('providerModels.list.resetAll.conform'),
148
+ onOk: async () => {
149
+ await clearModelsByProvider(provider);
150
+ message.success(t('providerModels.list.resetAll.success'));
151
+ },
152
+ title: t('providerModels.list.resetAll.title'),
153
+ });
156
154
  },
157
- ],
158
- }}
155
+ },
156
+ ]}
159
157
  >
160
158
  <Button icon={EllipsisVertical} size={'small'} />
161
- </Dropdown>
159
+ </DropdownMenu>
162
160
  </Space.Compact>
163
161
  </Flexbox>
164
162
  )}
@@ -1,4 +1,10 @@
1
- import { ActionIcon, Dropdown, type DropdownProps, Icon, type MenuProps } from '@lobehub/ui';
1
+ import {
2
+ ActionIcon,
3
+ DropdownMenu,
4
+ type DropdownMenuProps,
5
+ Icon,
6
+ type MenuProps,
7
+ } from '@lobehub/ui';
2
8
  import { App } from 'antd';
3
9
  import { createStaticStyles } from 'antd-style';
4
10
  import { MoreVertical, PencilLine, Plus, Settings2, Trash, UsersRound } from 'lucide-react';
@@ -15,7 +21,7 @@ const styles = createStaticStyles(({ css }) => ({
15
21
  z-index: 2000;
16
22
  `,
17
23
  }));
18
- interface ActionsProps extends Pick<DropdownProps, 'onOpenChange'> {
24
+ interface ActionsProps extends Pick<DropdownMenuProps, 'onOpenChange'> {
19
25
  id?: string;
20
26
  isCustomGroup?: boolean;
21
27
  isPinned?: boolean;
@@ -170,17 +176,7 @@ const Actions = memo<ActionsProps>(
170
176
 
171
177
  return (
172
178
  <>
173
- <Dropdown
174
- arrow={false}
175
- menu={{
176
- items: menuItems,
177
- onClick: ({ domEvent }) => {
178
- domEvent.stopPropagation();
179
- },
180
- }}
181
- onOpenChange={onOpenChange}
182
- trigger={['click']}
183
- >
179
+ <DropdownMenu items={menuItems} onOpenChange={onOpenChange}>
184
180
  <ActionIcon
185
181
  active={isMobile ? true : false}
186
182
  icon={MoreVertical}
@@ -191,7 +187,7 @@ const Actions = memo<ActionsProps>(
191
187
  size={{ blockSize: 22, size: 16 }}
192
188
  style={{ background: isMobile ? 'transparent' : '', marginRight: -8 }}
193
189
  />
194
- </Dropdown>
190
+ </DropdownMenu>
195
191
 
196
192
  <MemberSelectionModal
197
193
  mode="create"