@ant-design/agentic-ui 2.29.11 → 2.29.12
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.
|
@@ -190,10 +190,10 @@ var parseCache = new Map();
|
|
|
190
190
|
var configStr = config ? JSON.stringify(config) : '';
|
|
191
191
|
var pluginsCount = (plugins === null || plugins === void 0 ? void 0 : plugins.length) || 0;
|
|
192
192
|
var configHash = simpleHash("".concat(configStr, "_").concat(pluginsCount));
|
|
193
|
-
return mergedBlocks.map(function(content) {
|
|
193
|
+
return mergedBlocks.map(function(content, index) {
|
|
194
194
|
return {
|
|
195
195
|
content: content,
|
|
196
|
-
hash: "".concat(simpleHash(content), "_").concat(configHash)
|
|
196
|
+
hash: "".concat(simpleHash(content), "_").concat(configHash, "_").concat(index)
|
|
197
197
|
};
|
|
198
198
|
});
|
|
199
199
|
};
|
|
@@ -593,9 +593,9 @@ var removeAnswerTags = function(text) {
|
|
|
593
593
|
var blockHash = ((_blocks_ = blocks[0]) === null || _blocks_ === void 0 ? void 0 : _blocks_.hash) || simpleHash(md || '');
|
|
594
594
|
// 为 schema 元素添加 hash
|
|
595
595
|
return {
|
|
596
|
-
schema: result.schema.map(function(s) {
|
|
596
|
+
schema: result.schema.map(function(s, index) {
|
|
597
597
|
return _object_spread_props(_object_spread({}, s), {
|
|
598
|
-
hash: blockHash
|
|
598
|
+
hash: blockHash + '-' + index
|
|
599
599
|
});
|
|
600
600
|
}),
|
|
601
601
|
links: result.links
|
|
@@ -1522,7 +1522,7 @@ export var EditorStoreContext = createContext(null);
|
|
|
1522
1522
|
*/ function executeOperations(operations) {
|
|
1523
1523
|
var editor = this._editor.current;
|
|
1524
1524
|
if (!editor) return;
|
|
1525
|
-
//
|
|
1525
|
+
// 使用批处理模式执行所有操作,避免中间状态导致路径变化
|
|
1526
1526
|
Editor.withoutNormalizing(editor, function() {
|
|
1527
1527
|
var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
|
|
1528
1528
|
try {
|
|
@@ -1532,9 +1532,12 @@ export var EditorStoreContext = createContext(null);
|
|
|
1532
1532
|
switch(op.type){
|
|
1533
1533
|
case 'insert':
|
|
1534
1534
|
if (op.node && editor.hasPath(Path.parent(op.path))) {
|
|
1535
|
-
|
|
1536
|
-
|
|
1537
|
-
|
|
1535
|
+
// 检查路径是否仍然有效,避免重复插入
|
|
1536
|
+
if (!editor.hasPath(op.path)) {
|
|
1537
|
+
Transforms.insertNodes(editor, op.node, {
|
|
1538
|
+
at: op.path
|
|
1539
|
+
});
|
|
1540
|
+
}
|
|
1538
1541
|
}
|
|
1539
1542
|
break;
|
|
1540
1543
|
case 'remove':
|
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.12",
|
|
4
4
|
"description": "面向智能体的 UI 组件库,提供多步推理可视化、工具调用展示、任务执行协同等 Agentic UI 能力",
|
|
5
5
|
"repository": "git@github.com:ant-design/agentic-ui.git",
|
|
6
6
|
"license": "MIT",
|
|
@@ -22,6 +22,7 @@
|
|
|
22
22
|
"lint:css": "stylelint \"{src,test}/**/*.{css,less}\"",
|
|
23
23
|
"lint:es": "eslint \"{src,test}/**/*.{js,jsx,ts,tsx}\"",
|
|
24
24
|
"prepare": "husky install && dumi setup",
|
|
25
|
+
"prepublishOnly": "father doctor && pnpm run test && pnpm run build",
|
|
25
26
|
"prettier": "prettier --write \"{src,docs,test}/**/*.{js,jsx,ts,tsx,css,less,json,md}\"",
|
|
26
27
|
"preview": "pnpm dumi preview",
|
|
27
28
|
"report:demo": "node scripts/generateDemoReport.js",
|