@superinterface/react 3.7.3-beta.1 → 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.js CHANGED
@@ -3998,26 +3998,51 @@ var Img = function(props) {
3998
3998
  // src/contexts/markdown/MarkdownContext/lib/components/Annotation/index.tsx
3999
3999
  import { c as _c21 } from "react-compiler-runtime";
4000
4000
  import { QuoteIcon } from "@radix-ui/react-icons";
4001
+ // src/components/annotations/FilePathAnnotation.tsx
4002
+ import { c as _c20 } from "react-compiler-runtime";
4003
+ import { jsx as _jsx40 } from "react/jsx-runtime";
4004
+ var FilePathAnnotation = function(t0) {
4005
+ var $ = _c20(3);
4006
+ var annotation = t0.annotation, children = t0.children;
4007
+ var superinterfaceContext = useSuperinterfaceContext();
4008
+ var nextSearchParams = new URLSearchParams(superinterfaceContext.variables);
4009
+ var t1 = "".concat(superinterfaceContext.baseUrl, "/files/").concat(annotation.file_path.file_id, "/contents?").concat(nextSearchParams);
4010
+ var t2;
4011
+ if ($[0] !== children || $[1] !== t1) {
4012
+ t2 = /* @__PURE__ */ _jsx40(Link, {
4013
+ href: t1,
4014
+ target: "_self",
4015
+ download: true,
4016
+ children: children
4017
+ });
4018
+ $[0] = children;
4019
+ $[1] = t1;
4020
+ $[2] = t2;
4021
+ } else {
4022
+ t2 = $[2];
4023
+ }
4024
+ return t2;
4025
+ };
4001
4026
  // src/contexts/markdown/MarkdownContext/lib/components/Annotation/AnnotationBase.tsx
4002
4027
  import { IconButton as IconButton4, Popover as Popover4, Flex as Flex10, Text as Text5 } from "@radix-ui/themes";
4003
- import { jsx as _jsx40, jsxs as _jsxs14 } from "react/jsx-runtime";
4028
+ import { jsx as _jsx41, jsxs as _jsxs14 } from "react/jsx-runtime";
4004
4029
  var AnnotationBase = function(_ref) {
4005
4030
  var icon = _ref.icon, content = _ref.content;
4006
4031
  return /* @__PURE__ */ _jsxs14(Popover4.Root, {
4007
4032
  children: [
4008
- /* @__PURE__ */ _jsx40(Popover4.Trigger, {
4009
- children: /* @__PURE__ */ _jsx40(IconButton4, {
4033
+ /* @__PURE__ */ _jsx41(Popover4.Trigger, {
4034
+ children: /* @__PURE__ */ _jsx41(IconButton4, {
4010
4035
  variant: "soft",
4011
4036
  color: "gray",
4012
4037
  size: "1",
4013
4038
  children: icon
4014
4039
  })
4015
4040
  }),
4016
- /* @__PURE__ */ _jsx40(Popover4.Content, {
4041
+ /* @__PURE__ */ _jsx41(Popover4.Content, {
4017
4042
  size: "1",
4018
- children: /* @__PURE__ */ _jsx40(Flex10, {
4043
+ children: /* @__PURE__ */ _jsx41(Flex10, {
4019
4044
  direction: "column",
4020
- children: /* @__PURE__ */ _jsx40(Text5, {
4045
+ children: /* @__PURE__ */ _jsx41(Text5, {
4021
4046
  size: "1",
4022
4047
  color: "gray",
4023
4048
  children: content
@@ -4027,31 +4052,6 @@ var AnnotationBase = function(_ref) {
4027
4052
  ]
4028
4053
  });
4029
4054
  };
4030
- // src/contexts/markdown/MarkdownContext/lib/components/Annotation/FilePathAnnotation.tsx
4031
- import { c as _c20 } from "react-compiler-runtime";
4032
- import { jsx as _jsx41 } from "react/jsx-runtime";
4033
- var FilePathAnnotation = function(t0) {
4034
- var $ = _c20(3);
4035
- var annotation = t0.annotation, children = t0.children;
4036
- var superinterfaceContext = useSuperinterfaceContext();
4037
- var nextSearchParams = new URLSearchParams(superinterfaceContext.variables);
4038
- var t1 = "".concat(superinterfaceContext.baseUrl, "/files/").concat(annotation.file_path.file_id, "/contents?").concat(nextSearchParams);
4039
- var t2;
4040
- if ($[0] !== children || $[1] !== t1) {
4041
- t2 = /* @__PURE__ */ _jsx41(Link, {
4042
- href: t1,
4043
- target: "_self",
4044
- download: true,
4045
- children: children
4046
- });
4047
- $[0] = children;
4048
- $[1] = t1;
4049
- $[2] = t2;
4050
- } else {
4051
- t2 = $[2];
4052
- }
4053
- return t2;
4054
- };
4055
4055
  // src/contexts/markdown/MarkdownContext/lib/components/Annotation/index.tsx
4056
4056
  import { jsx as _jsx42 } from "react/jsx-runtime";
4057
4057
  var Annotation = function(t0) {
@@ -6322,9 +6322,11 @@ var Root4 = function(_ref) {
6322
6322
  });
6323
6323
  };
6324
6324
  // src/components/threads/Thread/MessageForm/Field/index.tsx
6325
+ import { c as _c42 } from "react-compiler-runtime";
6325
6326
  import { useFormContext as useFormContext2 } from "react-hook-form";
6326
6327
  import { Container as RadixContainer, Flex as Flex23 } from "@radix-ui/themes";
6327
6328
  // src/components/threads/Thread/MessageForm/Field/Control.tsx
6329
+ import { c as _c39 } from "react-compiler-runtime";
6328
6330
  import { Flex as Flex20 } from "@radix-ui/themes";
6329
6331
  import { useFormContext } from "react-hook-form";
6330
6332
  // src/hooks/misc/usePrevious.ts
@@ -6542,48 +6544,110 @@ var Root5 = function(_ref) {
6542
6544
  });
6543
6545
  };
6544
6546
  var Input = function(props) {
6545
- "use no memo";
6546
6547
  var _props$placeholder;
6548
+ var $ = _c39(20);
6547
6549
  var assistantNameContext = useContext12(AssistantNameContext);
6548
6550
  var register = useFormContext().register;
6549
6551
  var _useMessageFormContext = useMessageFormContext(), isDisabled = _useMessageFormContext.isDisabled, isLoading = _useMessageFormContext.isLoading;
6550
- var isSubmitDisabled = useMemo14(function() {
6551
- return isDisabled || isLoading;
6552
- }, [
6553
- isDisabled,
6554
- isLoading
6555
- ]);
6552
+ var t0;
6553
+ t0 = isDisabled || isLoading;
6554
+ var isSubmitDisabled = t0;
6556
6555
  var isDisabledPrevious = usePrevious(isDisabled);
6557
6556
  var textareaRef = useRef5(null);
6558
- var textareaProps = register("content");
6559
- useEffect6(function() {
6560
- if (isDisabled) return;
6561
- if (!isDisabledPrevious) return;
6562
- if (!textareaRef.current) return;
6563
- textareaRef.current.focus();
6564
- }, [
6565
- isDisabled,
6566
- isDisabledPrevious,
6567
- textareaProps
6568
- ]);
6569
- return /* @__PURE__ */ _jsx66(TextareaBase, _objectSpread30(_objectSpread30(_objectSpread30({
6570
- minRows: 1,
6571
- placeholder: (_props$placeholder = props.placeholder) !== null && _props$placeholder !== void 0 ? _props$placeholder : "Message ".concat(assistantNameContext, "..."),
6572
- disabled: isDisabled,
6573
- onKeyDown: function(e) {
6557
+ var t1;
6558
+ if ($[0] !== register) {
6559
+ t1 = register("content");
6560
+ $[0] = register;
6561
+ $[1] = t1;
6562
+ } else {
6563
+ t1 = $[1];
6564
+ }
6565
+ var textareaProps = t1;
6566
+ var t2;
6567
+ if ($[2] !== isDisabled || $[3] !== isDisabledPrevious) {
6568
+ t2 = function() {
6569
+ if (isDisabled) {
6570
+ return;
6571
+ }
6572
+ if (!isDisabledPrevious) {
6573
+ return;
6574
+ }
6575
+ if (!textareaRef.current) {
6576
+ return;
6577
+ }
6578
+ textareaRef.current.focus();
6579
+ };
6580
+ $[2] = isDisabled;
6581
+ $[3] = isDisabledPrevious;
6582
+ $[4] = t2;
6583
+ } else {
6584
+ t2 = $[4];
6585
+ }
6586
+ var t3;
6587
+ if ($[5] !== isDisabled || $[6] !== isDisabledPrevious || $[7] !== textareaProps) {
6588
+ t3 = [
6589
+ isDisabled,
6590
+ isDisabledPrevious,
6591
+ textareaProps
6592
+ ];
6593
+ $[5] = isDisabled;
6594
+ $[6] = isDisabledPrevious;
6595
+ $[7] = textareaProps;
6596
+ $[8] = t3;
6597
+ } else {
6598
+ t3 = $[8];
6599
+ }
6600
+ useEffect6(t2, t3);
6601
+ var t4 = (_props$placeholder = props.placeholder) !== null && _props$placeholder !== void 0 ? _props$placeholder : "Message ".concat(assistantNameContext, "...");
6602
+ var t5;
6603
+ if ($[9] !== isSubmitDisabled) {
6604
+ t5 = function(e) {
6574
6605
  if (e.key === "Enter" && !e.shiftKey) {
6575
6606
  var _e$currentTarget$form;
6576
6607
  e.preventDefault();
6577
- if (isSubmitDisabled) return;
6608
+ if (isSubmitDisabled) {
6609
+ return;
6610
+ }
6578
6611
  (_e$currentTarget$form = e.currentTarget.form) === null || _e$currentTarget$form === void 0 || _e$currentTarget$form.requestSubmit();
6579
6612
  }
6580
- }
6581
- }, textareaProps), props), {}, {
6582
- ref: function(e_0) {
6613
+ };
6614
+ $[9] = isSubmitDisabled;
6615
+ $[10] = t5;
6616
+ } else {
6617
+ t5 = $[10];
6618
+ }
6619
+ var t6;
6620
+ if ($[11] !== textareaProps) {
6621
+ t6 = function(e_0) {
6583
6622
  textareaProps.ref(e_0);
6584
6623
  textareaRef.current = e_0;
6585
- }
6586
- }));
6624
+ };
6625
+ $[11] = textareaProps;
6626
+ $[12] = t6;
6627
+ } else {
6628
+ t6 = $[12];
6629
+ }
6630
+ var t7;
6631
+ if ($[13] !== isDisabled || $[14] !== props || $[15] !== t4 || $[16] !== t5 || $[17] !== t6 || $[18] !== textareaProps) {
6632
+ t7 = /* @__PURE__ */ _jsx66(TextareaBase, _objectSpread30(_objectSpread30(_objectSpread30({
6633
+ minRows: 1,
6634
+ placeholder: t4,
6635
+ disabled: isDisabled,
6636
+ onKeyDown: t5
6637
+ }, textareaProps), props), {}, {
6638
+ ref: t6
6639
+ }));
6640
+ $[13] = isDisabled;
6641
+ $[14] = props;
6642
+ $[15] = t4;
6643
+ $[16] = t5;
6644
+ $[17] = t6;
6645
+ $[18] = textareaProps;
6646
+ $[19] = t7;
6647
+ } else {
6648
+ t7 = $[19];
6649
+ }
6650
+ return t7;
6587
6651
  };
6588
6652
  var Control = function(props) {
6589
6653
  return /* @__PURE__ */ _jsx66(Root5, _objectSpread30(_objectSpread30({}, props), {}, {
@@ -6593,7 +6657,7 @@ var Control = function(props) {
6593
6657
  Control.Root = Root5;
6594
6658
  Control.Input = Input;
6595
6659
  // src/components/threads/Thread/MessageForm/Field/Files/Preview.tsx
6596
- import { c as _c39 } from "react-compiler-runtime";
6660
+ import { c as _c40 } from "react-compiler-runtime";
6597
6661
  import { Flex as Flex21, Card as Card2, Spinner as Spinner2, Text as Text7, IconButton as IconButton6 } from "@radix-ui/themes";
6598
6662
  import { FileIcon as FileIcon2, Cross2Icon } from "@radix-ui/react-icons";
6599
6663
  import { jsx as _jsx67, jsxs as _jsxs23 } from "react/jsx-runtime";
@@ -6641,7 +6705,7 @@ function _toPrimitive31(t, r) {
6641
6705
  return ("string" === r ? String : Number)(t);
6642
6706
  }
6643
6707
  var Preview = function(props) {
6644
- var $ = _c39(8);
6708
+ var $ = _c40(8);
6645
6709
  var _useMessageFormContext = useMessageFormContext(), files = _useMessageFormContext.files, setFiles = _useMessageFormContext.setFiles;
6646
6710
  if (!files.length) {
6647
6711
  return null;
@@ -6739,7 +6803,7 @@ import dayjs2 from "dayjs";
6739
6803
  import { FilePlusIcon } from "@radix-ui/react-icons";
6740
6804
  import { IconButton as IconButton7, Flex as Flex22 } from "@radix-ui/themes";
6741
6805
  // src/hooks/files/useCreateFile/index.ts
6742
- import { c as _c40 } from "react-compiler-runtime";
6806
+ import { c as _c41 } from "react-compiler-runtime";
6743
6807
  import { useMutation as useMutation2, useQueryClient as useQueryClient5 } from "@tanstack/react-query";
6744
6808
  // src/hooks/files/useCreateFile/lib/mutationOptions/mutationFn/body/formData.ts
6745
6809
  var formData = function(variables) {
@@ -6975,7 +7039,7 @@ function _toPrimitive34(t, r) {
6975
7039
  return ("string" === r ? String : Number)(t);
6976
7040
  }
6977
7041
  var useCreateFile = function(t0) {
6978
- var $ = _c40(15);
7042
+ var $ = _c41(15);
6979
7043
  var t1;
6980
7044
  if ($[0] !== t0) {
6981
7045
  t1 = t0 === void 0 ? {
@@ -7417,38 +7481,76 @@ function _toPrimitive36(t, r) {
7417
7481
  }
7418
7482
  return ("string" === r ? String : Number)(t);
7419
7483
  }
7420
- var Root6 = function(_ref) {
7421
- "use no memo";
7422
- var children = _ref.children, className = _ref.className, style = _ref.style;
7423
- var _useFormContext2 = useFormContext2(), errors = _useFormContext2.formState.errors;
7424
- return /* @__PURE__ */ _jsx69(RadixContainer, {
7425
- size: "2",
7426
- flexGrow: "0",
7427
- className: className,
7428
- style: style,
7429
- children: /* @__PURE__ */ _jsx69(Flex23, {
7484
+ var Root6 = function(t0) {
7485
+ var $ = _c42(12);
7486
+ var children = t0.children, className = t0.className, style = t0.style;
7487
+ var _useFormContext2 = useFormContext2(), t1 = _useFormContext2.formState;
7488
+ var errors = t1.errors;
7489
+ var t2 = errors.content ? "var(--red-9)" : "var(--gray-5)";
7490
+ var t3;
7491
+ if ($[0] !== errors.content) {
7492
+ t3 = errors.content ? {
7493
+ backgroundColor: "var(--red-2)"
7494
+ } : {};
7495
+ $[0] = errors.content;
7496
+ $[1] = t3;
7497
+ } else {
7498
+ t3 = $[1];
7499
+ }
7500
+ var t4;
7501
+ if ($[2] !== t2 || $[3] !== t3) {
7502
+ t4 = _objectSpread36({
7503
+ borderRadius: "var(--radius-2)",
7504
+ borderWidth: "1px",
7505
+ borderStyle: "solid",
7506
+ borderColor: t2
7507
+ }, t3);
7508
+ $[2] = t2;
7509
+ $[3] = t3;
7510
+ $[4] = t4;
7511
+ } else {
7512
+ t4 = $[4];
7513
+ }
7514
+ var t5;
7515
+ if ($[5] !== children || $[6] !== t4) {
7516
+ t5 = /* @__PURE__ */ _jsx69(Flex23, {
7430
7517
  direction: "column",
7431
7518
  flexShrink: "0",
7432
7519
  children: /* @__PURE__ */ _jsx69(Flex23, {
7433
7520
  direction: "column",
7434
7521
  flexShrink: "0",
7435
7522
  children: /* @__PURE__ */ _jsx69(Flex23, {
7436
- style: _objectSpread36({
7437
- borderRadius: "var(--radius-2)",
7438
- borderWidth: "1px",
7439
- borderStyle: "solid",
7440
- borderColor: errors.content ? "var(--red-9)" : "var(--gray-5)"
7441
- }, errors.content ? {
7442
- backgroundColor: "var(--red-2)"
7443
- } : {}),
7523
+ style: t4,
7444
7524
  p: "2",
7445
7525
  pl: "3",
7446
7526
  wrap: "wrap",
7447
7527
  children: children
7448
7528
  })
7449
7529
  })
7450
- })
7451
- });
7530
+ });
7531
+ $[5] = children;
7532
+ $[6] = t4;
7533
+ $[7] = t5;
7534
+ } else {
7535
+ t5 = $[7];
7536
+ }
7537
+ var t6;
7538
+ if ($[8] !== className || $[9] !== style || $[10] !== t5) {
7539
+ t6 = /* @__PURE__ */ _jsx69(RadixContainer, {
7540
+ size: "2",
7541
+ flexGrow: "0",
7542
+ className: className,
7543
+ style: style,
7544
+ children: t5
7545
+ });
7546
+ $[8] = className;
7547
+ $[9] = style;
7548
+ $[10] = t5;
7549
+ $[11] = t6;
7550
+ } else {
7551
+ t6 = $[11];
7552
+ }
7553
+ return t6;
7452
7554
  };
7453
7555
  var Field = {
7454
7556
  Root: Root6,
@@ -7518,7 +7620,7 @@ import { Flex as Flex25 } from "@radix-ui/themes";
7518
7620
  // src/components/threads/Thread/Provider/index.tsx
7519
7621
  var Provider2 = SuperinterfaceProvider;
7520
7622
  // src/components/toasts/ToastsProvider/index.tsx
7521
- import { c as _c41 } from "react-compiler-runtime";
7623
+ import { c as _c43 } from "react-compiler-runtime";
7522
7624
  import { useState as useState5, useCallback as useCallback4 } from "react";
7523
7625
  import * as Toast2 from "@radix-ui/react-toast";
7524
7626
  // src/components/toasts/ToastsProvider/CustomToast.tsx
@@ -7557,7 +7659,7 @@ var CustomToast = function(_ref) {
7557
7659
  // src/components/toasts/ToastsProvider/index.tsx
7558
7660
  import { jsx as _jsx72, jsxs as _jsxs27 } from "react/jsx-runtime";
7559
7661
  var ToastsProvider = function(t0) {
7560
- var $ = _c41(15);
7662
+ var $ = _c43(15);
7561
7663
  var children = t0.children, t1 = t0.bottom;
7562
7664
  var bottom = t1 === void 0 ? 0 : t1;
7563
7665
  var t2;
@@ -7805,7 +7907,7 @@ var useMessageContext = function() {
7805
7907
  return useContext13(MessageContext);
7806
7908
  };
7807
7909
  // src/hooks/assistants/useAssistant/index.ts
7808
- import { c as _c42 } from "react-compiler-runtime";
7910
+ import { c as _c44 } from "react-compiler-runtime";
7809
7911
  import { useMemo as useMemo15 } from "react";
7810
7912
  import { useQuery } from "@tanstack/react-query";
7811
7913
  // src/hooks/assistants/useAssistant/lib/queryOptions/index.ts
@@ -7955,7 +8057,7 @@ function _toPrimitive40(t, r) {
7955
8057
  return ("string" === r ? String : Number)(t);
7956
8058
  }
7957
8059
  var useAssistant = function(t0) {
7958
- var $ = _c42(6);
8060
+ var $ = _c44(6);
7959
8061
  var assistantId = t0.assistantId;
7960
8062
  var superinterfaceContext = useSuperinterfaceContext();
7961
8063
  var t1;
@@ -7988,7 +8090,7 @@ var useAssistant = function(t0) {
7988
8090
  return t2;
7989
8091
  };
7990
8092
  // src/components/threads/ThreadDialog/Provider/index.tsx
7991
- import { c as _c43 } from "react-compiler-runtime";
8093
+ import { c as _c45 } from "react-compiler-runtime";
7992
8094
  import { useState as useState6 } from "react";
7993
8095
  // src/contexts/threads/ThreadDialogContext/index.ts
7994
8096
  import { createContext as createContext12 } from "react";
@@ -8004,7 +8106,7 @@ var useThreadDialogContext = function() {
8004
8106
  // src/components/threads/ThreadDialog/Provider/index.tsx
8005
8107
  import { jsx as _jsx75 } from "react/jsx-runtime";
8006
8108
  var Provider4 = function(t0) {
8007
- var $ = _c43(5);
8109
+ var $ = _c45(5);
8008
8110
  var children = t0.children;
8009
8111
  var threadDialogContext = useThreadDialogContext();
8010
8112
  var _useState6 = _sliced_to_array(useState6(threadDialogContext.isOpen), 2), isOpen = _useState6[0], setIsOpen = _useState6[1];
@@ -8042,7 +8144,7 @@ var Root9 = function(_ref) {
8042
8144
  });
8043
8145
  };
8044
8146
  // src/components/threads/ThreadDialog/Trigger/index.tsx
8045
- import { c as _c44 } from "react-compiler-runtime";
8147
+ import { c as _c46 } from "react-compiler-runtime";
8046
8148
  import { Flex as Flex26 } from "@radix-ui/themes";
8047
8149
  // src/components/threads/ThreadDialog/Trigger/Button.tsx
8048
8150
  import { IconButton as IconButton8 } from "@radix-ui/themes";
@@ -8145,7 +8247,7 @@ function _toPrimitive42(t, r) {
8145
8247
  return ("string" === r ? String : Number)(t);
8146
8248
  }
8147
8249
  var Root10 = function(t0) {
8148
- var $ = _c44(14);
8250
+ var $ = _c46(14);
8149
8251
  var children = t0.children, style = t0.style, className = t0.className;
8150
8252
  var _useThreadDialogContext = useThreadDialogContext(), setIsOpen = _useThreadDialogContext.setIsOpen, isOpen = _useThreadDialogContext.isOpen;
8151
8253
  var t1 = isOpen ? "none" : "flex";
@@ -8226,15 +8328,15 @@ function _temp8(prev) {
8226
8328
  return !prev;
8227
8329
  }
8228
8330
  // src/components/threads/ThreadDialog/Content/index.tsx
8229
- import { c as _c46 } from "react-compiler-runtime";
8331
+ import { c as _c48 } from "react-compiler-runtime";
8230
8332
  import { Card as Card4, Inset as Inset2, Flex as Flex28 } from "@radix-ui/themes";
8231
8333
  // src/components/threads/ThreadDialog/Close/index.tsx
8232
- import { c as _c45 } from "react-compiler-runtime";
8334
+ import { c as _c47 } from "react-compiler-runtime";
8233
8335
  import { Cross1Icon } from "@radix-ui/react-icons";
8234
8336
  import { IconButton as IconButton9, Flex as Flex27 } from "@radix-ui/themes";
8235
8337
  import { jsx as _jsx79 } from "react/jsx-runtime";
8236
8338
  var Close = function() {
8237
- var $ = _c45(9);
8339
+ var $ = _c47(9);
8238
8340
  var _useThreadDialogContext = useThreadDialogContext(), setIsOpen = _useThreadDialogContext.setIsOpen, isOpen = _useThreadDialogContext.isOpen;
8239
8341
  var t0 = isOpen ? "flex" : "none";
8240
8342
  var t1;
@@ -8350,7 +8452,7 @@ function _toPrimitive43(t, r) {
8350
8452
  return ("string" === r ? String : Number)(t);
8351
8453
  }
8352
8454
  var Root11 = function(t0) {
8353
- var $ = _c46(19);
8455
+ var $ = _c48(19);
8354
8456
  var children = t0.children, className = t0.className, style = t0.style;
8355
8457
  var isOpen = useThreadDialogContext().isOpen;
8356
8458
  if (!isOpen) {
@@ -8549,7 +8651,7 @@ ThreadDialog.Root = Root9;
8549
8651
  ThreadDialog.Trigger = Trigger;
8550
8652
  ThreadDialog.Content = Content7;
8551
8653
  // src/components/threads/AudioThread/Root/index.tsx
8552
- import { c as _c51 } from "react-compiler-runtime";
8654
+ import { c as _c53 } from "react-compiler-runtime";
8553
8655
  import { Flex as Flex29 } from "@radix-ui/themes";
8554
8656
  // src/contexts/threads/AudioThreadContext/index.ts
8555
8657
  import { createContext as createContext13 } from "react";
@@ -8669,7 +8771,7 @@ var AudioThreadContext = /* @__PURE__ */ createContext13({
8669
8771
  }
8670
8772
  });
8671
8773
  // src/hooks/misc/usePermission/index.ts
8672
- import { c as _c47 } from "react-compiler-runtime";
8774
+ import { c as _c49 } from "react-compiler-runtime";
8673
8775
  import { useEffect as useEffect7, useState as useState7 } from "react";
8674
8776
  // src/hooks/misc/usePermission/util.ts
8675
8777
  var noop = function() {};
@@ -8693,7 +8795,7 @@ function off(obj) {
8693
8795
  }
8694
8796
  // src/hooks/misc/usePermission/index.ts
8695
8797
  var usePermission = function(permissionDesc) {
8696
- var $ = _c47(3);
8798
+ var $ = _c49(3);
8697
8799
  var _useState7 = _sliced_to_array(useState7(""), 2), state = _useState7[0], setState = _useState7[1];
8698
8800
  var t0;
8699
8801
  var t1;
@@ -8747,10 +8849,10 @@ var blobToData = function(blob) {
8747
8849
  });
8748
8850
  };
8749
8851
  // src/hooks/audioThreads/useStatus/index.ts
8750
- import { c as _c48 } from "react-compiler-runtime";
8852
+ import { c as _c50 } from "react-compiler-runtime";
8751
8853
  import { useMemo as useMemo16 } from "react";
8752
8854
  var useStatus = function(t0) {
8753
- var $ = _c48(2);
8855
+ var $ = _c50(2);
8754
8856
  var messageAudioProps = t0.messageAudioProps, recorderProps = t0.recorderProps, createMessageProps = t0.createMessageProps;
8755
8857
  var latestMessageProps = useLatestMessage();
8756
8858
  var t1;
@@ -8809,10 +8911,10 @@ import { useAudioCapture } from "use-audio-capture";
8809
8911
  import { useMemo as useMemo17, useRef as useRef7, useState as useState8, useCallback as useCallback5, useEffect as useEffect9 } from "react";
8810
8912
  import { useAudioPlayer } from "react-use-audio-player";
8811
8913
  // src/hooks/misc/useInterval.ts
8812
- import { c as _c49 } from "react-compiler-runtime";
8914
+ import { c as _c51 } from "react-compiler-runtime";
8813
8915
  import { useEffect as useEffect8, useRef as useRef6 } from "react";
8814
8916
  var useInterval = function(callback, delay) {
8815
- var $ = _c49(5);
8917
+ var $ = _c51(5);
8816
8918
  var savedCallback = useRef6(_temp10);
8817
8919
  var t0;
8818
8920
  if ($[0] !== callback) {
@@ -9065,7 +9167,7 @@ var useRecorder = function(_ref) {
9065
9167
  });
9066
9168
  };
9067
9169
  // src/hooks/audioThreads/useMessageAudio/index.ts
9068
- import { c as _c50 } from "react-compiler-runtime";
9170
+ import { c as _c52 } from "react-compiler-runtime";
9069
9171
  import { useMemo as useMemo18, useRef as useRef8, useState as useState9, useEffect as useEffect10, useCallback as useCallback6 } from "react";
9070
9172
  import nlp from "compromise";
9071
9173
  import { Howler } from "howler";
@@ -9147,7 +9249,7 @@ var getMessageSentences = function(_ref) {
9147
9249
  });
9148
9250
  };
9149
9251
  var useMessageAudio = function(t0) {
9150
- var $ = _c50(50);
9252
+ var $ = _c52(50);
9151
9253
  var _onEnd = t0.onEnd, passedPlay = t0.play;
9152
9254
  var _useState9 = _sliced_to_array(useState9(false), 2), isAudioPlayed = _useState9[0], setIsAudioPlayed = _useState9[1];
9153
9255
  var t1;
@@ -9582,7 +9684,7 @@ function _asyncToGenerator12(n) {
9582
9684
  };
9583
9685
  }
9584
9686
  var Content8 = function(t0) {
9585
- var $ = _c51(24);
9687
+ var $ = _c53(24);
9586
9688
  var children = t0.children, className = t0.className, style = t0.style, play = t0.play;
9587
9689
  var addToast = useToasts().addToast;
9588
9690
  var queryClient = useQueryClient6();
@@ -9942,7 +10044,7 @@ var Visualization = function(props) {
9942
10044
  }));
9943
10045
  };
9944
10046
  // src/components/threads/AudioThread/Status/index.tsx
9945
- import { c as _c52 } from "react-compiler-runtime";
10047
+ import { c as _c54 } from "react-compiler-runtime";
9946
10048
  // src/components/threads/AudioThread/Status/StatusMessages.tsx
9947
10049
  import { Flex as Flex32, Text as Text9 } from "@radix-ui/themes";
9948
10050
  import { jsx as _jsx85, jsxs as _jsxs32 } from "react/jsx-runtime";
@@ -10022,7 +10124,7 @@ function _toPrimitive48(t, r) {
10022
10124
  return ("string" === r ? String : Number)(t);
10023
10125
  }
10024
10126
  var Status = function(props) {
10025
- var $ = _c52(12);
10127
+ var $ = _c54(12);
10026
10128
  var audioThreadContext = useAudioThreadContext();
10027
10129
  if (audioThreadContext.status === "recording") {
10028
10130
  var _t;
@@ -10119,7 +10221,7 @@ var Status = function(props) {
10119
10221
  return t1;
10120
10222
  };
10121
10223
  // src/components/threads/AudioThread/Form/index.tsx
10122
- import { c as _c54 } from "react-compiler-runtime";
10224
+ import { c as _c56 } from "react-compiler-runtime";
10123
10225
  import { Flex as Flex34 } from "@radix-ui/themes";
10124
10226
  // src/components/threads/AudioThread/Form/MicIcon.tsx
10125
10227
  import { jsx as _jsx87 } from "react/jsx-runtime";
@@ -10183,12 +10285,12 @@ var MicIcon = function(props) {
10183
10285
  }));
10184
10286
  };
10185
10287
  // src/components/threads/AudioThread/Form/ActionButton/index.tsx
10186
- import { c as _c53 } from "react-compiler-runtime";
10288
+ import { c as _c55 } from "react-compiler-runtime";
10187
10289
  import { Flex as Flex33, IconButton as IconButton10 } from "@radix-ui/themes";
10188
10290
  import { StopIcon as StopIcon2, PauseIcon as PauseIcon2, ArrowUpIcon as ArrowUpIcon3, ResumeIcon } from "@radix-ui/react-icons";
10189
10291
  import { jsx as _jsx88, jsxs as _jsxs33 } from "react/jsx-runtime";
10190
10292
  var ActionButton = function() {
10191
- var $ = _c53(27);
10293
+ var $ = _c55(27);
10192
10294
  var audioThreadContext = useAudioThreadContext();
10193
10295
  var superinterfaceContext = useSuperinterfaceContext();
10194
10296
  if (audioThreadContext.status === "recording") {
@@ -10425,7 +10527,7 @@ function _toPrimitive50(t, r) {
10425
10527
  return ("string" === r ? String : Number)(t);
10426
10528
  }
10427
10529
  var Form = function(props) {
10428
- var $ = _c54(17);
10530
+ var $ = _c56(17);
10429
10531
  var audioThreadContext = useAudioThreadContext();
10430
10532
  var t0 = audioThreadContext.status === "recording" ? "var(--accent-11)" : "var(--gray-11)";
10431
10533
  var t1;
@@ -10645,7 +10747,7 @@ AudioThreadDialog.Root = Root9;
10645
10747
  AudioThreadDialog.Trigger = Trigger;
10646
10748
  AudioThreadDialog.Content = Content7;
10647
10749
  // src/components/markdown/MarkdownProvider/index.tsx
10648
- import { c as _c55 } from "react-compiler-runtime";
10750
+ import { c as _c57 } from "react-compiler-runtime";
10649
10751
  import { useMemo as useMemo19 } from "react";
10650
10752
  import { jsx as _jsx92 } from "react/jsx-runtime";
10651
10753
  var _excluded5 = [
@@ -10670,7 +10772,7 @@ function _objectWithoutPropertiesLoose5(r, e) {
10670
10772
  return t;
10671
10773
  }
10672
10774
  var MarkdownProvider = function(t0) {
10673
- var $ = _c55(9);
10775
+ var $ = _c57(9);
10674
10776
  var children;
10675
10777
  var rest;
10676
10778
  if ($[0] !== t0) {
@@ -10712,8 +10814,369 @@ var MarkdownProvider = function(t0) {
10712
10814
  }
10713
10815
  return t3;
10714
10816
  };
10715
- // src/components/avatars/Avatar.tsx
10817
+ // src/components/annotations/SourceAnnotation/index.tsx
10818
+ import { c as _c60 } from "react-compiler-runtime";
10819
+ // src/components/annotations/SourceAnnotation/FileCitation/index.tsx
10820
+ import { c as _c59 } from "react-compiler-runtime";
10821
+ import { useState as useState12 } from "react";
10822
+ import { QuoteIcon as QuoteIcon2 } from "@radix-ui/react-icons";
10823
+ import { Dialog, VisuallyHidden, IconButton as IconButton12 } from "@radix-ui/themes";
10824
+ // src/components/annotations/SourceAnnotation/FileCitation/Content/index.tsx
10716
10825
  import { c as _c58 } from "react-compiler-runtime";
10826
+ import { Flex as Flex36, Card as Card6, Inset as Inset3 } from "@radix-ui/themes";
10827
+ import { usePDFSlick } from "@pdfslick/react";
10828
+ import "@pdfslick/react/dist/pdf_viewer.css";
10829
+ // src/components/annotations/SourceAnnotation/FileCitation/Content/Navigation.tsx
10830
+ import { Card as Card5, IconButton as IconButton11, Flex as Flex35 } from "@radix-ui/themes";
10831
+ import { ZoomInIcon, ZoomOutIcon } from "@radix-ui/react-icons";
10832
+ import { jsx as _jsx93, jsxs as _jsxs37 } from "react/jsx-runtime";
10833
+ var Navigation = function(_ref) {
10834
+ var usePDFSlickStore = _ref.usePDFSlickStore;
10835
+ var pdfSlick = usePDFSlickStore(function(s) {
10836
+ return s.pdfSlick;
10837
+ });
10838
+ return /* @__PURE__ */ _jsx93(Flex35, {
10839
+ justify: "center",
10840
+ position: "absolute",
10841
+ bottom: "var(--space-2)",
10842
+ left: "0",
10843
+ right: "0",
10844
+ style: {
10845
+ zIndex: 99999
10846
+ },
10847
+ children: /* @__PURE__ */ _jsx93(Card5, {
10848
+ children: /* @__PURE__ */ _jsxs37(Flex35, {
10849
+ gap: "2",
10850
+ children: [
10851
+ /* @__PURE__ */ _jsx93(IconButton11, {
10852
+ variant: "soft",
10853
+ onClick: function() {
10854
+ var _pdfSlick$viewer;
10855
+ return pdfSlick === null || pdfSlick === void 0 || (_pdfSlick$viewer = pdfSlick.viewer) === null || _pdfSlick$viewer === void 0 ? void 0 : _pdfSlick$viewer.decreaseScale();
10856
+ },
10857
+ children: /* @__PURE__ */ _jsx93(ZoomOutIcon, {})
10858
+ }),
10859
+ /* @__PURE__ */ _jsx93(IconButton11, {
10860
+ variant: "soft",
10861
+ onClick: function() {
10862
+ var _pdfSlick$viewer2;
10863
+ return pdfSlick === null || pdfSlick === void 0 || (_pdfSlick$viewer2 = pdfSlick.viewer) === null || _pdfSlick$viewer2 === void 0 ? void 0 : _pdfSlick$viewer2.increaseScale();
10864
+ },
10865
+ children: /* @__PURE__ */ _jsx93(ZoomInIcon, {})
10866
+ })
10867
+ ]
10868
+ })
10869
+ })
10870
+ });
10871
+ };
10872
+ // src/components/annotations/SourceAnnotation/FileCitation/Content/index.tsx
10873
+ import { jsx as _jsx94, jsxs as _jsxs38 } from "react/jsx-runtime";
10874
+ function ownKeys53(e, r) {
10875
+ var t = Object.keys(e);
10876
+ if (Object.getOwnPropertySymbols) {
10877
+ var o = Object.getOwnPropertySymbols(e);
10878
+ r && (o = o.filter(function(r2) {
10879
+ return Object.getOwnPropertyDescriptor(e, r2).enumerable;
10880
+ })), t.push.apply(t, o);
10881
+ }
10882
+ return t;
10883
+ }
10884
+ function _objectSpread53(e) {
10885
+ for(var r = 1; r < arguments.length; r++){
10886
+ var t = null != arguments[r] ? arguments[r] : {};
10887
+ r % 2 ? ownKeys53(Object(t), true).forEach(function(r2) {
10888
+ _defineProperty53(e, r2, t[r2]);
10889
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys53(Object(t)).forEach(function(r2) {
10890
+ Object.defineProperty(e, r2, Object.getOwnPropertyDescriptor(t, r2));
10891
+ });
10892
+ }
10893
+ return e;
10894
+ }
10895
+ function _defineProperty53(e, r, t) {
10896
+ return (r = _toPropertyKey53(r)) in e ? Object.defineProperty(e, r, {
10897
+ value: t,
10898
+ enumerable: true,
10899
+ configurable: true,
10900
+ writable: true
10901
+ }) : e[r] = t, e;
10902
+ }
10903
+ function _toPropertyKey53(t) {
10904
+ var i = _toPrimitive53(t, "string");
10905
+ return "symbol" == (typeof i === "undefined" ? "undefined" : _type_of(i)) ? i : i + "";
10906
+ }
10907
+ function _toPrimitive53(t, r) {
10908
+ if ("object" != (typeof t === "undefined" ? "undefined" : _type_of(t)) || !t) return t;
10909
+ var e = t[Symbol.toPrimitive];
10910
+ if (void 0 !== e) {
10911
+ var i = e.call(t, r || "default");
10912
+ if ("object" != (typeof i === "undefined" ? "undefined" : _type_of(i))) return i;
10913
+ throw new TypeError("@@toPrimitive must return a primitive value.");
10914
+ }
10915
+ return ("string" === r ? String : Number)(t);
10916
+ }
10917
+ var Content9 = function(t0) {
10918
+ var $ = _c58(14);
10919
+ var fileId = t0.fileId;
10920
+ var superinterfaceContext = useSuperinterfaceContext();
10921
+ var nextSearchParams = new URLSearchParams(superinterfaceContext.variables);
10922
+ var t1;
10923
+ if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
10924
+ t1 = {
10925
+ scaleValue: "page-width",
10926
+ removePageBorders: true
10927
+ };
10928
+ $[0] = t1;
10929
+ } else {
10930
+ t1 = $[0];
10931
+ }
10932
+ var _usePDFSlick = usePDFSlick("".concat(superinterfaceContext.baseUrl, "/api/cloud/files/").concat(fileId, "/contents?").concat(nextSearchParams), t1), viewerRef = _usePDFSlick.viewerRef, usePDFSlickStore = _usePDFSlick.usePDFSlickStore, PDFSlickViewer = _usePDFSlick.PDFSlickViewer;
10933
+ var t2;
10934
+ if ($[1] === Symbol.for("react.memo_cache_sentinel")) {
10935
+ t2 = {
10936
+ display: "flex",
10937
+ flexGrow: "1"
10938
+ };
10939
+ $[1] = t2;
10940
+ } else {
10941
+ t2 = $[1];
10942
+ }
10943
+ var t3;
10944
+ if ($[2] === Symbol.for("react.memo_cache_sentinel")) {
10945
+ t3 = {
10946
+ display: "flex",
10947
+ flexGrow: "1"
10948
+ };
10949
+ $[2] = t3;
10950
+ } else {
10951
+ t3 = $[2];
10952
+ }
10953
+ var t4;
10954
+ if ($[3] !== usePDFSlickStore || $[4] !== viewerRef) {
10955
+ t4 = {
10956
+ viewerRef: viewerRef,
10957
+ usePDFSlickStore: usePDFSlickStore
10958
+ };
10959
+ $[3] = usePDFSlickStore;
10960
+ $[4] = viewerRef;
10961
+ $[5] = t4;
10962
+ } else {
10963
+ t4 = $[5];
10964
+ }
10965
+ var t5;
10966
+ if ($[6] !== PDFSlickViewer || $[7] !== t4) {
10967
+ t5 = /* @__PURE__ */ _jsx94(PDFSlickViewer, _objectSpread53({}, t4));
10968
+ $[6] = PDFSlickViewer;
10969
+ $[7] = t4;
10970
+ $[8] = t5;
10971
+ } else {
10972
+ t5 = $[8];
10973
+ }
10974
+ var t6;
10975
+ if ($[9] !== usePDFSlickStore) {
10976
+ t6 = /* @__PURE__ */ _jsx94(Navigation, {
10977
+ usePDFSlickStore: usePDFSlickStore
10978
+ });
10979
+ $[9] = usePDFSlickStore;
10980
+ $[10] = t6;
10981
+ } else {
10982
+ t6 = $[10];
10983
+ }
10984
+ var t7;
10985
+ if ($[11] !== t5 || $[12] !== t6) {
10986
+ t7 = /* @__PURE__ */ _jsx94(Flex36, {
10987
+ direction: "column",
10988
+ flexGrow: "1",
10989
+ gap: "3",
10990
+ children: /* @__PURE__ */ _jsx94(Card6, {
10991
+ style: t2,
10992
+ children: /* @__PURE__ */ _jsx94(Inset3, {
10993
+ clip: "padding-box",
10994
+ style: t3,
10995
+ children: /* @__PURE__ */ _jsxs38(Flex36, {
10996
+ flexGrow: "1",
10997
+ position: "relative",
10998
+ children: [
10999
+ t5,
11000
+ t6
11001
+ ]
11002
+ })
11003
+ })
11004
+ })
11005
+ });
11006
+ $[11] = t5;
11007
+ $[12] = t6;
11008
+ $[13] = t7;
11009
+ } else {
11010
+ t7 = $[13];
11011
+ }
11012
+ return t7;
11013
+ };
11014
+ // src/components/annotations/SourceAnnotation/FileCitation/index.tsx
11015
+ import { jsx as _jsx95, jsxs as _jsxs39, Fragment as _Fragment4 } from "react/jsx-runtime";
11016
+ var FileCitation = function(t0) {
11017
+ var $ = _c59(18);
11018
+ var annotation = t0.annotation;
11019
+ var _useState12 = _sliced_to_array(useState12(null), 2), activeFileId = _useState12[0], setActiveFileId = _useState12[1];
11020
+ var t1;
11021
+ if ($[0] !== annotation.file_citation.file_id) {
11022
+ t1 = function() {
11023
+ setActiveFileId(annotation.file_citation.file_id);
11024
+ };
11025
+ $[0] = annotation.file_citation.file_id;
11026
+ $[1] = t1;
11027
+ } else {
11028
+ t1 = $[1];
11029
+ }
11030
+ var t2;
11031
+ if ($[2] === Symbol.for("react.memo_cache_sentinel")) {
11032
+ t2 = /* @__PURE__ */ _jsx95(QuoteIcon2, {});
11033
+ $[2] = t2;
11034
+ } else {
11035
+ t2 = $[2];
11036
+ }
11037
+ var t3;
11038
+ if ($[3] !== t1) {
11039
+ t3 = /* @__PURE__ */ _jsx95(IconButton12, {
11040
+ variant: "soft",
11041
+ color: "gray",
11042
+ size: "1",
11043
+ onClick: t1,
11044
+ children: t2
11045
+ });
11046
+ $[3] = t1;
11047
+ $[4] = t3;
11048
+ } else {
11049
+ t3 = $[4];
11050
+ }
11051
+ var t4 = !!activeFileId;
11052
+ var t5;
11053
+ if ($[5] === Symbol.for("react.memo_cache_sentinel")) {
11054
+ t5 = function(open) {
11055
+ if (!open) {
11056
+ setActiveFileId(null);
11057
+ }
11058
+ };
11059
+ $[5] = t5;
11060
+ } else {
11061
+ t5 = $[5];
11062
+ }
11063
+ var t6;
11064
+ if ($[6] === Symbol.for("react.memo_cache_sentinel")) {
11065
+ t6 = {
11066
+ display: "flex",
11067
+ flexDirection: "column"
11068
+ };
11069
+ $[6] = t6;
11070
+ } else {
11071
+ t6 = $[6];
11072
+ }
11073
+ var t7;
11074
+ if ($[7] === Symbol.for("react.memo_cache_sentinel")) {
11075
+ t7 = /* @__PURE__ */ _jsx95(VisuallyHidden, {
11076
+ asChild: true,
11077
+ children: /* @__PURE__ */ _jsx95(Dialog.Title, {
11078
+ children: "Source"
11079
+ })
11080
+ });
11081
+ $[7] = t7;
11082
+ } else {
11083
+ t7 = $[7];
11084
+ }
11085
+ var t8;
11086
+ if ($[8] !== activeFileId) {
11087
+ t8 = activeFileId && /* @__PURE__ */ _jsx95(Content9, {
11088
+ fileId: activeFileId
11089
+ });
11090
+ $[8] = activeFileId;
11091
+ $[9] = t8;
11092
+ } else {
11093
+ t8 = $[9];
11094
+ }
11095
+ var t9;
11096
+ if ($[10] !== t8) {
11097
+ t9 = /* @__PURE__ */ _jsxs39(Dialog.Content, {
11098
+ width: "1000px",
11099
+ height: "90vh",
11100
+ maxWidth: "calc(100vw - 2 * var(--space-4))",
11101
+ "aria-describedby": void 0,
11102
+ style: t6,
11103
+ children: [
11104
+ t7,
11105
+ t8
11106
+ ]
11107
+ });
11108
+ $[10] = t8;
11109
+ $[11] = t9;
11110
+ } else {
11111
+ t9 = $[11];
11112
+ }
11113
+ var t10;
11114
+ if ($[12] !== t4 || $[13] !== t9) {
11115
+ t10 = /* @__PURE__ */ _jsx95(Dialog.Root, {
11116
+ open: t4,
11117
+ onOpenChange: t5,
11118
+ children: t9
11119
+ });
11120
+ $[12] = t4;
11121
+ $[13] = t9;
11122
+ $[14] = t10;
11123
+ } else {
11124
+ t10 = $[14];
11125
+ }
11126
+ var t11;
11127
+ if ($[15] !== t10 || $[16] !== t3) {
11128
+ t11 = /* @__PURE__ */ _jsxs39(_Fragment4, {
11129
+ children: [
11130
+ t3,
11131
+ t10
11132
+ ]
11133
+ });
11134
+ $[15] = t10;
11135
+ $[16] = t3;
11136
+ $[17] = t11;
11137
+ } else {
11138
+ t11 = $[17];
11139
+ }
11140
+ return t11;
11141
+ };
11142
+ // src/components/annotations/SourceAnnotation/index.tsx
11143
+ import { jsx as _jsx96 } from "react/jsx-runtime";
11144
+ var SourceAnnotation = function(t0) {
11145
+ var $ = _c60(5);
11146
+ var annotation = t0.annotation, children = t0.children;
11147
+ if (annotation.type === "file_citation") {
11148
+ var t1;
11149
+ if ($[0] !== annotation) {
11150
+ t1 = /* @__PURE__ */ _jsx96(FileCitation, {
11151
+ annotation: annotation
11152
+ });
11153
+ $[0] = annotation;
11154
+ $[1] = t1;
11155
+ } else {
11156
+ t1 = $[1];
11157
+ }
11158
+ return t1;
11159
+ } else {
11160
+ if (annotation.type === "file_path") {
11161
+ var _t;
11162
+ if ($[2] !== annotation || $[3] !== children) {
11163
+ _t = /* @__PURE__ */ _jsx96(FilePathAnnotation, {
11164
+ annotation: annotation,
11165
+ children: children
11166
+ });
11167
+ $[2] = annotation;
11168
+ $[3] = children;
11169
+ $[4] = _t;
11170
+ } else {
11171
+ _t = $[4];
11172
+ }
11173
+ return _t;
11174
+ }
11175
+ }
11176
+ return null;
11177
+ };
11178
+ // src/components/avatars/Avatar.tsx
11179
+ import { c as _c63 } from "react-compiler-runtime";
10717
11180
  // src/lib/enums/index.ts
10718
11181
  var IconAvatarName = /* @__PURE__ */ function(IconAvatarName2) {
10719
11182
  IconAvatarName2["BACKPACK"] = "BACKPACK";
@@ -10738,7 +11201,7 @@ var AvatarType = /* @__PURE__ */ function(AvatarType2) {
10738
11201
  // src/components/avatars/Avatar.tsx
10739
11202
  import { Avatar as RadixAvatar } from "@radix-ui/themes";
10740
11203
  // src/components/imageAvatars/ImageAvatar/index.tsx
10741
- import { c as _c56 } from "react-compiler-runtime";
11204
+ import { c as _c61 } from "react-compiler-runtime";
10742
11205
  import { Avatar as Avatar4 } from "@radix-ui/themes";
10743
11206
  // src/components/imageAvatars/ImageAvatar/lib/optimizedSrc/path.ts
10744
11207
  var width = function(_ref) {
@@ -10790,9 +11253,9 @@ var optimizedSrc = function(_ref) {
10790
11253
  }));
10791
11254
  };
10792
11255
  // src/components/imageAvatars/ImageAvatar/index.tsx
10793
- import { jsx as _jsx93 } from "react/jsx-runtime";
11256
+ import { jsx as _jsx97 } from "react/jsx-runtime";
10794
11257
  var ImageAvatar = function(t0) {
10795
- var $ = _c56(9);
11258
+ var $ = _c61(9);
10796
11259
  var imageAvatar = t0.imageAvatar, size = t0.size, className = t0.className, style = t0.style;
10797
11260
  var superinterfaceContext = useSuperinterfaceContext();
10798
11261
  var t1;
@@ -10811,7 +11274,7 @@ var ImageAvatar = function(t0) {
10811
11274
  }
10812
11275
  var t2;
10813
11276
  if ($[4] !== className || $[5] !== size || $[6] !== style || $[7] !== t1) {
10814
- t2 = /* @__PURE__ */ _jsx93(Avatar4, {
11277
+ t2 = /* @__PURE__ */ _jsx97(Avatar4, {
10815
11278
  className: className,
10816
11279
  style: style,
10817
11280
  fallback: "",
@@ -10829,7 +11292,7 @@ var ImageAvatar = function(t0) {
10829
11292
  return t2;
10830
11293
  };
10831
11294
  // src/components/iconAvatars/IconAvatar.tsx
10832
- import { c as _c57 } from "react-compiler-runtime";
11295
+ import { c as _c62 } from "react-compiler-runtime";
10833
11296
  import { useMemo as useMemo20 } from "react";
10834
11297
  import { Avatar as Avatar5 } from "@radix-ui/themes";
10835
11298
  // src/lib/iconAvatars/iconAvatarComponents.ts
@@ -10837,16 +11300,16 @@ import { BackpackIcon, RocketIcon, MagicWandIcon, CubeIcon, TargetIcon, DiscIcon
10837
11300
  var _obj;
10838
11301
  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);
10839
11302
  // src/components/iconAvatars/IconAvatar.tsx
10840
- import { jsx as _jsx94 } from "react/jsx-runtime";
11303
+ import { jsx as _jsx98 } from "react/jsx-runtime";
10841
11304
  var IconAvatar = function(t0) {
10842
- var $ = _c57(7);
11305
+ var $ = _c62(7);
10843
11306
  var iconAvatar = t0.iconAvatar, size = t0.size, className = t0.className, style = t0.style;
10844
11307
  var t1;
10845
11308
  t1 = iconAvatarComponents[iconAvatar.name];
10846
11309
  var Component2 = t1;
10847
11310
  var t2;
10848
11311
  if ($[0] !== Component2) {
10849
- t2 = Component2 ? /* @__PURE__ */ _jsx94(Component2, {}) : "";
11312
+ t2 = Component2 ? /* @__PURE__ */ _jsx98(Component2, {}) : "";
10850
11313
  $[0] = Component2;
10851
11314
  $[1] = t2;
10852
11315
  } else {
@@ -10854,7 +11317,7 @@ var IconAvatar = function(t0) {
10854
11317
  }
10855
11318
  var t3;
10856
11319
  if ($[2] !== className || $[3] !== size || $[4] !== style || $[5] !== t2) {
10857
- t3 = /* @__PURE__ */ _jsx94(Avatar5, {
11320
+ t3 = /* @__PURE__ */ _jsx98(Avatar5, {
10858
11321
  className: className,
10859
11322
  style: style,
10860
11323
  size: size,
@@ -10871,16 +11334,16 @@ var IconAvatar = function(t0) {
10871
11334
  return t3;
10872
11335
  };
10873
11336
  // src/components/avatars/Avatar.tsx
10874
- import { jsx as _jsx95 } from "react/jsx-runtime";
11337
+ import { jsx as _jsx99 } from "react/jsx-runtime";
10875
11338
  var Avatar6 = function(t0) {
10876
- var $ = _c58(14);
11339
+ var $ = _c63(14);
10877
11340
  var avatar = t0.avatar, t1 = t0.size, className = t0.className, style = t0.style;
10878
11341
  var size = t1 === void 0 ? "1" : t1;
10879
11342
  if (avatar) {
10880
11343
  if (avatar.type === AvatarType.IMAGE && avatar.imageAvatar) {
10881
11344
  var _t;
10882
11345
  if ($[0] !== avatar.imageAvatar || $[1] !== className || $[2] !== size || $[3] !== style) {
10883
- _t = /* @__PURE__ */ _jsx95(ImageAvatar, {
11346
+ _t = /* @__PURE__ */ _jsx99(ImageAvatar, {
10884
11347
  imageAvatar: avatar.imageAvatar,
10885
11348
  size: size,
10886
11349
  className: className,
@@ -10899,7 +11362,7 @@ var Avatar6 = function(t0) {
10899
11362
  if (avatar.type === AvatarType.ICON && avatar.iconAvatar) {
10900
11363
  var _t2;
10901
11364
  if ($[5] !== avatar.iconAvatar || $[6] !== className || $[7] !== size || $[8] !== style) {
10902
- _t2 = /* @__PURE__ */ _jsx95(IconAvatar, {
11365
+ _t2 = /* @__PURE__ */ _jsx99(IconAvatar, {
10903
11366
  iconAvatar: avatar.iconAvatar,
10904
11367
  size: size,
10905
11368
  className: className,
@@ -10918,7 +11381,7 @@ var Avatar6 = function(t0) {
10918
11381
  }
10919
11382
  var t2;
10920
11383
  if ($[10] !== className || $[11] !== size || $[12] !== style) {
10921
- t2 = /* @__PURE__ */ _jsx95(RadixAvatar, {
11384
+ t2 = /* @__PURE__ */ _jsx99(RadixAvatar, {
10922
11385
  fallback: "",
10923
11386
  size: size,
10924
11387
  className: className,
@@ -10934,7 +11397,7 @@ var Avatar6 = function(t0) {
10934
11397
  return t2;
10935
11398
  };
10936
11399
  // src/components/components/ComponentsProvider.tsx
10937
- import { c as _c59 } from "react-compiler-runtime";
11400
+ import { c as _c64 } from "react-compiler-runtime";
10938
11401
  import { useMemo as useMemo21 } from "react";
10939
11402
  // src/hooks/components/useComponents.ts
10940
11403
  import { useContext as useContext17 } from "react";
@@ -10942,7 +11405,7 @@ var useComponents = function() {
10942
11405
  return useContext17(ComponentsContext);
10943
11406
  };
10944
11407
  // src/components/components/ComponentsProvider.tsx
10945
- import { jsx as _jsx96 } from "react/jsx-runtime";
11408
+ import { jsx as _jsx100 } from "react/jsx-runtime";
10946
11409
  var _excluded6 = [
10947
11410
  "children"
10948
11411
  ];
@@ -10965,7 +11428,7 @@ function _objectWithoutPropertiesLoose6(r, e) {
10965
11428
  return t;
10966
11429
  }
10967
11430
  var ComponentsProvider = function(t0) {
10968
- var $ = _c59(9);
11431
+ var $ = _c64(9);
10969
11432
  var children;
10970
11433
  var rest;
10971
11434
  if ($[0] !== t0) {
@@ -10995,7 +11458,7 @@ var ComponentsProvider = function(t0) {
10995
11458
  var value = t1;
10996
11459
  var t3;
10997
11460
  if ($[6] !== children || $[7] !== value) {
10998
- t3 = /* @__PURE__ */ _jsx96(ComponentsContext.Provider, {
11461
+ t3 = /* @__PURE__ */ _jsx100(ComponentsContext.Provider, {
10999
11462
  value: value,
11000
11463
  children: children
11001
11464
  });
@@ -11008,11 +11471,11 @@ var ComponentsProvider = function(t0) {
11008
11471
  return t3;
11009
11472
  };
11010
11473
  // src/components/assistants/AssistantProvider/index.tsx
11011
- import { c as _c60 } from "react-compiler-runtime";
11012
- import { jsx as _jsx97 } from "react/jsx-runtime";
11474
+ import { c as _c65 } from "react-compiler-runtime";
11475
+ import { jsx as _jsx101 } from "react/jsx-runtime";
11013
11476
  var AssistantProvider = function(t0) {
11014
11477
  var _assistant$name;
11015
- var $ = _c60(10);
11478
+ var $ = _c65(10);
11016
11479
  var children = t0.children;
11017
11480
  var superinterfaceContext = useSuperinterfaceContext();
11018
11481
  var t1;
@@ -11030,7 +11493,7 @@ var AssistantProvider = function(t0) {
11030
11493
  var t3 = assistant === null || assistant === void 0 ? void 0 : assistant.avatar;
11031
11494
  var t4;
11032
11495
  if ($[2] !== t3) {
11033
- t4 = /* @__PURE__ */ _jsx97(Avatar6, {
11496
+ t4 = /* @__PURE__ */ _jsx101(Avatar6, {
11034
11497
  avatar: t3
11035
11498
  });
11036
11499
  $[2] = t3;
@@ -11040,7 +11503,7 @@ var AssistantProvider = function(t0) {
11040
11503
  }
11041
11504
  var t5;
11042
11505
  if ($[4] !== children || $[5] !== t4) {
11043
- t5 = /* @__PURE__ */ _jsx97(AssistantAvatarContext.Provider, {
11506
+ t5 = /* @__PURE__ */ _jsx101(AssistantAvatarContext.Provider, {
11044
11507
  value: t4,
11045
11508
  children: children
11046
11509
  });
@@ -11052,7 +11515,7 @@ var AssistantProvider = function(t0) {
11052
11515
  }
11053
11516
  var t6;
11054
11517
  if ($[7] !== t2 || $[8] !== t5) {
11055
- t6 = /* @__PURE__ */ _jsx97(AssistantNameContext.Provider, {
11518
+ t6 = /* @__PURE__ */ _jsx101(AssistantNameContext.Provider, {
11056
11519
  value: t2,
11057
11520
  children: t5
11058
11521
  });
@@ -11064,5 +11527,5 @@ var AssistantProvider = function(t0) {
11064
11527
  }
11065
11528
  return t6;
11066
11529
  };
11067
- export { AssistantAvatarContext, AssistantNameContext, AssistantProvider, AudioThread, AudioThreadDialog, Avatar6 as Avatar, ComponentsProvider, FunctionBase, FunctionComponentsContext, MarkdownContext, MarkdownProvider, RunStep, Suggestions, SuperinterfaceProvider, Thread, ThreadDialog, ThreadDialogContext, UserAvatarContext, useAssistant, useAudioThreadContext, useComponents, useCreateMessage, useIsMutatingMessage, useLatestMessage, useMarkdownContext, useMessageContext, useMessageFormContext, useMessages, useSuperinterfaceContext, useSuperinterfaceContext as useThreadContext, useThreadDialogContext };
11530
+ 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, useSuperinterfaceContext, useSuperinterfaceContext as useThreadContext, useThreadDialogContext };
11068
11531
  //# sourceMappingURL=index.js.map