@superinterface/react 3.6.0 → 3.6.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
@@ -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) {
@@ -4562,6 +4743,7 @@ var TextContent = function(t0) {
4562
4743
  case 1:
4563
4744
  compiled = _state.sent();
4564
4745
  code = String(compiled);
4746
+ console.log(code);
4565
4747
  return [
4566
4748
  4,
4567
4749
  evaluate({
@@ -4615,26 +4797,40 @@ var TextContent = function(t0) {
4615
4797
  return content.text.value;
4616
4798
  }
4617
4799
  var t5;
4618
- if ($[7] !== MDXComponent) {
4619
- t5 = /* @__PURE__ */ _jsx44(MDXComponent, {});
4620
- $[7] = MDXComponent;
4621
- $[8] = t5;
4800
+ if ($[7] === Symbol.for("react.memo_cache_sentinel")) {
4801
+ t5 = /* @__PURE__ */ _jsx44(Badge2, {
4802
+ color: "red",
4803
+ mb: "2",
4804
+ children: "Could not render message."
4805
+ });
4806
+ $[7] = t5;
4622
4807
  } else {
4623
- t5 = $[8];
4808
+ t5 = $[7];
4624
4809
  }
4625
4810
  var t6;
4626
- if ($[9] !== components2 || $[10] !== t5) {
4627
- t6 = /* @__PURE__ */ _jsx44(MDXProvider, {
4628
- components: components2,
4629
- children: t5
4811
+ if ($[8] !== MDXComponent) {
4812
+ t6 = /* @__PURE__ */ _jsx44(MDXComponent, {});
4813
+ $[8] = MDXComponent;
4814
+ $[9] = t6;
4815
+ } else {
4816
+ t6 = $[9];
4817
+ }
4818
+ var t7;
4819
+ if ($[10] !== components2 || $[11] !== t6) {
4820
+ t7 = /* @__PURE__ */ _jsx44(ErrorBoundary, {
4821
+ fallback: t5,
4822
+ children: /* @__PURE__ */ _jsx44(MDXProvider, {
4823
+ components: components2,
4824
+ children: t6
4825
+ })
4630
4826
  });
4631
- $[9] = components2;
4632
- $[10] = t5;
4827
+ $[10] = components2;
4633
4828
  $[11] = t6;
4829
+ $[12] = t7;
4634
4830
  } else {
4635
- t6 = $[11];
4831
+ t7 = $[12];
4636
4832
  }
4637
- return t6;
4833
+ return t7;
4638
4834
  };
4639
4835
  // src/components/threads/Thread/Message/ContentPart/ImageFileContent.tsx
4640
4836
  import { c as _c24 } from "react-compiler-runtime";
@@ -4951,7 +5147,7 @@ import { c as _c33 } from "react-compiler-runtime";
4951
5147
  import { useEffect as useEffect3 } from "react";
4952
5148
  // src/hooks/messageGroups/useMessageGroups/index.ts
4953
5149
  import { c as _c27 } from "react-compiler-runtime";
4954
- import { useMemo as useMemo10 } from "react";
5150
+ import { useMemo as useMemo11 } from "react";
4955
5151
  // src/hooks/messageGroups/useMessageGroups/lib/messageGroups/index.ts
4956
5152
  import _6 from "lodash";
4957
5153
  import { last as last2 } from "radash";
@@ -5083,14 +5279,14 @@ var useMessageGroups = function(t0) {
5083
5279
  };
5084
5280
  // src/components/skeletons/MessagesSkeleton/index.tsx
5085
5281
  import { c as _c29 } from "react-compiler-runtime";
5086
- import { forwardRef as forwardRef2 } from "react";
5282
+ import { forwardRef as forwardRef3 } from "react";
5087
5283
  import { Flex as Flex13, Avatar, Box as Box10, Skeleton as Skeleton2 } from "@radix-ui/themes";
5088
5284
  // src/components/messageGroups/MessageGroupBase/index.tsx
5089
5285
  import { c as _c28 } from "react-compiler-runtime";
5090
- import { forwardRef } from "react";
5286
+ import { forwardRef as forwardRef2 } from "react";
5091
5287
  import { Flex as Flex11, Container } from "@radix-ui/themes";
5092
5288
  import { jsx as _jsx48 } from "react/jsx-runtime";
5093
- var MessageGroupBase = /* @__PURE__ */ forwardRef(function MessageGroupBase2(t0, ref) {
5289
+ var MessageGroupBase = /* @__PURE__ */ forwardRef2(function MessageGroupBase2(t0, ref) {
5094
5290
  var $ = _c28(5);
5095
5291
  var children = t0.children;
5096
5292
  var t1;
@@ -5138,7 +5334,7 @@ var Name = function(_ref) {
5138
5334
  };
5139
5335
  // src/components/skeletons/MessagesSkeleton/index.tsx
5140
5336
  import { jsx as _jsx50, jsxs as _jsxs17 } from "react/jsx-runtime";
5141
- var MessagesSkeleton = /* @__PURE__ */ forwardRef2(function MessagesSkeleton2(_props, ref) {
5337
+ var MessagesSkeleton = /* @__PURE__ */ forwardRef3(function MessagesSkeleton2(_props, ref) {
5142
5338
  var $ = _c29(7);
5143
5339
  var t0;
5144
5340
  if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
@@ -5231,18 +5427,18 @@ var MessagesSkeleton = /* @__PURE__ */ forwardRef2(function MessagesSkeleton2(_p
5231
5427
  });
5232
5428
  // src/components/threads/Thread/Messages/Content/MessageGroup/index.tsx
5233
5429
  import { c as _c32 } from "react-compiler-runtime";
5234
- import { useContext as useContext8 } from "react";
5430
+ import { useContext as useContext9 } from "react";
5235
5431
  import { Box as Box11 } from "@radix-ui/themes";
5236
5432
  // src/components/messageGroups/MessageGroupBase/AssistantAvatar.tsx
5237
5433
  import { c as _c30 } from "react-compiler-runtime";
5238
- import { useContext as useContext6 } from "react";
5434
+ import { useContext as useContext7 } from "react";
5239
5435
  import { Flex as Flex14 } from "@radix-ui/themes";
5240
5436
  // src/contexts/assistants/AssistantAvatarContext/index.tsx
5241
- import { createContext as createContext7 } from "react";
5437
+ import { createContext as createContext8 } from "react";
5242
5438
  import { Avatar as Avatar2 } from "@radix-ui/themes";
5243
5439
  import { LightningBoltIcon } from "@radix-ui/react-icons";
5244
5440
  import { jsx as _jsx51 } from "react/jsx-runtime";
5245
- var AssistantAvatarContext = /* @__PURE__ */ createContext7(/* @__PURE__ */ _jsx51(Avatar2, {
5441
+ var AssistantAvatarContext = /* @__PURE__ */ createContext8(/* @__PURE__ */ _jsx51(Avatar2, {
5246
5442
  fallback: /* @__PURE__ */ _jsx51(LightningBoltIcon, {}),
5247
5443
  size: "1"
5248
5444
  }));
@@ -5250,7 +5446,7 @@ var AssistantAvatarContext = /* @__PURE__ */ createContext7(/* @__PURE__ */ _jsx
5250
5446
  import { jsx as _jsx52 } from "react/jsx-runtime";
5251
5447
  var AssistantAvatar = function() {
5252
5448
  var $ = _c30(3);
5253
- var AssistantAvatarContextValue = useContext6(AssistantAvatarContext);
5449
+ var AssistantAvatarContextValue = useContext7(AssistantAvatarContext);
5254
5450
  var t0;
5255
5451
  if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
5256
5452
  t0 = {
@@ -5278,18 +5474,18 @@ var AssistantAvatar = function() {
5278
5474
  return t1;
5279
5475
  };
5280
5476
  // src/contexts/assistants/AssistantNameContext/index.tsx
5281
- import { createContext as createContext8 } from "react";
5282
- var AssistantNameContext = /* @__PURE__ */ createContext8("Assistant");
5477
+ import { createContext as createContext9 } from "react";
5478
+ var AssistantNameContext = /* @__PURE__ */ createContext9("Assistant");
5283
5479
  // src/components/messageGroups/MessageGroupBase/UserAvatar.tsx
5284
5480
  import { c as _c31 } from "react-compiler-runtime";
5285
- import { useContext as useContext7 } from "react";
5481
+ import { useContext as useContext8 } from "react";
5286
5482
  import { Flex as Flex15 } from "@radix-ui/themes";
5287
5483
  // src/contexts/users/UserAvatarContext/index.tsx
5288
- import { createContext as createContext9 } from "react";
5484
+ import { createContext as createContext10 } from "react";
5289
5485
  import { Avatar as Avatar3 } from "@radix-ui/themes";
5290
5486
  import { PersonIcon } from "@radix-ui/react-icons";
5291
5487
  import { jsx as _jsx53 } from "react/jsx-runtime";
5292
- var UserAvatarContext = /* @__PURE__ */ createContext9(/* @__PURE__ */ _jsx53(Avatar3, {
5488
+ var UserAvatarContext = /* @__PURE__ */ createContext10(/* @__PURE__ */ _jsx53(Avatar3, {
5293
5489
  fallback: /* @__PURE__ */ _jsx53(PersonIcon, {}),
5294
5490
  size: "1"
5295
5491
  }));
@@ -5297,7 +5493,7 @@ var UserAvatarContext = /* @__PURE__ */ createContext9(/* @__PURE__ */ _jsx53(Av
5297
5493
  import { jsx as _jsx54 } from "react/jsx-runtime";
5298
5494
  var UserAvatar = function() {
5299
5495
  var $ = _c31(3);
5300
- var UserAvatarContextValue = useContext7(UserAvatarContext);
5496
+ var UserAvatarContextValue = useContext8(UserAvatarContext);
5301
5497
  var t0;
5302
5498
  if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
5303
5499
  t0 = {
@@ -5343,7 +5539,7 @@ import { jsx as _jsx56, jsxs as _jsxs18 } from "react/jsx-runtime";
5343
5539
  var MessageGroup = function(t0) {
5344
5540
  var $ = _c32(12);
5345
5541
  var messageGroup = t0.messageGroup;
5346
- var assistantNameContext = useContext8(AssistantNameContext);
5542
+ var assistantNameContext = useContext9(AssistantNameContext);
5347
5543
  var t1;
5348
5544
  if ($[0] !== messageGroup.role) {
5349
5545
  t1 = messageGroup.role === "user" ? /* @__PURE__ */ _jsx56(UserAvatar, {}) : /* @__PURE__ */ _jsx56(AssistantAvatar, {});
@@ -5482,16 +5678,16 @@ function _temp5(messageGroup) {
5482
5678
  }
5483
5679
  // src/components/threads/Thread/Messages/Progress/index.tsx
5484
5680
  import { c as _c35 } from "react-compiler-runtime";
5485
- import { useMemo as useMemo11 } from "react";
5681
+ import { useMemo as useMemo12 } from "react";
5486
5682
  // src/components/skeletons/StartingSkeleton/index.tsx
5487
5683
  import { c as _c34 } from "react-compiler-runtime";
5488
- import { useContext as useContext9 } from "react";
5684
+ import { useContext as useContext10 } from "react";
5489
5685
  import { Box as Box12 } from "@radix-ui/themes";
5490
5686
  import { jsx as _jsx58, jsxs as _jsxs19 } from "react/jsx-runtime";
5491
5687
  var StartingSkeleton = function(t0) {
5492
5688
  var $ = _c34(7);
5493
5689
  var children = t0.children;
5494
- var assistantNameContext = useContext9(AssistantNameContext);
5690
+ var assistantNameContext = useContext10(AssistantNameContext);
5495
5691
  var t1;
5496
5692
  if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
5497
5693
  t1 = /* @__PURE__ */ _jsx58(AssistantAvatar, {});
@@ -5814,10 +6010,10 @@ import { c as _c38 } from "react-compiler-runtime";
5814
6010
  import { ArrowUpIcon as ArrowUpIcon2, StopIcon } from "@radix-ui/react-icons";
5815
6011
  import { IconButton as IconButton5, Flex as Flex19 } from "@radix-ui/themes";
5816
6012
  // src/hooks/messages/useMessageFormContext/index.ts
5817
- import { useContext as useContext10 } from "react";
6013
+ import { useContext as useContext11 } from "react";
5818
6014
  // src/contexts/messages/MessageFormContext/index.ts
5819
- import { createContext as createContext10 } from "react";
5820
- var MessageFormContext = /* @__PURE__ */ createContext10({
6015
+ import { createContext as createContext11 } from "react";
6016
+ var MessageFormContext = /* @__PURE__ */ createContext11({
5821
6017
  content: "",
5822
6018
  isDisabled: false,
5823
6019
  isLoading: false,
@@ -5827,7 +6023,7 @@ var MessageFormContext = /* @__PURE__ */ createContext10({
5827
6023
  });
5828
6024
  // src/hooks/messages/useMessageFormContext/index.ts
5829
6025
  var useMessageFormContext = function() {
5830
- return useContext10(MessageFormContext);
6026
+ return useContext11(MessageFormContext);
5831
6027
  };
5832
6028
  // src/components/threads/Thread/MessageForm/Submit/index.tsx
5833
6029
  import { jsx as _jsx63 } from "react/jsx-runtime";
@@ -5956,7 +6152,7 @@ Submit.Root = Root3;
5956
6152
  Submit.Button = Button3;
5957
6153
  // src/components/threads/Thread/MessageForm/Root/index.tsx
5958
6154
  import { useQueryClient as useQueryClient4 } from "@tanstack/react-query";
5959
- import { useMemo as useMemo12, useState as useState3 } from "react";
6155
+ import { useMemo as useMemo13, useState as useState4 } from "react";
5960
6156
  import { useForm, FormProvider } from "react-hook-form";
5961
6157
  import { Box as Box13 } from "@radix-ui/themes";
5962
6158
  // src/components/threads/Thread/MessageForm/Root/lib/formOptions.ts
@@ -6040,7 +6236,7 @@ function _asyncToGenerator6(n) {
6040
6236
  var Root4 = function(_ref) {
6041
6237
  "use no memo";
6042
6238
  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];
6239
+ var _useState4 = _sliced_to_array(useState4([]), 2), files = _useState4[0], setFiles = _useState4[1];
6044
6240
  var formProps = useForm(formOptions);
6045
6241
  var handleSubmit = formProps.handleSubmit, isSubmitting = formProps.formState.isSubmitting, reset = formProps.reset, watch = formProps.watch;
6046
6242
  var addToast = useToasts().addToast;
@@ -6054,7 +6250,7 @@ var Root4 = function(_ref) {
6054
6250
  })
6055
6251
  }).createMessage;
6056
6252
  var isMutatingMessage = useIsMutatingMessage();
6057
- var isFileLoading = useMemo12(function() {
6253
+ var isFileLoading = useMemo13(function() {
6058
6254
  return files.some(function(file) {
6059
6255
  return isOptimistic({
6060
6256
  id: file.id
@@ -6063,14 +6259,14 @@ var Root4 = function(_ref) {
6063
6259
  }, [
6064
6260
  files
6065
6261
  ]);
6066
- var isLoading = useMemo12(function() {
6262
+ var isLoading = useMemo13(function() {
6067
6263
  return isMutatingMessage || isSubmitting;
6068
6264
  }, [
6069
6265
  isMutatingMessage,
6070
6266
  isSubmitting
6071
6267
  ]);
6072
6268
  var latestMessage = useLatestMessage().latestMessage;
6073
- var isDisabled = useMemo12(function() {
6269
+ var isDisabled = useMemo13(function() {
6074
6270
  var _latestMessage$metada;
6075
6271
  return(// @ts-ignore-next-line
6076
6272
  (latestMessage === null || latestMessage === void 0 || (_latestMessage$metada = latestMessage.metadata) === null || _latestMessage$metada === void 0 ? void 0 : _latestMessage$metada.isBlocking) || isDisabledArg);
@@ -6169,10 +6365,10 @@ var usePrevious = function(state) {
6169
6365
  return ref.current;
6170
6366
  };
6171
6367
  // src/components/threads/Thread/MessageForm/Field/Control.tsx
6172
- import { useContext as useContext11, useMemo as useMemo13, useRef as useRef5, useEffect as useEffect6 } from "react";
6368
+ import { useContext as useContext12, useMemo as useMemo14, useRef as useRef5, useEffect as useEffect6 } from "react";
6173
6369
  // src/components/textareas/TextareaBase/index.tsx
6174
6370
  import { c as _c39 } from "react-compiler-runtime";
6175
- import { forwardRef as forwardRef3 } from "react";
6371
+ import { forwardRef as forwardRef4 } from "react";
6176
6372
  import TextareaAutosize from "react-textarea-autosize";
6177
6373
  import { jsx as _jsx65, Fragment as _Fragment3, jsxs as _jsxs22 } from "react/jsx-runtime";
6178
6374
  var _excluded2 = [
@@ -6240,7 +6436,7 @@ function _objectWithoutPropertiesLoose2(r, e) {
6240
6436
  }
6241
6437
  return t;
6242
6438
  }
6243
- var TextareaBase = /* @__PURE__ */ forwardRef3(function TextareaBase2(t0, ref) {
6439
+ var TextareaBase = /* @__PURE__ */ forwardRef4(function TextareaBase2(t0, ref) {
6244
6440
  var _className;
6245
6441
  var $ = _c39(14);
6246
6442
  var className;
@@ -6376,10 +6572,10 @@ var Root5 = function(_ref) {
6376
6572
  var Input = function(props) {
6377
6573
  "use no memo";
6378
6574
  var _props$placeholder;
6379
- var assistantNameContext = useContext11(AssistantNameContext);
6575
+ var assistantNameContext = useContext12(AssistantNameContext);
6380
6576
  var register = useFormContext().register;
6381
6577
  var _useMessageFormContext = useMessageFormContext(), isDisabled = _useMessageFormContext.isDisabled, isLoading = _useMessageFormContext.isLoading;
6382
- var isSubmitDisabled = useMemo13(function() {
6578
+ var isSubmitDisabled = useMemo14(function() {
6383
6579
  return isDisabled || isLoading;
6384
6580
  }, [
6385
6581
  isDisabled,
@@ -7351,7 +7547,7 @@ import { Flex as Flex25 } from "@radix-ui/themes";
7351
7547
  var Provider2 = SuperinterfaceProvider;
7352
7548
  // src/components/toasts/ToastsProvider/index.tsx
7353
7549
  import { c as _c42 } from "react-compiler-runtime";
7354
- import { useState as useState4, useCallback as useCallback3 } from "react";
7550
+ import { useState as useState5, useCallback as useCallback3 } from "react";
7355
7551
  import * as Toast2 from "@radix-ui/react-toast";
7356
7552
  // src/components/toasts/ToastsProvider/CustomToast.tsx
7357
7553
  import * as Toast from "@radix-ui/react-toast";
@@ -7399,7 +7595,7 @@ var ToastsProvider = function(t0) {
7399
7595
  } else {
7400
7596
  t2 = $[0];
7401
7597
  }
7402
- var _useState4 = _sliced_to_array(useState4(t2), 2), toasts = _useState4[0], setToasts = _useState4[1];
7598
+ var _useState5 = _sliced_to_array(useState5(t2), 2), toasts = _useState5[0], setToasts = _useState5[1];
7403
7599
  var t3;
7404
7600
  if ($[1] === Symbol.for("react.memo_cache_sentinel")) {
7405
7601
  t3 = function(toast) {
@@ -7632,13 +7828,13 @@ Thread.Root = Root8;
7632
7828
  Thread.Messages = Messages;
7633
7829
  Thread.MessageForm = MessageForm;
7634
7830
  // src/hooks/messages/useMessageContext/index.ts
7635
- import { useContext as useContext12 } from "react";
7831
+ import { useContext as useContext13 } from "react";
7636
7832
  var useMessageContext = function() {
7637
- return useContext12(MessageContext);
7833
+ return useContext13(MessageContext);
7638
7834
  };
7639
7835
  // src/hooks/assistants/useAssistant/index.ts
7640
7836
  import { c as _c43 } from "react-compiler-runtime";
7641
- import { useMemo as useMemo14 } from "react";
7837
+ import { useMemo as useMemo15 } from "react";
7642
7838
  import { useQuery } from "@tanstack/react-query";
7643
7839
  // src/hooks/assistants/useAssistant/lib/queryOptions/index.ts
7644
7840
  import { queryOptions as tanstackQueryOptions } from "@tanstack/react-query";
@@ -7821,17 +8017,17 @@ var useAssistant = function(t0) {
7821
8017
  };
7822
8018
  // src/components/threads/ThreadDialog/Provider/index.tsx
7823
8019
  import { c as _c44 } from "react-compiler-runtime";
7824
- import { useState as useState5 } from "react";
8020
+ import { useState as useState6 } from "react";
7825
8021
  // src/contexts/threads/ThreadDialogContext/index.ts
7826
- import { createContext as createContext11 } from "react";
7827
- var ThreadDialogContext = /* @__PURE__ */ createContext11({
8022
+ import { createContext as createContext12 } from "react";
8023
+ var ThreadDialogContext = /* @__PURE__ */ createContext12({
7828
8024
  isOpen: false,
7829
8025
  setIsOpen: function() {}
7830
8026
  });
7831
8027
  // src/hooks/threads/useThreadDialogContext/index.ts
7832
- import { useContext as useContext13 } from "react";
8028
+ import { useContext as useContext14 } from "react";
7833
8029
  var useThreadDialogContext = function() {
7834
- return useContext13(ThreadDialogContext);
8030
+ return useContext14(ThreadDialogContext);
7835
8031
  };
7836
8032
  // src/components/threads/ThreadDialog/Provider/index.tsx
7837
8033
  import { jsx as _jsx75 } from "react/jsx-runtime";
@@ -7839,7 +8035,7 @@ var Provider4 = function(t0) {
7839
8035
  var $ = _c44(5);
7840
8036
  var children = t0.children;
7841
8037
  var threadDialogContext = useThreadDialogContext();
7842
- var _useState5 = _sliced_to_array(useState5(threadDialogContext.isOpen), 2), isOpen = _useState5[0], setIsOpen = _useState5[1];
8038
+ var _useState6 = _sliced_to_array(useState6(threadDialogContext.isOpen), 2), isOpen = _useState6[0], setIsOpen = _useState6[1];
7843
8039
  var t1;
7844
8040
  if ($[0] !== isOpen) {
7845
8041
  t1 = {
@@ -8384,7 +8580,7 @@ ThreadDialog.Content = Content7;
8384
8580
  import { c as _c52 } from "react-compiler-runtime";
8385
8581
  import { Flex as Flex29 } from "@radix-ui/themes";
8386
8582
  // src/contexts/threads/AudioThreadContext/index.ts
8387
- import { createContext as createContext12 } from "react";
8583
+ import { createContext as createContext13 } from "react";
8388
8584
  function asyncGeneratorStep10(n, t, e, r, o, a, c) {
8389
8585
  try {
8390
8586
  var i = n[a](c), u = i.value;
@@ -8408,7 +8604,7 @@ function _asyncToGenerator10(n) {
8408
8604
  });
8409
8605
  };
8410
8606
  }
8411
- var AudioThreadContext = /* @__PURE__ */ createContext12({
8607
+ var AudioThreadContext = /* @__PURE__ */ createContext13({
8412
8608
  status: "idle",
8413
8609
  recorderProps: {
8414
8610
  status: "idle",
@@ -8502,7 +8698,7 @@ var AudioThreadContext = /* @__PURE__ */ createContext12({
8502
8698
  });
8503
8699
  // src/hooks/misc/usePermission/index.ts
8504
8700
  import { c as _c48 } from "react-compiler-runtime";
8505
- import { useEffect as useEffect7, useState as useState6 } from "react";
8701
+ import { useEffect as useEffect7, useState as useState7 } from "react";
8506
8702
  // src/hooks/misc/usePermission/util.ts
8507
8703
  var noop = function() {};
8508
8704
  function on(obj) {
@@ -8526,7 +8722,7 @@ function off(obj) {
8526
8722
  // src/hooks/misc/usePermission/index.ts
8527
8723
  var usePermission = function(permissionDesc) {
8528
8724
  var $ = _c48(3);
8529
- var _useState6 = _sliced_to_array(useState6(""), 2), state = _useState6[0], setState = _useState6[1];
8725
+ var _useState7 = _sliced_to_array(useState7(""), 2), state = _useState7[0], setState = _useState7[1];
8530
8726
  var t0;
8531
8727
  var t1;
8532
8728
  if ($[0] !== permissionDesc) {
@@ -8580,7 +8776,7 @@ var blobToData = function(blob) {
8580
8776
  };
8581
8777
  // src/hooks/audioThreads/useStatus/index.ts
8582
8778
  import { c as _c49 } from "react-compiler-runtime";
8583
- import { useMemo as useMemo15 } from "react";
8779
+ import { useMemo as useMemo16 } from "react";
8584
8780
  var useStatus = function(t0) {
8585
8781
  var $ = _c49(2);
8586
8782
  var messageAudioProps = t0.messageAudioProps, recorderProps = t0.recorderProps, createMessageProps = t0.createMessageProps;
@@ -8638,7 +8834,7 @@ var useStatus = function(t0) {
8638
8834
  // src/hooks/audioThreads/useRecorder/index.ts
8639
8835
  import dayjs3 from "dayjs";
8640
8836
  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";
8837
+ import { useMemo as useMemo17, useRef as useRef7, useState as useState8, useCallback as useCallback4, useEffect as useEffect9 } from "react";
8642
8838
  import { useAudioPlayer } from "react-use-audio-player";
8643
8839
  // src/hooks/misc/useInterval.ts
8644
8840
  import { c as _c50 } from "react-compiler-runtime";
@@ -8752,13 +8948,13 @@ function _asyncToGenerator11(n) {
8752
8948
  }
8753
8949
  var useRecorder = function(_ref) {
8754
8950
  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];
8951
+ var _useState8 = _sliced_to_array(useState8(null), 2), silenceStart = _useState8[0], setSilenceStart = _useState8[1];
8952
+ var _useState81 = _sliced_to_array(useState8(null), 2), noiseStart = _useState81[0], setNoiseStart = _useState81[1];
8953
+ var _useState82 = _sliced_to_array(useState8(null), 2), mediaStream = _useState82[0], setMediaStream = _useState82[1];
8954
+ var _useState83 = _sliced_to_array(useState8("idle"), 2), status = _useState83[0], setStatus = _useState83[1];
8759
8955
  var startAudioPlayer = useAudioPlayer();
8760
8956
  var endAudioPlayer = useAudioPlayer();
8761
- var _useState74 = _sliced_to_array(useState7(false), 2), isLoaded = _useState74[0], setIsLoaded = _useState74[1];
8957
+ var _useState84 = _sliced_to_array(useState8(false), 2), isLoaded = _useState84[0], setIsLoaded = _useState84[1];
8762
8958
  useEffect9(function() {
8763
8959
  if (isLoaded) return;
8764
8960
  setIsLoaded(true);
@@ -8819,7 +9015,7 @@ var useRecorder = function(_ref) {
8819
9015
  setNoiseStart(null);
8820
9016
  }
8821
9017
  });
8822
- var _useState75 = _sliced_to_array(useState7(null), 2), audioEngine = _useState75[0], setAudioEngine = _useState75[1];
9018
+ var _useState85 = _sliced_to_array(useState8(null), 2), audioEngine = _useState85[0], setAudioEngine = _useState85[1];
8823
9019
  var isInited = useRef7(false);
8824
9020
  useEffect9(function() {
8825
9021
  if (!mediaStream) return;
@@ -8834,7 +9030,7 @@ var useRecorder = function(_ref) {
8834
9030
  isInited,
8835
9031
  mediaStream
8836
9032
  ]);
8837
- var visualizationAnalyser = useMemo16(function() {
9033
+ var visualizationAnalyser = useMemo17(function() {
8838
9034
  if (!audioEngine) return null;
8839
9035
  var result = audioEngine.audioContext.createAnalyser();
8840
9036
  audioEngine.source.connect(result);
@@ -8842,7 +9038,7 @@ var useRecorder = function(_ref) {
8842
9038
  }, [
8843
9039
  audioEngine
8844
9040
  ]);
8845
- var silenceAnalyser = useMemo16(function() {
9041
+ var silenceAnalyser = useMemo17(function() {
8846
9042
  if (!audioEngine) return null;
8847
9043
  var result_0 = audioEngine.audioContext.createAnalyser();
8848
9044
  result_0.minDecibels = -60;
@@ -8898,7 +9094,7 @@ var useRecorder = function(_ref) {
8898
9094
  };
8899
9095
  // src/hooks/audioThreads/useMessageAudio/index.ts
8900
9096
  import { c as _c51 } from "react-compiler-runtime";
8901
- import { useMemo as useMemo17, useRef as useRef8, useState as useState8, useEffect as useEffect10 } from "react";
9097
+ import { useMemo as useMemo18, useRef as useRef8, useState as useState9, useEffect as useEffect10 } from "react";
8902
9098
  import nlp from "compromise";
8903
9099
  import { Howler } from "howler";
8904
9100
  import { useAudioPlayer as useAudioPlayer2 } from "react-use-audio-player";
@@ -8981,7 +9177,7 @@ var getMessageSentences = function(_ref) {
8981
9177
  var useMessageAudio = function(t0) {
8982
9178
  var $ = _c51(44);
8983
9179
  var onEnd = t0.onEnd;
8984
- var _useState8 = _sliced_to_array(useState8(false), 2), isAudioPlayed = _useState8[0], setIsAudioPlayed = _useState8[1];
9180
+ var _useState9 = _sliced_to_array(useState9(false), 2), isAudioPlayed = _useState9[0], setIsAudioPlayed = _useState9[1];
8985
9181
  var t1;
8986
9182
  if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
8987
9183
  t1 = [];
@@ -8989,7 +9185,7 @@ var useMessageAudio = function(t0) {
8989
9185
  } else {
8990
9186
  t1 = $[0];
8991
9187
  }
8992
- var _useState81 = _sliced_to_array(useState8(t1), 2), stoppedMessageIds = _useState81[0], setStoppedMessageIds = _useState81[1];
9188
+ var _useState91 = _sliced_to_array(useState9(t1), 2), stoppedMessageIds = _useState91[0], setStoppedMessageIds = _useState91[1];
8993
9189
  var t2;
8994
9190
  if ($[1] === Symbol.for("react.memo_cache_sentinel")) {
8995
9191
  t2 = [];
@@ -8997,11 +9193,11 @@ var useMessageAudio = function(t0) {
8997
9193
  } else {
8998
9194
  t2 = $[1];
8999
9195
  }
9000
- var _useState82 = _sliced_to_array(useState8(t2), 2), playedMessageSentences = _useState82[0], setPlayedMessageSentences = _useState82[1];
9196
+ var _useState92 = _sliced_to_array(useState9(t2), 2), playedMessageSentences = _useState92[0], setPlayedMessageSentences = _useState92[1];
9001
9197
  var audioPlayer = useAudioPlayer2();
9002
9198
  var nextAudioPlayer = useAudioPlayer2();
9003
9199
  var superinterfaceContext = useSuperinterfaceContext();
9004
- var _useState83 = _sliced_to_array(useState8(false), 2), isPlaying = _useState83[0], setIsPlaying = _useState83[1];
9200
+ var _useState93 = _sliced_to_array(useState9(false), 2), isPlaying = _useState93[0], setIsPlaying = _useState93[1];
9005
9201
  var latestMessageProps = useLatestMessage();
9006
9202
  var t3;
9007
9203
  bb0: {
@@ -9205,7 +9401,7 @@ var useMessageAudio = function(t0) {
9205
9401
  t6 = $[31];
9206
9402
  }
9207
9403
  useEffect10(_temp11, t6);
9208
- var _useState84 = _sliced_to_array(useState8(null), 2), audioEngine = _useState84[0], setAudioEngine = _useState84[1];
9404
+ var _useState94 = _sliced_to_array(useState9(null), 2), audioEngine = _useState94[0], setAudioEngine = _useState94[1];
9209
9405
  var isAudioEngineInited = useRef8(false);
9210
9406
  var t7;
9211
9407
  if ($[32] !== audioPlayer.playing) {
@@ -9554,24 +9750,24 @@ function _temp24() {
9554
9750
  return _temp24.apply(this, arguments);
9555
9751
  }
9556
9752
  // src/components/threads/AudioThread/Visualization/index.tsx
9557
- import { useContext as useContext15, useState as useState10, useCallback as useCallback6, useEffect as useEffect12 } from "react";
9753
+ import { useContext as useContext16, useState as useState11, useCallback as useCallback6, useEffect as useEffect12 } from "react";
9558
9754
  import _9 from "lodash";
9559
9755
  import { Flex as Flex31 } from "@radix-ui/themes";
9560
9756
  // src/hooks/threads/useAudioThreadContext/index.ts
9561
- import { useContext as useContext14 } from "react";
9757
+ import { useContext as useContext15 } from "react";
9562
9758
  var useAudioThreadContext = function() {
9563
- return useContext14(AudioThreadContext);
9759
+ return useContext15(AudioThreadContext);
9564
9760
  };
9565
9761
  // src/components/threads/AudioThread/BarsVisualizer/index.tsx
9566
9762
  import _8 from "lodash";
9567
9763
  import { Flex as Flex30, Grid } from "@radix-ui/themes";
9568
- import { useState as useState9, useEffect as useEffect11, useCallback as useCallback5 } from "react";
9764
+ import { useState as useState10, useEffect as useEffect11, useCallback as useCallback5 } from "react";
9569
9765
  import { cluster } from "radash";
9570
9766
  import { jsx as _jsx83 } from "react/jsx-runtime";
9571
9767
  var barCount = 4;
9572
9768
  var BarsVisualizer = function(_ref) {
9573
9769
  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];
9770
+ var _useState10 = _sliced_to_array(useState10([]), 2), barHeights = _useState10[0], setBarHeights = _useState10[1];
9575
9771
  var draw = useCallback5(function(_ref2) {
9576
9772
  var visualizationAnalyser_0 = _ref2.visualizationAnalyser;
9577
9773
  if (!visualizationAnalyser_0) {
@@ -9673,8 +9869,8 @@ function _toPrimitive47(t, r) {
9673
9869
  }
9674
9870
  var Visualization = function(props) {
9675
9871
  var audioThreadContext = useAudioThreadContext();
9676
- var assistantNameContext = useContext15(AssistantNameContext);
9677
- var _useState10 = _sliced_to_array(useState10(0), 2), scale = _useState10[0], setScale = _useState10[1];
9872
+ var assistantNameContext = useContext16(AssistantNameContext);
9873
+ var _useState11 = _sliced_to_array(useState11(0), 2), scale = _useState11[0], setScale = _useState11[1];
9678
9874
  var draw = useCallback6(function(_ref) {
9679
9875
  var visualizationAnalyser = _ref.visualizationAnalyser;
9680
9876
  if (!visualizationAnalyser) {
@@ -10442,7 +10638,7 @@ AudioThreadDialog.Trigger = Trigger;
10442
10638
  AudioThreadDialog.Content = Content7;
10443
10639
  // src/components/markdown/MarkdownProvider/index.tsx
10444
10640
  import { c as _c56 } from "react-compiler-runtime";
10445
- import { useMemo as useMemo18 } from "react";
10641
+ import { useMemo as useMemo19 } from "react";
10446
10642
  import { jsx as _jsx92 } from "react/jsx-runtime";
10447
10643
  var _excluded5 = [
10448
10644
  "children"
@@ -10626,7 +10822,7 @@ var ImageAvatar = function(t0) {
10626
10822
  };
10627
10823
  // src/components/iconAvatars/IconAvatar.tsx
10628
10824
  import { c as _c58 } from "react-compiler-runtime";
10629
- import { useMemo as useMemo19 } from "react";
10825
+ import { useMemo as useMemo20 } from "react";
10630
10826
  import { Avatar as Avatar5 } from "@radix-ui/themes";
10631
10827
  // src/lib/iconAvatars/iconAvatarComponents.ts
10632
10828
  import { BackpackIcon, RocketIcon, MagicWandIcon, CubeIcon, TargetIcon, DiscIcon, GlobeIcon, StarIcon, LightningBoltIcon as LightningBoltIcon2, FaceIcon, PersonIcon as PersonIcon2, HeartIcon } from "@radix-ui/react-icons";
@@ -10639,11 +10835,11 @@ var IconAvatar = function(t0) {
10639
10835
  var iconAvatar = t0.iconAvatar, size = t0.size, className = t0.className, style = t0.style;
10640
10836
  var t1;
10641
10837
  t1 = iconAvatarComponents[iconAvatar.name];
10642
- var Component = t1;
10838
+ var Component2 = t1;
10643
10839
  var t2;
10644
- if ($[0] !== Component) {
10645
- t2 = Component ? /* @__PURE__ */ _jsx94(Component, {}) : "";
10646
- $[0] = Component;
10840
+ if ($[0] !== Component2) {
10841
+ t2 = Component2 ? /* @__PURE__ */ _jsx94(Component2, {}) : "";
10842
+ $[0] = Component2;
10647
10843
  $[1] = t2;
10648
10844
  } else {
10649
10845
  t2 = $[1];
@@ -10731,11 +10927,11 @@ var Avatar6 = function(t0) {
10731
10927
  };
10732
10928
  // src/components/components/ComponentsProvider.tsx
10733
10929
  import { c as _c60 } from "react-compiler-runtime";
10734
- import { useMemo as useMemo20 } from "react";
10930
+ import { useMemo as useMemo21 } from "react";
10735
10931
  // src/hooks/components/useComponents.ts
10736
- import { useContext as useContext16 } from "react";
10932
+ import { useContext as useContext17 } from "react";
10737
10933
  var useComponents = function() {
10738
- return useContext16(ComponentsContext);
10934
+ return useContext17(ComponentsContext);
10739
10935
  };
10740
10936
  // src/components/components/ComponentsProvider.tsx
10741
10937
  import { jsx as _jsx96 } from "react/jsx-runtime";