@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.js
CHANGED
|
@@ -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
|
|
@@ -2805,7 +2809,7 @@ var threadRunRequiresAction = /*#__PURE__*/ function() {
|
|
|
2805
2809
|
4,
|
|
2806
2810
|
map(toolCalls, /*#__PURE__*/ function() {
|
|
2807
2811
|
var _ref = _async_to_generator(function(toolCall) {
|
|
2808
|
-
var fn, args, parsedArgs, output;
|
|
2812
|
+
var fn, args, parsedArgs, output, error;
|
|
2809
2813
|
return _ts_generator(this, function(_state) {
|
|
2810
2814
|
switch(_state.label){
|
|
2811
2815
|
case 0:
|
|
@@ -2830,12 +2834,32 @@ var threadRunRequiresAction = /*#__PURE__*/ function() {
|
|
|
2830
2834
|
}
|
|
2831
2835
|
args = toolCall.function.arguments;
|
|
2832
2836
|
parsedArgs = JSON.parse(args);
|
|
2837
|
+
_state.label = 1;
|
|
2838
|
+
case 1:
|
|
2839
|
+
_state.trys.push([
|
|
2840
|
+
1,
|
|
2841
|
+
3,
|
|
2842
|
+
,
|
|
2843
|
+
4
|
|
2844
|
+
]);
|
|
2833
2845
|
return [
|
|
2834
2846
|
4,
|
|
2835
2847
|
fn(parsedArgs)
|
|
2836
2848
|
];
|
|
2837
|
-
case
|
|
2849
|
+
case 2:
|
|
2838
2850
|
output = _state.sent();
|
|
2851
|
+
return [
|
|
2852
|
+
3,
|
|
2853
|
+
4
|
|
2854
|
+
];
|
|
2855
|
+
case 3:
|
|
2856
|
+
error = _state.sent();
|
|
2857
|
+
output = "Error: ".concat(error.message);
|
|
2858
|
+
return [
|
|
2859
|
+
3,
|
|
2860
|
+
4
|
|
2861
|
+
];
|
|
2862
|
+
case 4:
|
|
2839
2863
|
return [
|
|
2840
2864
|
2,
|
|
2841
2865
|
{
|