@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.
- package/dist/AILabel/index.js +1 -1
- package/dist/AgentRunBar/Robot.js +1 -1
- package/dist/AgentRunBar/index.js +1 -1
- package/dist/AgenticLayout/index.js +1 -1
- package/dist/AnswerAlert/index.js +1 -1
- package/dist/BackTo/ScrollVisibleButton.js +1 -1
- package/dist/Bubble/AIBubble.js +1 -1
- package/dist/Bubble/Avatar/index.js +1 -1
- package/dist/Bubble/BubbleConfigProvide.d.ts +3 -2
- package/dist/Bubble/BubbleConfigProvide.js +1 -2
- package/dist/Bubble/List/PureBubbleList.d.ts +4 -4
- package/dist/Bubble/List/PureBubbleList.js +1 -1
- package/dist/Bubble/List/index.d.ts +5 -5
- package/dist/Bubble/List/index.js +1 -1
- package/dist/Bubble/MessagesContent/BubbleExtra.js +27 -32
- package/dist/Bubble/MessagesContent/CopyButton/index.js +5 -4
- package/dist/Bubble/MessagesContent/DocInfo.js +1 -1
- package/dist/Bubble/MessagesContent/MarkdownPreview.js +4 -1
- package/dist/Bubble/MessagesContent/VoiceButton/index.js +1 -1
- package/dist/Bubble/MessagesContent/index.js +1 -1
- package/dist/Bubble/PureBubble.js +1 -1
- package/dist/Bubble/Title.js +1 -1
- package/dist/Bubble/UserBubble.js +1 -1
- package/dist/Bubble/type.d.ts +96 -8
- package/dist/Bubble/types/BubbleExtra.d.ts +6 -4
- package/dist/ChatBootPage/ButtonTab.js +1 -1
- package/dist/ChatBootPage/CaseReply.js +1 -1
- package/dist/ChatBootPage/Title.js +1 -1
- package/dist/ChatLayout/index.js +1 -1
- package/dist/Components/ActionIconBox/index.d.ts +1 -1
- package/dist/Components/ActionIconBox/index.js +2 -2
- package/dist/Components/ActionItemBox/ActionItemBox.js +1 -1
- package/dist/Components/Button/IconButton/index.d.ts +1 -1
- package/dist/Components/Button/IconButton/index.js +1 -1
- package/dist/Components/Button/SwitchButton/index.js +1 -1
- package/dist/Components/Button/ToggleButton/index.js +1 -1
- package/dist/Components/GradientText/index.js +1 -1
- package/dist/Components/LayoutHeader/index.js +1 -1
- package/dist/Components/Loading/Loading.js +2 -2
- package/dist/Components/Robot/index.js +1 -1
- package/dist/Components/SuggestionList/index.js +1 -1
- package/dist/Components/TextAnimate/index.js +2 -2
- package/dist/Components/TypingAnimation/index.js +2 -2
- package/dist/Components/VisualList/index.d.ts +1 -1
- package/dist/Components/VisualList/index.js +1 -1
- package/dist/Components/lotties/TextLoading/index.js +1 -1
- package/dist/Components/lotties/bubble-actions/Abstract/index.js +1 -1
- package/dist/History/components/NewChatComponent.d.ts +1 -1
- package/dist/History/components/NewChatComponent.js +1 -1
- package/dist/History/components/SearchComponent.d.ts +1 -1
- package/dist/History/components/SearchComponent.js +1 -1
- package/dist/History/index.js +3 -3
- package/dist/History/menu.js +1 -1
- package/dist/History/types/index.d.ts +5 -5
- package/dist/History/types/index.js +1 -1
- package/dist/Hooks/useLanguage.d.ts +16 -0
- package/dist/I18n/index.d.ts +10 -0
- package/dist/I18n/index.js +46 -0
- package/dist/I18n/locales.d.ts +16 -0
- package/dist/I18n/locales.js +43 -5
- package/dist/MarkdownEditor/BaseMarkdownEditor.js +1 -1
- package/dist/MarkdownEditor/editor/Editor.js +1 -1
- package/dist/MarkdownEditor/editor/components/CommentList/index.js +6 -4
- package/dist/MarkdownEditor/editor/components/ContributorAvatar/index.js +1 -1
- package/dist/MarkdownEditor/editor/components/fntTag/index.js +1 -1
- package/dist/MarkdownEditor/editor/elements/Comment/index.js +1 -1
- package/dist/MarkdownEditor/editor/elements/FncLeaf/index.js +1 -1
- package/dist/MarkdownEditor/editor/elements/Head/ReadonlyHead.js +1 -1
- package/dist/MarkdownEditor/editor/elements/Head/index.js +1 -1
- package/dist/MarkdownEditor/editor/elements/LinkCard/ReadonlyLinkCard.js +1 -1
- package/dist/MarkdownEditor/editor/elements/LinkCard/index.js +1 -1
- package/dist/MarkdownEditor/editor/elements/List/List.js +1 -1
- package/dist/MarkdownEditor/editor/elements/List/ListItem.js +1 -1
- package/dist/MarkdownEditor/editor/elements/List/ReadonlyList.js +1 -1
- package/dist/MarkdownEditor/editor/elements/List/ReadonlyListItem.js +1 -1
- package/dist/MarkdownEditor/editor/elements/Mermaid/ReadonlyMermaid.js +1 -1
- package/dist/MarkdownEditor/editor/elements/Mermaid/index.js +1 -1
- package/dist/MarkdownEditor/editor/elements/Paragraph/ReadonlyParagraph.js +1 -1
- package/dist/MarkdownEditor/editor/elements/Paragraph/index.js +1 -1
- package/dist/MarkdownEditor/editor/elements/Table/ReadonlyTableComponent.js +1 -1
- package/dist/MarkdownEditor/editor/elements/Table/SimpleTable.js +1 -1
- package/dist/MarkdownEditor/editor/elements/Table/Table.js +1 -1
- package/dist/MarkdownEditor/editor/elements/Table/TableCellIndex/index.js +7 -5
- package/dist/MarkdownEditor/editor/elements/Table/TableCellIndexSpacer/index.js +7 -5
- package/dist/MarkdownEditor/editor/elements/Table/TableRowIndex/index.js +1 -1
- package/dist/MarkdownEditor/editor/elements/Table/Td/index.js +1 -1
- package/dist/MarkdownEditor/editor/elements/TagPopup/index.js +1 -1
- package/dist/MarkdownEditor/editor/elements/index.js +1 -1
- package/dist/MarkdownEditor/editor/parser/parse/parseTable.js +1 -1
- package/dist/MarkdownEditor/editor/tools/DragHandle.js +4 -2
- package/dist/MarkdownEditor/editor/tools/InsertAutocomplete.js +1 -1
- package/dist/MarkdownEditor/editor/tools/ToolBar/BaseBar.js +3 -2
- package/dist/MarkdownEditor/editor/tools/ToolBar/FloatBar.js +1 -1
- package/dist/MarkdownEditor/editor/tools/ToolBar/ReadonlyBaseBar.js +1 -1
- package/dist/MarkdownEditor/editor/tools/ToolBar/ToolBar.js +1 -1
- package/dist/MarkdownEditor/editor/tools/ToolBar/components/ClearFormatButton.js +1 -1
- package/dist/MarkdownEditor/editor/tools/ToolBar/components/ColorPickerButton.js +1 -1
- package/dist/MarkdownEditor/editor/tools/ToolBar/components/FormatButton.js +1 -1
- package/dist/MarkdownEditor/editor/tools/ToolBar/components/FormattingTools.js +1 -1
- package/dist/MarkdownEditor/editor/tools/ToolBar/components/HeadingDropdown.js +1 -1
- package/dist/MarkdownEditor/editor/tools/ToolBar/components/LinkButton.js +1 -1
- package/dist/MarkdownEditor/editor/tools/ToolBar/components/UndoRedoButtons.js +1 -1
- package/dist/MarkdownEditor/el.d.ts +1 -1
- package/dist/MarkdownEditor/types.d.ts +103 -3
- package/dist/MarkdownInputField/AttachmentButton/AttachmentFileList/AttachmentFileListItem.js +10 -7
- package/dist/MarkdownInputField/AttachmentButton/AttachmentFileList/index.js +1 -1
- package/dist/MarkdownInputField/AttachmentButton/index.js +1 -1
- package/dist/MarkdownInputField/BeforeToolContainer/BeforeToolContainer.js +1 -1
- package/dist/MarkdownInputField/FileMapView/FileMapViewItem.js +2 -2
- package/dist/MarkdownInputField/FileMapView/index.js +1 -1
- package/dist/MarkdownInputField/MarkdownInputField.js +1 -1
- package/dist/MarkdownInputField/QuickActions/index.js +1 -1
- package/dist/MarkdownInputField/SendActions/index.js +1 -1
- package/dist/MarkdownInputField/SendButton/index.js +1 -1
- package/dist/MarkdownInputField/SkillModeBar/index.js +1 -1
- package/dist/MarkdownInputField/TopOperatingArea/index.js +1 -1
- package/dist/MarkdownInputField/VoiceInput/index.js +1 -1
- package/dist/Plugins/chart/AreaChart/index.js +1 -1
- package/dist/Plugins/chart/BarChart/index.js +1 -1
- package/dist/Plugins/chart/DonutChart/index.js +1 -1
- package/dist/Plugins/chart/FunnelChart/index.js +1 -1
- package/dist/Plugins/chart/LineChart/index.js +1 -1
- package/dist/Plugins/chart/RadarChart/index.js +1 -1
- package/dist/Plugins/chart/ScatterChart/index.js +1 -1
- package/dist/Plugins/chart/components/ChartContainer/ChartContainer.js +1 -1
- package/dist/Plugins/chart/components/ChartContainer/ChartErrorBoundary.d.ts +736 -0
- package/dist/Plugins/chart/components/ChartContainer/ChartErrorBoundary.js +23 -5
- package/dist/Plugins/code/CodeUI/Katex/Katex.js +1 -1
- package/dist/Plugins/code/components/CodeContainer.js +1 -1
- package/dist/Plugins/katex/InlineKatex.js +1 -1
- package/dist/Plugins/katex/Katex.js +1 -1
- package/dist/Plugins/mermaid/MermaidFallback.js +1 -1
- package/dist/Plugins/mermaid/MermaidRendererImpl.js +1 -1
- package/dist/Plugins/mermaid/index.js +3 -2
- package/dist/Quote/index.js +1 -1
- package/dist/Schema/SchemaEditor/index.js +1 -1
- package/dist/Schema/SchemaForm/index.js +2 -2
- package/dist/TaskList/index.d.ts +6 -2
- package/dist/TaskList/index.js +1 -1
- package/dist/ThoughtChainList/DeepThink.d.ts +1 -1
- package/dist/ThoughtChainList/DotAni/index.js +1 -1
- package/dist/ThoughtChainList/FlipText/index.js +1 -1
- package/dist/ThoughtChainList/TableSql.d.ts +1 -1
- package/dist/ThoughtChainList/ThoughtChainListItem.js +1 -1
- package/dist/ThoughtChainList/TitleInfo.js +1 -1
- package/dist/ThoughtChainList/ToolCall.d.ts +1 -1
- package/dist/ThoughtChainList/WebSearch.d.ts +1 -1
- package/dist/ThoughtChainList/index.js +7 -18
- package/dist/ThoughtChainList/style.js +11 -0
- package/dist/ThoughtChainList/types.d.ts +11 -1
- package/dist/ToolUseBar/BarItem/Content.js +1 -1
- package/dist/ToolUseBar/BarItem/index.js +1 -1
- package/dist/ToolUseBar/index.js +1 -1
- package/dist/ToolUseBarThink/index.js +1 -1
- package/dist/Types/message.d.ts +12 -3
- package/dist/WelcomeMessage/index.js +1 -1
- package/dist/Workspace/Browser/index.js +1 -1
- package/dist/Workspace/File/FileComponent.d.ts +1 -1
- package/dist/Workspace/File/FileComponent.js +1 -1
- package/dist/Workspace/File/PreviewComponent.js +2 -2
- package/dist/Workspace/HtmlPreview/index.js +1 -1
- package/dist/Workspace/RealtimeFollow/index.js +1 -1
- package/dist/Workspace/Task/index.js +1 -1
- package/dist/Workspace/index.js +1 -1
- package/dist/Workspace/types.d.ts +2 -2
- package/dist/index.d.ts +68 -62
- package/dist/index.js +84 -79
- package/package.json +2 -7
package/dist/Bubble/type.d.ts
CHANGED
|
@@ -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?:
|
|
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?:
|
|
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?:
|
|
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
|
-
|
|
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 "
|
|
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 "
|
|
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) {
|
package/dist/ChatLayout/index.js
CHANGED
|
@@ -27,7 +27,7 @@ function _object_spread(target) {
|
|
|
27
27
|
return target;
|
|
28
28
|
}
|
|
29
29
|
import { ConfigProvider } from "antd";
|
|
30
|
-
import clsx from "
|
|
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";
|
|
@@ -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 "
|
|
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 "
|
|
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";
|
|
@@ -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 "
|
|
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 "
|
|
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 "
|
|
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) {
|
|
@@ -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 "
|
|
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 "
|
|
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 "
|
|
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 "
|
|
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 "
|
|
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 "
|
|
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 "
|
|
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 classNames from "
|
|
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 {};
|
package/dist/History/index.js
CHANGED
|
@@ -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 "
|
|
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,
|
|
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 =
|
|
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;
|
package/dist/History/menu.js
CHANGED
|
@@ -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 "
|
|
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
|
}
|
|
@@ -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;
|
package/dist/I18n/index.d.ts
CHANGED
|
@@ -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
|
*
|