@superinterface/react 2.13.4 → 2.15.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -672,7 +672,7 @@ var useToasts = function() {
672
672
  return useContext2(ToastsContext);
673
673
  };
674
674
  // src/components/threads/Thread/Messages/Content/MessageGroup/index.tsx
675
- import { useContext as useContext6 } from "react";
675
+ import { useContext as useContext7 } from "react";
676
676
  import { Box as Box10, Avatar as Avatar3 } from "@radix-ui/themes";
677
677
  import { PersonIcon } from "@radix-ui/react-icons";
678
678
  // src/components/messageGroups/MessageGroupBase/AssistantAvatar.tsx
@@ -727,6 +727,9 @@ var StartingContentSkeleton = function() {
727
727
  };
728
728
  // src/components/runSteps/RunSteps/index.tsx
729
729
  import { Flex as Flex9 } from "@radix-ui/themes";
730
+ import { useContext as useContext5 } from "react";
731
+ // src/contexts/components/ComponentsContext/index.tsx
732
+ import { createContext as createContext6 } from "react";
730
733
  // src/components/runSteps/RunStep/ToolCalls/index.tsx
731
734
  import { Flex as Flex8 } from "@radix-ui/themes";
732
735
  // src/components/runSteps/RunStep/ToolCalls/ToolCall/index.tsx
@@ -953,10 +956,16 @@ var Starting = function() {
953
956
  };
954
957
  // src/components/runSteps/RunStep/ToolCalls/index.tsx
955
958
  import { jsx as jsx18, jsxs as jsxs5 } from "react/jsx-runtime";
959
+ var Root = function(param) {
960
+ var children = param.children;
961
+ return /* @__PURE__ */ jsx18(Flex8, {
962
+ direction: "column",
963
+ children: children
964
+ });
965
+ };
956
966
  var ToolCalls = function(param) {
957
967
  var stepDetails = param.stepDetails, runStep = param.runStep;
958
- return /* @__PURE__ */ jsxs5(Flex8, {
959
- direction: "column",
968
+ return /* @__PURE__ */ jsxs5(Root, {
960
969
  children: [
961
970
  !stepDetails.tool_calls.length && /* @__PURE__ */ jsx18(Starting, {}),
962
971
  stepDetails.tool_calls.map(function(toolCall) {
@@ -968,6 +977,9 @@ var ToolCalls = function(param) {
968
977
  ]
969
978
  });
970
979
  };
980
+ ToolCalls.Root = Root;
981
+ ToolCalls.Starting = Starting;
982
+ ToolCalls.ToolCall = ToolCall;
971
983
  // src/components/runSteps/RunStep/index.tsx
972
984
  import { jsx as jsx19 } from "react/jsx-runtime";
973
985
  var RunStep = function(param) {
@@ -980,14 +992,23 @@ var RunStep = function(param) {
980
992
  }
981
993
  return null;
982
994
  };
995
+ RunStep.ToolCalls = ToolCalls;
996
+ // src/contexts/components/ComponentsContext/index.tsx
997
+ var ComponentsContext = createContext6({
998
+ components: {
999
+ RunStep: RunStep
1000
+ }
1001
+ });
983
1002
  // src/components/runSteps/RunSteps/index.tsx
984
1003
  import { jsx as jsx20 } from "react/jsx-runtime";
985
1004
  var RunSteps = function(param) {
986
1005
  var runSteps = param.runSteps;
1006
+ var componentsContext = useContext5(ComponentsContext);
1007
+ var Component = componentsContext.components.RunStep;
987
1008
  return /* @__PURE__ */ jsx20(Flex9, {
988
1009
  direction: "column-reverse",
989
1010
  children: runSteps.map(function(runStep) {
990
- return /* @__PURE__ */ jsx20(RunStep, {
1011
+ return /* @__PURE__ */ jsx20(Component, {
991
1012
  runStep: runStep
992
1013
  }, runStep.id);
993
1014
  })
@@ -1012,18 +1033,18 @@ var useIsMutatingMessage = function() {
1012
1033
  return isMutatingMessage;
1013
1034
  };
1014
1035
  // src/contexts/messages/MessageContext/index.ts
1015
- import { createContext as createContext6 } from "react";
1016
- var MessageContext = createContext6({
1036
+ import { createContext as createContext7 } from "react";
1037
+ var MessageContext = createContext7({
1017
1038
  message: null
1018
1039
  });
1019
1040
  // src/components/threads/Thread/Message/Provider.tsx
1020
1041
  var Provider = MessageContext.Provider;
1021
1042
  // src/components/threads/Thread/Message/TextContent.tsx
1022
- import { useRemarkSync } from "react-remark";
1043
+ import Markdown from "react-markdown";
1023
1044
  // src/hooks/markdown/useMarkdownContext/index.ts
1024
- import { useContext as useContext5 } from "react";
1045
+ import { useContext as useContext6 } from "react";
1025
1046
  // src/contexts/markdown/MarkdownContext/index.ts
1026
- import { createContext as createContext7 } from "react";
1047
+ import { createContext as createContext8 } from "react";
1027
1048
  // src/contexts/markdown/MarkdownContext/lib/components/Paragraph.tsx
1028
1049
  import { Box as Box3, Text as Text4 } from "@radix-ui/themes";
1029
1050
  import { jsx as jsx21 } from "react/jsx-runtime";
@@ -1153,7 +1174,7 @@ var components = {
1153
1174
  img: Img
1154
1175
  };
1155
1176
  // src/contexts/markdown/MarkdownContext/index.ts
1156
- var MarkdownContext = createContext7({
1177
+ var MarkdownContext = createContext8({
1157
1178
  remarkPlugins: [],
1158
1179
  rehypeReactOptions: {
1159
1180
  components: components
@@ -1161,16 +1182,19 @@ var MarkdownContext = createContext7({
1161
1182
  });
1162
1183
  // src/hooks/markdown/useMarkdownContext/index.ts
1163
1184
  var useMarkdownContext = function() {
1164
- return useContext5(MarkdownContext);
1185
+ return useContext6(MarkdownContext);
1165
1186
  };
1166
1187
  // src/components/threads/Thread/Message/TextContent.tsx
1188
+ import { jsx as jsx30 } from "react/jsx-runtime";
1167
1189
  var TextContent = function(param) {
1168
1190
  var content = param.content;
1169
1191
  var markdownContext = useMarkdownContext();
1170
- return useRemarkSync(content.text.value, markdownContext);
1192
+ return /* @__PURE__ */ jsx30(Markdown, _object_spread_props(_object_spread({}, markdownContext), {
1193
+ children: content.text.value
1194
+ }));
1171
1195
  };
1172
1196
  // src/components/threads/Thread/Message/index.tsx
1173
- import { jsx as jsx30, jsxs as jsxs6 } from "react/jsx-runtime";
1197
+ import { jsx as jsx31, jsxs as jsxs6 } from "react/jsx-runtime";
1174
1198
  var Message = function(param) {
1175
1199
  var message = param.message;
1176
1200
  var _useMemo5 = _sliced_to_array(useMemo5(function() {
@@ -1215,28 +1239,28 @@ var Message = function(param) {
1215
1239
  }, [
1216
1240
  message
1217
1241
  ]);
1218
- return /* @__PURE__ */ jsx30(Provider, {
1242
+ return /* @__PURE__ */ jsx31(Provider, {
1219
1243
  value: {
1220
1244
  message: message
1221
1245
  },
1222
1246
  children: /* @__PURE__ */ jsxs6(Box9, {
1223
1247
  children: [
1224
- /* @__PURE__ */ jsx30(RunSteps, {
1248
+ /* @__PURE__ */ jsx31(RunSteps, {
1225
1249
  runSteps: olderRunSteps
1226
1250
  }),
1227
1251
  /* @__PURE__ */ jsxs6(Box9, {
1228
1252
  children: [
1229
1253
  message.content.map(function(content, index) {
1230
- return /* @__PURE__ */ jsx30(Fragment, {
1231
- children: content.type === "text" && /* @__PURE__ */ jsx30(TextContent, {
1254
+ return /* @__PURE__ */ jsx31(Fragment, {
1255
+ children: content.type === "text" && /* @__PURE__ */ jsx31(TextContent, {
1232
1256
  content: content
1233
1257
  })
1234
1258
  }, index);
1235
1259
  }),
1236
- isInProgress && /* @__PURE__ */ jsx30(StartingContentSkeleton, {})
1260
+ isInProgress && /* @__PURE__ */ jsx31(StartingContentSkeleton, {})
1237
1261
  ]
1238
1262
  }),
1239
- /* @__PURE__ */ jsx30(RunSteps, {
1263
+ /* @__PURE__ */ jsx31(RunSteps, {
1240
1264
  runSteps: laterRunSteps
1241
1265
  })
1242
1266
  ]
@@ -1244,36 +1268,36 @@ var Message = function(param) {
1244
1268
  });
1245
1269
  };
1246
1270
  // src/components/threads/Thread/Messages/Content/MessageGroup/Content/index.tsx
1247
- import { jsx as jsx31 } from "react/jsx-runtime";
1271
+ import { jsx as jsx32 } from "react/jsx-runtime";
1248
1272
  var Content2 = function(param) {
1249
1273
  var messageGroup = param.messageGroup;
1250
- return /* @__PURE__ */ jsx31(Flex10, {
1274
+ return /* @__PURE__ */ jsx32(Flex10, {
1251
1275
  direction: "column-reverse",
1252
1276
  children: messageGroup.messages.map(function(message) {
1253
- return /* @__PURE__ */ jsx31(Message, {
1277
+ return /* @__PURE__ */ jsx32(Message, {
1254
1278
  message: message
1255
1279
  }, message.id);
1256
1280
  })
1257
1281
  });
1258
1282
  };
1259
1283
  // src/components/threads/Thread/Messages/Content/MessageGroup/index.tsx
1260
- import { jsx as jsx32, jsxs as jsxs7 } from "react/jsx-runtime";
1284
+ import { jsx as jsx33, jsxs as jsxs7 } from "react/jsx-runtime";
1261
1285
  var MessageGroup = function(param) {
1262
1286
  var messageGroup = param.messageGroup;
1263
- var assistantNameContext = useContext6(AssistantNameContext);
1287
+ var assistantNameContext = useContext7(AssistantNameContext);
1264
1288
  return /* @__PURE__ */ jsxs7(MessageGroupBase, {
1265
1289
  children: [
1266
- messageGroup.role === "user" ? /* @__PURE__ */ jsx32(Avatar3, {
1267
- fallback: /* @__PURE__ */ jsx32(PersonIcon, {}),
1290
+ messageGroup.role === "user" ? /* @__PURE__ */ jsx33(Avatar3, {
1291
+ fallback: /* @__PURE__ */ jsx33(PersonIcon, {}),
1268
1292
  size: "1"
1269
- }) : /* @__PURE__ */ jsx32(AssistantAvatar, {}),
1293
+ }) : /* @__PURE__ */ jsx33(AssistantAvatar, {}),
1270
1294
  /* @__PURE__ */ jsxs7(Box10, {
1271
1295
  flexGrow: "1",
1272
1296
  children: [
1273
- /* @__PURE__ */ jsx32(Name, {
1297
+ /* @__PURE__ */ jsx33(Name, {
1274
1298
  children: messageGroup.role === "user" ? "You" : assistantNameContext
1275
1299
  }),
1276
- /* @__PURE__ */ jsx32(Content2, {
1300
+ /* @__PURE__ */ jsx33(Content2, {
1277
1301
  messageGroup: messageGroup
1278
1302
  })
1279
1303
  ]
@@ -1282,7 +1306,7 @@ var MessageGroup = function(param) {
1282
1306
  });
1283
1307
  };
1284
1308
  // src/components/threads/Thread/Messages/Content/index.tsx
1285
- import { Fragment as Fragment2, jsx as jsx33 } from "react/jsx-runtime";
1309
+ import { Fragment as Fragment2, jsx as jsx34 } from "react/jsx-runtime";
1286
1310
  var Content3 = function() {
1287
1311
  var _useMessages = useMessages(), messages2 = _useMessages.messages, isLoading = _useMessages.isLoading, isLoadingError = _useMessages.isLoadingError;
1288
1312
  var addToast = useToasts().addToast;
@@ -1301,11 +1325,11 @@ var Content3 = function() {
1301
1325
  addToast
1302
1326
  ]);
1303
1327
  if (isLoading || isLoadingError) {
1304
- return /* @__PURE__ */ jsx33(MessagesSkeleton, {});
1328
+ return /* @__PURE__ */ jsx34(MessagesSkeleton, {});
1305
1329
  }
1306
- return /* @__PURE__ */ jsx33(Fragment2, {
1330
+ return /* @__PURE__ */ jsx34(Fragment2, {
1307
1331
  children: messageGroups2.map(function(messageGroup) {
1308
- return /* @__PURE__ */ jsx33(MessageGroup, {
1332
+ return /* @__PURE__ */ jsx34(MessageGroup, {
1309
1333
  messageGroup: messageGroup
1310
1334
  }, messageGroup.id);
1311
1335
  })
@@ -1314,22 +1338,22 @@ var Content3 = function() {
1314
1338
  // src/components/threads/Thread/Messages/Progress/index.tsx
1315
1339
  import { useMemo as useMemo7 } from "react";
1316
1340
  // src/components/skeletons/StartingSkeleton/index.tsx
1317
- import { useContext as useContext7 } from "react";
1341
+ import { useContext as useContext8 } from "react";
1318
1342
  import { Box as Box11 } from "@radix-ui/themes";
1319
- import { jsx as jsx34, jsxs as jsxs8 } from "react/jsx-runtime";
1343
+ import { jsx as jsx35, jsxs as jsxs8 } from "react/jsx-runtime";
1320
1344
  var StartingSkeleton = function(param) {
1321
1345
  var children = param.children;
1322
- var assistantNameContext = useContext7(AssistantNameContext);
1346
+ var assistantNameContext = useContext8(AssistantNameContext);
1323
1347
  return /* @__PURE__ */ jsxs8(MessageGroupBase, {
1324
1348
  children: [
1325
- /* @__PURE__ */ jsx34(AssistantAvatar, {}),
1349
+ /* @__PURE__ */ jsx35(AssistantAvatar, {}),
1326
1350
  /* @__PURE__ */ jsxs8(Box11, {
1327
1351
  children: [
1328
- /* @__PURE__ */ jsx34(Name, {
1352
+ /* @__PURE__ */ jsx35(Name, {
1329
1353
  children: assistantNameContext
1330
1354
  }),
1331
1355
  children,
1332
- /* @__PURE__ */ jsx34(StartingContentSkeleton, {})
1356
+ /* @__PURE__ */ jsx35(StartingContentSkeleton, {})
1333
1357
  ]
1334
1358
  })
1335
1359
  ]
@@ -1354,7 +1378,7 @@ var isOptimistic = function(param) {
1354
1378
  return _4.startsWith(id, "-");
1355
1379
  };
1356
1380
  // src/components/threads/Thread/Messages/Progress/index.tsx
1357
- import { jsx as jsx35 } from "react/jsx-runtime";
1381
+ import { jsx as jsx36 } from "react/jsx-runtime";
1358
1382
  var Progress = function() {
1359
1383
  var latestMessage = useLatestMessage().latestMessage;
1360
1384
  var isMutatingMessage = useIsMutatingMessage();
@@ -1372,7 +1396,7 @@ var Progress = function() {
1372
1396
  isMutatingMessage
1373
1397
  ]);
1374
1398
  if (!isVisible) return null;
1375
- return /* @__PURE__ */ jsx35(StartingSkeleton, {});
1399
+ return /* @__PURE__ */ jsx36(StartingSkeleton, {});
1376
1400
  };
1377
1401
  // src/components/threads/Thread/Messages/Root/index.tsx
1378
1402
  import { Flex as Flex11 } from "@radix-ui/themes";
@@ -1431,8 +1455,8 @@ var useInfiniteScroll = function(param) {
1431
1455
  };
1432
1456
  };
1433
1457
  // src/components/threads/Thread/Messages/Root/index.tsx
1434
- import { jsx as jsx36, jsxs as jsxs9 } from "react/jsx-runtime";
1435
- var Root = function(param) {
1458
+ import { jsx as jsx37, jsxs as jsxs9 } from "react/jsx-runtime";
1459
+ var Root2 = function(param) {
1436
1460
  var children = param.children, _param_style = param.style, style = _param_style === void 0 ? {} : _param_style;
1437
1461
  var _useMessages = useMessages(), isFetchingNextPage = _useMessages.isFetchingNextPage, hasNextPage = _useMessages.hasNextPage, fetchNextPage = _useMessages.fetchNextPage;
1438
1462
  var _useInfiniteScroll = useInfiniteScroll({
@@ -1449,10 +1473,10 @@ var Root = function(param) {
1449
1473
  }),
1450
1474
  children: [
1451
1475
  children,
1452
- hasNextPage && /* @__PURE__ */ jsx36(Flex11, {
1476
+ hasNextPage && /* @__PURE__ */ jsx37(Flex11, {
1453
1477
  ref: loaderRef
1454
1478
  }),
1455
- /* @__PURE__ */ jsx36(Flex11, {
1479
+ /* @__PURE__ */ jsx37(Flex11, {
1456
1480
  flexShrink: "0",
1457
1481
  flexGrow: "1"
1458
1482
  })
@@ -1460,37 +1484,37 @@ var Root = function(param) {
1460
1484
  });
1461
1485
  };
1462
1486
  // src/components/threads/Thread/Messages/NextPageSkeleton.tsx
1463
- import { jsx as jsx37 } from "react/jsx-runtime";
1487
+ import { jsx as jsx38 } from "react/jsx-runtime";
1464
1488
  var NextPageSkeleton = function() {
1465
1489
  var hasNextPage = useMessages().hasNextPage;
1466
1490
  if (!hasNextPage) {
1467
1491
  return null;
1468
1492
  }
1469
- return /* @__PURE__ */ jsx37(MessagesSkeleton, {});
1493
+ return /* @__PURE__ */ jsx38(MessagesSkeleton, {});
1470
1494
  };
1471
1495
  // src/components/threads/Thread/Messages/index.tsx
1472
- import { jsx as jsx38, jsxs as jsxs10 } from "react/jsx-runtime";
1496
+ import { jsx as jsx39, jsxs as jsxs10 } from "react/jsx-runtime";
1473
1497
  var Messages = function(param) {
1474
1498
  var children = param.children, _param_style = param.style, style = _param_style === void 0 ? {} : _param_style;
1475
- return /* @__PURE__ */ jsxs10(Root, {
1499
+ return /* @__PURE__ */ jsxs10(Root2, {
1476
1500
  style: style,
1477
1501
  children: [
1478
- /* @__PURE__ */ jsx38(Flex12, {
1502
+ /* @__PURE__ */ jsx39(Flex12, {
1479
1503
  flexShrink: "0",
1480
1504
  height: "var(--space-3)"
1481
1505
  }),
1482
- /* @__PURE__ */ jsx38(Progress, {}),
1506
+ /* @__PURE__ */ jsx39(Progress, {}),
1483
1507
  children,
1484
- /* @__PURE__ */ jsx38(Content3, {}),
1485
- /* @__PURE__ */ jsx38(NextPageSkeleton, {}),
1486
- /* @__PURE__ */ jsx38(Flex12, {
1508
+ /* @__PURE__ */ jsx39(Content3, {}),
1509
+ /* @__PURE__ */ jsx39(NextPageSkeleton, {}),
1510
+ /* @__PURE__ */ jsx39(Flex12, {
1487
1511
  flexShrink: "0",
1488
1512
  flexGrow: "1"
1489
1513
  })
1490
1514
  ]
1491
1515
  });
1492
1516
  };
1493
- Messages.Root = Root;
1517
+ Messages.Root = Root2;
1494
1518
  Messages.Message = Message;
1495
1519
  Messages.NextPageSkeleton = NextPageSkeleton;
1496
1520
  // src/components/threads/Thread/MessageForm/index.tsx
@@ -1499,36 +1523,36 @@ import { Flex as Flex14, Text as Text5 } from "@radix-ui/themes";
1499
1523
  import { ArrowUpIcon, StopIcon } from "@radix-ui/react-icons";
1500
1524
  import { IconButton } from "@radix-ui/themes";
1501
1525
  // src/hooks/messages/useMessageFormContext/index.ts
1502
- import { useContext as useContext8 } from "react";
1526
+ import { useContext as useContext9 } from "react";
1503
1527
  // src/contexts/messages/MessageFormContext/index.ts
1504
- import { createContext as createContext8 } from "react";
1505
- var MessageFormContext = createContext8({
1528
+ import { createContext as createContext9 } from "react";
1529
+ var MessageFormContext = createContext9({
1506
1530
  isDisabled: false,
1507
1531
  isLoading: false
1508
1532
  });
1509
1533
  // src/hooks/messages/useMessageFormContext/index.ts
1510
1534
  var useMessageFormContext = function() {
1511
- return useContext8(MessageFormContext);
1535
+ return useContext9(MessageFormContext);
1512
1536
  };
1513
1537
  // src/components/threads/Thread/MessageForm/Submit/index.tsx
1514
- import { jsx as jsx39 } from "react/jsx-runtime";
1538
+ import { jsx as jsx40 } from "react/jsx-runtime";
1515
1539
  var Submit = function() {
1516
1540
  var superinterfaceContext = useSuperinterfaceContext();
1517
1541
  var _useMessageFormContext = useMessageFormContext(), isDisabled = _useMessageFormContext.isDisabled, isLoading = _useMessageFormContext.isLoading;
1518
1542
  if (isLoading) {
1519
- return /* @__PURE__ */ jsx39(IconButton, {
1543
+ return /* @__PURE__ */ jsx40(IconButton, {
1520
1544
  type: "button",
1521
1545
  onClick: function() {
1522
1546
  var _superinterfaceContext_createMessageAbortControllerRef_current;
1523
1547
  return (_superinterfaceContext_createMessageAbortControllerRef_current = superinterfaceContext.createMessageAbortControllerRef.current) === null || _superinterfaceContext_createMessageAbortControllerRef_current === void 0 ? void 0 : _superinterfaceContext_createMessageAbortControllerRef_current.abort();
1524
1548
  },
1525
- children: /* @__PURE__ */ jsx39(StopIcon, {})
1549
+ children: /* @__PURE__ */ jsx40(StopIcon, {})
1526
1550
  });
1527
1551
  }
1528
- return /* @__PURE__ */ jsx39(IconButton, {
1552
+ return /* @__PURE__ */ jsx40(IconButton, {
1529
1553
  type: "submit",
1530
1554
  disabled: isDisabled,
1531
- children: /* @__PURE__ */ jsx39(ArrowUpIcon, {})
1555
+ children: /* @__PURE__ */ jsx40(ArrowUpIcon, {})
1532
1556
  });
1533
1557
  };
1534
1558
  // src/components/threads/Thread/MessageForm/Root/index.tsx
@@ -2155,8 +2179,8 @@ var formOptions = {
2155
2179
  resolver: zodResolver(schema)
2156
2180
  };
2157
2181
  // src/components/threads/Thread/MessageForm/Root/index.tsx
2158
- import { jsx as jsx40 } from "react/jsx-runtime";
2159
- var Root2 = function(param) {
2182
+ import { jsx as jsx41 } from "react/jsx-runtime";
2183
+ var Root3 = function(param) {
2160
2184
  var children = param.children;
2161
2185
  var formProps = useForm(formOptions);
2162
2186
  var handleSubmit = formProps.handleSubmit, isSubmitting = formProps.formState.isSubmitting, reset = formProps.reset;
@@ -2227,16 +2251,16 @@ var Root2 = function(param) {
2227
2251
  latestMessage,
2228
2252
  isLoading
2229
2253
  ]);
2230
- return /* @__PURE__ */ jsx40(MessageFormContext.Provider, {
2254
+ return /* @__PURE__ */ jsx41(MessageFormContext.Provider, {
2231
2255
  value: {
2232
2256
  isDisabled: isDisabled,
2233
2257
  isLoading: isLoading
2234
2258
  },
2235
- children: /* @__PURE__ */ jsx40(FormProvider, _object_spread_props(_object_spread({}, formProps), {
2236
- children: /* @__PURE__ */ jsx40(Box12, {
2259
+ children: /* @__PURE__ */ jsx41(FormProvider, _object_spread_props(_object_spread({}, formProps), {
2260
+ children: /* @__PURE__ */ jsx41(Box12, {
2237
2261
  asChild: true,
2238
2262
  flexShrink: "0",
2239
- children: /* @__PURE__ */ jsx40("form", {
2263
+ children: /* @__PURE__ */ jsx41("form", {
2240
2264
  onSubmit: handleSubmit(onSubmit),
2241
2265
  children: children
2242
2266
  })
@@ -2246,19 +2270,19 @@ var Root2 = function(param) {
2246
2270
  };
2247
2271
  // src/components/threads/Thread/MessageForm/Field/index.tsx
2248
2272
  import { usePrevious } from "react-use";
2249
- import { useContext as useContext9, useMemo as useMemo9, useRef as useRef4, useEffect as useEffect3 } from "react";
2273
+ import { useContext as useContext10, useMemo as useMemo9, useRef as useRef4, useEffect as useEffect3 } from "react";
2250
2274
  // src/components/textareas/TextareaBase/index.tsx
2251
2275
  import { forwardRef as forwardRef3 } from "react";
2252
2276
  import TextareaAutosize from "react-textarea-autosize";
2253
- import { Fragment as Fragment3, jsx as jsx41, jsxs as jsxs11 } from "react/jsx-runtime";
2277
+ import { Fragment as Fragment3, jsx as jsx42, jsxs as jsxs11 } from "react/jsx-runtime";
2254
2278
  var UPSCALE_RATIO = 16 / 14;
2255
2279
  var TextareaBase = forwardRef3(function TextareaBase2(props, ref) {
2256
2280
  return /* @__PURE__ */ jsxs11(Fragment3, {
2257
2281
  children: [
2258
- /* @__PURE__ */ jsx41("style", {
2282
+ /* @__PURE__ */ jsx42("style", {
2259
2283
  children: ".superinterface-textarea { min-height: inherit; height: 30px; }\n.superinterface-textarea::placeholder { color: var(--gray-a10); }"
2260
2284
  }),
2261
- /* @__PURE__ */ jsx41(TextareaAutosize, _object_spread({
2285
+ /* @__PURE__ */ jsx42(TextareaAutosize, _object_spread({
2262
2286
  ref: ref,
2263
2287
  className: "rt-reset superinterface-textarea",
2264
2288
  style: {
@@ -2283,20 +2307,20 @@ var TextareaBase = forwardRef3(function TextareaBase2(props, ref) {
2283
2307
  // src/components/threads/Thread/MessageForm/Field/index.tsx
2284
2308
  import { useFormContext } from "react-hook-form";
2285
2309
  import { Container as Container2, Flex as Flex13 } from "@radix-ui/themes";
2286
- import { jsx as jsx42 } from "react/jsx-runtime";
2287
- var Root3 = function(param) {
2310
+ import { jsx as jsx43 } from "react/jsx-runtime";
2311
+ var Root4 = function(param) {
2288
2312
  var children = param.children;
2289
2313
  var _useFormContext = useFormContext(), errors = _useFormContext.formState.errors;
2290
- return /* @__PURE__ */ jsx42(Container2, {
2314
+ return /* @__PURE__ */ jsx43(Container2, {
2291
2315
  size: "2",
2292
2316
  flexGrow: "0",
2293
- children: /* @__PURE__ */ jsx42(Flex13, {
2317
+ children: /* @__PURE__ */ jsx43(Flex13, {
2294
2318
  direction: "column",
2295
2319
  flexShrink: "0",
2296
- children: /* @__PURE__ */ jsx42(Flex13, {
2320
+ children: /* @__PURE__ */ jsx43(Flex13, {
2297
2321
  direction: "column",
2298
2322
  flexShrink: "0",
2299
- children: /* @__PURE__ */ jsx42(Flex13, {
2323
+ children: /* @__PURE__ */ jsx43(Flex13, {
2300
2324
  style: _object_spread({
2301
2325
  borderRadius: "var(--radius-2)",
2302
2326
  borderWidth: "1px",
@@ -2314,7 +2338,7 @@ var Root3 = function(param) {
2314
2338
  });
2315
2339
  };
2316
2340
  var Control = function() {
2317
- var assistantNameContext = useContext9(AssistantNameContext);
2341
+ var assistantNameContext = useContext10(AssistantNameContext);
2318
2342
  var register = useFormContext().register;
2319
2343
  var _useMessageFormContext = useMessageFormContext(), isDisabled = _useMessageFormContext.isDisabled, isLoading = _useMessageFormContext.isLoading;
2320
2344
  var isSubmitDisabled = useMemo9(function() {
@@ -2336,7 +2360,7 @@ var Control = function() {
2336
2360
  isDisabledPrevious,
2337
2361
  textareaProps
2338
2362
  ]);
2339
- return /* @__PURE__ */ jsx42(TextareaBase, _object_spread_props(_object_spread({
2363
+ return /* @__PURE__ */ jsx43(TextareaBase, _object_spread_props(_object_spread({
2340
2364
  minRows: 1,
2341
2365
  placeholder: "Message ".concat(assistantNameContext, "..."),
2342
2366
  disabled: isDisabled,
@@ -2356,36 +2380,36 @@ var Control = function() {
2356
2380
  }));
2357
2381
  };
2358
2382
  var Field = {
2359
- Root: Root3,
2383
+ Root: Root4,
2360
2384
  Control: Control
2361
2385
  };
2362
2386
  // src/components/threads/Thread/MessageForm/index.tsx
2363
- import { jsx as jsx43, jsxs as jsxs12 } from "react/jsx-runtime";
2387
+ import { jsx as jsx44, jsxs as jsxs12 } from "react/jsx-runtime";
2364
2388
  var MessageForm = function() {
2365
- return /* @__PURE__ */ jsx43(Root2, {
2389
+ return /* @__PURE__ */ jsx44(Root3, {
2366
2390
  children: /* @__PURE__ */ jsxs12(Field.Root, {
2367
2391
  children: [
2368
- /* @__PURE__ */ jsx43(Text5, {
2392
+ /* @__PURE__ */ jsx44(Text5, {
2369
2393
  size: "2",
2370
2394
  style: {
2371
2395
  flexGrow: 1
2372
2396
  },
2373
- children: /* @__PURE__ */ jsx43(Flex14, {
2397
+ children: /* @__PURE__ */ jsx44(Flex14, {
2374
2398
  flexGrow: "1",
2375
2399
  direction: "column",
2376
- children: /* @__PURE__ */ jsx43(Field.Control, {})
2400
+ children: /* @__PURE__ */ jsx44(Field.Control, {})
2377
2401
  })
2378
2402
  }),
2379
- /* @__PURE__ */ jsx43(Flex14, {
2403
+ /* @__PURE__ */ jsx44(Flex14, {
2380
2404
  flexShrink: "0",
2381
2405
  align: "end",
2382
- children: /* @__PURE__ */ jsx43(Submit, {})
2406
+ children: /* @__PURE__ */ jsx44(Submit, {})
2383
2407
  })
2384
2408
  ]
2385
2409
  })
2386
2410
  });
2387
2411
  };
2388
- MessageForm.Root = Root2;
2412
+ MessageForm.Root = Root3;
2389
2413
  MessageForm.Field = Field;
2390
2414
  MessageForm.Submit = Submit;
2391
2415
  // src/components/threads/Thread/Root/index.tsx
@@ -2393,13 +2417,13 @@ import { Flex as Flex15 } from "@radix-ui/themes";
2393
2417
  // src/components/threads/Thread/Provider/index.tsx
2394
2418
  var Provider2 = SuperinterfaceProvider;
2395
2419
  // src/components/threads/Thread/Root/index.tsx
2396
- import { jsx as jsx44 } from "react/jsx-runtime";
2397
- var Root4 = function(_param) {
2420
+ import { jsx as jsx45 } from "react/jsx-runtime";
2421
+ var Root5 = function(_param) {
2398
2422
  var children = _param.children, rest = _object_without_properties(_param, [
2399
2423
  "children"
2400
2424
  ]);
2401
- return /* @__PURE__ */ jsx44(Provider2, _object_spread_props(_object_spread({}, rest), {
2402
- children: /* @__PURE__ */ jsx44(Flex15, {
2425
+ return /* @__PURE__ */ jsx45(Provider2, _object_spread_props(_object_spread({}, rest), {
2426
+ children: /* @__PURE__ */ jsx45(Flex15, {
2403
2427
  direction: "column",
2404
2428
  flexGrow: "1",
2405
2429
  children: children
@@ -2407,43 +2431,43 @@ var Root4 = function(_param) {
2407
2431
  }));
2408
2432
  };
2409
2433
  // src/components/threads/Thread/index.tsx
2410
- import { jsx as jsx45, jsxs as jsxs13 } from "react/jsx-runtime";
2434
+ import { jsx as jsx46, jsxs as jsxs13 } from "react/jsx-runtime";
2411
2435
  var Thread = function(props) {
2412
- return /* @__PURE__ */ jsxs13(Root4, _object_spread_props(_object_spread({}, props), {
2436
+ return /* @__PURE__ */ jsxs13(Root5, _object_spread_props(_object_spread({}, props), {
2413
2437
  children: [
2414
- /* @__PURE__ */ jsx45(Messages, {}),
2415
- /* @__PURE__ */ jsx45(MessageForm, {})
2438
+ /* @__PURE__ */ jsx46(Messages, {}),
2439
+ /* @__PURE__ */ jsx46(MessageForm, {})
2416
2440
  ]
2417
2441
  }));
2418
2442
  };
2419
- Thread.Root = Root4;
2443
+ Thread.Root = Root5;
2420
2444
  Thread.Messages = Messages;
2421
2445
  Thread.MessageForm = MessageForm;
2422
2446
  // src/hooks/messages/useMessageContext/index.ts
2423
- import { useContext as useContext10 } from "react";
2447
+ import { useContext as useContext11 } from "react";
2424
2448
  var useMessageContext = function() {
2425
- return useContext10(MessageContext);
2449
+ return useContext11(MessageContext);
2426
2450
  };
2427
2451
  // src/components/threads/ThreadDialog/Provider/index.tsx
2428
2452
  import { useState } from "react";
2429
2453
  // src/contexts/threads/ThreadDialogContext/index.ts
2430
- import { createContext as createContext9 } from "react";
2431
- var ThreadDialogContext = createContext9({
2454
+ import { createContext as createContext10 } from "react";
2455
+ var ThreadDialogContext = createContext10({
2432
2456
  isOpen: false,
2433
2457
  setIsOpen: function() {}
2434
2458
  });
2435
2459
  // src/hooks/threads/useThreadDialogContext/index.ts
2436
- import { useContext as useContext11 } from "react";
2460
+ import { useContext as useContext12 } from "react";
2437
2461
  var useThreadDialogContext = function() {
2438
- return useContext11(ThreadDialogContext);
2462
+ return useContext12(ThreadDialogContext);
2439
2463
  };
2440
2464
  // src/components/threads/ThreadDialog/Provider/index.tsx
2441
- import { jsx as jsx46 } from "react/jsx-runtime";
2465
+ import { jsx as jsx47 } from "react/jsx-runtime";
2442
2466
  var Provider3 = function(param) {
2443
2467
  var children = param.children;
2444
2468
  var threadDialogContext = useThreadDialogContext();
2445
2469
  var _useState = _sliced_to_array(useState(threadDialogContext.isOpen), 2), isOpen = _useState[0], setIsOpen = _useState[1];
2446
- return /* @__PURE__ */ jsx46(ThreadDialogContext.Provider, {
2470
+ return /* @__PURE__ */ jsx47(ThreadDialogContext.Provider, {
2447
2471
  value: {
2448
2472
  isOpen: isOpen,
2449
2473
  setIsOpen: setIsOpen
@@ -2458,25 +2482,25 @@ import * as Toast2 from "@radix-ui/react-toast";
2458
2482
  import * as Toast from "@radix-ui/react-toast";
2459
2483
  import { Card, Text as Text6, Flex as Flex16 } from "@radix-ui/themes";
2460
2484
  import { CheckCircledIcon as CheckCircledIcon2, CrossCircledIcon } from "@radix-ui/react-icons";
2461
- import { jsx as jsx47, jsxs as jsxs14 } from "react/jsx-runtime";
2485
+ import { jsx as jsx48, jsxs as jsxs14 } from "react/jsx-runtime";
2462
2486
  var CustomToast = function(param) {
2463
2487
  var toast = param.toast;
2464
- return /* @__PURE__ */ jsx47(Toast.Root, {
2465
- children: /* @__PURE__ */ jsx47(Card, {
2466
- children: /* @__PURE__ */ jsx47(Toast.Title, {
2488
+ return /* @__PURE__ */ jsx48(Toast.Root, {
2489
+ children: /* @__PURE__ */ jsx48(Card, {
2490
+ children: /* @__PURE__ */ jsx48(Toast.Title, {
2467
2491
  children: /* @__PURE__ */ jsxs14(Flex16, {
2468
2492
  children: [
2469
- /* @__PURE__ */ jsx47(Flex16, {
2493
+ /* @__PURE__ */ jsx48(Flex16, {
2470
2494
  pr: "2",
2471
2495
  height: "14px",
2472
2496
  align: "center",
2473
- children: toast.type === "success" ? /* @__PURE__ */ jsx47(CheckCircledIcon2, {
2497
+ children: toast.type === "success" ? /* @__PURE__ */ jsx48(CheckCircledIcon2, {
2474
2498
  color: "var(--accent-9)"
2475
- }) : /* @__PURE__ */ jsx47(CrossCircledIcon, {
2499
+ }) : /* @__PURE__ */ jsx48(CrossCircledIcon, {
2476
2500
  color: "var(--red-9)"
2477
2501
  })
2478
2502
  }),
2479
- /* @__PURE__ */ jsx47(Text6, {
2503
+ /* @__PURE__ */ jsx48(Text6, {
2480
2504
  weight: "medium",
2481
2505
  size: "1",
2482
2506
  children: toast.message
@@ -2488,7 +2512,7 @@ var CustomToast = function(param) {
2488
2512
  });
2489
2513
  };
2490
2514
  // src/components/toasts/ToastsProvider/index.tsx
2491
- import { jsx as jsx48, jsxs as jsxs15 } from "react/jsx-runtime";
2515
+ import { jsx as jsx49, jsxs as jsxs15 } from "react/jsx-runtime";
2492
2516
  var ToastsProvider = function(param) {
2493
2517
  var children = param.children;
2494
2518
  var _useState2 = _sliced_to_array(useState2([]), 2), toasts = _useState2[0], setToasts = _useState2[1];
@@ -2499,7 +2523,7 @@ var ToastsProvider = function(param) {
2499
2523
  ]);
2500
2524
  });
2501
2525
  }, []);
2502
- return /* @__PURE__ */ jsx48(ToastsContext.Provider, {
2526
+ return /* @__PURE__ */ jsx49(ToastsContext.Provider, {
2503
2527
  value: {
2504
2528
  toasts: toasts,
2505
2529
  addToast: addToast
@@ -2508,11 +2532,11 @@ var ToastsProvider = function(param) {
2508
2532
  children: [
2509
2533
  children,
2510
2534
  Array.from(toasts).map(function(toast, index) {
2511
- return /* @__PURE__ */ jsx48(CustomToast, {
2535
+ return /* @__PURE__ */ jsx49(CustomToast, {
2512
2536
  toast: toast
2513
2537
  }, index);
2514
2538
  }),
2515
- /* @__PURE__ */ jsx48(Toast2.Viewport, {
2539
+ /* @__PURE__ */ jsx49(Toast2.Viewport, {
2516
2540
  style: {
2517
2541
  position: "absolute",
2518
2542
  bottom: 0,
@@ -2534,22 +2558,22 @@ var ToastsProvider = function(param) {
2534
2558
  });
2535
2559
  };
2536
2560
  // src/components/threads/ThreadDialog/Root/index.tsx
2537
- import { jsx as jsx49 } from "react/jsx-runtime";
2538
- var Root6 = function(param) {
2561
+ import { jsx as jsx50 } from "react/jsx-runtime";
2562
+ var Root7 = function(param) {
2539
2563
  var children = param.children;
2540
- return /* @__PURE__ */ jsx49(ToastsProvider, {
2541
- children: /* @__PURE__ */ jsx49(Provider3, {
2564
+ return /* @__PURE__ */ jsx50(ToastsProvider, {
2565
+ children: /* @__PURE__ */ jsx50(Provider3, {
2542
2566
  children: children
2543
2567
  })
2544
2568
  });
2545
2569
  };
2546
2570
  // src/components/threads/ThreadDialog/Trigger/index.tsx
2547
2571
  import { Flex as Flex17 } from "@radix-ui/themes";
2548
- import { jsx as jsx50 } from "react/jsx-runtime";
2572
+ import { jsx as jsx51 } from "react/jsx-runtime";
2549
2573
  var Trigger = function(param) {
2550
2574
  var children = param.children, _param_style = param.style, style = _param_style === void 0 ? {} : _param_style;
2551
2575
  var _useThreadDialogContext = useThreadDialogContext(), setIsOpen = _useThreadDialogContext.setIsOpen, isOpen = _useThreadDialogContext.isOpen;
2552
- return /* @__PURE__ */ jsx50(Flex17, {
2576
+ return /* @__PURE__ */ jsx51(Flex17, {
2553
2577
  display: {
2554
2578
  initial: isOpen ? "none" : "flex",
2555
2579
  sm: "flex"
@@ -2575,12 +2599,12 @@ var Trigger = function(param) {
2575
2599
  // src/components/threads/ThreadDialog/Button/index.tsx
2576
2600
  import { IconButton as IconButton2 } from "@radix-ui/themes";
2577
2601
  import { ChatBubbleIcon } from "@radix-ui/react-icons";
2578
- import { jsx as jsx51 } from "react/jsx-runtime";
2602
+ import { jsx as jsx52 } from "react/jsx-runtime";
2579
2603
  var Button2 = function() {
2580
- return /* @__PURE__ */ jsx51(IconButton2, {
2604
+ return /* @__PURE__ */ jsx52(IconButton2, {
2581
2605
  size: "4",
2582
2606
  radius: "full",
2583
- children: /* @__PURE__ */ jsx51(ChatBubbleIcon, {})
2607
+ children: /* @__PURE__ */ jsx52(ChatBubbleIcon, {})
2584
2608
  });
2585
2609
  };
2586
2610
  // src/components/threads/ThreadDialog/Content/index.tsx
@@ -2588,10 +2612,10 @@ import { Card as Card2, Inset, Flex as Flex19 } from "@radix-ui/themes";
2588
2612
  // src/components/threads/ThreadDialog/Close/index.tsx
2589
2613
  import { Cross1Icon } from "@radix-ui/react-icons";
2590
2614
  import { IconButton as IconButton3, Flex as Flex18 } from "@radix-ui/themes";
2591
- import { jsx as jsx52 } from "react/jsx-runtime";
2615
+ import { jsx as jsx53 } from "react/jsx-runtime";
2592
2616
  var Close = function() {
2593
2617
  var _useThreadDialogContext = useThreadDialogContext(), setIsOpen = _useThreadDialogContext.setIsOpen, isOpen = _useThreadDialogContext.isOpen;
2594
- return /* @__PURE__ */ jsx52(Flex18, {
2618
+ return /* @__PURE__ */ jsx53(Flex18, {
2595
2619
  display: {
2596
2620
  initial: isOpen ? "flex" : "none",
2597
2621
  sm: "none"
@@ -2611,20 +2635,20 @@ var Close = function() {
2611
2635
  style: {
2612
2636
  zIndex: 9999999999
2613
2637
  },
2614
- children: /* @__PURE__ */ jsx52(IconButton3, {
2638
+ children: /* @__PURE__ */ jsx53(IconButton3, {
2615
2639
  size: "2",
2616
2640
  variant: "soft",
2617
- children: /* @__PURE__ */ jsx52(Cross1Icon, {})
2641
+ children: /* @__PURE__ */ jsx53(Cross1Icon, {})
2618
2642
  })
2619
2643
  });
2620
2644
  };
2621
2645
  // src/components/threads/ThreadDialog/Content/index.tsx
2622
- import { jsx as jsx53, jsxs as jsxs16 } from "react/jsx-runtime";
2623
- var Root7 = function(param) {
2646
+ import { jsx as jsx54, jsxs as jsxs16 } from "react/jsx-runtime";
2647
+ var Root8 = function(param) {
2624
2648
  var children = param.children, _param_style = param.style, style = _param_style === void 0 ? {} : _param_style;
2625
2649
  var isOpen = useThreadDialogContext().isOpen;
2626
2650
  if (!isOpen) return null;
2627
- return /* @__PURE__ */ jsx53(Flex19, {
2651
+ return /* @__PURE__ */ jsx54(Flex19, {
2628
2652
  direction: "column",
2629
2653
  justify: "end",
2630
2654
  position: "fixed",
@@ -2663,7 +2687,7 @@ var Root7 = function(param) {
2663
2687
  flexGrow: 1
2664
2688
  },
2665
2689
  children: [
2666
- /* @__PURE__ */ jsx53(Inset, {
2690
+ /* @__PURE__ */ jsx54(Inset, {
2667
2691
  clip: "padding-box",
2668
2692
  side: "all",
2669
2693
  pb: "current",
@@ -2673,50 +2697,50 @@ var Root7 = function(param) {
2673
2697
  },
2674
2698
  children: children
2675
2699
  }),
2676
- /* @__PURE__ */ jsx53(Close, {})
2700
+ /* @__PURE__ */ jsx54(Close, {})
2677
2701
  ]
2678
2702
  })
2679
2703
  });
2680
2704
  };
2681
2705
  var Content4 = function(param) {
2682
2706
  var _param_style = param.style, style = _param_style === void 0 ? {} : _param_style;
2683
- return /* @__PURE__ */ jsx53(Root7, {
2707
+ return /* @__PURE__ */ jsx54(Root8, {
2684
2708
  style: style,
2685
2709
  children: /* @__PURE__ */ jsxs16(Thread.Root, {
2686
2710
  children: [
2687
- /* @__PURE__ */ jsx53(Thread.Messages, {
2711
+ /* @__PURE__ */ jsx54(Thread.Messages, {
2688
2712
  style: {
2689
2713
  paddingTop: "var(--space-5)",
2690
2714
  paddingRight: "var(--space-5)",
2691
2715
  paddingLeft: "var(--space-5)"
2692
2716
  }
2693
2717
  }),
2694
- /* @__PURE__ */ jsx53(Flex19, {
2718
+ /* @__PURE__ */ jsx54(Flex19, {
2695
2719
  direction: "column",
2696
2720
  pl: "5",
2697
2721
  pr: "5",
2698
2722
  pb: "3",
2699
2723
  flexShrink: "0",
2700
- children: /* @__PURE__ */ jsx53(Thread.MessageForm, {})
2724
+ children: /* @__PURE__ */ jsx54(Thread.MessageForm, {})
2701
2725
  })
2702
2726
  ]
2703
2727
  })
2704
2728
  });
2705
2729
  };
2706
- Content4.Root = Root7;
2730
+ Content4.Root = Root8;
2707
2731
  // src/components/threads/ThreadDialog/index.tsx
2708
- import { jsx as jsx54, jsxs as jsxs17 } from "react/jsx-runtime";
2732
+ import { jsx as jsx55, jsxs as jsxs17 } from "react/jsx-runtime";
2709
2733
  var ThreadDialog = function() {
2710
- return /* @__PURE__ */ jsxs17(Root6, {
2734
+ return /* @__PURE__ */ jsxs17(Root7, {
2711
2735
  children: [
2712
- /* @__PURE__ */ jsx54(Content4, {}),
2713
- /* @__PURE__ */ jsx54(Trigger, {
2714
- children: /* @__PURE__ */ jsx54(Button2, {})
2736
+ /* @__PURE__ */ jsx55(Content4, {}),
2737
+ /* @__PURE__ */ jsx55(Trigger, {
2738
+ children: /* @__PURE__ */ jsx55(Button2, {})
2715
2739
  })
2716
2740
  ]
2717
2741
  });
2718
2742
  };
2719
- ThreadDialog.Root = Root6;
2743
+ ThreadDialog.Root = Root7;
2720
2744
  ThreadDialog.Trigger = Trigger;
2721
2745
  ThreadDialog.Button = Button2;
2722
2746
  ThreadDialog.Content = Content4;
@@ -2724,8 +2748,8 @@ ThreadDialog.Content = Content4;
2724
2748
  import "regenerator-runtime/runtime";
2725
2749
  import { Flex as Flex20 } from "@radix-ui/themes";
2726
2750
  // src/contexts/threads/AudioThreadContext/index.ts
2727
- import { createContext as createContext10 } from "react";
2728
- var AudioThreadContext = createContext10({
2751
+ import { createContext as createContext11 } from "react";
2752
+ var AudioThreadContext = createContext11({
2729
2753
  status: "idle",
2730
2754
  recorderProps: {
2731
2755
  status: "idle",
@@ -3159,8 +3183,8 @@ var useMessageAudio = function(param) {
3159
3183
  });
3160
3184
  };
3161
3185
  // src/components/threads/AudioThread/Root/index.tsx
3162
- import { jsx as jsx55 } from "react/jsx-runtime";
3163
- var Root8 = function(param) {
3186
+ import { jsx as jsx56 } from "react/jsx-runtime";
3187
+ var Root9 = function(param) {
3164
3188
  var children = param.children;
3165
3189
  var createMessageProps = useCreateMessage();
3166
3190
  var recorderProps = useRecorder({
@@ -3217,13 +3241,13 @@ var Root8 = function(param) {
3217
3241
  createMessageProps: createMessageProps,
3218
3242
  messageAudioProps: messageAudioProps
3219
3243
  }).status;
3220
- return /* @__PURE__ */ jsx55(AudioThreadContext.Provider, {
3244
+ return /* @__PURE__ */ jsx56(AudioThreadContext.Provider, {
3221
3245
  value: {
3222
3246
  status: status,
3223
3247
  recorderProps: recorderProps,
3224
3248
  messageAudioProps: messageAudioProps
3225
3249
  },
3226
- children: /* @__PURE__ */ jsx55(Flex20, {
3250
+ children: /* @__PURE__ */ jsx56(Flex20, {
3227
3251
  direction: "column",
3228
3252
  flexGrow: "1",
3229
3253
  p: "9",
@@ -3232,20 +3256,20 @@ var Root8 = function(param) {
3232
3256
  });
3233
3257
  };
3234
3258
  // src/components/threads/AudioThread/Visualization/index.tsx
3235
- import { useContext as useContext13, useState as useState6, useCallback as useCallback5, useEffect as useEffect7 } from "react";
3259
+ import { useContext as useContext14, useState as useState6, useCallback as useCallback5, useEffect as useEffect7 } from "react";
3236
3260
  import _9 from "lodash";
3237
3261
  import { Flex as Flex22 } from "@radix-ui/themes";
3238
3262
  // src/hooks/threads/useAudioThreadContext/index.ts
3239
- import { useContext as useContext12 } from "react";
3263
+ import { useContext as useContext13 } from "react";
3240
3264
  var useAudioThreadContext = function() {
3241
- return useContext12(AudioThreadContext);
3265
+ return useContext13(AudioThreadContext);
3242
3266
  };
3243
3267
  // src/components/threads/AudioThread/BarsVisualizer/index.tsx
3244
3268
  import _8 from "lodash";
3245
3269
  import { Flex as Flex21, Grid } from "@radix-ui/themes";
3246
3270
  import { useState as useState5, useEffect as useEffect6, useCallback as useCallback4 } from "react";
3247
3271
  import { cluster } from "radash";
3248
- import { jsx as jsx56 } from "react/jsx-runtime";
3272
+ import { jsx as jsx57 } from "react/jsx-runtime";
3249
3273
  var barCount = 4;
3250
3274
  var BarsVisualizer = function(param) {
3251
3275
  var visualizationAnalyser = param.visualizationAnalyser, backgroundColor = param.backgroundColor, height = param.height, barWidth = param.barWidth;
@@ -3276,7 +3300,7 @@ var BarsVisualizer = function(param) {
3276
3300
  draw,
3277
3301
  visualizationAnalyser
3278
3302
  ]);
3279
- return /* @__PURE__ */ jsx56(Grid, {
3303
+ return /* @__PURE__ */ jsx57(Grid, {
3280
3304
  columns: "".concat(barCount),
3281
3305
  gap: "1",
3282
3306
  width: "auto",
@@ -3285,12 +3309,12 @@ var BarsVisualizer = function(param) {
3285
3309
  gridTemplateColumns: "repeat(4, minmax(0, 1fr))"
3286
3310
  },
3287
3311
  children: barHeights.map(function(barHeight, index) {
3288
- return /* @__PURE__ */ jsx56(Flex21, {
3312
+ return /* @__PURE__ */ jsx57(Flex21, {
3289
3313
  direction: "column",
3290
3314
  align: "center",
3291
3315
  justify: "center",
3292
3316
  height: height,
3293
- children: /* @__PURE__ */ jsx56(Flex21, {
3317
+ children: /* @__PURE__ */ jsx57(Flex21, {
3294
3318
  minHeight: "50%",
3295
3319
  maxHeight: "100%",
3296
3320
  height: "".concat(barHeight + 20, "%"),
@@ -3305,10 +3329,10 @@ var BarsVisualizer = function(param) {
3305
3329
  });
3306
3330
  };
3307
3331
  // src/components/threads/AudioThread/Visualization/index.tsx
3308
- import { jsx as jsx57, jsxs as jsxs18 } from "react/jsx-runtime";
3332
+ import { jsx as jsx58, jsxs as jsxs18 } from "react/jsx-runtime";
3309
3333
  var Visualization = function() {
3310
3334
  var audioThreadContext = useAudioThreadContext();
3311
- var assistantNameContext = useContext13(AssistantNameContext);
3335
+ var assistantNameContext = useContext14(AssistantNameContext);
3312
3336
  var _useState6 = _sliced_to_array(useState6(0), 2), scale = _useState6[0], setScale = _useState6[1];
3313
3337
  var draw = useCallback5(function(param) {
3314
3338
  var visualizationAnalyser = param.visualizationAnalyser;
@@ -3340,7 +3364,7 @@ var Visualization = function() {
3340
3364
  mb: "3",
3341
3365
  flexGrow: "1",
3342
3366
  children: [
3343
- /* @__PURE__ */ jsx57(Flex22, {
3367
+ /* @__PURE__ */ jsx58(Flex22, {
3344
3368
  align: "center",
3345
3369
  justify: "center",
3346
3370
  height: "200px",
@@ -3350,7 +3374,7 @@ var Visualization = function() {
3350
3374
  borderRadius: "9999px",
3351
3375
  scale: scale
3352
3376
  },
3353
- children: /* @__PURE__ */ jsx57(BarsVisualizer, {
3377
+ children: /* @__PURE__ */ jsx58(BarsVisualizer, {
3354
3378
  visualizationAnalyser: audioThreadContext.messageAudioProps.visualizationAnalyser,
3355
3379
  backgroundColor: audioThreadContext.status === "playing" ? "var(--accent-11)" : "var(--gray-11)",
3356
3380
  height: "40px",
@@ -3362,8 +3386,8 @@ var Visualization = function() {
3362
3386
  gap: "3",
3363
3387
  pt: "5",
3364
3388
  children: [
3365
- /* @__PURE__ */ jsx57(AssistantAvatar, {}),
3366
- /* @__PURE__ */ jsx57(Name, {
3389
+ /* @__PURE__ */ jsx58(AssistantAvatar, {}),
3390
+ /* @__PURE__ */ jsx58(Name, {
3367
3391
  children: assistantNameContext
3368
3392
  })
3369
3393
  ]
@@ -3373,7 +3397,7 @@ var Visualization = function() {
3373
3397
  };
3374
3398
  // src/components/threads/AudioThread/Status/StatusMessages.tsx
3375
3399
  import { Flex as Flex23, Text as Text7 } from "@radix-ui/themes";
3376
- import { jsx as jsx58, jsxs as jsxs19 } from "react/jsx-runtime";
3400
+ import { jsx as jsx59, jsxs as jsxs19 } from "react/jsx-runtime";
3377
3401
  var html = function(param) {
3378
3402
  var texts = param.texts;
3379
3403
  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) {
@@ -3386,13 +3410,13 @@ var StatusMessages = function(param) {
3386
3410
  justify: "center",
3387
3411
  pb: "5",
3388
3412
  children: [
3389
- /* @__PURE__ */ jsx58(Text7, {
3413
+ /* @__PURE__ */ jsx59(Text7, {
3390
3414
  size: "2",
3391
3415
  weight: "regular",
3392
3416
  color: "gray",
3393
3417
  className: "status-messages-texts"
3394
3418
  }),
3395
- /* @__PURE__ */ jsx58("style", {
3419
+ /* @__PURE__ */ jsx59("style", {
3396
3420
  dangerouslySetInnerHTML: {
3397
3421
  __html: html({
3398
3422
  texts: texts
@@ -3403,11 +3427,11 @@ var StatusMessages = function(param) {
3403
3427
  });
3404
3428
  };
3405
3429
  // src/components/threads/AudioThread/Status/index.tsx
3406
- import { jsx as jsx59 } from "react/jsx-runtime";
3430
+ import { jsx as jsx60 } from "react/jsx-runtime";
3407
3431
  var Status = function() {
3408
3432
  var audioThreadContext = useAudioThreadContext();
3409
3433
  if (audioThreadContext.status === "recording") {
3410
- return /* @__PURE__ */ jsx59(StatusMessages, {
3434
+ return /* @__PURE__ */ jsx60(StatusMessages, {
3411
3435
  texts: [
3412
3436
  "Start speaking",
3413
3437
  "Listening",
@@ -3421,20 +3445,20 @@ var Status = function() {
3421
3445
  "idle",
3422
3446
  "playerPaused"
3423
3447
  ].includes(audioThreadContext.status)) {
3424
- return /* @__PURE__ */ jsx59(StatusMessages, {
3448
+ return /* @__PURE__ */ jsx60(StatusMessages, {
3425
3449
  texts: [
3426
3450
  "Click the button below to activate"
3427
3451
  ]
3428
3452
  });
3429
3453
  }
3430
3454
  if (audioThreadContext.status === "playing") {
3431
- return /* @__PURE__ */ jsx59(StatusMessages, {
3455
+ return /* @__PURE__ */ jsx60(StatusMessages, {
3432
3456
  texts: [
3433
3457
  "Click the button below to interrupt"
3434
3458
  ]
3435
3459
  });
3436
3460
  }
3437
- return /* @__PURE__ */ jsx59(StatusMessages, {
3461
+ return /* @__PURE__ */ jsx60(StatusMessages, {
3438
3462
  texts: [
3439
3463
  "Thinking"
3440
3464
  ]
@@ -3443,9 +3467,9 @@ var Status = function() {
3443
3467
  // src/components/threads/AudioThread/Form/index.tsx
3444
3468
  import { Flex as Flex25 } from "@radix-ui/themes";
3445
3469
  // src/components/threads/AudioThread/Form/MicIcon.tsx
3446
- import { jsx as jsx60 } from "react/jsx-runtime";
3470
+ import { jsx as jsx61 } from "react/jsx-runtime";
3447
3471
  var MicIcon = function(props) {
3448
- return /* @__PURE__ */ jsx60("svg", _object_spread_props(_object_spread({
3472
+ return /* @__PURE__ */ jsx61("svg", _object_spread_props(_object_spread({
3449
3473
  xmlns: "http://www.w3.org/2000/svg",
3450
3474
  fill: "currentColor",
3451
3475
  stroke: "currentColor",
@@ -3454,7 +3478,7 @@ var MicIcon = function(props) {
3454
3478
  height: "15",
3455
3479
  width: "15"
3456
3480
  }, props), {
3457
- children: /* @__PURE__ */ jsx60("path", {
3481
+ children: /* @__PURE__ */ jsx61("path", {
3458
3482
  stroke: "none",
3459
3483
  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"
3460
3484
  })
@@ -3463,7 +3487,7 @@ var MicIcon = function(props) {
3463
3487
  // src/components/threads/AudioThread/Form/ActionButton/index.tsx
3464
3488
  import { Flex as Flex24, IconButton as IconButton4 } from "@radix-ui/themes";
3465
3489
  import { StopIcon as StopIcon2, PauseIcon, ArrowUpIcon as ArrowUpIcon2, ResumeIcon } from "@radix-ui/react-icons";
3466
- import { jsx as jsx61, jsxs as jsxs20 } from "react/jsx-runtime";
3490
+ import { jsx as jsx62, jsxs as jsxs20 } from "react/jsx-runtime";
3467
3491
  var ActionButton = function() {
3468
3492
  var audioThreadContext = useAudioThreadContext();
3469
3493
  var superinterfaceContext = useSuperinterfaceContext();
@@ -3471,37 +3495,37 @@ var ActionButton = function() {
3471
3495
  return /* @__PURE__ */ jsxs20(Flex24, {
3472
3496
  align: "center",
3473
3497
  children: [
3474
- /* @__PURE__ */ jsx61(Flex24, {
3498
+ /* @__PURE__ */ jsx62(Flex24, {
3475
3499
  mr: "3",
3476
3500
  ml: "-7",
3477
- children: /* @__PURE__ */ jsx61(IconButton4, {
3501
+ children: /* @__PURE__ */ jsx62(IconButton4, {
3478
3502
  onClick: audioThreadContext.recorderProps.pause,
3479
3503
  color: "gray",
3480
3504
  variant: "soft",
3481
3505
  size: "1",
3482
- children: /* @__PURE__ */ jsx61(PauseIcon, {})
3506
+ children: /* @__PURE__ */ jsx62(PauseIcon, {})
3483
3507
  })
3484
3508
  }),
3485
- /* @__PURE__ */ jsx61(IconButton4, {
3509
+ /* @__PURE__ */ jsx62(IconButton4, {
3486
3510
  onClick: audioThreadContext.recorderProps.stop,
3487
3511
  highContrast: true,
3488
3512
  variant: "soft",
3489
3513
  size: "4",
3490
- children: /* @__PURE__ */ jsx61(ArrowUpIcon2, {})
3514
+ children: /* @__PURE__ */ jsx62(ArrowUpIcon2, {})
3491
3515
  })
3492
3516
  ]
3493
3517
  });
3494
3518
  }
3495
3519
  if (audioThreadContext.status === "recorderPaused") {
3496
- return /* @__PURE__ */ jsx61(IconButton4, {
3520
+ return /* @__PURE__ */ jsx62(IconButton4, {
3497
3521
  onClick: audioThreadContext.recorderProps.resume,
3498
3522
  color: "red",
3499
3523
  size: "4",
3500
- children: /* @__PURE__ */ jsx61(ResumeIcon, {})
3524
+ children: /* @__PURE__ */ jsx62(ResumeIcon, {})
3501
3525
  });
3502
3526
  }
3503
3527
  if (audioThreadContext.status === "idle") {
3504
- return /* @__PURE__ */ jsx61(IconButton4, {
3528
+ return /* @__PURE__ */ jsx62(IconButton4, {
3505
3529
  onClick: function() {
3506
3530
  return audioThreadContext.recorderProps.start();
3507
3531
  },
@@ -3510,7 +3534,7 @@ var ActionButton = function() {
3510
3534
  });
3511
3535
  }
3512
3536
  if (audioThreadContext.status === "playing") {
3513
- return /* @__PURE__ */ jsx61(IconButton4, {
3537
+ return /* @__PURE__ */ jsx62(IconButton4, {
3514
3538
  onClick: function() {
3515
3539
  var _superinterfaceContext_createMessageAbortControllerRef_current;
3516
3540
  audioThreadContext.messageAudioProps.stop();
@@ -3520,26 +3544,26 @@ var ActionButton = function() {
3520
3544
  size: "4",
3521
3545
  color: "gray",
3522
3546
  variant: "soft",
3523
- children: /* @__PURE__ */ jsx61(StopIcon2, {})
3547
+ children: /* @__PURE__ */ jsx62(StopIcon2, {})
3524
3548
  });
3525
3549
  }
3526
3550
  if (audioThreadContext.status === "playerPaused") {
3527
- return /* @__PURE__ */ jsx61(IconButton4, {
3551
+ return /* @__PURE__ */ jsx62(IconButton4, {
3528
3552
  onClick: function() {
3529
3553
  return audioThreadContext.messageAudioProps.play();
3530
3554
  },
3531
3555
  size: "4",
3532
- children: /* @__PURE__ */ jsx61(ResumeIcon, {})
3556
+ children: /* @__PURE__ */ jsx62(ResumeIcon, {})
3533
3557
  });
3534
3558
  }
3535
- return /* @__PURE__ */ jsx61(IconButton4, {
3559
+ return /* @__PURE__ */ jsx62(IconButton4, {
3536
3560
  size: "4",
3537
3561
  variant: "soft",
3538
3562
  disabled: true
3539
3563
  });
3540
3564
  };
3541
3565
  // src/components/threads/AudioThread/Form/index.tsx
3542
- import { jsx as jsx62, jsxs as jsxs21 } from "react/jsx-runtime";
3566
+ import { jsx as jsx63, jsxs as jsxs21 } from "react/jsx-runtime";
3543
3567
  var Form = function() {
3544
3568
  var audioThreadContext = useAudioThreadContext();
3545
3569
  return /* @__PURE__ */ jsxs21(Flex25, {
@@ -3550,24 +3574,24 @@ var Form = function() {
3550
3574
  pb: "3",
3551
3575
  align: "center",
3552
3576
  children: [
3553
- /* @__PURE__ */ jsx62(Flex25, {
3577
+ /* @__PURE__ */ jsx63(Flex25, {
3554
3578
  ml: "-22.5px",
3555
3579
  mr: "2",
3556
3580
  align: "center",
3557
- children: /* @__PURE__ */ jsx62(MicIcon, {
3581
+ children: /* @__PURE__ */ jsx63(MicIcon, {
3558
3582
  style: {
3559
3583
  color: audioThreadContext.status === "recording" ? "var(--accent-11)" : "var(--gray-11)"
3560
3584
  }
3561
3585
  })
3562
3586
  }),
3563
- /* @__PURE__ */ jsx62(Flex25, {
3587
+ /* @__PURE__ */ jsx63(Flex25, {
3564
3588
  px: "2",
3565
3589
  py: "1",
3566
3590
  style: {
3567
3591
  backgroundColor: audioThreadContext.status === "recording" ? "var(--accent-4)" : "var(--gray-4)",
3568
3592
  borderRadius: "var(--radius-6)"
3569
3593
  },
3570
- children: /* @__PURE__ */ jsx62(BarsVisualizer, {
3594
+ children: /* @__PURE__ */ jsx63(BarsVisualizer, {
3571
3595
  visualizationAnalyser: audioThreadContext.recorderProps.visualizationAnalyser,
3572
3596
  backgroundColor: audioThreadContext.status === "recording" ? "var(--accent-11)" : "var(--gray-11)",
3573
3597
  height: "20px",
@@ -3576,39 +3600,39 @@ var Form = function() {
3576
3600
  })
3577
3601
  ]
3578
3602
  }),
3579
- /* @__PURE__ */ jsx62(ActionButton, {})
3603
+ /* @__PURE__ */ jsx63(ActionButton, {})
3580
3604
  ]
3581
3605
  });
3582
3606
  };
3583
3607
  // src/components/threads/AudioThread/index.tsx
3584
- import { jsx as jsx63, jsxs as jsxs22 } from "react/jsx-runtime";
3608
+ import { jsx as jsx64, jsxs as jsxs22 } from "react/jsx-runtime";
3585
3609
  var AudioThread = function(props) {
3586
- return /* @__PURE__ */ jsxs22(Root8, _object_spread_props(_object_spread({}, props), {
3610
+ return /* @__PURE__ */ jsxs22(Root9, _object_spread_props(_object_spread({}, props), {
3587
3611
  children: [
3588
- /* @__PURE__ */ jsx63(Visualization, {}),
3589
- /* @__PURE__ */ jsx63(Status, {}),
3590
- /* @__PURE__ */ jsx63(Form, {})
3612
+ /* @__PURE__ */ jsx64(Visualization, {}),
3613
+ /* @__PURE__ */ jsx64(Status, {}),
3614
+ /* @__PURE__ */ jsx64(Form, {})
3591
3615
  ]
3592
3616
  }));
3593
3617
  };
3594
- AudioThread.Root = Root8;
3618
+ AudioThread.Root = Root9;
3595
3619
  AudioThread.Visualization = Visualization;
3596
3620
  AudioThread.Form = Form;
3597
3621
  // src/components/threads/AudioThreadDialog/index.tsx
3598
- import { jsx as jsx64, jsxs as jsxs23 } from "react/jsx-runtime";
3622
+ import { jsx as jsx65, jsxs as jsxs23 } from "react/jsx-runtime";
3599
3623
  var AudioThreadDialog = function() {
3600
- return /* @__PURE__ */ jsxs23(Root6, {
3624
+ return /* @__PURE__ */ jsxs23(Root7, {
3601
3625
  children: [
3602
- /* @__PURE__ */ jsx64(Content4.Root, {
3603
- children: /* @__PURE__ */ jsx64(AudioThread, {})
3626
+ /* @__PURE__ */ jsx65(Content4.Root, {
3627
+ children: /* @__PURE__ */ jsx65(AudioThread, {})
3604
3628
  }),
3605
- /* @__PURE__ */ jsx64(Trigger, {
3606
- children: /* @__PURE__ */ jsx64(Button2, {})
3629
+ /* @__PURE__ */ jsx65(Trigger, {
3630
+ children: /* @__PURE__ */ jsx65(Button2, {})
3607
3631
  })
3608
3632
  ]
3609
3633
  });
3610
3634
  };
3611
- AudioThreadDialog.Root = Root6;
3635
+ AudioThreadDialog.Root = Root7;
3612
3636
  AudioThreadDialog.Trigger = Trigger;
3613
3637
  AudioThreadDialog.Button = Button2;
3614
3638
  AudioThreadDialog.Content = Content4;
@@ -3622,11 +3646,11 @@ import { Flex as Flex26 } from "@radix-ui/themes";
3622
3646
  // src/components/suggestions/Suggestions/Item.tsx
3623
3647
  import { ArrowUpIcon as ArrowUpIcon3 } from "@radix-ui/react-icons";
3624
3648
  import { Text as Text8, Button as Button3, Spinner } from "@radix-ui/themes";
3625
- import { jsx as jsx65, jsxs as jsxs24 } from "react/jsx-runtime";
3649
+ import { jsx as jsx66, jsxs as jsxs24 } from "react/jsx-runtime";
3626
3650
  var Item = function(param) {
3627
3651
  var suggestion = param.suggestion, isDisabled = param.isDisabled;
3628
3652
  var _useCreateMessage = useCreateMessage(), createMessage = _useCreateMessage.createMessage, isPending = _useCreateMessage.isPending;
3629
- return /* @__PURE__ */ jsx65(Content5, {
3653
+ return /* @__PURE__ */ jsx66(Content5, {
3630
3654
  onClick: function() {
3631
3655
  createMessage({
3632
3656
  // @ts-ignore-next-line
@@ -3650,14 +3674,14 @@ var Content5 = function(param) {
3650
3674
  flexShrink: 1
3651
3675
  },
3652
3676
  children: [
3653
- /* @__PURE__ */ jsx65(Text8, {
3677
+ /* @__PURE__ */ jsx66(Text8, {
3654
3678
  size: "1",
3655
3679
  weight: "regular",
3656
3680
  children: children
3657
3681
  }),
3658
- /* @__PURE__ */ jsx65(Spinner, {
3682
+ /* @__PURE__ */ jsx66(Spinner, {
3659
3683
  loading: isPending,
3660
- children: /* @__PURE__ */ jsx65(ArrowUpIcon3, {
3684
+ children: /* @__PURE__ */ jsx66(ArrowUpIcon3, {
3661
3685
  style: {
3662
3686
  flexShrink: 0
3663
3687
  }
@@ -3668,7 +3692,7 @@ var Content5 = function(param) {
3668
3692
  };
3669
3693
  Item.Content = Content5;
3670
3694
  // src/components/suggestions/Suggestions/Content.tsx
3671
- import { jsx as jsx66 } from "react/jsx-runtime";
3695
+ import { jsx as jsx67 } from "react/jsx-runtime";
3672
3696
  var Content6 = function(param) {
3673
3697
  var children = param.children;
3674
3698
  var isMutatingMessage = useIsMutatingMessage();
@@ -3682,12 +3706,12 @@ var Content6 = function(param) {
3682
3706
  children
3683
3707
  ]);
3684
3708
  if (isEmpty2(suggestions)) return null;
3685
- return /* @__PURE__ */ jsx66(Flex26, {
3709
+ return /* @__PURE__ */ jsx67(Flex26, {
3686
3710
  gap: "2",
3687
3711
  py: "2",
3688
3712
  wrap: "wrap",
3689
3713
  children: suggestions.map(function(suggestion) {
3690
- return /* @__PURE__ */ jsx66(Item, {
3714
+ return /* @__PURE__ */ jsx67(Item, {
3691
3715
  suggestion: suggestion,
3692
3716
  isDisabled: isMutatingMessage
3693
3717
  }, suggestion);
@@ -3695,7 +3719,7 @@ var Content6 = function(param) {
3695
3719
  });
3696
3720
  };
3697
3721
  // src/components/suggestions/Suggestions/index.tsx
3698
- import { jsx as jsx67 } from "react/jsx-runtime";
3722
+ import { jsx as jsx68 } from "react/jsx-runtime";
3699
3723
  var Suggestions = function(param) {
3700
3724
  var children = param.children;
3701
3725
  var latestMessageProps = useLatestMessage();
@@ -3708,14 +3732,14 @@ var Suggestions = function(param) {
3708
3732
  ]);
3709
3733
  if (latestMessageProps.isLoading) return null;
3710
3734
  if (isDisabled) return null;
3711
- return /* @__PURE__ */ jsx67(Content6, {
3735
+ return /* @__PURE__ */ jsx68(Content6, {
3712
3736
  children: children
3713
3737
  });
3714
3738
  };
3715
3739
  Suggestions.Item = Item;
3716
3740
  // src/components/markdown/MarkdownProvider/index.tsx
3717
3741
  import { useMemo as useMemo15 } from "react";
3718
- import { jsx as jsx68 } from "react/jsx-runtime";
3742
+ import { jsx as jsx69 } from "react/jsx-runtime";
3719
3743
  var MarkdownProvider = function(_param) {
3720
3744
  var children = _param.children, rest = _object_without_properties(_param, [
3721
3745
  "children"
@@ -3727,10 +3751,35 @@ var MarkdownProvider = function(_param) {
3727
3751
  rest,
3728
3752
  prevMarkdownContext
3729
3753
  ]);
3730
- return /* @__PURE__ */ jsx68(MarkdownContext.Provider, {
3754
+ return /* @__PURE__ */ jsx69(MarkdownContext.Provider, {
3755
+ value: value,
3756
+ children: children
3757
+ });
3758
+ };
3759
+ // src/components/components/ComponentsProvider.tsx
3760
+ import { useMemo as useMemo16 } from "react";
3761
+ // src/hooks/components/useComponents.ts
3762
+ import { useContext as useContext15 } from "react";
3763
+ var useComponents = function() {
3764
+ return useContext15(ComponentsContext);
3765
+ };
3766
+ // src/components/components/ComponentsProvider.tsx
3767
+ import { jsx as jsx70 } from "react/jsx-runtime";
3768
+ var ComponentsProvider = function(_param) {
3769
+ var children = _param.children, rest = _object_without_properties(_param, [
3770
+ "children"
3771
+ ]);
3772
+ var prevComponents = useComponents();
3773
+ var value = useMemo16(function() {
3774
+ return merge(prevComponents, rest);
3775
+ }, [
3776
+ rest,
3777
+ prevComponents
3778
+ ]);
3779
+ return /* @__PURE__ */ jsx70(ComponentsContext.Provider, {
3731
3780
  value: value,
3732
3781
  children: children
3733
3782
  });
3734
3783
  };
3735
- export { AssistantAvatarContext, AssistantNameContext, AudioThread, AudioThreadDialog, FunctionBase, FunctionComponentsContext, MarkdownContext, MarkdownProvider, Suggestions, SuperinterfaceProvider, Thread, ThreadDialog, ThreadDialogContext, useCreateMessage, useLatestMessage, useMarkdownContext, useMessageContext, useMessages, useSuperinterfaceContext, useSuperinterfaceContext as useThreadContext, useThreadDialogContext };
3784
+ export { AssistantAvatarContext, AssistantNameContext, AudioThread, AudioThreadDialog, ComponentsProvider, FunctionBase, FunctionComponentsContext, MarkdownContext, MarkdownProvider, RunStep, Suggestions, SuperinterfaceProvider, Thread, ThreadDialog, ThreadDialogContext, useComponents, useCreateMessage, useLatestMessage, useMarkdownContext, useMessageContext, useMessages, useSuperinterfaceContext, useSuperinterfaceContext as useThreadContext, useThreadDialogContext };
3736
3785
  //# sourceMappingURL=index.js.map