@copilotkit/react-core 1.50.0-beta.2 → 1.50.0-beta.3
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/{chunk-BPJ6V4YX.mjs → chunk-4HRUQH6U.mjs} +2 -2
- package/dist/{chunk-LD3MGPZB.mjs → chunk-7HI6VLJJ.mjs} +5 -5
- package/dist/{chunk-D3QSYDJR.mjs → chunk-7IBF6RBW.mjs} +2 -2
- package/dist/{chunk-OVYFRPSN.mjs → chunk-ABWT4DRT.mjs} +2 -2
- package/dist/{chunk-WVLHXIFP.mjs → chunk-AFNWX62Q.mjs} +2 -2
- package/dist/{chunk-WVLHXIFP.mjs.map → chunk-AFNWX62Q.mjs.map} +1 -1
- package/dist/{chunk-OAEX7G5G.mjs → chunk-AMUONDZ2.mjs} +2 -2
- package/dist/{chunk-SD7TUPQM.mjs → chunk-B66SA6EH.mjs} +44 -49
- package/dist/chunk-B66SA6EH.mjs.map +1 -0
- package/dist/{chunk-7BYHZLPL.mjs → chunk-BTZ3TJVX.mjs} +6 -6
- package/dist/chunk-BTZ3TJVX.mjs.map +1 -0
- package/dist/{chunk-BR5YEYZJ.mjs → chunk-IUNU4CUG.mjs} +5 -5
- package/dist/{chunk-6F7Q6CPI.mjs → chunk-M7EVKKUZ.mjs} +7 -7
- package/dist/{chunk-LHKZJ2ND.mjs → chunk-PMWUKW3Z.mjs} +3 -3
- package/dist/{chunk-TGIWTM6S.mjs → chunk-QNUAXSDP.mjs} +2 -2
- package/dist/{chunk-TGIWTM6S.mjs.map → chunk-QNUAXSDP.mjs.map} +1 -1
- package/dist/{chunk-6SK26J65.mjs → chunk-SHHPDZUK.mjs} +2 -2
- package/dist/{chunk-LHERIF3L.mjs → chunk-SNON4QA6.mjs} +4 -4
- package/dist/{chunk-ISNVEPPQ.mjs → chunk-VV56AVPB.mjs} +17 -7
- package/dist/chunk-VV56AVPB.mjs.map +1 -0
- package/dist/{chunk-EHXVGFWN.mjs → chunk-XFXT2VNX.mjs} +3 -3
- package/dist/{chunk-WMJVBMUX.mjs → chunk-YCG6SNAU.mjs} +2 -2
- package/dist/components/copilot-provider/copilot-messages.js +1 -1
- package/dist/components/copilot-provider/copilot-messages.js.map +1 -1
- package/dist/components/copilot-provider/copilot-messages.mjs +3 -3
- package/dist/components/copilot-provider/copilotkit-props.d.ts +1 -1
- package/dist/components/copilot-provider/copilotkit.d.ts +1 -1
- package/dist/components/copilot-provider/copilotkit.js +26 -31
- package/dist/components/copilot-provider/copilotkit.js.map +1 -1
- package/dist/components/copilot-provider/copilotkit.mjs +13 -13
- package/dist/components/copilot-provider/index.d.ts +1 -1
- package/dist/components/copilot-provider/index.js +26 -31
- package/dist/components/copilot-provider/index.js.map +1 -1
- package/dist/components/copilot-provider/index.mjs +13 -13
- package/dist/components/dev-console/console-trigger.js +1 -1
- package/dist/components/dev-console/console-trigger.js.map +1 -1
- package/dist/components/dev-console/console-trigger.mjs +3 -3
- package/dist/components/dev-console/developer-console-modal.js +1 -1
- package/dist/components/dev-console/developer-console-modal.js.map +1 -1
- package/dist/components/dev-console/developer-console-modal.mjs +2 -2
- package/dist/components/error-boundary/error-boundary.mjs +2 -2
- package/dist/components/index.d.ts +1 -1
- package/dist/components/index.js +26 -31
- package/dist/components/index.js.map +1 -1
- package/dist/components/index.mjs +13 -13
- package/dist/context/copilot-context.d.ts +1 -1
- package/dist/context/copilot-context.js +1 -1
- package/dist/context/copilot-context.js.map +1 -1
- package/dist/context/copilot-context.mjs +1 -1
- package/dist/context/index.d.ts +1 -1
- package/dist/context/index.js +1 -1
- package/dist/context/index.js.map +1 -1
- package/dist/context/index.mjs +6 -6
- package/dist/{copilot-context-81022020.d.ts → copilot-context-ec77e921.d.ts} +2 -2
- package/dist/hooks/index.d.ts +1 -1
- package/dist/hooks/index.js +19 -9
- package/dist/hooks/index.js.map +1 -1
- package/dist/hooks/index.mjs +15 -15
- package/dist/hooks/use-coagent-state-render-bridge.js +1 -1
- package/dist/hooks/use-coagent-state-render-bridge.js.map +1 -1
- package/dist/hooks/use-coagent-state-render-bridge.mjs +3 -3
- package/dist/hooks/use-coagent-state-render.js +1 -1
- package/dist/hooks/use-coagent-state-render.js.map +1 -1
- package/dist/hooks/use-coagent-state-render.mjs +3 -3
- package/dist/hooks/use-copilot-additional-instructions.js +1 -1
- package/dist/hooks/use-copilot-additional-instructions.js.map +1 -1
- package/dist/hooks/use-copilot-additional-instructions.mjs +2 -2
- package/dist/hooks/use-copilot-authenticated-action.js +1 -1
- package/dist/hooks/use-copilot-authenticated-action.js.map +1 -1
- package/dist/hooks/use-copilot-authenticated-action.mjs +2 -2
- package/dist/hooks/use-copilot-chat-headless_c.js +17 -7
- package/dist/hooks/use-copilot-chat-headless_c.js.map +1 -1
- package/dist/hooks/use-copilot-chat-headless_c.mjs +9 -9
- package/dist/hooks/use-copilot-chat.js +17 -7
- package/dist/hooks/use-copilot-chat.js.map +1 -1
- package/dist/hooks/use-copilot-chat.mjs +9 -9
- package/dist/hooks/use-copilot-chat_internal.js +17 -7
- package/dist/hooks/use-copilot-chat_internal.js.map +1 -1
- package/dist/hooks/use-copilot-chat_internal.mjs +8 -8
- package/dist/hooks/use-langgraph-interrupt-render.js +16 -6
- package/dist/hooks/use-langgraph-interrupt-render.js.map +1 -1
- package/dist/hooks/use-langgraph-interrupt-render.mjs +3 -3
- package/dist/hooks/use-langgraph-interrupt.d.ts +1 -1
- package/dist/hooks/use-langgraph-interrupt.js +3 -3
- package/dist/hooks/use-langgraph-interrupt.js.map +1 -1
- package/dist/hooks/use-langgraph-interrupt.mjs +2 -2
- package/dist/hooks/use-make-copilot-document-readable.js +1 -1
- package/dist/hooks/use-make-copilot-document-readable.js.map +1 -1
- package/dist/hooks/use-make-copilot-document-readable.mjs +2 -2
- package/dist/index.d.ts +1 -1
- package/dist/index.js +43 -38
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +44 -44
- package/dist/lib/copilot-task.d.ts +1 -1
- package/dist/lib/copilot-task.js.map +1 -1
- package/dist/lib/copilot-task.mjs +14 -14
- package/dist/lib/index.d.ts +1 -1
- package/dist/lib/index.js.map +1 -1
- package/dist/lib/index.mjs +14 -14
- package/dist/types/index.d.ts +1 -1
- package/dist/types/index.mjs +1 -1
- package/dist/types/interrupt-action.d.ts +1 -1
- package/dist/types/interrupt-action.js.map +1 -1
- package/dist/utils/index.mjs +3 -3
- package/dist/v2/index.css +4 -0
- package/dist/v2/index.css.map +1 -0
- package/dist/v2/index.js.map +1 -1
- package/dist/v2/index.mjs +2 -0
- package/dist/v2/index.mjs.map +1 -1
- package/package.json +10 -8
- package/src/components/copilot-provider/copilotkit.tsx +30 -30
- package/src/context/copilot-context.tsx +2 -2
- package/src/hooks/use-coagent-state-render-bridge.tsx +2 -2
- package/src/hooks/use-langgraph-interrupt-render.ts +15 -5
- package/src/hooks/use-langgraph-interrupt.ts +2 -3
- package/src/types/interrupt-action.ts +1 -4
- package/src/v2/index.ts +2 -0
- package/tsup.config.ts +1 -1
- package/dist/chunk-7BYHZLPL.mjs.map +0 -1
- package/dist/chunk-ISNVEPPQ.mjs.map +0 -1
- package/dist/chunk-SD7TUPQM.mjs.map +0 -1
- /package/dist/{chunk-BPJ6V4YX.mjs.map → chunk-4HRUQH6U.mjs.map} +0 -0
- /package/dist/{chunk-LD3MGPZB.mjs.map → chunk-7HI6VLJJ.mjs.map} +0 -0
- /package/dist/{chunk-D3QSYDJR.mjs.map → chunk-7IBF6RBW.mjs.map} +0 -0
- /package/dist/{chunk-OVYFRPSN.mjs.map → chunk-ABWT4DRT.mjs.map} +0 -0
- /package/dist/{chunk-OAEX7G5G.mjs.map → chunk-AMUONDZ2.mjs.map} +0 -0
- /package/dist/{chunk-BR5YEYZJ.mjs.map → chunk-IUNU4CUG.mjs.map} +0 -0
- /package/dist/{chunk-6F7Q6CPI.mjs.map → chunk-M7EVKKUZ.mjs.map} +0 -0
- /package/dist/{chunk-LHKZJ2ND.mjs.map → chunk-PMWUKW3Z.mjs.map} +0 -0
- /package/dist/{chunk-6SK26J65.mjs.map → chunk-SHHPDZUK.mjs.map} +0 -0
- /package/dist/{chunk-LHERIF3L.mjs.map → chunk-SNON4QA6.mjs.map} +0 -0
- /package/dist/{chunk-EHXVGFWN.mjs.map → chunk-XFXT2VNX.mjs.map} +0 -0
- /package/dist/{chunk-WMJVBMUX.mjs.map → chunk-YCG6SNAU.mjs.map} +0 -0
- /package/src/v2/{styles.css → index.css} +0 -0
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
import {
|
|
2
2
|
useCopilotChatHeadless_c
|
|
3
|
-
} from "../chunk-
|
|
3
|
+
} from "../chunk-XFXT2VNX.mjs";
|
|
4
4
|
import {
|
|
5
5
|
defaultSystemMessage
|
|
6
|
-
} from "../chunk-
|
|
7
|
-
import "../chunk-
|
|
6
|
+
} from "../chunk-M7EVKKUZ.mjs";
|
|
7
|
+
import "../chunk-VV56AVPB.mjs";
|
|
8
8
|
import "../chunk-ZVF5Q6IH.mjs";
|
|
9
|
-
import "../chunk-I76HKHPJ.mjs";
|
|
10
|
-
import "../chunk-FBVI3LQ6.mjs";
|
|
11
9
|
import "../chunk-6PUNP7CD.mjs";
|
|
12
10
|
import "../chunk-O7ARI5CV.mjs";
|
|
13
|
-
import "../chunk-
|
|
11
|
+
import "../chunk-QNUAXSDP.mjs";
|
|
12
|
+
import "../chunk-I76HKHPJ.mjs";
|
|
13
|
+
import "../chunk-FBVI3LQ6.mjs";
|
|
14
14
|
import "../chunk-NB2FKV2V.mjs";
|
|
15
|
-
import "../chunk-F555TVE4.mjs";
|
|
16
|
-
import "../chunk-EFL5OBKN.mjs";
|
|
17
15
|
import "../chunk-FDOMAPJY.mjs";
|
|
18
|
-
import "../chunk-
|
|
16
|
+
import "../chunk-AFNWX62Q.mjs";
|
|
19
17
|
import "../chunk-DMLQZG75.mjs";
|
|
18
|
+
import "../chunk-F555TVE4.mjs";
|
|
19
|
+
import "../chunk-EFL5OBKN.mjs";
|
|
20
20
|
import "../chunk-SKC7AJIV.mjs";
|
|
21
21
|
export {
|
|
22
22
|
defaultSystemMessage,
|
|
@@ -162,7 +162,7 @@ var emptyCopilotContext = {
|
|
|
162
162
|
interruptEventQueue: {},
|
|
163
163
|
addInterruptEvent: () => {
|
|
164
164
|
},
|
|
165
|
-
|
|
165
|
+
resolveInterruptEvent: () => {
|
|
166
166
|
},
|
|
167
167
|
onError: () => {
|
|
168
168
|
},
|
|
@@ -378,7 +378,7 @@ function useLangGraphInterruptRender(agent) {
|
|
|
378
378
|
threadId,
|
|
379
379
|
interruptEventQueue,
|
|
380
380
|
addInterruptEvent,
|
|
381
|
-
|
|
381
|
+
resolveInterruptEvent
|
|
382
382
|
} = useCopilotContext();
|
|
383
383
|
const existingConfig = (0, import_react8.useCopilotChatConfiguration)();
|
|
384
384
|
const resolvedAgentId = (_a = existingConfig == null ? void 0 : existingConfig.agentId) != null ? _a : "default";
|
|
@@ -386,6 +386,7 @@ function useLangGraphInterruptRender(agent) {
|
|
|
386
386
|
(0, import_react7.useEffect)(() => {
|
|
387
387
|
if (!agent)
|
|
388
388
|
return;
|
|
389
|
+
let localInterrupt = null;
|
|
389
390
|
const subscriber = {
|
|
390
391
|
onCustomEvent: ({ event }) => {
|
|
391
392
|
if (event.name === "on_interrupt") {
|
|
@@ -394,12 +395,21 @@ function useLangGraphInterruptRender(agent) {
|
|
|
394
395
|
type: event.type,
|
|
395
396
|
value: (0, import_shared2.parseJson)(event.value, event.value)
|
|
396
397
|
};
|
|
397
|
-
const eventId = (0, import_shared2.dataToUUID)(
|
|
398
|
-
|
|
398
|
+
const eventId = (0, import_shared2.dataToUUID)(eventData, "interruptEvents");
|
|
399
|
+
localInterrupt = {
|
|
399
400
|
eventId,
|
|
400
401
|
threadId,
|
|
401
402
|
event: eventData
|
|
402
|
-
}
|
|
403
|
+
};
|
|
404
|
+
}
|
|
405
|
+
},
|
|
406
|
+
onRunStartedEvent: () => {
|
|
407
|
+
localInterrupt = null;
|
|
408
|
+
},
|
|
409
|
+
onRunFinalized: () => {
|
|
410
|
+
if (localInterrupt) {
|
|
411
|
+
addInterruptEvent(localInterrupt);
|
|
412
|
+
localInterrupt = null;
|
|
403
413
|
}
|
|
404
414
|
}
|
|
405
415
|
};
|
|
@@ -417,7 +427,7 @@ function useLangGraphInterruptRender(agent) {
|
|
|
417
427
|
}
|
|
418
428
|
}
|
|
419
429
|
});
|
|
420
|
-
|
|
430
|
+
resolveInterruptEvent(threadId, eventId, response != null ? response : "");
|
|
421
431
|
},
|
|
422
432
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
423
433
|
[agent, threadId]
|
|
@@ -1009,7 +1019,7 @@ function useCoagentStateRenderBridge(agentId, props) {
|
|
|
1009
1019
|
return canRender;
|
|
1010
1020
|
}
|
|
1011
1021
|
const renderClaimedByOtherMessage = Object.values(claimsRef.current).find(
|
|
1012
|
-
(c) => c.stateRenderId === stateRenderId && (0, import_shared3.dataToUUID)(
|
|
1022
|
+
(c) => c.stateRenderId === stateRenderId && (0, import_shared3.dataToUUID)(getStateWithoutConstantKeys(c.stateSnapshot)) === (0, import_shared3.dataToUUID)(getStateWithoutConstantKeys(renderSnapshot))
|
|
1013
1023
|
);
|
|
1014
1024
|
if (renderClaimedByOtherMessage) {
|
|
1015
1025
|
if (renderSnapshot && renderClaimedByOtherMessage.stateSnapshot && !areStatesEquals(renderClaimedByOtherMessage.stateSnapshot, renderSnapshot)) {
|