@superinterface/react 2.16.5 → 2.17.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
@@ -414,7 +414,7 @@ var SuperinterfaceProvider = function(param) {
414
414
  });
415
415
  };
416
416
  // src/components/threads/Thread/Messages/index.tsx
417
- import { Flex as Flex13 } from "@radix-ui/themes";
417
+ import { Flex as Flex14 } from "@radix-ui/themes";
418
418
  // src/components/threads/Thread/Messages/Content/index.tsx
419
419
  import { useEffect } from "react";
420
420
  // src/hooks/messages/useMessages/index.tsx
@@ -787,7 +787,7 @@ var UserAvatar = function() {
787
787
  });
788
788
  };
789
789
  // src/components/threads/Thread/Messages/Content/MessageGroup/Content/index.tsx
790
- import { Flex as Flex11 } from "@radix-ui/themes";
790
+ import { Flex as Flex12 } from "@radix-ui/themes";
791
791
  // src/components/threads/Thread/Message/index.tsx
792
792
  import { useMemo as useMemo5, Fragment } from "react";
793
793
  import { isEmpty } from "radash";
@@ -1291,6 +1291,54 @@ var Img = function(props) {
1291
1291
  }))
1292
1292
  });
1293
1293
  };
1294
+ // src/contexts/markdown/MarkdownContext/lib/components/Annotation/index.tsx
1295
+ import { QuoteIcon, FileIcon } from "@radix-ui/react-icons";
1296
+ // src/contexts/markdown/MarkdownContext/lib/components/Annotation/AnnotationBase.tsx
1297
+ import { IconButton, Popover as Popover3, Flex as Flex10, Text as Text5 } from "@radix-ui/themes";
1298
+ import { jsx as jsx34, jsxs as jsxs9 } from "react/jsx-runtime";
1299
+ var AnnotationBase = function(param) {
1300
+ var icon = param.icon, content = param.content;
1301
+ return /* @__PURE__ */ jsxs9(Popover3.Root, {
1302
+ children: [
1303
+ /* @__PURE__ */ jsx34(Popover3.Trigger, {
1304
+ children: /* @__PURE__ */ jsx34(IconButton, {
1305
+ variant: "soft",
1306
+ color: "gray",
1307
+ size: "1",
1308
+ children: icon
1309
+ })
1310
+ }),
1311
+ /* @__PURE__ */ jsx34(Popover3.Content, {
1312
+ size: "1",
1313
+ children: /* @__PURE__ */ jsx34(Flex10, {
1314
+ direction: "column",
1315
+ children: /* @__PURE__ */ jsx34(Text5, {
1316
+ size: "1",
1317
+ color: "gray",
1318
+ children: content
1319
+ })
1320
+ })
1321
+ })
1322
+ ]
1323
+ });
1324
+ };
1325
+ // src/contexts/markdown/MarkdownContext/lib/components/Annotation/index.tsx
1326
+ import { jsx as jsx35 } from "react/jsx-runtime";
1327
+ var Annotation = function(param) {
1328
+ var annotation = param.annotation;
1329
+ if (annotation.type === "file_citation") {
1330
+ return /* @__PURE__ */ jsx35(AnnotationBase, {
1331
+ icon: /* @__PURE__ */ jsx35(QuoteIcon, {}),
1332
+ content: "File cited."
1333
+ });
1334
+ } else if (annotation.type === "file_path") {
1335
+ return /* @__PURE__ */ jsx35(AnnotationBase, {
1336
+ icon: /* @__PURE__ */ jsx35(FileIcon, {}),
1337
+ content: "File generated."
1338
+ });
1339
+ }
1340
+ return null;
1341
+ };
1294
1342
  // src/contexts/markdown/MarkdownContext/lib/components/index.tsx
1295
1343
  var components = {
1296
1344
  p: Paragraph,
@@ -1301,41 +1349,143 @@ var components = {
1301
1349
  li: ListItem,
1302
1350
  pre: Pre,
1303
1351
  code: Code2,
1304
- img: Img
1352
+ img: Img,
1353
+ annotation: Annotation
1354
+ };
1355
+ // src/lib/remark/remarkAnnotation.ts
1356
+ import { visit, SKIP } from "unist-util-visit";
1357
+ var remarkAnnotation = function(param) {
1358
+ var content = param.content;
1359
+ return function() {
1360
+ return function(tree) {
1361
+ visit(tree, "text", function(node, index, parent) {
1362
+ if (content.text.annotations.length > 0) {
1363
+ content.text.annotations.forEach(function(annotation) {
1364
+ var _parent_children;
1365
+ var _node_position_start, _node_position, _node_position_end, _node_position1;
1366
+ if (!((_node_position = node.position) === null || _node_position === void 0 ? void 0 : (_node_position_start = _node_position.start) === null || _node_position_start === void 0 ? void 0 : _node_position_start.offset)) return;
1367
+ if (!((_node_position1 = node.position) === null || _node_position1 === void 0 ? void 0 : (_node_position_end = _node_position1.end) === null || _node_position_end === void 0 ? void 0 : _node_position_end.offset)) return;
1368
+ if (node.position.start.offset > annotation.start_index) {
1369
+ return;
1370
+ }
1371
+ if (node.position.end.offset < annotation.end_index) {
1372
+ return;
1373
+ }
1374
+ var beforeStart = node.position.start.offset;
1375
+ var beforeEnd = annotation.start_index;
1376
+ var annotationStart = annotation.start_index;
1377
+ var annotationEnd = annotation.end_index;
1378
+ var afterStart = annotation.end_index;
1379
+ var afterEnd = node.position.end.offset;
1380
+ var before = node.value.slice(0, annotation.start_index - node.position.start.offset);
1381
+ var annotatedText = node.value.slice(annotation.start_index - node.position.start.offset, annotation.end_index - node.position.start.offset);
1382
+ var after = node.value.slice(annotation.end_index - node.position.start.offset);
1383
+ var newNodes = [];
1384
+ if (before) {
1385
+ newNodes.push({
1386
+ type: "text",
1387
+ value: before,
1388
+ position: {
1389
+ start: {
1390
+ offset: beforeStart
1391
+ },
1392
+ end: {
1393
+ offset: beforeEnd
1394
+ }
1395
+ }
1396
+ });
1397
+ }
1398
+ newNodes.push({
1399
+ value: annotatedText,
1400
+ data: {
1401
+ hName: "annotation",
1402
+ hProperties: {
1403
+ annotation: annotation
1404
+ }
1405
+ },
1406
+ position: {
1407
+ start: {
1408
+ offset: annotationStart
1409
+ },
1410
+ end: {
1411
+ offset: annotationEnd
1412
+ }
1413
+ }
1414
+ });
1415
+ if (after) {
1416
+ newNodes.push({
1417
+ type: "text",
1418
+ value: after,
1419
+ position: {
1420
+ start: {
1421
+ offset: afterStart
1422
+ },
1423
+ end: {
1424
+ offset: afterEnd
1425
+ }
1426
+ }
1427
+ });
1428
+ }
1429
+ (_parent_children = parent.children).splice.apply(_parent_children, [
1430
+ index,
1431
+ 1
1432
+ ].concat(_to_consumable_array(newNodes)));
1433
+ });
1434
+ return SKIP;
1435
+ }
1436
+ return;
1437
+ });
1438
+ };
1439
+ };
1440
+ };
1441
+ // src/contexts/markdown/MarkdownContext/lib/getRemarkPlugins.ts
1442
+ var getRemarkPlugins = function(param) {
1443
+ var content = param.content;
1444
+ return [
1445
+ remarkAnnotation({
1446
+ content: content
1447
+ })
1448
+ ];
1305
1449
  };
1306
1450
  // src/contexts/markdown/MarkdownContext/index.ts
1307
1451
  var MarkdownContext = createContext9({
1308
- components: components
1452
+ components: components,
1453
+ getRemarkPlugins: getRemarkPlugins
1309
1454
  });
1310
1455
  // src/hooks/markdown/useMarkdownContext/index.ts
1311
1456
  var useMarkdownContext = function() {
1312
1457
  return useContext7(MarkdownContext);
1313
1458
  };
1314
1459
  // src/components/threads/Thread/Message/TextContent.tsx
1315
- import { jsx as jsx34 } from "react/jsx-runtime";
1460
+ import { jsx as jsx36 } from "react/jsx-runtime";
1316
1461
  var TextContent = function(param) {
1317
1462
  var content = param.content;
1318
- var markdownContext = useMarkdownContext();
1319
- return /* @__PURE__ */ jsx34(Markdown, _object_spread_props(_object_spread({}, markdownContext), {
1463
+ var _useMarkdownContext = useMarkdownContext(), getRemarkPlugins2 = _useMarkdownContext.getRemarkPlugins, rest = _object_without_properties(_useMarkdownContext, [
1464
+ "getRemarkPlugins"
1465
+ ]);
1466
+ return /* @__PURE__ */ jsx36(Markdown, _object_spread_props(_object_spread({}, rest), {
1467
+ remarkPlugins: getRemarkPlugins2({
1468
+ content: content
1469
+ }),
1320
1470
  children: content.text.value
1321
1471
  }));
1322
1472
  };
1323
1473
  // src/components/threads/Thread/Message/Attachments/index.tsx
1324
- import { Flex as Flex10, Badge } from "@radix-ui/themes";
1325
- import { FileIcon } from "@radix-ui/react-icons";
1326
- import { jsx as jsx35, jsxs as jsxs9 } from "react/jsx-runtime";
1474
+ import { Flex as Flex11, Badge } from "@radix-ui/themes";
1475
+ import { FileIcon as FileIcon2 } from "@radix-ui/react-icons";
1476
+ import { jsx as jsx37, jsxs as jsxs10 } from "react/jsx-runtime";
1327
1477
  var Attachments = function(param) {
1328
1478
  var message = param.message;
1329
1479
  var _message_attachments;
1330
1480
  if (!((_message_attachments = message.attachments) === null || _message_attachments === void 0 ? void 0 : _message_attachments.length)) return null;
1331
- return /* @__PURE__ */ jsx35(Flex10, {
1481
+ return /* @__PURE__ */ jsx37(Flex11, {
1332
1482
  align: "start",
1333
1483
  pb: "1",
1334
- children: /* @__PURE__ */ jsxs9(Badge, {
1484
+ children: /* @__PURE__ */ jsxs10(Badge, {
1335
1485
  color: "gray",
1336
1486
  variant: "surface",
1337
1487
  children: [
1338
- /* @__PURE__ */ jsx35(FileIcon, {}),
1488
+ /* @__PURE__ */ jsx37(FileIcon2, {}),
1339
1489
  message.attachments.length,
1340
1490
  " file",
1341
1491
  message.attachments.length > 1 ? "s" : ""
@@ -1344,7 +1494,7 @@ var Attachments = function(param) {
1344
1494
  });
1345
1495
  };
1346
1496
  // src/components/threads/Thread/Message/index.tsx
1347
- import { jsx as jsx36, jsxs as jsxs10 } from "react/jsx-runtime";
1497
+ import { jsx as jsx38, jsxs as jsxs11 } from "react/jsx-runtime";
1348
1498
  var Message = function(param) {
1349
1499
  var message = param.message;
1350
1500
  var _useMemo5 = _sliced_to_array(useMemo5(function() {
@@ -1389,68 +1539,68 @@ var Message = function(param) {
1389
1539
  }, [
1390
1540
  message
1391
1541
  ]);
1392
- return /* @__PURE__ */ jsx36(Provider, {
1542
+ return /* @__PURE__ */ jsx38(Provider, {
1393
1543
  value: {
1394
1544
  message: message
1395
1545
  },
1396
- children: /* @__PURE__ */ jsxs10(Box9, {
1546
+ children: /* @__PURE__ */ jsxs11(Box9, {
1397
1547
  children: [
1398
- /* @__PURE__ */ jsx36(RunSteps, {
1548
+ /* @__PURE__ */ jsx38(RunSteps, {
1399
1549
  runSteps: olderRunSteps
1400
1550
  }),
1401
- /* @__PURE__ */ jsxs10(Box9, {
1551
+ /* @__PURE__ */ jsxs11(Box9, {
1402
1552
  children: [
1403
- /* @__PURE__ */ jsx36(Attachments, {
1553
+ /* @__PURE__ */ jsx38(Attachments, {
1404
1554
  message: message
1405
1555
  }),
1406
1556
  message.content.map(function(content, index) {
1407
- return /* @__PURE__ */ jsx36(Fragment, {
1408
- children: content.type === "text" && /* @__PURE__ */ jsx36(TextContent, {
1557
+ return /* @__PURE__ */ jsx38(Fragment, {
1558
+ children: content.type === "text" && /* @__PURE__ */ jsx38(TextContent, {
1409
1559
  content: content
1410
1560
  })
1411
1561
  }, index);
1412
1562
  }),
1413
- isInProgress && isEmpty(laterRunSteps) && /* @__PURE__ */ jsx36(StartingContentSkeleton, {})
1563
+ isInProgress && isEmpty(laterRunSteps) && /* @__PURE__ */ jsx38(StartingContentSkeleton, {})
1414
1564
  ]
1415
1565
  }),
1416
- /* @__PURE__ */ jsx36(RunSteps, {
1566
+ /* @__PURE__ */ jsx38(RunSteps, {
1417
1567
  runSteps: laterRunSteps
1418
1568
  }),
1419
- isInProgress && !isEmpty(laterRunSteps) && /* @__PURE__ */ jsx36(Box9, {
1420
- children: /* @__PURE__ */ jsx36(StartingContentSkeleton, {})
1569
+ isInProgress && !isEmpty(laterRunSteps) && /* @__PURE__ */ jsx38(Box9, {
1570
+ children: /* @__PURE__ */ jsx38(StartingContentSkeleton, {})
1421
1571
  })
1422
1572
  ]
1423
1573
  })
1424
1574
  });
1425
1575
  };
1426
1576
  // src/components/threads/Thread/Messages/Content/MessageGroup/Content/index.tsx
1427
- import { jsx as jsx37 } from "react/jsx-runtime";
1577
+ import { jsx as jsx39 } from "react/jsx-runtime";
1428
1578
  var Content2 = function(param) {
1429
1579
  var messageGroup = param.messageGroup;
1430
- return /* @__PURE__ */ jsx37(Flex11, {
1580
+ return /* @__PURE__ */ jsx39(Flex12, {
1431
1581
  direction: "column-reverse",
1432
1582
  children: messageGroup.messages.map(function(message) {
1433
- return /* @__PURE__ */ jsx37(Message, {
1583
+ return /* @__PURE__ */ jsx39(Message, {
1434
1584
  message: message
1435
1585
  }, message.id);
1436
1586
  })
1437
1587
  });
1438
1588
  };
1439
1589
  // src/components/threads/Thread/Messages/Content/MessageGroup/index.tsx
1440
- import { jsx as jsx38, jsxs as jsxs11 } from "react/jsx-runtime";
1590
+ import { jsx as jsx40, jsxs as jsxs12 } from "react/jsx-runtime";
1441
1591
  var MessageGroup = function(param) {
1442
1592
  var messageGroup = param.messageGroup;
1443
1593
  var assistantNameContext = useContext8(AssistantNameContext);
1444
- return /* @__PURE__ */ jsxs11(MessageGroupBase, {
1594
+ return /* @__PURE__ */ jsxs12(MessageGroupBase, {
1445
1595
  children: [
1446
- messageGroup.role === "user" ? /* @__PURE__ */ jsx38(UserAvatar, {}) : /* @__PURE__ */ jsx38(AssistantAvatar, {}),
1447
- /* @__PURE__ */ jsxs11(Box10, {
1596
+ messageGroup.role === "user" ? /* @__PURE__ */ jsx40(UserAvatar, {}) : /* @__PURE__ */ jsx40(AssistantAvatar, {}),
1597
+ /* @__PURE__ */ jsxs12(Box10, {
1448
1598
  flexGrow: "1",
1449
1599
  children: [
1450
- /* @__PURE__ */ jsx38(Name, {
1600
+ /* @__PURE__ */ jsx40(Name, {
1451
1601
  children: messageGroup.role === "user" ? "You" : assistantNameContext
1452
1602
  }),
1453
- /* @__PURE__ */ jsx38(Content2, {
1603
+ /* @__PURE__ */ jsx40(Content2, {
1454
1604
  messageGroup: messageGroup
1455
1605
  })
1456
1606
  ]
@@ -1459,7 +1609,7 @@ var MessageGroup = function(param) {
1459
1609
  });
1460
1610
  };
1461
1611
  // src/components/threads/Thread/Messages/Content/index.tsx
1462
- import { Fragment as Fragment2, jsx as jsx39 } from "react/jsx-runtime";
1612
+ import { Fragment as Fragment2, jsx as jsx41 } from "react/jsx-runtime";
1463
1613
  var Content3 = function() {
1464
1614
  var _useMessages = useMessages(), messages2 = _useMessages.messages, isLoading = _useMessages.isLoading, isLoadingError = _useMessages.isLoadingError;
1465
1615
  var addToast = useToasts().addToast;
@@ -1478,11 +1628,11 @@ var Content3 = function() {
1478
1628
  addToast
1479
1629
  ]);
1480
1630
  if (isLoading || isLoadingError) {
1481
- return /* @__PURE__ */ jsx39(MessagesSkeleton, {});
1631
+ return /* @__PURE__ */ jsx41(MessagesSkeleton, {});
1482
1632
  }
1483
- return /* @__PURE__ */ jsx39(Fragment2, {
1633
+ return /* @__PURE__ */ jsx41(Fragment2, {
1484
1634
  children: messageGroups2.map(function(messageGroup) {
1485
- return /* @__PURE__ */ jsx39(MessageGroup, {
1635
+ return /* @__PURE__ */ jsx41(MessageGroup, {
1486
1636
  messageGroup: messageGroup
1487
1637
  }, messageGroup.id);
1488
1638
  })
@@ -1493,20 +1643,20 @@ import { useMemo as useMemo7 } from "react";
1493
1643
  // src/components/skeletons/StartingSkeleton/index.tsx
1494
1644
  import { useContext as useContext9 } from "react";
1495
1645
  import { Box as Box11 } from "@radix-ui/themes";
1496
- import { jsx as jsx40, jsxs as jsxs12 } from "react/jsx-runtime";
1646
+ import { jsx as jsx42, jsxs as jsxs13 } from "react/jsx-runtime";
1497
1647
  var StartingSkeleton = function(param) {
1498
1648
  var children = param.children;
1499
1649
  var assistantNameContext = useContext9(AssistantNameContext);
1500
- return /* @__PURE__ */ jsxs12(MessageGroupBase, {
1650
+ return /* @__PURE__ */ jsxs13(MessageGroupBase, {
1501
1651
  children: [
1502
- /* @__PURE__ */ jsx40(AssistantAvatar, {}),
1503
- /* @__PURE__ */ jsxs12(Box11, {
1652
+ /* @__PURE__ */ jsx42(AssistantAvatar, {}),
1653
+ /* @__PURE__ */ jsxs13(Box11, {
1504
1654
  children: [
1505
- /* @__PURE__ */ jsx40(Name, {
1655
+ /* @__PURE__ */ jsx42(Name, {
1506
1656
  children: assistantNameContext
1507
1657
  }),
1508
1658
  children,
1509
- /* @__PURE__ */ jsx40(StartingContentSkeleton, {})
1659
+ /* @__PURE__ */ jsx42(StartingContentSkeleton, {})
1510
1660
  ]
1511
1661
  })
1512
1662
  ]
@@ -1531,7 +1681,7 @@ var isOptimistic = function(param) {
1531
1681
  return _4.startsWith(id, "-");
1532
1682
  };
1533
1683
  // src/components/threads/Thread/Messages/Progress/index.tsx
1534
- import { jsx as jsx41 } from "react/jsx-runtime";
1684
+ import { jsx as jsx43 } from "react/jsx-runtime";
1535
1685
  var Progress = function() {
1536
1686
  var latestMessage = useLatestMessage().latestMessage;
1537
1687
  var isMutatingMessage = useIsMutatingMessage();
@@ -1549,10 +1699,10 @@ var Progress = function() {
1549
1699
  isMutatingMessage
1550
1700
  ]);
1551
1701
  if (!isVisible) return null;
1552
- return /* @__PURE__ */ jsx41(StartingSkeleton, {});
1702
+ return /* @__PURE__ */ jsx43(StartingSkeleton, {});
1553
1703
  };
1554
1704
  // src/components/threads/Thread/Messages/Root/index.tsx
1555
- import { Flex as Flex12 } from "@radix-ui/themes";
1705
+ import { Flex as Flex13 } from "@radix-ui/themes";
1556
1706
  // src/hooks/misc/useInfiniteScroll/index.tsx
1557
1707
  import { useRef as useRef3 } from "react";
1558
1708
  import { useInView } from "react-intersection-observer";
@@ -1608,7 +1758,7 @@ var useInfiniteScroll = function(param) {
1608
1758
  };
1609
1759
  };
1610
1760
  // src/components/threads/Thread/Messages/Root/index.tsx
1611
- import { jsx as jsx42, jsxs as jsxs13 } from "react/jsx-runtime";
1761
+ import { jsx as jsx44, jsxs as jsxs14 } from "react/jsx-runtime";
1612
1762
  var Root2 = function(param) {
1613
1763
  var children = param.children, _param_style = param.style, style = _param_style === void 0 ? {} : _param_style;
1614
1764
  var _useMessages = useMessages(), isFetchingNextPage = _useMessages.isFetchingNextPage, hasNextPage = _useMessages.hasNextPage, fetchNextPage = _useMessages.fetchNextPage;
@@ -1617,7 +1767,7 @@ var Root2 = function(param) {
1617
1767
  hasNextPage: hasNextPage,
1618
1768
  fetchNextPage: fetchNextPage
1619
1769
  }), containerRef = _useInfiniteScroll.containerRef, loaderRef = _useInfiniteScroll.loaderRef;
1620
- return /* @__PURE__ */ jsxs13(Flex12, {
1770
+ return /* @__PURE__ */ jsxs14(Flex13, {
1621
1771
  ref: containerRef,
1622
1772
  direction: "column-reverse",
1623
1773
  flexGrow: "1",
@@ -1626,10 +1776,10 @@ var Root2 = function(param) {
1626
1776
  }),
1627
1777
  children: [
1628
1778
  children,
1629
- hasNextPage && /* @__PURE__ */ jsx42(Flex12, {
1779
+ hasNextPage && /* @__PURE__ */ jsx44(Flex13, {
1630
1780
  ref: loaderRef
1631
1781
  }),
1632
- /* @__PURE__ */ jsx42(Flex12, {
1782
+ /* @__PURE__ */ jsx44(Flex13, {
1633
1783
  flexShrink: "0",
1634
1784
  flexGrow: "1"
1635
1785
  })
@@ -1637,30 +1787,30 @@ var Root2 = function(param) {
1637
1787
  });
1638
1788
  };
1639
1789
  // src/components/threads/Thread/Messages/NextPageSkeleton.tsx
1640
- import { jsx as jsx43 } from "react/jsx-runtime";
1790
+ import { jsx as jsx45 } from "react/jsx-runtime";
1641
1791
  var NextPageSkeleton = function() {
1642
1792
  var hasNextPage = useMessages().hasNextPage;
1643
1793
  if (!hasNextPage) {
1644
1794
  return null;
1645
1795
  }
1646
- return /* @__PURE__ */ jsx43(MessagesSkeleton, {});
1796
+ return /* @__PURE__ */ jsx45(MessagesSkeleton, {});
1647
1797
  };
1648
1798
  // src/components/threads/Thread/Messages/index.tsx
1649
- import { jsx as jsx44, jsxs as jsxs14 } from "react/jsx-runtime";
1799
+ import { jsx as jsx46, jsxs as jsxs15 } from "react/jsx-runtime";
1650
1800
  var Messages = function(param) {
1651
1801
  var children = param.children, _param_style = param.style, style = _param_style === void 0 ? {} : _param_style;
1652
- return /* @__PURE__ */ jsxs14(Root2, {
1802
+ return /* @__PURE__ */ jsxs15(Root2, {
1653
1803
  style: style,
1654
1804
  children: [
1655
- /* @__PURE__ */ jsx44(Flex13, {
1805
+ /* @__PURE__ */ jsx46(Flex14, {
1656
1806
  flexShrink: "0",
1657
1807
  height: "var(--space-3)"
1658
1808
  }),
1659
- /* @__PURE__ */ jsx44(Progress, {}),
1809
+ /* @__PURE__ */ jsx46(Progress, {}),
1660
1810
  children,
1661
- /* @__PURE__ */ jsx44(Content3, {}),
1662
- /* @__PURE__ */ jsx44(NextPageSkeleton, {}),
1663
- /* @__PURE__ */ jsx44(Flex13, {
1811
+ /* @__PURE__ */ jsx46(Content3, {}),
1812
+ /* @__PURE__ */ jsx46(NextPageSkeleton, {}),
1813
+ /* @__PURE__ */ jsx46(Flex14, {
1664
1814
  flexShrink: "0",
1665
1815
  flexGrow: "1"
1666
1816
  })
@@ -1672,7 +1822,7 @@ Messages.Message = Message;
1672
1822
  Messages.NextPageSkeleton = NextPageSkeleton;
1673
1823
  // src/components/threads/Thread/MessageForm/Submit/index.tsx
1674
1824
  import { ArrowUpIcon, StopIcon } from "@radix-ui/react-icons";
1675
- import { IconButton, Flex as Flex14 } from "@radix-ui/themes";
1825
+ import { IconButton as IconButton2, Flex as Flex15 } from "@radix-ui/themes";
1676
1826
  // src/hooks/messages/useMessageFormContext/index.ts
1677
1827
  import { useContext as useContext10 } from "react";
1678
1828
  // src/contexts/messages/MessageFormContext/index.ts
@@ -1689,10 +1839,10 @@ var useMessageFormContext = function() {
1689
1839
  return useContext10(MessageFormContext);
1690
1840
  };
1691
1841
  // src/components/threads/Thread/MessageForm/Submit/index.tsx
1692
- import { jsx as jsx45 } from "react/jsx-runtime";
1842
+ import { jsx as jsx47 } from "react/jsx-runtime";
1693
1843
  var Root3 = function(param) {
1694
1844
  var children = param.children;
1695
- return /* @__PURE__ */ jsx45(Flex14, {
1845
+ return /* @__PURE__ */ jsx47(Flex15, {
1696
1846
  flexShrink: "0",
1697
1847
  align: "end",
1698
1848
  children: children
@@ -1702,24 +1852,24 @@ var Button2 = function() {
1702
1852
  var superinterfaceContext = useSuperinterfaceContext();
1703
1853
  var _useMessageFormContext = useMessageFormContext(), isDisabled = _useMessageFormContext.isDisabled, isLoading = _useMessageFormContext.isLoading, isFileLoading = _useMessageFormContext.isFileLoading;
1704
1854
  if (isLoading) {
1705
- return /* @__PURE__ */ jsx45(IconButton, {
1855
+ return /* @__PURE__ */ jsx47(IconButton2, {
1706
1856
  type: "button",
1707
1857
  onClick: function() {
1708
1858
  var _superinterfaceContext_createMessageAbortControllerRef_current;
1709
1859
  return (_superinterfaceContext_createMessageAbortControllerRef_current = superinterfaceContext.createMessageAbortControllerRef.current) === null || _superinterfaceContext_createMessageAbortControllerRef_current === void 0 ? void 0 : _superinterfaceContext_createMessageAbortControllerRef_current.abort();
1710
1860
  },
1711
- children: /* @__PURE__ */ jsx45(StopIcon, {})
1861
+ children: /* @__PURE__ */ jsx47(StopIcon, {})
1712
1862
  });
1713
1863
  }
1714
- return /* @__PURE__ */ jsx45(IconButton, {
1864
+ return /* @__PURE__ */ jsx47(IconButton2, {
1715
1865
  type: "submit",
1716
1866
  disabled: isDisabled || isFileLoading,
1717
- children: /* @__PURE__ */ jsx45(ArrowUpIcon, {})
1867
+ children: /* @__PURE__ */ jsx47(ArrowUpIcon, {})
1718
1868
  });
1719
1869
  };
1720
1870
  var Submit = function() {
1721
- return /* @__PURE__ */ jsx45(Root3, {
1722
- children: /* @__PURE__ */ jsx45(Button2, {})
1871
+ return /* @__PURE__ */ jsx47(Root3, {
1872
+ children: /* @__PURE__ */ jsx47(Button2, {})
1723
1873
  });
1724
1874
  };
1725
1875
  Submit.Root = Root3;
@@ -2351,7 +2501,7 @@ var formOptions = {
2351
2501
  };
2352
2502
  // src/components/threads/Thread/MessageForm/Root/index.tsx
2353
2503
  import { partob as partob2 } from "radash";
2354
- import { jsx as jsx46 } from "react/jsx-runtime";
2504
+ import { jsx as jsx48 } from "react/jsx-runtime";
2355
2505
  var Root4 = function(param) {
2356
2506
  var children = param.children, onSubmitArg = param.onSubmit;
2357
2507
  var _useState = _sliced_to_array(useState([]), 2), files = _useState[0], setFiles = _useState[1];
@@ -2460,7 +2610,7 @@ var Root4 = function(param) {
2460
2610
  return _ref.apply(this, arguments);
2461
2611
  };
2462
2612
  }();
2463
- return /* @__PURE__ */ jsx46(MessageFormContext.Provider, {
2613
+ return /* @__PURE__ */ jsx48(MessageFormContext.Provider, {
2464
2614
  value: {
2465
2615
  isDisabled: isDisabled,
2466
2616
  isLoading: isLoading,
@@ -2468,11 +2618,11 @@ var Root4 = function(param) {
2468
2618
  setFiles: setFiles,
2469
2619
  isFileLoading: isFileLoading
2470
2620
  },
2471
- children: /* @__PURE__ */ jsx46(FormProvider, _object_spread_props(_object_spread({}, formProps), {
2472
- children: /* @__PURE__ */ jsx46(Box12, {
2621
+ children: /* @__PURE__ */ jsx48(FormProvider, _object_spread_props(_object_spread({}, formProps), {
2622
+ children: /* @__PURE__ */ jsx48(Box12, {
2473
2623
  asChild: true,
2474
2624
  flexShrink: "0",
2475
- children: /* @__PURE__ */ jsx46("form", {
2625
+ children: /* @__PURE__ */ jsx48("form", {
2476
2626
  onSubmit: handleSubmit(onSubmit),
2477
2627
  children: children
2478
2628
  })
@@ -2482,23 +2632,23 @@ var Root4 = function(param) {
2482
2632
  };
2483
2633
  // src/components/threads/Thread/MessageForm/Field/index.tsx
2484
2634
  import { useFormContext as useFormContext2 } from "react-hook-form";
2485
- import { Container as RadixContainer, Flex as Flex18 } from "@radix-ui/themes";
2635
+ import { Container as RadixContainer, Flex as Flex19 } from "@radix-ui/themes";
2486
2636
  // src/components/threads/Thread/MessageForm/Field/Control.tsx
2487
- import { Flex as Flex15 } from "@radix-ui/themes";
2637
+ import { Flex as Flex16 } from "@radix-ui/themes";
2488
2638
  import { useFormContext } from "react-hook-form";
2489
2639
  import { usePrevious } from "react-use";
2490
2640
  import { useContext as useContext11, useMemo as useMemo9, useRef as useRef4, useEffect as useEffect3 } from "react";
2491
2641
  // src/components/textareas/TextareaBase/index.tsx
2492
2642
  import { forwardRef as forwardRef3 } from "react";
2493
2643
  import TextareaAutosize from "react-textarea-autosize";
2494
- import { Fragment as Fragment3, jsx as jsx47, jsxs as jsxs15 } from "react/jsx-runtime";
2644
+ import { Fragment as Fragment3, jsx as jsx49, jsxs as jsxs16 } from "react/jsx-runtime";
2495
2645
  var TextareaBase = forwardRef3(function TextareaBase2(props, ref) {
2496
- return /* @__PURE__ */ jsxs15(Fragment3, {
2646
+ return /* @__PURE__ */ jsxs16(Fragment3, {
2497
2647
  children: [
2498
- /* @__PURE__ */ jsx47("style", {
2648
+ /* @__PURE__ */ jsx49("style", {
2499
2649
  children: ".superinterface-textarea { min-height: inherit; height: 30px; }\n.superinterface-textarea::placeholder { color: var(--gray-a10); }"
2500
2650
  }),
2501
- /* @__PURE__ */ jsx47(TextareaAutosize, _object_spread({
2651
+ /* @__PURE__ */ jsx49(TextareaAutosize, _object_spread({
2502
2652
  ref: ref,
2503
2653
  className: "rt-reset superinterface-textarea",
2504
2654
  style: {
@@ -2515,10 +2665,10 @@ var TextareaBase = forwardRef3(function TextareaBase2(props, ref) {
2515
2665
  });
2516
2666
  });
2517
2667
  // src/components/threads/Thread/MessageForm/Field/Control.tsx
2518
- import { jsx as jsx48 } from "react/jsx-runtime";
2668
+ import { jsx as jsx50 } from "react/jsx-runtime";
2519
2669
  var Root5 = function(param) {
2520
2670
  var children = param.children;
2521
- return /* @__PURE__ */ jsx48(Flex15, {
2671
+ return /* @__PURE__ */ jsx50(Flex16, {
2522
2672
  flexGrow: "1",
2523
2673
  pt: "4px",
2524
2674
  children: children
@@ -2547,7 +2697,7 @@ var Input = function() {
2547
2697
  isDisabledPrevious,
2548
2698
  textareaProps
2549
2699
  ]);
2550
- return /* @__PURE__ */ jsx48(TextareaBase, _object_spread_props(_object_spread({
2700
+ return /* @__PURE__ */ jsx50(TextareaBase, _object_spread_props(_object_spread({
2551
2701
  minRows: 1,
2552
2702
  placeholder: "Message ".concat(assistantNameContext, "..."),
2553
2703
  disabled: isDisabled,
@@ -2567,51 +2717,51 @@ var Input = function() {
2567
2717
  }));
2568
2718
  };
2569
2719
  var Control = function() {
2570
- return /* @__PURE__ */ jsx48(Root5, {
2571
- children: /* @__PURE__ */ jsx48(Input, {})
2720
+ return /* @__PURE__ */ jsx50(Root5, {
2721
+ children: /* @__PURE__ */ jsx50(Input, {})
2572
2722
  });
2573
2723
  };
2574
2724
  Control.Root = Root5;
2575
2725
  Control.Input = Input;
2576
2726
  // src/components/threads/Thread/MessageForm/Field/Files/Preview.tsx
2577
- import { Flex as Flex16, Card as Card2, Spinner, Text as Text6, IconButton as IconButton2 } from "@radix-ui/themes";
2578
- import { FileIcon as FileIcon2, Cross2Icon } from "@radix-ui/react-icons";
2579
- import { jsx as jsx49, jsxs as jsxs16 } from "react/jsx-runtime";
2727
+ import { Flex as Flex17, Card as Card2, Spinner, Text as Text7, IconButton as IconButton3 } from "@radix-ui/themes";
2728
+ import { FileIcon as FileIcon3, Cross2Icon } from "@radix-ui/react-icons";
2729
+ import { jsx as jsx51, jsxs as jsxs17 } from "react/jsx-runtime";
2580
2730
  var Preview = function() {
2581
2731
  var _useMessageFormContext = useMessageFormContext(), files = _useMessageFormContext.files, setFiles = _useMessageFormContext.setFiles;
2582
2732
  if (!files.length) {
2583
2733
  return null;
2584
2734
  }
2585
- return /* @__PURE__ */ jsx49(Flex16, {
2735
+ return /* @__PURE__ */ jsx51(Flex17, {
2586
2736
  flexBasis: "100%",
2587
2737
  direction: "column",
2588
2738
  pb: "2",
2589
2739
  gap: "1",
2590
2740
  children: files.map(function(file) {
2591
- return /* @__PURE__ */ jsx49(Card2, {
2741
+ return /* @__PURE__ */ jsx51(Card2, {
2592
2742
  variant: "ghost",
2593
- children: /* @__PURE__ */ jsxs16(Flex16, {
2743
+ children: /* @__PURE__ */ jsxs17(Flex17, {
2594
2744
  align: "center",
2595
2745
  justify: "between",
2596
2746
  gap: "1",
2597
2747
  children: [
2598
- /* @__PURE__ */ jsxs16(Flex16, {
2748
+ /* @__PURE__ */ jsxs17(Flex17, {
2599
2749
  align: "center",
2600
2750
  gap: "1",
2601
2751
  flexShrink: "1",
2602
2752
  minWidth: "0",
2603
2753
  maxWidth: "250px",
2604
2754
  children: [
2605
- /* @__PURE__ */ jsx49(Flex16, {
2755
+ /* @__PURE__ */ jsx51(Flex17, {
2606
2756
  flexShrink: "0",
2607
- children: /* @__PURE__ */ jsx49(Spinner, {
2757
+ children: /* @__PURE__ */ jsx51(Spinner, {
2608
2758
  loading: isOptimistic({
2609
2759
  id: file.id
2610
2760
  }),
2611
- children: /* @__PURE__ */ jsx49(FileIcon2, {})
2761
+ children: /* @__PURE__ */ jsx51(FileIcon3, {})
2612
2762
  })
2613
2763
  }),
2614
- /* @__PURE__ */ jsx49(Text6, {
2764
+ /* @__PURE__ */ jsx51(Text7, {
2615
2765
  size: "2",
2616
2766
  truncate: true,
2617
2767
  wrap: "nowrap",
@@ -2619,9 +2769,9 @@ var Preview = function() {
2619
2769
  })
2620
2770
  ]
2621
2771
  }),
2622
- /* @__PURE__ */ jsx49(Flex16, {
2772
+ /* @__PURE__ */ jsx51(Flex17, {
2623
2773
  flexShrink: "0",
2624
- children: /* @__PURE__ */ jsx49(IconButton2, {
2774
+ children: /* @__PURE__ */ jsx51(IconButton3, {
2625
2775
  onClick: function() {
2626
2776
  return setFiles(function(prev) {
2627
2777
  return prev.filter(function(prevFile) {
@@ -2632,7 +2782,7 @@ var Preview = function() {
2632
2782
  color: "gray",
2633
2783
  variant: "ghost",
2634
2784
  size: "1",
2635
- children: /* @__PURE__ */ jsx49(Cross2Icon, {})
2785
+ children: /* @__PURE__ */ jsx51(Cross2Icon, {})
2636
2786
  })
2637
2787
  })
2638
2788
  ]
@@ -2646,7 +2796,7 @@ import { useCallback as useCallback2 } from "react";
2646
2796
  import { omit as omit4 } from "radash";
2647
2797
  import dayjs2 from "dayjs";
2648
2798
  import { FilePlusIcon } from "@radix-ui/react-icons";
2649
- import { IconButton as IconButton3, Flex as Flex17 } from "@radix-ui/themes";
2799
+ import { IconButton as IconButton4, Flex as Flex18 } from "@radix-ui/themes";
2650
2800
  // src/hooks/files/useCreateFile/index.ts
2651
2801
  import { useMutation as useMutation2, useQueryClient as useQueryClient5 } from "@tanstack/react-query";
2652
2802
  // src/hooks/files/useCreateFile/lib/mutationOptions/mutationFn/body/formData.ts
@@ -2757,7 +2907,7 @@ var useCreateFile = function() {
2757
2907
  });
2758
2908
  };
2759
2909
  // src/components/threads/Thread/MessageForm/Field/Files/Control.tsx
2760
- import { jsx as jsx50, jsxs as jsxs17 } from "react/jsx-runtime";
2910
+ import { jsx as jsx52, jsxs as jsxs18 } from "react/jsx-runtime";
2761
2911
  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";
2762
2912
  var Control2 = function() {
2763
2913
  var _useMessageFormContext = useMessageFormContext(), isDisabled = _useMessageFormContext.isDisabled, isLoading = _useMessageFormContext.isLoading, setFiles = _useMessageFormContext.setFiles;
@@ -2931,11 +3081,11 @@ var Control2 = function() {
2931
3081
  createFile,
2932
3082
  setFiles
2933
3083
  ]);
2934
- return /* @__PURE__ */ jsx50(Flex17, {
3084
+ return /* @__PURE__ */ jsx52(Flex18, {
2935
3085
  pt: "2",
2936
3086
  pr: "2",
2937
3087
  flexGrow: "0",
2938
- children: /* @__PURE__ */ jsxs17(IconButton3, {
3088
+ children: /* @__PURE__ */ jsxs18(IconButton4, {
2939
3089
  type: "button",
2940
3090
  variant: "ghost",
2941
3091
  color: "gray",
@@ -2945,8 +3095,8 @@ var Control2 = function() {
2945
3095
  overflow: "hidden"
2946
3096
  },
2947
3097
  children: [
2948
- /* @__PURE__ */ jsx50(FilePlusIcon, {}),
2949
- /* @__PURE__ */ jsx50("input", {
3098
+ /* @__PURE__ */ jsx52(FilePlusIcon, {}),
3099
+ /* @__PURE__ */ jsx52("input", {
2950
3100
  type: "file",
2951
3101
  multiple: true,
2952
3102
  accept: accept,
@@ -2971,20 +3121,20 @@ var Files = {
2971
3121
  Control: Control2
2972
3122
  };
2973
3123
  // src/components/threads/Thread/MessageForm/Field/index.tsx
2974
- import { jsx as jsx51 } from "react/jsx-runtime";
3124
+ import { jsx as jsx53 } from "react/jsx-runtime";
2975
3125
  var Root6 = function(param) {
2976
3126
  var children = param.children;
2977
3127
  var _useFormContext2 = useFormContext2(), errors = _useFormContext2.formState.errors;
2978
- return /* @__PURE__ */ jsx51(RadixContainer, {
3128
+ return /* @__PURE__ */ jsx53(RadixContainer, {
2979
3129
  size: "2",
2980
3130
  flexGrow: "0",
2981
- children: /* @__PURE__ */ jsx51(Flex18, {
3131
+ children: /* @__PURE__ */ jsx53(Flex19, {
2982
3132
  direction: "column",
2983
3133
  flexShrink: "0",
2984
- children: /* @__PURE__ */ jsx51(Flex18, {
3134
+ children: /* @__PURE__ */ jsx53(Flex19, {
2985
3135
  direction: "column",
2986
3136
  flexShrink: "0",
2987
- children: /* @__PURE__ */ jsx51(Flex18, {
3137
+ children: /* @__PURE__ */ jsx53(Flex19, {
2988
3138
  style: _object_spread({
2989
3139
  borderRadius: "var(--radius-2)",
2990
3140
  borderWidth: "1px",
@@ -3008,13 +3158,13 @@ var Field = {
3008
3158
  Files: Files
3009
3159
  };
3010
3160
  // src/components/threads/Thread/MessageForm/index.tsx
3011
- import { jsx as jsx52, jsxs as jsxs18 } from "react/jsx-runtime";
3161
+ import { jsx as jsx54, jsxs as jsxs19 } from "react/jsx-runtime";
3012
3162
  var MessageForm = function() {
3013
- return /* @__PURE__ */ jsx52(Root4, {
3014
- children: /* @__PURE__ */ jsxs18(Field.Root, {
3163
+ return /* @__PURE__ */ jsx54(Root4, {
3164
+ children: /* @__PURE__ */ jsxs19(Field.Root, {
3015
3165
  children: [
3016
- /* @__PURE__ */ jsx52(Field.Control, {}),
3017
- /* @__PURE__ */ jsx52(Submit, {})
3166
+ /* @__PURE__ */ jsx54(Field.Control, {}),
3167
+ /* @__PURE__ */ jsx54(Submit, {})
3018
3168
  ]
3019
3169
  })
3020
3170
  });
@@ -3023,17 +3173,17 @@ MessageForm.Root = Root4;
3023
3173
  MessageForm.Field = Field;
3024
3174
  MessageForm.Submit = Submit;
3025
3175
  // src/components/threads/Thread/Root/index.tsx
3026
- import { Flex as Flex19 } from "@radix-ui/themes";
3176
+ import { Flex as Flex20 } from "@radix-ui/themes";
3027
3177
  // src/components/threads/Thread/Provider/index.tsx
3028
3178
  var Provider2 = SuperinterfaceProvider;
3029
3179
  // src/components/threads/Thread/Root/index.tsx
3030
- import { jsx as jsx53 } from "react/jsx-runtime";
3180
+ import { jsx as jsx55 } from "react/jsx-runtime";
3031
3181
  var Root7 = function(_param) {
3032
3182
  var children = _param.children, rest = _object_without_properties(_param, [
3033
3183
  "children"
3034
3184
  ]);
3035
- return /* @__PURE__ */ jsx53(Provider2, _object_spread_props(_object_spread({}, rest), {
3036
- children: /* @__PURE__ */ jsx53(Flex19, {
3185
+ return /* @__PURE__ */ jsx55(Provider2, _object_spread_props(_object_spread({}, rest), {
3186
+ children: /* @__PURE__ */ jsx55(Flex20, {
3037
3187
  direction: "column",
3038
3188
  flexGrow: "1",
3039
3189
  children: children
@@ -3041,12 +3191,12 @@ var Root7 = function(_param) {
3041
3191
  }));
3042
3192
  };
3043
3193
  // src/components/threads/Thread/index.tsx
3044
- import { jsx as jsx54, jsxs as jsxs19 } from "react/jsx-runtime";
3194
+ import { jsx as jsx56, jsxs as jsxs20 } from "react/jsx-runtime";
3045
3195
  var Thread = function(props) {
3046
- return /* @__PURE__ */ jsxs19(Root7, _object_spread_props(_object_spread({}, props), {
3196
+ return /* @__PURE__ */ jsxs20(Root7, _object_spread_props(_object_spread({}, props), {
3047
3197
  children: [
3048
- /* @__PURE__ */ jsx54(Messages, {}),
3049
- /* @__PURE__ */ jsx54(MessageForm, {})
3198
+ /* @__PURE__ */ jsx56(Messages, {}),
3199
+ /* @__PURE__ */ jsx56(MessageForm, {})
3050
3200
  ]
3051
3201
  }));
3052
3202
  };
@@ -3072,12 +3222,12 @@ var useThreadDialogContext = function() {
3072
3222
  return useContext13(ThreadDialogContext);
3073
3223
  };
3074
3224
  // src/components/threads/ThreadDialog/Provider/index.tsx
3075
- import { jsx as jsx55 } from "react/jsx-runtime";
3225
+ import { jsx as jsx57 } from "react/jsx-runtime";
3076
3226
  var Provider3 = function(param) {
3077
3227
  var children = param.children;
3078
3228
  var threadDialogContext = useThreadDialogContext();
3079
3229
  var _useState2 = _sliced_to_array(useState2(threadDialogContext.isOpen), 2), isOpen = _useState2[0], setIsOpen = _useState2[1];
3080
- return /* @__PURE__ */ jsx55(ThreadDialogContext.Provider, {
3230
+ return /* @__PURE__ */ jsx57(ThreadDialogContext.Provider, {
3081
3231
  value: {
3082
3232
  isOpen: isOpen,
3083
3233
  setIsOpen: setIsOpen
@@ -3090,27 +3240,27 @@ import { useState as useState3, useCallback as useCallback3 } from "react";
3090
3240
  import * as Toast2 from "@radix-ui/react-toast";
3091
3241
  // src/components/toasts/ToastsProvider/CustomToast.tsx
3092
3242
  import * as Toast from "@radix-ui/react-toast";
3093
- import { Card as Card3, Text as Text7, Flex as Flex20 } from "@radix-ui/themes";
3243
+ import { Card as Card3, Text as Text8, Flex as Flex21 } from "@radix-ui/themes";
3094
3244
  import { CheckCircledIcon as CheckCircledIcon2, CrossCircledIcon } from "@radix-ui/react-icons";
3095
- import { jsx as jsx56, jsxs as jsxs20 } from "react/jsx-runtime";
3245
+ import { jsx as jsx58, jsxs as jsxs21 } from "react/jsx-runtime";
3096
3246
  var CustomToast = function(param) {
3097
3247
  var toast = param.toast;
3098
- return /* @__PURE__ */ jsx56(Toast.Root, {
3099
- children: /* @__PURE__ */ jsx56(Card3, {
3100
- children: /* @__PURE__ */ jsx56(Toast.Title, {
3101
- children: /* @__PURE__ */ jsxs20(Flex20, {
3248
+ return /* @__PURE__ */ jsx58(Toast.Root, {
3249
+ children: /* @__PURE__ */ jsx58(Card3, {
3250
+ children: /* @__PURE__ */ jsx58(Toast.Title, {
3251
+ children: /* @__PURE__ */ jsxs21(Flex21, {
3102
3252
  children: [
3103
- /* @__PURE__ */ jsx56(Flex20, {
3253
+ /* @__PURE__ */ jsx58(Flex21, {
3104
3254
  pr: "2",
3105
3255
  height: "14px",
3106
3256
  align: "center",
3107
- children: toast.type === "success" ? /* @__PURE__ */ jsx56(CheckCircledIcon2, {
3257
+ children: toast.type === "success" ? /* @__PURE__ */ jsx58(CheckCircledIcon2, {
3108
3258
  color: "var(--accent-9)"
3109
- }) : /* @__PURE__ */ jsx56(CrossCircledIcon, {
3259
+ }) : /* @__PURE__ */ jsx58(CrossCircledIcon, {
3110
3260
  color: "var(--red-9)"
3111
3261
  })
3112
3262
  }),
3113
- /* @__PURE__ */ jsx56(Text7, {
3263
+ /* @__PURE__ */ jsx58(Text8, {
3114
3264
  weight: "medium",
3115
3265
  size: "1",
3116
3266
  children: toast.message
@@ -3122,7 +3272,7 @@ var CustomToast = function(param) {
3122
3272
  });
3123
3273
  };
3124
3274
  // src/components/toasts/ToastsProvider/index.tsx
3125
- import { jsx as jsx57, jsxs as jsxs21 } from "react/jsx-runtime";
3275
+ import { jsx as jsx59, jsxs as jsxs22 } from "react/jsx-runtime";
3126
3276
  var ToastsProvider = function(param) {
3127
3277
  var children = param.children;
3128
3278
  var _useState3 = _sliced_to_array(useState3([]), 2), toasts = _useState3[0], setToasts = _useState3[1];
@@ -3133,20 +3283,20 @@ var ToastsProvider = function(param) {
3133
3283
  ]);
3134
3284
  });
3135
3285
  }, []);
3136
- return /* @__PURE__ */ jsx57(ToastsContext.Provider, {
3286
+ return /* @__PURE__ */ jsx59(ToastsContext.Provider, {
3137
3287
  value: {
3138
3288
  toasts: toasts,
3139
3289
  addToast: addToast
3140
3290
  },
3141
- children: /* @__PURE__ */ jsxs21(Toast2.Provider, {
3291
+ children: /* @__PURE__ */ jsxs22(Toast2.Provider, {
3142
3292
  children: [
3143
3293
  children,
3144
3294
  Array.from(toasts).map(function(toast, index) {
3145
- return /* @__PURE__ */ jsx57(CustomToast, {
3295
+ return /* @__PURE__ */ jsx59(CustomToast, {
3146
3296
  toast: toast
3147
3297
  }, index);
3148
3298
  }),
3149
- /* @__PURE__ */ jsx57(Toast2.Viewport, {
3299
+ /* @__PURE__ */ jsx59(Toast2.Viewport, {
3150
3300
  style: {
3151
3301
  position: "absolute",
3152
3302
  bottom: 0,
@@ -3168,34 +3318,34 @@ var ToastsProvider = function(param) {
3168
3318
  });
3169
3319
  };
3170
3320
  // src/components/threads/ThreadDialog/Root/index.tsx
3171
- import { jsx as jsx58 } from "react/jsx-runtime";
3321
+ import { jsx as jsx60 } from "react/jsx-runtime";
3172
3322
  var Root9 = function(param) {
3173
3323
  var children = param.children;
3174
- return /* @__PURE__ */ jsx58(ToastsProvider, {
3175
- children: /* @__PURE__ */ jsx58(Provider3, {
3324
+ return /* @__PURE__ */ jsx60(ToastsProvider, {
3325
+ children: /* @__PURE__ */ jsx60(Provider3, {
3176
3326
  children: children
3177
3327
  })
3178
3328
  });
3179
3329
  };
3180
3330
  // src/components/threads/ThreadDialog/Trigger/index.tsx
3181
- import { Flex as Flex21 } from "@radix-ui/themes";
3331
+ import { Flex as Flex22 } from "@radix-ui/themes";
3182
3332
  // src/components/threads/ThreadDialog/Trigger/Button.tsx
3183
- import { IconButton as IconButton4 } from "@radix-ui/themes";
3333
+ import { IconButton as IconButton5 } from "@radix-ui/themes";
3184
3334
  import { ChatBubbleIcon } from "@radix-ui/react-icons";
3185
- import { jsx as jsx59 } from "react/jsx-runtime";
3335
+ import { jsx as jsx61 } from "react/jsx-runtime";
3186
3336
  var Button3 = function() {
3187
- return /* @__PURE__ */ jsx59(IconButton4, {
3337
+ return /* @__PURE__ */ jsx61(IconButton5, {
3188
3338
  size: "4",
3189
3339
  radius: "full",
3190
- children: /* @__PURE__ */ jsx59(ChatBubbleIcon, {})
3340
+ children: /* @__PURE__ */ jsx61(ChatBubbleIcon, {})
3191
3341
  });
3192
3342
  };
3193
3343
  // src/components/threads/ThreadDialog/Trigger/index.tsx
3194
- import { jsx as jsx60 } from "react/jsx-runtime";
3344
+ import { jsx as jsx62 } from "react/jsx-runtime";
3195
3345
  var Root10 = function(param) {
3196
3346
  var children = param.children, _param_style = param.style, style = _param_style === void 0 ? {} : _param_style;
3197
3347
  var _useThreadDialogContext = useThreadDialogContext(), setIsOpen = _useThreadDialogContext.setIsOpen, isOpen = _useThreadDialogContext.isOpen;
3198
- return /* @__PURE__ */ jsx60(Flex21, {
3348
+ return /* @__PURE__ */ jsx62(Flex22, {
3199
3349
  display: {
3200
3350
  initial: isOpen ? "none" : "flex",
3201
3351
  sm: "flex"
@@ -3219,21 +3369,21 @@ var Root10 = function(param) {
3219
3369
  });
3220
3370
  };
3221
3371
  var Trigger = function(args) {
3222
- return /* @__PURE__ */ jsx60(Root10, _object_spread_props(_object_spread({}, args), {
3223
- children: /* @__PURE__ */ jsx60(Button3, {})
3372
+ return /* @__PURE__ */ jsx62(Root10, _object_spread_props(_object_spread({}, args), {
3373
+ children: /* @__PURE__ */ jsx62(Button3, {})
3224
3374
  }));
3225
3375
  };
3226
3376
  Trigger.Root = Root10;
3227
3377
  Trigger.Button = Button3;
3228
3378
  // src/components/threads/ThreadDialog/Content/index.tsx
3229
- import { Card as Card4, Inset, Flex as Flex23 } from "@radix-ui/themes";
3379
+ import { Card as Card4, Inset, Flex as Flex24 } from "@radix-ui/themes";
3230
3380
  // src/components/threads/ThreadDialog/Close/index.tsx
3231
3381
  import { Cross1Icon } from "@radix-ui/react-icons";
3232
- import { IconButton as IconButton5, Flex as Flex22 } from "@radix-ui/themes";
3233
- import { jsx as jsx61 } from "react/jsx-runtime";
3382
+ import { IconButton as IconButton6, Flex as Flex23 } from "@radix-ui/themes";
3383
+ import { jsx as jsx63 } from "react/jsx-runtime";
3234
3384
  var Close = function() {
3235
3385
  var _useThreadDialogContext = useThreadDialogContext(), setIsOpen = _useThreadDialogContext.setIsOpen, isOpen = _useThreadDialogContext.isOpen;
3236
- return /* @__PURE__ */ jsx61(Flex22, {
3386
+ return /* @__PURE__ */ jsx63(Flex23, {
3237
3387
  display: {
3238
3388
  initial: isOpen ? "flex" : "none",
3239
3389
  sm: "none"
@@ -3253,20 +3403,20 @@ var Close = function() {
3253
3403
  style: {
3254
3404
  zIndex: 9999999999
3255
3405
  },
3256
- children: /* @__PURE__ */ jsx61(IconButton5, {
3406
+ children: /* @__PURE__ */ jsx63(IconButton6, {
3257
3407
  size: "2",
3258
3408
  variant: "soft",
3259
- children: /* @__PURE__ */ jsx61(Cross1Icon, {})
3409
+ children: /* @__PURE__ */ jsx63(Cross1Icon, {})
3260
3410
  })
3261
3411
  });
3262
3412
  };
3263
3413
  // src/components/threads/ThreadDialog/Content/index.tsx
3264
- import { jsx as jsx62, jsxs as jsxs22 } from "react/jsx-runtime";
3414
+ import { jsx as jsx64, jsxs as jsxs23 } from "react/jsx-runtime";
3265
3415
  var Root11 = function(param) {
3266
3416
  var children = param.children, _param_style = param.style, style = _param_style === void 0 ? {} : _param_style;
3267
3417
  var isOpen = useThreadDialogContext().isOpen;
3268
3418
  if (!isOpen) return null;
3269
- return /* @__PURE__ */ jsx62(Flex23, {
3419
+ return /* @__PURE__ */ jsx64(Flex24, {
3270
3420
  direction: "column",
3271
3421
  justify: "end",
3272
3422
  position: "fixed",
@@ -3294,7 +3444,7 @@ var Root11 = function(param) {
3294
3444
  style: _object_spread({
3295
3445
  zIndex: 9999999999
3296
3446
  }, style),
3297
- children: /* @__PURE__ */ jsxs22(Card4, {
3447
+ children: /* @__PURE__ */ jsxs23(Card4, {
3298
3448
  mb: {
3299
3449
  initial: void 0,
3300
3450
  sm: "3"
@@ -3305,7 +3455,7 @@ var Root11 = function(param) {
3305
3455
  flexGrow: 1
3306
3456
  },
3307
3457
  children: [
3308
- /* @__PURE__ */ jsx62(Inset, {
3458
+ /* @__PURE__ */ jsx64(Inset, {
3309
3459
  clip: "padding-box",
3310
3460
  side: "all",
3311
3461
  pb: "current",
@@ -3315,13 +3465,13 @@ var Root11 = function(param) {
3315
3465
  },
3316
3466
  children: children
3317
3467
  }),
3318
- /* @__PURE__ */ jsx62(Close, {})
3468
+ /* @__PURE__ */ jsx64(Close, {})
3319
3469
  ]
3320
3470
  })
3321
3471
  });
3322
3472
  };
3323
3473
  var Messages2 = function() {
3324
- return /* @__PURE__ */ jsx62(Thread.Messages, {
3474
+ return /* @__PURE__ */ jsx64(Thread.Messages, {
3325
3475
  style: {
3326
3476
  paddingTop: "var(--space-5)",
3327
3477
  paddingRight: "var(--space-5)",
@@ -3331,7 +3481,7 @@ var Messages2 = function() {
3331
3481
  };
3332
3482
  var FormContainer = function(param) {
3333
3483
  var children = param.children;
3334
- return /* @__PURE__ */ jsx62(Flex23, {
3484
+ return /* @__PURE__ */ jsx64(Flex24, {
3335
3485
  direction: "column",
3336
3486
  pl: "5",
3337
3487
  pr: "5",
@@ -3342,13 +3492,13 @@ var FormContainer = function(param) {
3342
3492
  };
3343
3493
  var Content4 = function(param) {
3344
3494
  var _param_style = param.style, style = _param_style === void 0 ? {} : _param_style;
3345
- return /* @__PURE__ */ jsx62(Root11, {
3495
+ return /* @__PURE__ */ jsx64(Root11, {
3346
3496
  style: style,
3347
- children: /* @__PURE__ */ jsxs22(Thread.Root, {
3497
+ children: /* @__PURE__ */ jsxs23(Thread.Root, {
3348
3498
  children: [
3349
- /* @__PURE__ */ jsx62(Messages2, {}),
3350
- /* @__PURE__ */ jsx62(FormContainer, {
3351
- children: /* @__PURE__ */ jsx62(Thread.MessageForm, {})
3499
+ /* @__PURE__ */ jsx64(Messages2, {}),
3500
+ /* @__PURE__ */ jsx64(FormContainer, {
3501
+ children: /* @__PURE__ */ jsx64(Thread.MessageForm, {})
3352
3502
  })
3353
3503
  ]
3354
3504
  })
@@ -3358,12 +3508,12 @@ Content4.Root = Root11;
3358
3508
  Content4.Messages = Messages2;
3359
3509
  Content4.FormContainer = FormContainer;
3360
3510
  // src/components/threads/ThreadDialog/index.tsx
3361
- import { jsx as jsx63, jsxs as jsxs23 } from "react/jsx-runtime";
3511
+ import { jsx as jsx65, jsxs as jsxs24 } from "react/jsx-runtime";
3362
3512
  var ThreadDialog = function() {
3363
- return /* @__PURE__ */ jsxs23(Root9, {
3513
+ return /* @__PURE__ */ jsxs24(Root9, {
3364
3514
  children: [
3365
- /* @__PURE__ */ jsx63(Content4, {}),
3366
- /* @__PURE__ */ jsx63(Trigger, {})
3515
+ /* @__PURE__ */ jsx65(Content4, {}),
3516
+ /* @__PURE__ */ jsx65(Trigger, {})
3367
3517
  ]
3368
3518
  });
3369
3519
  };
@@ -3372,7 +3522,7 @@ ThreadDialog.Trigger = Trigger;
3372
3522
  ThreadDialog.Content = Content4;
3373
3523
  // src/components/threads/AudioThread/Root/index.tsx
3374
3524
  import "regenerator-runtime/runtime";
3375
- import { Flex as Flex24 } from "@radix-ui/themes";
3525
+ import { Flex as Flex25 } from "@radix-ui/themes";
3376
3526
  // src/contexts/threads/AudioThreadContext/index.ts
3377
3527
  import { createContext as createContext12 } from "react";
3378
3528
  var AudioThreadContext = createContext12({
@@ -3809,7 +3959,7 @@ var useMessageAudio = function(param) {
3809
3959
  });
3810
3960
  };
3811
3961
  // src/components/threads/AudioThread/Root/index.tsx
3812
- import { jsx as jsx64 } from "react/jsx-runtime";
3962
+ import { jsx as jsx66 } from "react/jsx-runtime";
3813
3963
  var Root12 = function(param) {
3814
3964
  var children = param.children;
3815
3965
  var createMessageProps = useCreateMessage();
@@ -3867,13 +4017,13 @@ var Root12 = function(param) {
3867
4017
  createMessageProps: createMessageProps,
3868
4018
  messageAudioProps: messageAudioProps
3869
4019
  }).status;
3870
- return /* @__PURE__ */ jsx64(AudioThreadContext.Provider, {
4020
+ return /* @__PURE__ */ jsx66(AudioThreadContext.Provider, {
3871
4021
  value: {
3872
4022
  status: status,
3873
4023
  recorderProps: recorderProps,
3874
4024
  messageAudioProps: messageAudioProps
3875
4025
  },
3876
- children: /* @__PURE__ */ jsx64(Flex24, {
4026
+ children: /* @__PURE__ */ jsx66(Flex25, {
3877
4027
  direction: "column",
3878
4028
  flexGrow: "1",
3879
4029
  p: "9",
@@ -3884,7 +4034,7 @@ var Root12 = function(param) {
3884
4034
  // src/components/threads/AudioThread/Visualization/index.tsx
3885
4035
  import { useContext as useContext15, useState as useState7, useCallback as useCallback6, useEffect as useEffect7 } from "react";
3886
4036
  import _9 from "lodash";
3887
- import { Flex as Flex26 } from "@radix-ui/themes";
4037
+ import { Flex as Flex27 } from "@radix-ui/themes";
3888
4038
  // src/hooks/threads/useAudioThreadContext/index.ts
3889
4039
  import { useContext as useContext14 } from "react";
3890
4040
  var useAudioThreadContext = function() {
@@ -3892,10 +4042,10 @@ var useAudioThreadContext = function() {
3892
4042
  };
3893
4043
  // src/components/threads/AudioThread/BarsVisualizer/index.tsx
3894
4044
  import _8 from "lodash";
3895
- import { Flex as Flex25, Grid } from "@radix-ui/themes";
4045
+ import { Flex as Flex26, Grid } from "@radix-ui/themes";
3896
4046
  import { useState as useState6, useEffect as useEffect6, useCallback as useCallback5 } from "react";
3897
4047
  import { cluster } from "radash";
3898
- import { jsx as jsx65 } from "react/jsx-runtime";
4048
+ import { jsx as jsx67 } from "react/jsx-runtime";
3899
4049
  var barCount = 4;
3900
4050
  var BarsVisualizer = function(param) {
3901
4051
  var visualizationAnalyser = param.visualizationAnalyser, backgroundColor = param.backgroundColor, height = param.height, barWidth = param.barWidth;
@@ -3926,7 +4076,7 @@ var BarsVisualizer = function(param) {
3926
4076
  draw,
3927
4077
  visualizationAnalyser
3928
4078
  ]);
3929
- return /* @__PURE__ */ jsx65(Grid, {
4079
+ return /* @__PURE__ */ jsx67(Grid, {
3930
4080
  columns: "".concat(barCount),
3931
4081
  gap: "1",
3932
4082
  width: "auto",
@@ -3935,12 +4085,12 @@ var BarsVisualizer = function(param) {
3935
4085
  gridTemplateColumns: "repeat(4, minmax(0, 1fr))"
3936
4086
  },
3937
4087
  children: barHeights.map(function(barHeight, index) {
3938
- return /* @__PURE__ */ jsx65(Flex25, {
4088
+ return /* @__PURE__ */ jsx67(Flex26, {
3939
4089
  direction: "column",
3940
4090
  align: "center",
3941
4091
  justify: "center",
3942
4092
  height: height,
3943
- children: /* @__PURE__ */ jsx65(Flex25, {
4093
+ children: /* @__PURE__ */ jsx67(Flex26, {
3944
4094
  minHeight: "50%",
3945
4095
  maxHeight: "100%",
3946
4096
  height: "".concat(barHeight + 20, "%"),
@@ -3955,7 +4105,7 @@ var BarsVisualizer = function(param) {
3955
4105
  });
3956
4106
  };
3957
4107
  // src/components/threads/AudioThread/Visualization/index.tsx
3958
- import { jsx as jsx66, jsxs as jsxs24 } from "react/jsx-runtime";
4108
+ import { jsx as jsx68, jsxs as jsxs25 } from "react/jsx-runtime";
3959
4109
  var Visualization = function() {
3960
4110
  var audioThreadContext = useAudioThreadContext();
3961
4111
  var assistantNameContext = useContext15(AssistantNameContext);
@@ -3983,14 +4133,14 @@ var Visualization = function() {
3983
4133
  draw,
3984
4134
  audioThreadContext
3985
4135
  ]);
3986
- return /* @__PURE__ */ jsxs24(Flex26, {
4136
+ return /* @__PURE__ */ jsxs25(Flex27, {
3987
4137
  direction: "column",
3988
4138
  align: "center",
3989
4139
  justify: "center",
3990
4140
  mb: "3",
3991
4141
  flexGrow: "1",
3992
4142
  children: [
3993
- /* @__PURE__ */ jsx66(Flex26, {
4143
+ /* @__PURE__ */ jsx68(Flex27, {
3994
4144
  align: "center",
3995
4145
  justify: "center",
3996
4146
  height: "200px",
@@ -4000,20 +4150,20 @@ var Visualization = function() {
4000
4150
  borderRadius: "9999px",
4001
4151
  scale: scale
4002
4152
  },
4003
- children: /* @__PURE__ */ jsx66(BarsVisualizer, {
4153
+ children: /* @__PURE__ */ jsx68(BarsVisualizer, {
4004
4154
  visualizationAnalyser: audioThreadContext.messageAudioProps.visualizationAnalyser,
4005
4155
  backgroundColor: audioThreadContext.status === "playing" ? "var(--accent-11)" : "var(--gray-11)",
4006
4156
  height: "40px",
4007
4157
  barWidth: "24px"
4008
4158
  })
4009
4159
  }),
4010
- /* @__PURE__ */ jsxs24(Flex26, {
4160
+ /* @__PURE__ */ jsxs25(Flex27, {
4011
4161
  ml: "-22.5px",
4012
4162
  gap: "3",
4013
4163
  pt: "5",
4014
4164
  children: [
4015
- /* @__PURE__ */ jsx66(AssistantAvatar, {}),
4016
- /* @__PURE__ */ jsx66(Name, {
4165
+ /* @__PURE__ */ jsx68(AssistantAvatar, {}),
4166
+ /* @__PURE__ */ jsx68(Name, {
4017
4167
  children: assistantNameContext
4018
4168
  })
4019
4169
  ]
@@ -4022,8 +4172,8 @@ var Visualization = function() {
4022
4172
  });
4023
4173
  };
4024
4174
  // src/components/threads/AudioThread/Status/StatusMessages.tsx
4025
- import { Flex as Flex27, Text as Text8 } from "@radix-ui/themes";
4026
- import { jsx as jsx67, jsxs as jsxs25 } from "react/jsx-runtime";
4175
+ import { Flex as Flex28, Text as Text9 } from "@radix-ui/themes";
4176
+ import { jsx as jsx69, jsxs as jsxs26 } from "react/jsx-runtime";
4027
4177
  var html = function(param) {
4028
4178
  var texts = param.texts;
4029
4179
  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) {
@@ -4032,17 +4182,17 @@ var html = function(param) {
4032
4182
  };
4033
4183
  var StatusMessages = function(param) {
4034
4184
  var texts = param.texts;
4035
- return /* @__PURE__ */ jsxs25(Flex27, {
4185
+ return /* @__PURE__ */ jsxs26(Flex28, {
4036
4186
  justify: "center",
4037
4187
  pb: "5",
4038
4188
  children: [
4039
- /* @__PURE__ */ jsx67(Text8, {
4189
+ /* @__PURE__ */ jsx69(Text9, {
4040
4190
  size: "2",
4041
4191
  weight: "regular",
4042
4192
  color: "gray",
4043
4193
  className: "status-messages-texts"
4044
4194
  }),
4045
- /* @__PURE__ */ jsx67("style", {
4195
+ /* @__PURE__ */ jsx69("style", {
4046
4196
  dangerouslySetInnerHTML: {
4047
4197
  __html: html({
4048
4198
  texts: texts
@@ -4053,11 +4203,11 @@ var StatusMessages = function(param) {
4053
4203
  });
4054
4204
  };
4055
4205
  // src/components/threads/AudioThread/Status/index.tsx
4056
- import { jsx as jsx68 } from "react/jsx-runtime";
4206
+ import { jsx as jsx70 } from "react/jsx-runtime";
4057
4207
  var Status = function() {
4058
4208
  var audioThreadContext = useAudioThreadContext();
4059
4209
  if (audioThreadContext.status === "recording") {
4060
- return /* @__PURE__ */ jsx68(StatusMessages, {
4210
+ return /* @__PURE__ */ jsx70(StatusMessages, {
4061
4211
  texts: [
4062
4212
  "Start speaking",
4063
4213
  "Listening",
@@ -4071,31 +4221,31 @@ var Status = function() {
4071
4221
  "idle",
4072
4222
  "playerPaused"
4073
4223
  ].includes(audioThreadContext.status)) {
4074
- return /* @__PURE__ */ jsx68(StatusMessages, {
4224
+ return /* @__PURE__ */ jsx70(StatusMessages, {
4075
4225
  texts: [
4076
4226
  "Click the button below to activate"
4077
4227
  ]
4078
4228
  });
4079
4229
  }
4080
4230
  if (audioThreadContext.status === "playing") {
4081
- return /* @__PURE__ */ jsx68(StatusMessages, {
4231
+ return /* @__PURE__ */ jsx70(StatusMessages, {
4082
4232
  texts: [
4083
4233
  "Click the button below to interrupt"
4084
4234
  ]
4085
4235
  });
4086
4236
  }
4087
- return /* @__PURE__ */ jsx68(StatusMessages, {
4237
+ return /* @__PURE__ */ jsx70(StatusMessages, {
4088
4238
  texts: [
4089
4239
  "Thinking"
4090
4240
  ]
4091
4241
  });
4092
4242
  };
4093
4243
  // src/components/threads/AudioThread/Form/index.tsx
4094
- import { Flex as Flex29 } from "@radix-ui/themes";
4244
+ import { Flex as Flex30 } from "@radix-ui/themes";
4095
4245
  // src/components/threads/AudioThread/Form/MicIcon.tsx
4096
- import { jsx as jsx69 } from "react/jsx-runtime";
4246
+ import { jsx as jsx71 } from "react/jsx-runtime";
4097
4247
  var MicIcon = function(props) {
4098
- return /* @__PURE__ */ jsx69("svg", _object_spread_props(_object_spread({
4248
+ return /* @__PURE__ */ jsx71("svg", _object_spread_props(_object_spread({
4099
4249
  xmlns: "http://www.w3.org/2000/svg",
4100
4250
  fill: "currentColor",
4101
4251
  stroke: "currentColor",
@@ -4104,54 +4254,54 @@ var MicIcon = function(props) {
4104
4254
  height: "15",
4105
4255
  width: "15"
4106
4256
  }, props), {
4107
- children: /* @__PURE__ */ jsx69("path", {
4257
+ children: /* @__PURE__ */ jsx71("path", {
4108
4258
  stroke: "none",
4109
4259
  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"
4110
4260
  })
4111
4261
  }));
4112
4262
  };
4113
4263
  // src/components/threads/AudioThread/Form/ActionButton/index.tsx
4114
- import { Flex as Flex28, IconButton as IconButton6 } from "@radix-ui/themes";
4264
+ import { Flex as Flex29, IconButton as IconButton7 } from "@radix-ui/themes";
4115
4265
  import { StopIcon as StopIcon2, PauseIcon, ArrowUpIcon as ArrowUpIcon2, ResumeIcon } from "@radix-ui/react-icons";
4116
- import { jsx as jsx70, jsxs as jsxs26 } from "react/jsx-runtime";
4266
+ import { jsx as jsx72, jsxs as jsxs27 } from "react/jsx-runtime";
4117
4267
  var ActionButton = function() {
4118
4268
  var audioThreadContext = useAudioThreadContext();
4119
4269
  var superinterfaceContext = useSuperinterfaceContext();
4120
4270
  if (audioThreadContext.status === "recording") {
4121
- return /* @__PURE__ */ jsxs26(Flex28, {
4271
+ return /* @__PURE__ */ jsxs27(Flex29, {
4122
4272
  align: "center",
4123
4273
  children: [
4124
- /* @__PURE__ */ jsx70(Flex28, {
4274
+ /* @__PURE__ */ jsx72(Flex29, {
4125
4275
  mr: "3",
4126
4276
  ml: "-7",
4127
- children: /* @__PURE__ */ jsx70(IconButton6, {
4277
+ children: /* @__PURE__ */ jsx72(IconButton7, {
4128
4278
  onClick: audioThreadContext.recorderProps.pause,
4129
4279
  color: "gray",
4130
4280
  variant: "soft",
4131
4281
  size: "1",
4132
- children: /* @__PURE__ */ jsx70(PauseIcon, {})
4282
+ children: /* @__PURE__ */ jsx72(PauseIcon, {})
4133
4283
  })
4134
4284
  }),
4135
- /* @__PURE__ */ jsx70(IconButton6, {
4285
+ /* @__PURE__ */ jsx72(IconButton7, {
4136
4286
  onClick: audioThreadContext.recorderProps.stop,
4137
4287
  highContrast: true,
4138
4288
  variant: "soft",
4139
4289
  size: "4",
4140
- children: /* @__PURE__ */ jsx70(ArrowUpIcon2, {})
4290
+ children: /* @__PURE__ */ jsx72(ArrowUpIcon2, {})
4141
4291
  })
4142
4292
  ]
4143
4293
  });
4144
4294
  }
4145
4295
  if (audioThreadContext.status === "recorderPaused") {
4146
- return /* @__PURE__ */ jsx70(IconButton6, {
4296
+ return /* @__PURE__ */ jsx72(IconButton7, {
4147
4297
  onClick: audioThreadContext.recorderProps.resume,
4148
4298
  color: "red",
4149
4299
  size: "4",
4150
- children: /* @__PURE__ */ jsx70(ResumeIcon, {})
4300
+ children: /* @__PURE__ */ jsx72(ResumeIcon, {})
4151
4301
  });
4152
4302
  }
4153
4303
  if (audioThreadContext.status === "idle") {
4154
- return /* @__PURE__ */ jsx70(IconButton6, {
4304
+ return /* @__PURE__ */ jsx72(IconButton7, {
4155
4305
  onClick: function() {
4156
4306
  return audioThreadContext.recorderProps.start();
4157
4307
  },
@@ -4160,7 +4310,7 @@ var ActionButton = function() {
4160
4310
  });
4161
4311
  }
4162
4312
  if (audioThreadContext.status === "playing") {
4163
- return /* @__PURE__ */ jsx70(IconButton6, {
4313
+ return /* @__PURE__ */ jsx72(IconButton7, {
4164
4314
  onClick: function() {
4165
4315
  var _superinterfaceContext_createMessageAbortControllerRef_current;
4166
4316
  audioThreadContext.messageAudioProps.stop();
@@ -4170,54 +4320,54 @@ var ActionButton = function() {
4170
4320
  size: "4",
4171
4321
  color: "gray",
4172
4322
  variant: "soft",
4173
- children: /* @__PURE__ */ jsx70(StopIcon2, {})
4323
+ children: /* @__PURE__ */ jsx72(StopIcon2, {})
4174
4324
  });
4175
4325
  }
4176
4326
  if (audioThreadContext.status === "playerPaused") {
4177
- return /* @__PURE__ */ jsx70(IconButton6, {
4327
+ return /* @__PURE__ */ jsx72(IconButton7, {
4178
4328
  onClick: function() {
4179
4329
  return audioThreadContext.messageAudioProps.play();
4180
4330
  },
4181
4331
  size: "4",
4182
- children: /* @__PURE__ */ jsx70(ResumeIcon, {})
4332
+ children: /* @__PURE__ */ jsx72(ResumeIcon, {})
4183
4333
  });
4184
4334
  }
4185
- return /* @__PURE__ */ jsx70(IconButton6, {
4335
+ return /* @__PURE__ */ jsx72(IconButton7, {
4186
4336
  size: "4",
4187
4337
  variant: "soft",
4188
4338
  disabled: true
4189
4339
  });
4190
4340
  };
4191
4341
  // src/components/threads/AudioThread/Form/index.tsx
4192
- import { jsx as jsx71, jsxs as jsxs27 } from "react/jsx-runtime";
4342
+ import { jsx as jsx73, jsxs as jsxs28 } from "react/jsx-runtime";
4193
4343
  var Form = function() {
4194
4344
  var audioThreadContext = useAudioThreadContext();
4195
- return /* @__PURE__ */ jsxs27(Flex29, {
4345
+ return /* @__PURE__ */ jsxs28(Flex30, {
4196
4346
  direction: "column",
4197
4347
  align: "center",
4198
4348
  children: [
4199
- /* @__PURE__ */ jsxs27(Flex29, {
4349
+ /* @__PURE__ */ jsxs28(Flex30, {
4200
4350
  pb: "3",
4201
4351
  align: "center",
4202
4352
  children: [
4203
- /* @__PURE__ */ jsx71(Flex29, {
4353
+ /* @__PURE__ */ jsx73(Flex30, {
4204
4354
  ml: "-22.5px",
4205
4355
  mr: "2",
4206
4356
  align: "center",
4207
- children: /* @__PURE__ */ jsx71(MicIcon, {
4357
+ children: /* @__PURE__ */ jsx73(MicIcon, {
4208
4358
  style: {
4209
4359
  color: audioThreadContext.status === "recording" ? "var(--accent-11)" : "var(--gray-11)"
4210
4360
  }
4211
4361
  })
4212
4362
  }),
4213
- /* @__PURE__ */ jsx71(Flex29, {
4363
+ /* @__PURE__ */ jsx73(Flex30, {
4214
4364
  px: "2",
4215
4365
  py: "1",
4216
4366
  style: {
4217
4367
  backgroundColor: audioThreadContext.status === "recording" ? "var(--accent-4)" : "var(--gray-4)",
4218
4368
  borderRadius: "var(--radius-6)"
4219
4369
  },
4220
- children: /* @__PURE__ */ jsx71(BarsVisualizer, {
4370
+ children: /* @__PURE__ */ jsx73(BarsVisualizer, {
4221
4371
  visualizationAnalyser: audioThreadContext.recorderProps.visualizationAnalyser,
4222
4372
  backgroundColor: audioThreadContext.status === "recording" ? "var(--accent-11)" : "var(--gray-11)",
4223
4373
  height: "20px",
@@ -4226,18 +4376,18 @@ var Form = function() {
4226
4376
  })
4227
4377
  ]
4228
4378
  }),
4229
- /* @__PURE__ */ jsx71(ActionButton, {})
4379
+ /* @__PURE__ */ jsx73(ActionButton, {})
4230
4380
  ]
4231
4381
  });
4232
4382
  };
4233
4383
  // src/components/threads/AudioThread/index.tsx
4234
- import { jsx as jsx72, jsxs as jsxs28 } from "react/jsx-runtime";
4384
+ import { jsx as jsx74, jsxs as jsxs29 } from "react/jsx-runtime";
4235
4385
  var AudioThread = function(props) {
4236
- return /* @__PURE__ */ jsxs28(Root12, _object_spread_props(_object_spread({}, props), {
4386
+ return /* @__PURE__ */ jsxs29(Root12, _object_spread_props(_object_spread({}, props), {
4237
4387
  children: [
4238
- /* @__PURE__ */ jsx72(Visualization, {}),
4239
- /* @__PURE__ */ jsx72(Status, {}),
4240
- /* @__PURE__ */ jsx72(Form, {})
4388
+ /* @__PURE__ */ jsx74(Visualization, {}),
4389
+ /* @__PURE__ */ jsx74(Status, {}),
4390
+ /* @__PURE__ */ jsx74(Form, {})
4241
4391
  ]
4242
4392
  }));
4243
4393
  };
@@ -4245,14 +4395,14 @@ AudioThread.Root = Root12;
4245
4395
  AudioThread.Visualization = Visualization;
4246
4396
  AudioThread.Form = Form;
4247
4397
  // src/components/threads/AudioThreadDialog/index.tsx
4248
- import { jsx as jsx73, jsxs as jsxs29 } from "react/jsx-runtime";
4398
+ import { jsx as jsx75, jsxs as jsxs30 } from "react/jsx-runtime";
4249
4399
  var AudioThreadDialog = function() {
4250
- return /* @__PURE__ */ jsxs29(Root9, {
4400
+ return /* @__PURE__ */ jsxs30(Root9, {
4251
4401
  children: [
4252
- /* @__PURE__ */ jsx73(Content4.Root, {
4253
- children: /* @__PURE__ */ jsx73(AudioThread, {})
4402
+ /* @__PURE__ */ jsx75(Content4.Root, {
4403
+ children: /* @__PURE__ */ jsx75(AudioThread, {})
4254
4404
  }),
4255
- /* @__PURE__ */ jsx73(Trigger, {})
4405
+ /* @__PURE__ */ jsx75(Trigger, {})
4256
4406
  ]
4257
4407
  });
4258
4408
  };
@@ -4265,15 +4415,15 @@ import { useMemo as useMemo14 } from "react";
4265
4415
  import { useMemo as useMemo13 } from "react";
4266
4416
  import { isEmpty as isEmpty3 } from "radash";
4267
4417
  import { onlyText } from "react-children-utilities";
4268
- import { Flex as Flex30 } from "@radix-ui/themes";
4418
+ import { Flex as Flex31 } from "@radix-ui/themes";
4269
4419
  // src/components/suggestions/Suggestions/Item.tsx
4270
4420
  import { ArrowUpIcon as ArrowUpIcon3 } from "@radix-ui/react-icons";
4271
- import { Text as Text9, Button as Button4, Spinner as Spinner2 } from "@radix-ui/themes";
4272
- import { jsx as jsx74, jsxs as jsxs30 } from "react/jsx-runtime";
4421
+ import { Text as Text10, Button as Button4, Spinner as Spinner2 } from "@radix-ui/themes";
4422
+ import { jsx as jsx76, jsxs as jsxs31 } from "react/jsx-runtime";
4273
4423
  var Item = function(param) {
4274
4424
  var suggestion = param.suggestion, isDisabled = param.isDisabled;
4275
4425
  var _useCreateMessage = useCreateMessage(), createMessage = _useCreateMessage.createMessage, isPending = _useCreateMessage.isPending;
4276
- return /* @__PURE__ */ jsx74(Content5, {
4426
+ return /* @__PURE__ */ jsx76(Content5, {
4277
4427
  onClick: function() {
4278
4428
  createMessage({
4279
4429
  // @ts-ignore-next-line
@@ -4287,7 +4437,7 @@ var Item = function(param) {
4287
4437
  };
4288
4438
  var Content5 = function(param) {
4289
4439
  var onClick = param.onClick, isDisabled = param.isDisabled, isPending = param.isPending, children = param.children;
4290
- return /* @__PURE__ */ jsxs30(Button4, {
4440
+ return /* @__PURE__ */ jsxs31(Button4, {
4291
4441
  variant: "soft",
4292
4442
  onClick: onClick,
4293
4443
  disabled: isDisabled,
@@ -4297,14 +4447,14 @@ var Content5 = function(param) {
4297
4447
  flexShrink: 1
4298
4448
  },
4299
4449
  children: [
4300
- /* @__PURE__ */ jsx74(Text9, {
4450
+ /* @__PURE__ */ jsx76(Text10, {
4301
4451
  size: "1",
4302
4452
  weight: "regular",
4303
4453
  children: children
4304
4454
  }),
4305
- /* @__PURE__ */ jsx74(Spinner2, {
4455
+ /* @__PURE__ */ jsx76(Spinner2, {
4306
4456
  loading: isPending,
4307
- children: /* @__PURE__ */ jsx74(ArrowUpIcon3, {
4457
+ children: /* @__PURE__ */ jsx76(ArrowUpIcon3, {
4308
4458
  style: {
4309
4459
  flexShrink: 0
4310
4460
  }
@@ -4315,7 +4465,7 @@ var Content5 = function(param) {
4315
4465
  };
4316
4466
  Item.Content = Content5;
4317
4467
  // src/components/suggestions/Suggestions/Content.tsx
4318
- import { jsx as jsx75 } from "react/jsx-runtime";
4468
+ import { jsx as jsx77 } from "react/jsx-runtime";
4319
4469
  var Content6 = function(param) {
4320
4470
  var children = param.children;
4321
4471
  var isMutatingMessage = useIsMutatingMessage();
@@ -4329,12 +4479,12 @@ var Content6 = function(param) {
4329
4479
  children
4330
4480
  ]);
4331
4481
  if (isEmpty3(suggestions)) return null;
4332
- return /* @__PURE__ */ jsx75(Flex30, {
4482
+ return /* @__PURE__ */ jsx77(Flex31, {
4333
4483
  gap: "2",
4334
4484
  py: "2",
4335
4485
  wrap: "wrap",
4336
4486
  children: suggestions.map(function(suggestion) {
4337
- return /* @__PURE__ */ jsx75(Item, {
4487
+ return /* @__PURE__ */ jsx77(Item, {
4338
4488
  suggestion: suggestion,
4339
4489
  isDisabled: isMutatingMessage
4340
4490
  }, suggestion);
@@ -4342,7 +4492,7 @@ var Content6 = function(param) {
4342
4492
  });
4343
4493
  };
4344
4494
  // src/components/suggestions/Suggestions/index.tsx
4345
- import { jsx as jsx76 } from "react/jsx-runtime";
4495
+ import { jsx as jsx78 } from "react/jsx-runtime";
4346
4496
  var Suggestions = function(param) {
4347
4497
  var children = param.children;
4348
4498
  var latestMessageProps = useLatestMessage();
@@ -4355,14 +4505,14 @@ var Suggestions = function(param) {
4355
4505
  ]);
4356
4506
  if (latestMessageProps.isLoading) return null;
4357
4507
  if (isDisabled) return null;
4358
- return /* @__PURE__ */ jsx76(Content6, {
4508
+ return /* @__PURE__ */ jsx78(Content6, {
4359
4509
  children: children
4360
4510
  });
4361
4511
  };
4362
4512
  Suggestions.Item = Item;
4363
4513
  // src/components/markdown/MarkdownProvider/index.tsx
4364
4514
  import { useMemo as useMemo15 } from "react";
4365
- import { jsx as jsx77 } from "react/jsx-runtime";
4515
+ import { jsx as jsx79 } from "react/jsx-runtime";
4366
4516
  var MarkdownProvider = function(_param) {
4367
4517
  var children = _param.children, rest = _object_without_properties(_param, [
4368
4518
  "children"
@@ -4374,7 +4524,7 @@ var MarkdownProvider = function(_param) {
4374
4524
  rest,
4375
4525
  prevMarkdownContext
4376
4526
  ]);
4377
- return /* @__PURE__ */ jsx77(MarkdownContext.Provider, {
4527
+ return /* @__PURE__ */ jsx79(MarkdownContext.Provider, {
4378
4528
  value: value,
4379
4529
  children: children
4380
4530
  });
@@ -4387,7 +4537,7 @@ var useComponents = function() {
4387
4537
  return useContext16(ComponentsContext);
4388
4538
  };
4389
4539
  // src/components/components/ComponentsProvider.tsx
4390
- import { jsx as jsx78 } from "react/jsx-runtime";
4540
+ import { jsx as jsx80 } from "react/jsx-runtime";
4391
4541
  var ComponentsProvider = function(_param) {
4392
4542
  var children = _param.children, rest = _object_without_properties(_param, [
4393
4543
  "children"
@@ -4399,7 +4549,7 @@ var ComponentsProvider = function(_param) {
4399
4549
  rest,
4400
4550
  prevComponents
4401
4551
  ]);
4402
- return /* @__PURE__ */ jsx78(ComponentsContext.Provider, {
4552
+ return /* @__PURE__ */ jsx80(ComponentsContext.Provider, {
4403
4553
  value: value,
4404
4554
  children: children
4405
4555
  });