@superinterface/react 4.2.1 → 4.2.2

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.d.cts CHANGED
@@ -738,7 +738,7 @@ declare const useComponents: () => {
738
738
  children: React.ReactNode;
739
739
  } & StyleProps) => react_jsx_runtime.JSX.Element;
740
740
  StartingToolCalls: () => react_jsx_runtime.JSX.Element;
741
- ToolCall: ({ toolCall, runStep, }: {
741
+ ToolCall: ({ toolCall, runStep }: {
742
742
  toolCall: ToolCall;
743
743
  runStep: SerializedRunStep;
744
744
  }) => react_jsx_runtime.JSX.Element;
@@ -749,9 +749,10 @@ declare const useComponents: () => {
749
749
  fn: openai_resources_beta_threads_runs_steps.FunctionToolCall.Function;
750
750
  runStep: openai_resources_beta_threads_runs_steps.RunStep;
751
751
  }) => react_jsx_runtime.JSX.Element;
752
- CodeInterpreterToolCall: ({ codeInterpreter, runStep, }: {
752
+ CodeInterpreterToolCall: ({ codeInterpreter, runStep, toolCall: _toolCall, }: {
753
753
  codeInterpreter: openai_resources_beta_threads_runs_steps.CodeInterpreterToolCall.CodeInterpreter;
754
754
  runStep: SerializedRunStep;
755
+ toolCall: openai_resources_beta_threads_runs_steps.CodeInterpreterToolCall;
755
756
  }) => react_jsx_runtime.JSX.Element;
756
757
  FileSearchToolCall: ({ runStep, toolCall, }: {
757
758
  toolCall: ToolCall;
@@ -822,7 +823,7 @@ declare const RunStep: {
822
823
  children: React.ReactNode;
823
824
  } & StyleProps) => react_jsx_runtime.JSX.Element;
824
825
  StartingToolCalls: () => react_jsx_runtime.JSX.Element;
825
- ToolCall: ({ toolCall, runStep, }: {
826
+ ToolCall: ({ toolCall, runStep }: {
826
827
  toolCall: ToolCall;
827
828
  runStep: SerializedRunStep;
828
829
  }) => react_jsx_runtime.JSX.Element;
package/dist/index.d.ts CHANGED
@@ -738,7 +738,7 @@ declare const useComponents: () => {
738
738
  children: React.ReactNode;
739
739
  } & StyleProps) => react_jsx_runtime.JSX.Element;
740
740
  StartingToolCalls: () => react_jsx_runtime.JSX.Element;
741
- ToolCall: ({ toolCall, runStep, }: {
741
+ ToolCall: ({ toolCall, runStep }: {
742
742
  toolCall: ToolCall;
743
743
  runStep: SerializedRunStep;
744
744
  }) => react_jsx_runtime.JSX.Element;
@@ -749,9 +749,10 @@ declare const useComponents: () => {
749
749
  fn: openai_resources_beta_threads_runs_steps.FunctionToolCall.Function;
750
750
  runStep: openai_resources_beta_threads_runs_steps.RunStep;
751
751
  }) => react_jsx_runtime.JSX.Element;
752
- CodeInterpreterToolCall: ({ codeInterpreter, runStep, }: {
752
+ CodeInterpreterToolCall: ({ codeInterpreter, runStep, toolCall: _toolCall, }: {
753
753
  codeInterpreter: openai_resources_beta_threads_runs_steps.CodeInterpreterToolCall.CodeInterpreter;
754
754
  runStep: SerializedRunStep;
755
+ toolCall: openai_resources_beta_threads_runs_steps.CodeInterpreterToolCall;
755
756
  }) => react_jsx_runtime.JSX.Element;
756
757
  FileSearchToolCall: ({ runStep, toolCall, }: {
757
758
  toolCall: ToolCall;
@@ -822,7 +823,7 @@ declare const RunStep: {
822
823
  children: React.ReactNode;
823
824
  } & StyleProps) => react_jsx_runtime.JSX.Element;
824
825
  StartingToolCalls: () => react_jsx_runtime.JSX.Element;
825
- ToolCall: ({ toolCall, runStep, }: {
826
+ ToolCall: ({ toolCall, runStep }: {
826
827
  toolCall: ToolCall;
827
828
  runStep: SerializedRunStep;
828
829
  }) => react_jsx_runtime.JSX.Element;
package/dist/index.js CHANGED
@@ -37841,23 +37841,25 @@ var FunctionComponentsContext = /* @__PURE__ */ createContext2({});
37841
37841
  // src/components/runSteps/RunStep/ToolCalls/ToolCall/Fn.tsx
37842
37842
  import { jsx as _jsx2 } from "react/jsx-runtime";
37843
37843
  var Fn = function(t0) {
37844
- var $ = _c(4);
37845
- var fn = t0.fn, runStep = t0.runStep;
37844
+ var $ = _c(5);
37845
+ var fn = t0.fn, runStep = t0.runStep, toolCall = t0.toolCall;
37846
37846
  var functionComponentsContext = useContext2(FunctionComponentsContext);
37847
37847
  var componentsContext = useContext2(ComponentsContext);
37848
37848
  var Component2 = functionComponentsContext[fn.name] || componentsContext.components.Function;
37849
37849
  var t1;
37850
- if ($[0] !== Component2 || $[1] !== fn || $[2] !== runStep) {
37850
+ if ($[0] !== Component2 || $[1] !== fn || $[2] !== runStep || $[3] !== toolCall) {
37851
37851
  t1 = /* @__PURE__ */ _jsx2(Component2, {
37852
37852
  fn: fn,
37853
- runStep: runStep
37853
+ runStep: runStep,
37854
+ toolCall: toolCall
37854
37855
  });
37855
37856
  $[0] = Component2;
37856
37857
  $[1] = fn;
37857
37858
  $[2] = runStep;
37858
- $[3] = t1;
37859
+ $[3] = toolCall;
37860
+ $[4] = t1;
37859
37861
  } else {
37860
- t1 = $[3];
37862
+ t1 = $[4];
37861
37863
  }
37862
37864
  return t1;
37863
37865
  };
@@ -37866,22 +37868,24 @@ import { c as _c2 } from "react-compiler-runtime";
37866
37868
  import { useContext as useContext3 } from "react";
37867
37869
  import { jsx as _jsx3 } from "react/jsx-runtime";
37868
37870
  var CodeInterpreter = function(t0) {
37869
- var $ = _c2(4);
37870
- var codeInterpreter = t0.codeInterpreter, runStep = t0.runStep;
37871
+ var $ = _c2(5);
37872
+ var codeInterpreter = t0.codeInterpreter, runStep = t0.runStep, toolCall = t0.toolCall;
37871
37873
  var componentsContext = useContext3(ComponentsContext);
37872
37874
  var Component2 = componentsContext.components.CodeInterpreterToolCall;
37873
37875
  var t1;
37874
- if ($[0] !== Component2 || $[1] !== codeInterpreter || $[2] !== runStep) {
37876
+ if ($[0] !== Component2 || $[1] !== codeInterpreter || $[2] !== runStep || $[3] !== toolCall) {
37875
37877
  t1 = /* @__PURE__ */ _jsx3(Component2, {
37876
37878
  codeInterpreter: codeInterpreter,
37877
- runStep: runStep
37879
+ runStep: runStep,
37880
+ toolCall: toolCall
37878
37881
  });
37879
37882
  $[0] = Component2;
37880
37883
  $[1] = codeInterpreter;
37881
37884
  $[2] = runStep;
37882
- $[3] = t1;
37885
+ $[3] = toolCall;
37886
+ $[4] = t1;
37883
37887
  } else {
37884
- t1 = $[3];
37888
+ t1 = $[4];
37885
37889
  }
37886
37890
  return t1;
37887
37891
  };
@@ -37940,13 +37944,14 @@ var ToolCall = function(t0) {
37940
37944
  var toolCall = t0.toolCall, runStep = t0.runStep;
37941
37945
  if (toolCall.type === "function") {
37942
37946
  var _t;
37943
- if ($[0] !== runStep || $[1] !== toolCall.function) {
37947
+ if ($[0] !== runStep || $[1] !== toolCall) {
37944
37948
  _t = /* @__PURE__ */ _jsx6(Fn, {
37945
37949
  fn: toolCall.function,
37950
+ toolCall: toolCall,
37946
37951
  runStep: runStep
37947
37952
  });
37948
37953
  $[0] = runStep;
37949
- $[1] = toolCall.function;
37954
+ $[1] = toolCall;
37950
37955
  $[2] = _t;
37951
37956
  } else {
37952
37957
  _t = $[2];
@@ -37955,13 +37960,14 @@ var ToolCall = function(t0) {
37955
37960
  }
37956
37961
  if (toolCall.type === "code_interpreter") {
37957
37962
  var _t2;
37958
- if ($[3] !== runStep || $[4] !== toolCall.code_interpreter) {
37963
+ if ($[3] !== runStep || $[4] !== toolCall) {
37959
37964
  _t2 = /* @__PURE__ */ _jsx6(CodeInterpreter, {
37960
37965
  codeInterpreter: toolCall.code_interpreter,
37966
+ toolCall: toolCall,
37961
37967
  runStep: runStep
37962
37968
  });
37963
37969
  $[3] = runStep;
37964
- $[4] = toolCall.code_interpreter;
37970
+ $[4] = toolCall;
37965
37971
  $[5] = _t2;
37966
37972
  } else {
37967
37973
  _t2 = $[5];