@superinterface/react 2.16.5 → 2.17.1
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 +474 -296
- 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 +435 -257
- package/dist/index.js.map +1 -1
- package/package.json +5 -1
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
|
|
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
|
|
790
|
+
import { Flex as Flex12 } from "@radix-ui/themes";
|
|
791
791
|
// src/components/threads/Thread/Message/index.tsx
|
|
792
792
|
import { useMemo as useMemo5, Fragment } from "react";
|
|
793
793
|
import { isEmpty } from "radash";
|
|
@@ -1291,6 +1291,54 @@ var Img = function(props) {
|
|
|
1291
1291
|
}))
|
|
1292
1292
|
});
|
|
1293
1293
|
};
|
|
1294
|
+
// src/contexts/markdown/MarkdownContext/lib/components/Annotation/index.tsx
|
|
1295
|
+
import { QuoteIcon, FileIcon } from "@radix-ui/react-icons";
|
|
1296
|
+
// src/contexts/markdown/MarkdownContext/lib/components/Annotation/AnnotationBase.tsx
|
|
1297
|
+
import { IconButton, Popover as Popover3, Flex as Flex10, Text as Text5 } from "@radix-ui/themes";
|
|
1298
|
+
import { jsx as jsx34, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
1299
|
+
var AnnotationBase = function(param) {
|
|
1300
|
+
var icon = param.icon, content = param.content;
|
|
1301
|
+
return /* @__PURE__ */ jsxs9(Popover3.Root, {
|
|
1302
|
+
children: [
|
|
1303
|
+
/* @__PURE__ */ jsx34(Popover3.Trigger, {
|
|
1304
|
+
children: /* @__PURE__ */ jsx34(IconButton, {
|
|
1305
|
+
variant: "soft",
|
|
1306
|
+
color: "gray",
|
|
1307
|
+
size: "1",
|
|
1308
|
+
children: icon
|
|
1309
|
+
})
|
|
1310
|
+
}),
|
|
1311
|
+
/* @__PURE__ */ jsx34(Popover3.Content, {
|
|
1312
|
+
size: "1",
|
|
1313
|
+
children: /* @__PURE__ */ jsx34(Flex10, {
|
|
1314
|
+
direction: "column",
|
|
1315
|
+
children: /* @__PURE__ */ jsx34(Text5, {
|
|
1316
|
+
size: "1",
|
|
1317
|
+
color: "gray",
|
|
1318
|
+
children: content
|
|
1319
|
+
})
|
|
1320
|
+
})
|
|
1321
|
+
})
|
|
1322
|
+
]
|
|
1323
|
+
});
|
|
1324
|
+
};
|
|
1325
|
+
// src/contexts/markdown/MarkdownContext/lib/components/Annotation/index.tsx
|
|
1326
|
+
import { jsx as jsx35 } from "react/jsx-runtime";
|
|
1327
|
+
var Annotation = function(param) {
|
|
1328
|
+
var annotation = param.annotation;
|
|
1329
|
+
if (annotation.type === "file_citation") {
|
|
1330
|
+
return /* @__PURE__ */ jsx35(AnnotationBase, {
|
|
1331
|
+
icon: /* @__PURE__ */ jsx35(QuoteIcon, {}),
|
|
1332
|
+
content: "File cited."
|
|
1333
|
+
});
|
|
1334
|
+
} else if (annotation.type === "file_path") {
|
|
1335
|
+
return /* @__PURE__ */ jsx35(AnnotationBase, {
|
|
1336
|
+
icon: /* @__PURE__ */ jsx35(FileIcon, {}),
|
|
1337
|
+
content: "File generated."
|
|
1338
|
+
});
|
|
1339
|
+
}
|
|
1340
|
+
return null;
|
|
1341
|
+
};
|
|
1294
1342
|
// src/contexts/markdown/MarkdownContext/lib/components/index.tsx
|
|
1295
1343
|
var components = {
|
|
1296
1344
|
p: Paragraph,
|
|
@@ -1301,41 +1349,170 @@ var components = {
|
|
|
1301
1349
|
li: ListItem,
|
|
1302
1350
|
pre: Pre,
|
|
1303
1351
|
code: Code2,
|
|
1304
|
-
img: Img
|
|
1352
|
+
img: Img,
|
|
1353
|
+
annotation: Annotation
|
|
1354
|
+
};
|
|
1355
|
+
// src/lib/remark/remarkAnnotation.ts
|
|
1356
|
+
import { isNumber } from "radash";
|
|
1357
|
+
import flatMap from "unist-util-flatmap";
|
|
1358
|
+
var remarkAnnotation = function(param) {
|
|
1359
|
+
var content = param.content;
|
|
1360
|
+
return function() {
|
|
1361
|
+
return function(tree) {
|
|
1362
|
+
flatMap(tree, function(node) {
|
|
1363
|
+
if (node.type !== "text") {
|
|
1364
|
+
return [
|
|
1365
|
+
node
|
|
1366
|
+
];
|
|
1367
|
+
}
|
|
1368
|
+
if (!content.text.annotations.length) {
|
|
1369
|
+
return [
|
|
1370
|
+
node
|
|
1371
|
+
];
|
|
1372
|
+
}
|
|
1373
|
+
if (!node.position) {
|
|
1374
|
+
return [
|
|
1375
|
+
node
|
|
1376
|
+
];
|
|
1377
|
+
}
|
|
1378
|
+
var nodeStart = node.position.start.offset;
|
|
1379
|
+
if (!isNumber(nodeStart)) {
|
|
1380
|
+
return [
|
|
1381
|
+
node
|
|
1382
|
+
];
|
|
1383
|
+
}
|
|
1384
|
+
var nodeEnd = node.position.end.offset;
|
|
1385
|
+
if (!isNumber(nodeEnd)) {
|
|
1386
|
+
return [
|
|
1387
|
+
node
|
|
1388
|
+
];
|
|
1389
|
+
}
|
|
1390
|
+
var newNodes = [];
|
|
1391
|
+
var sortedAnnotations = content.text.annotations.sort(function(a, b) {
|
|
1392
|
+
return a.start_index - b.start_index;
|
|
1393
|
+
});
|
|
1394
|
+
var lastProcessedIndex = nodeStart;
|
|
1395
|
+
sortedAnnotations.forEach(function(annotation) {
|
|
1396
|
+
var annotationStart = annotation.start_index;
|
|
1397
|
+
var annotationEnd = annotation.end_index;
|
|
1398
|
+
if (nodeEnd < annotationStart || nodeStart > annotationEnd) {
|
|
1399
|
+
return;
|
|
1400
|
+
}
|
|
1401
|
+
var startIndex = Math.max(nodeStart, annotationStart);
|
|
1402
|
+
var endIndex = Math.min(nodeEnd, annotationEnd);
|
|
1403
|
+
if (lastProcessedIndex < startIndex) {
|
|
1404
|
+
newNodes.push({
|
|
1405
|
+
type: "text",
|
|
1406
|
+
value: node.value.slice(lastProcessedIndex - nodeStart, startIndex - nodeStart),
|
|
1407
|
+
position: {
|
|
1408
|
+
start: {
|
|
1409
|
+
line: node.position.start.line,
|
|
1410
|
+
column: node.position.start.column,
|
|
1411
|
+
offset: lastProcessedIndex
|
|
1412
|
+
},
|
|
1413
|
+
end: {
|
|
1414
|
+
line: node.position.end.line,
|
|
1415
|
+
column: node.position.end.column,
|
|
1416
|
+
offset: startIndex
|
|
1417
|
+
}
|
|
1418
|
+
}
|
|
1419
|
+
});
|
|
1420
|
+
}
|
|
1421
|
+
newNodes.push({
|
|
1422
|
+
type: "annotation",
|
|
1423
|
+
value: node.value.slice(startIndex - nodeStart, endIndex - nodeStart),
|
|
1424
|
+
position: {
|
|
1425
|
+
start: {
|
|
1426
|
+
line: node.position.start.line,
|
|
1427
|
+
column: node.position.start.column,
|
|
1428
|
+
offset: startIndex
|
|
1429
|
+
},
|
|
1430
|
+
end: {
|
|
1431
|
+
line: node.position.end.line,
|
|
1432
|
+
column: node.position.end.column,
|
|
1433
|
+
offset: endIndex
|
|
1434
|
+
}
|
|
1435
|
+
},
|
|
1436
|
+
data: {
|
|
1437
|
+
hName: "annotation",
|
|
1438
|
+
hProperties: {
|
|
1439
|
+
annotation: annotation
|
|
1440
|
+
}
|
|
1441
|
+
}
|
|
1442
|
+
});
|
|
1443
|
+
lastProcessedIndex = endIndex;
|
|
1444
|
+
});
|
|
1445
|
+
if (lastProcessedIndex < nodeEnd) {
|
|
1446
|
+
newNodes.push({
|
|
1447
|
+
type: "text",
|
|
1448
|
+
value: node.value.slice(lastProcessedIndex - nodeStart, nodeEnd - nodeStart),
|
|
1449
|
+
position: {
|
|
1450
|
+
start: {
|
|
1451
|
+
line: node.position.start.line,
|
|
1452
|
+
column: node.position.start.column,
|
|
1453
|
+
offset: lastProcessedIndex
|
|
1454
|
+
},
|
|
1455
|
+
end: {
|
|
1456
|
+
line: node.position.end.line,
|
|
1457
|
+
column: node.position.end.column,
|
|
1458
|
+
offset: nodeEnd
|
|
1459
|
+
}
|
|
1460
|
+
}
|
|
1461
|
+
});
|
|
1462
|
+
}
|
|
1463
|
+
return newNodes;
|
|
1464
|
+
});
|
|
1465
|
+
};
|
|
1466
|
+
};
|
|
1467
|
+
};
|
|
1468
|
+
// src/contexts/markdown/MarkdownContext/lib/getRemarkPlugins.ts
|
|
1469
|
+
var getRemarkPlugins = function(param) {
|
|
1470
|
+
var content = param.content;
|
|
1471
|
+
return [
|
|
1472
|
+
remarkAnnotation({
|
|
1473
|
+
content: content
|
|
1474
|
+
})
|
|
1475
|
+
];
|
|
1305
1476
|
};
|
|
1306
1477
|
// src/contexts/markdown/MarkdownContext/index.ts
|
|
1307
1478
|
var MarkdownContext = createContext9({
|
|
1308
|
-
components: components
|
|
1479
|
+
components: components,
|
|
1480
|
+
getRemarkPlugins: getRemarkPlugins
|
|
1309
1481
|
});
|
|
1310
1482
|
// src/hooks/markdown/useMarkdownContext/index.ts
|
|
1311
1483
|
var useMarkdownContext = function() {
|
|
1312
1484
|
return useContext7(MarkdownContext);
|
|
1313
1485
|
};
|
|
1314
1486
|
// src/components/threads/Thread/Message/TextContent.tsx
|
|
1315
|
-
import { jsx as
|
|
1487
|
+
import { jsx as jsx36 } from "react/jsx-runtime";
|
|
1316
1488
|
var TextContent = function(param) {
|
|
1317
1489
|
var content = param.content;
|
|
1318
|
-
var
|
|
1319
|
-
|
|
1490
|
+
var _useMarkdownContext = useMarkdownContext(), getRemarkPlugins2 = _useMarkdownContext.getRemarkPlugins, rest = _object_without_properties(_useMarkdownContext, [
|
|
1491
|
+
"getRemarkPlugins"
|
|
1492
|
+
]);
|
|
1493
|
+
return /* @__PURE__ */ jsx36(Markdown, _object_spread_props(_object_spread({}, rest), {
|
|
1494
|
+
remarkPlugins: getRemarkPlugins2({
|
|
1495
|
+
content: content
|
|
1496
|
+
}),
|
|
1320
1497
|
children: content.text.value
|
|
1321
1498
|
}));
|
|
1322
1499
|
};
|
|
1323
1500
|
// src/components/threads/Thread/Message/Attachments/index.tsx
|
|
1324
|
-
import { Flex as
|
|
1325
|
-
import { FileIcon } from "@radix-ui/react-icons";
|
|
1326
|
-
import { jsx as
|
|
1501
|
+
import { Flex as Flex11, Badge } from "@radix-ui/themes";
|
|
1502
|
+
import { FileIcon as FileIcon2 } from "@radix-ui/react-icons";
|
|
1503
|
+
import { jsx as jsx37, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
1327
1504
|
var Attachments = function(param) {
|
|
1328
1505
|
var message = param.message;
|
|
1329
1506
|
var _message_attachments;
|
|
1330
1507
|
if (!((_message_attachments = message.attachments) === null || _message_attachments === void 0 ? void 0 : _message_attachments.length)) return null;
|
|
1331
|
-
return /* @__PURE__ */
|
|
1508
|
+
return /* @__PURE__ */ jsx37(Flex11, {
|
|
1332
1509
|
align: "start",
|
|
1333
1510
|
pb: "1",
|
|
1334
|
-
children: /* @__PURE__ */
|
|
1511
|
+
children: /* @__PURE__ */ jsxs10(Badge, {
|
|
1335
1512
|
color: "gray",
|
|
1336
1513
|
variant: "surface",
|
|
1337
1514
|
children: [
|
|
1338
|
-
/* @__PURE__ */
|
|
1515
|
+
/* @__PURE__ */ jsx37(FileIcon2, {}),
|
|
1339
1516
|
message.attachments.length,
|
|
1340
1517
|
" file",
|
|
1341
1518
|
message.attachments.length > 1 ? "s" : ""
|
|
@@ -1344,7 +1521,7 @@ var Attachments = function(param) {
|
|
|
1344
1521
|
});
|
|
1345
1522
|
};
|
|
1346
1523
|
// src/components/threads/Thread/Message/index.tsx
|
|
1347
|
-
import { jsx as
|
|
1524
|
+
import { jsx as jsx38, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
1348
1525
|
var Message = function(param) {
|
|
1349
1526
|
var message = param.message;
|
|
1350
1527
|
var _useMemo5 = _sliced_to_array(useMemo5(function() {
|
|
@@ -1389,68 +1566,68 @@ var Message = function(param) {
|
|
|
1389
1566
|
}, [
|
|
1390
1567
|
message
|
|
1391
1568
|
]);
|
|
1392
|
-
return /* @__PURE__ */
|
|
1569
|
+
return /* @__PURE__ */ jsx38(Provider, {
|
|
1393
1570
|
value: {
|
|
1394
1571
|
message: message
|
|
1395
1572
|
},
|
|
1396
|
-
children: /* @__PURE__ */
|
|
1573
|
+
children: /* @__PURE__ */ jsxs11(Box9, {
|
|
1397
1574
|
children: [
|
|
1398
|
-
/* @__PURE__ */
|
|
1575
|
+
/* @__PURE__ */ jsx38(RunSteps, {
|
|
1399
1576
|
runSteps: olderRunSteps
|
|
1400
1577
|
}),
|
|
1401
|
-
/* @__PURE__ */
|
|
1578
|
+
/* @__PURE__ */ jsxs11(Box9, {
|
|
1402
1579
|
children: [
|
|
1403
|
-
/* @__PURE__ */
|
|
1580
|
+
/* @__PURE__ */ jsx38(Attachments, {
|
|
1404
1581
|
message: message
|
|
1405
1582
|
}),
|
|
1406
1583
|
message.content.map(function(content, index) {
|
|
1407
|
-
return /* @__PURE__ */
|
|
1408
|
-
children: content.type === "text" && /* @__PURE__ */
|
|
1584
|
+
return /* @__PURE__ */ jsx38(Fragment, {
|
|
1585
|
+
children: content.type === "text" && /* @__PURE__ */ jsx38(TextContent, {
|
|
1409
1586
|
content: content
|
|
1410
1587
|
})
|
|
1411
1588
|
}, index);
|
|
1412
1589
|
}),
|
|
1413
|
-
isInProgress && isEmpty(laterRunSteps) && /* @__PURE__ */
|
|
1590
|
+
isInProgress && isEmpty(laterRunSteps) && /* @__PURE__ */ jsx38(StartingContentSkeleton, {})
|
|
1414
1591
|
]
|
|
1415
1592
|
}),
|
|
1416
|
-
/* @__PURE__ */
|
|
1593
|
+
/* @__PURE__ */ jsx38(RunSteps, {
|
|
1417
1594
|
runSteps: laterRunSteps
|
|
1418
1595
|
}),
|
|
1419
|
-
isInProgress && !isEmpty(laterRunSteps) && /* @__PURE__ */
|
|
1420
|
-
children: /* @__PURE__ */
|
|
1596
|
+
isInProgress && !isEmpty(laterRunSteps) && /* @__PURE__ */ jsx38(Box9, {
|
|
1597
|
+
children: /* @__PURE__ */ jsx38(StartingContentSkeleton, {})
|
|
1421
1598
|
})
|
|
1422
1599
|
]
|
|
1423
1600
|
})
|
|
1424
1601
|
});
|
|
1425
1602
|
};
|
|
1426
1603
|
// src/components/threads/Thread/Messages/Content/MessageGroup/Content/index.tsx
|
|
1427
|
-
import { jsx as
|
|
1604
|
+
import { jsx as jsx39 } from "react/jsx-runtime";
|
|
1428
1605
|
var Content2 = function(param) {
|
|
1429
1606
|
var messageGroup = param.messageGroup;
|
|
1430
|
-
return /* @__PURE__ */
|
|
1607
|
+
return /* @__PURE__ */ jsx39(Flex12, {
|
|
1431
1608
|
direction: "column-reverse",
|
|
1432
1609
|
children: messageGroup.messages.map(function(message) {
|
|
1433
|
-
return /* @__PURE__ */
|
|
1610
|
+
return /* @__PURE__ */ jsx39(Message, {
|
|
1434
1611
|
message: message
|
|
1435
1612
|
}, message.id);
|
|
1436
1613
|
})
|
|
1437
1614
|
});
|
|
1438
1615
|
};
|
|
1439
1616
|
// src/components/threads/Thread/Messages/Content/MessageGroup/index.tsx
|
|
1440
|
-
import { jsx as
|
|
1617
|
+
import { jsx as jsx40, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
1441
1618
|
var MessageGroup = function(param) {
|
|
1442
1619
|
var messageGroup = param.messageGroup;
|
|
1443
1620
|
var assistantNameContext = useContext8(AssistantNameContext);
|
|
1444
|
-
return /* @__PURE__ */
|
|
1621
|
+
return /* @__PURE__ */ jsxs12(MessageGroupBase, {
|
|
1445
1622
|
children: [
|
|
1446
|
-
messageGroup.role === "user" ? /* @__PURE__ */
|
|
1447
|
-
/* @__PURE__ */
|
|
1623
|
+
messageGroup.role === "user" ? /* @__PURE__ */ jsx40(UserAvatar, {}) : /* @__PURE__ */ jsx40(AssistantAvatar, {}),
|
|
1624
|
+
/* @__PURE__ */ jsxs12(Box10, {
|
|
1448
1625
|
flexGrow: "1",
|
|
1449
1626
|
children: [
|
|
1450
|
-
/* @__PURE__ */
|
|
1627
|
+
/* @__PURE__ */ jsx40(Name, {
|
|
1451
1628
|
children: messageGroup.role === "user" ? "You" : assistantNameContext
|
|
1452
1629
|
}),
|
|
1453
|
-
/* @__PURE__ */
|
|
1630
|
+
/* @__PURE__ */ jsx40(Content2, {
|
|
1454
1631
|
messageGroup: messageGroup
|
|
1455
1632
|
})
|
|
1456
1633
|
]
|
|
@@ -1459,7 +1636,7 @@ var MessageGroup = function(param) {
|
|
|
1459
1636
|
});
|
|
1460
1637
|
};
|
|
1461
1638
|
// src/components/threads/Thread/Messages/Content/index.tsx
|
|
1462
|
-
import { Fragment as Fragment2, jsx as
|
|
1639
|
+
import { Fragment as Fragment2, jsx as jsx41 } from "react/jsx-runtime";
|
|
1463
1640
|
var Content3 = function() {
|
|
1464
1641
|
var _useMessages = useMessages(), messages2 = _useMessages.messages, isLoading = _useMessages.isLoading, isLoadingError = _useMessages.isLoadingError;
|
|
1465
1642
|
var addToast = useToasts().addToast;
|
|
@@ -1478,11 +1655,11 @@ var Content3 = function() {
|
|
|
1478
1655
|
addToast
|
|
1479
1656
|
]);
|
|
1480
1657
|
if (isLoading || isLoadingError) {
|
|
1481
|
-
return /* @__PURE__ */
|
|
1658
|
+
return /* @__PURE__ */ jsx41(MessagesSkeleton, {});
|
|
1482
1659
|
}
|
|
1483
|
-
return /* @__PURE__ */
|
|
1660
|
+
return /* @__PURE__ */ jsx41(Fragment2, {
|
|
1484
1661
|
children: messageGroups2.map(function(messageGroup) {
|
|
1485
|
-
return /* @__PURE__ */
|
|
1662
|
+
return /* @__PURE__ */ jsx41(MessageGroup, {
|
|
1486
1663
|
messageGroup: messageGroup
|
|
1487
1664
|
}, messageGroup.id);
|
|
1488
1665
|
})
|
|
@@ -1493,20 +1670,20 @@ import { useMemo as useMemo7 } from "react";
|
|
|
1493
1670
|
// src/components/skeletons/StartingSkeleton/index.tsx
|
|
1494
1671
|
import { useContext as useContext9 } from "react";
|
|
1495
1672
|
import { Box as Box11 } from "@radix-ui/themes";
|
|
1496
|
-
import { jsx as
|
|
1673
|
+
import { jsx as jsx42, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
1497
1674
|
var StartingSkeleton = function(param) {
|
|
1498
1675
|
var children = param.children;
|
|
1499
1676
|
var assistantNameContext = useContext9(AssistantNameContext);
|
|
1500
|
-
return /* @__PURE__ */
|
|
1677
|
+
return /* @__PURE__ */ jsxs13(MessageGroupBase, {
|
|
1501
1678
|
children: [
|
|
1502
|
-
/* @__PURE__ */
|
|
1503
|
-
/* @__PURE__ */
|
|
1679
|
+
/* @__PURE__ */ jsx42(AssistantAvatar, {}),
|
|
1680
|
+
/* @__PURE__ */ jsxs13(Box11, {
|
|
1504
1681
|
children: [
|
|
1505
|
-
/* @__PURE__ */
|
|
1682
|
+
/* @__PURE__ */ jsx42(Name, {
|
|
1506
1683
|
children: assistantNameContext
|
|
1507
1684
|
}),
|
|
1508
1685
|
children,
|
|
1509
|
-
/* @__PURE__ */
|
|
1686
|
+
/* @__PURE__ */ jsx42(StartingContentSkeleton, {})
|
|
1510
1687
|
]
|
|
1511
1688
|
})
|
|
1512
1689
|
]
|
|
@@ -1531,7 +1708,7 @@ var isOptimistic = function(param) {
|
|
|
1531
1708
|
return _4.startsWith(id, "-");
|
|
1532
1709
|
};
|
|
1533
1710
|
// src/components/threads/Thread/Messages/Progress/index.tsx
|
|
1534
|
-
import { jsx as
|
|
1711
|
+
import { jsx as jsx43 } from "react/jsx-runtime";
|
|
1535
1712
|
var Progress = function() {
|
|
1536
1713
|
var latestMessage = useLatestMessage().latestMessage;
|
|
1537
1714
|
var isMutatingMessage = useIsMutatingMessage();
|
|
@@ -1549,10 +1726,10 @@ var Progress = function() {
|
|
|
1549
1726
|
isMutatingMessage
|
|
1550
1727
|
]);
|
|
1551
1728
|
if (!isVisible) return null;
|
|
1552
|
-
return /* @__PURE__ */
|
|
1729
|
+
return /* @__PURE__ */ jsx43(StartingSkeleton, {});
|
|
1553
1730
|
};
|
|
1554
1731
|
// src/components/threads/Thread/Messages/Root/index.tsx
|
|
1555
|
-
import { Flex as
|
|
1732
|
+
import { Flex as Flex13 } from "@radix-ui/themes";
|
|
1556
1733
|
// src/hooks/misc/useInfiniteScroll/index.tsx
|
|
1557
1734
|
import { useRef as useRef3 } from "react";
|
|
1558
1735
|
import { useInView } from "react-intersection-observer";
|
|
@@ -1608,7 +1785,7 @@ var useInfiniteScroll = function(param) {
|
|
|
1608
1785
|
};
|
|
1609
1786
|
};
|
|
1610
1787
|
// src/components/threads/Thread/Messages/Root/index.tsx
|
|
1611
|
-
import { jsx as
|
|
1788
|
+
import { jsx as jsx44, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
1612
1789
|
var Root2 = function(param) {
|
|
1613
1790
|
var children = param.children, _param_style = param.style, style = _param_style === void 0 ? {} : _param_style;
|
|
1614
1791
|
var _useMessages = useMessages(), isFetchingNextPage = _useMessages.isFetchingNextPage, hasNextPage = _useMessages.hasNextPage, fetchNextPage = _useMessages.fetchNextPage;
|
|
@@ -1617,7 +1794,7 @@ var Root2 = function(param) {
|
|
|
1617
1794
|
hasNextPage: hasNextPage,
|
|
1618
1795
|
fetchNextPage: fetchNextPage
|
|
1619
1796
|
}), containerRef = _useInfiniteScroll.containerRef, loaderRef = _useInfiniteScroll.loaderRef;
|
|
1620
|
-
return /* @__PURE__ */
|
|
1797
|
+
return /* @__PURE__ */ jsxs14(Flex13, {
|
|
1621
1798
|
ref: containerRef,
|
|
1622
1799
|
direction: "column-reverse",
|
|
1623
1800
|
flexGrow: "1",
|
|
@@ -1626,10 +1803,10 @@ var Root2 = function(param) {
|
|
|
1626
1803
|
}),
|
|
1627
1804
|
children: [
|
|
1628
1805
|
children,
|
|
1629
|
-
hasNextPage && /* @__PURE__ */
|
|
1806
|
+
hasNextPage && /* @__PURE__ */ jsx44(Flex13, {
|
|
1630
1807
|
ref: loaderRef
|
|
1631
1808
|
}),
|
|
1632
|
-
/* @__PURE__ */
|
|
1809
|
+
/* @__PURE__ */ jsx44(Flex13, {
|
|
1633
1810
|
flexShrink: "0",
|
|
1634
1811
|
flexGrow: "1"
|
|
1635
1812
|
})
|
|
@@ -1637,32 +1814,33 @@ var Root2 = function(param) {
|
|
|
1637
1814
|
});
|
|
1638
1815
|
};
|
|
1639
1816
|
// src/components/threads/Thread/Messages/NextPageSkeleton.tsx
|
|
1640
|
-
import { jsx as
|
|
1817
|
+
import { jsx as jsx45 } from "react/jsx-runtime";
|
|
1641
1818
|
var NextPageSkeleton = function() {
|
|
1642
1819
|
var hasNextPage = useMessages().hasNextPage;
|
|
1643
1820
|
if (!hasNextPage) {
|
|
1644
1821
|
return null;
|
|
1645
1822
|
}
|
|
1646
|
-
return /* @__PURE__ */
|
|
1823
|
+
return /* @__PURE__ */ jsx45(MessagesSkeleton, {});
|
|
1647
1824
|
};
|
|
1648
1825
|
// src/components/threads/Thread/Messages/index.tsx
|
|
1649
|
-
import { jsx as
|
|
1826
|
+
import { jsx as jsx46, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
1650
1827
|
var Messages = function(param) {
|
|
1651
1828
|
var children = param.children, _param_style = param.style, style = _param_style === void 0 ? {} : _param_style;
|
|
1652
|
-
return /* @__PURE__ */
|
|
1829
|
+
return /* @__PURE__ */ jsxs15(Root2, {
|
|
1653
1830
|
style: style,
|
|
1654
1831
|
children: [
|
|
1655
|
-
/* @__PURE__ */
|
|
1832
|
+
/* @__PURE__ */ jsx46(Flex14, {
|
|
1656
1833
|
flexShrink: "0",
|
|
1657
1834
|
height: "var(--space-3)"
|
|
1658
1835
|
}),
|
|
1659
|
-
/* @__PURE__ */
|
|
1836
|
+
/* @__PURE__ */ jsx46(Progress, {}),
|
|
1660
1837
|
children,
|
|
1661
|
-
/* @__PURE__ */
|
|
1662
|
-
/* @__PURE__ */
|
|
1663
|
-
/* @__PURE__ */
|
|
1838
|
+
/* @__PURE__ */ jsx46(Content3, {}),
|
|
1839
|
+
/* @__PURE__ */ jsx46(NextPageSkeleton, {}),
|
|
1840
|
+
/* @__PURE__ */ jsx46(Flex14, {
|
|
1664
1841
|
flexShrink: "0",
|
|
1665
|
-
flexGrow: "1"
|
|
1842
|
+
flexGrow: "1",
|
|
1843
|
+
minHeight: "var(--space-5)"
|
|
1666
1844
|
})
|
|
1667
1845
|
]
|
|
1668
1846
|
});
|
|
@@ -1672,7 +1850,7 @@ Messages.Message = Message;
|
|
|
1672
1850
|
Messages.NextPageSkeleton = NextPageSkeleton;
|
|
1673
1851
|
// src/components/threads/Thread/MessageForm/Submit/index.tsx
|
|
1674
1852
|
import { ArrowUpIcon, StopIcon } from "@radix-ui/react-icons";
|
|
1675
|
-
import { IconButton, Flex as
|
|
1853
|
+
import { IconButton as IconButton2, Flex as Flex15 } from "@radix-ui/themes";
|
|
1676
1854
|
// src/hooks/messages/useMessageFormContext/index.ts
|
|
1677
1855
|
import { useContext as useContext10 } from "react";
|
|
1678
1856
|
// src/contexts/messages/MessageFormContext/index.ts
|
|
@@ -1689,10 +1867,10 @@ var useMessageFormContext = function() {
|
|
|
1689
1867
|
return useContext10(MessageFormContext);
|
|
1690
1868
|
};
|
|
1691
1869
|
// src/components/threads/Thread/MessageForm/Submit/index.tsx
|
|
1692
|
-
import { jsx as
|
|
1870
|
+
import { jsx as jsx47 } from "react/jsx-runtime";
|
|
1693
1871
|
var Root3 = function(param) {
|
|
1694
1872
|
var children = param.children;
|
|
1695
|
-
return /* @__PURE__ */
|
|
1873
|
+
return /* @__PURE__ */ jsx47(Flex15, {
|
|
1696
1874
|
flexShrink: "0",
|
|
1697
1875
|
align: "end",
|
|
1698
1876
|
children: children
|
|
@@ -1702,24 +1880,24 @@ var Button2 = function() {
|
|
|
1702
1880
|
var superinterfaceContext = useSuperinterfaceContext();
|
|
1703
1881
|
var _useMessageFormContext = useMessageFormContext(), isDisabled = _useMessageFormContext.isDisabled, isLoading = _useMessageFormContext.isLoading, isFileLoading = _useMessageFormContext.isFileLoading;
|
|
1704
1882
|
if (isLoading) {
|
|
1705
|
-
return /* @__PURE__ */
|
|
1883
|
+
return /* @__PURE__ */ jsx47(IconButton2, {
|
|
1706
1884
|
type: "button",
|
|
1707
1885
|
onClick: function() {
|
|
1708
1886
|
var _superinterfaceContext_createMessageAbortControllerRef_current;
|
|
1709
1887
|
return (_superinterfaceContext_createMessageAbortControllerRef_current = superinterfaceContext.createMessageAbortControllerRef.current) === null || _superinterfaceContext_createMessageAbortControllerRef_current === void 0 ? void 0 : _superinterfaceContext_createMessageAbortControllerRef_current.abort();
|
|
1710
1888
|
},
|
|
1711
|
-
children: /* @__PURE__ */
|
|
1889
|
+
children: /* @__PURE__ */ jsx47(StopIcon, {})
|
|
1712
1890
|
});
|
|
1713
1891
|
}
|
|
1714
|
-
return /* @__PURE__ */
|
|
1892
|
+
return /* @__PURE__ */ jsx47(IconButton2, {
|
|
1715
1893
|
type: "submit",
|
|
1716
1894
|
disabled: isDisabled || isFileLoading,
|
|
1717
|
-
children: /* @__PURE__ */
|
|
1895
|
+
children: /* @__PURE__ */ jsx47(ArrowUpIcon, {})
|
|
1718
1896
|
});
|
|
1719
1897
|
};
|
|
1720
1898
|
var Submit = function() {
|
|
1721
|
-
return /* @__PURE__ */
|
|
1722
|
-
children: /* @__PURE__ */
|
|
1899
|
+
return /* @__PURE__ */ jsx47(Root3, {
|
|
1900
|
+
children: /* @__PURE__ */ jsx47(Button2, {})
|
|
1723
1901
|
});
|
|
1724
1902
|
};
|
|
1725
1903
|
Submit.Root = Root3;
|
|
@@ -2351,7 +2529,7 @@ var formOptions = {
|
|
|
2351
2529
|
};
|
|
2352
2530
|
// src/components/threads/Thread/MessageForm/Root/index.tsx
|
|
2353
2531
|
import { partob as partob2 } from "radash";
|
|
2354
|
-
import { jsx as
|
|
2532
|
+
import { jsx as jsx48 } from "react/jsx-runtime";
|
|
2355
2533
|
var Root4 = function(param) {
|
|
2356
2534
|
var children = param.children, onSubmitArg = param.onSubmit;
|
|
2357
2535
|
var _useState = _sliced_to_array(useState([]), 2), files = _useState[0], setFiles = _useState[1];
|
|
@@ -2460,7 +2638,7 @@ var Root4 = function(param) {
|
|
|
2460
2638
|
return _ref.apply(this, arguments);
|
|
2461
2639
|
};
|
|
2462
2640
|
}();
|
|
2463
|
-
return /* @__PURE__ */
|
|
2641
|
+
return /* @__PURE__ */ jsx48(MessageFormContext.Provider, {
|
|
2464
2642
|
value: {
|
|
2465
2643
|
isDisabled: isDisabled,
|
|
2466
2644
|
isLoading: isLoading,
|
|
@@ -2468,11 +2646,11 @@ var Root4 = function(param) {
|
|
|
2468
2646
|
setFiles: setFiles,
|
|
2469
2647
|
isFileLoading: isFileLoading
|
|
2470
2648
|
},
|
|
2471
|
-
children: /* @__PURE__ */
|
|
2472
|
-
children: /* @__PURE__ */
|
|
2649
|
+
children: /* @__PURE__ */ jsx48(FormProvider, _object_spread_props(_object_spread({}, formProps), {
|
|
2650
|
+
children: /* @__PURE__ */ jsx48(Box12, {
|
|
2473
2651
|
asChild: true,
|
|
2474
2652
|
flexShrink: "0",
|
|
2475
|
-
children: /* @__PURE__ */
|
|
2653
|
+
children: /* @__PURE__ */ jsx48("form", {
|
|
2476
2654
|
onSubmit: handleSubmit(onSubmit),
|
|
2477
2655
|
children: children
|
|
2478
2656
|
})
|
|
@@ -2482,23 +2660,23 @@ var Root4 = function(param) {
|
|
|
2482
2660
|
};
|
|
2483
2661
|
// src/components/threads/Thread/MessageForm/Field/index.tsx
|
|
2484
2662
|
import { useFormContext as useFormContext2 } from "react-hook-form";
|
|
2485
|
-
import { Container as RadixContainer, Flex as
|
|
2663
|
+
import { Container as RadixContainer, Flex as Flex19 } from "@radix-ui/themes";
|
|
2486
2664
|
// src/components/threads/Thread/MessageForm/Field/Control.tsx
|
|
2487
|
-
import { Flex as
|
|
2665
|
+
import { Flex as Flex16 } from "@radix-ui/themes";
|
|
2488
2666
|
import { useFormContext } from "react-hook-form";
|
|
2489
2667
|
import { usePrevious } from "react-use";
|
|
2490
2668
|
import { useContext as useContext11, useMemo as useMemo9, useRef as useRef4, useEffect as useEffect3 } from "react";
|
|
2491
2669
|
// src/components/textareas/TextareaBase/index.tsx
|
|
2492
2670
|
import { forwardRef as forwardRef3 } from "react";
|
|
2493
2671
|
import TextareaAutosize from "react-textarea-autosize";
|
|
2494
|
-
import { Fragment as Fragment3, jsx as
|
|
2672
|
+
import { Fragment as Fragment3, jsx as jsx49, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
2495
2673
|
var TextareaBase = forwardRef3(function TextareaBase2(props, ref) {
|
|
2496
|
-
return /* @__PURE__ */
|
|
2674
|
+
return /* @__PURE__ */ jsxs16(Fragment3, {
|
|
2497
2675
|
children: [
|
|
2498
|
-
/* @__PURE__ */
|
|
2676
|
+
/* @__PURE__ */ jsx49("style", {
|
|
2499
2677
|
children: ".superinterface-textarea { min-height: inherit; height: 30px; }\n.superinterface-textarea::placeholder { color: var(--gray-a10); }"
|
|
2500
2678
|
}),
|
|
2501
|
-
/* @__PURE__ */
|
|
2679
|
+
/* @__PURE__ */ jsx49(TextareaAutosize, _object_spread({
|
|
2502
2680
|
ref: ref,
|
|
2503
2681
|
className: "rt-reset superinterface-textarea",
|
|
2504
2682
|
style: {
|
|
@@ -2515,10 +2693,10 @@ var TextareaBase = forwardRef3(function TextareaBase2(props, ref) {
|
|
|
2515
2693
|
});
|
|
2516
2694
|
});
|
|
2517
2695
|
// src/components/threads/Thread/MessageForm/Field/Control.tsx
|
|
2518
|
-
import { jsx as
|
|
2696
|
+
import { jsx as jsx50 } from "react/jsx-runtime";
|
|
2519
2697
|
var Root5 = function(param) {
|
|
2520
2698
|
var children = param.children;
|
|
2521
|
-
return /* @__PURE__ */
|
|
2699
|
+
return /* @__PURE__ */ jsx50(Flex16, {
|
|
2522
2700
|
flexGrow: "1",
|
|
2523
2701
|
pt: "4px",
|
|
2524
2702
|
children: children
|
|
@@ -2547,7 +2725,7 @@ var Input = function() {
|
|
|
2547
2725
|
isDisabledPrevious,
|
|
2548
2726
|
textareaProps
|
|
2549
2727
|
]);
|
|
2550
|
-
return /* @__PURE__ */
|
|
2728
|
+
return /* @__PURE__ */ jsx50(TextareaBase, _object_spread_props(_object_spread({
|
|
2551
2729
|
minRows: 1,
|
|
2552
2730
|
placeholder: "Message ".concat(assistantNameContext, "..."),
|
|
2553
2731
|
disabled: isDisabled,
|
|
@@ -2567,51 +2745,51 @@ var Input = function() {
|
|
|
2567
2745
|
}));
|
|
2568
2746
|
};
|
|
2569
2747
|
var Control = function() {
|
|
2570
|
-
return /* @__PURE__ */
|
|
2571
|
-
children: /* @__PURE__ */
|
|
2748
|
+
return /* @__PURE__ */ jsx50(Root5, {
|
|
2749
|
+
children: /* @__PURE__ */ jsx50(Input, {})
|
|
2572
2750
|
});
|
|
2573
2751
|
};
|
|
2574
2752
|
Control.Root = Root5;
|
|
2575
2753
|
Control.Input = Input;
|
|
2576
2754
|
// src/components/threads/Thread/MessageForm/Field/Files/Preview.tsx
|
|
2577
|
-
import { Flex as
|
|
2578
|
-
import { FileIcon as
|
|
2579
|
-
import { jsx as
|
|
2755
|
+
import { Flex as Flex17, Card as Card2, Spinner, Text as Text7, IconButton as IconButton3 } from "@radix-ui/themes";
|
|
2756
|
+
import { FileIcon as FileIcon3, Cross2Icon } from "@radix-ui/react-icons";
|
|
2757
|
+
import { jsx as jsx51, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
2580
2758
|
var Preview = function() {
|
|
2581
2759
|
var _useMessageFormContext = useMessageFormContext(), files = _useMessageFormContext.files, setFiles = _useMessageFormContext.setFiles;
|
|
2582
2760
|
if (!files.length) {
|
|
2583
2761
|
return null;
|
|
2584
2762
|
}
|
|
2585
|
-
return /* @__PURE__ */
|
|
2763
|
+
return /* @__PURE__ */ jsx51(Flex17, {
|
|
2586
2764
|
flexBasis: "100%",
|
|
2587
2765
|
direction: "column",
|
|
2588
2766
|
pb: "2",
|
|
2589
2767
|
gap: "1",
|
|
2590
2768
|
children: files.map(function(file) {
|
|
2591
|
-
return /* @__PURE__ */
|
|
2769
|
+
return /* @__PURE__ */ jsx51(Card2, {
|
|
2592
2770
|
variant: "ghost",
|
|
2593
|
-
children: /* @__PURE__ */
|
|
2771
|
+
children: /* @__PURE__ */ jsxs17(Flex17, {
|
|
2594
2772
|
align: "center",
|
|
2595
2773
|
justify: "between",
|
|
2596
2774
|
gap: "1",
|
|
2597
2775
|
children: [
|
|
2598
|
-
/* @__PURE__ */
|
|
2776
|
+
/* @__PURE__ */ jsxs17(Flex17, {
|
|
2599
2777
|
align: "center",
|
|
2600
2778
|
gap: "1",
|
|
2601
2779
|
flexShrink: "1",
|
|
2602
2780
|
minWidth: "0",
|
|
2603
2781
|
maxWidth: "250px",
|
|
2604
2782
|
children: [
|
|
2605
|
-
/* @__PURE__ */
|
|
2783
|
+
/* @__PURE__ */ jsx51(Flex17, {
|
|
2606
2784
|
flexShrink: "0",
|
|
2607
|
-
children: /* @__PURE__ */
|
|
2785
|
+
children: /* @__PURE__ */ jsx51(Spinner, {
|
|
2608
2786
|
loading: isOptimistic({
|
|
2609
2787
|
id: file.id
|
|
2610
2788
|
}),
|
|
2611
|
-
children: /* @__PURE__ */
|
|
2789
|
+
children: /* @__PURE__ */ jsx51(FileIcon3, {})
|
|
2612
2790
|
})
|
|
2613
2791
|
}),
|
|
2614
|
-
/* @__PURE__ */
|
|
2792
|
+
/* @__PURE__ */ jsx51(Text7, {
|
|
2615
2793
|
size: "2",
|
|
2616
2794
|
truncate: true,
|
|
2617
2795
|
wrap: "nowrap",
|
|
@@ -2619,9 +2797,9 @@ var Preview = function() {
|
|
|
2619
2797
|
})
|
|
2620
2798
|
]
|
|
2621
2799
|
}),
|
|
2622
|
-
/* @__PURE__ */
|
|
2800
|
+
/* @__PURE__ */ jsx51(Flex17, {
|
|
2623
2801
|
flexShrink: "0",
|
|
2624
|
-
children: /* @__PURE__ */
|
|
2802
|
+
children: /* @__PURE__ */ jsx51(IconButton3, {
|
|
2625
2803
|
onClick: function() {
|
|
2626
2804
|
return setFiles(function(prev) {
|
|
2627
2805
|
return prev.filter(function(prevFile) {
|
|
@@ -2632,7 +2810,7 @@ var Preview = function() {
|
|
|
2632
2810
|
color: "gray",
|
|
2633
2811
|
variant: "ghost",
|
|
2634
2812
|
size: "1",
|
|
2635
|
-
children: /* @__PURE__ */
|
|
2813
|
+
children: /* @__PURE__ */ jsx51(Cross2Icon, {})
|
|
2636
2814
|
})
|
|
2637
2815
|
})
|
|
2638
2816
|
]
|
|
@@ -2646,7 +2824,7 @@ import { useCallback as useCallback2 } from "react";
|
|
|
2646
2824
|
import { omit as omit4 } from "radash";
|
|
2647
2825
|
import dayjs2 from "dayjs";
|
|
2648
2826
|
import { FilePlusIcon } from "@radix-ui/react-icons";
|
|
2649
|
-
import { IconButton as
|
|
2827
|
+
import { IconButton as IconButton4, Flex as Flex18 } from "@radix-ui/themes";
|
|
2650
2828
|
// src/hooks/files/useCreateFile/index.ts
|
|
2651
2829
|
import { useMutation as useMutation2, useQueryClient as useQueryClient5 } from "@tanstack/react-query";
|
|
2652
2830
|
// src/hooks/files/useCreateFile/lib/mutationOptions/mutationFn/body/formData.ts
|
|
@@ -2757,7 +2935,7 @@ var useCreateFile = function() {
|
|
|
2757
2935
|
});
|
|
2758
2936
|
};
|
|
2759
2937
|
// src/components/threads/Thread/MessageForm/Field/Files/Control.tsx
|
|
2760
|
-
import { jsx as
|
|
2938
|
+
import { jsx as jsx52, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
2761
2939
|
var accept = ".c,text/x-c,\n.cs,text/x-csharp,\n.cpp,text/x-c++,\n.doc,application/msword,\n.docx,application/vnd.openxmlformats-officedocument.wordprocessingml.document,\n.html,text/html,\n.java,text/x-java,\n.json,application/json,\n.md,text/markdown,\n.pdf,application/pdf,\n.php,text/x-php,\n.pptx,application/vnd.openxmlformats-officedocument.presentationml.presentation,\n.py,text/x-python,\n.py,text/x-script.python,\n.rb,text/x-ruby,\n.tex,text/x-tex,\n.txt,text/plain,\n.css,text/css,\n.js,text/javascript,\n.sh,application/x-sh,\n.ts,application/typescript";
|
|
2762
2940
|
var Control2 = function() {
|
|
2763
2941
|
var _useMessageFormContext = useMessageFormContext(), isDisabled = _useMessageFormContext.isDisabled, isLoading = _useMessageFormContext.isLoading, setFiles = _useMessageFormContext.setFiles;
|
|
@@ -2931,11 +3109,11 @@ var Control2 = function() {
|
|
|
2931
3109
|
createFile,
|
|
2932
3110
|
setFiles
|
|
2933
3111
|
]);
|
|
2934
|
-
return /* @__PURE__ */
|
|
3112
|
+
return /* @__PURE__ */ jsx52(Flex18, {
|
|
2935
3113
|
pt: "2",
|
|
2936
3114
|
pr: "2",
|
|
2937
3115
|
flexGrow: "0",
|
|
2938
|
-
children: /* @__PURE__ */
|
|
3116
|
+
children: /* @__PURE__ */ jsxs18(IconButton4, {
|
|
2939
3117
|
type: "button",
|
|
2940
3118
|
variant: "ghost",
|
|
2941
3119
|
color: "gray",
|
|
@@ -2945,8 +3123,8 @@ var Control2 = function() {
|
|
|
2945
3123
|
overflow: "hidden"
|
|
2946
3124
|
},
|
|
2947
3125
|
children: [
|
|
2948
|
-
/* @__PURE__ */
|
|
2949
|
-
/* @__PURE__ */
|
|
3126
|
+
/* @__PURE__ */ jsx52(FilePlusIcon, {}),
|
|
3127
|
+
/* @__PURE__ */ jsx52("input", {
|
|
2950
3128
|
type: "file",
|
|
2951
3129
|
multiple: true,
|
|
2952
3130
|
accept: accept,
|
|
@@ -2971,20 +3149,20 @@ var Files = {
|
|
|
2971
3149
|
Control: Control2
|
|
2972
3150
|
};
|
|
2973
3151
|
// src/components/threads/Thread/MessageForm/Field/index.tsx
|
|
2974
|
-
import { jsx as
|
|
3152
|
+
import { jsx as jsx53 } from "react/jsx-runtime";
|
|
2975
3153
|
var Root6 = function(param) {
|
|
2976
3154
|
var children = param.children;
|
|
2977
3155
|
var _useFormContext2 = useFormContext2(), errors = _useFormContext2.formState.errors;
|
|
2978
|
-
return /* @__PURE__ */
|
|
3156
|
+
return /* @__PURE__ */ jsx53(RadixContainer, {
|
|
2979
3157
|
size: "2",
|
|
2980
3158
|
flexGrow: "0",
|
|
2981
|
-
children: /* @__PURE__ */
|
|
3159
|
+
children: /* @__PURE__ */ jsx53(Flex19, {
|
|
2982
3160
|
direction: "column",
|
|
2983
3161
|
flexShrink: "0",
|
|
2984
|
-
children: /* @__PURE__ */
|
|
3162
|
+
children: /* @__PURE__ */ jsx53(Flex19, {
|
|
2985
3163
|
direction: "column",
|
|
2986
3164
|
flexShrink: "0",
|
|
2987
|
-
children: /* @__PURE__ */
|
|
3165
|
+
children: /* @__PURE__ */ jsx53(Flex19, {
|
|
2988
3166
|
style: _object_spread({
|
|
2989
3167
|
borderRadius: "var(--radius-2)",
|
|
2990
3168
|
borderWidth: "1px",
|
|
@@ -3008,13 +3186,13 @@ var Field = {
|
|
|
3008
3186
|
Files: Files
|
|
3009
3187
|
};
|
|
3010
3188
|
// src/components/threads/Thread/MessageForm/index.tsx
|
|
3011
|
-
import { jsx as
|
|
3189
|
+
import { jsx as jsx54, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
3012
3190
|
var MessageForm = function() {
|
|
3013
|
-
return /* @__PURE__ */
|
|
3014
|
-
children: /* @__PURE__ */
|
|
3191
|
+
return /* @__PURE__ */ jsx54(Root4, {
|
|
3192
|
+
children: /* @__PURE__ */ jsxs19(Field.Root, {
|
|
3015
3193
|
children: [
|
|
3016
|
-
/* @__PURE__ */
|
|
3017
|
-
/* @__PURE__ */
|
|
3194
|
+
/* @__PURE__ */ jsx54(Field.Control, {}),
|
|
3195
|
+
/* @__PURE__ */ jsx54(Submit, {})
|
|
3018
3196
|
]
|
|
3019
3197
|
})
|
|
3020
3198
|
});
|
|
@@ -3023,17 +3201,17 @@ MessageForm.Root = Root4;
|
|
|
3023
3201
|
MessageForm.Field = Field;
|
|
3024
3202
|
MessageForm.Submit = Submit;
|
|
3025
3203
|
// src/components/threads/Thread/Root/index.tsx
|
|
3026
|
-
import { Flex as
|
|
3204
|
+
import { Flex as Flex20 } from "@radix-ui/themes";
|
|
3027
3205
|
// src/components/threads/Thread/Provider/index.tsx
|
|
3028
3206
|
var Provider2 = SuperinterfaceProvider;
|
|
3029
3207
|
// src/components/threads/Thread/Root/index.tsx
|
|
3030
|
-
import { jsx as
|
|
3208
|
+
import { jsx as jsx55 } from "react/jsx-runtime";
|
|
3031
3209
|
var Root7 = function(_param) {
|
|
3032
3210
|
var children = _param.children, rest = _object_without_properties(_param, [
|
|
3033
3211
|
"children"
|
|
3034
3212
|
]);
|
|
3035
|
-
return /* @__PURE__ */
|
|
3036
|
-
children: /* @__PURE__ */
|
|
3213
|
+
return /* @__PURE__ */ jsx55(Provider2, _object_spread_props(_object_spread({}, rest), {
|
|
3214
|
+
children: /* @__PURE__ */ jsx55(Flex20, {
|
|
3037
3215
|
direction: "column",
|
|
3038
3216
|
flexGrow: "1",
|
|
3039
3217
|
children: children
|
|
@@ -3041,12 +3219,12 @@ var Root7 = function(_param) {
|
|
|
3041
3219
|
}));
|
|
3042
3220
|
};
|
|
3043
3221
|
// src/components/threads/Thread/index.tsx
|
|
3044
|
-
import { jsx as
|
|
3222
|
+
import { jsx as jsx56, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
3045
3223
|
var Thread = function(props) {
|
|
3046
|
-
return /* @__PURE__ */
|
|
3224
|
+
return /* @__PURE__ */ jsxs20(Root7, _object_spread_props(_object_spread({}, props), {
|
|
3047
3225
|
children: [
|
|
3048
|
-
/* @__PURE__ */
|
|
3049
|
-
/* @__PURE__ */
|
|
3226
|
+
/* @__PURE__ */ jsx56(Messages, {}),
|
|
3227
|
+
/* @__PURE__ */ jsx56(MessageForm, {})
|
|
3050
3228
|
]
|
|
3051
3229
|
}));
|
|
3052
3230
|
};
|
|
@@ -3072,12 +3250,12 @@ var useThreadDialogContext = function() {
|
|
|
3072
3250
|
return useContext13(ThreadDialogContext);
|
|
3073
3251
|
};
|
|
3074
3252
|
// src/components/threads/ThreadDialog/Provider/index.tsx
|
|
3075
|
-
import { jsx as
|
|
3253
|
+
import { jsx as jsx57 } from "react/jsx-runtime";
|
|
3076
3254
|
var Provider3 = function(param) {
|
|
3077
3255
|
var children = param.children;
|
|
3078
3256
|
var threadDialogContext = useThreadDialogContext();
|
|
3079
3257
|
var _useState2 = _sliced_to_array(useState2(threadDialogContext.isOpen), 2), isOpen = _useState2[0], setIsOpen = _useState2[1];
|
|
3080
|
-
return /* @__PURE__ */
|
|
3258
|
+
return /* @__PURE__ */ jsx57(ThreadDialogContext.Provider, {
|
|
3081
3259
|
value: {
|
|
3082
3260
|
isOpen: isOpen,
|
|
3083
3261
|
setIsOpen: setIsOpen
|
|
@@ -3090,27 +3268,27 @@ import { useState as useState3, useCallback as useCallback3 } from "react";
|
|
|
3090
3268
|
import * as Toast2 from "@radix-ui/react-toast";
|
|
3091
3269
|
// src/components/toasts/ToastsProvider/CustomToast.tsx
|
|
3092
3270
|
import * as Toast from "@radix-ui/react-toast";
|
|
3093
|
-
import { Card as Card3, Text as
|
|
3271
|
+
import { Card as Card3, Text as Text8, Flex as Flex21 } from "@radix-ui/themes";
|
|
3094
3272
|
import { CheckCircledIcon as CheckCircledIcon2, CrossCircledIcon } from "@radix-ui/react-icons";
|
|
3095
|
-
import { jsx as
|
|
3273
|
+
import { jsx as jsx58, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
3096
3274
|
var CustomToast = function(param) {
|
|
3097
3275
|
var toast = param.toast;
|
|
3098
|
-
return /* @__PURE__ */
|
|
3099
|
-
children: /* @__PURE__ */
|
|
3100
|
-
children: /* @__PURE__ */
|
|
3101
|
-
children: /* @__PURE__ */
|
|
3276
|
+
return /* @__PURE__ */ jsx58(Toast.Root, {
|
|
3277
|
+
children: /* @__PURE__ */ jsx58(Card3, {
|
|
3278
|
+
children: /* @__PURE__ */ jsx58(Toast.Title, {
|
|
3279
|
+
children: /* @__PURE__ */ jsxs21(Flex21, {
|
|
3102
3280
|
children: [
|
|
3103
|
-
/* @__PURE__ */
|
|
3281
|
+
/* @__PURE__ */ jsx58(Flex21, {
|
|
3104
3282
|
pr: "2",
|
|
3105
3283
|
height: "14px",
|
|
3106
3284
|
align: "center",
|
|
3107
|
-
children: toast.type === "success" ? /* @__PURE__ */
|
|
3285
|
+
children: toast.type === "success" ? /* @__PURE__ */ jsx58(CheckCircledIcon2, {
|
|
3108
3286
|
color: "var(--accent-9)"
|
|
3109
|
-
}) : /* @__PURE__ */
|
|
3287
|
+
}) : /* @__PURE__ */ jsx58(CrossCircledIcon, {
|
|
3110
3288
|
color: "var(--red-9)"
|
|
3111
3289
|
})
|
|
3112
3290
|
}),
|
|
3113
|
-
/* @__PURE__ */
|
|
3291
|
+
/* @__PURE__ */ jsx58(Text8, {
|
|
3114
3292
|
weight: "medium",
|
|
3115
3293
|
size: "1",
|
|
3116
3294
|
children: toast.message
|
|
@@ -3122,7 +3300,7 @@ var CustomToast = function(param) {
|
|
|
3122
3300
|
});
|
|
3123
3301
|
};
|
|
3124
3302
|
// src/components/toasts/ToastsProvider/index.tsx
|
|
3125
|
-
import { jsx as
|
|
3303
|
+
import { jsx as jsx59, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
3126
3304
|
var ToastsProvider = function(param) {
|
|
3127
3305
|
var children = param.children;
|
|
3128
3306
|
var _useState3 = _sliced_to_array(useState3([]), 2), toasts = _useState3[0], setToasts = _useState3[1];
|
|
@@ -3133,20 +3311,20 @@ var ToastsProvider = function(param) {
|
|
|
3133
3311
|
]);
|
|
3134
3312
|
});
|
|
3135
3313
|
}, []);
|
|
3136
|
-
return /* @__PURE__ */
|
|
3314
|
+
return /* @__PURE__ */ jsx59(ToastsContext.Provider, {
|
|
3137
3315
|
value: {
|
|
3138
3316
|
toasts: toasts,
|
|
3139
3317
|
addToast: addToast
|
|
3140
3318
|
},
|
|
3141
|
-
children: /* @__PURE__ */
|
|
3319
|
+
children: /* @__PURE__ */ jsxs22(Toast2.Provider, {
|
|
3142
3320
|
children: [
|
|
3143
3321
|
children,
|
|
3144
3322
|
Array.from(toasts).map(function(toast, index) {
|
|
3145
|
-
return /* @__PURE__ */
|
|
3323
|
+
return /* @__PURE__ */ jsx59(CustomToast, {
|
|
3146
3324
|
toast: toast
|
|
3147
3325
|
}, index);
|
|
3148
3326
|
}),
|
|
3149
|
-
/* @__PURE__ */
|
|
3327
|
+
/* @__PURE__ */ jsx59(Toast2.Viewport, {
|
|
3150
3328
|
style: {
|
|
3151
3329
|
position: "absolute",
|
|
3152
3330
|
bottom: 0,
|
|
@@ -3168,34 +3346,34 @@ var ToastsProvider = function(param) {
|
|
|
3168
3346
|
});
|
|
3169
3347
|
};
|
|
3170
3348
|
// src/components/threads/ThreadDialog/Root/index.tsx
|
|
3171
|
-
import { jsx as
|
|
3349
|
+
import { jsx as jsx60 } from "react/jsx-runtime";
|
|
3172
3350
|
var Root9 = function(param) {
|
|
3173
3351
|
var children = param.children;
|
|
3174
|
-
return /* @__PURE__ */
|
|
3175
|
-
children: /* @__PURE__ */
|
|
3352
|
+
return /* @__PURE__ */ jsx60(ToastsProvider, {
|
|
3353
|
+
children: /* @__PURE__ */ jsx60(Provider3, {
|
|
3176
3354
|
children: children
|
|
3177
3355
|
})
|
|
3178
3356
|
});
|
|
3179
3357
|
};
|
|
3180
3358
|
// src/components/threads/ThreadDialog/Trigger/index.tsx
|
|
3181
|
-
import { Flex as
|
|
3359
|
+
import { Flex as Flex22 } from "@radix-ui/themes";
|
|
3182
3360
|
// src/components/threads/ThreadDialog/Trigger/Button.tsx
|
|
3183
|
-
import { IconButton as
|
|
3361
|
+
import { IconButton as IconButton5 } from "@radix-ui/themes";
|
|
3184
3362
|
import { ChatBubbleIcon } from "@radix-ui/react-icons";
|
|
3185
|
-
import { jsx as
|
|
3363
|
+
import { jsx as jsx61 } from "react/jsx-runtime";
|
|
3186
3364
|
var Button3 = function() {
|
|
3187
|
-
return /* @__PURE__ */
|
|
3365
|
+
return /* @__PURE__ */ jsx61(IconButton5, {
|
|
3188
3366
|
size: "4",
|
|
3189
3367
|
radius: "full",
|
|
3190
|
-
children: /* @__PURE__ */
|
|
3368
|
+
children: /* @__PURE__ */ jsx61(ChatBubbleIcon, {})
|
|
3191
3369
|
});
|
|
3192
3370
|
};
|
|
3193
3371
|
// src/components/threads/ThreadDialog/Trigger/index.tsx
|
|
3194
|
-
import { jsx as
|
|
3372
|
+
import { jsx as jsx62 } from "react/jsx-runtime";
|
|
3195
3373
|
var Root10 = function(param) {
|
|
3196
3374
|
var children = param.children, _param_style = param.style, style = _param_style === void 0 ? {} : _param_style;
|
|
3197
3375
|
var _useThreadDialogContext = useThreadDialogContext(), setIsOpen = _useThreadDialogContext.setIsOpen, isOpen = _useThreadDialogContext.isOpen;
|
|
3198
|
-
return /* @__PURE__ */
|
|
3376
|
+
return /* @__PURE__ */ jsx62(Flex22, {
|
|
3199
3377
|
display: {
|
|
3200
3378
|
initial: isOpen ? "none" : "flex",
|
|
3201
3379
|
sm: "flex"
|
|
@@ -3219,21 +3397,21 @@ var Root10 = function(param) {
|
|
|
3219
3397
|
});
|
|
3220
3398
|
};
|
|
3221
3399
|
var Trigger = function(args) {
|
|
3222
|
-
return /* @__PURE__ */
|
|
3223
|
-
children: /* @__PURE__ */
|
|
3400
|
+
return /* @__PURE__ */ jsx62(Root10, _object_spread_props(_object_spread({}, args), {
|
|
3401
|
+
children: /* @__PURE__ */ jsx62(Button3, {})
|
|
3224
3402
|
}));
|
|
3225
3403
|
};
|
|
3226
3404
|
Trigger.Root = Root10;
|
|
3227
3405
|
Trigger.Button = Button3;
|
|
3228
3406
|
// src/components/threads/ThreadDialog/Content/index.tsx
|
|
3229
|
-
import { Card as Card4, Inset, Flex as
|
|
3407
|
+
import { Card as Card4, Inset, Flex as Flex24 } from "@radix-ui/themes";
|
|
3230
3408
|
// src/components/threads/ThreadDialog/Close/index.tsx
|
|
3231
3409
|
import { Cross1Icon } from "@radix-ui/react-icons";
|
|
3232
|
-
import { IconButton as
|
|
3233
|
-
import { jsx as
|
|
3410
|
+
import { IconButton as IconButton6, Flex as Flex23 } from "@radix-ui/themes";
|
|
3411
|
+
import { jsx as jsx63 } from "react/jsx-runtime";
|
|
3234
3412
|
var Close = function() {
|
|
3235
3413
|
var _useThreadDialogContext = useThreadDialogContext(), setIsOpen = _useThreadDialogContext.setIsOpen, isOpen = _useThreadDialogContext.isOpen;
|
|
3236
|
-
return /* @__PURE__ */
|
|
3414
|
+
return /* @__PURE__ */ jsx63(Flex23, {
|
|
3237
3415
|
display: {
|
|
3238
3416
|
initial: isOpen ? "flex" : "none",
|
|
3239
3417
|
sm: "none"
|
|
@@ -3253,20 +3431,20 @@ var Close = function() {
|
|
|
3253
3431
|
style: {
|
|
3254
3432
|
zIndex: 9999999999
|
|
3255
3433
|
},
|
|
3256
|
-
children: /* @__PURE__ */
|
|
3434
|
+
children: /* @__PURE__ */ jsx63(IconButton6, {
|
|
3257
3435
|
size: "2",
|
|
3258
3436
|
variant: "soft",
|
|
3259
|
-
children: /* @__PURE__ */
|
|
3437
|
+
children: /* @__PURE__ */ jsx63(Cross1Icon, {})
|
|
3260
3438
|
})
|
|
3261
3439
|
});
|
|
3262
3440
|
};
|
|
3263
3441
|
// src/components/threads/ThreadDialog/Content/index.tsx
|
|
3264
|
-
import { jsx as
|
|
3442
|
+
import { jsx as jsx64, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
3265
3443
|
var Root11 = function(param) {
|
|
3266
3444
|
var children = param.children, _param_style = param.style, style = _param_style === void 0 ? {} : _param_style;
|
|
3267
3445
|
var isOpen = useThreadDialogContext().isOpen;
|
|
3268
3446
|
if (!isOpen) return null;
|
|
3269
|
-
return /* @__PURE__ */
|
|
3447
|
+
return /* @__PURE__ */ jsx64(Flex24, {
|
|
3270
3448
|
direction: "column",
|
|
3271
3449
|
justify: "end",
|
|
3272
3450
|
position: "fixed",
|
|
@@ -3294,7 +3472,7 @@ var Root11 = function(param) {
|
|
|
3294
3472
|
style: _object_spread({
|
|
3295
3473
|
zIndex: 9999999999
|
|
3296
3474
|
}, style),
|
|
3297
|
-
children: /* @__PURE__ */
|
|
3475
|
+
children: /* @__PURE__ */ jsxs23(Card4, {
|
|
3298
3476
|
mb: {
|
|
3299
3477
|
initial: void 0,
|
|
3300
3478
|
sm: "3"
|
|
@@ -3305,7 +3483,7 @@ var Root11 = function(param) {
|
|
|
3305
3483
|
flexGrow: 1
|
|
3306
3484
|
},
|
|
3307
3485
|
children: [
|
|
3308
|
-
/* @__PURE__ */
|
|
3486
|
+
/* @__PURE__ */ jsx64(Inset, {
|
|
3309
3487
|
clip: "padding-box",
|
|
3310
3488
|
side: "all",
|
|
3311
3489
|
pb: "current",
|
|
@@ -3315,13 +3493,13 @@ var Root11 = function(param) {
|
|
|
3315
3493
|
},
|
|
3316
3494
|
children: children
|
|
3317
3495
|
}),
|
|
3318
|
-
/* @__PURE__ */
|
|
3496
|
+
/* @__PURE__ */ jsx64(Close, {})
|
|
3319
3497
|
]
|
|
3320
3498
|
})
|
|
3321
3499
|
});
|
|
3322
3500
|
};
|
|
3323
3501
|
var Messages2 = function() {
|
|
3324
|
-
return /* @__PURE__ */
|
|
3502
|
+
return /* @__PURE__ */ jsx64(Thread.Messages, {
|
|
3325
3503
|
style: {
|
|
3326
3504
|
paddingTop: "var(--space-5)",
|
|
3327
3505
|
paddingRight: "var(--space-5)",
|
|
@@ -3331,7 +3509,7 @@ var Messages2 = function() {
|
|
|
3331
3509
|
};
|
|
3332
3510
|
var FormContainer = function(param) {
|
|
3333
3511
|
var children = param.children;
|
|
3334
|
-
return /* @__PURE__ */
|
|
3512
|
+
return /* @__PURE__ */ jsx64(Flex24, {
|
|
3335
3513
|
direction: "column",
|
|
3336
3514
|
pl: "5",
|
|
3337
3515
|
pr: "5",
|
|
@@ -3342,13 +3520,13 @@ var FormContainer = function(param) {
|
|
|
3342
3520
|
};
|
|
3343
3521
|
var Content4 = function(param) {
|
|
3344
3522
|
var _param_style = param.style, style = _param_style === void 0 ? {} : _param_style;
|
|
3345
|
-
return /* @__PURE__ */
|
|
3523
|
+
return /* @__PURE__ */ jsx64(Root11, {
|
|
3346
3524
|
style: style,
|
|
3347
|
-
children: /* @__PURE__ */
|
|
3525
|
+
children: /* @__PURE__ */ jsxs23(Thread.Root, {
|
|
3348
3526
|
children: [
|
|
3349
|
-
/* @__PURE__ */
|
|
3350
|
-
/* @__PURE__ */
|
|
3351
|
-
children: /* @__PURE__ */
|
|
3527
|
+
/* @__PURE__ */ jsx64(Messages2, {}),
|
|
3528
|
+
/* @__PURE__ */ jsx64(FormContainer, {
|
|
3529
|
+
children: /* @__PURE__ */ jsx64(Thread.MessageForm, {})
|
|
3352
3530
|
})
|
|
3353
3531
|
]
|
|
3354
3532
|
})
|
|
@@ -3358,12 +3536,12 @@ Content4.Root = Root11;
|
|
|
3358
3536
|
Content4.Messages = Messages2;
|
|
3359
3537
|
Content4.FormContainer = FormContainer;
|
|
3360
3538
|
// src/components/threads/ThreadDialog/index.tsx
|
|
3361
|
-
import { jsx as
|
|
3539
|
+
import { jsx as jsx65, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
3362
3540
|
var ThreadDialog = function() {
|
|
3363
|
-
return /* @__PURE__ */
|
|
3541
|
+
return /* @__PURE__ */ jsxs24(Root9, {
|
|
3364
3542
|
children: [
|
|
3365
|
-
/* @__PURE__ */
|
|
3366
|
-
/* @__PURE__ */
|
|
3543
|
+
/* @__PURE__ */ jsx65(Content4, {}),
|
|
3544
|
+
/* @__PURE__ */ jsx65(Trigger, {})
|
|
3367
3545
|
]
|
|
3368
3546
|
});
|
|
3369
3547
|
};
|
|
@@ -3372,7 +3550,7 @@ ThreadDialog.Trigger = Trigger;
|
|
|
3372
3550
|
ThreadDialog.Content = Content4;
|
|
3373
3551
|
// src/components/threads/AudioThread/Root/index.tsx
|
|
3374
3552
|
import "regenerator-runtime/runtime";
|
|
3375
|
-
import { Flex as
|
|
3553
|
+
import { Flex as Flex25 } from "@radix-ui/themes";
|
|
3376
3554
|
// src/contexts/threads/AudioThreadContext/index.ts
|
|
3377
3555
|
import { createContext as createContext12 } from "react";
|
|
3378
3556
|
var AudioThreadContext = createContext12({
|
|
@@ -3809,7 +3987,7 @@ var useMessageAudio = function(param) {
|
|
|
3809
3987
|
});
|
|
3810
3988
|
};
|
|
3811
3989
|
// src/components/threads/AudioThread/Root/index.tsx
|
|
3812
|
-
import { jsx as
|
|
3990
|
+
import { jsx as jsx66 } from "react/jsx-runtime";
|
|
3813
3991
|
var Root12 = function(param) {
|
|
3814
3992
|
var children = param.children;
|
|
3815
3993
|
var createMessageProps = useCreateMessage();
|
|
@@ -3867,13 +4045,13 @@ var Root12 = function(param) {
|
|
|
3867
4045
|
createMessageProps: createMessageProps,
|
|
3868
4046
|
messageAudioProps: messageAudioProps
|
|
3869
4047
|
}).status;
|
|
3870
|
-
return /* @__PURE__ */
|
|
4048
|
+
return /* @__PURE__ */ jsx66(AudioThreadContext.Provider, {
|
|
3871
4049
|
value: {
|
|
3872
4050
|
status: status,
|
|
3873
4051
|
recorderProps: recorderProps,
|
|
3874
4052
|
messageAudioProps: messageAudioProps
|
|
3875
4053
|
},
|
|
3876
|
-
children: /* @__PURE__ */
|
|
4054
|
+
children: /* @__PURE__ */ jsx66(Flex25, {
|
|
3877
4055
|
direction: "column",
|
|
3878
4056
|
flexGrow: "1",
|
|
3879
4057
|
p: "9",
|
|
@@ -3884,7 +4062,7 @@ var Root12 = function(param) {
|
|
|
3884
4062
|
// src/components/threads/AudioThread/Visualization/index.tsx
|
|
3885
4063
|
import { useContext as useContext15, useState as useState7, useCallback as useCallback6, useEffect as useEffect7 } from "react";
|
|
3886
4064
|
import _9 from "lodash";
|
|
3887
|
-
import { Flex as
|
|
4065
|
+
import { Flex as Flex27 } from "@radix-ui/themes";
|
|
3888
4066
|
// src/hooks/threads/useAudioThreadContext/index.ts
|
|
3889
4067
|
import { useContext as useContext14 } from "react";
|
|
3890
4068
|
var useAudioThreadContext = function() {
|
|
@@ -3892,10 +4070,10 @@ var useAudioThreadContext = function() {
|
|
|
3892
4070
|
};
|
|
3893
4071
|
// src/components/threads/AudioThread/BarsVisualizer/index.tsx
|
|
3894
4072
|
import _8 from "lodash";
|
|
3895
|
-
import { Flex as
|
|
4073
|
+
import { Flex as Flex26, Grid } from "@radix-ui/themes";
|
|
3896
4074
|
import { useState as useState6, useEffect as useEffect6, useCallback as useCallback5 } from "react";
|
|
3897
4075
|
import { cluster } from "radash";
|
|
3898
|
-
import { jsx as
|
|
4076
|
+
import { jsx as jsx67 } from "react/jsx-runtime";
|
|
3899
4077
|
var barCount = 4;
|
|
3900
4078
|
var BarsVisualizer = function(param) {
|
|
3901
4079
|
var visualizationAnalyser = param.visualizationAnalyser, backgroundColor = param.backgroundColor, height = param.height, barWidth = param.barWidth;
|
|
@@ -3926,7 +4104,7 @@ var BarsVisualizer = function(param) {
|
|
|
3926
4104
|
draw,
|
|
3927
4105
|
visualizationAnalyser
|
|
3928
4106
|
]);
|
|
3929
|
-
return /* @__PURE__ */
|
|
4107
|
+
return /* @__PURE__ */ jsx67(Grid, {
|
|
3930
4108
|
columns: "".concat(barCount),
|
|
3931
4109
|
gap: "1",
|
|
3932
4110
|
width: "auto",
|
|
@@ -3935,12 +4113,12 @@ var BarsVisualizer = function(param) {
|
|
|
3935
4113
|
gridTemplateColumns: "repeat(4, minmax(0, 1fr))"
|
|
3936
4114
|
},
|
|
3937
4115
|
children: barHeights.map(function(barHeight, index) {
|
|
3938
|
-
return /* @__PURE__ */
|
|
4116
|
+
return /* @__PURE__ */ jsx67(Flex26, {
|
|
3939
4117
|
direction: "column",
|
|
3940
4118
|
align: "center",
|
|
3941
4119
|
justify: "center",
|
|
3942
4120
|
height: height,
|
|
3943
|
-
children: /* @__PURE__ */
|
|
4121
|
+
children: /* @__PURE__ */ jsx67(Flex26, {
|
|
3944
4122
|
minHeight: "50%",
|
|
3945
4123
|
maxHeight: "100%",
|
|
3946
4124
|
height: "".concat(barHeight + 20, "%"),
|
|
@@ -3955,7 +4133,7 @@ var BarsVisualizer = function(param) {
|
|
|
3955
4133
|
});
|
|
3956
4134
|
};
|
|
3957
4135
|
// src/components/threads/AudioThread/Visualization/index.tsx
|
|
3958
|
-
import { jsx as
|
|
4136
|
+
import { jsx as jsx68, jsxs as jsxs25 } from "react/jsx-runtime";
|
|
3959
4137
|
var Visualization = function() {
|
|
3960
4138
|
var audioThreadContext = useAudioThreadContext();
|
|
3961
4139
|
var assistantNameContext = useContext15(AssistantNameContext);
|
|
@@ -3983,14 +4161,14 @@ var Visualization = function() {
|
|
|
3983
4161
|
draw,
|
|
3984
4162
|
audioThreadContext
|
|
3985
4163
|
]);
|
|
3986
|
-
return /* @__PURE__ */
|
|
4164
|
+
return /* @__PURE__ */ jsxs25(Flex27, {
|
|
3987
4165
|
direction: "column",
|
|
3988
4166
|
align: "center",
|
|
3989
4167
|
justify: "center",
|
|
3990
4168
|
mb: "3",
|
|
3991
4169
|
flexGrow: "1",
|
|
3992
4170
|
children: [
|
|
3993
|
-
/* @__PURE__ */
|
|
4171
|
+
/* @__PURE__ */ jsx68(Flex27, {
|
|
3994
4172
|
align: "center",
|
|
3995
4173
|
justify: "center",
|
|
3996
4174
|
height: "200px",
|
|
@@ -4000,20 +4178,20 @@ var Visualization = function() {
|
|
|
4000
4178
|
borderRadius: "9999px",
|
|
4001
4179
|
scale: scale
|
|
4002
4180
|
},
|
|
4003
|
-
children: /* @__PURE__ */
|
|
4181
|
+
children: /* @__PURE__ */ jsx68(BarsVisualizer, {
|
|
4004
4182
|
visualizationAnalyser: audioThreadContext.messageAudioProps.visualizationAnalyser,
|
|
4005
4183
|
backgroundColor: audioThreadContext.status === "playing" ? "var(--accent-11)" : "var(--gray-11)",
|
|
4006
4184
|
height: "40px",
|
|
4007
4185
|
barWidth: "24px"
|
|
4008
4186
|
})
|
|
4009
4187
|
}),
|
|
4010
|
-
/* @__PURE__ */
|
|
4188
|
+
/* @__PURE__ */ jsxs25(Flex27, {
|
|
4011
4189
|
ml: "-22.5px",
|
|
4012
4190
|
gap: "3",
|
|
4013
4191
|
pt: "5",
|
|
4014
4192
|
children: [
|
|
4015
|
-
/* @__PURE__ */
|
|
4016
|
-
/* @__PURE__ */
|
|
4193
|
+
/* @__PURE__ */ jsx68(AssistantAvatar, {}),
|
|
4194
|
+
/* @__PURE__ */ jsx68(Name, {
|
|
4017
4195
|
children: assistantNameContext
|
|
4018
4196
|
})
|
|
4019
4197
|
]
|
|
@@ -4022,8 +4200,8 @@ var Visualization = function() {
|
|
|
4022
4200
|
});
|
|
4023
4201
|
};
|
|
4024
4202
|
// src/components/threads/AudioThread/Status/StatusMessages.tsx
|
|
4025
|
-
import { Flex as
|
|
4026
|
-
import { jsx as
|
|
4203
|
+
import { Flex as Flex28, Text as Text9 } from "@radix-ui/themes";
|
|
4204
|
+
import { jsx as jsx69, jsxs as jsxs26 } from "react/jsx-runtime";
|
|
4027
4205
|
var html = function(param) {
|
|
4028
4206
|
var texts = param.texts;
|
|
4029
4207
|
return "\n .status-messages-texts:after {\n content: '".concat(texts[0], "';\n animation: texts ").concat(texts.length * 5, "s linear infinite;\n }\n\n @keyframes texts {\n ").concat(texts.map(function(_10, i) {
|
|
@@ -4032,17 +4210,17 @@ var html = function(param) {
|
|
|
4032
4210
|
};
|
|
4033
4211
|
var StatusMessages = function(param) {
|
|
4034
4212
|
var texts = param.texts;
|
|
4035
|
-
return /* @__PURE__ */
|
|
4213
|
+
return /* @__PURE__ */ jsxs26(Flex28, {
|
|
4036
4214
|
justify: "center",
|
|
4037
4215
|
pb: "5",
|
|
4038
4216
|
children: [
|
|
4039
|
-
/* @__PURE__ */
|
|
4217
|
+
/* @__PURE__ */ jsx69(Text9, {
|
|
4040
4218
|
size: "2",
|
|
4041
4219
|
weight: "regular",
|
|
4042
4220
|
color: "gray",
|
|
4043
4221
|
className: "status-messages-texts"
|
|
4044
4222
|
}),
|
|
4045
|
-
/* @__PURE__ */
|
|
4223
|
+
/* @__PURE__ */ jsx69("style", {
|
|
4046
4224
|
dangerouslySetInnerHTML: {
|
|
4047
4225
|
__html: html({
|
|
4048
4226
|
texts: texts
|
|
@@ -4053,11 +4231,11 @@ var StatusMessages = function(param) {
|
|
|
4053
4231
|
});
|
|
4054
4232
|
};
|
|
4055
4233
|
// src/components/threads/AudioThread/Status/index.tsx
|
|
4056
|
-
import { jsx as
|
|
4234
|
+
import { jsx as jsx70 } from "react/jsx-runtime";
|
|
4057
4235
|
var Status = function() {
|
|
4058
4236
|
var audioThreadContext = useAudioThreadContext();
|
|
4059
4237
|
if (audioThreadContext.status === "recording") {
|
|
4060
|
-
return /* @__PURE__ */
|
|
4238
|
+
return /* @__PURE__ */ jsx70(StatusMessages, {
|
|
4061
4239
|
texts: [
|
|
4062
4240
|
"Start speaking",
|
|
4063
4241
|
"Listening",
|
|
@@ -4071,31 +4249,31 @@ var Status = function() {
|
|
|
4071
4249
|
"idle",
|
|
4072
4250
|
"playerPaused"
|
|
4073
4251
|
].includes(audioThreadContext.status)) {
|
|
4074
|
-
return /* @__PURE__ */
|
|
4252
|
+
return /* @__PURE__ */ jsx70(StatusMessages, {
|
|
4075
4253
|
texts: [
|
|
4076
4254
|
"Click the button below to activate"
|
|
4077
4255
|
]
|
|
4078
4256
|
});
|
|
4079
4257
|
}
|
|
4080
4258
|
if (audioThreadContext.status === "playing") {
|
|
4081
|
-
return /* @__PURE__ */
|
|
4259
|
+
return /* @__PURE__ */ jsx70(StatusMessages, {
|
|
4082
4260
|
texts: [
|
|
4083
4261
|
"Click the button below to interrupt"
|
|
4084
4262
|
]
|
|
4085
4263
|
});
|
|
4086
4264
|
}
|
|
4087
|
-
return /* @__PURE__ */
|
|
4265
|
+
return /* @__PURE__ */ jsx70(StatusMessages, {
|
|
4088
4266
|
texts: [
|
|
4089
4267
|
"Thinking"
|
|
4090
4268
|
]
|
|
4091
4269
|
});
|
|
4092
4270
|
};
|
|
4093
4271
|
// src/components/threads/AudioThread/Form/index.tsx
|
|
4094
|
-
import { Flex as
|
|
4272
|
+
import { Flex as Flex30 } from "@radix-ui/themes";
|
|
4095
4273
|
// src/components/threads/AudioThread/Form/MicIcon.tsx
|
|
4096
|
-
import { jsx as
|
|
4274
|
+
import { jsx as jsx71 } from "react/jsx-runtime";
|
|
4097
4275
|
var MicIcon = function(props) {
|
|
4098
|
-
return /* @__PURE__ */
|
|
4276
|
+
return /* @__PURE__ */ jsx71("svg", _object_spread_props(_object_spread({
|
|
4099
4277
|
xmlns: "http://www.w3.org/2000/svg",
|
|
4100
4278
|
fill: "currentColor",
|
|
4101
4279
|
stroke: "currentColor",
|
|
@@ -4104,54 +4282,54 @@ var MicIcon = function(props) {
|
|
|
4104
4282
|
height: "15",
|
|
4105
4283
|
width: "15"
|
|
4106
4284
|
}, props), {
|
|
4107
|
-
children: /* @__PURE__ */
|
|
4285
|
+
children: /* @__PURE__ */ jsx71("path", {
|
|
4108
4286
|
stroke: "none",
|
|
4109
4287
|
d: "M192 0c-53 0-96 43-96 96v160c0 53 43 96 96 96s96-43 96-96V96c0-53-43-96-96-96zM64 216c0-13.3-10.7-24-24-24s-24 10.7-24 24v40c0 89.1 66.2 162.7 152 174.4V464h-48c-13.3 0-24 10.7-24 24s10.7 24 24 24h144c13.3 0 24-10.7 24-24s-10.7-24-24-24h-48v-33.6c85.8-11.7 152-85.3 152-174.4v-40c0-13.3-10.7-24-24-24s-24 10.7-24 24v40c0 70.7-57.3 128-128 128S64 326.7 64 256v-40z"
|
|
4110
4288
|
})
|
|
4111
4289
|
}));
|
|
4112
4290
|
};
|
|
4113
4291
|
// src/components/threads/AudioThread/Form/ActionButton/index.tsx
|
|
4114
|
-
import { Flex as
|
|
4292
|
+
import { Flex as Flex29, IconButton as IconButton7 } from "@radix-ui/themes";
|
|
4115
4293
|
import { StopIcon as StopIcon2, PauseIcon, ArrowUpIcon as ArrowUpIcon2, ResumeIcon } from "@radix-ui/react-icons";
|
|
4116
|
-
import { jsx as
|
|
4294
|
+
import { jsx as jsx72, jsxs as jsxs27 } from "react/jsx-runtime";
|
|
4117
4295
|
var ActionButton = function() {
|
|
4118
4296
|
var audioThreadContext = useAudioThreadContext();
|
|
4119
4297
|
var superinterfaceContext = useSuperinterfaceContext();
|
|
4120
4298
|
if (audioThreadContext.status === "recording") {
|
|
4121
|
-
return /* @__PURE__ */
|
|
4299
|
+
return /* @__PURE__ */ jsxs27(Flex29, {
|
|
4122
4300
|
align: "center",
|
|
4123
4301
|
children: [
|
|
4124
|
-
/* @__PURE__ */
|
|
4302
|
+
/* @__PURE__ */ jsx72(Flex29, {
|
|
4125
4303
|
mr: "3",
|
|
4126
4304
|
ml: "-7",
|
|
4127
|
-
children: /* @__PURE__ */
|
|
4305
|
+
children: /* @__PURE__ */ jsx72(IconButton7, {
|
|
4128
4306
|
onClick: audioThreadContext.recorderProps.pause,
|
|
4129
4307
|
color: "gray",
|
|
4130
4308
|
variant: "soft",
|
|
4131
4309
|
size: "1",
|
|
4132
|
-
children: /* @__PURE__ */
|
|
4310
|
+
children: /* @__PURE__ */ jsx72(PauseIcon, {})
|
|
4133
4311
|
})
|
|
4134
4312
|
}),
|
|
4135
|
-
/* @__PURE__ */
|
|
4313
|
+
/* @__PURE__ */ jsx72(IconButton7, {
|
|
4136
4314
|
onClick: audioThreadContext.recorderProps.stop,
|
|
4137
4315
|
highContrast: true,
|
|
4138
4316
|
variant: "soft",
|
|
4139
4317
|
size: "4",
|
|
4140
|
-
children: /* @__PURE__ */
|
|
4318
|
+
children: /* @__PURE__ */ jsx72(ArrowUpIcon2, {})
|
|
4141
4319
|
})
|
|
4142
4320
|
]
|
|
4143
4321
|
});
|
|
4144
4322
|
}
|
|
4145
4323
|
if (audioThreadContext.status === "recorderPaused") {
|
|
4146
|
-
return /* @__PURE__ */
|
|
4324
|
+
return /* @__PURE__ */ jsx72(IconButton7, {
|
|
4147
4325
|
onClick: audioThreadContext.recorderProps.resume,
|
|
4148
4326
|
color: "red",
|
|
4149
4327
|
size: "4",
|
|
4150
|
-
children: /* @__PURE__ */
|
|
4328
|
+
children: /* @__PURE__ */ jsx72(ResumeIcon, {})
|
|
4151
4329
|
});
|
|
4152
4330
|
}
|
|
4153
4331
|
if (audioThreadContext.status === "idle") {
|
|
4154
|
-
return /* @__PURE__ */
|
|
4332
|
+
return /* @__PURE__ */ jsx72(IconButton7, {
|
|
4155
4333
|
onClick: function() {
|
|
4156
4334
|
return audioThreadContext.recorderProps.start();
|
|
4157
4335
|
},
|
|
@@ -4160,7 +4338,7 @@ var ActionButton = function() {
|
|
|
4160
4338
|
});
|
|
4161
4339
|
}
|
|
4162
4340
|
if (audioThreadContext.status === "playing") {
|
|
4163
|
-
return /* @__PURE__ */
|
|
4341
|
+
return /* @__PURE__ */ jsx72(IconButton7, {
|
|
4164
4342
|
onClick: function() {
|
|
4165
4343
|
var _superinterfaceContext_createMessageAbortControllerRef_current;
|
|
4166
4344
|
audioThreadContext.messageAudioProps.stop();
|
|
@@ -4170,54 +4348,54 @@ var ActionButton = function() {
|
|
|
4170
4348
|
size: "4",
|
|
4171
4349
|
color: "gray",
|
|
4172
4350
|
variant: "soft",
|
|
4173
|
-
children: /* @__PURE__ */
|
|
4351
|
+
children: /* @__PURE__ */ jsx72(StopIcon2, {})
|
|
4174
4352
|
});
|
|
4175
4353
|
}
|
|
4176
4354
|
if (audioThreadContext.status === "playerPaused") {
|
|
4177
|
-
return /* @__PURE__ */
|
|
4355
|
+
return /* @__PURE__ */ jsx72(IconButton7, {
|
|
4178
4356
|
onClick: function() {
|
|
4179
4357
|
return audioThreadContext.messageAudioProps.play();
|
|
4180
4358
|
},
|
|
4181
4359
|
size: "4",
|
|
4182
|
-
children: /* @__PURE__ */
|
|
4360
|
+
children: /* @__PURE__ */ jsx72(ResumeIcon, {})
|
|
4183
4361
|
});
|
|
4184
4362
|
}
|
|
4185
|
-
return /* @__PURE__ */
|
|
4363
|
+
return /* @__PURE__ */ jsx72(IconButton7, {
|
|
4186
4364
|
size: "4",
|
|
4187
4365
|
variant: "soft",
|
|
4188
4366
|
disabled: true
|
|
4189
4367
|
});
|
|
4190
4368
|
};
|
|
4191
4369
|
// src/components/threads/AudioThread/Form/index.tsx
|
|
4192
|
-
import { jsx as
|
|
4370
|
+
import { jsx as jsx73, jsxs as jsxs28 } from "react/jsx-runtime";
|
|
4193
4371
|
var Form = function() {
|
|
4194
4372
|
var audioThreadContext = useAudioThreadContext();
|
|
4195
|
-
return /* @__PURE__ */
|
|
4373
|
+
return /* @__PURE__ */ jsxs28(Flex30, {
|
|
4196
4374
|
direction: "column",
|
|
4197
4375
|
align: "center",
|
|
4198
4376
|
children: [
|
|
4199
|
-
/* @__PURE__ */
|
|
4377
|
+
/* @__PURE__ */ jsxs28(Flex30, {
|
|
4200
4378
|
pb: "3",
|
|
4201
4379
|
align: "center",
|
|
4202
4380
|
children: [
|
|
4203
|
-
/* @__PURE__ */
|
|
4381
|
+
/* @__PURE__ */ jsx73(Flex30, {
|
|
4204
4382
|
ml: "-22.5px",
|
|
4205
4383
|
mr: "2",
|
|
4206
4384
|
align: "center",
|
|
4207
|
-
children: /* @__PURE__ */
|
|
4385
|
+
children: /* @__PURE__ */ jsx73(MicIcon, {
|
|
4208
4386
|
style: {
|
|
4209
4387
|
color: audioThreadContext.status === "recording" ? "var(--accent-11)" : "var(--gray-11)"
|
|
4210
4388
|
}
|
|
4211
4389
|
})
|
|
4212
4390
|
}),
|
|
4213
|
-
/* @__PURE__ */
|
|
4391
|
+
/* @__PURE__ */ jsx73(Flex30, {
|
|
4214
4392
|
px: "2",
|
|
4215
4393
|
py: "1",
|
|
4216
4394
|
style: {
|
|
4217
4395
|
backgroundColor: audioThreadContext.status === "recording" ? "var(--accent-4)" : "var(--gray-4)",
|
|
4218
4396
|
borderRadius: "var(--radius-6)"
|
|
4219
4397
|
},
|
|
4220
|
-
children: /* @__PURE__ */
|
|
4398
|
+
children: /* @__PURE__ */ jsx73(BarsVisualizer, {
|
|
4221
4399
|
visualizationAnalyser: audioThreadContext.recorderProps.visualizationAnalyser,
|
|
4222
4400
|
backgroundColor: audioThreadContext.status === "recording" ? "var(--accent-11)" : "var(--gray-11)",
|
|
4223
4401
|
height: "20px",
|
|
@@ -4226,18 +4404,18 @@ var Form = function() {
|
|
|
4226
4404
|
})
|
|
4227
4405
|
]
|
|
4228
4406
|
}),
|
|
4229
|
-
/* @__PURE__ */
|
|
4407
|
+
/* @__PURE__ */ jsx73(ActionButton, {})
|
|
4230
4408
|
]
|
|
4231
4409
|
});
|
|
4232
4410
|
};
|
|
4233
4411
|
// src/components/threads/AudioThread/index.tsx
|
|
4234
|
-
import { jsx as
|
|
4412
|
+
import { jsx as jsx74, jsxs as jsxs29 } from "react/jsx-runtime";
|
|
4235
4413
|
var AudioThread = function(props) {
|
|
4236
|
-
return /* @__PURE__ */
|
|
4414
|
+
return /* @__PURE__ */ jsxs29(Root12, _object_spread_props(_object_spread({}, props), {
|
|
4237
4415
|
children: [
|
|
4238
|
-
/* @__PURE__ */
|
|
4239
|
-
/* @__PURE__ */
|
|
4240
|
-
/* @__PURE__ */
|
|
4416
|
+
/* @__PURE__ */ jsx74(Visualization, {}),
|
|
4417
|
+
/* @__PURE__ */ jsx74(Status, {}),
|
|
4418
|
+
/* @__PURE__ */ jsx74(Form, {})
|
|
4241
4419
|
]
|
|
4242
4420
|
}));
|
|
4243
4421
|
};
|
|
@@ -4245,14 +4423,14 @@ AudioThread.Root = Root12;
|
|
|
4245
4423
|
AudioThread.Visualization = Visualization;
|
|
4246
4424
|
AudioThread.Form = Form;
|
|
4247
4425
|
// src/components/threads/AudioThreadDialog/index.tsx
|
|
4248
|
-
import { jsx as
|
|
4426
|
+
import { jsx as jsx75, jsxs as jsxs30 } from "react/jsx-runtime";
|
|
4249
4427
|
var AudioThreadDialog = function() {
|
|
4250
|
-
return /* @__PURE__ */
|
|
4428
|
+
return /* @__PURE__ */ jsxs30(Root9, {
|
|
4251
4429
|
children: [
|
|
4252
|
-
/* @__PURE__ */
|
|
4253
|
-
children: /* @__PURE__ */
|
|
4430
|
+
/* @__PURE__ */ jsx75(Content4.Root, {
|
|
4431
|
+
children: /* @__PURE__ */ jsx75(AudioThread, {})
|
|
4254
4432
|
}),
|
|
4255
|
-
/* @__PURE__ */
|
|
4433
|
+
/* @__PURE__ */ jsx75(Trigger, {})
|
|
4256
4434
|
]
|
|
4257
4435
|
});
|
|
4258
4436
|
};
|
|
@@ -4265,15 +4443,15 @@ import { useMemo as useMemo14 } from "react";
|
|
|
4265
4443
|
import { useMemo as useMemo13 } from "react";
|
|
4266
4444
|
import { isEmpty as isEmpty3 } from "radash";
|
|
4267
4445
|
import { onlyText } from "react-children-utilities";
|
|
4268
|
-
import { Flex as
|
|
4446
|
+
import { Flex as Flex31 } from "@radix-ui/themes";
|
|
4269
4447
|
// src/components/suggestions/Suggestions/Item.tsx
|
|
4270
4448
|
import { ArrowUpIcon as ArrowUpIcon3 } from "@radix-ui/react-icons";
|
|
4271
|
-
import { Text as
|
|
4272
|
-
import { jsx as
|
|
4449
|
+
import { Text as Text10, Button as Button4, Spinner as Spinner2 } from "@radix-ui/themes";
|
|
4450
|
+
import { jsx as jsx76, jsxs as jsxs31 } from "react/jsx-runtime";
|
|
4273
4451
|
var Item = function(param) {
|
|
4274
4452
|
var suggestion = param.suggestion, isDisabled = param.isDisabled;
|
|
4275
4453
|
var _useCreateMessage = useCreateMessage(), createMessage = _useCreateMessage.createMessage, isPending = _useCreateMessage.isPending;
|
|
4276
|
-
return /* @__PURE__ */
|
|
4454
|
+
return /* @__PURE__ */ jsx76(Content5, {
|
|
4277
4455
|
onClick: function() {
|
|
4278
4456
|
createMessage({
|
|
4279
4457
|
// @ts-ignore-next-line
|
|
@@ -4287,7 +4465,7 @@ var Item = function(param) {
|
|
|
4287
4465
|
};
|
|
4288
4466
|
var Content5 = function(param) {
|
|
4289
4467
|
var onClick = param.onClick, isDisabled = param.isDisabled, isPending = param.isPending, children = param.children;
|
|
4290
|
-
return /* @__PURE__ */
|
|
4468
|
+
return /* @__PURE__ */ jsxs31(Button4, {
|
|
4291
4469
|
variant: "soft",
|
|
4292
4470
|
onClick: onClick,
|
|
4293
4471
|
disabled: isDisabled,
|
|
@@ -4297,14 +4475,14 @@ var Content5 = function(param) {
|
|
|
4297
4475
|
flexShrink: 1
|
|
4298
4476
|
},
|
|
4299
4477
|
children: [
|
|
4300
|
-
/* @__PURE__ */
|
|
4478
|
+
/* @__PURE__ */ jsx76(Text10, {
|
|
4301
4479
|
size: "1",
|
|
4302
4480
|
weight: "regular",
|
|
4303
4481
|
children: children
|
|
4304
4482
|
}),
|
|
4305
|
-
/* @__PURE__ */
|
|
4483
|
+
/* @__PURE__ */ jsx76(Spinner2, {
|
|
4306
4484
|
loading: isPending,
|
|
4307
|
-
children: /* @__PURE__ */
|
|
4485
|
+
children: /* @__PURE__ */ jsx76(ArrowUpIcon3, {
|
|
4308
4486
|
style: {
|
|
4309
4487
|
flexShrink: 0
|
|
4310
4488
|
}
|
|
@@ -4315,7 +4493,7 @@ var Content5 = function(param) {
|
|
|
4315
4493
|
};
|
|
4316
4494
|
Item.Content = Content5;
|
|
4317
4495
|
// src/components/suggestions/Suggestions/Content.tsx
|
|
4318
|
-
import { jsx as
|
|
4496
|
+
import { jsx as jsx77 } from "react/jsx-runtime";
|
|
4319
4497
|
var Content6 = function(param) {
|
|
4320
4498
|
var children = param.children;
|
|
4321
4499
|
var isMutatingMessage = useIsMutatingMessage();
|
|
@@ -4329,12 +4507,12 @@ var Content6 = function(param) {
|
|
|
4329
4507
|
children
|
|
4330
4508
|
]);
|
|
4331
4509
|
if (isEmpty3(suggestions)) return null;
|
|
4332
|
-
return /* @__PURE__ */
|
|
4510
|
+
return /* @__PURE__ */ jsx77(Flex31, {
|
|
4333
4511
|
gap: "2",
|
|
4334
4512
|
py: "2",
|
|
4335
4513
|
wrap: "wrap",
|
|
4336
4514
|
children: suggestions.map(function(suggestion) {
|
|
4337
|
-
return /* @__PURE__ */
|
|
4515
|
+
return /* @__PURE__ */ jsx77(Item, {
|
|
4338
4516
|
suggestion: suggestion,
|
|
4339
4517
|
isDisabled: isMutatingMessage
|
|
4340
4518
|
}, suggestion);
|
|
@@ -4342,7 +4520,7 @@ var Content6 = function(param) {
|
|
|
4342
4520
|
});
|
|
4343
4521
|
};
|
|
4344
4522
|
// src/components/suggestions/Suggestions/index.tsx
|
|
4345
|
-
import { jsx as
|
|
4523
|
+
import { jsx as jsx78 } from "react/jsx-runtime";
|
|
4346
4524
|
var Suggestions = function(param) {
|
|
4347
4525
|
var children = param.children;
|
|
4348
4526
|
var latestMessageProps = useLatestMessage();
|
|
@@ -4355,14 +4533,14 @@ var Suggestions = function(param) {
|
|
|
4355
4533
|
]);
|
|
4356
4534
|
if (latestMessageProps.isLoading) return null;
|
|
4357
4535
|
if (isDisabled) return null;
|
|
4358
|
-
return /* @__PURE__ */
|
|
4536
|
+
return /* @__PURE__ */ jsx78(Content6, {
|
|
4359
4537
|
children: children
|
|
4360
4538
|
});
|
|
4361
4539
|
};
|
|
4362
4540
|
Suggestions.Item = Item;
|
|
4363
4541
|
// src/components/markdown/MarkdownProvider/index.tsx
|
|
4364
4542
|
import { useMemo as useMemo15 } from "react";
|
|
4365
|
-
import { jsx as
|
|
4543
|
+
import { jsx as jsx79 } from "react/jsx-runtime";
|
|
4366
4544
|
var MarkdownProvider = function(_param) {
|
|
4367
4545
|
var children = _param.children, rest = _object_without_properties(_param, [
|
|
4368
4546
|
"children"
|
|
@@ -4374,7 +4552,7 @@ var MarkdownProvider = function(_param) {
|
|
|
4374
4552
|
rest,
|
|
4375
4553
|
prevMarkdownContext
|
|
4376
4554
|
]);
|
|
4377
|
-
return /* @__PURE__ */
|
|
4555
|
+
return /* @__PURE__ */ jsx79(MarkdownContext.Provider, {
|
|
4378
4556
|
value: value,
|
|
4379
4557
|
children: children
|
|
4380
4558
|
});
|
|
@@ -4387,7 +4565,7 @@ var useComponents = function() {
|
|
|
4387
4565
|
return useContext16(ComponentsContext);
|
|
4388
4566
|
};
|
|
4389
4567
|
// src/components/components/ComponentsProvider.tsx
|
|
4390
|
-
import { jsx as
|
|
4568
|
+
import { jsx as jsx80 } from "react/jsx-runtime";
|
|
4391
4569
|
var ComponentsProvider = function(_param) {
|
|
4392
4570
|
var children = _param.children, rest = _object_without_properties(_param, [
|
|
4393
4571
|
"children"
|
|
@@ -4399,7 +4577,7 @@ var ComponentsProvider = function(_param) {
|
|
|
4399
4577
|
rest,
|
|
4400
4578
|
prevComponents
|
|
4401
4579
|
]);
|
|
4402
|
-
return /* @__PURE__ */
|
|
4580
|
+
return /* @__PURE__ */ jsx80(ComponentsContext.Provider, {
|
|
4403
4581
|
value: value,
|
|
4404
4582
|
children: children
|
|
4405
4583
|
});
|