@ant-design/agentic-ui 2.29.24 → 2.29.26

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 (168) hide show
  1. package/dist/AILabel/index.js +1 -1
  2. package/dist/AgentRunBar/Robot.js +1 -1
  3. package/dist/AgentRunBar/index.js +1 -1
  4. package/dist/AgenticLayout/index.js +1 -1
  5. package/dist/AnswerAlert/index.js +1 -1
  6. package/dist/BackTo/ScrollVisibleButton.js +1 -1
  7. package/dist/Bubble/AIBubble.js +1 -1
  8. package/dist/Bubble/Avatar/index.js +1 -1
  9. package/dist/Bubble/BubbleConfigProvide.d.ts +3 -2
  10. package/dist/Bubble/BubbleConfigProvide.js +1 -2
  11. package/dist/Bubble/List/PureBubbleList.d.ts +4 -4
  12. package/dist/Bubble/List/PureBubbleList.js +1 -1
  13. package/dist/Bubble/List/index.d.ts +5 -5
  14. package/dist/Bubble/List/index.js +1 -1
  15. package/dist/Bubble/MessagesContent/BubbleExtra.js +27 -32
  16. package/dist/Bubble/MessagesContent/CopyButton/index.js +5 -4
  17. package/dist/Bubble/MessagesContent/DocInfo.js +1 -1
  18. package/dist/Bubble/MessagesContent/MarkdownPreview.js +4 -1
  19. package/dist/Bubble/MessagesContent/VoiceButton/index.js +1 -1
  20. package/dist/Bubble/MessagesContent/index.js +1 -1
  21. package/dist/Bubble/PureBubble.js +1 -1
  22. package/dist/Bubble/Title.js +1 -1
  23. package/dist/Bubble/UserBubble.js +1 -1
  24. package/dist/Bubble/type.d.ts +96 -8
  25. package/dist/Bubble/types/BubbleExtra.d.ts +6 -4
  26. package/dist/ChatBootPage/ButtonTab.js +1 -1
  27. package/dist/ChatBootPage/CaseReply.js +1 -1
  28. package/dist/ChatBootPage/Title.js +1 -1
  29. package/dist/ChatLayout/index.js +1 -1
  30. package/dist/Components/ActionIconBox/index.d.ts +1 -1
  31. package/dist/Components/ActionIconBox/index.js +2 -2
  32. package/dist/Components/ActionItemBox/ActionItemBox.js +1 -1
  33. package/dist/Components/Button/IconButton/index.d.ts +1 -1
  34. package/dist/Components/Button/IconButton/index.js +1 -1
  35. package/dist/Components/Button/SwitchButton/index.js +1 -1
  36. package/dist/Components/Button/ToggleButton/index.js +1 -1
  37. package/dist/Components/GradientText/index.js +1 -1
  38. package/dist/Components/LayoutHeader/index.js +1 -1
  39. package/dist/Components/Loading/Loading.js +2 -2
  40. package/dist/Components/Robot/index.js +1 -1
  41. package/dist/Components/SuggestionList/index.js +1 -1
  42. package/dist/Components/TextAnimate/index.js +2 -2
  43. package/dist/Components/TypingAnimation/index.js +2 -2
  44. package/dist/Components/VisualList/index.d.ts +1 -1
  45. package/dist/Components/VisualList/index.js +1 -1
  46. package/dist/Components/lotties/TextLoading/index.js +1 -1
  47. package/dist/Components/lotties/bubble-actions/Abstract/index.js +1 -1
  48. package/dist/History/components/NewChatComponent.d.ts +1 -1
  49. package/dist/History/components/NewChatComponent.js +1 -1
  50. package/dist/History/components/SearchComponent.d.ts +1 -1
  51. package/dist/History/components/SearchComponent.js +1 -1
  52. package/dist/History/index.js +3 -3
  53. package/dist/History/menu.js +1 -1
  54. package/dist/History/types/index.d.ts +5 -5
  55. package/dist/History/types/index.js +1 -1
  56. package/dist/Hooks/useLanguage.d.ts +16 -0
  57. package/dist/I18n/index.d.ts +10 -0
  58. package/dist/I18n/index.js +46 -0
  59. package/dist/I18n/locales.d.ts +16 -0
  60. package/dist/I18n/locales.js +43 -5
  61. package/dist/MarkdownEditor/BaseMarkdownEditor.js +1 -1
  62. package/dist/MarkdownEditor/editor/Editor.js +1 -1
  63. package/dist/MarkdownEditor/editor/components/CommentList/index.js +6 -4
  64. package/dist/MarkdownEditor/editor/components/ContributorAvatar/index.js +1 -1
  65. package/dist/MarkdownEditor/editor/components/fntTag/index.js +1 -1
  66. package/dist/MarkdownEditor/editor/elements/Comment/index.js +1 -1
  67. package/dist/MarkdownEditor/editor/elements/FncLeaf/index.js +1 -1
  68. package/dist/MarkdownEditor/editor/elements/Head/ReadonlyHead.js +1 -1
  69. package/dist/MarkdownEditor/editor/elements/Head/index.js +1 -1
  70. package/dist/MarkdownEditor/editor/elements/LinkCard/ReadonlyLinkCard.js +1 -1
  71. package/dist/MarkdownEditor/editor/elements/LinkCard/index.js +1 -1
  72. package/dist/MarkdownEditor/editor/elements/List/List.js +1 -1
  73. package/dist/MarkdownEditor/editor/elements/List/ListItem.js +1 -1
  74. package/dist/MarkdownEditor/editor/elements/List/ReadonlyList.js +1 -1
  75. package/dist/MarkdownEditor/editor/elements/List/ReadonlyListItem.js +1 -1
  76. package/dist/MarkdownEditor/editor/elements/Mermaid/ReadonlyMermaid.js +1 -1
  77. package/dist/MarkdownEditor/editor/elements/Mermaid/index.js +1 -1
  78. package/dist/MarkdownEditor/editor/elements/Paragraph/ReadonlyParagraph.js +1 -1
  79. package/dist/MarkdownEditor/editor/elements/Paragraph/index.js +1 -1
  80. package/dist/MarkdownEditor/editor/elements/Table/ReadonlyTableComponent.js +1 -1
  81. package/dist/MarkdownEditor/editor/elements/Table/SimpleTable.js +1 -1
  82. package/dist/MarkdownEditor/editor/elements/Table/Table.js +1 -1
  83. package/dist/MarkdownEditor/editor/elements/Table/TableCellIndex/index.js +7 -5
  84. package/dist/MarkdownEditor/editor/elements/Table/TableCellIndexSpacer/index.js +7 -5
  85. package/dist/MarkdownEditor/editor/elements/Table/TableRowIndex/index.js +1 -1
  86. package/dist/MarkdownEditor/editor/elements/Table/Td/index.js +1 -1
  87. package/dist/MarkdownEditor/editor/elements/TagPopup/index.js +1 -1
  88. package/dist/MarkdownEditor/editor/elements/index.js +1 -1
  89. package/dist/MarkdownEditor/editor/parser/parse/parseTable.js +1 -1
  90. package/dist/MarkdownEditor/editor/tools/DragHandle.js +4 -2
  91. package/dist/MarkdownEditor/editor/tools/InsertAutocomplete.js +1 -1
  92. package/dist/MarkdownEditor/editor/tools/ToolBar/BaseBar.js +3 -2
  93. package/dist/MarkdownEditor/editor/tools/ToolBar/FloatBar.js +1 -1
  94. package/dist/MarkdownEditor/editor/tools/ToolBar/ReadonlyBaseBar.js +1 -1
  95. package/dist/MarkdownEditor/editor/tools/ToolBar/ToolBar.js +1 -1
  96. package/dist/MarkdownEditor/editor/tools/ToolBar/components/ClearFormatButton.js +1 -1
  97. package/dist/MarkdownEditor/editor/tools/ToolBar/components/ColorPickerButton.js +1 -1
  98. package/dist/MarkdownEditor/editor/tools/ToolBar/components/FormatButton.js +1 -1
  99. package/dist/MarkdownEditor/editor/tools/ToolBar/components/FormattingTools.js +1 -1
  100. package/dist/MarkdownEditor/editor/tools/ToolBar/components/HeadingDropdown.js +1 -1
  101. package/dist/MarkdownEditor/editor/tools/ToolBar/components/LinkButton.js +1 -1
  102. package/dist/MarkdownEditor/editor/tools/ToolBar/components/UndoRedoButtons.js +1 -1
  103. package/dist/MarkdownEditor/el.d.ts +1 -1
  104. package/dist/MarkdownEditor/types.d.ts +103 -3
  105. package/dist/MarkdownInputField/AttachmentButton/AttachmentFileList/AttachmentFileListItem.js +10 -7
  106. package/dist/MarkdownInputField/AttachmentButton/AttachmentFileList/index.js +1 -1
  107. package/dist/MarkdownInputField/AttachmentButton/index.js +1 -1
  108. package/dist/MarkdownInputField/BeforeToolContainer/BeforeToolContainer.js +1 -1
  109. package/dist/MarkdownInputField/FileMapView/FileMapViewItem.js +2 -2
  110. package/dist/MarkdownInputField/FileMapView/index.js +1 -1
  111. package/dist/MarkdownInputField/MarkdownInputField.js +1 -1
  112. package/dist/MarkdownInputField/QuickActions/index.js +1 -1
  113. package/dist/MarkdownInputField/SendActions/index.js +1 -1
  114. package/dist/MarkdownInputField/SendButton/index.js +1 -1
  115. package/dist/MarkdownInputField/SkillModeBar/index.js +1 -1
  116. package/dist/MarkdownInputField/TopOperatingArea/index.js +1 -1
  117. package/dist/MarkdownInputField/VoiceInput/index.js +1 -1
  118. package/dist/Plugins/chart/AreaChart/index.js +1 -1
  119. package/dist/Plugins/chart/BarChart/index.js +1 -1
  120. package/dist/Plugins/chart/DonutChart/index.js +1 -1
  121. package/dist/Plugins/chart/FunnelChart/index.js +1 -1
  122. package/dist/Plugins/chart/LineChart/index.js +1 -1
  123. package/dist/Plugins/chart/RadarChart/index.js +1 -1
  124. package/dist/Plugins/chart/ScatterChart/index.js +1 -1
  125. package/dist/Plugins/chart/components/ChartContainer/ChartContainer.js +1 -1
  126. package/dist/Plugins/chart/components/ChartContainer/ChartErrorBoundary.d.ts +736 -0
  127. package/dist/Plugins/chart/components/ChartContainer/ChartErrorBoundary.js +23 -5
  128. package/dist/Plugins/code/CodeUI/Katex/Katex.js +1 -1
  129. package/dist/Plugins/code/components/CodeContainer.js +1 -1
  130. package/dist/Plugins/katex/InlineKatex.js +1 -1
  131. package/dist/Plugins/katex/Katex.js +1 -1
  132. package/dist/Plugins/mermaid/MermaidFallback.js +1 -1
  133. package/dist/Plugins/mermaid/MermaidRendererImpl.js +1 -1
  134. package/dist/Plugins/mermaid/index.js +3 -2
  135. package/dist/Quote/index.js +1 -1
  136. package/dist/Schema/SchemaEditor/index.js +1 -1
  137. package/dist/Schema/SchemaForm/index.js +2 -2
  138. package/dist/TaskList/index.d.ts +6 -2
  139. package/dist/TaskList/index.js +1 -1
  140. package/dist/ThoughtChainList/DeepThink.d.ts +1 -1
  141. package/dist/ThoughtChainList/DotAni/index.js +1 -1
  142. package/dist/ThoughtChainList/FlipText/index.js +1 -1
  143. package/dist/ThoughtChainList/TableSql.d.ts +1 -1
  144. package/dist/ThoughtChainList/ThoughtChainListItem.js +1 -1
  145. package/dist/ThoughtChainList/TitleInfo.js +1 -1
  146. package/dist/ThoughtChainList/ToolCall.d.ts +1 -1
  147. package/dist/ThoughtChainList/WebSearch.d.ts +1 -1
  148. package/dist/ThoughtChainList/index.js +7 -18
  149. package/dist/ThoughtChainList/style.js +11 -0
  150. package/dist/ThoughtChainList/types.d.ts +11 -1
  151. package/dist/ToolUseBar/BarItem/Content.js +1 -1
  152. package/dist/ToolUseBar/BarItem/index.js +1 -1
  153. package/dist/ToolUseBar/index.js +1 -1
  154. package/dist/ToolUseBarThink/index.js +1 -1
  155. package/dist/Types/message.d.ts +12 -3
  156. package/dist/WelcomeMessage/index.js +1 -1
  157. package/dist/Workspace/Browser/index.js +1 -1
  158. package/dist/Workspace/File/FileComponent.d.ts +1 -1
  159. package/dist/Workspace/File/FileComponent.js +1 -1
  160. package/dist/Workspace/File/PreviewComponent.js +2 -2
  161. package/dist/Workspace/HtmlPreview/index.js +1 -1
  162. package/dist/Workspace/RealtimeFollow/index.js +1 -1
  163. package/dist/Workspace/Task/index.js +1 -1
  164. package/dist/Workspace/index.js +1 -1
  165. package/dist/Workspace/types.d.ts +2 -2
  166. package/dist/index.d.ts +68 -62
  167. package/dist/index.js +84 -79
  168. package/package.json +2 -7
@@ -6,17 +6,81 @@ import { BaseStyleProps, BubbleMetaData, MessageBubbleData, MultiClassNameProps,
6
6
  import type { UseSpeechAdapter } from './MessagesContent/VoiceButton';
7
7
  import { BubbleExtraProps } from './types/BubbleExtra';
8
8
  import { DocInfoListProps } from './types/DocInfo';
9
+ /**
10
+ * 气泡命令式操作句柄
11
+ * @description 通过 bubbleRef 暴露给父组件的命令式方法
12
+ */
13
+ export interface BubbleImperativeHandle {
14
+ /** 更新消息项数据 */
15
+ setMessageItem?: (id: string, data: Partial<MessageBubbleData>) => void;
16
+ }
9
17
  /**
10
18
  * 基础样式属性
11
- * @deprecated 请使用 BaseStyleProps from '../Types'
19
+ * @deprecated @since 2.29.0 请使用 BaseStyleProps from '../Types'
12
20
  */
13
21
  export type BubbleStyleProps = BaseStyleProps;
22
+ /**
23
+ * 气泡样式配置(简洁版)
24
+ * @description 推荐使用的气泡样式配置接口,属性名不带 bubble 前缀
25
+ */
26
+ export interface BubbleSlotStyles {
27
+ /** 气泡根容器 */
28
+ root?: React.CSSProperties;
29
+ /** 头像标题区域 */
30
+ avatarTitle?: React.CSSProperties;
31
+ /** 主容器 */
32
+ container?: React.CSSProperties;
33
+ /** 加载图标 */
34
+ loadingIcon?: React.CSSProperties;
35
+ /** 名称区域 */
36
+ name?: React.CSSProperties;
37
+ /** 内容 */
38
+ content?: React.CSSProperties;
39
+ /** 内容前置区域 */
40
+ before?: React.CSSProperties;
41
+ /** 内容后置区域 */
42
+ after?: React.CSSProperties;
43
+ /** 标题 */
44
+ title?: React.CSSProperties;
45
+ /** 头像 */
46
+ avatar?: React.CSSProperties;
47
+ /** 额外内容 */
48
+ extra?: React.CSSProperties;
49
+ }
50
+ /**
51
+ * 气泡类名配置(简洁版)
52
+ * @description 推荐使用的气泡类名配置接口,属性名不带 bubble 前缀
53
+ */
54
+ export interface BubbleSlotClassNames {
55
+ /** 气泡根容器 */
56
+ root?: string;
57
+ /** 头像标题区域 */
58
+ avatarTitle?: string;
59
+ /** 主容器 */
60
+ container?: string;
61
+ /** 加载图标 */
62
+ loadingIcon?: string;
63
+ /** 名称区域 */
64
+ name?: string;
65
+ /** 内容 */
66
+ content?: string;
67
+ /** 内容前置区域 */
68
+ before?: string;
69
+ /** 内容后置区域 */
70
+ after?: string;
71
+ /** 标题 */
72
+ title?: string;
73
+ /** 头像 */
74
+ avatar?: string;
75
+ /** 额外内容 */
76
+ extra?: string;
77
+ }
14
78
  /**
15
79
  * 气泡样式配置
16
80
  * @description 气泡组件各部分的样式配置
81
+ * @deprecated @since 2.30.0 属性名带有冗余的 bubble 前缀,建议使用 BubbleSlotStyles 替代
17
82
  */
18
83
  export interface BubbleStyles {
19
- [key: string]: React.CSSProperties | undefined;
20
84
  /**
21
85
  * 气泡根容器的自定义样式
22
86
  */
@@ -61,13 +125,25 @@ export interface BubbleStyles {
61
125
  * 额外内容的自定义样式
62
126
  */
63
127
  bubbleListItemExtraStyle?: React.CSSProperties;
128
+ /**
129
+ * 气泡列表项的自定义样式
130
+ */
131
+ bubbleListItemStyle?: React.CSSProperties;
132
+ /**
133
+ * 左侧气泡内容的自定义样式
134
+ */
135
+ bubbleListLeftItemContentStyle?: React.CSSProperties;
136
+ /**
137
+ * 右侧气泡内容的自定义样式
138
+ */
139
+ bubbleListRightItemContentStyle?: React.CSSProperties;
64
140
  }
65
141
  /**
66
142
  * 气泡类名配置
67
143
  * @description 气泡组件各部分的类名配置
144
+ * @deprecated @since 2.30.0 属性名带有冗余的 bubble 前缀,建议使用 BubbleSlotClassNames 替代
68
145
  */
69
146
  export interface BubbleClassNames {
70
- [key: string]: string | undefined;
71
147
  /**
72
148
  * 气泡根容器的自定义类名
73
149
  */
@@ -112,6 +188,10 @@ export interface BubbleClassNames {
112
188
  * 额外内容的自定义类名
113
189
  */
114
190
  bubbleListItemExtraClassName?: string;
191
+ /**
192
+ * 气泡列表项的自定义类名
193
+ */
194
+ bubbleListItemClassName?: string;
115
195
  }
116
196
  /**
117
197
  * 气泡项样式属性
@@ -208,7 +288,7 @@ export interface BubbleProps<T = Record<string, any>> extends BubbleItemStylePro
208
288
  /**
209
289
  * 列表引用
210
290
  */
211
- bubbleListRef?: any;
291
+ bubbleListRef?: React.RefObject<HTMLDivElement>;
212
292
  /**
213
293
  * 是否只读
214
294
  */
@@ -224,10 +304,10 @@ export interface BubbleProps<T = Record<string, any>> extends BubbleItemStylePro
224
304
  /**
225
305
  * 依赖项数组
226
306
  */
227
- deps?: any[];
307
+ deps?: unknown[];
228
308
  /**
229
309
  * 不喜欢回调
230
- * @deprecated 请使用 onDislike 替代(符合命名规范),但为保持兼容性暂时保留
310
+ * @deprecated @since 2.29.0 请使用 onDislike 替代(符合命名规范),但为保持兼容性暂时保留
231
311
  */
232
312
  onDisLike?: (bubble: MessageBubbleData<Record<string, any>>) => Promise<void> | void;
233
313
  /** 不喜欢回调 */
@@ -239,7 +319,7 @@ export interface BubbleProps<T = Record<string, any>> extends BubbleItemStylePro
239
319
  /**
240
320
  * 取消点赞的回调函数
241
321
  * @description 当用户点击取消点赞按钮时触发
242
- * @deprecated 请使用 onLikeCancel 替代(符合命名规范),但为保持兼容性暂时保留
322
+ * @deprecated @since 2.29.0 请使用 onLikeCancel 替代(符合命名规范),但为保持兼容性暂时保留
243
323
  * @callback
244
324
  * @optional
245
325
  */
@@ -261,8 +341,9 @@ export interface BubbleProps<T = Record<string, any>> extends BubbleItemStylePro
261
341
  };
262
342
  /**
263
343
  * 气泡引用
344
+ * @description 支持命令式操作的气泡实例引用,包含 setMessageItem 等方法
264
345
  */
265
- bubbleRef?: any;
346
+ bubbleRef?: React.MutableRefObject<BubbleImperativeHandle | null | undefined>;
266
347
  /**
267
348
  * 控制复制按钮的显示
268
349
  * @description 控制复制按钮是否显示的函数或布尔值
@@ -331,5 +412,12 @@ export interface BubbleProps<T = Record<string, any>> extends BubbleItemStylePro
331
412
  renderFileMoreAction?: React.ReactNode | ((file: AttachmentFile) => React.ReactNode) | (() => React.ReactNode) | (() => (file: AttachmentFile) => React.ReactNode);
332
413
  };
333
414
  userBubbleProps?: BubbleProps;
415
+ /**
416
+ * AI 气泡的属性配置
417
+ */
418
+ aiBubbleProps?: BubbleProps;
419
+ /**
420
+ * @deprecated @since 2.30.0 请使用 aiBubbleProps 替代(符合命名规范)
421
+ */
334
422
  aIBubbleProps?: BubbleProps;
335
423
  }
@@ -2,7 +2,9 @@ import React from 'react';
2
2
  import { MessageBubbleData, WithFalse } from '../../Types';
3
3
  export interface SimpleBubbleProps<T = Record<string, any>> {
4
4
  originData?: T & MessageBubbleData;
5
- [key: string]: any;
5
+ id?: string;
6
+ placement?: 'left' | 'right';
7
+ readonly?: boolean;
6
8
  }
7
9
  /**
8
10
  * 聊天项额外操作组件的属性接口
@@ -20,7 +22,7 @@ export type BubbleExtraProps = {
20
22
  /**
21
23
  * 点踩的回调函数
22
24
  * @description 当用户点击点踩按钮时触发
23
- * @deprecated 请使用 onDislike 替代(符合命名规范),但为保持兼容性暂时保留
25
+ * @deprecated @since 2.29.0 请使用 onDislike 替代(符合命名规范),但为保持兼容性暂时保留
24
26
  * @callback
25
27
  * @optional
26
28
  */
@@ -37,7 +39,7 @@ export type BubbleExtraProps = {
37
39
  /**
38
40
  * 取消点赞的回调函数
39
41
  * @description 当用户点击取消点赞按钮时触发
40
- * @deprecated 请使用 onLikeCancel 替代(符合命名规范),但为保持兼容性暂时保留
42
+ * @deprecated @since 2.29.0 请使用 onLikeCancel 替代(符合命名规范),但为保持兼容性暂时保留
41
43
  * @callback
42
44
  * @optional
43
45
  */
@@ -129,7 +131,7 @@ export type BubbleExtraProps = {
129
131
  * @param defaultDoms - 默认的操作按钮 DOM 节点
130
132
  * @returns 自定义的额外操作区域 React 节点
131
133
  * @optional
132
- * @deprecated 此属性当前未被使用,extraRender 功能在 MessagesContent 层级处理
134
+ * @deprecated @since 2.29.0 此属性当前未被使用,extraRender 功能在 MessagesContent 层级处理
133
135
  */
134
136
  render?: WithFalse<(props: SimpleBubbleProps<Record<string, any>>, defaultDoms: React.ReactNode) => React.ReactNode>;
135
137
  pure?: boolean;
@@ -11,7 +11,7 @@ function _define_property(obj, key, value) {
11
11
  }
12
12
  return obj;
13
13
  }
14
- import classNames from "classnames";
14
+ import classNames from "clsx";
15
15
  import React, { memo, useCallback } from "react";
16
16
  import { useStyle } from "./ButtonTabStyle";
17
17
  var ButtonTabComponent = function ButtonTabComponent(param) {
@@ -46,7 +46,7 @@ function _unsupported_iterable_to_array(o, minLen) {
46
46
  }
47
47
  import { ArrowRight } from "@sofa-design/icons";
48
48
  import { ConfigProvider } from "antd";
49
- import classNames from "classnames";
49
+ import classNames from "clsx";
50
50
  import React, { memo, useCallback, useContext, useState } from "react";
51
51
  import { useStyle } from "./CaseReplyStyle";
52
52
  var CaseReplyComponent = function CaseReplyComponent(param) {
@@ -1,5 +1,5 @@
1
1
  import { ConfigProvider } from "antd";
2
- import classNames from "classnames";
2
+ import classNames from "clsx";
3
3
  import React, { memo, useContext } from "react";
4
4
  import { useStyle } from "./style";
5
5
  var TitleComponent = function TitleComponent(param) {
@@ -27,7 +27,7 @@ function _object_spread(target) {
27
27
  return target;
28
28
  }
29
29
  import { ConfigProvider } from "antd";
30
- import clsx from "classnames";
30
+ import clsx from "clsx";
31
31
  import React, { forwardRef, memo, useContext, useImperativeHandle, useRef } from "react";
32
32
  import { LayoutHeader } from "../Components/LayoutHeader";
33
33
  import useAutoScroll from "../Hooks/useAutoScroll";
@@ -11,7 +11,7 @@ export type ActionIconBoxProps = {
11
11
  className?: string;
12
12
  borderLess?: boolean;
13
13
  /**
14
- * @deprecated 请使用 isLoading 代替
14
+ * @deprecated @since 2.29.0 请使用 isLoading 代替
15
15
  * @description 已废弃,将在未来版本移除
16
16
  */
17
17
  loading?: boolean;
@@ -226,8 +226,8 @@ function _ts_generator(thisArg, body) {
226
226
  }
227
227
  import { LoadingOutlined } from "@ant-design/icons";
228
228
  import { ConfigProvider, Tooltip } from "antd";
229
- import cx from "classnames";
230
- import { isFunction } from "lodash";
229
+ import cx from "clsx";
230
+ import { isFunction } from "lodash-es";
231
231
  import { useMergedState } from "rc-util";
232
232
  import React, { useContext, useEffect, useMemo, useState } from "react";
233
233
  import { useStyle } from "./style";
@@ -27,7 +27,7 @@ function _object_spread(target) {
27
27
  return target;
28
28
  }
29
29
  import { ConfigProvider } from "antd";
30
- import classNames from "classnames";
30
+ import classNames from "clsx";
31
31
  import { motion } from "framer-motion";
32
32
  import React, { useContext, useEffect } from "react";
33
33
  import { useStyle } from "./style";
@@ -8,7 +8,7 @@ export interface IconButtonProps {
8
8
  elevated?: boolean;
9
9
  size?: 'base' | 'sm' | 'xs';
10
10
  /**
11
- * @deprecated 请使用 isLoading 代替
11
+ * @deprecated @since 2.29.0 请使用 isLoading 代替
12
12
  * @description 已废弃,将在未来版本移除
13
13
  */
14
14
  loading?: boolean;
@@ -12,7 +12,7 @@ function _define_property(obj, key, value) {
12
12
  return obj;
13
13
  }
14
14
  import { Button, ConfigProvider, Tooltip } from "antd";
15
- import classNames from "classnames";
15
+ import classNames from "clsx";
16
16
  import React, { useContext } from "react";
17
17
  import { useStyle } from "./style";
18
18
  export var IconButton = function IconButton(param) {
@@ -187,7 +187,7 @@ function _ts_generator(thisArg, body) {
187
187
  }
188
188
  import { ChevronDown, ChevronUp } from "@sofa-design/icons";
189
189
  import { Button, ConfigProvider } from "antd";
190
- import classNames from "classnames";
190
+ import classNames from "clsx";
191
191
  import React, { useContext, useEffect, useState } from "react";
192
192
  import { useStyle } from "./style";
193
193
  export var SwitchButton = function SwitchButton(param) {
@@ -12,7 +12,7 @@ function _define_property(obj, key, value) {
12
12
  return obj;
13
13
  }
14
14
  import { Button, ConfigProvider } from "antd";
15
- import classNames from "classnames";
15
+ import classNames from "clsx";
16
16
  import React, { useContext } from "react";
17
17
  import { useStyle } from "./style";
18
18
  export var ToggleButton = function ToggleButton(param) {
@@ -1,5 +1,5 @@
1
1
  import { ConfigProvider } from "antd";
2
- import classNames from "classnames";
2
+ import classNames from "clsx";
3
3
  import React, { useContext } from "react";
4
4
  import { useGradientTextStyle } from "./style";
5
5
  export function GradientText(param) {
@@ -46,7 +46,7 @@ function _unsupported_iterable_to_array(o, minLen) {
46
46
  }
47
47
  import { LaptopMinimal, PanelLeftFill, PanelLeftFillFold, SquareArrowOutUpRight } from "@sofa-design/icons";
48
48
  import { Button, ConfigProvider } from "antd";
49
- import classNames from "classnames";
49
+ import classNames from "clsx";
50
50
  import { useMergedState } from "rc-util";
51
51
  import React, { useContext } from "react";
52
52
  import { I18nContext } from "../../I18n";
@@ -27,8 +27,8 @@ function _object_spread(target) {
27
27
  return target;
28
28
  }
29
29
  import { ConfigProvider } from "antd";
30
- import classNames from "classnames";
31
- import { isString } from "lodash";
30
+ import classNames from "clsx";
31
+ import { isString } from "lodash-es";
32
32
  import React, { useContext } from "react";
33
33
  import { TextLoading } from "../lotties";
34
34
  import Indicator from "./Indicator";
@@ -26,7 +26,7 @@ function _object_spread(target) {
26
26
  }
27
27
  return target;
28
28
  }
29
- import classNames from "classnames";
29
+ import classNames from "clsx";
30
30
  import { isString } from "lodash-es";
31
31
  import React from "react";
32
32
  import { DazingLottie, ThinkingLottie } from "./lotties";
@@ -187,7 +187,7 @@ function _ts_generator(thisArg, body) {
187
187
  }
188
188
  import { RefreshCcw, SwapRight } from "@sofa-design/icons";
189
189
  import { ConfigProvider, Tooltip } from "antd";
190
- import classNames from "classnames";
190
+ import classNames from "clsx";
191
191
  import React, { useCallback, useContext, useEffect, useMemo, useRef, useState } from "react";
192
192
  import { I18nContext } from "../../I18n";
193
193
  import { useStyle } from "./style";
@@ -112,9 +112,9 @@ function _unsupported_iterable_to_array(o, minLen) {
112
112
  if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
113
113
  }
114
114
  import { ConfigProvider } from "antd";
115
- import classNames from "classnames";
115
+ import classNames from "clsx";
116
116
  import { AnimatePresence, motion } from "framer-motion";
117
- import { isNumber, isObject, isString } from "lodash";
117
+ import { isNumber, isObject, isString } from "lodash-es";
118
118
  import toArray from "rc-util/lib/Children/toArray";
119
119
  import React, { memo, useContext } from "react";
120
120
  import { useTextAnimateStyle } from "./style";
@@ -109,9 +109,9 @@ function _unsupported_iterable_to_array(o, minLen) {
109
109
  if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
110
110
  }
111
111
  import { ConfigProvider } from "antd";
112
- import classNames from "classnames";
112
+ import classNames from "clsx";
113
113
  import { motion, useInView } from "framer-motion";
114
- import { isString } from "lodash";
114
+ import { isString } from "lodash-es";
115
115
  import React, { useContext, useEffect, useMemo, useRef, useState } from "react";
116
116
  import { resolveSegments } from "../TextAnimate";
117
117
  import { useTypingAnimationStyle } from "./style";
@@ -31,7 +31,7 @@ export interface VisualListProps {
31
31
  /** 自定义列表项渲染函数 */
32
32
  renderItem?: (item: VisualListItem, index: number) => React.ReactNode;
33
33
  /**
34
- * @deprecated 请使用 isLoading 代替
34
+ * @deprecated @since 2.29.0 请使用 isLoading 代替
35
35
  * @description 已废弃,将在未来版本移除
36
36
  */
37
37
  loading?: boolean;
@@ -97,7 +97,7 @@ function _unsupported_iterable_to_array(o, minLen) {
97
97
  if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
98
98
  }
99
99
  import { SquareArrowUpRight } from "@sofa-design/icons";
100
- import classNames from "classnames";
100
+ import classNames from "clsx";
101
101
  import React, { memo, useMemo, useState } from "react";
102
102
  import { useRefFunction } from "../../Hooks/useRefFunction";
103
103
  import { useStyle } from "./style";
@@ -27,7 +27,7 @@ function _object_spread(target) {
27
27
  return target;
28
28
  }
29
29
  import { ConfigProvider } from "antd";
30
- import cx from "classnames";
30
+ import cx from "clsx";
31
31
  import React, { useContext } from "react";
32
32
  import { useStyle } from "./style";
33
33
  /**
@@ -27,7 +27,7 @@ function _object_spread(target) {
27
27
  return target;
28
28
  }
29
29
  import { ConfigProvider } from "antd";
30
- import classNames from "classnames";
30
+ import classNames from "clsx";
31
31
  import Lottie from "lottie-react";
32
32
  import React, { useContext, useEffect, useRef } from "react";
33
33
  import { useStyle } from "./style";
@@ -39,7 +39,7 @@ interface HistoryNewChatProps {
39
39
  */
40
40
  export declare const HistoryNewChat: React.FC<HistoryNewChatProps>;
41
41
  /**
42
- * @deprecated 请使用 HistoryNewChat 替代
42
+ * @deprecated @since 2.29.0 请使用 HistoryNewChat 替代
43
43
  */
44
44
  export declare const NewChatComponent: React.FC<HistoryNewChatProps>;
45
45
  export {};
@@ -275,5 +275,5 @@ import { useNewChatStyle } from "./NewChatComponent.style";
275
275
  }), (locale === null || locale === void 0 ? void 0 : locale['chat.history.newChat']) || '新对话'));
276
276
  };
277
277
  /**
278
- * @deprecated 请使用 HistoryNewChat 替代
278
+ * @deprecated @since 2.29.0 请使用 HistoryNewChat 替代
279
279
  */ export var NewChatComponent = HistoryNewChat;
@@ -54,7 +54,7 @@ interface HistorySearchProps {
54
54
  */
55
55
  export declare const HistorySearch: React.FC<HistorySearchProps>;
56
56
  /**
57
- * @deprecated 请使用 HistorySearch 替代
57
+ * @deprecated @since 2.29.0 请使用 HistorySearch 替代
58
58
  */
59
59
  export declare const SearchComponent: React.FC<HistorySearchProps>;
60
60
  export {};
@@ -390,5 +390,5 @@ function SearchIcon(props) {
390
390
  }, /*#__PURE__*/ React.createElement(SearchIcon, null))));
391
391
  };
392
392
  /**
393
- * @deprecated 请使用 HistorySearch 替代
393
+ * @deprecated @since 2.29.0 请使用 HistorySearch 替代
394
394
  */ export var SearchComponent = HistorySearch;
@@ -128,10 +128,10 @@ function _ts_generator(thisArg, body) {
128
128
  }
129
129
  import { HistoryOutlined } from "@ant-design/icons";
130
130
  import { ConfigProvider, Popover } from "antd";
131
- import classNames from "classnames";
131
+ import classNames from "clsx";
132
132
  import React, { memo, useContext, useMemo, useRef } from "react";
133
133
  import useClickAway from "../Hooks/useClickAway";
134
- import { ActionIconBox, BubbleConfigContext } from "../index";
134
+ import { ActionIconBox, I18nContext } from "../index";
135
135
  import { HistoryEmpty, HistoryLoadMore, HistoryNewChat, HistorySearch, generateHistoryItems } from "./components";
136
136
  import { useHistory } from "./hooks/useHistory";
137
137
  import GroupMenu from "./menu";
@@ -175,7 +175,7 @@ export * from "./utils";
175
175
  var _props_agent, _props_agent1, _props_agent2;
176
176
  var getPrefixCls = useContext(ConfigProvider.ConfigContext).getPrefixCls;
177
177
  var menuPrefixCls = getPrefixCls('agentic-chat-history-menu');
178
- var locale = (useContext(BubbleConfigContext) || {}).locale;
178
+ var locale = useContext(I18nContext).locale;
179
179
  var containerRef = useRef(null);
180
180
  // 注册样式
181
181
  var _useStyle = useStyle(menuPrefixCls), wrapSSR = _useStyle.wrapSSR, hashId = _useStyle.hashId;
@@ -63,7 +63,7 @@ function _object_without_properties_loose(source, excluded) {
63
63
  return target;
64
64
  }
65
65
  import { ConfigProvider, Spin } from "antd";
66
- import classNames from "classnames";
66
+ import classNames from "clsx";
67
67
  import React, { useContext } from "react";
68
68
  import { useRefFunction } from "../Hooks/useRefFunction";
69
69
  import { useStyle } from "./style";
@@ -12,12 +12,12 @@ export interface HistoryProps {
12
12
  request: (params: {
13
13
  agentId: string;
14
14
  }) => Promise<HistoryDataType[]>;
15
- /** @deprecated 请使用 onClick 替代 */
15
+ /** @deprecated @since 2.29.0 请使用 onClick 替代 */
16
16
  onSelected?: (item: HistoryDataType) => void;
17
17
  onClick?: (sessionId: string, item: HistoryDataType) => void;
18
18
  /**
19
19
  * 删除历史记录项时的回调函数
20
- * @deprecated 建议使用 onDelete 替代(符合命名规范),但为保持兼容性暂时保留
20
+ * @deprecated @since 2.29.0 建议使用 onDelete 替代(符合命名规范),但为保持兼容性暂时保留
21
21
  */
22
22
  onDeleteItem?: (sessionId: string) => void;
23
23
  customDateFormatter?: (date: number | string | Date) => string;
@@ -66,7 +66,7 @@ export interface HistoryProps {
66
66
  /** 空状态渲染函数,当历史记录为空时显示 */
67
67
  emptyRender?: () => React.ReactNode;
68
68
  /**
69
- * @deprecated 请使用 isLoading 代替
69
+ * @deprecated @since 2.29.0 请使用 isLoading 代替
70
70
  * @description 已废弃,将在未来版本移除
71
71
  */
72
72
  loading?: boolean;
@@ -102,9 +102,9 @@ export interface HistoryActionsBoxProps {
102
102
  onFavorite?: (sessionId: string, isFavorite: boolean) => void;
103
103
  }
104
104
  /**
105
- * @deprecated 请使用 HistoryActionsBoxProps 替代
105
+ * @deprecated @since 2.29.0 请使用 HistoryActionsBoxProps 替代
106
106
  */
107
107
  export interface ActionsBoxProps extends HistoryActionsBoxProps {
108
- /** @deprecated 请使用 onClick 替代 */
108
+ /** @deprecated @since 2.29.0 请使用 onClick 替代 */
109
109
  onSelected?: (item: HistoryDataType) => void;
110
110
  }
@@ -1,3 +1,3 @@
1
1
  /**
2
- * @deprecated 请使用 HistoryActionsBoxProps 替代
2
+ * @deprecated @since 2.29.0 请使用 HistoryActionsBoxProps 替代
3
3
  */ export { };
@@ -390,6 +390,22 @@ export declare function useLanguage(): {
390
390
  'layout.header.title': string;
391
391
  theme: string;
392
392
  expandCollapse: string;
393
+ moreActions: string;
394
+ clickToRetry: string;
395
+ 'table.insertColumnBefore': string;
396
+ 'table.deleteColumn': string;
397
+ 'table.insertColumnAfter': string;
398
+ 'table.insertRowBefore': string;
399
+ 'table.deleteRow': string;
400
+ 'table.insertRowAfter': string;
401
+ 'table.clickToShowActions': string;
402
+ 'table.clickToSelectColumn': string;
403
+ 'table.clickToSelectTable': string;
404
+ 'comment.delete': string;
405
+ 'comment.edit': string;
406
+ 'comment.jumpTo': string;
407
+ 'chart.renderFailed': string;
408
+ 'chart.renderFailedSubTitle': string;
393
409
  };
394
410
  setLanguage: ((language: "zh-CN" | "en-US") => void) | undefined;
395
411
  toggleLanguage: () => void;
@@ -24,6 +24,7 @@ export declare function saveUserLanguage(language: 'zh-CN' | 'en-US'): void;
24
24
  * 国际化上下文
25
25
  *
26
26
  * 提供国际化功能的React Context,包含当前语言环境和设置语言的方法。
27
+ * 所有国际化文案应统一通过 I18nContext 获取,保证单一数据源。
27
28
  */
28
29
  export declare const I18nContext: React.Context<{
29
30
  locale: LocalKeys;
@@ -31,6 +32,15 @@ export declare const I18nContext: React.Context<{
31
32
  setLanguage?: ((language: 'zh-CN' | 'en-US') => void) | undefined;
32
33
  setLocale?: ((locale: LocalKeys) => void) | undefined;
33
34
  }>;
35
+ /**
36
+ * 从 I18nContext 获取当前 locale,国际化统一入口
37
+ */
38
+ export declare function useLocale(): LocalKeys;
39
+ /**
40
+ * 获取合并后的 locale:以 I18nContext 为基准,用 override 覆盖部分 key
41
+ * 用于 Bubble 等支持 config 级文案覆盖的场景,仍以 I18nContext 为主
42
+ */
43
+ export declare function useMergedLocale(override?: Partial<LocalKeys>): LocalKeys;
34
44
  /**
35
45
  * I18nProvide 组件 - 国际化提供者组件
36
46
  *