@copilotkit/react-core 1.75.1 → 1.75.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.
@@ -861,7 +861,6 @@ function useInterrupt(config) {
861
861
  pendingRef.current = pending;
862
862
  const [handlerResult, setHandlerResult] = useState(null);
863
863
  const interruptStateRef = useRef(new ɵInterruptState());
864
- const interruptRunIdsRef = useRef(/* @__PURE__ */ new Map());
865
864
  const legacyRunIdRef = useRef(void 0);
866
865
  useEffect(() => {
867
866
  const interruptState = interruptStateRef.current;
@@ -875,16 +874,11 @@ function useInterrupt(config) {
875
874
  };
876
875
  },
877
876
  onRunFinishedEvent: (params) => {
878
- if (params.outcome === "interrupt") {
879
- const runId = params.input.runId;
880
- for (const interrupt of params.interrupts) interruptRunIdsRef.current.set(interrupt.id, runId);
881
- localStandard = params.interrupts;
882
- }
877
+ if (params.outcome === "interrupt") localStandard = params.interrupts;
883
878
  },
884
879
  onRunStartedEvent: () => {
885
880
  localLegacy = null;
886
881
  localStandard = null;
887
- interruptRunIdsRef.current.clear();
888
882
  legacyRunIdRef.current = void 0;
889
883
  interruptState.clear();
890
884
  setPending(null);
@@ -904,7 +898,6 @@ function useInterrupt(config) {
904
898
  onRunFailed: () => {
905
899
  localLegacy = null;
906
900
  localStandard = null;
907
- interruptRunIdsRef.current.clear();
908
901
  legacyRunIdRef.current = void 0;
909
902
  interruptState.clear();
910
903
  setPending(null);
@@ -944,7 +937,6 @@ function useInterrupt(config) {
944
937
  return;
945
938
  }
946
939
  if (decision.kind !== "resume") return;
947
- const runId = decision.resume.map((entry) => interruptRunIdsRef.current.get(entry.interruptId)).find((candidate) => candidate !== void 0);
948
940
  for (const toolResult of decision.toolResults) agent.addMessage({
949
941
  id: randomUUID$1(),
950
942
  role: "tool",
@@ -954,8 +946,7 @@ function useInterrupt(config) {
954
946
  try {
955
947
  return await copilotkit.runAgent({
956
948
  agent,
957
- resume: decision.resume,
958
- ...runId !== void 0 ? { runId } : {}
949
+ resume: decision.resume
959
950
  });
960
951
  } catch (err) {
961
952
  console.error("[CopilotKit] useInterrupt resolve: runAgent rejected; clearing pending + rethrowing", err);
@@ -982,7 +973,6 @@ function useInterrupt(config) {
982
973
  return;
983
974
  }
984
975
  if (decision.kind !== "resume") return;
985
- const runId = decision.resume.map((entry) => interruptRunIdsRef.current.get(entry.interruptId)).find((candidate) => candidate !== void 0);
986
976
  for (const toolResult of decision.toolResults) agent.addMessage({
987
977
  id: randomUUID$1(),
988
978
  role: "tool",
@@ -992,8 +982,7 @@ function useInterrupt(config) {
992
982
  try {
993
983
  return await copilotkit.runAgent({
994
984
  agent,
995
- resume: decision.resume,
996
- ...runId !== void 0 ? { runId } : {}
985
+ resume: decision.resume
997
986
  });
998
987
  } catch (err) {
999
988
  console.error("[CopilotKit] useInterrupt resolve: runAgent rejected; clearing pending + rethrowing", err);