@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.
- package/dist/{copilotkit-DIudpHkM.cjs → copilotkit-Beiw32bn.cjs} +5 -16
- package/dist/copilotkit-Beiw32bn.cjs.map +1 -0
- package/dist/{copilotkit-DfsHZUuo.mjs → copilotkit-D9iy3p2l.mjs} +5 -16
- package/dist/copilotkit-D9iy3p2l.mjs.map +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.mjs +1 -1
- package/dist/index.umd.js +4 -15
- package/dist/index.umd.js.map +1 -1
- package/dist/v2/headless.cjs +3 -14
- package/dist/v2/headless.cjs.map +1 -1
- package/dist/v2/headless.mjs +3 -14
- package/dist/v2/headless.mjs.map +1 -1
- package/dist/v2/index.cjs +1 -1
- package/dist/v2/index.mjs +1 -1
- package/dist/v2/index.umd.js +4 -15
- package/dist/v2/index.umd.js.map +1 -1
- package/package.json +8 -8
- package/dist/copilotkit-DIudpHkM.cjs.map +0 -1
- package/dist/copilotkit-DfsHZUuo.mjs.map +0 -1
|
@@ -1635,7 +1635,7 @@ function useRenderToolCall() {
|
|
|
1635
1635
|
|
|
1636
1636
|
//#endregion
|
|
1637
1637
|
//#region package.json
|
|
1638
|
-
var version = "1.75.
|
|
1638
|
+
var version = "1.75.2";
|
|
1639
1639
|
|
|
1640
1640
|
//#endregion
|
|
1641
1641
|
//#region src/v2/components/CopilotKitInspector.tsx
|
|
@@ -5021,7 +5021,6 @@ function useInterrupt(config) {
|
|
|
5021
5021
|
pendingRef.current = pending;
|
|
5022
5022
|
const [handlerResult, setHandlerResult] = (0, react.useState)(null);
|
|
5023
5023
|
const interruptStateRef = (0, react.useRef)(new _copilotkit_core.ɵInterruptState());
|
|
5024
|
-
const interruptRunIdsRef = (0, react.useRef)(/* @__PURE__ */ new Map());
|
|
5025
5024
|
const legacyRunIdRef = (0, react.useRef)(void 0);
|
|
5026
5025
|
(0, react.useEffect)(() => {
|
|
5027
5026
|
const interruptState = interruptStateRef.current;
|
|
@@ -5035,16 +5034,11 @@ function useInterrupt(config) {
|
|
|
5035
5034
|
};
|
|
5036
5035
|
},
|
|
5037
5036
|
onRunFinishedEvent: (params) => {
|
|
5038
|
-
if (params.outcome === "interrupt")
|
|
5039
|
-
const runId = params.input.runId;
|
|
5040
|
-
for (const interrupt of params.interrupts) interruptRunIdsRef.current.set(interrupt.id, runId);
|
|
5041
|
-
localStandard = params.interrupts;
|
|
5042
|
-
}
|
|
5037
|
+
if (params.outcome === "interrupt") localStandard = params.interrupts;
|
|
5043
5038
|
},
|
|
5044
5039
|
onRunStartedEvent: () => {
|
|
5045
5040
|
localLegacy = null;
|
|
5046
5041
|
localStandard = null;
|
|
5047
|
-
interruptRunIdsRef.current.clear();
|
|
5048
5042
|
legacyRunIdRef.current = void 0;
|
|
5049
5043
|
interruptState.clear();
|
|
5050
5044
|
setPending(null);
|
|
@@ -5064,7 +5058,6 @@ function useInterrupt(config) {
|
|
|
5064
5058
|
onRunFailed: () => {
|
|
5065
5059
|
localLegacy = null;
|
|
5066
5060
|
localStandard = null;
|
|
5067
|
-
interruptRunIdsRef.current.clear();
|
|
5068
5061
|
legacyRunIdRef.current = void 0;
|
|
5069
5062
|
interruptState.clear();
|
|
5070
5063
|
setPending(null);
|
|
@@ -5104,7 +5097,6 @@ function useInterrupt(config) {
|
|
|
5104
5097
|
return;
|
|
5105
5098
|
}
|
|
5106
5099
|
if (decision.kind !== "resume") return;
|
|
5107
|
-
const runId = decision.resume.map((entry) => interruptRunIdsRef.current.get(entry.interruptId)).find((candidate) => candidate !== void 0);
|
|
5108
5100
|
for (const toolResult of decision.toolResults) agent.addMessage({
|
|
5109
5101
|
id: (0, _ag_ui_client.randomUUID)(),
|
|
5110
5102
|
role: "tool",
|
|
@@ -5114,8 +5106,7 @@ function useInterrupt(config) {
|
|
|
5114
5106
|
try {
|
|
5115
5107
|
return await copilotkit.runAgent({
|
|
5116
5108
|
agent,
|
|
5117
|
-
resume: decision.resume
|
|
5118
|
-
...runId !== void 0 ? { runId } : {}
|
|
5109
|
+
resume: decision.resume
|
|
5119
5110
|
});
|
|
5120
5111
|
} catch (err) {
|
|
5121
5112
|
console.error("[CopilotKit] useInterrupt resolve: runAgent rejected; clearing pending + rethrowing", err);
|
|
@@ -5142,7 +5133,6 @@ function useInterrupt(config) {
|
|
|
5142
5133
|
return;
|
|
5143
5134
|
}
|
|
5144
5135
|
if (decision.kind !== "resume") return;
|
|
5145
|
-
const runId = decision.resume.map((entry) => interruptRunIdsRef.current.get(entry.interruptId)).find((candidate) => candidate !== void 0);
|
|
5146
5136
|
for (const toolResult of decision.toolResults) agent.addMessage({
|
|
5147
5137
|
id: (0, _ag_ui_client.randomUUID)(),
|
|
5148
5138
|
role: "tool",
|
|
@@ -5152,8 +5142,7 @@ function useInterrupt(config) {
|
|
|
5152
5142
|
try {
|
|
5153
5143
|
return await copilotkit.runAgent({
|
|
5154
5144
|
agent,
|
|
5155
|
-
resume: decision.resume
|
|
5156
|
-
...runId !== void 0 ? { runId } : {}
|
|
5145
|
+
resume: decision.resume
|
|
5157
5146
|
});
|
|
5158
5147
|
} catch (err) {
|
|
5159
5148
|
console.error("[CopilotKit] useInterrupt resolve: runAgent rejected; clearing pending + rethrowing", err);
|
|
@@ -13116,4 +13105,4 @@ Object.defineProperty(exports, 'useToast', {
|
|
|
13116
13105
|
return useToast;
|
|
13117
13106
|
}
|
|
13118
13107
|
});
|
|
13119
|
-
//# sourceMappingURL=copilotkit-
|
|
13108
|
+
//# sourceMappingURL=copilotkit-Beiw32bn.cjs.map
|