@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
|
@@ -2,29 +2,29 @@ import {
|
|
|
2
2
|
CopilotKit,
|
|
3
3
|
CopilotKitInternal,
|
|
4
4
|
defaultCopilotContextCategories
|
|
5
|
-
} from "../../chunk-
|
|
6
|
-
import "../../chunk-
|
|
7
|
-
import "../../chunk-
|
|
5
|
+
} from "../../chunk-B66SA6EH.mjs";
|
|
6
|
+
import "../../chunk-SNON4QA6.mjs";
|
|
7
|
+
import "../../chunk-7HI6VLJJ.mjs";
|
|
8
|
+
import "../../chunk-PMWUKW3Z.mjs";
|
|
9
|
+
import "../../chunk-YCG6SNAU.mjs";
|
|
8
10
|
import "../../chunk-PIF5KJYI.mjs";
|
|
9
|
-
import "../../chunk-CYDWEPFL.mjs";
|
|
10
|
-
import "../../chunk-2IDV5OHF.mjs";
|
|
11
|
-
import "../../chunk-LD3MGPZB.mjs";
|
|
12
|
-
import "../../chunk-LHERIF3L.mjs";
|
|
13
|
-
import "../../chunk-ICIK2BSB.mjs";
|
|
14
11
|
import "../../chunk-RKTVJRK7.mjs";
|
|
15
12
|
import "../../chunk-PMAFHQ7P.mjs";
|
|
13
|
+
import "../../chunk-CYDWEPFL.mjs";
|
|
14
|
+
import "../../chunk-ICIK2BSB.mjs";
|
|
15
|
+
import "../../chunk-2IDV5OHF.mjs";
|
|
16
16
|
import "../../chunk-YYN33GSG.mjs";
|
|
17
|
+
import "../../chunk-6ZLPNY7X.mjs";
|
|
17
18
|
import "../../chunk-6PUNP7CD.mjs";
|
|
18
19
|
import "../../chunk-O7ARI5CV.mjs";
|
|
19
|
-
import "../../chunk-
|
|
20
|
+
import "../../chunk-QNUAXSDP.mjs";
|
|
20
21
|
import "../../chunk-NB2FKV2V.mjs";
|
|
22
|
+
import "../../chunk-FDOMAPJY.mjs";
|
|
23
|
+
import "../../chunk-AFNWX62Q.mjs";
|
|
24
|
+
import "../../chunk-DMLQZG75.mjs";
|
|
21
25
|
import "../../chunk-F555TVE4.mjs";
|
|
22
26
|
import "../../chunk-WF65O6HX.mjs";
|
|
23
27
|
import "../../chunk-EFL5OBKN.mjs";
|
|
24
|
-
import "../../chunk-6ZLPNY7X.mjs";
|
|
25
|
-
import "../../chunk-FDOMAPJY.mjs";
|
|
26
|
-
import "../../chunk-WVLHXIFP.mjs";
|
|
27
|
-
import "../../chunk-DMLQZG75.mjs";
|
|
28
28
|
import "../../chunk-SKC7AJIV.mjs";
|
|
29
29
|
export {
|
|
30
30
|
CopilotKit,
|
|
@@ -3,7 +3,7 @@ export { CopilotKitProps } from './copilotkit-props.js';
|
|
|
3
3
|
import 'react/jsx-runtime';
|
|
4
4
|
import '@copilotkit/runtime-client-gql';
|
|
5
5
|
import 'react';
|
|
6
|
-
import '../../copilot-context-
|
|
6
|
+
import '../../copilot-context-ec77e921.js';
|
|
7
7
|
import '@copilotkit/shared';
|
|
8
8
|
import '../../types/frontend-action.js';
|
|
9
9
|
import '../../hooks/use-tree.js';
|
|
@@ -165,7 +165,7 @@ var emptyCopilotContext = {
|
|
|
165
165
|
interruptEventQueue: {},
|
|
166
166
|
addInterruptEvent: () => {
|
|
167
167
|
},
|
|
168
|
-
|
|
168
|
+
resolveInterruptEvent: () => {
|
|
169
169
|
},
|
|
170
170
|
onError: () => {
|
|
171
171
|
},
|
|
@@ -2367,7 +2367,7 @@ function useCoagentStateRenderBridge(agentId, props) {
|
|
|
2367
2367
|
return canRender;
|
|
2368
2368
|
}
|
|
2369
2369
|
const renderClaimedByOtherMessage = Object.values(claimsRef.current).find(
|
|
2370
|
-
(c) => c.stateRenderId === stateRenderId && (0, import_shared10.dataToUUID)(
|
|
2370
|
+
(c) => c.stateRenderId === stateRenderId && (0, import_shared10.dataToUUID)(getStateWithoutConstantKeys(c.stateSnapshot)) === (0, import_shared10.dataToUUID)(getStateWithoutConstantKeys(renderSnapshot))
|
|
2371
2371
|
);
|
|
2372
2372
|
if (renderClaimedByOtherMessage) {
|
|
2373
2373
|
if (renderSnapshot && renderClaimedByOtherMessage.stateSnapshot && !areStatesEquals(renderClaimedByOtherMessage.stateSnapshot, renderSnapshot)) {
|
|
@@ -2506,14 +2506,7 @@ function CopilotKit(_a) {
|
|
|
2506
2506
|
const enabled = shouldShowDevConsole(props.showDevConsole);
|
|
2507
2507
|
const publicApiKey = props.publicApiKey || props.publicLicenseKey;
|
|
2508
2508
|
const renderArr = (0, import_react16.useMemo)(() => [{ render: CoAgentStateRenderBridge }], []);
|
|
2509
|
-
return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(ToastProvider, { enabled, children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(CopilotErrorBoundary, { publicApiKey, showUsageBanner: enabled, children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(ThreadsProvider, { threadId: props.threadId, children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
2510
|
-
import_react17.CopilotKitProvider,
|
|
2511
|
-
__spreadProps(__spreadValues({}, props), {
|
|
2512
|
-
renderCustomMessages: renderArr,
|
|
2513
|
-
useSingleEndpoint: true,
|
|
2514
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(CopilotKitInternal, __spreadProps(__spreadValues({}, props), { children }))
|
|
2515
|
-
})
|
|
2516
|
-
) }) }) });
|
|
2509
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(ToastProvider, { enabled, children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(CopilotErrorBoundary, { publicApiKey, showUsageBanner: enabled, children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(ThreadsProvider, { threadId: props.threadId, children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_react17.CopilotKitProvider, __spreadProps(__spreadValues({}, props), { renderCustomMessages: renderArr, useSingleEndpoint: true, children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(CopilotKitInternal, __spreadProps(__spreadValues({}, props), { children })) })) }) }) });
|
|
2517
2510
|
}
|
|
2518
2511
|
function CopilotKitInternal(cpkProps) {
|
|
2519
2512
|
var _b;
|
|
@@ -2751,20 +2744,17 @@ ${nonDocumentStrings}`;
|
|
|
2751
2744
|
const chatAbortControllerRef = (0, import_react16.useRef)(null);
|
|
2752
2745
|
const showDevConsole = shouldShowDevConsole(props.showDevConsole);
|
|
2753
2746
|
const [interruptActions, _setInterruptActions] = (0, import_react16.useState)({});
|
|
2754
|
-
const setInterruptAction = (0, import_react16.useCallback)(
|
|
2755
|
-
(
|
|
2756
|
-
|
|
2757
|
-
|
|
2758
|
-
|
|
2759
|
-
|
|
2760
|
-
|
|
2761
|
-
|
|
2762
|
-
[action.id]: __spreadValues(__spreadValues({}, (_a2 = prev[action.id]) != null ? _a2 : {}), action)
|
|
2763
|
-
});
|
|
2747
|
+
const setInterruptAction = (0, import_react16.useCallback)((action) => {
|
|
2748
|
+
_setInterruptActions((prev) => {
|
|
2749
|
+
var _a2;
|
|
2750
|
+
if (action == null || !action.id) {
|
|
2751
|
+
return prev;
|
|
2752
|
+
}
|
|
2753
|
+
return __spreadProps(__spreadValues({}, prev), {
|
|
2754
|
+
[action.id]: __spreadValues(__spreadValues({}, (_a2 = prev[action.id]) != null ? _a2 : {}), action)
|
|
2764
2755
|
});
|
|
2765
|
-
}
|
|
2766
|
-
|
|
2767
|
-
);
|
|
2756
|
+
});
|
|
2757
|
+
}, []);
|
|
2768
2758
|
const removeInterruptAction = (0, import_react16.useCallback)((actionId) => {
|
|
2769
2759
|
_setInterruptActions((prev) => {
|
|
2770
2760
|
const _a2 = prev, { [actionId]: _ } = _a2, rest = __objRest(_a2, [__restKey(actionId)]);
|
|
@@ -2780,14 +2770,19 @@ ${nonDocumentStrings}`;
|
|
|
2780
2770
|
});
|
|
2781
2771
|
});
|
|
2782
2772
|
}, []);
|
|
2783
|
-
const
|
|
2784
|
-
|
|
2785
|
-
|
|
2786
|
-
|
|
2787
|
-
|
|
2773
|
+
const resolveInterruptEvent = (0, import_react16.useCallback)(
|
|
2774
|
+
(threadId2, eventId, response) => {
|
|
2775
|
+
setInterruptEventQueue((prev) => {
|
|
2776
|
+
const threadQueue = prev[threadId2] || [];
|
|
2777
|
+
return __spreadProps(__spreadValues({}, prev), {
|
|
2778
|
+
[threadId2]: threadQueue.map(
|
|
2779
|
+
(queuedEvent) => queuedEvent.eventId === eventId ? __spreadProps(__spreadValues({}, queuedEvent), { event: __spreadProps(__spreadValues({}, queuedEvent.event), { response }) }) : queuedEvent
|
|
2780
|
+
)
|
|
2781
|
+
});
|
|
2788
2782
|
});
|
|
2789
|
-
}
|
|
2790
|
-
|
|
2783
|
+
},
|
|
2784
|
+
[]
|
|
2785
|
+
);
|
|
2791
2786
|
const memoizedChildren = (0, import_react16.useMemo)(() => children, [children]);
|
|
2792
2787
|
const [bannerError, setBannerError] = (0, import_react16.useState)(null);
|
|
2793
2788
|
const agentLock = (0, import_react16.useMemo)(() => {
|
|
@@ -2905,7 +2900,7 @@ ${nonDocumentStrings}`;
|
|
|
2905
2900
|
removeInterruptAction,
|
|
2906
2901
|
interruptEventQueue,
|
|
2907
2902
|
addInterruptEvent,
|
|
2908
|
-
|
|
2903
|
+
resolveInterruptEvent,
|
|
2909
2904
|
bannerError,
|
|
2910
2905
|
setBannerError,
|
|
2911
2906
|
onError: handleErrors,
|