@superinterface/react 3.11.1 → 3.13.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -8601,7 +8601,7 @@ ThreadDialog.Root = Root9;
8601
8601
  ThreadDialog.Trigger = Trigger;
8602
8602
  ThreadDialog.Content = Content7;
8603
8603
  // src/components/threads/AudioThread/Root/index.tsx
8604
- import { c as _c51 } from "react-compiler-runtime";
8604
+ import { c as _c52 } from "react-compiler-runtime";
8605
8605
  import { Flex as Flex29 } from "@radix-ui/themes";
8606
8606
  // src/contexts/threads/AudioThreadContext/index.ts
8607
8607
  import { createContext as createContext13 } from "react";
@@ -8613,6 +8613,8 @@ import { useContext as useContext15 } from "react";
8613
8613
  var useAudioThreadContext = function() {
8614
8614
  return useContext15(AudioThreadContext);
8615
8615
  };
8616
+ // src/components/audioRuntimes/TtsAudioRuntimeProvider.tsx
8617
+ import { c as _c51 } from "react-compiler-runtime";
8616
8618
  // src/hooks/audioRuntimes/useTtsAudioRuntime/index.ts
8617
8619
  import { c as _c50 } from "react-compiler-runtime";
8618
8620
  import { useMemo as useMemo18 } from "react";
@@ -9595,8 +9597,48 @@ function _temp23() {
9595
9597
  });
9596
9598
  return _temp23.apply(this, arguments);
9597
9599
  }
9598
- // src/components/threads/AudioThread/Root/index.tsx
9600
+ // src/components/audioRuntimes/TtsAudioRuntimeProvider.tsx
9599
9601
  import { jsx as _jsx82 } from "react/jsx-runtime";
9602
+ var TtsAudioRuntimeProvider = function(t0) {
9603
+ var $ = _c51(7);
9604
+ var children = t0.children, play = t0.play;
9605
+ var t1;
9606
+ if ($[0] !== play) {
9607
+ t1 = {
9608
+ play: play
9609
+ };
9610
+ $[0] = play;
9611
+ $[1] = t1;
9612
+ } else {
9613
+ t1 = $[1];
9614
+ }
9615
+ var ttsAudioRuntime = useTtsAudioRuntime(t1).ttsAudioRuntime;
9616
+ var t2;
9617
+ if ($[2] !== ttsAudioRuntime) {
9618
+ t2 = {
9619
+ audioRuntime: ttsAudioRuntime
9620
+ };
9621
+ $[2] = ttsAudioRuntime;
9622
+ $[3] = t2;
9623
+ } else {
9624
+ t2 = $[3];
9625
+ }
9626
+ var t3;
9627
+ if ($[4] !== children || $[5] !== t2) {
9628
+ t3 = /* @__PURE__ */ _jsx82(AudioThreadContext.Provider, {
9629
+ value: t2,
9630
+ children: children
9631
+ });
9632
+ $[4] = children;
9633
+ $[5] = t2;
9634
+ $[6] = t3;
9635
+ } else {
9636
+ t3 = $[6];
9637
+ }
9638
+ return t3;
9639
+ };
9640
+ // src/components/threads/AudioThread/Root/index.tsx
9641
+ import { jsx as _jsx83 } from "react/jsx-runtime";
9600
9642
  var _excluded5 = [
9601
9643
  "children"
9602
9644
  ];
@@ -9669,7 +9711,7 @@ function _objectWithoutPropertiesLoose5(r, e) {
9669
9711
  }
9670
9712
  var Content8 = function(_ref) {
9671
9713
  var children = _ref.children, className = _ref.className, style = _ref.style;
9672
- return /* @__PURE__ */ _jsx82(Flex29, {
9714
+ return /* @__PURE__ */ _jsx83(Flex29, {
9673
9715
  direction: "column",
9674
9716
  flexGrow: "1",
9675
9717
  p: "9",
@@ -9678,46 +9720,8 @@ var Content8 = function(_ref) {
9678
9720
  children: children
9679
9721
  });
9680
9722
  };
9681
- var TtsAudioRuntime = function(t0) {
9682
- var $ = _c51(7);
9683
- var children = t0.children, play = t0.play;
9684
- var t1;
9685
- if ($[0] !== play) {
9686
- t1 = {
9687
- play: play
9688
- };
9689
- $[0] = play;
9690
- $[1] = t1;
9691
- } else {
9692
- t1 = $[1];
9693
- }
9694
- var ttsAudioRuntime = useTtsAudioRuntime(t1).ttsAudioRuntime;
9695
- var t2;
9696
- if ($[2] !== ttsAudioRuntime) {
9697
- t2 = {
9698
- audioRuntime: ttsAudioRuntime
9699
- };
9700
- $[2] = ttsAudioRuntime;
9701
- $[3] = t2;
9702
- } else {
9703
- t2 = $[3];
9704
- }
9705
- var t3;
9706
- if ($[4] !== children || $[5] !== t2) {
9707
- t3 = /* @__PURE__ */ _jsx82(AudioThreadContext.Provider, {
9708
- value: t2,
9709
- children: children
9710
- });
9711
- $[4] = children;
9712
- $[5] = t2;
9713
- $[6] = t3;
9714
- } else {
9715
- t3 = $[6];
9716
- }
9717
- return t3;
9718
- };
9719
9723
  var AudioRuntimeProvider = function(t0) {
9720
- var $ = _c51(3);
9724
+ var $ = _c52(3);
9721
9725
  var children = t0.children, play = t0.play;
9722
9726
  var audioThreadContext = useAudioThreadContext();
9723
9727
  if (audioThreadContext.audioRuntime) {
@@ -9725,7 +9729,7 @@ var AudioRuntimeProvider = function(t0) {
9725
9729
  }
9726
9730
  var t1;
9727
9731
  if ($[0] !== children || $[1] !== play) {
9728
- t1 = /* @__PURE__ */ _jsx82(TtsAudioRuntime, {
9732
+ t1 = /* @__PURE__ */ _jsx83(TtsAudioRuntimeProvider, {
9729
9733
  play: play,
9730
9734
  children: children
9731
9735
  });
@@ -9738,7 +9742,7 @@ var AudioRuntimeProvider = function(t0) {
9738
9742
  return t1;
9739
9743
  };
9740
9744
  var Provider5 = function(t0) {
9741
- var $ = _c51(9);
9745
+ var $ = _c52(9);
9742
9746
  var children;
9743
9747
  var rest;
9744
9748
  if ($[0] !== t0) {
@@ -9765,7 +9769,7 @@ var Provider5 = function(t0) {
9765
9769
  }
9766
9770
  var t2;
9767
9771
  if ($[6] !== children || $[7] !== t1) {
9768
- t2 = /* @__PURE__ */ _jsx82(AudioThreadContext.Provider, {
9772
+ t2 = /* @__PURE__ */ _jsx83(AudioThreadContext.Provider, {
9769
9773
  value: t1,
9770
9774
  children: children
9771
9775
  });
@@ -9779,11 +9783,11 @@ var Provider5 = function(t0) {
9779
9783
  };
9780
9784
  var Root12 = function(_ref2) {
9781
9785
  var children = _ref2.children, play = _ref2.play, className = _ref2.className, style = _ref2.style, rest = _objectWithoutProperties5(_ref2, _excluded22);
9782
- return /* @__PURE__ */ _jsx82(Provider5, _objectSpread46(_objectSpread46({}, rest), {}, {
9783
- children: /* @__PURE__ */ _jsx82(AudioRuntimeProvider, {
9786
+ return /* @__PURE__ */ _jsx83(Provider5, _objectSpread46(_objectSpread46({}, rest), {}, {
9787
+ children: /* @__PURE__ */ _jsx83(AudioRuntimeProvider, {
9784
9788
  play: play,
9785
- children: /* @__PURE__ */ _jsx82(ToastsProvider, {
9786
- children: /* @__PURE__ */ _jsx82(Content8, {
9789
+ children: /* @__PURE__ */ _jsx83(ToastsProvider, {
9790
+ children: /* @__PURE__ */ _jsx83(Content8, {
9787
9791
  className: className,
9788
9792
  style: style,
9789
9793
  children: children
@@ -9801,7 +9805,7 @@ import _8 from "lodash";
9801
9805
  import { Flex as Flex30, Grid } from "@radix-ui/themes";
9802
9806
  import { useState as useState10, useEffect as useEffect11, useCallback as useCallback7 } from "react";
9803
9807
  import { cluster } from "radash";
9804
- import { jsx as _jsx83 } from "react/jsx-runtime";
9808
+ import { jsx as _jsx84 } from "react/jsx-runtime";
9805
9809
  var barCount = 4;
9806
9810
  var BarsVisualizer = function(_ref) {
9807
9811
  var visualizationAnalyser = _ref.visualizationAnalyser, backgroundColor = _ref.backgroundColor, height = _ref.height, barWidth = _ref.barWidth;
@@ -9832,7 +9836,7 @@ var BarsVisualizer = function(_ref) {
9832
9836
  draw,
9833
9837
  visualizationAnalyser
9834
9838
  ]);
9835
- return /* @__PURE__ */ _jsx83(Grid, {
9839
+ return /* @__PURE__ */ _jsx84(Grid, {
9836
9840
  columns: "".concat(barCount),
9837
9841
  gap: "1",
9838
9842
  width: "auto",
@@ -9841,12 +9845,12 @@ var BarsVisualizer = function(_ref) {
9841
9845
  gridTemplateColumns: "repeat(4, minmax(0, 1fr))"
9842
9846
  },
9843
9847
  children: barHeights.map(function(barHeight, index) {
9844
- return /* @__PURE__ */ _jsx83(Flex30, {
9848
+ return /* @__PURE__ */ _jsx84(Flex30, {
9845
9849
  direction: "column",
9846
9850
  align: "center",
9847
9851
  justify: "center",
9848
9852
  height: height,
9849
- children: /* @__PURE__ */ _jsx83(Flex30, {
9853
+ children: /* @__PURE__ */ _jsx84(Flex30, {
9850
9854
  minHeight: "50%",
9851
9855
  maxHeight: "100%",
9852
9856
  height: "".concat(barHeight + 20, "%"),
@@ -9861,10 +9865,10 @@ var BarsVisualizer = function(_ref) {
9861
9865
  });
9862
9866
  };
9863
9867
  // src/hooks/audioThreads/useStatus/index.ts
9864
- import { c as _c52 } from "react-compiler-runtime";
9868
+ import { c as _c53 } from "react-compiler-runtime";
9865
9869
  import { useMemo as useMemo19 } from "react";
9866
9870
  var useStatus = function() {
9867
- var $ = _c52(2);
9871
+ var $ = _c53(2);
9868
9872
  var audioRuntime = useAudioThreadContext().audioRuntime;
9869
9873
  var t0;
9870
9874
  bb0: {
@@ -9912,7 +9916,7 @@ var useStatus = function() {
9912
9916
  return t1;
9913
9917
  };
9914
9918
  // src/components/threads/AudioThread/Visualization/index.tsx
9915
- import { jsx as _jsx84, jsxs as _jsxs31 } from "react/jsx-runtime";
9919
+ import { jsx as _jsx85, jsxs as _jsxs31 } from "react/jsx-runtime";
9916
9920
  function ownKeys47(e, r) {
9917
9921
  var t = Object.keys(e);
9918
9922
  if (Object.getOwnPropertySymbols) {
@@ -9992,7 +9996,7 @@ var Visualization = function(props) {
9992
9996
  flexGrow: "1"
9993
9997
  }, props), {}, {
9994
9998
  children: [
9995
- /* @__PURE__ */ _jsx84(Flex31, {
9999
+ /* @__PURE__ */ _jsx85(Flex31, {
9996
10000
  align: "center",
9997
10001
  justify: "center",
9998
10002
  height: "200px",
@@ -10002,7 +10006,7 @@ var Visualization = function(props) {
10002
10006
  borderRadius: "9999px",
10003
10007
  scale: scale
10004
10008
  },
10005
- children: /* @__PURE__ */ _jsx84(BarsVisualizer, {
10009
+ children: /* @__PURE__ */ _jsx85(BarsVisualizer, {
10006
10010
  visualizationAnalyser: audioThreadContext.audioRuntime.assistant.visualizationAnalyser,
10007
10011
  backgroundColor: status === "playing" ? "var(--accent-11)" : "var(--gray-11)",
10008
10012
  height: "40px",
@@ -10014,8 +10018,8 @@ var Visualization = function(props) {
10014
10018
  gap: "3",
10015
10019
  pt: "5",
10016
10020
  children: [
10017
- /* @__PURE__ */ _jsx84(AssistantAvatar, {}),
10018
- /* @__PURE__ */ _jsx84(Name, {
10021
+ /* @__PURE__ */ _jsx85(AssistantAvatar, {}),
10022
+ /* @__PURE__ */ _jsx85(Name, {
10019
10023
  children: assistantNameContext
10020
10024
  })
10021
10025
  ]
@@ -10024,10 +10028,10 @@ var Visualization = function(props) {
10024
10028
  }));
10025
10029
  };
10026
10030
  // src/components/threads/AudioThread/Status/index.tsx
10027
- import { c as _c53 } from "react-compiler-runtime";
10031
+ import { c as _c54 } from "react-compiler-runtime";
10028
10032
  // src/components/threads/AudioThread/Status/StatusMessages.tsx
10029
10033
  import { Flex as Flex32, Text as Text9 } from "@radix-ui/themes";
10030
- import { jsx as _jsx85, jsxs as _jsxs32 } from "react/jsx-runtime";
10034
+ import { jsx as _jsx86, jsxs as _jsxs32 } from "react/jsx-runtime";
10031
10035
  var html = function(_ref) {
10032
10036
  var texts = _ref.texts;
10033
10037
  return "\n .status-messages-texts:after {\n content: '".concat(texts[0], "';\n animation: texts ").concat(texts.length * 5, "s linear infinite;\n }\n\n @keyframes texts {\n ").concat(texts.map(function(_10, i) {
@@ -10042,13 +10046,13 @@ var StatusMessages = function(_ref2) {
10042
10046
  className: className,
10043
10047
  style: style,
10044
10048
  children: [
10045
- /* @__PURE__ */ _jsx85(Text9, {
10049
+ /* @__PURE__ */ _jsx86(Text9, {
10046
10050
  size: "2",
10047
10051
  weight: "regular",
10048
10052
  color: "gray",
10049
10053
  className: "status-messages-texts"
10050
10054
  }),
10051
- /* @__PURE__ */ _jsx85("style", {
10055
+ /* @__PURE__ */ _jsx86("style", {
10052
10056
  dangerouslySetInnerHTML: {
10053
10057
  __html: html({
10054
10058
  texts: texts
@@ -10059,7 +10063,7 @@ var StatusMessages = function(_ref2) {
10059
10063
  });
10060
10064
  };
10061
10065
  // src/components/threads/AudioThread/Status/index.tsx
10062
- import { jsx as _jsx86 } from "react/jsx-runtime";
10066
+ import { jsx as _jsx87 } from "react/jsx-runtime";
10063
10067
  function ownKeys48(e, r) {
10064
10068
  var t = Object.keys(e);
10065
10069
  if (Object.getOwnPropertySymbols) {
@@ -10104,7 +10108,7 @@ function _toPrimitive48(t, r) {
10104
10108
  return ("string" === r ? String : Number)(t);
10105
10109
  }
10106
10110
  var Status = function(props) {
10107
- var $ = _c53(12);
10111
+ var $ = _c54(12);
10108
10112
  var status = useStatus().status;
10109
10113
  if (status === "recording") {
10110
10114
  var _t;
@@ -10121,7 +10125,7 @@ var Status = function(props) {
10121
10125
  }
10122
10126
  var _t2;
10123
10127
  if ($[1] !== props) {
10124
- _t2 = /* @__PURE__ */ _jsx86(StatusMessages, _objectSpread48({
10128
+ _t2 = /* @__PURE__ */ _jsx87(StatusMessages, _objectSpread48({
10125
10129
  texts: _t
10126
10130
  }, props));
10127
10131
  $[1] = props;
@@ -10147,7 +10151,7 @@ var Status = function(props) {
10147
10151
  }
10148
10152
  var _t4;
10149
10153
  if ($[4] !== props) {
10150
- _t4 = /* @__PURE__ */ _jsx86(StatusMessages, _objectSpread48({
10154
+ _t4 = /* @__PURE__ */ _jsx87(StatusMessages, _objectSpread48({
10151
10155
  texts: _t3
10152
10156
  }, props));
10153
10157
  $[4] = props;
@@ -10169,7 +10173,7 @@ var Status = function(props) {
10169
10173
  }
10170
10174
  var _t6;
10171
10175
  if ($[7] !== props) {
10172
- _t6 = /* @__PURE__ */ _jsx86(StatusMessages, _objectSpread48({
10176
+ _t6 = /* @__PURE__ */ _jsx87(StatusMessages, _objectSpread48({
10173
10177
  texts: _t5
10174
10178
  }, props));
10175
10179
  $[7] = props;
@@ -10190,7 +10194,7 @@ var Status = function(props) {
10190
10194
  }
10191
10195
  var t1;
10192
10196
  if ($[10] !== props) {
10193
- t1 = /* @__PURE__ */ _jsx86(StatusMessages, _objectSpread48({
10197
+ t1 = /* @__PURE__ */ _jsx87(StatusMessages, _objectSpread48({
10194
10198
  texts: t0
10195
10199
  }, props));
10196
10200
  $[10] = props;
@@ -10201,10 +10205,10 @@ var Status = function(props) {
10201
10205
  return t1;
10202
10206
  };
10203
10207
  // src/components/threads/AudioThread/Form/index.tsx
10204
- import { c as _c55 } from "react-compiler-runtime";
10208
+ import { c as _c56 } from "react-compiler-runtime";
10205
10209
  import { Flex as Flex34 } from "@radix-ui/themes";
10206
10210
  // src/components/threads/AudioThread/Form/MicIcon.tsx
10207
- import { jsx as _jsx87 } from "react/jsx-runtime";
10211
+ import { jsx as _jsx88 } from "react/jsx-runtime";
10208
10212
  function ownKeys49(e, r) {
10209
10213
  var t = Object.keys(e);
10210
10214
  if (Object.getOwnPropertySymbols) {
@@ -10249,7 +10253,7 @@ function _toPrimitive49(t, r) {
10249
10253
  return ("string" === r ? String : Number)(t);
10250
10254
  }
10251
10255
  var MicIcon = function(props) {
10252
- return /* @__PURE__ */ _jsx87("svg", _objectSpread49(_objectSpread49({
10256
+ return /* @__PURE__ */ _jsx88("svg", _objectSpread49(_objectSpread49({
10253
10257
  xmlns: "http://www.w3.org/2000/svg",
10254
10258
  fill: "currentColor",
10255
10259
  stroke: "currentColor",
@@ -10258,36 +10262,36 @@ var MicIcon = function(props) {
10258
10262
  height: "15",
10259
10263
  width: "15"
10260
10264
  }, props), {}, {
10261
- children: /* @__PURE__ */ _jsx87("path", {
10265
+ children: /* @__PURE__ */ _jsx88("path", {
10262
10266
  stroke: "none",
10263
10267
  d: "M192 0c-53 0-96 43-96 96v160c0 53 43 96 96 96s96-43 96-96V96c0-53-43-96-96-96zM64 216c0-13.3-10.7-24-24-24s-24 10.7-24 24v40c0 89.1 66.2 162.7 152 174.4V464h-48c-13.3 0-24 10.7-24 24s10.7 24 24 24h144c13.3 0 24-10.7 24-24s-10.7-24-24-24h-48v-33.6c85.8-11.7 152-85.3 152-174.4v-40c0-13.3-10.7-24-24-24s-24 10.7-24 24v40c0 70.7-57.3 128-128 128S64 326.7 64 256v-40z"
10264
10268
  })
10265
10269
  }));
10266
10270
  };
10267
10271
  // src/components/threads/AudioThread/Form/ActionButton/index.tsx
10268
- import { c as _c54 } from "react-compiler-runtime";
10272
+ import { c as _c55 } from "react-compiler-runtime";
10269
10273
  import { Flex as Flex33, IconButton as IconButton10 } from "@radix-ui/themes";
10270
10274
  import { StopIcon as StopIcon2, PauseIcon as PauseIcon2, ArrowUpIcon as ArrowUpIcon3, ResumeIcon } from "@radix-ui/react-icons";
10271
- import { jsx as _jsx88, jsxs as _jsxs33 } from "react/jsx-runtime";
10275
+ import { jsx as _jsx89, jsxs as _jsxs33 } from "react/jsx-runtime";
10272
10276
  var ActionButton = function() {
10273
- var $ = _c54(27);
10277
+ var $ = _c55(27);
10274
10278
  var status = useStatus().status;
10275
10279
  var audioThreadContext = useAudioThreadContext();
10276
10280
  var superinterfaceContext = useSuperinterfaceContext();
10277
10281
  if (status === "recording") {
10278
10282
  var _t;
10279
10283
  if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
10280
- _t = /* @__PURE__ */ _jsx88(PauseIcon2, {});
10284
+ _t = /* @__PURE__ */ _jsx89(PauseIcon2, {});
10281
10285
  $[0] = _t;
10282
10286
  } else {
10283
10287
  _t = $[0];
10284
10288
  }
10285
10289
  var t1;
10286
10290
  if ($[1] !== audioThreadContext.audioRuntime.user.pause) {
10287
- t1 = /* @__PURE__ */ _jsx88(Flex33, {
10291
+ t1 = /* @__PURE__ */ _jsx89(Flex33, {
10288
10292
  mr: "3",
10289
10293
  ml: "-7",
10290
- children: /* @__PURE__ */ _jsx88(IconButton10, {
10294
+ children: /* @__PURE__ */ _jsx89(IconButton10, {
10291
10295
  onClick: audioThreadContext.audioRuntime.user.pause,
10292
10296
  color: "gray",
10293
10297
  variant: "soft",
@@ -10302,14 +10306,14 @@ var ActionButton = function() {
10302
10306
  }
10303
10307
  var t2;
10304
10308
  if ($[3] === Symbol.for("react.memo_cache_sentinel")) {
10305
- t2 = /* @__PURE__ */ _jsx88(ArrowUpIcon3, {});
10309
+ t2 = /* @__PURE__ */ _jsx89(ArrowUpIcon3, {});
10306
10310
  $[3] = t2;
10307
10311
  } else {
10308
10312
  t2 = $[3];
10309
10313
  }
10310
10314
  var t3;
10311
10315
  if ($[4] !== audioThreadContext.audioRuntime.user.stop) {
10312
- t3 = /* @__PURE__ */ _jsx88(IconButton10, {
10316
+ t3 = /* @__PURE__ */ _jsx89(IconButton10, {
10313
10317
  onClick: audioThreadContext.audioRuntime.user.stop,
10314
10318
  highContrast: true,
10315
10319
  variant: "soft",
@@ -10341,14 +10345,14 @@ var ActionButton = function() {
10341
10345
  if (status === "recorderPaused") {
10342
10346
  var _t2;
10343
10347
  if ($[9] === Symbol.for("react.memo_cache_sentinel")) {
10344
- _t2 = /* @__PURE__ */ _jsx88(ResumeIcon, {});
10348
+ _t2 = /* @__PURE__ */ _jsx89(ResumeIcon, {});
10345
10349
  $[9] = _t2;
10346
10350
  } else {
10347
10351
  _t2 = $[9];
10348
10352
  }
10349
10353
  var _t3;
10350
10354
  if ($[10] !== audioThreadContext.audioRuntime.user.resume) {
10351
- _t3 = /* @__PURE__ */ _jsx88(IconButton10, {
10355
+ _t3 = /* @__PURE__ */ _jsx89(IconButton10, {
10352
10356
  onClick: audioThreadContext.audioRuntime.user.resume,
10353
10357
  color: "red",
10354
10358
  size: "4",
@@ -10364,7 +10368,7 @@ var ActionButton = function() {
10364
10368
  if (status === "idle") {
10365
10369
  var _t4;
10366
10370
  if ($[12] !== audioThreadContext.audioRuntime.user) {
10367
- _t4 = /* @__PURE__ */ _jsx88(IconButton10, {
10371
+ _t4 = /* @__PURE__ */ _jsx89(IconButton10, {
10368
10372
  onClick: function() {
10369
10373
  return audioThreadContext.audioRuntime.user.start();
10370
10374
  },
@@ -10396,14 +10400,14 @@ var ActionButton = function() {
10396
10400
  }
10397
10401
  var _t6;
10398
10402
  if ($[18] === Symbol.for("react.memo_cache_sentinel")) {
10399
- _t6 = /* @__PURE__ */ _jsx88(StopIcon2, {});
10403
+ _t6 = /* @__PURE__ */ _jsx89(StopIcon2, {});
10400
10404
  $[18] = _t6;
10401
10405
  } else {
10402
10406
  _t6 = $[18];
10403
10407
  }
10404
10408
  var _t7;
10405
10409
  if ($[19] !== _t5) {
10406
- _t7 = /* @__PURE__ */ _jsx88(IconButton10, {
10410
+ _t7 = /* @__PURE__ */ _jsx89(IconButton10, {
10407
10411
  onClick: _t5,
10408
10412
  size: "4",
10409
10413
  color: "gray",
@@ -10430,14 +10434,14 @@ var ActionButton = function() {
10430
10434
  }
10431
10435
  var _t9;
10432
10436
  if ($[23] === Symbol.for("react.memo_cache_sentinel")) {
10433
- _t9 = /* @__PURE__ */ _jsx88(ResumeIcon, {});
10437
+ _t9 = /* @__PURE__ */ _jsx89(ResumeIcon, {});
10434
10438
  $[23] = _t9;
10435
10439
  } else {
10436
10440
  _t9 = $[23];
10437
10441
  }
10438
10442
  var _t10;
10439
10443
  if ($[24] !== _t8) {
10440
- _t10 = /* @__PURE__ */ _jsx88(IconButton10, {
10444
+ _t10 = /* @__PURE__ */ _jsx89(IconButton10, {
10441
10445
  onClick: _t8,
10442
10446
  size: "4",
10443
10447
  children: _t9
@@ -10451,7 +10455,7 @@ var ActionButton = function() {
10451
10455
  }
10452
10456
  var t0;
10453
10457
  if ($[26] === Symbol.for("react.memo_cache_sentinel")) {
10454
- t0 = /* @__PURE__ */ _jsx88(IconButton10, {
10458
+ t0 = /* @__PURE__ */ _jsx89(IconButton10, {
10455
10459
  size: "4",
10456
10460
  variant: "soft",
10457
10461
  disabled: true
@@ -10463,7 +10467,7 @@ var ActionButton = function() {
10463
10467
  return t0;
10464
10468
  };
10465
10469
  // src/components/threads/AudioThread/Form/index.tsx
10466
- import { jsx as _jsx89, jsxs as _jsxs34 } from "react/jsx-runtime";
10470
+ import { jsx as _jsx90, jsxs as _jsxs34 } from "react/jsx-runtime";
10467
10471
  function ownKeys50(e, r) {
10468
10472
  var t = Object.keys(e);
10469
10473
  if (Object.getOwnPropertySymbols) {
@@ -10508,17 +10512,17 @@ function _toPrimitive50(t, r) {
10508
10512
  return ("string" === r ? String : Number)(t);
10509
10513
  }
10510
10514
  var Form = function(props) {
10511
- var $ = _c55(17);
10515
+ var $ = _c56(17);
10512
10516
  var status = useStatus().status;
10513
10517
  var audioThreadContext = useAudioThreadContext();
10514
10518
  var t0 = status === "recording" ? "var(--accent-11)" : "var(--gray-11)";
10515
10519
  var t1;
10516
10520
  if ($[0] !== t0) {
10517
- t1 = /* @__PURE__ */ _jsx89(Flex34, {
10521
+ t1 = /* @__PURE__ */ _jsx90(Flex34, {
10518
10522
  ml: "-22.5px",
10519
10523
  mr: "2",
10520
10524
  align: "center",
10521
- children: /* @__PURE__ */ _jsx89(MicIcon, {
10525
+ children: /* @__PURE__ */ _jsx90(MicIcon, {
10522
10526
  style: {
10523
10527
  color: t0
10524
10528
  }
@@ -10544,7 +10548,7 @@ var Form = function(props) {
10544
10548
  var t4 = status === "recording" ? "var(--accent-11)" : "var(--gray-11)";
10545
10549
  var t5;
10546
10550
  if ($[4] !== audioThreadContext.audioRuntime.user.visualizationAnalyser || $[5] !== t4) {
10547
- t5 = /* @__PURE__ */ _jsx89(BarsVisualizer, {
10551
+ t5 = /* @__PURE__ */ _jsx90(BarsVisualizer, {
10548
10552
  visualizationAnalyser: audioThreadContext.audioRuntime.user.visualizationAnalyser,
10549
10553
  backgroundColor: t4,
10550
10554
  height: "20px",
@@ -10558,7 +10562,7 @@ var Form = function(props) {
10558
10562
  }
10559
10563
  var t6;
10560
10564
  if ($[7] !== t3 || $[8] !== t5) {
10561
- t6 = /* @__PURE__ */ _jsx89(Flex34, {
10565
+ t6 = /* @__PURE__ */ _jsx90(Flex34, {
10562
10566
  px: "2",
10563
10567
  py: "1",
10564
10568
  style: t3,
@@ -10588,7 +10592,7 @@ var Form = function(props) {
10588
10592
  }
10589
10593
  var t8;
10590
10594
  if ($[13] === Symbol.for("react.memo_cache_sentinel")) {
10591
- t8 = /* @__PURE__ */ _jsx89(ActionButton, {});
10595
+ t8 = /* @__PURE__ */ _jsx90(ActionButton, {});
10592
10596
  $[13] = t8;
10593
10597
  } else {
10594
10598
  t8 = $[13];
@@ -10613,7 +10617,7 @@ var Form = function(props) {
10613
10617
  return t9;
10614
10618
  };
10615
10619
  // src/components/threads/AudioThread/index.tsx
10616
- import { jsx as _jsx90, jsxs as _jsxs35 } from "react/jsx-runtime";
10620
+ import { jsx as _jsx91, jsxs as _jsxs35 } from "react/jsx-runtime";
10617
10621
  function ownKeys51(e, r) {
10618
10622
  var t = Object.keys(e);
10619
10623
  if (Object.getOwnPropertySymbols) {
@@ -10660,9 +10664,9 @@ function _toPrimitive51(t, r) {
10660
10664
  var AudioThread = function(props) {
10661
10665
  return /* @__PURE__ */ _jsxs35(Root12, _objectSpread51(_objectSpread51({}, props), {}, {
10662
10666
  children: [
10663
- /* @__PURE__ */ _jsx90(Visualization, {}),
10664
- /* @__PURE__ */ _jsx90(Status, {}),
10665
- /* @__PURE__ */ _jsx90(Form, {})
10667
+ /* @__PURE__ */ _jsx91(Visualization, {}),
10668
+ /* @__PURE__ */ _jsx91(Status, {}),
10669
+ /* @__PURE__ */ _jsx91(Form, {})
10666
10670
  ]
10667
10671
  }));
10668
10672
  };
@@ -10671,7 +10675,7 @@ AudioThread.Visualization = Visualization;
10671
10675
  AudioThread.Status = Status;
10672
10676
  AudioThread.Form = Form;
10673
10677
  // src/components/threads/AudioThreadDialog/index.tsx
10674
- import { jsx as _jsx91, jsxs as _jsxs36 } from "react/jsx-runtime";
10678
+ import { jsx as _jsx92, jsxs as _jsxs36 } from "react/jsx-runtime";
10675
10679
  function ownKeys52(e, r) {
10676
10680
  var t = Object.keys(e);
10677
10681
  if (Object.getOwnPropertySymbols) {
@@ -10718,17 +10722,17 @@ function _toPrimitive52(t, r) {
10718
10722
  var AudioThreadDialog = function(props) {
10719
10723
  return /* @__PURE__ */ _jsxs36(Root9, _objectSpread52(_objectSpread52({}, props), {}, {
10720
10724
  children: [
10721
- /* @__PURE__ */ _jsx91(Content7.Root, {
10722
- children: /* @__PURE__ */ _jsx91(AudioThread, {})
10725
+ /* @__PURE__ */ _jsx92(Content7.Root, {
10726
+ children: /* @__PURE__ */ _jsx92(AudioThread, {})
10723
10727
  }),
10724
- /* @__PURE__ */ _jsx91(Trigger, {})
10728
+ /* @__PURE__ */ _jsx92(Trigger, {})
10725
10729
  ]
10726
10730
  }));
10727
10731
  };
10728
10732
  AudioThreadDialog.Root = Root9;
10729
10733
  AudioThreadDialog.Trigger = Trigger;
10730
10734
  AudioThreadDialog.Content = Content7;
10731
- // src/hooks/audioRuntimes/useRealtimeWebRTCAudioRuntime/index.ts
10735
+ // src/hooks/audioRuntimes/useWebrtcAudioRuntime/index.ts
10732
10736
  import { useEffect as useEffect13, useMemo as useMemo20, useRef as useRef9, useState as useState12 } from "react";
10733
10737
  function asyncGeneratorStep12(n, t, e, r, o, a, c) {
10734
10738
  try {
@@ -10753,7 +10757,7 @@ function _asyncToGenerator12(n) {
10753
10757
  });
10754
10758
  };
10755
10759
  }
10756
- var useRealtimeWebRTCAudioRuntime = function() {
10760
+ var useWebrtcAudioRuntime = function() {
10757
10761
  var startSessionIfNeeded = function startSessionIfNeeded() {
10758
10762
  return _startSessionIfNeeded.apply(this, arguments);
10759
10763
  };
@@ -10830,7 +10834,7 @@ var useRealtimeWebRTCAudioRuntime = function() {
10830
10834
  }
10831
10835
  function _initRealtimeSession() {
10832
10836
  _initRealtimeSession = _asyncToGenerator12(function() {
10833
- var peerConn, audioEl, ms, offer, searchParams, sdpResponse, answerSdp, answer, err;
10837
+ var peerConn, audioEl, ms, offer, searchParams, sdpResponse, reader, decoder, answerSdp, _ref, value, done, answer, err;
10834
10838
  return _ts_generator(this, function(_state) {
10835
10839
  switch(_state.label){
10836
10840
  case 0:
@@ -10917,12 +10921,28 @@ var useRealtimeWebRTCAudioRuntime = function() {
10917
10921
  ];
10918
10922
  case 4:
10919
10923
  sdpResponse = _state.sent();
10924
+ if (!sdpResponse.ok) {
10925
+ throw new Error("Server responded with status ".concat(sdpResponse.status));
10926
+ }
10927
+ if (!sdpResponse.body) {
10928
+ throw new Error("ReadableStream not supported in this browser.");
10929
+ }
10930
+ reader = sdpResponse.body.getReader();
10931
+ decoder = new TextDecoder("utf-8");
10932
+ answerSdp = "";
10920
10933
  return [
10921
10934
  4,
10922
- sdpResponse.text()
10935
+ reader.read()
10923
10936
  ];
10924
10937
  case 5:
10925
- answerSdp = _state.sent();
10938
+ _ref = _state.sent(), value = _ref.value, done = _ref.done;
10939
+ if (done) {
10940
+ throw new Error("Stream closed before SDP was received");
10941
+ }
10942
+ answerSdp += decoder.decode(value, {
10943
+ stream: true
10944
+ });
10945
+ console.log("Received SDP Answer:", answerSdp);
10926
10946
  answer = {
10927
10947
  type: "answer",
10928
10948
  sdp: answerSdp
@@ -10967,7 +10987,7 @@ var useRealtimeWebRTCAudioRuntime = function() {
10967
10987
  }
10968
10988
  return useMemo20(function() {
10969
10989
  return {
10970
- realtimeWebRTCAudioRuntime: {
10990
+ webrtcAudioRuntime: {
10971
10991
  user: {
10972
10992
  start: function() {
10973
10993
  var _start = _asyncToGenerator12(function() {
@@ -11160,10 +11180,41 @@ var useRealtimeWebRTCAudioRuntime = function() {
11160
11180
  assistantAudioPlayed
11161
11181
  ]);
11162
11182
  };
11183
+ // src/components/audioRuntimes/WebrtcAudioRuntimeProvider.tsx
11184
+ import { c as _c57 } from "react-compiler-runtime";
11185
+ import { jsx as _jsx93 } from "react/jsx-runtime";
11186
+ var WebrtcAudioRuntimeProvider = function(t0) {
11187
+ var $ = _c57(5);
11188
+ var children = t0.children;
11189
+ var webrtcAudioRuntime = useWebrtcAudioRuntime().webrtcAudioRuntime;
11190
+ var t1;
11191
+ if ($[0] !== webrtcAudioRuntime) {
11192
+ t1 = {
11193
+ audioRuntime: webrtcAudioRuntime
11194
+ };
11195
+ $[0] = webrtcAudioRuntime;
11196
+ $[1] = t1;
11197
+ } else {
11198
+ t1 = $[1];
11199
+ }
11200
+ var t2;
11201
+ if ($[2] !== children || $[3] !== t1) {
11202
+ t2 = /* @__PURE__ */ _jsx93(AudioThreadContext.Provider, {
11203
+ value: t1,
11204
+ children: children
11205
+ });
11206
+ $[2] = children;
11207
+ $[3] = t1;
11208
+ $[4] = t2;
11209
+ } else {
11210
+ t2 = $[4];
11211
+ }
11212
+ return t2;
11213
+ };
11163
11214
  // src/components/markdown/MarkdownProvider/index.tsx
11164
- import { c as _c56 } from "react-compiler-runtime";
11215
+ import { c as _c58 } from "react-compiler-runtime";
11165
11216
  import { useMemo as useMemo21 } from "react";
11166
- import { jsx as _jsx92 } from "react/jsx-runtime";
11217
+ import { jsx as _jsx94 } from "react/jsx-runtime";
11167
11218
  var _excluded6 = [
11168
11219
  "children"
11169
11220
  ];
@@ -11186,7 +11237,7 @@ function _objectWithoutPropertiesLoose6(r, e) {
11186
11237
  return t;
11187
11238
  }
11188
11239
  var MarkdownProvider = function(t0) {
11189
- var $ = _c56(9);
11240
+ var $ = _c58(9);
11190
11241
  var children;
11191
11242
  var rest;
11192
11243
  if ($[0] !== t0) {
@@ -11216,7 +11267,7 @@ var MarkdownProvider = function(t0) {
11216
11267
  var value = t1;
11217
11268
  var t3;
11218
11269
  if ($[6] !== children || $[7] !== value) {
11219
- t3 = /* @__PURE__ */ _jsx92(MarkdownContext.Provider, {
11270
+ t3 = /* @__PURE__ */ _jsx94(MarkdownContext.Provider, {
11220
11271
  value: value,
11221
11272
  children: children
11222
11273
  });
@@ -11229,18 +11280,18 @@ var MarkdownProvider = function(t0) {
11229
11280
  return t3;
11230
11281
  };
11231
11282
  // src/components/annotations/SourceAnnotation/index.tsx
11232
- import { c as _c59 } from "react-compiler-runtime";
11283
+ import { c as _c61 } from "react-compiler-runtime";
11233
11284
  // src/components/annotations/SourceAnnotation/FileCitation/index.tsx
11234
- import { c as _c58 } from "react-compiler-runtime";
11285
+ import { c as _c60 } from "react-compiler-runtime";
11235
11286
  import { useState as useState13 } from "react";
11236
11287
  import { QuoteIcon as QuoteIcon2 } from "@radix-ui/react-icons";
11237
11288
  import { Dialog, VisuallyHidden, IconButton as IconButton11 } from "@radix-ui/themes";
11238
11289
  // src/components/annotations/SourceAnnotation/FileCitation/Content.tsx
11239
- import { c as _c57 } from "react-compiler-runtime";
11290
+ import { c as _c59 } from "react-compiler-runtime";
11240
11291
  import { Flex as Flex35, Card as Card5, Inset as Inset3 } from "@radix-ui/themes";
11241
- import { jsx as _jsx93 } from "react/jsx-runtime";
11292
+ import { jsx as _jsx95 } from "react/jsx-runtime";
11242
11293
  var Content9 = function(t0) {
11243
- var $ = _c57(5);
11294
+ var $ = _c59(5);
11244
11295
  var fileId = t0.fileId;
11245
11296
  var superinterfaceContext = useSuperinterfaceContext();
11246
11297
  var nextSearchParams = new URLSearchParams(superinterfaceContext.variables);
@@ -11277,18 +11328,18 @@ var Content9 = function(t0) {
11277
11328
  }
11278
11329
  var t5;
11279
11330
  if ($[3] !== t3) {
11280
- t5 = /* @__PURE__ */ _jsx93(Flex35, {
11331
+ t5 = /* @__PURE__ */ _jsx95(Flex35, {
11281
11332
  direction: "column",
11282
11333
  flexGrow: "1",
11283
11334
  gap: "3",
11284
- children: /* @__PURE__ */ _jsx93(Card5, {
11335
+ children: /* @__PURE__ */ _jsx95(Card5, {
11285
11336
  style: t1,
11286
- children: /* @__PURE__ */ _jsx93(Inset3, {
11337
+ children: /* @__PURE__ */ _jsx95(Inset3, {
11287
11338
  clip: "padding-box",
11288
11339
  style: t2,
11289
- children: /* @__PURE__ */ _jsx93(Flex35, {
11340
+ children: /* @__PURE__ */ _jsx95(Flex35, {
11290
11341
  flexGrow: "1",
11291
- children: /* @__PURE__ */ _jsx93("embed", {
11342
+ children: /* @__PURE__ */ _jsx95("embed", {
11292
11343
  src: t3,
11293
11344
  style: t4
11294
11345
  })
@@ -11304,9 +11355,9 @@ var Content9 = function(t0) {
11304
11355
  return t5;
11305
11356
  };
11306
11357
  // src/components/annotations/SourceAnnotation/FileCitation/index.tsx
11307
- import { jsx as _jsx94, jsxs as _jsxs37, Fragment as _Fragment4 } from "react/jsx-runtime";
11358
+ import { jsx as _jsx96, jsxs as _jsxs37, Fragment as _Fragment4 } from "react/jsx-runtime";
11308
11359
  var FileCitation = function(t0) {
11309
- var $ = _c58(18);
11360
+ var $ = _c60(18);
11310
11361
  var annotation = t0.annotation;
11311
11362
  var _useState13 = _sliced_to_array(useState13(null), 2), activeFileId = _useState13[0], setActiveFileId = _useState13[1];
11312
11363
  var t1;
@@ -11321,14 +11372,14 @@ var FileCitation = function(t0) {
11321
11372
  }
11322
11373
  var t2;
11323
11374
  if ($[2] === Symbol.for("react.memo_cache_sentinel")) {
11324
- t2 = /* @__PURE__ */ _jsx94(QuoteIcon2, {});
11375
+ t2 = /* @__PURE__ */ _jsx96(QuoteIcon2, {});
11325
11376
  $[2] = t2;
11326
11377
  } else {
11327
11378
  t2 = $[2];
11328
11379
  }
11329
11380
  var t3;
11330
11381
  if ($[3] !== t1) {
11331
- t3 = /* @__PURE__ */ _jsx94(IconButton11, {
11382
+ t3 = /* @__PURE__ */ _jsx96(IconButton11, {
11332
11383
  variant: "soft",
11333
11384
  color: "gray",
11334
11385
  size: "1",
@@ -11364,9 +11415,9 @@ var FileCitation = function(t0) {
11364
11415
  }
11365
11416
  var t7;
11366
11417
  if ($[7] === Symbol.for("react.memo_cache_sentinel")) {
11367
- t7 = /* @__PURE__ */ _jsx94(VisuallyHidden, {
11418
+ t7 = /* @__PURE__ */ _jsx96(VisuallyHidden, {
11368
11419
  asChild: true,
11369
- children: /* @__PURE__ */ _jsx94(Dialog.Title, {
11420
+ children: /* @__PURE__ */ _jsx96(Dialog.Title, {
11370
11421
  children: "Source"
11371
11422
  })
11372
11423
  });
@@ -11376,7 +11427,7 @@ var FileCitation = function(t0) {
11376
11427
  }
11377
11428
  var t8;
11378
11429
  if ($[8] !== activeFileId) {
11379
- t8 = activeFileId && /* @__PURE__ */ _jsx94(Content9, {
11430
+ t8 = activeFileId && /* @__PURE__ */ _jsx96(Content9, {
11380
11431
  fileId: activeFileId
11381
11432
  });
11382
11433
  $[8] = activeFileId;
@@ -11404,7 +11455,7 @@ var FileCitation = function(t0) {
11404
11455
  }
11405
11456
  var t10;
11406
11457
  if ($[12] !== t4 || $[13] !== t9) {
11407
- t10 = /* @__PURE__ */ _jsx94(Dialog.Root, {
11458
+ t10 = /* @__PURE__ */ _jsx96(Dialog.Root, {
11408
11459
  open: t4,
11409
11460
  onOpenChange: t5,
11410
11461
  children: t9
@@ -11432,7 +11483,7 @@ var FileCitation = function(t0) {
11432
11483
  return t11;
11433
11484
  };
11434
11485
  // src/components/annotations/SourceAnnotation/index.tsx
11435
- import { jsx as _jsx95 } from "react/jsx-runtime";
11486
+ import { jsx as _jsx97 } from "react/jsx-runtime";
11436
11487
  var _excluded7 = [
11437
11488
  "children"
11438
11489
  ];
@@ -11455,7 +11506,7 @@ function _objectWithoutPropertiesLoose7(r, e) {
11455
11506
  return t;
11456
11507
  }
11457
11508
  var SourceAnnotation = function(t0) {
11458
- var $ = _c59(10);
11509
+ var $ = _c61(10);
11459
11510
  var children;
11460
11511
  var rest;
11461
11512
  if ($[0] !== t0) {
@@ -11483,7 +11534,7 @@ var SourceAnnotation = function(t0) {
11483
11534
  if (annotation.type === "file_citation") {
11484
11535
  var t2;
11485
11536
  if ($[5] !== annotation) {
11486
- t2 = /* @__PURE__ */ _jsx95(FileCitation, {
11537
+ t2 = /* @__PURE__ */ _jsx97(FileCitation, {
11487
11538
  annotation: annotation
11488
11539
  });
11489
11540
  $[5] = annotation;
@@ -11496,7 +11547,7 @@ var SourceAnnotation = function(t0) {
11496
11547
  if (annotation.type === "file_path") {
11497
11548
  var _t2;
11498
11549
  if ($[7] !== annotation || $[8] !== children) {
11499
- _t2 = /* @__PURE__ */ _jsx95(FilePathAnnotation, {
11550
+ _t2 = /* @__PURE__ */ _jsx97(FilePathAnnotation, {
11500
11551
  annotation: annotation,
11501
11552
  children: children
11502
11553
  });
@@ -11512,7 +11563,7 @@ var SourceAnnotation = function(t0) {
11512
11563
  return null;
11513
11564
  };
11514
11565
  // src/components/avatars/Avatar.tsx
11515
- import { c as _c62 } from "react-compiler-runtime";
11566
+ import { c as _c64 } from "react-compiler-runtime";
11516
11567
  // src/lib/enums/index.ts
11517
11568
  var IconAvatarName = /* @__PURE__ */ function(IconAvatarName2) {
11518
11569
  IconAvatarName2["BACKPACK"] = "BACKPACK";
@@ -11537,7 +11588,7 @@ var AvatarType = /* @__PURE__ */ function(AvatarType2) {
11537
11588
  // src/components/avatars/Avatar.tsx
11538
11589
  import { Avatar as RadixAvatar } from "@radix-ui/themes";
11539
11590
  // src/components/imageAvatars/ImageAvatar/index.tsx
11540
- import { c as _c60 } from "react-compiler-runtime";
11591
+ import { c as _c62 } from "react-compiler-runtime";
11541
11592
  import { Avatar as Avatar4 } from "@radix-ui/themes";
11542
11593
  // src/components/imageAvatars/ImageAvatar/lib/optimizedSrc/path.ts
11543
11594
  var width = function(_ref) {
@@ -11589,9 +11640,9 @@ var optimizedSrc = function(_ref) {
11589
11640
  }));
11590
11641
  };
11591
11642
  // src/components/imageAvatars/ImageAvatar/index.tsx
11592
- import { jsx as _jsx96 } from "react/jsx-runtime";
11643
+ import { jsx as _jsx98 } from "react/jsx-runtime";
11593
11644
  var ImageAvatar = function(t0) {
11594
- var $ = _c60(9);
11645
+ var $ = _c62(9);
11595
11646
  var imageAvatar = t0.imageAvatar, size = t0.size, className = t0.className, style = t0.style;
11596
11647
  var superinterfaceContext = useSuperinterfaceContext();
11597
11648
  var t1;
@@ -11610,7 +11661,7 @@ var ImageAvatar = function(t0) {
11610
11661
  }
11611
11662
  var t2;
11612
11663
  if ($[4] !== className || $[5] !== size || $[6] !== style || $[7] !== t1) {
11613
- t2 = /* @__PURE__ */ _jsx96(Avatar4, {
11664
+ t2 = /* @__PURE__ */ _jsx98(Avatar4, {
11614
11665
  className: className,
11615
11666
  style: style,
11616
11667
  fallback: "",
@@ -11628,7 +11679,7 @@ var ImageAvatar = function(t0) {
11628
11679
  return t2;
11629
11680
  };
11630
11681
  // src/components/iconAvatars/IconAvatar.tsx
11631
- import { c as _c61 } from "react-compiler-runtime";
11682
+ import { c as _c63 } from "react-compiler-runtime";
11632
11683
  import { useMemo as useMemo22 } from "react";
11633
11684
  import { Avatar as Avatar5 } from "@radix-ui/themes";
11634
11685
  // src/lib/iconAvatars/iconAvatarComponents.ts
@@ -11636,16 +11687,16 @@ import { BackpackIcon, RocketIcon, MagicWandIcon, CubeIcon, TargetIcon, DiscIcon
11636
11687
  var _obj;
11637
11688
  var iconAvatarComponents = (_obj = {}, _define_property(_obj, IconAvatarName.BACKPACK, BackpackIcon), _define_property(_obj, IconAvatarName.ROCKET, RocketIcon), _define_property(_obj, IconAvatarName.MAGIC_WAND, MagicWandIcon), _define_property(_obj, IconAvatarName.CUBE, CubeIcon), _define_property(_obj, IconAvatarName.TARGET, TargetIcon), _define_property(_obj, IconAvatarName.DISC, DiscIcon), _define_property(_obj, IconAvatarName.GLOBE, GlobeIcon), _define_property(_obj, IconAvatarName.STAR, StarIcon), _define_property(_obj, IconAvatarName.LIGHTNING_BOLT, LightningBoltIcon2), _define_property(_obj, IconAvatarName.FACE, FaceIcon), _define_property(_obj, IconAvatarName.PERSON, PersonIcon2), _define_property(_obj, IconAvatarName.HEART, HeartIcon), _obj);
11638
11689
  // src/components/iconAvatars/IconAvatar.tsx
11639
- import { jsx as _jsx97 } from "react/jsx-runtime";
11690
+ import { jsx as _jsx99 } from "react/jsx-runtime";
11640
11691
  var IconAvatar = function(t0) {
11641
- var $ = _c61(7);
11692
+ var $ = _c63(7);
11642
11693
  var iconAvatar = t0.iconAvatar, size = t0.size, className = t0.className, style = t0.style;
11643
11694
  var t1;
11644
11695
  t1 = iconAvatarComponents[iconAvatar.name];
11645
11696
  var Component2 = t1;
11646
11697
  var t2;
11647
11698
  if ($[0] !== Component2) {
11648
- t2 = Component2 ? /* @__PURE__ */ _jsx97(Component2, {}) : "";
11699
+ t2 = Component2 ? /* @__PURE__ */ _jsx99(Component2, {}) : "";
11649
11700
  $[0] = Component2;
11650
11701
  $[1] = t2;
11651
11702
  } else {
@@ -11653,7 +11704,7 @@ var IconAvatar = function(t0) {
11653
11704
  }
11654
11705
  var t3;
11655
11706
  if ($[2] !== className || $[3] !== size || $[4] !== style || $[5] !== t2) {
11656
- t3 = /* @__PURE__ */ _jsx97(Avatar5, {
11707
+ t3 = /* @__PURE__ */ _jsx99(Avatar5, {
11657
11708
  className: className,
11658
11709
  style: style,
11659
11710
  size: size,
@@ -11670,16 +11721,16 @@ var IconAvatar = function(t0) {
11670
11721
  return t3;
11671
11722
  };
11672
11723
  // src/components/avatars/Avatar.tsx
11673
- import { jsx as _jsx98 } from "react/jsx-runtime";
11724
+ import { jsx as _jsx100 } from "react/jsx-runtime";
11674
11725
  var Avatar6 = function(t0) {
11675
- var $ = _c62(14);
11726
+ var $ = _c64(14);
11676
11727
  var avatar = t0.avatar, t1 = t0.size, className = t0.className, style = t0.style;
11677
11728
  var size = t1 === void 0 ? "1" : t1;
11678
11729
  if (avatar) {
11679
11730
  if (avatar.type === AvatarType.IMAGE && avatar.imageAvatar) {
11680
11731
  var _t;
11681
11732
  if ($[0] !== avatar.imageAvatar || $[1] !== className || $[2] !== size || $[3] !== style) {
11682
- _t = /* @__PURE__ */ _jsx98(ImageAvatar, {
11733
+ _t = /* @__PURE__ */ _jsx100(ImageAvatar, {
11683
11734
  imageAvatar: avatar.imageAvatar,
11684
11735
  size: size,
11685
11736
  className: className,
@@ -11698,7 +11749,7 @@ var Avatar6 = function(t0) {
11698
11749
  if (avatar.type === AvatarType.ICON && avatar.iconAvatar) {
11699
11750
  var _t2;
11700
11751
  if ($[5] !== avatar.iconAvatar || $[6] !== className || $[7] !== size || $[8] !== style) {
11701
- _t2 = /* @__PURE__ */ _jsx98(IconAvatar, {
11752
+ _t2 = /* @__PURE__ */ _jsx100(IconAvatar, {
11702
11753
  iconAvatar: avatar.iconAvatar,
11703
11754
  size: size,
11704
11755
  className: className,
@@ -11717,7 +11768,7 @@ var Avatar6 = function(t0) {
11717
11768
  }
11718
11769
  var t2;
11719
11770
  if ($[10] !== className || $[11] !== size || $[12] !== style) {
11720
- t2 = /* @__PURE__ */ _jsx98(RadixAvatar, {
11771
+ t2 = /* @__PURE__ */ _jsx100(RadixAvatar, {
11721
11772
  fallback: "",
11722
11773
  size: size,
11723
11774
  className: className,
@@ -11733,7 +11784,7 @@ var Avatar6 = function(t0) {
11733
11784
  return t2;
11734
11785
  };
11735
11786
  // src/components/components/ComponentsProvider.tsx
11736
- import { c as _c63 } from "react-compiler-runtime";
11787
+ import { c as _c65 } from "react-compiler-runtime";
11737
11788
  import { useMemo as useMemo23 } from "react";
11738
11789
  // src/hooks/components/useComponents.ts
11739
11790
  import { useContext as useContext17 } from "react";
@@ -11741,7 +11792,7 @@ var useComponents = function() {
11741
11792
  return useContext17(ComponentsContext);
11742
11793
  };
11743
11794
  // src/components/components/ComponentsProvider.tsx
11744
- import { jsx as _jsx99 } from "react/jsx-runtime";
11795
+ import { jsx as _jsx101 } from "react/jsx-runtime";
11745
11796
  var _excluded8 = [
11746
11797
  "children"
11747
11798
  ];
@@ -11764,7 +11815,7 @@ function _objectWithoutPropertiesLoose8(r, e) {
11764
11815
  return t;
11765
11816
  }
11766
11817
  var ComponentsProvider = function(t0) {
11767
- var $ = _c63(9);
11818
+ var $ = _c65(9);
11768
11819
  var children;
11769
11820
  var rest;
11770
11821
  if ($[0] !== t0) {
@@ -11794,7 +11845,7 @@ var ComponentsProvider = function(t0) {
11794
11845
  var value = t1;
11795
11846
  var t3;
11796
11847
  if ($[6] !== children || $[7] !== value) {
11797
- t3 = /* @__PURE__ */ _jsx99(ComponentsContext.Provider, {
11848
+ t3 = /* @__PURE__ */ _jsx101(ComponentsContext.Provider, {
11798
11849
  value: value,
11799
11850
  children: children
11800
11851
  });
@@ -11807,11 +11858,11 @@ var ComponentsProvider = function(t0) {
11807
11858
  return t3;
11808
11859
  };
11809
11860
  // src/components/assistants/AssistantProvider/index.tsx
11810
- import { c as _c64 } from "react-compiler-runtime";
11811
- import { jsx as _jsx100 } from "react/jsx-runtime";
11861
+ import { c as _c66 } from "react-compiler-runtime";
11862
+ import { jsx as _jsx102 } from "react/jsx-runtime";
11812
11863
  var AssistantProvider = function(t0) {
11813
11864
  var _assistant$name;
11814
- var $ = _c64(10);
11865
+ var $ = _c66(10);
11815
11866
  var children = t0.children;
11816
11867
  var superinterfaceContext = useSuperinterfaceContext();
11817
11868
  var t1;
@@ -11829,7 +11880,7 @@ var AssistantProvider = function(t0) {
11829
11880
  var t3 = assistant === null || assistant === void 0 ? void 0 : assistant.avatar;
11830
11881
  var t4;
11831
11882
  if ($[2] !== t3) {
11832
- t4 = /* @__PURE__ */ _jsx100(Avatar6, {
11883
+ t4 = /* @__PURE__ */ _jsx102(Avatar6, {
11833
11884
  avatar: t3
11834
11885
  });
11835
11886
  $[2] = t3;
@@ -11839,7 +11890,7 @@ var AssistantProvider = function(t0) {
11839
11890
  }
11840
11891
  var t5;
11841
11892
  if ($[4] !== children || $[5] !== t4) {
11842
- t5 = /* @__PURE__ */ _jsx100(AssistantAvatarContext.Provider, {
11893
+ t5 = /* @__PURE__ */ _jsx102(AssistantAvatarContext.Provider, {
11843
11894
  value: t4,
11844
11895
  children: children
11845
11896
  });
@@ -11851,7 +11902,7 @@ var AssistantProvider = function(t0) {
11851
11902
  }
11852
11903
  var t6;
11853
11904
  if ($[7] !== t2 || $[8] !== t5) {
11854
- t6 = /* @__PURE__ */ _jsx100(AssistantNameContext.Provider, {
11905
+ t6 = /* @__PURE__ */ _jsx102(AssistantNameContext.Provider, {
11855
11906
  value: t2,
11856
11907
  children: t5
11857
11908
  });
@@ -11863,5 +11914,5 @@ var AssistantProvider = function(t0) {
11863
11914
  }
11864
11915
  return t6;
11865
11916
  };
11866
- export { AssistantAvatarContext, AssistantNameContext, AssistantProvider, AudioThread, AudioThreadDialog, Avatar6 as Avatar, ComponentsProvider, FunctionBase, FunctionComponentsContext, MarkdownContext, MarkdownProvider, RunStep, SourceAnnotation, Suggestions, SuperinterfaceProvider, Thread, ThreadDialog, ThreadDialogContext, UserAvatarContext, useAssistant, useAudioThreadContext, useComponents, useCreateMessage, useIsMutatingMessage, useLatestMessage, useMarkdownContext, useMessageContext, useMessageFormContext, useMessages, useRealtimeWebRTCAudioRuntime, useSuperinterfaceContext, useSuperinterfaceContext as useThreadContext, useThreadDialogContext, useTtsAudioRuntime };
11917
+ export { AssistantAvatarContext, AssistantNameContext, AssistantProvider, AudioThread, AudioThreadDialog, Avatar6 as Avatar, ComponentsProvider, FunctionBase, FunctionComponentsContext, MarkdownContext, MarkdownProvider, RunStep, SourceAnnotation, Suggestions, SuperinterfaceProvider, Thread, ThreadDialog, ThreadDialogContext, TtsAudioRuntimeProvider, UserAvatarContext, WebrtcAudioRuntimeProvider, useAssistant, useAudioThreadContext, useComponents, useCreateMessage, useIsMutatingMessage, useLatestMessage, useMarkdownContext, useMessageContext, useMessageFormContext, useMessages, useSuperinterfaceContext, useSuperinterfaceContext as useThreadContext, useThreadDialogContext, useTtsAudioRuntime, useWebrtcAudioRuntime };
11867
11918
  //# sourceMappingURL=index.js.map