@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.
Files changed (301) hide show
  1. package/CHANGELOG.md +10 -0
  2. package/README.md +18 -12
  3. package/dist/{chunk-DQXCQWSG.mjs → chunk-2JZZD4RP.mjs} +93 -58
  4. package/dist/chunk-2JZZD4RP.mjs.map +1 -0
  5. package/dist/{chunk-6ESSSQ7Q.mjs → chunk-2RSAYTXH.mjs} +6 -3
  6. package/dist/chunk-2RSAYTXH.mjs.map +1 -0
  7. package/dist/chunk-3LZZ4RVM.mjs +37 -0
  8. package/dist/{chunk-ABWT4DRT.mjs.map → chunk-3LZZ4RVM.mjs.map} +1 -1
  9. package/dist/{chunk-QDES5PDW.mjs → chunk-4ZQYMC5F.mjs} +2 -2
  10. package/dist/{chunk-QDES5PDW.mjs.map → chunk-4ZQYMC5F.mjs.map} +1 -1
  11. package/dist/{chunk-6PUNP7CD.mjs → chunk-6AWG5FWL.mjs} +2 -2
  12. package/dist/chunk-6AWG5FWL.mjs.map +1 -0
  13. package/dist/{chunk-C3YJYDK4.mjs → chunk-7GIBHX6X.mjs} +8 -2
  14. package/dist/chunk-7GIBHX6X.mjs.map +1 -0
  15. package/dist/{chunk-PIF5KJYI.mjs → chunk-7PJKPWMD.mjs} +15 -6
  16. package/dist/chunk-7PJKPWMD.mjs.map +1 -0
  17. package/dist/{chunk-7JTI6ZL4.mjs → chunk-7U3DNFBF.mjs} +6 -3
  18. package/dist/chunk-7U3DNFBF.mjs.map +1 -0
  19. package/dist/{chunk-KNJHRVKW.mjs → chunk-AAGMWZCN.mjs} +45 -14
  20. package/dist/chunk-AAGMWZCN.mjs.map +1 -0
  21. package/dist/{chunk-AFNWX62Q.mjs → chunk-C7HSVDHD.mjs} +10 -4
  22. package/dist/chunk-C7HSVDHD.mjs.map +1 -0
  23. package/dist/{chunk-ZYTXB6HH.mjs → chunk-CZT7JUIM.mjs} +4 -2
  24. package/dist/chunk-CZT7JUIM.mjs.map +1 -0
  25. package/dist/{chunk-VP43SLSZ.mjs → chunk-DAQORGBP.mjs} +10 -5
  26. package/dist/chunk-DAQORGBP.mjs.map +1 -0
  27. package/dist/{chunk-BKMJ4LC7.mjs → chunk-G7SUZGGB.mjs} +19 -12
  28. package/dist/chunk-G7SUZGGB.mjs.map +1 -0
  29. package/dist/{chunk-7IBF6RBW.mjs → chunk-GY3FQICF.mjs} +2 -2
  30. package/dist/{chunk-4RRMC7L2.mjs → chunk-IGYMBU43.mjs} +18 -7
  31. package/dist/chunk-IGYMBU43.mjs.map +1 -0
  32. package/dist/{chunk-QD7EID4N.mjs → chunk-IHMMKEFG.mjs} +16 -11
  33. package/dist/chunk-IHMMKEFG.mjs.map +1 -0
  34. package/dist/{chunk-YYN33GSG.mjs → chunk-K5OXUXCG.mjs} +14 -11
  35. package/dist/chunk-K5OXUXCG.mjs.map +1 -0
  36. package/dist/{chunk-6ZLPNY7X.mjs → chunk-L7GPCF2V.mjs} +6 -2
  37. package/dist/{chunk-6ZLPNY7X.mjs.map → chunk-L7GPCF2V.mjs.map} +1 -1
  38. package/dist/{chunk-7DTB7S5V.mjs → chunk-LNGBARXE.mjs} +5 -2
  39. package/dist/chunk-LNGBARXE.mjs.map +1 -0
  40. package/dist/{chunk-NBK4KBLX.mjs → chunk-MBJ7OLYI.mjs} +9 -5
  41. package/dist/chunk-MBJ7OLYI.mjs.map +1 -0
  42. package/dist/{chunk-LHERIF3L.mjs → chunk-NINJMAND.mjs} +10 -7
  43. package/dist/chunk-NINJMAND.mjs.map +1 -0
  44. package/dist/{chunk-MA3CUMCY.mjs → chunk-P6ZPE4XJ.mjs} +3 -3
  45. package/dist/{chunk-MA3CUMCY.mjs.map → chunk-P6ZPE4XJ.mjs.map} +1 -1
  46. package/dist/{chunk-77IVITG3.mjs → chunk-QXZTCGF4.mjs} +9 -4
  47. package/dist/chunk-QXZTCGF4.mjs.map +1 -0
  48. package/dist/{chunk-RKTVJRK7.mjs → chunk-R7BV32X4.mjs} +5 -2
  49. package/dist/chunk-R7BV32X4.mjs.map +1 -0
  50. package/dist/{chunk-VKNLTZJE.mjs → chunk-S65UEHGI.mjs} +30 -21
  51. package/dist/chunk-S65UEHGI.mjs.map +1 -0
  52. package/dist/{chunk-YCG6SNAU.mjs → chunk-SBRCWA4S.mjs} +186 -32
  53. package/dist/chunk-SBRCWA4S.mjs.map +1 -0
  54. package/dist/{chunk-HE22TZMF.mjs → chunk-SFOKX4MH.mjs} +18 -9
  55. package/dist/chunk-SFOKX4MH.mjs.map +1 -0
  56. package/dist/{chunk-LMHB2D4J.mjs → chunk-SK2XMJUD.mjs} +13 -4
  57. package/dist/chunk-SK2XMJUD.mjs.map +1 -0
  58. package/dist/{chunk-XDFVCQD3.mjs → chunk-SYGQHN3H.mjs} +1 -1
  59. package/dist/{chunk-XDFVCQD3.mjs.map → chunk-SYGQHN3H.mjs.map} +1 -1
  60. package/dist/{chunk-SRJT5VVY.mjs → chunk-TFZXOEY4.mjs} +6 -4
  61. package/dist/{chunk-SRJT5VVY.mjs.map → chunk-TFZXOEY4.mjs.map} +1 -1
  62. package/dist/{chunk-4CEQJ2X6.mjs → chunk-TPN7WC53.mjs} +4 -2
  63. package/dist/{chunk-4CEQJ2X6.mjs.map → chunk-TPN7WC53.mjs.map} +1 -1
  64. package/dist/{chunk-VGL3DGUW.mjs → chunk-UA23VX5J.mjs} +4 -2
  65. package/dist/chunk-UA23VX5J.mjs.map +1 -0
  66. package/dist/{chunk-VV56AVPB.mjs → chunk-V42VL2JR.mjs} +15 -4
  67. package/dist/chunk-V42VL2JR.mjs.map +1 -0
  68. package/dist/{chunk-RBGVEVWY.mjs → chunk-VZ4NSOFQ.mjs} +4 -4
  69. package/dist/chunk-VZ4NSOFQ.mjs.map +1 -0
  70. package/dist/{chunk-WF65O6HX.mjs → chunk-WRALJIW5.mjs} +18 -5
  71. package/dist/chunk-WRALJIW5.mjs.map +1 -0
  72. package/dist/{chunk-PMAFHQ7P.mjs → chunk-WV2EA7SX.mjs} +1 -1
  73. package/dist/chunk-WV2EA7SX.mjs.map +1 -0
  74. package/dist/{chunk-EFL5OBKN.mjs → chunk-ZP2IMXFY.mjs} +10 -4
  75. package/dist/chunk-ZP2IMXFY.mjs.map +1 -0
  76. package/dist/components/CopilotListeners.js +11 -2
  77. package/dist/components/CopilotListeners.js.map +1 -1
  78. package/dist/components/CopilotListeners.mjs +2 -2
  79. package/dist/components/copilot-provider/copilot-messages.d.ts +1 -1
  80. package/dist/components/copilot-provider/copilot-messages.js +22 -7
  81. package/dist/components/copilot-provider/copilot-messages.js.map +1 -1
  82. package/dist/components/copilot-provider/copilot-messages.mjs +3 -3
  83. package/dist/components/copilot-provider/copilotkit-props.js.map +1 -1
  84. package/dist/components/copilot-provider/copilotkit.js +179 -84
  85. package/dist/components/copilot-provider/copilotkit.js.map +1 -1
  86. package/dist/components/copilot-provider/copilotkit.mjs +16 -16
  87. package/dist/components/copilot-provider/index.js +179 -84
  88. package/dist/components/copilot-provider/index.js.map +1 -1
  89. package/dist/components/copilot-provider/index.mjs +16 -16
  90. package/dist/components/dev-console/console-trigger.d.ts +1 -1
  91. package/dist/components/dev-console/console-trigger.js +227 -42
  92. package/dist/components/dev-console/console-trigger.js.map +1 -1
  93. package/dist/components/dev-console/console-trigger.mjs +24 -8
  94. package/dist/components/dev-console/console-trigger.mjs.map +1 -1
  95. package/dist/components/dev-console/developer-console-modal.d.ts +1 -1
  96. package/dist/components/dev-console/developer-console-modal.js +206 -37
  97. package/dist/components/dev-console/developer-console-modal.js.map +1 -1
  98. package/dist/components/dev-console/developer-console-modal.mjs +3 -3
  99. package/dist/components/dev-console/icons.js +14 -5
  100. package/dist/components/dev-console/icons.js.map +1 -1
  101. package/dist/components/dev-console/icons.mjs +1 -1
  102. package/dist/components/error-boundary/error-boundary.d.ts +1 -1
  103. package/dist/components/error-boundary/error-boundary.js +9 -2
  104. package/dist/components/error-boundary/error-boundary.js.map +1 -1
  105. package/dist/components/error-boundary/error-boundary.mjs +5 -5
  106. package/dist/components/error-boundary/error-utils.js.map +1 -1
  107. package/dist/components/error-boundary/error-utils.mjs +2 -2
  108. package/dist/components/index.js +179 -84
  109. package/dist/components/index.js.map +1 -1
  110. package/dist/components/index.mjs +16 -16
  111. package/dist/components/toast/toast-provider.js +9 -3
  112. package/dist/components/toast/toast-provider.js.map +1 -1
  113. package/dist/components/toast/toast-provider.mjs +1 -1
  114. package/dist/components/usage-banner.js +5 -1
  115. package/dist/components/usage-banner.js.map +1 -1
  116. package/dist/components/usage-banner.mjs +1 -1
  117. package/dist/context/coagent-state-renders-context.d.ts +1 -1
  118. package/dist/context/coagent-state-renders-context.js +15 -10
  119. package/dist/context/coagent-state-renders-context.js.map +1 -1
  120. package/dist/context/coagent-state-renders-context.mjs +1 -1
  121. package/dist/context/copilot-context.js +9 -3
  122. package/dist/context/copilot-context.js.map +1 -1
  123. package/dist/context/copilot-context.mjs +1 -1
  124. package/dist/context/index.js +31 -15
  125. package/dist/context/index.js.map +1 -1
  126. package/dist/context/index.mjs +7 -7
  127. package/dist/context/threads-context.d.ts +1 -1
  128. package/dist/context/threads-context.js +7 -2
  129. package/dist/context/threads-context.js.map +1 -1
  130. package/dist/context/threads-context.mjs +1 -1
  131. package/dist/hooks/index.js +162 -61
  132. package/dist/hooks/index.js.map +1 -1
  133. package/dist/hooks/index.mjs +26 -26
  134. package/dist/hooks/use-coagent-state-render-bridge.helpers.js +7 -1
  135. package/dist/hooks/use-coagent-state-render-bridge.helpers.js.map +1 -1
  136. package/dist/hooks/use-coagent-state-render-bridge.helpers.mjs +1 -1
  137. package/dist/hooks/use-coagent-state-render-bridge.js +31 -15
  138. package/dist/hooks/use-coagent-state-render-bridge.js.map +1 -1
  139. package/dist/hooks/use-coagent-state-render-bridge.mjs +6 -6
  140. package/dist/hooks/use-coagent-state-render-registry.js +14 -3
  141. package/dist/hooks/use-coagent-state-render-registry.js.map +1 -1
  142. package/dist/hooks/use-coagent-state-render-registry.mjs +2 -2
  143. package/dist/hooks/use-coagent-state-render.js +34 -21
  144. package/dist/hooks/use-coagent-state-render.js.map +1 -1
  145. package/dist/hooks/use-coagent-state-render.mjs +4 -4
  146. package/dist/hooks/use-coagent.js +3 -1
  147. package/dist/hooks/use-coagent.js.map +1 -1
  148. package/dist/hooks/use-coagent.mjs +1 -1
  149. package/dist/hooks/use-configure-chat-suggestions.js.map +1 -1
  150. package/dist/hooks/use-configure-chat-suggestions.mjs.map +1 -1
  151. package/dist/hooks/use-copilot-action.js +13 -9
  152. package/dist/hooks/use-copilot-action.js.map +1 -1
  153. package/dist/hooks/use-copilot-action.mjs +4 -4
  154. package/dist/hooks/use-copilot-additional-instructions.d.ts +1 -1
  155. package/dist/hooks/use-copilot-additional-instructions.js +26 -7
  156. package/dist/hooks/use-copilot-additional-instructions.js.map +1 -1
  157. package/dist/hooks/use-copilot-additional-instructions.mjs +2 -2
  158. package/dist/hooks/use-copilot-authenticated-action.js +25 -13
  159. package/dist/hooks/use-copilot-authenticated-action.js.map +1 -1
  160. package/dist/hooks/use-copilot-authenticated-action.mjs +6 -6
  161. package/dist/hooks/use-copilot-chat-headless_c.js +81 -27
  162. package/dist/hooks/use-copilot-chat-headless_c.js.map +1 -1
  163. package/dist/hooks/use-copilot-chat-headless_c.mjs +12 -12
  164. package/dist/hooks/use-copilot-chat-suggestions.js.map +1 -1
  165. package/dist/hooks/use-copilot-chat-suggestions.mjs +1 -1
  166. package/dist/hooks/use-copilot-chat.js +81 -27
  167. package/dist/hooks/use-copilot-chat.js.map +1 -1
  168. package/dist/hooks/use-copilot-chat.mjs +12 -12
  169. package/dist/hooks/use-copilot-chat_internal.js +81 -27
  170. package/dist/hooks/use-copilot-chat_internal.js.map +1 -1
  171. package/dist/hooks/use-copilot-chat_internal.mjs +11 -11
  172. package/dist/hooks/use-copilot-runtime-client.js +4 -1
  173. package/dist/hooks/use-copilot-runtime-client.js.map +1 -1
  174. package/dist/hooks/use-copilot-runtime-client.mjs +2 -2
  175. package/dist/hooks/use-default-tool.js +17 -10
  176. package/dist/hooks/use-default-tool.js.map +1 -1
  177. package/dist/hooks/use-default-tool.mjs +5 -5
  178. package/dist/hooks/use-flat-category-store.js +13 -10
  179. package/dist/hooks/use-flat-category-store.js.map +1 -1
  180. package/dist/hooks/use-flat-category-store.mjs +1 -1
  181. package/dist/hooks/use-frontend-tool.js.map +1 -1
  182. package/dist/hooks/use-frontend-tool.mjs +1 -1
  183. package/dist/hooks/use-human-in-the-loop.js.map +1 -1
  184. package/dist/hooks/use-human-in-the-loop.mjs +1 -1
  185. package/dist/hooks/use-langgraph-interrupt-render.js +22 -5
  186. package/dist/hooks/use-langgraph-interrupt-render.js.map +1 -1
  187. package/dist/hooks/use-langgraph-interrupt-render.mjs +4 -4
  188. package/dist/hooks/use-langgraph-interrupt.js +19 -4
  189. package/dist/hooks/use-langgraph-interrupt.js.map +1 -1
  190. package/dist/hooks/use-langgraph-interrupt.mjs +3 -3
  191. package/dist/hooks/use-make-copilot-document-readable.js +9 -3
  192. package/dist/hooks/use-make-copilot-document-readable.js.map +1 -1
  193. package/dist/hooks/use-make-copilot-document-readable.mjs +2 -2
  194. package/dist/hooks/use-render-tool-call.d.ts +1 -1
  195. package/dist/hooks/use-render-tool-call.js +13 -9
  196. package/dist/hooks/use-render-tool-call.js.map +1 -1
  197. package/dist/hooks/use-render-tool-call.mjs +1 -1
  198. package/dist/hooks/use-tree.js +4 -1
  199. package/dist/hooks/use-tree.js.map +1 -1
  200. package/dist/hooks/use-tree.mjs +1 -1
  201. package/dist/index.js +311 -130
  202. package/dist/index.js.map +1 -1
  203. package/dist/index.mjs +52 -52
  204. package/dist/index.umd.js +1 -1
  205. package/dist/index.umd.js.map +1 -1
  206. package/dist/lib/copilot-task.js +10 -3
  207. package/dist/lib/copilot-task.js.map +1 -1
  208. package/dist/lib/copilot-task.mjs +18 -18
  209. package/dist/lib/index.js +10 -3
  210. package/dist/lib/index.js.map +1 -1
  211. package/dist/lib/index.mjs +18 -18
  212. package/dist/lib/status-checker.js.map +1 -1
  213. package/dist/lib/status-checker.mjs +1 -1
  214. package/dist/types/coagent-action.js.map +1 -1
  215. package/dist/types/frontend-action.js +3 -1
  216. package/dist/types/frontend-action.js.map +1 -1
  217. package/dist/types/frontend-action.mjs +1 -1
  218. package/dist/types/interrupt-action.js.map +1 -1
  219. package/dist/v2/index.umd.js.map +1 -1
  220. package/jest.config.js +1 -0
  221. package/package.json +5 -6
  222. package/src/__mocks__/analytics-node.js +9 -0
  223. package/src/components/CopilotListeners.tsx +21 -5
  224. package/src/components/copilot-provider/__tests__/copilotkit-error.test.tsx +3 -1
  225. package/src/components/copilot-provider/copilot-messages.tsx +36 -11
  226. package/src/components/copilot-provider/copilotkit-props.tsx +4 -1
  227. package/src/components/copilot-provider/copilotkit.tsx +116 -50
  228. package/src/components/dev-console/console-trigger.tsx +39 -10
  229. package/src/components/dev-console/developer-console-modal.tsx +207 -57
  230. package/src/components/dev-console/icons.tsx +6 -1
  231. package/src/components/error-boundary/error-boundary.tsx +10 -2
  232. package/src/components/error-boundary/error-utils.tsx +8 -3
  233. package/src/components/toast/toast-provider.tsx +16 -6
  234. package/src/components/usage-banner.tsx +9 -2
  235. package/src/context/coagent-state-renders-context.tsx +24 -12
  236. package/src/context/copilot-context.tsx +48 -15
  237. package/src/context/index.ts +8 -2
  238. package/src/context/threads-context.tsx +14 -3
  239. package/src/hooks/__tests__/use-coagent-state-render-bridge.helpers.test.ts +11 -4
  240. package/src/hooks/__tests__/use-coagent-state-render.e2e.test.tsx +175 -47
  241. package/src/hooks/__tests__/use-coagent-state-render.test.tsx +31 -10
  242. package/src/hooks/__tests__/use-frontend-tool-remount.e2e.test.tsx +10 -2
  243. package/src/hooks/use-coagent-state-render-bridge.helpers.ts +49 -16
  244. package/src/hooks/use-coagent-state-render-bridge.tsx +30 -13
  245. package/src/hooks/use-coagent-state-render-registry.ts +36 -21
  246. package/src/hooks/use-coagent-state-render.ts +30 -19
  247. package/src/hooks/use-coagent.ts +15 -4
  248. package/src/hooks/use-configure-chat-suggestions.tsx +14 -4
  249. package/src/hooks/use-copilot-action.ts +12 -3
  250. package/src/hooks/use-copilot-additional-instructions.ts +17 -4
  251. package/src/hooks/use-copilot-authenticated-action.ts +4 -1
  252. package/src/hooks/use-copilot-chat-headless_c.ts +8 -2
  253. package/src/hooks/use-copilot-chat-suggestions.tsx +14 -4
  254. package/src/hooks/use-copilot-chat.ts +3 -1
  255. package/src/hooks/use-copilot-chat_internal.ts +72 -19
  256. package/src/hooks/use-copilot-runtime-client.ts +20 -6
  257. package/src/hooks/use-default-tool.ts +8 -2
  258. package/src/hooks/use-flat-category-store.ts +15 -11
  259. package/src/hooks/use-frontend-tool.ts +35 -25
  260. package/src/hooks/use-human-in-the-loop.ts +21 -5
  261. package/src/hooks/use-langgraph-interrupt-render.ts +13 -2
  262. package/src/hooks/use-langgraph-interrupt.ts +13 -3
  263. package/src/hooks/use-render-tool-call.ts +20 -11
  264. package/src/hooks/use-tree.ts +20 -5
  265. package/src/lib/copilot-task.ts +20 -6
  266. package/src/lib/status-checker.ts +4 -1
  267. package/src/types/coagent-action.ts +6 -2
  268. package/src/types/frontend-action.ts +16 -5
  269. package/src/types/interrupt-action.ts +15 -5
  270. package/tsconfig.json +1 -1
  271. package/dist/chunk-4RRMC7L2.mjs.map +0 -1
  272. package/dist/chunk-6ESSSQ7Q.mjs.map +0 -1
  273. package/dist/chunk-6PUNP7CD.mjs.map +0 -1
  274. package/dist/chunk-77IVITG3.mjs.map +0 -1
  275. package/dist/chunk-7DTB7S5V.mjs.map +0 -1
  276. package/dist/chunk-7JTI6ZL4.mjs.map +0 -1
  277. package/dist/chunk-ABWT4DRT.mjs +0 -24
  278. package/dist/chunk-AFNWX62Q.mjs.map +0 -1
  279. package/dist/chunk-BKMJ4LC7.mjs.map +0 -1
  280. package/dist/chunk-C3YJYDK4.mjs.map +0 -1
  281. package/dist/chunk-DQXCQWSG.mjs.map +0 -1
  282. package/dist/chunk-EFL5OBKN.mjs.map +0 -1
  283. package/dist/chunk-HE22TZMF.mjs.map +0 -1
  284. package/dist/chunk-KNJHRVKW.mjs.map +0 -1
  285. package/dist/chunk-LHERIF3L.mjs.map +0 -1
  286. package/dist/chunk-LMHB2D4J.mjs.map +0 -1
  287. package/dist/chunk-NBK4KBLX.mjs.map +0 -1
  288. package/dist/chunk-PIF5KJYI.mjs.map +0 -1
  289. package/dist/chunk-PMAFHQ7P.mjs.map +0 -1
  290. package/dist/chunk-QD7EID4N.mjs.map +0 -1
  291. package/dist/chunk-RBGVEVWY.mjs.map +0 -1
  292. package/dist/chunk-RKTVJRK7.mjs.map +0 -1
  293. package/dist/chunk-VGL3DGUW.mjs.map +0 -1
  294. package/dist/chunk-VKNLTZJE.mjs.map +0 -1
  295. package/dist/chunk-VP43SLSZ.mjs.map +0 -1
  296. package/dist/chunk-VV56AVPB.mjs.map +0 -1
  297. package/dist/chunk-WF65O6HX.mjs.map +0 -1
  298. package/dist/chunk-YCG6SNAU.mjs.map +0 -1
  299. package/dist/chunk-YYN33GSG.mjs.map +0 -1
  300. package/dist/chunk-ZYTXB6HH.mjs.map +0 -1
  301. /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-DQXCQWSG.mjs";
6
- import "../../chunk-LHERIF3L.mjs";
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-HE22TZMF.mjs";
9
+ import "../../chunk-SFOKX4MH.mjs";
10
10
  import "../../chunk-ICIK2BSB.mjs";
11
- import "../../chunk-RKTVJRK7.mjs";
12
- import "../../chunk-PMAFHQ7P.mjs";
13
- import "../../chunk-YYN33GSG.mjs";
14
- import "../../chunk-6PUNP7CD.mjs";
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-BKMJ4LC7.mjs";
17
+ import "../../chunk-G7SUZGGB.mjs";
18
+ import "../../chunk-QXZTCGF4.mjs";
19
+ import "../../chunk-7GIBHX6X.mjs";
17
20
  import "../../chunk-NB2FKV2V.mjs";
18
- import "../../chunk-LMHB2D4J.mjs";
19
- import "../../chunk-77IVITG3.mjs";
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("Remember to wrap your app in a `<CopilotKit> {...} </CopilotKit>` !!!");
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("Remember to wrap your app in a `<CopilotKit> {...} </CopilotKit>` !!!");
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("Remember to wrap your app in a `<CopilotKit> {...} </CopilotKit>` !!!");
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)("g", { id: "Group-2", transform: "translate(-118, 0)", fill: "#1BC030", fillRule: "nonzero", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("g", { id: "Group", transform: "translate(118, 0)", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
188
- "path",
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
- 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",
191
- id: "Shape"
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({ isOpen, onClose, hasApiKey }) {
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: { name: "search_web", description: "Search the web for information" },
268
- send_email: { name: "send_email", description: "Send an email to a contact" },
269
- create_document: { name: "create_document", description: "Create a new document" },
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": { status: "active", lastUpdate: Date.now() - 15e3 },
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
- { id: "3", role: "user", content: "Can you also add priority levels and due dates?" },
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
- { id: "5", role: "user", content: "Perfect! How about adding categories or tags?" }
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
- { id: "actions", label: "Actions", count: Object.keys(displayContext.actions).length },
453
- { id: "readables", label: "Readables", count: displayContext.getAllContext().length },
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
- { id: "messages", label: "Messages", count: displayMessagesContext.messages.length },
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: { display: "flex", alignItems: "flex-start", justifyContent: "space-between" },
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)("h3", { style: { fontWeight: "600", color: "#1f2937", margin: "0 0 4px 0" }, children: action.name }),
689
- action.description && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("p", { style: { fontSize: "14px", color: "#4b5563", margin: "0 0 12px 0" }, children: action.description }),
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)("div", { style: { display: "flex", flexDirection: "column", gap: "4px" }, children: action.parameters.map((param, pIndex) => /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { style: { fontSize: "14px" }, children: [
705
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { style: { fontFamily: "monospace", color: "#374151" }, children: param.name }),
706
- param.required && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { style: { marginLeft: "4px", fontSize: "12px", color: "#ef4444" }, children: "*required" }),
707
- param.type && /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("span", { style: { marginLeft: "8px", fontSize: "12px", color: "#6b7280" }, children: [
708
- "(",
709
- param.type,
710
- ")"
711
- ] })
712
- ] }, pIndex)) })
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: { display: "flex", alignItems: "flex-start", justifyContent: "space-between" },
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)("h3", { style: { fontWeight: "600", color: "#1f2937", margin: "0 0 4px 0" }, children: readable.name || `Readable ${index + 1}` }),
747
- readable.description && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("p", { style: { fontSize: "14px", color: "#4b5563", margin: "0 0 12px 0" }, children: readable.description }),
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)("h3", { style: { fontWeight: "600", fontSize: "18px", color: "#1f2937", margin: 0 }, children: agentName }),
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({ messagesContext }) {
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)("div", { style: { fontSize: "14px", color: "#1f2937", whiteSpace: "pre-wrap" }, children: message.content || "" })
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)("h3", { style: { fontWeight: "600", color: "#1f2937", margin: "0 0 8px 0" }, children: doc.name || `Document ${index + 1}` }),
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({ position = "bottom-right" }) {
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, { capture: true, passive: false });
1051
- document.addEventListener("mouseup", handleMouseUp, { capture: true, passive: false });
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, { capture: true });
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)("span", { style: { fontSize: "10px", color: "white", fontWeight: "bold" }, children: "!" })
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
  ]