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