@superinterface/react 3.6.3 → 3.7.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -435,7 +435,7 @@ var SuperinterfaceProvider = function(_ref) {
435
435
  // src/components/threads/Thread/Messages/index.tsx
436
436
  import { Flex as Flex18 } from "@radix-ui/themes";
437
437
  // src/components/threads/Thread/Message/index.tsx
438
- import { c as _c26 } from "react-compiler-runtime";
438
+ import { c as _c25 } from "react-compiler-runtime";
439
439
  import { useMemo as useMemo10 } from "react";
440
440
  import { isEmpty as isEmpty2 } from "radash";
441
441
  import { Box as Box9 } from "@radix-ui/themes";
@@ -1120,9 +1120,9 @@ var Attachments = function(t0) {
1120
1120
  return t3;
1121
1121
  };
1122
1122
  // src/components/threads/Thread/Message/ContentPart/index.tsx
1123
- import { c as _c25 } from "react-compiler-runtime";
1123
+ import { c as _c24 } from "react-compiler-runtime";
1124
1124
  // src/components/threads/Thread/Message/ContentPart/TextContent.tsx
1125
- import { c as _c23 } from "react-compiler-runtime";
1125
+ import { c as _c22 } from "react-compiler-runtime";
1126
1126
  import React, { useState as useState3, useEffect as useEffect2, useMemo as useMemo9 } from "react";
1127
1127
  import { Badge as Badge2 } from "@radix-ui/themes";
1128
1128
  import { compile } from "@mdx-js/mdx";
@@ -1371,10 +1371,10 @@ var Pre = function(_ref) {
1371
1371
  });
1372
1372
  };
1373
1373
  // src/contexts/markdown/MarkdownContext/lib/components/Code.tsx
1374
- import { c as _c15 } from "react-compiler-runtime";
1374
+ import { c as _c14 } from "react-compiler-runtime";
1375
1375
  import { Code as RadixCode } from "@radix-ui/themes";
1376
1376
  // src/components/suggestions/Suggestions/index.tsx
1377
- import { c as _c14 } from "react-compiler-runtime";
1377
+ import { c as _c13 } from "react-compiler-runtime";
1378
1378
  import { useMemo as useMemo6 } from "react";
1379
1379
  // src/hooks/messages/useLatestMessage/index.ts
1380
1380
  import { c as _c11 } from "react-compiler-runtime";
@@ -1767,12 +1767,11 @@ import { isEmpty } from "radash";
1767
1767
  import { onlyText } from "react-children-utilities";
1768
1768
  import { Flex as Flex7 } from "@radix-ui/themes";
1769
1769
  // src/components/suggestions/Suggestions/Item.tsx
1770
- import { c as _c13 } from "react-compiler-runtime";
1770
+ import { c as _c12 } from "react-compiler-runtime";
1771
1771
  import { ArrowUpIcon } from "@radix-ui/react-icons";
1772
1772
  import { Text as Text4, Button as Button2, Spinner } from "@radix-ui/themes";
1773
1773
  // src/hooks/messages/useCreateMessage/index.ts
1774
- import { c as _c12 } from "react-compiler-runtime";
1775
- import { partob } from "radash";
1774
+ import { useCallback } from "react";
1776
1775
  import { useMutation, useQueryClient as useQueryClient2 } from "@tanstack/react-query";
1777
1776
  // src/hooks/messages/useCreateMessage/lib/mutationOptions/onMutate/index.ts
1778
1777
  import { omit } from "radash";
@@ -2728,7 +2727,7 @@ var threadRunRequiresAction = /* @__PURE__ */ function() {
2728
2727
  4,
2729
2728
  map(toolCalls, /* @__PURE__ */ function() {
2730
2729
  var _ref3 = _asyncToGenerator3(function(toolCall) {
2731
- var fn, args, parsedArgs, output, error;
2730
+ var fn, args, parsedArgs, output, _yield$fn, error, serializedOutput;
2732
2731
  return _ts_generator(this, function(_state) {
2733
2732
  switch(_state.label){
2734
2733
  case 0:
@@ -2766,7 +2765,7 @@ var threadRunRequiresAction = /* @__PURE__ */ function() {
2766
2765
  fn(parsedArgs)
2767
2766
  ];
2768
2767
  case 2:
2769
- output = _state.sent();
2768
+ output = (_yield$fn = _state.sent()) !== null && _yield$fn !== void 0 ? _yield$fn : "";
2770
2769
  return [
2771
2770
  3,
2772
2771
  4
@@ -2779,11 +2778,20 @@ var threadRunRequiresAction = /* @__PURE__ */ function() {
2779
2778
  4
2780
2779
  ];
2781
2780
  case 4:
2781
+ try {
2782
+ if (typeof output === "string") {
2783
+ serializedOutput = output;
2784
+ } else {
2785
+ serializedOutput = JSON.stringify(output);
2786
+ }
2787
+ } catch (error) {
2788
+ serializedOutput = "Error: ".concat(error.message);
2789
+ }
2782
2790
  return [
2783
2791
  2,
2784
2792
  {
2785
2793
  toolCallId: toolCall.id,
2786
- output: output
2794
+ output: serializedOutput
2787
2795
  }
2788
2796
  ];
2789
2797
  }
@@ -3137,72 +3145,29 @@ function _toPrimitive18(t, r) {
3137
3145
  }
3138
3146
  return ("string" === r ? String : Number)(t);
3139
3147
  }
3140
- var useCreateMessage = function(t0) {
3141
- var $ = _c12(15);
3142
- var t1;
3143
- if ($[0] !== t0) {
3144
- t1 = t0 === void 0 ? {
3145
- onError: _temp
3146
- } : t0;
3147
- $[0] = t0;
3148
- $[1] = t1;
3149
- } else {
3150
- t1 = $[1];
3151
- }
3152
- var t2 = t1.onError;
3153
- var t3;
3154
- if ($[2] !== t2) {
3155
- t3 = t2 === void 0 ? _temp2 : t2;
3156
- $[2] = t2;
3157
- $[3] = t3;
3158
- } else {
3159
- t3 = $[3];
3160
- }
3161
- var onError = t3;
3148
+ var useCreateMessage = function useCreateMessage2() {
3149
+ var _ref = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {
3150
+ onError: function() {}
3151
+ }, _ref_onError = _ref.onError, onError = _ref_onError === void 0 ? function() {} : _ref_onError;
3162
3152
  var queryClient = useQueryClient2();
3163
3153
  var superinterfaceContext = useSuperinterfaceContext();
3164
3154
  var threadContext = useSuperinterfaceContext();
3165
- var t4;
3166
- if ($[4] !== onError || $[5] !== queryClient || $[6] !== superinterfaceContext || $[7] !== threadContext) {
3167
- t4 = mutationOptions({
3168
- queryClient: queryClient,
3169
- threadContext: threadContext,
3170
- superinterfaceContext: superinterfaceContext,
3171
- onError: onError
3172
- });
3173
- $[4] = onError;
3174
- $[5] = queryClient;
3175
- $[6] = superinterfaceContext;
3176
- $[7] = threadContext;
3177
- $[8] = t4;
3178
- } else {
3179
- t4 = $[8];
3180
- }
3181
- var props = useMutation(t4);
3182
- var t5;
3183
- if ($[9] !== props.mutateAsync || $[10] !== threadContext.variables) {
3184
- t5 = partob(props.mutateAsync, threadContext.variables);
3185
- $[9] = props.mutateAsync;
3186
- $[10] = threadContext.variables;
3187
- $[11] = t5;
3188
- } else {
3189
- t5 = $[11];
3190
- }
3191
- var t6;
3192
- if ($[12] !== props || $[13] !== t5) {
3193
- t6 = _objectSpread18(_objectSpread18({}, props), {}, {
3194
- createMessage: t5
3195
- });
3196
- $[12] = props;
3197
- $[13] = t5;
3198
- $[14] = t6;
3199
- } else {
3200
- t6 = $[14];
3201
- }
3202
- return t6;
3155
+ var props = useMutation(mutationOptions({
3156
+ queryClient: queryClient,
3157
+ threadContext: threadContext,
3158
+ superinterfaceContext: superinterfaceContext,
3159
+ onError: onError
3160
+ }));
3161
+ var createMessage = useCallback(function(variables) {
3162
+ return props.mutateAsync(_objectSpread18(_objectSpread18({}, threadContext.variables), variables));
3163
+ }, [
3164
+ props.mutateAsync,
3165
+ threadContext.variables
3166
+ ]);
3167
+ return _objectSpread18(_objectSpread18({}, props), {}, {
3168
+ createMessage: createMessage
3169
+ });
3203
3170
  };
3204
- function _temp() {}
3205
- function _temp2() {}
3206
3171
  // src/components/suggestions/Suggestions/Item.tsx
3207
3172
  import { useQueryClient as useQueryClient3 } from "@tanstack/react-query";
3208
3173
  // src/hooks/toasts/useToasts/index.ts
@@ -3288,7 +3253,7 @@ function _toPrimitive19(t, r) {
3288
3253
  return ("string" === r ? String : Number)(t);
3289
3254
  }
3290
3255
  var Item = function(t0) {
3291
- var $ = _c13(16);
3256
+ var $ = _c12(16);
3292
3257
  var suggestion = t0.suggestion, isDisabled = t0.isDisabled, className = t0.className, style = t0.style;
3293
3258
  var addToast = useToasts().addToast;
3294
3259
  var queryClient = useQueryClient3();
@@ -3416,7 +3381,7 @@ var Content4 = function(_ref) {
3416
3381
  import { jsx as _jsx29 } from "react/jsx-runtime";
3417
3382
  var Suggestions = function(t0) {
3418
3383
  var _latestMessageProps$l;
3419
- var $ = _c14(4);
3384
+ var $ = _c13(4);
3420
3385
  var children = t0.children, className = t0.className, style = t0.style;
3421
3386
  var latestMessageProps = useLatestMessage();
3422
3387
  var t1;
@@ -3448,7 +3413,7 @@ Suggestions.Item = Item;
3448
3413
  // src/contexts/markdown/MarkdownContext/lib/components/Code.tsx
3449
3414
  import { jsx as _jsx30 } from "react/jsx-runtime";
3450
3415
  var Code3 = function(t0) {
3451
- var $ = _c15(4);
3416
+ var $ = _c14(4);
3452
3417
  var children = t0.children, className = t0.className;
3453
3418
  if (className === "language-suggestions") {
3454
3419
  var _t;
@@ -3476,7 +3441,7 @@ var Code3 = function(t0) {
3476
3441
  return t1;
3477
3442
  };
3478
3443
  // src/contexts/markdown/MarkdownContext/lib/components/Img/index.tsx
3479
- import { c as _c20 } from "react-compiler-runtime";
3444
+ import { c as _c19 } from "react-compiler-runtime";
3480
3445
  // src/components/images/Image.tsx
3481
3446
  import { Box as Box8 } from "@radix-ui/themes";
3482
3447
  import { jsx as _jsx31 } from "react/jsx-runtime";
@@ -3585,13 +3550,13 @@ import { Flex as Flex8 } from "@radix-ui/themes";
3585
3550
  import "@vidstack/react/player/styles/base.css";
3586
3551
  import { MediaPlayer, MediaProvider, Controls } from "@vidstack/react";
3587
3552
  // src/components/media/PlayButton.tsx
3588
- import { c as _c16 } from "react-compiler-runtime";
3553
+ import { c as _c15 } from "react-compiler-runtime";
3589
3554
  import { PlayButton as VidstackPlayButton, useMediaState } from "@vidstack/react";
3590
3555
  import { IconButton } from "@radix-ui/themes";
3591
3556
  import { PlayIcon, PauseIcon } from "@radix-ui/react-icons";
3592
3557
  import { jsx as _jsx32 } from "react/jsx-runtime";
3593
3558
  var PlayButton = function() {
3594
- var $ = _c16(2);
3559
+ var $ = _c15(2);
3595
3560
  var isPaused = useMediaState("paused");
3596
3561
  var t0;
3597
3562
  if ($[0] !== isPaused) {
@@ -3610,13 +3575,13 @@ var PlayButton = function() {
3610
3575
  return t0;
3611
3576
  };
3612
3577
  // src/components/media/VolumeButton.tsx
3613
- import { c as _c17 } from "react-compiler-runtime";
3578
+ import { c as _c16 } from "react-compiler-runtime";
3614
3579
  import { MuteButton, useMediaState as useMediaState2, useMediaRemote } from "@vidstack/react";
3615
3580
  import { IconButton as IconButton2, HoverCard, Slider } from "@radix-ui/themes";
3616
3581
  import { SpeakerModerateIcon, SpeakerOffIcon } from "@radix-ui/react-icons";
3617
3582
  import { jsx as _jsx33, jsxs as _jsxs11 } from "react/jsx-runtime";
3618
3583
  var VolumeButton = function() {
3619
- var $ = _c17(13);
3584
+ var $ = _c16(13);
3620
3585
  var volume = useMediaState2("volume");
3621
3586
  var isMuted = useMediaState2("muted");
3622
3587
  var remote = useMediaRemote();
@@ -3696,13 +3661,13 @@ var VolumeButton = function() {
3696
3661
  return t5;
3697
3662
  };
3698
3663
  // src/components/media/Time.tsx
3699
- import { c as _c18 } from "react-compiler-runtime";
3664
+ import { c as _c17 } from "react-compiler-runtime";
3700
3665
  import { useState, useEffect, useMemo as useMemo7 } from "react";
3701
3666
  import { useMediaState as useMediaState3, useMediaRemote as useMediaRemote2 } from "@vidstack/react";
3702
3667
  import { Slider as Slider2 } from "@radix-ui/themes";
3703
3668
  import { jsx as _jsx34 } from "react/jsx-runtime";
3704
3669
  var Time = function() {
3705
- var $ = _c18(17);
3670
+ var $ = _c17(17);
3706
3671
  var time = useMediaState3("currentTime");
3707
3672
  var duration = useMediaState3("duration");
3708
3673
  var seeking = useMediaState3("seeking");
@@ -3808,13 +3773,13 @@ var MediaContainer = function(_ref) {
3808
3773
  });
3809
3774
  };
3810
3775
  // src/contexts/markdown/MarkdownContext/lib/components/Img/Video/FullscreenButton.tsx
3811
- import { c as _c19 } from "react-compiler-runtime";
3776
+ import { c as _c18 } from "react-compiler-runtime";
3812
3777
  import { FullscreenButton as VidstackFullscreenButton, useMediaState as useMediaState4 } from "@vidstack/react";
3813
3778
  import { IconButton as IconButton3 } from "@radix-ui/themes";
3814
3779
  import { EnterFullScreenIcon, ExitFullScreenIcon } from "@radix-ui/react-icons";
3815
3780
  import { jsx as _jsx36 } from "react/jsx-runtime";
3816
3781
  var FullscreenButton = function() {
3817
- var $ = _c19(2);
3782
+ var $ = _c18(2);
3818
3783
  var isFullscreen = useMediaState4("fullscreen");
3819
3784
  var t0;
3820
3785
  if ($[0] !== isFullscreen) {
@@ -3975,7 +3940,7 @@ function _toPrimitive21(t, r) {
3975
3940
  return ("string" === r ? String : Number)(t);
3976
3941
  }
3977
3942
  var Img = function(props) {
3978
- var $ = _c20(8);
3943
+ var $ = _c19(8);
3979
3944
  if (!props.src) {
3980
3945
  var t0;
3981
3946
  if ($[0] !== props) {
@@ -4031,7 +3996,7 @@ var Img = function(props) {
4031
3996
  }
4032
3997
  };
4033
3998
  // src/contexts/markdown/MarkdownContext/lib/components/Annotation/index.tsx
4034
- import { c as _c22 } from "react-compiler-runtime";
3999
+ import { c as _c21 } from "react-compiler-runtime";
4035
4000
  import { QuoteIcon } from "@radix-ui/react-icons";
4036
4001
  // src/contexts/markdown/MarkdownContext/lib/components/Annotation/AnnotationBase.tsx
4037
4002
  import { IconButton as IconButton4, Popover as Popover4, Flex as Flex10, Text as Text5 } from "@radix-ui/themes";
@@ -4063,10 +4028,10 @@ var AnnotationBase = function(_ref) {
4063
4028
  });
4064
4029
  };
4065
4030
  // src/contexts/markdown/MarkdownContext/lib/components/Annotation/FilePathAnnotation.tsx
4066
- import { c as _c21 } from "react-compiler-runtime";
4031
+ import { c as _c20 } from "react-compiler-runtime";
4067
4032
  import { jsx as _jsx41 } from "react/jsx-runtime";
4068
4033
  var FilePathAnnotation = function(t0) {
4069
- var $ = _c21(3);
4034
+ var $ = _c20(3);
4070
4035
  var annotation = t0.annotation, children = t0.children;
4071
4036
  var superinterfaceContext = useSuperinterfaceContext();
4072
4037
  var nextSearchParams = new URLSearchParams(superinterfaceContext.variables);
@@ -4090,7 +4055,7 @@ var FilePathAnnotation = function(t0) {
4090
4055
  // src/contexts/markdown/MarkdownContext/lib/components/Annotation/index.tsx
4091
4056
  import { jsx as _jsx42 } from "react/jsx-runtime";
4092
4057
  var Annotation = function(t0) {
4093
- var $ = _c22(4);
4058
+ var $ = _c21(4);
4094
4059
  var annotation = t0.annotation, children = t0.children;
4095
4060
  if (annotation.type === "file_citation") {
4096
4061
  var t1;
@@ -4701,7 +4666,7 @@ var replaceExpressionsWithLiterals = function(_ref3) {
4701
4666
  });
4702
4667
  };
4703
4668
  var TextContent = function(t0) {
4704
- var $ = _c23(13);
4669
+ var $ = _c22(13);
4705
4670
  var content = t0.content;
4706
4671
  var _useMarkdownContext = useMarkdownContext(), getRemarkPlugins2 = _useMarkdownContext.getRemarkPlugins, components2 = _useMarkdownContext.components;
4707
4672
  var t1;
@@ -4840,10 +4805,10 @@ var TextContent = function(t0) {
4840
4805
  return t7;
4841
4806
  };
4842
4807
  // src/components/threads/Thread/Message/ContentPart/ImageFileContent.tsx
4843
- import { c as _c24 } from "react-compiler-runtime";
4808
+ import { c as _c23 } from "react-compiler-runtime";
4844
4809
  import { jsx as _jsx45 } from "react/jsx-runtime";
4845
4810
  var ImageFileContent = function(t0) {
4846
- var $ = _c24(2);
4811
+ var $ = _c23(2);
4847
4812
  var content = t0.content;
4848
4813
  var superinterfaceContext = useSuperinterfaceContext();
4849
4814
  var nextSearchParams = new URLSearchParams(superinterfaceContext.variables);
@@ -4864,7 +4829,7 @@ var ImageFileContent = function(t0) {
4864
4829
  // src/components/threads/Thread/Message/ContentPart/index.tsx
4865
4830
  import { jsx as _jsx46 } from "react/jsx-runtime";
4866
4831
  var ContentPart = function(t0) {
4867
- var $ = _c25(4);
4832
+ var $ = _c24(4);
4868
4833
  var content = t0.content;
4869
4834
  if (content.type === "text") {
4870
4835
  var t1;
@@ -4897,7 +4862,7 @@ var ContentPart = function(t0) {
4897
4862
  // src/components/threads/Thread/Message/index.tsx
4898
4863
  import { jsx as _jsx47, jsxs as _jsxs16 } from "react/jsx-runtime";
4899
4864
  var Message = function(t0) {
4900
- var $ = _c26(51);
4865
+ var $ = _c25(51);
4901
4866
  var message = t0.message, className = t0.className, style = t0.style;
4902
4867
  var t1;
4903
4868
  bb0: {
@@ -4931,7 +4896,7 @@ var Message = function(t0) {
4931
4896
  var messageCreationRunStepIndex = message.runSteps.findIndex(_t2);
4932
4897
  var _t3;
4933
4898
  if ($[3] !== message.runSteps || $[4] !== messageCreationRunStepIndex) {
4934
- var nextRunStepIndex = message.runSteps.slice(0, messageCreationRunStepIndex).findLastIndex(_temp3);
4899
+ var nextRunStepIndex = message.runSteps.slice(0, messageCreationRunStepIndex).findLastIndex(_temp);
4935
4900
  if (nextRunStepIndex === -1) {
4936
4901
  nextRunStepIndex = 0;
4937
4902
  }
@@ -4945,7 +4910,7 @@ var Message = function(t0) {
4945
4910
  var laterRunSteps = _t3;
4946
4911
  var _t4;
4947
4912
  if ($[6] !== message.runSteps || $[7] !== messageCreationRunStepIndex) {
4948
- _t4 = message.runSteps.slice(messageCreationRunStepIndex + 1).findIndex(_temp22);
4913
+ _t4 = message.runSteps.slice(messageCreationRunStepIndex + 1).findIndex(_temp2);
4949
4914
  $[6] = message.runSteps;
4950
4915
  $[7] = messageCreationRunStepIndex;
4951
4916
  $[8] = _t4;
@@ -5006,7 +4971,7 @@ var Message = function(t0) {
5006
4971
  }
5007
4972
  var _t8;
5008
4973
  if ($[19] !== message.runSteps) {
5009
- _t8 = message.runSteps.some(_temp32);
4974
+ _t8 = message.runSteps.some(_temp3);
5010
4975
  $[19] = message.runSteps;
5011
4976
  $[20] = _t8;
5012
4977
  } else {
@@ -5135,13 +5100,13 @@ var Message = function(t0) {
5135
5100
  }
5136
5101
  return t12;
5137
5102
  };
5138
- function _temp3(runStep_0) {
5103
+ function _temp(runStep_0) {
5139
5104
  return runStep_0.step_details.type === "message_creation";
5140
5105
  }
5141
- function _temp22(runStep_1) {
5106
+ function _temp2(runStep_1) {
5142
5107
  return runStep_1.step_details.type === "message_creation";
5143
5108
  }
5144
- function _temp32(rs) {
5109
+ function _temp3(rs) {
5145
5110
  return rs.status === "in_progress";
5146
5111
  }
5147
5112
  function _temp4(content, index) {
@@ -5150,10 +5115,10 @@ function _temp4(content, index) {
5150
5115
  }, index);
5151
5116
  }
5152
5117
  // src/components/threads/Thread/Messages/Content/index.tsx
5153
- import { c as _c33 } from "react-compiler-runtime";
5118
+ import { c as _c32 } from "react-compiler-runtime";
5154
5119
  import { useEffect as useEffect3 } from "react";
5155
5120
  // src/hooks/messageGroups/useMessageGroups/index.ts
5156
- import { c as _c27 } from "react-compiler-runtime";
5121
+ import { c as _c26 } from "react-compiler-runtime";
5157
5122
  import { useMemo as useMemo11 } from "react";
5158
5123
  // src/hooks/messageGroups/useMessageGroups/lib/messageGroups/index.ts
5159
5124
  import _6 from "lodash";
@@ -5258,7 +5223,7 @@ var messageGroups = function(_ref) {
5258
5223
  };
5259
5224
  // src/hooks/messageGroups/useMessageGroups/index.ts
5260
5225
  var useMessageGroups = function(t0) {
5261
- var $ = _c27(4);
5226
+ var $ = _c26(4);
5262
5227
  var messages2 = t0.messages;
5263
5228
  var t1;
5264
5229
  var t2;
@@ -5285,16 +5250,16 @@ var useMessageGroups = function(t0) {
5285
5250
  return t1;
5286
5251
  };
5287
5252
  // src/components/skeletons/MessagesSkeleton/index.tsx
5288
- import { c as _c29 } from "react-compiler-runtime";
5253
+ import { c as _c28 } from "react-compiler-runtime";
5289
5254
  import { forwardRef as forwardRef3 } from "react";
5290
5255
  import { Flex as Flex13, Avatar, Box as Box10, Skeleton as Skeleton2 } from "@radix-ui/themes";
5291
5256
  // src/components/messageGroups/MessageGroupBase/index.tsx
5292
- import { c as _c28 } from "react-compiler-runtime";
5257
+ import { c as _c27 } from "react-compiler-runtime";
5293
5258
  import { forwardRef as forwardRef2 } from "react";
5294
5259
  import { Flex as Flex11, Container } from "@radix-ui/themes";
5295
5260
  import { jsx as _jsx48 } from "react/jsx-runtime";
5296
5261
  var MessageGroupBase = /* @__PURE__ */ forwardRef2(function MessageGroupBase2(t0, ref) {
5297
- var $ = _c28(5);
5262
+ var $ = _c27(5);
5298
5263
  var children = t0.children;
5299
5264
  var t1;
5300
5265
  if ($[0] !== children) {
@@ -5342,7 +5307,7 @@ var Name = function(_ref) {
5342
5307
  // src/components/skeletons/MessagesSkeleton/index.tsx
5343
5308
  import { jsx as _jsx50, jsxs as _jsxs17 } from "react/jsx-runtime";
5344
5309
  var MessagesSkeleton = /* @__PURE__ */ forwardRef3(function MessagesSkeleton2(_props, ref) {
5345
- var $ = _c29(7);
5310
+ var $ = _c28(7);
5346
5311
  var t0;
5347
5312
  if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
5348
5313
  t0 = /* @__PURE__ */ _jsx50(Skeleton2, {
@@ -5433,11 +5398,11 @@ var MessagesSkeleton = /* @__PURE__ */ forwardRef3(function MessagesSkeleton2(_p
5433
5398
  return t5;
5434
5399
  });
5435
5400
  // src/components/threads/Thread/Messages/Content/MessageGroup/index.tsx
5436
- import { c as _c32 } from "react-compiler-runtime";
5401
+ import { c as _c31 } from "react-compiler-runtime";
5437
5402
  import { useContext as useContext9 } from "react";
5438
5403
  import { Box as Box11 } from "@radix-ui/themes";
5439
5404
  // src/components/messageGroups/MessageGroupBase/AssistantAvatar.tsx
5440
- import { c as _c30 } from "react-compiler-runtime";
5405
+ import { c as _c29 } from "react-compiler-runtime";
5441
5406
  import { useContext as useContext7 } from "react";
5442
5407
  import { Flex as Flex14 } from "@radix-ui/themes";
5443
5408
  // src/contexts/assistants/AssistantAvatarContext/index.tsx
@@ -5452,7 +5417,7 @@ var AssistantAvatarContext = /* @__PURE__ */ createContext8(/* @__PURE__ */ _jsx
5452
5417
  // src/components/messageGroups/MessageGroupBase/AssistantAvatar.tsx
5453
5418
  import { jsx as _jsx52 } from "react/jsx-runtime";
5454
5419
  var AssistantAvatar = function() {
5455
- var $ = _c30(3);
5420
+ var $ = _c29(3);
5456
5421
  var AssistantAvatarContextValue = useContext7(AssistantAvatarContext);
5457
5422
  var t0;
5458
5423
  if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
@@ -5484,7 +5449,7 @@ var AssistantAvatar = function() {
5484
5449
  import { createContext as createContext9 } from "react";
5485
5450
  var AssistantNameContext = /* @__PURE__ */ createContext9("Assistant");
5486
5451
  // src/components/messageGroups/MessageGroupBase/UserAvatar.tsx
5487
- import { c as _c31 } from "react-compiler-runtime";
5452
+ import { c as _c30 } from "react-compiler-runtime";
5488
5453
  import { useContext as useContext8 } from "react";
5489
5454
  import { Flex as Flex15 } from "@radix-ui/themes";
5490
5455
  // src/contexts/users/UserAvatarContext/index.tsx
@@ -5499,7 +5464,7 @@ var UserAvatarContext = /* @__PURE__ */ createContext10(/* @__PURE__ */ _jsx53(A
5499
5464
  // src/components/messageGroups/MessageGroupBase/UserAvatar.tsx
5500
5465
  import { jsx as _jsx54 } from "react/jsx-runtime";
5501
5466
  var UserAvatar = function() {
5502
- var $ = _c31(3);
5467
+ var $ = _c30(3);
5503
5468
  var UserAvatarContextValue = useContext8(UserAvatarContext);
5504
5469
  var t0;
5505
5470
  if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
@@ -5544,7 +5509,7 @@ var Content5 = function(_ref) {
5544
5509
  // src/components/threads/Thread/Messages/Content/MessageGroup/index.tsx
5545
5510
  import { jsx as _jsx56, jsxs as _jsxs18 } from "react/jsx-runtime";
5546
5511
  var MessageGroup = function(t0) {
5547
- var $ = _c32(12);
5512
+ var $ = _c31(12);
5548
5513
  var messageGroup = t0.messageGroup;
5549
5514
  var assistantNameContext = useContext9(AssistantNameContext);
5550
5515
  var t1;
@@ -5610,7 +5575,7 @@ var MessageGroup = function(t0) {
5610
5575
  // src/components/threads/Thread/Messages/Content/index.tsx
5611
5576
  import { jsx as _jsx57, Fragment as _Fragment2 } from "react/jsx-runtime";
5612
5577
  var Content6 = function() {
5613
- var $ = _c33(11);
5578
+ var $ = _c32(11);
5614
5579
  var _useMessages = useMessages(), messages2 = _useMessages.messages, isLoading = _useMessages.isLoading, isLoadingError = _useMessages.isLoadingError;
5615
5580
  var addToast = useToasts().addToast;
5616
5581
  var t0;
@@ -5684,15 +5649,15 @@ function _temp5(messageGroup) {
5684
5649
  }, messageGroup.id);
5685
5650
  }
5686
5651
  // src/components/threads/Thread/Messages/Progress/index.tsx
5687
- import { c as _c35 } from "react-compiler-runtime";
5652
+ import { c as _c34 } from "react-compiler-runtime";
5688
5653
  import { useMemo as useMemo12 } from "react";
5689
5654
  // src/components/skeletons/StartingSkeleton/index.tsx
5690
- import { c as _c34 } from "react-compiler-runtime";
5655
+ import { c as _c33 } from "react-compiler-runtime";
5691
5656
  import { useContext as useContext10 } from "react";
5692
5657
  import { Box as Box12 } from "@radix-ui/themes";
5693
5658
  import { jsx as _jsx58, jsxs as _jsxs19 } from "react/jsx-runtime";
5694
5659
  var StartingSkeleton = function(t0) {
5695
- var $ = _c34(7);
5660
+ var $ = _c33(7);
5696
5661
  var children = t0.children;
5697
5662
  var assistantNameContext = useContext10(AssistantNameContext);
5698
5663
  var t1;
@@ -5744,7 +5709,7 @@ var StartingSkeleton = function(t0) {
5744
5709
  // src/components/threads/Thread/Messages/Progress/index.tsx
5745
5710
  import { jsx as _jsx59 } from "react/jsx-runtime";
5746
5711
  var Progress = function() {
5747
- var $ = _c35(1);
5712
+ var $ = _c34(1);
5748
5713
  var latestMessage = useLatestMessage().latestMessage;
5749
5714
  var isMutatingMessage = useIsMutatingMessage();
5750
5715
  var t0;
@@ -5787,17 +5752,17 @@ var Progress = function() {
5787
5752
  return t1;
5788
5753
  };
5789
5754
  // src/components/threads/Thread/Messages/Root/index.tsx
5790
- import { c as _c36 } from "react-compiler-runtime";
5755
+ import { c as _c35 } from "react-compiler-runtime";
5791
5756
  import { Flex as Flex17 } from "@radix-ui/themes";
5792
5757
  // src/hooks/misc/useInfiniteScroll/index.tsx
5793
5758
  import { useRef as useRef3 } from "react";
5794
5759
  import { useInView } from "react-intersection-observer";
5795
5760
  // src/hooks/misc/useThrottledEffect/index.tsx
5796
5761
  import _7 from "lodash";
5797
- import { useRef as useRef2, useEffect as useEffect4, useCallback } from "react";
5762
+ import { useRef as useRef2, useEffect as useEffect4, useCallback as useCallback2 } from "react";
5798
5763
  var useThrottledEffect = function(cb, delay, additionalDeps) {
5799
5764
  var cbRef = useRef2(cb);
5800
- var throttledCb = useCallback(_7.throttle(function() {
5765
+ var throttledCb = useCallback2(_7.throttle(function() {
5801
5766
  var _cbRef;
5802
5767
  return (_cbRef = cbRef).current.apply(_cbRef, arguments);
5803
5768
  }, delay, {
@@ -5885,7 +5850,7 @@ function _toPrimitive26(t, r) {
5885
5850
  return ("string" === r ? String : Number)(t);
5886
5851
  }
5887
5852
  var Root2 = function(t0) {
5888
- var $ = _c36(18);
5853
+ var $ = _c35(18);
5889
5854
  var children = t0.children, style = t0.style, className = t0.className;
5890
5855
  var _useMessages = useMessages(), isFetchingNextPage = _useMessages.isFetchingNextPage, hasNextPage = _useMessages.hasNextPage, fetchNextPage = _useMessages.fetchNextPage;
5891
5856
  var t1;
@@ -5968,10 +5933,10 @@ var Root2 = function(t0) {
5968
5933
  return t6;
5969
5934
  };
5970
5935
  // src/components/threads/Thread/Messages/NextPageSkeleton.tsx
5971
- import { c as _c37 } from "react-compiler-runtime";
5936
+ import { c as _c36 } from "react-compiler-runtime";
5972
5937
  import { jsx as _jsx61 } from "react/jsx-runtime";
5973
5938
  var NextPageSkeleton = function() {
5974
- var $ = _c37(1);
5939
+ var $ = _c36(1);
5975
5940
  var hasNextPage = useMessages().hasNextPage;
5976
5941
  if (!hasNextPage) {
5977
5942
  return null;
@@ -6013,7 +5978,7 @@ Messages.Root = Root2;
6013
5978
  Messages.Message = Message;
6014
5979
  Messages.NextPageSkeleton = NextPageSkeleton;
6015
5980
  // src/components/threads/Thread/MessageForm/Submit/index.tsx
6016
- import { c as _c38 } from "react-compiler-runtime";
5981
+ import { c as _c37 } from "react-compiler-runtime";
6017
5982
  import { ArrowUpIcon as ArrowUpIcon2, StopIcon } from "@radix-ui/react-icons";
6018
5983
  import { IconButton as IconButton5, Flex as Flex19 } from "@radix-ui/themes";
6019
5984
  // src/hooks/messages/useMessageFormContext/index.ts
@@ -6088,7 +6053,7 @@ var Root3 = function(_ref) {
6088
6053
  });
6089
6054
  };
6090
6055
  var Button3 = function(props) {
6091
- var $ = _c38(10);
6056
+ var $ = _c37(10);
6092
6057
  var superinterfaceContext = useSuperinterfaceContext();
6093
6058
  var _useMessageFormContext = useMessageFormContext(), isDisabled = _useMessageFormContext.isDisabled, isLoading = _useMessageFormContext.isLoading, isFileLoading = _useMessageFormContext.isFileLoading;
6094
6059
  if (isLoading) {
@@ -6172,7 +6137,7 @@ var formOptions = {
6172
6137
  resolver: zodResolver(schema)
6173
6138
  };
6174
6139
  // src/components/threads/Thread/MessageForm/Root/index.tsx
6175
- import { partob as partob2 } from "radash";
6140
+ import { partob } from "radash";
6176
6141
  import { jsx as _jsx64 } from "react/jsx-runtime";
6177
6142
  function ownKeys28(e, r) {
6178
6143
  var t = Object.keys(e);
@@ -6281,7 +6246,7 @@ var Root4 = function(_ref) {
6281
6246
  latestMessage,
6282
6247
  isDisabledArg
6283
6248
  ]);
6284
- var onSubmit = onSubmitArg ? partob2(onSubmitArg, {
6249
+ var onSubmit = onSubmitArg ? partob(onSubmitArg, {
6285
6250
  reset: reset,
6286
6251
  createMessage: createMessage
6287
6252
  }) : /* @__PURE__ */ function() {
@@ -6374,7 +6339,7 @@ var usePrevious = function(state) {
6374
6339
  // src/components/threads/Thread/MessageForm/Field/Control.tsx
6375
6340
  import { useContext as useContext12, useMemo as useMemo14, useRef as useRef5, useEffect as useEffect6 } from "react";
6376
6341
  // src/components/textareas/TextareaBase/index.tsx
6377
- import { c as _c39 } from "react-compiler-runtime";
6342
+ import { c as _c38 } from "react-compiler-runtime";
6378
6343
  import { forwardRef as forwardRef4 } from "react";
6379
6344
  import TextareaAutosize from "react-textarea-autosize";
6380
6345
  import { jsx as _jsx65, Fragment as _Fragment3, jsxs as _jsxs22 } from "react/jsx-runtime";
@@ -6445,7 +6410,7 @@ function _objectWithoutPropertiesLoose2(r, e) {
6445
6410
  }
6446
6411
  var TextareaBase = /* @__PURE__ */ forwardRef4(function TextareaBase2(t0, ref) {
6447
6412
  var _className;
6448
- var $ = _c39(14);
6413
+ var $ = _c38(14);
6449
6414
  var className;
6450
6415
  var rest;
6451
6416
  var style;
@@ -6628,7 +6593,7 @@ var Control = function(props) {
6628
6593
  Control.Root = Root5;
6629
6594
  Control.Input = Input;
6630
6595
  // src/components/threads/Thread/MessageForm/Field/Files/Preview.tsx
6631
- import { c as _c40 } from "react-compiler-runtime";
6596
+ import { c as _c39 } from "react-compiler-runtime";
6632
6597
  import { Flex as Flex21, Card as Card2, Spinner as Spinner2, Text as Text7, IconButton as IconButton6 } from "@radix-ui/themes";
6633
6598
  import { FileIcon as FileIcon2, Cross2Icon } from "@radix-ui/react-icons";
6634
6599
  import { jsx as _jsx67, jsxs as _jsxs23 } from "react/jsx-runtime";
@@ -6676,7 +6641,7 @@ function _toPrimitive31(t, r) {
6676
6641
  return ("string" === r ? String : Number)(t);
6677
6642
  }
6678
6643
  var Preview = function(props) {
6679
- var $ = _c40(8);
6644
+ var $ = _c39(8);
6680
6645
  var _useMessageFormContext = useMessageFormContext(), files = _useMessageFormContext.files, setFiles = _useMessageFormContext.setFiles;
6681
6646
  if (!files.length) {
6682
6647
  return null;
@@ -6768,13 +6733,13 @@ var Preview = function(props) {
6768
6733
  return t1;
6769
6734
  };
6770
6735
  // src/components/threads/Thread/MessageForm/Field/Files/Control.tsx
6771
- import { useCallback as useCallback2 } from "react";
6736
+ import { useCallback as useCallback3 } from "react";
6772
6737
  import { omit as omit4 } from "radash";
6773
6738
  import dayjs2 from "dayjs";
6774
6739
  import { FilePlusIcon } from "@radix-ui/react-icons";
6775
6740
  import { IconButton as IconButton7, Flex as Flex22 } from "@radix-ui/themes";
6776
6741
  // src/hooks/files/useCreateFile/index.ts
6777
- import { c as _c41 } from "react-compiler-runtime";
6742
+ import { c as _c40 } from "react-compiler-runtime";
6778
6743
  import { useMutation as useMutation2, useQueryClient as useQueryClient5 } from "@tanstack/react-query";
6779
6744
  // src/hooks/files/useCreateFile/lib/mutationOptions/mutationFn/body/formData.ts
6780
6745
  var formData = function(variables) {
@@ -7010,7 +6975,7 @@ function _toPrimitive34(t, r) {
7010
6975
  return ("string" === r ? String : Number)(t);
7011
6976
  }
7012
6977
  var useCreateFile = function(t0) {
7013
- var $ = _c41(15);
6978
+ var $ = _c40(15);
7014
6979
  var t1;
7015
6980
  if ($[0] !== t0) {
7016
6981
  t1 = t0 === void 0 ? {
@@ -7024,7 +6989,7 @@ var useCreateFile = function(t0) {
7024
6989
  var t2 = t1.onError;
7025
6990
  var t3;
7026
6991
  if ($[2] !== t2) {
7027
- t3 = t2 === void 0 ? _temp23 : t2;
6992
+ t3 = t2 === void 0 ? _temp22 : t2;
7028
6993
  $[2] = t2;
7029
6994
  $[3] = t3;
7030
6995
  } else {
@@ -7084,7 +7049,7 @@ var useCreateFile = function(t0) {
7084
7049
  return t6;
7085
7050
  };
7086
7051
  function _temp6() {}
7087
- function _temp23() {}
7052
+ function _temp22() {}
7088
7053
  // src/components/threads/Thread/MessageForm/Field/Files/Control.tsx
7089
7054
  import { jsx as _jsx68, jsxs as _jsxs24 } from "react/jsx-runtime";
7090
7055
  function ownKeys35(e, r) {
@@ -7199,7 +7164,7 @@ var Control2 = function(props) {
7199
7164
  var _useMessageFormContext = useMessageFormContext(), isDisabled = _useMessageFormContext.isDisabled, isLoading = _useMessageFormContext.isLoading, setFiles = _useMessageFormContext.setFiles;
7200
7165
  var createFile = useCreateFile().createFile;
7201
7166
  var addToast = useToasts().addToast;
7202
- var onChange = useCallback2(/* @__PURE__ */ function() {
7167
+ var onChange = useCallback3(/* @__PURE__ */ function() {
7203
7168
  var _ref = _asyncToGenerator8(function(event) {
7204
7169
  var fileObjects, newFiles, _iteratorAbruptCompletion, _didIteratorError, _iteratorError, _loop, _iterator, _step, err;
7205
7170
  return _ts_generator(this, function(_state) {
@@ -7553,8 +7518,8 @@ import { Flex as Flex25 } from "@radix-ui/themes";
7553
7518
  // src/components/threads/Thread/Provider/index.tsx
7554
7519
  var Provider2 = SuperinterfaceProvider;
7555
7520
  // src/components/toasts/ToastsProvider/index.tsx
7556
- import { c as _c42 } from "react-compiler-runtime";
7557
- import { useState as useState5, useCallback as useCallback3 } from "react";
7521
+ import { c as _c41 } from "react-compiler-runtime";
7522
+ import { useState as useState5, useCallback as useCallback4 } from "react";
7558
7523
  import * as Toast2 from "@radix-ui/react-toast";
7559
7524
  // src/components/toasts/ToastsProvider/CustomToast.tsx
7560
7525
  import * as Toast from "@radix-ui/react-toast";
@@ -7592,7 +7557,7 @@ var CustomToast = function(_ref) {
7592
7557
  // src/components/toasts/ToastsProvider/index.tsx
7593
7558
  import { jsx as _jsx72, jsxs as _jsxs27 } from "react/jsx-runtime";
7594
7559
  var ToastsProvider = function(t0) {
7595
- var $ = _c42(15);
7560
+ var $ = _c41(15);
7596
7561
  var children = t0.children, t1 = t0.bottom;
7597
7562
  var bottom = t1 === void 0 ? 0 : t1;
7598
7563
  var t2;
@@ -7840,7 +7805,7 @@ var useMessageContext = function() {
7840
7805
  return useContext13(MessageContext);
7841
7806
  };
7842
7807
  // src/hooks/assistants/useAssistant/index.ts
7843
- import { c as _c43 } from "react-compiler-runtime";
7808
+ import { c as _c42 } from "react-compiler-runtime";
7844
7809
  import { useMemo as useMemo15 } from "react";
7845
7810
  import { useQuery } from "@tanstack/react-query";
7846
7811
  // src/hooks/assistants/useAssistant/lib/queryOptions/index.ts
@@ -7990,7 +7955,7 @@ function _toPrimitive40(t, r) {
7990
7955
  return ("string" === r ? String : Number)(t);
7991
7956
  }
7992
7957
  var useAssistant = function(t0) {
7993
- var $ = _c43(6);
7958
+ var $ = _c42(6);
7994
7959
  var assistantId = t0.assistantId;
7995
7960
  var superinterfaceContext = useSuperinterfaceContext();
7996
7961
  var t1;
@@ -8023,7 +7988,7 @@ var useAssistant = function(t0) {
8023
7988
  return t2;
8024
7989
  };
8025
7990
  // src/components/threads/ThreadDialog/Provider/index.tsx
8026
- import { c as _c44 } from "react-compiler-runtime";
7991
+ import { c as _c43 } from "react-compiler-runtime";
8027
7992
  import { useState as useState6 } from "react";
8028
7993
  // src/contexts/threads/ThreadDialogContext/index.ts
8029
7994
  import { createContext as createContext12 } from "react";
@@ -8039,7 +8004,7 @@ var useThreadDialogContext = function() {
8039
8004
  // src/components/threads/ThreadDialog/Provider/index.tsx
8040
8005
  import { jsx as _jsx75 } from "react/jsx-runtime";
8041
8006
  var Provider4 = function(t0) {
8042
- var $ = _c44(5);
8007
+ var $ = _c43(5);
8043
8008
  var children = t0.children;
8044
8009
  var threadDialogContext = useThreadDialogContext();
8045
8010
  var _useState6 = _sliced_to_array(useState6(threadDialogContext.isOpen), 2), isOpen = _useState6[0], setIsOpen = _useState6[1];
@@ -8077,7 +8042,7 @@ var Root9 = function(_ref) {
8077
8042
  });
8078
8043
  };
8079
8044
  // src/components/threads/ThreadDialog/Trigger/index.tsx
8080
- import { c as _c45 } from "react-compiler-runtime";
8045
+ import { c as _c44 } from "react-compiler-runtime";
8081
8046
  import { Flex as Flex26 } from "@radix-ui/themes";
8082
8047
  // src/components/threads/ThreadDialog/Trigger/Button.tsx
8083
8048
  import { IconButton as IconButton8 } from "@radix-ui/themes";
@@ -8180,7 +8145,7 @@ function _toPrimitive42(t, r) {
8180
8145
  return ("string" === r ? String : Number)(t);
8181
8146
  }
8182
8147
  var Root10 = function(t0) {
8183
- var $ = _c45(14);
8148
+ var $ = _c44(14);
8184
8149
  var children = t0.children, style = t0.style, className = t0.className;
8185
8150
  var _useThreadDialogContext = useThreadDialogContext(), setIsOpen = _useThreadDialogContext.setIsOpen, isOpen = _useThreadDialogContext.isOpen;
8186
8151
  var t1 = isOpen ? "none" : "flex";
@@ -8261,15 +8226,15 @@ function _temp8(prev) {
8261
8226
  return !prev;
8262
8227
  }
8263
8228
  // src/components/threads/ThreadDialog/Content/index.tsx
8264
- import { c as _c47 } from "react-compiler-runtime";
8229
+ import { c as _c46 } from "react-compiler-runtime";
8265
8230
  import { Card as Card4, Inset as Inset2, Flex as Flex28 } from "@radix-ui/themes";
8266
8231
  // src/components/threads/ThreadDialog/Close/index.tsx
8267
- import { c as _c46 } from "react-compiler-runtime";
8232
+ import { c as _c45 } from "react-compiler-runtime";
8268
8233
  import { Cross1Icon } from "@radix-ui/react-icons";
8269
8234
  import { IconButton as IconButton9, Flex as Flex27 } from "@radix-ui/themes";
8270
8235
  import { jsx as _jsx79 } from "react/jsx-runtime";
8271
8236
  var Close = function() {
8272
- var $ = _c46(9);
8237
+ var $ = _c45(9);
8273
8238
  var _useThreadDialogContext = useThreadDialogContext(), setIsOpen = _useThreadDialogContext.setIsOpen, isOpen = _useThreadDialogContext.isOpen;
8274
8239
  var t0 = isOpen ? "flex" : "none";
8275
8240
  var t1;
@@ -8385,7 +8350,7 @@ function _toPrimitive43(t, r) {
8385
8350
  return ("string" === r ? String : Number)(t);
8386
8351
  }
8387
8352
  var Root11 = function(t0) {
8388
- var $ = _c47(19);
8353
+ var $ = _c46(19);
8389
8354
  var children = t0.children, className = t0.className, style = t0.style;
8390
8355
  var isOpen = useThreadDialogContext().isOpen;
8391
8356
  if (!isOpen) {
@@ -8584,7 +8549,7 @@ ThreadDialog.Root = Root9;
8584
8549
  ThreadDialog.Trigger = Trigger;
8585
8550
  ThreadDialog.Content = Content7;
8586
8551
  // src/components/threads/AudioThread/Root/index.tsx
8587
- import { c as _c52 } from "react-compiler-runtime";
8552
+ import { c as _c51 } from "react-compiler-runtime";
8588
8553
  import { Flex as Flex29 } from "@radix-ui/themes";
8589
8554
  // src/contexts/threads/AudioThreadContext/index.ts
8590
8555
  import { createContext as createContext13 } from "react";
@@ -8704,7 +8669,7 @@ var AudioThreadContext = /* @__PURE__ */ createContext13({
8704
8669
  }
8705
8670
  });
8706
8671
  // src/hooks/misc/usePermission/index.ts
8707
- import { c as _c48 } from "react-compiler-runtime";
8672
+ import { c as _c47 } from "react-compiler-runtime";
8708
8673
  import { useEffect as useEffect7, useState as useState7 } from "react";
8709
8674
  // src/hooks/misc/usePermission/util.ts
8710
8675
  var noop = function() {};
@@ -8728,7 +8693,7 @@ function off(obj) {
8728
8693
  }
8729
8694
  // src/hooks/misc/usePermission/index.ts
8730
8695
  var usePermission = function(permissionDesc) {
8731
- var $ = _c48(3);
8696
+ var $ = _c47(3);
8732
8697
  var _useState7 = _sliced_to_array(useState7(""), 2), state = _useState7[0], setState = _useState7[1];
8733
8698
  var t0;
8734
8699
  var t1;
@@ -8782,10 +8747,10 @@ var blobToData = function(blob) {
8782
8747
  });
8783
8748
  };
8784
8749
  // src/hooks/audioThreads/useStatus/index.ts
8785
- import { c as _c49 } from "react-compiler-runtime";
8750
+ import { c as _c48 } from "react-compiler-runtime";
8786
8751
  import { useMemo as useMemo16 } from "react";
8787
8752
  var useStatus = function(t0) {
8788
- var $ = _c49(2);
8753
+ var $ = _c48(2);
8789
8754
  var messageAudioProps = t0.messageAudioProps, recorderProps = t0.recorderProps, createMessageProps = t0.createMessageProps;
8790
8755
  var latestMessageProps = useLatestMessage();
8791
8756
  var t1;
@@ -8841,13 +8806,13 @@ var useStatus = function(t0) {
8841
8806
  // src/hooks/audioThreads/useRecorder/index.ts
8842
8807
  import dayjs3 from "dayjs";
8843
8808
  import { useAudioCapture } from "use-audio-capture";
8844
- import { useMemo as useMemo17, useRef as useRef7, useState as useState8, useCallback as useCallback4, useEffect as useEffect9 } from "react";
8809
+ import { useMemo as useMemo17, useRef as useRef7, useState as useState8, useCallback as useCallback5, useEffect as useEffect9 } from "react";
8845
8810
  import { useAudioPlayer } from "react-use-audio-player";
8846
8811
  // src/hooks/misc/useInterval.ts
8847
- import { c as _c50 } from "react-compiler-runtime";
8812
+ import { c as _c49 } from "react-compiler-runtime";
8848
8813
  import { useEffect as useEffect8, useRef as useRef6 } from "react";
8849
8814
  var useInterval = function(callback, delay) {
8850
- var $ = _c50(5);
8815
+ var $ = _c49(5);
8851
8816
  var savedCallback = useRef6(_temp10);
8852
8817
  var t0;
8853
8818
  if ($[0] !== callback) {
@@ -9054,7 +9019,7 @@ var useRecorder = function(_ref) {
9054
9019
  }, [
9055
9020
  audioEngine
9056
9021
  ]);
9057
- var handleSilence = useCallback4(function() {
9022
+ var handleSilence = useCallback5(function() {
9058
9023
  if (!silenceAnalyser) return;
9059
9024
  var frequencyData = new Uint8Array(silenceAnalyser.frequencyBinCount);
9060
9025
  silenceAnalyser.getByteFrequencyData(frequencyData);
@@ -9100,7 +9065,7 @@ var useRecorder = function(_ref) {
9100
9065
  });
9101
9066
  };
9102
9067
  // src/hooks/audioThreads/useMessageAudio/index.ts
9103
- import { c as _c51 } from "react-compiler-runtime";
9068
+ import { c as _c50 } from "react-compiler-runtime";
9104
9069
  import { useMemo as useMemo18, useRef as useRef8, useState as useState9, useEffect as useEffect10 } from "react";
9105
9070
  import nlp from "compromise";
9106
9071
  import { Howler } from "howler";
@@ -9182,7 +9147,7 @@ var getMessageSentences = function(_ref) {
9182
9147
  });
9183
9148
  };
9184
9149
  var useMessageAudio = function(t0) {
9185
- var $ = _c51(44);
9150
+ var $ = _c50(44);
9186
9151
  var onEnd = t0.onEnd;
9187
9152
  var _useState9 = _sliced_to_array(useState9(false), 2), isAudioPlayed = _useState9[0], setIsAudioPlayed = _useState9[1];
9188
9153
  var t1;
@@ -9591,7 +9556,7 @@ function _asyncToGenerator12(n) {
9591
9556
  };
9592
9557
  }
9593
9558
  var Content8 = function(t0) {
9594
- var $ = _c52(21);
9559
+ var $ = _c51(21);
9595
9560
  var children = t0.children, className = t0.className, style = t0.style;
9596
9561
  var addToast = useToasts().addToast;
9597
9562
  var queryClient = useQueryClient6();
@@ -9744,20 +9709,20 @@ var Root12 = function(_ref) {
9744
9709
  });
9745
9710
  };
9746
9711
  function _temp12() {
9747
- return _temp24.apply(this, arguments);
9712
+ return _temp23.apply(this, arguments);
9748
9713
  }
9749
- function _temp24() {
9750
- _temp24 = _asyncToGenerator12(function() {
9714
+ function _temp23() {
9715
+ _temp23 = _asyncToGenerator12(function() {
9751
9716
  return _ts_generator(this, function(_state) {
9752
9717
  return [
9753
9718
  2
9754
9719
  ];
9755
9720
  });
9756
9721
  });
9757
- return _temp24.apply(this, arguments);
9722
+ return _temp23.apply(this, arguments);
9758
9723
  }
9759
9724
  // src/components/threads/AudioThread/Visualization/index.tsx
9760
- import { useContext as useContext16, useState as useState11, useCallback as useCallback6, useEffect as useEffect12 } from "react";
9725
+ import { useContext as useContext16, useState as useState11, useCallback as useCallback7, useEffect as useEffect12 } from "react";
9761
9726
  import _9 from "lodash";
9762
9727
  import { Flex as Flex31 } from "@radix-ui/themes";
9763
9728
  // src/hooks/threads/useAudioThreadContext/index.ts
@@ -9768,14 +9733,14 @@ var useAudioThreadContext = function() {
9768
9733
  // src/components/threads/AudioThread/BarsVisualizer/index.tsx
9769
9734
  import _8 from "lodash";
9770
9735
  import { Flex as Flex30, Grid } from "@radix-ui/themes";
9771
- import { useState as useState10, useEffect as useEffect11, useCallback as useCallback5 } from "react";
9736
+ import { useState as useState10, useEffect as useEffect11, useCallback as useCallback6 } from "react";
9772
9737
  import { cluster } from "radash";
9773
9738
  import { jsx as _jsx83 } from "react/jsx-runtime";
9774
9739
  var barCount = 4;
9775
9740
  var BarsVisualizer = function(_ref) {
9776
9741
  var visualizationAnalyser = _ref.visualizationAnalyser, backgroundColor = _ref.backgroundColor, height = _ref.height, barWidth = _ref.barWidth;
9777
9742
  var _useState10 = _sliced_to_array(useState10([]), 2), barHeights = _useState10[0], setBarHeights = _useState10[1];
9778
- var draw = useCallback5(function(_ref2) {
9743
+ var draw = useCallback6(function(_ref2) {
9779
9744
  var visualizationAnalyser_0 = _ref2.visualizationAnalyser;
9780
9745
  if (!visualizationAnalyser_0) {
9781
9746
  setBarHeights(Array(barCount).fill(0));
@@ -9878,7 +9843,7 @@ var Visualization = function(props) {
9878
9843
  var audioThreadContext = useAudioThreadContext();
9879
9844
  var assistantNameContext = useContext16(AssistantNameContext);
9880
9845
  var _useState11 = _sliced_to_array(useState11(0), 2), scale = _useState11[0], setScale = _useState11[1];
9881
- var draw = useCallback6(function(_ref) {
9846
+ var draw = useCallback7(function(_ref) {
9882
9847
  var visualizationAnalyser = _ref.visualizationAnalyser;
9883
9848
  if (!visualizationAnalyser) {
9884
9849
  setScale(1);
@@ -9941,7 +9906,7 @@ var Visualization = function(props) {
9941
9906
  }));
9942
9907
  };
9943
9908
  // src/components/threads/AudioThread/Status/index.tsx
9944
- import { c as _c53 } from "react-compiler-runtime";
9909
+ import { c as _c52 } from "react-compiler-runtime";
9945
9910
  // src/components/threads/AudioThread/Status/StatusMessages.tsx
9946
9911
  import { Flex as Flex32, Text as Text9 } from "@radix-ui/themes";
9947
9912
  import { jsx as _jsx85, jsxs as _jsxs32 } from "react/jsx-runtime";
@@ -10021,7 +9986,7 @@ function _toPrimitive48(t, r) {
10021
9986
  return ("string" === r ? String : Number)(t);
10022
9987
  }
10023
9988
  var Status = function(props) {
10024
- var $ = _c53(12);
9989
+ var $ = _c52(12);
10025
9990
  var audioThreadContext = useAudioThreadContext();
10026
9991
  if (audioThreadContext.status === "recording") {
10027
9992
  var _t;
@@ -10118,7 +10083,7 @@ var Status = function(props) {
10118
10083
  return t1;
10119
10084
  };
10120
10085
  // src/components/threads/AudioThread/Form/index.tsx
10121
- import { c as _c55 } from "react-compiler-runtime";
10086
+ import { c as _c54 } from "react-compiler-runtime";
10122
10087
  import { Flex as Flex34 } from "@radix-ui/themes";
10123
10088
  // src/components/threads/AudioThread/Form/MicIcon.tsx
10124
10089
  import { jsx as _jsx87 } from "react/jsx-runtime";
@@ -10182,12 +10147,12 @@ var MicIcon = function(props) {
10182
10147
  }));
10183
10148
  };
10184
10149
  // src/components/threads/AudioThread/Form/ActionButton/index.tsx
10185
- import { c as _c54 } from "react-compiler-runtime";
10150
+ import { c as _c53 } from "react-compiler-runtime";
10186
10151
  import { Flex as Flex33, IconButton as IconButton10 } from "@radix-ui/themes";
10187
10152
  import { StopIcon as StopIcon2, PauseIcon as PauseIcon2, ArrowUpIcon as ArrowUpIcon3, ResumeIcon } from "@radix-ui/react-icons";
10188
10153
  import { jsx as _jsx88, jsxs as _jsxs33 } from "react/jsx-runtime";
10189
10154
  var ActionButton = function() {
10190
- var $ = _c54(27);
10155
+ var $ = _c53(27);
10191
10156
  var audioThreadContext = useAudioThreadContext();
10192
10157
  var superinterfaceContext = useSuperinterfaceContext();
10193
10158
  if (audioThreadContext.status === "recording") {
@@ -10424,7 +10389,7 @@ function _toPrimitive50(t, r) {
10424
10389
  return ("string" === r ? String : Number)(t);
10425
10390
  }
10426
10391
  var Form = function(props) {
10427
- var $ = _c55(17);
10392
+ var $ = _c54(17);
10428
10393
  var audioThreadContext = useAudioThreadContext();
10429
10394
  var t0 = audioThreadContext.status === "recording" ? "var(--accent-11)" : "var(--gray-11)";
10430
10395
  var t1;
@@ -10644,7 +10609,7 @@ AudioThreadDialog.Root = Root9;
10644
10609
  AudioThreadDialog.Trigger = Trigger;
10645
10610
  AudioThreadDialog.Content = Content7;
10646
10611
  // src/components/markdown/MarkdownProvider/index.tsx
10647
- import { c as _c56 } from "react-compiler-runtime";
10612
+ import { c as _c55 } from "react-compiler-runtime";
10648
10613
  import { useMemo as useMemo19 } from "react";
10649
10614
  import { jsx as _jsx92 } from "react/jsx-runtime";
10650
10615
  var _excluded5 = [
@@ -10669,7 +10634,7 @@ function _objectWithoutPropertiesLoose5(r, e) {
10669
10634
  return t;
10670
10635
  }
10671
10636
  var MarkdownProvider = function(t0) {
10672
- var $ = _c56(9);
10637
+ var $ = _c55(9);
10673
10638
  var children;
10674
10639
  var rest;
10675
10640
  if ($[0] !== t0) {
@@ -10712,7 +10677,7 @@ var MarkdownProvider = function(t0) {
10712
10677
  return t3;
10713
10678
  };
10714
10679
  // src/components/avatars/Avatar.tsx
10715
- import { c as _c59 } from "react-compiler-runtime";
10680
+ import { c as _c58 } from "react-compiler-runtime";
10716
10681
  // src/lib/enums/index.ts
10717
10682
  var IconAvatarName = /* @__PURE__ */ function(IconAvatarName2) {
10718
10683
  IconAvatarName2["BACKPACK"] = "BACKPACK";
@@ -10737,7 +10702,7 @@ var AvatarType = /* @__PURE__ */ function(AvatarType2) {
10737
10702
  // src/components/avatars/Avatar.tsx
10738
10703
  import { Avatar as RadixAvatar } from "@radix-ui/themes";
10739
10704
  // src/components/imageAvatars/ImageAvatar/index.tsx
10740
- import { c as _c57 } from "react-compiler-runtime";
10705
+ import { c as _c56 } from "react-compiler-runtime";
10741
10706
  import { Avatar as Avatar4 } from "@radix-ui/themes";
10742
10707
  // src/components/imageAvatars/ImageAvatar/lib/optimizedSrc/path.ts
10743
10708
  var width = function(_ref) {
@@ -10791,7 +10756,7 @@ var optimizedSrc = function(_ref) {
10791
10756
  // src/components/imageAvatars/ImageAvatar/index.tsx
10792
10757
  import { jsx as _jsx93 } from "react/jsx-runtime";
10793
10758
  var ImageAvatar = function(t0) {
10794
- var $ = _c57(9);
10759
+ var $ = _c56(9);
10795
10760
  var imageAvatar = t0.imageAvatar, size = t0.size, className = t0.className, style = t0.style;
10796
10761
  var superinterfaceContext = useSuperinterfaceContext();
10797
10762
  var t1;
@@ -10828,7 +10793,7 @@ var ImageAvatar = function(t0) {
10828
10793
  return t2;
10829
10794
  };
10830
10795
  // src/components/iconAvatars/IconAvatar.tsx
10831
- import { c as _c58 } from "react-compiler-runtime";
10796
+ import { c as _c57 } from "react-compiler-runtime";
10832
10797
  import { useMemo as useMemo20 } from "react";
10833
10798
  import { Avatar as Avatar5 } from "@radix-ui/themes";
10834
10799
  // src/lib/iconAvatars/iconAvatarComponents.ts
@@ -10838,7 +10803,7 @@ var iconAvatarComponents = (_obj = {}, _define_property(_obj, IconAvatarName.BAC
10838
10803
  // src/components/iconAvatars/IconAvatar.tsx
10839
10804
  import { jsx as _jsx94 } from "react/jsx-runtime";
10840
10805
  var IconAvatar = function(t0) {
10841
- var $ = _c58(7);
10806
+ var $ = _c57(7);
10842
10807
  var iconAvatar = t0.iconAvatar, size = t0.size, className = t0.className, style = t0.style;
10843
10808
  var t1;
10844
10809
  t1 = iconAvatarComponents[iconAvatar.name];
@@ -10872,7 +10837,7 @@ var IconAvatar = function(t0) {
10872
10837
  // src/components/avatars/Avatar.tsx
10873
10838
  import { jsx as _jsx95 } from "react/jsx-runtime";
10874
10839
  var Avatar6 = function(t0) {
10875
- var $ = _c59(14);
10840
+ var $ = _c58(14);
10876
10841
  var avatar = t0.avatar, t1 = t0.size, className = t0.className, style = t0.style;
10877
10842
  var size = t1 === void 0 ? "1" : t1;
10878
10843
  if (avatar) {
@@ -10933,7 +10898,7 @@ var Avatar6 = function(t0) {
10933
10898
  return t2;
10934
10899
  };
10935
10900
  // src/components/components/ComponentsProvider.tsx
10936
- import { c as _c60 } from "react-compiler-runtime";
10901
+ import { c as _c59 } from "react-compiler-runtime";
10937
10902
  import { useMemo as useMemo21 } from "react";
10938
10903
  // src/hooks/components/useComponents.ts
10939
10904
  import { useContext as useContext17 } from "react";
@@ -10964,7 +10929,7 @@ function _objectWithoutPropertiesLoose6(r, e) {
10964
10929
  return t;
10965
10930
  }
10966
10931
  var ComponentsProvider = function(t0) {
10967
- var $ = _c60(9);
10932
+ var $ = _c59(9);
10968
10933
  var children;
10969
10934
  var rest;
10970
10935
  if ($[0] !== t0) {
@@ -11007,11 +10972,11 @@ var ComponentsProvider = function(t0) {
11007
10972
  return t3;
11008
10973
  };
11009
10974
  // src/components/assistants/AssistantProvider/index.tsx
11010
- import { c as _c61 } from "react-compiler-runtime";
10975
+ import { c as _c60 } from "react-compiler-runtime";
11011
10976
  import { jsx as _jsx97 } from "react/jsx-runtime";
11012
10977
  var AssistantProvider = function(t0) {
11013
10978
  var _assistant$name;
11014
- var $ = _c61(10);
10979
+ var $ = _c60(10);
11015
10980
  var children = t0.children;
11016
10981
  var superinterfaceContext = useSuperinterfaceContext();
11017
10982
  var t1;