@superinterface/react 5.3.1-beta.5 → 5.3.1-beta.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +69 -35
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +105 -71
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -36894,7 +36894,7 @@ var require_lib4 = __commonJS({
|
|
|
36894
36894
|
}
|
|
36895
36895
|
});
|
|
36896
36896
|
// src/components/core/SuperinterfaceProvider/index.tsx
|
|
36897
|
-
import { useRef } from "react";
|
|
36897
|
+
import { useRef, useMemo } from "react";
|
|
36898
36898
|
// src/lib/misc/merge/index.ts
|
|
36899
36899
|
import _2 from "lodash";
|
|
36900
36900
|
// src/lib/misc/merge/customizer.ts
|
|
@@ -36904,7 +36904,6 @@ var customizer = function(objectValue, srcValue, key2) {
|
|
|
36904
36904
|
return srcValue;
|
|
36905
36905
|
}
|
|
36906
36906
|
if (srcValue && (typeof srcValue === "undefined" ? "undefined" : _type_of(srcValue)) === "object" && "current" in srcValue && typeof key2 === "string" && key2.toLowerCase().includes("ref")) {
|
|
36907
|
-
console.log("[customizer] Preserving ref identity for key:", key2, "srcValue:", srcValue);
|
|
36908
36907
|
return srcValue;
|
|
36909
36908
|
}
|
|
36910
36909
|
return void 0;
|
|
@@ -37061,17 +37060,26 @@ var SuperinterfaceProvider = function(_ref) {
|
|
|
37061
37060
|
var children = _ref.children, baseUrl2 = _ref.baseUrl, variables = _ref.variables, defaultOptions = _ref.defaultOptions, threadIdStorageOptions = _ref.threadIdStorageOptions;
|
|
37062
37061
|
var superinterfaceContext = useSuperinterfaceContext();
|
|
37063
37062
|
var createMessageAbortControllerRef = useRef(null);
|
|
37064
|
-
var value =
|
|
37065
|
-
|
|
37066
|
-
|
|
37067
|
-
|
|
37068
|
-
|
|
37069
|
-
|
|
37070
|
-
|
|
37071
|
-
|
|
37072
|
-
|
|
37073
|
-
|
|
37074
|
-
|
|
37063
|
+
var value = useMemo(function() {
|
|
37064
|
+
return merge(superinterfaceContext, _objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread({}, baseUrl2 ? {
|
|
37065
|
+
baseUrl: baseUrl2
|
|
37066
|
+
} : {}), variables ? {
|
|
37067
|
+
variables: variables
|
|
37068
|
+
} : {}), defaultOptions ? {
|
|
37069
|
+
defaultOptions: defaultOptions
|
|
37070
|
+
} : {}), threadIdStorageOptions ? {
|
|
37071
|
+
threadIdStorageOptions: threadIdStorageOptions
|
|
37072
|
+
} : {}), {}, {
|
|
37073
|
+
createMessageAbortControllerRef: createMessageAbortControllerRef
|
|
37074
|
+
}));
|
|
37075
|
+
}, [
|
|
37076
|
+
superinterfaceContext,
|
|
37077
|
+
baseUrl2,
|
|
37078
|
+
variables,
|
|
37079
|
+
defaultOptions,
|
|
37080
|
+
threadIdStorageOptions,
|
|
37081
|
+
createMessageAbortControllerRef
|
|
37082
|
+
]);
|
|
37075
37083
|
return /* @__PURE__ */ _jsx(SuperinterfaceContext.Provider, {
|
|
37076
37084
|
value: value,
|
|
37077
37085
|
children: children
|
|
@@ -37084,7 +37092,7 @@ import { c as _c66 } from "react-compiler-runtime";
|
|
|
37084
37092
|
import { Flex as Flex18 } from "@radix-ui/themes";
|
|
37085
37093
|
// src/components/threads/Thread/Message/index.tsx
|
|
37086
37094
|
import { c as _c60 } from "react-compiler-runtime";
|
|
37087
|
-
import { useMemo as
|
|
37095
|
+
import { useMemo as useMemo12 } from "react";
|
|
37088
37096
|
import { Box as Box12 } from "@radix-ui/themes";
|
|
37089
37097
|
// src/components/runSteps/RunSteps/index.tsx
|
|
37090
37098
|
import { c as _c56 } from "react-compiler-runtime";
|
|
@@ -37537,7 +37545,7 @@ var ToolCallIcon = function(t0) {
|
|
|
37537
37545
|
};
|
|
37538
37546
|
// src/components/functions/FunctionBase/Content/index.tsx
|
|
37539
37547
|
import { c as _c12 } from "react-compiler-runtime";
|
|
37540
|
-
import { useMemo } from "react";
|
|
37548
|
+
import { useMemo as useMemo2 } from "react";
|
|
37541
37549
|
import { Code, Box } from "@radix-ui/themes";
|
|
37542
37550
|
// src/components/functions/FunctionBase/Content/lib/formattedJsonOrRaw.ts
|
|
37543
37551
|
var formattedJsonOrRaw = function(_ref) {
|
|
@@ -37982,7 +37990,7 @@ var FallbackToolCall = function(t0) {
|
|
|
37982
37990
|
};
|
|
37983
37991
|
// src/components/contents/TextContent.tsx
|
|
37984
37992
|
import { c as _c43 } from "react-compiler-runtime";
|
|
37985
|
-
import React, { useState as useState3, useEffect as useEffect2, useMemo as
|
|
37993
|
+
import React, { useState as useState3, useEffect as useEffect2, useMemo as useMemo11 } from "react";
|
|
37986
37994
|
import { Badge } from "@radix-ui/themes";
|
|
37987
37995
|
import { compile } from "@mdx-js/mdx";
|
|
37988
37996
|
import { MDXProvider, useMDXComponents } from "@mdx-js/react";
|
|
@@ -38346,13 +38354,13 @@ import { c as _c30 } from "react-compiler-runtime";
|
|
|
38346
38354
|
import { Code as RadixCode } from "@radix-ui/themes";
|
|
38347
38355
|
// src/components/suggestions/Suggestions/index.tsx
|
|
38348
38356
|
import { c as _c29 } from "react-compiler-runtime";
|
|
38349
|
-
import { useMemo as
|
|
38357
|
+
import { useMemo as useMemo8 } from "react";
|
|
38350
38358
|
// src/hooks/messages/useLatestMessage/index.ts
|
|
38351
38359
|
import { c as _c26 } from "react-compiler-runtime";
|
|
38352
|
-
import { useMemo as
|
|
38360
|
+
import { useMemo as useMemo4 } from "react";
|
|
38353
38361
|
// src/hooks/messages/useMessages/index.tsx
|
|
38354
38362
|
import { c as _c25 } from "react-compiler-runtime";
|
|
38355
|
-
import { useMemo as
|
|
38363
|
+
import { useMemo as useMemo3 } from "react";
|
|
38356
38364
|
import { useInfiniteQuery, useQueryClient } from "@tanstack/react-query";
|
|
38357
38365
|
// src/lib/threads/queryOptions/index.ts
|
|
38358
38366
|
import { infiniteQueryOptions } from "@tanstack/react-query";
|
|
@@ -38733,12 +38741,12 @@ var useLatestMessage = function() {
|
|
|
38733
38741
|
return t0;
|
|
38734
38742
|
};
|
|
38735
38743
|
// src/components/suggestions/Suggestions/Content.tsx
|
|
38736
|
-
import { useMemo as
|
|
38744
|
+
import { useMemo as useMemo7 } from "react";
|
|
38737
38745
|
import { isEmpty } from "radash";
|
|
38738
38746
|
import { onlyText } from "react-children-utilities";
|
|
38739
38747
|
// src/hooks/messages/useIsMutatingMessage/index.ts
|
|
38740
38748
|
import { c as _c27 } from "react-compiler-runtime";
|
|
38741
|
-
import { useMemo as
|
|
38749
|
+
import { useMemo as useMemo5 } from "react";
|
|
38742
38750
|
import { useIsMutating } from "@tanstack/react-query";
|
|
38743
38751
|
var useIsMutatingMessage = function() {
|
|
38744
38752
|
var $ = _c27(2);
|
|
@@ -38769,7 +38777,7 @@ import { c as _c28 } from "react-compiler-runtime";
|
|
|
38769
38777
|
import { ArrowUpIcon } from "@radix-ui/react-icons";
|
|
38770
38778
|
import { Text as Text4, Button as Button2, Spinner } from "@radix-ui/themes";
|
|
38771
38779
|
// src/hooks/messages/useCreateMessage/index.ts
|
|
38772
|
-
import { useCallback } from "react";
|
|
38780
|
+
import { useCallback, useMemo as useMemo6 } from "react";
|
|
38773
38781
|
import { useMutation, useQueryClient as useQueryClient2 } from "@tanstack/react-query";
|
|
38774
38782
|
// src/hooks/messages/useCreateMessage/lib/mutationOptions/onMutate/index.ts
|
|
38775
38783
|
import { omit } from "radash";
|
|
@@ -40044,6 +40052,14 @@ var mutationFn = function(_ref) {
|
|
|
40044
40052
|
case 0:
|
|
40045
40053
|
abortController = new AbortController();
|
|
40046
40054
|
superinterfaceContext.createMessageAbortControllerRef.current = abortController;
|
|
40055
|
+
_state.label = 1;
|
|
40056
|
+
case 1:
|
|
40057
|
+
_state.trys.push([
|
|
40058
|
+
1,
|
|
40059
|
+
,
|
|
40060
|
+
10,
|
|
40061
|
+
11
|
|
40062
|
+
]);
|
|
40047
40063
|
return [
|
|
40048
40064
|
4,
|
|
40049
40065
|
fetch("".concat(superinterfaceContext.baseUrl, "/messages"), {
|
|
@@ -40055,31 +40071,31 @@ var mutationFn = function(_ref) {
|
|
|
40055
40071
|
signal: abortController.signal
|
|
40056
40072
|
})
|
|
40057
40073
|
];
|
|
40058
|
-
case
|
|
40074
|
+
case 2:
|
|
40059
40075
|
response = _state.sent();
|
|
40060
40076
|
if (!(response.status !== 200)) return [
|
|
40061
40077
|
3,
|
|
40062
|
-
|
|
40078
|
+
6
|
|
40063
40079
|
];
|
|
40064
|
-
_state.label =
|
|
40065
|
-
case
|
|
40080
|
+
_state.label = 3;
|
|
40081
|
+
case 3:
|
|
40066
40082
|
_state.trys.push([
|
|
40067
|
-
|
|
40068
|
-
|
|
40083
|
+
3,
|
|
40084
|
+
5,
|
|
40069
40085
|
,
|
|
40070
|
-
|
|
40086
|
+
6
|
|
40071
40087
|
]);
|
|
40072
40088
|
return [
|
|
40073
40089
|
4,
|
|
40074
40090
|
response.json()
|
|
40075
40091
|
];
|
|
40076
|
-
case
|
|
40092
|
+
case 4:
|
|
40077
40093
|
errorResponse = _state.sent();
|
|
40078
40094
|
throw new Error(errorResponse.error);
|
|
40079
|
-
case
|
|
40095
|
+
case 5:
|
|
40080
40096
|
error = _state.sent();
|
|
40081
40097
|
throw new Error("Failed to send your message, try again. If you are the owner, check the logs.");
|
|
40082
|
-
case
|
|
40098
|
+
case 6:
|
|
40083
40099
|
if (response.body == null) {
|
|
40084
40100
|
throw new Error("The response body is empty.");
|
|
40085
40101
|
}
|
|
@@ -40095,21 +40111,21 @@ var mutationFn = function(_ref) {
|
|
|
40095
40111
|
"messages",
|
|
40096
40112
|
threadContext.variables
|
|
40097
40113
|
];
|
|
40098
|
-
_state.label =
|
|
40099
|
-
case
|
|
40114
|
+
_state.label = 7;
|
|
40115
|
+
case 7:
|
|
40100
40116
|
if (!true) return [
|
|
40101
40117
|
3,
|
|
40102
|
-
|
|
40118
|
+
9
|
|
40103
40119
|
];
|
|
40104
40120
|
return [
|
|
40105
40121
|
4,
|
|
40106
40122
|
reader.read()
|
|
40107
40123
|
];
|
|
40108
|
-
case
|
|
40124
|
+
case 8:
|
|
40109
40125
|
_$_ref = _state.sent(), done = _$_ref.done, value = _$_ref.value;
|
|
40110
40126
|
if (done) return [
|
|
40111
40127
|
3,
|
|
40112
|
-
|
|
40128
|
+
9
|
|
40113
40129
|
];
|
|
40114
40130
|
handleResponse({
|
|
40115
40131
|
value: value,
|
|
@@ -40119,9 +40135,19 @@ var mutationFn = function(_ref) {
|
|
|
40119
40135
|
});
|
|
40120
40136
|
return [
|
|
40121
40137
|
3,
|
|
40122
|
-
|
|
40138
|
+
7
|
|
40123
40139
|
];
|
|
40124
|
-
case
|
|
40140
|
+
case 9:
|
|
40141
|
+
return [
|
|
40142
|
+
3,
|
|
40143
|
+
11
|
|
40144
|
+
];
|
|
40145
|
+
case 10:
|
|
40146
|
+
superinterfaceContext.createMessageAbortControllerRef.current = null;
|
|
40147
|
+
return [
|
|
40148
|
+
7
|
|
40149
|
+
];
|
|
40150
|
+
case 11:
|
|
40125
40151
|
return [
|
|
40126
40152
|
2
|
|
40127
40153
|
];
|
|
@@ -40248,12 +40274,20 @@ var useCreateMessage = function useCreateMessage2() {
|
|
|
40248
40274
|
var queryClient = useQueryClient2();
|
|
40249
40275
|
var superinterfaceContext = useSuperinterfaceContext();
|
|
40250
40276
|
var threadContext = useSuperinterfaceContext();
|
|
40251
|
-
var
|
|
40252
|
-
|
|
40253
|
-
|
|
40254
|
-
|
|
40255
|
-
|
|
40256
|
-
|
|
40277
|
+
var options = useMemo6(function() {
|
|
40278
|
+
return mutationOptions({
|
|
40279
|
+
queryClient: queryClient,
|
|
40280
|
+
threadContext: threadContext,
|
|
40281
|
+
superinterfaceContext: superinterfaceContext,
|
|
40282
|
+
onError: onError
|
|
40283
|
+
});
|
|
40284
|
+
}, [
|
|
40285
|
+
queryClient,
|
|
40286
|
+
threadContext,
|
|
40287
|
+
superinterfaceContext,
|
|
40288
|
+
onError
|
|
40289
|
+
]);
|
|
40290
|
+
var props = useMutation(options);
|
|
40257
40291
|
var createMessage = useCallback(function(variables) {
|
|
40258
40292
|
return props.mutateAsync(_objectSpread19(_objectSpread19({}, threadContext.variables), variables));
|
|
40259
40293
|
}, [
|
|
@@ -40502,7 +40536,7 @@ import { jsx as _jsx27 } from "react/jsx-runtime";
|
|
|
40502
40536
|
var Content4 = function(_ref) {
|
|
40503
40537
|
var children = _ref.children, className = _ref.className, style = _ref.style;
|
|
40504
40538
|
var isMutatingMessage = useIsMutatingMessage();
|
|
40505
|
-
var suggestions =
|
|
40539
|
+
var suggestions = useMemo7(function() {
|
|
40506
40540
|
return onlyText(children).split(/\r?\n/).filter(function(c2) {
|
|
40507
40541
|
return !isEmpty(c2);
|
|
40508
40542
|
}).map(function(c_0) {
|
|
@@ -40839,7 +40873,7 @@ var VolumeButton = function() {
|
|
|
40839
40873
|
};
|
|
40840
40874
|
// src/components/media/Time.tsx
|
|
40841
40875
|
import { c as _c34 } from "react-compiler-runtime";
|
|
40842
|
-
import { useState, useEffect, useMemo as
|
|
40876
|
+
import { useState, useEffect, useMemo as useMemo9 } from "react";
|
|
40843
40877
|
import { useMediaState as useMediaState3, useMediaRemote as useMediaRemote2 } from "@vidstack/react";
|
|
40844
40878
|
import { Slider as Slider2 } from "@radix-ui/themes";
|
|
40845
40879
|
import { jsx as _jsx33 } from "react/jsx-runtime";
|
|
@@ -41944,7 +41978,7 @@ var escapeInvalidTagNames = function(markdown) {
|
|
|
41944
41978
|
});
|
|
41945
41979
|
};
|
|
41946
41980
|
// ../../node_modules/react-error-boundary/dist/react-error-boundary.esm.js
|
|
41947
|
-
import { createContext as createContext5, Component, createElement, useContext as useContext9, useState as useState2, useMemo as
|
|
41981
|
+
import { createContext as createContext5, Component, createElement, useContext as useContext9, useState as useState2, useMemo as useMemo10, forwardRef } from "react";
|
|
41948
41982
|
var ErrorBoundaryContext = /* @__PURE__ */ createContext5(null);
|
|
41949
41983
|
var initialState = {
|
|
41950
41984
|
didCatch: false,
|
|
@@ -43364,7 +43398,7 @@ import { c as _c62 } from "react-compiler-runtime";
|
|
|
43364
43398
|
import { useEffect as useEffect3 } from "react";
|
|
43365
43399
|
// src/hooks/messageGroups/useMessageGroups/index.ts
|
|
43366
43400
|
import { c as _c61 } from "react-compiler-runtime";
|
|
43367
|
-
import { useMemo as
|
|
43401
|
+
import { useMemo as useMemo13 } from "react";
|
|
43368
43402
|
// src/hooks/messageGroups/useMessageGroups/lib/messageGroups/index.ts
|
|
43369
43403
|
import _6 from "lodash";
|
|
43370
43404
|
import { last as last2 } from "radash";
|
|
@@ -43583,7 +43617,7 @@ var Content7 = function() {
|
|
|
43583
43617
|
};
|
|
43584
43618
|
// src/components/threads/Thread/Messages/Progress/index.tsx
|
|
43585
43619
|
import { c as _c63 } from "react-compiler-runtime";
|
|
43586
|
-
import { useMemo as
|
|
43620
|
+
import { useMemo as useMemo14 } from "react";
|
|
43587
43621
|
import { Box as Box13 } from "@radix-ui/themes";
|
|
43588
43622
|
import { jsx as _jsx64, jsxs as _jsxs19 } from "react/jsx-runtime";
|
|
43589
43623
|
var StartingSkeleton2 = function() {
|
|
@@ -44124,7 +44158,7 @@ Submit.Root = Root7;
|
|
|
44124
44158
|
Submit.Button = Button3;
|
|
44125
44159
|
// src/components/threads/Thread/MessageForm/Root/index.tsx
|
|
44126
44160
|
import { useQueryClient as useQueryClient4 } from "@tanstack/react-query";
|
|
44127
|
-
import { useMemo as
|
|
44161
|
+
import { useMemo as useMemo15, useState as useState4, useCallback as useCallback3 } from "react";
|
|
44128
44162
|
import { useForm, FormProvider } from "react-hook-form";
|
|
44129
44163
|
import { Box as Box14 } from "@radix-ui/themes";
|
|
44130
44164
|
// src/components/threads/Thread/MessageForm/Root/lib/formOptions.ts
|
|
@@ -44222,7 +44256,7 @@ var Root8 = function(_ref) {
|
|
|
44222
44256
|
})
|
|
44223
44257
|
}).createMessage;
|
|
44224
44258
|
var isMutatingMessage = useIsMutatingMessage();
|
|
44225
|
-
var isFileLoading =
|
|
44259
|
+
var isFileLoading = useMemo15(function() {
|
|
44226
44260
|
return files.some(function(file) {
|
|
44227
44261
|
return isOptimistic({
|
|
44228
44262
|
id: file.id
|
|
@@ -44231,14 +44265,14 @@ var Root8 = function(_ref) {
|
|
|
44231
44265
|
}, [
|
|
44232
44266
|
files
|
|
44233
44267
|
]);
|
|
44234
|
-
var isLoading =
|
|
44268
|
+
var isLoading = useMemo15(function() {
|
|
44235
44269
|
return isMutatingMessage || isSubmitting;
|
|
44236
44270
|
}, [
|
|
44237
44271
|
isMutatingMessage,
|
|
44238
44272
|
isSubmitting
|
|
44239
44273
|
]);
|
|
44240
44274
|
var latestMessage = useLatestMessage().latestMessage;
|
|
44241
|
-
var isDisabled =
|
|
44275
|
+
var isDisabled = useMemo15(function() {
|
|
44242
44276
|
var _latestMessage$metada;
|
|
44243
44277
|
return !!(latestMessage !== null && latestMessage !== void 0 && (_latestMessage$metada = latestMessage.metadata) !== null && _latestMessage$metada !== void 0 && _latestMessage$metada.isBlocking) || !!isDisabledArg;
|
|
44244
44278
|
}, [
|
|
@@ -44360,7 +44394,7 @@ var usePrevious = function(state) {
|
|
|
44360
44394
|
return ref.current;
|
|
44361
44395
|
};
|
|
44362
44396
|
// src/components/threads/Thread/MessageForm/Field/Control.tsx
|
|
44363
|
-
import { useContext as useContext16, useMemo as
|
|
44397
|
+
import { useContext as useContext16, useMemo as useMemo16, useRef as useRef5, useEffect as useEffect6 } from "react";
|
|
44364
44398
|
// src/components/textareas/TextareaBase/index.tsx
|
|
44365
44399
|
import { c as _c68 } from "react-compiler-runtime";
|
|
44366
44400
|
import { forwardRef as forwardRef4 } from "react";
|
|
@@ -44579,7 +44613,7 @@ var Input = function(props) {
|
|
|
44579
44613
|
var assistantNameContext = useContext16(AssistantNameContext);
|
|
44580
44614
|
var register = useFormContext().register;
|
|
44581
44615
|
var _useMessageFormContext = useMessageFormContext(), isDisabled = _useMessageFormContext.isDisabled, isLoading = _useMessageFormContext.isLoading;
|
|
44582
|
-
var isSubmitDisabled =
|
|
44616
|
+
var isSubmitDisabled = useMemo16(function() {
|
|
44583
44617
|
return isDisabled || isLoading;
|
|
44584
44618
|
}, [
|
|
44585
44619
|
isDisabled,
|
|
@@ -46025,7 +46059,7 @@ var useMessageContext = function() {
|
|
|
46025
46059
|
};
|
|
46026
46060
|
// src/hooks/assistants/useAssistant/index.ts
|
|
46027
46061
|
import { c as _c78 } from "react-compiler-runtime";
|
|
46028
|
-
import { useMemo as
|
|
46062
|
+
import { useMemo as useMemo17 } from "react";
|
|
46029
46063
|
import { useQuery } from "@tanstack/react-query";
|
|
46030
46064
|
// src/hooks/assistants/useAssistant/lib/queryOptions/index.ts
|
|
46031
46065
|
import { queryOptions as tanstackQueryOptions } from "@tanstack/react-query";
|
|
@@ -46894,7 +46928,7 @@ var useAudioThreadContext = function() {
|
|
|
46894
46928
|
import { c as _c90 } from "react-compiler-runtime";
|
|
46895
46929
|
// src/hooks/audioRuntimes/useTtsAudioRuntime/index.ts
|
|
46896
46930
|
import { c as _c89 } from "react-compiler-runtime";
|
|
46897
|
-
import { useMemo as
|
|
46931
|
+
import { useMemo as useMemo20 } from "react";
|
|
46898
46932
|
// src/hooks/misc/usePermission/index.ts
|
|
46899
46933
|
import { c as _c86 } from "react-compiler-runtime";
|
|
46900
46934
|
import { useEffect as useEffect7, useState as useState7 } from "react";
|
|
@@ -46966,7 +47000,7 @@ var usePermission = function(permissionDesc) {
|
|
|
46966
47000
|
// src/hooks/audioThreads/useRecorder/index.ts
|
|
46967
47001
|
import dayjs3 from "dayjs";
|
|
46968
47002
|
import { useAudioCapture } from "@supercorp/use-audio-capture";
|
|
46969
|
-
import { useMemo as
|
|
47003
|
+
import { useMemo as useMemo18, useRef as useRef7, useState as useState8, useCallback as useCallback6, useEffect as useEffect9 } from "react";
|
|
46970
47004
|
import { useAudioPlayer } from "react-use-audio-player";
|
|
46971
47005
|
// src/hooks/misc/useInterval.ts
|
|
46972
47006
|
import { c as _c87 } from "react-compiler-runtime";
|
|
@@ -47162,7 +47196,7 @@ var useRecorder = function(_ref) {
|
|
|
47162
47196
|
isInited,
|
|
47163
47197
|
mediaStream
|
|
47164
47198
|
]);
|
|
47165
|
-
var visualizationAnalyser =
|
|
47199
|
+
var visualizationAnalyser = useMemo18(function() {
|
|
47166
47200
|
if (!audioEngine) return null;
|
|
47167
47201
|
var result = audioEngine.audioContext.createAnalyser();
|
|
47168
47202
|
audioEngine.source.connect(result);
|
|
@@ -47170,7 +47204,7 @@ var useRecorder = function(_ref) {
|
|
|
47170
47204
|
}, [
|
|
47171
47205
|
audioEngine
|
|
47172
47206
|
]);
|
|
47173
|
-
var silenceAnalyser =
|
|
47207
|
+
var silenceAnalyser = useMemo18(function() {
|
|
47174
47208
|
if (!audioEngine) return null;
|
|
47175
47209
|
var result_0 = audioEngine.audioContext.createAnalyser();
|
|
47176
47210
|
result_0.minDecibels = -60;
|
|
@@ -47226,7 +47260,7 @@ var useRecorder = function(_ref) {
|
|
|
47226
47260
|
};
|
|
47227
47261
|
// src/hooks/audioThreads/useMessageAudio/index.ts
|
|
47228
47262
|
import { c as _c88 } from "react-compiler-runtime";
|
|
47229
|
-
import { useMemo as
|
|
47263
|
+
import { useMemo as useMemo19, useRef as useRef8, useState as useState9, useEffect as useEffect10, useCallback as useCallback7 } from "react";
|
|
47230
47264
|
// ../../node_modules/compromise/src/API/world.js
|
|
47231
47265
|
var methods = {
|
|
47232
47266
|
one: {},
|
|
@@ -73919,7 +73953,7 @@ var BarsVisualizer = function(_ref) {
|
|
|
73919
73953
|
};
|
|
73920
73954
|
// src/hooks/audioThreads/useStatus/index.ts
|
|
73921
73955
|
import { c as _c92 } from "react-compiler-runtime";
|
|
73922
|
-
import { useMemo as
|
|
73956
|
+
import { useMemo as useMemo21 } from "react";
|
|
73923
73957
|
var useStatus = function() {
|
|
73924
73958
|
var $ = _c92(2);
|
|
73925
73959
|
var audioRuntime = useAudioThreadContext().audioRuntime;
|
|
@@ -75132,7 +75166,7 @@ AudioThreadDialog.Root = Root13;
|
|
|
75132
75166
|
AudioThreadDialog.Trigger = Trigger;
|
|
75133
75167
|
AudioThreadDialog.Content = Content8;
|
|
75134
75168
|
// src/hooks/audioRuntimes/useWebrtcAudioRuntime/index.ts
|
|
75135
|
-
import { useEffect as useEffect13, useMemo as
|
|
75169
|
+
import { useEffect as useEffect13, useMemo as useMemo22, useRef as useRef9, useState as useState12 } from "react";
|
|
75136
75170
|
function asyncGeneratorStep12(n4, t3, e3, r2, o2, a3, c2) {
|
|
75137
75171
|
try {
|
|
75138
75172
|
var i3 = n4[a3](c2), u2 = i3.value;
|
|
@@ -75572,7 +75606,7 @@ var useWebrtcAudioRuntime = function() {
|
|
|
75572
75606
|
return _ref7.apply(this, arguments);
|
|
75573
75607
|
};
|
|
75574
75608
|
}();
|
|
75575
|
-
return
|
|
75609
|
+
return useMemo22(function() {
|
|
75576
75610
|
return {
|
|
75577
75611
|
webrtcAudioRuntime: {
|
|
75578
75612
|
user: {
|
|
@@ -75653,11 +75687,11 @@ var WebrtcAudioRuntimeProvider = function(t0) {
|
|
|
75653
75687
|
};
|
|
75654
75688
|
// src/components/gui/Gui/index.tsx
|
|
75655
75689
|
import { c as _c104 } from "react-compiler-runtime";
|
|
75656
|
-
import { useMemo as
|
|
75690
|
+
import { useMemo as useMemo25 } from "react";
|
|
75657
75691
|
import { Flex as Flex35, Card as Card5, Spinner as Spinner3 } from "@radix-ui/themes";
|
|
75658
75692
|
// src/hooks/messages/useLatestAssistantMessage/index.ts
|
|
75659
75693
|
import { c as _c102 } from "react-compiler-runtime";
|
|
75660
|
-
import { useMemo as
|
|
75694
|
+
import { useMemo as useMemo23 } from "react";
|
|
75661
75695
|
var useLatestAssistantMessage = function() {
|
|
75662
75696
|
var $ = _c102(4);
|
|
75663
75697
|
var _useMessages = useMessages(), messages2 = _useMessages.messages;
|
|
@@ -75690,7 +75724,7 @@ function _temp11(message) {
|
|
|
75690
75724
|
// src/hooks/messages/useLatestAssistantMessageWithContent/index.ts
|
|
75691
75725
|
import { c as _c103 } from "react-compiler-runtime";
|
|
75692
75726
|
import { isEmpty as isEmpty3 } from "radash";
|
|
75693
|
-
import { useMemo as
|
|
75727
|
+
import { useMemo as useMemo24 } from "react";
|
|
75694
75728
|
var useLatestAssistantMessageWithContent = function() {
|
|
75695
75729
|
var $ = _c103(4);
|
|
75696
75730
|
var _useMessages = useMessages(), messages2 = _useMessages.messages;
|
|
@@ -75911,7 +75945,7 @@ function _temp13(rs) {
|
|
|
75911
75945
|
}
|
|
75912
75946
|
// src/components/markdown/MarkdownProvider/index.tsx
|
|
75913
75947
|
import { c as _c105 } from "react-compiler-runtime";
|
|
75914
|
-
import { useMemo as
|
|
75948
|
+
import { useMemo as useMemo26 } from "react";
|
|
75915
75949
|
import { jsx as _jsx100 } from "react/jsx-runtime";
|
|
75916
75950
|
var _excluded9 = [
|
|
75917
75951
|
"children"
|
|
@@ -76378,7 +76412,7 @@ var ImageAvatar = function(t0) {
|
|
|
76378
76412
|
};
|
|
76379
76413
|
// src/components/iconAvatars/IconAvatar.tsx
|
|
76380
76414
|
import { c as _c110 } from "react-compiler-runtime";
|
|
76381
|
-
import { useMemo as
|
|
76415
|
+
import { useMemo as useMemo27 } from "react";
|
|
76382
76416
|
import { Avatar as Avatar5 } from "@radix-ui/themes";
|
|
76383
76417
|
// src/lib/iconAvatars/iconAvatarComponents.ts
|
|
76384
76418
|
import { BackpackIcon, RocketIcon, MagicWandIcon, CubeIcon, TargetIcon, DiscIcon, GlobeIcon, StarIcon, LightningBoltIcon as LightningBoltIcon2, FaceIcon, PersonIcon as PersonIcon2, HeartIcon } from "@radix-ui/react-icons";
|
|
@@ -76483,7 +76517,7 @@ var Avatar6 = function(t0) {
|
|
|
76483
76517
|
};
|
|
76484
76518
|
// src/components/components/ComponentsProvider.tsx
|
|
76485
76519
|
import { c as _c112 } from "react-compiler-runtime";
|
|
76486
|
-
import { useMemo as
|
|
76520
|
+
import { useMemo as useMemo28 } from "react";
|
|
76487
76521
|
import { jsx as _jsx107 } from "react/jsx-runtime";
|
|
76488
76522
|
var _excluded11 = [
|
|
76489
76523
|
"children"
|