@superinterface/react 2.24.6 → 2.25.0

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/index.js CHANGED
@@ -789,7 +789,7 @@ var UserAvatar = function() {
789
789
  // src/components/threads/Thread/Messages/Content/MessageGroup/Content/index.tsx
790
790
  import { Flex as Flex15 } from "@radix-ui/themes";
791
791
  // src/components/threads/Thread/Message/index.tsx
792
- import { useMemo as useMemo6, Fragment } from "react";
792
+ import { useMemo as useMemo6 } from "react";
793
793
  import { isEmpty } from "radash";
794
794
  import { Box as Box10 } from "@radix-ui/themes";
795
795
  // src/components/skeletons/StartingContentSkeleton/index.tsx
@@ -1211,7 +1211,30 @@ var MessageContext = createContext8({
1211
1211
  });
1212
1212
  // src/components/threads/Thread/Message/Provider.tsx
1213
1213
  var Provider = MessageContext.Provider;
1214
- // src/components/threads/Thread/Message/TextContent.tsx
1214
+ // src/components/threads/Thread/Message/Attachments/index.tsx
1215
+ import { Flex as Flex11, Badge } from "@radix-ui/themes";
1216
+ import { FileIcon } from "@radix-ui/react-icons";
1217
+ import { jsx as jsx26, jsxs as jsxs10 } from "react/jsx-runtime";
1218
+ var Attachments = function(param) {
1219
+ var message = param.message;
1220
+ var _message_attachments;
1221
+ if (!((_message_attachments = message.attachments) === null || _message_attachments === void 0 ? void 0 : _message_attachments.length)) return null;
1222
+ return /* @__PURE__ */ jsx26(Flex11, {
1223
+ align: "start",
1224
+ pb: "1",
1225
+ children: /* @__PURE__ */ jsxs10(Badge, {
1226
+ color: "gray",
1227
+ variant: "surface",
1228
+ children: [
1229
+ /* @__PURE__ */ jsx26(FileIcon, {}),
1230
+ message.attachments.length,
1231
+ " file",
1232
+ message.attachments.length > 1 ? "s" : ""
1233
+ ]
1234
+ })
1235
+ });
1236
+ };
1237
+ // src/components/threads/Thread/Message/ContentPart/TextContent.tsx
1215
1238
  import Markdown from "react-markdown";
1216
1239
  // src/hooks/markdown/useMarkdownContext/index.ts
1217
1240
  import { useContext as useContext7 } from "react";
@@ -1221,12 +1244,12 @@ import { createContext as createContext9 } from "react";
1221
1244
  import { Heading, Table } from "@radix-ui/themes";
1222
1245
  // src/contexts/markdown/MarkdownContext/lib/components/Paragraph.tsx
1223
1246
  import { Box as Box4, Text as Text4 } from "@radix-ui/themes";
1224
- import { jsx as jsx26 } from "react/jsx-runtime";
1247
+ import { jsx as jsx27 } from "react/jsx-runtime";
1225
1248
  var Paragraph = function(param) {
1226
1249
  var children = param.children;
1227
- return /* @__PURE__ */ jsx26(Box4, {
1250
+ return /* @__PURE__ */ jsx27(Box4, {
1228
1251
  pb: "3",
1229
- children: /* @__PURE__ */ jsx26(Text4, {
1252
+ children: /* @__PURE__ */ jsx27(Text4, {
1230
1253
  size: "3",
1231
1254
  style: {
1232
1255
  whiteSpace: "pre-line",
@@ -1238,10 +1261,10 @@ var Paragraph = function(param) {
1238
1261
  };
1239
1262
  // src/contexts/markdown/MarkdownContext/lib/components/Link.tsx
1240
1263
  import { Link as RadixLink } from "@radix-ui/themes";
1241
- import { jsx as jsx27 } from "react/jsx-runtime";
1264
+ import { jsx as jsx28 } from "react/jsx-runtime";
1242
1265
  var Link = function(param) {
1243
1266
  var children = param.children, href = param.href, download = param.download, _param_target = param.target, target = _param_target === void 0 ? "_blank" : _param_target;
1244
- return /* @__PURE__ */ jsx27(RadixLink, {
1267
+ return /* @__PURE__ */ jsx28(RadixLink, {
1245
1268
  href: href,
1246
1269
  target: target,
1247
1270
  download: download,
@@ -1250,13 +1273,13 @@ var Link = function(param) {
1250
1273
  };
1251
1274
  // src/contexts/markdown/MarkdownContext/lib/components/UnorderedList.tsx
1252
1275
  import { Box as Box5 } from "@radix-ui/themes";
1253
- import { jsx as jsx28 } from "react/jsx-runtime";
1276
+ import { jsx as jsx29 } from "react/jsx-runtime";
1254
1277
  var UnorderedList = function(param) {
1255
1278
  var children = param.children;
1256
- return /* @__PURE__ */ jsx28(Box5, {
1279
+ return /* @__PURE__ */ jsx29(Box5, {
1257
1280
  pb: "3",
1258
1281
  asChild: true,
1259
- children: /* @__PURE__ */ jsx28("ul", {
1282
+ children: /* @__PURE__ */ jsx29("ul", {
1260
1283
  style: {
1261
1284
  listStylePosition: "inside"
1262
1285
  },
@@ -1266,13 +1289,13 @@ var UnorderedList = function(param) {
1266
1289
  };
1267
1290
  // src/contexts/markdown/MarkdownContext/lib/components/OrderedList.tsx
1268
1291
  import { Box as Box6 } from "@radix-ui/themes";
1269
- import { jsx as jsx29 } from "react/jsx-runtime";
1292
+ import { jsx as jsx30 } from "react/jsx-runtime";
1270
1293
  var OrderedList = function(param) {
1271
1294
  var children = param.children;
1272
- return /* @__PURE__ */ jsx29(Box6, {
1295
+ return /* @__PURE__ */ jsx30(Box6, {
1273
1296
  pb: "3",
1274
1297
  asChild: true,
1275
- children: /* @__PURE__ */ jsx29("ol", {
1298
+ children: /* @__PURE__ */ jsx30("ol", {
1276
1299
  style: {
1277
1300
  listStylePosition: "inside"
1278
1301
  },
@@ -1282,31 +1305,31 @@ var OrderedList = function(param) {
1282
1305
  };
1283
1306
  // src/contexts/markdown/MarkdownContext/lib/components/ListItem.tsx
1284
1307
  import { Box as Box7 } from "@radix-ui/themes";
1285
- import { jsx as jsx30 } from "react/jsx-runtime";
1308
+ import { jsx as jsx31 } from "react/jsx-runtime";
1286
1309
  var ListItem = function(param) {
1287
1310
  var children = param.children;
1288
- return /* @__PURE__ */ jsx30(Box7, {
1311
+ return /* @__PURE__ */ jsx31(Box7, {
1289
1312
  pb: "1",
1290
- children: /* @__PURE__ */ jsx30("li", {
1313
+ children: /* @__PURE__ */ jsx31("li", {
1291
1314
  children: children
1292
1315
  })
1293
1316
  });
1294
1317
  };
1295
1318
  // src/contexts/markdown/MarkdownContext/lib/components/Strong.tsx
1296
1319
  import { Strong as RadixStrong } from "@radix-ui/themes";
1297
- import { jsx as jsx31 } from "react/jsx-runtime";
1320
+ import { jsx as jsx32 } from "react/jsx-runtime";
1298
1321
  var Strong = function(param) {
1299
1322
  var children = param.children;
1300
- return /* @__PURE__ */ jsx31(RadixStrong, {
1323
+ return /* @__PURE__ */ jsx32(RadixStrong, {
1301
1324
  children: children
1302
1325
  });
1303
1326
  };
1304
1327
  // src/contexts/markdown/MarkdownContext/lib/components/Pre.tsx
1305
1328
  import { Box as Box8 } from "@radix-ui/themes";
1306
- import { jsx as jsx32 } from "react/jsx-runtime";
1329
+ import { jsx as jsx33 } from "react/jsx-runtime";
1307
1330
  var Pre = function(param) {
1308
1331
  var children = param.children;
1309
- return /* @__PURE__ */ jsx32(Box8, {
1332
+ return /* @__PURE__ */ jsx33(Box8, {
1310
1333
  style: {
1311
1334
  whiteSpace: "pre-wrap",
1312
1335
  wordBreak: "break-word"
@@ -1316,13 +1339,27 @@ var Pre = function(param) {
1316
1339
  };
1317
1340
  // src/contexts/markdown/MarkdownContext/lib/components/Code.tsx
1318
1341
  import { Code as RadixCode } from "@radix-ui/themes";
1319
- import { jsx as jsx33 } from "react/jsx-runtime";
1342
+ import { jsx as jsx34 } from "react/jsx-runtime";
1320
1343
  var Code3 = function(param) {
1321
1344
  var children = param.children;
1322
- return /* @__PURE__ */ jsx33(RadixCode, {
1345
+ return /* @__PURE__ */ jsx34(RadixCode, {
1323
1346
  children: children
1324
1347
  });
1325
1348
  };
1349
+ // src/components/images/Image.tsx
1350
+ import { Box as Box9 } from "@radix-ui/themes";
1351
+ import { jsx as jsx35 } from "react/jsx-runtime";
1352
+ var Image = function(props) {
1353
+ return /* @__PURE__ */ jsx35(Box9, {
1354
+ pb: "3",
1355
+ children: /* @__PURE__ */ jsx35("img", _object_spread_props(_object_spread({}, props), {
1356
+ style: {
1357
+ maxWidth: "100%",
1358
+ height: "auto"
1359
+ }
1360
+ }))
1361
+ });
1362
+ };
1326
1363
  // src/contexts/markdown/MarkdownContext/lib/components/Img/lib/isVideoSrc.ts
1327
1364
  import videoExtensions from "video-extensions";
1328
1365
  var isVideoSrc = function(param) {
@@ -1335,21 +1372,21 @@ var isAudioSrc = function(param) {
1335
1372
  return src.endsWith(".mp3") || src.endsWith(".wav");
1336
1373
  };
1337
1374
  // src/contexts/markdown/MarkdownContext/lib/components/Img/Video/index.tsx
1338
- import { Flex as Flex11 } from "@radix-ui/themes";
1375
+ import { Flex as Flex12 } from "@radix-ui/themes";
1339
1376
  import "@vidstack/react/player/styles/base.css";
1340
1377
  import { MediaPlayer, MediaProvider, Controls } from "@vidstack/react";
1341
1378
  // src/components/media/PlayButton.tsx
1342
1379
  import { PlayButton as VidstackPlayButton, useMediaState } from "@vidstack/react";
1343
1380
  import { IconButton } from "@radix-ui/themes";
1344
1381
  import { PlayIcon, PauseIcon } from "@radix-ui/react-icons";
1345
- import { jsx as jsx34 } from "react/jsx-runtime";
1382
+ import { jsx as jsx36 } from "react/jsx-runtime";
1346
1383
  var PlayButton = function() {
1347
1384
  var isPaused = useMediaState("paused");
1348
- return /* @__PURE__ */ jsx34(IconButton, {
1385
+ return /* @__PURE__ */ jsx36(IconButton, {
1349
1386
  variant: "ghost",
1350
1387
  asChild: true,
1351
- children: /* @__PURE__ */ jsx34(VidstackPlayButton, {
1352
- children: isPaused ? /* @__PURE__ */ jsx34(PlayIcon, {}) : /* @__PURE__ */ jsx34(PauseIcon, {})
1388
+ children: /* @__PURE__ */ jsx36(VidstackPlayButton, {
1389
+ children: isPaused ? /* @__PURE__ */ jsx36(PlayIcon, {}) : /* @__PURE__ */ jsx36(PauseIcon, {})
1353
1390
  })
1354
1391
  });
1355
1392
  };
@@ -1357,27 +1394,27 @@ var PlayButton = function() {
1357
1394
  import { MuteButton, useMediaState as useMediaState2, useMediaRemote } from "@vidstack/react";
1358
1395
  import { IconButton as IconButton2, HoverCard, Slider } from "@radix-ui/themes";
1359
1396
  import { SpeakerModerateIcon, SpeakerOffIcon } from "@radix-ui/react-icons";
1360
- import { jsx as jsx35, jsxs as jsxs10 } from "react/jsx-runtime";
1397
+ import { jsx as jsx37, jsxs as jsxs11 } from "react/jsx-runtime";
1361
1398
  var VolumeButton = function() {
1362
1399
  var volume = useMediaState2("volume");
1363
1400
  var isMuted = useMediaState2("muted");
1364
1401
  var remote = useMediaRemote();
1365
- return /* @__PURE__ */ jsxs10(HoverCard.Root, {
1402
+ return /* @__PURE__ */ jsxs11(HoverCard.Root, {
1366
1403
  children: [
1367
- /* @__PURE__ */ jsx35(HoverCard.Trigger, {
1368
- children: /* @__PURE__ */ jsx35(IconButton2, {
1404
+ /* @__PURE__ */ jsx37(HoverCard.Trigger, {
1405
+ children: /* @__PURE__ */ jsx37(IconButton2, {
1369
1406
  variant: "ghost",
1370
1407
  asChild: true,
1371
- children: /* @__PURE__ */ jsx35(MuteButton, {
1372
- children: isMuted || volume === 0 ? /* @__PURE__ */ jsx35(SpeakerOffIcon, {}) : /* @__PURE__ */ jsx35(SpeakerModerateIcon, {})
1408
+ children: /* @__PURE__ */ jsx37(MuteButton, {
1409
+ children: isMuted || volume === 0 ? /* @__PURE__ */ jsx37(SpeakerOffIcon, {}) : /* @__PURE__ */ jsx37(SpeakerModerateIcon, {})
1373
1410
  })
1374
1411
  })
1375
1412
  }),
1376
- /* @__PURE__ */ jsx35(HoverCard.Content, {
1413
+ /* @__PURE__ */ jsx37(HoverCard.Content, {
1377
1414
  size: "1",
1378
1415
  side: "top",
1379
1416
  height: "100px",
1380
- children: /* @__PURE__ */ jsx35(Slider, {
1417
+ children: /* @__PURE__ */ jsx37(Slider, {
1381
1418
  size: "1",
1382
1419
  variant: "soft",
1383
1420
  orientation: "vertical",
@@ -1397,7 +1434,7 @@ var VolumeButton = function() {
1397
1434
  import { useState, useEffect, useMemo as useMemo5 } from "react";
1398
1435
  import { useMediaState as useMediaState3, useMediaRemote as useMediaRemote2 } from "@vidstack/react";
1399
1436
  import { Slider as Slider2 } from "@radix-ui/themes";
1400
- import { jsx as jsx36 } from "react/jsx-runtime";
1437
+ import { jsx as jsx38 } from "react/jsx-runtime";
1401
1438
  var Time = function() {
1402
1439
  var time = useMediaState3("currentTime");
1403
1440
  var duration = useMediaState3("duration");
@@ -1418,7 +1455,7 @@ var Time = function() {
1418
1455
  }, [
1419
1456
  duration
1420
1457
  ]);
1421
- return /* @__PURE__ */ jsx36(Slider2, {
1458
+ return /* @__PURE__ */ jsx38(Slider2, {
1422
1459
  size: "1",
1423
1460
  variant: "soft",
1424
1461
  value: [
@@ -1439,12 +1476,12 @@ var Time = function() {
1439
1476
  };
1440
1477
  // src/components/media/MediaContainer.tsx
1441
1478
  import { Card, Inset } from "@radix-ui/themes";
1442
- import { jsx as jsx37 } from "react/jsx-runtime";
1479
+ import { jsx as jsx39 } from "react/jsx-runtime";
1443
1480
  var MediaContainer = function(param) {
1444
1481
  var children = param.children;
1445
- return /* @__PURE__ */ jsx37(Card, {
1482
+ return /* @__PURE__ */ jsx39(Card, {
1446
1483
  mb: "3",
1447
- children: /* @__PURE__ */ jsx37(Inset, {
1484
+ children: /* @__PURE__ */ jsx39(Inset, {
1448
1485
  clip: "padding-box",
1449
1486
  style: {
1450
1487
  display: "flex",
@@ -1458,23 +1495,23 @@ var MediaContainer = function(param) {
1458
1495
  import { FullscreenButton as VidstackFullscreenButton, useMediaState as useMediaState4 } from "@vidstack/react";
1459
1496
  import { IconButton as IconButton3 } from "@radix-ui/themes";
1460
1497
  import { EnterFullScreenIcon, ExitFullScreenIcon } from "@radix-ui/react-icons";
1461
- import { jsx as jsx38 } from "react/jsx-runtime";
1498
+ import { jsx as jsx40 } from "react/jsx-runtime";
1462
1499
  var FullscreenButton = function() {
1463
1500
  var isFullscreen = useMediaState4("fullscreen");
1464
- return /* @__PURE__ */ jsx38(IconButton3, {
1501
+ return /* @__PURE__ */ jsx40(IconButton3, {
1465
1502
  variant: "ghost",
1466
1503
  asChild: true,
1467
- children: /* @__PURE__ */ jsx38(VidstackFullscreenButton, {
1468
- children: isFullscreen ? /* @__PURE__ */ jsx38(ExitFullScreenIcon, {}) : /* @__PURE__ */ jsx38(EnterFullScreenIcon, {})
1504
+ children: /* @__PURE__ */ jsx40(VidstackFullscreenButton, {
1505
+ children: isFullscreen ? /* @__PURE__ */ jsx40(ExitFullScreenIcon, {}) : /* @__PURE__ */ jsx40(EnterFullScreenIcon, {})
1469
1506
  })
1470
1507
  });
1471
1508
  };
1472
1509
  // src/contexts/markdown/MarkdownContext/lib/components/Img/Video/index.tsx
1473
- import { jsx as jsx39, jsxs as jsxs11 } from "react/jsx-runtime";
1510
+ import { jsx as jsx41, jsxs as jsxs12 } from "react/jsx-runtime";
1474
1511
  var Video = function(param) {
1475
1512
  var src = param.src;
1476
- return /* @__PURE__ */ jsx39(MediaContainer, {
1477
- children: /* @__PURE__ */ jsxs11(MediaPlayer, {
1513
+ return /* @__PURE__ */ jsx41(MediaContainer, {
1514
+ children: /* @__PURE__ */ jsxs12(MediaPlayer, {
1478
1515
  src: {
1479
1516
  src: src,
1480
1517
  type: "video/".concat(src.split(".").pop())
@@ -1483,11 +1520,11 @@ var Video = function(param) {
1483
1520
  hideControlsOnMouseLeave: true,
1484
1521
  crossOrigin: true,
1485
1522
  children: [
1486
- /* @__PURE__ */ jsx39(MediaProvider, {}),
1487
- /* @__PURE__ */ jsx39("style", {
1523
+ /* @__PURE__ */ jsx41(MediaProvider, {}),
1524
+ /* @__PURE__ */ jsx41("style", {
1488
1525
  children: "\n .superinterface-video-controls {\n opacity: 0;\n transition: opacity 0.2s ease-out;\n }\n\n .superinterface-video-controls[data-visible] {\n opacity: 1;\n }\n "
1489
1526
  }),
1490
- /* @__PURE__ */ jsx39(Flex11, {
1527
+ /* @__PURE__ */ jsx41(Flex12, {
1491
1528
  asChild: true,
1492
1529
  position: "absolute",
1493
1530
  bottom: "0",
@@ -1499,18 +1536,18 @@ var Video = function(param) {
1499
1536
  zIndex: 10,
1500
1537
  background: "var(--accent-4)"
1501
1538
  },
1502
- children: /* @__PURE__ */ jsx39(Controls.Root, {
1503
- children: /* @__PURE__ */ jsx39(Flex11, {
1539
+ children: /* @__PURE__ */ jsx41(Controls.Root, {
1540
+ children: /* @__PURE__ */ jsx41(Flex12, {
1504
1541
  asChild: true,
1505
1542
  align: "center",
1506
1543
  gap: "3",
1507
1544
  flexGrow: "1",
1508
- children: /* @__PURE__ */ jsxs11(Controls.Group, {
1545
+ children: /* @__PURE__ */ jsxs12(Controls.Group, {
1509
1546
  children: [
1510
- /* @__PURE__ */ jsx39(PlayButton, {}),
1511
- /* @__PURE__ */ jsx39(Time, {}),
1512
- /* @__PURE__ */ jsx39(VolumeButton, {}),
1513
- /* @__PURE__ */ jsx39(FullscreenButton, {})
1547
+ /* @__PURE__ */ jsx41(PlayButton, {}),
1548
+ /* @__PURE__ */ jsx41(Time, {}),
1549
+ /* @__PURE__ */ jsx41(VolumeButton, {}),
1550
+ /* @__PURE__ */ jsx41(FullscreenButton, {})
1514
1551
  ]
1515
1552
  })
1516
1553
  })
@@ -1521,14 +1558,14 @@ var Video = function(param) {
1521
1558
  });
1522
1559
  };
1523
1560
  // src/contexts/markdown/MarkdownContext/lib/components/Img/Audio/index.tsx
1524
- import { Flex as Flex12 } from "@radix-ui/themes";
1561
+ import { Flex as Flex13 } from "@radix-ui/themes";
1525
1562
  import "@vidstack/react/player/styles/base.css";
1526
1563
  import { MediaPlayer as MediaPlayer2, MediaProvider as MediaProvider2, Controls as Controls2 } from "@vidstack/react";
1527
- import { jsx as jsx40, jsxs as jsxs12 } from "react/jsx-runtime";
1564
+ import { jsx as jsx42, jsxs as jsxs13 } from "react/jsx-runtime";
1528
1565
  var Audio = function(param) {
1529
1566
  var src = param.src;
1530
- return /* @__PURE__ */ jsx40(MediaContainer, {
1531
- children: /* @__PURE__ */ jsxs12(MediaPlayer2, {
1567
+ return /* @__PURE__ */ jsx42(MediaContainer, {
1568
+ children: /* @__PURE__ */ jsxs13(MediaPlayer2, {
1532
1569
  src: {
1533
1570
  src: src,
1534
1571
  type: "audio/".concat(src.split(".").pop())
@@ -1537,8 +1574,8 @@ var Audio = function(param) {
1537
1574
  crossOrigin: true,
1538
1575
  playsInline: true,
1539
1576
  children: [
1540
- /* @__PURE__ */ jsx40(MediaProvider2, {}),
1541
- /* @__PURE__ */ jsx40(Flex12, {
1577
+ /* @__PURE__ */ jsx42(MediaProvider2, {}),
1578
+ /* @__PURE__ */ jsx42(Flex13, {
1542
1579
  asChild: true,
1543
1580
  p: "3",
1544
1581
  flexGrow: "1",
@@ -1546,17 +1583,17 @@ var Audio = function(param) {
1546
1583
  zIndex: 10,
1547
1584
  background: "var(--accent-4)"
1548
1585
  },
1549
- children: /* @__PURE__ */ jsx40(Controls2.Root, {
1550
- children: /* @__PURE__ */ jsx40(Flex12, {
1586
+ children: /* @__PURE__ */ jsx42(Controls2.Root, {
1587
+ children: /* @__PURE__ */ jsx42(Flex13, {
1551
1588
  asChild: true,
1552
1589
  align: "center",
1553
1590
  gap: "3",
1554
1591
  flexGrow: "1",
1555
- children: /* @__PURE__ */ jsxs12(Controls2.Group, {
1592
+ children: /* @__PURE__ */ jsxs13(Controls2.Group, {
1556
1593
  children: [
1557
- /* @__PURE__ */ jsx40(PlayButton, {}),
1558
- /* @__PURE__ */ jsx40(Time, {}),
1559
- /* @__PURE__ */ jsx40(VolumeButton, {})
1594
+ /* @__PURE__ */ jsx42(PlayButton, {}),
1595
+ /* @__PURE__ */ jsx42(Time, {}),
1596
+ /* @__PURE__ */ jsx42(VolumeButton, {})
1560
1597
  ]
1561
1598
  })
1562
1599
  })
@@ -1566,63 +1603,49 @@ var Audio = function(param) {
1566
1603
  })
1567
1604
  });
1568
1605
  };
1569
- // src/contexts/markdown/MarkdownContext/lib/components/Img/ImageComponent.tsx
1570
- import { Box as Box9 } from "@radix-ui/themes";
1571
- import { jsx as jsx41 } from "react/jsx-runtime";
1572
- var ImageComponent = function(props) {
1573
- return /* @__PURE__ */ jsx41(Box9, {
1574
- pb: "3",
1575
- children: /* @__PURE__ */ jsx41("img", _object_spread_props(_object_spread({}, props), {
1576
- style: {
1577
- maxWidth: "100%",
1578
- height: "auto"
1579
- }
1580
- }))
1581
- });
1582
- };
1583
1606
  // src/contexts/markdown/MarkdownContext/lib/components/Img/index.tsx
1584
- import { jsx as jsx42 } from "react/jsx-runtime";
1607
+ import { jsx as jsx43 } from "react/jsx-runtime";
1585
1608
  var Img = function(props) {
1586
1609
  if (!props.src) {
1587
- return /* @__PURE__ */ jsx42(ImageComponent, _object_spread({}, props));
1610
+ return /* @__PURE__ */ jsx43(Image, _object_spread({}, props));
1588
1611
  } else if (isVideoSrc({
1589
1612
  src: props.src
1590
1613
  })) {
1591
- return /* @__PURE__ */ jsx42(Video, {
1614
+ return /* @__PURE__ */ jsx43(Video, {
1592
1615
  src: props.src
1593
1616
  });
1594
1617
  } else if (isAudioSrc({
1595
1618
  src: props.src
1596
1619
  })) {
1597
- return /* @__PURE__ */ jsx42(Audio, {
1620
+ return /* @__PURE__ */ jsx43(Audio, {
1598
1621
  src: props.src
1599
1622
  });
1600
1623
  } else {
1601
- return /* @__PURE__ */ jsx42(ImageComponent, _object_spread({}, props));
1624
+ return /* @__PURE__ */ jsx43(Image, _object_spread({}, props));
1602
1625
  }
1603
1626
  };
1604
1627
  // src/contexts/markdown/MarkdownContext/lib/components/Annotation/index.tsx
1605
1628
  import { QuoteIcon } from "@radix-ui/react-icons";
1606
1629
  // src/contexts/markdown/MarkdownContext/lib/components/Annotation/AnnotationBase.tsx
1607
- import { IconButton as IconButton4, Popover as Popover4, Flex as Flex13, Text as Text5 } from "@radix-ui/themes";
1608
- import { jsx as jsx43, jsxs as jsxs13 } from "react/jsx-runtime";
1630
+ import { IconButton as IconButton4, Popover as Popover4, Flex as Flex14, Text as Text5 } from "@radix-ui/themes";
1631
+ import { jsx as jsx44, jsxs as jsxs14 } from "react/jsx-runtime";
1609
1632
  var AnnotationBase = function(param) {
1610
1633
  var icon = param.icon, content = param.content;
1611
- return /* @__PURE__ */ jsxs13(Popover4.Root, {
1634
+ return /* @__PURE__ */ jsxs14(Popover4.Root, {
1612
1635
  children: [
1613
- /* @__PURE__ */ jsx43(Popover4.Trigger, {
1614
- children: /* @__PURE__ */ jsx43(IconButton4, {
1636
+ /* @__PURE__ */ jsx44(Popover4.Trigger, {
1637
+ children: /* @__PURE__ */ jsx44(IconButton4, {
1615
1638
  variant: "soft",
1616
1639
  color: "gray",
1617
1640
  size: "1",
1618
1641
  children: icon
1619
1642
  })
1620
1643
  }),
1621
- /* @__PURE__ */ jsx43(Popover4.Content, {
1644
+ /* @__PURE__ */ jsx44(Popover4.Content, {
1622
1645
  size: "1",
1623
- children: /* @__PURE__ */ jsx43(Flex13, {
1646
+ children: /* @__PURE__ */ jsx44(Flex14, {
1624
1647
  direction: "column",
1625
- children: /* @__PURE__ */ jsx43(Text5, {
1648
+ children: /* @__PURE__ */ jsx44(Text5, {
1626
1649
  size: "1",
1627
1650
  color: "gray",
1628
1651
  children: content
@@ -1633,12 +1656,12 @@ var AnnotationBase = function(param) {
1633
1656
  });
1634
1657
  };
1635
1658
  // src/contexts/markdown/MarkdownContext/lib/components/Annotation/FilePathAnnotation.tsx
1636
- import { jsx as jsx44 } from "react/jsx-runtime";
1659
+ import { jsx as jsx45 } from "react/jsx-runtime";
1637
1660
  var FilePathAnnotation = function(param) {
1638
1661
  var annotation = param.annotation, children = param.children;
1639
1662
  var superinterfaceContext = useSuperinterfaceContext();
1640
1663
  var nextSearchParams = new URLSearchParams(superinterfaceContext.variables);
1641
- return /* @__PURE__ */ jsx44(Link, {
1664
+ return /* @__PURE__ */ jsx45(Link, {
1642
1665
  href: "".concat(superinterfaceContext.baseUrl, "/files/").concat(annotation.file_path.file_id, "/contents?").concat(nextSearchParams),
1643
1666
  target: "_self",
1644
1667
  download: true,
@@ -1646,16 +1669,16 @@ var FilePathAnnotation = function(param) {
1646
1669
  });
1647
1670
  };
1648
1671
  // src/contexts/markdown/MarkdownContext/lib/components/Annotation/index.tsx
1649
- import { jsx as jsx45 } from "react/jsx-runtime";
1672
+ import { jsx as jsx46 } from "react/jsx-runtime";
1650
1673
  var Annotation = function(param) {
1651
1674
  var annotation = param.annotation, children = param.children;
1652
1675
  if (annotation.type === "file_citation") {
1653
- return /* @__PURE__ */ jsx45(AnnotationBase, {
1654
- icon: /* @__PURE__ */ jsx45(QuoteIcon, {}),
1676
+ return /* @__PURE__ */ jsx46(AnnotationBase, {
1677
+ icon: /* @__PURE__ */ jsx46(QuoteIcon, {}),
1655
1678
  content: "File cited."
1656
1679
  });
1657
1680
  } else if (annotation.type === "file_path") {
1658
- return /* @__PURE__ */ jsx45(FilePathAnnotation, {
1681
+ return /* @__PURE__ */ jsx46(FilePathAnnotation, {
1659
1682
  annotation: annotation,
1660
1683
  children: children
1661
1684
  });
@@ -1663,7 +1686,7 @@ var Annotation = function(param) {
1663
1686
  return null;
1664
1687
  };
1665
1688
  // src/contexts/markdown/MarkdownContext/lib/components/index.tsx
1666
- import { jsx as jsx46 } from "react/jsx-runtime";
1689
+ import { jsx as jsx47 } from "react/jsx-runtime";
1667
1690
  var components = {
1668
1691
  p: Paragraph,
1669
1692
  a: Link,
@@ -1676,48 +1699,48 @@ var components = {
1676
1699
  img: Img,
1677
1700
  annotation: Annotation,
1678
1701
  h1: function(props) {
1679
- return /* @__PURE__ */ jsx46(Heading, {
1702
+ return /* @__PURE__ */ jsx47(Heading, {
1680
1703
  as: "h1",
1681
1704
  children: props.children
1682
1705
  });
1683
1706
  },
1684
1707
  h2: function(props) {
1685
- return /* @__PURE__ */ jsx46(Heading, {
1708
+ return /* @__PURE__ */ jsx47(Heading, {
1686
1709
  as: "h2",
1687
1710
  size: "5",
1688
1711
  children: props.children
1689
1712
  });
1690
1713
  },
1691
1714
  h3: function(props) {
1692
- return /* @__PURE__ */ jsx46(Heading, {
1715
+ return /* @__PURE__ */ jsx47(Heading, {
1693
1716
  as: "h3",
1694
1717
  size: "4",
1695
1718
  children: props.children
1696
1719
  });
1697
1720
  },
1698
1721
  h4: function(props) {
1699
- return /* @__PURE__ */ jsx46(Heading, {
1722
+ return /* @__PURE__ */ jsx47(Heading, {
1700
1723
  as: "h4",
1701
1724
  size: "3",
1702
1725
  children: props.children
1703
1726
  });
1704
1727
  },
1705
1728
  h5: function(props) {
1706
- return /* @__PURE__ */ jsx46(Heading, {
1729
+ return /* @__PURE__ */ jsx47(Heading, {
1707
1730
  as: "h5",
1708
1731
  size: "3",
1709
1732
  children: props.children
1710
1733
  });
1711
1734
  },
1712
1735
  h6: function(props) {
1713
- return /* @__PURE__ */ jsx46(Heading, {
1736
+ return /* @__PURE__ */ jsx47(Heading, {
1714
1737
  as: "h6",
1715
1738
  size: "3",
1716
1739
  children: props.children
1717
1740
  });
1718
1741
  },
1719
1742
  table: function(props) {
1720
- return /* @__PURE__ */ jsx46(Table.Root, _object_spread_props(_object_spread({}, props), {
1743
+ return /* @__PURE__ */ jsx47(Table.Root, _object_spread_props(_object_spread({}, props), {
1721
1744
  variant: "surface",
1722
1745
  mb: "3"
1723
1746
  }));
@@ -1909,45 +1932,49 @@ var MarkdownContext = createContext9({
1909
1932
  var useMarkdownContext = function() {
1910
1933
  return useContext7(MarkdownContext);
1911
1934
  };
1912
- // src/components/threads/Thread/Message/TextContent.tsx
1913
- import { jsx as jsx47 } from "react/jsx-runtime";
1935
+ // src/components/threads/Thread/Message/ContentPart/TextContent.tsx
1936
+ import { jsx as jsx48 } from "react/jsx-runtime";
1914
1937
  var TextContent = function(param) {
1915
1938
  var content = param.content;
1916
1939
  var _useMarkdownContext = useMarkdownContext(), getRemarkPlugins2 = _useMarkdownContext.getRemarkPlugins, rest = _object_without_properties(_useMarkdownContext, [
1917
1940
  "getRemarkPlugins"
1918
1941
  ]);
1919
- return /* @__PURE__ */ jsx47(Markdown, _object_spread_props(_object_spread({}, rest), {
1942
+ return /* @__PURE__ */ jsx48(Markdown, _object_spread_props(_object_spread({}, rest), {
1920
1943
  remarkPlugins: getRemarkPlugins2({
1921
1944
  content: content
1922
1945
  }),
1923
1946
  children: content.text.value
1924
1947
  }));
1925
1948
  };
1926
- // src/components/threads/Thread/Message/Attachments/index.tsx
1927
- import { Flex as Flex14, Badge } from "@radix-ui/themes";
1928
- import { FileIcon } from "@radix-ui/react-icons";
1929
- import { jsx as jsx48, jsxs as jsxs14 } from "react/jsx-runtime";
1930
- var Attachments = function(param) {
1931
- var message = param.message;
1932
- var _message_attachments;
1933
- if (!((_message_attachments = message.attachments) === null || _message_attachments === void 0 ? void 0 : _message_attachments.length)) return null;
1934
- return /* @__PURE__ */ jsx48(Flex14, {
1935
- align: "start",
1936
- pb: "1",
1937
- children: /* @__PURE__ */ jsxs14(Badge, {
1938
- color: "gray",
1939
- variant: "surface",
1940
- children: [
1941
- /* @__PURE__ */ jsx48(FileIcon, {}),
1942
- message.attachments.length,
1943
- " file",
1944
- message.attachments.length > 1 ? "s" : ""
1945
- ]
1946
- })
1949
+ // src/components/threads/Thread/Message/ContentPart/ImageFileContent.tsx
1950
+ import { jsx as jsx49 } from "react/jsx-runtime";
1951
+ var ImageFileContent = function(param) {
1952
+ var content = param.content;
1953
+ var superinterfaceContext = useSuperinterfaceContext();
1954
+ var nextSearchParams = new URLSearchParams(superinterfaceContext.variables);
1955
+ return /* @__PURE__ */ jsx49(Image, {
1956
+ alt: "",
1957
+ src: "".concat(superinterfaceContext.baseUrl, "/files/").concat(content.image_file.file_id, "/contents?").concat(nextSearchParams)
1947
1958
  });
1948
1959
  };
1960
+ // src/components/threads/Thread/Message/ContentPart/index.tsx
1961
+ import { jsx as jsx50 } from "react/jsx-runtime";
1962
+ var ContentPart = function(param) {
1963
+ var content = param.content;
1964
+ if (content.type === "text") {
1965
+ return /* @__PURE__ */ jsx50(TextContent, {
1966
+ content: content
1967
+ });
1968
+ }
1969
+ if (content.type === "image_file") {
1970
+ return /* @__PURE__ */ jsx50(ImageFileContent, {
1971
+ content: content
1972
+ });
1973
+ }
1974
+ return null;
1975
+ };
1949
1976
  // src/components/threads/Thread/Message/index.tsx
1950
- import { jsx as jsx49, jsxs as jsxs15 } from "react/jsx-runtime";
1977
+ import { jsx as jsx51, jsxs as jsxs15 } from "react/jsx-runtime";
1951
1978
  var Message = function(param) {
1952
1979
  var message = param.message;
1953
1980
  var _useMemo6 = _sliced_to_array(useMemo6(function() {
@@ -1992,68 +2019,66 @@ var Message = function(param) {
1992
2019
  }, [
1993
2020
  message
1994
2021
  ]);
1995
- return /* @__PURE__ */ jsx49(Provider, {
2022
+ return /* @__PURE__ */ jsx51(Provider, {
1996
2023
  value: {
1997
2024
  message: message
1998
2025
  },
1999
2026
  children: /* @__PURE__ */ jsxs15(Box10, {
2000
2027
  children: [
2001
- /* @__PURE__ */ jsx49(RunSteps, {
2028
+ /* @__PURE__ */ jsx51(RunSteps, {
2002
2029
  runSteps: olderRunSteps
2003
2030
  }),
2004
2031
  /* @__PURE__ */ jsxs15(Box10, {
2005
2032
  children: [
2006
- /* @__PURE__ */ jsx49(Attachments, {
2033
+ /* @__PURE__ */ jsx51(Attachments, {
2007
2034
  message: message
2008
2035
  }),
2009
2036
  message.content.map(function(content, index) {
2010
- return /* @__PURE__ */ jsx49(Fragment, {
2011
- children: content.type === "text" && /* @__PURE__ */ jsx49(TextContent, {
2012
- content: content
2013
- })
2037
+ return /* @__PURE__ */ jsx51(ContentPart, {
2038
+ content: content
2014
2039
  }, index);
2015
2040
  }),
2016
- isInProgress && isEmpty(laterRunSteps) && /* @__PURE__ */ jsx49(StartingContentSkeleton, {})
2041
+ isInProgress && isEmpty(laterRunSteps) && /* @__PURE__ */ jsx51(StartingContentSkeleton, {})
2017
2042
  ]
2018
2043
  }),
2019
- /* @__PURE__ */ jsx49(RunSteps, {
2044
+ /* @__PURE__ */ jsx51(RunSteps, {
2020
2045
  runSteps: laterRunSteps
2021
2046
  }),
2022
- isInProgress && !isEmpty(laterRunSteps) && /* @__PURE__ */ jsx49(Box10, {
2023
- children: /* @__PURE__ */ jsx49(StartingContentSkeleton, {})
2047
+ isInProgress && !isEmpty(laterRunSteps) && /* @__PURE__ */ jsx51(Box10, {
2048
+ children: /* @__PURE__ */ jsx51(StartingContentSkeleton, {})
2024
2049
  })
2025
2050
  ]
2026
2051
  })
2027
2052
  });
2028
2053
  };
2029
2054
  // src/components/threads/Thread/Messages/Content/MessageGroup/Content/index.tsx
2030
- import { jsx as jsx50 } from "react/jsx-runtime";
2055
+ import { jsx as jsx52 } from "react/jsx-runtime";
2031
2056
  var Content3 = function(param) {
2032
2057
  var messageGroup = param.messageGroup;
2033
- return /* @__PURE__ */ jsx50(Flex15, {
2058
+ return /* @__PURE__ */ jsx52(Flex15, {
2034
2059
  direction: "column-reverse",
2035
2060
  children: messageGroup.messages.map(function(message) {
2036
- return /* @__PURE__ */ jsx50(Message, {
2061
+ return /* @__PURE__ */ jsx52(Message, {
2037
2062
  message: message
2038
2063
  }, message.id);
2039
2064
  })
2040
2065
  });
2041
2066
  };
2042
2067
  // src/components/threads/Thread/Messages/Content/MessageGroup/index.tsx
2043
- import { jsx as jsx51, jsxs as jsxs16 } from "react/jsx-runtime";
2068
+ import { jsx as jsx53, jsxs as jsxs16 } from "react/jsx-runtime";
2044
2069
  var MessageGroup = function(param) {
2045
2070
  var messageGroup = param.messageGroup;
2046
2071
  var assistantNameContext = useContext8(AssistantNameContext);
2047
2072
  return /* @__PURE__ */ jsxs16(MessageGroupBase, {
2048
2073
  children: [
2049
- messageGroup.role === "user" ? /* @__PURE__ */ jsx51(UserAvatar, {}) : /* @__PURE__ */ jsx51(AssistantAvatar, {}),
2074
+ messageGroup.role === "user" ? /* @__PURE__ */ jsx53(UserAvatar, {}) : /* @__PURE__ */ jsx53(AssistantAvatar, {}),
2050
2075
  /* @__PURE__ */ jsxs16(Box11, {
2051
2076
  flexGrow: "1",
2052
2077
  children: [
2053
- /* @__PURE__ */ jsx51(Name, {
2078
+ /* @__PURE__ */ jsx53(Name, {
2054
2079
  children: messageGroup.role === "user" ? "You" : assistantNameContext
2055
2080
  }),
2056
- /* @__PURE__ */ jsx51(Content3, {
2081
+ /* @__PURE__ */ jsx53(Content3, {
2057
2082
  messageGroup: messageGroup
2058
2083
  })
2059
2084
  ]
@@ -2062,7 +2087,7 @@ var MessageGroup = function(param) {
2062
2087
  });
2063
2088
  };
2064
2089
  // src/components/threads/Thread/Messages/Content/index.tsx
2065
- import { Fragment as Fragment2, jsx as jsx52 } from "react/jsx-runtime";
2090
+ import { Fragment, jsx as jsx54 } from "react/jsx-runtime";
2066
2091
  var Content4 = function() {
2067
2092
  var _useMessages = useMessages(), messages2 = _useMessages.messages, isLoading = _useMessages.isLoading, isLoadingError = _useMessages.isLoadingError;
2068
2093
  var addToast = useToasts().addToast;
@@ -2081,11 +2106,11 @@ var Content4 = function() {
2081
2106
  addToast
2082
2107
  ]);
2083
2108
  if (isLoading || isLoadingError) {
2084
- return /* @__PURE__ */ jsx52(MessagesSkeleton, {});
2109
+ return /* @__PURE__ */ jsx54(MessagesSkeleton, {});
2085
2110
  }
2086
- return /* @__PURE__ */ jsx52(Fragment2, {
2111
+ return /* @__PURE__ */ jsx54(Fragment, {
2087
2112
  children: messageGroups2.map(function(messageGroup) {
2088
- return /* @__PURE__ */ jsx52(MessageGroup, {
2113
+ return /* @__PURE__ */ jsx54(MessageGroup, {
2089
2114
  messageGroup: messageGroup
2090
2115
  }, messageGroup.id);
2091
2116
  })
@@ -2096,20 +2121,20 @@ import { useMemo as useMemo8 } from "react";
2096
2121
  // src/components/skeletons/StartingSkeleton/index.tsx
2097
2122
  import { useContext as useContext9 } from "react";
2098
2123
  import { Box as Box12 } from "@radix-ui/themes";
2099
- import { jsx as jsx53, jsxs as jsxs17 } from "react/jsx-runtime";
2124
+ import { jsx as jsx55, jsxs as jsxs17 } from "react/jsx-runtime";
2100
2125
  var StartingSkeleton = function(param) {
2101
2126
  var children = param.children;
2102
2127
  var assistantNameContext = useContext9(AssistantNameContext);
2103
2128
  return /* @__PURE__ */ jsxs17(MessageGroupBase, {
2104
2129
  children: [
2105
- /* @__PURE__ */ jsx53(AssistantAvatar, {}),
2130
+ /* @__PURE__ */ jsx55(AssistantAvatar, {}),
2106
2131
  /* @__PURE__ */ jsxs17(Box12, {
2107
2132
  children: [
2108
- /* @__PURE__ */ jsx53(Name, {
2133
+ /* @__PURE__ */ jsx55(Name, {
2109
2134
  children: assistantNameContext
2110
2135
  }),
2111
2136
  children,
2112
- /* @__PURE__ */ jsx53(StartingContentSkeleton, {})
2137
+ /* @__PURE__ */ jsx55(StartingContentSkeleton, {})
2113
2138
  ]
2114
2139
  })
2115
2140
  ]
@@ -2134,7 +2159,7 @@ var isOptimistic = function(param) {
2134
2159
  return _4.startsWith(id, "-");
2135
2160
  };
2136
2161
  // src/components/threads/Thread/Messages/Progress/index.tsx
2137
- import { jsx as jsx54 } from "react/jsx-runtime";
2162
+ import { jsx as jsx56 } from "react/jsx-runtime";
2138
2163
  var Progress = function() {
2139
2164
  var latestMessage = useLatestMessage().latestMessage;
2140
2165
  var isMutatingMessage = useIsMutatingMessage();
@@ -2152,7 +2177,7 @@ var Progress = function() {
2152
2177
  isMutatingMessage
2153
2178
  ]);
2154
2179
  if (!isVisible) return null;
2155
- return /* @__PURE__ */ jsx54(StartingSkeleton, {});
2180
+ return /* @__PURE__ */ jsx56(StartingSkeleton, {});
2156
2181
  };
2157
2182
  // src/components/threads/Thread/Messages/Root/index.tsx
2158
2183
  import { Flex as Flex16 } from "@radix-ui/themes";
@@ -2210,7 +2235,7 @@ var useInfiniteScroll = function(param) {
2210
2235
  };
2211
2236
  };
2212
2237
  // src/components/threads/Thread/Messages/Root/index.tsx
2213
- import { jsx as jsx55, jsxs as jsxs18 } from "react/jsx-runtime";
2238
+ import { jsx as jsx57, jsxs as jsxs18 } from "react/jsx-runtime";
2214
2239
  var Root2 = function(param) {
2215
2240
  var children = param.children, _param_style = param.style, style = _param_style === void 0 ? {} : _param_style;
2216
2241
  var _useMessages = useMessages(), isFetchingNextPage = _useMessages.isFetchingNextPage, hasNextPage = _useMessages.hasNextPage, fetchNextPage = _useMessages.fetchNextPage;
@@ -2228,10 +2253,10 @@ var Root2 = function(param) {
2228
2253
  }),
2229
2254
  children: [
2230
2255
  children,
2231
- hasNextPage && /* @__PURE__ */ jsx55(Flex16, {
2256
+ hasNextPage && /* @__PURE__ */ jsx57(Flex16, {
2232
2257
  ref: loaderRef
2233
2258
  }),
2234
- /* @__PURE__ */ jsx55(Flex16, {
2259
+ /* @__PURE__ */ jsx57(Flex16, {
2235
2260
  flexShrink: "0",
2236
2261
  flexGrow: "1"
2237
2262
  })
@@ -2239,30 +2264,30 @@ var Root2 = function(param) {
2239
2264
  });
2240
2265
  };
2241
2266
  // src/components/threads/Thread/Messages/NextPageSkeleton.tsx
2242
- import { jsx as jsx56 } from "react/jsx-runtime";
2267
+ import { jsx as jsx58 } from "react/jsx-runtime";
2243
2268
  var NextPageSkeleton = function() {
2244
2269
  var hasNextPage = useMessages().hasNextPage;
2245
2270
  if (!hasNextPage) {
2246
2271
  return null;
2247
2272
  }
2248
- return /* @__PURE__ */ jsx56(MessagesSkeleton, {});
2273
+ return /* @__PURE__ */ jsx58(MessagesSkeleton, {});
2249
2274
  };
2250
2275
  // src/components/threads/Thread/Messages/index.tsx
2251
- import { jsx as jsx57, jsxs as jsxs19 } from "react/jsx-runtime";
2276
+ import { jsx as jsx59, jsxs as jsxs19 } from "react/jsx-runtime";
2252
2277
  var Messages = function(param) {
2253
2278
  var children = param.children, _param_style = param.style, style = _param_style === void 0 ? {} : _param_style;
2254
2279
  return /* @__PURE__ */ jsxs19(Root2, {
2255
2280
  style: style,
2256
2281
  children: [
2257
- /* @__PURE__ */ jsx57(Flex17, {
2282
+ /* @__PURE__ */ jsx59(Flex17, {
2258
2283
  flexShrink: "0",
2259
2284
  height: "var(--space-3)"
2260
2285
  }),
2261
- /* @__PURE__ */ jsx57(Progress, {}),
2286
+ /* @__PURE__ */ jsx59(Progress, {}),
2262
2287
  children,
2263
- /* @__PURE__ */ jsx57(Content4, {}),
2264
- /* @__PURE__ */ jsx57(NextPageSkeleton, {}),
2265
- /* @__PURE__ */ jsx57(Flex17, {
2288
+ /* @__PURE__ */ jsx59(Content4, {}),
2289
+ /* @__PURE__ */ jsx59(NextPageSkeleton, {}),
2290
+ /* @__PURE__ */ jsx59(Flex17, {
2266
2291
  flexShrink: "0",
2267
2292
  flexGrow: "1",
2268
2293
  minHeight: "var(--space-5)"
@@ -2293,10 +2318,10 @@ var useMessageFormContext = function() {
2293
2318
  return useContext10(MessageFormContext);
2294
2319
  };
2295
2320
  // src/components/threads/Thread/MessageForm/Submit/index.tsx
2296
- import { jsx as jsx58 } from "react/jsx-runtime";
2321
+ import { jsx as jsx60 } from "react/jsx-runtime";
2297
2322
  var Root3 = function(param) {
2298
2323
  var children = param.children;
2299
- return /* @__PURE__ */ jsx58(Flex18, {
2324
+ return /* @__PURE__ */ jsx60(Flex18, {
2300
2325
  flexShrink: "0",
2301
2326
  align: "end",
2302
2327
  children: children
@@ -2306,24 +2331,24 @@ var Button2 = function() {
2306
2331
  var superinterfaceContext = useSuperinterfaceContext();
2307
2332
  var _useMessageFormContext = useMessageFormContext(), isDisabled = _useMessageFormContext.isDisabled, isLoading = _useMessageFormContext.isLoading, isFileLoading = _useMessageFormContext.isFileLoading;
2308
2333
  if (isLoading) {
2309
- return /* @__PURE__ */ jsx58(IconButton5, {
2334
+ return /* @__PURE__ */ jsx60(IconButton5, {
2310
2335
  type: "button",
2311
2336
  onClick: function() {
2312
2337
  var _superinterfaceContext_createMessageAbortControllerRef_current;
2313
2338
  return (_superinterfaceContext_createMessageAbortControllerRef_current = superinterfaceContext.createMessageAbortControllerRef.current) === null || _superinterfaceContext_createMessageAbortControllerRef_current === void 0 ? void 0 : _superinterfaceContext_createMessageAbortControllerRef_current.abort();
2314
2339
  },
2315
- children: /* @__PURE__ */ jsx58(StopIcon, {})
2340
+ children: /* @__PURE__ */ jsx60(StopIcon, {})
2316
2341
  });
2317
2342
  }
2318
- return /* @__PURE__ */ jsx58(IconButton5, {
2343
+ return /* @__PURE__ */ jsx60(IconButton5, {
2319
2344
  type: "submit",
2320
2345
  disabled: isDisabled || isFileLoading,
2321
- children: /* @__PURE__ */ jsx58(ArrowUpIcon, {})
2346
+ children: /* @__PURE__ */ jsx60(ArrowUpIcon, {})
2322
2347
  });
2323
2348
  };
2324
2349
  var Submit = function() {
2325
- return /* @__PURE__ */ jsx58(Root3, {
2326
- children: /* @__PURE__ */ jsx58(Button2, {})
2350
+ return /* @__PURE__ */ jsx60(Root3, {
2351
+ children: /* @__PURE__ */ jsx60(Button2, {})
2327
2352
  });
2328
2353
  };
2329
2354
  Submit.Root = Root3;
@@ -3120,7 +3145,7 @@ var createMessageDefaultOnError = function(param) {
3120
3145
  };
3121
3146
  };
3122
3147
  // src/components/threads/Thread/MessageForm/Root/index.tsx
3123
- import { jsx as jsx59 } from "react/jsx-runtime";
3148
+ import { jsx as jsx61 } from "react/jsx-runtime";
3124
3149
  var Root4 = function(param) {
3125
3150
  var children = param.children, onSubmitArg = param.onSubmit, isDisabledArg = param.isDisabled;
3126
3151
  var _useState2 = _sliced_to_array(useState2([]), 2), files = _useState2[0], setFiles = _useState2[1];
@@ -3213,7 +3238,7 @@ var Root4 = function(param) {
3213
3238
  };
3214
3239
  }();
3215
3240
  var content = watch("content");
3216
- return /* @__PURE__ */ jsx59(MessageFormContext.Provider, {
3241
+ return /* @__PURE__ */ jsx61(MessageFormContext.Provider, {
3217
3242
  value: {
3218
3243
  isDisabled: isDisabled,
3219
3244
  isLoading: isLoading,
@@ -3222,11 +3247,11 @@ var Root4 = function(param) {
3222
3247
  isFileLoading: isFileLoading,
3223
3248
  content: content
3224
3249
  },
3225
- children: /* @__PURE__ */ jsx59(FormProvider, _object_spread_props(_object_spread({}, formProps), {
3226
- children: /* @__PURE__ */ jsx59(Box13, {
3250
+ children: /* @__PURE__ */ jsx61(FormProvider, _object_spread_props(_object_spread({}, formProps), {
3251
+ children: /* @__PURE__ */ jsx61(Box13, {
3227
3252
  asChild: true,
3228
3253
  flexShrink: "0",
3229
- children: /* @__PURE__ */ jsx59("form", {
3254
+ children: /* @__PURE__ */ jsx61("form", {
3230
3255
  onSubmit: handleSubmit(onSubmit),
3231
3256
  children: children
3232
3257
  })
@@ -3254,14 +3279,14 @@ import { useContext as useContext11, useMemo as useMemo10, useRef as useRef5, us
3254
3279
  // src/components/textareas/TextareaBase/index.tsx
3255
3280
  import { forwardRef as forwardRef3 } from "react";
3256
3281
  import TextareaAutosize from "react-textarea-autosize";
3257
- import { Fragment as Fragment3, jsx as jsx60, jsxs as jsxs20 } from "react/jsx-runtime";
3282
+ import { Fragment as Fragment2, jsx as jsx62, jsxs as jsxs20 } from "react/jsx-runtime";
3258
3283
  var TextareaBase = forwardRef3(function TextareaBase2(props, ref) {
3259
- return /* @__PURE__ */ jsxs20(Fragment3, {
3284
+ return /* @__PURE__ */ jsxs20(Fragment2, {
3260
3285
  children: [
3261
- /* @__PURE__ */ jsx60("style", {
3286
+ /* @__PURE__ */ jsx62("style", {
3262
3287
  children: ".superinterface-textarea { min-height: inherit; height: 30px; }\n.superinterface-textarea::placeholder { color: var(--gray-a10); }"
3263
3288
  }),
3264
- /* @__PURE__ */ jsx60(TextareaAutosize, _object_spread({
3289
+ /* @__PURE__ */ jsx62(TextareaAutosize, _object_spread({
3265
3290
  ref: ref,
3266
3291
  className: "rt-reset superinterface-textarea",
3267
3292
  style: {
@@ -3278,10 +3303,10 @@ var TextareaBase = forwardRef3(function TextareaBase2(props, ref) {
3278
3303
  });
3279
3304
  });
3280
3305
  // src/components/threads/Thread/MessageForm/Field/Control.tsx
3281
- import { jsx as jsx61 } from "react/jsx-runtime";
3306
+ import { jsx as jsx63 } from "react/jsx-runtime";
3282
3307
  var Root5 = function(param) {
3283
3308
  var children = param.children;
3284
- return /* @__PURE__ */ jsx61(Flex19, {
3309
+ return /* @__PURE__ */ jsx63(Flex19, {
3285
3310
  flexGrow: "1",
3286
3311
  pt: "4px",
3287
3312
  children: children
@@ -3310,7 +3335,7 @@ var Input = function() {
3310
3335
  isDisabledPrevious,
3311
3336
  textareaProps
3312
3337
  ]);
3313
- return /* @__PURE__ */ jsx61(TextareaBase, _object_spread_props(_object_spread({
3338
+ return /* @__PURE__ */ jsx63(TextareaBase, _object_spread_props(_object_spread({
3314
3339
  minRows: 1,
3315
3340
  placeholder: "Message ".concat(assistantNameContext, "..."),
3316
3341
  disabled: isDisabled,
@@ -3330,8 +3355,8 @@ var Input = function() {
3330
3355
  }));
3331
3356
  };
3332
3357
  var Control = function() {
3333
- return /* @__PURE__ */ jsx61(Root5, {
3334
- children: /* @__PURE__ */ jsx61(Input, {})
3358
+ return /* @__PURE__ */ jsx63(Root5, {
3359
+ children: /* @__PURE__ */ jsx63(Input, {})
3335
3360
  });
3336
3361
  };
3337
3362
  Control.Root = Root5;
@@ -3339,19 +3364,19 @@ Control.Input = Input;
3339
3364
  // src/components/threads/Thread/MessageForm/Field/Files/Preview.tsx
3340
3365
  import { Flex as Flex20, Card as Card2, Spinner, Text as Text6, IconButton as IconButton6 } from "@radix-ui/themes";
3341
3366
  import { FileIcon as FileIcon2, Cross2Icon } from "@radix-ui/react-icons";
3342
- import { jsx as jsx62, jsxs as jsxs21 } from "react/jsx-runtime";
3367
+ import { jsx as jsx64, jsxs as jsxs21 } from "react/jsx-runtime";
3343
3368
  var Preview = function() {
3344
3369
  var _useMessageFormContext = useMessageFormContext(), files = _useMessageFormContext.files, setFiles = _useMessageFormContext.setFiles;
3345
3370
  if (!files.length) {
3346
3371
  return null;
3347
3372
  }
3348
- return /* @__PURE__ */ jsx62(Flex20, {
3373
+ return /* @__PURE__ */ jsx64(Flex20, {
3349
3374
  flexBasis: "100%",
3350
3375
  direction: "column",
3351
3376
  pb: "2",
3352
3377
  gap: "1",
3353
3378
  children: files.map(function(file) {
3354
- return /* @__PURE__ */ jsx62(Card2, {
3379
+ return /* @__PURE__ */ jsx64(Card2, {
3355
3380
  variant: "ghost",
3356
3381
  children: /* @__PURE__ */ jsxs21(Flex20, {
3357
3382
  align: "center",
@@ -3365,16 +3390,16 @@ var Preview = function() {
3365
3390
  minWidth: "0",
3366
3391
  maxWidth: "250px",
3367
3392
  children: [
3368
- /* @__PURE__ */ jsx62(Flex20, {
3393
+ /* @__PURE__ */ jsx64(Flex20, {
3369
3394
  flexShrink: "0",
3370
- children: /* @__PURE__ */ jsx62(Spinner, {
3395
+ children: /* @__PURE__ */ jsx64(Spinner, {
3371
3396
  loading: isOptimistic({
3372
3397
  id: file.id
3373
3398
  }),
3374
- children: /* @__PURE__ */ jsx62(FileIcon2, {})
3399
+ children: /* @__PURE__ */ jsx64(FileIcon2, {})
3375
3400
  })
3376
3401
  }),
3377
- /* @__PURE__ */ jsx62(Text6, {
3402
+ /* @__PURE__ */ jsx64(Text6, {
3378
3403
  size: "2",
3379
3404
  truncate: true,
3380
3405
  wrap: "nowrap",
@@ -3382,9 +3407,9 @@ var Preview = function() {
3382
3407
  })
3383
3408
  ]
3384
3409
  }),
3385
- /* @__PURE__ */ jsx62(Flex20, {
3410
+ /* @__PURE__ */ jsx64(Flex20, {
3386
3411
  flexShrink: "0",
3387
- children: /* @__PURE__ */ jsx62(IconButton6, {
3412
+ children: /* @__PURE__ */ jsx64(IconButton6, {
3388
3413
  onClick: function() {
3389
3414
  return setFiles(function(prev) {
3390
3415
  return prev.filter(function(prevFile) {
@@ -3395,7 +3420,7 @@ var Preview = function() {
3395
3420
  color: "gray",
3396
3421
  variant: "ghost",
3397
3422
  size: "1",
3398
- children: /* @__PURE__ */ jsx62(Cross2Icon, {})
3423
+ children: /* @__PURE__ */ jsx64(Cross2Icon, {})
3399
3424
  })
3400
3425
  })
3401
3426
  ]
@@ -3520,7 +3545,7 @@ var useCreateFile = function() {
3520
3545
  });
3521
3546
  };
3522
3547
  // src/components/threads/Thread/MessageForm/Field/Files/Control.tsx
3523
- import { jsx as jsx63, jsxs as jsxs22 } from "react/jsx-runtime";
3548
+ import { jsx as jsx65, jsxs as jsxs22 } from "react/jsx-runtime";
3524
3549
  var accept = ".c,text/x-c,\n.cs,text/x-csharp,\n.cpp,text/x-c++,\n.doc,application/msword,\n.docx,application/vnd.openxmlformats-officedocument.wordprocessingml.document,\n.html,text/html,\n.java,text/x-java,\n.json,application/json,\n.md,text/markdown,\n.pdf,application/pdf,\n.php,text/x-php,\n.pptx,application/vnd.openxmlformats-officedocument.presentationml.presentation,\n.py,text/x-python,\n.py,text/x-script.python,\n.rb,text/x-ruby,\n.tex,text/x-tex,\n.txt,text/plain,\n.css,text/css,\n.js,text/javascript,\n.sh,application/x-sh,\n.ts,application/typescript";
3525
3550
  var Control2 = function() {
3526
3551
  var _useMessageFormContext = useMessageFormContext(), isDisabled = _useMessageFormContext.isDisabled, isLoading = _useMessageFormContext.isLoading, setFiles = _useMessageFormContext.setFiles;
@@ -3694,7 +3719,7 @@ var Control2 = function() {
3694
3719
  createFile,
3695
3720
  setFiles
3696
3721
  ]);
3697
- return /* @__PURE__ */ jsx63(Flex21, {
3722
+ return /* @__PURE__ */ jsx65(Flex21, {
3698
3723
  pt: "2",
3699
3724
  pr: "2",
3700
3725
  flexGrow: "0",
@@ -3708,8 +3733,8 @@ var Control2 = function() {
3708
3733
  overflow: "hidden"
3709
3734
  },
3710
3735
  children: [
3711
- /* @__PURE__ */ jsx63(FilePlusIcon, {}),
3712
- /* @__PURE__ */ jsx63("input", {
3736
+ /* @__PURE__ */ jsx65(FilePlusIcon, {}),
3737
+ /* @__PURE__ */ jsx65("input", {
3713
3738
  type: "file",
3714
3739
  multiple: true,
3715
3740
  accept: accept,
@@ -3734,20 +3759,20 @@ var Files = {
3734
3759
  Control: Control2
3735
3760
  };
3736
3761
  // src/components/threads/Thread/MessageForm/Field/index.tsx
3737
- import { jsx as jsx64 } from "react/jsx-runtime";
3762
+ import { jsx as jsx66 } from "react/jsx-runtime";
3738
3763
  var Root6 = function(param) {
3739
3764
  var children = param.children;
3740
3765
  var _useFormContext2 = useFormContext2(), errors = _useFormContext2.formState.errors;
3741
- return /* @__PURE__ */ jsx64(RadixContainer, {
3766
+ return /* @__PURE__ */ jsx66(RadixContainer, {
3742
3767
  size: "2",
3743
3768
  flexGrow: "0",
3744
- children: /* @__PURE__ */ jsx64(Flex22, {
3769
+ children: /* @__PURE__ */ jsx66(Flex22, {
3745
3770
  direction: "column",
3746
3771
  flexShrink: "0",
3747
- children: /* @__PURE__ */ jsx64(Flex22, {
3772
+ children: /* @__PURE__ */ jsx66(Flex22, {
3748
3773
  direction: "column",
3749
3774
  flexShrink: "0",
3750
- children: /* @__PURE__ */ jsx64(Flex22, {
3775
+ children: /* @__PURE__ */ jsx66(Flex22, {
3751
3776
  style: _object_spread({
3752
3777
  borderRadius: "var(--radius-2)",
3753
3778
  borderWidth: "1px",
@@ -3771,13 +3796,13 @@ var Field = {
3771
3796
  Files: Files
3772
3797
  };
3773
3798
  // src/components/threads/Thread/MessageForm/index.tsx
3774
- import { jsx as jsx65, jsxs as jsxs23 } from "react/jsx-runtime";
3799
+ import { jsx as jsx67, jsxs as jsxs23 } from "react/jsx-runtime";
3775
3800
  var MessageForm = function() {
3776
- return /* @__PURE__ */ jsx65(Root4, {
3801
+ return /* @__PURE__ */ jsx67(Root4, {
3777
3802
  children: /* @__PURE__ */ jsxs23(Field.Root, {
3778
3803
  children: [
3779
- /* @__PURE__ */ jsx65(Field.Control, {}),
3780
- /* @__PURE__ */ jsx65(Submit, {})
3804
+ /* @__PURE__ */ jsx67(Field.Control, {}),
3805
+ /* @__PURE__ */ jsx67(Submit, {})
3781
3806
  ]
3782
3807
  })
3783
3808
  });
@@ -3796,25 +3821,25 @@ import * as Toast2 from "@radix-ui/react-toast";
3796
3821
  import * as Toast from "@radix-ui/react-toast";
3797
3822
  import { Card as Card3, Text as Text7, Flex as Flex23 } from "@radix-ui/themes";
3798
3823
  import { CheckCircledIcon as CheckCircledIcon2, CrossCircledIcon } from "@radix-ui/react-icons";
3799
- import { jsx as jsx66, jsxs as jsxs24 } from "react/jsx-runtime";
3824
+ import { jsx as jsx68, jsxs as jsxs24 } from "react/jsx-runtime";
3800
3825
  var CustomToast = function(param) {
3801
3826
  var toast = param.toast;
3802
- return /* @__PURE__ */ jsx66(Toast.Root, {
3803
- children: /* @__PURE__ */ jsx66(Card3, {
3804
- children: /* @__PURE__ */ jsx66(Toast.Title, {
3827
+ return /* @__PURE__ */ jsx68(Toast.Root, {
3828
+ children: /* @__PURE__ */ jsx68(Card3, {
3829
+ children: /* @__PURE__ */ jsx68(Toast.Title, {
3805
3830
  children: /* @__PURE__ */ jsxs24(Flex23, {
3806
3831
  children: [
3807
- /* @__PURE__ */ jsx66(Flex23, {
3832
+ /* @__PURE__ */ jsx68(Flex23, {
3808
3833
  pr: "2",
3809
3834
  height: "14px",
3810
3835
  align: "center",
3811
- children: toast.type === "success" ? /* @__PURE__ */ jsx66(CheckCircledIcon2, {
3836
+ children: toast.type === "success" ? /* @__PURE__ */ jsx68(CheckCircledIcon2, {
3812
3837
  color: "var(--accent-9)"
3813
- }) : /* @__PURE__ */ jsx66(CrossCircledIcon, {
3838
+ }) : /* @__PURE__ */ jsx68(CrossCircledIcon, {
3814
3839
  color: "var(--red-9)"
3815
3840
  })
3816
3841
  }),
3817
- /* @__PURE__ */ jsx66(Text7, {
3842
+ /* @__PURE__ */ jsx68(Text7, {
3818
3843
  weight: "medium",
3819
3844
  size: "1",
3820
3845
  children: toast.message
@@ -3826,7 +3851,7 @@ var CustomToast = function(param) {
3826
3851
  });
3827
3852
  };
3828
3853
  // src/components/toasts/ToastsProvider/index.tsx
3829
- import { jsx as jsx67, jsxs as jsxs25 } from "react/jsx-runtime";
3854
+ import { jsx as jsx69, jsxs as jsxs25 } from "react/jsx-runtime";
3830
3855
  var ToastsProvider = function(param) {
3831
3856
  var children = param.children, _param_bottom = param.bottom, bottom = _param_bottom === void 0 ? 0 : _param_bottom;
3832
3857
  var _useState3 = _sliced_to_array(useState3([]), 2), toasts = _useState3[0], setToasts = _useState3[1];
@@ -3837,7 +3862,7 @@ var ToastsProvider = function(param) {
3837
3862
  ]);
3838
3863
  });
3839
3864
  }, []);
3840
- return /* @__PURE__ */ jsx67(ToastsContext.Provider, {
3865
+ return /* @__PURE__ */ jsx69(ToastsContext.Provider, {
3841
3866
  value: {
3842
3867
  toasts: toasts,
3843
3868
  addToast: addToast
@@ -3846,11 +3871,11 @@ var ToastsProvider = function(param) {
3846
3871
  children: [
3847
3872
  children,
3848
3873
  Array.from(toasts).map(function(toast, index) {
3849
- return /* @__PURE__ */ jsx67(CustomToast, {
3874
+ return /* @__PURE__ */ jsx69(CustomToast, {
3850
3875
  toast: toast
3851
3876
  }, index);
3852
3877
  }),
3853
- /* @__PURE__ */ jsx67(Toast2.Viewport, {
3878
+ /* @__PURE__ */ jsx69(Toast2.Viewport, {
3854
3879
  style: {
3855
3880
  position: "absolute",
3856
3881
  bottom: bottom,
@@ -3872,15 +3897,15 @@ var ToastsProvider = function(param) {
3872
3897
  });
3873
3898
  };
3874
3899
  // src/components/threads/Thread/Root/index.tsx
3875
- import { jsx as jsx68 } from "react/jsx-runtime";
3900
+ import { jsx as jsx70 } from "react/jsx-runtime";
3876
3901
  var Root8 = function(_param) {
3877
3902
  var children = _param.children, rest = _object_without_properties(_param, [
3878
3903
  "children"
3879
3904
  ]);
3880
- return /* @__PURE__ */ jsx68(ToastsProvider, {
3905
+ return /* @__PURE__ */ jsx70(ToastsProvider, {
3881
3906
  bottom: "var(--space-9)",
3882
- children: /* @__PURE__ */ jsx68(Provider2, _object_spread_props(_object_spread({}, rest), {
3883
- children: /* @__PURE__ */ jsx68(Flex24, {
3907
+ children: /* @__PURE__ */ jsx70(Provider2, _object_spread_props(_object_spread({}, rest), {
3908
+ children: /* @__PURE__ */ jsx70(Flex24, {
3884
3909
  direction: "column",
3885
3910
  flexGrow: "1",
3886
3911
  children: children
@@ -3889,12 +3914,12 @@ var Root8 = function(_param) {
3889
3914
  });
3890
3915
  };
3891
3916
  // src/components/threads/Thread/index.tsx
3892
- import { jsx as jsx69, jsxs as jsxs26 } from "react/jsx-runtime";
3917
+ import { jsx as jsx71, jsxs as jsxs26 } from "react/jsx-runtime";
3893
3918
  var Thread = function(props) {
3894
3919
  return /* @__PURE__ */ jsxs26(Root8, _object_spread_props(_object_spread({}, props), {
3895
3920
  children: [
3896
- /* @__PURE__ */ jsx69(Messages, {}),
3897
- /* @__PURE__ */ jsx69(MessageForm, {})
3921
+ /* @__PURE__ */ jsx71(Messages, {}),
3922
+ /* @__PURE__ */ jsx71(MessageForm, {})
3898
3923
  ]
3899
3924
  }));
3900
3925
  };
@@ -4018,12 +4043,12 @@ var useThreadDialogContext = function() {
4018
4043
  return useContext13(ThreadDialogContext);
4019
4044
  };
4020
4045
  // src/components/threads/ThreadDialog/Provider/index.tsx
4021
- import { jsx as jsx70 } from "react/jsx-runtime";
4046
+ import { jsx as jsx72 } from "react/jsx-runtime";
4022
4047
  var Provider4 = function(param) {
4023
4048
  var children = param.children;
4024
4049
  var threadDialogContext = useThreadDialogContext();
4025
4050
  var _useState4 = _sliced_to_array(useState4(threadDialogContext.isOpen), 2), isOpen = _useState4[0], setIsOpen = _useState4[1];
4026
- return /* @__PURE__ */ jsx70(ThreadDialogContext.Provider, {
4051
+ return /* @__PURE__ */ jsx72(ThreadDialogContext.Provider, {
4027
4052
  value: {
4028
4053
  isOpen: isOpen,
4029
4054
  setIsOpen: setIsOpen
@@ -4032,10 +4057,10 @@ var Provider4 = function(param) {
4032
4057
  });
4033
4058
  };
4034
4059
  // src/components/threads/ThreadDialog/Root/index.tsx
4035
- import { jsx as jsx71 } from "react/jsx-runtime";
4060
+ import { jsx as jsx73 } from "react/jsx-runtime";
4036
4061
  var Root9 = function(param) {
4037
4062
  var children = param.children;
4038
- return /* @__PURE__ */ jsx71(Provider4, {
4063
+ return /* @__PURE__ */ jsx73(Provider4, {
4039
4064
  children: children
4040
4065
  });
4041
4066
  };
@@ -4044,20 +4069,20 @@ import { Flex as Flex25 } from "@radix-ui/themes";
4044
4069
  // src/components/threads/ThreadDialog/Trigger/Button.tsx
4045
4070
  import { IconButton as IconButton8 } from "@radix-ui/themes";
4046
4071
  import { ChatBubbleIcon } from "@radix-ui/react-icons";
4047
- import { jsx as jsx72 } from "react/jsx-runtime";
4072
+ import { jsx as jsx74 } from "react/jsx-runtime";
4048
4073
  var Button3 = function() {
4049
- return /* @__PURE__ */ jsx72(IconButton8, {
4074
+ return /* @__PURE__ */ jsx74(IconButton8, {
4050
4075
  size: "4",
4051
4076
  radius: "full",
4052
- children: /* @__PURE__ */ jsx72(ChatBubbleIcon, {})
4077
+ children: /* @__PURE__ */ jsx74(ChatBubbleIcon, {})
4053
4078
  });
4054
4079
  };
4055
4080
  // src/components/threads/ThreadDialog/Trigger/index.tsx
4056
- import { jsx as jsx73 } from "react/jsx-runtime";
4081
+ import { jsx as jsx75 } from "react/jsx-runtime";
4057
4082
  var Root10 = function(param) {
4058
4083
  var children = param.children, _param_style = param.style, style = _param_style === void 0 ? {} : _param_style;
4059
4084
  var _useThreadDialogContext = useThreadDialogContext(), setIsOpen = _useThreadDialogContext.setIsOpen, isOpen = _useThreadDialogContext.isOpen;
4060
- return /* @__PURE__ */ jsx73(Flex25, {
4085
+ return /* @__PURE__ */ jsx75(Flex25, {
4061
4086
  display: {
4062
4087
  initial: isOpen ? "none" : "flex",
4063
4088
  sm: "flex"
@@ -4081,8 +4106,8 @@ var Root10 = function(param) {
4081
4106
  });
4082
4107
  };
4083
4108
  var Trigger = function(args) {
4084
- return /* @__PURE__ */ jsx73(Root10, _object_spread_props(_object_spread({}, args), {
4085
- children: /* @__PURE__ */ jsx73(Button3, {})
4109
+ return /* @__PURE__ */ jsx75(Root10, _object_spread_props(_object_spread({}, args), {
4110
+ children: /* @__PURE__ */ jsx75(Button3, {})
4086
4111
  }));
4087
4112
  };
4088
4113
  Trigger.Root = Root10;
@@ -4092,10 +4117,10 @@ import { Card as Card4, Inset as Inset2, Flex as Flex27 } from "@radix-ui/themes
4092
4117
  // src/components/threads/ThreadDialog/Close/index.tsx
4093
4118
  import { Cross1Icon } from "@radix-ui/react-icons";
4094
4119
  import { IconButton as IconButton9, Flex as Flex26 } from "@radix-ui/themes";
4095
- import { jsx as jsx74 } from "react/jsx-runtime";
4120
+ import { jsx as jsx76 } from "react/jsx-runtime";
4096
4121
  var Close = function() {
4097
4122
  var _useThreadDialogContext = useThreadDialogContext(), setIsOpen = _useThreadDialogContext.setIsOpen, isOpen = _useThreadDialogContext.isOpen;
4098
- return /* @__PURE__ */ jsx74(Flex26, {
4123
+ return /* @__PURE__ */ jsx76(Flex26, {
4099
4124
  display: {
4100
4125
  initial: isOpen ? "flex" : "none",
4101
4126
  sm: "none"
@@ -4115,20 +4140,20 @@ var Close = function() {
4115
4140
  style: {
4116
4141
  zIndex: 9999999999
4117
4142
  },
4118
- children: /* @__PURE__ */ jsx74(IconButton9, {
4143
+ children: /* @__PURE__ */ jsx76(IconButton9, {
4119
4144
  size: "2",
4120
4145
  variant: "soft",
4121
- children: /* @__PURE__ */ jsx74(Cross1Icon, {})
4146
+ children: /* @__PURE__ */ jsx76(Cross1Icon, {})
4122
4147
  })
4123
4148
  });
4124
4149
  };
4125
4150
  // src/components/threads/ThreadDialog/Content/index.tsx
4126
- import { jsx as jsx75, jsxs as jsxs27 } from "react/jsx-runtime";
4151
+ import { jsx as jsx77, jsxs as jsxs27 } from "react/jsx-runtime";
4127
4152
  var Root11 = function(param) {
4128
4153
  var children = param.children, _param_style = param.style, style = _param_style === void 0 ? {} : _param_style;
4129
4154
  var isOpen = useThreadDialogContext().isOpen;
4130
4155
  if (!isOpen) return null;
4131
- return /* @__PURE__ */ jsx75(Flex27, {
4156
+ return /* @__PURE__ */ jsx77(Flex27, {
4132
4157
  direction: "column",
4133
4158
  justify: "end",
4134
4159
  position: "fixed",
@@ -4167,7 +4192,7 @@ var Root11 = function(param) {
4167
4192
  flexGrow: 1
4168
4193
  },
4169
4194
  children: [
4170
- /* @__PURE__ */ jsx75(Inset2, {
4195
+ /* @__PURE__ */ jsx77(Inset2, {
4171
4196
  clip: "padding-box",
4172
4197
  side: "all",
4173
4198
  pb: "current",
@@ -4177,13 +4202,13 @@ var Root11 = function(param) {
4177
4202
  },
4178
4203
  children: children
4179
4204
  }),
4180
- /* @__PURE__ */ jsx75(Close, {})
4205
+ /* @__PURE__ */ jsx77(Close, {})
4181
4206
  ]
4182
4207
  })
4183
4208
  });
4184
4209
  };
4185
4210
  var Messages2 = function() {
4186
- return /* @__PURE__ */ jsx75(Thread.Messages, {
4211
+ return /* @__PURE__ */ jsx77(Thread.Messages, {
4187
4212
  style: {
4188
4213
  paddingTop: "var(--space-5)",
4189
4214
  paddingRight: "var(--space-5)",
@@ -4193,7 +4218,7 @@ var Messages2 = function() {
4193
4218
  };
4194
4219
  var FormContainer = function(param) {
4195
4220
  var children = param.children;
4196
- return /* @__PURE__ */ jsx75(Flex27, {
4221
+ return /* @__PURE__ */ jsx77(Flex27, {
4197
4222
  direction: "column",
4198
4223
  pl: "5",
4199
4224
  pr: "5",
@@ -4204,13 +4229,13 @@ var FormContainer = function(param) {
4204
4229
  };
4205
4230
  var Content5 = function(param) {
4206
4231
  var _param_style = param.style, style = _param_style === void 0 ? {} : _param_style;
4207
- return /* @__PURE__ */ jsx75(Root11, {
4232
+ return /* @__PURE__ */ jsx77(Root11, {
4208
4233
  style: style,
4209
4234
  children: /* @__PURE__ */ jsxs27(Thread.Root, {
4210
4235
  children: [
4211
- /* @__PURE__ */ jsx75(Messages2, {}),
4212
- /* @__PURE__ */ jsx75(FormContainer, {
4213
- children: /* @__PURE__ */ jsx75(Thread.MessageForm, {})
4236
+ /* @__PURE__ */ jsx77(Messages2, {}),
4237
+ /* @__PURE__ */ jsx77(FormContainer, {
4238
+ children: /* @__PURE__ */ jsx77(Thread.MessageForm, {})
4214
4239
  })
4215
4240
  ]
4216
4241
  })
@@ -4220,12 +4245,12 @@ Content5.Root = Root11;
4220
4245
  Content5.Messages = Messages2;
4221
4246
  Content5.FormContainer = FormContainer;
4222
4247
  // src/components/threads/ThreadDialog/index.tsx
4223
- import { jsx as jsx76, jsxs as jsxs28 } from "react/jsx-runtime";
4248
+ import { jsx as jsx78, jsxs as jsxs28 } from "react/jsx-runtime";
4224
4249
  var ThreadDialog = function() {
4225
4250
  return /* @__PURE__ */ jsxs28(Root9, {
4226
4251
  children: [
4227
- /* @__PURE__ */ jsx76(Content5, {}),
4228
- /* @__PURE__ */ jsx76(Trigger, {})
4252
+ /* @__PURE__ */ jsx78(Content5, {}),
4253
+ /* @__PURE__ */ jsx78(Trigger, {})
4229
4254
  ]
4230
4255
  });
4231
4256
  };
@@ -4742,7 +4767,7 @@ var useMessageAudio = function(param) {
4742
4767
  };
4743
4768
  // src/components/threads/AudioThread/Root/index.tsx
4744
4769
  import { useQueryClient as useQueryClient6 } from "@tanstack/react-query";
4745
- import { jsx as jsx77 } from "react/jsx-runtime";
4770
+ import { jsx as jsx79 } from "react/jsx-runtime";
4746
4771
  var Content6 = function(param) {
4747
4772
  var children = param.children;
4748
4773
  var addToast = useToasts().addToast;
@@ -4812,13 +4837,13 @@ var Content6 = function(param) {
4812
4837
  createMessageProps: createMessageProps,
4813
4838
  messageAudioProps: messageAudioProps
4814
4839
  }).status;
4815
- return /* @__PURE__ */ jsx77(AudioThreadContext.Provider, {
4840
+ return /* @__PURE__ */ jsx79(AudioThreadContext.Provider, {
4816
4841
  value: {
4817
4842
  status: status,
4818
4843
  recorderProps: recorderProps,
4819
4844
  messageAudioProps: messageAudioProps
4820
4845
  },
4821
- children: /* @__PURE__ */ jsx77(Flex28, {
4846
+ children: /* @__PURE__ */ jsx79(Flex28, {
4822
4847
  direction: "column",
4823
4848
  flexGrow: "1",
4824
4849
  p: "9",
@@ -4828,8 +4853,8 @@ var Content6 = function(param) {
4828
4853
  };
4829
4854
  var Root12 = function(param) {
4830
4855
  var children = param.children;
4831
- return /* @__PURE__ */ jsx77(ToastsProvider, {
4832
- children: /* @__PURE__ */ jsx77(Content6, {
4856
+ return /* @__PURE__ */ jsx79(ToastsProvider, {
4857
+ children: /* @__PURE__ */ jsx79(Content6, {
4833
4858
  children: children
4834
4859
  })
4835
4860
  });
@@ -4848,7 +4873,7 @@ import _8 from "lodash";
4848
4873
  import { Flex as Flex29, Grid } from "@radix-ui/themes";
4849
4874
  import { useState as useState8, useEffect as useEffect10, useCallback as useCallback5 } from "react";
4850
4875
  import { cluster } from "radash";
4851
- import { jsx as jsx78 } from "react/jsx-runtime";
4876
+ import { jsx as jsx80 } from "react/jsx-runtime";
4852
4877
  var barCount = 4;
4853
4878
  var BarsVisualizer = function(param) {
4854
4879
  var visualizationAnalyser = param.visualizationAnalyser, backgroundColor = param.backgroundColor, height = param.height, barWidth = param.barWidth;
@@ -4879,7 +4904,7 @@ var BarsVisualizer = function(param) {
4879
4904
  draw,
4880
4905
  visualizationAnalyser
4881
4906
  ]);
4882
- return /* @__PURE__ */ jsx78(Grid, {
4907
+ return /* @__PURE__ */ jsx80(Grid, {
4883
4908
  columns: "".concat(barCount),
4884
4909
  gap: "1",
4885
4910
  width: "auto",
@@ -4888,12 +4913,12 @@ var BarsVisualizer = function(param) {
4888
4913
  gridTemplateColumns: "repeat(4, minmax(0, 1fr))"
4889
4914
  },
4890
4915
  children: barHeights.map(function(barHeight, index) {
4891
- return /* @__PURE__ */ jsx78(Flex29, {
4916
+ return /* @__PURE__ */ jsx80(Flex29, {
4892
4917
  direction: "column",
4893
4918
  align: "center",
4894
4919
  justify: "center",
4895
4920
  height: height,
4896
- children: /* @__PURE__ */ jsx78(Flex29, {
4921
+ children: /* @__PURE__ */ jsx80(Flex29, {
4897
4922
  minHeight: "50%",
4898
4923
  maxHeight: "100%",
4899
4924
  height: "".concat(barHeight + 20, "%"),
@@ -4908,7 +4933,7 @@ var BarsVisualizer = function(param) {
4908
4933
  });
4909
4934
  };
4910
4935
  // src/components/threads/AudioThread/Visualization/index.tsx
4911
- import { jsx as jsx79, jsxs as jsxs29 } from "react/jsx-runtime";
4936
+ import { jsx as jsx81, jsxs as jsxs29 } from "react/jsx-runtime";
4912
4937
  var Visualization = function() {
4913
4938
  var audioThreadContext = useAudioThreadContext();
4914
4939
  var assistantNameContext = useContext15(AssistantNameContext);
@@ -4943,7 +4968,7 @@ var Visualization = function() {
4943
4968
  mb: "3",
4944
4969
  flexGrow: "1",
4945
4970
  children: [
4946
- /* @__PURE__ */ jsx79(Flex30, {
4971
+ /* @__PURE__ */ jsx81(Flex30, {
4947
4972
  align: "center",
4948
4973
  justify: "center",
4949
4974
  height: "200px",
@@ -4953,7 +4978,7 @@ var Visualization = function() {
4953
4978
  borderRadius: "9999px",
4954
4979
  scale: scale
4955
4980
  },
4956
- children: /* @__PURE__ */ jsx79(BarsVisualizer, {
4981
+ children: /* @__PURE__ */ jsx81(BarsVisualizer, {
4957
4982
  visualizationAnalyser: audioThreadContext.messageAudioProps.visualizationAnalyser,
4958
4983
  backgroundColor: audioThreadContext.status === "playing" ? "var(--accent-11)" : "var(--gray-11)",
4959
4984
  height: "40px",
@@ -4965,8 +4990,8 @@ var Visualization = function() {
4965
4990
  gap: "3",
4966
4991
  pt: "5",
4967
4992
  children: [
4968
- /* @__PURE__ */ jsx79(AssistantAvatar, {}),
4969
- /* @__PURE__ */ jsx79(Name, {
4993
+ /* @__PURE__ */ jsx81(AssistantAvatar, {}),
4994
+ /* @__PURE__ */ jsx81(Name, {
4970
4995
  children: assistantNameContext
4971
4996
  })
4972
4997
  ]
@@ -4976,7 +5001,7 @@ var Visualization = function() {
4976
5001
  };
4977
5002
  // src/components/threads/AudioThread/Status/StatusMessages.tsx
4978
5003
  import { Flex as Flex31, Text as Text8 } from "@radix-ui/themes";
4979
- import { jsx as jsx80, jsxs as jsxs30 } from "react/jsx-runtime";
5004
+ import { jsx as jsx82, jsxs as jsxs30 } from "react/jsx-runtime";
4980
5005
  var html = function(param) {
4981
5006
  var texts = param.texts;
4982
5007
  return "\n .status-messages-texts:after {\n content: '".concat(texts[0], "';\n animation: texts ").concat(texts.length * 5, "s linear infinite;\n }\n\n @keyframes texts {\n ").concat(texts.map(function(_10, i) {
@@ -4989,13 +5014,13 @@ var StatusMessages = function(param) {
4989
5014
  justify: "center",
4990
5015
  pb: "5",
4991
5016
  children: [
4992
- /* @__PURE__ */ jsx80(Text8, {
5017
+ /* @__PURE__ */ jsx82(Text8, {
4993
5018
  size: "2",
4994
5019
  weight: "regular",
4995
5020
  color: "gray",
4996
5021
  className: "status-messages-texts"
4997
5022
  }),
4998
- /* @__PURE__ */ jsx80("style", {
5023
+ /* @__PURE__ */ jsx82("style", {
4999
5024
  dangerouslySetInnerHTML: {
5000
5025
  __html: html({
5001
5026
  texts: texts
@@ -5006,11 +5031,11 @@ var StatusMessages = function(param) {
5006
5031
  });
5007
5032
  };
5008
5033
  // src/components/threads/AudioThread/Status/index.tsx
5009
- import { jsx as jsx81 } from "react/jsx-runtime";
5034
+ import { jsx as jsx83 } from "react/jsx-runtime";
5010
5035
  var Status = function() {
5011
5036
  var audioThreadContext = useAudioThreadContext();
5012
5037
  if (audioThreadContext.status === "recording") {
5013
- return /* @__PURE__ */ jsx81(StatusMessages, {
5038
+ return /* @__PURE__ */ jsx83(StatusMessages, {
5014
5039
  texts: [
5015
5040
  "Start speaking",
5016
5041
  "Listening",
@@ -5024,20 +5049,20 @@ var Status = function() {
5024
5049
  "idle",
5025
5050
  "playerPaused"
5026
5051
  ].includes(audioThreadContext.status)) {
5027
- return /* @__PURE__ */ jsx81(StatusMessages, {
5052
+ return /* @__PURE__ */ jsx83(StatusMessages, {
5028
5053
  texts: [
5029
5054
  "Click the button below to activate"
5030
5055
  ]
5031
5056
  });
5032
5057
  }
5033
5058
  if (audioThreadContext.status === "playing") {
5034
- return /* @__PURE__ */ jsx81(StatusMessages, {
5059
+ return /* @__PURE__ */ jsx83(StatusMessages, {
5035
5060
  texts: [
5036
5061
  "Click the button below to interrupt"
5037
5062
  ]
5038
5063
  });
5039
5064
  }
5040
- return /* @__PURE__ */ jsx81(StatusMessages, {
5065
+ return /* @__PURE__ */ jsx83(StatusMessages, {
5041
5066
  texts: [
5042
5067
  "Thinking"
5043
5068
  ]
@@ -5046,9 +5071,9 @@ var Status = function() {
5046
5071
  // src/components/threads/AudioThread/Form/index.tsx
5047
5072
  import { Flex as Flex33 } from "@radix-ui/themes";
5048
5073
  // src/components/threads/AudioThread/Form/MicIcon.tsx
5049
- import { jsx as jsx82 } from "react/jsx-runtime";
5074
+ import { jsx as jsx84 } from "react/jsx-runtime";
5050
5075
  var MicIcon = function(props) {
5051
- return /* @__PURE__ */ jsx82("svg", _object_spread_props(_object_spread({
5076
+ return /* @__PURE__ */ jsx84("svg", _object_spread_props(_object_spread({
5052
5077
  xmlns: "http://www.w3.org/2000/svg",
5053
5078
  fill: "currentColor",
5054
5079
  stroke: "currentColor",
@@ -5057,7 +5082,7 @@ var MicIcon = function(props) {
5057
5082
  height: "15",
5058
5083
  width: "15"
5059
5084
  }, props), {
5060
- children: /* @__PURE__ */ jsx82("path", {
5085
+ children: /* @__PURE__ */ jsx84("path", {
5061
5086
  stroke: "none",
5062
5087
  d: "M192 0c-53 0-96 43-96 96v160c0 53 43 96 96 96s96-43 96-96V96c0-53-43-96-96-96zM64 216c0-13.3-10.7-24-24-24s-24 10.7-24 24v40c0 89.1 66.2 162.7 152 174.4V464h-48c-13.3 0-24 10.7-24 24s10.7 24 24 24h144c13.3 0 24-10.7 24-24s-10.7-24-24-24h-48v-33.6c85.8-11.7 152-85.3 152-174.4v-40c0-13.3-10.7-24-24-24s-24 10.7-24 24v40c0 70.7-57.3 128-128 128S64 326.7 64 256v-40z"
5063
5088
  })
@@ -5066,7 +5091,7 @@ var MicIcon = function(props) {
5066
5091
  // src/components/threads/AudioThread/Form/ActionButton/index.tsx
5067
5092
  import { Flex as Flex32, IconButton as IconButton10 } from "@radix-ui/themes";
5068
5093
  import { StopIcon as StopIcon2, PauseIcon as PauseIcon2, ArrowUpIcon as ArrowUpIcon2, ResumeIcon } from "@radix-ui/react-icons";
5069
- import { jsx as jsx83, jsxs as jsxs31 } from "react/jsx-runtime";
5094
+ import { jsx as jsx85, jsxs as jsxs31 } from "react/jsx-runtime";
5070
5095
  var ActionButton = function() {
5071
5096
  var audioThreadContext = useAudioThreadContext();
5072
5097
  var superinterfaceContext = useSuperinterfaceContext();
@@ -5074,37 +5099,37 @@ var ActionButton = function() {
5074
5099
  return /* @__PURE__ */ jsxs31(Flex32, {
5075
5100
  align: "center",
5076
5101
  children: [
5077
- /* @__PURE__ */ jsx83(Flex32, {
5102
+ /* @__PURE__ */ jsx85(Flex32, {
5078
5103
  mr: "3",
5079
5104
  ml: "-7",
5080
- children: /* @__PURE__ */ jsx83(IconButton10, {
5105
+ children: /* @__PURE__ */ jsx85(IconButton10, {
5081
5106
  onClick: audioThreadContext.recorderProps.pause,
5082
5107
  color: "gray",
5083
5108
  variant: "soft",
5084
5109
  size: "1",
5085
- children: /* @__PURE__ */ jsx83(PauseIcon2, {})
5110
+ children: /* @__PURE__ */ jsx85(PauseIcon2, {})
5086
5111
  })
5087
5112
  }),
5088
- /* @__PURE__ */ jsx83(IconButton10, {
5113
+ /* @__PURE__ */ jsx85(IconButton10, {
5089
5114
  onClick: audioThreadContext.recorderProps.stop,
5090
5115
  highContrast: true,
5091
5116
  variant: "soft",
5092
5117
  size: "4",
5093
- children: /* @__PURE__ */ jsx83(ArrowUpIcon2, {})
5118
+ children: /* @__PURE__ */ jsx85(ArrowUpIcon2, {})
5094
5119
  })
5095
5120
  ]
5096
5121
  });
5097
5122
  }
5098
5123
  if (audioThreadContext.status === "recorderPaused") {
5099
- return /* @__PURE__ */ jsx83(IconButton10, {
5124
+ return /* @__PURE__ */ jsx85(IconButton10, {
5100
5125
  onClick: audioThreadContext.recorderProps.resume,
5101
5126
  color: "red",
5102
5127
  size: "4",
5103
- children: /* @__PURE__ */ jsx83(ResumeIcon, {})
5128
+ children: /* @__PURE__ */ jsx85(ResumeIcon, {})
5104
5129
  });
5105
5130
  }
5106
5131
  if (audioThreadContext.status === "idle") {
5107
- return /* @__PURE__ */ jsx83(IconButton10, {
5132
+ return /* @__PURE__ */ jsx85(IconButton10, {
5108
5133
  onClick: function() {
5109
5134
  return audioThreadContext.recorderProps.start();
5110
5135
  },
@@ -5113,7 +5138,7 @@ var ActionButton = function() {
5113
5138
  });
5114
5139
  }
5115
5140
  if (audioThreadContext.status === "playing") {
5116
- return /* @__PURE__ */ jsx83(IconButton10, {
5141
+ return /* @__PURE__ */ jsx85(IconButton10, {
5117
5142
  onClick: function() {
5118
5143
  var _superinterfaceContext_createMessageAbortControllerRef_current;
5119
5144
  audioThreadContext.messageAudioProps.stop();
@@ -5123,26 +5148,26 @@ var ActionButton = function() {
5123
5148
  size: "4",
5124
5149
  color: "gray",
5125
5150
  variant: "soft",
5126
- children: /* @__PURE__ */ jsx83(StopIcon2, {})
5151
+ children: /* @__PURE__ */ jsx85(StopIcon2, {})
5127
5152
  });
5128
5153
  }
5129
5154
  if (audioThreadContext.status === "playerPaused") {
5130
- return /* @__PURE__ */ jsx83(IconButton10, {
5155
+ return /* @__PURE__ */ jsx85(IconButton10, {
5131
5156
  onClick: function() {
5132
5157
  return audioThreadContext.messageAudioProps.play();
5133
5158
  },
5134
5159
  size: "4",
5135
- children: /* @__PURE__ */ jsx83(ResumeIcon, {})
5160
+ children: /* @__PURE__ */ jsx85(ResumeIcon, {})
5136
5161
  });
5137
5162
  }
5138
- return /* @__PURE__ */ jsx83(IconButton10, {
5163
+ return /* @__PURE__ */ jsx85(IconButton10, {
5139
5164
  size: "4",
5140
5165
  variant: "soft",
5141
5166
  disabled: true
5142
5167
  });
5143
5168
  };
5144
5169
  // src/components/threads/AudioThread/Form/index.tsx
5145
- import { jsx as jsx84, jsxs as jsxs32 } from "react/jsx-runtime";
5170
+ import { jsx as jsx86, jsxs as jsxs32 } from "react/jsx-runtime";
5146
5171
  var Form = function() {
5147
5172
  var audioThreadContext = useAudioThreadContext();
5148
5173
  return /* @__PURE__ */ jsxs32(Flex33, {
@@ -5153,24 +5178,24 @@ var Form = function() {
5153
5178
  pb: "3",
5154
5179
  align: "center",
5155
5180
  children: [
5156
- /* @__PURE__ */ jsx84(Flex33, {
5181
+ /* @__PURE__ */ jsx86(Flex33, {
5157
5182
  ml: "-22.5px",
5158
5183
  mr: "2",
5159
5184
  align: "center",
5160
- children: /* @__PURE__ */ jsx84(MicIcon, {
5185
+ children: /* @__PURE__ */ jsx86(MicIcon, {
5161
5186
  style: {
5162
5187
  color: audioThreadContext.status === "recording" ? "var(--accent-11)" : "var(--gray-11)"
5163
5188
  }
5164
5189
  })
5165
5190
  }),
5166
- /* @__PURE__ */ jsx84(Flex33, {
5191
+ /* @__PURE__ */ jsx86(Flex33, {
5167
5192
  px: "2",
5168
5193
  py: "1",
5169
5194
  style: {
5170
5195
  backgroundColor: audioThreadContext.status === "recording" ? "var(--accent-4)" : "var(--gray-4)",
5171
5196
  borderRadius: "var(--radius-6)"
5172
5197
  },
5173
- children: /* @__PURE__ */ jsx84(BarsVisualizer, {
5198
+ children: /* @__PURE__ */ jsx86(BarsVisualizer, {
5174
5199
  visualizationAnalyser: audioThreadContext.recorderProps.visualizationAnalyser,
5175
5200
  backgroundColor: audioThreadContext.status === "recording" ? "var(--accent-11)" : "var(--gray-11)",
5176
5201
  height: "20px",
@@ -5179,18 +5204,18 @@ var Form = function() {
5179
5204
  })
5180
5205
  ]
5181
5206
  }),
5182
- /* @__PURE__ */ jsx84(ActionButton, {})
5207
+ /* @__PURE__ */ jsx86(ActionButton, {})
5183
5208
  ]
5184
5209
  });
5185
5210
  };
5186
5211
  // src/components/threads/AudioThread/index.tsx
5187
- import { jsx as jsx85, jsxs as jsxs33 } from "react/jsx-runtime";
5212
+ import { jsx as jsx87, jsxs as jsxs33 } from "react/jsx-runtime";
5188
5213
  var AudioThread = function(props) {
5189
5214
  return /* @__PURE__ */ jsxs33(Root12, _object_spread_props(_object_spread({}, props), {
5190
5215
  children: [
5191
- /* @__PURE__ */ jsx85(Visualization, {}),
5192
- /* @__PURE__ */ jsx85(Status, {}),
5193
- /* @__PURE__ */ jsx85(Form, {})
5216
+ /* @__PURE__ */ jsx87(Visualization, {}),
5217
+ /* @__PURE__ */ jsx87(Status, {}),
5218
+ /* @__PURE__ */ jsx87(Form, {})
5194
5219
  ]
5195
5220
  }));
5196
5221
  };
@@ -5199,14 +5224,14 @@ AudioThread.Visualization = Visualization;
5199
5224
  AudioThread.Status = Status;
5200
5225
  AudioThread.Form = Form;
5201
5226
  // src/components/threads/AudioThreadDialog/index.tsx
5202
- import { jsx as jsx86, jsxs as jsxs34 } from "react/jsx-runtime";
5227
+ import { jsx as jsx88, jsxs as jsxs34 } from "react/jsx-runtime";
5203
5228
  var AudioThreadDialog = function() {
5204
5229
  return /* @__PURE__ */ jsxs34(Root9, {
5205
5230
  children: [
5206
- /* @__PURE__ */ jsx86(Content5.Root, {
5207
- children: /* @__PURE__ */ jsx86(AudioThread, {})
5231
+ /* @__PURE__ */ jsx88(Content5.Root, {
5232
+ children: /* @__PURE__ */ jsx88(AudioThread, {})
5208
5233
  }),
5209
- /* @__PURE__ */ jsx86(Trigger, {})
5234
+ /* @__PURE__ */ jsx88(Trigger, {})
5210
5235
  ]
5211
5236
  });
5212
5237
  };
@@ -5224,7 +5249,7 @@ import { Flex as Flex34 } from "@radix-ui/themes";
5224
5249
  import { ArrowUpIcon as ArrowUpIcon3 } from "@radix-ui/react-icons";
5225
5250
  import { Text as Text9, Button as Button4, Spinner as Spinner2 } from "@radix-ui/themes";
5226
5251
  import { useQueryClient as useQueryClient7 } from "@tanstack/react-query";
5227
- import { jsx as jsx87, jsxs as jsxs35 } from "react/jsx-runtime";
5252
+ import { jsx as jsx89, jsxs as jsxs35 } from "react/jsx-runtime";
5228
5253
  var Item = function(param) {
5229
5254
  var suggestion = param.suggestion, isDisabled = param.isDisabled;
5230
5255
  var addToast = useToasts().addToast;
@@ -5237,7 +5262,7 @@ var Item = function(param) {
5237
5262
  threadContext: threadContext
5238
5263
  })
5239
5264
  }), createMessage = _useCreateMessage.createMessage, isPending = _useCreateMessage.isPending;
5240
- return /* @__PURE__ */ jsx87(Content7, {
5265
+ return /* @__PURE__ */ jsx89(Content7, {
5241
5266
  onClick: function() {
5242
5267
  createMessage({
5243
5268
  // @ts-ignore-next-line
@@ -5261,14 +5286,14 @@ var Content7 = function(param) {
5261
5286
  flexShrink: 1
5262
5287
  },
5263
5288
  children: [
5264
- /* @__PURE__ */ jsx87(Text9, {
5289
+ /* @__PURE__ */ jsx89(Text9, {
5265
5290
  size: "1",
5266
5291
  weight: "regular",
5267
5292
  children: children
5268
5293
  }),
5269
- /* @__PURE__ */ jsx87(Spinner2, {
5294
+ /* @__PURE__ */ jsx89(Spinner2, {
5270
5295
  loading: isPending,
5271
- children: /* @__PURE__ */ jsx87(ArrowUpIcon3, {
5296
+ children: /* @__PURE__ */ jsx89(ArrowUpIcon3, {
5272
5297
  style: {
5273
5298
  flexShrink: 0
5274
5299
  }
@@ -5279,7 +5304,7 @@ var Content7 = function(param) {
5279
5304
  };
5280
5305
  Item.Content = Content7;
5281
5306
  // src/components/suggestions/Suggestions/Content.tsx
5282
- import { jsx as jsx88 } from "react/jsx-runtime";
5307
+ import { jsx as jsx90 } from "react/jsx-runtime";
5283
5308
  var Content8 = function(param) {
5284
5309
  var children = param.children;
5285
5310
  var isMutatingMessage = useIsMutatingMessage();
@@ -5293,12 +5318,12 @@ var Content8 = function(param) {
5293
5318
  children
5294
5319
  ]);
5295
5320
  if (isEmpty3(suggestions)) return null;
5296
- return /* @__PURE__ */ jsx88(Flex34, {
5321
+ return /* @__PURE__ */ jsx90(Flex34, {
5297
5322
  gap: "2",
5298
5323
  py: "2",
5299
5324
  wrap: "wrap",
5300
5325
  children: suggestions.map(function(suggestion) {
5301
- return /* @__PURE__ */ jsx88(Item, {
5326
+ return /* @__PURE__ */ jsx90(Item, {
5302
5327
  suggestion: suggestion,
5303
5328
  isDisabled: isMutatingMessage
5304
5329
  }, suggestion);
@@ -5306,7 +5331,7 @@ var Content8 = function(param) {
5306
5331
  });
5307
5332
  };
5308
5333
  // src/components/suggestions/Suggestions/index.tsx
5309
- import { jsx as jsx89 } from "react/jsx-runtime";
5334
+ import { jsx as jsx91 } from "react/jsx-runtime";
5310
5335
  var Suggestions = function(param) {
5311
5336
  var children = param.children;
5312
5337
  var latestMessageProps = useLatestMessage();
@@ -5319,14 +5344,14 @@ var Suggestions = function(param) {
5319
5344
  ]);
5320
5345
  if (latestMessageProps.isLoading) return null;
5321
5346
  if (isDisabled) return null;
5322
- return /* @__PURE__ */ jsx89(Content8, {
5347
+ return /* @__PURE__ */ jsx91(Content8, {
5323
5348
  children: children
5324
5349
  });
5325
5350
  };
5326
5351
  Suggestions.Item = Item;
5327
5352
  // src/components/markdown/MarkdownProvider/index.tsx
5328
5353
  import { useMemo as useMemo17 } from "react";
5329
- import { jsx as jsx90 } from "react/jsx-runtime";
5354
+ import { jsx as jsx92 } from "react/jsx-runtime";
5330
5355
  var MarkdownProvider = function(_param) {
5331
5356
  var children = _param.children, rest = _object_without_properties(_param, [
5332
5357
  "children"
@@ -5338,7 +5363,7 @@ var MarkdownProvider = function(_param) {
5338
5363
  rest,
5339
5364
  prevMarkdownContext
5340
5365
  ]);
5341
- return /* @__PURE__ */ jsx90(MarkdownContext.Provider, {
5366
+ return /* @__PURE__ */ jsx92(MarkdownContext.Provider, {
5342
5367
  value: value,
5343
5368
  children: children
5344
5369
  });
@@ -5397,11 +5422,11 @@ var optimizedSrc = function(param) {
5397
5422
  }));
5398
5423
  };
5399
5424
  // src/components/imageAvatars/ImageAvatar/index.tsx
5400
- import { jsx as jsx91 } from "react/jsx-runtime";
5425
+ import { jsx as jsx93 } from "react/jsx-runtime";
5401
5426
  var ImageAvatar = function(param) {
5402
5427
  var imageAvatar = param.imageAvatar, size = param.size;
5403
5428
  var superinterfaceContext = useSuperinterfaceContext();
5404
- return /* @__PURE__ */ jsx91(Avatar4, {
5429
+ return /* @__PURE__ */ jsx93(Avatar4, {
5405
5430
  fallback: "",
5406
5431
  src: optimizedSrc({
5407
5432
  imageAvatar: imageAvatar,
@@ -5419,7 +5444,7 @@ import { BackpackIcon, RocketIcon, MagicWandIcon, CubeIcon, TargetIcon, DiscIcon
5419
5444
  var _obj;
5420
5445
  var iconAvatarComponents = (_obj = {}, _define_property(_obj, "BACKPACK" /* BACKPACK */ , BackpackIcon), _define_property(_obj, "ROCKET" /* ROCKET */ , RocketIcon), _define_property(_obj, "MAGIC_WAND" /* MAGIC_WAND */ , MagicWandIcon), _define_property(_obj, "CUBE" /* CUBE */ , CubeIcon), _define_property(_obj, "TARGET" /* TARGET */ , TargetIcon), _define_property(_obj, "DISC" /* DISC */ , DiscIcon), _define_property(_obj, "GLOBE" /* GLOBE */ , GlobeIcon), _define_property(_obj, "STAR" /* STAR */ , StarIcon), _define_property(_obj, "LIGHTNING_BOLT" /* LIGHTNING_BOLT */ , LightningBoltIcon2), _define_property(_obj, "FACE" /* FACE */ , FaceIcon), _define_property(_obj, "PERSON" /* PERSON */ , PersonIcon2), _define_property(_obj, "HEART" /* HEART */ , HeartIcon), _obj);
5421
5446
  // src/components/iconAvatars/IconAvatar.tsx
5422
- import { jsx as jsx92 } from "react/jsx-runtime";
5447
+ import { jsx as jsx94 } from "react/jsx-runtime";
5423
5448
  var IconAvatar = function(param) {
5424
5449
  var iconAvatar = param.iconAvatar, size = param.size;
5425
5450
  var Component = useMemo18(function() {
@@ -5427,30 +5452,30 @@ var IconAvatar = function(param) {
5427
5452
  }, [
5428
5453
  iconAvatar
5429
5454
  ]);
5430
- return /* @__PURE__ */ jsx92(Avatar5, {
5455
+ return /* @__PURE__ */ jsx94(Avatar5, {
5431
5456
  size: size,
5432
- fallback: Component ? /* @__PURE__ */ jsx92(Component, {}) : ""
5457
+ fallback: Component ? /* @__PURE__ */ jsx94(Component, {}) : ""
5433
5458
  });
5434
5459
  };
5435
5460
  // src/components/avatars/Avatar.tsx
5436
- import { jsx as jsx93 } from "react/jsx-runtime";
5461
+ import { jsx as jsx95 } from "react/jsx-runtime";
5437
5462
  var Avatar6 = function(param) {
5438
5463
  var avatar = param.avatar, _param_size = param.size, size = _param_size === void 0 ? "1" : _param_size;
5439
5464
  if (avatar) {
5440
5465
  if (avatar.type === "IMAGE" /* IMAGE */ && avatar.imageAvatar) {
5441
- return /* @__PURE__ */ jsx93(ImageAvatar, {
5466
+ return /* @__PURE__ */ jsx95(ImageAvatar, {
5442
5467
  imageAvatar: avatar.imageAvatar,
5443
5468
  size: size
5444
5469
  });
5445
5470
  }
5446
5471
  if (avatar.type === "ICON" /* ICON */ && avatar.iconAvatar) {
5447
- return /* @__PURE__ */ jsx93(IconAvatar, {
5472
+ return /* @__PURE__ */ jsx95(IconAvatar, {
5448
5473
  iconAvatar: avatar.iconAvatar,
5449
5474
  size: size
5450
5475
  });
5451
5476
  }
5452
5477
  }
5453
- return /* @__PURE__ */ jsx93(RadixAvatar, {
5478
+ return /* @__PURE__ */ jsx95(RadixAvatar, {
5454
5479
  fallback: "",
5455
5480
  size: size
5456
5481
  });
@@ -5463,7 +5488,7 @@ var useComponents = function() {
5463
5488
  return useContext16(ComponentsContext);
5464
5489
  };
5465
5490
  // src/components/components/ComponentsProvider.tsx
5466
- import { jsx as jsx94 } from "react/jsx-runtime";
5491
+ import { jsx as jsx96 } from "react/jsx-runtime";
5467
5492
  var ComponentsProvider = function(_param) {
5468
5493
  var children = _param.children, rest = _object_without_properties(_param, [
5469
5494
  "children"
@@ -5475,7 +5500,7 @@ var ComponentsProvider = function(_param) {
5475
5500
  rest,
5476
5501
  prevComponents
5477
5502
  ]);
5478
- return /* @__PURE__ */ jsx94(ComponentsContext.Provider, {
5503
+ return /* @__PURE__ */ jsx96(ComponentsContext.Provider, {
5479
5504
  value: value,
5480
5505
  children: children
5481
5506
  });
@@ -5485,7 +5510,7 @@ import { useMemo as useMemo21 } from "react";
5485
5510
  import { Theme } from "@radix-ui/themes";
5486
5511
  // src/components/assistants/AssistantProvider/Code.tsx
5487
5512
  import { useMemo as useMemo20 } from "react";
5488
- import { jsx as jsx95 } from "react/jsx-runtime";
5513
+ import { jsx as jsx97 } from "react/jsx-runtime";
5489
5514
  var Code4 = function(param) {
5490
5515
  var children = param.children, className = param.className, markdownContext = param.markdownContext;
5491
5516
  var messageContext = useMessageContext();
@@ -5501,12 +5526,12 @@ var Code4 = function(param) {
5501
5526
  className: className
5502
5527
  });
5503
5528
  }
5504
- return /* @__PURE__ */ jsx95(Suggestions, {
5529
+ return /* @__PURE__ */ jsx97(Suggestions, {
5505
5530
  children: children
5506
5531
  });
5507
5532
  };
5508
5533
  // src/components/assistants/AssistantProvider/index.tsx
5509
- import { jsx as jsx96 } from "react/jsx-runtime";
5534
+ import { jsx as jsx98 } from "react/jsx-runtime";
5510
5535
  var AssistantProvider = function(param) {
5511
5536
  var children = param.children;
5512
5537
  var superinterfaceContext = useSuperinterfaceContext();
@@ -5518,7 +5543,7 @@ var AssistantProvider = function(param) {
5518
5543
  return {
5519
5544
  code: function(props) {
5520
5545
  return(// @ts-ignore-next-line
5521
- /* @__PURE__ */ jsx96(Code4, _object_spread_props(_object_spread({}, props), {
5546
+ /* @__PURE__ */ jsx98(Code4, _object_spread_props(_object_spread({}, props), {
5522
5547
  markdownContext: markdownContext
5523
5548
  })));
5524
5549
  }
@@ -5529,7 +5554,7 @@ var AssistantProvider = function(param) {
5529
5554
  if (!assistant) {
5530
5555
  return null;
5531
5556
  }
5532
- return /* @__PURE__ */ jsx96(Theme, {
5557
+ return /* @__PURE__ */ jsx98(Theme, {
5533
5558
  accentColor: assistant.theme.accentColor,
5534
5559
  grayColor: assistant.theme.grayColor,
5535
5560
  radius: assistant.theme.radius,
@@ -5537,13 +5562,13 @@ var AssistantProvider = function(param) {
5537
5562
  scaling: assistant.theme.scaling,
5538
5563
  panelBackground: "solid",
5539
5564
  hasBackground: false,
5540
- children: /* @__PURE__ */ jsx96(AssistantNameContext.Provider, {
5565
+ children: /* @__PURE__ */ jsx98(AssistantNameContext.Provider, {
5541
5566
  value: assistant.name,
5542
- children: /* @__PURE__ */ jsx96(AssistantAvatarContext.Provider, {
5543
- value: /* @__PURE__ */ jsx96(Avatar6, {
5567
+ children: /* @__PURE__ */ jsx98(AssistantAvatarContext.Provider, {
5568
+ value: /* @__PURE__ */ jsx98(Avatar6, {
5544
5569
  avatar: assistant.avatar
5545
5570
  }),
5546
- children: /* @__PURE__ */ jsx96(MarkdownProvider, {
5571
+ children: /* @__PURE__ */ jsx98(MarkdownProvider, {
5547
5572
  components: components2,
5548
5573
  children: children
5549
5574
  })