@superinterface/react 2.19.2 → 2.19.3
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.cjs +312 -268
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +12 -0
- package/dist/index.d.ts +12 -0
- package/dist/index.js +253 -209
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1175,6 +1175,8 @@ import Markdown from "react-markdown";
|
|
|
1175
1175
|
import { useContext as useContext7 } from "react";
|
|
1176
1176
|
// src/contexts/markdown/MarkdownContext/index.ts
|
|
1177
1177
|
import { createContext as createContext9 } from "react";
|
|
1178
|
+
// src/contexts/markdown/MarkdownContext/lib/components/index.tsx
|
|
1179
|
+
import { Heading } from "@radix-ui/themes";
|
|
1178
1180
|
// src/contexts/markdown/MarkdownContext/lib/components/Paragraph.tsx
|
|
1179
1181
|
import { Box as Box3, Text as Text4 } from "@radix-ui/themes";
|
|
1180
1182
|
import { jsx as jsx25 } from "react/jsx-runtime";
|
|
@@ -1340,6 +1342,7 @@ var Annotation = function(param) {
|
|
|
1340
1342
|
return null;
|
|
1341
1343
|
};
|
|
1342
1344
|
// src/contexts/markdown/MarkdownContext/lib/components/index.tsx
|
|
1345
|
+
import { jsx as jsx36 } from "react/jsx-runtime";
|
|
1343
1346
|
var components = {
|
|
1344
1347
|
p: Paragraph,
|
|
1345
1348
|
a: Link,
|
|
@@ -1350,7 +1353,48 @@ var components = {
|
|
|
1350
1353
|
pre: Pre,
|
|
1351
1354
|
code: Code2,
|
|
1352
1355
|
img: Img,
|
|
1353
|
-
annotation: Annotation
|
|
1356
|
+
annotation: Annotation,
|
|
1357
|
+
h1: function(props) {
|
|
1358
|
+
return /* @__PURE__ */ jsx36(Heading, {
|
|
1359
|
+
as: "h1",
|
|
1360
|
+
children: props.children
|
|
1361
|
+
});
|
|
1362
|
+
},
|
|
1363
|
+
h2: function(props) {
|
|
1364
|
+
return /* @__PURE__ */ jsx36(Heading, {
|
|
1365
|
+
as: "h2",
|
|
1366
|
+
size: "5",
|
|
1367
|
+
children: props.children
|
|
1368
|
+
});
|
|
1369
|
+
},
|
|
1370
|
+
h3: function(props) {
|
|
1371
|
+
return /* @__PURE__ */ jsx36(Heading, {
|
|
1372
|
+
as: "h3",
|
|
1373
|
+
size: "4",
|
|
1374
|
+
children: props.children
|
|
1375
|
+
});
|
|
1376
|
+
},
|
|
1377
|
+
h4: function(props) {
|
|
1378
|
+
return /* @__PURE__ */ jsx36(Heading, {
|
|
1379
|
+
as: "h4",
|
|
1380
|
+
size: "3",
|
|
1381
|
+
children: props.children
|
|
1382
|
+
});
|
|
1383
|
+
},
|
|
1384
|
+
h5: function(props) {
|
|
1385
|
+
return /* @__PURE__ */ jsx36(Heading, {
|
|
1386
|
+
as: "h5",
|
|
1387
|
+
size: "3",
|
|
1388
|
+
children: props.children
|
|
1389
|
+
});
|
|
1390
|
+
},
|
|
1391
|
+
h6: function(props) {
|
|
1392
|
+
return /* @__PURE__ */ jsx36(Heading, {
|
|
1393
|
+
as: "h6",
|
|
1394
|
+
size: "3",
|
|
1395
|
+
children: props.children
|
|
1396
|
+
});
|
|
1397
|
+
}
|
|
1354
1398
|
};
|
|
1355
1399
|
// src/lib/remark/remarkAnnotation.ts
|
|
1356
1400
|
import { isNumber } from "radash";
|
|
@@ -1485,13 +1529,13 @@ var useMarkdownContext = function() {
|
|
|
1485
1529
|
return useContext7(MarkdownContext);
|
|
1486
1530
|
};
|
|
1487
1531
|
// src/components/threads/Thread/Message/TextContent.tsx
|
|
1488
|
-
import { jsx as
|
|
1532
|
+
import { jsx as jsx37 } from "react/jsx-runtime";
|
|
1489
1533
|
var TextContent = function(param) {
|
|
1490
1534
|
var content = param.content;
|
|
1491
1535
|
var _useMarkdownContext = useMarkdownContext(), getRemarkPlugins2 = _useMarkdownContext.getRemarkPlugins, rest = _object_without_properties(_useMarkdownContext, [
|
|
1492
1536
|
"getRemarkPlugins"
|
|
1493
1537
|
]);
|
|
1494
|
-
return /* @__PURE__ */
|
|
1538
|
+
return /* @__PURE__ */ jsx37(Markdown, _object_spread_props(_object_spread({}, rest), {
|
|
1495
1539
|
remarkPlugins: getRemarkPlugins2({
|
|
1496
1540
|
content: content
|
|
1497
1541
|
}),
|
|
@@ -1501,19 +1545,19 @@ var TextContent = function(param) {
|
|
|
1501
1545
|
// src/components/threads/Thread/Message/Attachments/index.tsx
|
|
1502
1546
|
import { Flex as Flex11, Badge } from "@radix-ui/themes";
|
|
1503
1547
|
import { FileIcon as FileIcon2 } from "@radix-ui/react-icons";
|
|
1504
|
-
import { jsx as
|
|
1548
|
+
import { jsx as jsx38, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
1505
1549
|
var Attachments = function(param) {
|
|
1506
1550
|
var message = param.message;
|
|
1507
1551
|
var _message_attachments;
|
|
1508
1552
|
if (!((_message_attachments = message.attachments) === null || _message_attachments === void 0 ? void 0 : _message_attachments.length)) return null;
|
|
1509
|
-
return /* @__PURE__ */
|
|
1553
|
+
return /* @__PURE__ */ jsx38(Flex11, {
|
|
1510
1554
|
align: "start",
|
|
1511
1555
|
pb: "1",
|
|
1512
1556
|
children: /* @__PURE__ */ jsxs10(Badge, {
|
|
1513
1557
|
color: "gray",
|
|
1514
1558
|
variant: "surface",
|
|
1515
1559
|
children: [
|
|
1516
|
-
/* @__PURE__ */
|
|
1560
|
+
/* @__PURE__ */ jsx38(FileIcon2, {}),
|
|
1517
1561
|
message.attachments.length,
|
|
1518
1562
|
" file",
|
|
1519
1563
|
message.attachments.length > 1 ? "s" : ""
|
|
@@ -1522,7 +1566,7 @@ var Attachments = function(param) {
|
|
|
1522
1566
|
});
|
|
1523
1567
|
};
|
|
1524
1568
|
// src/components/threads/Thread/Message/index.tsx
|
|
1525
|
-
import { jsx as
|
|
1569
|
+
import { jsx as jsx39, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
1526
1570
|
var Message = function(param) {
|
|
1527
1571
|
var message = param.message;
|
|
1528
1572
|
var _useMemo5 = _sliced_to_array(useMemo5(function() {
|
|
@@ -1567,68 +1611,68 @@ var Message = function(param) {
|
|
|
1567
1611
|
}, [
|
|
1568
1612
|
message
|
|
1569
1613
|
]);
|
|
1570
|
-
return /* @__PURE__ */
|
|
1614
|
+
return /* @__PURE__ */ jsx39(Provider, {
|
|
1571
1615
|
value: {
|
|
1572
1616
|
message: message
|
|
1573
1617
|
},
|
|
1574
1618
|
children: /* @__PURE__ */ jsxs11(Box9, {
|
|
1575
1619
|
children: [
|
|
1576
|
-
/* @__PURE__ */
|
|
1620
|
+
/* @__PURE__ */ jsx39(RunSteps, {
|
|
1577
1621
|
runSteps: olderRunSteps
|
|
1578
1622
|
}),
|
|
1579
1623
|
/* @__PURE__ */ jsxs11(Box9, {
|
|
1580
1624
|
children: [
|
|
1581
|
-
/* @__PURE__ */
|
|
1625
|
+
/* @__PURE__ */ jsx39(Attachments, {
|
|
1582
1626
|
message: message
|
|
1583
1627
|
}),
|
|
1584
1628
|
message.content.map(function(content, index) {
|
|
1585
|
-
return /* @__PURE__ */
|
|
1586
|
-
children: content.type === "text" && /* @__PURE__ */
|
|
1629
|
+
return /* @__PURE__ */ jsx39(Fragment, {
|
|
1630
|
+
children: content.type === "text" && /* @__PURE__ */ jsx39(TextContent, {
|
|
1587
1631
|
content: content
|
|
1588
1632
|
})
|
|
1589
1633
|
}, index);
|
|
1590
1634
|
}),
|
|
1591
|
-
isInProgress && isEmpty(laterRunSteps) && /* @__PURE__ */
|
|
1635
|
+
isInProgress && isEmpty(laterRunSteps) && /* @__PURE__ */ jsx39(StartingContentSkeleton, {})
|
|
1592
1636
|
]
|
|
1593
1637
|
}),
|
|
1594
|
-
/* @__PURE__ */
|
|
1638
|
+
/* @__PURE__ */ jsx39(RunSteps, {
|
|
1595
1639
|
runSteps: laterRunSteps
|
|
1596
1640
|
}),
|
|
1597
|
-
isInProgress && !isEmpty(laterRunSteps) && /* @__PURE__ */
|
|
1598
|
-
children: /* @__PURE__ */
|
|
1641
|
+
isInProgress && !isEmpty(laterRunSteps) && /* @__PURE__ */ jsx39(Box9, {
|
|
1642
|
+
children: /* @__PURE__ */ jsx39(StartingContentSkeleton, {})
|
|
1599
1643
|
})
|
|
1600
1644
|
]
|
|
1601
1645
|
})
|
|
1602
1646
|
});
|
|
1603
1647
|
};
|
|
1604
1648
|
// src/components/threads/Thread/Messages/Content/MessageGroup/Content/index.tsx
|
|
1605
|
-
import { jsx as
|
|
1649
|
+
import { jsx as jsx40 } from "react/jsx-runtime";
|
|
1606
1650
|
var Content2 = function(param) {
|
|
1607
1651
|
var messageGroup = param.messageGroup;
|
|
1608
|
-
return /* @__PURE__ */
|
|
1652
|
+
return /* @__PURE__ */ jsx40(Flex12, {
|
|
1609
1653
|
direction: "column-reverse",
|
|
1610
1654
|
children: messageGroup.messages.map(function(message) {
|
|
1611
|
-
return /* @__PURE__ */
|
|
1655
|
+
return /* @__PURE__ */ jsx40(Message, {
|
|
1612
1656
|
message: message
|
|
1613
1657
|
}, message.id);
|
|
1614
1658
|
})
|
|
1615
1659
|
});
|
|
1616
1660
|
};
|
|
1617
1661
|
// src/components/threads/Thread/Messages/Content/MessageGroup/index.tsx
|
|
1618
|
-
import { jsx as
|
|
1662
|
+
import { jsx as jsx41, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
1619
1663
|
var MessageGroup = function(param) {
|
|
1620
1664
|
var messageGroup = param.messageGroup;
|
|
1621
1665
|
var assistantNameContext = useContext8(AssistantNameContext);
|
|
1622
1666
|
return /* @__PURE__ */ jsxs12(MessageGroupBase, {
|
|
1623
1667
|
children: [
|
|
1624
|
-
messageGroup.role === "user" ? /* @__PURE__ */
|
|
1668
|
+
messageGroup.role === "user" ? /* @__PURE__ */ jsx41(UserAvatar, {}) : /* @__PURE__ */ jsx41(AssistantAvatar, {}),
|
|
1625
1669
|
/* @__PURE__ */ jsxs12(Box10, {
|
|
1626
1670
|
flexGrow: "1",
|
|
1627
1671
|
children: [
|
|
1628
|
-
/* @__PURE__ */
|
|
1672
|
+
/* @__PURE__ */ jsx41(Name, {
|
|
1629
1673
|
children: messageGroup.role === "user" ? "You" : assistantNameContext
|
|
1630
1674
|
}),
|
|
1631
|
-
/* @__PURE__ */
|
|
1675
|
+
/* @__PURE__ */ jsx41(Content2, {
|
|
1632
1676
|
messageGroup: messageGroup
|
|
1633
1677
|
})
|
|
1634
1678
|
]
|
|
@@ -1637,7 +1681,7 @@ var MessageGroup = function(param) {
|
|
|
1637
1681
|
});
|
|
1638
1682
|
};
|
|
1639
1683
|
// src/components/threads/Thread/Messages/Content/index.tsx
|
|
1640
|
-
import { Fragment as Fragment2, jsx as
|
|
1684
|
+
import { Fragment as Fragment2, jsx as jsx42 } from "react/jsx-runtime";
|
|
1641
1685
|
var Content3 = function() {
|
|
1642
1686
|
var _useMessages = useMessages(), messages2 = _useMessages.messages, isLoading = _useMessages.isLoading, isLoadingError = _useMessages.isLoadingError;
|
|
1643
1687
|
var addToast = useToasts().addToast;
|
|
@@ -1656,11 +1700,11 @@ var Content3 = function() {
|
|
|
1656
1700
|
addToast
|
|
1657
1701
|
]);
|
|
1658
1702
|
if (isLoading || isLoadingError) {
|
|
1659
|
-
return /* @__PURE__ */
|
|
1703
|
+
return /* @__PURE__ */ jsx42(MessagesSkeleton, {});
|
|
1660
1704
|
}
|
|
1661
|
-
return /* @__PURE__ */
|
|
1705
|
+
return /* @__PURE__ */ jsx42(Fragment2, {
|
|
1662
1706
|
children: messageGroups2.map(function(messageGroup) {
|
|
1663
|
-
return /* @__PURE__ */
|
|
1707
|
+
return /* @__PURE__ */ jsx42(MessageGroup, {
|
|
1664
1708
|
messageGroup: messageGroup
|
|
1665
1709
|
}, messageGroup.id);
|
|
1666
1710
|
})
|
|
@@ -1671,20 +1715,20 @@ import { useMemo as useMemo7 } from "react";
|
|
|
1671
1715
|
// src/components/skeletons/StartingSkeleton/index.tsx
|
|
1672
1716
|
import { useContext as useContext9 } from "react";
|
|
1673
1717
|
import { Box as Box11 } from "@radix-ui/themes";
|
|
1674
|
-
import { jsx as
|
|
1718
|
+
import { jsx as jsx43, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
1675
1719
|
var StartingSkeleton = function(param) {
|
|
1676
1720
|
var children = param.children;
|
|
1677
1721
|
var assistantNameContext = useContext9(AssistantNameContext);
|
|
1678
1722
|
return /* @__PURE__ */ jsxs13(MessageGroupBase, {
|
|
1679
1723
|
children: [
|
|
1680
|
-
/* @__PURE__ */
|
|
1724
|
+
/* @__PURE__ */ jsx43(AssistantAvatar, {}),
|
|
1681
1725
|
/* @__PURE__ */ jsxs13(Box11, {
|
|
1682
1726
|
children: [
|
|
1683
|
-
/* @__PURE__ */
|
|
1727
|
+
/* @__PURE__ */ jsx43(Name, {
|
|
1684
1728
|
children: assistantNameContext
|
|
1685
1729
|
}),
|
|
1686
1730
|
children,
|
|
1687
|
-
/* @__PURE__ */
|
|
1731
|
+
/* @__PURE__ */ jsx43(StartingContentSkeleton, {})
|
|
1688
1732
|
]
|
|
1689
1733
|
})
|
|
1690
1734
|
]
|
|
@@ -1709,7 +1753,7 @@ var isOptimistic = function(param) {
|
|
|
1709
1753
|
return _4.startsWith(id, "-");
|
|
1710
1754
|
};
|
|
1711
1755
|
// src/components/threads/Thread/Messages/Progress/index.tsx
|
|
1712
|
-
import { jsx as
|
|
1756
|
+
import { jsx as jsx44 } from "react/jsx-runtime";
|
|
1713
1757
|
var Progress = function() {
|
|
1714
1758
|
var latestMessage = useLatestMessage().latestMessage;
|
|
1715
1759
|
var isMutatingMessage = useIsMutatingMessage();
|
|
@@ -1727,7 +1771,7 @@ var Progress = function() {
|
|
|
1727
1771
|
isMutatingMessage
|
|
1728
1772
|
]);
|
|
1729
1773
|
if (!isVisible) return null;
|
|
1730
|
-
return /* @__PURE__ */
|
|
1774
|
+
return /* @__PURE__ */ jsx44(StartingSkeleton, {});
|
|
1731
1775
|
};
|
|
1732
1776
|
// src/components/threads/Thread/Messages/Root/index.tsx
|
|
1733
1777
|
import { Flex as Flex13 } from "@radix-ui/themes";
|
|
@@ -1785,7 +1829,7 @@ var useInfiniteScroll = function(param) {
|
|
|
1785
1829
|
};
|
|
1786
1830
|
};
|
|
1787
1831
|
// src/components/threads/Thread/Messages/Root/index.tsx
|
|
1788
|
-
import { jsx as
|
|
1832
|
+
import { jsx as jsx45, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
1789
1833
|
var Root2 = function(param) {
|
|
1790
1834
|
var children = param.children, _param_style = param.style, style = _param_style === void 0 ? {} : _param_style;
|
|
1791
1835
|
var _useMessages = useMessages(), isFetchingNextPage = _useMessages.isFetchingNextPage, hasNextPage = _useMessages.hasNextPage, fetchNextPage = _useMessages.fetchNextPage;
|
|
@@ -1803,10 +1847,10 @@ var Root2 = function(param) {
|
|
|
1803
1847
|
}),
|
|
1804
1848
|
children: [
|
|
1805
1849
|
children,
|
|
1806
|
-
hasNextPage && /* @__PURE__ */
|
|
1850
|
+
hasNextPage && /* @__PURE__ */ jsx45(Flex13, {
|
|
1807
1851
|
ref: loaderRef
|
|
1808
1852
|
}),
|
|
1809
|
-
/* @__PURE__ */
|
|
1853
|
+
/* @__PURE__ */ jsx45(Flex13, {
|
|
1810
1854
|
flexShrink: "0",
|
|
1811
1855
|
flexGrow: "1"
|
|
1812
1856
|
})
|
|
@@ -1814,30 +1858,30 @@ var Root2 = function(param) {
|
|
|
1814
1858
|
});
|
|
1815
1859
|
};
|
|
1816
1860
|
// src/components/threads/Thread/Messages/NextPageSkeleton.tsx
|
|
1817
|
-
import { jsx as
|
|
1861
|
+
import { jsx as jsx46 } from "react/jsx-runtime";
|
|
1818
1862
|
var NextPageSkeleton = function() {
|
|
1819
1863
|
var hasNextPage = useMessages().hasNextPage;
|
|
1820
1864
|
if (!hasNextPage) {
|
|
1821
1865
|
return null;
|
|
1822
1866
|
}
|
|
1823
|
-
return /* @__PURE__ */
|
|
1867
|
+
return /* @__PURE__ */ jsx46(MessagesSkeleton, {});
|
|
1824
1868
|
};
|
|
1825
1869
|
// src/components/threads/Thread/Messages/index.tsx
|
|
1826
|
-
import { jsx as
|
|
1870
|
+
import { jsx as jsx47, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
1827
1871
|
var Messages = function(param) {
|
|
1828
1872
|
var children = param.children, _param_style = param.style, style = _param_style === void 0 ? {} : _param_style;
|
|
1829
1873
|
return /* @__PURE__ */ jsxs15(Root2, {
|
|
1830
1874
|
style: style,
|
|
1831
1875
|
children: [
|
|
1832
|
-
/* @__PURE__ */
|
|
1876
|
+
/* @__PURE__ */ jsx47(Flex14, {
|
|
1833
1877
|
flexShrink: "0",
|
|
1834
1878
|
height: "var(--space-3)"
|
|
1835
1879
|
}),
|
|
1836
|
-
/* @__PURE__ */
|
|
1880
|
+
/* @__PURE__ */ jsx47(Progress, {}),
|
|
1837
1881
|
children,
|
|
1838
|
-
/* @__PURE__ */
|
|
1839
|
-
/* @__PURE__ */
|
|
1840
|
-
/* @__PURE__ */
|
|
1882
|
+
/* @__PURE__ */ jsx47(Content3, {}),
|
|
1883
|
+
/* @__PURE__ */ jsx47(NextPageSkeleton, {}),
|
|
1884
|
+
/* @__PURE__ */ jsx47(Flex14, {
|
|
1841
1885
|
flexShrink: "0",
|
|
1842
1886
|
flexGrow: "1",
|
|
1843
1887
|
minHeight: "var(--space-5)"
|
|
@@ -1868,10 +1912,10 @@ var useMessageFormContext = function() {
|
|
|
1868
1912
|
return useContext10(MessageFormContext);
|
|
1869
1913
|
};
|
|
1870
1914
|
// src/components/threads/Thread/MessageForm/Submit/index.tsx
|
|
1871
|
-
import { jsx as
|
|
1915
|
+
import { jsx as jsx48 } from "react/jsx-runtime";
|
|
1872
1916
|
var Root3 = function(param) {
|
|
1873
1917
|
var children = param.children;
|
|
1874
|
-
return /* @__PURE__ */
|
|
1918
|
+
return /* @__PURE__ */ jsx48(Flex15, {
|
|
1875
1919
|
flexShrink: "0",
|
|
1876
1920
|
align: "end",
|
|
1877
1921
|
children: children
|
|
@@ -1881,24 +1925,24 @@ var Button2 = function() {
|
|
|
1881
1925
|
var superinterfaceContext = useSuperinterfaceContext();
|
|
1882
1926
|
var _useMessageFormContext = useMessageFormContext(), isDisabled = _useMessageFormContext.isDisabled, isLoading = _useMessageFormContext.isLoading, isFileLoading = _useMessageFormContext.isFileLoading;
|
|
1883
1927
|
if (isLoading) {
|
|
1884
|
-
return /* @__PURE__ */
|
|
1928
|
+
return /* @__PURE__ */ jsx48(IconButton2, {
|
|
1885
1929
|
type: "button",
|
|
1886
1930
|
onClick: function() {
|
|
1887
1931
|
var _superinterfaceContext_createMessageAbortControllerRef_current;
|
|
1888
1932
|
return (_superinterfaceContext_createMessageAbortControllerRef_current = superinterfaceContext.createMessageAbortControllerRef.current) === null || _superinterfaceContext_createMessageAbortControllerRef_current === void 0 ? void 0 : _superinterfaceContext_createMessageAbortControllerRef_current.abort();
|
|
1889
1933
|
},
|
|
1890
|
-
children: /* @__PURE__ */
|
|
1934
|
+
children: /* @__PURE__ */ jsx48(StopIcon, {})
|
|
1891
1935
|
});
|
|
1892
1936
|
}
|
|
1893
|
-
return /* @__PURE__ */
|
|
1937
|
+
return /* @__PURE__ */ jsx48(IconButton2, {
|
|
1894
1938
|
type: "submit",
|
|
1895
1939
|
disabled: isDisabled || isFileLoading,
|
|
1896
|
-
children: /* @__PURE__ */
|
|
1940
|
+
children: /* @__PURE__ */ jsx48(ArrowUpIcon, {})
|
|
1897
1941
|
});
|
|
1898
1942
|
};
|
|
1899
1943
|
var Submit = function() {
|
|
1900
|
-
return /* @__PURE__ */
|
|
1901
|
-
children: /* @__PURE__ */
|
|
1944
|
+
return /* @__PURE__ */ jsx48(Root3, {
|
|
1945
|
+
children: /* @__PURE__ */ jsx48(Button2, {})
|
|
1902
1946
|
});
|
|
1903
1947
|
};
|
|
1904
1948
|
Submit.Root = Root3;
|
|
@@ -2530,7 +2574,7 @@ var formOptions = {
|
|
|
2530
2574
|
};
|
|
2531
2575
|
// src/components/threads/Thread/MessageForm/Root/index.tsx
|
|
2532
2576
|
import { partob as partob2 } from "radash";
|
|
2533
|
-
import { jsx as
|
|
2577
|
+
import { jsx as jsx49 } from "react/jsx-runtime";
|
|
2534
2578
|
var Root4 = function(param) {
|
|
2535
2579
|
var children = param.children, onSubmitArg = param.onSubmit, isDisabledArg = param.isDisabled;
|
|
2536
2580
|
var _useState = _sliced_to_array(useState([]), 2), files = _useState[0], setFiles = _useState[1];
|
|
@@ -2639,7 +2683,7 @@ var Root4 = function(param) {
|
|
|
2639
2683
|
};
|
|
2640
2684
|
}();
|
|
2641
2685
|
var content = watch("content");
|
|
2642
|
-
return /* @__PURE__ */
|
|
2686
|
+
return /* @__PURE__ */ jsx49(MessageFormContext.Provider, {
|
|
2643
2687
|
value: {
|
|
2644
2688
|
isDisabled: isDisabled,
|
|
2645
2689
|
isLoading: isLoading,
|
|
@@ -2648,11 +2692,11 @@ var Root4 = function(param) {
|
|
|
2648
2692
|
isFileLoading: isFileLoading,
|
|
2649
2693
|
content: content
|
|
2650
2694
|
},
|
|
2651
|
-
children: /* @__PURE__ */
|
|
2652
|
-
children: /* @__PURE__ */
|
|
2695
|
+
children: /* @__PURE__ */ jsx49(FormProvider, _object_spread_props(_object_spread({}, formProps), {
|
|
2696
|
+
children: /* @__PURE__ */ jsx49(Box12, {
|
|
2653
2697
|
asChild: true,
|
|
2654
2698
|
flexShrink: "0",
|
|
2655
|
-
children: /* @__PURE__ */
|
|
2699
|
+
children: /* @__PURE__ */ jsx49("form", {
|
|
2656
2700
|
onSubmit: handleSubmit(onSubmit),
|
|
2657
2701
|
children: children
|
|
2658
2702
|
})
|
|
@@ -2680,14 +2724,14 @@ import { useContext as useContext11, useMemo as useMemo9, useRef as useRef5, use
|
|
|
2680
2724
|
// src/components/textareas/TextareaBase/index.tsx
|
|
2681
2725
|
import { forwardRef as forwardRef3 } from "react";
|
|
2682
2726
|
import TextareaAutosize from "react-textarea-autosize";
|
|
2683
|
-
import { Fragment as Fragment3, jsx as
|
|
2727
|
+
import { Fragment as Fragment3, jsx as jsx50, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
2684
2728
|
var TextareaBase = forwardRef3(function TextareaBase2(props, ref) {
|
|
2685
2729
|
return /* @__PURE__ */ jsxs16(Fragment3, {
|
|
2686
2730
|
children: [
|
|
2687
|
-
/* @__PURE__ */
|
|
2731
|
+
/* @__PURE__ */ jsx50("style", {
|
|
2688
2732
|
children: ".superinterface-textarea { min-height: inherit; height: 30px; }\n.superinterface-textarea::placeholder { color: var(--gray-a10); }"
|
|
2689
2733
|
}),
|
|
2690
|
-
/* @__PURE__ */
|
|
2734
|
+
/* @__PURE__ */ jsx50(TextareaAutosize, _object_spread({
|
|
2691
2735
|
ref: ref,
|
|
2692
2736
|
className: "rt-reset superinterface-textarea",
|
|
2693
2737
|
style: {
|
|
@@ -2704,10 +2748,10 @@ var TextareaBase = forwardRef3(function TextareaBase2(props, ref) {
|
|
|
2704
2748
|
});
|
|
2705
2749
|
});
|
|
2706
2750
|
// src/components/threads/Thread/MessageForm/Field/Control.tsx
|
|
2707
|
-
import { jsx as
|
|
2751
|
+
import { jsx as jsx51 } from "react/jsx-runtime";
|
|
2708
2752
|
var Root5 = function(param) {
|
|
2709
2753
|
var children = param.children;
|
|
2710
|
-
return /* @__PURE__ */
|
|
2754
|
+
return /* @__PURE__ */ jsx51(Flex16, {
|
|
2711
2755
|
flexGrow: "1",
|
|
2712
2756
|
pt: "4px",
|
|
2713
2757
|
children: children
|
|
@@ -2736,7 +2780,7 @@ var Input = function() {
|
|
|
2736
2780
|
isDisabledPrevious,
|
|
2737
2781
|
textareaProps
|
|
2738
2782
|
]);
|
|
2739
|
-
return /* @__PURE__ */
|
|
2783
|
+
return /* @__PURE__ */ jsx51(TextareaBase, _object_spread_props(_object_spread({
|
|
2740
2784
|
minRows: 1,
|
|
2741
2785
|
placeholder: "Message ".concat(assistantNameContext, "..."),
|
|
2742
2786
|
disabled: isDisabled,
|
|
@@ -2756,8 +2800,8 @@ var Input = function() {
|
|
|
2756
2800
|
}));
|
|
2757
2801
|
};
|
|
2758
2802
|
var Control = function() {
|
|
2759
|
-
return /* @__PURE__ */
|
|
2760
|
-
children: /* @__PURE__ */
|
|
2803
|
+
return /* @__PURE__ */ jsx51(Root5, {
|
|
2804
|
+
children: /* @__PURE__ */ jsx51(Input, {})
|
|
2761
2805
|
});
|
|
2762
2806
|
};
|
|
2763
2807
|
Control.Root = Root5;
|
|
@@ -2765,19 +2809,19 @@ Control.Input = Input;
|
|
|
2765
2809
|
// src/components/threads/Thread/MessageForm/Field/Files/Preview.tsx
|
|
2766
2810
|
import { Flex as Flex17, Card as Card2, Spinner, Text as Text7, IconButton as IconButton3 } from "@radix-ui/themes";
|
|
2767
2811
|
import { FileIcon as FileIcon3, Cross2Icon } from "@radix-ui/react-icons";
|
|
2768
|
-
import { jsx as
|
|
2812
|
+
import { jsx as jsx52, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
2769
2813
|
var Preview = function() {
|
|
2770
2814
|
var _useMessageFormContext = useMessageFormContext(), files = _useMessageFormContext.files, setFiles = _useMessageFormContext.setFiles;
|
|
2771
2815
|
if (!files.length) {
|
|
2772
2816
|
return null;
|
|
2773
2817
|
}
|
|
2774
|
-
return /* @__PURE__ */
|
|
2818
|
+
return /* @__PURE__ */ jsx52(Flex17, {
|
|
2775
2819
|
flexBasis: "100%",
|
|
2776
2820
|
direction: "column",
|
|
2777
2821
|
pb: "2",
|
|
2778
2822
|
gap: "1",
|
|
2779
2823
|
children: files.map(function(file) {
|
|
2780
|
-
return /* @__PURE__ */
|
|
2824
|
+
return /* @__PURE__ */ jsx52(Card2, {
|
|
2781
2825
|
variant: "ghost",
|
|
2782
2826
|
children: /* @__PURE__ */ jsxs17(Flex17, {
|
|
2783
2827
|
align: "center",
|
|
@@ -2791,16 +2835,16 @@ var Preview = function() {
|
|
|
2791
2835
|
minWidth: "0",
|
|
2792
2836
|
maxWidth: "250px",
|
|
2793
2837
|
children: [
|
|
2794
|
-
/* @__PURE__ */
|
|
2838
|
+
/* @__PURE__ */ jsx52(Flex17, {
|
|
2795
2839
|
flexShrink: "0",
|
|
2796
|
-
children: /* @__PURE__ */
|
|
2840
|
+
children: /* @__PURE__ */ jsx52(Spinner, {
|
|
2797
2841
|
loading: isOptimistic({
|
|
2798
2842
|
id: file.id
|
|
2799
2843
|
}),
|
|
2800
|
-
children: /* @__PURE__ */
|
|
2844
|
+
children: /* @__PURE__ */ jsx52(FileIcon3, {})
|
|
2801
2845
|
})
|
|
2802
2846
|
}),
|
|
2803
|
-
/* @__PURE__ */
|
|
2847
|
+
/* @__PURE__ */ jsx52(Text7, {
|
|
2804
2848
|
size: "2",
|
|
2805
2849
|
truncate: true,
|
|
2806
2850
|
wrap: "nowrap",
|
|
@@ -2808,9 +2852,9 @@ var Preview = function() {
|
|
|
2808
2852
|
})
|
|
2809
2853
|
]
|
|
2810
2854
|
}),
|
|
2811
|
-
/* @__PURE__ */
|
|
2855
|
+
/* @__PURE__ */ jsx52(Flex17, {
|
|
2812
2856
|
flexShrink: "0",
|
|
2813
|
-
children: /* @__PURE__ */
|
|
2857
|
+
children: /* @__PURE__ */ jsx52(IconButton3, {
|
|
2814
2858
|
onClick: function() {
|
|
2815
2859
|
return setFiles(function(prev) {
|
|
2816
2860
|
return prev.filter(function(prevFile) {
|
|
@@ -2821,7 +2865,7 @@ var Preview = function() {
|
|
|
2821
2865
|
color: "gray",
|
|
2822
2866
|
variant: "ghost",
|
|
2823
2867
|
size: "1",
|
|
2824
|
-
children: /* @__PURE__ */
|
|
2868
|
+
children: /* @__PURE__ */ jsx52(Cross2Icon, {})
|
|
2825
2869
|
})
|
|
2826
2870
|
})
|
|
2827
2871
|
]
|
|
@@ -2946,7 +2990,7 @@ var useCreateFile = function() {
|
|
|
2946
2990
|
});
|
|
2947
2991
|
};
|
|
2948
2992
|
// src/components/threads/Thread/MessageForm/Field/Files/Control.tsx
|
|
2949
|
-
import { jsx as
|
|
2993
|
+
import { jsx as jsx53, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
2950
2994
|
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";
|
|
2951
2995
|
var Control2 = function() {
|
|
2952
2996
|
var _useMessageFormContext = useMessageFormContext(), isDisabled = _useMessageFormContext.isDisabled, isLoading = _useMessageFormContext.isLoading, setFiles = _useMessageFormContext.setFiles;
|
|
@@ -3120,7 +3164,7 @@ var Control2 = function() {
|
|
|
3120
3164
|
createFile,
|
|
3121
3165
|
setFiles
|
|
3122
3166
|
]);
|
|
3123
|
-
return /* @__PURE__ */
|
|
3167
|
+
return /* @__PURE__ */ jsx53(Flex18, {
|
|
3124
3168
|
pt: "2",
|
|
3125
3169
|
pr: "2",
|
|
3126
3170
|
flexGrow: "0",
|
|
@@ -3134,8 +3178,8 @@ var Control2 = function() {
|
|
|
3134
3178
|
overflow: "hidden"
|
|
3135
3179
|
},
|
|
3136
3180
|
children: [
|
|
3137
|
-
/* @__PURE__ */
|
|
3138
|
-
/* @__PURE__ */
|
|
3181
|
+
/* @__PURE__ */ jsx53(FilePlusIcon, {}),
|
|
3182
|
+
/* @__PURE__ */ jsx53("input", {
|
|
3139
3183
|
type: "file",
|
|
3140
3184
|
multiple: true,
|
|
3141
3185
|
accept: accept,
|
|
@@ -3160,20 +3204,20 @@ var Files = {
|
|
|
3160
3204
|
Control: Control2
|
|
3161
3205
|
};
|
|
3162
3206
|
// src/components/threads/Thread/MessageForm/Field/index.tsx
|
|
3163
|
-
import { jsx as
|
|
3207
|
+
import { jsx as jsx54 } from "react/jsx-runtime";
|
|
3164
3208
|
var Root6 = function(param) {
|
|
3165
3209
|
var children = param.children;
|
|
3166
3210
|
var _useFormContext2 = useFormContext2(), errors = _useFormContext2.formState.errors;
|
|
3167
|
-
return /* @__PURE__ */
|
|
3211
|
+
return /* @__PURE__ */ jsx54(RadixContainer, {
|
|
3168
3212
|
size: "2",
|
|
3169
3213
|
flexGrow: "0",
|
|
3170
|
-
children: /* @__PURE__ */
|
|
3214
|
+
children: /* @__PURE__ */ jsx54(Flex19, {
|
|
3171
3215
|
direction: "column",
|
|
3172
3216
|
flexShrink: "0",
|
|
3173
|
-
children: /* @__PURE__ */
|
|
3217
|
+
children: /* @__PURE__ */ jsx54(Flex19, {
|
|
3174
3218
|
direction: "column",
|
|
3175
3219
|
flexShrink: "0",
|
|
3176
|
-
children: /* @__PURE__ */
|
|
3220
|
+
children: /* @__PURE__ */ jsx54(Flex19, {
|
|
3177
3221
|
style: _object_spread({
|
|
3178
3222
|
borderRadius: "var(--radius-2)",
|
|
3179
3223
|
borderWidth: "1px",
|
|
@@ -3197,13 +3241,13 @@ var Field = {
|
|
|
3197
3241
|
Files: Files
|
|
3198
3242
|
};
|
|
3199
3243
|
// src/components/threads/Thread/MessageForm/index.tsx
|
|
3200
|
-
import { jsx as
|
|
3244
|
+
import { jsx as jsx55, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
3201
3245
|
var MessageForm = function() {
|
|
3202
|
-
return /* @__PURE__ */
|
|
3246
|
+
return /* @__PURE__ */ jsx55(Root4, {
|
|
3203
3247
|
children: /* @__PURE__ */ jsxs19(Field.Root, {
|
|
3204
3248
|
children: [
|
|
3205
|
-
/* @__PURE__ */
|
|
3206
|
-
/* @__PURE__ */
|
|
3249
|
+
/* @__PURE__ */ jsx55(Field.Control, {}),
|
|
3250
|
+
/* @__PURE__ */ jsx55(Submit, {})
|
|
3207
3251
|
]
|
|
3208
3252
|
})
|
|
3209
3253
|
});
|
|
@@ -3216,13 +3260,13 @@ import { Flex as Flex20 } from "@radix-ui/themes";
|
|
|
3216
3260
|
// src/components/threads/Thread/Provider/index.tsx
|
|
3217
3261
|
var Provider2 = SuperinterfaceProvider;
|
|
3218
3262
|
// src/components/threads/Thread/Root/index.tsx
|
|
3219
|
-
import { jsx as
|
|
3263
|
+
import { jsx as jsx56 } from "react/jsx-runtime";
|
|
3220
3264
|
var Root7 = function(_param) {
|
|
3221
3265
|
var children = _param.children, rest = _object_without_properties(_param, [
|
|
3222
3266
|
"children"
|
|
3223
3267
|
]);
|
|
3224
|
-
return /* @__PURE__ */
|
|
3225
|
-
children: /* @__PURE__ */
|
|
3268
|
+
return /* @__PURE__ */ jsx56(Provider2, _object_spread_props(_object_spread({}, rest), {
|
|
3269
|
+
children: /* @__PURE__ */ jsx56(Flex20, {
|
|
3226
3270
|
direction: "column",
|
|
3227
3271
|
flexGrow: "1",
|
|
3228
3272
|
children: children
|
|
@@ -3230,12 +3274,12 @@ var Root7 = function(_param) {
|
|
|
3230
3274
|
}));
|
|
3231
3275
|
};
|
|
3232
3276
|
// src/components/threads/Thread/index.tsx
|
|
3233
|
-
import { jsx as
|
|
3277
|
+
import { jsx as jsx57, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
3234
3278
|
var Thread = function(props) {
|
|
3235
3279
|
return /* @__PURE__ */ jsxs20(Root7, _object_spread_props(_object_spread({}, props), {
|
|
3236
3280
|
children: [
|
|
3237
|
-
/* @__PURE__ */
|
|
3238
|
-
/* @__PURE__ */
|
|
3281
|
+
/* @__PURE__ */ jsx57(Messages, {}),
|
|
3282
|
+
/* @__PURE__ */ jsx57(MessageForm, {})
|
|
3239
3283
|
]
|
|
3240
3284
|
}));
|
|
3241
3285
|
};
|
|
@@ -3359,12 +3403,12 @@ var useThreadDialogContext = function() {
|
|
|
3359
3403
|
return useContext13(ThreadDialogContext);
|
|
3360
3404
|
};
|
|
3361
3405
|
// src/components/threads/ThreadDialog/Provider/index.tsx
|
|
3362
|
-
import { jsx as
|
|
3406
|
+
import { jsx as jsx58 } from "react/jsx-runtime";
|
|
3363
3407
|
var Provider3 = function(param) {
|
|
3364
3408
|
var children = param.children;
|
|
3365
3409
|
var threadDialogContext = useThreadDialogContext();
|
|
3366
3410
|
var _useState2 = _sliced_to_array(useState2(threadDialogContext.isOpen), 2), isOpen = _useState2[0], setIsOpen = _useState2[1];
|
|
3367
|
-
return /* @__PURE__ */
|
|
3411
|
+
return /* @__PURE__ */ jsx58(ThreadDialogContext.Provider, {
|
|
3368
3412
|
value: {
|
|
3369
3413
|
isOpen: isOpen,
|
|
3370
3414
|
setIsOpen: setIsOpen
|
|
@@ -3379,25 +3423,25 @@ import * as Toast2 from "@radix-ui/react-toast";
|
|
|
3379
3423
|
import * as Toast from "@radix-ui/react-toast";
|
|
3380
3424
|
import { Card as Card3, Text as Text8, Flex as Flex21 } from "@radix-ui/themes";
|
|
3381
3425
|
import { CheckCircledIcon as CheckCircledIcon2, CrossCircledIcon } from "@radix-ui/react-icons";
|
|
3382
|
-
import { jsx as
|
|
3426
|
+
import { jsx as jsx59, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
3383
3427
|
var CustomToast = function(param) {
|
|
3384
3428
|
var toast = param.toast;
|
|
3385
|
-
return /* @__PURE__ */
|
|
3386
|
-
children: /* @__PURE__ */
|
|
3387
|
-
children: /* @__PURE__ */
|
|
3429
|
+
return /* @__PURE__ */ jsx59(Toast.Root, {
|
|
3430
|
+
children: /* @__PURE__ */ jsx59(Card3, {
|
|
3431
|
+
children: /* @__PURE__ */ jsx59(Toast.Title, {
|
|
3388
3432
|
children: /* @__PURE__ */ jsxs21(Flex21, {
|
|
3389
3433
|
children: [
|
|
3390
|
-
/* @__PURE__ */
|
|
3434
|
+
/* @__PURE__ */ jsx59(Flex21, {
|
|
3391
3435
|
pr: "2",
|
|
3392
3436
|
height: "14px",
|
|
3393
3437
|
align: "center",
|
|
3394
|
-
children: toast.type === "success" ? /* @__PURE__ */
|
|
3438
|
+
children: toast.type === "success" ? /* @__PURE__ */ jsx59(CheckCircledIcon2, {
|
|
3395
3439
|
color: "var(--accent-9)"
|
|
3396
|
-
}) : /* @__PURE__ */
|
|
3440
|
+
}) : /* @__PURE__ */ jsx59(CrossCircledIcon, {
|
|
3397
3441
|
color: "var(--red-9)"
|
|
3398
3442
|
})
|
|
3399
3443
|
}),
|
|
3400
|
-
/* @__PURE__ */
|
|
3444
|
+
/* @__PURE__ */ jsx59(Text8, {
|
|
3401
3445
|
weight: "medium",
|
|
3402
3446
|
size: "1",
|
|
3403
3447
|
children: toast.message
|
|
@@ -3409,7 +3453,7 @@ var CustomToast = function(param) {
|
|
|
3409
3453
|
});
|
|
3410
3454
|
};
|
|
3411
3455
|
// src/components/toasts/ToastsProvider/index.tsx
|
|
3412
|
-
import { jsx as
|
|
3456
|
+
import { jsx as jsx60, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
3413
3457
|
var ToastsProvider = function(param) {
|
|
3414
3458
|
var children = param.children;
|
|
3415
3459
|
var _useState3 = _sliced_to_array(useState3([]), 2), toasts = _useState3[0], setToasts = _useState3[1];
|
|
@@ -3420,7 +3464,7 @@ var ToastsProvider = function(param) {
|
|
|
3420
3464
|
]);
|
|
3421
3465
|
});
|
|
3422
3466
|
}, []);
|
|
3423
|
-
return /* @__PURE__ */
|
|
3467
|
+
return /* @__PURE__ */ jsx60(ToastsContext.Provider, {
|
|
3424
3468
|
value: {
|
|
3425
3469
|
toasts: toasts,
|
|
3426
3470
|
addToast: addToast
|
|
@@ -3429,11 +3473,11 @@ var ToastsProvider = function(param) {
|
|
|
3429
3473
|
children: [
|
|
3430
3474
|
children,
|
|
3431
3475
|
Array.from(toasts).map(function(toast, index) {
|
|
3432
|
-
return /* @__PURE__ */
|
|
3476
|
+
return /* @__PURE__ */ jsx60(CustomToast, {
|
|
3433
3477
|
toast: toast
|
|
3434
3478
|
}, index);
|
|
3435
3479
|
}),
|
|
3436
|
-
/* @__PURE__ */
|
|
3480
|
+
/* @__PURE__ */ jsx60(Toast2.Viewport, {
|
|
3437
3481
|
style: {
|
|
3438
3482
|
position: "absolute",
|
|
3439
3483
|
bottom: 0,
|
|
@@ -3455,11 +3499,11 @@ var ToastsProvider = function(param) {
|
|
|
3455
3499
|
});
|
|
3456
3500
|
};
|
|
3457
3501
|
// src/components/threads/ThreadDialog/Root/index.tsx
|
|
3458
|
-
import { jsx as
|
|
3502
|
+
import { jsx as jsx61 } from "react/jsx-runtime";
|
|
3459
3503
|
var Root9 = function(param) {
|
|
3460
3504
|
var children = param.children;
|
|
3461
|
-
return /* @__PURE__ */
|
|
3462
|
-
children: /* @__PURE__ */
|
|
3505
|
+
return /* @__PURE__ */ jsx61(ToastsProvider, {
|
|
3506
|
+
children: /* @__PURE__ */ jsx61(Provider3, {
|
|
3463
3507
|
children: children
|
|
3464
3508
|
})
|
|
3465
3509
|
});
|
|
@@ -3469,20 +3513,20 @@ import { Flex as Flex22 } from "@radix-ui/themes";
|
|
|
3469
3513
|
// src/components/threads/ThreadDialog/Trigger/Button.tsx
|
|
3470
3514
|
import { IconButton as IconButton5 } from "@radix-ui/themes";
|
|
3471
3515
|
import { ChatBubbleIcon } from "@radix-ui/react-icons";
|
|
3472
|
-
import { jsx as
|
|
3516
|
+
import { jsx as jsx62 } from "react/jsx-runtime";
|
|
3473
3517
|
var Button3 = function() {
|
|
3474
|
-
return /* @__PURE__ */
|
|
3518
|
+
return /* @__PURE__ */ jsx62(IconButton5, {
|
|
3475
3519
|
size: "4",
|
|
3476
3520
|
radius: "full",
|
|
3477
|
-
children: /* @__PURE__ */
|
|
3521
|
+
children: /* @__PURE__ */ jsx62(ChatBubbleIcon, {})
|
|
3478
3522
|
});
|
|
3479
3523
|
};
|
|
3480
3524
|
// src/components/threads/ThreadDialog/Trigger/index.tsx
|
|
3481
|
-
import { jsx as
|
|
3525
|
+
import { jsx as jsx63 } from "react/jsx-runtime";
|
|
3482
3526
|
var Root10 = function(param) {
|
|
3483
3527
|
var children = param.children, _param_style = param.style, style = _param_style === void 0 ? {} : _param_style;
|
|
3484
3528
|
var _useThreadDialogContext = useThreadDialogContext(), setIsOpen = _useThreadDialogContext.setIsOpen, isOpen = _useThreadDialogContext.isOpen;
|
|
3485
|
-
return /* @__PURE__ */
|
|
3529
|
+
return /* @__PURE__ */ jsx63(Flex22, {
|
|
3486
3530
|
display: {
|
|
3487
3531
|
initial: isOpen ? "none" : "flex",
|
|
3488
3532
|
sm: "flex"
|
|
@@ -3506,8 +3550,8 @@ var Root10 = function(param) {
|
|
|
3506
3550
|
});
|
|
3507
3551
|
};
|
|
3508
3552
|
var Trigger = function(args) {
|
|
3509
|
-
return /* @__PURE__ */
|
|
3510
|
-
children: /* @__PURE__ */
|
|
3553
|
+
return /* @__PURE__ */ jsx63(Root10, _object_spread_props(_object_spread({}, args), {
|
|
3554
|
+
children: /* @__PURE__ */ jsx63(Button3, {})
|
|
3511
3555
|
}));
|
|
3512
3556
|
};
|
|
3513
3557
|
Trigger.Root = Root10;
|
|
@@ -3517,10 +3561,10 @@ import { Card as Card4, Inset, Flex as Flex24 } from "@radix-ui/themes";
|
|
|
3517
3561
|
// src/components/threads/ThreadDialog/Close/index.tsx
|
|
3518
3562
|
import { Cross1Icon } from "@radix-ui/react-icons";
|
|
3519
3563
|
import { IconButton as IconButton6, Flex as Flex23 } from "@radix-ui/themes";
|
|
3520
|
-
import { jsx as
|
|
3564
|
+
import { jsx as jsx64 } from "react/jsx-runtime";
|
|
3521
3565
|
var Close = function() {
|
|
3522
3566
|
var _useThreadDialogContext = useThreadDialogContext(), setIsOpen = _useThreadDialogContext.setIsOpen, isOpen = _useThreadDialogContext.isOpen;
|
|
3523
|
-
return /* @__PURE__ */
|
|
3567
|
+
return /* @__PURE__ */ jsx64(Flex23, {
|
|
3524
3568
|
display: {
|
|
3525
3569
|
initial: isOpen ? "flex" : "none",
|
|
3526
3570
|
sm: "none"
|
|
@@ -3540,20 +3584,20 @@ var Close = function() {
|
|
|
3540
3584
|
style: {
|
|
3541
3585
|
zIndex: 9999999999
|
|
3542
3586
|
},
|
|
3543
|
-
children: /* @__PURE__ */
|
|
3587
|
+
children: /* @__PURE__ */ jsx64(IconButton6, {
|
|
3544
3588
|
size: "2",
|
|
3545
3589
|
variant: "soft",
|
|
3546
|
-
children: /* @__PURE__ */
|
|
3590
|
+
children: /* @__PURE__ */ jsx64(Cross1Icon, {})
|
|
3547
3591
|
})
|
|
3548
3592
|
});
|
|
3549
3593
|
};
|
|
3550
3594
|
// src/components/threads/ThreadDialog/Content/index.tsx
|
|
3551
|
-
import { jsx as
|
|
3595
|
+
import { jsx as jsx65, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
3552
3596
|
var Root11 = function(param) {
|
|
3553
3597
|
var children = param.children, _param_style = param.style, style = _param_style === void 0 ? {} : _param_style;
|
|
3554
3598
|
var isOpen = useThreadDialogContext().isOpen;
|
|
3555
3599
|
if (!isOpen) return null;
|
|
3556
|
-
return /* @__PURE__ */
|
|
3600
|
+
return /* @__PURE__ */ jsx65(Flex24, {
|
|
3557
3601
|
direction: "column",
|
|
3558
3602
|
justify: "end",
|
|
3559
3603
|
position: "fixed",
|
|
@@ -3592,7 +3636,7 @@ var Root11 = function(param) {
|
|
|
3592
3636
|
flexGrow: 1
|
|
3593
3637
|
},
|
|
3594
3638
|
children: [
|
|
3595
|
-
/* @__PURE__ */
|
|
3639
|
+
/* @__PURE__ */ jsx65(Inset, {
|
|
3596
3640
|
clip: "padding-box",
|
|
3597
3641
|
side: "all",
|
|
3598
3642
|
pb: "current",
|
|
@@ -3602,13 +3646,13 @@ var Root11 = function(param) {
|
|
|
3602
3646
|
},
|
|
3603
3647
|
children: children
|
|
3604
3648
|
}),
|
|
3605
|
-
/* @__PURE__ */
|
|
3649
|
+
/* @__PURE__ */ jsx65(Close, {})
|
|
3606
3650
|
]
|
|
3607
3651
|
})
|
|
3608
3652
|
});
|
|
3609
3653
|
};
|
|
3610
3654
|
var Messages2 = function() {
|
|
3611
|
-
return /* @__PURE__ */
|
|
3655
|
+
return /* @__PURE__ */ jsx65(Thread.Messages, {
|
|
3612
3656
|
style: {
|
|
3613
3657
|
paddingTop: "var(--space-5)",
|
|
3614
3658
|
paddingRight: "var(--space-5)",
|
|
@@ -3618,7 +3662,7 @@ var Messages2 = function() {
|
|
|
3618
3662
|
};
|
|
3619
3663
|
var FormContainer = function(param) {
|
|
3620
3664
|
var children = param.children;
|
|
3621
|
-
return /* @__PURE__ */
|
|
3665
|
+
return /* @__PURE__ */ jsx65(Flex24, {
|
|
3622
3666
|
direction: "column",
|
|
3623
3667
|
pl: "5",
|
|
3624
3668
|
pr: "5",
|
|
@@ -3629,13 +3673,13 @@ var FormContainer = function(param) {
|
|
|
3629
3673
|
};
|
|
3630
3674
|
var Content4 = function(param) {
|
|
3631
3675
|
var _param_style = param.style, style = _param_style === void 0 ? {} : _param_style;
|
|
3632
|
-
return /* @__PURE__ */
|
|
3676
|
+
return /* @__PURE__ */ jsx65(Root11, {
|
|
3633
3677
|
style: style,
|
|
3634
3678
|
children: /* @__PURE__ */ jsxs23(Thread.Root, {
|
|
3635
3679
|
children: [
|
|
3636
|
-
/* @__PURE__ */
|
|
3637
|
-
/* @__PURE__ */
|
|
3638
|
-
children: /* @__PURE__ */
|
|
3680
|
+
/* @__PURE__ */ jsx65(Messages2, {}),
|
|
3681
|
+
/* @__PURE__ */ jsx65(FormContainer, {
|
|
3682
|
+
children: /* @__PURE__ */ jsx65(Thread.MessageForm, {})
|
|
3639
3683
|
})
|
|
3640
3684
|
]
|
|
3641
3685
|
})
|
|
@@ -3645,12 +3689,12 @@ Content4.Root = Root11;
|
|
|
3645
3689
|
Content4.Messages = Messages2;
|
|
3646
3690
|
Content4.FormContainer = FormContainer;
|
|
3647
3691
|
// src/components/threads/ThreadDialog/index.tsx
|
|
3648
|
-
import { jsx as
|
|
3692
|
+
import { jsx as jsx66, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
3649
3693
|
var ThreadDialog = function() {
|
|
3650
3694
|
return /* @__PURE__ */ jsxs24(Root9, {
|
|
3651
3695
|
children: [
|
|
3652
|
-
/* @__PURE__ */
|
|
3653
|
-
/* @__PURE__ */
|
|
3696
|
+
/* @__PURE__ */ jsx66(Content4, {}),
|
|
3697
|
+
/* @__PURE__ */ jsx66(Trigger, {})
|
|
3654
3698
|
]
|
|
3655
3699
|
});
|
|
3656
3700
|
};
|
|
@@ -4166,7 +4210,7 @@ var useMessageAudio = function(param) {
|
|
|
4166
4210
|
});
|
|
4167
4211
|
};
|
|
4168
4212
|
// src/components/threads/AudioThread/Root/index.tsx
|
|
4169
|
-
import { jsx as
|
|
4213
|
+
import { jsx as jsx67 } from "react/jsx-runtime";
|
|
4170
4214
|
var Root12 = function(param) {
|
|
4171
4215
|
var children = param.children;
|
|
4172
4216
|
var createMessageProps = useCreateMessage();
|
|
@@ -4224,13 +4268,13 @@ var Root12 = function(param) {
|
|
|
4224
4268
|
createMessageProps: createMessageProps,
|
|
4225
4269
|
messageAudioProps: messageAudioProps
|
|
4226
4270
|
}).status;
|
|
4227
|
-
return /* @__PURE__ */
|
|
4271
|
+
return /* @__PURE__ */ jsx67(AudioThreadContext.Provider, {
|
|
4228
4272
|
value: {
|
|
4229
4273
|
status: status,
|
|
4230
4274
|
recorderProps: recorderProps,
|
|
4231
4275
|
messageAudioProps: messageAudioProps
|
|
4232
4276
|
},
|
|
4233
|
-
children: /* @__PURE__ */
|
|
4277
|
+
children: /* @__PURE__ */ jsx67(Flex25, {
|
|
4234
4278
|
direction: "column",
|
|
4235
4279
|
flexGrow: "1",
|
|
4236
4280
|
p: "9",
|
|
@@ -4252,7 +4296,7 @@ import _8 from "lodash";
|
|
|
4252
4296
|
import { Flex as Flex26, Grid } from "@radix-ui/themes";
|
|
4253
4297
|
import { useState as useState7, useEffect as useEffect9, useCallback as useCallback5 } from "react";
|
|
4254
4298
|
import { cluster } from "radash";
|
|
4255
|
-
import { jsx as
|
|
4299
|
+
import { jsx as jsx68 } from "react/jsx-runtime";
|
|
4256
4300
|
var barCount = 4;
|
|
4257
4301
|
var BarsVisualizer = function(param) {
|
|
4258
4302
|
var visualizationAnalyser = param.visualizationAnalyser, backgroundColor = param.backgroundColor, height = param.height, barWidth = param.barWidth;
|
|
@@ -4283,7 +4327,7 @@ var BarsVisualizer = function(param) {
|
|
|
4283
4327
|
draw,
|
|
4284
4328
|
visualizationAnalyser
|
|
4285
4329
|
]);
|
|
4286
|
-
return /* @__PURE__ */
|
|
4330
|
+
return /* @__PURE__ */ jsx68(Grid, {
|
|
4287
4331
|
columns: "".concat(barCount),
|
|
4288
4332
|
gap: "1",
|
|
4289
4333
|
width: "auto",
|
|
@@ -4292,12 +4336,12 @@ var BarsVisualizer = function(param) {
|
|
|
4292
4336
|
gridTemplateColumns: "repeat(4, minmax(0, 1fr))"
|
|
4293
4337
|
},
|
|
4294
4338
|
children: barHeights.map(function(barHeight, index) {
|
|
4295
|
-
return /* @__PURE__ */
|
|
4339
|
+
return /* @__PURE__ */ jsx68(Flex26, {
|
|
4296
4340
|
direction: "column",
|
|
4297
4341
|
align: "center",
|
|
4298
4342
|
justify: "center",
|
|
4299
4343
|
height: height,
|
|
4300
|
-
children: /* @__PURE__ */
|
|
4344
|
+
children: /* @__PURE__ */ jsx68(Flex26, {
|
|
4301
4345
|
minHeight: "50%",
|
|
4302
4346
|
maxHeight: "100%",
|
|
4303
4347
|
height: "".concat(barHeight + 20, "%"),
|
|
@@ -4312,7 +4356,7 @@ var BarsVisualizer = function(param) {
|
|
|
4312
4356
|
});
|
|
4313
4357
|
};
|
|
4314
4358
|
// src/components/threads/AudioThread/Visualization/index.tsx
|
|
4315
|
-
import { jsx as
|
|
4359
|
+
import { jsx as jsx69, jsxs as jsxs25 } from "react/jsx-runtime";
|
|
4316
4360
|
var Visualization = function() {
|
|
4317
4361
|
var audioThreadContext = useAudioThreadContext();
|
|
4318
4362
|
var assistantNameContext = useContext15(AssistantNameContext);
|
|
@@ -4347,7 +4391,7 @@ var Visualization = function() {
|
|
|
4347
4391
|
mb: "3",
|
|
4348
4392
|
flexGrow: "1",
|
|
4349
4393
|
children: [
|
|
4350
|
-
/* @__PURE__ */
|
|
4394
|
+
/* @__PURE__ */ jsx69(Flex27, {
|
|
4351
4395
|
align: "center",
|
|
4352
4396
|
justify: "center",
|
|
4353
4397
|
height: "200px",
|
|
@@ -4357,7 +4401,7 @@ var Visualization = function() {
|
|
|
4357
4401
|
borderRadius: "9999px",
|
|
4358
4402
|
scale: scale
|
|
4359
4403
|
},
|
|
4360
|
-
children: /* @__PURE__ */
|
|
4404
|
+
children: /* @__PURE__ */ jsx69(BarsVisualizer, {
|
|
4361
4405
|
visualizationAnalyser: audioThreadContext.messageAudioProps.visualizationAnalyser,
|
|
4362
4406
|
backgroundColor: audioThreadContext.status === "playing" ? "var(--accent-11)" : "var(--gray-11)",
|
|
4363
4407
|
height: "40px",
|
|
@@ -4369,8 +4413,8 @@ var Visualization = function() {
|
|
|
4369
4413
|
gap: "3",
|
|
4370
4414
|
pt: "5",
|
|
4371
4415
|
children: [
|
|
4372
|
-
/* @__PURE__ */
|
|
4373
|
-
/* @__PURE__ */
|
|
4416
|
+
/* @__PURE__ */ jsx69(AssistantAvatar, {}),
|
|
4417
|
+
/* @__PURE__ */ jsx69(Name, {
|
|
4374
4418
|
children: assistantNameContext
|
|
4375
4419
|
})
|
|
4376
4420
|
]
|
|
@@ -4380,7 +4424,7 @@ var Visualization = function() {
|
|
|
4380
4424
|
};
|
|
4381
4425
|
// src/components/threads/AudioThread/Status/StatusMessages.tsx
|
|
4382
4426
|
import { Flex as Flex28, Text as Text9 } from "@radix-ui/themes";
|
|
4383
|
-
import { jsx as
|
|
4427
|
+
import { jsx as jsx70, jsxs as jsxs26 } from "react/jsx-runtime";
|
|
4384
4428
|
var html = function(param) {
|
|
4385
4429
|
var texts = param.texts;
|
|
4386
4430
|
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) {
|
|
@@ -4393,13 +4437,13 @@ var StatusMessages = function(param) {
|
|
|
4393
4437
|
justify: "center",
|
|
4394
4438
|
pb: "5",
|
|
4395
4439
|
children: [
|
|
4396
|
-
/* @__PURE__ */
|
|
4440
|
+
/* @__PURE__ */ jsx70(Text9, {
|
|
4397
4441
|
size: "2",
|
|
4398
4442
|
weight: "regular",
|
|
4399
4443
|
color: "gray",
|
|
4400
4444
|
className: "status-messages-texts"
|
|
4401
4445
|
}),
|
|
4402
|
-
/* @__PURE__ */
|
|
4446
|
+
/* @__PURE__ */ jsx70("style", {
|
|
4403
4447
|
dangerouslySetInnerHTML: {
|
|
4404
4448
|
__html: html({
|
|
4405
4449
|
texts: texts
|
|
@@ -4410,11 +4454,11 @@ var StatusMessages = function(param) {
|
|
|
4410
4454
|
});
|
|
4411
4455
|
};
|
|
4412
4456
|
// src/components/threads/AudioThread/Status/index.tsx
|
|
4413
|
-
import { jsx as
|
|
4457
|
+
import { jsx as jsx71 } from "react/jsx-runtime";
|
|
4414
4458
|
var Status = function() {
|
|
4415
4459
|
var audioThreadContext = useAudioThreadContext();
|
|
4416
4460
|
if (audioThreadContext.status === "recording") {
|
|
4417
|
-
return /* @__PURE__ */
|
|
4461
|
+
return /* @__PURE__ */ jsx71(StatusMessages, {
|
|
4418
4462
|
texts: [
|
|
4419
4463
|
"Start speaking",
|
|
4420
4464
|
"Listening",
|
|
@@ -4428,20 +4472,20 @@ var Status = function() {
|
|
|
4428
4472
|
"idle",
|
|
4429
4473
|
"playerPaused"
|
|
4430
4474
|
].includes(audioThreadContext.status)) {
|
|
4431
|
-
return /* @__PURE__ */
|
|
4475
|
+
return /* @__PURE__ */ jsx71(StatusMessages, {
|
|
4432
4476
|
texts: [
|
|
4433
4477
|
"Click the button below to activate"
|
|
4434
4478
|
]
|
|
4435
4479
|
});
|
|
4436
4480
|
}
|
|
4437
4481
|
if (audioThreadContext.status === "playing") {
|
|
4438
|
-
return /* @__PURE__ */
|
|
4482
|
+
return /* @__PURE__ */ jsx71(StatusMessages, {
|
|
4439
4483
|
texts: [
|
|
4440
4484
|
"Click the button below to interrupt"
|
|
4441
4485
|
]
|
|
4442
4486
|
});
|
|
4443
4487
|
}
|
|
4444
|
-
return /* @__PURE__ */
|
|
4488
|
+
return /* @__PURE__ */ jsx71(StatusMessages, {
|
|
4445
4489
|
texts: [
|
|
4446
4490
|
"Thinking"
|
|
4447
4491
|
]
|
|
@@ -4450,9 +4494,9 @@ var Status = function() {
|
|
|
4450
4494
|
// src/components/threads/AudioThread/Form/index.tsx
|
|
4451
4495
|
import { Flex as Flex30 } from "@radix-ui/themes";
|
|
4452
4496
|
// src/components/threads/AudioThread/Form/MicIcon.tsx
|
|
4453
|
-
import { jsx as
|
|
4497
|
+
import { jsx as jsx72 } from "react/jsx-runtime";
|
|
4454
4498
|
var MicIcon = function(props) {
|
|
4455
|
-
return /* @__PURE__ */
|
|
4499
|
+
return /* @__PURE__ */ jsx72("svg", _object_spread_props(_object_spread({
|
|
4456
4500
|
xmlns: "http://www.w3.org/2000/svg",
|
|
4457
4501
|
fill: "currentColor",
|
|
4458
4502
|
stroke: "currentColor",
|
|
@@ -4461,7 +4505,7 @@ var MicIcon = function(props) {
|
|
|
4461
4505
|
height: "15",
|
|
4462
4506
|
width: "15"
|
|
4463
4507
|
}, props), {
|
|
4464
|
-
children: /* @__PURE__ */
|
|
4508
|
+
children: /* @__PURE__ */ jsx72("path", {
|
|
4465
4509
|
stroke: "none",
|
|
4466
4510
|
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"
|
|
4467
4511
|
})
|
|
@@ -4470,7 +4514,7 @@ var MicIcon = function(props) {
|
|
|
4470
4514
|
// src/components/threads/AudioThread/Form/ActionButton/index.tsx
|
|
4471
4515
|
import { Flex as Flex29, IconButton as IconButton7 } from "@radix-ui/themes";
|
|
4472
4516
|
import { StopIcon as StopIcon2, PauseIcon, ArrowUpIcon as ArrowUpIcon2, ResumeIcon } from "@radix-ui/react-icons";
|
|
4473
|
-
import { jsx as
|
|
4517
|
+
import { jsx as jsx73, jsxs as jsxs27 } from "react/jsx-runtime";
|
|
4474
4518
|
var ActionButton = function() {
|
|
4475
4519
|
var audioThreadContext = useAudioThreadContext();
|
|
4476
4520
|
var superinterfaceContext = useSuperinterfaceContext();
|
|
@@ -4478,37 +4522,37 @@ var ActionButton = function() {
|
|
|
4478
4522
|
return /* @__PURE__ */ jsxs27(Flex29, {
|
|
4479
4523
|
align: "center",
|
|
4480
4524
|
children: [
|
|
4481
|
-
/* @__PURE__ */
|
|
4525
|
+
/* @__PURE__ */ jsx73(Flex29, {
|
|
4482
4526
|
mr: "3",
|
|
4483
4527
|
ml: "-7",
|
|
4484
|
-
children: /* @__PURE__ */
|
|
4528
|
+
children: /* @__PURE__ */ jsx73(IconButton7, {
|
|
4485
4529
|
onClick: audioThreadContext.recorderProps.pause,
|
|
4486
4530
|
color: "gray",
|
|
4487
4531
|
variant: "soft",
|
|
4488
4532
|
size: "1",
|
|
4489
|
-
children: /* @__PURE__ */
|
|
4533
|
+
children: /* @__PURE__ */ jsx73(PauseIcon, {})
|
|
4490
4534
|
})
|
|
4491
4535
|
}),
|
|
4492
|
-
/* @__PURE__ */
|
|
4536
|
+
/* @__PURE__ */ jsx73(IconButton7, {
|
|
4493
4537
|
onClick: audioThreadContext.recorderProps.stop,
|
|
4494
4538
|
highContrast: true,
|
|
4495
4539
|
variant: "soft",
|
|
4496
4540
|
size: "4",
|
|
4497
|
-
children: /* @__PURE__ */
|
|
4541
|
+
children: /* @__PURE__ */ jsx73(ArrowUpIcon2, {})
|
|
4498
4542
|
})
|
|
4499
4543
|
]
|
|
4500
4544
|
});
|
|
4501
4545
|
}
|
|
4502
4546
|
if (audioThreadContext.status === "recorderPaused") {
|
|
4503
|
-
return /* @__PURE__ */
|
|
4547
|
+
return /* @__PURE__ */ jsx73(IconButton7, {
|
|
4504
4548
|
onClick: audioThreadContext.recorderProps.resume,
|
|
4505
4549
|
color: "red",
|
|
4506
4550
|
size: "4",
|
|
4507
|
-
children: /* @__PURE__ */
|
|
4551
|
+
children: /* @__PURE__ */ jsx73(ResumeIcon, {})
|
|
4508
4552
|
});
|
|
4509
4553
|
}
|
|
4510
4554
|
if (audioThreadContext.status === "idle") {
|
|
4511
|
-
return /* @__PURE__ */
|
|
4555
|
+
return /* @__PURE__ */ jsx73(IconButton7, {
|
|
4512
4556
|
onClick: function() {
|
|
4513
4557
|
return audioThreadContext.recorderProps.start();
|
|
4514
4558
|
},
|
|
@@ -4517,7 +4561,7 @@ var ActionButton = function() {
|
|
|
4517
4561
|
});
|
|
4518
4562
|
}
|
|
4519
4563
|
if (audioThreadContext.status === "playing") {
|
|
4520
|
-
return /* @__PURE__ */
|
|
4564
|
+
return /* @__PURE__ */ jsx73(IconButton7, {
|
|
4521
4565
|
onClick: function() {
|
|
4522
4566
|
var _superinterfaceContext_createMessageAbortControllerRef_current;
|
|
4523
4567
|
audioThreadContext.messageAudioProps.stop();
|
|
@@ -4527,26 +4571,26 @@ var ActionButton = function() {
|
|
|
4527
4571
|
size: "4",
|
|
4528
4572
|
color: "gray",
|
|
4529
4573
|
variant: "soft",
|
|
4530
|
-
children: /* @__PURE__ */
|
|
4574
|
+
children: /* @__PURE__ */ jsx73(StopIcon2, {})
|
|
4531
4575
|
});
|
|
4532
4576
|
}
|
|
4533
4577
|
if (audioThreadContext.status === "playerPaused") {
|
|
4534
|
-
return /* @__PURE__ */
|
|
4578
|
+
return /* @__PURE__ */ jsx73(IconButton7, {
|
|
4535
4579
|
onClick: function() {
|
|
4536
4580
|
return audioThreadContext.messageAudioProps.play();
|
|
4537
4581
|
},
|
|
4538
4582
|
size: "4",
|
|
4539
|
-
children: /* @__PURE__ */
|
|
4583
|
+
children: /* @__PURE__ */ jsx73(ResumeIcon, {})
|
|
4540
4584
|
});
|
|
4541
4585
|
}
|
|
4542
|
-
return /* @__PURE__ */
|
|
4586
|
+
return /* @__PURE__ */ jsx73(IconButton7, {
|
|
4543
4587
|
size: "4",
|
|
4544
4588
|
variant: "soft",
|
|
4545
4589
|
disabled: true
|
|
4546
4590
|
});
|
|
4547
4591
|
};
|
|
4548
4592
|
// src/components/threads/AudioThread/Form/index.tsx
|
|
4549
|
-
import { jsx as
|
|
4593
|
+
import { jsx as jsx74, jsxs as jsxs28 } from "react/jsx-runtime";
|
|
4550
4594
|
var Form = function() {
|
|
4551
4595
|
var audioThreadContext = useAudioThreadContext();
|
|
4552
4596
|
return /* @__PURE__ */ jsxs28(Flex30, {
|
|
@@ -4557,24 +4601,24 @@ var Form = function() {
|
|
|
4557
4601
|
pb: "3",
|
|
4558
4602
|
align: "center",
|
|
4559
4603
|
children: [
|
|
4560
|
-
/* @__PURE__ */
|
|
4604
|
+
/* @__PURE__ */ jsx74(Flex30, {
|
|
4561
4605
|
ml: "-22.5px",
|
|
4562
4606
|
mr: "2",
|
|
4563
4607
|
align: "center",
|
|
4564
|
-
children: /* @__PURE__ */
|
|
4608
|
+
children: /* @__PURE__ */ jsx74(MicIcon, {
|
|
4565
4609
|
style: {
|
|
4566
4610
|
color: audioThreadContext.status === "recording" ? "var(--accent-11)" : "var(--gray-11)"
|
|
4567
4611
|
}
|
|
4568
4612
|
})
|
|
4569
4613
|
}),
|
|
4570
|
-
/* @__PURE__ */
|
|
4614
|
+
/* @__PURE__ */ jsx74(Flex30, {
|
|
4571
4615
|
px: "2",
|
|
4572
4616
|
py: "1",
|
|
4573
4617
|
style: {
|
|
4574
4618
|
backgroundColor: audioThreadContext.status === "recording" ? "var(--accent-4)" : "var(--gray-4)",
|
|
4575
4619
|
borderRadius: "var(--radius-6)"
|
|
4576
4620
|
},
|
|
4577
|
-
children: /* @__PURE__ */
|
|
4621
|
+
children: /* @__PURE__ */ jsx74(BarsVisualizer, {
|
|
4578
4622
|
visualizationAnalyser: audioThreadContext.recorderProps.visualizationAnalyser,
|
|
4579
4623
|
backgroundColor: audioThreadContext.status === "recording" ? "var(--accent-11)" : "var(--gray-11)",
|
|
4580
4624
|
height: "20px",
|
|
@@ -4583,18 +4627,18 @@ var Form = function() {
|
|
|
4583
4627
|
})
|
|
4584
4628
|
]
|
|
4585
4629
|
}),
|
|
4586
|
-
/* @__PURE__ */
|
|
4630
|
+
/* @__PURE__ */ jsx74(ActionButton, {})
|
|
4587
4631
|
]
|
|
4588
4632
|
});
|
|
4589
4633
|
};
|
|
4590
4634
|
// src/components/threads/AudioThread/index.tsx
|
|
4591
|
-
import { jsx as
|
|
4635
|
+
import { jsx as jsx75, jsxs as jsxs29 } from "react/jsx-runtime";
|
|
4592
4636
|
var AudioThread = function(props) {
|
|
4593
4637
|
return /* @__PURE__ */ jsxs29(Root12, _object_spread_props(_object_spread({}, props), {
|
|
4594
4638
|
children: [
|
|
4595
|
-
/* @__PURE__ */
|
|
4596
|
-
/* @__PURE__ */
|
|
4597
|
-
/* @__PURE__ */
|
|
4639
|
+
/* @__PURE__ */ jsx75(Visualization, {}),
|
|
4640
|
+
/* @__PURE__ */ jsx75(Status, {}),
|
|
4641
|
+
/* @__PURE__ */ jsx75(Form, {})
|
|
4598
4642
|
]
|
|
4599
4643
|
}));
|
|
4600
4644
|
};
|
|
@@ -4602,14 +4646,14 @@ AudioThread.Root = Root12;
|
|
|
4602
4646
|
AudioThread.Visualization = Visualization;
|
|
4603
4647
|
AudioThread.Form = Form;
|
|
4604
4648
|
// src/components/threads/AudioThreadDialog/index.tsx
|
|
4605
|
-
import { jsx as
|
|
4649
|
+
import { jsx as jsx76, jsxs as jsxs30 } from "react/jsx-runtime";
|
|
4606
4650
|
var AudioThreadDialog = function() {
|
|
4607
4651
|
return /* @__PURE__ */ jsxs30(Root9, {
|
|
4608
4652
|
children: [
|
|
4609
|
-
/* @__PURE__ */
|
|
4610
|
-
children: /* @__PURE__ */
|
|
4653
|
+
/* @__PURE__ */ jsx76(Content4.Root, {
|
|
4654
|
+
children: /* @__PURE__ */ jsx76(AudioThread, {})
|
|
4611
4655
|
}),
|
|
4612
|
-
/* @__PURE__ */
|
|
4656
|
+
/* @__PURE__ */ jsx76(Trigger, {})
|
|
4613
4657
|
]
|
|
4614
4658
|
});
|
|
4615
4659
|
};
|
|
@@ -4626,11 +4670,11 @@ import { Flex as Flex31 } from "@radix-ui/themes";
|
|
|
4626
4670
|
// src/components/suggestions/Suggestions/Item.tsx
|
|
4627
4671
|
import { ArrowUpIcon as ArrowUpIcon3 } from "@radix-ui/react-icons";
|
|
4628
4672
|
import { Text as Text10, Button as Button4, Spinner as Spinner2 } from "@radix-ui/themes";
|
|
4629
|
-
import { jsx as
|
|
4673
|
+
import { jsx as jsx77, jsxs as jsxs31 } from "react/jsx-runtime";
|
|
4630
4674
|
var Item = function(param) {
|
|
4631
4675
|
var suggestion = param.suggestion, isDisabled = param.isDisabled;
|
|
4632
4676
|
var _useCreateMessage = useCreateMessage(), createMessage = _useCreateMessage.createMessage, isPending = _useCreateMessage.isPending;
|
|
4633
|
-
return /* @__PURE__ */
|
|
4677
|
+
return /* @__PURE__ */ jsx77(Content5, {
|
|
4634
4678
|
onClick: function() {
|
|
4635
4679
|
createMessage({
|
|
4636
4680
|
// @ts-ignore-next-line
|
|
@@ -4654,14 +4698,14 @@ var Content5 = function(param) {
|
|
|
4654
4698
|
flexShrink: 1
|
|
4655
4699
|
},
|
|
4656
4700
|
children: [
|
|
4657
|
-
/* @__PURE__ */
|
|
4701
|
+
/* @__PURE__ */ jsx77(Text10, {
|
|
4658
4702
|
size: "1",
|
|
4659
4703
|
weight: "regular",
|
|
4660
4704
|
children: children
|
|
4661
4705
|
}),
|
|
4662
|
-
/* @__PURE__ */
|
|
4706
|
+
/* @__PURE__ */ jsx77(Spinner2, {
|
|
4663
4707
|
loading: isPending,
|
|
4664
|
-
children: /* @__PURE__ */
|
|
4708
|
+
children: /* @__PURE__ */ jsx77(ArrowUpIcon3, {
|
|
4665
4709
|
style: {
|
|
4666
4710
|
flexShrink: 0
|
|
4667
4711
|
}
|
|
@@ -4672,7 +4716,7 @@ var Content5 = function(param) {
|
|
|
4672
4716
|
};
|
|
4673
4717
|
Item.Content = Content5;
|
|
4674
4718
|
// src/components/suggestions/Suggestions/Content.tsx
|
|
4675
|
-
import { jsx as
|
|
4719
|
+
import { jsx as jsx78 } from "react/jsx-runtime";
|
|
4676
4720
|
var Content6 = function(param) {
|
|
4677
4721
|
var children = param.children;
|
|
4678
4722
|
var isMutatingMessage = useIsMutatingMessage();
|
|
@@ -4686,12 +4730,12 @@ var Content6 = function(param) {
|
|
|
4686
4730
|
children
|
|
4687
4731
|
]);
|
|
4688
4732
|
if (isEmpty3(suggestions)) return null;
|
|
4689
|
-
return /* @__PURE__ */
|
|
4733
|
+
return /* @__PURE__ */ jsx78(Flex31, {
|
|
4690
4734
|
gap: "2",
|
|
4691
4735
|
py: "2",
|
|
4692
4736
|
wrap: "wrap",
|
|
4693
4737
|
children: suggestions.map(function(suggestion) {
|
|
4694
|
-
return /* @__PURE__ */
|
|
4738
|
+
return /* @__PURE__ */ jsx78(Item, {
|
|
4695
4739
|
suggestion: suggestion,
|
|
4696
4740
|
isDisabled: isMutatingMessage
|
|
4697
4741
|
}, suggestion);
|
|
@@ -4699,7 +4743,7 @@ var Content6 = function(param) {
|
|
|
4699
4743
|
});
|
|
4700
4744
|
};
|
|
4701
4745
|
// src/components/suggestions/Suggestions/index.tsx
|
|
4702
|
-
import { jsx as
|
|
4746
|
+
import { jsx as jsx79 } from "react/jsx-runtime";
|
|
4703
4747
|
var Suggestions = function(param) {
|
|
4704
4748
|
var children = param.children;
|
|
4705
4749
|
var latestMessageProps = useLatestMessage();
|
|
@@ -4712,14 +4756,14 @@ var Suggestions = function(param) {
|
|
|
4712
4756
|
]);
|
|
4713
4757
|
if (latestMessageProps.isLoading) return null;
|
|
4714
4758
|
if (isDisabled) return null;
|
|
4715
|
-
return /* @__PURE__ */
|
|
4759
|
+
return /* @__PURE__ */ jsx79(Content6, {
|
|
4716
4760
|
children: children
|
|
4717
4761
|
});
|
|
4718
4762
|
};
|
|
4719
4763
|
Suggestions.Item = Item;
|
|
4720
4764
|
// src/components/markdown/MarkdownProvider/index.tsx
|
|
4721
4765
|
import { useMemo as useMemo16 } from "react";
|
|
4722
|
-
import { jsx as
|
|
4766
|
+
import { jsx as jsx80 } from "react/jsx-runtime";
|
|
4723
4767
|
var MarkdownProvider = function(_param) {
|
|
4724
4768
|
var children = _param.children, rest = _object_without_properties(_param, [
|
|
4725
4769
|
"children"
|
|
@@ -4731,7 +4775,7 @@ var MarkdownProvider = function(_param) {
|
|
|
4731
4775
|
rest,
|
|
4732
4776
|
prevMarkdownContext
|
|
4733
4777
|
]);
|
|
4734
|
-
return /* @__PURE__ */
|
|
4778
|
+
return /* @__PURE__ */ jsx80(MarkdownContext.Provider, {
|
|
4735
4779
|
value: value,
|
|
4736
4780
|
children: children
|
|
4737
4781
|
});
|
|
@@ -4790,11 +4834,11 @@ var optimizedSrc = function(param) {
|
|
|
4790
4834
|
}));
|
|
4791
4835
|
};
|
|
4792
4836
|
// src/components/imageAvatars/ImageAvatar/index.tsx
|
|
4793
|
-
import { jsx as
|
|
4837
|
+
import { jsx as jsx81 } from "react/jsx-runtime";
|
|
4794
4838
|
var ImageAvatar = function(param) {
|
|
4795
4839
|
var imageAvatar = param.imageAvatar, size = param.size;
|
|
4796
4840
|
var superinterfaceContext = useSuperinterfaceContext();
|
|
4797
|
-
return /* @__PURE__ */
|
|
4841
|
+
return /* @__PURE__ */ jsx81(Avatar4, {
|
|
4798
4842
|
fallback: "",
|
|
4799
4843
|
src: optimizedSrc({
|
|
4800
4844
|
imageAvatar: imageAvatar,
|
|
@@ -4812,7 +4856,7 @@ import { BackpackIcon, RocketIcon, MagicWandIcon, CubeIcon, TargetIcon, DiscIcon
|
|
|
4812
4856
|
var _obj;
|
|
4813
4857
|
var iconAvatarComponents = (_obj = {}, _define_property(_obj, "BACKPACK" /* BACKPACK */ , BackpackIcon), _define_property(_obj, "ROCKET" /* ROCKET */ , RocketIcon), _define_property(_obj, "MAGIC_WAND" /* MAGIC_WAND */ , MagicWandIcon), _define_property(_obj, "CUBE" /* CUBE */ , CubeIcon), _define_property(_obj, "TARGET" /* TARGET */ , TargetIcon), _define_property(_obj, "DISC" /* DISC */ , DiscIcon), _define_property(_obj, "GLOBE" /* GLOBE */ , GlobeIcon), _define_property(_obj, "STAR" /* STAR */ , StarIcon), _define_property(_obj, "LIGHTNING_BOLT" /* LIGHTNING_BOLT */ , LightningBoltIcon2), _define_property(_obj, "FACE" /* FACE */ , FaceIcon), _define_property(_obj, "PERSON" /* PERSON */ , PersonIcon2), _define_property(_obj, "HEART" /* HEART */ , HeartIcon), _obj);
|
|
4814
4858
|
// src/components/iconAvatars/IconAvatar.tsx
|
|
4815
|
-
import { jsx as
|
|
4859
|
+
import { jsx as jsx82 } from "react/jsx-runtime";
|
|
4816
4860
|
var IconAvatar = function(param) {
|
|
4817
4861
|
var iconAvatar = param.iconAvatar, size = param.size;
|
|
4818
4862
|
var Component = useMemo17(function() {
|
|
@@ -4820,30 +4864,30 @@ var IconAvatar = function(param) {
|
|
|
4820
4864
|
}, [
|
|
4821
4865
|
iconAvatar
|
|
4822
4866
|
]);
|
|
4823
|
-
return /* @__PURE__ */
|
|
4867
|
+
return /* @__PURE__ */ jsx82(Avatar5, {
|
|
4824
4868
|
size: size,
|
|
4825
|
-
fallback: Component ? /* @__PURE__ */
|
|
4869
|
+
fallback: Component ? /* @__PURE__ */ jsx82(Component, {}) : ""
|
|
4826
4870
|
});
|
|
4827
4871
|
};
|
|
4828
4872
|
// src/components/avatars/Avatar.tsx
|
|
4829
|
-
import { jsx as
|
|
4873
|
+
import { jsx as jsx83 } from "react/jsx-runtime";
|
|
4830
4874
|
var Avatar6 = function(param) {
|
|
4831
4875
|
var avatar = param.avatar, _param_size = param.size, size = _param_size === void 0 ? "1" : _param_size;
|
|
4832
4876
|
if (avatar) {
|
|
4833
4877
|
if (avatar.type === "IMAGE" /* IMAGE */ && avatar.imageAvatar) {
|
|
4834
|
-
return /* @__PURE__ */
|
|
4878
|
+
return /* @__PURE__ */ jsx83(ImageAvatar, {
|
|
4835
4879
|
imageAvatar: avatar.imageAvatar,
|
|
4836
4880
|
size: size
|
|
4837
4881
|
});
|
|
4838
4882
|
}
|
|
4839
4883
|
if (avatar.type === "ICON" /* ICON */ && avatar.iconAvatar) {
|
|
4840
|
-
return /* @__PURE__ */
|
|
4884
|
+
return /* @__PURE__ */ jsx83(IconAvatar, {
|
|
4841
4885
|
iconAvatar: avatar.iconAvatar,
|
|
4842
4886
|
size: size
|
|
4843
4887
|
});
|
|
4844
4888
|
}
|
|
4845
4889
|
}
|
|
4846
|
-
return /* @__PURE__ */
|
|
4890
|
+
return /* @__PURE__ */ jsx83(RadixAvatar, {
|
|
4847
4891
|
fallback: "",
|
|
4848
4892
|
size: size
|
|
4849
4893
|
});
|
|
@@ -4856,7 +4900,7 @@ var useComponents = function() {
|
|
|
4856
4900
|
return useContext16(ComponentsContext);
|
|
4857
4901
|
};
|
|
4858
4902
|
// src/components/components/ComponentsProvider.tsx
|
|
4859
|
-
import { jsx as
|
|
4903
|
+
import { jsx as jsx84 } from "react/jsx-runtime";
|
|
4860
4904
|
var ComponentsProvider = function(_param) {
|
|
4861
4905
|
var children = _param.children, rest = _object_without_properties(_param, [
|
|
4862
4906
|
"children"
|
|
@@ -4868,7 +4912,7 @@ var ComponentsProvider = function(_param) {
|
|
|
4868
4912
|
rest,
|
|
4869
4913
|
prevComponents
|
|
4870
4914
|
]);
|
|
4871
|
-
return /* @__PURE__ */
|
|
4915
|
+
return /* @__PURE__ */ jsx84(ComponentsContext.Provider, {
|
|
4872
4916
|
value: value,
|
|
4873
4917
|
children: children
|
|
4874
4918
|
});
|