@ant-design/agentic-ui 2.29.26 → 2.29.27
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/Bubble/AIBubble.js +1 -2
- package/dist/Bubble/BubbleConfigProvide.d.ts +0 -3
- package/dist/Bubble/BubbleConfigProvide.js +1 -2
- package/dist/Bubble/MessagesContent/BubbleExtra.js +2 -2
- package/dist/Bubble/MessagesContent/CopyButton/index.js +3 -5
- package/dist/Bubble/MessagesContent/MarkdownPreview.js +2 -2
- package/dist/Bubble/PureBubble.js +1 -2
- package/dist/Bubble/UserBubble.js +1 -2
- package/package.json +2 -1
package/dist/Bubble/AIBubble.js
CHANGED
|
@@ -275,7 +275,7 @@ var shouldRenderBeforeContent = function shouldRenderBeforeContent(placement, ro
|
|
|
275
275
|
var _React_useState = _sliced_to_array(React.useState(false), 2), hidePadding = _React_useState[0], setHidePadding = _React_useState[1];
|
|
276
276
|
var getPrefixCls = useContext(ConfigProvider.ConfigContext).getPrefixCls;
|
|
277
277
|
var context = useContext(BubbleConfigContext);
|
|
278
|
-
var _ref = context || {}, compact = _ref.compact, standalone = _ref.standalone
|
|
278
|
+
var _ref = context || {}, compact = _ref.compact, standalone = _ref.standalone;
|
|
279
279
|
var prefixClass = getPrefixCls('agentic');
|
|
280
280
|
var _useStyle = useStyle(prefixClass), wrapSSR = _useStyle.wrapSSR, hashId = _useStyle.hashId;
|
|
281
281
|
var preMessageSameRole = isSameRoleAsPrevious(preMessage, originData);
|
|
@@ -356,7 +356,6 @@ var shouldRenderBeforeContent = function shouldRenderBeforeContent(placement, ro
|
|
|
356
356
|
value: {
|
|
357
357
|
compact: compact,
|
|
358
358
|
standalone: !!standalone,
|
|
359
|
-
locale: locale,
|
|
360
359
|
bubble: props
|
|
361
360
|
}
|
|
362
361
|
}, /*#__PURE__*/ React.createElement(Flex, {
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import type { LocalKeys } from '../I18n';
|
|
3
2
|
import { ThoughtChainListProps } from '../ThoughtChainList/types';
|
|
4
3
|
import { BubbleProps } from './type';
|
|
5
4
|
export type ChatConfigType = {
|
|
@@ -18,8 +17,6 @@ export type ChatConfigType = {
|
|
|
18
17
|
*/
|
|
19
18
|
enable: boolean;
|
|
20
19
|
};
|
|
21
|
-
/** 可选覆盖,与 I18nContext 合并时优先生效,国际化主数据源为 I18nContext */
|
|
22
|
-
locale?: Partial<LocalKeys>;
|
|
23
20
|
bubble?: BubbleProps<{
|
|
24
21
|
/**
|
|
25
22
|
* 聊天内容
|
|
@@ -269,7 +269,7 @@ import { motion } from "framer-motion";
|
|
|
269
269
|
import React, { useContext, useEffect, useMemo, useState } from "react";
|
|
270
270
|
import { ActionIconBox } from "../../Components/ActionIconBox";
|
|
271
271
|
import { Loading } from "../../Components/Loading";
|
|
272
|
-
import {
|
|
272
|
+
import { useLocale } from "../../I18n";
|
|
273
273
|
import { BubbleConfigContext } from "../BubbleConfigProvide";
|
|
274
274
|
import { CopyButton } from "./CopyButton";
|
|
275
275
|
import { VoiceButton } from "./VoiceButton";
|
|
@@ -307,7 +307,7 @@ import { VoiceButton } from "./VoiceButton";
|
|
|
307
307
|
var _originalData_extra, _originalData_extra1, _originalData_extra2, _originalData_extra3, _bubble_originData, _bubble_originData1, _props_rightRender;
|
|
308
308
|
var getPrefixCls = useContext(ConfigProvider.ConfigContext).getPrefixCls;
|
|
309
309
|
var context = useContext(BubbleConfigContext);
|
|
310
|
-
var locale =
|
|
310
|
+
var locale = useLocale();
|
|
311
311
|
var _useState = _sliced_to_array(useState(false), 2), feedbackLoading = _useState[0], setFeedbackLoading = _useState[1];
|
|
312
312
|
// 获取聊天项的原始数据
|
|
313
313
|
var originalData = bubble === null || bubble === void 0 ? void 0 : bubble.originData;
|
|
@@ -214,14 +214,13 @@ function _ts_generator(thisArg, body) {
|
|
|
214
214
|
};
|
|
215
215
|
}
|
|
216
216
|
}
|
|
217
|
-
import { memo
|
|
217
|
+
import { memo } from "react";
|
|
218
218
|
import { CheckCircleFilled } from "@ant-design/icons";
|
|
219
219
|
import { isFunction } from "lodash-es";
|
|
220
220
|
import React from "react";
|
|
221
221
|
import { ActionIconBox } from "../../../Components/ActionIconBox";
|
|
222
222
|
import { useCopied } from "../../../Hooks/useCopied";
|
|
223
|
-
import {
|
|
224
|
-
import { BubbleConfigContext } from "../../BubbleConfigProvide";
|
|
223
|
+
import { useLocale } from "../../../I18n";
|
|
225
224
|
/**
|
|
226
225
|
* CopyIcon 组件 - 复制图标组件
|
|
227
226
|
*
|
|
@@ -310,9 +309,8 @@ import { BubbleConfigContext } from "../../BubbleConfigProvide";
|
|
|
310
309
|
"onClick",
|
|
311
310
|
'data-testid'
|
|
312
311
|
]);
|
|
313
|
-
var _useContext;
|
|
314
312
|
var _useCopied = useCopied(), copied = _useCopied.copied, setCopied = _useCopied.setCopied;
|
|
315
|
-
var locale =
|
|
313
|
+
var locale = useLocale();
|
|
316
314
|
var copySuccessText = (locale === null || locale === void 0 ? void 0 : locale['chat.message.copy.success']) || '复制成功';
|
|
317
315
|
return /*#__PURE__*/ React.createElement(ActionIconBox, _object_spread_props(_object_spread({
|
|
318
316
|
onClick: function onClick1(e) {
|
|
@@ -54,7 +54,7 @@ import { Popover, theme } from "antd";
|
|
|
54
54
|
import React, { useContext, useEffect, useMemo } from "react";
|
|
55
55
|
import { ErrorBoundary } from "react-error-boundary";
|
|
56
56
|
import { MarkdownEditor, parserMdToSchema } from "../..";
|
|
57
|
-
import {
|
|
57
|
+
import { useLocale } from "../../I18n";
|
|
58
58
|
import { BubbleConfigContext } from "../BubbleConfigProvide";
|
|
59
59
|
import { MessagesContext } from "./BubbleContext";
|
|
60
60
|
/**
|
|
@@ -98,7 +98,7 @@ import { MessagesContext } from "./BubbleContext";
|
|
|
98
98
|
var MarkdownEditorRef = React.useRef(undefined);
|
|
99
99
|
var hidePadding = (useContext(MessagesContext) || {}).hidePadding;
|
|
100
100
|
var config = useContext(BubbleConfigContext);
|
|
101
|
-
var locale =
|
|
101
|
+
var locale = useLocale();
|
|
102
102
|
var standalone = config === null || config === void 0 ? void 0 : config.standalone;
|
|
103
103
|
var token = theme.useToken().token;
|
|
104
104
|
var isPaddingHidden = useMemo(function() {
|
|
@@ -279,7 +279,7 @@ export var PureBubble = /*#__PURE__*/ memo(function(props) {
|
|
|
279
279
|
var _React_useState = _sliced_to_array(React.useState(false), 2), hidePadding = _React_useState[0], setHidePadding = _React_useState[1];
|
|
280
280
|
var getPrefixCls = useContext(ConfigProvider.ConfigContext).getPrefixCls;
|
|
281
281
|
var context = useContext(BubbleConfigContext);
|
|
282
|
-
var _ref1 = context || {}, compact = _ref1.compact, standalone = _ref1.standalone
|
|
282
|
+
var _ref1 = context || {}, compact = _ref1.compact, standalone = _ref1.standalone;
|
|
283
283
|
var prefixClass = getPrefixCls('agentic');
|
|
284
284
|
var _useStyle = useStyle(prefixClass), wrapSSR = _useStyle.wrapSSR, hashId = _useStyle.hashId;
|
|
285
285
|
var placement = (_props_placement = props.placement) !== null && _props_placement !== void 0 ? _props_placement : 'left';
|
|
@@ -452,7 +452,6 @@ export var PureBubble = /*#__PURE__*/ memo(function(props) {
|
|
|
452
452
|
value: {
|
|
453
453
|
compact: compact,
|
|
454
454
|
standalone: !!standalone,
|
|
455
|
-
locale: locale,
|
|
456
455
|
bubble: props
|
|
457
456
|
}
|
|
458
457
|
}, /*#__PURE__*/ React.createElement(Flex, {
|
|
@@ -128,7 +128,7 @@ var getContentStyle = function getContentStyle(standalone, customStyle) {
|
|
|
128
128
|
var _React_useState = _sliced_to_array(React.useState(false), 2), hidePadding = _React_useState[0], setHidePadding = _React_useState[1];
|
|
129
129
|
var getPrefixCls = useContext(ConfigProvider.ConfigContext).getPrefixCls;
|
|
130
130
|
var context = useContext(BubbleConfigContext);
|
|
131
|
-
var _ref = context || {}, compact = _ref.compact, standalone = _ref.standalone
|
|
131
|
+
var _ref = context || {}, compact = _ref.compact, standalone = _ref.standalone;
|
|
132
132
|
var prefixClass = getPrefixCls('agentic');
|
|
133
133
|
var _useStyle = useStyle(prefixClass, classNames), wrapSSR = _useStyle.wrapSSR, hashId = _useStyle.hashId;
|
|
134
134
|
var time = (originData === null || originData === void 0 ? void 0 : originData.createAt) || props.time;
|
|
@@ -180,7 +180,6 @@ var getContentStyle = function getContentStyle(standalone, customStyle) {
|
|
|
180
180
|
value: {
|
|
181
181
|
compact: compact,
|
|
182
182
|
standalone: !!standalone,
|
|
183
|
-
locale: locale,
|
|
184
183
|
bubble: props
|
|
185
184
|
}
|
|
186
185
|
}, /*#__PURE__*/ React.createElement(Flex, {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ant-design/agentic-ui",
|
|
3
|
-
"version": "2.29.
|
|
3
|
+
"version": "2.29.27",
|
|
4
4
|
"description": "面向智能体的 UI 组件库,提供多步推理可视化、工具调用展示、任务执行协同等 Agentic UI 能力",
|
|
5
5
|
"repository": "git@github.com:ant-design/agentic-ui.git",
|
|
6
6
|
"license": "MIT",
|
|
@@ -24,6 +24,7 @@
|
|
|
24
24
|
"lint:css": "stylelint \"{src,test}/**/*.{css,less}\"",
|
|
25
25
|
"lint:es": "eslint \"{src,test}/**/*.{js,jsx,ts,tsx}\"",
|
|
26
26
|
"prepare": "husky install && dumi setup",
|
|
27
|
+
"prepublishOnly": "father doctor && pnpm run test && pnpm run build",
|
|
27
28
|
"prettier": "prettier --write \"{src,docs,test}/**/*.{js,jsx,ts,tsx,css,less,json,md}\"",
|
|
28
29
|
"preview": "pnpm dumi preview",
|
|
29
30
|
"report:demo": "node scripts/generateDemoReport.js",
|