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