@superinterface/react 2.24.4 → 2.24.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 +27 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +27 -3
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -1030,7 +1030,11 @@ var formattedJsonOrRaw = function(param) {
|
|
|
1030
1030
|
try {
|
|
1031
1031
|
return JSON.stringify(JSON.parse(value), null, 2);
|
|
1032
1032
|
} catch (error) {
|
|
1033
|
-
|
|
1033
|
+
if (typeof value === "string") {
|
|
1034
|
+
return value;
|
|
1035
|
+
} else {
|
|
1036
|
+
return JSON.stringify(value, null, 2);
|
|
1037
|
+
}
|
|
1034
1038
|
}
|
|
1035
1039
|
};
|
|
1036
1040
|
// src/components/functions/FunctionBase/Content/index.tsx
|
|
@@ -2960,7 +2964,7 @@ var threadRunRequiresAction = /*#__PURE__*/ function() {
|
|
|
2960
2964
|
4,
|
|
2961
2965
|
(0, import_radash12.map)(toolCalls, /*#__PURE__*/ function() {
|
|
2962
2966
|
var _ref = _async_to_generator(function(toolCall) {
|
|
2963
|
-
var fn, args, parsedArgs, output;
|
|
2967
|
+
var fn, args, parsedArgs, output, error;
|
|
2964
2968
|
return _ts_generator(this, function(_state) {
|
|
2965
2969
|
switch(_state.label){
|
|
2966
2970
|
case 0:
|
|
@@ -2985,12 +2989,32 @@ var threadRunRequiresAction = /*#__PURE__*/ function() {
|
|
|
2985
2989
|
}
|
|
2986
2990
|
args = toolCall.function.arguments;
|
|
2987
2991
|
parsedArgs = JSON.parse(args);
|
|
2992
|
+
_state.label = 1;
|
|
2993
|
+
case 1:
|
|
2994
|
+
_state.trys.push([
|
|
2995
|
+
1,
|
|
2996
|
+
3,
|
|
2997
|
+
,
|
|
2998
|
+
4
|
|
2999
|
+
]);
|
|
2988
3000
|
return [
|
|
2989
3001
|
4,
|
|
2990
3002
|
fn(parsedArgs)
|
|
2991
3003
|
];
|
|
2992
|
-
case
|
|
3004
|
+
case 2:
|
|
2993
3005
|
output = _state.sent();
|
|
3006
|
+
return [
|
|
3007
|
+
3,
|
|
3008
|
+
4
|
|
3009
|
+
];
|
|
3010
|
+
case 3:
|
|
3011
|
+
error = _state.sent();
|
|
3012
|
+
output = "Error: ".concat(error.message);
|
|
3013
|
+
return [
|
|
3014
|
+
3,
|
|
3015
|
+
4
|
|
3016
|
+
];
|
|
3017
|
+
case 4:
|
|
2994
3018
|
return [
|
|
2995
3019
|
2,
|
|
2996
3020
|
{
|