@superinterface/react 3.6.0 → 3.6.2

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
@@ -10,6 +10,35 @@ function _array_with_holes(arr) {
10
10
  function _array_without_holes(arr) {
11
11
  if (Array.isArray(arr)) return _array_like_to_array(arr);
12
12
  }
13
+ function _assert_this_initialized(self) {
14
+ if (self === void 0) {
15
+ throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
16
+ }
17
+ return self;
18
+ }
19
+ function _call_super(_this, derived, args) {
20
+ derived = _get_prototype_of(derived);
21
+ return _possible_constructor_return(_this, _is_native_reflect_construct() ? Reflect.construct(derived, args || [], _get_prototype_of(_this).constructor) : derived.apply(_this, args));
22
+ }
23
+ function _class_call_check(instance, Constructor) {
24
+ if (!(instance instanceof Constructor)) {
25
+ throw new TypeError("Cannot call a class as a function");
26
+ }
27
+ }
28
+ function _defineProperties(target, props) {
29
+ for(var i = 0; i < props.length; i++){
30
+ var descriptor = props[i];
31
+ descriptor.enumerable = descriptor.enumerable || false;
32
+ descriptor.configurable = true;
33
+ if ("value" in descriptor) descriptor.writable = true;
34
+ Object.defineProperty(target, descriptor.key, descriptor);
35
+ }
36
+ }
37
+ function _create_class(Constructor, protoProps, staticProps) {
38
+ if (protoProps) _defineProperties(Constructor.prototype, protoProps);
39
+ if (staticProps) _defineProperties(Constructor, staticProps);
40
+ return Constructor;
41
+ }
13
42
  function _define_property(obj, key, value) {
14
43
  if (key in obj) {
15
44
  Object.defineProperty(obj, key, {
@@ -23,6 +52,25 @@ function _define_property(obj, key, value) {
23
52
  }
24
53
  return obj;
25
54
  }
55
+ function _get_prototype_of(o) {
56
+ _get_prototype_of = Object.setPrototypeOf ? Object.getPrototypeOf : function getPrototypeOf(o) {
57
+ return o.__proto__ || Object.getPrototypeOf(o);
58
+ };
59
+ return _get_prototype_of(o);
60
+ }
61
+ function _inherits(subClass, superClass) {
62
+ if (typeof superClass !== "function" && superClass !== null) {
63
+ throw new TypeError("Super expression must either be null or a function");
64
+ }
65
+ subClass.prototype = Object.create(superClass && superClass.prototype, {
66
+ constructor: {
67
+ value: subClass,
68
+ writable: true,
69
+ configurable: true
70
+ }
71
+ });
72
+ if (superClass) _set_prototype_of(subClass, superClass);
73
+ }
26
74
  function _iterable_to_array(iter) {
27
75
  if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
28
76
  }
@@ -56,6 +104,19 @@ function _non_iterable_rest() {
56
104
  function _non_iterable_spread() {
57
105
  throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
58
106
  }
107
+ function _possible_constructor_return(self, call) {
108
+ if (call && (_type_of(call) === "object" || typeof call === "function")) {
109
+ return call;
110
+ }
111
+ return _assert_this_initialized(self);
112
+ }
113
+ function _set_prototype_of(o, p) {
114
+ _set_prototype_of = Object.setPrototypeOf || function setPrototypeOf(o, p) {
115
+ o.__proto__ = p;
116
+ return o;
117
+ };
118
+ return _set_prototype_of(o, p);
119
+ }
59
120
  function _sliced_to_array(arr, i) {
60
121
  return _array_with_holes(arr) || _iterable_to_array_limit(arr, i) || _unsupported_iterable_to_array(arr, i) || _non_iterable_rest();
61
122
  }
@@ -77,6 +138,14 @@ function _unsupported_iterable_to_array(o, minLen) {
77
138
  if (n === "Map" || n === "Set") return Array.from(n);
78
139
  if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
79
140
  }
141
+ function _is_native_reflect_construct() {
142
+ try {
143
+ var result = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
144
+ } catch (_) {}
145
+ return (_is_native_reflect_construct = function() {
146
+ return !!result;
147
+ })();
148
+ }
80
149
  function _ts_generator(thisArg, body) {
81
150
  var f, y, t, g, _ = {
82
151
  label: 0,
@@ -367,7 +436,7 @@ var SuperinterfaceProvider = function(_ref) {
367
436
  import { Flex as Flex18 } from "@radix-ui/themes";
368
437
  // src/components/threads/Thread/Message/index.tsx
369
438
  import { c as _c26 } from "react-compiler-runtime";
370
- import { useMemo as useMemo9 } from "react";
439
+ import { useMemo as useMemo10 } from "react";
371
440
  import { isEmpty as isEmpty2 } from "radash";
372
441
  import { Box as Box9 } from "@radix-ui/themes";
373
442
  // src/components/skeletons/StartingContentSkeleton/index.tsx
@@ -633,14 +702,14 @@ var Fn = function(t0) {
633
702
  var $ = _c3(4);
634
703
  var fn = t0.fn, runStep = t0.runStep;
635
704
  var functionComponentsContext = useContext2(FunctionComponentsContext);
636
- var Component = functionComponentsContext[fn.name] || DefaultFunction;
705
+ var Component2 = functionComponentsContext[fn.name] || DefaultFunction;
637
706
  var t1;
638
- if ($[0] !== Component || $[1] !== fn || $[2] !== runStep) {
639
- t1 = /* @__PURE__ */ _jsx9(Component, {
707
+ if ($[0] !== Component2 || $[1] !== fn || $[2] !== runStep) {
708
+ t1 = /* @__PURE__ */ _jsx9(Component2, {
640
709
  fn: fn,
641
710
  runStep: runStep
642
711
  });
643
- $[0] = Component;
712
+ $[0] = Component2;
644
713
  $[1] = fn;
645
714
  $[2] = runStep;
646
715
  $[3] = t1;
@@ -938,23 +1007,23 @@ var RunSteps = function(t0) {
938
1007
  var $ = _c7(7);
939
1008
  var runSteps = t0.runSteps;
940
1009
  var componentsContext = useContext3(ComponentsContext);
941
- var Component = componentsContext.components.RunStep;
1010
+ var Component2 = componentsContext.components.RunStep;
942
1011
  var t1;
943
- if ($[0] !== Component || $[1] !== runSteps) {
1012
+ if ($[0] !== Component2 || $[1] !== runSteps) {
944
1013
  var _t;
945
- if ($[3] !== Component) {
1014
+ if ($[3] !== Component2) {
946
1015
  _t = function(runStep) {
947
- return /* @__PURE__ */ _jsx18(Component, {
1016
+ return /* @__PURE__ */ _jsx18(Component2, {
948
1017
  runStep: runStep
949
1018
  }, runStep.id);
950
1019
  };
951
- $[3] = Component;
1020
+ $[3] = Component2;
952
1021
  $[4] = _t;
953
1022
  } else {
954
1023
  _t = $[4];
955
1024
  }
956
1025
  t1 = runSteps.map(_t);
957
- $[0] = Component;
1026
+ $[0] = Component2;
958
1027
  $[1] = runSteps;
959
1028
  $[2] = t1;
960
1029
  } else {
@@ -1054,7 +1123,8 @@ var Attachments = function(t0) {
1054
1123
  import { c as _c25 } from "react-compiler-runtime";
1055
1124
  // src/components/threads/Thread/Message/ContentPart/TextContent.tsx
1056
1125
  import { c as _c23 } from "react-compiler-runtime";
1057
- import React, { useState as useState2, useEffect as useEffect2, useMemo as useMemo8 } from "react";
1126
+ import React, { useState as useState3, useEffect as useEffect2, useMemo as useMemo9 } from "react";
1127
+ import { Badge as Badge2 } from "@radix-ui/themes";
1058
1128
  import { compile } from "@mdx-js/mdx";
1059
1129
  import { MDXProvider, useMDXComponents } from "@mdx-js/react";
1060
1130
  import * as runtime from "react/jsx-runtime";
@@ -4427,6 +4497,117 @@ var MarkdownContext = /* @__PURE__ */ createContext6({
4427
4497
  var useMarkdownContext = function() {
4428
4498
  return useContext5(MarkdownContext);
4429
4499
  };
4500
+ // ../../node_modules/react-error-boundary/dist/react-error-boundary.esm.js
4501
+ import { createContext as createContext7, Component, createElement, useContext as useContext6, useState as useState2, useMemo as useMemo8, forwardRef } from "react";
4502
+ var ErrorBoundaryContext = /* @__PURE__ */ createContext7(null);
4503
+ var initialState = {
4504
+ didCatch: false,
4505
+ error: null
4506
+ };
4507
+ var ErrorBoundary = /*#__PURE__*/ function(Component) {
4508
+ "use strict";
4509
+ _inherits(ErrorBoundary, Component);
4510
+ function ErrorBoundary(props) {
4511
+ _class_call_check(this, ErrorBoundary);
4512
+ var _this;
4513
+ _this = _call_super(this, ErrorBoundary, [
4514
+ props
4515
+ ]);
4516
+ _this.resetErrorBoundary = _this.resetErrorBoundary.bind(_this);
4517
+ _this.state = initialState;
4518
+ return _this;
4519
+ }
4520
+ _create_class(ErrorBoundary, [
4521
+ {
4522
+ key: "resetErrorBoundary",
4523
+ value: function resetErrorBoundary() {
4524
+ var error = this.state.error;
4525
+ if (error !== null) {
4526
+ var _this$props$onReset, _this$props;
4527
+ for(var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++){
4528
+ args[_key] = arguments[_key];
4529
+ }
4530
+ (_this$props$onReset = (_this$props = this.props).onReset) === null || _this$props$onReset === void 0 ? void 0 : _this$props$onReset.call(_this$props, {
4531
+ args: args,
4532
+ reason: "imperative-api"
4533
+ });
4534
+ this.setState(initialState);
4535
+ }
4536
+ }
4537
+ },
4538
+ {
4539
+ key: "componentDidCatch",
4540
+ value: function componentDidCatch(error, info) {
4541
+ var _this$props$onError, _this$props2;
4542
+ (_this$props$onError = (_this$props2 = this.props).onError) === null || _this$props$onError === void 0 ? void 0 : _this$props$onError.call(_this$props2, error, info);
4543
+ }
4544
+ },
4545
+ {
4546
+ key: "componentDidUpdate",
4547
+ value: function componentDidUpdate(prevProps, prevState) {
4548
+ var didCatch = this.state.didCatch;
4549
+ var resetKeys = this.props.resetKeys;
4550
+ if (didCatch && prevState.error !== null && hasArrayChanged(prevProps.resetKeys, resetKeys)) {
4551
+ var _this$props$onReset2, _this$props3;
4552
+ (_this$props$onReset2 = (_this$props3 = this.props).onReset) === null || _this$props$onReset2 === void 0 ? void 0 : _this$props$onReset2.call(_this$props3, {
4553
+ next: resetKeys,
4554
+ prev: prevProps.resetKeys,
4555
+ reason: "keys"
4556
+ });
4557
+ this.setState(initialState);
4558
+ }
4559
+ }
4560
+ },
4561
+ {
4562
+ key: "render",
4563
+ value: function render() {
4564
+ var _this_props = this.props, children = _this_props.children, fallbackRender = _this_props.fallbackRender, FallbackComponent = _this_props.FallbackComponent, fallback = _this_props.fallback;
4565
+ var _this_state = this.state, didCatch = _this_state.didCatch, error = _this_state.error;
4566
+ var childToRender = children;
4567
+ if (didCatch) {
4568
+ var props = {
4569
+ error: error,
4570
+ resetErrorBoundary: this.resetErrorBoundary
4571
+ };
4572
+ if (typeof fallbackRender === "function") {
4573
+ childToRender = fallbackRender(props);
4574
+ } else if (FallbackComponent) {
4575
+ childToRender = /* @__PURE__ */ createElement(FallbackComponent, props);
4576
+ } else if (fallback !== void 0) {
4577
+ childToRender = fallback;
4578
+ } else {
4579
+ throw error;
4580
+ }
4581
+ }
4582
+ return /* @__PURE__ */ createElement(ErrorBoundaryContext.Provider, {
4583
+ value: {
4584
+ didCatch: didCatch,
4585
+ error: error,
4586
+ resetErrorBoundary: this.resetErrorBoundary
4587
+ }
4588
+ }, childToRender);
4589
+ }
4590
+ }
4591
+ ], [
4592
+ {
4593
+ key: "getDerivedStateFromError",
4594
+ value: function getDerivedStateFromError(error) {
4595
+ return {
4596
+ didCatch: true,
4597
+ error: error
4598
+ };
4599
+ }
4600
+ }
4601
+ ]);
4602
+ return ErrorBoundary;
4603
+ }(Component);
4604
+ function hasArrayChanged() {
4605
+ var a = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [];
4606
+ var b = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : [];
4607
+ return a.length !== b.length || a.some(function(item, index) {
4608
+ return !Object.is(item, b[index]);
4609
+ });
4610
+ }
4430
4611
  // src/components/threads/Thread/Message/ContentPart/TextContent.tsx
4431
4612
  import { jsx as _jsx44 } from "react/jsx-runtime";
4432
4613
  function ownKeys24(e, r) {
@@ -4514,7 +4695,7 @@ var evaluate = /* @__PURE__ */ function() {
4514
4695
  };
4515
4696
  }();
4516
4697
  var TextContent = function(t0) {
4517
- var $ = _c23(12);
4698
+ var $ = _c23(13);
4518
4699
  var content = t0.content;
4519
4700
  var _useMarkdownContext = useMarkdownContext(), getRemarkPlugins2 = _useMarkdownContext.getRemarkPlugins, components2 = _useMarkdownContext.components;
4520
4701
  var t1;
@@ -4531,7 +4712,7 @@ var TextContent = function(t0) {
4531
4712
  }
4532
4713
  t1 = t2;
4533
4714
  var remarkPlugins = t1;
4534
- var _useState2 = _sliced_to_array(useState2(null), 2), MDXComponent = _useState2[0], setMDXComponent = _useState2[1];
4715
+ var _useState3 = _sliced_to_array(useState3(null), 2), MDXComponent = _useState3[0], setMDXComponent = _useState3[1];
4535
4716
  var t3;
4536
4717
  var t4;
4537
4718
  if ($[3] !== content || $[4] !== remarkPlugins) {
@@ -4615,26 +4796,40 @@ var TextContent = function(t0) {
4615
4796
  return content.text.value;
4616
4797
  }
4617
4798
  var t5;
4618
- if ($[7] !== MDXComponent) {
4619
- t5 = /* @__PURE__ */ _jsx44(MDXComponent, {});
4620
- $[7] = MDXComponent;
4621
- $[8] = t5;
4799
+ if ($[7] === Symbol.for("react.memo_cache_sentinel")) {
4800
+ t5 = /* @__PURE__ */ _jsx44(Badge2, {
4801
+ color: "red",
4802
+ mb: "2",
4803
+ children: "Could not render message."
4804
+ });
4805
+ $[7] = t5;
4622
4806
  } else {
4623
- t5 = $[8];
4807
+ t5 = $[7];
4624
4808
  }
4625
4809
  var t6;
4626
- if ($[9] !== components2 || $[10] !== t5) {
4627
- t6 = /* @__PURE__ */ _jsx44(MDXProvider, {
4628
- components: components2,
4629
- children: t5
4810
+ if ($[8] !== MDXComponent) {
4811
+ t6 = /* @__PURE__ */ _jsx44(MDXComponent, {});
4812
+ $[8] = MDXComponent;
4813
+ $[9] = t6;
4814
+ } else {
4815
+ t6 = $[9];
4816
+ }
4817
+ var t7;
4818
+ if ($[10] !== components2 || $[11] !== t6) {
4819
+ t7 = /* @__PURE__ */ _jsx44(ErrorBoundary, {
4820
+ fallback: t5,
4821
+ children: /* @__PURE__ */ _jsx44(MDXProvider, {
4822
+ components: components2,
4823
+ children: t6
4824
+ })
4630
4825
  });
4631
- $[9] = components2;
4632
- $[10] = t5;
4826
+ $[10] = components2;
4633
4827
  $[11] = t6;
4828
+ $[12] = t7;
4634
4829
  } else {
4635
- t6 = $[11];
4830
+ t7 = $[12];
4636
4831
  }
4637
- return t6;
4832
+ return t7;
4638
4833
  };
4639
4834
  // src/components/threads/Thread/Message/ContentPart/ImageFileContent.tsx
4640
4835
  import { c as _c24 } from "react-compiler-runtime";
@@ -4951,7 +5146,7 @@ import { c as _c33 } from "react-compiler-runtime";
4951
5146
  import { useEffect as useEffect3 } from "react";
4952
5147
  // src/hooks/messageGroups/useMessageGroups/index.ts
4953
5148
  import { c as _c27 } from "react-compiler-runtime";
4954
- import { useMemo as useMemo10 } from "react";
5149
+ import { useMemo as useMemo11 } from "react";
4955
5150
  // src/hooks/messageGroups/useMessageGroups/lib/messageGroups/index.ts
4956
5151
  import _6 from "lodash";
4957
5152
  import { last as last2 } from "radash";
@@ -5083,14 +5278,14 @@ var useMessageGroups = function(t0) {
5083
5278
  };
5084
5279
  // src/components/skeletons/MessagesSkeleton/index.tsx
5085
5280
  import { c as _c29 } from "react-compiler-runtime";
5086
- import { forwardRef as forwardRef2 } from "react";
5281
+ import { forwardRef as forwardRef3 } from "react";
5087
5282
  import { Flex as Flex13, Avatar, Box as Box10, Skeleton as Skeleton2 } from "@radix-ui/themes";
5088
5283
  // src/components/messageGroups/MessageGroupBase/index.tsx
5089
5284
  import { c as _c28 } from "react-compiler-runtime";
5090
- import { forwardRef } from "react";
5285
+ import { forwardRef as forwardRef2 } from "react";
5091
5286
  import { Flex as Flex11, Container } from "@radix-ui/themes";
5092
5287
  import { jsx as _jsx48 } from "react/jsx-runtime";
5093
- var MessageGroupBase = /* @__PURE__ */ forwardRef(function MessageGroupBase2(t0, ref) {
5288
+ var MessageGroupBase = /* @__PURE__ */ forwardRef2(function MessageGroupBase2(t0, ref) {
5094
5289
  var $ = _c28(5);
5095
5290
  var children = t0.children;
5096
5291
  var t1;
@@ -5138,7 +5333,7 @@ var Name = function(_ref) {
5138
5333
  };
5139
5334
  // src/components/skeletons/MessagesSkeleton/index.tsx
5140
5335
  import { jsx as _jsx50, jsxs as _jsxs17 } from "react/jsx-runtime";
5141
- var MessagesSkeleton = /* @__PURE__ */ forwardRef2(function MessagesSkeleton2(_props, ref) {
5336
+ var MessagesSkeleton = /* @__PURE__ */ forwardRef3(function MessagesSkeleton2(_props, ref) {
5142
5337
  var $ = _c29(7);
5143
5338
  var t0;
5144
5339
  if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
@@ -5231,18 +5426,18 @@ var MessagesSkeleton = /* @__PURE__ */ forwardRef2(function MessagesSkeleton2(_p
5231
5426
  });
5232
5427
  // src/components/threads/Thread/Messages/Content/MessageGroup/index.tsx
5233
5428
  import { c as _c32 } from "react-compiler-runtime";
5234
- import { useContext as useContext8 } from "react";
5429
+ import { useContext as useContext9 } from "react";
5235
5430
  import { Box as Box11 } from "@radix-ui/themes";
5236
5431
  // src/components/messageGroups/MessageGroupBase/AssistantAvatar.tsx
5237
5432
  import { c as _c30 } from "react-compiler-runtime";
5238
- import { useContext as useContext6 } from "react";
5433
+ import { useContext as useContext7 } from "react";
5239
5434
  import { Flex as Flex14 } from "@radix-ui/themes";
5240
5435
  // src/contexts/assistants/AssistantAvatarContext/index.tsx
5241
- import { createContext as createContext7 } from "react";
5436
+ import { createContext as createContext8 } from "react";
5242
5437
  import { Avatar as Avatar2 } from "@radix-ui/themes";
5243
5438
  import { LightningBoltIcon } from "@radix-ui/react-icons";
5244
5439
  import { jsx as _jsx51 } from "react/jsx-runtime";
5245
- var AssistantAvatarContext = /* @__PURE__ */ createContext7(/* @__PURE__ */ _jsx51(Avatar2, {
5440
+ var AssistantAvatarContext = /* @__PURE__ */ createContext8(/* @__PURE__ */ _jsx51(Avatar2, {
5246
5441
  fallback: /* @__PURE__ */ _jsx51(LightningBoltIcon, {}),
5247
5442
  size: "1"
5248
5443
  }));
@@ -5250,7 +5445,7 @@ var AssistantAvatarContext = /* @__PURE__ */ createContext7(/* @__PURE__ */ _jsx
5250
5445
  import { jsx as _jsx52 } from "react/jsx-runtime";
5251
5446
  var AssistantAvatar = function() {
5252
5447
  var $ = _c30(3);
5253
- var AssistantAvatarContextValue = useContext6(AssistantAvatarContext);
5448
+ var AssistantAvatarContextValue = useContext7(AssistantAvatarContext);
5254
5449
  var t0;
5255
5450
  if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
5256
5451
  t0 = {
@@ -5278,18 +5473,18 @@ var AssistantAvatar = function() {
5278
5473
  return t1;
5279
5474
  };
5280
5475
  // src/contexts/assistants/AssistantNameContext/index.tsx
5281
- import { createContext as createContext8 } from "react";
5282
- var AssistantNameContext = /* @__PURE__ */ createContext8("Assistant");
5476
+ import { createContext as createContext9 } from "react";
5477
+ var AssistantNameContext = /* @__PURE__ */ createContext9("Assistant");
5283
5478
  // src/components/messageGroups/MessageGroupBase/UserAvatar.tsx
5284
5479
  import { c as _c31 } from "react-compiler-runtime";
5285
- import { useContext as useContext7 } from "react";
5480
+ import { useContext as useContext8 } from "react";
5286
5481
  import { Flex as Flex15 } from "@radix-ui/themes";
5287
5482
  // src/contexts/users/UserAvatarContext/index.tsx
5288
- import { createContext as createContext9 } from "react";
5483
+ import { createContext as createContext10 } from "react";
5289
5484
  import { Avatar as Avatar3 } from "@radix-ui/themes";
5290
5485
  import { PersonIcon } from "@radix-ui/react-icons";
5291
5486
  import { jsx as _jsx53 } from "react/jsx-runtime";
5292
- var UserAvatarContext = /* @__PURE__ */ createContext9(/* @__PURE__ */ _jsx53(Avatar3, {
5487
+ var UserAvatarContext = /* @__PURE__ */ createContext10(/* @__PURE__ */ _jsx53(Avatar3, {
5293
5488
  fallback: /* @__PURE__ */ _jsx53(PersonIcon, {}),
5294
5489
  size: "1"
5295
5490
  }));
@@ -5297,7 +5492,7 @@ var UserAvatarContext = /* @__PURE__ */ createContext9(/* @__PURE__ */ _jsx53(Av
5297
5492
  import { jsx as _jsx54 } from "react/jsx-runtime";
5298
5493
  var UserAvatar = function() {
5299
5494
  var $ = _c31(3);
5300
- var UserAvatarContextValue = useContext7(UserAvatarContext);
5495
+ var UserAvatarContextValue = useContext8(UserAvatarContext);
5301
5496
  var t0;
5302
5497
  if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
5303
5498
  t0 = {
@@ -5343,7 +5538,7 @@ import { jsx as _jsx56, jsxs as _jsxs18 } from "react/jsx-runtime";
5343
5538
  var MessageGroup = function(t0) {
5344
5539
  var $ = _c32(12);
5345
5540
  var messageGroup = t0.messageGroup;
5346
- var assistantNameContext = useContext8(AssistantNameContext);
5541
+ var assistantNameContext = useContext9(AssistantNameContext);
5347
5542
  var t1;
5348
5543
  if ($[0] !== messageGroup.role) {
5349
5544
  t1 = messageGroup.role === "user" ? /* @__PURE__ */ _jsx56(UserAvatar, {}) : /* @__PURE__ */ _jsx56(AssistantAvatar, {});
@@ -5482,16 +5677,16 @@ function _temp5(messageGroup) {
5482
5677
  }
5483
5678
  // src/components/threads/Thread/Messages/Progress/index.tsx
5484
5679
  import { c as _c35 } from "react-compiler-runtime";
5485
- import { useMemo as useMemo11 } from "react";
5680
+ import { useMemo as useMemo12 } from "react";
5486
5681
  // src/components/skeletons/StartingSkeleton/index.tsx
5487
5682
  import { c as _c34 } from "react-compiler-runtime";
5488
- import { useContext as useContext9 } from "react";
5683
+ import { useContext as useContext10 } from "react";
5489
5684
  import { Box as Box12 } from "@radix-ui/themes";
5490
5685
  import { jsx as _jsx58, jsxs as _jsxs19 } from "react/jsx-runtime";
5491
5686
  var StartingSkeleton = function(t0) {
5492
5687
  var $ = _c34(7);
5493
5688
  var children = t0.children;
5494
- var assistantNameContext = useContext9(AssistantNameContext);
5689
+ var assistantNameContext = useContext10(AssistantNameContext);
5495
5690
  var t1;
5496
5691
  if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
5497
5692
  t1 = /* @__PURE__ */ _jsx58(AssistantAvatar, {});
@@ -5814,10 +6009,10 @@ import { c as _c38 } from "react-compiler-runtime";
5814
6009
  import { ArrowUpIcon as ArrowUpIcon2, StopIcon } from "@radix-ui/react-icons";
5815
6010
  import { IconButton as IconButton5, Flex as Flex19 } from "@radix-ui/themes";
5816
6011
  // src/hooks/messages/useMessageFormContext/index.ts
5817
- import { useContext as useContext10 } from "react";
6012
+ import { useContext as useContext11 } from "react";
5818
6013
  // src/contexts/messages/MessageFormContext/index.ts
5819
- import { createContext as createContext10 } from "react";
5820
- var MessageFormContext = /* @__PURE__ */ createContext10({
6014
+ import { createContext as createContext11 } from "react";
6015
+ var MessageFormContext = /* @__PURE__ */ createContext11({
5821
6016
  content: "",
5822
6017
  isDisabled: false,
5823
6018
  isLoading: false,
@@ -5827,7 +6022,7 @@ var MessageFormContext = /* @__PURE__ */ createContext10({
5827
6022
  });
5828
6023
  // src/hooks/messages/useMessageFormContext/index.ts
5829
6024
  var useMessageFormContext = function() {
5830
- return useContext10(MessageFormContext);
6025
+ return useContext11(MessageFormContext);
5831
6026
  };
5832
6027
  // src/components/threads/Thread/MessageForm/Submit/index.tsx
5833
6028
  import { jsx as _jsx63 } from "react/jsx-runtime";
@@ -5956,7 +6151,7 @@ Submit.Root = Root3;
5956
6151
  Submit.Button = Button3;
5957
6152
  // src/components/threads/Thread/MessageForm/Root/index.tsx
5958
6153
  import { useQueryClient as useQueryClient4 } from "@tanstack/react-query";
5959
- import { useMemo as useMemo12, useState as useState3 } from "react";
6154
+ import { useMemo as useMemo13, useState as useState4 } from "react";
5960
6155
  import { useForm, FormProvider } from "react-hook-form";
5961
6156
  import { Box as Box13 } from "@radix-ui/themes";
5962
6157
  // src/components/threads/Thread/MessageForm/Root/lib/formOptions.ts
@@ -6040,7 +6235,7 @@ function _asyncToGenerator6(n) {
6040
6235
  var Root4 = function(_ref) {
6041
6236
  "use no memo";
6042
6237
  var children = _ref.children, onSubmitArg = _ref.onSubmit, isDisabledArg = _ref.isDisabled, style = _ref.style, className = _ref.className;
6043
- var _useState3 = _sliced_to_array(useState3([]), 2), files = _useState3[0], setFiles = _useState3[1];
6238
+ var _useState4 = _sliced_to_array(useState4([]), 2), files = _useState4[0], setFiles = _useState4[1];
6044
6239
  var formProps = useForm(formOptions);
6045
6240
  var handleSubmit = formProps.handleSubmit, isSubmitting = formProps.formState.isSubmitting, reset = formProps.reset, watch = formProps.watch;
6046
6241
  var addToast = useToasts().addToast;
@@ -6054,7 +6249,7 @@ var Root4 = function(_ref) {
6054
6249
  })
6055
6250
  }).createMessage;
6056
6251
  var isMutatingMessage = useIsMutatingMessage();
6057
- var isFileLoading = useMemo12(function() {
6252
+ var isFileLoading = useMemo13(function() {
6058
6253
  return files.some(function(file) {
6059
6254
  return isOptimistic({
6060
6255
  id: file.id
@@ -6063,14 +6258,14 @@ var Root4 = function(_ref) {
6063
6258
  }, [
6064
6259
  files
6065
6260
  ]);
6066
- var isLoading = useMemo12(function() {
6261
+ var isLoading = useMemo13(function() {
6067
6262
  return isMutatingMessage || isSubmitting;
6068
6263
  }, [
6069
6264
  isMutatingMessage,
6070
6265
  isSubmitting
6071
6266
  ]);
6072
6267
  var latestMessage = useLatestMessage().latestMessage;
6073
- var isDisabled = useMemo12(function() {
6268
+ var isDisabled = useMemo13(function() {
6074
6269
  var _latestMessage$metada;
6075
6270
  return(// @ts-ignore-next-line
6076
6271
  (latestMessage === null || latestMessage === void 0 || (_latestMessage$metada = latestMessage.metadata) === null || _latestMessage$metada === void 0 ? void 0 : _latestMessage$metada.isBlocking) || isDisabledArg);
@@ -6169,10 +6364,10 @@ var usePrevious = function(state) {
6169
6364
  return ref.current;
6170
6365
  };
6171
6366
  // src/components/threads/Thread/MessageForm/Field/Control.tsx
6172
- import { useContext as useContext11, useMemo as useMemo13, useRef as useRef5, useEffect as useEffect6 } from "react";
6367
+ import { useContext as useContext12, useMemo as useMemo14, useRef as useRef5, useEffect as useEffect6 } from "react";
6173
6368
  // src/components/textareas/TextareaBase/index.tsx
6174
6369
  import { c as _c39 } from "react-compiler-runtime";
6175
- import { forwardRef as forwardRef3 } from "react";
6370
+ import { forwardRef as forwardRef4 } from "react";
6176
6371
  import TextareaAutosize from "react-textarea-autosize";
6177
6372
  import { jsx as _jsx65, Fragment as _Fragment3, jsxs as _jsxs22 } from "react/jsx-runtime";
6178
6373
  var _excluded2 = [
@@ -6240,7 +6435,7 @@ function _objectWithoutPropertiesLoose2(r, e) {
6240
6435
  }
6241
6436
  return t;
6242
6437
  }
6243
- var TextareaBase = /* @__PURE__ */ forwardRef3(function TextareaBase2(t0, ref) {
6438
+ var TextareaBase = /* @__PURE__ */ forwardRef4(function TextareaBase2(t0, ref) {
6244
6439
  var _className;
6245
6440
  var $ = _c39(14);
6246
6441
  var className;
@@ -6376,10 +6571,10 @@ var Root5 = function(_ref) {
6376
6571
  var Input = function(props) {
6377
6572
  "use no memo";
6378
6573
  var _props$placeholder;
6379
- var assistantNameContext = useContext11(AssistantNameContext);
6574
+ var assistantNameContext = useContext12(AssistantNameContext);
6380
6575
  var register = useFormContext().register;
6381
6576
  var _useMessageFormContext = useMessageFormContext(), isDisabled = _useMessageFormContext.isDisabled, isLoading = _useMessageFormContext.isLoading;
6382
- var isSubmitDisabled = useMemo13(function() {
6577
+ var isSubmitDisabled = useMemo14(function() {
6383
6578
  return isDisabled || isLoading;
6384
6579
  }, [
6385
6580
  isDisabled,
@@ -7351,7 +7546,7 @@ import { Flex as Flex25 } from "@radix-ui/themes";
7351
7546
  var Provider2 = SuperinterfaceProvider;
7352
7547
  // src/components/toasts/ToastsProvider/index.tsx
7353
7548
  import { c as _c42 } from "react-compiler-runtime";
7354
- import { useState as useState4, useCallback as useCallback3 } from "react";
7549
+ import { useState as useState5, useCallback as useCallback3 } from "react";
7355
7550
  import * as Toast2 from "@radix-ui/react-toast";
7356
7551
  // src/components/toasts/ToastsProvider/CustomToast.tsx
7357
7552
  import * as Toast from "@radix-ui/react-toast";
@@ -7399,7 +7594,7 @@ var ToastsProvider = function(t0) {
7399
7594
  } else {
7400
7595
  t2 = $[0];
7401
7596
  }
7402
- var _useState4 = _sliced_to_array(useState4(t2), 2), toasts = _useState4[0], setToasts = _useState4[1];
7597
+ var _useState5 = _sliced_to_array(useState5(t2), 2), toasts = _useState5[0], setToasts = _useState5[1];
7403
7598
  var t3;
7404
7599
  if ($[1] === Symbol.for("react.memo_cache_sentinel")) {
7405
7600
  t3 = function(toast) {
@@ -7632,13 +7827,13 @@ Thread.Root = Root8;
7632
7827
  Thread.Messages = Messages;
7633
7828
  Thread.MessageForm = MessageForm;
7634
7829
  // src/hooks/messages/useMessageContext/index.ts
7635
- import { useContext as useContext12 } from "react";
7830
+ import { useContext as useContext13 } from "react";
7636
7831
  var useMessageContext = function() {
7637
- return useContext12(MessageContext);
7832
+ return useContext13(MessageContext);
7638
7833
  };
7639
7834
  // src/hooks/assistants/useAssistant/index.ts
7640
7835
  import { c as _c43 } from "react-compiler-runtime";
7641
- import { useMemo as useMemo14 } from "react";
7836
+ import { useMemo as useMemo15 } from "react";
7642
7837
  import { useQuery } from "@tanstack/react-query";
7643
7838
  // src/hooks/assistants/useAssistant/lib/queryOptions/index.ts
7644
7839
  import { queryOptions as tanstackQueryOptions } from "@tanstack/react-query";
@@ -7821,17 +8016,17 @@ var useAssistant = function(t0) {
7821
8016
  };
7822
8017
  // src/components/threads/ThreadDialog/Provider/index.tsx
7823
8018
  import { c as _c44 } from "react-compiler-runtime";
7824
- import { useState as useState5 } from "react";
8019
+ import { useState as useState6 } from "react";
7825
8020
  // src/contexts/threads/ThreadDialogContext/index.ts
7826
- import { createContext as createContext11 } from "react";
7827
- var ThreadDialogContext = /* @__PURE__ */ createContext11({
8021
+ import { createContext as createContext12 } from "react";
8022
+ var ThreadDialogContext = /* @__PURE__ */ createContext12({
7828
8023
  isOpen: false,
7829
8024
  setIsOpen: function() {}
7830
8025
  });
7831
8026
  // src/hooks/threads/useThreadDialogContext/index.ts
7832
- import { useContext as useContext13 } from "react";
8027
+ import { useContext as useContext14 } from "react";
7833
8028
  var useThreadDialogContext = function() {
7834
- return useContext13(ThreadDialogContext);
8029
+ return useContext14(ThreadDialogContext);
7835
8030
  };
7836
8031
  // src/components/threads/ThreadDialog/Provider/index.tsx
7837
8032
  import { jsx as _jsx75 } from "react/jsx-runtime";
@@ -7839,7 +8034,7 @@ var Provider4 = function(t0) {
7839
8034
  var $ = _c44(5);
7840
8035
  var children = t0.children;
7841
8036
  var threadDialogContext = useThreadDialogContext();
7842
- var _useState5 = _sliced_to_array(useState5(threadDialogContext.isOpen), 2), isOpen = _useState5[0], setIsOpen = _useState5[1];
8037
+ var _useState6 = _sliced_to_array(useState6(threadDialogContext.isOpen), 2), isOpen = _useState6[0], setIsOpen = _useState6[1];
7843
8038
  var t1;
7844
8039
  if ($[0] !== isOpen) {
7845
8040
  t1 = {
@@ -8384,7 +8579,7 @@ ThreadDialog.Content = Content7;
8384
8579
  import { c as _c52 } from "react-compiler-runtime";
8385
8580
  import { Flex as Flex29 } from "@radix-ui/themes";
8386
8581
  // src/contexts/threads/AudioThreadContext/index.ts
8387
- import { createContext as createContext12 } from "react";
8582
+ import { createContext as createContext13 } from "react";
8388
8583
  function asyncGeneratorStep10(n, t, e, r, o, a, c) {
8389
8584
  try {
8390
8585
  var i = n[a](c), u = i.value;
@@ -8408,7 +8603,7 @@ function _asyncToGenerator10(n) {
8408
8603
  });
8409
8604
  };
8410
8605
  }
8411
- var AudioThreadContext = /* @__PURE__ */ createContext12({
8606
+ var AudioThreadContext = /* @__PURE__ */ createContext13({
8412
8607
  status: "idle",
8413
8608
  recorderProps: {
8414
8609
  status: "idle",
@@ -8502,7 +8697,7 @@ var AudioThreadContext = /* @__PURE__ */ createContext12({
8502
8697
  });
8503
8698
  // src/hooks/misc/usePermission/index.ts
8504
8699
  import { c as _c48 } from "react-compiler-runtime";
8505
- import { useEffect as useEffect7, useState as useState6 } from "react";
8700
+ import { useEffect as useEffect7, useState as useState7 } from "react";
8506
8701
  // src/hooks/misc/usePermission/util.ts
8507
8702
  var noop = function() {};
8508
8703
  function on(obj) {
@@ -8526,7 +8721,7 @@ function off(obj) {
8526
8721
  // src/hooks/misc/usePermission/index.ts
8527
8722
  var usePermission = function(permissionDesc) {
8528
8723
  var $ = _c48(3);
8529
- var _useState6 = _sliced_to_array(useState6(""), 2), state = _useState6[0], setState = _useState6[1];
8724
+ var _useState7 = _sliced_to_array(useState7(""), 2), state = _useState7[0], setState = _useState7[1];
8530
8725
  var t0;
8531
8726
  var t1;
8532
8727
  if ($[0] !== permissionDesc) {
@@ -8580,7 +8775,7 @@ var blobToData = function(blob) {
8580
8775
  };
8581
8776
  // src/hooks/audioThreads/useStatus/index.ts
8582
8777
  import { c as _c49 } from "react-compiler-runtime";
8583
- import { useMemo as useMemo15 } from "react";
8778
+ import { useMemo as useMemo16 } from "react";
8584
8779
  var useStatus = function(t0) {
8585
8780
  var $ = _c49(2);
8586
8781
  var messageAudioProps = t0.messageAudioProps, recorderProps = t0.recorderProps, createMessageProps = t0.createMessageProps;
@@ -8638,7 +8833,7 @@ var useStatus = function(t0) {
8638
8833
  // src/hooks/audioThreads/useRecorder/index.ts
8639
8834
  import dayjs3 from "dayjs";
8640
8835
  import { useAudioCapture } from "use-audio-capture";
8641
- import { useMemo as useMemo16, useRef as useRef7, useState as useState7, useCallback as useCallback4, useEffect as useEffect9 } from "react";
8836
+ import { useMemo as useMemo17, useRef as useRef7, useState as useState8, useCallback as useCallback4, useEffect as useEffect9 } from "react";
8642
8837
  import { useAudioPlayer } from "react-use-audio-player";
8643
8838
  // src/hooks/misc/useInterval.ts
8644
8839
  import { c as _c50 } from "react-compiler-runtime";
@@ -8752,13 +8947,13 @@ function _asyncToGenerator11(n) {
8752
8947
  }
8753
8948
  var useRecorder = function(_ref) {
8754
8949
  var isStopOnSilence = _ref.isStopOnSilence, _onStart = _ref.onStart, _onStop = _ref.onStop;
8755
- var _useState7 = _sliced_to_array(useState7(null), 2), silenceStart = _useState7[0], setSilenceStart = _useState7[1];
8756
- var _useState71 = _sliced_to_array(useState7(null), 2), noiseStart = _useState71[0], setNoiseStart = _useState71[1];
8757
- var _useState72 = _sliced_to_array(useState7(null), 2), mediaStream = _useState72[0], setMediaStream = _useState72[1];
8758
- var _useState73 = _sliced_to_array(useState7("idle"), 2), status = _useState73[0], setStatus = _useState73[1];
8950
+ var _useState8 = _sliced_to_array(useState8(null), 2), silenceStart = _useState8[0], setSilenceStart = _useState8[1];
8951
+ var _useState81 = _sliced_to_array(useState8(null), 2), noiseStart = _useState81[0], setNoiseStart = _useState81[1];
8952
+ var _useState82 = _sliced_to_array(useState8(null), 2), mediaStream = _useState82[0], setMediaStream = _useState82[1];
8953
+ var _useState83 = _sliced_to_array(useState8("idle"), 2), status = _useState83[0], setStatus = _useState83[1];
8759
8954
  var startAudioPlayer = useAudioPlayer();
8760
8955
  var endAudioPlayer = useAudioPlayer();
8761
- var _useState74 = _sliced_to_array(useState7(false), 2), isLoaded = _useState74[0], setIsLoaded = _useState74[1];
8956
+ var _useState84 = _sliced_to_array(useState8(false), 2), isLoaded = _useState84[0], setIsLoaded = _useState84[1];
8762
8957
  useEffect9(function() {
8763
8958
  if (isLoaded) return;
8764
8959
  setIsLoaded(true);
@@ -8819,7 +9014,7 @@ var useRecorder = function(_ref) {
8819
9014
  setNoiseStart(null);
8820
9015
  }
8821
9016
  });
8822
- var _useState75 = _sliced_to_array(useState7(null), 2), audioEngine = _useState75[0], setAudioEngine = _useState75[1];
9017
+ var _useState85 = _sliced_to_array(useState8(null), 2), audioEngine = _useState85[0], setAudioEngine = _useState85[1];
8823
9018
  var isInited = useRef7(false);
8824
9019
  useEffect9(function() {
8825
9020
  if (!mediaStream) return;
@@ -8834,7 +9029,7 @@ var useRecorder = function(_ref) {
8834
9029
  isInited,
8835
9030
  mediaStream
8836
9031
  ]);
8837
- var visualizationAnalyser = useMemo16(function() {
9032
+ var visualizationAnalyser = useMemo17(function() {
8838
9033
  if (!audioEngine) return null;
8839
9034
  var result = audioEngine.audioContext.createAnalyser();
8840
9035
  audioEngine.source.connect(result);
@@ -8842,7 +9037,7 @@ var useRecorder = function(_ref) {
8842
9037
  }, [
8843
9038
  audioEngine
8844
9039
  ]);
8845
- var silenceAnalyser = useMemo16(function() {
9040
+ var silenceAnalyser = useMemo17(function() {
8846
9041
  if (!audioEngine) return null;
8847
9042
  var result_0 = audioEngine.audioContext.createAnalyser();
8848
9043
  result_0.minDecibels = -60;
@@ -8898,7 +9093,7 @@ var useRecorder = function(_ref) {
8898
9093
  };
8899
9094
  // src/hooks/audioThreads/useMessageAudio/index.ts
8900
9095
  import { c as _c51 } from "react-compiler-runtime";
8901
- import { useMemo as useMemo17, useRef as useRef8, useState as useState8, useEffect as useEffect10 } from "react";
9096
+ import { useMemo as useMemo18, useRef as useRef8, useState as useState9, useEffect as useEffect10 } from "react";
8902
9097
  import nlp from "compromise";
8903
9098
  import { Howler } from "howler";
8904
9099
  import { useAudioPlayer as useAudioPlayer2 } from "react-use-audio-player";
@@ -8981,7 +9176,7 @@ var getMessageSentences = function(_ref) {
8981
9176
  var useMessageAudio = function(t0) {
8982
9177
  var $ = _c51(44);
8983
9178
  var onEnd = t0.onEnd;
8984
- var _useState8 = _sliced_to_array(useState8(false), 2), isAudioPlayed = _useState8[0], setIsAudioPlayed = _useState8[1];
9179
+ var _useState9 = _sliced_to_array(useState9(false), 2), isAudioPlayed = _useState9[0], setIsAudioPlayed = _useState9[1];
8985
9180
  var t1;
8986
9181
  if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
8987
9182
  t1 = [];
@@ -8989,7 +9184,7 @@ var useMessageAudio = function(t0) {
8989
9184
  } else {
8990
9185
  t1 = $[0];
8991
9186
  }
8992
- var _useState81 = _sliced_to_array(useState8(t1), 2), stoppedMessageIds = _useState81[0], setStoppedMessageIds = _useState81[1];
9187
+ var _useState91 = _sliced_to_array(useState9(t1), 2), stoppedMessageIds = _useState91[0], setStoppedMessageIds = _useState91[1];
8993
9188
  var t2;
8994
9189
  if ($[1] === Symbol.for("react.memo_cache_sentinel")) {
8995
9190
  t2 = [];
@@ -8997,11 +9192,11 @@ var useMessageAudio = function(t0) {
8997
9192
  } else {
8998
9193
  t2 = $[1];
8999
9194
  }
9000
- var _useState82 = _sliced_to_array(useState8(t2), 2), playedMessageSentences = _useState82[0], setPlayedMessageSentences = _useState82[1];
9195
+ var _useState92 = _sliced_to_array(useState9(t2), 2), playedMessageSentences = _useState92[0], setPlayedMessageSentences = _useState92[1];
9001
9196
  var audioPlayer = useAudioPlayer2();
9002
9197
  var nextAudioPlayer = useAudioPlayer2();
9003
9198
  var superinterfaceContext = useSuperinterfaceContext();
9004
- var _useState83 = _sliced_to_array(useState8(false), 2), isPlaying = _useState83[0], setIsPlaying = _useState83[1];
9199
+ var _useState93 = _sliced_to_array(useState9(false), 2), isPlaying = _useState93[0], setIsPlaying = _useState93[1];
9005
9200
  var latestMessageProps = useLatestMessage();
9006
9201
  var t3;
9007
9202
  bb0: {
@@ -9205,7 +9400,7 @@ var useMessageAudio = function(t0) {
9205
9400
  t6 = $[31];
9206
9401
  }
9207
9402
  useEffect10(_temp11, t6);
9208
- var _useState84 = _sliced_to_array(useState8(null), 2), audioEngine = _useState84[0], setAudioEngine = _useState84[1];
9403
+ var _useState94 = _sliced_to_array(useState9(null), 2), audioEngine = _useState94[0], setAudioEngine = _useState94[1];
9209
9404
  var isAudioEngineInited = useRef8(false);
9210
9405
  var t7;
9211
9406
  if ($[32] !== audioPlayer.playing) {
@@ -9554,24 +9749,24 @@ function _temp24() {
9554
9749
  return _temp24.apply(this, arguments);
9555
9750
  }
9556
9751
  // src/components/threads/AudioThread/Visualization/index.tsx
9557
- import { useContext as useContext15, useState as useState10, useCallback as useCallback6, useEffect as useEffect12 } from "react";
9752
+ import { useContext as useContext16, useState as useState11, useCallback as useCallback6, useEffect as useEffect12 } from "react";
9558
9753
  import _9 from "lodash";
9559
9754
  import { Flex as Flex31 } from "@radix-ui/themes";
9560
9755
  // src/hooks/threads/useAudioThreadContext/index.ts
9561
- import { useContext as useContext14 } from "react";
9756
+ import { useContext as useContext15 } from "react";
9562
9757
  var useAudioThreadContext = function() {
9563
- return useContext14(AudioThreadContext);
9758
+ return useContext15(AudioThreadContext);
9564
9759
  };
9565
9760
  // src/components/threads/AudioThread/BarsVisualizer/index.tsx
9566
9761
  import _8 from "lodash";
9567
9762
  import { Flex as Flex30, Grid } from "@radix-ui/themes";
9568
- import { useState as useState9, useEffect as useEffect11, useCallback as useCallback5 } from "react";
9763
+ import { useState as useState10, useEffect as useEffect11, useCallback as useCallback5 } from "react";
9569
9764
  import { cluster } from "radash";
9570
9765
  import { jsx as _jsx83 } from "react/jsx-runtime";
9571
9766
  var barCount = 4;
9572
9767
  var BarsVisualizer = function(_ref) {
9573
9768
  var visualizationAnalyser = _ref.visualizationAnalyser, backgroundColor = _ref.backgroundColor, height = _ref.height, barWidth = _ref.barWidth;
9574
- var _useState9 = _sliced_to_array(useState9([]), 2), barHeights = _useState9[0], setBarHeights = _useState9[1];
9769
+ var _useState10 = _sliced_to_array(useState10([]), 2), barHeights = _useState10[0], setBarHeights = _useState10[1];
9575
9770
  var draw = useCallback5(function(_ref2) {
9576
9771
  var visualizationAnalyser_0 = _ref2.visualizationAnalyser;
9577
9772
  if (!visualizationAnalyser_0) {
@@ -9673,8 +9868,8 @@ function _toPrimitive47(t, r) {
9673
9868
  }
9674
9869
  var Visualization = function(props) {
9675
9870
  var audioThreadContext = useAudioThreadContext();
9676
- var assistantNameContext = useContext15(AssistantNameContext);
9677
- var _useState10 = _sliced_to_array(useState10(0), 2), scale = _useState10[0], setScale = _useState10[1];
9871
+ var assistantNameContext = useContext16(AssistantNameContext);
9872
+ var _useState11 = _sliced_to_array(useState11(0), 2), scale = _useState11[0], setScale = _useState11[1];
9678
9873
  var draw = useCallback6(function(_ref) {
9679
9874
  var visualizationAnalyser = _ref.visualizationAnalyser;
9680
9875
  if (!visualizationAnalyser) {
@@ -10442,7 +10637,7 @@ AudioThreadDialog.Trigger = Trigger;
10442
10637
  AudioThreadDialog.Content = Content7;
10443
10638
  // src/components/markdown/MarkdownProvider/index.tsx
10444
10639
  import { c as _c56 } from "react-compiler-runtime";
10445
- import { useMemo as useMemo18 } from "react";
10640
+ import { useMemo as useMemo19 } from "react";
10446
10641
  import { jsx as _jsx92 } from "react/jsx-runtime";
10447
10642
  var _excluded5 = [
10448
10643
  "children"
@@ -10626,7 +10821,7 @@ var ImageAvatar = function(t0) {
10626
10821
  };
10627
10822
  // src/components/iconAvatars/IconAvatar.tsx
10628
10823
  import { c as _c58 } from "react-compiler-runtime";
10629
- import { useMemo as useMemo19 } from "react";
10824
+ import { useMemo as useMemo20 } from "react";
10630
10825
  import { Avatar as Avatar5 } from "@radix-ui/themes";
10631
10826
  // src/lib/iconAvatars/iconAvatarComponents.ts
10632
10827
  import { BackpackIcon, RocketIcon, MagicWandIcon, CubeIcon, TargetIcon, DiscIcon, GlobeIcon, StarIcon, LightningBoltIcon as LightningBoltIcon2, FaceIcon, PersonIcon as PersonIcon2, HeartIcon } from "@radix-ui/react-icons";
@@ -10639,11 +10834,11 @@ var IconAvatar = function(t0) {
10639
10834
  var iconAvatar = t0.iconAvatar, size = t0.size, className = t0.className, style = t0.style;
10640
10835
  var t1;
10641
10836
  t1 = iconAvatarComponents[iconAvatar.name];
10642
- var Component = t1;
10837
+ var Component2 = t1;
10643
10838
  var t2;
10644
- if ($[0] !== Component) {
10645
- t2 = Component ? /* @__PURE__ */ _jsx94(Component, {}) : "";
10646
- $[0] = Component;
10839
+ if ($[0] !== Component2) {
10840
+ t2 = Component2 ? /* @__PURE__ */ _jsx94(Component2, {}) : "";
10841
+ $[0] = Component2;
10647
10842
  $[1] = t2;
10648
10843
  } else {
10649
10844
  t2 = $[1];
@@ -10731,11 +10926,11 @@ var Avatar6 = function(t0) {
10731
10926
  };
10732
10927
  // src/components/components/ComponentsProvider.tsx
10733
10928
  import { c as _c60 } from "react-compiler-runtime";
10734
- import { useMemo as useMemo20 } from "react";
10929
+ import { useMemo as useMemo21 } from "react";
10735
10930
  // src/hooks/components/useComponents.ts
10736
- import { useContext as useContext16 } from "react";
10931
+ import { useContext as useContext17 } from "react";
10737
10932
  var useComponents = function() {
10738
- return useContext16(ComponentsContext);
10933
+ return useContext17(ComponentsContext);
10739
10934
  };
10740
10935
  // src/components/components/ComponentsProvider.tsx
10741
10936
  import { jsx as _jsx96 } from "react/jsx-runtime";