@superinterface/react 3.9.1 → 3.9.3
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/cloud.cjs +613 -0
- package/dist/cloud.cjs.map +1 -0
- package/dist/cloud.d.cts +13 -0
- package/dist/cloud.d.ts +13 -0
- package/dist/cloud.js +543 -0
- package/dist/cloud.js.map +1 -0
- package/dist/index-CmzywRJS.d.cts +19 -0
- package/dist/index-CmzywRJS.d.ts +19 -0
- package/dist/index.cjs +117 -584
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +4 -22
- package/dist/index.d.ts +4 -22
- package/dist/index.js +109 -572
- package/dist/index.js.map +1 -1
- package/dist/utils.d.cts +1 -1
- package/dist/utils.d.ts +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -352,9 +352,6 @@ __export(src_exports, {
|
|
|
352
352
|
RunStep: function() {
|
|
353
353
|
return RunStep;
|
|
354
354
|
},
|
|
355
|
-
SourceAnnotation: function() {
|
|
356
|
-
return SourceAnnotation;
|
|
357
|
-
},
|
|
358
355
|
Suggestions: function() {
|
|
359
356
|
return Suggestions;
|
|
360
357
|
},
|
|
@@ -6481,11 +6478,9 @@ var Root4 = function(_ref) {
|
|
|
6481
6478
|
});
|
|
6482
6479
|
};
|
|
6483
6480
|
// src/components/threads/Thread/MessageForm/Field/index.tsx
|
|
6484
|
-
var import_react_compiler_runtime42 = require("react-compiler-runtime");
|
|
6485
6481
|
var import_react_hook_form3 = require("react-hook-form");
|
|
6486
6482
|
var import_themes51 = require("@radix-ui/themes");
|
|
6487
6483
|
// src/components/threads/Thread/MessageForm/Field/Control.tsx
|
|
6488
|
-
var import_react_compiler_runtime39 = require("react-compiler-runtime");
|
|
6489
6484
|
var import_themes48 = require("@radix-ui/themes");
|
|
6490
6485
|
var import_react_hook_form2 = require("react-hook-form");
|
|
6491
6486
|
// src/hooks/misc/usePrevious.ts
|
|
@@ -6703,110 +6698,48 @@ var Root5 = function(_ref) {
|
|
|
6703
6698
|
});
|
|
6704
6699
|
};
|
|
6705
6700
|
var Input = function(props) {
|
|
6701
|
+
"use no memo";
|
|
6706
6702
|
var _props$placeholder;
|
|
6707
|
-
var $ = (0, import_react_compiler_runtime39.c)(20);
|
|
6708
6703
|
var assistantNameContext = (0, import_react50.useContext)(AssistantNameContext);
|
|
6709
6704
|
var register = (0, import_react_hook_form2.useFormContext)().register;
|
|
6710
6705
|
var _useMessageFormContext = useMessageFormContext(), isDisabled = _useMessageFormContext.isDisabled, isLoading = _useMessageFormContext.isLoading;
|
|
6711
|
-
var
|
|
6712
|
-
|
|
6713
|
-
|
|
6706
|
+
var isSubmitDisabled = (0, import_react50.useMemo)(function() {
|
|
6707
|
+
return isDisabled || isLoading;
|
|
6708
|
+
}, [
|
|
6709
|
+
isDisabled,
|
|
6710
|
+
isLoading
|
|
6711
|
+
]);
|
|
6714
6712
|
var isDisabledPrevious = usePrevious(isDisabled);
|
|
6715
6713
|
var textareaRef = (0, import_react50.useRef)(null);
|
|
6716
|
-
var
|
|
6717
|
-
|
|
6718
|
-
|
|
6719
|
-
|
|
6720
|
-
|
|
6721
|
-
|
|
6722
|
-
|
|
6723
|
-
|
|
6724
|
-
|
|
6725
|
-
|
|
6726
|
-
|
|
6727
|
-
|
|
6728
|
-
|
|
6729
|
-
|
|
6730
|
-
|
|
6731
|
-
|
|
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) {
|
|
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) {
|
|
6764
6730
|
if (e.key === "Enter" && !e.shiftKey) {
|
|
6765
6731
|
var _e$currentTarget$form;
|
|
6766
6732
|
e.preventDefault();
|
|
6767
|
-
if (isSubmitDisabled)
|
|
6768
|
-
return;
|
|
6769
|
-
}
|
|
6733
|
+
if (isSubmitDisabled) return;
|
|
6770
6734
|
(_e$currentTarget$form = e.currentTarget.form) === null || _e$currentTarget$form === void 0 || _e$currentTarget$form.requestSubmit();
|
|
6771
6735
|
}
|
|
6772
|
-
}
|
|
6773
|
-
|
|
6774
|
-
|
|
6775
|
-
} else {
|
|
6776
|
-
t5 = $[10];
|
|
6777
|
-
}
|
|
6778
|
-
var t6;
|
|
6779
|
-
if ($[11] !== textareaProps) {
|
|
6780
|
-
t6 = function(e_0) {
|
|
6736
|
+
}
|
|
6737
|
+
}, textareaProps), props), {}, {
|
|
6738
|
+
ref: function(e_0) {
|
|
6781
6739
|
textareaProps.ref(e_0);
|
|
6782
6740
|
textareaRef.current = e_0;
|
|
6783
|
-
}
|
|
6784
|
-
|
|
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;
|
|
6741
|
+
}
|
|
6742
|
+
}));
|
|
6810
6743
|
};
|
|
6811
6744
|
var Control = function(props) {
|
|
6812
6745
|
return /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(Root5, _objectSpread30(_objectSpread30({}, props), {}, {
|
|
@@ -6816,7 +6749,7 @@ var Control = function(props) {
|
|
|
6816
6749
|
Control.Root = Root5;
|
|
6817
6750
|
Control.Input = Input;
|
|
6818
6751
|
// src/components/threads/Thread/MessageForm/Field/Files/Preview.tsx
|
|
6819
|
-
var
|
|
6752
|
+
var import_react_compiler_runtime39 = require("react-compiler-runtime");
|
|
6820
6753
|
var import_themes49 = require("@radix-ui/themes");
|
|
6821
6754
|
var import_react_icons12 = require("@radix-ui/react-icons");
|
|
6822
6755
|
var import_jsx_runtime67 = require("react/jsx-runtime");
|
|
@@ -6864,7 +6797,7 @@ function _toPrimitive31(t, r) {
|
|
|
6864
6797
|
return ("string" === r ? String : Number)(t);
|
|
6865
6798
|
}
|
|
6866
6799
|
var Preview = function(props) {
|
|
6867
|
-
var $ = (0,
|
|
6800
|
+
var $ = (0, import_react_compiler_runtime39.c)(8);
|
|
6868
6801
|
var _useMessageFormContext = useMessageFormContext(), files = _useMessageFormContext.files, setFiles = _useMessageFormContext.setFiles;
|
|
6869
6802
|
if (!files.length) {
|
|
6870
6803
|
return null;
|
|
@@ -6962,7 +6895,7 @@ var import_dayjs2 = __toESM(require("dayjs"), 1);
|
|
|
6962
6895
|
var import_react_icons13 = require("@radix-ui/react-icons");
|
|
6963
6896
|
var import_themes50 = require("@radix-ui/themes");
|
|
6964
6897
|
// src/hooks/files/useCreateFile/index.ts
|
|
6965
|
-
var
|
|
6898
|
+
var import_react_compiler_runtime40 = require("react-compiler-runtime");
|
|
6966
6899
|
var import_react_query7 = require("@tanstack/react-query");
|
|
6967
6900
|
// src/hooks/files/useCreateFile/lib/mutationOptions/mutationFn/body/formData.ts
|
|
6968
6901
|
var formData = function(variables) {
|
|
@@ -7198,7 +7131,7 @@ function _toPrimitive34(t, r) {
|
|
|
7198
7131
|
return ("string" === r ? String : Number)(t);
|
|
7199
7132
|
}
|
|
7200
7133
|
var useCreateFile = function(t0) {
|
|
7201
|
-
var $ = (0,
|
|
7134
|
+
var $ = (0, import_react_compiler_runtime40.c)(15);
|
|
7202
7135
|
var t1;
|
|
7203
7136
|
if ($[0] !== t0) {
|
|
7204
7137
|
t1 = t0 === void 0 ? {
|
|
@@ -7640,76 +7573,38 @@ function _toPrimitive36(t, r) {
|
|
|
7640
7573
|
}
|
|
7641
7574
|
return ("string" === r ? String : Number)(t);
|
|
7642
7575
|
}
|
|
7643
|
-
var Root6 = function(
|
|
7644
|
-
|
|
7645
|
-
var children =
|
|
7646
|
-
var _ref = (0, import_react_hook_form3.useFormContext)(),
|
|
7647
|
-
|
|
7648
|
-
|
|
7649
|
-
|
|
7650
|
-
|
|
7651
|
-
|
|
7652
|
-
|
|
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, {
|
|
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, {
|
|
7676
7586
|
direction: "column",
|
|
7677
7587
|
flexShrink: "0",
|
|
7678
7588
|
children: /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(import_themes51.Flex, {
|
|
7679
7589
|
direction: "column",
|
|
7680
7590
|
flexShrink: "0",
|
|
7681
7591
|
children: /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(import_themes51.Flex, {
|
|
7682
|
-
style:
|
|
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
|
+
} : {}),
|
|
7683
7600
|
p: "2",
|
|
7684
7601
|
pl: "3",
|
|
7685
7602
|
wrap: "wrap",
|
|
7686
7603
|
children: children
|
|
7687
7604
|
})
|
|
7688
7605
|
})
|
|
7689
|
-
})
|
|
7690
|
-
|
|
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;
|
|
7606
|
+
})
|
|
7607
|
+
});
|
|
7713
7608
|
};
|
|
7714
7609
|
var Field = {
|
|
7715
7610
|
Root: Root6,
|
|
@@ -7779,7 +7674,7 @@ var import_themes53 = require("@radix-ui/themes");
|
|
|
7779
7674
|
// src/components/threads/Thread/Provider/index.tsx
|
|
7780
7675
|
var Provider2 = SuperinterfaceProvider;
|
|
7781
7676
|
// src/components/toasts/ToastsProvider/index.tsx
|
|
7782
|
-
var
|
|
7677
|
+
var import_react_compiler_runtime41 = require("react-compiler-runtime");
|
|
7783
7678
|
var import_react52 = require("react");
|
|
7784
7679
|
var Toast2 = __toESM(require("@radix-ui/react-toast"), 1);
|
|
7785
7680
|
// src/components/toasts/ToastsProvider/CustomToast.tsx
|
|
@@ -7818,7 +7713,7 @@ var CustomToast = function(_ref) {
|
|
|
7818
7713
|
// src/components/toasts/ToastsProvider/index.tsx
|
|
7819
7714
|
var import_jsx_runtime72 = require("react/jsx-runtime");
|
|
7820
7715
|
var ToastsProvider = function(t0) {
|
|
7821
|
-
var $ = (0,
|
|
7716
|
+
var $ = (0, import_react_compiler_runtime41.c)(15);
|
|
7822
7717
|
var children = t0.children, t1 = t0.bottom;
|
|
7823
7718
|
var bottom = t1 === void 0 ? 0 : t1;
|
|
7824
7719
|
var t2;
|
|
@@ -8066,7 +7961,7 @@ var useMessageContext = function() {
|
|
|
8066
7961
|
return (0, import_react53.useContext)(MessageContext);
|
|
8067
7962
|
};
|
|
8068
7963
|
// src/hooks/assistants/useAssistant/index.ts
|
|
8069
|
-
var
|
|
7964
|
+
var import_react_compiler_runtime42 = require("react-compiler-runtime");
|
|
8070
7965
|
var import_react54 = require("react");
|
|
8071
7966
|
var import_react_query9 = require("@tanstack/react-query");
|
|
8072
7967
|
// src/hooks/assistants/useAssistant/lib/queryOptions/index.ts
|
|
@@ -8216,7 +8111,7 @@ function _toPrimitive40(t, r) {
|
|
|
8216
8111
|
return ("string" === r ? String : Number)(t);
|
|
8217
8112
|
}
|
|
8218
8113
|
var useAssistant = function(t0) {
|
|
8219
|
-
var $ = (0,
|
|
8114
|
+
var $ = (0, import_react_compiler_runtime42.c)(6);
|
|
8220
8115
|
var assistantId = t0.assistantId;
|
|
8221
8116
|
var superinterfaceContext = useSuperinterfaceContext();
|
|
8222
8117
|
var t1;
|
|
@@ -8249,7 +8144,7 @@ var useAssistant = function(t0) {
|
|
|
8249
8144
|
return t2;
|
|
8250
8145
|
};
|
|
8251
8146
|
// src/components/threads/ThreadDialog/Provider/index.tsx
|
|
8252
|
-
var
|
|
8147
|
+
var import_react_compiler_runtime43 = require("react-compiler-runtime");
|
|
8253
8148
|
var import_react57 = require("react");
|
|
8254
8149
|
// src/contexts/threads/ThreadDialogContext/index.ts
|
|
8255
8150
|
var import_react55 = require("react");
|
|
@@ -8265,7 +8160,7 @@ var useThreadDialogContext = function() {
|
|
|
8265
8160
|
// src/components/threads/ThreadDialog/Provider/index.tsx
|
|
8266
8161
|
var import_jsx_runtime75 = require("react/jsx-runtime");
|
|
8267
8162
|
var Provider4 = function(t0) {
|
|
8268
|
-
var $ = (0,
|
|
8163
|
+
var $ = (0, import_react_compiler_runtime43.c)(5);
|
|
8269
8164
|
var children = t0.children;
|
|
8270
8165
|
var threadDialogContext = useThreadDialogContext();
|
|
8271
8166
|
var _ref = _sliced_to_array((0, import_react57.useState)(threadDialogContext.isOpen), 2), isOpen = _ref[0], setIsOpen = _ref[1];
|
|
@@ -8303,7 +8198,7 @@ var Root9 = function(_ref) {
|
|
|
8303
8198
|
});
|
|
8304
8199
|
};
|
|
8305
8200
|
// src/components/threads/ThreadDialog/Trigger/index.tsx
|
|
8306
|
-
var
|
|
8201
|
+
var import_react_compiler_runtime44 = require("react-compiler-runtime");
|
|
8307
8202
|
var import_themes55 = require("@radix-ui/themes");
|
|
8308
8203
|
// src/components/threads/ThreadDialog/Trigger/Button.tsx
|
|
8309
8204
|
var import_themes54 = require("@radix-ui/themes");
|
|
@@ -8406,7 +8301,7 @@ function _toPrimitive42(t, r) {
|
|
|
8406
8301
|
return ("string" === r ? String : Number)(t);
|
|
8407
8302
|
}
|
|
8408
8303
|
var Root10 = function(t0) {
|
|
8409
|
-
var $ = (0,
|
|
8304
|
+
var $ = (0, import_react_compiler_runtime44.c)(14);
|
|
8410
8305
|
var children = t0.children, style = t0.style, className = t0.className;
|
|
8411
8306
|
var _useThreadDialogContext = useThreadDialogContext(), setIsOpen = _useThreadDialogContext.setIsOpen, isOpen = _useThreadDialogContext.isOpen;
|
|
8412
8307
|
var t1 = isOpen ? "none" : "flex";
|
|
@@ -8487,15 +8382,15 @@ function _temp8(prev) {
|
|
|
8487
8382
|
return !prev;
|
|
8488
8383
|
}
|
|
8489
8384
|
// src/components/threads/ThreadDialog/Content/index.tsx
|
|
8490
|
-
var
|
|
8385
|
+
var import_react_compiler_runtime46 = require("react-compiler-runtime");
|
|
8491
8386
|
var import_themes57 = require("@radix-ui/themes");
|
|
8492
8387
|
// src/components/threads/ThreadDialog/Close/index.tsx
|
|
8493
|
-
var
|
|
8388
|
+
var import_react_compiler_runtime45 = require("react-compiler-runtime");
|
|
8494
8389
|
var import_react_icons16 = require("@radix-ui/react-icons");
|
|
8495
8390
|
var import_themes56 = require("@radix-ui/themes");
|
|
8496
8391
|
var import_jsx_runtime79 = require("react/jsx-runtime");
|
|
8497
8392
|
var Close = function() {
|
|
8498
|
-
var $ = (0,
|
|
8393
|
+
var $ = (0, import_react_compiler_runtime45.c)(9);
|
|
8499
8394
|
var _useThreadDialogContext = useThreadDialogContext(), setIsOpen = _useThreadDialogContext.setIsOpen, isOpen = _useThreadDialogContext.isOpen;
|
|
8500
8395
|
var t0 = isOpen ? "flex" : "none";
|
|
8501
8396
|
var t1;
|
|
@@ -8611,7 +8506,7 @@ function _toPrimitive43(t, r) {
|
|
|
8611
8506
|
return ("string" === r ? String : Number)(t);
|
|
8612
8507
|
}
|
|
8613
8508
|
var Root11 = function(t0) {
|
|
8614
|
-
var $ = (0,
|
|
8509
|
+
var $ = (0, import_react_compiler_runtime46.c)(19);
|
|
8615
8510
|
var children = t0.children, className = t0.className, style = t0.style;
|
|
8616
8511
|
var isOpen = useThreadDialogContext().isOpen;
|
|
8617
8512
|
if (!isOpen) {
|
|
@@ -8810,7 +8705,7 @@ ThreadDialog.Root = Root9;
|
|
|
8810
8705
|
ThreadDialog.Trigger = Trigger;
|
|
8811
8706
|
ThreadDialog.Content = Content7;
|
|
8812
8707
|
// src/components/threads/AudioThread/Root/index.tsx
|
|
8813
|
-
var
|
|
8708
|
+
var import_react_compiler_runtime51 = require("react-compiler-runtime");
|
|
8814
8709
|
var import_themes58 = require("@radix-ui/themes");
|
|
8815
8710
|
// src/contexts/threads/AudioThreadContext/index.ts
|
|
8816
8711
|
var import_react58 = require("react");
|
|
@@ -8930,7 +8825,7 @@ var AudioThreadContext = /* @__PURE__ */ (0, import_react58.createContext)({
|
|
|
8930
8825
|
}
|
|
8931
8826
|
});
|
|
8932
8827
|
// src/hooks/misc/usePermission/index.ts
|
|
8933
|
-
var
|
|
8828
|
+
var import_react_compiler_runtime47 = require("react-compiler-runtime");
|
|
8934
8829
|
var import_react59 = require("react");
|
|
8935
8830
|
// src/hooks/misc/usePermission/util.ts
|
|
8936
8831
|
var noop = function() {};
|
|
@@ -8954,7 +8849,7 @@ function off(obj) {
|
|
|
8954
8849
|
}
|
|
8955
8850
|
// src/hooks/misc/usePermission/index.ts
|
|
8956
8851
|
var usePermission = function(permissionDesc) {
|
|
8957
|
-
var $ = (0,
|
|
8852
|
+
var $ = (0, import_react_compiler_runtime47.c)(3);
|
|
8958
8853
|
var _ref = _sliced_to_array((0, import_react59.useState)(""), 2), state = _ref[0], setState = _ref[1];
|
|
8959
8854
|
var t0;
|
|
8960
8855
|
var t1;
|
|
@@ -9008,10 +8903,10 @@ var blobToData = function(blob) {
|
|
|
9008
8903
|
});
|
|
9009
8904
|
};
|
|
9010
8905
|
// src/hooks/audioThreads/useStatus/index.ts
|
|
9011
|
-
var
|
|
8906
|
+
var import_react_compiler_runtime48 = require("react-compiler-runtime");
|
|
9012
8907
|
var import_react60 = require("react");
|
|
9013
8908
|
var useStatus = function(t0) {
|
|
9014
|
-
var $ = (0,
|
|
8909
|
+
var $ = (0, import_react_compiler_runtime48.c)(2);
|
|
9015
8910
|
var messageAudioProps = t0.messageAudioProps, recorderProps = t0.recorderProps, createMessageProps = t0.createMessageProps;
|
|
9016
8911
|
var latestMessageProps = useLatestMessage();
|
|
9017
8912
|
var t1;
|
|
@@ -9070,10 +8965,10 @@ var import_use_audio_capture = require("use-audio-capture");
|
|
|
9070
8965
|
var import_react62 = require("react");
|
|
9071
8966
|
var import_react_use_audio_player = require("react-use-audio-player");
|
|
9072
8967
|
// src/hooks/misc/useInterval.ts
|
|
9073
|
-
var
|
|
8968
|
+
var import_react_compiler_runtime49 = require("react-compiler-runtime");
|
|
9074
8969
|
var import_react61 = require("react");
|
|
9075
8970
|
var useInterval = function(callback, delay) {
|
|
9076
|
-
var $ = (0,
|
|
8971
|
+
var $ = (0, import_react_compiler_runtime49.c)(5);
|
|
9077
8972
|
var savedCallback = (0, import_react61.useRef)(_temp10);
|
|
9078
8973
|
var t0;
|
|
9079
8974
|
if ($[0] !== callback) {
|
|
@@ -9326,7 +9221,7 @@ var useRecorder = function(_ref) {
|
|
|
9326
9221
|
});
|
|
9327
9222
|
};
|
|
9328
9223
|
// src/hooks/audioThreads/useMessageAudio/index.ts
|
|
9329
|
-
var
|
|
9224
|
+
var import_react_compiler_runtime50 = require("react-compiler-runtime");
|
|
9330
9225
|
var import_react63 = require("react");
|
|
9331
9226
|
var import_compromise = __toESM(require("compromise"), 1);
|
|
9332
9227
|
var import_howler = require("howler");
|
|
@@ -9408,7 +9303,7 @@ var getMessageSentences = function(_ref) {
|
|
|
9408
9303
|
});
|
|
9409
9304
|
};
|
|
9410
9305
|
var useMessageAudio = function(t0) {
|
|
9411
|
-
var $ = (0,
|
|
9306
|
+
var $ = (0, import_react_compiler_runtime50.c)(50);
|
|
9412
9307
|
var _onEnd = t0.onEnd, passedPlay = t0.play;
|
|
9413
9308
|
var _ref = _sliced_to_array((0, import_react63.useState)(false), 2), isAudioPlayed = _ref[0], setIsAudioPlayed = _ref[1];
|
|
9414
9309
|
var t1;
|
|
@@ -9843,7 +9738,7 @@ function _asyncToGenerator12(n) {
|
|
|
9843
9738
|
};
|
|
9844
9739
|
}
|
|
9845
9740
|
var Content8 = function(t0) {
|
|
9846
|
-
var $ = (0,
|
|
9741
|
+
var $ = (0, import_react_compiler_runtime51.c)(24);
|
|
9847
9742
|
var children = t0.children, className = t0.className, style = t0.style, play = t0.play;
|
|
9848
9743
|
var addToast = useToasts().addToast;
|
|
9849
9744
|
var queryClient = (0, import_react_query10.useQueryClient)();
|
|
@@ -10203,7 +10098,7 @@ var Visualization = function(props) {
|
|
|
10203
10098
|
}));
|
|
10204
10099
|
};
|
|
10205
10100
|
// src/components/threads/AudioThread/Status/index.tsx
|
|
10206
|
-
var
|
|
10101
|
+
var import_react_compiler_runtime52 = require("react-compiler-runtime");
|
|
10207
10102
|
// src/components/threads/AudioThread/Status/StatusMessages.tsx
|
|
10208
10103
|
var import_themes61 = require("@radix-ui/themes");
|
|
10209
10104
|
var import_jsx_runtime85 = require("react/jsx-runtime");
|
|
@@ -10283,7 +10178,7 @@ function _toPrimitive48(t, r) {
|
|
|
10283
10178
|
return ("string" === r ? String : Number)(t);
|
|
10284
10179
|
}
|
|
10285
10180
|
var Status = function(props) {
|
|
10286
|
-
var $ = (0,
|
|
10181
|
+
var $ = (0, import_react_compiler_runtime52.c)(12);
|
|
10287
10182
|
var audioThreadContext = useAudioThreadContext();
|
|
10288
10183
|
if (audioThreadContext.status === "recording") {
|
|
10289
10184
|
var _t;
|
|
@@ -10380,7 +10275,7 @@ var Status = function(props) {
|
|
|
10380
10275
|
return t1;
|
|
10381
10276
|
};
|
|
10382
10277
|
// src/components/threads/AudioThread/Form/index.tsx
|
|
10383
|
-
var
|
|
10278
|
+
var import_react_compiler_runtime54 = require("react-compiler-runtime");
|
|
10384
10279
|
var import_themes63 = require("@radix-ui/themes");
|
|
10385
10280
|
// src/components/threads/AudioThread/Form/MicIcon.tsx
|
|
10386
10281
|
var import_jsx_runtime87 = require("react/jsx-runtime");
|
|
@@ -10444,12 +10339,12 @@ var MicIcon = function(props) {
|
|
|
10444
10339
|
}));
|
|
10445
10340
|
};
|
|
10446
10341
|
// src/components/threads/AudioThread/Form/ActionButton/index.tsx
|
|
10447
|
-
var
|
|
10342
|
+
var import_react_compiler_runtime53 = require("react-compiler-runtime");
|
|
10448
10343
|
var import_themes62 = require("@radix-ui/themes");
|
|
10449
10344
|
var import_react_icons17 = require("@radix-ui/react-icons");
|
|
10450
10345
|
var import_jsx_runtime88 = require("react/jsx-runtime");
|
|
10451
10346
|
var ActionButton = function() {
|
|
10452
|
-
var $ = (0,
|
|
10347
|
+
var $ = (0, import_react_compiler_runtime53.c)(27);
|
|
10453
10348
|
var audioThreadContext = useAudioThreadContext();
|
|
10454
10349
|
var superinterfaceContext = useSuperinterfaceContext();
|
|
10455
10350
|
if (audioThreadContext.status === "recording") {
|
|
@@ -10686,7 +10581,7 @@ function _toPrimitive50(t, r) {
|
|
|
10686
10581
|
return ("string" === r ? String : Number)(t);
|
|
10687
10582
|
}
|
|
10688
10583
|
var Form = function(props) {
|
|
10689
|
-
var $ = (0,
|
|
10584
|
+
var $ = (0, import_react_compiler_runtime54.c)(17);
|
|
10690
10585
|
var audioThreadContext = useAudioThreadContext();
|
|
10691
10586
|
var t0 = audioThreadContext.status === "recording" ? "var(--accent-11)" : "var(--gray-11)";
|
|
10692
10587
|
var t1;
|
|
@@ -10906,7 +10801,7 @@ AudioThreadDialog.Root = Root9;
|
|
|
10906
10801
|
AudioThreadDialog.Trigger = Trigger;
|
|
10907
10802
|
AudioThreadDialog.Content = Content7;
|
|
10908
10803
|
// src/components/markdown/MarkdownProvider/index.tsx
|
|
10909
|
-
var
|
|
10804
|
+
var import_react_compiler_runtime55 = require("react-compiler-runtime");
|
|
10910
10805
|
var import_react67 = require("react");
|
|
10911
10806
|
var import_jsx_runtime92 = require("react/jsx-runtime");
|
|
10912
10807
|
var _excluded5 = [
|
|
@@ -10931,7 +10826,7 @@ function _objectWithoutPropertiesLoose5(r, e) {
|
|
|
10931
10826
|
return t;
|
|
10932
10827
|
}
|
|
10933
10828
|
var MarkdownProvider = function(t0) {
|
|
10934
|
-
var $ = (0,
|
|
10829
|
+
var $ = (0, import_react_compiler_runtime55.c)(9);
|
|
10935
10830
|
var children;
|
|
10936
10831
|
var rest;
|
|
10937
10832
|
if ($[0] !== t0) {
|
|
@@ -10973,369 +10868,8 @@ var MarkdownProvider = function(t0) {
|
|
|
10973
10868
|
}
|
|
10974
10869
|
return t3;
|
|
10975
10870
|
};
|
|
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
|
|
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
10871
|
// src/components/avatars/Avatar.tsx
|
|
11338
|
-
var
|
|
10872
|
+
var import_react_compiler_runtime58 = require("react-compiler-runtime");
|
|
11339
10873
|
// src/lib/enums/index.ts
|
|
11340
10874
|
var IconAvatarName = /* @__PURE__ */ function(IconAvatarName2) {
|
|
11341
10875
|
IconAvatarName2["BACKPACK"] = "BACKPACK";
|
|
@@ -11358,10 +10892,10 @@ var AvatarType = /* @__PURE__ */ function(AvatarType2) {
|
|
|
11358
10892
|
return AvatarType2;
|
|
11359
10893
|
}({});
|
|
11360
10894
|
// src/components/avatars/Avatar.tsx
|
|
11361
|
-
var
|
|
10895
|
+
var import_themes66 = require("@radix-ui/themes");
|
|
11362
10896
|
// src/components/imageAvatars/ImageAvatar/index.tsx
|
|
11363
|
-
var
|
|
11364
|
-
var
|
|
10897
|
+
var import_react_compiler_runtime56 = require("react-compiler-runtime");
|
|
10898
|
+
var import_themes64 = require("@radix-ui/themes");
|
|
11365
10899
|
// src/components/imageAvatars/ImageAvatar/lib/optimizedSrc/path.ts
|
|
11366
10900
|
var width = function(_ref) {
|
|
11367
10901
|
var size = _ref.size;
|
|
@@ -11412,9 +10946,9 @@ var optimizedSrc = function(_ref) {
|
|
|
11412
10946
|
}));
|
|
11413
10947
|
};
|
|
11414
10948
|
// src/components/imageAvatars/ImageAvatar/index.tsx
|
|
11415
|
-
var
|
|
10949
|
+
var import_jsx_runtime93 = require("react/jsx-runtime");
|
|
11416
10950
|
var ImageAvatar = function(t0) {
|
|
11417
|
-
var $ = (0,
|
|
10951
|
+
var $ = (0, import_react_compiler_runtime56.c)(9);
|
|
11418
10952
|
var imageAvatar = t0.imageAvatar, size = t0.size, className = t0.className, style = t0.style;
|
|
11419
10953
|
var superinterfaceContext = useSuperinterfaceContext();
|
|
11420
10954
|
var t1;
|
|
@@ -11433,7 +10967,7 @@ var ImageAvatar = function(t0) {
|
|
|
11433
10967
|
}
|
|
11434
10968
|
var t2;
|
|
11435
10969
|
if ($[4] !== className || $[5] !== size || $[6] !== style || $[7] !== t1) {
|
|
11436
|
-
t2 = /* @__PURE__ */ (0,
|
|
10970
|
+
t2 = /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(import_themes64.Avatar, {
|
|
11437
10971
|
className: className,
|
|
11438
10972
|
style: style,
|
|
11439
10973
|
fallback: "",
|
|
@@ -11451,24 +10985,24 @@ var ImageAvatar = function(t0) {
|
|
|
11451
10985
|
return t2;
|
|
11452
10986
|
};
|
|
11453
10987
|
// src/components/iconAvatars/IconAvatar.tsx
|
|
11454
|
-
var
|
|
11455
|
-
var
|
|
11456
|
-
var
|
|
10988
|
+
var import_react_compiler_runtime57 = require("react-compiler-runtime");
|
|
10989
|
+
var import_react68 = require("react");
|
|
10990
|
+
var import_themes65 = require("@radix-ui/themes");
|
|
11457
10991
|
// src/lib/iconAvatars/iconAvatarComponents.ts
|
|
11458
|
-
var
|
|
10992
|
+
var import_react_icons18 = require("@radix-ui/react-icons");
|
|
11459
10993
|
var _obj;
|
|
11460
|
-
var iconAvatarComponents = (_obj = {}, _define_property(_obj, IconAvatarName.BACKPACK,
|
|
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);
|
|
11461
10995
|
// src/components/iconAvatars/IconAvatar.tsx
|
|
11462
|
-
var
|
|
10996
|
+
var import_jsx_runtime94 = require("react/jsx-runtime");
|
|
11463
10997
|
var IconAvatar = function(t0) {
|
|
11464
|
-
var $ = (0,
|
|
10998
|
+
var $ = (0, import_react_compiler_runtime57.c)(7);
|
|
11465
10999
|
var iconAvatar = t0.iconAvatar, size = t0.size, className = t0.className, style = t0.style;
|
|
11466
11000
|
var t1;
|
|
11467
11001
|
t1 = iconAvatarComponents[iconAvatar.name];
|
|
11468
11002
|
var Component2 = t1;
|
|
11469
11003
|
var t2;
|
|
11470
11004
|
if ($[0] !== Component2) {
|
|
11471
|
-
t2 = Component2 ? /* @__PURE__ */ (0,
|
|
11005
|
+
t2 = Component2 ? /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(Component2, {}) : "";
|
|
11472
11006
|
$[0] = Component2;
|
|
11473
11007
|
$[1] = t2;
|
|
11474
11008
|
} else {
|
|
@@ -11476,7 +11010,7 @@ var IconAvatar = function(t0) {
|
|
|
11476
11010
|
}
|
|
11477
11011
|
var t3;
|
|
11478
11012
|
if ($[2] !== className || $[3] !== size || $[4] !== style || $[5] !== t2) {
|
|
11479
|
-
t3 = /* @__PURE__ */ (0,
|
|
11013
|
+
t3 = /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(import_themes65.Avatar, {
|
|
11480
11014
|
className: className,
|
|
11481
11015
|
style: style,
|
|
11482
11016
|
size: size,
|
|
@@ -11493,16 +11027,16 @@ var IconAvatar = function(t0) {
|
|
|
11493
11027
|
return t3;
|
|
11494
11028
|
};
|
|
11495
11029
|
// src/components/avatars/Avatar.tsx
|
|
11496
|
-
var
|
|
11030
|
+
var import_jsx_runtime95 = require("react/jsx-runtime");
|
|
11497
11031
|
var Avatar6 = function(t0) {
|
|
11498
|
-
var $ = (0,
|
|
11032
|
+
var $ = (0, import_react_compiler_runtime58.c)(14);
|
|
11499
11033
|
var avatar = t0.avatar, t1 = t0.size, className = t0.className, style = t0.style;
|
|
11500
11034
|
var size = t1 === void 0 ? "1" : t1;
|
|
11501
11035
|
if (avatar) {
|
|
11502
11036
|
if (avatar.type === AvatarType.IMAGE && avatar.imageAvatar) {
|
|
11503
11037
|
var _t;
|
|
11504
11038
|
if ($[0] !== avatar.imageAvatar || $[1] !== className || $[2] !== size || $[3] !== style) {
|
|
11505
|
-
_t = /* @__PURE__ */ (0,
|
|
11039
|
+
_t = /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(ImageAvatar, {
|
|
11506
11040
|
imageAvatar: avatar.imageAvatar,
|
|
11507
11041
|
size: size,
|
|
11508
11042
|
className: className,
|
|
@@ -11521,7 +11055,7 @@ var Avatar6 = function(t0) {
|
|
|
11521
11055
|
if (avatar.type === AvatarType.ICON && avatar.iconAvatar) {
|
|
11522
11056
|
var _t2;
|
|
11523
11057
|
if ($[5] !== avatar.iconAvatar || $[6] !== className || $[7] !== size || $[8] !== style) {
|
|
11524
|
-
_t2 = /* @__PURE__ */ (0,
|
|
11058
|
+
_t2 = /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(IconAvatar, {
|
|
11525
11059
|
iconAvatar: avatar.iconAvatar,
|
|
11526
11060
|
size: size,
|
|
11527
11061
|
className: className,
|
|
@@ -11540,7 +11074,7 @@ var Avatar6 = function(t0) {
|
|
|
11540
11074
|
}
|
|
11541
11075
|
var t2;
|
|
11542
11076
|
if ($[10] !== className || $[11] !== size || $[12] !== style) {
|
|
11543
|
-
t2 = /* @__PURE__ */ (0,
|
|
11077
|
+
t2 = /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(import_themes66.Avatar, {
|
|
11544
11078
|
fallback: "",
|
|
11545
11079
|
size: size,
|
|
11546
11080
|
className: className,
|
|
@@ -11556,15 +11090,15 @@ var Avatar6 = function(t0) {
|
|
|
11556
11090
|
return t2;
|
|
11557
11091
|
};
|
|
11558
11092
|
// src/components/components/ComponentsProvider.tsx
|
|
11559
|
-
var
|
|
11560
|
-
var
|
|
11093
|
+
var import_react_compiler_runtime59 = require("react-compiler-runtime");
|
|
11094
|
+
var import_react70 = require("react");
|
|
11561
11095
|
// src/hooks/components/useComponents.ts
|
|
11562
|
-
var
|
|
11096
|
+
var import_react69 = require("react");
|
|
11563
11097
|
var useComponents = function() {
|
|
11564
|
-
return (0,
|
|
11098
|
+
return (0, import_react69.useContext)(ComponentsContext);
|
|
11565
11099
|
};
|
|
11566
11100
|
// src/components/components/ComponentsProvider.tsx
|
|
11567
|
-
var
|
|
11101
|
+
var import_jsx_runtime96 = require("react/jsx-runtime");
|
|
11568
11102
|
var _excluded6 = [
|
|
11569
11103
|
"children"
|
|
11570
11104
|
];
|
|
@@ -11587,7 +11121,7 @@ function _objectWithoutPropertiesLoose6(r, e) {
|
|
|
11587
11121
|
return t;
|
|
11588
11122
|
}
|
|
11589
11123
|
var ComponentsProvider = function(t0) {
|
|
11590
|
-
var $ = (0,
|
|
11124
|
+
var $ = (0, import_react_compiler_runtime59.c)(9);
|
|
11591
11125
|
var children;
|
|
11592
11126
|
var rest;
|
|
11593
11127
|
if ($[0] !== t0) {
|
|
@@ -11617,7 +11151,7 @@ var ComponentsProvider = function(t0) {
|
|
|
11617
11151
|
var value = t1;
|
|
11618
11152
|
var t3;
|
|
11619
11153
|
if ($[6] !== children || $[7] !== value) {
|
|
11620
|
-
t3 = /* @__PURE__ */ (0,
|
|
11154
|
+
t3 = /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(ComponentsContext.Provider, {
|
|
11621
11155
|
value: value,
|
|
11622
11156
|
children: children
|
|
11623
11157
|
});
|
|
@@ -11630,11 +11164,11 @@ var ComponentsProvider = function(t0) {
|
|
|
11630
11164
|
return t3;
|
|
11631
11165
|
};
|
|
11632
11166
|
// src/components/assistants/AssistantProvider/index.tsx
|
|
11633
|
-
var
|
|
11634
|
-
var
|
|
11167
|
+
var import_react_compiler_runtime60 = require("react-compiler-runtime");
|
|
11168
|
+
var import_jsx_runtime97 = require("react/jsx-runtime");
|
|
11635
11169
|
var AssistantProvider = function(t0) {
|
|
11636
11170
|
var _assistant$name;
|
|
11637
|
-
var $ = (0,
|
|
11171
|
+
var $ = (0, import_react_compiler_runtime60.c)(10);
|
|
11638
11172
|
var children = t0.children;
|
|
11639
11173
|
var superinterfaceContext = useSuperinterfaceContext();
|
|
11640
11174
|
var t1;
|
|
@@ -11652,7 +11186,7 @@ var AssistantProvider = function(t0) {
|
|
|
11652
11186
|
var t3 = assistant === null || assistant === void 0 ? void 0 : assistant.avatar;
|
|
11653
11187
|
var t4;
|
|
11654
11188
|
if ($[2] !== t3) {
|
|
11655
|
-
t4 = /* @__PURE__ */ (0,
|
|
11189
|
+
t4 = /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(Avatar6, {
|
|
11656
11190
|
avatar: t3
|
|
11657
11191
|
});
|
|
11658
11192
|
$[2] = t3;
|
|
@@ -11662,7 +11196,7 @@ var AssistantProvider = function(t0) {
|
|
|
11662
11196
|
}
|
|
11663
11197
|
var t5;
|
|
11664
11198
|
if ($[4] !== children || $[5] !== t4) {
|
|
11665
|
-
t5 = /* @__PURE__ */ (0,
|
|
11199
|
+
t5 = /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(AssistantAvatarContext.Provider, {
|
|
11666
11200
|
value: t4,
|
|
11667
11201
|
children: children
|
|
11668
11202
|
});
|
|
@@ -11674,7 +11208,7 @@ var AssistantProvider = function(t0) {
|
|
|
11674
11208
|
}
|
|
11675
11209
|
var t6;
|
|
11676
11210
|
if ($[7] !== t2 || $[8] !== t5) {
|
|
11677
|
-
t6 = /* @__PURE__ */ (0,
|
|
11211
|
+
t6 = /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(AssistantNameContext.Provider, {
|
|
11678
11212
|
value: t2,
|
|
11679
11213
|
children: t5
|
|
11680
11214
|
});
|
|
@@ -11700,7 +11234,6 @@ var AssistantProvider = function(t0) {
|
|
|
11700
11234
|
MarkdownContext: MarkdownContext,
|
|
11701
11235
|
MarkdownProvider: MarkdownProvider,
|
|
11702
11236
|
RunStep: RunStep,
|
|
11703
|
-
SourceAnnotation: SourceAnnotation,
|
|
11704
11237
|
Suggestions: Suggestions,
|
|
11705
11238
|
SuperinterfaceProvider: SuperinterfaceProvider,
|
|
11706
11239
|
Thread: Thread,
|