@tutti-os/agent-gui 0.0.50 → 0.0.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/agent-conversation/index.js +3 -3
- package/dist/agent-message-center/index.d.ts +184 -3
- package/dist/agent-message-center/index.js +120 -54
- package/dist/agent-message-center/index.js.map +1 -1
- package/dist/app/renderer/agentactivity.css +40 -19
- package/dist/{chunk-BQVYICR7.js → chunk-2OLYX32K.js} +2 -2
- package/dist/{chunk-RPXRNKU5.js → chunk-3ZVVFQH5.js} +128 -40
- package/dist/chunk-3ZVVFQH5.js.map +1 -0
- package/dist/{chunk-FS26J46N.js → chunk-BFIYBPFD.js} +2 -2
- package/dist/{chunk-VKP5ZW5O.js → chunk-PIKG746A.js} +187 -185
- package/dist/chunk-PIKG746A.js.map +1 -0
- package/dist/{chunk-UUY5VEK4.js → chunk-UKDC63WG.js} +2 -2
- package/dist/{chunk-UUY5VEK4.js.map → chunk-UKDC63WG.js.map} +1 -1
- package/dist/context-mention-palette/index.js +2 -2
- package/dist/index.js +5 -5
- package/package.json +15 -15
- package/dist/chunk-RPXRNKU5.js.map +0 -1
- package/dist/chunk-VKP5ZW5O.js.map +0 -1
- /package/dist/{chunk-BQVYICR7.js.map → chunk-2OLYX32K.js.map} +0 -0
- /package/dist/{chunk-FS26J46N.js.map → chunk-BFIYBPFD.js.map} +0 -0
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
AgentGUIConversation_styles_default,
|
|
8
8
|
MessageSquareMoreIcon,
|
|
9
9
|
extractAgentMcpToolTarget
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-PIKG746A.js";
|
|
11
11
|
import {
|
|
12
12
|
Spinner
|
|
13
13
|
} from "./chunk-HDBKB5RA.js";
|
|
@@ -1150,4 +1150,4 @@ export {
|
|
|
1150
1150
|
isPromptRequestIdTitle,
|
|
1151
1151
|
AgentInteractivePromptSurface
|
|
1152
1152
|
};
|
|
1153
|
-
//# sourceMappingURL=chunk-
|
|
1153
|
+
//# sourceMappingURL=chunk-BFIYBPFD.js.map
|
|
@@ -10,6 +10,13 @@ import {
|
|
|
10
10
|
useTranslation
|
|
11
11
|
} from "./chunk-Y7ZVTWMZ.js";
|
|
12
12
|
|
|
13
|
+
// app/renderer/lib/utils.ts
|
|
14
|
+
import { clsx } from "clsx";
|
|
15
|
+
import { twMerge } from "tailwind-merge";
|
|
16
|
+
function cn(...inputs) {
|
|
17
|
+
return twMerge(clsx(inputs));
|
|
18
|
+
}
|
|
19
|
+
|
|
13
20
|
// shared/agentMcpToolTarget.ts
|
|
14
21
|
function extractAgentMcpToolTarget({
|
|
15
22
|
input: rawInput,
|
|
@@ -276,13 +283,6 @@ import {
|
|
|
276
283
|
import { RotateCcwIcon, ZoomInIcon, ZoomOutIcon } from "lucide-react";
|
|
277
284
|
import Zoom from "react-medium-image-zoom";
|
|
278
285
|
|
|
279
|
-
// app/renderer/lib/utils.ts
|
|
280
|
-
import { clsx } from "clsx";
|
|
281
|
-
import { twMerge } from "tailwind-merge";
|
|
282
|
-
function cn(...inputs) {
|
|
283
|
-
return twMerge(clsx(inputs));
|
|
284
|
-
}
|
|
285
|
-
|
|
286
286
|
// shared/agentConversation/components/ConversationImageContextMenu.tsx
|
|
287
287
|
import {
|
|
288
288
|
useCallback,
|
|
@@ -2361,6 +2361,7 @@ function MentionLink({
|
|
|
2361
2361
|
"data-agent-mention-icon-url": mention.iconUrl,
|
|
2362
2362
|
"data-agent-mention-href": href,
|
|
2363
2363
|
"data-agent-mention-kind": mention.kind,
|
|
2364
|
+
"data-agent-reference-source": mention.referenceSource,
|
|
2364
2365
|
"aria-label": mention.label,
|
|
2365
2366
|
role: "link",
|
|
2366
2367
|
tabIndex: 0,
|
|
@@ -2974,6 +2975,7 @@ function parseMentionLink(href, rawLabel, workspaceAppIcons = [], appFactoryFall
|
|
|
2974
2975
|
iconUrl: mention.scope?.icon?.trim() || appIconUrl,
|
|
2975
2976
|
fileCount: referenceFileCountFromParam(mention.scope?.count ?? null),
|
|
2976
2977
|
participant: label,
|
|
2978
|
+
referenceSource: source || void 0,
|
|
2977
2979
|
summary: ""
|
|
2978
2980
|
};
|
|
2979
2981
|
}
|
|
@@ -3145,173 +3147,15 @@ var styles = {
|
|
|
3145
3147
|
};
|
|
3146
3148
|
var AgentGUIConversation_styles_default = styles;
|
|
3147
3149
|
|
|
3148
|
-
// app/renderer/components/
|
|
3150
|
+
// app/renderer/components/ui/custom-scroll-area.tsx
|
|
3149
3151
|
import {
|
|
3150
3152
|
forwardRef,
|
|
3151
3153
|
useCallback as useCallback4,
|
|
3152
3154
|
useEffect as useEffect4,
|
|
3153
|
-
|
|
3154
|
-
useRef as useRef3
|
|
3155
|
-
} from "react";
|
|
3156
|
-
import {
|
|
3157
|
-
motion,
|
|
3158
|
-
useAnimation,
|
|
3159
|
-
useReducedMotion
|
|
3160
|
-
} from "framer-motion";
|
|
3161
|
-
import { jsx as jsx4, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
3162
|
-
var DOT_TRANSITION = {
|
|
3163
|
-
times: [0, 0.1, 0.1, 0.2, 0.5, 0.6, 0.6, 0.7],
|
|
3164
|
-
duration: 1.5
|
|
3165
|
-
};
|
|
3166
|
-
var DOT_VARIANTS = {
|
|
3167
|
-
normal: {
|
|
3168
|
-
opacity: 1
|
|
3169
|
-
},
|
|
3170
|
-
animate: (custom) => ({
|
|
3171
|
-
opacity: [1, 0, 0, 1, 1, 0, 0, 1],
|
|
3172
|
-
transition: {
|
|
3173
|
-
opacity: {
|
|
3174
|
-
...DOT_TRANSITION,
|
|
3175
|
-
times: DOT_TRANSITION.times.map(
|
|
3176
|
-
(time, index) => index === 2 || index === 3 || index === 6 || index === 7 ? time + custom * 0.1 : time
|
|
3177
|
-
)
|
|
3178
|
-
}
|
|
3179
|
-
}
|
|
3180
|
-
}),
|
|
3181
|
-
active: (custom) => ({
|
|
3182
|
-
opacity: [1, 0, 0, 1, 1, 0, 0, 1],
|
|
3183
|
-
transition: {
|
|
3184
|
-
opacity: {
|
|
3185
|
-
...DOT_TRANSITION,
|
|
3186
|
-
repeat: Infinity,
|
|
3187
|
-
times: DOT_TRANSITION.times.map(
|
|
3188
|
-
(time, index) => index === 2 || index === 3 || index === 6 || index === 7 ? time + custom * 0.1 : time
|
|
3189
|
-
)
|
|
3190
|
-
}
|
|
3191
|
-
}
|
|
3192
|
-
})
|
|
3193
|
-
};
|
|
3194
|
-
var MessageSquareMoreIcon = forwardRef(
|
|
3195
|
-
({
|
|
3196
|
-
active = false,
|
|
3197
|
-
onMouseEnter,
|
|
3198
|
-
onMouseLeave,
|
|
3199
|
-
className,
|
|
3200
|
-
size = 28,
|
|
3201
|
-
...props
|
|
3202
|
-
}, ref) => {
|
|
3203
|
-
const controls = useAnimation();
|
|
3204
|
-
const reduceMotion = useReducedMotion();
|
|
3205
|
-
const isControlledRef = useRef3(false);
|
|
3206
|
-
const startAnimation = useCallback4(() => {
|
|
3207
|
-
if (reduceMotion) {
|
|
3208
|
-
return;
|
|
3209
|
-
}
|
|
3210
|
-
void controls.start(active ? "active" : "animate");
|
|
3211
|
-
}, [active, controls, reduceMotion]);
|
|
3212
|
-
const stopAnimation = useCallback4(() => {
|
|
3213
|
-
void controls.start("normal");
|
|
3214
|
-
}, [controls]);
|
|
3215
|
-
useImperativeHandle(ref, () => {
|
|
3216
|
-
isControlledRef.current = true;
|
|
3217
|
-
return {
|
|
3218
|
-
startAnimation,
|
|
3219
|
-
stopAnimation
|
|
3220
|
-
};
|
|
3221
|
-
});
|
|
3222
|
-
useEffect4(() => {
|
|
3223
|
-
if (active) {
|
|
3224
|
-
startAnimation();
|
|
3225
|
-
return;
|
|
3226
|
-
}
|
|
3227
|
-
stopAnimation();
|
|
3228
|
-
}, [active, startAnimation, stopAnimation]);
|
|
3229
|
-
const handleMouseEnter = useCallback4(
|
|
3230
|
-
(event) => {
|
|
3231
|
-
if (isControlledRef.current) {
|
|
3232
|
-
onMouseEnter?.(event);
|
|
3233
|
-
} else {
|
|
3234
|
-
startAnimation();
|
|
3235
|
-
}
|
|
3236
|
-
},
|
|
3237
|
-
[onMouseEnter, startAnimation]
|
|
3238
|
-
);
|
|
3239
|
-
const handleMouseLeave = useCallback4(
|
|
3240
|
-
(event) => {
|
|
3241
|
-
if (isControlledRef.current) {
|
|
3242
|
-
onMouseLeave?.(event);
|
|
3243
|
-
} else {
|
|
3244
|
-
stopAnimation();
|
|
3245
|
-
}
|
|
3246
|
-
},
|
|
3247
|
-
[onMouseLeave, stopAnimation]
|
|
3248
|
-
);
|
|
3249
|
-
return /* @__PURE__ */ jsx4(
|
|
3250
|
-
"div",
|
|
3251
|
-
{
|
|
3252
|
-
className: cn("inline-flex items-center justify-center", className),
|
|
3253
|
-
onMouseEnter: handleMouseEnter,
|
|
3254
|
-
onMouseLeave: handleMouseLeave,
|
|
3255
|
-
...props,
|
|
3256
|
-
children: /* @__PURE__ */ jsxs4(
|
|
3257
|
-
"svg",
|
|
3258
|
-
{
|
|
3259
|
-
fill: "none",
|
|
3260
|
-
height: size,
|
|
3261
|
-
stroke: "currentColor",
|
|
3262
|
-
strokeLinecap: "round",
|
|
3263
|
-
strokeLinejoin: "round",
|
|
3264
|
-
strokeWidth: "2",
|
|
3265
|
-
viewBox: "0 0 24 24",
|
|
3266
|
-
width: size,
|
|
3267
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
3268
|
-
children: [
|
|
3269
|
-
/* @__PURE__ */ jsx4("path", { d: "M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z" }),
|
|
3270
|
-
/* @__PURE__ */ jsx4(
|
|
3271
|
-
motion.path,
|
|
3272
|
-
{
|
|
3273
|
-
animate: controls,
|
|
3274
|
-
custom: 0,
|
|
3275
|
-
d: "M8 10h.01",
|
|
3276
|
-
variants: DOT_VARIANTS
|
|
3277
|
-
}
|
|
3278
|
-
),
|
|
3279
|
-
/* @__PURE__ */ jsx4(
|
|
3280
|
-
motion.path,
|
|
3281
|
-
{
|
|
3282
|
-
animate: controls,
|
|
3283
|
-
custom: 1,
|
|
3284
|
-
d: "M12 10h.01",
|
|
3285
|
-
variants: DOT_VARIANTS
|
|
3286
|
-
}
|
|
3287
|
-
),
|
|
3288
|
-
/* @__PURE__ */ jsx4(
|
|
3289
|
-
motion.path,
|
|
3290
|
-
{
|
|
3291
|
-
animate: controls,
|
|
3292
|
-
custom: 2,
|
|
3293
|
-
d: "M16 10h.01",
|
|
3294
|
-
variants: DOT_VARIANTS
|
|
3295
|
-
}
|
|
3296
|
-
)
|
|
3297
|
-
]
|
|
3298
|
-
}
|
|
3299
|
-
)
|
|
3300
|
-
}
|
|
3301
|
-
);
|
|
3302
|
-
}
|
|
3303
|
-
);
|
|
3304
|
-
MessageSquareMoreIcon.displayName = "MessageSquareMoreIcon";
|
|
3305
|
-
|
|
3306
|
-
// app/renderer/components/ui/custom-scroll-area.tsx
|
|
3307
|
-
import {
|
|
3308
|
-
forwardRef as forwardRef2,
|
|
3309
|
-
useCallback as useCallback5,
|
|
3310
|
-
useEffect as useEffect5,
|
|
3311
|
-
useRef as useRef4,
|
|
3155
|
+
useRef as useRef3,
|
|
3312
3156
|
useState as useState5
|
|
3313
3157
|
} from "react";
|
|
3314
|
-
import { jsx as
|
|
3158
|
+
import { jsx as jsx4, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
3315
3159
|
var MIN_THUMB_HEIGHT = 24;
|
|
3316
3160
|
function CustomScrollbar({
|
|
3317
3161
|
getViewport,
|
|
@@ -3322,15 +3166,15 @@ function CustomScrollbar({
|
|
|
3322
3166
|
syncKey
|
|
3323
3167
|
}) {
|
|
3324
3168
|
"use memo";
|
|
3325
|
-
const trackRef =
|
|
3326
|
-
const dragStateRef =
|
|
3169
|
+
const trackRef = useRef3(null);
|
|
3170
|
+
const dragStateRef = useRef3(null);
|
|
3327
3171
|
const [scrollbarState, setScrollbarState] = useState5({
|
|
3328
3172
|
scrollable: false,
|
|
3329
3173
|
thumbHeight: 0,
|
|
3330
3174
|
thumbTop: 0
|
|
3331
3175
|
});
|
|
3332
3176
|
const [dragging, setDragging] = useState5(false);
|
|
3333
|
-
const syncScrollbarState =
|
|
3177
|
+
const syncScrollbarState = useCallback4(() => {
|
|
3334
3178
|
const viewport = getViewport();
|
|
3335
3179
|
if (!viewport) {
|
|
3336
3180
|
setScrollbarState({ scrollable: false, thumbHeight: 0, thumbTop: 0 });
|
|
@@ -3353,7 +3197,7 @@ function CustomScrollbar({
|
|
|
3353
3197
|
(previous) => previous.scrollable && previous.thumbHeight === thumbHeight && previous.thumbTop === thumbTop ? previous : { scrollable: true, thumbHeight, thumbTop }
|
|
3354
3198
|
);
|
|
3355
3199
|
}, [getViewport]);
|
|
3356
|
-
const scrollViewportToThumbTop =
|
|
3200
|
+
const scrollViewportToThumbTop = useCallback4(
|
|
3357
3201
|
(thumbTop) => {
|
|
3358
3202
|
const viewport = getViewport();
|
|
3359
3203
|
const track = trackRef.current;
|
|
@@ -3376,7 +3220,7 @@ function CustomScrollbar({
|
|
|
3376
3220
|
},
|
|
3377
3221
|
[getViewport, scrollbarState.thumbHeight, syncScrollbarState]
|
|
3378
3222
|
);
|
|
3379
|
-
const handleTrackMouseDown =
|
|
3223
|
+
const handleTrackMouseDown = useCallback4(
|
|
3380
3224
|
(event) => {
|
|
3381
3225
|
if (event.button !== 0 || !scrollbarState.scrollable) {
|
|
3382
3226
|
return;
|
|
@@ -3398,7 +3242,7 @@ function CustomScrollbar({
|
|
|
3398
3242
|
scrollbarState.thumbHeight
|
|
3399
3243
|
]
|
|
3400
3244
|
);
|
|
3401
|
-
const handleThumbMouseDown =
|
|
3245
|
+
const handleThumbMouseDown = useCallback4(
|
|
3402
3246
|
(event) => {
|
|
3403
3247
|
if (event.button !== 0 || !scrollbarState.scrollable) {
|
|
3404
3248
|
return;
|
|
@@ -3431,7 +3275,7 @@ function CustomScrollbar({
|
|
|
3431
3275
|
},
|
|
3432
3276
|
[getViewport, scrollbarState.scrollable, scrollbarState.thumbHeight]
|
|
3433
3277
|
);
|
|
3434
|
-
|
|
3278
|
+
useEffect4(() => {
|
|
3435
3279
|
if (!dragging) {
|
|
3436
3280
|
return;
|
|
3437
3281
|
}
|
|
@@ -3456,7 +3300,7 @@ function CustomScrollbar({
|
|
|
3456
3300
|
window.removeEventListener("mouseup", handleMouseUp);
|
|
3457
3301
|
};
|
|
3458
3302
|
}, [dragging, getViewport, syncScrollbarState]);
|
|
3459
|
-
|
|
3303
|
+
useEffect4(() => {
|
|
3460
3304
|
const viewport = getViewport();
|
|
3461
3305
|
if (!viewport) {
|
|
3462
3306
|
setScrollbarState({ scrollable: false, thumbHeight: 0, thumbTop: 0 });
|
|
@@ -3473,7 +3317,7 @@ function CustomScrollbar({
|
|
|
3473
3317
|
resizeObserver?.disconnect();
|
|
3474
3318
|
};
|
|
3475
3319
|
}, [getViewport, syncKey, syncScrollbarState]);
|
|
3476
|
-
return /* @__PURE__ */
|
|
3320
|
+
return /* @__PURE__ */ jsx4(
|
|
3477
3321
|
"div",
|
|
3478
3322
|
{
|
|
3479
3323
|
ref: trackRef,
|
|
@@ -3483,7 +3327,7 @@ function CustomScrollbar({
|
|
|
3483
3327
|
"data-testid": testId,
|
|
3484
3328
|
"aria-hidden": "true",
|
|
3485
3329
|
onMouseDown: handleTrackMouseDown,
|
|
3486
|
-
children: /* @__PURE__ */
|
|
3330
|
+
children: /* @__PURE__ */ jsx4(
|
|
3487
3331
|
"div",
|
|
3488
3332
|
{
|
|
3489
3333
|
className: cn("tsh-custom-scrollbar__thumb", thumbClassName),
|
|
@@ -3498,7 +3342,7 @@ function CustomScrollbar({
|
|
|
3498
3342
|
}
|
|
3499
3343
|
);
|
|
3500
3344
|
}
|
|
3501
|
-
var CustomScrollArea =
|
|
3345
|
+
var CustomScrollArea = forwardRef(function CustomScrollArea2({
|
|
3502
3346
|
children,
|
|
3503
3347
|
className,
|
|
3504
3348
|
viewportClassName,
|
|
@@ -3510,9 +3354,9 @@ var CustomScrollArea = forwardRef2(function CustomScrollArea2({
|
|
|
3510
3354
|
...viewportProps
|
|
3511
3355
|
}, forwardedRef) {
|
|
3512
3356
|
"use memo";
|
|
3513
|
-
const viewportRef =
|
|
3514
|
-
const getViewport =
|
|
3515
|
-
return /* @__PURE__ */
|
|
3357
|
+
const viewportRef = useRef3(null);
|
|
3358
|
+
const getViewport = useCallback4(() => viewportRef.current, []);
|
|
3359
|
+
return /* @__PURE__ */ jsxs4(
|
|
3516
3360
|
"div",
|
|
3517
3361
|
{
|
|
3518
3362
|
className: cn(
|
|
@@ -3520,7 +3364,7 @@ var CustomScrollArea = forwardRef2(function CustomScrollArea2({
|
|
|
3520
3364
|
className
|
|
3521
3365
|
),
|
|
3522
3366
|
children: [
|
|
3523
|
-
/* @__PURE__ */
|
|
3367
|
+
/* @__PURE__ */ jsx4(
|
|
3524
3368
|
"div",
|
|
3525
3369
|
{
|
|
3526
3370
|
ref: setRefs(viewportRef, forwardedRef),
|
|
@@ -3532,7 +3376,7 @@ var CustomScrollArea = forwardRef2(function CustomScrollArea2({
|
|
|
3532
3376
|
children
|
|
3533
3377
|
}
|
|
3534
3378
|
),
|
|
3535
|
-
/* @__PURE__ */
|
|
3379
|
+
/* @__PURE__ */ jsx4(
|
|
3536
3380
|
CustomScrollbar,
|
|
3537
3381
|
{
|
|
3538
3382
|
getViewport,
|
|
@@ -3561,6 +3405,164 @@ function clamp(value, min, max) {
|
|
|
3561
3405
|
return Math.min(max, Math.max(min, value));
|
|
3562
3406
|
}
|
|
3563
3407
|
|
|
3408
|
+
// app/renderer/components/icons/MessageSquareMoreIcon.tsx
|
|
3409
|
+
import {
|
|
3410
|
+
forwardRef as forwardRef2,
|
|
3411
|
+
useCallback as useCallback5,
|
|
3412
|
+
useEffect as useEffect5,
|
|
3413
|
+
useImperativeHandle,
|
|
3414
|
+
useRef as useRef4
|
|
3415
|
+
} from "react";
|
|
3416
|
+
import {
|
|
3417
|
+
motion,
|
|
3418
|
+
useAnimation,
|
|
3419
|
+
useReducedMotion
|
|
3420
|
+
} from "framer-motion";
|
|
3421
|
+
import { jsx as jsx5, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
3422
|
+
var DOT_TRANSITION = {
|
|
3423
|
+
times: [0, 0.1, 0.1, 0.2, 0.5, 0.6, 0.6, 0.7],
|
|
3424
|
+
duration: 1.5
|
|
3425
|
+
};
|
|
3426
|
+
var DOT_VARIANTS = {
|
|
3427
|
+
normal: {
|
|
3428
|
+
opacity: 1
|
|
3429
|
+
},
|
|
3430
|
+
animate: (custom) => ({
|
|
3431
|
+
opacity: [1, 0, 0, 1, 1, 0, 0, 1],
|
|
3432
|
+
transition: {
|
|
3433
|
+
opacity: {
|
|
3434
|
+
...DOT_TRANSITION,
|
|
3435
|
+
times: DOT_TRANSITION.times.map(
|
|
3436
|
+
(time, index) => index === 2 || index === 3 || index === 6 || index === 7 ? time + custom * 0.1 : time
|
|
3437
|
+
)
|
|
3438
|
+
}
|
|
3439
|
+
}
|
|
3440
|
+
}),
|
|
3441
|
+
active: (custom) => ({
|
|
3442
|
+
opacity: [1, 0, 0, 1, 1, 0, 0, 1],
|
|
3443
|
+
transition: {
|
|
3444
|
+
opacity: {
|
|
3445
|
+
...DOT_TRANSITION,
|
|
3446
|
+
repeat: Infinity,
|
|
3447
|
+
times: DOT_TRANSITION.times.map(
|
|
3448
|
+
(time, index) => index === 2 || index === 3 || index === 6 || index === 7 ? time + custom * 0.1 : time
|
|
3449
|
+
)
|
|
3450
|
+
}
|
|
3451
|
+
}
|
|
3452
|
+
})
|
|
3453
|
+
};
|
|
3454
|
+
var MessageSquareMoreIcon = forwardRef2(
|
|
3455
|
+
({
|
|
3456
|
+
active = false,
|
|
3457
|
+
onMouseEnter,
|
|
3458
|
+
onMouseLeave,
|
|
3459
|
+
className,
|
|
3460
|
+
size = 28,
|
|
3461
|
+
...props
|
|
3462
|
+
}, ref) => {
|
|
3463
|
+
const controls = useAnimation();
|
|
3464
|
+
const reduceMotion = useReducedMotion();
|
|
3465
|
+
const isControlledRef = useRef4(false);
|
|
3466
|
+
const startAnimation = useCallback5(() => {
|
|
3467
|
+
if (reduceMotion) {
|
|
3468
|
+
return;
|
|
3469
|
+
}
|
|
3470
|
+
void controls.start(active ? "active" : "animate");
|
|
3471
|
+
}, [active, controls, reduceMotion]);
|
|
3472
|
+
const stopAnimation = useCallback5(() => {
|
|
3473
|
+
void controls.start("normal");
|
|
3474
|
+
}, [controls]);
|
|
3475
|
+
useImperativeHandle(ref, () => {
|
|
3476
|
+
isControlledRef.current = true;
|
|
3477
|
+
return {
|
|
3478
|
+
startAnimation,
|
|
3479
|
+
stopAnimation
|
|
3480
|
+
};
|
|
3481
|
+
});
|
|
3482
|
+
useEffect5(() => {
|
|
3483
|
+
if (active) {
|
|
3484
|
+
startAnimation();
|
|
3485
|
+
return;
|
|
3486
|
+
}
|
|
3487
|
+
stopAnimation();
|
|
3488
|
+
}, [active, startAnimation, stopAnimation]);
|
|
3489
|
+
const handleMouseEnter = useCallback5(
|
|
3490
|
+
(event) => {
|
|
3491
|
+
if (isControlledRef.current) {
|
|
3492
|
+
onMouseEnter?.(event);
|
|
3493
|
+
} else {
|
|
3494
|
+
startAnimation();
|
|
3495
|
+
}
|
|
3496
|
+
},
|
|
3497
|
+
[onMouseEnter, startAnimation]
|
|
3498
|
+
);
|
|
3499
|
+
const handleMouseLeave = useCallback5(
|
|
3500
|
+
(event) => {
|
|
3501
|
+
if (isControlledRef.current) {
|
|
3502
|
+
onMouseLeave?.(event);
|
|
3503
|
+
} else {
|
|
3504
|
+
stopAnimation();
|
|
3505
|
+
}
|
|
3506
|
+
},
|
|
3507
|
+
[onMouseLeave, stopAnimation]
|
|
3508
|
+
);
|
|
3509
|
+
return /* @__PURE__ */ jsx5(
|
|
3510
|
+
"div",
|
|
3511
|
+
{
|
|
3512
|
+
className: cn("inline-flex items-center justify-center", className),
|
|
3513
|
+
onMouseEnter: handleMouseEnter,
|
|
3514
|
+
onMouseLeave: handleMouseLeave,
|
|
3515
|
+
...props,
|
|
3516
|
+
children: /* @__PURE__ */ jsxs5(
|
|
3517
|
+
"svg",
|
|
3518
|
+
{
|
|
3519
|
+
fill: "none",
|
|
3520
|
+
height: size,
|
|
3521
|
+
stroke: "currentColor",
|
|
3522
|
+
strokeLinecap: "round",
|
|
3523
|
+
strokeLinejoin: "round",
|
|
3524
|
+
strokeWidth: "2",
|
|
3525
|
+
viewBox: "0 0 24 24",
|
|
3526
|
+
width: size,
|
|
3527
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
3528
|
+
children: [
|
|
3529
|
+
/* @__PURE__ */ jsx5("path", { d: "M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z" }),
|
|
3530
|
+
/* @__PURE__ */ jsx5(
|
|
3531
|
+
motion.path,
|
|
3532
|
+
{
|
|
3533
|
+
animate: controls,
|
|
3534
|
+
custom: 0,
|
|
3535
|
+
d: "M8 10h.01",
|
|
3536
|
+
variants: DOT_VARIANTS
|
|
3537
|
+
}
|
|
3538
|
+
),
|
|
3539
|
+
/* @__PURE__ */ jsx5(
|
|
3540
|
+
motion.path,
|
|
3541
|
+
{
|
|
3542
|
+
animate: controls,
|
|
3543
|
+
custom: 1,
|
|
3544
|
+
d: "M12 10h.01",
|
|
3545
|
+
variants: DOT_VARIANTS
|
|
3546
|
+
}
|
|
3547
|
+
),
|
|
3548
|
+
/* @__PURE__ */ jsx5(
|
|
3549
|
+
motion.path,
|
|
3550
|
+
{
|
|
3551
|
+
animate: controls,
|
|
3552
|
+
custom: 2,
|
|
3553
|
+
d: "M16 10h.01",
|
|
3554
|
+
variants: DOT_VARIANTS
|
|
3555
|
+
}
|
|
3556
|
+
)
|
|
3557
|
+
]
|
|
3558
|
+
}
|
|
3559
|
+
)
|
|
3560
|
+
}
|
|
3561
|
+
);
|
|
3562
|
+
}
|
|
3563
|
+
);
|
|
3564
|
+
MessageSquareMoreIcon.displayName = "MessageSquareMoreIcon";
|
|
3565
|
+
|
|
3564
3566
|
export {
|
|
3565
3567
|
cn,
|
|
3566
3568
|
extractAgentMcpToolTarget,
|
|
@@ -3577,4 +3579,4 @@ export {
|
|
|
3577
3579
|
CustomScrollArea,
|
|
3578
3580
|
MessageSquareMoreIcon
|
|
3579
3581
|
};
|
|
3580
|
-
//# sourceMappingURL=chunk-
|
|
3582
|
+
//# sourceMappingURL=chunk-PIKG746A.js.map
|