@ant-design/agentic-ui 2.29.48 → 2.29.52
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/PureBubbleList.d.ts +1 -1
- package/dist/Bubble/List/PureBubbleList.js +9 -6
- package/dist/Bubble/MessagesContent/index.js +2 -2
- package/dist/ChatLayout/style.js +2 -1
- package/dist/Components/ActionItemBox/style.js +1 -1
- package/dist/Constants/mobile.d.ts +12 -2
- package/dist/Constants/mobile.js +8 -1
- package/dist/History/hooks/useHistory.js +33 -31
- package/dist/History/menu.js +4 -0
- package/dist/MarkdownEditor/BaseMarkdownEditor.js +1 -1
- package/dist/MarkdownEditor/editor/Editor.js +22 -0
- package/dist/MarkdownEditor/editor/elements/Table/ReadonlyTableComponent.js +36 -34
- package/dist/MarkdownEditor/editor/elements/Table/Table.js +19 -44
- package/dist/MarkdownEditor/editor/elements/Table/TableColgroup.d.ts +8 -0
- package/dist/MarkdownEditor/editor/elements/Table/TableColgroup.js +37 -0
- package/dist/MarkdownEditor/editor/elements/Table/utils/getTableColWidths.d.ts +12 -0
- package/dist/MarkdownEditor/editor/elements/Table/utils/getTableColWidths.js +186 -0
- package/dist/MarkdownEditor/editor/elements/Table/utils/useReadonlyTableColWidths.d.ts +13 -0
- package/dist/MarkdownEditor/editor/elements/Table/utils/useReadonlyTableColWidths.js +96 -0
- package/dist/MarkdownEditor/editor/parser/parse/parseTable.js +21 -0
- package/dist/MarkdownEditor/editor/plugins/withLinkAndMediaPlugin.js +28 -0
- package/dist/MarkdownEditor/editor/style.js +12 -12
- package/dist/MarkdownEditor/style.js +37 -37
- package/dist/MarkdownEditor/types.d.ts +29 -0
- package/dist/MarkdownInputField/AttachmentButton/AttachmentFileList/AttachmentFileListItem.d.ts +4 -4
- package/dist/MarkdownInputField/AttachmentButton/AttachmentFileList/AttachmentFileListItem.js +3 -3
- package/dist/MarkdownInputField/AttachmentButton/AttachmentFileList/index.js +4 -24
- package/dist/MarkdownInputField/FileMapView/index.js +1 -1
- package/dist/MarkdownInputField/MarkdownInputField.js +20 -9
- package/dist/MarkdownInputField/hooks/useMarkdownInputFieldHandlers.js +4 -3
- package/dist/MarkdownInputField/types/MarkdownInputFieldProps.d.ts +14 -1
- package/dist/Plugins/chart/ChartRender.js +78 -14
- package/dist/ThoughtChainList/index.js +17 -17
- package/dist/ToolUseBar/style.js +3 -0
- package/dist/Workspace/index.js +5 -1
- package/dist/index.d.ts +0 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
package/dist/MarkdownInputField/AttachmentButton/AttachmentFileList/AttachmentFileListItem.js
CHANGED
|
@@ -95,15 +95,15 @@ export var AttachmentFileListItem = function AttachmentFileListItem(param) {
|
|
|
95
95
|
var canDelete = file.status !== 'uploading';
|
|
96
96
|
var handleFileClick = function handleFileClick() {
|
|
97
97
|
if (!isDoneStatus) return;
|
|
98
|
-
onPreview === null || onPreview === void 0 ? void 0 : onPreview();
|
|
98
|
+
onPreview === null || onPreview === void 0 ? void 0 : onPreview(file);
|
|
99
99
|
};
|
|
100
100
|
var handleRetryClick = function handleRetryClick() {
|
|
101
101
|
if (!isErrorStatus) return;
|
|
102
|
-
onRetry === null || onRetry === void 0 ? void 0 : onRetry();
|
|
102
|
+
onRetry === null || onRetry === void 0 ? void 0 : onRetry(file);
|
|
103
103
|
};
|
|
104
104
|
var handleDeleteClick = function handleDeleteClick(e) {
|
|
105
105
|
e.stopPropagation();
|
|
106
|
-
onDelete
|
|
106
|
+
onDelete(file);
|
|
107
107
|
};
|
|
108
108
|
return /*#__PURE__*/ React.createElement(Tooltip, {
|
|
109
109
|
title: (locale === null || locale === void 0 ? void 0 : locale.clickToRetry) || '点击重试',
|
|
@@ -138,26 +138,6 @@ export var AttachmentFileList = function AttachmentFileList(param) {
|
|
|
138
138
|
var handlePreviewClose = function handlePreviewClose(visible) {
|
|
139
139
|
if (!visible) setImgSrc(undefined);
|
|
140
140
|
};
|
|
141
|
-
var handleDelete = function handleDelete(file) {
|
|
142
|
-
return function() {
|
|
143
|
-
return onDelete(file);
|
|
144
|
-
};
|
|
145
|
-
};
|
|
146
|
-
var handlePreviewFile = function handlePreviewFile(file) {
|
|
147
|
-
return function() {
|
|
148
|
-
return handlePreview(file);
|
|
149
|
-
};
|
|
150
|
-
};
|
|
151
|
-
var handleDownload = function handleDownload(file) {
|
|
152
|
-
return function() {
|
|
153
|
-
return onDownload === null || onDownload === void 0 ? void 0 : onDownload(file);
|
|
154
|
-
};
|
|
155
|
-
};
|
|
156
|
-
var handleRetry = function handleRetry(file) {
|
|
157
|
-
return function() {
|
|
158
|
-
return onRetry === null || onRetry === void 0 ? void 0 : onRetry(file);
|
|
159
|
-
};
|
|
160
|
-
};
|
|
161
141
|
return wrapSSR(/*#__PURE__*/ React.createElement("div", {
|
|
162
142
|
className: classNames("".concat(prefix, "-container"), hashId, _define_property({}, "".concat(prefix, "-container-empty"), !hasFiles))
|
|
163
143
|
}, /*#__PURE__*/ React.createElement(motion.div, {
|
|
@@ -176,10 +156,10 @@ export var AttachmentFileList = function AttachmentFileList(param) {
|
|
|
176
156
|
className: classNames(hashId, "".concat(prefix, "-item")),
|
|
177
157
|
key: getFileKey(file, index),
|
|
178
158
|
file: file,
|
|
179
|
-
onDelete:
|
|
180
|
-
onPreview:
|
|
181
|
-
onDownload:
|
|
182
|
-
onRetry:
|
|
159
|
+
onDelete: onDelete,
|
|
160
|
+
onPreview: onPreview !== null && onPreview !== void 0 ? onPreview : handlePreview,
|
|
161
|
+
onDownload: onDownload,
|
|
162
|
+
onRetry: onRetry
|
|
183
163
|
});
|
|
184
164
|
})), /*#__PURE__*/ React.createElement(Image, {
|
|
185
165
|
key: "preview",
|
|
@@ -192,7 +192,10 @@ import { useVoiceInputManager } from "./VoiceInputManager";
|
|
|
192
192
|
* - 支持快捷键发送消息
|
|
193
193
|
* - 支持自动完成功能
|
|
194
194
|
* - 支持自定义渲染配置
|
|
195
|
-
*/ var
|
|
195
|
+
*/ var DEFAULT_ATTACHMENT = {
|
|
196
|
+
enable: false
|
|
197
|
+
};
|
|
198
|
+
var MarkdownInputFieldComponent = function MarkdownInputFieldComponent(_0) {
|
|
196
199
|
var tagInputProps = _0.tagInputProps, markdownProps = _0.markdownProps, _0_borderRadius = _0.borderRadius, borderRadius = _0_borderRadius === void 0 ? 16 : _0_borderRadius, onBlur = _0.onBlur, onFocus = _0.onFocus, _0_isShowTopOperatingArea = _0.isShowTopOperatingArea, isShowTopOperatingArea = _0_isShowTopOperatingArea === void 0 ? false : _0_isShowTopOperatingArea, props = _object_without_properties(_0, [
|
|
197
200
|
"tagInputProps",
|
|
198
201
|
"markdownProps",
|
|
@@ -203,6 +206,8 @@ import { useVoiceInputManager } from "./VoiceInputManager";
|
|
|
203
206
|
]);
|
|
204
207
|
var _ref;
|
|
205
208
|
var _props_skillMode, _props_enlargeable, _props_refinePrompt, _props_enlargeable1, _props_enlargeable2;
|
|
209
|
+
// 默认关闭文件上传,需显式传入 attachment.enable: true 开启
|
|
210
|
+
var attachment = _object_spread({}, DEFAULT_ATTACHMENT, props.attachment);
|
|
206
211
|
var getPrefixCls = useContext(ConfigProvider.ConfigContext).getPrefixCls;
|
|
207
212
|
var baseCls = getPrefixCls('agentic-md-input-field');
|
|
208
213
|
var _useStyle = useStyle(baseCls, props.disableHoverAnimation), wrapSSR = _useStyle.wrapSSR, hashId = _useStyle.hashId;
|
|
@@ -210,7 +215,7 @@ import { useVoiceInputManager } from "./VoiceInputManager";
|
|
|
210
215
|
var _useMarkdownInputFieldState = useMarkdownInputFieldState({
|
|
211
216
|
value: props.value,
|
|
212
217
|
onChange: props.onChange,
|
|
213
|
-
attachment:
|
|
218
|
+
attachment: attachment
|
|
214
219
|
}), isHover = _useMarkdownInputFieldState.isHover, setHover = _useMarkdownInputFieldState.setHover, isLoading = _useMarkdownInputFieldState.isLoading, setIsLoading = _useMarkdownInputFieldState.setIsLoading, isEnlarged = _useMarkdownInputFieldState.isEnlarged, setIsEnlarged = _useMarkdownInputFieldState.setIsEnlarged, value = _useMarkdownInputFieldState.value, setValue = _useMarkdownInputFieldState.setValue, fileMap = _useMarkdownInputFieldState.fileMap, setFileMap = _useMarkdownInputFieldState.setFileMap;
|
|
215
220
|
// 边框光束动画状态
|
|
216
221
|
var _useState = _sliced_to_array(useState(false), 2), isFocused = _useState[0], setIsFocused = _useState[1];
|
|
@@ -230,7 +235,7 @@ import { useVoiceInputManager } from "./VoiceInputManager";
|
|
|
230
235
|
toolsRender: props.toolsRender,
|
|
231
236
|
maxHeight: props.maxHeight,
|
|
232
237
|
style: props.style,
|
|
233
|
-
attachment:
|
|
238
|
+
attachment: attachment,
|
|
234
239
|
isEnlarged: isEnlarged,
|
|
235
240
|
rightPadding: rightPadding,
|
|
236
241
|
topRightPadding: topRightPadding,
|
|
@@ -247,7 +252,7 @@ import { useVoiceInputManager } from "./VoiceInputManager";
|
|
|
247
252
|
}, value), markdownEditorRef = _useMarkdownInputFieldRefs.markdownEditorRef, quickActionsRef = _useMarkdownInputFieldRefs.quickActionsRef, actionsRef = _useMarkdownInputFieldRefs.actionsRef, isSendingRef = _useMarkdownInputFieldRefs.isSendingRef;
|
|
248
253
|
// 文件上传管理
|
|
249
254
|
var _useFileUploadManager = useFileUploadManager({
|
|
250
|
-
attachment:
|
|
255
|
+
attachment: attachment,
|
|
251
256
|
fileMap: fileMap,
|
|
252
257
|
onFileMapChange: setFileMap
|
|
253
258
|
}), fileUploadDone = _useFileUploadManager.fileUploadDone, supportedFormat = _useFileUploadManager.supportedFormat, uploadImage = _useFileUploadManager.uploadImage, updateAttachmentFiles = _useFileUploadManager.updateAttachmentFiles, handleFileRemoval = _useFileUploadManager.handleFileRemoval, handleFileRetry = _useFileUploadManager.handleFileRetry;
|
|
@@ -266,7 +271,7 @@ import { useVoiceInputManager } from "./VoiceInputManager";
|
|
|
266
271
|
onSend: props.onSend,
|
|
267
272
|
allowEmptySubmit: props.allowEmptySubmit,
|
|
268
273
|
markdownProps: markdownProps,
|
|
269
|
-
attachment:
|
|
274
|
+
attachment: attachment,
|
|
270
275
|
triggerSendKey: props.triggerSendKey
|
|
271
276
|
},
|
|
272
277
|
markdownEditorRef: markdownEditorRef,
|
|
@@ -285,7 +290,7 @@ import { useVoiceInputManager } from "./VoiceInputManager";
|
|
|
285
290
|
}), handleEnlargeClick = _useMarkdownInputFieldHandlers.handleEnlargeClick, sendMessage = _useMarkdownInputFieldHandlers.sendMessage, handlePaste = _useMarkdownInputFieldHandlers.handlePaste, handleKeyDown = _useMarkdownInputFieldHandlers.handleKeyDown, activeInput = _useMarkdownInputFieldHandlers.activeInput;
|
|
286
291
|
// 渲染辅助
|
|
287
292
|
var attachmentList = useAttachmentList({
|
|
288
|
-
attachment:
|
|
293
|
+
attachment: attachment,
|
|
289
294
|
fileMap: fileMap,
|
|
290
295
|
handleFileRemoval: handleFileRemoval,
|
|
291
296
|
handleFileRetry: handleFileRetry,
|
|
@@ -299,7 +304,7 @@ import { useVoiceInputManager } from "./VoiceInputManager";
|
|
|
299
304
|
});
|
|
300
305
|
var sendActionsNode = useSendActionsNode({
|
|
301
306
|
props: {
|
|
302
|
-
attachment:
|
|
307
|
+
attachment: attachment,
|
|
303
308
|
voiceRecognizer: props.voiceRecognizer,
|
|
304
309
|
value: value,
|
|
305
310
|
disabled: props.disabled,
|
|
@@ -447,7 +452,12 @@ import { useVoiceInputManager } from "./VoiceInputManager";
|
|
|
447
452
|
},
|
|
448
453
|
titlePlaceholderContent: props.placeholder,
|
|
449
454
|
toc: false,
|
|
450
|
-
pasteConfig:
|
|
455
|
+
pasteConfig: _object_spread({
|
|
456
|
+
allowedTypes: [
|
|
457
|
+
'text/plain'
|
|
458
|
+
],
|
|
459
|
+
plainTextOnly: true
|
|
460
|
+
}, props.pasteConfig)
|
|
451
461
|
}, markdownProps), (props === null || props === void 0 ? void 0 : props.quickActionRender) || ((_props_refinePrompt = props.refinePrompt) === null || _props_refinePrompt === void 0 ? void 0 : _props_refinePrompt.enable) || ((_props_enlargeable1 = props.enlargeable) === null || _props_enlargeable1 === void 0 ? void 0 : _props_enlargeable1.enable) ? /*#__PURE__*/ React.createElement(QuickActions, {
|
|
452
462
|
ref: quickActionsRef,
|
|
453
463
|
value: value,
|
|
@@ -483,7 +493,8 @@ import { useVoiceInputManager } from "./VoiceInputManager";
|
|
|
483
493
|
}, props.toolsRender(_object_spread_props(_object_spread({
|
|
484
494
|
value: value,
|
|
485
495
|
fileMap: fileMap,
|
|
486
|
-
onFileMapChange: setFileMap
|
|
496
|
+
onFileMapChange: setFileMap,
|
|
497
|
+
attachment: attachment
|
|
487
498
|
}, props), {
|
|
488
499
|
isHover: isHover,
|
|
489
500
|
isLoading: isLoading,
|
|
@@ -284,16 +284,17 @@ import { getFileListFromDataTransferItems } from "../FilePaste";
|
|
|
284
284
|
});
|
|
285
285
|
})();
|
|
286
286
|
});
|
|
287
|
-
//
|
|
287
|
+
// 图片粘贴上传(仅在 attachment.enable 时生效,默认关闭)
|
|
288
288
|
var handlePaste = useRefFunction(function(e) {
|
|
289
289
|
return _async_to_generator(function() {
|
|
290
290
|
var _props_markdownProps, attachmentConfig, imageFiles;
|
|
291
291
|
return _ts_generator(this, function(_state) {
|
|
292
292
|
switch(_state.label){
|
|
293
293
|
case 0:
|
|
294
|
-
// 优先使用 props.attachment,如果没有则使用 markdownProps?.attachment
|
|
295
294
|
attachmentConfig = props.attachment || ((_props_markdownProps = props.markdownProps) === null || _props_markdownProps === void 0 ? void 0 : _props_markdownProps.attachment);
|
|
296
|
-
|
|
295
|
+
if (!(attachmentConfig === null || attachmentConfig === void 0 ? void 0 : attachmentConfig.enable)) return [
|
|
296
|
+
2
|
|
297
|
+
];
|
|
297
298
|
if (!(attachmentConfig === null || attachmentConfig === void 0 ? void 0 : attachmentConfig.upload) && !(attachmentConfig === null || attachmentConfig === void 0 ? void 0 : attachmentConfig.uploadWithResponse)) {
|
|
298
299
|
return [
|
|
299
300
|
2
|
|
@@ -105,6 +105,7 @@ export type MarkdownInputFieldProps = {
|
|
|
105
105
|
/**
|
|
106
106
|
* 附件配置
|
|
107
107
|
* @description 配置附件功能,可以启用或禁用附件上传,并自定义附件按钮的属性
|
|
108
|
+
* @default { enable: false } 默认关闭文件上传
|
|
108
109
|
* @example
|
|
109
110
|
* ```tsx
|
|
110
111
|
* <BubbleChat
|
|
@@ -120,7 +121,14 @@ export type MarkdownInputFieldProps = {
|
|
|
120
121
|
* />
|
|
121
122
|
* ```
|
|
122
123
|
*/
|
|
124
|
+
/**
|
|
125
|
+
* 附件配置,默认 enable 为 false,需显式开启文件上传
|
|
126
|
+
*/
|
|
123
127
|
attachment?: {
|
|
128
|
+
/**
|
|
129
|
+
* 是否启用文件上传(包含粘贴图片上传)
|
|
130
|
+
* @default false
|
|
131
|
+
*/
|
|
124
132
|
enable?: boolean;
|
|
125
133
|
} & AttachmentButtonProps;
|
|
126
134
|
/**
|
|
@@ -284,9 +292,14 @@ export type MarkdownInputFieldProps = {
|
|
|
284
292
|
enabled?: boolean;
|
|
285
293
|
/**
|
|
286
294
|
* 允许的粘贴内容类型
|
|
287
|
-
*
|
|
295
|
+
* MarkdownInputField 默认为 ['text/plain'],仅粘贴纯文本
|
|
288
296
|
*/
|
|
289
297
|
allowedTypes?: Array<'application/x-slate-md-fragment' | 'text/html' | 'Files' | 'text/markdown' | 'text/plain'>;
|
|
298
|
+
/**
|
|
299
|
+
* 是否仅插入纯文本,不处理 HTML、链接、Markdown 解析等
|
|
300
|
+
* MarkdownInputField 默认为 true
|
|
301
|
+
*/
|
|
302
|
+
plainTextOnly?: boolean;
|
|
290
303
|
};
|
|
291
304
|
/**
|
|
292
305
|
* 技能模式配置
|
|
@@ -265,13 +265,15 @@ import { debounce, getDataHash, isConfigEqual, isNotEmpty, toNumber } from "./ut
|
|
|
265
265
|
pie: {
|
|
266
266
|
title: (i18n === null || i18n === void 0 ? void 0 : (_i18n_locale = i18n.locale) === null || _i18n_locale === void 0 ? void 0 : _i18n_locale.pieChart) || '饼图',
|
|
267
267
|
changeData: [
|
|
268
|
-
'donut'
|
|
268
|
+
'donut',
|
|
269
|
+
'table'
|
|
269
270
|
]
|
|
270
271
|
},
|
|
271
272
|
donut: {
|
|
272
273
|
title: (i18n === null || i18n === void 0 ? void 0 : (_i18n_locale1 = i18n.locale) === null || _i18n_locale1 === void 0 ? void 0 : _i18n_locale1.donutChart) || '环形图',
|
|
273
274
|
changeData: [
|
|
274
|
-
'pie'
|
|
275
|
+
'pie',
|
|
276
|
+
'table'
|
|
275
277
|
]
|
|
276
278
|
},
|
|
277
279
|
bar: {
|
|
@@ -279,7 +281,8 @@ import { debounce, getDataHash, isConfigEqual, isNotEmpty, toNumber } from "./ut
|
|
|
279
281
|
changeData: [
|
|
280
282
|
'column',
|
|
281
283
|
'line',
|
|
282
|
-
'area'
|
|
284
|
+
'area',
|
|
285
|
+
'table'
|
|
283
286
|
]
|
|
284
287
|
},
|
|
285
288
|
line: {
|
|
@@ -287,7 +290,8 @@ import { debounce, getDataHash, isConfigEqual, isNotEmpty, toNumber } from "./ut
|
|
|
287
290
|
changeData: [
|
|
288
291
|
'column',
|
|
289
292
|
'bar',
|
|
290
|
-
'area'
|
|
293
|
+
'area',
|
|
294
|
+
'table'
|
|
291
295
|
]
|
|
292
296
|
},
|
|
293
297
|
column: {
|
|
@@ -295,7 +299,8 @@ import { debounce, getDataHash, isConfigEqual, isNotEmpty, toNumber } from "./ut
|
|
|
295
299
|
changeData: [
|
|
296
300
|
'bar',
|
|
297
301
|
'line',
|
|
298
|
-
'area'
|
|
302
|
+
'area',
|
|
303
|
+
'table'
|
|
299
304
|
]
|
|
300
305
|
},
|
|
301
306
|
area: {
|
|
@@ -303,20 +308,27 @@ import { debounce, getDataHash, isConfigEqual, isNotEmpty, toNumber } from "./ut
|
|
|
303
308
|
changeData: [
|
|
304
309
|
'column',
|
|
305
310
|
'bar',
|
|
306
|
-
'line'
|
|
311
|
+
'line',
|
|
312
|
+
'table'
|
|
307
313
|
]
|
|
308
314
|
},
|
|
309
315
|
radar: {
|
|
310
316
|
title: (i18n === null || i18n === void 0 ? void 0 : (_i18n_locale6 = i18n.locale) === null || _i18n_locale6 === void 0 ? void 0 : _i18n_locale6.radarChart) || '雷达图',
|
|
311
|
-
changeData: [
|
|
317
|
+
changeData: [
|
|
318
|
+
'table'
|
|
319
|
+
]
|
|
312
320
|
},
|
|
313
321
|
scatter: {
|
|
314
322
|
title: (i18n === null || i18n === void 0 ? void 0 : (_i18n_locale7 = i18n.locale) === null || _i18n_locale7 === void 0 ? void 0 : _i18n_locale7.scatterChart) || '散点图',
|
|
315
|
-
changeData: [
|
|
323
|
+
changeData: [
|
|
324
|
+
'table'
|
|
325
|
+
]
|
|
316
326
|
},
|
|
317
327
|
funnel: {
|
|
318
328
|
title: (i18n === null || i18n === void 0 ? void 0 : (_i18n_locale8 = i18n.locale) === null || _i18n_locale8 === void 0 ? void 0 : _i18n_locale8.funnelChart) || '漏斗图',
|
|
319
|
-
changeData: [
|
|
329
|
+
changeData: [
|
|
330
|
+
'table'
|
|
331
|
+
]
|
|
320
332
|
},
|
|
321
333
|
table: {
|
|
322
334
|
title: (i18n === null || i18n === void 0 ? void 0 : (_i18n_locale9 = i18n.locale) === null || _i18n_locale9 === void 0 ? void 0 : _i18n_locale9.table) || '表格',
|
|
@@ -325,7 +337,11 @@ import { debounce, getDataHash, isConfigEqual, isNotEmpty, toNumber } from "./ut
|
|
|
325
337
|
'line',
|
|
326
338
|
'area',
|
|
327
339
|
'pie',
|
|
328
|
-
'donut'
|
|
340
|
+
'donut',
|
|
341
|
+
'bar',
|
|
342
|
+
'radar',
|
|
343
|
+
'scatter',
|
|
344
|
+
'funnel'
|
|
329
345
|
]
|
|
330
346
|
},
|
|
331
347
|
descriptions: {
|
|
@@ -335,7 +351,8 @@ import { debounce, getDataHash, isConfigEqual, isNotEmpty, toNumber } from "./ut
|
|
|
335
351
|
'line',
|
|
336
352
|
'area',
|
|
337
353
|
'pie',
|
|
338
|
-
'donut'
|
|
354
|
+
'donut',
|
|
355
|
+
'table'
|
|
339
356
|
]
|
|
340
357
|
}
|
|
341
358
|
};
|
|
@@ -1054,7 +1071,34 @@ import { debounce, getDataHash, isConfigEqual, isNotEmpty, toNumber } from "./ut
|
|
|
1054
1071
|
flex: 1,
|
|
1055
1072
|
maxWidth: 'calc(100% - 32px)',
|
|
1056
1073
|
maxHeight: 400,
|
|
1057
|
-
userSelect: 'none'
|
|
1074
|
+
userSelect: 'none',
|
|
1075
|
+
display: 'flex',
|
|
1076
|
+
flexDirection: 'column'
|
|
1077
|
+
}
|
|
1078
|
+
}, /*#__PURE__*/ React.createElement("div", {
|
|
1079
|
+
style: {
|
|
1080
|
+
display: 'flex',
|
|
1081
|
+
alignItems: 'center',
|
|
1082
|
+
gap: 8,
|
|
1083
|
+
padding: '8px 12px',
|
|
1084
|
+
borderBottom: '1px solid #eee',
|
|
1085
|
+
flexShrink: 0
|
|
1086
|
+
}
|
|
1087
|
+
}, title && /*#__PURE__*/ React.createElement("span", {
|
|
1088
|
+
style: {
|
|
1089
|
+
fontSize: 14,
|
|
1090
|
+
fontWeight: 500
|
|
1091
|
+
}
|
|
1092
|
+
}, title), /*#__PURE__*/ React.createElement("div", {
|
|
1093
|
+
style: {
|
|
1094
|
+
marginLeft: 'auto',
|
|
1095
|
+
display: 'flex',
|
|
1096
|
+
gap: 8
|
|
1097
|
+
}
|
|
1098
|
+
}, toolBar)), /*#__PURE__*/ React.createElement("div", {
|
|
1099
|
+
style: {
|
|
1100
|
+
flex: 1,
|
|
1101
|
+
overflow: 'auto'
|
|
1058
1102
|
}
|
|
1059
1103
|
}, /*#__PURE__*/ React.createElement(Table, {
|
|
1060
1104
|
size: "small",
|
|
@@ -1064,7 +1108,7 @@ import { debounce, getDataHash, isConfigEqual, isNotEmpty, toNumber } from "./ut
|
|
|
1064
1108
|
rowKey: function rowKey(record) {
|
|
1065
1109
|
return record.key;
|
|
1066
1110
|
}
|
|
1067
|
-
}));
|
|
1111
|
+
})));
|
|
1068
1112
|
}
|
|
1069
1113
|
if (chartType === 'descriptions' || renderDescriptionsFallback) {
|
|
1070
1114
|
return /*#__PURE__*/ React.createElement("div", {
|
|
@@ -1073,9 +1117,29 @@ import { debounce, getDataHash, isConfigEqual, isNotEmpty, toNumber } from "./ut
|
|
|
1073
1117
|
style: {
|
|
1074
1118
|
display: 'flex',
|
|
1075
1119
|
flexDirection: 'column',
|
|
1120
|
+
gap: 8,
|
|
1121
|
+
margin: 12
|
|
1122
|
+
}
|
|
1123
|
+
}, /*#__PURE__*/ React.createElement("div", {
|
|
1124
|
+
style: {
|
|
1125
|
+
display: 'flex',
|
|
1126
|
+
alignItems: 'center',
|
|
1127
|
+
gap: 8,
|
|
1128
|
+
padding: '8px 0',
|
|
1129
|
+
flexShrink: 0
|
|
1130
|
+
}
|
|
1131
|
+
}, title && /*#__PURE__*/ React.createElement("span", {
|
|
1132
|
+
style: {
|
|
1133
|
+
fontSize: 14,
|
|
1134
|
+
fontWeight: 500
|
|
1135
|
+
}
|
|
1136
|
+
}, title), /*#__PURE__*/ React.createElement("div", {
|
|
1137
|
+
style: {
|
|
1138
|
+
marginLeft: 'auto',
|
|
1139
|
+
display: 'flex',
|
|
1076
1140
|
gap: 8
|
|
1077
1141
|
}
|
|
1078
|
-
}, chartData.map(function(row, rowIndex) {
|
|
1142
|
+
}, toolBar)), chartData.map(function(row, rowIndex) {
|
|
1079
1143
|
var _config_columns;
|
|
1080
1144
|
return /*#__PURE__*/ React.createElement(Descriptions, {
|
|
1081
1145
|
bordered: true,
|
|
@@ -290,6 +290,17 @@ var ThoughtChainContent = /*#__PURE__*/ React.memo(function(_0) {
|
|
|
290
290
|
bubble === null || bubble === void 0 ? void 0 : bubble.isFinished,
|
|
291
291
|
collapse
|
|
292
292
|
]);
|
|
293
|
+
var mergedMarkdownProps = useMemo(function() {
|
|
294
|
+
return merge(markdownRenderProps || {}, {
|
|
295
|
+
codeProps: {
|
|
296
|
+
showLineNumbers: false,
|
|
297
|
+
showGutter: false,
|
|
298
|
+
fontSize: 12
|
|
299
|
+
}
|
|
300
|
+
});
|
|
301
|
+
}, [
|
|
302
|
+
markdownRenderProps
|
|
303
|
+
]);
|
|
293
304
|
var _obj;
|
|
294
305
|
return /*#__PURE__*/ React.createElement(motion.div, {
|
|
295
306
|
className: classNames("".concat(prefixCls, "-content"), (_obj = {}, _define_property(_obj, "".concat(prefixCls, "-content-collapse"), collapse), _define_property(_obj, "".concat(prefixCls, "-content-compact"), compact), _obj), hashId),
|
|
@@ -328,13 +339,7 @@ var ThoughtChainContent = /*#__PURE__*/ React.memo(function(_0) {
|
|
|
328
339
|
key: "".concat(instanceId, "-").concat(item.runId || 'no-runid', "-").concat(index)
|
|
329
340
|
}, /*#__PURE__*/ React.createElement(ThoughtChainListItem, {
|
|
330
341
|
index: index,
|
|
331
|
-
markdownRenderProps:
|
|
332
|
-
codeProps: {
|
|
333
|
-
showLineNumbers: false,
|
|
334
|
-
showGutter: false,
|
|
335
|
-
fontSize: 12
|
|
336
|
-
}
|
|
337
|
-
}),
|
|
342
|
+
markdownRenderProps: mergedMarkdownProps,
|
|
338
343
|
bubble: bubble,
|
|
339
344
|
thoughtChainListItem: item,
|
|
340
345
|
hashId: hashId,
|
|
@@ -415,10 +420,10 @@ var ThoughtChainContent = /*#__PURE__*/ React.memo(function(_0) {
|
|
|
415
420
|
]);
|
|
416
421
|
// memo 化的回调函数
|
|
417
422
|
var handleCollapseToggle = React.useCallback(function() {
|
|
418
|
-
setCollapse(
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
]);
|
|
423
|
+
setCollapse(function(prev) {
|
|
424
|
+
return !prev;
|
|
425
|
+
});
|
|
426
|
+
}, []);
|
|
422
427
|
var handleDocMetaClose = React.useCallback(function() {
|
|
423
428
|
setDocMeta(null);
|
|
424
429
|
onDocMetaClick === null || onDocMetaClick === void 0 ? void 0 : onDocMetaClick(null);
|
|
@@ -442,12 +447,7 @@ var ThoughtChainContent = /*#__PURE__*/ React.memo(function(_0) {
|
|
|
442
447
|
}
|
|
443
448
|
if (!loading && (bubble === null || bubble === void 0 ? void 0 : bubble.isFinished)) {
|
|
444
449
|
if (time > 0) {
|
|
445
|
-
|
|
446
|
-
return "".concat(locale === null || locale === void 0 ? void 0 : locale.taskComplete, ", ").concat(locale === null || locale === void 0 ? void 0 : locale.totalTimeUsed, " ").concat(time.toFixed(2), "s");
|
|
447
|
-
}
|
|
448
|
-
return /*#__PURE__*/ React.createElement(FlipText, {
|
|
449
|
-
word: "".concat(locale === null || locale === void 0 ? void 0 : locale.taskComplete, ", ").concat(locale === null || locale === void 0 ? void 0 : locale.totalTimeUsed, " ").concat(time.toFixed(2), "s")
|
|
450
|
-
});
|
|
450
|
+
return "".concat(locale === null || locale === void 0 ? void 0 : locale.taskComplete, ", ").concat(locale === null || locale === void 0 ? void 0 : locale.totalTimeUsed, " ").concat(time.toFixed(2), "s");
|
|
451
451
|
}
|
|
452
452
|
return /*#__PURE__*/ React.createElement(FlipText, {
|
|
453
453
|
word: locale === null || locale === void 0 ? void 0 : locale.taskComplete
|
package/dist/ToolUseBar/style.js
CHANGED
|
@@ -53,6 +53,7 @@ function _object_spread_props(target, source) {
|
|
|
53
53
|
import { useEditorStyleRegister } from "../Hooks/useStyle";
|
|
54
54
|
var genStyle = function genStyle(token) {
|
|
55
55
|
return _define_property({}, token.componentCls, {
|
|
56
|
+
maxWidth: '100%',
|
|
56
57
|
'&-no-animation': {
|
|
57
58
|
'& *': {
|
|
58
59
|
transition: 'none !important'
|
|
@@ -262,6 +263,8 @@ var genStyle = function genStyle(token) {
|
|
|
262
263
|
fontWeight: 'normal',
|
|
263
264
|
lineHeight: '20px',
|
|
264
265
|
flex: 1,
|
|
266
|
+
minWidth: 0,
|
|
267
|
+
maxWidth: 320,
|
|
265
268
|
display: '-webkit-box',
|
|
266
269
|
WebkitLineClamp: 1,
|
|
267
270
|
WebkitBoxOrient: 'vertical',
|
package/dist/Workspace/index.js
CHANGED
|
@@ -189,7 +189,11 @@ var COMPONENT_MAP = new Map([
|
|
|
189
189
|
var _useState = _sliced_to_array(useState(0), 2), segmentedKey = _useState[0], setSegmentedKey = _useState[1];
|
|
190
190
|
var _useState1 = _sliced_to_array(useState(0), 2), resetKey = _useState1[0], setResetKey = _useState1[1];
|
|
191
191
|
var displayTitle = title !== null && title !== void 0 ? title : (locale === null || locale === void 0 ? void 0 : locale['workspace.title']) || 'Workspace';
|
|
192
|
-
var defaultConfig =
|
|
192
|
+
var defaultConfig = useMemo(function() {
|
|
193
|
+
return DEFAULT_CONFIG(locale);
|
|
194
|
+
}, [
|
|
195
|
+
locale
|
|
196
|
+
]);
|
|
193
197
|
var _useState2 = _sliced_to_array(useState(''), 2), internalActiveTab = _useState2[0], setInternalActiveTab = _useState2[1];
|
|
194
198
|
var availableTabs = useMemo(function() {
|
|
195
199
|
var tabs = [];
|
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* 2. 需要向外暴露的内部工具 / 类型,先在各组件 index 中 re-export,再由此处统一引用
|
|
7
7
|
* 3. 第三方类型不直接 re-export,使用自定义类型包装
|
|
8
8
|
* 4. 按功能分区,便于维护
|
|
9
|
-
*/
|
|
9
|
+
*/ // ─── Slate 类型 re-export(唯一的第三方类型例外) ───────────────────────────
|
|
10
10
|
// ─── 通用类型 ────────────────────────────────────────────────────────────────
|
|
11
11
|
export * from "./Types";
|
|
12
12
|
// ─── 布局组件 ────────────────────────────────────────────────────────────────
|