@superinterface/react 2.24.5 → 2.25.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +447 -402
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +398 -353
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
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,13 +1339,27 @@ 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
|
import videoExtensions from "video-extensions";
|
|
1328
1365
|
var isVideoSrc = function(param) {
|
|
@@ -1335,21 +1372,21 @@ var isAudioSrc = function(param) {
|
|
|
1335
1372
|
return src.endsWith(".mp3") || src.endsWith(".wav");
|
|
1336
1373
|
};
|
|
1337
1374
|
// src/contexts/markdown/MarkdownContext/lib/components/Img/Video/index.tsx
|
|
1338
|
-
import { Flex as
|
|
1375
|
+
import { Flex as Flex12 } from "@radix-ui/themes";
|
|
1339
1376
|
import "@vidstack/react/player/styles/base.css";
|
|
1340
1377
|
import { MediaPlayer, MediaProvider, Controls } from "@vidstack/react";
|
|
1341
1378
|
// src/components/media/PlayButton.tsx
|
|
1342
1379
|
import { PlayButton as VidstackPlayButton, useMediaState } from "@vidstack/react";
|
|
1343
1380
|
import { IconButton } from "@radix-ui/themes";
|
|
1344
1381
|
import { PlayIcon, PauseIcon } from "@radix-ui/react-icons";
|
|
1345
|
-
import { jsx as
|
|
1382
|
+
import { jsx as jsx36 } from "react/jsx-runtime";
|
|
1346
1383
|
var PlayButton = function() {
|
|
1347
1384
|
var isPaused = useMediaState("paused");
|
|
1348
|
-
return /* @__PURE__ */
|
|
1385
|
+
return /* @__PURE__ */ jsx36(IconButton, {
|
|
1349
1386
|
variant: "ghost",
|
|
1350
1387
|
asChild: true,
|
|
1351
|
-
children: /* @__PURE__ */
|
|
1352
|
-
children: isPaused ? /* @__PURE__ */
|
|
1388
|
+
children: /* @__PURE__ */ jsx36(VidstackPlayButton, {
|
|
1389
|
+
children: isPaused ? /* @__PURE__ */ jsx36(PlayIcon, {}) : /* @__PURE__ */ jsx36(PauseIcon, {})
|
|
1353
1390
|
})
|
|
1354
1391
|
});
|
|
1355
1392
|
};
|
|
@@ -1357,27 +1394,27 @@ var PlayButton = function() {
|
|
|
1357
1394
|
import { MuteButton, useMediaState as useMediaState2, useMediaRemote } from "@vidstack/react";
|
|
1358
1395
|
import { IconButton as IconButton2, HoverCard, Slider } from "@radix-ui/themes";
|
|
1359
1396
|
import { SpeakerModerateIcon, SpeakerOffIcon } from "@radix-ui/react-icons";
|
|
1360
|
-
import { jsx as
|
|
1397
|
+
import { jsx as jsx37, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
1361
1398
|
var VolumeButton = function() {
|
|
1362
1399
|
var volume = useMediaState2("volume");
|
|
1363
1400
|
var isMuted = useMediaState2("muted");
|
|
1364
1401
|
var remote = useMediaRemote();
|
|
1365
|
-
return /* @__PURE__ */
|
|
1402
|
+
return /* @__PURE__ */ jsxs11(HoverCard.Root, {
|
|
1366
1403
|
children: [
|
|
1367
|
-
/* @__PURE__ */
|
|
1368
|
-
children: /* @__PURE__ */
|
|
1404
|
+
/* @__PURE__ */ jsx37(HoverCard.Trigger, {
|
|
1405
|
+
children: /* @__PURE__ */ jsx37(IconButton2, {
|
|
1369
1406
|
variant: "ghost",
|
|
1370
1407
|
asChild: true,
|
|
1371
|
-
children: /* @__PURE__ */
|
|
1372
|
-
children: isMuted || volume === 0 ? /* @__PURE__ */
|
|
1408
|
+
children: /* @__PURE__ */ jsx37(MuteButton, {
|
|
1409
|
+
children: isMuted || volume === 0 ? /* @__PURE__ */ jsx37(SpeakerOffIcon, {}) : /* @__PURE__ */ jsx37(SpeakerModerateIcon, {})
|
|
1373
1410
|
})
|
|
1374
1411
|
})
|
|
1375
1412
|
}),
|
|
1376
|
-
/* @__PURE__ */
|
|
1413
|
+
/* @__PURE__ */ jsx37(HoverCard.Content, {
|
|
1377
1414
|
size: "1",
|
|
1378
1415
|
side: "top",
|
|
1379
1416
|
height: "100px",
|
|
1380
|
-
children: /* @__PURE__ */
|
|
1417
|
+
children: /* @__PURE__ */ jsx37(Slider, {
|
|
1381
1418
|
size: "1",
|
|
1382
1419
|
variant: "soft",
|
|
1383
1420
|
orientation: "vertical",
|
|
@@ -1397,7 +1434,7 @@ var VolumeButton = function() {
|
|
|
1397
1434
|
import { useState, useEffect, useMemo as useMemo5 } from "react";
|
|
1398
1435
|
import { useMediaState as useMediaState3, useMediaRemote as useMediaRemote2 } from "@vidstack/react";
|
|
1399
1436
|
import { Slider as Slider2 } from "@radix-ui/themes";
|
|
1400
|
-
import { jsx as
|
|
1437
|
+
import { jsx as jsx38 } from "react/jsx-runtime";
|
|
1401
1438
|
var Time = function() {
|
|
1402
1439
|
var time = useMediaState3("currentTime");
|
|
1403
1440
|
var duration = useMediaState3("duration");
|
|
@@ -1418,7 +1455,7 @@ var Time = function() {
|
|
|
1418
1455
|
}, [
|
|
1419
1456
|
duration
|
|
1420
1457
|
]);
|
|
1421
|
-
return /* @__PURE__ */
|
|
1458
|
+
return /* @__PURE__ */ jsx38(Slider2, {
|
|
1422
1459
|
size: "1",
|
|
1423
1460
|
variant: "soft",
|
|
1424
1461
|
value: [
|
|
@@ -1439,12 +1476,12 @@ var Time = function() {
|
|
|
1439
1476
|
};
|
|
1440
1477
|
// src/components/media/MediaContainer.tsx
|
|
1441
1478
|
import { Card, Inset } from "@radix-ui/themes";
|
|
1442
|
-
import { jsx as
|
|
1479
|
+
import { jsx as jsx39 } from "react/jsx-runtime";
|
|
1443
1480
|
var MediaContainer = function(param) {
|
|
1444
1481
|
var children = param.children;
|
|
1445
|
-
return /* @__PURE__ */
|
|
1482
|
+
return /* @__PURE__ */ jsx39(Card, {
|
|
1446
1483
|
mb: "3",
|
|
1447
|
-
children: /* @__PURE__ */
|
|
1484
|
+
children: /* @__PURE__ */ jsx39(Inset, {
|
|
1448
1485
|
clip: "padding-box",
|
|
1449
1486
|
style: {
|
|
1450
1487
|
display: "flex",
|
|
@@ -1458,23 +1495,23 @@ var MediaContainer = function(param) {
|
|
|
1458
1495
|
import { FullscreenButton as VidstackFullscreenButton, useMediaState as useMediaState4 } from "@vidstack/react";
|
|
1459
1496
|
import { IconButton as IconButton3 } from "@radix-ui/themes";
|
|
1460
1497
|
import { EnterFullScreenIcon, ExitFullScreenIcon } from "@radix-ui/react-icons";
|
|
1461
|
-
import { jsx as
|
|
1498
|
+
import { jsx as jsx40 } from "react/jsx-runtime";
|
|
1462
1499
|
var FullscreenButton = function() {
|
|
1463
1500
|
var isFullscreen = useMediaState4("fullscreen");
|
|
1464
|
-
return /* @__PURE__ */
|
|
1501
|
+
return /* @__PURE__ */ jsx40(IconButton3, {
|
|
1465
1502
|
variant: "ghost",
|
|
1466
1503
|
asChild: true,
|
|
1467
|
-
children: /* @__PURE__ */
|
|
1468
|
-
children: isFullscreen ? /* @__PURE__ */
|
|
1504
|
+
children: /* @__PURE__ */ jsx40(VidstackFullscreenButton, {
|
|
1505
|
+
children: isFullscreen ? /* @__PURE__ */ jsx40(ExitFullScreenIcon, {}) : /* @__PURE__ */ jsx40(EnterFullScreenIcon, {})
|
|
1469
1506
|
})
|
|
1470
1507
|
});
|
|
1471
1508
|
};
|
|
1472
1509
|
// src/contexts/markdown/MarkdownContext/lib/components/Img/Video/index.tsx
|
|
1473
|
-
import { jsx as
|
|
1510
|
+
import { jsx as jsx41, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
1474
1511
|
var Video = function(param) {
|
|
1475
1512
|
var src = param.src;
|
|
1476
|
-
return /* @__PURE__ */
|
|
1477
|
-
children: /* @__PURE__ */
|
|
1513
|
+
return /* @__PURE__ */ jsx41(MediaContainer, {
|
|
1514
|
+
children: /* @__PURE__ */ jsxs12(MediaPlayer, {
|
|
1478
1515
|
src: {
|
|
1479
1516
|
src: src,
|
|
1480
1517
|
type: "video/".concat(src.split(".").pop())
|
|
@@ -1483,11 +1520,11 @@ var Video = function(param) {
|
|
|
1483
1520
|
hideControlsOnMouseLeave: true,
|
|
1484
1521
|
crossOrigin: true,
|
|
1485
1522
|
children: [
|
|
1486
|
-
/* @__PURE__ */
|
|
1487
|
-
/* @__PURE__ */
|
|
1523
|
+
/* @__PURE__ */ jsx41(MediaProvider, {}),
|
|
1524
|
+
/* @__PURE__ */ jsx41("style", {
|
|
1488
1525
|
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
1526
|
}),
|
|
1490
|
-
/* @__PURE__ */
|
|
1527
|
+
/* @__PURE__ */ jsx41(Flex12, {
|
|
1491
1528
|
asChild: true,
|
|
1492
1529
|
position: "absolute",
|
|
1493
1530
|
bottom: "0",
|
|
@@ -1499,18 +1536,18 @@ var Video = function(param) {
|
|
|
1499
1536
|
zIndex: 10,
|
|
1500
1537
|
background: "var(--accent-4)"
|
|
1501
1538
|
},
|
|
1502
|
-
children: /* @__PURE__ */
|
|
1503
|
-
children: /* @__PURE__ */
|
|
1539
|
+
children: /* @__PURE__ */ jsx41(Controls.Root, {
|
|
1540
|
+
children: /* @__PURE__ */ jsx41(Flex12, {
|
|
1504
1541
|
asChild: true,
|
|
1505
1542
|
align: "center",
|
|
1506
1543
|
gap: "3",
|
|
1507
1544
|
flexGrow: "1",
|
|
1508
|
-
children: /* @__PURE__ */
|
|
1545
|
+
children: /* @__PURE__ */ jsxs12(Controls.Group, {
|
|
1509
1546
|
children: [
|
|
1510
|
-
/* @__PURE__ */
|
|
1511
|
-
/* @__PURE__ */
|
|
1512
|
-
/* @__PURE__ */
|
|
1513
|
-
/* @__PURE__ */
|
|
1547
|
+
/* @__PURE__ */ jsx41(PlayButton, {}),
|
|
1548
|
+
/* @__PURE__ */ jsx41(Time, {}),
|
|
1549
|
+
/* @__PURE__ */ jsx41(VolumeButton, {}),
|
|
1550
|
+
/* @__PURE__ */ jsx41(FullscreenButton, {})
|
|
1514
1551
|
]
|
|
1515
1552
|
})
|
|
1516
1553
|
})
|
|
@@ -1521,14 +1558,14 @@ var Video = function(param) {
|
|
|
1521
1558
|
});
|
|
1522
1559
|
};
|
|
1523
1560
|
// src/contexts/markdown/MarkdownContext/lib/components/Img/Audio/index.tsx
|
|
1524
|
-
import { Flex as
|
|
1561
|
+
import { Flex as Flex13 } from "@radix-ui/themes";
|
|
1525
1562
|
import "@vidstack/react/player/styles/base.css";
|
|
1526
1563
|
import { MediaPlayer as MediaPlayer2, MediaProvider as MediaProvider2, Controls as Controls2 } from "@vidstack/react";
|
|
1527
|
-
import { jsx as
|
|
1564
|
+
import { jsx as jsx42, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
1528
1565
|
var Audio = function(param) {
|
|
1529
1566
|
var src = param.src;
|
|
1530
|
-
return /* @__PURE__ */
|
|
1531
|
-
children: /* @__PURE__ */
|
|
1567
|
+
return /* @__PURE__ */ jsx42(MediaContainer, {
|
|
1568
|
+
children: /* @__PURE__ */ jsxs13(MediaPlayer2, {
|
|
1532
1569
|
src: {
|
|
1533
1570
|
src: src,
|
|
1534
1571
|
type: "audio/".concat(src.split(".").pop())
|
|
@@ -1537,8 +1574,8 @@ var Audio = function(param) {
|
|
|
1537
1574
|
crossOrigin: true,
|
|
1538
1575
|
playsInline: true,
|
|
1539
1576
|
children: [
|
|
1540
|
-
/* @__PURE__ */
|
|
1541
|
-
/* @__PURE__ */
|
|
1577
|
+
/* @__PURE__ */ jsx42(MediaProvider2, {}),
|
|
1578
|
+
/* @__PURE__ */ jsx42(Flex13, {
|
|
1542
1579
|
asChild: true,
|
|
1543
1580
|
p: "3",
|
|
1544
1581
|
flexGrow: "1",
|
|
@@ -1546,17 +1583,17 @@ var Audio = function(param) {
|
|
|
1546
1583
|
zIndex: 10,
|
|
1547
1584
|
background: "var(--accent-4)"
|
|
1548
1585
|
},
|
|
1549
|
-
children: /* @__PURE__ */
|
|
1550
|
-
children: /* @__PURE__ */
|
|
1586
|
+
children: /* @__PURE__ */ jsx42(Controls2.Root, {
|
|
1587
|
+
children: /* @__PURE__ */ jsx42(Flex13, {
|
|
1551
1588
|
asChild: true,
|
|
1552
1589
|
align: "center",
|
|
1553
1590
|
gap: "3",
|
|
1554
1591
|
flexGrow: "1",
|
|
1555
|
-
children: /* @__PURE__ */
|
|
1592
|
+
children: /* @__PURE__ */ jsxs13(Controls2.Group, {
|
|
1556
1593
|
children: [
|
|
1557
|
-
/* @__PURE__ */
|
|
1558
|
-
/* @__PURE__ */
|
|
1559
|
-
/* @__PURE__ */
|
|
1594
|
+
/* @__PURE__ */ jsx42(PlayButton, {}),
|
|
1595
|
+
/* @__PURE__ */ jsx42(Time, {}),
|
|
1596
|
+
/* @__PURE__ */ jsx42(VolumeButton, {})
|
|
1560
1597
|
]
|
|
1561
1598
|
})
|
|
1562
1599
|
})
|
|
@@ -1566,63 +1603,49 @@ var Audio = function(param) {
|
|
|
1566
1603
|
})
|
|
1567
1604
|
});
|
|
1568
1605
|
};
|
|
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
1606
|
// src/contexts/markdown/MarkdownContext/lib/components/Img/index.tsx
|
|
1584
|
-
import { jsx as
|
|
1607
|
+
import { jsx as jsx43 } from "react/jsx-runtime";
|
|
1585
1608
|
var Img = function(props) {
|
|
1586
1609
|
if (!props.src) {
|
|
1587
|
-
return /* @__PURE__ */
|
|
1610
|
+
return /* @__PURE__ */ jsx43(Image, _object_spread({}, props));
|
|
1588
1611
|
} else if (isVideoSrc({
|
|
1589
1612
|
src: props.src
|
|
1590
1613
|
})) {
|
|
1591
|
-
return /* @__PURE__ */
|
|
1614
|
+
return /* @__PURE__ */ jsx43(Video, {
|
|
1592
1615
|
src: props.src
|
|
1593
1616
|
});
|
|
1594
1617
|
} else if (isAudioSrc({
|
|
1595
1618
|
src: props.src
|
|
1596
1619
|
})) {
|
|
1597
|
-
return /* @__PURE__ */
|
|
1620
|
+
return /* @__PURE__ */ jsx43(Audio, {
|
|
1598
1621
|
src: props.src
|
|
1599
1622
|
});
|
|
1600
1623
|
} else {
|
|
1601
|
-
return /* @__PURE__ */
|
|
1624
|
+
return /* @__PURE__ */ jsx43(Image, _object_spread({}, props));
|
|
1602
1625
|
}
|
|
1603
1626
|
};
|
|
1604
1627
|
// src/contexts/markdown/MarkdownContext/lib/components/Annotation/index.tsx
|
|
1605
1628
|
import { QuoteIcon } from "@radix-ui/react-icons";
|
|
1606
1629
|
// src/contexts/markdown/MarkdownContext/lib/components/Annotation/AnnotationBase.tsx
|
|
1607
|
-
import { IconButton as IconButton4, Popover as Popover4, Flex as
|
|
1608
|
-
import { jsx as
|
|
1630
|
+
import { IconButton as IconButton4, Popover as Popover4, Flex as Flex14, Text as Text5 } from "@radix-ui/themes";
|
|
1631
|
+
import { jsx as jsx44, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
1609
1632
|
var AnnotationBase = function(param) {
|
|
1610
1633
|
var icon = param.icon, content = param.content;
|
|
1611
|
-
return /* @__PURE__ */
|
|
1634
|
+
return /* @__PURE__ */ jsxs14(Popover4.Root, {
|
|
1612
1635
|
children: [
|
|
1613
|
-
/* @__PURE__ */
|
|
1614
|
-
children: /* @__PURE__ */
|
|
1636
|
+
/* @__PURE__ */ jsx44(Popover4.Trigger, {
|
|
1637
|
+
children: /* @__PURE__ */ jsx44(IconButton4, {
|
|
1615
1638
|
variant: "soft",
|
|
1616
1639
|
color: "gray",
|
|
1617
1640
|
size: "1",
|
|
1618
1641
|
children: icon
|
|
1619
1642
|
})
|
|
1620
1643
|
}),
|
|
1621
|
-
/* @__PURE__ */
|
|
1644
|
+
/* @__PURE__ */ jsx44(Popover4.Content, {
|
|
1622
1645
|
size: "1",
|
|
1623
|
-
children: /* @__PURE__ */
|
|
1646
|
+
children: /* @__PURE__ */ jsx44(Flex14, {
|
|
1624
1647
|
direction: "column",
|
|
1625
|
-
children: /* @__PURE__ */
|
|
1648
|
+
children: /* @__PURE__ */ jsx44(Text5, {
|
|
1626
1649
|
size: "1",
|
|
1627
1650
|
color: "gray",
|
|
1628
1651
|
children: content
|
|
@@ -1633,12 +1656,12 @@ var AnnotationBase = function(param) {
|
|
|
1633
1656
|
});
|
|
1634
1657
|
};
|
|
1635
1658
|
// src/contexts/markdown/MarkdownContext/lib/components/Annotation/FilePathAnnotation.tsx
|
|
1636
|
-
import { jsx as
|
|
1659
|
+
import { jsx as jsx45 } from "react/jsx-runtime";
|
|
1637
1660
|
var FilePathAnnotation = function(param) {
|
|
1638
1661
|
var annotation = param.annotation, children = param.children;
|
|
1639
1662
|
var superinterfaceContext = useSuperinterfaceContext();
|
|
1640
1663
|
var nextSearchParams = new URLSearchParams(superinterfaceContext.variables);
|
|
1641
|
-
return /* @__PURE__ */
|
|
1664
|
+
return /* @__PURE__ */ jsx45(Link, {
|
|
1642
1665
|
href: "".concat(superinterfaceContext.baseUrl, "/files/").concat(annotation.file_path.file_id, "/contents?").concat(nextSearchParams),
|
|
1643
1666
|
target: "_self",
|
|
1644
1667
|
download: true,
|
|
@@ -1646,16 +1669,16 @@ var FilePathAnnotation = function(param) {
|
|
|
1646
1669
|
});
|
|
1647
1670
|
};
|
|
1648
1671
|
// src/contexts/markdown/MarkdownContext/lib/components/Annotation/index.tsx
|
|
1649
|
-
import { jsx as
|
|
1672
|
+
import { jsx as jsx46 } from "react/jsx-runtime";
|
|
1650
1673
|
var Annotation = function(param) {
|
|
1651
1674
|
var annotation = param.annotation, children = param.children;
|
|
1652
1675
|
if (annotation.type === "file_citation") {
|
|
1653
|
-
return /* @__PURE__ */
|
|
1654
|
-
icon: /* @__PURE__ */
|
|
1676
|
+
return /* @__PURE__ */ jsx46(AnnotationBase, {
|
|
1677
|
+
icon: /* @__PURE__ */ jsx46(QuoteIcon, {}),
|
|
1655
1678
|
content: "File cited."
|
|
1656
1679
|
});
|
|
1657
1680
|
} else if (annotation.type === "file_path") {
|
|
1658
|
-
return /* @__PURE__ */
|
|
1681
|
+
return /* @__PURE__ */ jsx46(FilePathAnnotation, {
|
|
1659
1682
|
annotation: annotation,
|
|
1660
1683
|
children: children
|
|
1661
1684
|
});
|
|
@@ -1663,7 +1686,7 @@ var Annotation = function(param) {
|
|
|
1663
1686
|
return null;
|
|
1664
1687
|
};
|
|
1665
1688
|
// src/contexts/markdown/MarkdownContext/lib/components/index.tsx
|
|
1666
|
-
import { jsx as
|
|
1689
|
+
import { jsx as jsx47 } from "react/jsx-runtime";
|
|
1667
1690
|
var components = {
|
|
1668
1691
|
p: Paragraph,
|
|
1669
1692
|
a: Link,
|
|
@@ -1676,48 +1699,48 @@ var components = {
|
|
|
1676
1699
|
img: Img,
|
|
1677
1700
|
annotation: Annotation,
|
|
1678
1701
|
h1: function(props) {
|
|
1679
|
-
return /* @__PURE__ */
|
|
1702
|
+
return /* @__PURE__ */ jsx47(Heading, {
|
|
1680
1703
|
as: "h1",
|
|
1681
1704
|
children: props.children
|
|
1682
1705
|
});
|
|
1683
1706
|
},
|
|
1684
1707
|
h2: function(props) {
|
|
1685
|
-
return /* @__PURE__ */
|
|
1708
|
+
return /* @__PURE__ */ jsx47(Heading, {
|
|
1686
1709
|
as: "h2",
|
|
1687
1710
|
size: "5",
|
|
1688
1711
|
children: props.children
|
|
1689
1712
|
});
|
|
1690
1713
|
},
|
|
1691
1714
|
h3: function(props) {
|
|
1692
|
-
return /* @__PURE__ */
|
|
1715
|
+
return /* @__PURE__ */ jsx47(Heading, {
|
|
1693
1716
|
as: "h3",
|
|
1694
1717
|
size: "4",
|
|
1695
1718
|
children: props.children
|
|
1696
1719
|
});
|
|
1697
1720
|
},
|
|
1698
1721
|
h4: function(props) {
|
|
1699
|
-
return /* @__PURE__ */
|
|
1722
|
+
return /* @__PURE__ */ jsx47(Heading, {
|
|
1700
1723
|
as: "h4",
|
|
1701
1724
|
size: "3",
|
|
1702
1725
|
children: props.children
|
|
1703
1726
|
});
|
|
1704
1727
|
},
|
|
1705
1728
|
h5: function(props) {
|
|
1706
|
-
return /* @__PURE__ */
|
|
1729
|
+
return /* @__PURE__ */ jsx47(Heading, {
|
|
1707
1730
|
as: "h5",
|
|
1708
1731
|
size: "3",
|
|
1709
1732
|
children: props.children
|
|
1710
1733
|
});
|
|
1711
1734
|
},
|
|
1712
1735
|
h6: function(props) {
|
|
1713
|
-
return /* @__PURE__ */
|
|
1736
|
+
return /* @__PURE__ */ jsx47(Heading, {
|
|
1714
1737
|
as: "h6",
|
|
1715
1738
|
size: "3",
|
|
1716
1739
|
children: props.children
|
|
1717
1740
|
});
|
|
1718
1741
|
},
|
|
1719
1742
|
table: function(props) {
|
|
1720
|
-
return /* @__PURE__ */
|
|
1743
|
+
return /* @__PURE__ */ jsx47(Table.Root, _object_spread_props(_object_spread({}, props), {
|
|
1721
1744
|
variant: "surface",
|
|
1722
1745
|
mb: "3"
|
|
1723
1746
|
}));
|
|
@@ -1909,45 +1932,49 @@ var MarkdownContext = createContext9({
|
|
|
1909
1932
|
var useMarkdownContext = function() {
|
|
1910
1933
|
return useContext7(MarkdownContext);
|
|
1911
1934
|
};
|
|
1912
|
-
// src/components/threads/Thread/Message/TextContent.tsx
|
|
1913
|
-
import { jsx as
|
|
1935
|
+
// src/components/threads/Thread/Message/ContentPart/TextContent.tsx
|
|
1936
|
+
import { jsx as jsx48 } from "react/jsx-runtime";
|
|
1914
1937
|
var TextContent = function(param) {
|
|
1915
1938
|
var content = param.content;
|
|
1916
1939
|
var _useMarkdownContext = useMarkdownContext(), getRemarkPlugins2 = _useMarkdownContext.getRemarkPlugins, rest = _object_without_properties(_useMarkdownContext, [
|
|
1917
1940
|
"getRemarkPlugins"
|
|
1918
1941
|
]);
|
|
1919
|
-
return /* @__PURE__ */
|
|
1942
|
+
return /* @__PURE__ */ jsx48(Markdown, _object_spread_props(_object_spread({}, rest), {
|
|
1920
1943
|
remarkPlugins: getRemarkPlugins2({
|
|
1921
1944
|
content: content
|
|
1922
1945
|
}),
|
|
1923
1946
|
children: content.text.value
|
|
1924
1947
|
}));
|
|
1925
1948
|
};
|
|
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
|
-
})
|
|
1949
|
+
// src/components/threads/Thread/Message/ContentPart/ImageFileContent.tsx
|
|
1950
|
+
import { jsx as jsx49 } from "react/jsx-runtime";
|
|
1951
|
+
var ImageFileContent = function(param) {
|
|
1952
|
+
var content = param.content;
|
|
1953
|
+
var superinterfaceContext = useSuperinterfaceContext();
|
|
1954
|
+
var nextSearchParams = new URLSearchParams(superinterfaceContext.variables);
|
|
1955
|
+
return /* @__PURE__ */ jsx49(Image, {
|
|
1956
|
+
alt: "",
|
|
1957
|
+
src: "".concat(superinterfaceContext.baseUrl, "/files/").concat(content.image_file.file_id, "/contents?").concat(nextSearchParams)
|
|
1947
1958
|
});
|
|
1948
1959
|
};
|
|
1960
|
+
// src/components/threads/Thread/Message/ContentPart/index.tsx
|
|
1961
|
+
import { jsx as jsx50 } from "react/jsx-runtime";
|
|
1962
|
+
var ContentPart = function(param) {
|
|
1963
|
+
var content = param.content;
|
|
1964
|
+
if (content.type === "text") {
|
|
1965
|
+
return /* @__PURE__ */ jsx50(TextContent, {
|
|
1966
|
+
content: content
|
|
1967
|
+
});
|
|
1968
|
+
}
|
|
1969
|
+
if (content.type === "image_file") {
|
|
1970
|
+
return /* @__PURE__ */ jsx50(ImageFileContent, {
|
|
1971
|
+
content: content
|
|
1972
|
+
});
|
|
1973
|
+
}
|
|
1974
|
+
return null;
|
|
1975
|
+
};
|
|
1949
1976
|
// src/components/threads/Thread/Message/index.tsx
|
|
1950
|
-
import { jsx as
|
|
1977
|
+
import { jsx as jsx51, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
1951
1978
|
var Message = function(param) {
|
|
1952
1979
|
var message = param.message;
|
|
1953
1980
|
var _useMemo6 = _sliced_to_array(useMemo6(function() {
|
|
@@ -1992,68 +2019,66 @@ var Message = function(param) {
|
|
|
1992
2019
|
}, [
|
|
1993
2020
|
message
|
|
1994
2021
|
]);
|
|
1995
|
-
return /* @__PURE__ */
|
|
2022
|
+
return /* @__PURE__ */ jsx51(Provider, {
|
|
1996
2023
|
value: {
|
|
1997
2024
|
message: message
|
|
1998
2025
|
},
|
|
1999
2026
|
children: /* @__PURE__ */ jsxs15(Box10, {
|
|
2000
2027
|
children: [
|
|
2001
|
-
/* @__PURE__ */
|
|
2028
|
+
/* @__PURE__ */ jsx51(RunSteps, {
|
|
2002
2029
|
runSteps: olderRunSteps
|
|
2003
2030
|
}),
|
|
2004
2031
|
/* @__PURE__ */ jsxs15(Box10, {
|
|
2005
2032
|
children: [
|
|
2006
|
-
/* @__PURE__ */
|
|
2033
|
+
/* @__PURE__ */ jsx51(Attachments, {
|
|
2007
2034
|
message: message
|
|
2008
2035
|
}),
|
|
2009
2036
|
message.content.map(function(content, index) {
|
|
2010
|
-
return /* @__PURE__ */
|
|
2011
|
-
|
|
2012
|
-
content: content
|
|
2013
|
-
})
|
|
2037
|
+
return /* @__PURE__ */ jsx51(ContentPart, {
|
|
2038
|
+
content: content
|
|
2014
2039
|
}, index);
|
|
2015
2040
|
}),
|
|
2016
|
-
isInProgress && isEmpty(laterRunSteps) && /* @__PURE__ */
|
|
2041
|
+
isInProgress && isEmpty(laterRunSteps) && /* @__PURE__ */ jsx51(StartingContentSkeleton, {})
|
|
2017
2042
|
]
|
|
2018
2043
|
}),
|
|
2019
|
-
/* @__PURE__ */
|
|
2044
|
+
/* @__PURE__ */ jsx51(RunSteps, {
|
|
2020
2045
|
runSteps: laterRunSteps
|
|
2021
2046
|
}),
|
|
2022
|
-
isInProgress && !isEmpty(laterRunSteps) && /* @__PURE__ */
|
|
2023
|
-
children: /* @__PURE__ */
|
|
2047
|
+
isInProgress && !isEmpty(laterRunSteps) && /* @__PURE__ */ jsx51(Box10, {
|
|
2048
|
+
children: /* @__PURE__ */ jsx51(StartingContentSkeleton, {})
|
|
2024
2049
|
})
|
|
2025
2050
|
]
|
|
2026
2051
|
})
|
|
2027
2052
|
});
|
|
2028
2053
|
};
|
|
2029
2054
|
// src/components/threads/Thread/Messages/Content/MessageGroup/Content/index.tsx
|
|
2030
|
-
import { jsx as
|
|
2055
|
+
import { jsx as jsx52 } from "react/jsx-runtime";
|
|
2031
2056
|
var Content3 = function(param) {
|
|
2032
2057
|
var messageGroup = param.messageGroup;
|
|
2033
|
-
return /* @__PURE__ */
|
|
2058
|
+
return /* @__PURE__ */ jsx52(Flex15, {
|
|
2034
2059
|
direction: "column-reverse",
|
|
2035
2060
|
children: messageGroup.messages.map(function(message) {
|
|
2036
|
-
return /* @__PURE__ */
|
|
2061
|
+
return /* @__PURE__ */ jsx52(Message, {
|
|
2037
2062
|
message: message
|
|
2038
2063
|
}, message.id);
|
|
2039
2064
|
})
|
|
2040
2065
|
});
|
|
2041
2066
|
};
|
|
2042
2067
|
// src/components/threads/Thread/Messages/Content/MessageGroup/index.tsx
|
|
2043
|
-
import { jsx as
|
|
2068
|
+
import { jsx as jsx53, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
2044
2069
|
var MessageGroup = function(param) {
|
|
2045
2070
|
var messageGroup = param.messageGroup;
|
|
2046
2071
|
var assistantNameContext = useContext8(AssistantNameContext);
|
|
2047
2072
|
return /* @__PURE__ */ jsxs16(MessageGroupBase, {
|
|
2048
2073
|
children: [
|
|
2049
|
-
messageGroup.role === "user" ? /* @__PURE__ */
|
|
2074
|
+
messageGroup.role === "user" ? /* @__PURE__ */ jsx53(UserAvatar, {}) : /* @__PURE__ */ jsx53(AssistantAvatar, {}),
|
|
2050
2075
|
/* @__PURE__ */ jsxs16(Box11, {
|
|
2051
2076
|
flexGrow: "1",
|
|
2052
2077
|
children: [
|
|
2053
|
-
/* @__PURE__ */
|
|
2078
|
+
/* @__PURE__ */ jsx53(Name, {
|
|
2054
2079
|
children: messageGroup.role === "user" ? "You" : assistantNameContext
|
|
2055
2080
|
}),
|
|
2056
|
-
/* @__PURE__ */
|
|
2081
|
+
/* @__PURE__ */ jsx53(Content3, {
|
|
2057
2082
|
messageGroup: messageGroup
|
|
2058
2083
|
})
|
|
2059
2084
|
]
|
|
@@ -2062,7 +2087,7 @@ var MessageGroup = function(param) {
|
|
|
2062
2087
|
});
|
|
2063
2088
|
};
|
|
2064
2089
|
// src/components/threads/Thread/Messages/Content/index.tsx
|
|
2065
|
-
import { Fragment
|
|
2090
|
+
import { Fragment, jsx as jsx54 } from "react/jsx-runtime";
|
|
2066
2091
|
var Content4 = function() {
|
|
2067
2092
|
var _useMessages = useMessages(), messages2 = _useMessages.messages, isLoading = _useMessages.isLoading, isLoadingError = _useMessages.isLoadingError;
|
|
2068
2093
|
var addToast = useToasts().addToast;
|
|
@@ -2081,11 +2106,11 @@ var Content4 = function() {
|
|
|
2081
2106
|
addToast
|
|
2082
2107
|
]);
|
|
2083
2108
|
if (isLoading || isLoadingError) {
|
|
2084
|
-
return /* @__PURE__ */
|
|
2109
|
+
return /* @__PURE__ */ jsx54(MessagesSkeleton, {});
|
|
2085
2110
|
}
|
|
2086
|
-
return /* @__PURE__ */
|
|
2111
|
+
return /* @__PURE__ */ jsx54(Fragment, {
|
|
2087
2112
|
children: messageGroups2.map(function(messageGroup) {
|
|
2088
|
-
return /* @__PURE__ */
|
|
2113
|
+
return /* @__PURE__ */ jsx54(MessageGroup, {
|
|
2089
2114
|
messageGroup: messageGroup
|
|
2090
2115
|
}, messageGroup.id);
|
|
2091
2116
|
})
|
|
@@ -2096,20 +2121,20 @@ import { useMemo as useMemo8 } from "react";
|
|
|
2096
2121
|
// src/components/skeletons/StartingSkeleton/index.tsx
|
|
2097
2122
|
import { useContext as useContext9 } from "react";
|
|
2098
2123
|
import { Box as Box12 } from "@radix-ui/themes";
|
|
2099
|
-
import { jsx as
|
|
2124
|
+
import { jsx as jsx55, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
2100
2125
|
var StartingSkeleton = function(param) {
|
|
2101
2126
|
var children = param.children;
|
|
2102
2127
|
var assistantNameContext = useContext9(AssistantNameContext);
|
|
2103
2128
|
return /* @__PURE__ */ jsxs17(MessageGroupBase, {
|
|
2104
2129
|
children: [
|
|
2105
|
-
/* @__PURE__ */
|
|
2130
|
+
/* @__PURE__ */ jsx55(AssistantAvatar, {}),
|
|
2106
2131
|
/* @__PURE__ */ jsxs17(Box12, {
|
|
2107
2132
|
children: [
|
|
2108
|
-
/* @__PURE__ */
|
|
2133
|
+
/* @__PURE__ */ jsx55(Name, {
|
|
2109
2134
|
children: assistantNameContext
|
|
2110
2135
|
}),
|
|
2111
2136
|
children,
|
|
2112
|
-
/* @__PURE__ */
|
|
2137
|
+
/* @__PURE__ */ jsx55(StartingContentSkeleton, {})
|
|
2113
2138
|
]
|
|
2114
2139
|
})
|
|
2115
2140
|
]
|
|
@@ -2134,7 +2159,7 @@ var isOptimistic = function(param) {
|
|
|
2134
2159
|
return _4.startsWith(id, "-");
|
|
2135
2160
|
};
|
|
2136
2161
|
// src/components/threads/Thread/Messages/Progress/index.tsx
|
|
2137
|
-
import { jsx as
|
|
2162
|
+
import { jsx as jsx56 } from "react/jsx-runtime";
|
|
2138
2163
|
var Progress = function() {
|
|
2139
2164
|
var latestMessage = useLatestMessage().latestMessage;
|
|
2140
2165
|
var isMutatingMessage = useIsMutatingMessage();
|
|
@@ -2152,7 +2177,7 @@ var Progress = function() {
|
|
|
2152
2177
|
isMutatingMessage
|
|
2153
2178
|
]);
|
|
2154
2179
|
if (!isVisible) return null;
|
|
2155
|
-
return /* @__PURE__ */
|
|
2180
|
+
return /* @__PURE__ */ jsx56(StartingSkeleton, {});
|
|
2156
2181
|
};
|
|
2157
2182
|
// src/components/threads/Thread/Messages/Root/index.tsx
|
|
2158
2183
|
import { Flex as Flex16 } from "@radix-ui/themes";
|
|
@@ -2210,7 +2235,7 @@ var useInfiniteScroll = function(param) {
|
|
|
2210
2235
|
};
|
|
2211
2236
|
};
|
|
2212
2237
|
// src/components/threads/Thread/Messages/Root/index.tsx
|
|
2213
|
-
import { jsx as
|
|
2238
|
+
import { jsx as jsx57, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
2214
2239
|
var Root2 = function(param) {
|
|
2215
2240
|
var children = param.children, _param_style = param.style, style = _param_style === void 0 ? {} : _param_style;
|
|
2216
2241
|
var _useMessages = useMessages(), isFetchingNextPage = _useMessages.isFetchingNextPage, hasNextPage = _useMessages.hasNextPage, fetchNextPage = _useMessages.fetchNextPage;
|
|
@@ -2228,10 +2253,10 @@ var Root2 = function(param) {
|
|
|
2228
2253
|
}),
|
|
2229
2254
|
children: [
|
|
2230
2255
|
children,
|
|
2231
|
-
hasNextPage && /* @__PURE__ */
|
|
2256
|
+
hasNextPage && /* @__PURE__ */ jsx57(Flex16, {
|
|
2232
2257
|
ref: loaderRef
|
|
2233
2258
|
}),
|
|
2234
|
-
/* @__PURE__ */
|
|
2259
|
+
/* @__PURE__ */ jsx57(Flex16, {
|
|
2235
2260
|
flexShrink: "0",
|
|
2236
2261
|
flexGrow: "1"
|
|
2237
2262
|
})
|
|
@@ -2239,30 +2264,30 @@ var Root2 = function(param) {
|
|
|
2239
2264
|
});
|
|
2240
2265
|
};
|
|
2241
2266
|
// src/components/threads/Thread/Messages/NextPageSkeleton.tsx
|
|
2242
|
-
import { jsx as
|
|
2267
|
+
import { jsx as jsx58 } from "react/jsx-runtime";
|
|
2243
2268
|
var NextPageSkeleton = function() {
|
|
2244
2269
|
var hasNextPage = useMessages().hasNextPage;
|
|
2245
2270
|
if (!hasNextPage) {
|
|
2246
2271
|
return null;
|
|
2247
2272
|
}
|
|
2248
|
-
return /* @__PURE__ */
|
|
2273
|
+
return /* @__PURE__ */ jsx58(MessagesSkeleton, {});
|
|
2249
2274
|
};
|
|
2250
2275
|
// src/components/threads/Thread/Messages/index.tsx
|
|
2251
|
-
import { jsx as
|
|
2276
|
+
import { jsx as jsx59, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
2252
2277
|
var Messages = function(param) {
|
|
2253
2278
|
var children = param.children, _param_style = param.style, style = _param_style === void 0 ? {} : _param_style;
|
|
2254
2279
|
return /* @__PURE__ */ jsxs19(Root2, {
|
|
2255
2280
|
style: style,
|
|
2256
2281
|
children: [
|
|
2257
|
-
/* @__PURE__ */
|
|
2282
|
+
/* @__PURE__ */ jsx59(Flex17, {
|
|
2258
2283
|
flexShrink: "0",
|
|
2259
2284
|
height: "var(--space-3)"
|
|
2260
2285
|
}),
|
|
2261
|
-
/* @__PURE__ */
|
|
2286
|
+
/* @__PURE__ */ jsx59(Progress, {}),
|
|
2262
2287
|
children,
|
|
2263
|
-
/* @__PURE__ */
|
|
2264
|
-
/* @__PURE__ */
|
|
2265
|
-
/* @__PURE__ */
|
|
2288
|
+
/* @__PURE__ */ jsx59(Content4, {}),
|
|
2289
|
+
/* @__PURE__ */ jsx59(NextPageSkeleton, {}),
|
|
2290
|
+
/* @__PURE__ */ jsx59(Flex17, {
|
|
2266
2291
|
flexShrink: "0",
|
|
2267
2292
|
flexGrow: "1",
|
|
2268
2293
|
minHeight: "var(--space-5)"
|
|
@@ -2293,10 +2318,10 @@ var useMessageFormContext = function() {
|
|
|
2293
2318
|
return useContext10(MessageFormContext);
|
|
2294
2319
|
};
|
|
2295
2320
|
// src/components/threads/Thread/MessageForm/Submit/index.tsx
|
|
2296
|
-
import { jsx as
|
|
2321
|
+
import { jsx as jsx60 } from "react/jsx-runtime";
|
|
2297
2322
|
var Root3 = function(param) {
|
|
2298
2323
|
var children = param.children;
|
|
2299
|
-
return /* @__PURE__ */
|
|
2324
|
+
return /* @__PURE__ */ jsx60(Flex18, {
|
|
2300
2325
|
flexShrink: "0",
|
|
2301
2326
|
align: "end",
|
|
2302
2327
|
children: children
|
|
@@ -2306,24 +2331,24 @@ var Button2 = function() {
|
|
|
2306
2331
|
var superinterfaceContext = useSuperinterfaceContext();
|
|
2307
2332
|
var _useMessageFormContext = useMessageFormContext(), isDisabled = _useMessageFormContext.isDisabled, isLoading = _useMessageFormContext.isLoading, isFileLoading = _useMessageFormContext.isFileLoading;
|
|
2308
2333
|
if (isLoading) {
|
|
2309
|
-
return /* @__PURE__ */
|
|
2334
|
+
return /* @__PURE__ */ jsx60(IconButton5, {
|
|
2310
2335
|
type: "button",
|
|
2311
2336
|
onClick: function() {
|
|
2312
2337
|
var _superinterfaceContext_createMessageAbortControllerRef_current;
|
|
2313
2338
|
return (_superinterfaceContext_createMessageAbortControllerRef_current = superinterfaceContext.createMessageAbortControllerRef.current) === null || _superinterfaceContext_createMessageAbortControllerRef_current === void 0 ? void 0 : _superinterfaceContext_createMessageAbortControllerRef_current.abort();
|
|
2314
2339
|
},
|
|
2315
|
-
children: /* @__PURE__ */
|
|
2340
|
+
children: /* @__PURE__ */ jsx60(StopIcon, {})
|
|
2316
2341
|
});
|
|
2317
2342
|
}
|
|
2318
|
-
return /* @__PURE__ */
|
|
2343
|
+
return /* @__PURE__ */ jsx60(IconButton5, {
|
|
2319
2344
|
type: "submit",
|
|
2320
2345
|
disabled: isDisabled || isFileLoading,
|
|
2321
|
-
children: /* @__PURE__ */
|
|
2346
|
+
children: /* @__PURE__ */ jsx60(ArrowUpIcon, {})
|
|
2322
2347
|
});
|
|
2323
2348
|
};
|
|
2324
2349
|
var Submit = function() {
|
|
2325
|
-
return /* @__PURE__ */
|
|
2326
|
-
children: /* @__PURE__ */
|
|
2350
|
+
return /* @__PURE__ */ jsx60(Root3, {
|
|
2351
|
+
children: /* @__PURE__ */ jsx60(Button2, {})
|
|
2327
2352
|
});
|
|
2328
2353
|
};
|
|
2329
2354
|
Submit.Root = Root3;
|
|
@@ -2809,7 +2834,7 @@ var threadRunRequiresAction = /*#__PURE__*/ function() {
|
|
|
2809
2834
|
4,
|
|
2810
2835
|
map(toolCalls, /*#__PURE__*/ function() {
|
|
2811
2836
|
var _ref = _async_to_generator(function(toolCall) {
|
|
2812
|
-
var fn, args, parsedArgs, output;
|
|
2837
|
+
var fn, args, parsedArgs, output, error;
|
|
2813
2838
|
return _ts_generator(this, function(_state) {
|
|
2814
2839
|
switch(_state.label){
|
|
2815
2840
|
case 0:
|
|
@@ -2834,12 +2859,32 @@ var threadRunRequiresAction = /*#__PURE__*/ function() {
|
|
|
2834
2859
|
}
|
|
2835
2860
|
args = toolCall.function.arguments;
|
|
2836
2861
|
parsedArgs = JSON.parse(args);
|
|
2862
|
+
_state.label = 1;
|
|
2863
|
+
case 1:
|
|
2864
|
+
_state.trys.push([
|
|
2865
|
+
1,
|
|
2866
|
+
3,
|
|
2867
|
+
,
|
|
2868
|
+
4
|
|
2869
|
+
]);
|
|
2837
2870
|
return [
|
|
2838
2871
|
4,
|
|
2839
2872
|
fn(parsedArgs)
|
|
2840
2873
|
];
|
|
2841
|
-
case
|
|
2874
|
+
case 2:
|
|
2842
2875
|
output = _state.sent();
|
|
2876
|
+
return [
|
|
2877
|
+
3,
|
|
2878
|
+
4
|
|
2879
|
+
];
|
|
2880
|
+
case 3:
|
|
2881
|
+
error = _state.sent();
|
|
2882
|
+
output = "Error: ".concat(error.message);
|
|
2883
|
+
return [
|
|
2884
|
+
3,
|
|
2885
|
+
4
|
|
2886
|
+
];
|
|
2887
|
+
case 4:
|
|
2843
2888
|
return [
|
|
2844
2889
|
2,
|
|
2845
2890
|
{
|
|
@@ -3100,7 +3145,7 @@ var createMessageDefaultOnError = function(param) {
|
|
|
3100
3145
|
};
|
|
3101
3146
|
};
|
|
3102
3147
|
// src/components/threads/Thread/MessageForm/Root/index.tsx
|
|
3103
|
-
import { jsx as
|
|
3148
|
+
import { jsx as jsx61 } from "react/jsx-runtime";
|
|
3104
3149
|
var Root4 = function(param) {
|
|
3105
3150
|
var children = param.children, onSubmitArg = param.onSubmit, isDisabledArg = param.isDisabled;
|
|
3106
3151
|
var _useState2 = _sliced_to_array(useState2([]), 2), files = _useState2[0], setFiles = _useState2[1];
|
|
@@ -3193,7 +3238,7 @@ var Root4 = function(param) {
|
|
|
3193
3238
|
};
|
|
3194
3239
|
}();
|
|
3195
3240
|
var content = watch("content");
|
|
3196
|
-
return /* @__PURE__ */
|
|
3241
|
+
return /* @__PURE__ */ jsx61(MessageFormContext.Provider, {
|
|
3197
3242
|
value: {
|
|
3198
3243
|
isDisabled: isDisabled,
|
|
3199
3244
|
isLoading: isLoading,
|
|
@@ -3202,11 +3247,11 @@ var Root4 = function(param) {
|
|
|
3202
3247
|
isFileLoading: isFileLoading,
|
|
3203
3248
|
content: content
|
|
3204
3249
|
},
|
|
3205
|
-
children: /* @__PURE__ */
|
|
3206
|
-
children: /* @__PURE__ */
|
|
3250
|
+
children: /* @__PURE__ */ jsx61(FormProvider, _object_spread_props(_object_spread({}, formProps), {
|
|
3251
|
+
children: /* @__PURE__ */ jsx61(Box13, {
|
|
3207
3252
|
asChild: true,
|
|
3208
3253
|
flexShrink: "0",
|
|
3209
|
-
children: /* @__PURE__ */
|
|
3254
|
+
children: /* @__PURE__ */ jsx61("form", {
|
|
3210
3255
|
onSubmit: handleSubmit(onSubmit),
|
|
3211
3256
|
children: children
|
|
3212
3257
|
})
|
|
@@ -3234,14 +3279,14 @@ import { useContext as useContext11, useMemo as useMemo10, useRef as useRef5, us
|
|
|
3234
3279
|
// src/components/textareas/TextareaBase/index.tsx
|
|
3235
3280
|
import { forwardRef as forwardRef3 } from "react";
|
|
3236
3281
|
import TextareaAutosize from "react-textarea-autosize";
|
|
3237
|
-
import { Fragment as
|
|
3282
|
+
import { Fragment as Fragment2, jsx as jsx62, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
3238
3283
|
var TextareaBase = forwardRef3(function TextareaBase2(props, ref) {
|
|
3239
|
-
return /* @__PURE__ */ jsxs20(
|
|
3284
|
+
return /* @__PURE__ */ jsxs20(Fragment2, {
|
|
3240
3285
|
children: [
|
|
3241
|
-
/* @__PURE__ */
|
|
3286
|
+
/* @__PURE__ */ jsx62("style", {
|
|
3242
3287
|
children: ".superinterface-textarea { min-height: inherit; height: 30px; }\n.superinterface-textarea::placeholder { color: var(--gray-a10); }"
|
|
3243
3288
|
}),
|
|
3244
|
-
/* @__PURE__ */
|
|
3289
|
+
/* @__PURE__ */ jsx62(TextareaAutosize, _object_spread({
|
|
3245
3290
|
ref: ref,
|
|
3246
3291
|
className: "rt-reset superinterface-textarea",
|
|
3247
3292
|
style: {
|
|
@@ -3258,10 +3303,10 @@ var TextareaBase = forwardRef3(function TextareaBase2(props, ref) {
|
|
|
3258
3303
|
});
|
|
3259
3304
|
});
|
|
3260
3305
|
// src/components/threads/Thread/MessageForm/Field/Control.tsx
|
|
3261
|
-
import { jsx as
|
|
3306
|
+
import { jsx as jsx63 } from "react/jsx-runtime";
|
|
3262
3307
|
var Root5 = function(param) {
|
|
3263
3308
|
var children = param.children;
|
|
3264
|
-
return /* @__PURE__ */
|
|
3309
|
+
return /* @__PURE__ */ jsx63(Flex19, {
|
|
3265
3310
|
flexGrow: "1",
|
|
3266
3311
|
pt: "4px",
|
|
3267
3312
|
children: children
|
|
@@ -3290,7 +3335,7 @@ var Input = function() {
|
|
|
3290
3335
|
isDisabledPrevious,
|
|
3291
3336
|
textareaProps
|
|
3292
3337
|
]);
|
|
3293
|
-
return /* @__PURE__ */
|
|
3338
|
+
return /* @__PURE__ */ jsx63(TextareaBase, _object_spread_props(_object_spread({
|
|
3294
3339
|
minRows: 1,
|
|
3295
3340
|
placeholder: "Message ".concat(assistantNameContext, "..."),
|
|
3296
3341
|
disabled: isDisabled,
|
|
@@ -3310,8 +3355,8 @@ var Input = function() {
|
|
|
3310
3355
|
}));
|
|
3311
3356
|
};
|
|
3312
3357
|
var Control = function() {
|
|
3313
|
-
return /* @__PURE__ */
|
|
3314
|
-
children: /* @__PURE__ */
|
|
3358
|
+
return /* @__PURE__ */ jsx63(Root5, {
|
|
3359
|
+
children: /* @__PURE__ */ jsx63(Input, {})
|
|
3315
3360
|
});
|
|
3316
3361
|
};
|
|
3317
3362
|
Control.Root = Root5;
|
|
@@ -3319,19 +3364,19 @@ Control.Input = Input;
|
|
|
3319
3364
|
// src/components/threads/Thread/MessageForm/Field/Files/Preview.tsx
|
|
3320
3365
|
import { Flex as Flex20, Card as Card2, Spinner, Text as Text6, IconButton as IconButton6 } from "@radix-ui/themes";
|
|
3321
3366
|
import { FileIcon as FileIcon2, Cross2Icon } from "@radix-ui/react-icons";
|
|
3322
|
-
import { jsx as
|
|
3367
|
+
import { jsx as jsx64, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
3323
3368
|
var Preview = function() {
|
|
3324
3369
|
var _useMessageFormContext = useMessageFormContext(), files = _useMessageFormContext.files, setFiles = _useMessageFormContext.setFiles;
|
|
3325
3370
|
if (!files.length) {
|
|
3326
3371
|
return null;
|
|
3327
3372
|
}
|
|
3328
|
-
return /* @__PURE__ */
|
|
3373
|
+
return /* @__PURE__ */ jsx64(Flex20, {
|
|
3329
3374
|
flexBasis: "100%",
|
|
3330
3375
|
direction: "column",
|
|
3331
3376
|
pb: "2",
|
|
3332
3377
|
gap: "1",
|
|
3333
3378
|
children: files.map(function(file) {
|
|
3334
|
-
return /* @__PURE__ */
|
|
3379
|
+
return /* @__PURE__ */ jsx64(Card2, {
|
|
3335
3380
|
variant: "ghost",
|
|
3336
3381
|
children: /* @__PURE__ */ jsxs21(Flex20, {
|
|
3337
3382
|
align: "center",
|
|
@@ -3345,16 +3390,16 @@ var Preview = function() {
|
|
|
3345
3390
|
minWidth: "0",
|
|
3346
3391
|
maxWidth: "250px",
|
|
3347
3392
|
children: [
|
|
3348
|
-
/* @__PURE__ */
|
|
3393
|
+
/* @__PURE__ */ jsx64(Flex20, {
|
|
3349
3394
|
flexShrink: "0",
|
|
3350
|
-
children: /* @__PURE__ */
|
|
3395
|
+
children: /* @__PURE__ */ jsx64(Spinner, {
|
|
3351
3396
|
loading: isOptimistic({
|
|
3352
3397
|
id: file.id
|
|
3353
3398
|
}),
|
|
3354
|
-
children: /* @__PURE__ */
|
|
3399
|
+
children: /* @__PURE__ */ jsx64(FileIcon2, {})
|
|
3355
3400
|
})
|
|
3356
3401
|
}),
|
|
3357
|
-
/* @__PURE__ */
|
|
3402
|
+
/* @__PURE__ */ jsx64(Text6, {
|
|
3358
3403
|
size: "2",
|
|
3359
3404
|
truncate: true,
|
|
3360
3405
|
wrap: "nowrap",
|
|
@@ -3362,9 +3407,9 @@ var Preview = function() {
|
|
|
3362
3407
|
})
|
|
3363
3408
|
]
|
|
3364
3409
|
}),
|
|
3365
|
-
/* @__PURE__ */
|
|
3410
|
+
/* @__PURE__ */ jsx64(Flex20, {
|
|
3366
3411
|
flexShrink: "0",
|
|
3367
|
-
children: /* @__PURE__ */
|
|
3412
|
+
children: /* @__PURE__ */ jsx64(IconButton6, {
|
|
3368
3413
|
onClick: function() {
|
|
3369
3414
|
return setFiles(function(prev) {
|
|
3370
3415
|
return prev.filter(function(prevFile) {
|
|
@@ -3375,7 +3420,7 @@ var Preview = function() {
|
|
|
3375
3420
|
color: "gray",
|
|
3376
3421
|
variant: "ghost",
|
|
3377
3422
|
size: "1",
|
|
3378
|
-
children: /* @__PURE__ */
|
|
3423
|
+
children: /* @__PURE__ */ jsx64(Cross2Icon, {})
|
|
3379
3424
|
})
|
|
3380
3425
|
})
|
|
3381
3426
|
]
|
|
@@ -3500,7 +3545,7 @@ var useCreateFile = function() {
|
|
|
3500
3545
|
});
|
|
3501
3546
|
};
|
|
3502
3547
|
// src/components/threads/Thread/MessageForm/Field/Files/Control.tsx
|
|
3503
|
-
import { jsx as
|
|
3548
|
+
import { jsx as jsx65, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
3504
3549
|
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";
|
|
3505
3550
|
var Control2 = function() {
|
|
3506
3551
|
var _useMessageFormContext = useMessageFormContext(), isDisabled = _useMessageFormContext.isDisabled, isLoading = _useMessageFormContext.isLoading, setFiles = _useMessageFormContext.setFiles;
|
|
@@ -3674,7 +3719,7 @@ var Control2 = function() {
|
|
|
3674
3719
|
createFile,
|
|
3675
3720
|
setFiles
|
|
3676
3721
|
]);
|
|
3677
|
-
return /* @__PURE__ */
|
|
3722
|
+
return /* @__PURE__ */ jsx65(Flex21, {
|
|
3678
3723
|
pt: "2",
|
|
3679
3724
|
pr: "2",
|
|
3680
3725
|
flexGrow: "0",
|
|
@@ -3688,8 +3733,8 @@ var Control2 = function() {
|
|
|
3688
3733
|
overflow: "hidden"
|
|
3689
3734
|
},
|
|
3690
3735
|
children: [
|
|
3691
|
-
/* @__PURE__ */
|
|
3692
|
-
/* @__PURE__ */
|
|
3736
|
+
/* @__PURE__ */ jsx65(FilePlusIcon, {}),
|
|
3737
|
+
/* @__PURE__ */ jsx65("input", {
|
|
3693
3738
|
type: "file",
|
|
3694
3739
|
multiple: true,
|
|
3695
3740
|
accept: accept,
|
|
@@ -3714,20 +3759,20 @@ var Files = {
|
|
|
3714
3759
|
Control: Control2
|
|
3715
3760
|
};
|
|
3716
3761
|
// src/components/threads/Thread/MessageForm/Field/index.tsx
|
|
3717
|
-
import { jsx as
|
|
3762
|
+
import { jsx as jsx66 } from "react/jsx-runtime";
|
|
3718
3763
|
var Root6 = function(param) {
|
|
3719
3764
|
var children = param.children;
|
|
3720
3765
|
var _useFormContext2 = useFormContext2(), errors = _useFormContext2.formState.errors;
|
|
3721
|
-
return /* @__PURE__ */
|
|
3766
|
+
return /* @__PURE__ */ jsx66(RadixContainer, {
|
|
3722
3767
|
size: "2",
|
|
3723
3768
|
flexGrow: "0",
|
|
3724
|
-
children: /* @__PURE__ */
|
|
3769
|
+
children: /* @__PURE__ */ jsx66(Flex22, {
|
|
3725
3770
|
direction: "column",
|
|
3726
3771
|
flexShrink: "0",
|
|
3727
|
-
children: /* @__PURE__ */
|
|
3772
|
+
children: /* @__PURE__ */ jsx66(Flex22, {
|
|
3728
3773
|
direction: "column",
|
|
3729
3774
|
flexShrink: "0",
|
|
3730
|
-
children: /* @__PURE__ */
|
|
3775
|
+
children: /* @__PURE__ */ jsx66(Flex22, {
|
|
3731
3776
|
style: _object_spread({
|
|
3732
3777
|
borderRadius: "var(--radius-2)",
|
|
3733
3778
|
borderWidth: "1px",
|
|
@@ -3751,13 +3796,13 @@ var Field = {
|
|
|
3751
3796
|
Files: Files
|
|
3752
3797
|
};
|
|
3753
3798
|
// src/components/threads/Thread/MessageForm/index.tsx
|
|
3754
|
-
import { jsx as
|
|
3799
|
+
import { jsx as jsx67, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
3755
3800
|
var MessageForm = function() {
|
|
3756
|
-
return /* @__PURE__ */
|
|
3801
|
+
return /* @__PURE__ */ jsx67(Root4, {
|
|
3757
3802
|
children: /* @__PURE__ */ jsxs23(Field.Root, {
|
|
3758
3803
|
children: [
|
|
3759
|
-
/* @__PURE__ */
|
|
3760
|
-
/* @__PURE__ */
|
|
3804
|
+
/* @__PURE__ */ jsx67(Field.Control, {}),
|
|
3805
|
+
/* @__PURE__ */ jsx67(Submit, {})
|
|
3761
3806
|
]
|
|
3762
3807
|
})
|
|
3763
3808
|
});
|
|
@@ -3776,25 +3821,25 @@ import * as Toast2 from "@radix-ui/react-toast";
|
|
|
3776
3821
|
import * as Toast from "@radix-ui/react-toast";
|
|
3777
3822
|
import { Card as Card3, Text as Text7, Flex as Flex23 } from "@radix-ui/themes";
|
|
3778
3823
|
import { CheckCircledIcon as CheckCircledIcon2, CrossCircledIcon } from "@radix-ui/react-icons";
|
|
3779
|
-
import { jsx as
|
|
3824
|
+
import { jsx as jsx68, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
3780
3825
|
var CustomToast = function(param) {
|
|
3781
3826
|
var toast = param.toast;
|
|
3782
|
-
return /* @__PURE__ */
|
|
3783
|
-
children: /* @__PURE__ */
|
|
3784
|
-
children: /* @__PURE__ */
|
|
3827
|
+
return /* @__PURE__ */ jsx68(Toast.Root, {
|
|
3828
|
+
children: /* @__PURE__ */ jsx68(Card3, {
|
|
3829
|
+
children: /* @__PURE__ */ jsx68(Toast.Title, {
|
|
3785
3830
|
children: /* @__PURE__ */ jsxs24(Flex23, {
|
|
3786
3831
|
children: [
|
|
3787
|
-
/* @__PURE__ */
|
|
3832
|
+
/* @__PURE__ */ jsx68(Flex23, {
|
|
3788
3833
|
pr: "2",
|
|
3789
3834
|
height: "14px",
|
|
3790
3835
|
align: "center",
|
|
3791
|
-
children: toast.type === "success" ? /* @__PURE__ */
|
|
3836
|
+
children: toast.type === "success" ? /* @__PURE__ */ jsx68(CheckCircledIcon2, {
|
|
3792
3837
|
color: "var(--accent-9)"
|
|
3793
|
-
}) : /* @__PURE__ */
|
|
3838
|
+
}) : /* @__PURE__ */ jsx68(CrossCircledIcon, {
|
|
3794
3839
|
color: "var(--red-9)"
|
|
3795
3840
|
})
|
|
3796
3841
|
}),
|
|
3797
|
-
/* @__PURE__ */
|
|
3842
|
+
/* @__PURE__ */ jsx68(Text7, {
|
|
3798
3843
|
weight: "medium",
|
|
3799
3844
|
size: "1",
|
|
3800
3845
|
children: toast.message
|
|
@@ -3806,7 +3851,7 @@ var CustomToast = function(param) {
|
|
|
3806
3851
|
});
|
|
3807
3852
|
};
|
|
3808
3853
|
// src/components/toasts/ToastsProvider/index.tsx
|
|
3809
|
-
import { jsx as
|
|
3854
|
+
import { jsx as jsx69, jsxs as jsxs25 } from "react/jsx-runtime";
|
|
3810
3855
|
var ToastsProvider = function(param) {
|
|
3811
3856
|
var children = param.children, _param_bottom = param.bottom, bottom = _param_bottom === void 0 ? 0 : _param_bottom;
|
|
3812
3857
|
var _useState3 = _sliced_to_array(useState3([]), 2), toasts = _useState3[0], setToasts = _useState3[1];
|
|
@@ -3817,7 +3862,7 @@ var ToastsProvider = function(param) {
|
|
|
3817
3862
|
]);
|
|
3818
3863
|
});
|
|
3819
3864
|
}, []);
|
|
3820
|
-
return /* @__PURE__ */
|
|
3865
|
+
return /* @__PURE__ */ jsx69(ToastsContext.Provider, {
|
|
3821
3866
|
value: {
|
|
3822
3867
|
toasts: toasts,
|
|
3823
3868
|
addToast: addToast
|
|
@@ -3826,11 +3871,11 @@ var ToastsProvider = function(param) {
|
|
|
3826
3871
|
children: [
|
|
3827
3872
|
children,
|
|
3828
3873
|
Array.from(toasts).map(function(toast, index) {
|
|
3829
|
-
return /* @__PURE__ */
|
|
3874
|
+
return /* @__PURE__ */ jsx69(CustomToast, {
|
|
3830
3875
|
toast: toast
|
|
3831
3876
|
}, index);
|
|
3832
3877
|
}),
|
|
3833
|
-
/* @__PURE__ */
|
|
3878
|
+
/* @__PURE__ */ jsx69(Toast2.Viewport, {
|
|
3834
3879
|
style: {
|
|
3835
3880
|
position: "absolute",
|
|
3836
3881
|
bottom: bottom,
|
|
@@ -3852,15 +3897,15 @@ var ToastsProvider = function(param) {
|
|
|
3852
3897
|
});
|
|
3853
3898
|
};
|
|
3854
3899
|
// src/components/threads/Thread/Root/index.tsx
|
|
3855
|
-
import { jsx as
|
|
3900
|
+
import { jsx as jsx70 } from "react/jsx-runtime";
|
|
3856
3901
|
var Root8 = function(_param) {
|
|
3857
3902
|
var children = _param.children, rest = _object_without_properties(_param, [
|
|
3858
3903
|
"children"
|
|
3859
3904
|
]);
|
|
3860
|
-
return /* @__PURE__ */
|
|
3905
|
+
return /* @__PURE__ */ jsx70(ToastsProvider, {
|
|
3861
3906
|
bottom: "var(--space-9)",
|
|
3862
|
-
children: /* @__PURE__ */
|
|
3863
|
-
children: /* @__PURE__ */
|
|
3907
|
+
children: /* @__PURE__ */ jsx70(Provider2, _object_spread_props(_object_spread({}, rest), {
|
|
3908
|
+
children: /* @__PURE__ */ jsx70(Flex24, {
|
|
3864
3909
|
direction: "column",
|
|
3865
3910
|
flexGrow: "1",
|
|
3866
3911
|
children: children
|
|
@@ -3869,12 +3914,12 @@ var Root8 = function(_param) {
|
|
|
3869
3914
|
});
|
|
3870
3915
|
};
|
|
3871
3916
|
// src/components/threads/Thread/index.tsx
|
|
3872
|
-
import { jsx as
|
|
3917
|
+
import { jsx as jsx71, jsxs as jsxs26 } from "react/jsx-runtime";
|
|
3873
3918
|
var Thread = function(props) {
|
|
3874
3919
|
return /* @__PURE__ */ jsxs26(Root8, _object_spread_props(_object_spread({}, props), {
|
|
3875
3920
|
children: [
|
|
3876
|
-
/* @__PURE__ */
|
|
3877
|
-
/* @__PURE__ */
|
|
3921
|
+
/* @__PURE__ */ jsx71(Messages, {}),
|
|
3922
|
+
/* @__PURE__ */ jsx71(MessageForm, {})
|
|
3878
3923
|
]
|
|
3879
3924
|
}));
|
|
3880
3925
|
};
|
|
@@ -3998,12 +4043,12 @@ var useThreadDialogContext = function() {
|
|
|
3998
4043
|
return useContext13(ThreadDialogContext);
|
|
3999
4044
|
};
|
|
4000
4045
|
// src/components/threads/ThreadDialog/Provider/index.tsx
|
|
4001
|
-
import { jsx as
|
|
4046
|
+
import { jsx as jsx72 } from "react/jsx-runtime";
|
|
4002
4047
|
var Provider4 = function(param) {
|
|
4003
4048
|
var children = param.children;
|
|
4004
4049
|
var threadDialogContext = useThreadDialogContext();
|
|
4005
4050
|
var _useState4 = _sliced_to_array(useState4(threadDialogContext.isOpen), 2), isOpen = _useState4[0], setIsOpen = _useState4[1];
|
|
4006
|
-
return /* @__PURE__ */
|
|
4051
|
+
return /* @__PURE__ */ jsx72(ThreadDialogContext.Provider, {
|
|
4007
4052
|
value: {
|
|
4008
4053
|
isOpen: isOpen,
|
|
4009
4054
|
setIsOpen: setIsOpen
|
|
@@ -4012,10 +4057,10 @@ var Provider4 = function(param) {
|
|
|
4012
4057
|
});
|
|
4013
4058
|
};
|
|
4014
4059
|
// src/components/threads/ThreadDialog/Root/index.tsx
|
|
4015
|
-
import { jsx as
|
|
4060
|
+
import { jsx as jsx73 } from "react/jsx-runtime";
|
|
4016
4061
|
var Root9 = function(param) {
|
|
4017
4062
|
var children = param.children;
|
|
4018
|
-
return /* @__PURE__ */
|
|
4063
|
+
return /* @__PURE__ */ jsx73(Provider4, {
|
|
4019
4064
|
children: children
|
|
4020
4065
|
});
|
|
4021
4066
|
};
|
|
@@ -4024,20 +4069,20 @@ import { Flex as Flex25 } from "@radix-ui/themes";
|
|
|
4024
4069
|
// src/components/threads/ThreadDialog/Trigger/Button.tsx
|
|
4025
4070
|
import { IconButton as IconButton8 } from "@radix-ui/themes";
|
|
4026
4071
|
import { ChatBubbleIcon } from "@radix-ui/react-icons";
|
|
4027
|
-
import { jsx as
|
|
4072
|
+
import { jsx as jsx74 } from "react/jsx-runtime";
|
|
4028
4073
|
var Button3 = function() {
|
|
4029
|
-
return /* @__PURE__ */
|
|
4074
|
+
return /* @__PURE__ */ jsx74(IconButton8, {
|
|
4030
4075
|
size: "4",
|
|
4031
4076
|
radius: "full",
|
|
4032
|
-
children: /* @__PURE__ */
|
|
4077
|
+
children: /* @__PURE__ */ jsx74(ChatBubbleIcon, {})
|
|
4033
4078
|
});
|
|
4034
4079
|
};
|
|
4035
4080
|
// src/components/threads/ThreadDialog/Trigger/index.tsx
|
|
4036
|
-
import { jsx as
|
|
4081
|
+
import { jsx as jsx75 } from "react/jsx-runtime";
|
|
4037
4082
|
var Root10 = function(param) {
|
|
4038
4083
|
var children = param.children, _param_style = param.style, style = _param_style === void 0 ? {} : _param_style;
|
|
4039
4084
|
var _useThreadDialogContext = useThreadDialogContext(), setIsOpen = _useThreadDialogContext.setIsOpen, isOpen = _useThreadDialogContext.isOpen;
|
|
4040
|
-
return /* @__PURE__ */
|
|
4085
|
+
return /* @__PURE__ */ jsx75(Flex25, {
|
|
4041
4086
|
display: {
|
|
4042
4087
|
initial: isOpen ? "none" : "flex",
|
|
4043
4088
|
sm: "flex"
|
|
@@ -4061,8 +4106,8 @@ var Root10 = function(param) {
|
|
|
4061
4106
|
});
|
|
4062
4107
|
};
|
|
4063
4108
|
var Trigger = function(args) {
|
|
4064
|
-
return /* @__PURE__ */
|
|
4065
|
-
children: /* @__PURE__ */
|
|
4109
|
+
return /* @__PURE__ */ jsx75(Root10, _object_spread_props(_object_spread({}, args), {
|
|
4110
|
+
children: /* @__PURE__ */ jsx75(Button3, {})
|
|
4066
4111
|
}));
|
|
4067
4112
|
};
|
|
4068
4113
|
Trigger.Root = Root10;
|
|
@@ -4072,10 +4117,10 @@ import { Card as Card4, Inset as Inset2, Flex as Flex27 } from "@radix-ui/themes
|
|
|
4072
4117
|
// src/components/threads/ThreadDialog/Close/index.tsx
|
|
4073
4118
|
import { Cross1Icon } from "@radix-ui/react-icons";
|
|
4074
4119
|
import { IconButton as IconButton9, Flex as Flex26 } from "@radix-ui/themes";
|
|
4075
|
-
import { jsx as
|
|
4120
|
+
import { jsx as jsx76 } from "react/jsx-runtime";
|
|
4076
4121
|
var Close = function() {
|
|
4077
4122
|
var _useThreadDialogContext = useThreadDialogContext(), setIsOpen = _useThreadDialogContext.setIsOpen, isOpen = _useThreadDialogContext.isOpen;
|
|
4078
|
-
return /* @__PURE__ */
|
|
4123
|
+
return /* @__PURE__ */ jsx76(Flex26, {
|
|
4079
4124
|
display: {
|
|
4080
4125
|
initial: isOpen ? "flex" : "none",
|
|
4081
4126
|
sm: "none"
|
|
@@ -4095,20 +4140,20 @@ var Close = function() {
|
|
|
4095
4140
|
style: {
|
|
4096
4141
|
zIndex: 9999999999
|
|
4097
4142
|
},
|
|
4098
|
-
children: /* @__PURE__ */
|
|
4143
|
+
children: /* @__PURE__ */ jsx76(IconButton9, {
|
|
4099
4144
|
size: "2",
|
|
4100
4145
|
variant: "soft",
|
|
4101
|
-
children: /* @__PURE__ */
|
|
4146
|
+
children: /* @__PURE__ */ jsx76(Cross1Icon, {})
|
|
4102
4147
|
})
|
|
4103
4148
|
});
|
|
4104
4149
|
};
|
|
4105
4150
|
// src/components/threads/ThreadDialog/Content/index.tsx
|
|
4106
|
-
import { jsx as
|
|
4151
|
+
import { jsx as jsx77, jsxs as jsxs27 } from "react/jsx-runtime";
|
|
4107
4152
|
var Root11 = function(param) {
|
|
4108
4153
|
var children = param.children, _param_style = param.style, style = _param_style === void 0 ? {} : _param_style;
|
|
4109
4154
|
var isOpen = useThreadDialogContext().isOpen;
|
|
4110
4155
|
if (!isOpen) return null;
|
|
4111
|
-
return /* @__PURE__ */
|
|
4156
|
+
return /* @__PURE__ */ jsx77(Flex27, {
|
|
4112
4157
|
direction: "column",
|
|
4113
4158
|
justify: "end",
|
|
4114
4159
|
position: "fixed",
|
|
@@ -4147,7 +4192,7 @@ var Root11 = function(param) {
|
|
|
4147
4192
|
flexGrow: 1
|
|
4148
4193
|
},
|
|
4149
4194
|
children: [
|
|
4150
|
-
/* @__PURE__ */
|
|
4195
|
+
/* @__PURE__ */ jsx77(Inset2, {
|
|
4151
4196
|
clip: "padding-box",
|
|
4152
4197
|
side: "all",
|
|
4153
4198
|
pb: "current",
|
|
@@ -4157,13 +4202,13 @@ var Root11 = function(param) {
|
|
|
4157
4202
|
},
|
|
4158
4203
|
children: children
|
|
4159
4204
|
}),
|
|
4160
|
-
/* @__PURE__ */
|
|
4205
|
+
/* @__PURE__ */ jsx77(Close, {})
|
|
4161
4206
|
]
|
|
4162
4207
|
})
|
|
4163
4208
|
});
|
|
4164
4209
|
};
|
|
4165
4210
|
var Messages2 = function() {
|
|
4166
|
-
return /* @__PURE__ */
|
|
4211
|
+
return /* @__PURE__ */ jsx77(Thread.Messages, {
|
|
4167
4212
|
style: {
|
|
4168
4213
|
paddingTop: "var(--space-5)",
|
|
4169
4214
|
paddingRight: "var(--space-5)",
|
|
@@ -4173,7 +4218,7 @@ var Messages2 = function() {
|
|
|
4173
4218
|
};
|
|
4174
4219
|
var FormContainer = function(param) {
|
|
4175
4220
|
var children = param.children;
|
|
4176
|
-
return /* @__PURE__ */
|
|
4221
|
+
return /* @__PURE__ */ jsx77(Flex27, {
|
|
4177
4222
|
direction: "column",
|
|
4178
4223
|
pl: "5",
|
|
4179
4224
|
pr: "5",
|
|
@@ -4184,13 +4229,13 @@ var FormContainer = function(param) {
|
|
|
4184
4229
|
};
|
|
4185
4230
|
var Content5 = function(param) {
|
|
4186
4231
|
var _param_style = param.style, style = _param_style === void 0 ? {} : _param_style;
|
|
4187
|
-
return /* @__PURE__ */
|
|
4232
|
+
return /* @__PURE__ */ jsx77(Root11, {
|
|
4188
4233
|
style: style,
|
|
4189
4234
|
children: /* @__PURE__ */ jsxs27(Thread.Root, {
|
|
4190
4235
|
children: [
|
|
4191
|
-
/* @__PURE__ */
|
|
4192
|
-
/* @__PURE__ */
|
|
4193
|
-
children: /* @__PURE__ */
|
|
4236
|
+
/* @__PURE__ */ jsx77(Messages2, {}),
|
|
4237
|
+
/* @__PURE__ */ jsx77(FormContainer, {
|
|
4238
|
+
children: /* @__PURE__ */ jsx77(Thread.MessageForm, {})
|
|
4194
4239
|
})
|
|
4195
4240
|
]
|
|
4196
4241
|
})
|
|
@@ -4200,12 +4245,12 @@ Content5.Root = Root11;
|
|
|
4200
4245
|
Content5.Messages = Messages2;
|
|
4201
4246
|
Content5.FormContainer = FormContainer;
|
|
4202
4247
|
// src/components/threads/ThreadDialog/index.tsx
|
|
4203
|
-
import { jsx as
|
|
4248
|
+
import { jsx as jsx78, jsxs as jsxs28 } from "react/jsx-runtime";
|
|
4204
4249
|
var ThreadDialog = function() {
|
|
4205
4250
|
return /* @__PURE__ */ jsxs28(Root9, {
|
|
4206
4251
|
children: [
|
|
4207
|
-
/* @__PURE__ */
|
|
4208
|
-
/* @__PURE__ */
|
|
4252
|
+
/* @__PURE__ */ jsx78(Content5, {}),
|
|
4253
|
+
/* @__PURE__ */ jsx78(Trigger, {})
|
|
4209
4254
|
]
|
|
4210
4255
|
});
|
|
4211
4256
|
};
|
|
@@ -4722,7 +4767,7 @@ var useMessageAudio = function(param) {
|
|
|
4722
4767
|
};
|
|
4723
4768
|
// src/components/threads/AudioThread/Root/index.tsx
|
|
4724
4769
|
import { useQueryClient as useQueryClient6 } from "@tanstack/react-query";
|
|
4725
|
-
import { jsx as
|
|
4770
|
+
import { jsx as jsx79 } from "react/jsx-runtime";
|
|
4726
4771
|
var Content6 = function(param) {
|
|
4727
4772
|
var children = param.children;
|
|
4728
4773
|
var addToast = useToasts().addToast;
|
|
@@ -4792,13 +4837,13 @@ var Content6 = function(param) {
|
|
|
4792
4837
|
createMessageProps: createMessageProps,
|
|
4793
4838
|
messageAudioProps: messageAudioProps
|
|
4794
4839
|
}).status;
|
|
4795
|
-
return /* @__PURE__ */
|
|
4840
|
+
return /* @__PURE__ */ jsx79(AudioThreadContext.Provider, {
|
|
4796
4841
|
value: {
|
|
4797
4842
|
status: status,
|
|
4798
4843
|
recorderProps: recorderProps,
|
|
4799
4844
|
messageAudioProps: messageAudioProps
|
|
4800
4845
|
},
|
|
4801
|
-
children: /* @__PURE__ */
|
|
4846
|
+
children: /* @__PURE__ */ jsx79(Flex28, {
|
|
4802
4847
|
direction: "column",
|
|
4803
4848
|
flexGrow: "1",
|
|
4804
4849
|
p: "9",
|
|
@@ -4808,8 +4853,8 @@ var Content6 = function(param) {
|
|
|
4808
4853
|
};
|
|
4809
4854
|
var Root12 = function(param) {
|
|
4810
4855
|
var children = param.children;
|
|
4811
|
-
return /* @__PURE__ */
|
|
4812
|
-
children: /* @__PURE__ */
|
|
4856
|
+
return /* @__PURE__ */ jsx79(ToastsProvider, {
|
|
4857
|
+
children: /* @__PURE__ */ jsx79(Content6, {
|
|
4813
4858
|
children: children
|
|
4814
4859
|
})
|
|
4815
4860
|
});
|
|
@@ -4828,7 +4873,7 @@ import _8 from "lodash";
|
|
|
4828
4873
|
import { Flex as Flex29, Grid } from "@radix-ui/themes";
|
|
4829
4874
|
import { useState as useState8, useEffect as useEffect10, useCallback as useCallback5 } from "react";
|
|
4830
4875
|
import { cluster } from "radash";
|
|
4831
|
-
import { jsx as
|
|
4876
|
+
import { jsx as jsx80 } from "react/jsx-runtime";
|
|
4832
4877
|
var barCount = 4;
|
|
4833
4878
|
var BarsVisualizer = function(param) {
|
|
4834
4879
|
var visualizationAnalyser = param.visualizationAnalyser, backgroundColor = param.backgroundColor, height = param.height, barWidth = param.barWidth;
|
|
@@ -4859,7 +4904,7 @@ var BarsVisualizer = function(param) {
|
|
|
4859
4904
|
draw,
|
|
4860
4905
|
visualizationAnalyser
|
|
4861
4906
|
]);
|
|
4862
|
-
return /* @__PURE__ */
|
|
4907
|
+
return /* @__PURE__ */ jsx80(Grid, {
|
|
4863
4908
|
columns: "".concat(barCount),
|
|
4864
4909
|
gap: "1",
|
|
4865
4910
|
width: "auto",
|
|
@@ -4868,12 +4913,12 @@ var BarsVisualizer = function(param) {
|
|
|
4868
4913
|
gridTemplateColumns: "repeat(4, minmax(0, 1fr))"
|
|
4869
4914
|
},
|
|
4870
4915
|
children: barHeights.map(function(barHeight, index) {
|
|
4871
|
-
return /* @__PURE__ */
|
|
4916
|
+
return /* @__PURE__ */ jsx80(Flex29, {
|
|
4872
4917
|
direction: "column",
|
|
4873
4918
|
align: "center",
|
|
4874
4919
|
justify: "center",
|
|
4875
4920
|
height: height,
|
|
4876
|
-
children: /* @__PURE__ */
|
|
4921
|
+
children: /* @__PURE__ */ jsx80(Flex29, {
|
|
4877
4922
|
minHeight: "50%",
|
|
4878
4923
|
maxHeight: "100%",
|
|
4879
4924
|
height: "".concat(barHeight + 20, "%"),
|
|
@@ -4888,7 +4933,7 @@ var BarsVisualizer = function(param) {
|
|
|
4888
4933
|
});
|
|
4889
4934
|
};
|
|
4890
4935
|
// src/components/threads/AudioThread/Visualization/index.tsx
|
|
4891
|
-
import { jsx as
|
|
4936
|
+
import { jsx as jsx81, jsxs as jsxs29 } from "react/jsx-runtime";
|
|
4892
4937
|
var Visualization = function() {
|
|
4893
4938
|
var audioThreadContext = useAudioThreadContext();
|
|
4894
4939
|
var assistantNameContext = useContext15(AssistantNameContext);
|
|
@@ -4923,7 +4968,7 @@ var Visualization = function() {
|
|
|
4923
4968
|
mb: "3",
|
|
4924
4969
|
flexGrow: "1",
|
|
4925
4970
|
children: [
|
|
4926
|
-
/* @__PURE__ */
|
|
4971
|
+
/* @__PURE__ */ jsx81(Flex30, {
|
|
4927
4972
|
align: "center",
|
|
4928
4973
|
justify: "center",
|
|
4929
4974
|
height: "200px",
|
|
@@ -4933,7 +4978,7 @@ var Visualization = function() {
|
|
|
4933
4978
|
borderRadius: "9999px",
|
|
4934
4979
|
scale: scale
|
|
4935
4980
|
},
|
|
4936
|
-
children: /* @__PURE__ */
|
|
4981
|
+
children: /* @__PURE__ */ jsx81(BarsVisualizer, {
|
|
4937
4982
|
visualizationAnalyser: audioThreadContext.messageAudioProps.visualizationAnalyser,
|
|
4938
4983
|
backgroundColor: audioThreadContext.status === "playing" ? "var(--accent-11)" : "var(--gray-11)",
|
|
4939
4984
|
height: "40px",
|
|
@@ -4945,8 +4990,8 @@ var Visualization = function() {
|
|
|
4945
4990
|
gap: "3",
|
|
4946
4991
|
pt: "5",
|
|
4947
4992
|
children: [
|
|
4948
|
-
/* @__PURE__ */
|
|
4949
|
-
/* @__PURE__ */
|
|
4993
|
+
/* @__PURE__ */ jsx81(AssistantAvatar, {}),
|
|
4994
|
+
/* @__PURE__ */ jsx81(Name, {
|
|
4950
4995
|
children: assistantNameContext
|
|
4951
4996
|
})
|
|
4952
4997
|
]
|
|
@@ -4956,7 +5001,7 @@ var Visualization = function() {
|
|
|
4956
5001
|
};
|
|
4957
5002
|
// src/components/threads/AudioThread/Status/StatusMessages.tsx
|
|
4958
5003
|
import { Flex as Flex31, Text as Text8 } from "@radix-ui/themes";
|
|
4959
|
-
import { jsx as
|
|
5004
|
+
import { jsx as jsx82, jsxs as jsxs30 } from "react/jsx-runtime";
|
|
4960
5005
|
var html = function(param) {
|
|
4961
5006
|
var texts = param.texts;
|
|
4962
5007
|
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) {
|
|
@@ -4969,13 +5014,13 @@ var StatusMessages = function(param) {
|
|
|
4969
5014
|
justify: "center",
|
|
4970
5015
|
pb: "5",
|
|
4971
5016
|
children: [
|
|
4972
|
-
/* @__PURE__ */
|
|
5017
|
+
/* @__PURE__ */ jsx82(Text8, {
|
|
4973
5018
|
size: "2",
|
|
4974
5019
|
weight: "regular",
|
|
4975
5020
|
color: "gray",
|
|
4976
5021
|
className: "status-messages-texts"
|
|
4977
5022
|
}),
|
|
4978
|
-
/* @__PURE__ */
|
|
5023
|
+
/* @__PURE__ */ jsx82("style", {
|
|
4979
5024
|
dangerouslySetInnerHTML: {
|
|
4980
5025
|
__html: html({
|
|
4981
5026
|
texts: texts
|
|
@@ -4986,11 +5031,11 @@ var StatusMessages = function(param) {
|
|
|
4986
5031
|
});
|
|
4987
5032
|
};
|
|
4988
5033
|
// src/components/threads/AudioThread/Status/index.tsx
|
|
4989
|
-
import { jsx as
|
|
5034
|
+
import { jsx as jsx83 } from "react/jsx-runtime";
|
|
4990
5035
|
var Status = function() {
|
|
4991
5036
|
var audioThreadContext = useAudioThreadContext();
|
|
4992
5037
|
if (audioThreadContext.status === "recording") {
|
|
4993
|
-
return /* @__PURE__ */
|
|
5038
|
+
return /* @__PURE__ */ jsx83(StatusMessages, {
|
|
4994
5039
|
texts: [
|
|
4995
5040
|
"Start speaking",
|
|
4996
5041
|
"Listening",
|
|
@@ -5004,20 +5049,20 @@ var Status = function() {
|
|
|
5004
5049
|
"idle",
|
|
5005
5050
|
"playerPaused"
|
|
5006
5051
|
].includes(audioThreadContext.status)) {
|
|
5007
|
-
return /* @__PURE__ */
|
|
5052
|
+
return /* @__PURE__ */ jsx83(StatusMessages, {
|
|
5008
5053
|
texts: [
|
|
5009
5054
|
"Click the button below to activate"
|
|
5010
5055
|
]
|
|
5011
5056
|
});
|
|
5012
5057
|
}
|
|
5013
5058
|
if (audioThreadContext.status === "playing") {
|
|
5014
|
-
return /* @__PURE__ */
|
|
5059
|
+
return /* @__PURE__ */ jsx83(StatusMessages, {
|
|
5015
5060
|
texts: [
|
|
5016
5061
|
"Click the button below to interrupt"
|
|
5017
5062
|
]
|
|
5018
5063
|
});
|
|
5019
5064
|
}
|
|
5020
|
-
return /* @__PURE__ */
|
|
5065
|
+
return /* @__PURE__ */ jsx83(StatusMessages, {
|
|
5021
5066
|
texts: [
|
|
5022
5067
|
"Thinking"
|
|
5023
5068
|
]
|
|
@@ -5026,9 +5071,9 @@ var Status = function() {
|
|
|
5026
5071
|
// src/components/threads/AudioThread/Form/index.tsx
|
|
5027
5072
|
import { Flex as Flex33 } from "@radix-ui/themes";
|
|
5028
5073
|
// src/components/threads/AudioThread/Form/MicIcon.tsx
|
|
5029
|
-
import { jsx as
|
|
5074
|
+
import { jsx as jsx84 } from "react/jsx-runtime";
|
|
5030
5075
|
var MicIcon = function(props) {
|
|
5031
|
-
return /* @__PURE__ */
|
|
5076
|
+
return /* @__PURE__ */ jsx84("svg", _object_spread_props(_object_spread({
|
|
5032
5077
|
xmlns: "http://www.w3.org/2000/svg",
|
|
5033
5078
|
fill: "currentColor",
|
|
5034
5079
|
stroke: "currentColor",
|
|
@@ -5037,7 +5082,7 @@ var MicIcon = function(props) {
|
|
|
5037
5082
|
height: "15",
|
|
5038
5083
|
width: "15"
|
|
5039
5084
|
}, props), {
|
|
5040
|
-
children: /* @__PURE__ */
|
|
5085
|
+
children: /* @__PURE__ */ jsx84("path", {
|
|
5041
5086
|
stroke: "none",
|
|
5042
5087
|
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"
|
|
5043
5088
|
})
|
|
@@ -5046,7 +5091,7 @@ var MicIcon = function(props) {
|
|
|
5046
5091
|
// src/components/threads/AudioThread/Form/ActionButton/index.tsx
|
|
5047
5092
|
import { Flex as Flex32, IconButton as IconButton10 } from "@radix-ui/themes";
|
|
5048
5093
|
import { StopIcon as StopIcon2, PauseIcon as PauseIcon2, ArrowUpIcon as ArrowUpIcon2, ResumeIcon } from "@radix-ui/react-icons";
|
|
5049
|
-
import { jsx as
|
|
5094
|
+
import { jsx as jsx85, jsxs as jsxs31 } from "react/jsx-runtime";
|
|
5050
5095
|
var ActionButton = function() {
|
|
5051
5096
|
var audioThreadContext = useAudioThreadContext();
|
|
5052
5097
|
var superinterfaceContext = useSuperinterfaceContext();
|
|
@@ -5054,37 +5099,37 @@ var ActionButton = function() {
|
|
|
5054
5099
|
return /* @__PURE__ */ jsxs31(Flex32, {
|
|
5055
5100
|
align: "center",
|
|
5056
5101
|
children: [
|
|
5057
|
-
/* @__PURE__ */
|
|
5102
|
+
/* @__PURE__ */ jsx85(Flex32, {
|
|
5058
5103
|
mr: "3",
|
|
5059
5104
|
ml: "-7",
|
|
5060
|
-
children: /* @__PURE__ */
|
|
5105
|
+
children: /* @__PURE__ */ jsx85(IconButton10, {
|
|
5061
5106
|
onClick: audioThreadContext.recorderProps.pause,
|
|
5062
5107
|
color: "gray",
|
|
5063
5108
|
variant: "soft",
|
|
5064
5109
|
size: "1",
|
|
5065
|
-
children: /* @__PURE__ */
|
|
5110
|
+
children: /* @__PURE__ */ jsx85(PauseIcon2, {})
|
|
5066
5111
|
})
|
|
5067
5112
|
}),
|
|
5068
|
-
/* @__PURE__ */
|
|
5113
|
+
/* @__PURE__ */ jsx85(IconButton10, {
|
|
5069
5114
|
onClick: audioThreadContext.recorderProps.stop,
|
|
5070
5115
|
highContrast: true,
|
|
5071
5116
|
variant: "soft",
|
|
5072
5117
|
size: "4",
|
|
5073
|
-
children: /* @__PURE__ */
|
|
5118
|
+
children: /* @__PURE__ */ jsx85(ArrowUpIcon2, {})
|
|
5074
5119
|
})
|
|
5075
5120
|
]
|
|
5076
5121
|
});
|
|
5077
5122
|
}
|
|
5078
5123
|
if (audioThreadContext.status === "recorderPaused") {
|
|
5079
|
-
return /* @__PURE__ */
|
|
5124
|
+
return /* @__PURE__ */ jsx85(IconButton10, {
|
|
5080
5125
|
onClick: audioThreadContext.recorderProps.resume,
|
|
5081
5126
|
color: "red",
|
|
5082
5127
|
size: "4",
|
|
5083
|
-
children: /* @__PURE__ */
|
|
5128
|
+
children: /* @__PURE__ */ jsx85(ResumeIcon, {})
|
|
5084
5129
|
});
|
|
5085
5130
|
}
|
|
5086
5131
|
if (audioThreadContext.status === "idle") {
|
|
5087
|
-
return /* @__PURE__ */
|
|
5132
|
+
return /* @__PURE__ */ jsx85(IconButton10, {
|
|
5088
5133
|
onClick: function() {
|
|
5089
5134
|
return audioThreadContext.recorderProps.start();
|
|
5090
5135
|
},
|
|
@@ -5093,7 +5138,7 @@ var ActionButton = function() {
|
|
|
5093
5138
|
});
|
|
5094
5139
|
}
|
|
5095
5140
|
if (audioThreadContext.status === "playing") {
|
|
5096
|
-
return /* @__PURE__ */
|
|
5141
|
+
return /* @__PURE__ */ jsx85(IconButton10, {
|
|
5097
5142
|
onClick: function() {
|
|
5098
5143
|
var _superinterfaceContext_createMessageAbortControllerRef_current;
|
|
5099
5144
|
audioThreadContext.messageAudioProps.stop();
|
|
@@ -5103,26 +5148,26 @@ var ActionButton = function() {
|
|
|
5103
5148
|
size: "4",
|
|
5104
5149
|
color: "gray",
|
|
5105
5150
|
variant: "soft",
|
|
5106
|
-
children: /* @__PURE__ */
|
|
5151
|
+
children: /* @__PURE__ */ jsx85(StopIcon2, {})
|
|
5107
5152
|
});
|
|
5108
5153
|
}
|
|
5109
5154
|
if (audioThreadContext.status === "playerPaused") {
|
|
5110
|
-
return /* @__PURE__ */
|
|
5155
|
+
return /* @__PURE__ */ jsx85(IconButton10, {
|
|
5111
5156
|
onClick: function() {
|
|
5112
5157
|
return audioThreadContext.messageAudioProps.play();
|
|
5113
5158
|
},
|
|
5114
5159
|
size: "4",
|
|
5115
|
-
children: /* @__PURE__ */
|
|
5160
|
+
children: /* @__PURE__ */ jsx85(ResumeIcon, {})
|
|
5116
5161
|
});
|
|
5117
5162
|
}
|
|
5118
|
-
return /* @__PURE__ */
|
|
5163
|
+
return /* @__PURE__ */ jsx85(IconButton10, {
|
|
5119
5164
|
size: "4",
|
|
5120
5165
|
variant: "soft",
|
|
5121
5166
|
disabled: true
|
|
5122
5167
|
});
|
|
5123
5168
|
};
|
|
5124
5169
|
// src/components/threads/AudioThread/Form/index.tsx
|
|
5125
|
-
import { jsx as
|
|
5170
|
+
import { jsx as jsx86, jsxs as jsxs32 } from "react/jsx-runtime";
|
|
5126
5171
|
var Form = function() {
|
|
5127
5172
|
var audioThreadContext = useAudioThreadContext();
|
|
5128
5173
|
return /* @__PURE__ */ jsxs32(Flex33, {
|
|
@@ -5133,24 +5178,24 @@ var Form = function() {
|
|
|
5133
5178
|
pb: "3",
|
|
5134
5179
|
align: "center",
|
|
5135
5180
|
children: [
|
|
5136
|
-
/* @__PURE__ */
|
|
5181
|
+
/* @__PURE__ */ jsx86(Flex33, {
|
|
5137
5182
|
ml: "-22.5px",
|
|
5138
5183
|
mr: "2",
|
|
5139
5184
|
align: "center",
|
|
5140
|
-
children: /* @__PURE__ */
|
|
5185
|
+
children: /* @__PURE__ */ jsx86(MicIcon, {
|
|
5141
5186
|
style: {
|
|
5142
5187
|
color: audioThreadContext.status === "recording" ? "var(--accent-11)" : "var(--gray-11)"
|
|
5143
5188
|
}
|
|
5144
5189
|
})
|
|
5145
5190
|
}),
|
|
5146
|
-
/* @__PURE__ */
|
|
5191
|
+
/* @__PURE__ */ jsx86(Flex33, {
|
|
5147
5192
|
px: "2",
|
|
5148
5193
|
py: "1",
|
|
5149
5194
|
style: {
|
|
5150
5195
|
backgroundColor: audioThreadContext.status === "recording" ? "var(--accent-4)" : "var(--gray-4)",
|
|
5151
5196
|
borderRadius: "var(--radius-6)"
|
|
5152
5197
|
},
|
|
5153
|
-
children: /* @__PURE__ */
|
|
5198
|
+
children: /* @__PURE__ */ jsx86(BarsVisualizer, {
|
|
5154
5199
|
visualizationAnalyser: audioThreadContext.recorderProps.visualizationAnalyser,
|
|
5155
5200
|
backgroundColor: audioThreadContext.status === "recording" ? "var(--accent-11)" : "var(--gray-11)",
|
|
5156
5201
|
height: "20px",
|
|
@@ -5159,18 +5204,18 @@ var Form = function() {
|
|
|
5159
5204
|
})
|
|
5160
5205
|
]
|
|
5161
5206
|
}),
|
|
5162
|
-
/* @__PURE__ */
|
|
5207
|
+
/* @__PURE__ */ jsx86(ActionButton, {})
|
|
5163
5208
|
]
|
|
5164
5209
|
});
|
|
5165
5210
|
};
|
|
5166
5211
|
// src/components/threads/AudioThread/index.tsx
|
|
5167
|
-
import { jsx as
|
|
5212
|
+
import { jsx as jsx87, jsxs as jsxs33 } from "react/jsx-runtime";
|
|
5168
5213
|
var AudioThread = function(props) {
|
|
5169
5214
|
return /* @__PURE__ */ jsxs33(Root12, _object_spread_props(_object_spread({}, props), {
|
|
5170
5215
|
children: [
|
|
5171
|
-
/* @__PURE__ */
|
|
5172
|
-
/* @__PURE__ */
|
|
5173
|
-
/* @__PURE__ */
|
|
5216
|
+
/* @__PURE__ */ jsx87(Visualization, {}),
|
|
5217
|
+
/* @__PURE__ */ jsx87(Status, {}),
|
|
5218
|
+
/* @__PURE__ */ jsx87(Form, {})
|
|
5174
5219
|
]
|
|
5175
5220
|
}));
|
|
5176
5221
|
};
|
|
@@ -5179,14 +5224,14 @@ AudioThread.Visualization = Visualization;
|
|
|
5179
5224
|
AudioThread.Status = Status;
|
|
5180
5225
|
AudioThread.Form = Form;
|
|
5181
5226
|
// src/components/threads/AudioThreadDialog/index.tsx
|
|
5182
|
-
import { jsx as
|
|
5227
|
+
import { jsx as jsx88, jsxs as jsxs34 } from "react/jsx-runtime";
|
|
5183
5228
|
var AudioThreadDialog = function() {
|
|
5184
5229
|
return /* @__PURE__ */ jsxs34(Root9, {
|
|
5185
5230
|
children: [
|
|
5186
|
-
/* @__PURE__ */
|
|
5187
|
-
children: /* @__PURE__ */
|
|
5231
|
+
/* @__PURE__ */ jsx88(Content5.Root, {
|
|
5232
|
+
children: /* @__PURE__ */ jsx88(AudioThread, {})
|
|
5188
5233
|
}),
|
|
5189
|
-
/* @__PURE__ */
|
|
5234
|
+
/* @__PURE__ */ jsx88(Trigger, {})
|
|
5190
5235
|
]
|
|
5191
5236
|
});
|
|
5192
5237
|
};
|
|
@@ -5204,7 +5249,7 @@ import { Flex as Flex34 } from "@radix-ui/themes";
|
|
|
5204
5249
|
import { ArrowUpIcon as ArrowUpIcon3 } from "@radix-ui/react-icons";
|
|
5205
5250
|
import { Text as Text9, Button as Button4, Spinner as Spinner2 } from "@radix-ui/themes";
|
|
5206
5251
|
import { useQueryClient as useQueryClient7 } from "@tanstack/react-query";
|
|
5207
|
-
import { jsx as
|
|
5252
|
+
import { jsx as jsx89, jsxs as jsxs35 } from "react/jsx-runtime";
|
|
5208
5253
|
var Item = function(param) {
|
|
5209
5254
|
var suggestion = param.suggestion, isDisabled = param.isDisabled;
|
|
5210
5255
|
var addToast = useToasts().addToast;
|
|
@@ -5217,7 +5262,7 @@ var Item = function(param) {
|
|
|
5217
5262
|
threadContext: threadContext
|
|
5218
5263
|
})
|
|
5219
5264
|
}), createMessage = _useCreateMessage.createMessage, isPending = _useCreateMessage.isPending;
|
|
5220
|
-
return /* @__PURE__ */
|
|
5265
|
+
return /* @__PURE__ */ jsx89(Content7, {
|
|
5221
5266
|
onClick: function() {
|
|
5222
5267
|
createMessage({
|
|
5223
5268
|
// @ts-ignore-next-line
|
|
@@ -5241,14 +5286,14 @@ var Content7 = function(param) {
|
|
|
5241
5286
|
flexShrink: 1
|
|
5242
5287
|
},
|
|
5243
5288
|
children: [
|
|
5244
|
-
/* @__PURE__ */
|
|
5289
|
+
/* @__PURE__ */ jsx89(Text9, {
|
|
5245
5290
|
size: "1",
|
|
5246
5291
|
weight: "regular",
|
|
5247
5292
|
children: children
|
|
5248
5293
|
}),
|
|
5249
|
-
/* @__PURE__ */
|
|
5294
|
+
/* @__PURE__ */ jsx89(Spinner2, {
|
|
5250
5295
|
loading: isPending,
|
|
5251
|
-
children: /* @__PURE__ */
|
|
5296
|
+
children: /* @__PURE__ */ jsx89(ArrowUpIcon3, {
|
|
5252
5297
|
style: {
|
|
5253
5298
|
flexShrink: 0
|
|
5254
5299
|
}
|
|
@@ -5259,7 +5304,7 @@ var Content7 = function(param) {
|
|
|
5259
5304
|
};
|
|
5260
5305
|
Item.Content = Content7;
|
|
5261
5306
|
// src/components/suggestions/Suggestions/Content.tsx
|
|
5262
|
-
import { jsx as
|
|
5307
|
+
import { jsx as jsx90 } from "react/jsx-runtime";
|
|
5263
5308
|
var Content8 = function(param) {
|
|
5264
5309
|
var children = param.children;
|
|
5265
5310
|
var isMutatingMessage = useIsMutatingMessage();
|
|
@@ -5273,12 +5318,12 @@ var Content8 = function(param) {
|
|
|
5273
5318
|
children
|
|
5274
5319
|
]);
|
|
5275
5320
|
if (isEmpty3(suggestions)) return null;
|
|
5276
|
-
return /* @__PURE__ */
|
|
5321
|
+
return /* @__PURE__ */ jsx90(Flex34, {
|
|
5277
5322
|
gap: "2",
|
|
5278
5323
|
py: "2",
|
|
5279
5324
|
wrap: "wrap",
|
|
5280
5325
|
children: suggestions.map(function(suggestion) {
|
|
5281
|
-
return /* @__PURE__ */
|
|
5326
|
+
return /* @__PURE__ */ jsx90(Item, {
|
|
5282
5327
|
suggestion: suggestion,
|
|
5283
5328
|
isDisabled: isMutatingMessage
|
|
5284
5329
|
}, suggestion);
|
|
@@ -5286,7 +5331,7 @@ var Content8 = function(param) {
|
|
|
5286
5331
|
});
|
|
5287
5332
|
};
|
|
5288
5333
|
// src/components/suggestions/Suggestions/index.tsx
|
|
5289
|
-
import { jsx as
|
|
5334
|
+
import { jsx as jsx91 } from "react/jsx-runtime";
|
|
5290
5335
|
var Suggestions = function(param) {
|
|
5291
5336
|
var children = param.children;
|
|
5292
5337
|
var latestMessageProps = useLatestMessage();
|
|
@@ -5299,14 +5344,14 @@ var Suggestions = function(param) {
|
|
|
5299
5344
|
]);
|
|
5300
5345
|
if (latestMessageProps.isLoading) return null;
|
|
5301
5346
|
if (isDisabled) return null;
|
|
5302
|
-
return /* @__PURE__ */
|
|
5347
|
+
return /* @__PURE__ */ jsx91(Content8, {
|
|
5303
5348
|
children: children
|
|
5304
5349
|
});
|
|
5305
5350
|
};
|
|
5306
5351
|
Suggestions.Item = Item;
|
|
5307
5352
|
// src/components/markdown/MarkdownProvider/index.tsx
|
|
5308
5353
|
import { useMemo as useMemo17 } from "react";
|
|
5309
|
-
import { jsx as
|
|
5354
|
+
import { jsx as jsx92 } from "react/jsx-runtime";
|
|
5310
5355
|
var MarkdownProvider = function(_param) {
|
|
5311
5356
|
var children = _param.children, rest = _object_without_properties(_param, [
|
|
5312
5357
|
"children"
|
|
@@ -5318,7 +5363,7 @@ var MarkdownProvider = function(_param) {
|
|
|
5318
5363
|
rest,
|
|
5319
5364
|
prevMarkdownContext
|
|
5320
5365
|
]);
|
|
5321
|
-
return /* @__PURE__ */
|
|
5366
|
+
return /* @__PURE__ */ jsx92(MarkdownContext.Provider, {
|
|
5322
5367
|
value: value,
|
|
5323
5368
|
children: children
|
|
5324
5369
|
});
|
|
@@ -5377,11 +5422,11 @@ var optimizedSrc = function(param) {
|
|
|
5377
5422
|
}));
|
|
5378
5423
|
};
|
|
5379
5424
|
// src/components/imageAvatars/ImageAvatar/index.tsx
|
|
5380
|
-
import { jsx as
|
|
5425
|
+
import { jsx as jsx93 } from "react/jsx-runtime";
|
|
5381
5426
|
var ImageAvatar = function(param) {
|
|
5382
5427
|
var imageAvatar = param.imageAvatar, size = param.size;
|
|
5383
5428
|
var superinterfaceContext = useSuperinterfaceContext();
|
|
5384
|
-
return /* @__PURE__ */
|
|
5429
|
+
return /* @__PURE__ */ jsx93(Avatar4, {
|
|
5385
5430
|
fallback: "",
|
|
5386
5431
|
src: optimizedSrc({
|
|
5387
5432
|
imageAvatar: imageAvatar,
|
|
@@ -5399,7 +5444,7 @@ import { BackpackIcon, RocketIcon, MagicWandIcon, CubeIcon, TargetIcon, DiscIcon
|
|
|
5399
5444
|
var _obj;
|
|
5400
5445
|
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);
|
|
5401
5446
|
// src/components/iconAvatars/IconAvatar.tsx
|
|
5402
|
-
import { jsx as
|
|
5447
|
+
import { jsx as jsx94 } from "react/jsx-runtime";
|
|
5403
5448
|
var IconAvatar = function(param) {
|
|
5404
5449
|
var iconAvatar = param.iconAvatar, size = param.size;
|
|
5405
5450
|
var Component = useMemo18(function() {
|
|
@@ -5407,30 +5452,30 @@ var IconAvatar = function(param) {
|
|
|
5407
5452
|
}, [
|
|
5408
5453
|
iconAvatar
|
|
5409
5454
|
]);
|
|
5410
|
-
return /* @__PURE__ */
|
|
5455
|
+
return /* @__PURE__ */ jsx94(Avatar5, {
|
|
5411
5456
|
size: size,
|
|
5412
|
-
fallback: Component ? /* @__PURE__ */
|
|
5457
|
+
fallback: Component ? /* @__PURE__ */ jsx94(Component, {}) : ""
|
|
5413
5458
|
});
|
|
5414
5459
|
};
|
|
5415
5460
|
// src/components/avatars/Avatar.tsx
|
|
5416
|
-
import { jsx as
|
|
5461
|
+
import { jsx as jsx95 } from "react/jsx-runtime";
|
|
5417
5462
|
var Avatar6 = function(param) {
|
|
5418
5463
|
var avatar = param.avatar, _param_size = param.size, size = _param_size === void 0 ? "1" : _param_size;
|
|
5419
5464
|
if (avatar) {
|
|
5420
5465
|
if (avatar.type === "IMAGE" /* IMAGE */ && avatar.imageAvatar) {
|
|
5421
|
-
return /* @__PURE__ */
|
|
5466
|
+
return /* @__PURE__ */ jsx95(ImageAvatar, {
|
|
5422
5467
|
imageAvatar: avatar.imageAvatar,
|
|
5423
5468
|
size: size
|
|
5424
5469
|
});
|
|
5425
5470
|
}
|
|
5426
5471
|
if (avatar.type === "ICON" /* ICON */ && avatar.iconAvatar) {
|
|
5427
|
-
return /* @__PURE__ */
|
|
5472
|
+
return /* @__PURE__ */ jsx95(IconAvatar, {
|
|
5428
5473
|
iconAvatar: avatar.iconAvatar,
|
|
5429
5474
|
size: size
|
|
5430
5475
|
});
|
|
5431
5476
|
}
|
|
5432
5477
|
}
|
|
5433
|
-
return /* @__PURE__ */
|
|
5478
|
+
return /* @__PURE__ */ jsx95(RadixAvatar, {
|
|
5434
5479
|
fallback: "",
|
|
5435
5480
|
size: size
|
|
5436
5481
|
});
|
|
@@ -5443,7 +5488,7 @@ var useComponents = function() {
|
|
|
5443
5488
|
return useContext16(ComponentsContext);
|
|
5444
5489
|
};
|
|
5445
5490
|
// src/components/components/ComponentsProvider.tsx
|
|
5446
|
-
import { jsx as
|
|
5491
|
+
import { jsx as jsx96 } from "react/jsx-runtime";
|
|
5447
5492
|
var ComponentsProvider = function(_param) {
|
|
5448
5493
|
var children = _param.children, rest = _object_without_properties(_param, [
|
|
5449
5494
|
"children"
|
|
@@ -5455,7 +5500,7 @@ var ComponentsProvider = function(_param) {
|
|
|
5455
5500
|
rest,
|
|
5456
5501
|
prevComponents
|
|
5457
5502
|
]);
|
|
5458
|
-
return /* @__PURE__ */
|
|
5503
|
+
return /* @__PURE__ */ jsx96(ComponentsContext.Provider, {
|
|
5459
5504
|
value: value,
|
|
5460
5505
|
children: children
|
|
5461
5506
|
});
|
|
@@ -5465,7 +5510,7 @@ import { useMemo as useMemo21 } from "react";
|
|
|
5465
5510
|
import { Theme } from "@radix-ui/themes";
|
|
5466
5511
|
// src/components/assistants/AssistantProvider/Code.tsx
|
|
5467
5512
|
import { useMemo as useMemo20 } from "react";
|
|
5468
|
-
import { jsx as
|
|
5513
|
+
import { jsx as jsx97 } from "react/jsx-runtime";
|
|
5469
5514
|
var Code4 = function(param) {
|
|
5470
5515
|
var children = param.children, className = param.className, markdownContext = param.markdownContext;
|
|
5471
5516
|
var messageContext = useMessageContext();
|
|
@@ -5481,12 +5526,12 @@ var Code4 = function(param) {
|
|
|
5481
5526
|
className: className
|
|
5482
5527
|
});
|
|
5483
5528
|
}
|
|
5484
|
-
return /* @__PURE__ */
|
|
5529
|
+
return /* @__PURE__ */ jsx97(Suggestions, {
|
|
5485
5530
|
children: children
|
|
5486
5531
|
});
|
|
5487
5532
|
};
|
|
5488
5533
|
// src/components/assistants/AssistantProvider/index.tsx
|
|
5489
|
-
import { jsx as
|
|
5534
|
+
import { jsx as jsx98 } from "react/jsx-runtime";
|
|
5490
5535
|
var AssistantProvider = function(param) {
|
|
5491
5536
|
var children = param.children;
|
|
5492
5537
|
var superinterfaceContext = useSuperinterfaceContext();
|
|
@@ -5498,7 +5543,7 @@ var AssistantProvider = function(param) {
|
|
|
5498
5543
|
return {
|
|
5499
5544
|
code: function(props) {
|
|
5500
5545
|
return(// @ts-ignore-next-line
|
|
5501
|
-
/* @__PURE__ */
|
|
5546
|
+
/* @__PURE__ */ jsx98(Code4, _object_spread_props(_object_spread({}, props), {
|
|
5502
5547
|
markdownContext: markdownContext
|
|
5503
5548
|
})));
|
|
5504
5549
|
}
|
|
@@ -5509,7 +5554,7 @@ var AssistantProvider = function(param) {
|
|
|
5509
5554
|
if (!assistant) {
|
|
5510
5555
|
return null;
|
|
5511
5556
|
}
|
|
5512
|
-
return /* @__PURE__ */
|
|
5557
|
+
return /* @__PURE__ */ jsx98(Theme, {
|
|
5513
5558
|
accentColor: assistant.theme.accentColor,
|
|
5514
5559
|
grayColor: assistant.theme.grayColor,
|
|
5515
5560
|
radius: assistant.theme.radius,
|
|
@@ -5517,13 +5562,13 @@ var AssistantProvider = function(param) {
|
|
|
5517
5562
|
scaling: assistant.theme.scaling,
|
|
5518
5563
|
panelBackground: "solid",
|
|
5519
5564
|
hasBackground: false,
|
|
5520
|
-
children: /* @__PURE__ */
|
|
5565
|
+
children: /* @__PURE__ */ jsx98(AssistantNameContext.Provider, {
|
|
5521
5566
|
value: assistant.name,
|
|
5522
|
-
children: /* @__PURE__ */
|
|
5523
|
-
value: /* @__PURE__ */
|
|
5567
|
+
children: /* @__PURE__ */ jsx98(AssistantAvatarContext.Provider, {
|
|
5568
|
+
value: /* @__PURE__ */ jsx98(Avatar6, {
|
|
5524
5569
|
avatar: assistant.avatar
|
|
5525
5570
|
}),
|
|
5526
|
-
children: /* @__PURE__ */
|
|
5571
|
+
children: /* @__PURE__ */ jsx98(MarkdownProvider, {
|
|
5527
5572
|
components: components2,
|
|
5528
5573
|
children: children
|
|
5529
5574
|
})
|