@ant-design/agentic-ui 2.0.4 → 2.0.5

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.
@@ -26,9 +26,234 @@ import { ConfigProvider } from "antd";
26
26
  import classNamesFn from "classnames";
27
27
  import { motion } from "framer-motion";
28
28
  import { useMergedState } from "rc-util";
29
- import React, { useContext, useEffect } from "react";
29
+ import React, {
30
+ memo,
31
+ useCallback,
32
+ useContext,
33
+ useEffect,
34
+ useMemo
35
+ } from "react";
30
36
  import { useStyle } from "./thinkStyle";
31
- var ToolUseBarThink = ({
37
+ var LightModeIconComponent = ({
38
+ prefixCls,
39
+ hashId,
40
+ hover,
41
+ expandedState
42
+ }) => {
43
+ const iconClassName = useMemo(() => {
44
+ return classNamesFn(
45
+ `${prefixCls}-header-left-icon`,
46
+ {
47
+ [`${prefixCls}-header-left-icon-light`]: true
48
+ },
49
+ hashId
50
+ );
51
+ }, [prefixCls, hashId]);
52
+ const chevronStyle = useMemo(() => {
53
+ return {
54
+ transform: expandedState ? "rotate(0deg)" : "rotate(-90deg)",
55
+ transition: "transform 0.2s"
56
+ };
57
+ }, [expandedState]);
58
+ const iconElement = useMemo(() => {
59
+ return hover ? /* @__PURE__ */ React.createElement(ChevronDown, { style: chevronStyle }) : /* @__PURE__ */ React.createElement(Brain, null);
60
+ }, [hover, chevronStyle]);
61
+ return /* @__PURE__ */ React.createElement("div", { className: iconClassName }, iconElement);
62
+ };
63
+ var LightModeIcon = memo(LightModeIconComponent);
64
+ var HeaderContentComponent = ({
65
+ toolName,
66
+ toolTarget,
67
+ prefixCls,
68
+ hashId,
69
+ light,
70
+ classNames,
71
+ styles
72
+ }) => {
73
+ const nameClassName = useMemo(() => {
74
+ return classNamesFn(
75
+ `${prefixCls}-name`,
76
+ {
77
+ [`${prefixCls}-name-light`]: light
78
+ },
79
+ hashId,
80
+ classNames == null ? void 0 : classNames.name
81
+ );
82
+ }, [prefixCls, hashId, light, classNames == null ? void 0 : classNames.name]);
83
+ const targetClassName = useMemo(() => {
84
+ return classNamesFn(`${prefixCls}-target`, hashId, classNames == null ? void 0 : classNames.target);
85
+ }, [prefixCls, hashId, classNames == null ? void 0 : classNames.target]);
86
+ const nameElement = useMemo(() => {
87
+ return toolName ? /* @__PURE__ */ React.createElement("div", { className: nameClassName, style: styles == null ? void 0 : styles.name }, toolName) : null;
88
+ }, [toolName, nameClassName, styles == null ? void 0 : styles.name]);
89
+ const targetElement = useMemo(() => {
90
+ return toolTarget ? /* @__PURE__ */ React.createElement("div", { className: targetClassName, style: styles == null ? void 0 : styles.target }, toolTarget) : /* @__PURE__ */ React.createElement("div", null);
91
+ }, [toolTarget, targetClassName, styles == null ? void 0 : styles.target]);
92
+ return /* @__PURE__ */ React.createElement(React.Fragment, null, nameElement, targetElement);
93
+ };
94
+ var HeaderContent = memo(HeaderContentComponent);
95
+ var TimeElementComponent = ({
96
+ time,
97
+ prefixCls,
98
+ hashId,
99
+ classNames,
100
+ styles
101
+ }) => {
102
+ const timeClassName = useMemo(() => {
103
+ return classNamesFn(`${prefixCls}-time`, hashId, classNames == null ? void 0 : classNames.time);
104
+ }, [prefixCls, hashId, classNames == null ? void 0 : classNames.time]);
105
+ const timeElement = useMemo(() => {
106
+ return time ? /* @__PURE__ */ React.createElement("div", { className: timeClassName, style: styles == null ? void 0 : styles.time }, time) : null;
107
+ }, [time, timeClassName, styles == null ? void 0 : styles.time]);
108
+ return timeElement;
109
+ };
110
+ var TimeElement = memo(TimeElementComponent);
111
+ var ExpandButtonComponent = ({
112
+ thinkContent,
113
+ light,
114
+ expandedState,
115
+ prefixCls,
116
+ hashId,
117
+ classNames,
118
+ styles,
119
+ onToggleExpand
120
+ }) => {
121
+ const expandClassName = useMemo(() => {
122
+ return classNamesFn(`${prefixCls}-expand`, hashId, classNames == null ? void 0 : classNames.expand);
123
+ }, [prefixCls, hashId, classNames == null ? void 0 : classNames.expand]);
124
+ const expandIcon = useMemo(() => {
125
+ return !expandedState ? /* @__PURE__ */ React.createElement(ChevronsUpDown, null) : /* @__PURE__ */ React.createElement(ChevronsDownUp, null);
126
+ }, [expandedState]);
127
+ const expandElement = useMemo(() => {
128
+ return thinkContent && !light ? /* @__PURE__ */ React.createElement(
129
+ "div",
130
+ {
131
+ className: expandClassName,
132
+ onClick: onToggleExpand,
133
+ style: styles == null ? void 0 : styles.expand
134
+ },
135
+ expandIcon
136
+ ) : null;
137
+ }, [
138
+ thinkContent,
139
+ light,
140
+ expandClassName,
141
+ onToggleExpand,
142
+ styles == null ? void 0 : styles.expand,
143
+ expandIcon
144
+ ]);
145
+ return expandElement;
146
+ };
147
+ var ExpandButton = memo(ExpandButtonComponent);
148
+ var ThinkContainerComponent = ({
149
+ thinkContent,
150
+ expandedState,
151
+ floatingExpandedState,
152
+ status,
153
+ light,
154
+ prefixCls,
155
+ hashId,
156
+ classNames,
157
+ styles,
158
+ onToggleFloatingExpand
159
+ }) => {
160
+ const containerClassName = useMemo(() => {
161
+ return classNamesFn(
162
+ `${prefixCls}-container`,
163
+ hashId,
164
+ classNames == null ? void 0 : classNames.container,
165
+ {
166
+ [`${prefixCls}-container-expanded`]: expandedState,
167
+ [`${prefixCls}-container-loading`]: status === "loading" && !floatingExpandedState,
168
+ [`${prefixCls}-container-light`]: light,
169
+ [`${prefixCls}-container-floating-expanded`]: floatingExpandedState
170
+ }
171
+ );
172
+ }, [
173
+ prefixCls,
174
+ hashId,
175
+ classNames == null ? void 0 : classNames.container,
176
+ expandedState,
177
+ status,
178
+ floatingExpandedState,
179
+ light
180
+ ]);
181
+ const containerStyle = useMemo(() => {
182
+ return __spreadValues(__spreadValues({}, expandedState ? {} : {
183
+ height: 1,
184
+ padding: "0 8px",
185
+ margin: 0,
186
+ overflow: "hidden",
187
+ minHeight: 0,
188
+ visibility: "hidden"
189
+ }), styles == null ? void 0 : styles.container);
190
+ }, [expandedState, styles == null ? void 0 : styles.container]);
191
+ const contentClassName = useMemo(() => {
192
+ return classNamesFn(`${prefixCls}-content`, hashId, classNames == null ? void 0 : classNames.content);
193
+ }, [prefixCls, hashId, classNames == null ? void 0 : classNames.content]);
194
+ const floatingExpandClassName = useMemo(() => {
195
+ return classNamesFn(
196
+ `${prefixCls}-floating-expand`,
197
+ hashId,
198
+ classNames == null ? void 0 : classNames.floatingExpand
199
+ );
200
+ }, [prefixCls, hashId, classNames == null ? void 0 : classNames.floatingExpand]);
201
+ const floatingIconStyle = useMemo(() => {
202
+ return {
203
+ fontSize: 16,
204
+ color: "var(--color-gray-text-light)"
205
+ };
206
+ }, []);
207
+ const floatingIcon = useMemo(() => {
208
+ return !floatingExpandedState ? /* @__PURE__ */ React.createElement(ChevronsUpDown, { style: floatingIconStyle }) : /* @__PURE__ */ React.createElement(ChevronsDownUp, { style: floatingIconStyle });
209
+ }, [floatingExpandedState, floatingIconStyle]);
210
+ const floatingText = useMemo(() => {
211
+ return floatingExpandedState ? "收起" : "展开";
212
+ }, [floatingExpandedState]);
213
+ const floatingExpandElement = useMemo(() => {
214
+ return status === "loading" && !light ? /* @__PURE__ */ React.createElement(
215
+ "div",
216
+ {
217
+ className: floatingExpandClassName,
218
+ onClick: onToggleFloatingExpand,
219
+ "data-testid": "tool-use-bar-think-floating-expand",
220
+ style: styles == null ? void 0 : styles.floatingExpand
221
+ },
222
+ floatingIcon,
223
+ floatingText
224
+ ) : null;
225
+ }, [
226
+ status,
227
+ light,
228
+ floatingExpandClassName,
229
+ onToggleFloatingExpand,
230
+ styles == null ? void 0 : styles.floatingExpand,
231
+ floatingIcon,
232
+ floatingText
233
+ ]);
234
+ const containerElement = useMemo(() => {
235
+ return thinkContent ? /* @__PURE__ */ React.createElement(
236
+ "div",
237
+ {
238
+ className: containerClassName,
239
+ "data-testid": "tool-use-bar-think-container",
240
+ style: containerStyle
241
+ },
242
+ /* @__PURE__ */ React.createElement("div", { className: contentClassName, style: styles == null ? void 0 : styles.content }, thinkContent),
243
+ floatingExpandElement
244
+ ) : null;
245
+ }, [
246
+ thinkContent,
247
+ containerClassName,
248
+ containerStyle,
249
+ contentClassName,
250
+ styles == null ? void 0 : styles.content,
251
+ floatingExpandElement
252
+ ]);
253
+ return containerElement;
254
+ };
255
+ var ThinkContainer = memo(ThinkContainerComponent);
256
+ var ToolUseBarThinkComponent = ({
32
257
  toolName,
33
258
  toolTarget,
34
259
  time,
@@ -60,37 +285,109 @@ var ToolUseBarThink = ({
60
285
  onChange: onFloatingExpandedChange
61
286
  }
62
287
  );
63
- const defaultIcon = /* @__PURE__ */ React.createElement(Brain, null);
64
- const handleToggleExpand = () => {
288
+ const defaultIcon = useMemo(() => /* @__PURE__ */ React.createElement(Brain, null), []);
289
+ const handleToggleExpand = useCallback(() => {
65
290
  setExpandedState(!expandedState);
66
- };
67
- const handleToggleFloatingExpand = () => {
291
+ }, [expandedState, setExpandedState]);
292
+ const handleToggleFloatingExpand = useCallback(() => {
68
293
  setFloatingExpandedState(!floatingExpandedState);
69
- };
294
+ }, [floatingExpandedState, setFloatingExpandedState]);
70
295
  useEffect(() => {
71
296
  if (status === "loading") {
72
297
  setExpandedState(true);
73
298
  }
74
- }, [status]);
299
+ }, [status, setExpandedState]);
75
300
  const [hover, setHover] = React.useState(false);
301
+ const rootClassName = useMemo(() => {
302
+ return classNamesFn(prefixCls, hashId, classNames == null ? void 0 : classNames.root, {
303
+ [`${prefixCls}-expanded`]: !expandedState,
304
+ [`${prefixCls}-loading`]: status === "loading",
305
+ [`${prefixCls}-active`]: expandedState,
306
+ [`${prefixCls}-success`]: status === "success",
307
+ [`${prefixCls}-light`]: light
308
+ });
309
+ }, [prefixCls, hashId, classNames == null ? void 0 : classNames.root, expandedState, status, light]);
310
+ const barClassName = useMemo(() => {
311
+ return classNamesFn(`${prefixCls}-bar`, hashId, classNames == null ? void 0 : classNames.bar);
312
+ }, [prefixCls, hashId, classNames == null ? void 0 : classNames.bar]);
313
+ const headerClassName = useMemo(() => {
314
+ return classNamesFn(`${prefixCls}-header`, hashId, classNames == null ? void 0 : classNames.header, {
315
+ [`${prefixCls}-header-light`]: light
316
+ });
317
+ }, [prefixCls, hashId, classNames == null ? void 0 : classNames.header, light]);
318
+ const headerLeftClassName = useMemo(() => {
319
+ return classNamesFn(
320
+ `${prefixCls}-header-left`,
321
+ hashId,
322
+ classNames == null ? void 0 : classNames.headerLeft
323
+ );
324
+ }, [prefixCls, hashId, classNames == null ? void 0 : classNames.headerLeft]);
325
+ const loadingAnimationConfig = useMemo(
326
+ () => ({
327
+ animate: {
328
+ "--rotate": ["0deg", "360deg"]
329
+ },
330
+ transition: {
331
+ "--rotate": {
332
+ duration: 1,
333
+ repeat: Infinity,
334
+ ease: "linear"
335
+ }
336
+ },
337
+ style: {
338
+ "--rotation": "360deg"
339
+ }
340
+ }),
341
+ []
342
+ );
343
+ const idleAnimationConfig = useMemo(
344
+ () => ({
345
+ animate: {},
346
+ transition: {},
347
+ style: {
348
+ "--rotation": "0deg"
349
+ }
350
+ }),
351
+ []
352
+ );
353
+ const imageAnimationProps = useMemo(() => {
354
+ return status === "loading" ? loadingAnimationConfig : idleAnimationConfig;
355
+ }, [status, loadingAnimationConfig, idleAnimationConfig]);
356
+ const headerRightAnimationConfig = useMemo(() => {
357
+ if (status === "loading") {
358
+ return {
359
+ animate: {
360
+ maskImage: [
361
+ "linear-gradient(to right, rgba(0,0,0,0.99) -50%, rgba(0,0,0,0.15) -50%,rgba(0,0,0,0.99) 150%)",
362
+ "linear-gradient(to right, rgba(0,0,0,0.99) -50%, rgba(0,0,0,0.15) 150%,rgba(0,0,0,0.99) 150%)"
363
+ ]
364
+ },
365
+ transition: {
366
+ maskImage: {
367
+ duration: 1,
368
+ repeat: Infinity,
369
+ ease: "linear"
370
+ }
371
+ },
372
+ style: {
373
+ maskImage: "linear-gradient(to right, rgba(0,0,0,0.99) -30%, rgba(0,0,0,0.15) -50%, rgba(0,0,0,0.99) 120%)"
374
+ }
375
+ };
376
+ }
377
+ return {};
378
+ }, [status]);
76
379
  return wrapSSR(
77
380
  /* @__PURE__ */ React.createElement(
78
381
  "div",
79
382
  {
80
383
  "data-testid": testId || "ToolUseBarThink",
81
- className: classNamesFn(prefixCls, hashId, classNames == null ? void 0 : classNames.root, {
82
- [`${prefixCls}-expanded`]: !expandedState,
83
- [`${prefixCls}-loading`]: status === "loading",
84
- [`${prefixCls}-active`]: expandedState,
85
- [`${prefixCls}-success`]: status === "success",
86
- [`${prefixCls}-light`]: light
87
- }),
384
+ className: rootClassName,
88
385
  style: styles == null ? void 0 : styles.root
89
386
  },
90
387
  /* @__PURE__ */ React.createElement(
91
388
  "div",
92
389
  {
93
- className: classNamesFn(`${prefixCls}-bar`, hashId, classNames == null ? void 0 : classNames.bar),
390
+ className: barClassName,
94
391
  "data-testid": "tool-use-bar-think-bar",
95
392
  style: styles == null ? void 0 : styles.bar,
96
393
  onClick: handleToggleExpand
@@ -98,236 +395,109 @@ var ToolUseBarThink = ({
98
395
  /* @__PURE__ */ React.createElement(
99
396
  "div",
100
397
  {
101
- className: classNamesFn(
102
- `${prefixCls}-header`,
103
- hashId,
104
- classNames == null ? void 0 : classNames.header,
105
- {
106
- [`${prefixCls}-header-light`]: light
107
- }
108
- ),
398
+ className: headerClassName,
109
399
  "data-testid": "tool-use-bar-think-header",
110
400
  style: styles == null ? void 0 : styles.header,
111
401
  onMouseMove: () => setHover(true),
112
402
  onMouseLeave: () => setHover(false)
113
403
  },
114
- /* @__PURE__ */ React.createElement(
115
- "div",
404
+ /* @__PURE__ */ React.createElement("div", { className: headerLeftClassName, style: styles == null ? void 0 : styles.headerLeft }, light ? /* @__PURE__ */ React.createElement(
405
+ LightModeIcon,
116
406
  {
407
+ prefixCls,
408
+ hashId,
409
+ hover,
410
+ expandedState,
411
+ classNames
412
+ }
413
+ ) : /* @__PURE__ */ React.createElement(
414
+ motion.div,
415
+ __spreadValues({
117
416
  className: classNamesFn(
118
- `${prefixCls}-header-left`,
417
+ `${prefixCls}-image-wrapper`,
119
418
  hashId,
120
- classNames == null ? void 0 : classNames.headerLeft
121
- ),
122
- style: styles == null ? void 0 : styles.headerLeft
123
- },
124
- light ? /* @__PURE__ */ React.createElement(
125
- "div",
126
- {
127
- className: classNamesFn(
128
- `${prefixCls}-header-left-icon`,
129
- {
130
- [`${prefixCls}-header-left-icon-light`]: light
131
- },
132
- hashId
133
- )
134
- },
135
- hover ? /* @__PURE__ */ React.createElement(
136
- ChevronDown,
419
+ classNames == null ? void 0 : classNames.imageWrapper,
137
420
  {
138
- style: {
139
- transform: expandedState ? "rotate(0deg)" : "rotate(-90deg)",
140
- transition: "transform 0.2s"
141
- }
421
+ [`${prefixCls}-image-wrapper-rotating`]: status === "loading",
422
+ [`${prefixCls}-image-wrapper-loading`]: status === "loading"
142
423
  }
143
- ) : /* @__PURE__ */ React.createElement(Brain, null)
144
- ) : /* @__PURE__ */ React.createElement(
145
- motion.div,
424
+ )
425
+ }, imageAnimationProps),
426
+ icon || /* @__PURE__ */ React.createElement(
427
+ "div",
146
428
  {
147
429
  className: classNamesFn(
148
- `${prefixCls}-image-wrapper`,
430
+ `${prefixCls}-image`,
149
431
  hashId,
150
- classNames == null ? void 0 : classNames.imageWrapper,
151
- {
152
- [`${prefixCls}-image-wrapper-rotating`]: status === "loading",
153
- [`${prefixCls}-image-wrapper-loading`]: status === "loading"
154
- }
432
+ classNames == null ? void 0 : classNames.image
155
433
  ),
156
- animate: status === "loading" ? {
157
- "--rotate": ["0deg", "360deg"]
158
- } : {},
159
- transition: status === "loading" ? {
160
- "--rotate": {
161
- duration: 1,
162
- repeat: Infinity,
163
- ease: "linear"
164
- }
165
- } : {},
166
- style: {
167
- "--rotation": status === "loading" ? "360deg" : "0deg"
168
- }
434
+ style: styles == null ? void 0 : styles.image
169
435
  },
170
- icon || /* @__PURE__ */ React.createElement(
171
- "div",
172
- {
173
- className: classNamesFn(
174
- `${prefixCls}-image`,
175
- hashId,
176
- classNames == null ? void 0 : classNames.image
177
- ),
178
- style: styles == null ? void 0 : styles.image
179
- },
180
- defaultIcon
181
- )
436
+ defaultIcon
182
437
  )
183
- ),
438
+ )),
184
439
  /* @__PURE__ */ React.createElement(
185
440
  motion.div,
186
- {
187
- className: classNamesFn(`${prefixCls}-header-right`, hashId),
188
- animate: status === "loading" ? {
189
- maskImage: [
190
- "linear-gradient(to right, rgba(0,0,0,0.99) -50%, rgba(0,0,0,0.15) -50%,rgba(0,0,0,0.99) 150%)",
191
- "linear-gradient(to right, rgba(0,0,0,0.99) -50%, rgba(0,0,0,0.15) 150%,rgba(0,0,0,0.99) 150%)"
192
- ]
193
- } : {},
194
- transition: status === "loading" ? {
195
- maskImage: {
196
- duration: 1,
197
- repeat: Infinity,
198
- ease: "linear"
199
- }
200
- } : {},
201
- style: {
202
- maskImage: status === "loading" ? "linear-gradient(to right, rgba(0,0,0,0.99) -30%, rgba(0,0,0,0.15) -50%, rgba(0,0,0,0.99) 120%)" : void 0
203
- }
204
- },
205
- toolName && /* @__PURE__ */ React.createElement(
206
- "div",
207
- {
208
- className: classNamesFn(
209
- `${prefixCls}-name`,
210
- {
211
- [`${prefixCls}-name-light`]: light
212
- },
213
- hashId,
214
- classNames == null ? void 0 : classNames.name
215
- ),
216
- style: styles == null ? void 0 : styles.name
217
- },
218
- toolName
219
- ),
220
- toolTarget ? /* @__PURE__ */ React.createElement(
221
- "div",
441
+ __spreadValues({
442
+ className: classNamesFn(`${prefixCls}-header-right`, hashId)
443
+ }, headerRightAnimationConfig),
444
+ /* @__PURE__ */ React.createElement(
445
+ HeaderContent,
222
446
  {
223
- className: classNamesFn(
224
- `${prefixCls}-target`,
225
- hashId,
226
- classNames == null ? void 0 : classNames.target
227
- ),
228
- style: styles == null ? void 0 : styles.target
229
- },
230
- toolTarget
231
- ) : /* @__PURE__ */ React.createElement("div", null)
447
+ toolName,
448
+ toolTarget,
449
+ prefixCls,
450
+ hashId,
451
+ light,
452
+ classNames,
453
+ styles
454
+ }
455
+ )
232
456
  )
233
457
  ),
234
- time && /* @__PURE__ */ React.createElement(
235
- "div",
458
+ /* @__PURE__ */ React.createElement(
459
+ TimeElement,
236
460
  {
237
- className: classNamesFn(
238
- `${prefixCls}-time`,
239
- hashId,
240
- classNames == null ? void 0 : classNames.time
241
- ),
242
- style: styles == null ? void 0 : styles.time
243
- },
244
- time
461
+ time,
462
+ prefixCls,
463
+ hashId,
464
+ classNames,
465
+ styles
466
+ }
245
467
  ),
246
- thinkContent && !light && /* @__PURE__ */ React.createElement(
247
- "div",
468
+ /* @__PURE__ */ React.createElement(
469
+ ExpandButton,
248
470
  {
249
- className: classNamesFn(
250
- `${prefixCls}-expand`,
251
- hashId,
252
- classNames == null ? void 0 : classNames.expand
253
- ),
254
- onClick: handleToggleExpand,
255
- style: styles == null ? void 0 : styles.expand
256
- },
257
- !expandedState ? /* @__PURE__ */ React.createElement(ChevronsUpDown, null) : /* @__PURE__ */ React.createElement(ChevronsDownUp, null)
471
+ thinkContent,
472
+ light,
473
+ expandedState,
474
+ prefixCls,
475
+ hashId,
476
+ classNames,
477
+ styles,
478
+ onToggleExpand: handleToggleExpand
479
+ }
258
480
  )
259
481
  ),
260
- thinkContent && /* @__PURE__ */ React.createElement(
261
- "div",
482
+ /* @__PURE__ */ React.createElement(
483
+ ThinkContainer,
262
484
  {
263
- className: classNamesFn(
264
- `${prefixCls}-container`,
265
- hashId,
266
- classNames == null ? void 0 : classNames.container,
267
- {
268
- [`${prefixCls}-container-expanded`]: expandedState,
269
- [`${prefixCls}-container-loading`]: status === "loading" && !floatingExpandedState,
270
- [`${prefixCls}-container-light`]: light,
271
- [`${prefixCls}-container-floating-expanded`]: floatingExpandedState
272
- }
273
- ),
274
- "data-testid": "tool-use-bar-think-container",
275
- style: __spreadValues(__spreadValues({}, expandedState ? {} : {
276
- height: 1,
277
- padding: "0 8px",
278
- margin: 0,
279
- overflow: "hidden",
280
- minHeight: 0,
281
- visibility: "hidden"
282
- }), styles == null ? void 0 : styles.container)
283
- },
284
- /* @__PURE__ */ React.createElement(
285
- "div",
286
- {
287
- className: classNamesFn(
288
- `${prefixCls}-content`,
289
- hashId,
290
- classNames == null ? void 0 : classNames.content
291
- ),
292
- style: styles == null ? void 0 : styles.content
293
- },
294
- thinkContent
295
- ),
296
- status === "loading" && !light ? /* @__PURE__ */ React.createElement(
297
- "div",
298
- {
299
- className: classNamesFn(
300
- `${prefixCls}-floating-expand`,
301
- hashId,
302
- classNames == null ? void 0 : classNames.floatingExpand
303
- ),
304
- onClick: handleToggleFloatingExpand,
305
- "data-testid": "tool-use-bar-think-floating-expand",
306
- style: styles == null ? void 0 : styles.floatingExpand
307
- },
308
- !floatingExpandedState ? /* @__PURE__ */ React.createElement(
309
- ChevronsUpDown,
310
- {
311
- style: {
312
- fontSize: 16,
313
- color: "var(--color-gray-text-light)"
314
- }
315
- }
316
- ) : /* @__PURE__ */ React.createElement(
317
- ChevronsDownUp,
318
- {
319
- style: {
320
- fontSize: 16,
321
- color: "var(--color-gray-text-light)"
322
- }
323
- }
324
- ),
325
- floatingExpandedState ? "收起" : "展开"
326
- ) : null
485
+ thinkContent,
486
+ expandedState,
487
+ floatingExpandedState,
488
+ status,
489
+ light,
490
+ prefixCls,
491
+ hashId,
492
+ classNames,
493
+ styles,
494
+ onToggleFloatingExpand: handleToggleFloatingExpand
495
+ }
327
496
  )
328
497
  )
329
498
  );
330
499
  };
500
+ var ToolUseBarThink = memo(ToolUseBarThinkComponent);
331
501
  export {
332
502
  ToolUseBarThink
333
503
  };