@lobehub/lobehub 2.0.0-next.227 → 2.0.0-next.228

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 (42) hide show
  1. package/AGENTS.md +4 -0
  2. package/CHANGELOG.md +25 -0
  3. package/CLAUDE.md +4 -0
  4. package/changelog/v1.json +9 -0
  5. package/package.json +2 -2
  6. package/packages/utils/src/platform.test.ts +26 -1
  7. package/packages/utils/src/platform.ts +22 -0
  8. package/src/app/[variants]/(main)/_layout/DesktopLayoutContainer/style.ts +4 -0
  9. package/src/app/[variants]/(main)/_layout/DesktopLayoutContainer.tsx +8 -4
  10. package/src/app/[variants]/(main)/chat/_layout/Sidebar/Header/Agent/SwitchPanel.tsx +37 -23
  11. package/src/app/[variants]/(main)/chat/_layout/Sidebar/Topic/List/Item/Editing.tsx +4 -7
  12. package/src/app/[variants]/(main)/chat/_layout/Sidebar/Topic/TopicListContent/ThreadList/ThreadItem/Editing.tsx +4 -7
  13. package/src/app/[variants]/(main)/chat/features/Conversation/Header/HeaderActions/index.tsx +3 -13
  14. package/src/app/[variants]/(main)/chat/features/Conversation/Header/WorkingDirectory/index.tsx +2 -4
  15. package/src/app/[variants]/(main)/community/(list)/model/features/List/Item.tsx +1 -3
  16. package/src/app/[variants]/(main)/group/_layout/Sidebar/GroupConfig/AgentProfilePopup.tsx +3 -5
  17. package/src/app/[variants]/(main)/group/_layout/Sidebar/Header/Agent/SwitchPanel.tsx +4 -6
  18. package/src/app/[variants]/(main)/group/_layout/Sidebar/Topic/List/Item/Editing.tsx +4 -7
  19. package/src/app/[variants]/(main)/group/_layout/Sidebar/Topic/TopicListContent/ThreadList/ThreadItem/Editing.tsx +4 -7
  20. package/src/app/[variants]/(main)/home/_layout/Body/Agent/List/AgentGroupItem/Editing.tsx +4 -7
  21. package/src/app/[variants]/(main)/home/_layout/Body/Agent/List/AgentItem/Editing.tsx +4 -7
  22. package/src/app/[variants]/(main)/home/_layout/Body/Agent/List/Group/Editing.tsx +4 -7
  23. package/src/app/[variants]/(main)/home/_layout/Body/Project/List/Editing.tsx +4 -7
  24. package/src/app/[variants]/(main)/image/_layout/ConfigPanel/components/ModelSelect/ImageModelItem.tsx +1 -6
  25. package/src/app/[variants]/(main)/image/_layout/Topics/TopicItem.tsx +3 -4
  26. package/src/app/[variants]/(main)/page/_layout/Body/List/Item/Editing.tsx +5 -7
  27. package/src/app/[variants]/(main)/resource/(home)/_layout/Body/LibraryList/List/Item/Editing.tsx +4 -7
  28. package/src/components/ManifestPreviewer/index.tsx +2 -5
  29. package/src/components/TipGuide/index.tsx +3 -4
  30. package/src/features/ChatInput/ActionBar/Search/index.tsx +1 -1
  31. package/src/features/ChatInput/ActionBar/components/Action.tsx +5 -1
  32. package/src/features/ChatInput/ActionBar/components/ActionPopover.tsx +27 -23
  33. package/src/features/ChatMiniMap/MinimapIndicator.tsx +2 -4
  34. package/src/features/ChatMiniMap/index.tsx +16 -14
  35. package/src/features/Conversation/Markdown/plugins/Mention/Render.tsx +2 -4
  36. package/src/features/Conversation/Messages/AssistantGroup/Tool/Render/Intervention/ApprovalActions.tsx +2 -3
  37. package/src/features/Conversation/Messages/components/Extras/Usage/UsageDetail/index.tsx +3 -4
  38. package/src/features/LocalFile/LocalFile.tsx +4 -5
  39. package/src/features/MCPPluginDetail/Deployment/index.tsx +13 -4
  40. package/src/features/MCPPluginDetail/Score/TotalScore.tsx +10 -5
  41. package/src/features/ModelSwitchPanel/index.tsx +2 -4
  42. package/src/features/PageEditor/Copilot/Toolbar.tsx +5 -8
@@ -1,5 +1,4 @@
1
- import { Input } from '@lobehub/ui';
2
- import { Popover } from 'antd';
1
+ import { Input, Popover } from '@lobehub/ui';
3
2
  import { memo, useCallback, useState } from 'react';
4
3
 
5
4
  import { useHomeStore } from '@/store/home';
@@ -33,7 +32,6 @@ const Editing = memo<EditingProps>(({ id, name, toggleEditing }) => {
33
32
 
34
33
  return (
35
34
  <Popover
36
- arrow={false}
37
35
  content={
38
36
  <Input
39
37
  autoFocus
@@ -50,20 +48,19 @@ const Editing = memo<EditingProps>(({ id, name, toggleEditing }) => {
50
48
  }}
51
49
  />
52
50
  }
53
- destroyOnHidden
54
51
  onOpenChange={(open) => {
55
52
  if (!open) handleUpdate();
56
53
  toggleEditing(open);
57
54
  }}
58
55
  open={editing}
59
- placement={'bottomLeft'}
56
+ placement="bottomLeft"
60
57
  styles={{
61
- container: {
58
+ content: {
62
59
  padding: 4,
63
60
  width: 320,
64
61
  },
65
62
  }}
66
- trigger={['click']}
63
+ trigger="click"
67
64
  >
68
65
  <div />
69
66
  </Popover>
@@ -1,5 +1,4 @@
1
- import { Input } from '@lobehub/ui';
2
- import { Popover } from 'antd';
1
+ import { Input, Popover } from '@lobehub/ui';
3
2
  import { memo, useCallback, useState } from 'react';
4
3
 
5
4
  import { useKnowledgeBaseStore } from '@/store/knowledgeBase';
@@ -26,7 +25,6 @@ const Editing = memo<EditingProps>(({ id, name, toggleEditing }) => {
26
25
 
27
26
  return (
28
27
  <Popover
29
- arrow={false}
30
28
  content={
31
29
  <Input
32
30
  autoFocus
@@ -43,20 +41,19 @@ const Editing = memo<EditingProps>(({ id, name, toggleEditing }) => {
43
41
  }}
44
42
  />
45
43
  }
46
- destroyOnHidden
47
44
  onOpenChange={(open) => {
48
45
  if (!open) handleUpdate();
49
46
  toggleEditing(open);
50
47
  }}
51
48
  open={editing}
52
- placement={'bottomLeft'}
49
+ placement="bottomLeft"
53
50
  styles={{
54
- container: {
51
+ content: {
55
52
  padding: 4,
56
53
  width: 320,
57
54
  },
58
55
  }}
59
- trigger={['click']}
56
+ trigger="click"
60
57
  >
61
58
  <div />
62
59
  </Popover>
@@ -1,6 +1,5 @@
1
1
  import { ModelIcon } from '@lobehub/icons';
2
- import { Flexbox, Text } from '@lobehub/ui';
3
- import { Popover } from 'antd';
2
+ import { Flexbox, Popover, Text } from '@lobehub/ui';
4
3
  import { createStaticStyles, cx } from 'antd-style';
5
4
  import { type AiModelForSelect } from 'model-bank';
6
5
  import numeral from 'numeral';
@@ -109,10 +108,6 @@ const ImageModelItem = memo<ImageModelItemProps>(
109
108
 
110
109
  return (
111
110
  <Popover
112
- align={{
113
- offset: [24, -10],
114
- }}
115
- arrow={false}
116
111
  classNames={{ root: cx(styles.popover, isDarkMode && styles.popover_dark) }}
117
112
  content={popoverContent}
118
113
  placement="rightTop"
@@ -1,7 +1,7 @@
1
1
  'use client';
2
2
 
3
- import { ActionIcon, Avatar, Flexbox, Text } from '@lobehub/ui';
4
- import { App, Popover } from 'antd';
3
+ import { ActionIcon, Avatar, Flexbox, Popover, Text } from '@lobehub/ui';
4
+ import { App } from 'antd';
5
5
  import { cssVar } from 'antd-style';
6
6
  import { Trash } from 'lucide-react';
7
7
  import React, { memo } from 'react';
@@ -92,11 +92,10 @@ const TopicItem = memo<TopicItemProps>(({ topic, showMoreInfo, style }) => {
92
92
 
93
93
  return (
94
94
  <Popover
95
- arrow={false}
96
95
  content={tooltipContent}
97
96
  placement={'left'}
98
97
  styles={{
99
- container: {
98
+ content: {
100
99
  width: 200,
101
100
  },
102
101
  }}
@@ -1,5 +1,4 @@
1
- import { Block, Flexbox, Input } from '@lobehub/ui';
2
- import { Popover } from 'antd';
1
+ import { Block, Flexbox, Input, Popover } from '@lobehub/ui';
3
2
  import { memo, useCallback, useState } from 'react';
4
3
  import { useTranslation } from 'react-i18next';
5
4
 
@@ -46,7 +45,6 @@ const Editing = memo<EditingProps>(({ documentId, title, currentEmoji, toggleEdi
46
45
 
47
46
  return (
48
47
  <Popover
49
- arrow={false}
50
48
  content={
51
49
  <Flexbox gap={4} horizontal onClick={(e) => e.stopPropagation()} style={{ width: 320 }}>
52
50
  <EmojiPicker
@@ -71,6 +69,7 @@ const Editing = memo<EditingProps>(({ documentId, title, currentEmoji, toggleEdi
71
69
  defaultAvatar={'📄'}
72
70
  locale={locale}
73
71
  onChange={setNewEmoji}
72
+ onClick={(e) => e?.stopPropagation()}
74
73
  onDelete={() => setNewEmoji(undefined)}
75
74
  value={newEmoji}
76
75
  />
@@ -87,19 +86,18 @@ const Editing = memo<EditingProps>(({ documentId, title, currentEmoji, toggleEdi
87
86
  />
88
87
  </Flexbox>
89
88
  }
90
- destroyOnHidden
91
89
  onOpenChange={(open) => {
92
90
  if (!open) handleUpdate();
93
91
  toggleEditing(open);
94
92
  }}
95
93
  open={editing}
96
- placement={'bottomLeft'}
94
+ placement="bottomLeft"
97
95
  styles={{
98
- container: {
96
+ content: {
99
97
  padding: 4,
100
98
  },
101
99
  }}
102
- trigger={['click']}
100
+ trigger="click"
103
101
  >
104
102
  <div />
105
103
  </Popover>
@@ -1,5 +1,4 @@
1
- import { Input } from '@lobehub/ui';
2
- import { Popover } from 'antd';
1
+ import { Input, Popover } from '@lobehub/ui';
3
2
  import { memo, useCallback, useEffect, useState } from 'react';
4
3
 
5
4
  import { useKnowledgeBaseStore } from '@/store/knowledgeBase';
@@ -34,7 +33,6 @@ const Editing = memo<EditingProps>(({ id, name, toggleEditing }) => {
34
33
 
35
34
  return (
36
35
  <Popover
37
- arrow={false}
38
36
  content={
39
37
  <Input
40
38
  autoFocus
@@ -52,20 +50,19 @@ const Editing = memo<EditingProps>(({ id, name, toggleEditing }) => {
52
50
  }}
53
51
  />
54
52
  }
55
- destroyOnHidden
56
53
  onOpenChange={(open) => {
57
54
  if (!open) handleUpdate();
58
55
  toggleEditing(open);
59
56
  }}
60
57
  open={editing}
61
- placement={'bottomLeft'}
58
+ placement="bottomLeft"
62
59
  styles={{
63
- container: {
60
+ content: {
64
61
  padding: 4,
65
62
  width: 320,
66
63
  },
67
64
  }}
68
- trigger={['click']}
65
+ trigger="click"
69
66
  >
70
67
  <div />
71
68
  </Popover>
@@ -1,5 +1,4 @@
1
- import { Highlighter } from '@lobehub/ui';
2
- import { Popover } from 'antd';
1
+ import { Highlighter, Popover } from '@lobehub/ui';
3
2
  import { type ReactNode, memo } from 'react';
4
3
 
5
4
  interface PluginManifestPreviewerProps {
@@ -11,7 +10,6 @@ interface PluginManifestPreviewerProps {
11
10
  const ManifestPreviewer = memo<PluginManifestPreviewerProps>(
12
11
  ({ manifest, children, trigger = 'click' }) => (
13
12
  <Popover
14
- arrow={false}
15
13
  content={
16
14
  <Highlighter
17
15
  language={'json'}
@@ -21,8 +19,7 @@ const ManifestPreviewer = memo<PluginManifestPreviewerProps>(
21
19
  </Highlighter>
22
20
  }
23
21
  placement={'right'}
24
- style={{ width: 400 }}
25
- title={'Manifest JSON'}
22
+ styles={{ content: { width: 400 } }}
26
23
  trigger={trigger}
27
24
  >
28
25
  {children}
@@ -1,5 +1,5 @@
1
- import { ActionIcon, Flexbox } from '@lobehub/ui';
2
- import { ConfigProvider, Popover, type TooltipProps } from 'antd';
1
+ import { ActionIcon, Flexbox, Popover } from '@lobehub/ui';
2
+ import { ConfigProvider, type TooltipProps } from 'antd';
3
3
  import { createStaticStyles, cssVar, cx } from 'antd-style';
4
4
  import { XIcon } from 'lucide-react';
5
5
  import { type CSSProperties, type FC, type ReactNode } from 'react';
@@ -111,11 +111,10 @@ const TipGuide: FC<TipGuideProps> = ({
111
111
  }}
112
112
  >
113
113
  <Popover
114
- arrow={{ pointAtCenter: true }}
114
+ arrow={true}
115
115
  classNames={{
116
116
  root: cx(className, styles.overlay),
117
117
  }}
118
- color={'blue'}
119
118
  content={
120
119
  <Flexbox gap={24} horizontal style={{ userSelect: 'none' }}>
121
120
  <div>{title}</div>
@@ -47,7 +47,7 @@ const Search = memo(() => {
47
47
  minWidth: 320,
48
48
  placement: 'topLeft',
49
49
  styles: {
50
- container: {
50
+ content: {
51
51
  padding: 4,
52
52
  },
53
53
  },
@@ -84,7 +84,11 @@ const Action = memo<ActionProps>(
84
84
  <ActionPopover
85
85
  onOpenChange={setShow}
86
86
  open={show}
87
- trigger={trigger}
87
+ trigger={
88
+ Array.isArray(trigger)
89
+ ? (trigger.filter((t) => t !== 'contextMenu') as ('click' | 'hover')[])
90
+ : trigger
91
+ }
88
92
  {...popover}
89
93
  minWidth={mobile ? '100%' : popover.minWidth}
90
94
  placement={mobile ? 'top' : (dropdownPlacement ?? popover.placement)}
@@ -1,7 +1,6 @@
1
1
  'use client';
2
2
 
3
- import { Flexbox } from '@lobehub/ui';
4
- import { Popover, type PopoverProps } from 'antd';
3
+ import { Flexbox, Popover, type PopoverProps } from '@lobehub/ui';
5
4
  import { createStaticStyles, cssVar, cx } from 'antd-style';
6
5
  import { type ReactNode, memo } from 'react';
7
6
 
@@ -23,7 +22,8 @@ const styles = createStaticStyles(({ css }) => ({
23
22
  `,
24
23
  }));
25
24
 
26
- export interface ActionPopoverProps extends Omit<PopoverProps, 'title' | 'content'> {
25
+ export interface ActionPopoverProps extends Omit<PopoverProps, 'title' | 'content' | 'children'> {
26
+ children?: ReactNode;
27
27
  content?: ReactNode;
28
28
  extra?: ReactNode;
29
29
  loading?: boolean;
@@ -45,6 +45,7 @@ const ActionPopover = memo<ActionPopoverProps>(
45
45
  placement,
46
46
  loading,
47
47
  extra,
48
+ content,
48
49
  ...rest
49
50
  }) => {
50
51
  const isMobile = useIsMobile();
@@ -52,45 +53,48 @@ const ActionPopover = memo<ActionPopoverProps>(
52
53
  // Properly handle classNames (can be object or function)
53
54
  const resolvedClassNames =
54
55
  typeof customClassNames === 'function' ? customClassNames : customClassNames;
55
- const containerClassName =
56
- typeof resolvedClassNames === 'object' && resolvedClassNames?.container
57
- ? cx(styles.popoverContent, resolvedClassNames.container)
56
+ const contentClassName =
57
+ typeof resolvedClassNames === 'object' && resolvedClassNames?.content
58
+ ? cx(styles.popoverContent, resolvedClassNames.content)
58
59
  : styles.popoverContent;
59
60
 
60
61
  // Properly handle styles (can be object or function)
61
62
  const resolvedStyles = typeof customStyles === 'function' ? customStyles : customStyles;
62
- const containerStyle =
63
- typeof resolvedStyles === 'object' && resolvedStyles?.container
64
- ? resolvedStyles.container
65
- : {};
63
+ const contentStyle =
64
+ typeof resolvedStyles === 'object' && resolvedStyles?.content ? resolvedStyles.content : {};
65
+
66
+ // Compose content with optional title
67
+ const popoverContent = (
68
+ <>
69
+ {title && (
70
+ <Flexbox gap={8} horizontal justify={'space-between'} style={{ marginBottom: 16 }}>
71
+ {title}
72
+ {extra}
73
+ {loading && <UpdateLoading style={{ color: cssVar.colorTextSecondary }} />}
74
+ </Flexbox>
75
+ )}
76
+ {content}
77
+ </>
78
+ );
66
79
 
67
80
  return (
68
81
  <Popover
69
- arrow={false}
70
82
  classNames={{
71
83
  ...(typeof resolvedClassNames === 'object' ? resolvedClassNames : {}),
72
- container: containerClassName,
84
+ content: contentClassName,
73
85
  }}
86
+ content={popoverContent}
74
87
  placement={isMobile ? 'top' : placement}
75
88
  styles={{
76
89
  ...(typeof resolvedStyles === 'object' ? resolvedStyles : {}),
77
- container: {
90
+ content: {
78
91
  maxHeight,
79
92
  maxWidth: isMobile ? undefined : maxWidth,
80
93
  minWidth: isMobile ? undefined : minWidth,
81
94
  width: isMobile ? '100vw' : undefined,
82
- ...containerStyle,
95
+ ...contentStyle,
83
96
  },
84
97
  }}
85
- title={
86
- title && (
87
- <Flexbox gap={8} horizontal justify={'space-between'} style={{ marginBottom: 16 }}>
88
- {title}
89
- {extra}
90
- {loading && <UpdateLoading style={{ color: cssVar.colorTextSecondary }} />}
91
- </Flexbox>
92
- )
93
- }
94
98
  {...rest}
95
99
  >
96
100
  {children}
@@ -1,5 +1,4 @@
1
- import { Block, Text } from '@lobehub/ui';
2
- import { Popover } from 'antd';
1
+ import { Block, Popover, Text } from '@lobehub/ui';
3
2
  import { cx } from 'antd-style';
4
3
  import { memo } from 'react';
5
4
  import { useTranslation } from 'react-i18next';
@@ -28,13 +27,12 @@ export const MinimapIndicator = memo<MinimapIndicatorProps>(
28
27
 
29
28
  return (
30
29
  <Popover
31
- arrow={false}
32
30
  content={popoverContent}
33
31
  key={id}
34
32
  mouseEnterDelay={0.1}
35
33
  placement={'left'}
36
34
  styles={{
37
- container: {
35
+ content: {
38
36
  width: 320,
39
37
  },
40
38
  }}
@@ -1,6 +1,6 @@
1
1
  'use client';
2
2
 
3
- import { ActionIcon, Flexbox } from '@lobehub/ui';
3
+ import { ActionIcon, Flexbox, PopoverGroup } from '@lobehub/ui';
4
4
  import { cx } from 'antd-style';
5
5
  import { ChevronDown, ChevronUp } from 'lucide-react';
6
6
  import { memo, useState } from 'react';
@@ -36,19 +36,21 @@ const ChatMinimap = memo(() => {
36
36
  size={14}
37
37
  />
38
38
  <Flexbox className={styles.railContent}>
39
- {indicators.map(({ id, width, preview, role, virtuosoIndex }, position) => (
40
- <MinimapIndicator
41
- activePosition={activeIndicatorPosition}
42
- id={id}
43
- key={id}
44
- onJump={handleJump}
45
- position={position}
46
- preview={preview}
47
- role={role}
48
- virtuosoIndex={virtuosoIndex}
49
- width={width}
50
- />
51
- ))}
39
+ <PopoverGroup contentLayoutAnimation>
40
+ {indicators.map(({ id, width, preview, role, virtuosoIndex }, position) => (
41
+ <MinimapIndicator
42
+ activePosition={activeIndicatorPosition}
43
+ id={id}
44
+ key={id}
45
+ onJump={handleJump}
46
+ position={position}
47
+ preview={preview}
48
+ role={role}
49
+ virtuosoIndex={virtuosoIndex}
50
+ width={width}
51
+ />
52
+ ))}
53
+ </PopoverGroup>
52
54
  </Flexbox>
53
55
  <ActionIcon
54
56
  aria-label={t('minimap.nextMessage')}
@@ -1,7 +1,6 @@
1
1
  'use client';
2
2
 
3
- import { Avatar, Flexbox, Text } from '@lobehub/ui';
4
- import { Popover } from 'antd';
3
+ import { Avatar, Flexbox, Popover, Text } from '@lobehub/ui';
5
4
  import { createStaticStyles } from 'antd-style';
6
5
  import isEqual from 'fast-deep-equal';
7
6
  import { memo } from 'react';
@@ -75,7 +74,6 @@ const Render = memo<MarkdownElementProps<MentionProps>>(({ children, node }) =>
75
74
 
76
75
  return (
77
76
  <Popover
78
- arrow={false}
79
77
  content={
80
78
  <Flexbox gap={12} style={{ overflow: 'hidden' }} width={320}>
81
79
  <Flexbox align="center" gap={8} horizontal>
@@ -93,7 +91,7 @@ const Render = memo<MarkdownElementProps<MentionProps>>(({ children, node }) =>
93
91
  </Flexbox>
94
92
  </Flexbox>
95
93
  }
96
- trigger={['click']}
94
+ trigger="click"
97
95
  >
98
96
  <span className={styles.mention}>
99
97
  {'@'}
@@ -1,5 +1,5 @@
1
- import { Button, Dropdown, Flexbox } from '@lobehub/ui';
2
- import { Input, Popover, Space } from 'antd';
1
+ import { Button, Dropdown, Flexbox, Popover } from '@lobehub/ui';
2
+ import { Input, Space } from 'antd';
3
3
  import { ChevronDown } from 'lucide-react';
4
4
  import { memo, useState } from 'react';
5
5
  import { useTranslation } from 'react-i18next';
@@ -80,7 +80,6 @@ const ApprovalActions = memo<ApprovalActionsProps>(
80
80
  return (
81
81
  <Flexbox gap={8} horizontal>
82
82
  <Popover
83
- arrow={false}
84
83
  content={
85
84
  <Flexbox gap={12} style={{ width: 400 }}>
86
85
  <Flexbox align={'center'} horizontal justify={'space-between'}>
@@ -1,6 +1,6 @@
1
1
  import { type ModelPerformance, type ModelUsage } from '@lobechat/types';
2
- import { Center, Flexbox, Icon } from '@lobehub/ui';
3
- import { Divider, Popover } from 'antd';
2
+ import { Center, Flexbox, Icon, Popover } from '@lobehub/ui';
3
+ import { Divider } from 'antd';
4
4
  import { cssVar } from 'antd-style';
5
5
  import { BadgeCent, CoinsIcon } from 'lucide-react';
6
6
  import { memo } from 'react';
@@ -132,7 +132,6 @@ const TokenDetail = memo<TokenDetailProps>(({ usage, performance, model, provide
132
132
 
133
133
  return (
134
134
  <Popover
135
- arrow={false}
136
135
  content={
137
136
  <Flexbox gap={8} style={{ minWidth: 200 }}>
138
137
  {modelCard && <ModelCard {...modelCard} provider={provider} />}
@@ -214,7 +213,7 @@ const TokenDetail = memo<TokenDetailProps>(({ usage, performance, model, provide
214
213
  </Flexbox>
215
214
  }
216
215
  placement={'top'}
217
- trigger={['hover']}
216
+ trigger="hover"
218
217
  >
219
218
  <Center
220
219
  gap={2}
@@ -1,5 +1,5 @@
1
- import { Button, Flexbox } from '@lobehub/ui';
2
- import { Popover, Space } from 'antd';
1
+ import { Button, Flexbox, Popover } from '@lobehub/ui';
2
+ import { Space } from 'antd';
3
3
  import { createStaticStyles, cssVar } from 'antd-style';
4
4
  import { ExternalLink, FolderOpen } from 'lucide-react';
5
5
  import React from 'react';
@@ -98,12 +98,11 @@ export const LocalFile = ({ name, path, isDirectory = false }: LocalFileProps) =
98
98
 
99
99
  return (
100
100
  <Popover
101
- arrow={false}
102
101
  content={popoverContent}
103
102
  styles={{
104
- container: { padding: 0 },
103
+ content: { padding: 0 },
105
104
  }}
106
- trigger={['hover']}
105
+ trigger="hover"
107
106
  >
108
107
  {fileContent}
109
108
  </Popover>
@@ -1,7 +1,17 @@
1
1
  import { SiApple, SiLinux } from '@icons-pack/react-simple-icons';
2
2
  import { Microsoft } from '@lobehub/icons';
3
- import { ActionIcon, Block, Collapse, Empty, Flexbox, Icon, Snippet, Tag } from '@lobehub/ui';
4
- import { Divider, Popover, Steps } from 'antd';
3
+ import {
4
+ ActionIcon,
5
+ Block,
6
+ Collapse,
7
+ Empty,
8
+ Flexbox,
9
+ Icon,
10
+ Popover,
11
+ Snippet,
12
+ Tag,
13
+ } from '@lobehub/ui';
14
+ import { Divider, Steps } from 'antd';
5
15
  import { createStaticStyles, cssVar } from 'antd-style';
6
16
  import { startCase } from 'es-toolkit/compat';
7
17
  import {
@@ -220,7 +230,6 @@ const Deployment = memo<{ mobile?: boolean }>(({ mobile }) => {
220
230
  </span>
221
231
  {dep.installInstructions && (
222
232
  <Popover
223
- arrow={false}
224
233
  content={
225
234
  <Flexbox gap={8}>
226
235
  <Descriptions
@@ -265,7 +274,7 @@ const Deployment = memo<{ mobile?: boolean }>(({ mobile }) => {
265
274
  )}
266
275
  </Flexbox>
267
276
  }
268
- trigger={['hover']}
277
+ trigger="hover"
269
278
  >
270
279
  <ActionIcon
271
280
  color={cssVar.colorTextDescription}
@@ -1,5 +1,5 @@
1
- import { Block, Center, Flexbox } from '@lobehub/ui';
2
- import { Popover, Progress } from 'antd';
1
+ import { Block, Center, Flexbox, Popover } from '@lobehub/ui';
2
+ import { Progress } from 'antd';
3
3
  import { createStaticStyles, cssVar } from 'antd-style';
4
4
  import { memo } from 'react';
5
5
  import { useTranslation } from 'react-i18next';
@@ -248,10 +248,15 @@ const TotalScore = memo<TotalScoreProps>(({ scoreResult, scoreItems = [], isVali
248
248
 
249
249
  <div className={styles.progressContainer}>
250
250
  <Popover
251
- arrow={false}
252
- content={renderTooltipContent()}
251
+ content={
252
+ <div>
253
+ <div style={{ fontWeight: 'bold', marginBottom: 8 }}>
254
+ {t('mcp.details.totalScore.popover.title')}
255
+ </div>
256
+ {renderTooltipContent()}
257
+ </div>
258
+ }
253
259
  placement="bottom"
254
- title={t('mcp.details.totalScore.popover.title')}
255
260
  trigger={['hover', 'click']}
256
261
  >
257
262
  <Progress
@@ -1,5 +1,4 @@
1
- import { TooltipGroup } from '@lobehub/ui';
2
- import { Popover } from 'antd';
1
+ import { Popover, TooltipGroup } from '@lobehub/ui';
3
2
  import { memo, useCallback, useState } from 'react';
4
3
 
5
4
  import { PanelContent } from './components/PanelContent';
@@ -32,9 +31,8 @@ const ModelSwitchPanel = memo<ModelSwitchPanelProps>(
32
31
  return (
33
32
  <TooltipGroup>
34
33
  <Popover
35
- arrow={false}
36
34
  classNames={{
37
- container: styles.container,
35
+ content: styles.container,
38
36
  }}
39
37
  content={
40
38
  <PanelContent
@@ -1,5 +1,4 @@
1
- import { ActionIcon, Block, Flexbox } from '@lobehub/ui';
2
- import { Popover } from 'antd';
1
+ import { ActionIcon, Block, Flexbox, Popover } from '@lobehub/ui';
3
2
  import { createStaticStyles, cx } from 'antd-style';
4
3
  import { ChevronsUpDownIcon, Clock3Icon, PanelRightCloseIcon, PlusIcon } from 'lucide-react';
5
4
  import { Suspense, memo, useMemo, useState } from 'react';
@@ -108,7 +107,6 @@ const AgentSelector = memo<AgentSelectorProps>(({ agentId, onAgentChange }) => {
108
107
 
109
108
  return (
110
109
  <Popover
111
- arrow={false}
112
110
  content={
113
111
  <Suspense fallback={<SkeletonList rows={6} />}>
114
112
  <AgentModalProvider>
@@ -120,12 +118,12 @@ const AgentSelector = memo<AgentSelectorProps>(({ agentId, onAgentChange }) => {
120
118
  open={open}
121
119
  placement="bottomLeft"
122
120
  styles={{
123
- container: {
121
+ content: {
124
122
  padding: 0,
125
123
  width: 240,
126
124
  },
127
125
  }}
128
- trigger={['click']}
126
+ trigger="click"
129
127
  >
130
128
  <Block
131
129
  align={'center'}
@@ -197,7 +195,6 @@ const CopilotToolbar = memo<CopilotToolbarProps>(({ agentId, isHovered }) => {
197
195
  />
198
196
  {!hideHistory && (
199
197
  <Popover
200
- arrow={false}
201
198
  content={
202
199
  <Flexbox
203
200
  gap={4}
@@ -224,12 +221,12 @@ const CopilotToolbar = memo<CopilotToolbarProps>(({ agentId, isHovered }) => {
224
221
  open={topicPopoverOpen}
225
222
  placement="bottomRight"
226
223
  styles={{
227
- container: {
224
+ content: {
228
225
  padding: 0,
229
226
  width: 240,
230
227
  },
231
228
  }}
232
- trigger={['click']}
229
+ trigger="click"
233
230
  >
234
231
  <ActionIcon icon={Clock3Icon} size={DESKTOP_HEADER_ICON_SIZE} />
235
232
  </Popover>