@ant-design/agentic-ui 2.30.29 → 2.30.31

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.
Files changed (56) hide show
  1. package/dist/Bubble/AIBubble.js +6 -3
  2. package/dist/Bubble/List/PureBubbleList.js +22 -1
  3. package/dist/Bubble/List/index.js +7 -5
  4. package/dist/Bubble/MessagesContent/BubbleExtra.js +4 -2
  5. package/dist/Components/ActionIconBox/index.js +8 -8
  6. package/dist/Hooks/useLanguage.d.ts +1 -0
  7. package/dist/I18n/locales.d.ts +1 -0
  8. package/dist/I18n/locales.js +2 -0
  9. package/dist/MarkdownEditor/BaseMarkdownEditor.d.ts +1 -0
  10. package/dist/MarkdownEditor/BaseMarkdownEditor.js +8 -4
  11. package/dist/MarkdownEditor/editor/parser/parse/parseHtml.js +15 -6
  12. package/dist/MarkdownEditor/style.js +0 -5
  13. package/dist/MarkdownEditor/utils/sanitizeChromeStyle.d.ts +6 -0
  14. package/dist/MarkdownEditor/utils/sanitizeChromeStyle.js +87 -0
  15. package/dist/MarkdownInputField/AttachmentButton/AttachmentFileList/style.js +0 -1
  16. package/dist/MarkdownInputField/MarkdownInputField.js +6 -3
  17. package/dist/MarkdownInputField/SendButton/index.d.ts +2 -2
  18. package/dist/MarkdownInputField/SendButton/index.js +45 -27
  19. package/dist/MarkdownInputField/SendButton/sendButtonPalette.d.ts +36 -0
  20. package/dist/MarkdownInputField/SendButton/sendButtonPalette.js +247 -0
  21. package/dist/MarkdownInputField/SendButton/style.js +9 -6
  22. package/dist/MarkdownInputField/style.js +3 -1
  23. package/dist/MarkdownRenderer/AnimationText.js +1 -2
  24. package/dist/MarkdownRenderer/CharacterQueue.js +3 -0
  25. package/dist/MarkdownRenderer/MarkdownRenderer.js +5 -18
  26. package/dist/MarkdownRenderer/markdownReactShared.d.ts +2 -1
  27. package/dist/MarkdownRenderer/markdownReactShared.js +57 -19
  28. package/dist/MarkdownRenderer/streaming/MarkdownBlockPiece.js +14 -10
  29. package/dist/MarkdownRenderer/streaming/fenceTracker.d.ts +7 -0
  30. package/dist/MarkdownRenderer/streaming/fenceTracker.js +28 -0
  31. package/dist/MarkdownRenderer/streaming/lastBlockThrottle.js +3 -1
  32. package/dist/MarkdownRenderer/streaming/useShallowMemo.d.ts +1 -0
  33. package/dist/MarkdownRenderer/streaming/useShallowMemo.js +36 -0
  34. package/dist/MarkdownRenderer/streaming/useStreamingMarkdownReact.js +6 -3
  35. package/dist/MarkdownRenderer/useStreaming.js +43 -41
  36. package/dist/Plugins/chart/components/ChartContainer/ChartErrorBoundary.d.ts +2 -0
  37. package/dist/TaskList/TaskList.js +25 -13
  38. package/dist/TaskList/constants.d.ts +1 -1
  39. package/dist/TaskList/constants.js +9 -4
  40. package/dist/TaskList/style.js +29 -11
  41. package/dist/ToolUseBarThink/index.d.ts +0 -23
  42. package/dist/ToolUseBarThink/index.js +178 -315
  43. package/dist/ToolUseBarThink/style.js +64 -48
  44. package/dist/Types/quicklink.d.ts +1 -1
  45. package/dist/Workspace/File/FileTree/FileTreeComponent.d.ts +4 -0
  46. package/dist/Workspace/File/FileTree/FileTreeComponent.js +283 -0
  47. package/dist/Workspace/File/FileTree/index.d.ts +2 -0
  48. package/dist/Workspace/File/FileTree/index.js +1 -0
  49. package/dist/Workspace/File/FileTree/style.d.ts +8 -0
  50. package/dist/Workspace/File/FileTree/style.js +80 -0
  51. package/dist/Workspace/File/index.d.ts +2 -1
  52. package/dist/Workspace/File/index.js +1 -0
  53. package/dist/Workspace/index.d.ts +4 -2
  54. package/dist/Workspace/index.js +73 -36
  55. package/dist/Workspace/types.d.ts +70 -2
  56. package/package.json +4 -4
@@ -0,0 +1,36 @@
1
+ import { useRef } from "react";
2
+ var shallowEqual = function shallowEqual(a, b) {
3
+ if (a === b) return true;
4
+ if (!a || !b) return false;
5
+ var keysA = Object.keys(a);
6
+ var keysB = Object.keys(b);
7
+ if (keysA.length !== keysB.length) return false;
8
+ var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
9
+ try {
10
+ for(var _iterator = keysA[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
11
+ var key = _step.value;
12
+ if (a[key] !== b[key]) return false;
13
+ }
14
+ } catch (err) {
15
+ _didIteratorError = true;
16
+ _iteratorError = err;
17
+ } finally{
18
+ try {
19
+ if (!_iteratorNormalCompletion && _iterator.return != null) {
20
+ _iterator.return();
21
+ }
22
+ } finally{
23
+ if (_didIteratorError) {
24
+ throw _iteratorError;
25
+ }
26
+ }
27
+ }
28
+ return true;
29
+ };
30
+ export var useShallowMemo = function useShallowMemo(value) {
31
+ var ref = useRef(value);
32
+ if (!shallowEqual(ref.current, value)) {
33
+ ref.current = value;
34
+ }
35
+ return ref.current;
36
+ };
@@ -4,6 +4,7 @@ import { JINJA_DOLLAR_PLACEHOLDER, preprocessNormalizeLeafToContainerDirective }
4
4
  import { buildEditorAlignedComponents, createHastProcessor, splitMarkdownBlocks } from "../markdownReactShared";
5
5
  import { MarkdownBlockPiece } from "./MarkdownBlockPiece";
6
6
  import { shouldResetRevisionProgress } from "./revisionPolicy";
7
+ import { useShallowMemo } from "./useShallowMemo";
7
8
  /**
8
9
  * 流式优先的 Markdown → React:每块独立 MarkdownBlockPiece,末块 tail、其余 sealed。
9
10
  * 块 key 仅用修订代 + 下标,使「末块晋升为 sealed」时外层组件类型不变,避免子树卸载重挂。
@@ -18,14 +19,16 @@ import { shouldResetRevisionProgress } from "./revisionPolicy";
18
19
  options === null || options === void 0 ? void 0 : options.htmlConfig
19
20
  ]);
20
21
  var prefixCls = (options === null || options === void 0 ? void 0 : options.prefixCls) || 'ant-agentic-md-editor';
22
+ var stableComponents = useShallowMemo(options === null || options === void 0 ? void 0 : options.components);
23
+ var stableFncProps = useShallowMemo(options === null || options === void 0 ? void 0 : options.fncProps);
21
24
  var components = useMemo(function() {
22
- return buildEditorAlignedComponents(prefixCls, (options === null || options === void 0 ? void 0 : options.components) || {}, options === null || options === void 0 ? void 0 : options.streaming, options === null || options === void 0 ? void 0 : options.linkConfig, options === null || options === void 0 ? void 0 : options.fncProps, options === null || options === void 0 ? void 0 : options.streamingParagraphAnimation, options === null || options === void 0 ? void 0 : options.eleRender);
25
+ return buildEditorAlignedComponents(prefixCls, stableComponents || {}, options === null || options === void 0 ? void 0 : options.streaming, options === null || options === void 0 ? void 0 : options.linkConfig, stableFncProps, options === null || options === void 0 ? void 0 : options.streamingParagraphAnimation, options === null || options === void 0 ? void 0 : options.eleRender);
23
26
  }, [
24
27
  prefixCls,
25
- options === null || options === void 0 ? void 0 : options.components,
28
+ stableComponents,
26
29
  options === null || options === void 0 ? void 0 : options.streaming,
27
30
  options === null || options === void 0 ? void 0 : options.linkConfig,
28
- options === null || options === void 0 ? void 0 : options.fncProps,
31
+ stableFncProps,
29
32
  options === null || options === void 0 ? void 0 : options.streamingParagraphAnimation,
30
33
  options === null || options === void 0 ? void 0 : options.eleRender
31
34
  ]);
@@ -46,6 +46,21 @@ function _iterable_to_array_limit(arr, i) {
46
46
  function _non_iterable_rest() {
47
47
  throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
48
48
  }
49
+ function _object_spread(target) {
50
+ for(var i = 1; i < arguments.length; i++){
51
+ var source = arguments[i] != null ? arguments[i] : {};
52
+ var ownKeys = Object.keys(source);
53
+ if (typeof Object.getOwnPropertySymbols === "function") {
54
+ ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
55
+ return Object.getOwnPropertyDescriptor(source, sym).enumerable;
56
+ }));
57
+ }
58
+ ownKeys.forEach(function(key) {
59
+ _define_property(target, key, source[key]);
60
+ });
61
+ }
62
+ return target;
63
+ }
49
64
  function _sliced_to_array(arr, i) {
50
65
  return _array_with_holes(arr) || _iterable_to_array_limit(arr, i) || _unsupported_iterable_to_array(arr, i) || _non_iterable_rest();
51
66
  }
@@ -58,6 +73,7 @@ function _unsupported_iterable_to_array(o, minLen) {
58
73
  if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
59
74
  }
60
75
  import { useCallback, useEffect, useRef, useState } from "react";
76
+ import { INITIAL_FENCE_STATE, updateFenceStateForLine } from "./streaming/fenceTracker";
61
77
  /**
62
78
  * 流式 token 缓存类型。
63
79
  * 在流式场景中,部分 Markdown token(link、image、table 等)可能处于未闭合状态,
@@ -265,7 +281,9 @@ var getInitialCache = function getInitialCache() {
265
281
  pending: '',
266
282
  token: "text",
267
283
  processedLength: 0,
268
- completeMarkdown: ''
284
+ completeMarkdown: '',
285
+ fenceState: _object_spread({}, INITIAL_FENCE_STATE),
286
+ currentLine: ''
269
287
  };
270
288
  };
271
289
  var getStreamingOutput = function getStreamingOutput(cache) {
@@ -273,36 +291,6 @@ var getStreamingOutput = function getStreamingOutput(cache) {
273
291
  if (cache.pending) return STREAMING_LOADING_PLACEHOLDER;
274
292
  return '';
275
293
  };
276
- var isInCodeBlock = function isInCodeBlock(text) {
277
- var isFinalChunk = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : false;
278
- var lines = text.split('\n');
279
- var inFenced = false;
280
- var fenceChar = '';
281
- var fenceLen = 0;
282
- for(var i = 0; i < lines.length; i++){
283
- var line = lines[i].endsWith('\r') ? lines[i].slice(0, -1) : lines[i];
284
- var match = line.match(/^(`{3,}|~{3,})(.*)$/);
285
- if (match) {
286
- var fence = match[1];
287
- var after = match[2];
288
- var char = fence[0];
289
- var len = fence.length;
290
- if (!inFenced) {
291
- inFenced = true;
292
- fenceChar = char;
293
- fenceLen = len;
294
- } else {
295
- var isValidEnd = char === fenceChar && len >= fenceLen && /^\s*$/.test(after);
296
- if (isValidEnd && (isFinalChunk || i < lines.length - 1)) {
297
- inFenced = false;
298
- fenceChar = '';
299
- fenceLen = 0;
300
- }
301
- }
302
- }
303
- }
304
- return inFenced;
305
- };
306
294
  /** 流式 token 缓存——暂缓不完整的 link/image/table 等,避免 parser 错误解析 */ export var useStreaming = function useStreaming(input, enabled) {
307
295
  var _useState = _sliced_to_array(useState(''), 2), output = _useState[0], setOutput = _useState[1];
308
296
  var cacheRef = useRef(getInitialCache());
@@ -319,22 +307,36 @@ var isInCodeBlock = function isInCodeBlock(text) {
319
307
  var cache = cacheRef.current;
320
308
  var chunk = text.slice(cache.processedLength);
321
309
  if (!chunk) return;
310
+ // 非前缀重置后重建围栏状态(全量兜底,仅此处 O(n))
311
+ if (cache.processedLength === 0 && text.length > 0) {
312
+ var existingText = cache.completeMarkdown + cache.pending;
313
+ if (existingText.length === 0) {
314
+ cache.fenceState = _object_spread({}, INITIAL_FENCE_STATE);
315
+ cache.currentLine = '';
316
+ }
317
+ }
322
318
  cache.processedLength += chunk.length;
323
- var wasInCodeBlock = isInCodeBlock(cache.completeMarkdown + cache.pending);
324
319
  var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
325
320
  try {
326
321
  for(var _iterator = chunk[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
327
322
  var char = _step.value;
328
323
  cache.pending += char;
329
- var inCodeBlock = isInCodeBlock(cache.completeMarkdown + cache.pending);
330
- if (inCodeBlock) {
331
- wasInCodeBlock = true;
332
- continue;
333
- }
334
- if (wasInCodeBlock) {
335
- wasInCodeBlock = false;
336
- commitCache(cache);
337
- continue;
324
+ if (char === '\n') {
325
+ var prevInFenced = cache.fenceState.inFenced;
326
+ cache.fenceState = updateFenceStateForLine(cache.fenceState, cache.currentLine);
327
+ cache.currentLine = '';
328
+ if (cache.fenceState.inFenced) {
329
+ continue;
330
+ }
331
+ if (prevInFenced && !cache.fenceState.inFenced) {
332
+ commitCache(cache);
333
+ continue;
334
+ }
335
+ } else {
336
+ cache.currentLine += char;
337
+ if (cache.fenceState.inFenced) {
338
+ continue;
339
+ }
338
340
  }
339
341
  if (cache.token === "text") {
340
342
  var _iteratorNormalCompletion1 = true, _didIteratorError1 = false, _iteratorError1 = undefined;
@@ -290,6 +290,7 @@ declare class ChartErrorBoundary extends React.Component<ChartErrorBoundaryProps
290
290
  'workspace.browser': string;
291
291
  'workspace.task': string;
292
292
  'workspace.file': string;
293
+ 'workspace.fileTree': string;
293
294
  'workspace.custom': string;
294
295
  'workspace.terminalExecution': string;
295
296
  'workspace.createHtmlFile': string;
@@ -715,6 +716,7 @@ declare class ChartErrorBoundary extends React.Component<ChartErrorBoundaryProps
715
716
  'workspace.browser': string;
716
717
  'workspace.task': string;
717
718
  'workspace.file': string;
719
+ 'workspace.fileTree': string;
718
720
  'workspace.custom': string;
719
721
  'workspace.terminalExecution': string;
720
722
  'workspace.createHtmlFile': string;
@@ -9,6 +9,19 @@ function _array_with_holes(arr) {
9
9
  function _array_without_holes(arr) {
10
10
  if (Array.isArray(arr)) return _array_like_to_array(arr);
11
11
  }
12
+ function _define_property(obj, key, value) {
13
+ if (key in obj) {
14
+ Object.defineProperty(obj, key, {
15
+ value: value,
16
+ enumerable: true,
17
+ configurable: true,
18
+ writable: true
19
+ });
20
+ } else {
21
+ obj[key] = value;
22
+ }
23
+ return obj;
24
+ }
12
25
  function _iterable_to_array(iter) {
13
26
  if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
14
27
  }
@@ -133,17 +146,14 @@ export var TaskList = /*#__PURE__*/ memo(function(param) {
133
146
  return {
134
147
  summaryStatus: status,
135
148
  summaryText: text,
136
- progressText: "".concat(completedCount, "/").concat(items.length)
149
+ isCancelled: hasError,
150
+ lastItem: items[items.length - 1]
137
151
  };
138
152
  }, [
139
153
  items,
140
154
  locale
141
- ]), summaryStatus = _useMemo.summaryStatus, summaryText = _useMemo.summaryText, progressText = _useMemo.progressText;
142
- var isCancelled = items.some(function(i) {
143
- return i.status === 'error';
144
- });
145
- var renderItems = function renderItems() {
146
- var visibleItems = isCancelled ? items.slice(-1) : items;
155
+ ]), summaryStatus = _useMemo.summaryStatus, summaryText = _useMemo.summaryText, isCancelled = _useMemo.isCancelled, lastItem = _useMemo.lastItem;
156
+ var renderItems = function renderItems(visibleItems) {
147
157
  return visibleItems.map(function(item, index) {
148
158
  return /*#__PURE__*/ React.createElement(TaskListItem, {
149
159
  key: item.key,
@@ -159,10 +169,13 @@ export var TaskList = /*#__PURE__*/ memo(function(param) {
159
169
  if (variant !== 'simple') {
160
170
  return wrapSSR(/*#__PURE__*/ React.createElement("div", {
161
171
  className: className
162
- }, renderItems()));
172
+ }, renderItems(items)));
163
173
  }
164
174
  var simpleCls = "".concat(prefixCls, "-simple");
165
175
  var simpleArrowTitle = simpleExpanded ? (locale === null || locale === void 0 ? void 0 : locale['taskList.collapse']) || '收起' : (locale === null || locale === void 0 ? void 0 : locale['taskList.expand']) || '展开';
176
+ var visibleItems = simpleExpanded ? isCancelled ? items.slice(-1) : items : lastItem ? [
177
+ lastItem
178
+ ] : [];
166
179
  return wrapSSR(/*#__PURE__*/ React.createElement("div", {
167
180
  className: classNames("".concat(simpleCls, "-wrapper"), hashId, className),
168
181
  "data-testid": "task-list-simple-wrapper"
@@ -181,10 +194,9 @@ export var TaskList = /*#__PURE__*/ memo(function(param) {
181
194
  prefixCls: prefixCls,
182
195
  hashId: hashId
183
196
  })), /*#__PURE__*/ React.createElement("div", {
197
+ key: summaryText,
184
198
  className: classNames("".concat(simpleCls, "-text"), hashId)
185
199
  }, summaryText), /*#__PURE__*/ React.createElement("div", {
186
- className: classNames("".concat(simpleCls, "-progress"), hashId)
187
- }, progressText), /*#__PURE__*/ React.createElement("div", {
188
200
  className: classNames("".concat(simpleCls, "-arrow"), hashId)
189
201
  }, /*#__PURE__*/ React.createElement(ActionIconBox, {
190
202
  title: simpleArrowTitle,
@@ -196,10 +208,10 @@ export var TaskList = /*#__PURE__*/ memo(function(param) {
196
208
  }
197
209
  }, /*#__PURE__*/ React.createElement(ChevronUp, {
198
210
  "data-testid": "task-list-simple-arrow"
199
- })))), simpleExpanded && /*#__PURE__*/ React.createElement("div", {
200
- className: classNames("".concat(simpleCls, "-content"), hashId)
211
+ })))), /*#__PURE__*/ React.createElement("div", {
212
+ className: classNames("".concat(simpleCls, "-content"), hashId, _define_property({}, "".concat(simpleCls, "-content-expanded"), simpleExpanded))
201
213
  }, /*#__PURE__*/ React.createElement("div", {
202
214
  className: classNames("".concat(simpleCls, "-list"), hashId)
203
- }, renderItems()))));
215
+ }, renderItems(visibleItems)))));
204
216
  });
205
217
  TaskList.displayName = 'TaskList';
@@ -17,7 +17,7 @@ export declare const COLLAPSE_TRANSITION: {
17
17
  };
18
18
  opacity: {
19
19
  duration: number;
20
- ease: string;
20
+ ease: number[];
21
21
  };
22
22
  };
23
23
  export declare const getArrowRotation: (collapsed: boolean) => React.CSSProperties;
@@ -11,7 +11,7 @@ export var COLLAPSE_VARIANTS = {
11
11
  };
12
12
  export var COLLAPSE_TRANSITION = {
13
13
  height: {
14
- duration: 0.26,
14
+ duration: 0.35,
15
15
  ease: [
16
16
  0.4,
17
17
  0,
@@ -20,14 +20,19 @@ export var COLLAPSE_TRANSITION = {
20
20
  ]
21
21
  },
22
22
  opacity: {
23
- duration: 0.2,
24
- ease: 'linear'
23
+ duration: 0.25,
24
+ ease: [
25
+ 0.4,
26
+ 0,
27
+ 0.2,
28
+ 1
29
+ ]
25
30
  }
26
31
  };
27
32
  export var getArrowRotation = function getArrowRotation(collapsed) {
28
33
  return {
29
34
  transform: collapsed ? 'rotate(0deg)' : 'rotate(180deg)',
30
- transition: 'transform 0.3s ease'
35
+ transition: 'transform 0.35s cubic-bezier(0.4, 0, 0.2, 1)'
31
36
  };
32
37
  };
33
38
  export var hasTaskContent = function hasTaskContent(content) {
@@ -130,7 +130,7 @@ var genStyle = function genStyle(token) {
130
130
  flexShrink: 0,
131
131
  width: 16,
132
132
  height: 16,
133
- transition: 'all 0.3s cubic-bezier(0.645, 0.045, 0.355, 1)'
133
+ transition: 'all 0.35s cubic-bezier(0.4, 0, 0.2, 1)'
134
134
  }), _obj),
135
135
  '&-body': _define_property({
136
136
  display: 'flex'
@@ -146,8 +146,6 @@ var genStyle = function genStyle(token) {
146
146
  // Simple variant - wrapper
147
147
  '&-simple-wrapper': {
148
148
  borderRadius: 'var(--radius-control-base, 8px)',
149
- background: 'var(--color-gray-bg-page-dark, #f5f5f5)',
150
- boxShadow: 'var(--shadow-control-base, none)',
151
149
  overflow: 'hidden'
152
150
  },
153
151
  // Simple variant - bar
@@ -159,7 +157,8 @@ var genStyle = function genStyle(token) {
159
157
  gap: 8,
160
158
  cursor: 'pointer',
161
159
  userSelect: 'none',
162
- transition: 'background 0.2s ease',
160
+ borderRadius: 'var(--radius-control-base, 8px)',
161
+ transition: 'background 0.3s cubic-bezier(0.4, 0, 0.2, 1)',
163
162
  '&:hover': {
164
163
  background: 'var(--color-gray-control-fill-active, rgba(0,0,0,0.04))'
165
164
  }
@@ -181,23 +180,42 @@ var genStyle = function genStyle(token) {
181
180
  color: 'var(--color-gray-text-default, rgba(0,3,9,0.85))',
182
181
  overflow: 'hidden',
183
182
  textOverflow: 'ellipsis',
184
- whiteSpace: 'nowrap'
185
- }), _define_property(_obj1, "".concat(componentCls, "-simple-progress"), {
186
- flexShrink: 0,
187
- font: 'var(--font-text-paragraph-sm, 12px)',
188
- color: 'var(--color-gray-text-secondary, rgba(0,3,9,0.45))'
183
+ whiteSpace: 'nowrap',
184
+ animation: 'taskTextFadeIn 0.4s cubic-bezier(0.4, 0, 0.2, 1)'
189
185
  }), _define_property(_obj1, "".concat(componentCls, "-simple-arrow"), {
190
186
  flexShrink: 0,
191
187
  display: 'flex',
192
188
  alignItems: 'center',
193
189
  justifyContent: 'center'
194
190
  }), _obj1),
195
- // Simple variant - expanded content
191
+ // Simple variant - content area
196
192
  '&-simple-content': {
197
- overflow: 'hidden'
193
+ display: 'grid',
194
+ gridTemplateRows: '0fr',
195
+ opacity: 0,
196
+ transition: 'grid-template-rows 0.35s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1)',
197
+ '& > *': {
198
+ overflow: 'hidden'
199
+ },
200
+ '&-expanded': {
201
+ gridTemplateRows: '1fr',
202
+ opacity: 1
203
+ }
198
204
  },
199
205
  '&-simple-list': {
200
206
  padding: '4px 12px 8px'
207
+ },
208
+ '@keyframes taskTextFadeIn': {
209
+ '0%': {
210
+ opacity: 0,
211
+ filter: 'blur(4px)',
212
+ transform: 'translateY(2px)'
213
+ },
214
+ '100%': {
215
+ opacity: 1,
216
+ filter: 'blur(0)',
217
+ transform: 'translateY(0)'
218
+ }
201
219
  }
202
220
  });
203
221
  };
@@ -1,44 +1,24 @@
1
1
  import React from 'react';
2
- /**
3
- * ToolUseBarThink 组件属性
4
- */
5
2
  export interface ToolUseBarThinkProps {
6
- /** 工具名称 */
7
3
  toolName: React.ReactNode;
8
- /** 工具目标 */
9
4
  toolTarget?: React.ReactNode;
10
- /** 时间显示 */
11
5
  time?: React.ReactNode;
12
- /** 自定义图标 */
13
6
  icon?: React.ReactNode;
14
- /** 思考内容 */
15
7
  thinkContent?: React.ReactNode;
16
- /** 测试ID */
17
8
  testId?: string;
18
- /** 状态 */
19
9
  status?: 'loading' | 'success' | 'error';
20
- /** 是否展开 */
21
10
  expanded?: boolean;
22
- /** 轻量模式 */
23
11
  light?: boolean;
24
- /** 默认展开状态 */
25
12
  defaultExpanded?: boolean;
26
- /** 展开状态变更回调 */
27
13
  onExpandedChange?: (expanded: boolean) => void;
28
- /** 浮动展开状态 */
29
14
  floatingExpanded?: boolean;
30
- /** 默认浮动展开状态 */
31
15
  defaultFloatingExpanded?: boolean;
32
- /** 浮动展开状态变更回调 */
33
16
  onFloatingExpandedChange?: (floatingExpanded: boolean) => void;
34
- /** 自定义类名 */
35
17
  classNames?: {
36
18
  root?: string;
37
19
  bar?: string;
38
20
  header?: string;
39
- headerLeft?: string;
40
21
  imageWrapper?: string;
41
- image?: string;
42
22
  name?: string;
43
23
  target?: string;
44
24
  time?: string;
@@ -47,14 +27,11 @@ export interface ToolUseBarThinkProps {
47
27
  content?: string;
48
28
  floatingExpand?: string;
49
29
  };
50
- /** 自定义样式 */
51
30
  styles?: {
52
31
  root?: React.CSSProperties;
53
32
  bar?: React.CSSProperties;
54
33
  header?: React.CSSProperties;
55
- headerLeft?: React.CSSProperties;
56
34
  imageWrapper?: React.CSSProperties;
57
- image?: React.CSSProperties;
58
35
  name?: React.CSSProperties;
59
36
  target?: React.CSSProperties;
60
37
  time?: React.CSSProperties;