@ant-design/agentic-ui 2.29.59 → 2.30.0
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/List/index.d.ts +7 -0
- package/dist/Bubble/List/index.js +10 -1
- package/dist/Bubble/MessagesContent/MarkdownPreview.js +27 -3
- package/dist/Bubble/UserBubble.js +3 -1
- package/dist/Bubble/type.d.ts +7 -0
- package/dist/Hooks/useLanguage.d.ts +1 -0
- package/dist/I18n/locales.d.ts +1 -0
- package/dist/I18n/locales.js +3 -1
- package/dist/MarkdownEditor/plugin.d.ts +15 -0
- package/dist/MarkdownEditor/style.js +156 -326
- package/dist/MarkdownEditor/types.d.ts +9 -0
- package/dist/MarkdownInputField/AttachmentButton/AttachmentButtonPopover.js +1 -1
- package/dist/MarkdownInputField/hooks/useMarkdownInputFieldRefs.js +10 -3
- package/dist/MarkdownRenderer/AnimationText.d.ts +22 -0
- package/dist/MarkdownRenderer/AnimationText.js +124 -0
- package/dist/MarkdownRenderer/CharacterQueue.d.ts +36 -0
- package/dist/MarkdownRenderer/CharacterQueue.js +188 -0
- package/dist/MarkdownRenderer/MarkdownRenderer.d.ts +13 -0
- package/dist/MarkdownRenderer/MarkdownRenderer.js +348 -0
- package/dist/MarkdownRenderer/index.d.ts +11 -0
- package/dist/MarkdownRenderer/index.js +9 -0
- package/dist/MarkdownRenderer/renderers/ChartRenderer.d.ts +12 -0
- package/dist/MarkdownRenderer/renderers/ChartRenderer.js +395 -0
- package/dist/MarkdownRenderer/renderers/CodeRenderer.d.ts +7 -0
- package/dist/MarkdownRenderer/renderers/CodeRenderer.js +218 -0
- package/dist/MarkdownRenderer/renderers/MermaidRenderer.d.ts +7 -0
- package/dist/MarkdownRenderer/renderers/MermaidRenderer.js +43 -0
- package/dist/MarkdownRenderer/renderers/SchemaRenderer.d.ts +15 -0
- package/dist/MarkdownRenderer/renderers/SchemaRenderer.js +115 -0
- package/dist/MarkdownRenderer/renderers/index.d.ts +4 -0
- package/dist/MarkdownRenderer/renderers/index.js +4 -0
- package/dist/MarkdownRenderer/style.d.ts +16 -0
- package/dist/MarkdownRenderer/style.js +46 -0
- package/dist/MarkdownRenderer/types.d.ts +74 -0
- package/dist/MarkdownRenderer/types.js +1 -0
- package/dist/MarkdownRenderer/useMarkdownToReact.d.ts +23 -0
- package/dist/MarkdownRenderer/useMarkdownToReact.js +1240 -0
- package/dist/MarkdownRenderer/useStreaming.d.ts +29 -0
- package/dist/MarkdownRenderer/useStreaming.js +392 -0
- package/dist/Plugins/chart/AreaChart/index.js +4 -2
- package/dist/Plugins/chart/LineChart/index.js +4 -2
- package/dist/Plugins/chart/components/ChartContainer/ChartErrorBoundary.d.ts +8 -0
- package/dist/Plugins/chart/components/ChartContainer/ChartErrorBoundary.js +31 -6
- package/dist/Plugins/mermaid/style.js +0 -3
- package/dist/TaskList/TaskList.js +3 -12
- package/dist/TaskList/components/TaskListItem.js +3 -12
- package/dist/ThoughtChainList/ThoughtChainListItem.js +2 -4
- package/dist/ThoughtChainList/index.js +4 -21
- package/dist/ToolUseBarThink/index.js +20 -59
- package/dist/index.d.ts +1 -0
- package/dist/index.js +2 -0
- package/package.json +2 -2
|
@@ -308,24 +308,10 @@ var ThoughtChainContent = /*#__PURE__*/ React.memo(function(_0) {
|
|
|
308
308
|
}, /*#__PURE__*/ React.createElement(motion.div, {
|
|
309
309
|
role: "list",
|
|
310
310
|
className: classNames("".concat(prefixCls, "-content-list"), hashId),
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
when: 'afterChildren'
|
|
316
|
-
}
|
|
317
|
-
},
|
|
318
|
-
visible: {
|
|
319
|
-
opacity: 1,
|
|
320
|
-
transition: {
|
|
321
|
-
staggerChildren: 0.3,
|
|
322
|
-
when: 'beforeChildren'
|
|
323
|
-
}
|
|
324
|
-
}
|
|
325
|
-
},
|
|
326
|
-
whileInView: "visible",
|
|
327
|
-
initial: "hidden",
|
|
328
|
-
animate: "visible"
|
|
311
|
+
initial: false,
|
|
312
|
+
animate: {
|
|
313
|
+
opacity: 1
|
|
314
|
+
}
|
|
329
315
|
}, processedItems.map(function(item, index) {
|
|
330
316
|
var _item_info;
|
|
331
317
|
var info = (_item_info = item.info) === null || _item_info === void 0 ? void 0 : _item_info.split(/(\$\{\w+\})/);
|
|
@@ -482,9 +468,6 @@ var ThoughtChainContent = /*#__PURE__*/ React.memo(function(_0) {
|
|
|
482
468
|
className: classNames("".concat(prefixCls), hashId),
|
|
483
469
|
style: restStyle
|
|
484
470
|
}, /*#__PURE__*/ React.createElement(motion.div, {
|
|
485
|
-
transition: {
|
|
486
|
-
duration: 0.3
|
|
487
|
-
},
|
|
488
471
|
className: classNames("".concat(prefixCls, "-container"), hashId, _define_property({}, "".concat(prefixCls, "-container-loading"), !(bubble === null || bubble === void 0 ? void 0 : bubble.isFinished)))
|
|
489
472
|
}, /*#__PURE__*/ React.createElement(ThoughtChainTitle, {
|
|
490
473
|
prefixCls: prefixCls,
|
|
@@ -87,7 +87,7 @@ function _unsupported_iterable_to_array(o, minLen) {
|
|
|
87
87
|
import { Brain, ChevronDown, ChevronsDownUp, ChevronsUpDown } from "@sofa-design/icons";
|
|
88
88
|
import { ConfigProvider } from "antd";
|
|
89
89
|
import classNames from "clsx";
|
|
90
|
-
import {
|
|
90
|
+
import { motion } from "framer-motion";
|
|
91
91
|
import { useMergedState } from "rc-util";
|
|
92
92
|
import React, { memo, useCallback, useContext, useEffect, useMemo, useRef, useState } from "react";
|
|
93
93
|
import { useRefFunction } from "../Hooks/useRefFunction";
|
|
@@ -276,36 +276,6 @@ var ThinkContainer = function ThinkContainer(param) {
|
|
|
276
276
|
handleContentExpandToggle,
|
|
277
277
|
locale
|
|
278
278
|
]);
|
|
279
|
-
// 缓存容器元素
|
|
280
|
-
var contentVariants = useMemo(function() {
|
|
281
|
-
return {
|
|
282
|
-
expanded: {
|
|
283
|
-
height: 'auto',
|
|
284
|
-
opacity: 1
|
|
285
|
-
},
|
|
286
|
-
collapsed: {
|
|
287
|
-
height: 0,
|
|
288
|
-
opacity: 0
|
|
289
|
-
}
|
|
290
|
-
};
|
|
291
|
-
}, []);
|
|
292
|
-
var contentTransition = useMemo(function() {
|
|
293
|
-
return {
|
|
294
|
-
height: {
|
|
295
|
-
duration: 0.26,
|
|
296
|
-
ease: [
|
|
297
|
-
0.4,
|
|
298
|
-
0,
|
|
299
|
-
0.2,
|
|
300
|
-
1
|
|
301
|
-
]
|
|
302
|
-
},
|
|
303
|
-
opacity: {
|
|
304
|
-
duration: 0.2,
|
|
305
|
-
ease: 'linear'
|
|
306
|
-
}
|
|
307
|
-
};
|
|
308
|
-
}, []);
|
|
309
279
|
var innerContent = /*#__PURE__*/ React.createElement(React.Fragment, null, /*#__PURE__*/ React.createElement("div", {
|
|
310
280
|
ref: contentInnerRef,
|
|
311
281
|
style: contentInnerStyle
|
|
@@ -318,34 +288,25 @@ var ThinkContainer = function ThinkContainer(param) {
|
|
|
318
288
|
"data-testid": "tool-use-bar-think-floating-expand",
|
|
319
289
|
style: styles === null || styles === void 0 ? void 0 : styles.floatingExpand
|
|
320
290
|
}, floatingIcon, floatingText) : null);
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
"
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
}, /*#__PURE__*/ React.createElement("div", {
|
|
341
|
-
className: contentClassName,
|
|
342
|
-
style: styles === null || styles === void 0 ? void 0 : styles.content
|
|
343
|
-
}, thinkContent), showFloatingExpand ? /*#__PURE__*/ React.createElement("div", {
|
|
344
|
-
className: floatingExpandClassName,
|
|
345
|
-
onClick: onToggleFloatingExpand,
|
|
346
|
-
"data-testid": "tool-use-bar-think-floating-expand",
|
|
347
|
-
style: styles === null || styles === void 0 ? void 0 : styles.floatingExpand
|
|
348
|
-
}, floatingIcon, floatingText) : null) : null);
|
|
291
|
+
// 收起时不渲染 thinkContent,无动画避免展开/收起卡顿
|
|
292
|
+
if (expandedState) {
|
|
293
|
+
return /*#__PURE__*/ React.createElement("div", {
|
|
294
|
+
className: containerClassName,
|
|
295
|
+
"data-testid": "tool-use-bar-think-container",
|
|
296
|
+
style: {
|
|
297
|
+
overflow: 'hidden'
|
|
298
|
+
}
|
|
299
|
+
}, innerContent);
|
|
300
|
+
}
|
|
301
|
+
if (showFloatingExpand) {
|
|
302
|
+
return /*#__PURE__*/ React.createElement("div", {
|
|
303
|
+
className: floatingExpandClassName,
|
|
304
|
+
onClick: onToggleFloatingExpand,
|
|
305
|
+
"data-testid": "tool-use-bar-think-floating-expand",
|
|
306
|
+
style: styles === null || styles === void 0 ? void 0 : styles.floatingExpand
|
|
307
|
+
}, floatingIcon, floatingText);
|
|
308
|
+
}
|
|
309
|
+
return null;
|
|
349
310
|
};
|
|
350
311
|
/**
|
|
351
312
|
* ToolUseBarThink 组件
|
package/dist/index.d.ts
CHANGED
|
@@ -30,6 +30,7 @@ export * from './History';
|
|
|
30
30
|
export * from './History/types';
|
|
31
31
|
export * from './History/types/HistoryData';
|
|
32
32
|
export * from './History/types/HistoryList';
|
|
33
|
+
export * from './MarkdownRenderer';
|
|
33
34
|
export * from './MarkdownEditor';
|
|
34
35
|
export * from './MarkdownEditor/el';
|
|
35
36
|
export { useSelStatus } from './MarkdownEditor/hooks/editor';
|
package/dist/index.js
CHANGED
|
@@ -36,6 +36,8 @@ export * from "./History";
|
|
|
36
36
|
export * from "./History/types";
|
|
37
37
|
export * from "./History/types/HistoryData";
|
|
38
38
|
export * from "./History/types/HistoryList";
|
|
39
|
+
// ─── Markdown 渲染器(流式/只读轻量渲染,无 Slate 依赖) ─────────────────────
|
|
40
|
+
export * from "./MarkdownRenderer";
|
|
39
41
|
// ─── Markdown 编辑器 ─────────────────────────────────────────────────────────
|
|
40
42
|
export * from "./MarkdownEditor";
|
|
41
43
|
export * from "./MarkdownEditor/el";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ant-design/agentic-ui",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.30.0",
|
|
4
4
|
"description": "面向智能体的 UI 组件库,提供多步推理可视化、工具调用展示、任务执行协同等 Agentic UI 能力",
|
|
5
5
|
"repository": "git@github.com:ant-design/agentic-ui.git",
|
|
6
6
|
"license": "MIT",
|
|
@@ -24,7 +24,6 @@
|
|
|
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": "npm run build && npm run test",
|
|
28
27
|
"prettier": "prettier --write \"{src,docs,test}/**/*.{js,jsx,ts,tsx,css,less,json,md}\"",
|
|
29
28
|
"preview": "pnpm dumi preview",
|
|
30
29
|
"report:demo": "node scripts/generateDemoReport.js",
|
|
@@ -82,6 +81,7 @@
|
|
|
82
81
|
"dompurify": "^3.3.1",
|
|
83
82
|
"flubber": "^0.4.2",
|
|
84
83
|
"framer-motion": "^11.18.2",
|
|
84
|
+
"hast-util-to-jsx-runtime": "^2.3.6",
|
|
85
85
|
"is-hotkey": "^0.2.0",
|
|
86
86
|
"json5": "^2.2.3",
|
|
87
87
|
"katex": "^0.16.28",
|