@copilotkit/react-core 1.51.4-next.7 → 1.51.4-next.8
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/CHANGELOG.md +10 -0
- package/README.md +18 -12
- package/dist/{chunk-DQXCQWSG.mjs → chunk-2JZZD4RP.mjs} +93 -58
- package/dist/chunk-2JZZD4RP.mjs.map +1 -0
- package/dist/{chunk-6ESSSQ7Q.mjs → chunk-2RSAYTXH.mjs} +6 -3
- package/dist/chunk-2RSAYTXH.mjs.map +1 -0
- package/dist/chunk-3LZZ4RVM.mjs +37 -0
- package/dist/{chunk-ABWT4DRT.mjs.map → chunk-3LZZ4RVM.mjs.map} +1 -1
- package/dist/{chunk-QDES5PDW.mjs → chunk-4ZQYMC5F.mjs} +2 -2
- package/dist/{chunk-QDES5PDW.mjs.map → chunk-4ZQYMC5F.mjs.map} +1 -1
- package/dist/{chunk-6PUNP7CD.mjs → chunk-6AWG5FWL.mjs} +2 -2
- package/dist/chunk-6AWG5FWL.mjs.map +1 -0
- package/dist/{chunk-C3YJYDK4.mjs → chunk-7GIBHX6X.mjs} +8 -2
- package/dist/chunk-7GIBHX6X.mjs.map +1 -0
- package/dist/{chunk-PIF5KJYI.mjs → chunk-7PJKPWMD.mjs} +15 -6
- package/dist/chunk-7PJKPWMD.mjs.map +1 -0
- package/dist/{chunk-7JTI6ZL4.mjs → chunk-7U3DNFBF.mjs} +6 -3
- package/dist/chunk-7U3DNFBF.mjs.map +1 -0
- package/dist/{chunk-KNJHRVKW.mjs → chunk-AAGMWZCN.mjs} +45 -14
- package/dist/chunk-AAGMWZCN.mjs.map +1 -0
- package/dist/{chunk-AFNWX62Q.mjs → chunk-C7HSVDHD.mjs} +10 -4
- package/dist/chunk-C7HSVDHD.mjs.map +1 -0
- package/dist/{chunk-ZYTXB6HH.mjs → chunk-CZT7JUIM.mjs} +4 -2
- package/dist/chunk-CZT7JUIM.mjs.map +1 -0
- package/dist/{chunk-VP43SLSZ.mjs → chunk-DAQORGBP.mjs} +10 -5
- package/dist/chunk-DAQORGBP.mjs.map +1 -0
- package/dist/{chunk-BKMJ4LC7.mjs → chunk-G7SUZGGB.mjs} +19 -12
- package/dist/chunk-G7SUZGGB.mjs.map +1 -0
- package/dist/{chunk-7IBF6RBW.mjs → chunk-GY3FQICF.mjs} +2 -2
- package/dist/{chunk-4RRMC7L2.mjs → chunk-IGYMBU43.mjs} +18 -7
- package/dist/chunk-IGYMBU43.mjs.map +1 -0
- package/dist/{chunk-QD7EID4N.mjs → chunk-IHMMKEFG.mjs} +16 -11
- package/dist/chunk-IHMMKEFG.mjs.map +1 -0
- package/dist/{chunk-YYN33GSG.mjs → chunk-K5OXUXCG.mjs} +14 -11
- package/dist/chunk-K5OXUXCG.mjs.map +1 -0
- package/dist/{chunk-6ZLPNY7X.mjs → chunk-L7GPCF2V.mjs} +6 -2
- package/dist/{chunk-6ZLPNY7X.mjs.map → chunk-L7GPCF2V.mjs.map} +1 -1
- package/dist/{chunk-7DTB7S5V.mjs → chunk-LNGBARXE.mjs} +5 -2
- package/dist/chunk-LNGBARXE.mjs.map +1 -0
- package/dist/{chunk-NBK4KBLX.mjs → chunk-MBJ7OLYI.mjs} +9 -5
- package/dist/chunk-MBJ7OLYI.mjs.map +1 -0
- package/dist/{chunk-LHERIF3L.mjs → chunk-NINJMAND.mjs} +10 -7
- package/dist/chunk-NINJMAND.mjs.map +1 -0
- package/dist/{chunk-MA3CUMCY.mjs → chunk-P6ZPE4XJ.mjs} +3 -3
- package/dist/{chunk-MA3CUMCY.mjs.map → chunk-P6ZPE4XJ.mjs.map} +1 -1
- package/dist/{chunk-77IVITG3.mjs → chunk-QXZTCGF4.mjs} +9 -4
- package/dist/chunk-QXZTCGF4.mjs.map +1 -0
- package/dist/{chunk-RKTVJRK7.mjs → chunk-R7BV32X4.mjs} +5 -2
- package/dist/chunk-R7BV32X4.mjs.map +1 -0
- package/dist/{chunk-VKNLTZJE.mjs → chunk-S65UEHGI.mjs} +30 -21
- package/dist/chunk-S65UEHGI.mjs.map +1 -0
- package/dist/{chunk-YCG6SNAU.mjs → chunk-SBRCWA4S.mjs} +186 -32
- package/dist/chunk-SBRCWA4S.mjs.map +1 -0
- package/dist/{chunk-HE22TZMF.mjs → chunk-SFOKX4MH.mjs} +18 -9
- package/dist/chunk-SFOKX4MH.mjs.map +1 -0
- package/dist/{chunk-LMHB2D4J.mjs → chunk-SK2XMJUD.mjs} +13 -4
- package/dist/chunk-SK2XMJUD.mjs.map +1 -0
- package/dist/{chunk-XDFVCQD3.mjs → chunk-SYGQHN3H.mjs} +1 -1
- package/dist/{chunk-XDFVCQD3.mjs.map → chunk-SYGQHN3H.mjs.map} +1 -1
- package/dist/{chunk-SRJT5VVY.mjs → chunk-TFZXOEY4.mjs} +6 -4
- package/dist/{chunk-SRJT5VVY.mjs.map → chunk-TFZXOEY4.mjs.map} +1 -1
- package/dist/{chunk-4CEQJ2X6.mjs → chunk-TPN7WC53.mjs} +4 -2
- package/dist/{chunk-4CEQJ2X6.mjs.map → chunk-TPN7WC53.mjs.map} +1 -1
- package/dist/{chunk-VGL3DGUW.mjs → chunk-UA23VX5J.mjs} +4 -2
- package/dist/chunk-UA23VX5J.mjs.map +1 -0
- package/dist/{chunk-VV56AVPB.mjs → chunk-V42VL2JR.mjs} +15 -4
- package/dist/chunk-V42VL2JR.mjs.map +1 -0
- package/dist/{chunk-RBGVEVWY.mjs → chunk-VZ4NSOFQ.mjs} +4 -4
- package/dist/chunk-VZ4NSOFQ.mjs.map +1 -0
- package/dist/{chunk-WF65O6HX.mjs → chunk-WRALJIW5.mjs} +18 -5
- package/dist/chunk-WRALJIW5.mjs.map +1 -0
- package/dist/{chunk-PMAFHQ7P.mjs → chunk-WV2EA7SX.mjs} +1 -1
- package/dist/chunk-WV2EA7SX.mjs.map +1 -0
- package/dist/{chunk-EFL5OBKN.mjs → chunk-ZP2IMXFY.mjs} +10 -4
- package/dist/chunk-ZP2IMXFY.mjs.map +1 -0
- package/dist/components/CopilotListeners.js +11 -2
- package/dist/components/CopilotListeners.js.map +1 -1
- package/dist/components/CopilotListeners.mjs +2 -2
- package/dist/components/copilot-provider/copilot-messages.d.ts +1 -1
- package/dist/components/copilot-provider/copilot-messages.js +22 -7
- 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.js.map +1 -1
- package/dist/components/copilot-provider/copilotkit.js +179 -84
- package/dist/components/copilot-provider/copilotkit.js.map +1 -1
- package/dist/components/copilot-provider/copilotkit.mjs +16 -16
- package/dist/components/copilot-provider/index.js +179 -84
- package/dist/components/copilot-provider/index.js.map +1 -1
- package/dist/components/copilot-provider/index.mjs +16 -16
- package/dist/components/dev-console/console-trigger.d.ts +1 -1
- package/dist/components/dev-console/console-trigger.js +227 -42
- package/dist/components/dev-console/console-trigger.js.map +1 -1
- package/dist/components/dev-console/console-trigger.mjs +24 -8
- package/dist/components/dev-console/console-trigger.mjs.map +1 -1
- package/dist/components/dev-console/developer-console-modal.d.ts +1 -1
- package/dist/components/dev-console/developer-console-modal.js +206 -37
- package/dist/components/dev-console/developer-console-modal.js.map +1 -1
- package/dist/components/dev-console/developer-console-modal.mjs +3 -3
- package/dist/components/dev-console/icons.js +14 -5
- package/dist/components/dev-console/icons.js.map +1 -1
- package/dist/components/dev-console/icons.mjs +1 -1
- package/dist/components/error-boundary/error-boundary.d.ts +1 -1
- package/dist/components/error-boundary/error-boundary.js +9 -2
- package/dist/components/error-boundary/error-boundary.js.map +1 -1
- package/dist/components/error-boundary/error-boundary.mjs +5 -5
- package/dist/components/error-boundary/error-utils.js.map +1 -1
- package/dist/components/error-boundary/error-utils.mjs +2 -2
- package/dist/components/index.js +179 -84
- package/dist/components/index.js.map +1 -1
- package/dist/components/index.mjs +16 -16
- package/dist/components/toast/toast-provider.js +9 -3
- package/dist/components/toast/toast-provider.js.map +1 -1
- package/dist/components/toast/toast-provider.mjs +1 -1
- package/dist/components/usage-banner.js +5 -1
- package/dist/components/usage-banner.js.map +1 -1
- package/dist/components/usage-banner.mjs +1 -1
- package/dist/context/coagent-state-renders-context.d.ts +1 -1
- package/dist/context/coagent-state-renders-context.js +15 -10
- package/dist/context/coagent-state-renders-context.js.map +1 -1
- package/dist/context/coagent-state-renders-context.mjs +1 -1
- package/dist/context/copilot-context.js +9 -3
- package/dist/context/copilot-context.js.map +1 -1
- package/dist/context/copilot-context.mjs +1 -1
- package/dist/context/index.js +31 -15
- package/dist/context/index.js.map +1 -1
- package/dist/context/index.mjs +7 -7
- package/dist/context/threads-context.d.ts +1 -1
- package/dist/context/threads-context.js +7 -2
- package/dist/context/threads-context.js.map +1 -1
- package/dist/context/threads-context.mjs +1 -1
- package/dist/hooks/index.js +162 -61
- package/dist/hooks/index.js.map +1 -1
- package/dist/hooks/index.mjs +26 -26
- package/dist/hooks/use-coagent-state-render-bridge.helpers.js +7 -1
- package/dist/hooks/use-coagent-state-render-bridge.helpers.js.map +1 -1
- package/dist/hooks/use-coagent-state-render-bridge.helpers.mjs +1 -1
- package/dist/hooks/use-coagent-state-render-bridge.js +31 -15
- package/dist/hooks/use-coagent-state-render-bridge.js.map +1 -1
- package/dist/hooks/use-coagent-state-render-bridge.mjs +6 -6
- package/dist/hooks/use-coagent-state-render-registry.js +14 -3
- package/dist/hooks/use-coagent-state-render-registry.js.map +1 -1
- package/dist/hooks/use-coagent-state-render-registry.mjs +2 -2
- package/dist/hooks/use-coagent-state-render.js +34 -21
- package/dist/hooks/use-coagent-state-render.js.map +1 -1
- package/dist/hooks/use-coagent-state-render.mjs +4 -4
- package/dist/hooks/use-coagent.js +3 -1
- package/dist/hooks/use-coagent.js.map +1 -1
- package/dist/hooks/use-coagent.mjs +1 -1
- package/dist/hooks/use-configure-chat-suggestions.js.map +1 -1
- package/dist/hooks/use-configure-chat-suggestions.mjs.map +1 -1
- package/dist/hooks/use-copilot-action.js +13 -9
- package/dist/hooks/use-copilot-action.js.map +1 -1
- package/dist/hooks/use-copilot-action.mjs +4 -4
- package/dist/hooks/use-copilot-additional-instructions.d.ts +1 -1
- package/dist/hooks/use-copilot-additional-instructions.js +26 -7
- 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 +25 -13
- package/dist/hooks/use-copilot-authenticated-action.js.map +1 -1
- package/dist/hooks/use-copilot-authenticated-action.mjs +6 -6
- package/dist/hooks/use-copilot-chat-headless_c.js +81 -27
- package/dist/hooks/use-copilot-chat-headless_c.js.map +1 -1
- package/dist/hooks/use-copilot-chat-headless_c.mjs +12 -12
- package/dist/hooks/use-copilot-chat-suggestions.js.map +1 -1
- package/dist/hooks/use-copilot-chat-suggestions.mjs +1 -1
- package/dist/hooks/use-copilot-chat.js +81 -27
- package/dist/hooks/use-copilot-chat.js.map +1 -1
- package/dist/hooks/use-copilot-chat.mjs +12 -12
- package/dist/hooks/use-copilot-chat_internal.js +81 -27
- package/dist/hooks/use-copilot-chat_internal.js.map +1 -1
- package/dist/hooks/use-copilot-chat_internal.mjs +11 -11
- package/dist/hooks/use-copilot-runtime-client.js +4 -1
- package/dist/hooks/use-copilot-runtime-client.js.map +1 -1
- package/dist/hooks/use-copilot-runtime-client.mjs +2 -2
- package/dist/hooks/use-default-tool.js +17 -10
- package/dist/hooks/use-default-tool.js.map +1 -1
- package/dist/hooks/use-default-tool.mjs +5 -5
- package/dist/hooks/use-flat-category-store.js +13 -10
- package/dist/hooks/use-flat-category-store.js.map +1 -1
- package/dist/hooks/use-flat-category-store.mjs +1 -1
- package/dist/hooks/use-frontend-tool.js.map +1 -1
- package/dist/hooks/use-frontend-tool.mjs +1 -1
- package/dist/hooks/use-human-in-the-loop.js.map +1 -1
- package/dist/hooks/use-human-in-the-loop.mjs +1 -1
- package/dist/hooks/use-langgraph-interrupt-render.js +22 -5
- package/dist/hooks/use-langgraph-interrupt-render.js.map +1 -1
- package/dist/hooks/use-langgraph-interrupt-render.mjs +4 -4
- package/dist/hooks/use-langgraph-interrupt.js +19 -4
- package/dist/hooks/use-langgraph-interrupt.js.map +1 -1
- package/dist/hooks/use-langgraph-interrupt.mjs +3 -3
- package/dist/hooks/use-make-copilot-document-readable.js +9 -3
- 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/hooks/use-render-tool-call.d.ts +1 -1
- package/dist/hooks/use-render-tool-call.js +13 -9
- package/dist/hooks/use-render-tool-call.js.map +1 -1
- package/dist/hooks/use-render-tool-call.mjs +1 -1
- package/dist/hooks/use-tree.js +4 -1
- package/dist/hooks/use-tree.js.map +1 -1
- package/dist/hooks/use-tree.mjs +1 -1
- package/dist/index.js +311 -130
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +52 -52
- package/dist/index.umd.js +1 -1
- package/dist/index.umd.js.map +1 -1
- package/dist/lib/copilot-task.js +10 -3
- package/dist/lib/copilot-task.js.map +1 -1
- package/dist/lib/copilot-task.mjs +18 -18
- package/dist/lib/index.js +10 -3
- package/dist/lib/index.js.map +1 -1
- package/dist/lib/index.mjs +18 -18
- package/dist/lib/status-checker.js.map +1 -1
- package/dist/lib/status-checker.mjs +1 -1
- package/dist/types/coagent-action.js.map +1 -1
- package/dist/types/frontend-action.js +3 -1
- package/dist/types/frontend-action.js.map +1 -1
- package/dist/types/frontend-action.mjs +1 -1
- package/dist/types/interrupt-action.js.map +1 -1
- package/dist/v2/index.umd.js.map +1 -1
- package/jest.config.js +1 -0
- package/package.json +5 -6
- package/src/__mocks__/analytics-node.js +9 -0
- package/src/components/CopilotListeners.tsx +21 -5
- package/src/components/copilot-provider/__tests__/copilotkit-error.test.tsx +3 -1
- package/src/components/copilot-provider/copilot-messages.tsx +36 -11
- package/src/components/copilot-provider/copilotkit-props.tsx +4 -1
- package/src/components/copilot-provider/copilotkit.tsx +116 -50
- package/src/components/dev-console/console-trigger.tsx +39 -10
- package/src/components/dev-console/developer-console-modal.tsx +207 -57
- package/src/components/dev-console/icons.tsx +6 -1
- package/src/components/error-boundary/error-boundary.tsx +10 -2
- package/src/components/error-boundary/error-utils.tsx +8 -3
- package/src/components/toast/toast-provider.tsx +16 -6
- package/src/components/usage-banner.tsx +9 -2
- package/src/context/coagent-state-renders-context.tsx +24 -12
- package/src/context/copilot-context.tsx +48 -15
- package/src/context/index.ts +8 -2
- package/src/context/threads-context.tsx +14 -3
- package/src/hooks/__tests__/use-coagent-state-render-bridge.helpers.test.ts +11 -4
- package/src/hooks/__tests__/use-coagent-state-render.e2e.test.tsx +175 -47
- package/src/hooks/__tests__/use-coagent-state-render.test.tsx +31 -10
- package/src/hooks/__tests__/use-frontend-tool-remount.e2e.test.tsx +10 -2
- package/src/hooks/use-coagent-state-render-bridge.helpers.ts +49 -16
- package/src/hooks/use-coagent-state-render-bridge.tsx +30 -13
- package/src/hooks/use-coagent-state-render-registry.ts +36 -21
- package/src/hooks/use-coagent-state-render.ts +30 -19
- package/src/hooks/use-coagent.ts +15 -4
- package/src/hooks/use-configure-chat-suggestions.tsx +14 -4
- package/src/hooks/use-copilot-action.ts +12 -3
- package/src/hooks/use-copilot-additional-instructions.ts +17 -4
- package/src/hooks/use-copilot-authenticated-action.ts +4 -1
- package/src/hooks/use-copilot-chat-headless_c.ts +8 -2
- package/src/hooks/use-copilot-chat-suggestions.tsx +14 -4
- package/src/hooks/use-copilot-chat.ts +3 -1
- package/src/hooks/use-copilot-chat_internal.ts +72 -19
- package/src/hooks/use-copilot-runtime-client.ts +20 -6
- package/src/hooks/use-default-tool.ts +8 -2
- package/src/hooks/use-flat-category-store.ts +15 -11
- package/src/hooks/use-frontend-tool.ts +35 -25
- package/src/hooks/use-human-in-the-loop.ts +21 -5
- package/src/hooks/use-langgraph-interrupt-render.ts +13 -2
- package/src/hooks/use-langgraph-interrupt.ts +13 -3
- package/src/hooks/use-render-tool-call.ts +20 -11
- package/src/hooks/use-tree.ts +20 -5
- package/src/lib/copilot-task.ts +20 -6
- package/src/lib/status-checker.ts +4 -1
- package/src/types/coagent-action.ts +6 -2
- package/src/types/frontend-action.ts +16 -5
- package/src/types/interrupt-action.ts +15 -5
- package/tsconfig.json +1 -1
- package/dist/chunk-4RRMC7L2.mjs.map +0 -1
- package/dist/chunk-6ESSSQ7Q.mjs.map +0 -1
- package/dist/chunk-6PUNP7CD.mjs.map +0 -1
- package/dist/chunk-77IVITG3.mjs.map +0 -1
- package/dist/chunk-7DTB7S5V.mjs.map +0 -1
- package/dist/chunk-7JTI6ZL4.mjs.map +0 -1
- package/dist/chunk-ABWT4DRT.mjs +0 -24
- package/dist/chunk-AFNWX62Q.mjs.map +0 -1
- package/dist/chunk-BKMJ4LC7.mjs.map +0 -1
- package/dist/chunk-C3YJYDK4.mjs.map +0 -1
- package/dist/chunk-DQXCQWSG.mjs.map +0 -1
- package/dist/chunk-EFL5OBKN.mjs.map +0 -1
- package/dist/chunk-HE22TZMF.mjs.map +0 -1
- package/dist/chunk-KNJHRVKW.mjs.map +0 -1
- package/dist/chunk-LHERIF3L.mjs.map +0 -1
- package/dist/chunk-LMHB2D4J.mjs.map +0 -1
- package/dist/chunk-NBK4KBLX.mjs.map +0 -1
- package/dist/chunk-PIF5KJYI.mjs.map +0 -1
- package/dist/chunk-PMAFHQ7P.mjs.map +0 -1
- package/dist/chunk-QD7EID4N.mjs.map +0 -1
- package/dist/chunk-RBGVEVWY.mjs.map +0 -1
- package/dist/chunk-RKTVJRK7.mjs.map +0 -1
- package/dist/chunk-VGL3DGUW.mjs.map +0 -1
- package/dist/chunk-VKNLTZJE.mjs.map +0 -1
- package/dist/chunk-VP43SLSZ.mjs.map +0 -1
- package/dist/chunk-VV56AVPB.mjs.map +0 -1
- package/dist/chunk-WF65O6HX.mjs.map +0 -1
- package/dist/chunk-YCG6SNAU.mjs.map +0 -1
- package/dist/chunk-YYN33GSG.mjs.map +0 -1
- package/dist/chunk-ZYTXB6HH.mjs.map +0 -1
- /package/dist/{chunk-7IBF6RBW.mjs.map → chunk-GY3FQICF.mjs.map} +0 -0
package/dist/index.js
CHANGED
|
@@ -153,7 +153,9 @@ var emptyCopilotContext = {
|
|
|
153
153
|
},
|
|
154
154
|
copilotApiConfig: new class {
|
|
155
155
|
get chatApiEndpoint() {
|
|
156
|
-
throw new Error(
|
|
156
|
+
throw new Error(
|
|
157
|
+
"Remember to wrap your app in a `<CopilotKit> {...} </CopilotKit>` !!!"
|
|
158
|
+
);
|
|
157
159
|
}
|
|
158
160
|
get headers() {
|
|
159
161
|
return {};
|
|
@@ -215,12 +217,16 @@ var CopilotContext = import_react.default.createContext(emptyCopilotContext);
|
|
|
215
217
|
function useCopilotContext() {
|
|
216
218
|
const context = import_react.default.useContext(CopilotContext);
|
|
217
219
|
if (context === emptyCopilotContext) {
|
|
218
|
-
throw new Error(
|
|
220
|
+
throw new Error(
|
|
221
|
+
"Remember to wrap your app in a `<CopilotKit> {...} </CopilotKit>` !!!"
|
|
222
|
+
);
|
|
219
223
|
}
|
|
220
224
|
return context;
|
|
221
225
|
}
|
|
222
226
|
function returnAndThrowInDebug(_value) {
|
|
223
|
-
throw new Error(
|
|
227
|
+
throw new Error(
|
|
228
|
+
"Remember to wrap your app in a `<CopilotKit> {...} </CopilotKit>` !!!"
|
|
229
|
+
);
|
|
224
230
|
}
|
|
225
231
|
|
|
226
232
|
// src/hooks/use-tree.ts
|
|
@@ -338,7 +344,10 @@ var useTree = () => {
|
|
|
338
344
|
if (index !== 0) {
|
|
339
345
|
output += "\n";
|
|
340
346
|
}
|
|
341
|
-
output += printNode(
|
|
347
|
+
output += printNode(
|
|
348
|
+
node,
|
|
349
|
+
`${treeIndentationRepresentation(index, 0)}. `
|
|
350
|
+
);
|
|
342
351
|
});
|
|
343
352
|
return output;
|
|
344
353
|
},
|
|
@@ -369,16 +378,19 @@ var useFlatCategoryStore = () => {
|
|
|
369
378
|
flatCategoryStoreReducer,
|
|
370
379
|
/* @__PURE__ */ new Map()
|
|
371
380
|
);
|
|
372
|
-
const addElement = (0, import_react3.useCallback)(
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
381
|
+
const addElement = (0, import_react3.useCallback)(
|
|
382
|
+
(value, categories) => {
|
|
383
|
+
const newId = (0, import_shared2.randomId)();
|
|
384
|
+
dispatch({
|
|
385
|
+
type: "ADD_ELEMENT",
|
|
386
|
+
value,
|
|
387
|
+
id: newId,
|
|
388
|
+
categories
|
|
389
|
+
});
|
|
390
|
+
return newId;
|
|
391
|
+
},
|
|
392
|
+
[]
|
|
393
|
+
);
|
|
382
394
|
const removeElement = (0, import_react3.useCallback)((id) => {
|
|
383
395
|
dispatch({ type: "REMOVE_ELEMENT", id });
|
|
384
396
|
}, []);
|
|
@@ -514,7 +526,9 @@ function ToastProvider({
|
|
|
514
526
|
children
|
|
515
527
|
}) {
|
|
516
528
|
const [toasts, setToasts] = (0, import_react5.useState)([]);
|
|
517
|
-
const [bannerError, setBannerErrorState] = (0, import_react5.useState)(
|
|
529
|
+
const [bannerError, setBannerErrorState] = (0, import_react5.useState)(
|
|
530
|
+
null
|
|
531
|
+
);
|
|
518
532
|
const removeToast = (0, import_react5.useCallback)((id) => {
|
|
519
533
|
setToasts((prev) => prev.filter((toast) => toast.id !== id));
|
|
520
534
|
}, []);
|
|
@@ -548,7 +562,9 @@ function ToastProvider({
|
|
|
548
562
|
[enabled]
|
|
549
563
|
);
|
|
550
564
|
const addGraphQLErrorsToast = (0, import_react5.useCallback)((errors) => {
|
|
551
|
-
console.warn(
|
|
565
|
+
console.warn(
|
|
566
|
+
"addGraphQLErrorsToast is deprecated. All errors now show as banners."
|
|
567
|
+
);
|
|
552
568
|
}, []);
|
|
553
569
|
const value = {
|
|
554
570
|
toasts,
|
|
@@ -648,7 +664,9 @@ function ToastProvider({
|
|
|
648
664
|
},
|
|
649
665
|
children: (() => {
|
|
650
666
|
let message = bannerError.message;
|
|
651
|
-
const jsonMatch = message.match(
|
|
667
|
+
const jsonMatch = message.match(
|
|
668
|
+
/'message':\s*'([^']+)'/
|
|
669
|
+
);
|
|
652
670
|
if (jsonMatch) {
|
|
653
671
|
return jsonMatch[1];
|
|
654
672
|
}
|
|
@@ -776,7 +794,9 @@ function useMessagesTap() {
|
|
|
776
794
|
throw new Error("useMessagesTap must be used inside <MessagesTapProvider>");
|
|
777
795
|
return tap;
|
|
778
796
|
}
|
|
779
|
-
function MessagesTapProvider({
|
|
797
|
+
function MessagesTapProvider({
|
|
798
|
+
children
|
|
799
|
+
}) {
|
|
780
800
|
const messagesRef = (0, import_react6.useRef)([]);
|
|
781
801
|
const tapRef = (0, import_react6.useRef)({
|
|
782
802
|
getMessagesFromTap: () => messagesRef.current,
|
|
@@ -829,10 +849,14 @@ function CopilotMessages({ children }) {
|
|
|
829
849
|
const originalError = extensions == null ? void 0 : extensions.originalError;
|
|
830
850
|
if (originalError == null ? void 0 : originalError.stack) {
|
|
831
851
|
if (originalError.stack.includes("CopilotApiDiscoveryError")) {
|
|
832
|
-
return new import_shared4.CopilotKitApiDiscoveryError({
|
|
852
|
+
return new import_shared4.CopilotKitApiDiscoveryError({
|
|
853
|
+
message: originalError.message
|
|
854
|
+
});
|
|
833
855
|
}
|
|
834
856
|
if (originalError.stack.includes("CopilotKitRemoteEndpointDiscoveryError")) {
|
|
835
|
-
return new import_shared4.CopilotKitRemoteEndpointDiscoveryError({
|
|
857
|
+
return new import_shared4.CopilotKitRemoteEndpointDiscoveryError({
|
|
858
|
+
message: originalError.message
|
|
859
|
+
});
|
|
836
860
|
}
|
|
837
861
|
if (originalError.stack.includes("CopilotKitAgentDiscoveryError")) {
|
|
838
862
|
return new import_shared4.CopilotKitAgentDiscoveryError({
|
|
@@ -858,7 +882,10 @@ function CopilotMessages({ children }) {
|
|
|
858
882
|
const visibility = extensions == null ? void 0 : extensions.visibility;
|
|
859
883
|
const isDev = shouldShowDevConsole(showDevConsole);
|
|
860
884
|
if (!isDev) {
|
|
861
|
-
console.error(
|
|
885
|
+
console.error(
|
|
886
|
+
"CopilotKit Error (hidden in production):",
|
|
887
|
+
gqlError.message
|
|
888
|
+
);
|
|
862
889
|
return;
|
|
863
890
|
}
|
|
864
891
|
if (visibility === import_shared4.ErrorVisibility.SILENT) {
|
|
@@ -1107,7 +1134,11 @@ var getErrorActions = (error) => {
|
|
|
1107
1134
|
return {
|
|
1108
1135
|
primary: {
|
|
1109
1136
|
label: "Upgrade",
|
|
1110
|
-
onClick: () => window.open(
|
|
1137
|
+
onClick: () => window.open(
|
|
1138
|
+
"https://cloud.copilotkit.ai",
|
|
1139
|
+
"_blank",
|
|
1140
|
+
"noopener,noreferrer"
|
|
1141
|
+
)
|
|
1111
1142
|
}
|
|
1112
1143
|
};
|
|
1113
1144
|
default:
|
|
@@ -1352,16 +1383,19 @@ var CopilotErrorBoundary = class extends import_react8.default.Component {
|
|
|
1352
1383
|
// src/context/coagent-state-renders-context.tsx
|
|
1353
1384
|
var import_react9 = require("react");
|
|
1354
1385
|
var import_jsx_runtime7 = require("react/jsx-runtime");
|
|
1355
|
-
var CoAgentStateRendersContext = (0, import_react9.createContext)(
|
|
1356
|
-
|
|
1357
|
-
|
|
1358
|
-
|
|
1386
|
+
var CoAgentStateRendersContext = (0, import_react9.createContext)(void 0);
|
|
1387
|
+
function CoAgentStateRendersProvider({
|
|
1388
|
+
children
|
|
1389
|
+
}) {
|
|
1359
1390
|
const [coAgentStateRenders, setCoAgentStateRenders] = (0, import_react9.useState)({});
|
|
1360
|
-
const setCoAgentStateRender = (0, import_react9.useCallback)(
|
|
1361
|
-
|
|
1362
|
-
|
|
1363
|
-
|
|
1364
|
-
|
|
1391
|
+
const setCoAgentStateRender = (0, import_react9.useCallback)(
|
|
1392
|
+
(id, stateRender) => {
|
|
1393
|
+
setCoAgentStateRenders((prevPoints) => __spreadProps(__spreadValues({}, prevPoints), {
|
|
1394
|
+
[id]: stateRender
|
|
1395
|
+
}));
|
|
1396
|
+
},
|
|
1397
|
+
[]
|
|
1398
|
+
);
|
|
1365
1399
|
const removeCoAgentStateRender = (0, import_react9.useCallback)((id) => {
|
|
1366
1400
|
setCoAgentStateRenders((prevPoints) => {
|
|
1367
1401
|
const newPoints = __spreadValues({}, prevPoints);
|
|
@@ -1386,7 +1420,9 @@ function CoAgentStateRendersProvider({ children }) {
|
|
|
1386
1420
|
function useCoAgentStateRenders() {
|
|
1387
1421
|
const context = (0, import_react9.useContext)(CoAgentStateRendersContext);
|
|
1388
1422
|
if (!context) {
|
|
1389
|
-
throw new Error(
|
|
1423
|
+
throw new Error(
|
|
1424
|
+
"useCoAgentStateRenders must be used within CoAgentStateRendersProvider"
|
|
1425
|
+
);
|
|
1390
1426
|
}
|
|
1391
1427
|
return context;
|
|
1392
1428
|
}
|
|
@@ -1399,8 +1435,13 @@ var import_react13 = require("react");
|
|
|
1399
1435
|
var import_react10 = require("react");
|
|
1400
1436
|
var import_shared8 = require("@copilotkit/shared");
|
|
1401
1437
|
var import_jsx_runtime8 = require("react/jsx-runtime");
|
|
1402
|
-
var ThreadsContext = (0, import_react10.createContext)(
|
|
1403
|
-
|
|
1438
|
+
var ThreadsContext = (0, import_react10.createContext)(
|
|
1439
|
+
void 0
|
|
1440
|
+
);
|
|
1441
|
+
function ThreadsProvider({
|
|
1442
|
+
children,
|
|
1443
|
+
threadId: explicitThreadId
|
|
1444
|
+
}) {
|
|
1404
1445
|
const [internalThreadId, setThreadId] = (0, import_react10.useState)(() => (0, import_shared8.randomUUID)());
|
|
1405
1446
|
const threadId = explicitThreadId != null ? explicitThreadId : internalThreadId;
|
|
1406
1447
|
return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
@@ -1583,7 +1624,13 @@ function selectSnapshot({
|
|
|
1583
1624
|
cachedSnapshot = caches.byStateRenderAndRun[`${stateRenderId}::latest`];
|
|
1584
1625
|
}
|
|
1585
1626
|
const snapshotForClaim = (existingClaim == null ? void 0 : existingClaim.locked) ? (_e = existingClaim.stateSnapshot) != null ? _e : cachedSnapshot : hasSnapshotKeys ? snapshot : (_f = existingClaim == null ? void 0 : existingClaim.stateSnapshot) != null ? _f : cachedSnapshot;
|
|
1586
|
-
return {
|
|
1627
|
+
return {
|
|
1628
|
+
snapshot,
|
|
1629
|
+
hasSnapshotKeys,
|
|
1630
|
+
cachedSnapshot,
|
|
1631
|
+
allowEmptySnapshot,
|
|
1632
|
+
snapshotForClaim
|
|
1633
|
+
};
|
|
1587
1634
|
}
|
|
1588
1635
|
|
|
1589
1636
|
// src/hooks/use-coagent-state-render-registry.ts
|
|
@@ -1688,7 +1735,9 @@ function useStateRenderRegistry({
|
|
|
1688
1735
|
});
|
|
1689
1736
|
}
|
|
1690
1737
|
if (existingClaim && !existingClaim.locked && (agentMessages == null ? void 0 : agentMessages.length)) {
|
|
1691
|
-
const indexInAgentMessages = agentMessages.findIndex(
|
|
1738
|
+
const indexInAgentMessages = agentMessages.findIndex(
|
|
1739
|
+
(msg) => msg.id === message.id
|
|
1740
|
+
);
|
|
1692
1741
|
if (indexInAgentMessages >= 0 && indexInAgentMessages < agentMessages.length - 1) {
|
|
1693
1742
|
existingClaim.locked = true;
|
|
1694
1743
|
}
|
|
@@ -1720,7 +1769,10 @@ function useStateRenderRegistry({
|
|
|
1720
1769
|
snapshotCache[`${stateRenderId}::latest`] = snapshotForClaim;
|
|
1721
1770
|
store[LAST_SNAPSHOTS_BY_RENDER_AND_RUN] = snapshotCache;
|
|
1722
1771
|
const messageCache = __spreadValues({}, (_f = store[LAST_SNAPSHOTS_BY_MESSAGE]) != null ? _f : {});
|
|
1723
|
-
messageCache[message.id] = {
|
|
1772
|
+
messageCache[message.id] = {
|
|
1773
|
+
snapshot: snapshotForClaim,
|
|
1774
|
+
runId: effectiveRunId
|
|
1775
|
+
};
|
|
1724
1776
|
store[LAST_SNAPSHOTS_BY_MESSAGE] = messageCache;
|
|
1725
1777
|
}
|
|
1726
1778
|
}
|
|
@@ -1760,18 +1812,23 @@ function useCoagentStateRenderBridge(agentId, props) {
|
|
|
1760
1812
|
}, [agentId, nodeName]);
|
|
1761
1813
|
const getStateRender = (0, import_react13.useCallback)(
|
|
1762
1814
|
(messageId) => {
|
|
1763
|
-
return Object.entries(coAgentStateRenders).find(
|
|
1764
|
-
|
|
1765
|
-
|
|
1815
|
+
return Object.entries(coAgentStateRenders).find(
|
|
1816
|
+
([stateRenderId2, stateRender2]) => {
|
|
1817
|
+
if (claimsRef.current[messageId]) {
|
|
1818
|
+
return stateRenderId2 === claimsRef.current[messageId].stateRenderId;
|
|
1819
|
+
}
|
|
1820
|
+
const matchingAgentName = stateRender2.name === agentId;
|
|
1821
|
+
const matchesNodeContext = stateRender2.nodeName ? stateRender2.nodeName === nodeName : true;
|
|
1822
|
+
return matchingAgentName && matchesNodeContext;
|
|
1766
1823
|
}
|
|
1767
|
-
|
|
1768
|
-
const matchesNodeContext = stateRender2.nodeName ? stateRender2.nodeName === nodeName : true;
|
|
1769
|
-
return matchingAgentName && matchesNodeContext;
|
|
1770
|
-
});
|
|
1824
|
+
);
|
|
1771
1825
|
},
|
|
1772
1826
|
[coAgentStateRenders, nodeName, agentId]
|
|
1773
1827
|
);
|
|
1774
|
-
const stateRenderEntry = (0, import_react13.useMemo)(
|
|
1828
|
+
const stateRenderEntry = (0, import_react13.useMemo)(
|
|
1829
|
+
() => getStateRender(message.id),
|
|
1830
|
+
[getStateRender, message.id]
|
|
1831
|
+
);
|
|
1775
1832
|
const stateRenderId = stateRenderEntry == null ? void 0 : stateRenderEntry[0];
|
|
1776
1833
|
const stateRender = stateRenderEntry == null ? void 0 : stateRenderEntry[1];
|
|
1777
1834
|
const registryMessage = __spreadProps(__spreadValues({}, message), {
|
|
@@ -1845,7 +1902,10 @@ var usePredictStateSubscription = (agent) => {
|
|
|
1845
1902
|
predictStateToolsRef.current.forEach((t) => {
|
|
1846
1903
|
if ((t == null ? void 0 : t.tool) !== toolCallName)
|
|
1847
1904
|
return;
|
|
1848
|
-
const emittedState = typeof partialToolCallArgs === "string" ? (0, import_shared11.parseJson)(
|
|
1905
|
+
const emittedState = typeof partialToolCallArgs === "string" ? (0, import_shared11.parseJson)(
|
|
1906
|
+
partialToolCallArgs,
|
|
1907
|
+
partialToolCallArgs
|
|
1908
|
+
) : partialToolCallArgs;
|
|
1849
1909
|
agent2.setState({
|
|
1850
1910
|
[t.state_key]: emittedState[t.state_key]
|
|
1851
1911
|
});
|
|
@@ -1874,7 +1934,13 @@ function CopilotListeners() {
|
|
|
1874
1934
|
(0, import_react14.useEffect)(() => {
|
|
1875
1935
|
const subscriber = {
|
|
1876
1936
|
onError: ({ error }) => {
|
|
1877
|
-
setBannerError(
|
|
1937
|
+
setBannerError(
|
|
1938
|
+
new import_shared12.CopilotKitLowLevelError({
|
|
1939
|
+
error,
|
|
1940
|
+
message: error.message,
|
|
1941
|
+
url: typeof window !== "undefined" ? window.location.href : ""
|
|
1942
|
+
})
|
|
1943
|
+
);
|
|
1878
1944
|
}
|
|
1879
1945
|
};
|
|
1880
1946
|
const subscription = copilotkit.subscribe(subscriber);
|
|
@@ -1893,15 +1959,22 @@ function CopilotKit(_a) {
|
|
|
1893
1959
|
const showInspector = shouldShowDevConsole(props.enableInspector);
|
|
1894
1960
|
const publicApiKey = props.publicApiKey || props.publicLicenseKey;
|
|
1895
1961
|
const renderArr = (0, import_react16.useMemo)(() => [{ render: CoAgentStateRenderBridge }], []);
|
|
1896
|
-
return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(ToastProvider, { enabled, children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
1897
|
-
|
|
1898
|
-
|
|
1899
|
-
|
|
1900
|
-
|
|
1901
|
-
|
|
1902
|
-
|
|
1903
|
-
|
|
1904
|
-
|
|
1962
|
+
return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(ToastProvider, { enabled, children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
1963
|
+
CopilotErrorBoundary,
|
|
1964
|
+
{
|
|
1965
|
+
publicApiKey,
|
|
1966
|
+
showUsageBanner: enabled,
|
|
1967
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(ThreadsProvider, { threadId: props.threadId, children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
1968
|
+
import_react17.CopilotKitProvider,
|
|
1969
|
+
__spreadProps(__spreadValues({}, props), {
|
|
1970
|
+
showDevConsole: showInspector,
|
|
1971
|
+
renderCustomMessages: renderArr,
|
|
1972
|
+
useSingleEndpoint: true,
|
|
1973
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(CopilotKitInternal, __spreadProps(__spreadValues({}, props), { children }))
|
|
1974
|
+
})
|
|
1975
|
+
) })
|
|
1976
|
+
}
|
|
1977
|
+
) });
|
|
1905
1978
|
}
|
|
1906
1979
|
function CopilotKitErrorBridge() {
|
|
1907
1980
|
const { copilotkit } = (0, import_react17.useCopilotKit)();
|
|
@@ -1948,7 +2021,9 @@ function CopilotKitInternal(cpkProps) {
|
|
|
1948
2021
|
validateProps(cpkProps);
|
|
1949
2022
|
const publicApiKey = props.publicLicenseKey || props.publicApiKey;
|
|
1950
2023
|
const chatApiEndpoint = props.runtimeUrl || import_shared13.COPILOT_CLOUD_CHAT_URL;
|
|
1951
|
-
const [actions, setActions] = (0, import_react16.useState)(
|
|
2024
|
+
const [actions, setActions] = (0, import_react16.useState)(
|
|
2025
|
+
{}
|
|
2026
|
+
);
|
|
1952
2027
|
const [registeredActionConfigs, setRegisteredActionConfigs] = (0, import_react16.useState)(/* @__PURE__ */ new Map());
|
|
1953
2028
|
const chatComponentsCache = (0, import_react16.useRef)({
|
|
1954
2029
|
actions: {},
|
|
@@ -2009,7 +2084,9 @@ ${nonDocumentStrings}`;
|
|
|
2009
2084
|
}, [getAllElements]);
|
|
2010
2085
|
const getFunctionCallHandler = (0, import_react16.useCallback)(
|
|
2011
2086
|
(customEntryPoints) => {
|
|
2012
|
-
return entryPointsToFunctionCallHandler(
|
|
2087
|
+
return entryPointsToFunctionCallHandler(
|
|
2088
|
+
Object.values(customEntryPoints || actions)
|
|
2089
|
+
);
|
|
2013
2090
|
},
|
|
2014
2091
|
[actions]
|
|
2015
2092
|
);
|
|
@@ -2079,12 +2156,17 @@ ${nonDocumentStrings}`;
|
|
|
2079
2156
|
}
|
|
2080
2157
|
return acc;
|
|
2081
2158
|
}, {});
|
|
2082
|
-
return __spreadValues(__spreadValues(__spreadValues({}, copilotApiConfig.headers || {}), copilotApiConfig.publicApiKey ? {
|
|
2159
|
+
return __spreadValues(__spreadValues(__spreadValues({}, copilotApiConfig.headers || {}), copilotApiConfig.publicApiKey ? {
|
|
2160
|
+
[import_shared13.COPILOT_CLOUD_PUBLIC_API_KEY_HEADER]: copilotApiConfig.publicApiKey
|
|
2161
|
+
} : {}), authHeaders);
|
|
2083
2162
|
}, [copilotApiConfig.headers, copilotApiConfig.publicApiKey, authStates]);
|
|
2084
2163
|
const [internalErrorHandlers, _setInternalErrorHandler] = (0, import_react16.useState)({});
|
|
2085
|
-
const setInternalErrorHandler = (0, import_react16.useCallback)(
|
|
2086
|
-
|
|
2087
|
-
|
|
2164
|
+
const setInternalErrorHandler = (0, import_react16.useCallback)(
|
|
2165
|
+
(handler) => {
|
|
2166
|
+
_setInternalErrorHandler((prev) => __spreadValues(__spreadValues({}, prev), handler));
|
|
2167
|
+
},
|
|
2168
|
+
[]
|
|
2169
|
+
);
|
|
2088
2170
|
const removeInternalErrorHandler = (0, import_react16.useCallback)((key) => {
|
|
2089
2171
|
_setInternalErrorHandler((prev) => {
|
|
2090
2172
|
const _a2 = prev, { [key]: _removed } = _a2, rest = __objRest(_a2, [__restKey(key)]);
|
|
@@ -2154,7 +2236,9 @@ ${nonDocumentStrings}`;
|
|
|
2154
2236
|
agentName: props.agent
|
|
2155
2237
|
};
|
|
2156
2238
|
}
|
|
2157
|
-
const [agentSession, setAgentSession] = (0, import_react16.useState)(
|
|
2239
|
+
const [agentSession, setAgentSession] = (0, import_react16.useState)(
|
|
2240
|
+
initialAgentSession
|
|
2241
|
+
);
|
|
2158
2242
|
(0, import_react16.useEffect)(() => {
|
|
2159
2243
|
if (props.agent) {
|
|
2160
2244
|
setAgentSession({
|
|
@@ -2168,7 +2252,9 @@ ${nonDocumentStrings}`;
|
|
|
2168
2252
|
const setThreadId = (0, import_react16.useCallback)(
|
|
2169
2253
|
(value) => {
|
|
2170
2254
|
if (props.threadId) {
|
|
2171
|
-
throw new Error(
|
|
2255
|
+
throw new Error(
|
|
2256
|
+
"Cannot call setThreadId() when threadId is provided via props."
|
|
2257
|
+
);
|
|
2172
2258
|
}
|
|
2173
2259
|
setInternalThreadId(value);
|
|
2174
2260
|
},
|
|
@@ -2178,17 +2264,20 @@ ${nonDocumentStrings}`;
|
|
|
2178
2264
|
const chatAbortControllerRef = (0, import_react16.useRef)(null);
|
|
2179
2265
|
const showDevConsole = shouldShowDevConsole(props.showDevConsole);
|
|
2180
2266
|
const [interruptActions, _setInterruptActions] = (0, import_react16.useState)({});
|
|
2181
|
-
const setInterruptAction = (0, import_react16.useCallback)(
|
|
2182
|
-
|
|
2183
|
-
|
|
2184
|
-
|
|
2185
|
-
|
|
2186
|
-
|
|
2187
|
-
|
|
2188
|
-
|
|
2267
|
+
const setInterruptAction = (0, import_react16.useCallback)(
|
|
2268
|
+
(action) => {
|
|
2269
|
+
_setInterruptActions((prev) => {
|
|
2270
|
+
var _a2;
|
|
2271
|
+
if (action == null || !action.id) {
|
|
2272
|
+
return prev;
|
|
2273
|
+
}
|
|
2274
|
+
return __spreadProps(__spreadValues({}, prev), {
|
|
2275
|
+
[action.id]: __spreadValues(__spreadValues({}, (_a2 = prev[action.id]) != null ? _a2 : {}), action)
|
|
2276
|
+
});
|
|
2189
2277
|
});
|
|
2190
|
-
}
|
|
2191
|
-
|
|
2278
|
+
},
|
|
2279
|
+
[]
|
|
2280
|
+
);
|
|
2192
2281
|
const removeInterruptAction = (0, import_react16.useCallback)((actionId) => {
|
|
2193
2282
|
_setInterruptActions((prev) => {
|
|
2194
2283
|
const _a2 = prev, { [actionId]: _ } = _a2, rest = __objRest(_a2, [__restKey(actionId)]);
|
|
@@ -2254,15 +2343,18 @@ ${nonDocumentStrings}`;
|
|
|
2254
2343
|
},
|
|
2255
2344
|
[setAuthStates]
|
|
2256
2345
|
);
|
|
2257
|
-
const handleSetRegisteredActions = (0, import_react16.useCallback)(
|
|
2258
|
-
|
|
2259
|
-
|
|
2260
|
-
|
|
2261
|
-
|
|
2262
|
-
|
|
2263
|
-
|
|
2264
|
-
|
|
2265
|
-
|
|
2346
|
+
const handleSetRegisteredActions = (0, import_react16.useCallback)(
|
|
2347
|
+
(actionConfig) => {
|
|
2348
|
+
const key = actionConfig.action.name || (0, import_shared13.randomUUID)();
|
|
2349
|
+
setRegisteredActionConfigs((prev) => {
|
|
2350
|
+
const newMap = new Map(prev);
|
|
2351
|
+
newMap.set(key, actionConfig);
|
|
2352
|
+
return newMap;
|
|
2353
|
+
});
|
|
2354
|
+
return key;
|
|
2355
|
+
},
|
|
2356
|
+
[]
|
|
2357
|
+
);
|
|
2266
2358
|
const handleRemoveRegisteredAction = (0, import_react16.useCallback)((actionKey) => {
|
|
2267
2359
|
setRegisteredActionConfigs((prev) => {
|
|
2268
2360
|
const newMap = new Map(prev);
|
|
@@ -2368,7 +2460,10 @@ ${nonDocumentStrings}`;
|
|
|
2368
2460
|
}
|
|
2369
2461
|
var defaultCopilotContextCategories = ["global"];
|
|
2370
2462
|
function entryPointsToFunctionCallHandler(actions) {
|
|
2371
|
-
return (_0) => __async(this, [_0], function* ({
|
|
2463
|
+
return (_0) => __async(this, [_0], function* ({
|
|
2464
|
+
name,
|
|
2465
|
+
args
|
|
2466
|
+
}) {
|
|
2372
2467
|
let actionsByFunctionName = {};
|
|
2373
2468
|
for (let action2 of actions) {
|
|
2374
2469
|
actionsByFunctionName[action2.name] = action2;
|
|
@@ -2449,7 +2544,12 @@ function useAgentNodeName(agentName) {
|
|
|
2449
2544
|
|
|
2450
2545
|
// src/hooks/use-langgraph-interrupt-render.ts
|
|
2451
2546
|
var import_react21 = require("@copilotkitnext/react");
|
|
2452
|
-
var InterruptRenderer = ({
|
|
2547
|
+
var InterruptRenderer = ({
|
|
2548
|
+
event,
|
|
2549
|
+
result,
|
|
2550
|
+
render,
|
|
2551
|
+
resolve
|
|
2552
|
+
}) => {
|
|
2453
2553
|
return render({ event, result, resolve });
|
|
2454
2554
|
};
|
|
2455
2555
|
function useLangGraphInterruptRender(agent) {
|
|
@@ -2551,7 +2651,13 @@ function useLangGraphInterruptRender(agent) {
|
|
|
2551
2651
|
render,
|
|
2552
2652
|
resolve: resolveInterrupt
|
|
2553
2653
|
});
|
|
2554
|
-
}, [
|
|
2654
|
+
}, [
|
|
2655
|
+
interruptActions,
|
|
2656
|
+
interruptEventQueue,
|
|
2657
|
+
threadId,
|
|
2658
|
+
agentSession,
|
|
2659
|
+
handleResolve
|
|
2660
|
+
]);
|
|
2555
2661
|
}
|
|
2556
2662
|
|
|
2557
2663
|
// src/hooks/use-copilot-chat_internal.ts
|
|
@@ -2654,14 +2760,18 @@ function useCopilotChatInternal({
|
|
|
2654
2760
|
if (isLoading || messages.length === 0) {
|
|
2655
2761
|
return;
|
|
2656
2762
|
}
|
|
2657
|
-
const reloadMessageIndex = messages.findIndex(
|
|
2763
|
+
const reloadMessageIndex = messages.findIndex(
|
|
2764
|
+
(msg) => msg.id === reloadMessageId
|
|
2765
|
+
);
|
|
2658
2766
|
if (reloadMessageIndex === -1) {
|
|
2659
2767
|
console.warn(`Message with id ${reloadMessageId} not found`);
|
|
2660
2768
|
return;
|
|
2661
2769
|
}
|
|
2662
2770
|
const reloadMessageRole = messages[reloadMessageIndex].role;
|
|
2663
2771
|
if (reloadMessageRole !== "assistant") {
|
|
2664
|
-
console.warn(
|
|
2772
|
+
console.warn(
|
|
2773
|
+
`Regenerate cannot be performed on ${reloadMessageRole} role`
|
|
2774
|
+
);
|
|
2665
2775
|
return;
|
|
2666
2776
|
}
|
|
2667
2777
|
let historyCutoff = [messages[0]];
|
|
@@ -2673,7 +2783,10 @@ function useCopilotChatInternal({
|
|
|
2673
2783
|
const indexOfLastUserMessageBeforeRegenerate = messages.findIndex(
|
|
2674
2784
|
(msg) => msg.id === lastUserMessageBeforeRegenerate.id
|
|
2675
2785
|
);
|
|
2676
|
-
historyCutoff = messages.slice(
|
|
2786
|
+
historyCutoff = messages.slice(
|
|
2787
|
+
0,
|
|
2788
|
+
indexOfLastUserMessageBeforeRegenerate + 1
|
|
2789
|
+
);
|
|
2677
2790
|
}
|
|
2678
2791
|
} else if (messages.length > 2 && reloadMessageIndex === 0) {
|
|
2679
2792
|
historyCutoff = [messages[0], messages[1]];
|
|
@@ -2688,7 +2801,12 @@ function useCopilotChatInternal({
|
|
|
2688
2801
|
}
|
|
2689
2802
|
return;
|
|
2690
2803
|
}),
|
|
2691
|
-
[
|
|
2804
|
+
[
|
|
2805
|
+
agent == null ? void 0 : agent.messages.length,
|
|
2806
|
+
agent == null ? void 0 : agent.isRunning,
|
|
2807
|
+
agent == null ? void 0 : agent.setMessages,
|
|
2808
|
+
copilotkit == null ? void 0 : copilotkit.runAgent
|
|
2809
|
+
]
|
|
2692
2810
|
);
|
|
2693
2811
|
const latestSendMessageFunc = useAsyncCallback(
|
|
2694
2812
|
(message, options) => __async(this, null, function* () {
|
|
@@ -2784,7 +2902,10 @@ function useCopilotChatInternal({
|
|
|
2784
2902
|
const bridgeRenderer = legacyCustomMessageRenderer || renderCustomMessage ? () => {
|
|
2785
2903
|
var _a3;
|
|
2786
2904
|
if (legacyCustomMessageRenderer) {
|
|
2787
|
-
return legacyCustomMessageRenderer({
|
|
2905
|
+
return legacyCustomMessageRenderer({
|
|
2906
|
+
message,
|
|
2907
|
+
position: "before"
|
|
2908
|
+
});
|
|
2788
2909
|
}
|
|
2789
2910
|
try {
|
|
2790
2911
|
return (_a3 = renderCustomMessage == null ? void 0 : renderCustomMessage({ message, position: "before" })) != null ? _a3 : null;
|
|
@@ -2804,7 +2925,9 @@ function useCopilotChatInternal({
|
|
|
2804
2925
|
}
|
|
2805
2926
|
return message;
|
|
2806
2927
|
});
|
|
2807
|
-
const hasAssistantMessages = processedMessages.some(
|
|
2928
|
+
const hasAssistantMessages = processedMessages.some(
|
|
2929
|
+
(msg) => msg.role === "assistant"
|
|
2930
|
+
);
|
|
2808
2931
|
const canUseCustomRenderer = Boolean(
|
|
2809
2932
|
renderCustomMessage && ((_a2 = copilotkit == null ? void 0 : copilotkit.getAgent) == null ? void 0 : _a2.call(copilotkit, resolvedAgentId))
|
|
2810
2933
|
);
|
|
@@ -2819,7 +2942,11 @@ function useCopilotChatInternal({
|
|
|
2819
2942
|
}
|
|
2820
2943
|
}
|
|
2821
2944
|
const latestUserMessageId = latestUserIndex >= 0 ? processedMessages[latestUserIndex].id : void 0;
|
|
2822
|
-
const currentRunId = latestUserMessageId ? copilotkit.getRunIdForMessage(
|
|
2945
|
+
const currentRunId = latestUserMessageId ? copilotkit.getRunIdForMessage(
|
|
2946
|
+
resolvedAgentId,
|
|
2947
|
+
effectiveThreadId,
|
|
2948
|
+
latestUserMessageId
|
|
2949
|
+
) || `pending:${latestUserMessageId}` : void 0;
|
|
2823
2950
|
const hasAssistantForCurrentRun = latestUserIndex >= 0 ? processedMessages.slice(latestUserIndex + 1).some((msg) => msg.role === "assistant") : hasAssistantMessages;
|
|
2824
2951
|
if (placeholderRenderer && shouldRenderPlaceholder && !hasAssistantForCurrentRun) {
|
|
2825
2952
|
const placeholderId = currentRunId ? `coagent-state-render-${resolvedAgentId}-${currentRunId}` : `coagent-state-render-${resolvedAgentId}`;
|
|
@@ -3080,23 +3207,23 @@ function useFrontendTool(tool, dependencies) {
|
|
|
3080
3207
|
|
|
3081
3208
|
// src/hooks/use-render-tool-call.ts
|
|
3082
3209
|
var import_shared18 = require("@copilotkit/shared");
|
|
3083
|
-
var import_react29 = require("react");
|
|
3084
|
-
var import_react30 = require("@copilotkitnext/react");
|
|
3085
3210
|
var import_shared19 = require("@copilotkit/shared");
|
|
3211
|
+
var import_react29 = require("@copilotkitnext/react");
|
|
3212
|
+
var import_react30 = require("react");
|
|
3086
3213
|
function useRenderToolCall2(tool, dependencies) {
|
|
3087
|
-
const { copilotkit } = (0,
|
|
3088
|
-
const hasAddedRef = (0,
|
|
3089
|
-
(0,
|
|
3214
|
+
const { copilotkit } = (0, import_react29.useCopilotKit)();
|
|
3215
|
+
const hasAddedRef = (0, import_react30.useRef)(false);
|
|
3216
|
+
(0, import_react30.useEffect)(() => {
|
|
3090
3217
|
const { name, parameters, render } = tool;
|
|
3091
3218
|
const zodParameters = (0, import_shared18.getZodParameters)(parameters);
|
|
3092
|
-
const renderToolCall = name === "*" ? (0,
|
|
3219
|
+
const renderToolCall = name === "*" ? (0, import_react29.defineToolCallRenderer)({
|
|
3093
3220
|
name: "*",
|
|
3094
3221
|
render: (args) => {
|
|
3095
3222
|
return render(__spreadProps(__spreadValues({}, args), {
|
|
3096
3223
|
result: args.result ? (0, import_shared19.parseJson)(args.result, args.result) : args.result
|
|
3097
3224
|
}));
|
|
3098
3225
|
}
|
|
3099
|
-
}) : (0,
|
|
3226
|
+
}) : (0, import_react29.defineToolCallRenderer)({
|
|
3100
3227
|
name,
|
|
3101
3228
|
args: zodParameters,
|
|
3102
3229
|
render: (args) => {
|
|
@@ -3105,7 +3232,9 @@ function useRenderToolCall2(tool, dependencies) {
|
|
|
3105
3232
|
}));
|
|
3106
3233
|
}
|
|
3107
3234
|
});
|
|
3108
|
-
const existingIndex = copilotkit.renderToolCalls.findIndex(
|
|
3235
|
+
const existingIndex = copilotkit.renderToolCalls.findIndex(
|
|
3236
|
+
(r) => r.name === name
|
|
3237
|
+
);
|
|
3109
3238
|
if (existingIndex !== -1) {
|
|
3110
3239
|
copilotkit.renderToolCalls.splice(existingIndex, 1);
|
|
3111
3240
|
}
|
|
@@ -3113,7 +3242,9 @@ function useRenderToolCall2(tool, dependencies) {
|
|
|
3113
3242
|
hasAddedRef.current = true;
|
|
3114
3243
|
return () => {
|
|
3115
3244
|
if (hasAddedRef.current) {
|
|
3116
|
-
const index = copilotkit.renderToolCalls.findIndex(
|
|
3245
|
+
const index = copilotkit.renderToolCalls.findIndex(
|
|
3246
|
+
(r) => r.name === name
|
|
3247
|
+
);
|
|
3117
3248
|
if (index !== -1) {
|
|
3118
3249
|
copilotkit.renderToolCalls.splice(index, 1);
|
|
3119
3250
|
}
|
|
@@ -3259,7 +3390,11 @@ var import_react34 = require("react");
|
|
|
3259
3390
|
var import_shared21 = require("@copilotkit/shared");
|
|
3260
3391
|
function useCoAgentStateRender(action, dependencies) {
|
|
3261
3392
|
const { chatComponentsCache, availableAgents } = (0, import_react34.useContext)(CopilotContext);
|
|
3262
|
-
const {
|
|
3393
|
+
const {
|
|
3394
|
+
setCoAgentStateRender,
|
|
3395
|
+
removeCoAgentStateRender,
|
|
3396
|
+
coAgentStateRenders
|
|
3397
|
+
} = useCoAgentStateRenders();
|
|
3263
3398
|
const idRef = (0, import_react34.useRef)((0, import_shared21.randomId)());
|
|
3264
3399
|
const { setBannerError, addToast } = useToast();
|
|
3265
3400
|
(0, import_react34.useEffect)(() => {
|
|
@@ -3267,7 +3402,10 @@ function useCoAgentStateRender(action, dependencies) {
|
|
|
3267
3402
|
const message = `(useCoAgentStateRender): Agent "${action.name}" not found. Make sure the agent exists and is properly configured.`;
|
|
3268
3403
|
const agentError = new import_shared21.CopilotKitAgentDiscoveryError({
|
|
3269
3404
|
agentName: action.name,
|
|
3270
|
-
availableAgents: availableAgents.map((a) => ({
|
|
3405
|
+
availableAgents: availableAgents.map((a) => ({
|
|
3406
|
+
name: a.name,
|
|
3407
|
+
id: a.id
|
|
3408
|
+
}))
|
|
3271
3409
|
});
|
|
3272
3410
|
setBannerError(agentError);
|
|
3273
3411
|
}
|
|
@@ -3285,19 +3423,21 @@ function useCoAgentStateRender(action, dependencies) {
|
|
|
3285
3423
|
}
|
|
3286
3424
|
(0, import_react34.useEffect)(() => {
|
|
3287
3425
|
const currentId = idRef.current;
|
|
3288
|
-
const hasDuplicate = Object.entries(coAgentStateRenders).some(
|
|
3289
|
-
|
|
3290
|
-
|
|
3291
|
-
|
|
3292
|
-
|
|
3293
|
-
|
|
3294
|
-
|
|
3295
|
-
|
|
3296
|
-
|
|
3297
|
-
|
|
3298
|
-
|
|
3299
|
-
|
|
3300
|
-
|
|
3426
|
+
const hasDuplicate = Object.entries(coAgentStateRenders).some(
|
|
3427
|
+
([id, otherAction]) => {
|
|
3428
|
+
if (id === currentId)
|
|
3429
|
+
return false;
|
|
3430
|
+
if (otherAction.name !== action.name)
|
|
3431
|
+
return false;
|
|
3432
|
+
const hasNodeName = !!action.nodeName;
|
|
3433
|
+
const hasOtherNodeName = !!otherAction.nodeName;
|
|
3434
|
+
if (!hasNodeName && !hasOtherNodeName)
|
|
3435
|
+
return true;
|
|
3436
|
+
if (hasNodeName !== hasOtherNodeName)
|
|
3437
|
+
return false;
|
|
3438
|
+
return action.nodeName === otherAction.nodeName;
|
|
3439
|
+
}
|
|
3440
|
+
);
|
|
3301
3441
|
if (hasDuplicate) {
|
|
3302
3442
|
const message = action.nodeName ? `Found multiple state renders for agent ${action.name} and node ${action.nodeName}. State renders might get overridden` : `Found multiple state renders for agent ${action.name}. State renders might get overridden`;
|
|
3303
3443
|
addToast({
|
|
@@ -3408,7 +3548,9 @@ function useCoAgent(options) {
|
|
|
3408
3548
|
}, [options.config, options.configurable]);
|
|
3409
3549
|
const externalStateStr = (0, import_react38.useMemo)(
|
|
3410
3550
|
() => isExternalStateManagement(options) ? JSON.stringify(options.state) : void 0,
|
|
3411
|
-
[
|
|
3551
|
+
[
|
|
3552
|
+
isExternalStateManagement(options) ? JSON.stringify(options.state) : void 0
|
|
3553
|
+
]
|
|
3412
3554
|
);
|
|
3413
3555
|
(0, import_react38.useEffect)(() => {
|
|
3414
3556
|
if ((agent == null ? void 0 : agent.state) && isExternalStateManagement(options) && JSON.stringify(options.state) !== JSON.stringify(agent.state)) {
|
|
@@ -3563,7 +3705,10 @@ var useCopilotRuntimeClient = (options) => {
|
|
|
3563
3705
|
if (lastStructuredErrorRef.current && lastStructuredErrorRef.current.message === errorMessage && now - lastStructuredErrorRef.current.timestamp < 150) {
|
|
3564
3706
|
return;
|
|
3565
3707
|
}
|
|
3566
|
-
lastStructuredErrorRef.current = {
|
|
3708
|
+
lastStructuredErrorRef.current = {
|
|
3709
|
+
message: errorMessage,
|
|
3710
|
+
timestamp: now
|
|
3711
|
+
};
|
|
3567
3712
|
const ckError = createStructuredError(gqlError);
|
|
3568
3713
|
if (ckError) {
|
|
3569
3714
|
setBannerError(ckError);
|
|
@@ -3647,7 +3792,9 @@ function useCopilotAuthenticatedAction_c(action, dependencies) {
|
|
|
3647
3792
|
pendingActionRef.current = props;
|
|
3648
3793
|
return (authConfig_c == null ? void 0 : authConfig_c.SignInComponent) ? import_react42.default.createElement(authConfig_c.SignInComponent, {
|
|
3649
3794
|
onSignInComplete: (authState) => {
|
|
3650
|
-
setAuthStates_c == null ? void 0 : setAuthStates_c((prev) => __spreadProps(__spreadValues({}, prev), {
|
|
3795
|
+
setAuthStates_c == null ? void 0 : setAuthStates_c((prev) => __spreadProps(__spreadValues({}, prev), {
|
|
3796
|
+
[action.name]: authState
|
|
3797
|
+
}));
|
|
3651
3798
|
if (pendingActionRef.current) {
|
|
3652
3799
|
executeAction(pendingActionRef.current);
|
|
3653
3800
|
pendingActionRef.current = null;
|
|
@@ -3671,7 +3818,12 @@ function useCopilotAuthenticatedAction_c(action, dependencies) {
|
|
|
3671
3818
|
var import_react43 = require("react");
|
|
3672
3819
|
var import_shared23 = require("@copilotkit/shared");
|
|
3673
3820
|
function useLangGraphInterrupt(action, dependencies) {
|
|
3674
|
-
const {
|
|
3821
|
+
const {
|
|
3822
|
+
setInterruptAction,
|
|
3823
|
+
removeInterruptAction,
|
|
3824
|
+
interruptActions,
|
|
3825
|
+
threadId
|
|
3826
|
+
} = (0, import_react43.useContext)(CopilotContext);
|
|
3675
3827
|
const { addToast } = useToast();
|
|
3676
3828
|
const actionId = (0, import_shared23.dataToUUID)(action, "lgAction");
|
|
3677
3829
|
(0, import_react43.useEffect)(() => {
|
|
@@ -3681,28 +3833,50 @@ function useLangGraphInterrupt(action, dependencies) {
|
|
|
3681
3833
|
return () => {
|
|
3682
3834
|
removeInterruptAction(actionId);
|
|
3683
3835
|
};
|
|
3684
|
-
}, [
|
|
3836
|
+
}, [
|
|
3837
|
+
setInterruptAction,
|
|
3838
|
+
removeInterruptAction,
|
|
3839
|
+
threadId,
|
|
3840
|
+
actionId,
|
|
3841
|
+
...dependencies || []
|
|
3842
|
+
]);
|
|
3685
3843
|
}
|
|
3686
3844
|
|
|
3687
3845
|
// src/hooks/use-copilot-additional-instructions.ts
|
|
3688
3846
|
var import_react44 = require("react");
|
|
3689
|
-
function useCopilotAdditionalInstructions({
|
|
3847
|
+
function useCopilotAdditionalInstructions({
|
|
3848
|
+
instructions,
|
|
3849
|
+
available = "enabled"
|
|
3850
|
+
}, dependencies) {
|
|
3690
3851
|
const { setAdditionalInstructions } = useCopilotContext();
|
|
3691
3852
|
(0, import_react44.useEffect)(() => {
|
|
3692
3853
|
if (available === "disabled")
|
|
3693
3854
|
return;
|
|
3694
|
-
setAdditionalInstructions((prevInstructions) => [
|
|
3855
|
+
setAdditionalInstructions((prevInstructions) => [
|
|
3856
|
+
...prevInstructions || [],
|
|
3857
|
+
instructions
|
|
3858
|
+
]);
|
|
3695
3859
|
return () => {
|
|
3696
3860
|
setAdditionalInstructions(
|
|
3697
|
-
(prevInstructions) => (prevInstructions == null ? void 0 : prevInstructions.filter(
|
|
3861
|
+
(prevInstructions) => (prevInstructions == null ? void 0 : prevInstructions.filter(
|
|
3862
|
+
(instruction) => instruction !== instructions
|
|
3863
|
+
)) || []
|
|
3698
3864
|
);
|
|
3699
3865
|
};
|
|
3700
|
-
}, [
|
|
3866
|
+
}, [
|
|
3867
|
+
available,
|
|
3868
|
+
instructions,
|
|
3869
|
+
setAdditionalInstructions,
|
|
3870
|
+
...dependencies || []
|
|
3871
|
+
]);
|
|
3701
3872
|
}
|
|
3702
3873
|
|
|
3703
3874
|
// src/hooks/use-default-tool.ts
|
|
3704
3875
|
function useDefaultTool(tool, dependencies) {
|
|
3705
|
-
useCopilotAction(
|
|
3876
|
+
useCopilotAction(
|
|
3877
|
+
__spreadProps(__spreadValues({}, tool), { name: "*" }),
|
|
3878
|
+
dependencies
|
|
3879
|
+
);
|
|
3706
3880
|
}
|
|
3707
3881
|
|
|
3708
3882
|
// src/hooks/use-copilot-chat-suggestions.tsx
|
|
@@ -3741,7 +3915,9 @@ function processActionsForRuntimeRequest(actions) {
|
|
|
3741
3915
|
return {
|
|
3742
3916
|
name: action.name,
|
|
3743
3917
|
description: action.description || "",
|
|
3744
|
-
jsonSchema: JSON.stringify(
|
|
3918
|
+
jsonSchema: JSON.stringify(
|
|
3919
|
+
(0, import_shared24.actionParametersToJsonSchema)(action.parameters || [])
|
|
3920
|
+
),
|
|
3745
3921
|
available
|
|
3746
3922
|
};
|
|
3747
3923
|
});
|
|
@@ -3774,7 +3950,10 @@ var CopilotTask = class {
|
|
|
3774
3950
|
contextString = (typeof data === "string" ? data : JSON.stringify(data)) + "\n\n";
|
|
3775
3951
|
}
|
|
3776
3952
|
if (this.includeCopilotReadable) {
|
|
3777
|
-
contextString += context.getContextString(
|
|
3953
|
+
contextString += context.getContextString(
|
|
3954
|
+
[],
|
|
3955
|
+
defaultCopilotContextCategories
|
|
3956
|
+
);
|
|
3778
3957
|
}
|
|
3779
3958
|
const systemMessage = new import_runtime_client_gql5.TextMessage({
|
|
3780
3959
|
content: taskSystemMessage(contextString, this.instructions),
|
|
@@ -3793,7 +3972,9 @@ var CopilotTask = class {
|
|
|
3793
3972
|
actions: processActionsForRuntimeRequest(Object.values(actions)),
|
|
3794
3973
|
url: window.location.href
|
|
3795
3974
|
},
|
|
3796
|
-
messages: (0, import_runtime_client_gql5.convertMessagesToGqlInput)(
|
|
3975
|
+
messages: (0, import_runtime_client_gql5.convertMessagesToGqlInput)(
|
|
3976
|
+
(0, import_runtime_client_gql5.filterAgentStateMessages)(messages)
|
|
3977
|
+
),
|
|
3797
3978
|
metadata: {
|
|
3798
3979
|
requestType: import_runtime_client_gql5.CopilotRequestType.Task
|
|
3799
3980
|
},
|