@superinterface/react 3.8.0 → 3.9.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.cjs CHANGED
@@ -352,6 +352,9 @@ __export(src_exports, {
352
352
  RunStep: function() {
353
353
  return RunStep;
354
354
  },
355
+ SourceAnnotation: function() {
356
+ return SourceAnnotation;
357
+ },
355
358
  Suggestions: function() {
356
359
  return Suggestions;
357
360
  },
@@ -4155,38 +4158,9 @@ var Img = function(props) {
4155
4158
  // src/contexts/markdown/MarkdownContext/lib/components/Annotation/index.tsx
4156
4159
  var import_react_compiler_runtime21 = require("react-compiler-runtime");
4157
4160
  var import_react_icons8 = require("@radix-ui/react-icons");
4158
- // src/contexts/markdown/MarkdownContext/lib/components/Annotation/AnnotationBase.tsx
4159
- var import_themes30 = require("@radix-ui/themes");
4160
- var import_jsx_runtime40 = require("react/jsx-runtime");
4161
- var AnnotationBase = function(_ref) {
4162
- var icon = _ref.icon, content = _ref.content;
4163
- return /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(import_themes30.Popover.Root, {
4164
- children: [
4165
- /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_themes30.Popover.Trigger, {
4166
- children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_themes30.IconButton, {
4167
- variant: "soft",
4168
- color: "gray",
4169
- size: "1",
4170
- children: icon
4171
- })
4172
- }),
4173
- /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_themes30.Popover.Content, {
4174
- size: "1",
4175
- children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_themes30.Flex, {
4176
- direction: "column",
4177
- children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_themes30.Text, {
4178
- size: "1",
4179
- color: "gray",
4180
- children: content
4181
- })
4182
- })
4183
- })
4184
- ]
4185
- });
4186
- };
4187
- // src/contexts/markdown/MarkdownContext/lib/components/Annotation/FilePathAnnotation.tsx
4161
+ // src/components/annotations/FilePathAnnotation.tsx
4188
4162
  var import_react_compiler_runtime20 = require("react-compiler-runtime");
4189
- var import_jsx_runtime41 = require("react/jsx-runtime");
4163
+ var import_jsx_runtime40 = require("react/jsx-runtime");
4190
4164
  var FilePathAnnotation = function(t0) {
4191
4165
  var $ = (0, import_react_compiler_runtime20.c)(3);
4192
4166
  var annotation = t0.annotation, children = t0.children;
@@ -4195,7 +4169,7 @@ var FilePathAnnotation = function(t0) {
4195
4169
  var t1 = "".concat(superinterfaceContext.baseUrl, "/files/").concat(annotation.file_path.file_id, "/contents?").concat(nextSearchParams);
4196
4170
  var t2;
4197
4171
  if ($[0] !== children || $[1] !== t1) {
4198
- t2 = /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(Link, {
4172
+ t2 = /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(Link, {
4199
4173
  href: t1,
4200
4174
  target: "_self",
4201
4175
  download: true,
@@ -4209,6 +4183,35 @@ var FilePathAnnotation = function(t0) {
4209
4183
  }
4210
4184
  return t2;
4211
4185
  };
4186
+ // src/contexts/markdown/MarkdownContext/lib/components/Annotation/AnnotationBase.tsx
4187
+ var import_themes30 = require("@radix-ui/themes");
4188
+ var import_jsx_runtime41 = require("react/jsx-runtime");
4189
+ var AnnotationBase = function(_ref) {
4190
+ var icon = _ref.icon, content = _ref.content;
4191
+ return /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(import_themes30.Popover.Root, {
4192
+ children: [
4193
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_themes30.Popover.Trigger, {
4194
+ children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_themes30.IconButton, {
4195
+ variant: "soft",
4196
+ color: "gray",
4197
+ size: "1",
4198
+ children: icon
4199
+ })
4200
+ }),
4201
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_themes30.Popover.Content, {
4202
+ size: "1",
4203
+ children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_themes30.Flex, {
4204
+ direction: "column",
4205
+ children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_themes30.Text, {
4206
+ size: "1",
4207
+ color: "gray",
4208
+ children: content
4209
+ })
4210
+ })
4211
+ })
4212
+ ]
4213
+ });
4214
+ };
4212
4215
  // src/contexts/markdown/MarkdownContext/lib/components/Annotation/index.tsx
4213
4216
  var import_jsx_runtime42 = require("react/jsx-runtime");
4214
4217
  var Annotation = function(t0) {
@@ -6478,9 +6481,11 @@ var Root4 = function(_ref) {
6478
6481
  });
6479
6482
  };
6480
6483
  // src/components/threads/Thread/MessageForm/Field/index.tsx
6484
+ var import_react_compiler_runtime42 = require("react-compiler-runtime");
6481
6485
  var import_react_hook_form3 = require("react-hook-form");
6482
6486
  var import_themes51 = require("@radix-ui/themes");
6483
6487
  // src/components/threads/Thread/MessageForm/Field/Control.tsx
6488
+ var import_react_compiler_runtime39 = require("react-compiler-runtime");
6484
6489
  var import_themes48 = require("@radix-ui/themes");
6485
6490
  var import_react_hook_form2 = require("react-hook-form");
6486
6491
  // src/hooks/misc/usePrevious.ts
@@ -6698,48 +6703,110 @@ var Root5 = function(_ref) {
6698
6703
  });
6699
6704
  };
6700
6705
  var Input = function(props) {
6701
- "use no memo";
6702
6706
  var _props$placeholder;
6707
+ var $ = (0, import_react_compiler_runtime39.c)(20);
6703
6708
  var assistantNameContext = (0, import_react50.useContext)(AssistantNameContext);
6704
6709
  var register = (0, import_react_hook_form2.useFormContext)().register;
6705
6710
  var _useMessageFormContext = useMessageFormContext(), isDisabled = _useMessageFormContext.isDisabled, isLoading = _useMessageFormContext.isLoading;
6706
- var isSubmitDisabled = (0, import_react50.useMemo)(function() {
6707
- return isDisabled || isLoading;
6708
- }, [
6709
- isDisabled,
6710
- isLoading
6711
- ]);
6711
+ var t0;
6712
+ t0 = isDisabled || isLoading;
6713
+ var isSubmitDisabled = t0;
6712
6714
  var isDisabledPrevious = usePrevious(isDisabled);
6713
6715
  var textareaRef = (0, import_react50.useRef)(null);
6714
- var textareaProps = register("content");
6715
- (0, import_react50.useEffect)(function() {
6716
- if (isDisabled) return;
6717
- if (!isDisabledPrevious) return;
6718
- if (!textareaRef.current) return;
6719
- textareaRef.current.focus();
6720
- }, [
6721
- isDisabled,
6722
- isDisabledPrevious,
6723
- textareaProps
6724
- ]);
6725
- return /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(TextareaBase, _objectSpread30(_objectSpread30(_objectSpread30({
6726
- minRows: 1,
6727
- placeholder: (_props$placeholder = props.placeholder) !== null && _props$placeholder !== void 0 ? _props$placeholder : "Message ".concat(assistantNameContext, "..."),
6728
- disabled: isDisabled,
6729
- onKeyDown: function(e) {
6716
+ var t1;
6717
+ if ($[0] !== register) {
6718
+ t1 = register("content");
6719
+ $[0] = register;
6720
+ $[1] = t1;
6721
+ } else {
6722
+ t1 = $[1];
6723
+ }
6724
+ var textareaProps = t1;
6725
+ var t2;
6726
+ if ($[2] !== isDisabled || $[3] !== isDisabledPrevious) {
6727
+ t2 = function() {
6728
+ if (isDisabled) {
6729
+ return;
6730
+ }
6731
+ if (!isDisabledPrevious) {
6732
+ return;
6733
+ }
6734
+ if (!textareaRef.current) {
6735
+ return;
6736
+ }
6737
+ textareaRef.current.focus();
6738
+ };
6739
+ $[2] = isDisabled;
6740
+ $[3] = isDisabledPrevious;
6741
+ $[4] = t2;
6742
+ } else {
6743
+ t2 = $[4];
6744
+ }
6745
+ var t3;
6746
+ if ($[5] !== isDisabled || $[6] !== isDisabledPrevious || $[7] !== textareaProps) {
6747
+ t3 = [
6748
+ isDisabled,
6749
+ isDisabledPrevious,
6750
+ textareaProps
6751
+ ];
6752
+ $[5] = isDisabled;
6753
+ $[6] = isDisabledPrevious;
6754
+ $[7] = textareaProps;
6755
+ $[8] = t3;
6756
+ } else {
6757
+ t3 = $[8];
6758
+ }
6759
+ (0, import_react50.useEffect)(t2, t3);
6760
+ var t4 = (_props$placeholder = props.placeholder) !== null && _props$placeholder !== void 0 ? _props$placeholder : "Message ".concat(assistantNameContext, "...");
6761
+ var t5;
6762
+ if ($[9] !== isSubmitDisabled) {
6763
+ t5 = function(e) {
6730
6764
  if (e.key === "Enter" && !e.shiftKey) {
6731
6765
  var _e$currentTarget$form;
6732
6766
  e.preventDefault();
6733
- if (isSubmitDisabled) return;
6767
+ if (isSubmitDisabled) {
6768
+ return;
6769
+ }
6734
6770
  (_e$currentTarget$form = e.currentTarget.form) === null || _e$currentTarget$form === void 0 || _e$currentTarget$form.requestSubmit();
6735
6771
  }
6736
- }
6737
- }, textareaProps), props), {}, {
6738
- ref: function(e_0) {
6772
+ };
6773
+ $[9] = isSubmitDisabled;
6774
+ $[10] = t5;
6775
+ } else {
6776
+ t5 = $[10];
6777
+ }
6778
+ var t6;
6779
+ if ($[11] !== textareaProps) {
6780
+ t6 = function(e_0) {
6739
6781
  textareaProps.ref(e_0);
6740
6782
  textareaRef.current = e_0;
6741
- }
6742
- }));
6783
+ };
6784
+ $[11] = textareaProps;
6785
+ $[12] = t6;
6786
+ } else {
6787
+ t6 = $[12];
6788
+ }
6789
+ var t7;
6790
+ if ($[13] !== isDisabled || $[14] !== props || $[15] !== t4 || $[16] !== t5 || $[17] !== t6 || $[18] !== textareaProps) {
6791
+ t7 = /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(TextareaBase, _objectSpread30(_objectSpread30(_objectSpread30({
6792
+ minRows: 1,
6793
+ placeholder: t4,
6794
+ disabled: isDisabled,
6795
+ onKeyDown: t5
6796
+ }, textareaProps), props), {}, {
6797
+ ref: t6
6798
+ }));
6799
+ $[13] = isDisabled;
6800
+ $[14] = props;
6801
+ $[15] = t4;
6802
+ $[16] = t5;
6803
+ $[17] = t6;
6804
+ $[18] = textareaProps;
6805
+ $[19] = t7;
6806
+ } else {
6807
+ t7 = $[19];
6808
+ }
6809
+ return t7;
6743
6810
  };
6744
6811
  var Control = function(props) {
6745
6812
  return /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(Root5, _objectSpread30(_objectSpread30({}, props), {}, {
@@ -6749,7 +6816,7 @@ var Control = function(props) {
6749
6816
  Control.Root = Root5;
6750
6817
  Control.Input = Input;
6751
6818
  // src/components/threads/Thread/MessageForm/Field/Files/Preview.tsx
6752
- var import_react_compiler_runtime39 = require("react-compiler-runtime");
6819
+ var import_react_compiler_runtime40 = require("react-compiler-runtime");
6753
6820
  var import_themes49 = require("@radix-ui/themes");
6754
6821
  var import_react_icons12 = require("@radix-ui/react-icons");
6755
6822
  var import_jsx_runtime67 = require("react/jsx-runtime");
@@ -6797,7 +6864,7 @@ function _toPrimitive31(t, r) {
6797
6864
  return ("string" === r ? String : Number)(t);
6798
6865
  }
6799
6866
  var Preview = function(props) {
6800
- var $ = (0, import_react_compiler_runtime39.c)(8);
6867
+ var $ = (0, import_react_compiler_runtime40.c)(8);
6801
6868
  var _useMessageFormContext = useMessageFormContext(), files = _useMessageFormContext.files, setFiles = _useMessageFormContext.setFiles;
6802
6869
  if (!files.length) {
6803
6870
  return null;
@@ -6895,7 +6962,7 @@ var import_dayjs2 = __toESM(require("dayjs"), 1);
6895
6962
  var import_react_icons13 = require("@radix-ui/react-icons");
6896
6963
  var import_themes50 = require("@radix-ui/themes");
6897
6964
  // src/hooks/files/useCreateFile/index.ts
6898
- var import_react_compiler_runtime40 = require("react-compiler-runtime");
6965
+ var import_react_compiler_runtime41 = require("react-compiler-runtime");
6899
6966
  var import_react_query7 = require("@tanstack/react-query");
6900
6967
  // src/hooks/files/useCreateFile/lib/mutationOptions/mutationFn/body/formData.ts
6901
6968
  var formData = function(variables) {
@@ -7131,7 +7198,7 @@ function _toPrimitive34(t, r) {
7131
7198
  return ("string" === r ? String : Number)(t);
7132
7199
  }
7133
7200
  var useCreateFile = function(t0) {
7134
- var $ = (0, import_react_compiler_runtime40.c)(15);
7201
+ var $ = (0, import_react_compiler_runtime41.c)(15);
7135
7202
  var t1;
7136
7203
  if ($[0] !== t0) {
7137
7204
  t1 = t0 === void 0 ? {
@@ -7573,38 +7640,76 @@ function _toPrimitive36(t, r) {
7573
7640
  }
7574
7641
  return ("string" === r ? String : Number)(t);
7575
7642
  }
7576
- var Root6 = function(_ref) {
7577
- "use no memo";
7578
- var children = _ref.children, className = _ref.className, style = _ref.style;
7579
- var _$_ref = (0, import_react_hook_form3.useFormContext)(), errors = _$_ref.formState.errors;
7580
- return /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(import_themes51.Container, {
7581
- size: "2",
7582
- flexGrow: "0",
7583
- className: className,
7584
- style: style,
7585
- children: /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(import_themes51.Flex, {
7643
+ var Root6 = function(t0) {
7644
+ var $ = (0, import_react_compiler_runtime42.c)(12);
7645
+ var children = t0.children, className = t0.className, style = t0.style;
7646
+ var _ref = (0, import_react_hook_form3.useFormContext)(), t1 = _ref.formState;
7647
+ var errors = t1.errors;
7648
+ var t2 = errors.content ? "var(--red-9)" : "var(--gray-5)";
7649
+ var t3;
7650
+ if ($[0] !== errors.content) {
7651
+ t3 = errors.content ? {
7652
+ backgroundColor: "var(--red-2)"
7653
+ } : {};
7654
+ $[0] = errors.content;
7655
+ $[1] = t3;
7656
+ } else {
7657
+ t3 = $[1];
7658
+ }
7659
+ var t4;
7660
+ if ($[2] !== t2 || $[3] !== t3) {
7661
+ t4 = _objectSpread36({
7662
+ borderRadius: "var(--radius-2)",
7663
+ borderWidth: "1px",
7664
+ borderStyle: "solid",
7665
+ borderColor: t2
7666
+ }, t3);
7667
+ $[2] = t2;
7668
+ $[3] = t3;
7669
+ $[4] = t4;
7670
+ } else {
7671
+ t4 = $[4];
7672
+ }
7673
+ var t5;
7674
+ if ($[5] !== children || $[6] !== t4) {
7675
+ t5 = /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(import_themes51.Flex, {
7586
7676
  direction: "column",
7587
7677
  flexShrink: "0",
7588
7678
  children: /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(import_themes51.Flex, {
7589
7679
  direction: "column",
7590
7680
  flexShrink: "0",
7591
7681
  children: /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(import_themes51.Flex, {
7592
- style: _objectSpread36({
7593
- borderRadius: "var(--radius-2)",
7594
- borderWidth: "1px",
7595
- borderStyle: "solid",
7596
- borderColor: errors.content ? "var(--red-9)" : "var(--gray-5)"
7597
- }, errors.content ? {
7598
- backgroundColor: "var(--red-2)"
7599
- } : {}),
7682
+ style: t4,
7600
7683
  p: "2",
7601
7684
  pl: "3",
7602
7685
  wrap: "wrap",
7603
7686
  children: children
7604
7687
  })
7605
7688
  })
7606
- })
7607
- });
7689
+ });
7690
+ $[5] = children;
7691
+ $[6] = t4;
7692
+ $[7] = t5;
7693
+ } else {
7694
+ t5 = $[7];
7695
+ }
7696
+ var t6;
7697
+ if ($[8] !== className || $[9] !== style || $[10] !== t5) {
7698
+ t6 = /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(import_themes51.Container, {
7699
+ size: "2",
7700
+ flexGrow: "0",
7701
+ className: className,
7702
+ style: style,
7703
+ children: t5
7704
+ });
7705
+ $[8] = className;
7706
+ $[9] = style;
7707
+ $[10] = t5;
7708
+ $[11] = t6;
7709
+ } else {
7710
+ t6 = $[11];
7711
+ }
7712
+ return t6;
7608
7713
  };
7609
7714
  var Field = {
7610
7715
  Root: Root6,
@@ -7674,7 +7779,7 @@ var import_themes53 = require("@radix-ui/themes");
7674
7779
  // src/components/threads/Thread/Provider/index.tsx
7675
7780
  var Provider2 = SuperinterfaceProvider;
7676
7781
  // src/components/toasts/ToastsProvider/index.tsx
7677
- var import_react_compiler_runtime41 = require("react-compiler-runtime");
7782
+ var import_react_compiler_runtime43 = require("react-compiler-runtime");
7678
7783
  var import_react52 = require("react");
7679
7784
  var Toast2 = __toESM(require("@radix-ui/react-toast"), 1);
7680
7785
  // src/components/toasts/ToastsProvider/CustomToast.tsx
@@ -7713,7 +7818,7 @@ var CustomToast = function(_ref) {
7713
7818
  // src/components/toasts/ToastsProvider/index.tsx
7714
7819
  var import_jsx_runtime72 = require("react/jsx-runtime");
7715
7820
  var ToastsProvider = function(t0) {
7716
- var $ = (0, import_react_compiler_runtime41.c)(15);
7821
+ var $ = (0, import_react_compiler_runtime43.c)(15);
7717
7822
  var children = t0.children, t1 = t0.bottom;
7718
7823
  var bottom = t1 === void 0 ? 0 : t1;
7719
7824
  var t2;
@@ -7961,7 +8066,7 @@ var useMessageContext = function() {
7961
8066
  return (0, import_react53.useContext)(MessageContext);
7962
8067
  };
7963
8068
  // src/hooks/assistants/useAssistant/index.ts
7964
- var import_react_compiler_runtime42 = require("react-compiler-runtime");
8069
+ var import_react_compiler_runtime44 = require("react-compiler-runtime");
7965
8070
  var import_react54 = require("react");
7966
8071
  var import_react_query9 = require("@tanstack/react-query");
7967
8072
  // src/hooks/assistants/useAssistant/lib/queryOptions/index.ts
@@ -8111,7 +8216,7 @@ function _toPrimitive40(t, r) {
8111
8216
  return ("string" === r ? String : Number)(t);
8112
8217
  }
8113
8218
  var useAssistant = function(t0) {
8114
- var $ = (0, import_react_compiler_runtime42.c)(6);
8219
+ var $ = (0, import_react_compiler_runtime44.c)(6);
8115
8220
  var assistantId = t0.assistantId;
8116
8221
  var superinterfaceContext = useSuperinterfaceContext();
8117
8222
  var t1;
@@ -8144,7 +8249,7 @@ var useAssistant = function(t0) {
8144
8249
  return t2;
8145
8250
  };
8146
8251
  // src/components/threads/ThreadDialog/Provider/index.tsx
8147
- var import_react_compiler_runtime43 = require("react-compiler-runtime");
8252
+ var import_react_compiler_runtime45 = require("react-compiler-runtime");
8148
8253
  var import_react57 = require("react");
8149
8254
  // src/contexts/threads/ThreadDialogContext/index.ts
8150
8255
  var import_react55 = require("react");
@@ -8160,7 +8265,7 @@ var useThreadDialogContext = function() {
8160
8265
  // src/components/threads/ThreadDialog/Provider/index.tsx
8161
8266
  var import_jsx_runtime75 = require("react/jsx-runtime");
8162
8267
  var Provider4 = function(t0) {
8163
- var $ = (0, import_react_compiler_runtime43.c)(5);
8268
+ var $ = (0, import_react_compiler_runtime45.c)(5);
8164
8269
  var children = t0.children;
8165
8270
  var threadDialogContext = useThreadDialogContext();
8166
8271
  var _ref = _sliced_to_array((0, import_react57.useState)(threadDialogContext.isOpen), 2), isOpen = _ref[0], setIsOpen = _ref[1];
@@ -8198,7 +8303,7 @@ var Root9 = function(_ref) {
8198
8303
  });
8199
8304
  };
8200
8305
  // src/components/threads/ThreadDialog/Trigger/index.tsx
8201
- var import_react_compiler_runtime44 = require("react-compiler-runtime");
8306
+ var import_react_compiler_runtime46 = require("react-compiler-runtime");
8202
8307
  var import_themes55 = require("@radix-ui/themes");
8203
8308
  // src/components/threads/ThreadDialog/Trigger/Button.tsx
8204
8309
  var import_themes54 = require("@radix-ui/themes");
@@ -8301,7 +8406,7 @@ function _toPrimitive42(t, r) {
8301
8406
  return ("string" === r ? String : Number)(t);
8302
8407
  }
8303
8408
  var Root10 = function(t0) {
8304
- var $ = (0, import_react_compiler_runtime44.c)(14);
8409
+ var $ = (0, import_react_compiler_runtime46.c)(14);
8305
8410
  var children = t0.children, style = t0.style, className = t0.className;
8306
8411
  var _useThreadDialogContext = useThreadDialogContext(), setIsOpen = _useThreadDialogContext.setIsOpen, isOpen = _useThreadDialogContext.isOpen;
8307
8412
  var t1 = isOpen ? "none" : "flex";
@@ -8382,15 +8487,15 @@ function _temp8(prev) {
8382
8487
  return !prev;
8383
8488
  }
8384
8489
  // src/components/threads/ThreadDialog/Content/index.tsx
8385
- var import_react_compiler_runtime46 = require("react-compiler-runtime");
8490
+ var import_react_compiler_runtime48 = require("react-compiler-runtime");
8386
8491
  var import_themes57 = require("@radix-ui/themes");
8387
8492
  // src/components/threads/ThreadDialog/Close/index.tsx
8388
- var import_react_compiler_runtime45 = require("react-compiler-runtime");
8493
+ var import_react_compiler_runtime47 = require("react-compiler-runtime");
8389
8494
  var import_react_icons16 = require("@radix-ui/react-icons");
8390
8495
  var import_themes56 = require("@radix-ui/themes");
8391
8496
  var import_jsx_runtime79 = require("react/jsx-runtime");
8392
8497
  var Close = function() {
8393
- var $ = (0, import_react_compiler_runtime45.c)(9);
8498
+ var $ = (0, import_react_compiler_runtime47.c)(9);
8394
8499
  var _useThreadDialogContext = useThreadDialogContext(), setIsOpen = _useThreadDialogContext.setIsOpen, isOpen = _useThreadDialogContext.isOpen;
8395
8500
  var t0 = isOpen ? "flex" : "none";
8396
8501
  var t1;
@@ -8506,7 +8611,7 @@ function _toPrimitive43(t, r) {
8506
8611
  return ("string" === r ? String : Number)(t);
8507
8612
  }
8508
8613
  var Root11 = function(t0) {
8509
- var $ = (0, import_react_compiler_runtime46.c)(19);
8614
+ var $ = (0, import_react_compiler_runtime48.c)(19);
8510
8615
  var children = t0.children, className = t0.className, style = t0.style;
8511
8616
  var isOpen = useThreadDialogContext().isOpen;
8512
8617
  if (!isOpen) {
@@ -8705,7 +8810,7 @@ ThreadDialog.Root = Root9;
8705
8810
  ThreadDialog.Trigger = Trigger;
8706
8811
  ThreadDialog.Content = Content7;
8707
8812
  // src/components/threads/AudioThread/Root/index.tsx
8708
- var import_react_compiler_runtime51 = require("react-compiler-runtime");
8813
+ var import_react_compiler_runtime53 = require("react-compiler-runtime");
8709
8814
  var import_themes58 = require("@radix-ui/themes");
8710
8815
  // src/contexts/threads/AudioThreadContext/index.ts
8711
8816
  var import_react58 = require("react");
@@ -8825,7 +8930,7 @@ var AudioThreadContext = /* @__PURE__ */ (0, import_react58.createContext)({
8825
8930
  }
8826
8931
  });
8827
8932
  // src/hooks/misc/usePermission/index.ts
8828
- var import_react_compiler_runtime47 = require("react-compiler-runtime");
8933
+ var import_react_compiler_runtime49 = require("react-compiler-runtime");
8829
8934
  var import_react59 = require("react");
8830
8935
  // src/hooks/misc/usePermission/util.ts
8831
8936
  var noop = function() {};
@@ -8849,7 +8954,7 @@ function off(obj) {
8849
8954
  }
8850
8955
  // src/hooks/misc/usePermission/index.ts
8851
8956
  var usePermission = function(permissionDesc) {
8852
- var $ = (0, import_react_compiler_runtime47.c)(3);
8957
+ var $ = (0, import_react_compiler_runtime49.c)(3);
8853
8958
  var _ref = _sliced_to_array((0, import_react59.useState)(""), 2), state = _ref[0], setState = _ref[1];
8854
8959
  var t0;
8855
8960
  var t1;
@@ -8903,10 +9008,10 @@ var blobToData = function(blob) {
8903
9008
  });
8904
9009
  };
8905
9010
  // src/hooks/audioThreads/useStatus/index.ts
8906
- var import_react_compiler_runtime48 = require("react-compiler-runtime");
9011
+ var import_react_compiler_runtime50 = require("react-compiler-runtime");
8907
9012
  var import_react60 = require("react");
8908
9013
  var useStatus = function(t0) {
8909
- var $ = (0, import_react_compiler_runtime48.c)(2);
9014
+ var $ = (0, import_react_compiler_runtime50.c)(2);
8910
9015
  var messageAudioProps = t0.messageAudioProps, recorderProps = t0.recorderProps, createMessageProps = t0.createMessageProps;
8911
9016
  var latestMessageProps = useLatestMessage();
8912
9017
  var t1;
@@ -8965,10 +9070,10 @@ var import_use_audio_capture = require("use-audio-capture");
8965
9070
  var import_react62 = require("react");
8966
9071
  var import_react_use_audio_player = require("react-use-audio-player");
8967
9072
  // src/hooks/misc/useInterval.ts
8968
- var import_react_compiler_runtime49 = require("react-compiler-runtime");
9073
+ var import_react_compiler_runtime51 = require("react-compiler-runtime");
8969
9074
  var import_react61 = require("react");
8970
9075
  var useInterval = function(callback, delay) {
8971
- var $ = (0, import_react_compiler_runtime49.c)(5);
9076
+ var $ = (0, import_react_compiler_runtime51.c)(5);
8972
9077
  var savedCallback = (0, import_react61.useRef)(_temp10);
8973
9078
  var t0;
8974
9079
  if ($[0] !== callback) {
@@ -9221,7 +9326,7 @@ var useRecorder = function(_ref) {
9221
9326
  });
9222
9327
  };
9223
9328
  // src/hooks/audioThreads/useMessageAudio/index.ts
9224
- var import_react_compiler_runtime50 = require("react-compiler-runtime");
9329
+ var import_react_compiler_runtime52 = require("react-compiler-runtime");
9225
9330
  var import_react63 = require("react");
9226
9331
  var import_compromise = __toESM(require("compromise"), 1);
9227
9332
  var import_howler = require("howler");
@@ -9303,7 +9408,7 @@ var getMessageSentences = function(_ref) {
9303
9408
  });
9304
9409
  };
9305
9410
  var useMessageAudio = function(t0) {
9306
- var $ = (0, import_react_compiler_runtime50.c)(50);
9411
+ var $ = (0, import_react_compiler_runtime52.c)(50);
9307
9412
  var _onEnd = t0.onEnd, passedPlay = t0.play;
9308
9413
  var _ref = _sliced_to_array((0, import_react63.useState)(false), 2), isAudioPlayed = _ref[0], setIsAudioPlayed = _ref[1];
9309
9414
  var t1;
@@ -9738,7 +9843,7 @@ function _asyncToGenerator12(n) {
9738
9843
  };
9739
9844
  }
9740
9845
  var Content8 = function(t0) {
9741
- var $ = (0, import_react_compiler_runtime51.c)(24);
9846
+ var $ = (0, import_react_compiler_runtime53.c)(24);
9742
9847
  var children = t0.children, className = t0.className, style = t0.style, play = t0.play;
9743
9848
  var addToast = useToasts().addToast;
9744
9849
  var queryClient = (0, import_react_query10.useQueryClient)();
@@ -10098,7 +10203,7 @@ var Visualization = function(props) {
10098
10203
  }));
10099
10204
  };
10100
10205
  // src/components/threads/AudioThread/Status/index.tsx
10101
- var import_react_compiler_runtime52 = require("react-compiler-runtime");
10206
+ var import_react_compiler_runtime54 = require("react-compiler-runtime");
10102
10207
  // src/components/threads/AudioThread/Status/StatusMessages.tsx
10103
10208
  var import_themes61 = require("@radix-ui/themes");
10104
10209
  var import_jsx_runtime85 = require("react/jsx-runtime");
@@ -10178,7 +10283,7 @@ function _toPrimitive48(t, r) {
10178
10283
  return ("string" === r ? String : Number)(t);
10179
10284
  }
10180
10285
  var Status = function(props) {
10181
- var $ = (0, import_react_compiler_runtime52.c)(12);
10286
+ var $ = (0, import_react_compiler_runtime54.c)(12);
10182
10287
  var audioThreadContext = useAudioThreadContext();
10183
10288
  if (audioThreadContext.status === "recording") {
10184
10289
  var _t;
@@ -10275,7 +10380,7 @@ var Status = function(props) {
10275
10380
  return t1;
10276
10381
  };
10277
10382
  // src/components/threads/AudioThread/Form/index.tsx
10278
- var import_react_compiler_runtime54 = require("react-compiler-runtime");
10383
+ var import_react_compiler_runtime56 = require("react-compiler-runtime");
10279
10384
  var import_themes63 = require("@radix-ui/themes");
10280
10385
  // src/components/threads/AudioThread/Form/MicIcon.tsx
10281
10386
  var import_jsx_runtime87 = require("react/jsx-runtime");
@@ -10339,12 +10444,12 @@ var MicIcon = function(props) {
10339
10444
  }));
10340
10445
  };
10341
10446
  // src/components/threads/AudioThread/Form/ActionButton/index.tsx
10342
- var import_react_compiler_runtime53 = require("react-compiler-runtime");
10447
+ var import_react_compiler_runtime55 = require("react-compiler-runtime");
10343
10448
  var import_themes62 = require("@radix-ui/themes");
10344
10449
  var import_react_icons17 = require("@radix-ui/react-icons");
10345
10450
  var import_jsx_runtime88 = require("react/jsx-runtime");
10346
10451
  var ActionButton = function() {
10347
- var $ = (0, import_react_compiler_runtime53.c)(27);
10452
+ var $ = (0, import_react_compiler_runtime55.c)(27);
10348
10453
  var audioThreadContext = useAudioThreadContext();
10349
10454
  var superinterfaceContext = useSuperinterfaceContext();
10350
10455
  if (audioThreadContext.status === "recording") {
@@ -10581,7 +10686,7 @@ function _toPrimitive50(t, r) {
10581
10686
  return ("string" === r ? String : Number)(t);
10582
10687
  }
10583
10688
  var Form = function(props) {
10584
- var $ = (0, import_react_compiler_runtime54.c)(17);
10689
+ var $ = (0, import_react_compiler_runtime56.c)(17);
10585
10690
  var audioThreadContext = useAudioThreadContext();
10586
10691
  var t0 = audioThreadContext.status === "recording" ? "var(--accent-11)" : "var(--gray-11)";
10587
10692
  var t1;
@@ -10801,7 +10906,7 @@ AudioThreadDialog.Root = Root9;
10801
10906
  AudioThreadDialog.Trigger = Trigger;
10802
10907
  AudioThreadDialog.Content = Content7;
10803
10908
  // src/components/markdown/MarkdownProvider/index.tsx
10804
- var import_react_compiler_runtime55 = require("react-compiler-runtime");
10909
+ var import_react_compiler_runtime57 = require("react-compiler-runtime");
10805
10910
  var import_react67 = require("react");
10806
10911
  var import_jsx_runtime92 = require("react/jsx-runtime");
10807
10912
  var _excluded5 = [
@@ -10826,7 +10931,7 @@ function _objectWithoutPropertiesLoose5(r, e) {
10826
10931
  return t;
10827
10932
  }
10828
10933
  var MarkdownProvider = function(t0) {
10829
- var $ = (0, import_react_compiler_runtime55.c)(9);
10934
+ var $ = (0, import_react_compiler_runtime57.c)(9);
10830
10935
  var children;
10831
10936
  var rest;
10832
10937
  if ($[0] !== t0) {
@@ -10868,8 +10973,369 @@ var MarkdownProvider = function(t0) {
10868
10973
  }
10869
10974
  return t3;
10870
10975
  };
10871
- // src/components/avatars/Avatar.tsx
10976
+ // src/components/annotations/SourceAnnotation/index.tsx
10977
+ var import_react_compiler_runtime60 = require("react-compiler-runtime");
10978
+ // src/components/annotations/SourceAnnotation/FileCitation/index.tsx
10979
+ var import_react_compiler_runtime59 = require("react-compiler-runtime");
10980
+ var import_react69 = require("react");
10981
+ var import_react_icons19 = require("@radix-ui/react-icons");
10982
+ var import_themes66 = require("@radix-ui/themes");
10983
+ // src/components/annotations/SourceAnnotation/FileCitation/Content/index.tsx
10872
10984
  var import_react_compiler_runtime58 = require("react-compiler-runtime");
10985
+ var import_themes65 = require("@radix-ui/themes");
10986
+ var import_react68 = require("@pdfslick/react");
10987
+ var import_pdf_viewer = require("@pdfslick/react/dist/pdf_viewer.css");
10988
+ // src/components/annotations/SourceAnnotation/FileCitation/Content/Navigation.tsx
10989
+ var import_themes64 = require("@radix-ui/themes");
10990
+ var import_react_icons18 = require("@radix-ui/react-icons");
10991
+ var import_jsx_runtime93 = require("react/jsx-runtime");
10992
+ var Navigation = function(_ref) {
10993
+ var usePDFSlickStore = _ref.usePDFSlickStore;
10994
+ var pdfSlick = usePDFSlickStore(function(s) {
10995
+ return s.pdfSlick;
10996
+ });
10997
+ return /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(import_themes64.Flex, {
10998
+ justify: "center",
10999
+ position: "absolute",
11000
+ bottom: "var(--space-2)",
11001
+ left: "0",
11002
+ right: "0",
11003
+ style: {
11004
+ zIndex: 99999
11005
+ },
11006
+ children: /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(import_themes64.Card, {
11007
+ children: /* @__PURE__ */ (0, import_jsx_runtime93.jsxs)(import_themes64.Flex, {
11008
+ gap: "2",
11009
+ children: [
11010
+ /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(import_themes64.IconButton, {
11011
+ variant: "soft",
11012
+ onClick: function() {
11013
+ var _pdfSlick$viewer;
11014
+ return pdfSlick === null || pdfSlick === void 0 || (_pdfSlick$viewer = pdfSlick.viewer) === null || _pdfSlick$viewer === void 0 ? void 0 : _pdfSlick$viewer.decreaseScale();
11015
+ },
11016
+ children: /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(import_react_icons18.ZoomOutIcon, {})
11017
+ }),
11018
+ /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(import_themes64.IconButton, {
11019
+ variant: "soft",
11020
+ onClick: function() {
11021
+ var _pdfSlick$viewer2;
11022
+ return pdfSlick === null || pdfSlick === void 0 || (_pdfSlick$viewer2 = pdfSlick.viewer) === null || _pdfSlick$viewer2 === void 0 ? void 0 : _pdfSlick$viewer2.increaseScale();
11023
+ },
11024
+ children: /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(import_react_icons18.ZoomInIcon, {})
11025
+ })
11026
+ ]
11027
+ })
11028
+ })
11029
+ });
11030
+ };
11031
+ // src/components/annotations/SourceAnnotation/FileCitation/Content/index.tsx
11032
+ var import_jsx_runtime94 = require("react/jsx-runtime");
11033
+ function ownKeys53(e, r) {
11034
+ var t = Object.keys(e);
11035
+ if (Object.getOwnPropertySymbols) {
11036
+ var o = Object.getOwnPropertySymbols(e);
11037
+ r && (o = o.filter(function(r2) {
11038
+ return Object.getOwnPropertyDescriptor(e, r2).enumerable;
11039
+ })), t.push.apply(t, o);
11040
+ }
11041
+ return t;
11042
+ }
11043
+ function _objectSpread53(e) {
11044
+ for(var r = 1; r < arguments.length; r++){
11045
+ var t = null != arguments[r] ? arguments[r] : {};
11046
+ r % 2 ? ownKeys53(Object(t), true).forEach(function(r2) {
11047
+ _defineProperty53(e, r2, t[r2]);
11048
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys53(Object(t)).forEach(function(r2) {
11049
+ Object.defineProperty(e, r2, Object.getOwnPropertyDescriptor(t, r2));
11050
+ });
11051
+ }
11052
+ return e;
11053
+ }
11054
+ function _defineProperty53(e, r, t) {
11055
+ return (r = _toPropertyKey53(r)) in e ? Object.defineProperty(e, r, {
11056
+ value: t,
11057
+ enumerable: true,
11058
+ configurable: true,
11059
+ writable: true
11060
+ }) : e[r] = t, e;
11061
+ }
11062
+ function _toPropertyKey53(t) {
11063
+ var i = _toPrimitive53(t, "string");
11064
+ return "symbol" == (typeof i === "undefined" ? "undefined" : _type_of(i)) ? i : i + "";
11065
+ }
11066
+ function _toPrimitive53(t, r) {
11067
+ if ("object" != (typeof t === "undefined" ? "undefined" : _type_of(t)) || !t) return t;
11068
+ var e = t[Symbol.toPrimitive];
11069
+ if (void 0 !== e) {
11070
+ var i = e.call(t, r || "default");
11071
+ if ("object" != (typeof i === "undefined" ? "undefined" : _type_of(i))) return i;
11072
+ throw new TypeError("@@toPrimitive must return a primitive value.");
11073
+ }
11074
+ return ("string" === r ? String : Number)(t);
11075
+ }
11076
+ var Content9 = function(t0) {
11077
+ var $ = (0, import_react_compiler_runtime58.c)(14);
11078
+ var fileId = t0.fileId;
11079
+ var superinterfaceContext = useSuperinterfaceContext();
11080
+ var nextSearchParams = new URLSearchParams(superinterfaceContext.variables);
11081
+ var t1;
11082
+ if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
11083
+ t1 = {
11084
+ scaleValue: "page-width",
11085
+ removePageBorders: true
11086
+ };
11087
+ $[0] = t1;
11088
+ } else {
11089
+ t1 = $[0];
11090
+ }
11091
+ var _ref = (0, import_react68.usePDFSlick)("".concat(superinterfaceContext.baseUrl, "/api/cloud/files/").concat(fileId, "/contents?").concat(nextSearchParams), t1), viewerRef = _ref.viewerRef, usePDFSlickStore = _ref.usePDFSlickStore, PDFSlickViewer = _ref.PDFSlickViewer;
11092
+ var t2;
11093
+ if ($[1] === Symbol.for("react.memo_cache_sentinel")) {
11094
+ t2 = {
11095
+ display: "flex",
11096
+ flexGrow: "1"
11097
+ };
11098
+ $[1] = t2;
11099
+ } else {
11100
+ t2 = $[1];
11101
+ }
11102
+ var t3;
11103
+ if ($[2] === Symbol.for("react.memo_cache_sentinel")) {
11104
+ t3 = {
11105
+ display: "flex",
11106
+ flexGrow: "1"
11107
+ };
11108
+ $[2] = t3;
11109
+ } else {
11110
+ t3 = $[2];
11111
+ }
11112
+ var t4;
11113
+ if ($[3] !== usePDFSlickStore || $[4] !== viewerRef) {
11114
+ t4 = {
11115
+ viewerRef: viewerRef,
11116
+ usePDFSlickStore: usePDFSlickStore
11117
+ };
11118
+ $[3] = usePDFSlickStore;
11119
+ $[4] = viewerRef;
11120
+ $[5] = t4;
11121
+ } else {
11122
+ t4 = $[5];
11123
+ }
11124
+ var t5;
11125
+ if ($[6] !== PDFSlickViewer || $[7] !== t4) {
11126
+ t5 = /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(PDFSlickViewer, _objectSpread53({}, t4));
11127
+ $[6] = PDFSlickViewer;
11128
+ $[7] = t4;
11129
+ $[8] = t5;
11130
+ } else {
11131
+ t5 = $[8];
11132
+ }
11133
+ var t6;
11134
+ if ($[9] !== usePDFSlickStore) {
11135
+ t6 = /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(Navigation, {
11136
+ usePDFSlickStore: usePDFSlickStore
11137
+ });
11138
+ $[9] = usePDFSlickStore;
11139
+ $[10] = t6;
11140
+ } else {
11141
+ t6 = $[10];
11142
+ }
11143
+ var t7;
11144
+ if ($[11] !== t5 || $[12] !== t6) {
11145
+ t7 = /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(import_themes65.Flex, {
11146
+ direction: "column",
11147
+ flexGrow: "1",
11148
+ gap: "3",
11149
+ children: /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(import_themes65.Card, {
11150
+ style: t2,
11151
+ children: /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(import_themes65.Inset, {
11152
+ clip: "padding-box",
11153
+ style: t3,
11154
+ children: /* @__PURE__ */ (0, import_jsx_runtime94.jsxs)(import_themes65.Flex, {
11155
+ flexGrow: "1",
11156
+ position: "relative",
11157
+ children: [
11158
+ t5,
11159
+ t6
11160
+ ]
11161
+ })
11162
+ })
11163
+ })
11164
+ });
11165
+ $[11] = t5;
11166
+ $[12] = t6;
11167
+ $[13] = t7;
11168
+ } else {
11169
+ t7 = $[13];
11170
+ }
11171
+ return t7;
11172
+ };
11173
+ // src/components/annotations/SourceAnnotation/FileCitation/index.tsx
11174
+ var import_jsx_runtime95 = require("react/jsx-runtime");
11175
+ var FileCitation = function(t0) {
11176
+ var $ = (0, import_react_compiler_runtime59.c)(18);
11177
+ var annotation = t0.annotation;
11178
+ var _ref = _sliced_to_array((0, import_react69.useState)(null), 2), activeFileId = _ref[0], setActiveFileId = _ref[1];
11179
+ var t1;
11180
+ if ($[0] !== annotation.file_citation.file_id) {
11181
+ t1 = function() {
11182
+ setActiveFileId(annotation.file_citation.file_id);
11183
+ };
11184
+ $[0] = annotation.file_citation.file_id;
11185
+ $[1] = t1;
11186
+ } else {
11187
+ t1 = $[1];
11188
+ }
11189
+ var t2;
11190
+ if ($[2] === Symbol.for("react.memo_cache_sentinel")) {
11191
+ t2 = /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(import_react_icons19.QuoteIcon, {});
11192
+ $[2] = t2;
11193
+ } else {
11194
+ t2 = $[2];
11195
+ }
11196
+ var t3;
11197
+ if ($[3] !== t1) {
11198
+ t3 = /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(import_themes66.IconButton, {
11199
+ variant: "soft",
11200
+ color: "gray",
11201
+ size: "1",
11202
+ onClick: t1,
11203
+ children: t2
11204
+ });
11205
+ $[3] = t1;
11206
+ $[4] = t3;
11207
+ } else {
11208
+ t3 = $[4];
11209
+ }
11210
+ var t4 = !!activeFileId;
11211
+ var t5;
11212
+ if ($[5] === Symbol.for("react.memo_cache_sentinel")) {
11213
+ t5 = function(open) {
11214
+ if (!open) {
11215
+ setActiveFileId(null);
11216
+ }
11217
+ };
11218
+ $[5] = t5;
11219
+ } else {
11220
+ t5 = $[5];
11221
+ }
11222
+ var t6;
11223
+ if ($[6] === Symbol.for("react.memo_cache_sentinel")) {
11224
+ t6 = {
11225
+ display: "flex",
11226
+ flexDirection: "column"
11227
+ };
11228
+ $[6] = t6;
11229
+ } else {
11230
+ t6 = $[6];
11231
+ }
11232
+ var t7;
11233
+ if ($[7] === Symbol.for("react.memo_cache_sentinel")) {
11234
+ t7 = /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(import_themes66.VisuallyHidden, {
11235
+ asChild: true,
11236
+ children: /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(import_themes66.Dialog.Title, {
11237
+ children: "Source"
11238
+ })
11239
+ });
11240
+ $[7] = t7;
11241
+ } else {
11242
+ t7 = $[7];
11243
+ }
11244
+ var t8;
11245
+ if ($[8] !== activeFileId) {
11246
+ t8 = activeFileId && /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(Content9, {
11247
+ fileId: activeFileId
11248
+ });
11249
+ $[8] = activeFileId;
11250
+ $[9] = t8;
11251
+ } else {
11252
+ t8 = $[9];
11253
+ }
11254
+ var t9;
11255
+ if ($[10] !== t8) {
11256
+ t9 = /* @__PURE__ */ (0, import_jsx_runtime95.jsxs)(import_themes66.Dialog.Content, {
11257
+ width: "1000px",
11258
+ height: "90vh",
11259
+ maxWidth: "calc(100vw - 2 * var(--space-4))",
11260
+ "aria-describedby": void 0,
11261
+ style: t6,
11262
+ children: [
11263
+ t7,
11264
+ t8
11265
+ ]
11266
+ });
11267
+ $[10] = t8;
11268
+ $[11] = t9;
11269
+ } else {
11270
+ t9 = $[11];
11271
+ }
11272
+ var t10;
11273
+ if ($[12] !== t4 || $[13] !== t9) {
11274
+ t10 = /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(import_themes66.Dialog.Root, {
11275
+ open: t4,
11276
+ onOpenChange: t5,
11277
+ children: t9
11278
+ });
11279
+ $[12] = t4;
11280
+ $[13] = t9;
11281
+ $[14] = t10;
11282
+ } else {
11283
+ t10 = $[14];
11284
+ }
11285
+ var t11;
11286
+ if ($[15] !== t10 || $[16] !== t3) {
11287
+ t11 = /* @__PURE__ */ (0, import_jsx_runtime95.jsxs)(import_jsx_runtime95.Fragment, {
11288
+ children: [
11289
+ t3,
11290
+ t10
11291
+ ]
11292
+ });
11293
+ $[15] = t10;
11294
+ $[16] = t3;
11295
+ $[17] = t11;
11296
+ } else {
11297
+ t11 = $[17];
11298
+ }
11299
+ return t11;
11300
+ };
11301
+ // src/components/annotations/SourceAnnotation/index.tsx
11302
+ var import_jsx_runtime96 = require("react/jsx-runtime");
11303
+ var SourceAnnotation = function(t0) {
11304
+ var $ = (0, import_react_compiler_runtime60.c)(5);
11305
+ var annotation = t0.annotation, children = t0.children;
11306
+ if (annotation.type === "file_citation") {
11307
+ var t1;
11308
+ if ($[0] !== annotation) {
11309
+ t1 = /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(FileCitation, {
11310
+ annotation: annotation
11311
+ });
11312
+ $[0] = annotation;
11313
+ $[1] = t1;
11314
+ } else {
11315
+ t1 = $[1];
11316
+ }
11317
+ return t1;
11318
+ } else {
11319
+ if (annotation.type === "file_path") {
11320
+ var _t;
11321
+ if ($[2] !== annotation || $[3] !== children) {
11322
+ _t = /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(FilePathAnnotation, {
11323
+ annotation: annotation,
11324
+ children: children
11325
+ });
11326
+ $[2] = annotation;
11327
+ $[3] = children;
11328
+ $[4] = _t;
11329
+ } else {
11330
+ _t = $[4];
11331
+ }
11332
+ return _t;
11333
+ }
11334
+ }
11335
+ return null;
11336
+ };
11337
+ // src/components/avatars/Avatar.tsx
11338
+ var import_react_compiler_runtime63 = require("react-compiler-runtime");
10873
11339
  // src/lib/enums/index.ts
10874
11340
  var IconAvatarName = /* @__PURE__ */ function(IconAvatarName2) {
10875
11341
  IconAvatarName2["BACKPACK"] = "BACKPACK";
@@ -10892,10 +11358,10 @@ var AvatarType = /* @__PURE__ */ function(AvatarType2) {
10892
11358
  return AvatarType2;
10893
11359
  }({});
10894
11360
  // src/components/avatars/Avatar.tsx
10895
- var import_themes66 = require("@radix-ui/themes");
11361
+ var import_themes69 = require("@radix-ui/themes");
10896
11362
  // src/components/imageAvatars/ImageAvatar/index.tsx
10897
- var import_react_compiler_runtime56 = require("react-compiler-runtime");
10898
- var import_themes64 = require("@radix-ui/themes");
11363
+ var import_react_compiler_runtime61 = require("react-compiler-runtime");
11364
+ var import_themes67 = require("@radix-ui/themes");
10899
11365
  // src/components/imageAvatars/ImageAvatar/lib/optimizedSrc/path.ts
10900
11366
  var width = function(_ref) {
10901
11367
  var size = _ref.size;
@@ -10946,9 +11412,9 @@ var optimizedSrc = function(_ref) {
10946
11412
  }));
10947
11413
  };
10948
11414
  // src/components/imageAvatars/ImageAvatar/index.tsx
10949
- var import_jsx_runtime93 = require("react/jsx-runtime");
11415
+ var import_jsx_runtime97 = require("react/jsx-runtime");
10950
11416
  var ImageAvatar = function(t0) {
10951
- var $ = (0, import_react_compiler_runtime56.c)(9);
11417
+ var $ = (0, import_react_compiler_runtime61.c)(9);
10952
11418
  var imageAvatar = t0.imageAvatar, size = t0.size, className = t0.className, style = t0.style;
10953
11419
  var superinterfaceContext = useSuperinterfaceContext();
10954
11420
  var t1;
@@ -10967,7 +11433,7 @@ var ImageAvatar = function(t0) {
10967
11433
  }
10968
11434
  var t2;
10969
11435
  if ($[4] !== className || $[5] !== size || $[6] !== style || $[7] !== t1) {
10970
- t2 = /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(import_themes64.Avatar, {
11436
+ t2 = /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(import_themes67.Avatar, {
10971
11437
  className: className,
10972
11438
  style: style,
10973
11439
  fallback: "",
@@ -10985,24 +11451,24 @@ var ImageAvatar = function(t0) {
10985
11451
  return t2;
10986
11452
  };
10987
11453
  // src/components/iconAvatars/IconAvatar.tsx
10988
- var import_react_compiler_runtime57 = require("react-compiler-runtime");
10989
- var import_react68 = require("react");
10990
- var import_themes65 = require("@radix-ui/themes");
11454
+ var import_react_compiler_runtime62 = require("react-compiler-runtime");
11455
+ var import_react70 = require("react");
11456
+ var import_themes68 = require("@radix-ui/themes");
10991
11457
  // src/lib/iconAvatars/iconAvatarComponents.ts
10992
- var import_react_icons18 = require("@radix-ui/react-icons");
11458
+ var import_react_icons20 = require("@radix-ui/react-icons");
10993
11459
  var _obj;
10994
- var iconAvatarComponents = (_obj = {}, _define_property(_obj, IconAvatarName.BACKPACK, import_react_icons18.BackpackIcon), _define_property(_obj, IconAvatarName.ROCKET, import_react_icons18.RocketIcon), _define_property(_obj, IconAvatarName.MAGIC_WAND, import_react_icons18.MagicWandIcon), _define_property(_obj, IconAvatarName.CUBE, import_react_icons18.CubeIcon), _define_property(_obj, IconAvatarName.TARGET, import_react_icons18.TargetIcon), _define_property(_obj, IconAvatarName.DISC, import_react_icons18.DiscIcon), _define_property(_obj, IconAvatarName.GLOBE, import_react_icons18.GlobeIcon), _define_property(_obj, IconAvatarName.STAR, import_react_icons18.StarIcon), _define_property(_obj, IconAvatarName.LIGHTNING_BOLT, import_react_icons18.LightningBoltIcon), _define_property(_obj, IconAvatarName.FACE, import_react_icons18.FaceIcon), _define_property(_obj, IconAvatarName.PERSON, import_react_icons18.PersonIcon), _define_property(_obj, IconAvatarName.HEART, import_react_icons18.HeartIcon), _obj);
11460
+ var iconAvatarComponents = (_obj = {}, _define_property(_obj, IconAvatarName.BACKPACK, import_react_icons20.BackpackIcon), _define_property(_obj, IconAvatarName.ROCKET, import_react_icons20.RocketIcon), _define_property(_obj, IconAvatarName.MAGIC_WAND, import_react_icons20.MagicWandIcon), _define_property(_obj, IconAvatarName.CUBE, import_react_icons20.CubeIcon), _define_property(_obj, IconAvatarName.TARGET, import_react_icons20.TargetIcon), _define_property(_obj, IconAvatarName.DISC, import_react_icons20.DiscIcon), _define_property(_obj, IconAvatarName.GLOBE, import_react_icons20.GlobeIcon), _define_property(_obj, IconAvatarName.STAR, import_react_icons20.StarIcon), _define_property(_obj, IconAvatarName.LIGHTNING_BOLT, import_react_icons20.LightningBoltIcon), _define_property(_obj, IconAvatarName.FACE, import_react_icons20.FaceIcon), _define_property(_obj, IconAvatarName.PERSON, import_react_icons20.PersonIcon), _define_property(_obj, IconAvatarName.HEART, import_react_icons20.HeartIcon), _obj);
10995
11461
  // src/components/iconAvatars/IconAvatar.tsx
10996
- var import_jsx_runtime94 = require("react/jsx-runtime");
11462
+ var import_jsx_runtime98 = require("react/jsx-runtime");
10997
11463
  var IconAvatar = function(t0) {
10998
- var $ = (0, import_react_compiler_runtime57.c)(7);
11464
+ var $ = (0, import_react_compiler_runtime62.c)(7);
10999
11465
  var iconAvatar = t0.iconAvatar, size = t0.size, className = t0.className, style = t0.style;
11000
11466
  var t1;
11001
11467
  t1 = iconAvatarComponents[iconAvatar.name];
11002
11468
  var Component2 = t1;
11003
11469
  var t2;
11004
11470
  if ($[0] !== Component2) {
11005
- t2 = Component2 ? /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(Component2, {}) : "";
11471
+ t2 = Component2 ? /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(Component2, {}) : "";
11006
11472
  $[0] = Component2;
11007
11473
  $[1] = t2;
11008
11474
  } else {
@@ -11010,7 +11476,7 @@ var IconAvatar = function(t0) {
11010
11476
  }
11011
11477
  var t3;
11012
11478
  if ($[2] !== className || $[3] !== size || $[4] !== style || $[5] !== t2) {
11013
- t3 = /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(import_themes65.Avatar, {
11479
+ t3 = /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(import_themes68.Avatar, {
11014
11480
  className: className,
11015
11481
  style: style,
11016
11482
  size: size,
@@ -11027,16 +11493,16 @@ var IconAvatar = function(t0) {
11027
11493
  return t3;
11028
11494
  };
11029
11495
  // src/components/avatars/Avatar.tsx
11030
- var import_jsx_runtime95 = require("react/jsx-runtime");
11496
+ var import_jsx_runtime99 = require("react/jsx-runtime");
11031
11497
  var Avatar6 = function(t0) {
11032
- var $ = (0, import_react_compiler_runtime58.c)(14);
11498
+ var $ = (0, import_react_compiler_runtime63.c)(14);
11033
11499
  var avatar = t0.avatar, t1 = t0.size, className = t0.className, style = t0.style;
11034
11500
  var size = t1 === void 0 ? "1" : t1;
11035
11501
  if (avatar) {
11036
11502
  if (avatar.type === AvatarType.IMAGE && avatar.imageAvatar) {
11037
11503
  var _t;
11038
11504
  if ($[0] !== avatar.imageAvatar || $[1] !== className || $[2] !== size || $[3] !== style) {
11039
- _t = /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(ImageAvatar, {
11505
+ _t = /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(ImageAvatar, {
11040
11506
  imageAvatar: avatar.imageAvatar,
11041
11507
  size: size,
11042
11508
  className: className,
@@ -11055,7 +11521,7 @@ var Avatar6 = function(t0) {
11055
11521
  if (avatar.type === AvatarType.ICON && avatar.iconAvatar) {
11056
11522
  var _t2;
11057
11523
  if ($[5] !== avatar.iconAvatar || $[6] !== className || $[7] !== size || $[8] !== style) {
11058
- _t2 = /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(IconAvatar, {
11524
+ _t2 = /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(IconAvatar, {
11059
11525
  iconAvatar: avatar.iconAvatar,
11060
11526
  size: size,
11061
11527
  className: className,
@@ -11074,7 +11540,7 @@ var Avatar6 = function(t0) {
11074
11540
  }
11075
11541
  var t2;
11076
11542
  if ($[10] !== className || $[11] !== size || $[12] !== style) {
11077
- t2 = /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(import_themes66.Avatar, {
11543
+ t2 = /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(import_themes69.Avatar, {
11078
11544
  fallback: "",
11079
11545
  size: size,
11080
11546
  className: className,
@@ -11090,15 +11556,15 @@ var Avatar6 = function(t0) {
11090
11556
  return t2;
11091
11557
  };
11092
11558
  // src/components/components/ComponentsProvider.tsx
11093
- var import_react_compiler_runtime59 = require("react-compiler-runtime");
11094
- var import_react70 = require("react");
11559
+ var import_react_compiler_runtime64 = require("react-compiler-runtime");
11560
+ var import_react72 = require("react");
11095
11561
  // src/hooks/components/useComponents.ts
11096
- var import_react69 = require("react");
11562
+ var import_react71 = require("react");
11097
11563
  var useComponents = function() {
11098
- return (0, import_react69.useContext)(ComponentsContext);
11564
+ return (0, import_react71.useContext)(ComponentsContext);
11099
11565
  };
11100
11566
  // src/components/components/ComponentsProvider.tsx
11101
- var import_jsx_runtime96 = require("react/jsx-runtime");
11567
+ var import_jsx_runtime100 = require("react/jsx-runtime");
11102
11568
  var _excluded6 = [
11103
11569
  "children"
11104
11570
  ];
@@ -11121,7 +11587,7 @@ function _objectWithoutPropertiesLoose6(r, e) {
11121
11587
  return t;
11122
11588
  }
11123
11589
  var ComponentsProvider = function(t0) {
11124
- var $ = (0, import_react_compiler_runtime59.c)(9);
11590
+ var $ = (0, import_react_compiler_runtime64.c)(9);
11125
11591
  var children;
11126
11592
  var rest;
11127
11593
  if ($[0] !== t0) {
@@ -11151,7 +11617,7 @@ var ComponentsProvider = function(t0) {
11151
11617
  var value = t1;
11152
11618
  var t3;
11153
11619
  if ($[6] !== children || $[7] !== value) {
11154
- t3 = /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(ComponentsContext.Provider, {
11620
+ t3 = /* @__PURE__ */ (0, import_jsx_runtime100.jsx)(ComponentsContext.Provider, {
11155
11621
  value: value,
11156
11622
  children: children
11157
11623
  });
@@ -11164,11 +11630,11 @@ var ComponentsProvider = function(t0) {
11164
11630
  return t3;
11165
11631
  };
11166
11632
  // src/components/assistants/AssistantProvider/index.tsx
11167
- var import_react_compiler_runtime60 = require("react-compiler-runtime");
11168
- var import_jsx_runtime97 = require("react/jsx-runtime");
11633
+ var import_react_compiler_runtime65 = require("react-compiler-runtime");
11634
+ var import_jsx_runtime101 = require("react/jsx-runtime");
11169
11635
  var AssistantProvider = function(t0) {
11170
11636
  var _assistant$name;
11171
- var $ = (0, import_react_compiler_runtime60.c)(10);
11637
+ var $ = (0, import_react_compiler_runtime65.c)(10);
11172
11638
  var children = t0.children;
11173
11639
  var superinterfaceContext = useSuperinterfaceContext();
11174
11640
  var t1;
@@ -11186,7 +11652,7 @@ var AssistantProvider = function(t0) {
11186
11652
  var t3 = assistant === null || assistant === void 0 ? void 0 : assistant.avatar;
11187
11653
  var t4;
11188
11654
  if ($[2] !== t3) {
11189
- t4 = /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(Avatar6, {
11655
+ t4 = /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(Avatar6, {
11190
11656
  avatar: t3
11191
11657
  });
11192
11658
  $[2] = t3;
@@ -11196,7 +11662,7 @@ var AssistantProvider = function(t0) {
11196
11662
  }
11197
11663
  var t5;
11198
11664
  if ($[4] !== children || $[5] !== t4) {
11199
- t5 = /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(AssistantAvatarContext.Provider, {
11665
+ t5 = /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(AssistantAvatarContext.Provider, {
11200
11666
  value: t4,
11201
11667
  children: children
11202
11668
  });
@@ -11208,7 +11674,7 @@ var AssistantProvider = function(t0) {
11208
11674
  }
11209
11675
  var t6;
11210
11676
  if ($[7] !== t2 || $[8] !== t5) {
11211
- t6 = /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(AssistantNameContext.Provider, {
11677
+ t6 = /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(AssistantNameContext.Provider, {
11212
11678
  value: t2,
11213
11679
  children: t5
11214
11680
  });
@@ -11234,6 +11700,7 @@ var AssistantProvider = function(t0) {
11234
11700
  MarkdownContext: MarkdownContext,
11235
11701
  MarkdownProvider: MarkdownProvider,
11236
11702
  RunStep: RunStep,
11703
+ SourceAnnotation: SourceAnnotation,
11237
11704
  Suggestions: Suggestions,
11238
11705
  SuperinterfaceProvider: SuperinterfaceProvider,
11239
11706
  Thread: Thread,