@superinterface/react 2.14.0 → 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
@@ -1040,7 +1040,7 @@ var MessageContext = createContext7({
1040
1040
  // src/components/threads/Thread/Message/Provider.tsx
1041
1041
  var Provider = MessageContext.Provider;
1042
1042
  // src/components/threads/Thread/Message/TextContent.tsx
1043
- import { useRemarkSync } from "react-remark";
1043
+ import Markdown from "react-markdown";
1044
1044
  // src/hooks/markdown/useMarkdownContext/index.ts
1045
1045
  import { useContext as useContext6 } from "react";
1046
1046
  // src/contexts/markdown/MarkdownContext/index.ts
@@ -1185,13 +1185,16 @@ var useMarkdownContext = function() {
1185
1185
  return useContext6(MarkdownContext);
1186
1186
  };
1187
1187
  // src/components/threads/Thread/Message/TextContent.tsx
1188
+ import { jsx as jsx30 } from "react/jsx-runtime";
1188
1189
  var TextContent = function(param) {
1189
1190
  var content = param.content;
1190
1191
  var markdownContext = useMarkdownContext();
1191
- return useRemarkSync(content.text.value, markdownContext);
1192
+ return /* @__PURE__ */ jsx30(Markdown, _object_spread_props(_object_spread({}, markdownContext), {
1193
+ children: content.text.value
1194
+ }));
1192
1195
  };
1193
1196
  // src/components/threads/Thread/Message/index.tsx
1194
- import { jsx as jsx30, jsxs as jsxs6 } from "react/jsx-runtime";
1197
+ import { jsx as jsx31, jsxs as jsxs6 } from "react/jsx-runtime";
1195
1198
  var Message = function(param) {
1196
1199
  var message = param.message;
1197
1200
  var _useMemo5 = _sliced_to_array(useMemo5(function() {
@@ -1236,28 +1239,28 @@ var Message = function(param) {
1236
1239
  }, [
1237
1240
  message
1238
1241
  ]);
1239
- return /* @__PURE__ */ jsx30(Provider, {
1242
+ return /* @__PURE__ */ jsx31(Provider, {
1240
1243
  value: {
1241
1244
  message: message
1242
1245
  },
1243
1246
  children: /* @__PURE__ */ jsxs6(Box9, {
1244
1247
  children: [
1245
- /* @__PURE__ */ jsx30(RunSteps, {
1248
+ /* @__PURE__ */ jsx31(RunSteps, {
1246
1249
  runSteps: olderRunSteps
1247
1250
  }),
1248
1251
  /* @__PURE__ */ jsxs6(Box9, {
1249
1252
  children: [
1250
1253
  message.content.map(function(content, index) {
1251
- return /* @__PURE__ */ jsx30(Fragment, {
1252
- children: content.type === "text" && /* @__PURE__ */ jsx30(TextContent, {
1254
+ return /* @__PURE__ */ jsx31(Fragment, {
1255
+ children: content.type === "text" && /* @__PURE__ */ jsx31(TextContent, {
1253
1256
  content: content
1254
1257
  })
1255
1258
  }, index);
1256
1259
  }),
1257
- isInProgress && /* @__PURE__ */ jsx30(StartingContentSkeleton, {})
1260
+ isInProgress && /* @__PURE__ */ jsx31(StartingContentSkeleton, {})
1258
1261
  ]
1259
1262
  }),
1260
- /* @__PURE__ */ jsx30(RunSteps, {
1263
+ /* @__PURE__ */ jsx31(RunSteps, {
1261
1264
  runSteps: laterRunSteps
1262
1265
  })
1263
1266
  ]
@@ -1265,36 +1268,36 @@ var Message = function(param) {
1265
1268
  });
1266
1269
  };
1267
1270
  // src/components/threads/Thread/Messages/Content/MessageGroup/Content/index.tsx
1268
- import { jsx as jsx31 } from "react/jsx-runtime";
1271
+ import { jsx as jsx32 } from "react/jsx-runtime";
1269
1272
  var Content2 = function(param) {
1270
1273
  var messageGroup = param.messageGroup;
1271
- return /* @__PURE__ */ jsx31(Flex10, {
1274
+ return /* @__PURE__ */ jsx32(Flex10, {
1272
1275
  direction: "column-reverse",
1273
1276
  children: messageGroup.messages.map(function(message) {
1274
- return /* @__PURE__ */ jsx31(Message, {
1277
+ return /* @__PURE__ */ jsx32(Message, {
1275
1278
  message: message
1276
1279
  }, message.id);
1277
1280
  })
1278
1281
  });
1279
1282
  };
1280
1283
  // src/components/threads/Thread/Messages/Content/MessageGroup/index.tsx
1281
- import { jsx as jsx32, jsxs as jsxs7 } from "react/jsx-runtime";
1284
+ import { jsx as jsx33, jsxs as jsxs7 } from "react/jsx-runtime";
1282
1285
  var MessageGroup = function(param) {
1283
1286
  var messageGroup = param.messageGroup;
1284
1287
  var assistantNameContext = useContext7(AssistantNameContext);
1285
1288
  return /* @__PURE__ */ jsxs7(MessageGroupBase, {
1286
1289
  children: [
1287
- messageGroup.role === "user" ? /* @__PURE__ */ jsx32(Avatar3, {
1288
- fallback: /* @__PURE__ */ jsx32(PersonIcon, {}),
1290
+ messageGroup.role === "user" ? /* @__PURE__ */ jsx33(Avatar3, {
1291
+ fallback: /* @__PURE__ */ jsx33(PersonIcon, {}),
1289
1292
  size: "1"
1290
- }) : /* @__PURE__ */ jsx32(AssistantAvatar, {}),
1293
+ }) : /* @__PURE__ */ jsx33(AssistantAvatar, {}),
1291
1294
  /* @__PURE__ */ jsxs7(Box10, {
1292
1295
  flexGrow: "1",
1293
1296
  children: [
1294
- /* @__PURE__ */ jsx32(Name, {
1297
+ /* @__PURE__ */ jsx33(Name, {
1295
1298
  children: messageGroup.role === "user" ? "You" : assistantNameContext
1296
1299
  }),
1297
- /* @__PURE__ */ jsx32(Content2, {
1300
+ /* @__PURE__ */ jsx33(Content2, {
1298
1301
  messageGroup: messageGroup
1299
1302
  })
1300
1303
  ]
@@ -1303,7 +1306,7 @@ var MessageGroup = function(param) {
1303
1306
  });
1304
1307
  };
1305
1308
  // src/components/threads/Thread/Messages/Content/index.tsx
1306
- import { Fragment as Fragment2, jsx as jsx33 } from "react/jsx-runtime";
1309
+ import { Fragment as Fragment2, jsx as jsx34 } from "react/jsx-runtime";
1307
1310
  var Content3 = function() {
1308
1311
  var _useMessages = useMessages(), messages2 = _useMessages.messages, isLoading = _useMessages.isLoading, isLoadingError = _useMessages.isLoadingError;
1309
1312
  var addToast = useToasts().addToast;
@@ -1322,11 +1325,11 @@ var Content3 = function() {
1322
1325
  addToast
1323
1326
  ]);
1324
1327
  if (isLoading || isLoadingError) {
1325
- return /* @__PURE__ */ jsx33(MessagesSkeleton, {});
1328
+ return /* @__PURE__ */ jsx34(MessagesSkeleton, {});
1326
1329
  }
1327
- return /* @__PURE__ */ jsx33(Fragment2, {
1330
+ return /* @__PURE__ */ jsx34(Fragment2, {
1328
1331
  children: messageGroups2.map(function(messageGroup) {
1329
- return /* @__PURE__ */ jsx33(MessageGroup, {
1332
+ return /* @__PURE__ */ jsx34(MessageGroup, {
1330
1333
  messageGroup: messageGroup
1331
1334
  }, messageGroup.id);
1332
1335
  })
@@ -1337,20 +1340,20 @@ import { useMemo as useMemo7 } from "react";
1337
1340
  // src/components/skeletons/StartingSkeleton/index.tsx
1338
1341
  import { useContext as useContext8 } from "react";
1339
1342
  import { Box as Box11 } from "@radix-ui/themes";
1340
- import { jsx as jsx34, jsxs as jsxs8 } from "react/jsx-runtime";
1343
+ import { jsx as jsx35, jsxs as jsxs8 } from "react/jsx-runtime";
1341
1344
  var StartingSkeleton = function(param) {
1342
1345
  var children = param.children;
1343
1346
  var assistantNameContext = useContext8(AssistantNameContext);
1344
1347
  return /* @__PURE__ */ jsxs8(MessageGroupBase, {
1345
1348
  children: [
1346
- /* @__PURE__ */ jsx34(AssistantAvatar, {}),
1349
+ /* @__PURE__ */ jsx35(AssistantAvatar, {}),
1347
1350
  /* @__PURE__ */ jsxs8(Box11, {
1348
1351
  children: [
1349
- /* @__PURE__ */ jsx34(Name, {
1352
+ /* @__PURE__ */ jsx35(Name, {
1350
1353
  children: assistantNameContext
1351
1354
  }),
1352
1355
  children,
1353
- /* @__PURE__ */ jsx34(StartingContentSkeleton, {})
1356
+ /* @__PURE__ */ jsx35(StartingContentSkeleton, {})
1354
1357
  ]
1355
1358
  })
1356
1359
  ]
@@ -1375,7 +1378,7 @@ var isOptimistic = function(param) {
1375
1378
  return _4.startsWith(id, "-");
1376
1379
  };
1377
1380
  // src/components/threads/Thread/Messages/Progress/index.tsx
1378
- import { jsx as jsx35 } from "react/jsx-runtime";
1381
+ import { jsx as jsx36 } from "react/jsx-runtime";
1379
1382
  var Progress = function() {
1380
1383
  var latestMessage = useLatestMessage().latestMessage;
1381
1384
  var isMutatingMessage = useIsMutatingMessage();
@@ -1393,7 +1396,7 @@ var Progress = function() {
1393
1396
  isMutatingMessage
1394
1397
  ]);
1395
1398
  if (!isVisible) return null;
1396
- return /* @__PURE__ */ jsx35(StartingSkeleton, {});
1399
+ return /* @__PURE__ */ jsx36(StartingSkeleton, {});
1397
1400
  };
1398
1401
  // src/components/threads/Thread/Messages/Root/index.tsx
1399
1402
  import { Flex as Flex11 } from "@radix-ui/themes";
@@ -1452,7 +1455,7 @@ var useInfiniteScroll = function(param) {
1452
1455
  };
1453
1456
  };
1454
1457
  // src/components/threads/Thread/Messages/Root/index.tsx
1455
- import { jsx as jsx36, jsxs as jsxs9 } from "react/jsx-runtime";
1458
+ import { jsx as jsx37, jsxs as jsxs9 } from "react/jsx-runtime";
1456
1459
  var Root2 = function(param) {
1457
1460
  var children = param.children, _param_style = param.style, style = _param_style === void 0 ? {} : _param_style;
1458
1461
  var _useMessages = useMessages(), isFetchingNextPage = _useMessages.isFetchingNextPage, hasNextPage = _useMessages.hasNextPage, fetchNextPage = _useMessages.fetchNextPage;
@@ -1470,10 +1473,10 @@ var Root2 = function(param) {
1470
1473
  }),
1471
1474
  children: [
1472
1475
  children,
1473
- hasNextPage && /* @__PURE__ */ jsx36(Flex11, {
1476
+ hasNextPage && /* @__PURE__ */ jsx37(Flex11, {
1474
1477
  ref: loaderRef
1475
1478
  }),
1476
- /* @__PURE__ */ jsx36(Flex11, {
1479
+ /* @__PURE__ */ jsx37(Flex11, {
1477
1480
  flexShrink: "0",
1478
1481
  flexGrow: "1"
1479
1482
  })
@@ -1481,30 +1484,30 @@ var Root2 = function(param) {
1481
1484
  });
1482
1485
  };
1483
1486
  // src/components/threads/Thread/Messages/NextPageSkeleton.tsx
1484
- import { jsx as jsx37 } from "react/jsx-runtime";
1487
+ import { jsx as jsx38 } from "react/jsx-runtime";
1485
1488
  var NextPageSkeleton = function() {
1486
1489
  var hasNextPage = useMessages().hasNextPage;
1487
1490
  if (!hasNextPage) {
1488
1491
  return null;
1489
1492
  }
1490
- return /* @__PURE__ */ jsx37(MessagesSkeleton, {});
1493
+ return /* @__PURE__ */ jsx38(MessagesSkeleton, {});
1491
1494
  };
1492
1495
  // src/components/threads/Thread/Messages/index.tsx
1493
- import { jsx as jsx38, jsxs as jsxs10 } from "react/jsx-runtime";
1496
+ import { jsx as jsx39, jsxs as jsxs10 } from "react/jsx-runtime";
1494
1497
  var Messages = function(param) {
1495
1498
  var children = param.children, _param_style = param.style, style = _param_style === void 0 ? {} : _param_style;
1496
1499
  return /* @__PURE__ */ jsxs10(Root2, {
1497
1500
  style: style,
1498
1501
  children: [
1499
- /* @__PURE__ */ jsx38(Flex12, {
1502
+ /* @__PURE__ */ jsx39(Flex12, {
1500
1503
  flexShrink: "0",
1501
1504
  height: "var(--space-3)"
1502
1505
  }),
1503
- /* @__PURE__ */ jsx38(Progress, {}),
1506
+ /* @__PURE__ */ jsx39(Progress, {}),
1504
1507
  children,
1505
- /* @__PURE__ */ jsx38(Content3, {}),
1506
- /* @__PURE__ */ jsx38(NextPageSkeleton, {}),
1507
- /* @__PURE__ */ jsx38(Flex12, {
1508
+ /* @__PURE__ */ jsx39(Content3, {}),
1509
+ /* @__PURE__ */ jsx39(NextPageSkeleton, {}),
1510
+ /* @__PURE__ */ jsx39(Flex12, {
1508
1511
  flexShrink: "0",
1509
1512
  flexGrow: "1"
1510
1513
  })
@@ -1532,24 +1535,24 @@ var useMessageFormContext = function() {
1532
1535
  return useContext9(MessageFormContext);
1533
1536
  };
1534
1537
  // src/components/threads/Thread/MessageForm/Submit/index.tsx
1535
- import { jsx as jsx39 } from "react/jsx-runtime";
1538
+ import { jsx as jsx40 } from "react/jsx-runtime";
1536
1539
  var Submit = function() {
1537
1540
  var superinterfaceContext = useSuperinterfaceContext();
1538
1541
  var _useMessageFormContext = useMessageFormContext(), isDisabled = _useMessageFormContext.isDisabled, isLoading = _useMessageFormContext.isLoading;
1539
1542
  if (isLoading) {
1540
- return /* @__PURE__ */ jsx39(IconButton, {
1543
+ return /* @__PURE__ */ jsx40(IconButton, {
1541
1544
  type: "button",
1542
1545
  onClick: function() {
1543
1546
  var _superinterfaceContext_createMessageAbortControllerRef_current;
1544
1547
  return (_superinterfaceContext_createMessageAbortControllerRef_current = superinterfaceContext.createMessageAbortControllerRef.current) === null || _superinterfaceContext_createMessageAbortControllerRef_current === void 0 ? void 0 : _superinterfaceContext_createMessageAbortControllerRef_current.abort();
1545
1548
  },
1546
- children: /* @__PURE__ */ jsx39(StopIcon, {})
1549
+ children: /* @__PURE__ */ jsx40(StopIcon, {})
1547
1550
  });
1548
1551
  }
1549
- return /* @__PURE__ */ jsx39(IconButton, {
1552
+ return /* @__PURE__ */ jsx40(IconButton, {
1550
1553
  type: "submit",
1551
1554
  disabled: isDisabled,
1552
- children: /* @__PURE__ */ jsx39(ArrowUpIcon, {})
1555
+ children: /* @__PURE__ */ jsx40(ArrowUpIcon, {})
1553
1556
  });
1554
1557
  };
1555
1558
  // src/components/threads/Thread/MessageForm/Root/index.tsx
@@ -2176,7 +2179,7 @@ var formOptions = {
2176
2179
  resolver: zodResolver(schema)
2177
2180
  };
2178
2181
  // src/components/threads/Thread/MessageForm/Root/index.tsx
2179
- import { jsx as jsx40 } from "react/jsx-runtime";
2182
+ import { jsx as jsx41 } from "react/jsx-runtime";
2180
2183
  var Root3 = function(param) {
2181
2184
  var children = param.children;
2182
2185
  var formProps = useForm(formOptions);
@@ -2248,16 +2251,16 @@ var Root3 = function(param) {
2248
2251
  latestMessage,
2249
2252
  isLoading
2250
2253
  ]);
2251
- return /* @__PURE__ */ jsx40(MessageFormContext.Provider, {
2254
+ return /* @__PURE__ */ jsx41(MessageFormContext.Provider, {
2252
2255
  value: {
2253
2256
  isDisabled: isDisabled,
2254
2257
  isLoading: isLoading
2255
2258
  },
2256
- children: /* @__PURE__ */ jsx40(FormProvider, _object_spread_props(_object_spread({}, formProps), {
2257
- children: /* @__PURE__ */ jsx40(Box12, {
2259
+ children: /* @__PURE__ */ jsx41(FormProvider, _object_spread_props(_object_spread({}, formProps), {
2260
+ children: /* @__PURE__ */ jsx41(Box12, {
2258
2261
  asChild: true,
2259
2262
  flexShrink: "0",
2260
- children: /* @__PURE__ */ jsx40("form", {
2263
+ children: /* @__PURE__ */ jsx41("form", {
2261
2264
  onSubmit: handleSubmit(onSubmit),
2262
2265
  children: children
2263
2266
  })
@@ -2271,15 +2274,15 @@ import { useContext as useContext10, useMemo as useMemo9, useRef as useRef4, use
2271
2274
  // src/components/textareas/TextareaBase/index.tsx
2272
2275
  import { forwardRef as forwardRef3 } from "react";
2273
2276
  import TextareaAutosize from "react-textarea-autosize";
2274
- 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";
2275
2278
  var UPSCALE_RATIO = 16 / 14;
2276
2279
  var TextareaBase = forwardRef3(function TextareaBase2(props, ref) {
2277
2280
  return /* @__PURE__ */ jsxs11(Fragment3, {
2278
2281
  children: [
2279
- /* @__PURE__ */ jsx41("style", {
2282
+ /* @__PURE__ */ jsx42("style", {
2280
2283
  children: ".superinterface-textarea { min-height: inherit; height: 30px; }\n.superinterface-textarea::placeholder { color: var(--gray-a10); }"
2281
2284
  }),
2282
- /* @__PURE__ */ jsx41(TextareaAutosize, _object_spread({
2285
+ /* @__PURE__ */ jsx42(TextareaAutosize, _object_spread({
2283
2286
  ref: ref,
2284
2287
  className: "rt-reset superinterface-textarea",
2285
2288
  style: {
@@ -2304,20 +2307,20 @@ var TextareaBase = forwardRef3(function TextareaBase2(props, ref) {
2304
2307
  // src/components/threads/Thread/MessageForm/Field/index.tsx
2305
2308
  import { useFormContext } from "react-hook-form";
2306
2309
  import { Container as Container2, Flex as Flex13 } from "@radix-ui/themes";
2307
- import { jsx as jsx42 } from "react/jsx-runtime";
2310
+ import { jsx as jsx43 } from "react/jsx-runtime";
2308
2311
  var Root4 = function(param) {
2309
2312
  var children = param.children;
2310
2313
  var _useFormContext = useFormContext(), errors = _useFormContext.formState.errors;
2311
- return /* @__PURE__ */ jsx42(Container2, {
2314
+ return /* @__PURE__ */ jsx43(Container2, {
2312
2315
  size: "2",
2313
2316
  flexGrow: "0",
2314
- children: /* @__PURE__ */ jsx42(Flex13, {
2317
+ children: /* @__PURE__ */ jsx43(Flex13, {
2315
2318
  direction: "column",
2316
2319
  flexShrink: "0",
2317
- children: /* @__PURE__ */ jsx42(Flex13, {
2320
+ children: /* @__PURE__ */ jsx43(Flex13, {
2318
2321
  direction: "column",
2319
2322
  flexShrink: "0",
2320
- children: /* @__PURE__ */ jsx42(Flex13, {
2323
+ children: /* @__PURE__ */ jsx43(Flex13, {
2321
2324
  style: _object_spread({
2322
2325
  borderRadius: "var(--radius-2)",
2323
2326
  borderWidth: "1px",
@@ -2357,7 +2360,7 @@ var Control = function() {
2357
2360
  isDisabledPrevious,
2358
2361
  textareaProps
2359
2362
  ]);
2360
- return /* @__PURE__ */ jsx42(TextareaBase, _object_spread_props(_object_spread({
2363
+ return /* @__PURE__ */ jsx43(TextareaBase, _object_spread_props(_object_spread({
2361
2364
  minRows: 1,
2362
2365
  placeholder: "Message ".concat(assistantNameContext, "..."),
2363
2366
  disabled: isDisabled,
@@ -2381,26 +2384,26 @@ var Field = {
2381
2384
  Control: Control
2382
2385
  };
2383
2386
  // src/components/threads/Thread/MessageForm/index.tsx
2384
- import { jsx as jsx43, jsxs as jsxs12 } from "react/jsx-runtime";
2387
+ import { jsx as jsx44, jsxs as jsxs12 } from "react/jsx-runtime";
2385
2388
  var MessageForm = function() {
2386
- return /* @__PURE__ */ jsx43(Root3, {
2389
+ return /* @__PURE__ */ jsx44(Root3, {
2387
2390
  children: /* @__PURE__ */ jsxs12(Field.Root, {
2388
2391
  children: [
2389
- /* @__PURE__ */ jsx43(Text5, {
2392
+ /* @__PURE__ */ jsx44(Text5, {
2390
2393
  size: "2",
2391
2394
  style: {
2392
2395
  flexGrow: 1
2393
2396
  },
2394
- children: /* @__PURE__ */ jsx43(Flex14, {
2397
+ children: /* @__PURE__ */ jsx44(Flex14, {
2395
2398
  flexGrow: "1",
2396
2399
  direction: "column",
2397
- children: /* @__PURE__ */ jsx43(Field.Control, {})
2400
+ children: /* @__PURE__ */ jsx44(Field.Control, {})
2398
2401
  })
2399
2402
  }),
2400
- /* @__PURE__ */ jsx43(Flex14, {
2403
+ /* @__PURE__ */ jsx44(Flex14, {
2401
2404
  flexShrink: "0",
2402
2405
  align: "end",
2403
- children: /* @__PURE__ */ jsx43(Submit, {})
2406
+ children: /* @__PURE__ */ jsx44(Submit, {})
2404
2407
  })
2405
2408
  ]
2406
2409
  })
@@ -2414,13 +2417,13 @@ import { Flex as Flex15 } from "@radix-ui/themes";
2414
2417
  // src/components/threads/Thread/Provider/index.tsx
2415
2418
  var Provider2 = SuperinterfaceProvider;
2416
2419
  // src/components/threads/Thread/Root/index.tsx
2417
- import { jsx as jsx44 } from "react/jsx-runtime";
2420
+ import { jsx as jsx45 } from "react/jsx-runtime";
2418
2421
  var Root5 = function(_param) {
2419
2422
  var children = _param.children, rest = _object_without_properties(_param, [
2420
2423
  "children"
2421
2424
  ]);
2422
- return /* @__PURE__ */ jsx44(Provider2, _object_spread_props(_object_spread({}, rest), {
2423
- children: /* @__PURE__ */ jsx44(Flex15, {
2425
+ return /* @__PURE__ */ jsx45(Provider2, _object_spread_props(_object_spread({}, rest), {
2426
+ children: /* @__PURE__ */ jsx45(Flex15, {
2424
2427
  direction: "column",
2425
2428
  flexGrow: "1",
2426
2429
  children: children
@@ -2428,12 +2431,12 @@ var Root5 = function(_param) {
2428
2431
  }));
2429
2432
  };
2430
2433
  // src/components/threads/Thread/index.tsx
2431
- import { jsx as jsx45, jsxs as jsxs13 } from "react/jsx-runtime";
2434
+ import { jsx as jsx46, jsxs as jsxs13 } from "react/jsx-runtime";
2432
2435
  var Thread = function(props) {
2433
2436
  return /* @__PURE__ */ jsxs13(Root5, _object_spread_props(_object_spread({}, props), {
2434
2437
  children: [
2435
- /* @__PURE__ */ jsx45(Messages, {}),
2436
- /* @__PURE__ */ jsx45(MessageForm, {})
2438
+ /* @__PURE__ */ jsx46(Messages, {}),
2439
+ /* @__PURE__ */ jsx46(MessageForm, {})
2437
2440
  ]
2438
2441
  }));
2439
2442
  };
@@ -2459,12 +2462,12 @@ var useThreadDialogContext = function() {
2459
2462
  return useContext12(ThreadDialogContext);
2460
2463
  };
2461
2464
  // src/components/threads/ThreadDialog/Provider/index.tsx
2462
- import { jsx as jsx46 } from "react/jsx-runtime";
2465
+ import { jsx as jsx47 } from "react/jsx-runtime";
2463
2466
  var Provider3 = function(param) {
2464
2467
  var children = param.children;
2465
2468
  var threadDialogContext = useThreadDialogContext();
2466
2469
  var _useState = _sliced_to_array(useState(threadDialogContext.isOpen), 2), isOpen = _useState[0], setIsOpen = _useState[1];
2467
- return /* @__PURE__ */ jsx46(ThreadDialogContext.Provider, {
2470
+ return /* @__PURE__ */ jsx47(ThreadDialogContext.Provider, {
2468
2471
  value: {
2469
2472
  isOpen: isOpen,
2470
2473
  setIsOpen: setIsOpen
@@ -2479,25 +2482,25 @@ import * as Toast2 from "@radix-ui/react-toast";
2479
2482
  import * as Toast from "@radix-ui/react-toast";
2480
2483
  import { Card, Text as Text6, Flex as Flex16 } from "@radix-ui/themes";
2481
2484
  import { CheckCircledIcon as CheckCircledIcon2, CrossCircledIcon } from "@radix-ui/react-icons";
2482
- import { jsx as jsx47, jsxs as jsxs14 } from "react/jsx-runtime";
2485
+ import { jsx as jsx48, jsxs as jsxs14 } from "react/jsx-runtime";
2483
2486
  var CustomToast = function(param) {
2484
2487
  var toast = param.toast;
2485
- return /* @__PURE__ */ jsx47(Toast.Root, {
2486
- children: /* @__PURE__ */ jsx47(Card, {
2487
- children: /* @__PURE__ */ jsx47(Toast.Title, {
2488
+ return /* @__PURE__ */ jsx48(Toast.Root, {
2489
+ children: /* @__PURE__ */ jsx48(Card, {
2490
+ children: /* @__PURE__ */ jsx48(Toast.Title, {
2488
2491
  children: /* @__PURE__ */ jsxs14(Flex16, {
2489
2492
  children: [
2490
- /* @__PURE__ */ jsx47(Flex16, {
2493
+ /* @__PURE__ */ jsx48(Flex16, {
2491
2494
  pr: "2",
2492
2495
  height: "14px",
2493
2496
  align: "center",
2494
- children: toast.type === "success" ? /* @__PURE__ */ jsx47(CheckCircledIcon2, {
2497
+ children: toast.type === "success" ? /* @__PURE__ */ jsx48(CheckCircledIcon2, {
2495
2498
  color: "var(--accent-9)"
2496
- }) : /* @__PURE__ */ jsx47(CrossCircledIcon, {
2499
+ }) : /* @__PURE__ */ jsx48(CrossCircledIcon, {
2497
2500
  color: "var(--red-9)"
2498
2501
  })
2499
2502
  }),
2500
- /* @__PURE__ */ jsx47(Text6, {
2503
+ /* @__PURE__ */ jsx48(Text6, {
2501
2504
  weight: "medium",
2502
2505
  size: "1",
2503
2506
  children: toast.message
@@ -2509,7 +2512,7 @@ var CustomToast = function(param) {
2509
2512
  });
2510
2513
  };
2511
2514
  // src/components/toasts/ToastsProvider/index.tsx
2512
- import { jsx as jsx48, jsxs as jsxs15 } from "react/jsx-runtime";
2515
+ import { jsx as jsx49, jsxs as jsxs15 } from "react/jsx-runtime";
2513
2516
  var ToastsProvider = function(param) {
2514
2517
  var children = param.children;
2515
2518
  var _useState2 = _sliced_to_array(useState2([]), 2), toasts = _useState2[0], setToasts = _useState2[1];
@@ -2520,7 +2523,7 @@ var ToastsProvider = function(param) {
2520
2523
  ]);
2521
2524
  });
2522
2525
  }, []);
2523
- return /* @__PURE__ */ jsx48(ToastsContext.Provider, {
2526
+ return /* @__PURE__ */ jsx49(ToastsContext.Provider, {
2524
2527
  value: {
2525
2528
  toasts: toasts,
2526
2529
  addToast: addToast
@@ -2529,11 +2532,11 @@ var ToastsProvider = function(param) {
2529
2532
  children: [
2530
2533
  children,
2531
2534
  Array.from(toasts).map(function(toast, index) {
2532
- return /* @__PURE__ */ jsx48(CustomToast, {
2535
+ return /* @__PURE__ */ jsx49(CustomToast, {
2533
2536
  toast: toast
2534
2537
  }, index);
2535
2538
  }),
2536
- /* @__PURE__ */ jsx48(Toast2.Viewport, {
2539
+ /* @__PURE__ */ jsx49(Toast2.Viewport, {
2537
2540
  style: {
2538
2541
  position: "absolute",
2539
2542
  bottom: 0,
@@ -2555,22 +2558,22 @@ var ToastsProvider = function(param) {
2555
2558
  });
2556
2559
  };
2557
2560
  // src/components/threads/ThreadDialog/Root/index.tsx
2558
- import { jsx as jsx49 } from "react/jsx-runtime";
2561
+ import { jsx as jsx50 } from "react/jsx-runtime";
2559
2562
  var Root7 = function(param) {
2560
2563
  var children = param.children;
2561
- return /* @__PURE__ */ jsx49(ToastsProvider, {
2562
- children: /* @__PURE__ */ jsx49(Provider3, {
2564
+ return /* @__PURE__ */ jsx50(ToastsProvider, {
2565
+ children: /* @__PURE__ */ jsx50(Provider3, {
2563
2566
  children: children
2564
2567
  })
2565
2568
  });
2566
2569
  };
2567
2570
  // src/components/threads/ThreadDialog/Trigger/index.tsx
2568
2571
  import { Flex as Flex17 } from "@radix-ui/themes";
2569
- import { jsx as jsx50 } from "react/jsx-runtime";
2572
+ import { jsx as jsx51 } from "react/jsx-runtime";
2570
2573
  var Trigger = function(param) {
2571
2574
  var children = param.children, _param_style = param.style, style = _param_style === void 0 ? {} : _param_style;
2572
2575
  var _useThreadDialogContext = useThreadDialogContext(), setIsOpen = _useThreadDialogContext.setIsOpen, isOpen = _useThreadDialogContext.isOpen;
2573
- return /* @__PURE__ */ jsx50(Flex17, {
2576
+ return /* @__PURE__ */ jsx51(Flex17, {
2574
2577
  display: {
2575
2578
  initial: isOpen ? "none" : "flex",
2576
2579
  sm: "flex"
@@ -2596,12 +2599,12 @@ var Trigger = function(param) {
2596
2599
  // src/components/threads/ThreadDialog/Button/index.tsx
2597
2600
  import { IconButton as IconButton2 } from "@radix-ui/themes";
2598
2601
  import { ChatBubbleIcon } from "@radix-ui/react-icons";
2599
- import { jsx as jsx51 } from "react/jsx-runtime";
2602
+ import { jsx as jsx52 } from "react/jsx-runtime";
2600
2603
  var Button2 = function() {
2601
- return /* @__PURE__ */ jsx51(IconButton2, {
2604
+ return /* @__PURE__ */ jsx52(IconButton2, {
2602
2605
  size: "4",
2603
2606
  radius: "full",
2604
- children: /* @__PURE__ */ jsx51(ChatBubbleIcon, {})
2607
+ children: /* @__PURE__ */ jsx52(ChatBubbleIcon, {})
2605
2608
  });
2606
2609
  };
2607
2610
  // src/components/threads/ThreadDialog/Content/index.tsx
@@ -2609,10 +2612,10 @@ import { Card as Card2, Inset, Flex as Flex19 } from "@radix-ui/themes";
2609
2612
  // src/components/threads/ThreadDialog/Close/index.tsx
2610
2613
  import { Cross1Icon } from "@radix-ui/react-icons";
2611
2614
  import { IconButton as IconButton3, Flex as Flex18 } from "@radix-ui/themes";
2612
- import { jsx as jsx52 } from "react/jsx-runtime";
2615
+ import { jsx as jsx53 } from "react/jsx-runtime";
2613
2616
  var Close = function() {
2614
2617
  var _useThreadDialogContext = useThreadDialogContext(), setIsOpen = _useThreadDialogContext.setIsOpen, isOpen = _useThreadDialogContext.isOpen;
2615
- return /* @__PURE__ */ jsx52(Flex18, {
2618
+ return /* @__PURE__ */ jsx53(Flex18, {
2616
2619
  display: {
2617
2620
  initial: isOpen ? "flex" : "none",
2618
2621
  sm: "none"
@@ -2632,20 +2635,20 @@ var Close = function() {
2632
2635
  style: {
2633
2636
  zIndex: 9999999999
2634
2637
  },
2635
- children: /* @__PURE__ */ jsx52(IconButton3, {
2638
+ children: /* @__PURE__ */ jsx53(IconButton3, {
2636
2639
  size: "2",
2637
2640
  variant: "soft",
2638
- children: /* @__PURE__ */ jsx52(Cross1Icon, {})
2641
+ children: /* @__PURE__ */ jsx53(Cross1Icon, {})
2639
2642
  })
2640
2643
  });
2641
2644
  };
2642
2645
  // src/components/threads/ThreadDialog/Content/index.tsx
2643
- import { jsx as jsx53, jsxs as jsxs16 } from "react/jsx-runtime";
2646
+ import { jsx as jsx54, jsxs as jsxs16 } from "react/jsx-runtime";
2644
2647
  var Root8 = function(param) {
2645
2648
  var children = param.children, _param_style = param.style, style = _param_style === void 0 ? {} : _param_style;
2646
2649
  var isOpen = useThreadDialogContext().isOpen;
2647
2650
  if (!isOpen) return null;
2648
- return /* @__PURE__ */ jsx53(Flex19, {
2651
+ return /* @__PURE__ */ jsx54(Flex19, {
2649
2652
  direction: "column",
2650
2653
  justify: "end",
2651
2654
  position: "fixed",
@@ -2684,7 +2687,7 @@ var Root8 = function(param) {
2684
2687
  flexGrow: 1
2685
2688
  },
2686
2689
  children: [
2687
- /* @__PURE__ */ jsx53(Inset, {
2690
+ /* @__PURE__ */ jsx54(Inset, {
2688
2691
  clip: "padding-box",
2689
2692
  side: "all",
2690
2693
  pb: "current",
@@ -2694,31 +2697,31 @@ var Root8 = function(param) {
2694
2697
  },
2695
2698
  children: children
2696
2699
  }),
2697
- /* @__PURE__ */ jsx53(Close, {})
2700
+ /* @__PURE__ */ jsx54(Close, {})
2698
2701
  ]
2699
2702
  })
2700
2703
  });
2701
2704
  };
2702
2705
  var Content4 = function(param) {
2703
2706
  var _param_style = param.style, style = _param_style === void 0 ? {} : _param_style;
2704
- return /* @__PURE__ */ jsx53(Root8, {
2707
+ return /* @__PURE__ */ jsx54(Root8, {
2705
2708
  style: style,
2706
2709
  children: /* @__PURE__ */ jsxs16(Thread.Root, {
2707
2710
  children: [
2708
- /* @__PURE__ */ jsx53(Thread.Messages, {
2711
+ /* @__PURE__ */ jsx54(Thread.Messages, {
2709
2712
  style: {
2710
2713
  paddingTop: "var(--space-5)",
2711
2714
  paddingRight: "var(--space-5)",
2712
2715
  paddingLeft: "var(--space-5)"
2713
2716
  }
2714
2717
  }),
2715
- /* @__PURE__ */ jsx53(Flex19, {
2718
+ /* @__PURE__ */ jsx54(Flex19, {
2716
2719
  direction: "column",
2717
2720
  pl: "5",
2718
2721
  pr: "5",
2719
2722
  pb: "3",
2720
2723
  flexShrink: "0",
2721
- children: /* @__PURE__ */ jsx53(Thread.MessageForm, {})
2724
+ children: /* @__PURE__ */ jsx54(Thread.MessageForm, {})
2722
2725
  })
2723
2726
  ]
2724
2727
  })
@@ -2726,13 +2729,13 @@ var Content4 = function(param) {
2726
2729
  };
2727
2730
  Content4.Root = Root8;
2728
2731
  // src/components/threads/ThreadDialog/index.tsx
2729
- import { jsx as jsx54, jsxs as jsxs17 } from "react/jsx-runtime";
2732
+ import { jsx as jsx55, jsxs as jsxs17 } from "react/jsx-runtime";
2730
2733
  var ThreadDialog = function() {
2731
2734
  return /* @__PURE__ */ jsxs17(Root7, {
2732
2735
  children: [
2733
- /* @__PURE__ */ jsx54(Content4, {}),
2734
- /* @__PURE__ */ jsx54(Trigger, {
2735
- children: /* @__PURE__ */ jsx54(Button2, {})
2736
+ /* @__PURE__ */ jsx55(Content4, {}),
2737
+ /* @__PURE__ */ jsx55(Trigger, {
2738
+ children: /* @__PURE__ */ jsx55(Button2, {})
2736
2739
  })
2737
2740
  ]
2738
2741
  });
@@ -3180,7 +3183,7 @@ var useMessageAudio = function(param) {
3180
3183
  });
3181
3184
  };
3182
3185
  // src/components/threads/AudioThread/Root/index.tsx
3183
- import { jsx as jsx55 } from "react/jsx-runtime";
3186
+ import { jsx as jsx56 } from "react/jsx-runtime";
3184
3187
  var Root9 = function(param) {
3185
3188
  var children = param.children;
3186
3189
  var createMessageProps = useCreateMessage();
@@ -3238,13 +3241,13 @@ var Root9 = function(param) {
3238
3241
  createMessageProps: createMessageProps,
3239
3242
  messageAudioProps: messageAudioProps
3240
3243
  }).status;
3241
- return /* @__PURE__ */ jsx55(AudioThreadContext.Provider, {
3244
+ return /* @__PURE__ */ jsx56(AudioThreadContext.Provider, {
3242
3245
  value: {
3243
3246
  status: status,
3244
3247
  recorderProps: recorderProps,
3245
3248
  messageAudioProps: messageAudioProps
3246
3249
  },
3247
- children: /* @__PURE__ */ jsx55(Flex20, {
3250
+ children: /* @__PURE__ */ jsx56(Flex20, {
3248
3251
  direction: "column",
3249
3252
  flexGrow: "1",
3250
3253
  p: "9",
@@ -3266,7 +3269,7 @@ import _8 from "lodash";
3266
3269
  import { Flex as Flex21, Grid } from "@radix-ui/themes";
3267
3270
  import { useState as useState5, useEffect as useEffect6, useCallback as useCallback4 } from "react";
3268
3271
  import { cluster } from "radash";
3269
- import { jsx as jsx56 } from "react/jsx-runtime";
3272
+ import { jsx as jsx57 } from "react/jsx-runtime";
3270
3273
  var barCount = 4;
3271
3274
  var BarsVisualizer = function(param) {
3272
3275
  var visualizationAnalyser = param.visualizationAnalyser, backgroundColor = param.backgroundColor, height = param.height, barWidth = param.barWidth;
@@ -3297,7 +3300,7 @@ var BarsVisualizer = function(param) {
3297
3300
  draw,
3298
3301
  visualizationAnalyser
3299
3302
  ]);
3300
- return /* @__PURE__ */ jsx56(Grid, {
3303
+ return /* @__PURE__ */ jsx57(Grid, {
3301
3304
  columns: "".concat(barCount),
3302
3305
  gap: "1",
3303
3306
  width: "auto",
@@ -3306,12 +3309,12 @@ var BarsVisualizer = function(param) {
3306
3309
  gridTemplateColumns: "repeat(4, minmax(0, 1fr))"
3307
3310
  },
3308
3311
  children: barHeights.map(function(barHeight, index) {
3309
- return /* @__PURE__ */ jsx56(Flex21, {
3312
+ return /* @__PURE__ */ jsx57(Flex21, {
3310
3313
  direction: "column",
3311
3314
  align: "center",
3312
3315
  justify: "center",
3313
3316
  height: height,
3314
- children: /* @__PURE__ */ jsx56(Flex21, {
3317
+ children: /* @__PURE__ */ jsx57(Flex21, {
3315
3318
  minHeight: "50%",
3316
3319
  maxHeight: "100%",
3317
3320
  height: "".concat(barHeight + 20, "%"),
@@ -3326,7 +3329,7 @@ var BarsVisualizer = function(param) {
3326
3329
  });
3327
3330
  };
3328
3331
  // src/components/threads/AudioThread/Visualization/index.tsx
3329
- import { jsx as jsx57, jsxs as jsxs18 } from "react/jsx-runtime";
3332
+ import { jsx as jsx58, jsxs as jsxs18 } from "react/jsx-runtime";
3330
3333
  var Visualization = function() {
3331
3334
  var audioThreadContext = useAudioThreadContext();
3332
3335
  var assistantNameContext = useContext14(AssistantNameContext);
@@ -3361,7 +3364,7 @@ var Visualization = function() {
3361
3364
  mb: "3",
3362
3365
  flexGrow: "1",
3363
3366
  children: [
3364
- /* @__PURE__ */ jsx57(Flex22, {
3367
+ /* @__PURE__ */ jsx58(Flex22, {
3365
3368
  align: "center",
3366
3369
  justify: "center",
3367
3370
  height: "200px",
@@ -3371,7 +3374,7 @@ var Visualization = function() {
3371
3374
  borderRadius: "9999px",
3372
3375
  scale: scale
3373
3376
  },
3374
- children: /* @__PURE__ */ jsx57(BarsVisualizer, {
3377
+ children: /* @__PURE__ */ jsx58(BarsVisualizer, {
3375
3378
  visualizationAnalyser: audioThreadContext.messageAudioProps.visualizationAnalyser,
3376
3379
  backgroundColor: audioThreadContext.status === "playing" ? "var(--accent-11)" : "var(--gray-11)",
3377
3380
  height: "40px",
@@ -3383,8 +3386,8 @@ var Visualization = function() {
3383
3386
  gap: "3",
3384
3387
  pt: "5",
3385
3388
  children: [
3386
- /* @__PURE__ */ jsx57(AssistantAvatar, {}),
3387
- /* @__PURE__ */ jsx57(Name, {
3389
+ /* @__PURE__ */ jsx58(AssistantAvatar, {}),
3390
+ /* @__PURE__ */ jsx58(Name, {
3388
3391
  children: assistantNameContext
3389
3392
  })
3390
3393
  ]
@@ -3394,7 +3397,7 @@ var Visualization = function() {
3394
3397
  };
3395
3398
  // src/components/threads/AudioThread/Status/StatusMessages.tsx
3396
3399
  import { Flex as Flex23, Text as Text7 } from "@radix-ui/themes";
3397
- import { jsx as jsx58, jsxs as jsxs19 } from "react/jsx-runtime";
3400
+ import { jsx as jsx59, jsxs as jsxs19 } from "react/jsx-runtime";
3398
3401
  var html = function(param) {
3399
3402
  var texts = param.texts;
3400
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) {
@@ -3407,13 +3410,13 @@ var StatusMessages = function(param) {
3407
3410
  justify: "center",
3408
3411
  pb: "5",
3409
3412
  children: [
3410
- /* @__PURE__ */ jsx58(Text7, {
3413
+ /* @__PURE__ */ jsx59(Text7, {
3411
3414
  size: "2",
3412
3415
  weight: "regular",
3413
3416
  color: "gray",
3414
3417
  className: "status-messages-texts"
3415
3418
  }),
3416
- /* @__PURE__ */ jsx58("style", {
3419
+ /* @__PURE__ */ jsx59("style", {
3417
3420
  dangerouslySetInnerHTML: {
3418
3421
  __html: html({
3419
3422
  texts: texts
@@ -3424,11 +3427,11 @@ var StatusMessages = function(param) {
3424
3427
  });
3425
3428
  };
3426
3429
  // src/components/threads/AudioThread/Status/index.tsx
3427
- import { jsx as jsx59 } from "react/jsx-runtime";
3430
+ import { jsx as jsx60 } from "react/jsx-runtime";
3428
3431
  var Status = function() {
3429
3432
  var audioThreadContext = useAudioThreadContext();
3430
3433
  if (audioThreadContext.status === "recording") {
3431
- return /* @__PURE__ */ jsx59(StatusMessages, {
3434
+ return /* @__PURE__ */ jsx60(StatusMessages, {
3432
3435
  texts: [
3433
3436
  "Start speaking",
3434
3437
  "Listening",
@@ -3442,20 +3445,20 @@ var Status = function() {
3442
3445
  "idle",
3443
3446
  "playerPaused"
3444
3447
  ].includes(audioThreadContext.status)) {
3445
- return /* @__PURE__ */ jsx59(StatusMessages, {
3448
+ return /* @__PURE__ */ jsx60(StatusMessages, {
3446
3449
  texts: [
3447
3450
  "Click the button below to activate"
3448
3451
  ]
3449
3452
  });
3450
3453
  }
3451
3454
  if (audioThreadContext.status === "playing") {
3452
- return /* @__PURE__ */ jsx59(StatusMessages, {
3455
+ return /* @__PURE__ */ jsx60(StatusMessages, {
3453
3456
  texts: [
3454
3457
  "Click the button below to interrupt"
3455
3458
  ]
3456
3459
  });
3457
3460
  }
3458
- return /* @__PURE__ */ jsx59(StatusMessages, {
3461
+ return /* @__PURE__ */ jsx60(StatusMessages, {
3459
3462
  texts: [
3460
3463
  "Thinking"
3461
3464
  ]
@@ -3464,9 +3467,9 @@ var Status = function() {
3464
3467
  // src/components/threads/AudioThread/Form/index.tsx
3465
3468
  import { Flex as Flex25 } from "@radix-ui/themes";
3466
3469
  // src/components/threads/AudioThread/Form/MicIcon.tsx
3467
- import { jsx as jsx60 } from "react/jsx-runtime";
3470
+ import { jsx as jsx61 } from "react/jsx-runtime";
3468
3471
  var MicIcon = function(props) {
3469
- return /* @__PURE__ */ jsx60("svg", _object_spread_props(_object_spread({
3472
+ return /* @__PURE__ */ jsx61("svg", _object_spread_props(_object_spread({
3470
3473
  xmlns: "http://www.w3.org/2000/svg",
3471
3474
  fill: "currentColor",
3472
3475
  stroke: "currentColor",
@@ -3475,7 +3478,7 @@ var MicIcon = function(props) {
3475
3478
  height: "15",
3476
3479
  width: "15"
3477
3480
  }, props), {
3478
- children: /* @__PURE__ */ jsx60("path", {
3481
+ children: /* @__PURE__ */ jsx61("path", {
3479
3482
  stroke: "none",
3480
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"
3481
3484
  })
@@ -3484,7 +3487,7 @@ var MicIcon = function(props) {
3484
3487
  // src/components/threads/AudioThread/Form/ActionButton/index.tsx
3485
3488
  import { Flex as Flex24, IconButton as IconButton4 } from "@radix-ui/themes";
3486
3489
  import { StopIcon as StopIcon2, PauseIcon, ArrowUpIcon as ArrowUpIcon2, ResumeIcon } from "@radix-ui/react-icons";
3487
- import { jsx as jsx61, jsxs as jsxs20 } from "react/jsx-runtime";
3490
+ import { jsx as jsx62, jsxs as jsxs20 } from "react/jsx-runtime";
3488
3491
  var ActionButton = function() {
3489
3492
  var audioThreadContext = useAudioThreadContext();
3490
3493
  var superinterfaceContext = useSuperinterfaceContext();
@@ -3492,37 +3495,37 @@ var ActionButton = function() {
3492
3495
  return /* @__PURE__ */ jsxs20(Flex24, {
3493
3496
  align: "center",
3494
3497
  children: [
3495
- /* @__PURE__ */ jsx61(Flex24, {
3498
+ /* @__PURE__ */ jsx62(Flex24, {
3496
3499
  mr: "3",
3497
3500
  ml: "-7",
3498
- children: /* @__PURE__ */ jsx61(IconButton4, {
3501
+ children: /* @__PURE__ */ jsx62(IconButton4, {
3499
3502
  onClick: audioThreadContext.recorderProps.pause,
3500
3503
  color: "gray",
3501
3504
  variant: "soft",
3502
3505
  size: "1",
3503
- children: /* @__PURE__ */ jsx61(PauseIcon, {})
3506
+ children: /* @__PURE__ */ jsx62(PauseIcon, {})
3504
3507
  })
3505
3508
  }),
3506
- /* @__PURE__ */ jsx61(IconButton4, {
3509
+ /* @__PURE__ */ jsx62(IconButton4, {
3507
3510
  onClick: audioThreadContext.recorderProps.stop,
3508
3511
  highContrast: true,
3509
3512
  variant: "soft",
3510
3513
  size: "4",
3511
- children: /* @__PURE__ */ jsx61(ArrowUpIcon2, {})
3514
+ children: /* @__PURE__ */ jsx62(ArrowUpIcon2, {})
3512
3515
  })
3513
3516
  ]
3514
3517
  });
3515
3518
  }
3516
3519
  if (audioThreadContext.status === "recorderPaused") {
3517
- return /* @__PURE__ */ jsx61(IconButton4, {
3520
+ return /* @__PURE__ */ jsx62(IconButton4, {
3518
3521
  onClick: audioThreadContext.recorderProps.resume,
3519
3522
  color: "red",
3520
3523
  size: "4",
3521
- children: /* @__PURE__ */ jsx61(ResumeIcon, {})
3524
+ children: /* @__PURE__ */ jsx62(ResumeIcon, {})
3522
3525
  });
3523
3526
  }
3524
3527
  if (audioThreadContext.status === "idle") {
3525
- return /* @__PURE__ */ jsx61(IconButton4, {
3528
+ return /* @__PURE__ */ jsx62(IconButton4, {
3526
3529
  onClick: function() {
3527
3530
  return audioThreadContext.recorderProps.start();
3528
3531
  },
@@ -3531,7 +3534,7 @@ var ActionButton = function() {
3531
3534
  });
3532
3535
  }
3533
3536
  if (audioThreadContext.status === "playing") {
3534
- return /* @__PURE__ */ jsx61(IconButton4, {
3537
+ return /* @__PURE__ */ jsx62(IconButton4, {
3535
3538
  onClick: function() {
3536
3539
  var _superinterfaceContext_createMessageAbortControllerRef_current;
3537
3540
  audioThreadContext.messageAudioProps.stop();
@@ -3541,26 +3544,26 @@ var ActionButton = function() {
3541
3544
  size: "4",
3542
3545
  color: "gray",
3543
3546
  variant: "soft",
3544
- children: /* @__PURE__ */ jsx61(StopIcon2, {})
3547
+ children: /* @__PURE__ */ jsx62(StopIcon2, {})
3545
3548
  });
3546
3549
  }
3547
3550
  if (audioThreadContext.status === "playerPaused") {
3548
- return /* @__PURE__ */ jsx61(IconButton4, {
3551
+ return /* @__PURE__ */ jsx62(IconButton4, {
3549
3552
  onClick: function() {
3550
3553
  return audioThreadContext.messageAudioProps.play();
3551
3554
  },
3552
3555
  size: "4",
3553
- children: /* @__PURE__ */ jsx61(ResumeIcon, {})
3556
+ children: /* @__PURE__ */ jsx62(ResumeIcon, {})
3554
3557
  });
3555
3558
  }
3556
- return /* @__PURE__ */ jsx61(IconButton4, {
3559
+ return /* @__PURE__ */ jsx62(IconButton4, {
3557
3560
  size: "4",
3558
3561
  variant: "soft",
3559
3562
  disabled: true
3560
3563
  });
3561
3564
  };
3562
3565
  // src/components/threads/AudioThread/Form/index.tsx
3563
- import { jsx as jsx62, jsxs as jsxs21 } from "react/jsx-runtime";
3566
+ import { jsx as jsx63, jsxs as jsxs21 } from "react/jsx-runtime";
3564
3567
  var Form = function() {
3565
3568
  var audioThreadContext = useAudioThreadContext();
3566
3569
  return /* @__PURE__ */ jsxs21(Flex25, {
@@ -3571,24 +3574,24 @@ var Form = function() {
3571
3574
  pb: "3",
3572
3575
  align: "center",
3573
3576
  children: [
3574
- /* @__PURE__ */ jsx62(Flex25, {
3577
+ /* @__PURE__ */ jsx63(Flex25, {
3575
3578
  ml: "-22.5px",
3576
3579
  mr: "2",
3577
3580
  align: "center",
3578
- children: /* @__PURE__ */ jsx62(MicIcon, {
3581
+ children: /* @__PURE__ */ jsx63(MicIcon, {
3579
3582
  style: {
3580
3583
  color: audioThreadContext.status === "recording" ? "var(--accent-11)" : "var(--gray-11)"
3581
3584
  }
3582
3585
  })
3583
3586
  }),
3584
- /* @__PURE__ */ jsx62(Flex25, {
3587
+ /* @__PURE__ */ jsx63(Flex25, {
3585
3588
  px: "2",
3586
3589
  py: "1",
3587
3590
  style: {
3588
3591
  backgroundColor: audioThreadContext.status === "recording" ? "var(--accent-4)" : "var(--gray-4)",
3589
3592
  borderRadius: "var(--radius-6)"
3590
3593
  },
3591
- children: /* @__PURE__ */ jsx62(BarsVisualizer, {
3594
+ children: /* @__PURE__ */ jsx63(BarsVisualizer, {
3592
3595
  visualizationAnalyser: audioThreadContext.recorderProps.visualizationAnalyser,
3593
3596
  backgroundColor: audioThreadContext.status === "recording" ? "var(--accent-11)" : "var(--gray-11)",
3594
3597
  height: "20px",
@@ -3597,18 +3600,18 @@ var Form = function() {
3597
3600
  })
3598
3601
  ]
3599
3602
  }),
3600
- /* @__PURE__ */ jsx62(ActionButton, {})
3603
+ /* @__PURE__ */ jsx63(ActionButton, {})
3601
3604
  ]
3602
3605
  });
3603
3606
  };
3604
3607
  // src/components/threads/AudioThread/index.tsx
3605
- import { jsx as jsx63, jsxs as jsxs22 } from "react/jsx-runtime";
3608
+ import { jsx as jsx64, jsxs as jsxs22 } from "react/jsx-runtime";
3606
3609
  var AudioThread = function(props) {
3607
3610
  return /* @__PURE__ */ jsxs22(Root9, _object_spread_props(_object_spread({}, props), {
3608
3611
  children: [
3609
- /* @__PURE__ */ jsx63(Visualization, {}),
3610
- /* @__PURE__ */ jsx63(Status, {}),
3611
- /* @__PURE__ */ jsx63(Form, {})
3612
+ /* @__PURE__ */ jsx64(Visualization, {}),
3613
+ /* @__PURE__ */ jsx64(Status, {}),
3614
+ /* @__PURE__ */ jsx64(Form, {})
3612
3615
  ]
3613
3616
  }));
3614
3617
  };
@@ -3616,15 +3619,15 @@ AudioThread.Root = Root9;
3616
3619
  AudioThread.Visualization = Visualization;
3617
3620
  AudioThread.Form = Form;
3618
3621
  // src/components/threads/AudioThreadDialog/index.tsx
3619
- import { jsx as jsx64, jsxs as jsxs23 } from "react/jsx-runtime";
3622
+ import { jsx as jsx65, jsxs as jsxs23 } from "react/jsx-runtime";
3620
3623
  var AudioThreadDialog = function() {
3621
3624
  return /* @__PURE__ */ jsxs23(Root7, {
3622
3625
  children: [
3623
- /* @__PURE__ */ jsx64(Content4.Root, {
3624
- children: /* @__PURE__ */ jsx64(AudioThread, {})
3626
+ /* @__PURE__ */ jsx65(Content4.Root, {
3627
+ children: /* @__PURE__ */ jsx65(AudioThread, {})
3625
3628
  }),
3626
- /* @__PURE__ */ jsx64(Trigger, {
3627
- children: /* @__PURE__ */ jsx64(Button2, {})
3629
+ /* @__PURE__ */ jsx65(Trigger, {
3630
+ children: /* @__PURE__ */ jsx65(Button2, {})
3628
3631
  })
3629
3632
  ]
3630
3633
  });
@@ -3643,11 +3646,11 @@ import { Flex as Flex26 } from "@radix-ui/themes";
3643
3646
  // src/components/suggestions/Suggestions/Item.tsx
3644
3647
  import { ArrowUpIcon as ArrowUpIcon3 } from "@radix-ui/react-icons";
3645
3648
  import { Text as Text8, Button as Button3, Spinner } from "@radix-ui/themes";
3646
- import { jsx as jsx65, jsxs as jsxs24 } from "react/jsx-runtime";
3649
+ import { jsx as jsx66, jsxs as jsxs24 } from "react/jsx-runtime";
3647
3650
  var Item = function(param) {
3648
3651
  var suggestion = param.suggestion, isDisabled = param.isDisabled;
3649
3652
  var _useCreateMessage = useCreateMessage(), createMessage = _useCreateMessage.createMessage, isPending = _useCreateMessage.isPending;
3650
- return /* @__PURE__ */ jsx65(Content5, {
3653
+ return /* @__PURE__ */ jsx66(Content5, {
3651
3654
  onClick: function() {
3652
3655
  createMessage({
3653
3656
  // @ts-ignore-next-line
@@ -3671,14 +3674,14 @@ var Content5 = function(param) {
3671
3674
  flexShrink: 1
3672
3675
  },
3673
3676
  children: [
3674
- /* @__PURE__ */ jsx65(Text8, {
3677
+ /* @__PURE__ */ jsx66(Text8, {
3675
3678
  size: "1",
3676
3679
  weight: "regular",
3677
3680
  children: children
3678
3681
  }),
3679
- /* @__PURE__ */ jsx65(Spinner, {
3682
+ /* @__PURE__ */ jsx66(Spinner, {
3680
3683
  loading: isPending,
3681
- children: /* @__PURE__ */ jsx65(ArrowUpIcon3, {
3684
+ children: /* @__PURE__ */ jsx66(ArrowUpIcon3, {
3682
3685
  style: {
3683
3686
  flexShrink: 0
3684
3687
  }
@@ -3689,7 +3692,7 @@ var Content5 = function(param) {
3689
3692
  };
3690
3693
  Item.Content = Content5;
3691
3694
  // src/components/suggestions/Suggestions/Content.tsx
3692
- import { jsx as jsx66 } from "react/jsx-runtime";
3695
+ import { jsx as jsx67 } from "react/jsx-runtime";
3693
3696
  var Content6 = function(param) {
3694
3697
  var children = param.children;
3695
3698
  var isMutatingMessage = useIsMutatingMessage();
@@ -3703,12 +3706,12 @@ var Content6 = function(param) {
3703
3706
  children
3704
3707
  ]);
3705
3708
  if (isEmpty2(suggestions)) return null;
3706
- return /* @__PURE__ */ jsx66(Flex26, {
3709
+ return /* @__PURE__ */ jsx67(Flex26, {
3707
3710
  gap: "2",
3708
3711
  py: "2",
3709
3712
  wrap: "wrap",
3710
3713
  children: suggestions.map(function(suggestion) {
3711
- return /* @__PURE__ */ jsx66(Item, {
3714
+ return /* @__PURE__ */ jsx67(Item, {
3712
3715
  suggestion: suggestion,
3713
3716
  isDisabled: isMutatingMessage
3714
3717
  }, suggestion);
@@ -3716,7 +3719,7 @@ var Content6 = function(param) {
3716
3719
  });
3717
3720
  };
3718
3721
  // src/components/suggestions/Suggestions/index.tsx
3719
- import { jsx as jsx67 } from "react/jsx-runtime";
3722
+ import { jsx as jsx68 } from "react/jsx-runtime";
3720
3723
  var Suggestions = function(param) {
3721
3724
  var children = param.children;
3722
3725
  var latestMessageProps = useLatestMessage();
@@ -3729,14 +3732,14 @@ var Suggestions = function(param) {
3729
3732
  ]);
3730
3733
  if (latestMessageProps.isLoading) return null;
3731
3734
  if (isDisabled) return null;
3732
- return /* @__PURE__ */ jsx67(Content6, {
3735
+ return /* @__PURE__ */ jsx68(Content6, {
3733
3736
  children: children
3734
3737
  });
3735
3738
  };
3736
3739
  Suggestions.Item = Item;
3737
3740
  // src/components/markdown/MarkdownProvider/index.tsx
3738
3741
  import { useMemo as useMemo15 } from "react";
3739
- import { jsx as jsx68 } from "react/jsx-runtime";
3742
+ import { jsx as jsx69 } from "react/jsx-runtime";
3740
3743
  var MarkdownProvider = function(_param) {
3741
3744
  var children = _param.children, rest = _object_without_properties(_param, [
3742
3745
  "children"
@@ -3748,7 +3751,7 @@ var MarkdownProvider = function(_param) {
3748
3751
  rest,
3749
3752
  prevMarkdownContext
3750
3753
  ]);
3751
- return /* @__PURE__ */ jsx68(MarkdownContext.Provider, {
3754
+ return /* @__PURE__ */ jsx69(MarkdownContext.Provider, {
3752
3755
  value: value,
3753
3756
  children: children
3754
3757
  });
@@ -3761,7 +3764,7 @@ var useComponents = function() {
3761
3764
  return useContext15(ComponentsContext);
3762
3765
  };
3763
3766
  // src/components/components/ComponentsProvider.tsx
3764
- import { jsx as jsx69 } from "react/jsx-runtime";
3767
+ import { jsx as jsx70 } from "react/jsx-runtime";
3765
3768
  var ComponentsProvider = function(_param) {
3766
3769
  var children = _param.children, rest = _object_without_properties(_param, [
3767
3770
  "children"
@@ -3773,7 +3776,7 @@ var ComponentsProvider = function(_param) {
3773
3776
  rest,
3774
3777
  prevComponents
3775
3778
  ]);
3776
- return /* @__PURE__ */ jsx69(ComponentsContext.Provider, {
3779
+ return /* @__PURE__ */ jsx70(ComponentsContext.Provider, {
3777
3780
  value: value,
3778
3781
  children: children
3779
3782
  });