@superinterface/react 2.24.3 → 2.24.5
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 +19 -18
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +19 -18
- package/dist/index.js.map +1 -1
- package/dist/server.cjs +9 -9
- package/dist/server.js +9 -9
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -445,7 +445,7 @@ var queryOptions = function(param) {
|
|
|
445
445
|
]);
|
|
446
446
|
return infiniteQueryOptions(_object_spread_props(_object_spread({
|
|
447
447
|
// @ts-ignore-next-line
|
|
448
|
-
queryFn: function() {
|
|
448
|
+
queryFn: /*#__PURE__*/ function() {
|
|
449
449
|
var _ref = _async_to_generator(function(param) {
|
|
450
450
|
var pageParam, queryKey2, _queryKey2, _key, variables, params;
|
|
451
451
|
return _ts_generator(this, function(_state) {
|
|
@@ -459,7 +459,7 @@ var queryOptions = function(param) {
|
|
|
459
459
|
})));
|
|
460
460
|
return [
|
|
461
461
|
2,
|
|
462
|
-
fetch("".concat(superinterfaceContext.baseUrl).concat(path2, "?").concat(params)).then(function() {
|
|
462
|
+
fetch("".concat(superinterfaceContext.baseUrl).concat(path2, "?").concat(params)).then(/*#__PURE__*/ function() {
|
|
463
463
|
var _ref = _async_to_generator(function(response) {
|
|
464
464
|
var errorResponse, error;
|
|
465
465
|
return _ts_generator(this, function(_state) {
|
|
@@ -875,7 +875,11 @@ var formattedJsonOrRaw = function(param) {
|
|
|
875
875
|
try {
|
|
876
876
|
return JSON.stringify(JSON.parse(value), null, 2);
|
|
877
877
|
} catch (error) {
|
|
878
|
-
|
|
878
|
+
if (typeof value === "string") {
|
|
879
|
+
return value;
|
|
880
|
+
} else {
|
|
881
|
+
return JSON.stringify(value, null, 2);
|
|
882
|
+
}
|
|
879
883
|
}
|
|
880
884
|
};
|
|
881
885
|
// src/components/functions/FunctionBase/Content/index.tsx
|
|
@@ -896,9 +900,6 @@ var Content = function(param) {
|
|
|
896
900
|
}, [
|
|
897
901
|
fn
|
|
898
902
|
]);
|
|
899
|
-
if (!args) {
|
|
900
|
-
return null;
|
|
901
|
-
}
|
|
902
903
|
return /* @__PURE__ */ jsxs2(Code, {
|
|
903
904
|
variant: "ghost",
|
|
904
905
|
color: "gold",
|
|
@@ -907,10 +908,10 @@ var Content = function(param) {
|
|
|
907
908
|
wordBreak: "break-word"
|
|
908
909
|
},
|
|
909
910
|
children: [
|
|
910
|
-
/* @__PURE__ */ jsx13(Box2, {
|
|
911
|
+
args && /* @__PURE__ */ jsx13(Box2, {
|
|
911
912
|
children: args
|
|
912
913
|
}),
|
|
913
|
-
/* @__PURE__ */ jsx13(Box2, {
|
|
914
|
+
output && /* @__PURE__ */ jsx13(Box2, {
|
|
914
915
|
children: output
|
|
915
916
|
})
|
|
916
917
|
]
|
|
@@ -2399,7 +2400,7 @@ var data = function(param) {
|
|
|
2399
2400
|
// src/hooks/messages/useCreateMessage/lib/mutationOptions/onMutate/index.ts
|
|
2400
2401
|
var onMutate = function(param) {
|
|
2401
2402
|
var queryClient = param.queryClient;
|
|
2402
|
-
return function() {
|
|
2403
|
+
return /*#__PURE__*/ function() {
|
|
2403
2404
|
var _ref = _async_to_generator(function(newMessage) {
|
|
2404
2405
|
var queryKey, prevMessages;
|
|
2405
2406
|
return _ts_generator(this, function(_state) {
|
|
@@ -2792,7 +2793,7 @@ var threadRunStepCompleted = function(param) {
|
|
|
2792
2793
|
};
|
|
2793
2794
|
// src/hooks/messages/useCreateMessage/lib/mutationOptions/mutationFn/handleResponse/handlers/threadRunRequiresAction.ts
|
|
2794
2795
|
import { map } from "radash";
|
|
2795
|
-
var threadRunRequiresAction = function() {
|
|
2796
|
+
var threadRunRequiresAction = /*#__PURE__*/ function() {
|
|
2796
2797
|
var _ref = _async_to_generator(function(param) {
|
|
2797
2798
|
var value, queryClient, messagesQueryKey, superinterfaceContext, toolCalls, toolOutputs;
|
|
2798
2799
|
return _ts_generator(this, function(_state) {
|
|
@@ -2806,7 +2807,7 @@ var threadRunRequiresAction = function() {
|
|
|
2806
2807
|
toolCalls = value.data.required_action.submit_client_tool_outputs.tool_calls;
|
|
2807
2808
|
return [
|
|
2808
2809
|
4,
|
|
2809
|
-
map(toolCalls, function() {
|
|
2810
|
+
map(toolCalls, /*#__PURE__*/ function() {
|
|
2810
2811
|
var _ref = _async_to_generator(function(toolCall) {
|
|
2811
2812
|
var fn, args, parsedArgs, output;
|
|
2812
2813
|
return _ts_generator(this, function(_state) {
|
|
@@ -2926,7 +2927,7 @@ var body = function(param) {
|
|
|
2926
2927
|
// src/hooks/messages/useCreateMessage/lib/mutationOptions/mutationFn/index.ts
|
|
2927
2928
|
var mutationFn = function(param) {
|
|
2928
2929
|
var superinterfaceContext = param.superinterfaceContext, queryClient = param.queryClient, threadContext = param.threadContext;
|
|
2929
|
-
return function() {
|
|
2930
|
+
return /*#__PURE__*/ function() {
|
|
2930
2931
|
var _ref = _async_to_generator(function(variables) {
|
|
2931
2932
|
var abortController, response, errorResponse, error, parser, reader, messagesQueryKey, _ref, done, value;
|
|
2932
2933
|
return _ts_generator(this, function(_state) {
|
|
@@ -3143,7 +3144,7 @@ var Root4 = function(param) {
|
|
|
3143
3144
|
var onSubmit = onSubmitArg ? partob2(onSubmitArg, {
|
|
3144
3145
|
reset: reset,
|
|
3145
3146
|
createMessage: createMessage
|
|
3146
|
-
}) : function() {
|
|
3147
|
+
}) : /*#__PURE__*/ function() {
|
|
3147
3148
|
var _ref = _async_to_generator(function(data2) {
|
|
3148
3149
|
var attachments;
|
|
3149
3150
|
return _ts_generator(this, function(_state) {
|
|
@@ -3417,7 +3418,7 @@ var body2 = function(param) {
|
|
|
3417
3418
|
// src/hooks/files/useCreateFile/lib/mutationOptions/mutationFn/index.ts
|
|
3418
3419
|
var mutationFn2 = function(param) {
|
|
3419
3420
|
var superinterfaceContext = param.superinterfaceContext, queryClient = param.queryClient, threadContext = param.threadContext;
|
|
3420
|
-
return function() {
|
|
3421
|
+
return /*#__PURE__*/ function() {
|
|
3421
3422
|
var _ref = _async_to_generator(function(variables) {
|
|
3422
3423
|
var response, result;
|
|
3423
3424
|
return _ts_generator(this, function(_state) {
|
|
@@ -3505,7 +3506,7 @@ var Control2 = function() {
|
|
|
3505
3506
|
var _useMessageFormContext = useMessageFormContext(), isDisabled = _useMessageFormContext.isDisabled, isLoading = _useMessageFormContext.isLoading, setFiles = _useMessageFormContext.setFiles;
|
|
3506
3507
|
var createFile = useCreateFile().createFile;
|
|
3507
3508
|
var addToast = useToasts().addToast;
|
|
3508
|
-
var onChange = useCallback2(function() {
|
|
3509
|
+
var onChange = useCallback2(/*#__PURE__*/ function() {
|
|
3509
3510
|
var _ref = _async_to_generator(function(event) {
|
|
3510
3511
|
var fileObjects, newFiles, _iteratorAbruptCompletion, _didIteratorError, _iteratorError, _loop, _iterator, _step, err;
|
|
3511
3512
|
return _ts_generator(this, function(_state) {
|
|
@@ -3893,7 +3894,7 @@ import { queryOptions as tanstackQueryOptions } from "@tanstack/react-query";
|
|
|
3893
3894
|
// src/hooks/assistants/useAssistant/lib/queryOptions/queryFn.ts
|
|
3894
3895
|
var queryFn = function(param) {
|
|
3895
3896
|
var superinterfaceContext = param.superinterfaceContext;
|
|
3896
|
-
return function() {
|
|
3897
|
+
return /*#__PURE__*/ function() {
|
|
3897
3898
|
var _ref = _async_to_generator(function(param) {
|
|
3898
3899
|
var queryKey, _queryKey, _key, assistantId, params;
|
|
3899
3900
|
return _ts_generator(this, function(_state) {
|
|
@@ -3904,7 +3905,7 @@ var queryFn = function(param) {
|
|
|
3904
3905
|
});
|
|
3905
3906
|
return [
|
|
3906
3907
|
2,
|
|
3907
|
-
fetch("".concat(superinterfaceContext.baseUrl, "/assistants/").concat(assistantId, "?").concat(params)).then(function() {
|
|
3908
|
+
fetch("".concat(superinterfaceContext.baseUrl, "/assistants/").concat(assistantId, "?").concat(params)).then(/*#__PURE__*/ function() {
|
|
3908
3909
|
var _ref = _async_to_generator(function(response) {
|
|
3909
3910
|
var errorResponse, error;
|
|
3910
3911
|
return _ts_generator(this, function(_state) {
|
|
@@ -4746,7 +4747,7 @@ var Content6 = function(param) {
|
|
|
4746
4747
|
];
|
|
4747
4748
|
});
|
|
4748
4749
|
}),
|
|
4749
|
-
onStop: function() {
|
|
4750
|
+
onStop: /*#__PURE__*/ function() {
|
|
4750
4751
|
var _ref = _async_to_generator(function(_event, chunks) {
|
|
4751
4752
|
var blob, audioContent;
|
|
4752
4753
|
return _ts_generator(this, function(_state) {
|