@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
|
@@ -2,28 +2,28 @@ import "../../chunk-SPCZTZCY.mjs";
|
|
|
2
2
|
import {
|
|
3
3
|
CopilotKit,
|
|
4
4
|
defaultCopilotContextCategories
|
|
5
|
-
} from "../../chunk-
|
|
6
|
-
import "../../chunk-
|
|
5
|
+
} from "../../chunk-2JZZD4RP.mjs";
|
|
6
|
+
import "../../chunk-NINJMAND.mjs";
|
|
7
7
|
import "../../chunk-CYDWEPFL.mjs";
|
|
8
8
|
import "../../chunk-2IDV5OHF.mjs";
|
|
9
|
-
import "../../chunk-
|
|
9
|
+
import "../../chunk-SFOKX4MH.mjs";
|
|
10
10
|
import "../../chunk-ICIK2BSB.mjs";
|
|
11
|
-
import "../../chunk-
|
|
12
|
-
import "../../chunk-
|
|
13
|
-
import "../../chunk-
|
|
14
|
-
import "../../chunk-
|
|
11
|
+
import "../../chunk-R7BV32X4.mjs";
|
|
12
|
+
import "../../chunk-WV2EA7SX.mjs";
|
|
13
|
+
import "../../chunk-K5OXUXCG.mjs";
|
|
14
|
+
import "../../chunk-L7GPCF2V.mjs";
|
|
15
|
+
import "../../chunk-6AWG5FWL.mjs";
|
|
15
16
|
import "../../chunk-O7ARI5CV.mjs";
|
|
16
|
-
import "../../chunk-
|
|
17
|
+
import "../../chunk-G7SUZGGB.mjs";
|
|
18
|
+
import "../../chunk-QXZTCGF4.mjs";
|
|
19
|
+
import "../../chunk-7GIBHX6X.mjs";
|
|
17
20
|
import "../../chunk-NB2FKV2V.mjs";
|
|
18
|
-
import "../../chunk-
|
|
19
|
-
import "../../chunk-
|
|
20
|
-
import "../../chunk-C3YJYDK4.mjs";
|
|
21
|
-
import "../../chunk-WF65O6HX.mjs";
|
|
22
|
-
import "../../chunk-EFL5OBKN.mjs";
|
|
23
|
-
import "../../chunk-6ZLPNY7X.mjs";
|
|
24
|
-
import "../../chunk-QD7EID4N.mjs";
|
|
25
|
-
import "../../chunk-AFNWX62Q.mjs";
|
|
21
|
+
import "../../chunk-IHMMKEFG.mjs";
|
|
22
|
+
import "../../chunk-C7HSVDHD.mjs";
|
|
26
23
|
import "../../chunk-DMLQZG75.mjs";
|
|
24
|
+
import "../../chunk-SK2XMJUD.mjs";
|
|
25
|
+
import "../../chunk-WRALJIW5.mjs";
|
|
26
|
+
import "../../chunk-ZP2IMXFY.mjs";
|
|
27
27
|
import "../../chunk-SKC7AJIV.mjs";
|
|
28
28
|
export {
|
|
29
29
|
CopilotKit,
|
|
@@ -3,6 +3,6 @@ import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
|
3
3
|
interface ConsoleTriggerProps {
|
|
4
4
|
position?: "bottom-left" | "bottom-right";
|
|
5
5
|
}
|
|
6
|
-
declare function ConsoleTrigger({ position }: ConsoleTriggerProps): react_jsx_runtime.JSX.Element | null;
|
|
6
|
+
declare function ConsoleTrigger({ position, }: ConsoleTriggerProps): react_jsx_runtime.JSX.Element | null;
|
|
7
7
|
|
|
8
8
|
export { ConsoleTrigger };
|
|
@@ -87,7 +87,9 @@ var emptyCopilotContext = {
|
|
|
87
87
|
},
|
|
88
88
|
copilotApiConfig: new class {
|
|
89
89
|
get chatApiEndpoint() {
|
|
90
|
-
throw new Error(
|
|
90
|
+
throw new Error(
|
|
91
|
+
"Remember to wrap your app in a `<CopilotKit> {...} </CopilotKit>` !!!"
|
|
92
|
+
);
|
|
91
93
|
}
|
|
92
94
|
get headers() {
|
|
93
95
|
return {};
|
|
@@ -149,12 +151,16 @@ var CopilotContext = import_react.default.createContext(emptyCopilotContext);
|
|
|
149
151
|
function useCopilotContext() {
|
|
150
152
|
const context = import_react.default.useContext(CopilotContext);
|
|
151
153
|
if (context === emptyCopilotContext) {
|
|
152
|
-
throw new Error(
|
|
154
|
+
throw new Error(
|
|
155
|
+
"Remember to wrap your app in a `<CopilotKit> {...} </CopilotKit>` !!!"
|
|
156
|
+
);
|
|
153
157
|
}
|
|
154
158
|
return context;
|
|
155
159
|
}
|
|
156
160
|
function returnAndThrowInDebug(_value) {
|
|
157
|
-
throw new Error(
|
|
161
|
+
throw new Error(
|
|
162
|
+
"Remember to wrap your app in a `<CopilotKit> {...} </CopilotKit>` !!!"
|
|
163
|
+
);
|
|
158
164
|
}
|
|
159
165
|
|
|
160
166
|
// src/components/dev-console/icons.tsx
|
|
@@ -184,13 +190,22 @@ var CheckIcon = () => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
|
184
190
|
viewBox: "0 0 14 14",
|
|
185
191
|
version: "1.1",
|
|
186
192
|
xmlns: "http://www.w3.org/2000/svg",
|
|
187
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("g", { id: "Page-1", stroke: "none", strokeWidth: "1", fill: "none", fillRule: "evenodd", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
188
|
-
"
|
|
193
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("g", { id: "Page-1", stroke: "none", strokeWidth: "1", fill: "none", fillRule: "evenodd", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
194
|
+
"g",
|
|
189
195
|
{
|
|
190
|
-
|
|
191
|
-
|
|
196
|
+
id: "Group-2",
|
|
197
|
+
transform: "translate(-118, 0)",
|
|
198
|
+
fill: "#1BC030",
|
|
199
|
+
fillRule: "nonzero",
|
|
200
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("g", { id: "Group", transform: "translate(118, 0)", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
201
|
+
"path",
|
|
202
|
+
{
|
|
203
|
+
d: "M0,7 C0,3.13384615 3.13384615,0 7,0 C10.8661538,0 14,3.13384615 14,7 C14,10.8661538 10.8661538,14 7,14 C3.13384615,14 0,10.8661538 0,7 Z M9.59179487,5.69764103 C9.70905818,5.54139023 9.73249341,5.33388318 9.65303227,5.15541491 C9.57357113,4.97694665 9.40367989,4.85551619 9.20909814,4.83811118 C9.01451638,4.82070616 8.82577109,4.91005717 8.71589744,5.07158974 L6.39261538,8.32389744 L5.22666667,7.15794872 C5.01450582,6.96025518 4.68389046,6.9660885 4.47883563,7.17114332 C4.27378081,7.37619815 4.26794748,7.70681351 4.46564103,7.91897436 L6.08102564,9.53435897 C6.19289944,9.64614839 6.3482622,9.70310251 6.50588106,9.69010587 C6.66349993,9.67710922 6.80743532,9.59547613 6.89948718,9.46687179 L9.59179487,5.69764103 L9.59179487,5.69764103 Z",
|
|
204
|
+
id: "Shape"
|
|
205
|
+
}
|
|
206
|
+
) })
|
|
192
207
|
}
|
|
193
|
-
) })
|
|
208
|
+
) })
|
|
194
209
|
}
|
|
195
210
|
);
|
|
196
211
|
var CopilotKitIcon = () => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
@@ -241,7 +256,11 @@ function useCopilotMessagesContext() {
|
|
|
241
256
|
var import_shared = require("@copilotkit/shared");
|
|
242
257
|
var import_react3 = require("react");
|
|
243
258
|
var import_jsx_runtime2 = require("react/jsx-runtime");
|
|
244
|
-
function DeveloperConsoleModal({
|
|
259
|
+
function DeveloperConsoleModal({
|
|
260
|
+
isOpen,
|
|
261
|
+
onClose,
|
|
262
|
+
hasApiKey
|
|
263
|
+
}) {
|
|
245
264
|
const context = useCopilotContext();
|
|
246
265
|
const messagesContext = useCopilotMessagesContext();
|
|
247
266
|
const [activeTab, setActiveTab] = (0, import_react3.useState)("actions");
|
|
@@ -264,9 +283,18 @@ function DeveloperConsoleModal({ isOpen, onClose, hasApiKey }) {
|
|
|
264
283
|
return null;
|
|
265
284
|
const displayContext = hasApiKey ? context : {
|
|
266
285
|
actions: {
|
|
267
|
-
search_web: {
|
|
268
|
-
|
|
269
|
-
|
|
286
|
+
search_web: {
|
|
287
|
+
name: "search_web",
|
|
288
|
+
description: "Search the web for information"
|
|
289
|
+
},
|
|
290
|
+
send_email: {
|
|
291
|
+
name: "send_email",
|
|
292
|
+
description: "Send an email to a contact"
|
|
293
|
+
},
|
|
294
|
+
create_document: {
|
|
295
|
+
name: "create_document",
|
|
296
|
+
description: "Create a new document"
|
|
297
|
+
},
|
|
270
298
|
analyze_code: {
|
|
271
299
|
name: "analyze_code",
|
|
272
300
|
description: "Analyze code for issues and improvements"
|
|
@@ -296,7 +324,10 @@ function DeveloperConsoleModal({ isOpen, onClose, hasApiKey }) {
|
|
|
296
324
|
],
|
|
297
325
|
coagentStates: {
|
|
298
326
|
"main-agent": { status: "active", lastUpdate: Date.now() },
|
|
299
|
-
"code-assistant": {
|
|
327
|
+
"code-assistant": {
|
|
328
|
+
status: "active",
|
|
329
|
+
lastUpdate: Date.now() - 15e3
|
|
330
|
+
},
|
|
300
331
|
"search-agent": { status: "idle", lastUpdate: Date.now() - 6e4 }
|
|
301
332
|
},
|
|
302
333
|
getDocumentsContext: () => [
|
|
@@ -326,13 +357,21 @@ function DeveloperConsoleModal({ isOpen, onClose, hasApiKey }) {
|
|
|
326
357
|
role: "assistant",
|
|
327
358
|
content: "I'll help you create a todo list with drag and drop. Let me start by setting up the basic components and then add the drag and drop functionality using React DnD."
|
|
328
359
|
},
|
|
329
|
-
{
|
|
360
|
+
{
|
|
361
|
+
id: "3",
|
|
362
|
+
role: "user",
|
|
363
|
+
content: "Can you also add priority levels and due dates?"
|
|
364
|
+
},
|
|
330
365
|
{
|
|
331
366
|
id: "4",
|
|
332
367
|
role: "assistant",
|
|
333
368
|
content: "Absolutely! I'll enhance the todo items with priority levels (high, medium, low) and due date functionality. This will make your todo list much more powerful for task management."
|
|
334
369
|
},
|
|
335
|
-
{
|
|
370
|
+
{
|
|
371
|
+
id: "5",
|
|
372
|
+
role: "user",
|
|
373
|
+
content: "Perfect! How about adding categories or tags?"
|
|
374
|
+
}
|
|
336
375
|
]
|
|
337
376
|
};
|
|
338
377
|
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
@@ -449,14 +488,26 @@ function DeveloperConsoleModal({ isOpen, onClose, hasApiKey }) {
|
|
|
449
488
|
opacity: !hasApiKey ? 0.9 : 1
|
|
450
489
|
},
|
|
451
490
|
children: [
|
|
452
|
-
{
|
|
453
|
-
|
|
491
|
+
{
|
|
492
|
+
id: "actions",
|
|
493
|
+
label: "Actions",
|
|
494
|
+
count: Object.keys(displayContext.actions).length
|
|
495
|
+
},
|
|
496
|
+
{
|
|
497
|
+
id: "readables",
|
|
498
|
+
label: "Readables",
|
|
499
|
+
count: displayContext.getAllContext().length
|
|
500
|
+
},
|
|
454
501
|
{
|
|
455
502
|
id: "agent",
|
|
456
503
|
label: "Agent Status",
|
|
457
504
|
count: Object.keys(displayContext.coagentStates).length
|
|
458
505
|
},
|
|
459
|
-
{
|
|
506
|
+
{
|
|
507
|
+
id: "messages",
|
|
508
|
+
label: "Messages",
|
|
509
|
+
count: displayMessagesContext.messages.length
|
|
510
|
+
},
|
|
460
511
|
{
|
|
461
512
|
id: "context",
|
|
462
513
|
label: "Context",
|
|
@@ -682,11 +733,35 @@ function ActionsTab({ context }) {
|
|
|
682
733
|
children: /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
|
|
683
734
|
"div",
|
|
684
735
|
{
|
|
685
|
-
style: {
|
|
736
|
+
style: {
|
|
737
|
+
display: "flex",
|
|
738
|
+
alignItems: "flex-start",
|
|
739
|
+
justifyContent: "space-between"
|
|
740
|
+
},
|
|
686
741
|
children: [
|
|
687
742
|
/* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { style: { flex: 1 }, children: [
|
|
688
|
-
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
689
|
-
|
|
743
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
744
|
+
"h3",
|
|
745
|
+
{
|
|
746
|
+
style: {
|
|
747
|
+
fontWeight: "600",
|
|
748
|
+
color: "#1f2937",
|
|
749
|
+
margin: "0 0 4px 0"
|
|
750
|
+
},
|
|
751
|
+
children: action.name
|
|
752
|
+
}
|
|
753
|
+
),
|
|
754
|
+
action.description && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
755
|
+
"p",
|
|
756
|
+
{
|
|
757
|
+
style: {
|
|
758
|
+
fontSize: "14px",
|
|
759
|
+
color: "#4b5563",
|
|
760
|
+
margin: "0 0 12px 0"
|
|
761
|
+
},
|
|
762
|
+
children: action.description
|
|
763
|
+
}
|
|
764
|
+
),
|
|
690
765
|
action.parameters && action.parameters.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { style: { marginTop: "12px" }, children: [
|
|
691
766
|
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
692
767
|
"p",
|
|
@@ -701,15 +776,56 @@ function ActionsTab({ context }) {
|
|
|
701
776
|
children: "Parameters:"
|
|
702
777
|
}
|
|
703
778
|
),
|
|
704
|
-
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
779
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
780
|
+
"div",
|
|
781
|
+
{
|
|
782
|
+
style: {
|
|
783
|
+
display: "flex",
|
|
784
|
+
flexDirection: "column",
|
|
785
|
+
gap: "4px"
|
|
786
|
+
},
|
|
787
|
+
children: action.parameters.map(
|
|
788
|
+
(param, pIndex) => /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { style: { fontSize: "14px" }, children: [
|
|
789
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
790
|
+
"span",
|
|
791
|
+
{
|
|
792
|
+
style: {
|
|
793
|
+
fontFamily: "monospace",
|
|
794
|
+
color: "#374151"
|
|
795
|
+
},
|
|
796
|
+
children: param.name
|
|
797
|
+
}
|
|
798
|
+
),
|
|
799
|
+
param.required && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
800
|
+
"span",
|
|
801
|
+
{
|
|
802
|
+
style: {
|
|
803
|
+
marginLeft: "4px",
|
|
804
|
+
fontSize: "12px",
|
|
805
|
+
color: "#ef4444"
|
|
806
|
+
},
|
|
807
|
+
children: "*required"
|
|
808
|
+
}
|
|
809
|
+
),
|
|
810
|
+
param.type && /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
|
|
811
|
+
"span",
|
|
812
|
+
{
|
|
813
|
+
style: {
|
|
814
|
+
marginLeft: "8px",
|
|
815
|
+
fontSize: "12px",
|
|
816
|
+
color: "#6b7280"
|
|
817
|
+
},
|
|
818
|
+
children: [
|
|
819
|
+
"(",
|
|
820
|
+
param.type,
|
|
821
|
+
")"
|
|
822
|
+
]
|
|
823
|
+
}
|
|
824
|
+
)
|
|
825
|
+
] }, pIndex)
|
|
826
|
+
)
|
|
827
|
+
}
|
|
828
|
+
)
|
|
713
829
|
] })
|
|
714
830
|
] }),
|
|
715
831
|
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { style: { marginLeft: "16px" }, children: action.status === "available" ? /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(CheckIcon, {}) : /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(ExclamationMarkTriangleIcon, {}) })
|
|
@@ -741,10 +857,34 @@ function ReadablesTab({ context }) {
|
|
|
741
857
|
children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
742
858
|
"div",
|
|
743
859
|
{
|
|
744
|
-
style: {
|
|
860
|
+
style: {
|
|
861
|
+
display: "flex",
|
|
862
|
+
alignItems: "flex-start",
|
|
863
|
+
justifyContent: "space-between"
|
|
864
|
+
},
|
|
745
865
|
children: /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { style: { flex: 1 }, children: [
|
|
746
|
-
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
747
|
-
|
|
866
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
867
|
+
"h3",
|
|
868
|
+
{
|
|
869
|
+
style: {
|
|
870
|
+
fontWeight: "600",
|
|
871
|
+
color: "#1f2937",
|
|
872
|
+
margin: "0 0 4px 0"
|
|
873
|
+
},
|
|
874
|
+
children: readable.name || `Readable ${index + 1}`
|
|
875
|
+
}
|
|
876
|
+
),
|
|
877
|
+
readable.description && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
878
|
+
"p",
|
|
879
|
+
{
|
|
880
|
+
style: {
|
|
881
|
+
fontSize: "14px",
|
|
882
|
+
color: "#4b5563",
|
|
883
|
+
margin: "0 0 12px 0"
|
|
884
|
+
},
|
|
885
|
+
children: readable.description
|
|
886
|
+
}
|
|
887
|
+
),
|
|
748
888
|
readable.value && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
749
889
|
"pre",
|
|
750
890
|
{
|
|
@@ -797,7 +937,18 @@ function AgentStatusTab({ context }) {
|
|
|
797
937
|
marginBottom: "16px"
|
|
798
938
|
},
|
|
799
939
|
children: [
|
|
800
|
-
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
940
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
941
|
+
"h3",
|
|
942
|
+
{
|
|
943
|
+
style: {
|
|
944
|
+
fontWeight: "600",
|
|
945
|
+
fontSize: "18px",
|
|
946
|
+
color: "#1f2937",
|
|
947
|
+
margin: 0
|
|
948
|
+
},
|
|
949
|
+
children: agentName
|
|
950
|
+
}
|
|
951
|
+
),
|
|
801
952
|
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
802
953
|
"span",
|
|
803
954
|
{
|
|
@@ -888,7 +1039,9 @@ function AgentStatusTab({ context }) {
|
|
|
888
1039
|
agentName
|
|
889
1040
|
)) });
|
|
890
1041
|
}
|
|
891
|
-
function MessagesTab({
|
|
1042
|
+
function MessagesTab({
|
|
1043
|
+
messagesContext
|
|
1044
|
+
}) {
|
|
892
1045
|
const messages = messagesContext.messages || [];
|
|
893
1046
|
if (messages.length === 0) {
|
|
894
1047
|
return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { style: { textAlign: "center", padding: "48px 0", color: "#6b7280" }, children: [
|
|
@@ -934,7 +1087,17 @@ function MessagesTab({ messagesContext }) {
|
|
|
934
1087
|
]
|
|
935
1088
|
}
|
|
936
1089
|
),
|
|
937
|
-
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
1090
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
1091
|
+
"div",
|
|
1092
|
+
{
|
|
1093
|
+
style: {
|
|
1094
|
+
fontSize: "14px",
|
|
1095
|
+
color: "#1f2937",
|
|
1096
|
+
whiteSpace: "pre-wrap"
|
|
1097
|
+
},
|
|
1098
|
+
children: message.content || ""
|
|
1099
|
+
}
|
|
1100
|
+
)
|
|
938
1101
|
]
|
|
939
1102
|
},
|
|
940
1103
|
index
|
|
@@ -959,7 +1122,13 @@ function ContextTab({ context }) {
|
|
|
959
1122
|
border: "1px solid #e5e7eb"
|
|
960
1123
|
},
|
|
961
1124
|
children: [
|
|
962
|
-
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
1125
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
1126
|
+
"h3",
|
|
1127
|
+
{
|
|
1128
|
+
style: { fontWeight: "600", color: "#1f2937", margin: "0 0 8px 0" },
|
|
1129
|
+
children: doc.name || `Document ${index + 1}`
|
|
1130
|
+
}
|
|
1131
|
+
),
|
|
963
1132
|
doc.content && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
964
1133
|
"pre",
|
|
965
1134
|
{
|
|
@@ -983,7 +1152,9 @@ function ContextTab({ context }) {
|
|
|
983
1152
|
// src/components/dev-console/console-trigger.tsx
|
|
984
1153
|
var import_jsx_runtime3 = require("react/jsx-runtime");
|
|
985
1154
|
var INSPECTOR_HIDE_KEY = "cpk:inspector:hidden";
|
|
986
|
-
function ConsoleTrigger({
|
|
1155
|
+
function ConsoleTrigger({
|
|
1156
|
+
position = "bottom-right"
|
|
1157
|
+
}) {
|
|
987
1158
|
const context = useCopilotContext();
|
|
988
1159
|
const hasApiKey = Boolean(context.copilotApiConfig.publicApiKey);
|
|
989
1160
|
const [isModalOpen, setIsModalOpen] = (0, import_react4.useState)(false);
|
|
@@ -1047,10 +1218,18 @@ function ConsoleTrigger({ position = "bottom-right" }) {
|
|
|
1047
1218
|
setIsDragging(false);
|
|
1048
1219
|
dragRef.current = null;
|
|
1049
1220
|
};
|
|
1050
|
-
document.addEventListener("mousemove", handleMouseMove, {
|
|
1051
|
-
|
|
1221
|
+
document.addEventListener("mousemove", handleMouseMove, {
|
|
1222
|
+
capture: true,
|
|
1223
|
+
passive: false
|
|
1224
|
+
});
|
|
1225
|
+
document.addEventListener("mouseup", handleMouseUp, {
|
|
1226
|
+
capture: true,
|
|
1227
|
+
passive: false
|
|
1228
|
+
});
|
|
1052
1229
|
return () => {
|
|
1053
|
-
document.removeEventListener("mousemove", handleMouseMove, {
|
|
1230
|
+
document.removeEventListener("mousemove", handleMouseMove, {
|
|
1231
|
+
capture: true
|
|
1232
|
+
});
|
|
1054
1233
|
document.removeEventListener("mouseup", handleMouseUp, { capture: true });
|
|
1055
1234
|
};
|
|
1056
1235
|
}, [isDragging]);
|
|
@@ -1179,7 +1358,13 @@ function ConsoleTrigger({ position = "bottom-right" }) {
|
|
|
1179
1358
|
boxShadow: "0 2px 8px rgba(255, 107, 107, 0.4)",
|
|
1180
1359
|
border: "2px solid white"
|
|
1181
1360
|
},
|
|
1182
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
1361
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
1362
|
+
"span",
|
|
1363
|
+
{
|
|
1364
|
+
style: { fontSize: "10px", color: "white", fontWeight: "bold" },
|
|
1365
|
+
children: "!"
|
|
1366
|
+
}
|
|
1367
|
+
)
|
|
1183
1368
|
}
|
|
1184
1369
|
)
|
|
1185
1370
|
]
|