@copilotkit/react-core 0.0.0-main-20250908181442 → 0.0.0-max-runner-auth-20251229210625

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 (363) hide show
  1. package/CHANGELOG.md +475 -3
  2. package/dist/chunk-36KQV2NA.mjs +1 -0
  3. package/dist/{chunk-DSDAZA3B.mjs → chunk-3MHWEKFN.mjs} +5 -5
  4. package/dist/chunk-4RRMC7L2.mjs +32 -0
  5. package/dist/chunk-4RRMC7L2.mjs.map +1 -0
  6. package/dist/{chunk-HWM2Z3J3.mjs → chunk-53K6WNJG.mjs} +8 -6
  7. package/dist/{chunk-HWM2Z3J3.mjs.map → chunk-53K6WNJG.mjs.map} +1 -1
  8. package/dist/{chunk-Q3MCVRO3.mjs → chunk-6ESSSQ7Q.mjs} +8 -21
  9. package/dist/chunk-6ESSSQ7Q.mjs.map +1 -0
  10. package/dist/{chunk-N4WEHORG.mjs → chunk-6PUNP7CD.mjs} +4 -4
  11. package/dist/chunk-6PUNP7CD.mjs.map +1 -0
  12. package/dist/chunk-7DTB7S5V.mjs +83 -0
  13. package/dist/chunk-7DTB7S5V.mjs.map +1 -0
  14. package/dist/{chunk-CXDK6XA5.mjs → chunk-7IBF6RBW.mjs} +3 -3
  15. package/dist/{chunk-CXDK6XA5.mjs.map → chunk-7IBF6RBW.mjs.map} +1 -1
  16. package/dist/chunk-A6NKSGH3.mjs +1 -0
  17. package/dist/{chunk-MZ37BAAE.mjs → chunk-ABWT4DRT.mjs} +2 -2
  18. package/dist/{chunk-YHT6CWIY.mjs → chunk-AFNWX62Q.mjs} +13 -9
  19. package/dist/chunk-AFNWX62Q.mjs.map +1 -0
  20. package/dist/chunk-BUSWSDYO.mjs +17 -0
  21. package/dist/chunk-BUSWSDYO.mjs.map +1 -0
  22. package/dist/chunk-CDUIA2WM.mjs +60 -0
  23. package/dist/chunk-CDUIA2WM.mjs.map +1 -0
  24. package/dist/chunk-CYDWEPFL.mjs +1 -0
  25. package/dist/{chunk-ZLQVRPDS.mjs → chunk-DMLQZG75.mjs} +1 -1
  26. package/dist/chunk-DMLQZG75.mjs.map +1 -0
  27. package/dist/{chunk-KWS75AOU.mjs → chunk-E7SE25ZU.mjs} +3 -3
  28. package/dist/chunk-F555TVE4.mjs +33 -0
  29. package/dist/chunk-F555TVE4.mjs.map +1 -0
  30. package/dist/chunk-FD6FGKYY.mjs +1 -0
  31. package/dist/chunk-FDOMAPJY.mjs +59 -0
  32. package/dist/chunk-FDOMAPJY.mjs.map +1 -0
  33. package/dist/{chunk-ID5JRMGN.mjs → chunk-FQFXYAV7.mjs} +6 -5
  34. package/dist/{chunk-ID5JRMGN.mjs.map → chunk-FQFXYAV7.mjs.map} +1 -1
  35. package/dist/chunk-GPEJNVE5.mjs +80 -0
  36. package/dist/chunk-GPEJNVE5.mjs.map +1 -0
  37. package/dist/chunk-I76HKHPJ.mjs +32 -0
  38. package/dist/chunk-I76HKHPJ.mjs.map +1 -0
  39. package/dist/{chunk-2MGJO3FY.mjs → chunk-INPM7YKW.mjs} +9 -45
  40. package/dist/chunk-INPM7YKW.mjs.map +1 -0
  41. package/dist/chunk-JD7BAH7U.mjs +1 -0
  42. package/dist/chunk-LSHFN2Y5.mjs +349 -0
  43. package/dist/chunk-LSHFN2Y5.mjs.map +1 -0
  44. package/dist/chunk-NB2FKV2V.mjs +1 -0
  45. package/dist/chunk-NBK4KBLX.mjs +54 -0
  46. package/dist/chunk-NBK4KBLX.mjs.map +1 -0
  47. package/dist/chunk-QNUAXSDP.mjs +166 -0
  48. package/dist/chunk-QNUAXSDP.mjs.map +1 -0
  49. package/dist/chunk-RB2TXKFP.mjs +551 -0
  50. package/dist/chunk-RB2TXKFP.mjs.map +1 -0
  51. package/dist/{chunk-5KVEE73R.mjs → chunk-RW2Y52HO.mjs} +2 -2
  52. package/dist/chunk-RW2Y52HO.mjs.map +1 -0
  53. package/dist/{chunk-N4VN2B5S.mjs → chunk-SNON4QA6.mjs} +4 -4
  54. package/dist/chunk-SPCZTZCY.mjs +1 -0
  55. package/dist/chunk-SPCZTZCY.mjs.map +1 -0
  56. package/dist/chunk-VV56AVPB.mjs +125 -0
  57. package/dist/chunk-VV56AVPB.mjs.map +1 -0
  58. package/dist/chunk-WF65O6HX.mjs +66 -0
  59. package/dist/chunk-WF65O6HX.mjs.map +1 -0
  60. package/dist/chunk-XDFVCQD3.mjs +27 -0
  61. package/dist/chunk-XDFVCQD3.mjs.map +1 -0
  62. package/dist/{chunk-2QZSAQTX.mjs → chunk-YTQHRJUA.mjs} +7 -9
  63. package/dist/chunk-YTQHRJUA.mjs.map +1 -0
  64. package/dist/{chunk-5FHSUKQL.mjs → chunk-YYN33GSG.mjs} +5 -2
  65. package/dist/chunk-YYN33GSG.mjs.map +1 -0
  66. package/dist/chunk-Z6JV2LRY.mjs +37 -0
  67. package/dist/chunk-Z6JV2LRY.mjs.map +1 -0
  68. package/dist/chunk-ZVF5Q6IH.mjs +29 -0
  69. package/dist/chunk-ZVF5Q6IH.mjs.map +1 -0
  70. package/dist/chunk-ZYTXB6HH.mjs +151 -0
  71. package/dist/chunk-ZYTXB6HH.mjs.map +1 -0
  72. package/dist/components/CopilotListeners.d.ts +3 -0
  73. package/dist/components/CopilotListeners.js +101 -0
  74. package/dist/components/CopilotListeners.js.map +1 -0
  75. package/dist/components/CopilotListeners.mjs +9 -0
  76. package/dist/components/CopilotListeners.mjs.map +1 -0
  77. package/dist/components/copilot-provider/copilot-messages.js +16 -48
  78. package/dist/components/copilot-provider/copilot-messages.js.map +1 -1
  79. package/dist/components/copilot-provider/copilot-messages.mjs +3 -3
  80. package/dist/components/copilot-provider/copilotkit-props.d.ts +15 -2
  81. package/dist/components/copilot-provider/copilotkit-props.js.map +1 -1
  82. package/dist/components/copilot-provider/copilotkit.d.ts +2 -1
  83. package/dist/components/copilot-provider/copilotkit.js +499 -1309
  84. package/dist/components/copilot-provider/copilotkit.js.map +1 -1
  85. package/dist/components/copilot-provider/copilotkit.mjs +15 -13
  86. package/dist/components/copilot-provider/index.d.ts +2 -1
  87. package/dist/components/copilot-provider/index.js +499 -1309
  88. package/dist/components/copilot-provider/index.js.map +1 -1
  89. package/dist/components/copilot-provider/index.mjs +16 -13
  90. package/dist/components/dev-console/console-trigger.js +75 -10
  91. package/dist/components/dev-console/console-trigger.js.map +1 -1
  92. package/dist/components/dev-console/console-trigger.mjs +226 -6
  93. package/dist/components/dev-console/console-trigger.mjs.map +1 -1
  94. package/dist/components/dev-console/developer-console-modal.js +12 -8
  95. package/dist/components/dev-console/developer-console-modal.js.map +1 -1
  96. package/dist/components/dev-console/developer-console-modal.mjs +3 -3
  97. package/dist/components/error-boundary/error-boundary.d.ts +7 -7
  98. package/dist/components/error-boundary/error-boundary.js +3 -3
  99. package/dist/components/error-boundary/error-boundary.js.map +1 -1
  100. package/dist/components/error-boundary/error-boundary.mjs +3 -3
  101. package/dist/components/error-boundary/error-utils.d.ts +1 -1
  102. package/dist/components/error-boundary/error-utils.js +3 -3
  103. package/dist/components/error-boundary/error-utils.js.map +1 -1
  104. package/dist/components/error-boundary/error-utils.mjs +1 -1
  105. package/dist/components/index.d.ts +2 -1
  106. package/dist/components/index.js +499 -1309
  107. package/dist/components/index.js.map +1 -1
  108. package/dist/components/index.mjs +17 -13
  109. package/dist/components/toast/exclamation-mark-icon.d.ts +2 -2
  110. package/dist/components/toast/toast-provider.d.ts +3 -3
  111. package/dist/components/usage-banner.d.ts +2 -2
  112. package/dist/context/coagent-state-renders-context.d.ts +24 -0
  113. package/dist/context/coagent-state-renders-context.js +91 -0
  114. package/dist/context/coagent-state-renders-context.js.map +1 -0
  115. package/dist/context/coagent-state-renders-context.mjs +12 -0
  116. package/dist/context/coagent-state-renders-context.mjs.map +1 -0
  117. package/dist/context/copilot-context.d.ts +1 -1
  118. package/dist/context/copilot-context.js +12 -8
  119. package/dist/context/copilot-context.js.map +1 -1
  120. package/dist/context/copilot-context.mjs +1 -1
  121. package/dist/context/copilot-messages-context.d.ts +18 -11
  122. package/dist/context/copilot-messages-context.js.map +1 -1
  123. package/dist/context/copilot-messages-context.mjs +1 -1
  124. package/dist/context/index.d.ts +6 -2
  125. package/dist/context/index.js +112 -10
  126. package/dist/context/index.js.map +1 -1
  127. package/dist/context/index.mjs +23 -7
  128. package/dist/context/threads-context.d.ts +16 -0
  129. package/dist/context/threads-context.js +59 -0
  130. package/dist/context/threads-context.js.map +1 -0
  131. package/dist/context/threads-context.mjs +12 -0
  132. package/dist/context/threads-context.mjs.map +1 -0
  133. package/dist/{copilot-context-59740e82.d.ts → copilot-context-ec77e921.d.ts} +35 -31
  134. package/dist/hooks/index.d.ts +13 -6
  135. package/dist/hooks/index.js +1126 -1821
  136. package/dist/hooks/index.js.map +1 -1
  137. package/dist/hooks/index.mjs +55 -47
  138. package/dist/hooks/use-agent-nodename.d.ts +3 -0
  139. package/dist/hooks/use-agent-nodename.js +56 -0
  140. package/dist/hooks/use-agent-nodename.js.map +1 -0
  141. package/dist/hooks/use-agent-nodename.mjs +8 -0
  142. package/dist/hooks/use-agent-nodename.mjs.map +1 -0
  143. package/dist/hooks/use-coagent-state-render-bridge.d.ts +100 -0
  144. package/dist/hooks/use-coagent-state-render-bridge.js +214 -0
  145. package/dist/hooks/use-coagent-state-render-bridge.js.map +1 -0
  146. package/dist/hooks/use-coagent-state-render-bridge.mjs +15 -0
  147. package/dist/hooks/use-coagent-state-render-bridge.mjs.map +1 -0
  148. package/dist/hooks/use-coagent-state-render.js +33 -20
  149. package/dist/hooks/use-coagent-state-render.js.map +1 -1
  150. package/dist/hooks/use-coagent-state-render.mjs +3 -2
  151. package/dist/hooks/use-coagent.d.ts +2 -14
  152. package/dist/hooks/use-coagent.js +138 -1907
  153. package/dist/hooks/use-coagent.js.map +1 -1
  154. package/dist/hooks/use-coagent.mjs +2 -30
  155. package/dist/hooks/use-configure-chat-suggestions.d.ts +36 -0
  156. package/dist/hooks/use-configure-chat-suggestions.js +79 -0
  157. package/dist/hooks/use-configure-chat-suggestions.js.map +1 -0
  158. package/dist/hooks/use-configure-chat-suggestions.mjs +47 -0
  159. package/dist/hooks/use-configure-chat-suggestions.mjs.map +1 -0
  160. package/dist/hooks/use-copilot-action.d.ts +8 -45
  161. package/dist/hooks/use-copilot-action.js +219 -347
  162. package/dist/hooks/use-copilot-action.js.map +1 -1
  163. package/dist/hooks/use-copilot-action.mjs +4 -5
  164. package/dist/hooks/use-copilot-additional-instructions.js +12 -8
  165. package/dist/hooks/use-copilot-additional-instructions.js.map +1 -1
  166. package/dist/hooks/use-copilot-additional-instructions.mjs +2 -2
  167. package/dist/hooks/use-copilot-authenticated-action.js +238 -248
  168. package/dist/hooks/use-copilot-authenticated-action.js.map +1 -1
  169. package/dist/hooks/use-copilot-authenticated-action.mjs +6 -6
  170. package/dist/hooks/use-copilot-chat-headless_c.d.ts +2 -10
  171. package/dist/hooks/use-copilot-chat-headless_c.js +587 -1385
  172. package/dist/hooks/use-copilot-chat-headless_c.js.map +1 -1
  173. package/dist/hooks/use-copilot-chat-headless_c.mjs +12 -22
  174. package/dist/hooks/use-copilot-chat-suggestions.d.ts +35 -0
  175. package/dist/hooks/use-copilot-chat-suggestions.js +60 -0
  176. package/dist/hooks/use-copilot-chat-suggestions.js.map +1 -0
  177. package/dist/hooks/use-copilot-chat-suggestions.mjs +8 -0
  178. package/dist/hooks/use-copilot-chat-suggestions.mjs.map +1 -0
  179. package/dist/hooks/use-copilot-chat.d.ts +2 -10
  180. package/dist/hooks/use-copilot-chat.js +581 -1404
  181. package/dist/hooks/use-copilot-chat.js.map +1 -1
  182. package/dist/hooks/use-copilot-chat.mjs +12 -22
  183. package/dist/hooks/use-copilot-chat_internal.d.ts +78 -15
  184. package/dist/hooks/use-copilot-chat_internal.js +579 -1378
  185. package/dist/hooks/use-copilot-chat_internal.js.map +1 -1
  186. package/dist/hooks/use-copilot-chat_internal.mjs +13 -23
  187. package/dist/hooks/use-copilot-readable.d.ts +1 -1
  188. package/dist/hooks/use-copilot-readable.js +25 -150
  189. package/dist/hooks/use-copilot-readable.js.map +1 -1
  190. package/dist/hooks/use-copilot-readable.mjs +1 -2
  191. package/dist/hooks/use-copilot-runtime-client.js +7 -32
  192. package/dist/hooks/use-copilot-runtime-client.js.map +1 -1
  193. package/dist/hooks/use-copilot-runtime-client.mjs +1 -2
  194. package/dist/hooks/use-default-tool.d.ts +8 -0
  195. package/dist/hooks/use-default-tool.js +302 -0
  196. package/dist/hooks/use-default-tool.js.map +1 -0
  197. package/dist/hooks/use-default-tool.mjs +12 -0
  198. package/dist/hooks/use-default-tool.mjs.map +1 -0
  199. package/dist/hooks/use-flat-category-store.js +4 -1
  200. package/dist/hooks/use-flat-category-store.js.map +1 -1
  201. package/dist/hooks/use-flat-category-store.mjs +1 -1
  202. package/dist/hooks/use-frontend-tool.d.ts +11 -0
  203. package/dist/hooks/use-frontend-tool.js +104 -0
  204. package/dist/hooks/use-frontend-tool.js.map +1 -0
  205. package/dist/hooks/use-frontend-tool.mjs +8 -0
  206. package/dist/hooks/use-frontend-tool.mjs.map +1 -0
  207. package/dist/hooks/use-human-in-the-loop.d.ts +13 -0
  208. package/dist/hooks/use-human-in-the-loop.js +122 -0
  209. package/dist/hooks/use-human-in-the-loop.js.map +1 -0
  210. package/dist/hooks/use-human-in-the-loop.mjs +8 -0
  211. package/dist/hooks/use-human-in-the-loop.mjs.map +1 -0
  212. package/dist/hooks/use-langgraph-interrupt-render.d.ts +3 -2
  213. package/dist/hooks/use-langgraph-interrupt-render.js +159 -37
  214. package/dist/hooks/use-langgraph-interrupt-render.js.map +1 -1
  215. package/dist/hooks/use-langgraph-interrupt-render.mjs +7 -4
  216. package/dist/hooks/use-langgraph-interrupt.d.ts +1 -1
  217. package/dist/hooks/use-langgraph-interrupt.js +26 -1647
  218. package/dist/hooks/use-langgraph-interrupt.js.map +1 -1
  219. package/dist/hooks/use-langgraph-interrupt.mjs +2 -23
  220. package/dist/hooks/use-lazy-tool-renderer.d.ts +6 -0
  221. package/dist/hooks/use-lazy-tool-renderer.js +53 -0
  222. package/dist/hooks/use-lazy-tool-renderer.js.map +1 -0
  223. package/dist/hooks/use-lazy-tool-renderer.mjs +8 -0
  224. package/dist/hooks/use-lazy-tool-renderer.mjs.map +1 -0
  225. package/dist/hooks/use-make-copilot-document-readable.js +13 -9
  226. package/dist/hooks/use-make-copilot-document-readable.js.map +1 -1
  227. package/dist/hooks/use-make-copilot-document-readable.mjs +2 -2
  228. package/dist/hooks/use-render-tool-call.d.ts +12 -0
  229. package/dist/hooks/use-render-tool-call.js +90 -0
  230. package/dist/hooks/use-render-tool-call.js.map +1 -0
  231. package/dist/hooks/use-render-tool-call.mjs +8 -0
  232. package/dist/hooks/use-render-tool-call.mjs.map +1 -0
  233. package/dist/index.d.ts +15 -6
  234. package/dist/index.js +1498 -2955
  235. package/dist/index.js.map +1 -1
  236. package/dist/index.mjs +94 -61
  237. package/dist/lib/copilot-task.d.ts +2 -2
  238. package/dist/lib/copilot-task.js +1 -0
  239. package/dist/lib/copilot-task.js.map +1 -1
  240. package/dist/lib/copilot-task.mjs +18 -14
  241. package/dist/lib/index.d.ts +1 -1
  242. package/dist/lib/index.js +1 -0
  243. package/dist/lib/index.js.map +1 -1
  244. package/dist/lib/index.mjs +18 -14
  245. package/dist/setupTests.d.ts +2 -2
  246. package/dist/types/frontend-action.d.ts +5 -5
  247. package/dist/types/index.d.ts +4 -0
  248. package/dist/types/index.js.map +1 -1
  249. package/dist/types/index.mjs +2 -1
  250. package/dist/types/interrupt-action.d.ts +1 -1
  251. package/dist/types/interrupt-action.js.map +1 -1
  252. package/dist/types/interrupt-action.mjs +1 -0
  253. package/dist/utils/index.d.ts +0 -12
  254. package/dist/utils/index.js +6 -325
  255. package/dist/utils/index.js.map +1 -1
  256. package/dist/utils/index.mjs +1 -21
  257. package/dist/utils/utils.js.map +1 -1
  258. package/dist/v2/index.css +4 -0
  259. package/dist/v2/index.css.map +1 -0
  260. package/dist/v2/index.d.ts +2 -0
  261. package/dist/v2/index.js +27 -0
  262. package/dist/v2/index.js.map +1 -0
  263. package/dist/v2/index.mjs +6 -0
  264. package/dist/v2/index.mjs.map +1 -0
  265. package/jest.config.js +12 -0
  266. package/package.json +24 -10
  267. package/src/components/CopilotListeners.tsx +81 -0
  268. package/src/components/copilot-provider/copilot-messages.tsx +6 -48
  269. package/src/components/copilot-provider/copilotkit-props.tsx +15 -1
  270. package/src/components/copilot-provider/copilotkit.tsx +193 -142
  271. package/src/components/dev-console/console-trigger.tsx +66 -2
  272. package/src/components/error-boundary/error-utils.tsx +3 -3
  273. package/src/context/coagent-state-renders-context.tsx +76 -0
  274. package/src/context/copilot-context.tsx +21 -21
  275. package/src/context/copilot-messages-context.tsx +3 -3
  276. package/src/context/index.ts +8 -0
  277. package/src/context/threads-context.tsx +41 -0
  278. package/src/hooks/__tests__/use-coagent-config.test.ts +189 -129
  279. package/src/hooks/index.ts +16 -3
  280. package/src/hooks/use-agent-nodename.ts +30 -0
  281. package/src/hooks/use-coagent-state-render-bridge.tsx +293 -0
  282. package/src/hooks/use-coagent-state-render.ts +4 -7
  283. package/src/hooks/use-coagent.ts +136 -247
  284. package/src/hooks/use-configure-chat-suggestions.tsx +86 -0
  285. package/src/hooks/use-copilot-action.ts +88 -199
  286. package/src/hooks/use-copilot-chat-headless_c.ts +2 -1
  287. package/src/hooks/use-copilot-chat-suggestions.tsx +124 -0
  288. package/src/hooks/use-copilot-chat.ts +4 -1
  289. package/src/hooks/use-copilot-chat_internal.ts +411 -264
  290. package/src/hooks/use-copilot-readable.ts +23 -25
  291. package/src/hooks/use-copilot-runtime-client.ts +10 -21
  292. package/src/hooks/use-default-tool.ts +7 -0
  293. package/src/hooks/use-flat-category-store.ts +4 -3
  294. package/src/hooks/use-frontend-tool.ts +96 -0
  295. package/src/hooks/use-human-in-the-loop.ts +122 -0
  296. package/src/hooks/use-langgraph-interrupt-render.ts +109 -40
  297. package/src/hooks/use-langgraph-interrupt.ts +17 -42
  298. package/src/hooks/use-lazy-tool-renderer.tsx +30 -0
  299. package/src/hooks/use-make-copilot-document-readable.ts +1 -1
  300. package/src/hooks/use-render-tool-call.ts +80 -0
  301. package/src/lib/copilot-task.ts +1 -1
  302. package/src/types/index.ts +1 -0
  303. package/src/types/interrupt-action.ts +7 -3
  304. package/src/utils/index.ts +0 -3
  305. package/src/utils/utils.ts +7 -0
  306. package/src/v2/index.css +1 -0
  307. package/src/v2/index.ts +4 -0
  308. package/tsup.config.ts +1 -1
  309. package/dist/chunk-2MGJO3FY.mjs.map +0 -1
  310. package/dist/chunk-2QZSAQTX.mjs.map +0 -1
  311. package/dist/chunk-36FJAVOF.mjs +0 -37
  312. package/dist/chunk-36FJAVOF.mjs.map +0 -1
  313. package/dist/chunk-5FHSUKQL.mjs.map +0 -1
  314. package/dist/chunk-5KVEE73R.mjs.map +0 -1
  315. package/dist/chunk-6WTWBXEJ.mjs +0 -797
  316. package/dist/chunk-6WTWBXEJ.mjs.map +0 -1
  317. package/dist/chunk-AALETENN.mjs +0 -170
  318. package/dist/chunk-AALETENN.mjs.map +0 -1
  319. package/dist/chunk-CLAHAV6J.mjs +0 -332
  320. package/dist/chunk-CLAHAV6J.mjs.map +0 -1
  321. package/dist/chunk-EBSAU46C.mjs +0 -65
  322. package/dist/chunk-EBSAU46C.mjs.map +0 -1
  323. package/dist/chunk-JEMBA7PE.mjs +0 -142
  324. package/dist/chunk-JEMBA7PE.mjs.map +0 -1
  325. package/dist/chunk-KDAZGZ24.mjs +0 -1
  326. package/dist/chunk-LLLCUHOO.mjs +0 -709
  327. package/dist/chunk-LLLCUHOO.mjs.map +0 -1
  328. package/dist/chunk-N4WEHORG.mjs.map +0 -1
  329. package/dist/chunk-Q3MCVRO3.mjs.map +0 -1
  330. package/dist/chunk-QF3Q5LUN.mjs +0 -47
  331. package/dist/chunk-QF3Q5LUN.mjs.map +0 -1
  332. package/dist/chunk-QNJNOZH3.mjs +0 -239
  333. package/dist/chunk-QNJNOZH3.mjs.map +0 -1
  334. package/dist/chunk-YHT6CWIY.mjs.map +0 -1
  335. package/dist/chunk-YPBKY4KY.mjs +0 -1
  336. package/dist/chunk-YPSGKPDA.mjs +0 -1
  337. package/dist/chunk-ZLQVRPDS.mjs.map +0 -1
  338. package/dist/hooks/use-chat.d.ts +0 -145
  339. package/dist/hooks/use-chat.js +0 -1138
  340. package/dist/hooks/use-chat.js.map +0 -1
  341. package/dist/hooks/use-chat.mjs +0 -15
  342. package/dist/index-d1743abe.d.ts +0 -36
  343. package/dist/utils/extract.d.ts +0 -43
  344. package/dist/utils/extract.js +0 -208
  345. package/dist/utils/extract.js.map +0 -1
  346. package/dist/utils/extract.mjs +0 -25
  347. package/dist/utils/suggestions.d.ts +0 -11
  348. package/dist/utils/suggestions.js +0 -343
  349. package/dist/utils/suggestions.js.map +0 -1
  350. package/dist/utils/suggestions.mjs +0 -25
  351. package/src/hooks/use-chat.ts +0 -1126
  352. package/src/utils/extract.ts +0 -215
  353. package/src/utils/suggestions.ts +0 -208
  354. /package/dist/{chunk-KDAZGZ24.mjs.map → chunk-36KQV2NA.mjs.map} +0 -0
  355. /package/dist/{chunk-DSDAZA3B.mjs.map → chunk-3MHWEKFN.mjs.map} +0 -0
  356. /package/dist/{chunk-YPBKY4KY.mjs.map → chunk-A6NKSGH3.mjs.map} +0 -0
  357. /package/dist/{chunk-MZ37BAAE.mjs.map → chunk-ABWT4DRT.mjs.map} +0 -0
  358. /package/dist/{chunk-YPSGKPDA.mjs.map → chunk-CYDWEPFL.mjs.map} +0 -0
  359. /package/dist/{chunk-KWS75AOU.mjs.map → chunk-E7SE25ZU.mjs.map} +0 -0
  360. /package/dist/{hooks/use-chat.mjs.map → chunk-FD6FGKYY.mjs.map} +0 -0
  361. /package/dist/{utils/extract.mjs.map → chunk-JD7BAH7U.mjs.map} +0 -0
  362. /package/dist/{utils/suggestions.mjs.map → chunk-NB2FKV2V.mjs.map} +0 -0
  363. /package/dist/{chunk-N4VN2B5S.mjs.map → chunk-SNON4QA6.mjs.map} +0 -0
package/CHANGELOG.md CHANGED
@@ -1,6 +1,478 @@
1
1
  # ui
2
2
 
3
- ## 0.0.0-main-20250908181442
3
+ ## 0.0.0-max-runner-auth-20251229210625
4
+
5
+ ### Patch Changes
6
+
7
+ - @copilotkit/runtime-client-gql@0.0.0-max-runner-auth-20251229210625
8
+ - @copilotkit/shared@0.0.0-max-runner-auth-20251229210625
9
+
10
+ ## 1.50.1
11
+
12
+ ### Patch Changes
13
+
14
+ - bdc7a8f: - fix: restore message callbacks
15
+ - 80dffec: Updated the default model and API version for the Google GenAI adapter
16
+ - cfa4185: - fix: fix stale state in handler
17
+ - eac8b20: - fix: use latest vnext
18
+ - Updated dependencies [80dffec]
19
+ - @copilotkit/runtime-client-gql@1.50.1
20
+ - @copilotkit/shared@1.50.1
21
+
22
+ ## 1.50.1-next.3
23
+
24
+ ### Patch Changes
25
+
26
+ - eac8b20: - fix: use latest vnext
27
+ - @copilotkit/runtime-client-gql@1.50.1-next.3
28
+ - @copilotkit/shared@1.50.1-next.3
29
+
30
+ ## 1.50.1-next.2
31
+
32
+ ### Patch Changes
33
+
34
+ - bdc7a8f: - fix: restore message callbacks
35
+ - @copilotkit/runtime-client-gql@1.50.1-next.2
36
+ - @copilotkit/shared@1.50.1-next.2
37
+
38
+ ## 1.50.1-next.1
39
+
40
+ ### Patch Changes
41
+
42
+ - cfa4185: - fix: fix stale state in handler
43
+ - @copilotkit/runtime-client-gql@1.50.1-next.1
44
+ - @copilotkit/shared@1.50.1-next.1
45
+
46
+ ## 1.50.1-next.0
47
+
48
+ ### Patch Changes
49
+
50
+ - Updated the default model and API version for the Google GenAI adapter
51
+ - Updated dependencies
52
+ - @copilotkit/runtime-client-gql@1.50.1-next.0
53
+ - @copilotkit/shared@1.50.1-next.0
54
+
55
+ ## 1.50.0
56
+
57
+ ### Minor Changes
58
+
59
+ - 0fc76d7: add new runner with telemetry baked in
60
+ - c942f9c: Minor fixes and stability improvements
61
+ - bad5f06: - feat: port old endpoint creators to 2.0
62
+ - 33f47e3: - fix: fix predictive state update
63
+ - fix: fix state setters
64
+ - eed6021: Updating to the latest version of vnext
65
+ - 3b7367e: Improving general stability around LangChain
66
+ - 7ff9ca7: Minor fixes and improvements
67
+ - 974875e: Lint and format code to resolve Prettier errors
68
+ - 3bd484f: Minor fixes and stability improvements
69
+ - 5a534bf: fix telemetry in v1.50 runtime
70
+ - 907ae5d: - feat: route CPK implementation to 2.0 copilotkitnext
71
+ - 769a06c: Refactor suggestions to not always run
72
+ - 788292b: Improving langchain dependency resolution
73
+ - eab69a2: Enabling the new inspector
74
+ - 0a7bfe0: Updating dependency versions across all packages
75
+
76
+ ### Patch Changes
77
+
78
+ - 8ce60af: - feat: enable coagent state renders
79
+ - 04057d5: - fix: refrain from adding placeholder message
80
+ - 6ce0edc: - fix: refrain from re-setting context infinitely if it hasnt changed
81
+ - fix: pass only strings to context value
82
+ - fix: allow custom convert and availability setup
83
+ - 2c93ff1: - fix: re-enable repeatable interrupt renders
84
+ - b0e3652: - chore: Update to latest of vnext
85
+ - 7643e71: - fix: make suggestions available
86
+ - d55a8bd: - feat(runtime): export v2 of the runtime as a subpackage
87
+ - fix(runtime): update method for merging tools in assignToolsToAgent
88
+ - fix: remove redundant agent instantiation code
89
+ - c38da1c: - feat: add suggestions support to 1.5
90
+ - 3c60073: - fix: better sync back-and-forth state, including initial state
91
+ - 962546c: - fix: resolve agent name directly from provider props
92
+ - ca8eb39: - fix: fix result arguments passed to tool calls
93
+ - c3d55e5: - fix: refactor interrupts mechanism to use a queue
94
+ - 5840bab: - fix: adjust dependencies
95
+ - 7808fac: - feat: add spinner indicator to show chat readiness for conversation
96
+ - c70210e: - feat: use copilotnext's single endpoint
97
+ - d2c57a1: - fix: export v2 styles
98
+ - Updated dependencies [0fc76d7]
99
+ - Updated dependencies [c942f9c]
100
+ - Updated dependencies [b0e3652]
101
+ - Updated dependencies [eed6021]
102
+ - Updated dependencies [3b7367e]
103
+ - Updated dependencies [7ff9ca7]
104
+ - Updated dependencies [974875e]
105
+ - Updated dependencies [4942f62]
106
+ - Updated dependencies [3bd484f]
107
+ - Updated dependencies [5a534bf]
108
+ - Updated dependencies [769a06c]
109
+ - Updated dependencies [788292b]
110
+ - Updated dependencies [eab69a2]
111
+ - Updated dependencies [0a7bfe0]
112
+ - @copilotkit/runtime-client-gql@1.50.0
113
+ - @copilotkit/shared@1.50.0
114
+
115
+ ## 1.50.0-beta.19
116
+
117
+ ### Minor Changes
118
+
119
+ - Improving langchain dependency resolution
120
+
121
+ ### Patch Changes
122
+
123
+ - Updated dependencies
124
+ - @copilotkit/runtime-client-gql@1.50.0-beta.19
125
+ - @copilotkit/shared@1.50.0-beta.19
126
+
127
+ ## 1.50.0-beta.18
128
+
129
+ ### Minor Changes
130
+
131
+ - Improving general stability around LangChain
132
+
133
+ ### Patch Changes
134
+
135
+ - Updated dependencies
136
+ - @copilotkit/runtime-client-gql@1.50.0-beta.18
137
+ - @copilotkit/shared@1.50.0-beta.18
138
+
139
+ ## 1.50.0-beta.17
140
+
141
+ ### Minor Changes
142
+
143
+ - Minor fixes and improvements
144
+
145
+ ### Patch Changes
146
+
147
+ - Updated dependencies
148
+ - @copilotkit/runtime-client-gql@1.50.0-beta.17
149
+ - @copilotkit/shared@1.50.0-beta.17
150
+
151
+ ## 1.50.0-beta.16
152
+
153
+ ### Minor Changes
154
+
155
+ - Minor fixes and stability improvements
156
+
157
+ ### Patch Changes
158
+
159
+ - Updated dependencies
160
+ - @copilotkit/runtime-client-gql@1.50.0-beta.16
161
+ - @copilotkit/shared@1.50.0-beta.16
162
+
163
+ ## 1.50.0-beta.15
164
+
165
+ ### Minor Changes
166
+
167
+ - Lint and format code to resolve Prettier errors
168
+
169
+ ### Patch Changes
170
+
171
+ - Updated dependencies
172
+ - @copilotkit/runtime-client-gql@1.50.0-beta.15
173
+ - @copilotkit/shared@1.50.0-beta.15
174
+
175
+ ## 1.50.0-beta.14
176
+
177
+ ### Minor Changes
178
+
179
+ - Minor fixes and stability improvements
180
+
181
+ ### Patch Changes
182
+
183
+ - Updated dependencies
184
+ - @copilotkit/runtime-client-gql@1.50.0-beta.14
185
+ - @copilotkit/shared@1.50.0-beta.14
186
+
187
+ ## 1.50.0-beta.13
188
+
189
+ ### Minor Changes
190
+
191
+ - Updating to the latest version of vnext
192
+
193
+ ### Patch Changes
194
+
195
+ - Updated dependencies
196
+ - @copilotkit/runtime-client-gql@1.50.0-beta.13
197
+ - @copilotkit/shared@1.50.0-beta.13
198
+
199
+ ## 1.50.0-beta.12
200
+
201
+ ### Minor Changes
202
+
203
+ - eab69a2: Enabling the new inspector
204
+
205
+ ### Patch Changes
206
+
207
+ - Updated dependencies [eab69a2]
208
+ - @copilotkit/runtime-client-gql@1.50.0-beta.12
209
+ - @copilotkit/shared@1.50.0-beta.12
210
+
211
+ ## 1.50.0-beta.11
212
+
213
+ ### Minor Changes
214
+
215
+ - fix telemetry in v1.50 runtime
216
+
217
+ ### Patch Changes
218
+
219
+ - Updated dependencies
220
+ - @copilotkit/runtime-client-gql@1.50.0-beta.11
221
+ - @copilotkit/shared@1.50.0-beta.11
222
+
223
+ ## 1.50.0-beta.10
224
+
225
+ ### Minor Changes
226
+
227
+ - add new runner with telemetry baked in
228
+
229
+ ### Patch Changes
230
+
231
+ - Updated dependencies
232
+ - @copilotkit/runtime-client-gql@1.50.0-beta.10
233
+ - @copilotkit/shared@1.50.0-beta.10
234
+
235
+ ## 1.50.0-beta.9
236
+
237
+ ### Minor Changes
238
+
239
+ - Refactor suggestions to not always run
240
+
241
+ ### Patch Changes
242
+
243
+ - Updated dependencies
244
+ - @copilotkit/runtime-client-gql@1.50.0-beta.9
245
+ - @copilotkit/shared@1.50.0-beta.9
246
+
247
+ ## 1.50.0-beta.8
248
+
249
+ ### Patch Changes
250
+
251
+ - @copilotkit/runtime-client-gql@1.50.0-beta.8
252
+ - @copilotkit/shared@1.50.0-beta.8
253
+
254
+ ## 1.50.0-beta.7
255
+
256
+ ### Patch Changes
257
+
258
+ - 6ce0edc: - fix: refrain from re-setting context infinitely if it hasnt changed
259
+ - fix: pass only strings to context value
260
+ - fix: allow custom convert and availability setup
261
+ - @copilotkit/runtime-client-gql@1.50.0-beta.7
262
+ - @copilotkit/shared@1.50.0-beta.7
263
+
264
+ ## 1.50.0-beta.6
265
+
266
+ ### Minor Changes
267
+
268
+ - Updating dependency versions across all packages
269
+
270
+ ### Patch Changes
271
+
272
+ - Updated dependencies
273
+ - @copilotkit/runtime-client-gql@1.50.0-beta.6
274
+ - @copilotkit/shared@1.50.0-beta.6
275
+
276
+ ## 1.50.0-beta.4
277
+
278
+ ### Minor Changes
279
+
280
+ - bad5f06: - feat: port old endpoint creators to 2.0
281
+ - 33f47e3: - fix: fix predictive state update
282
+ - fix: fix state setters
283
+ - 907ae5d: - feat: route CPK implementation to 2.0 copilotkitnext
284
+
285
+ ### Patch Changes
286
+
287
+ - 8ce60af: - feat: enable coagent state renders
288
+ - 04057d5: - fix: refrain from adding placeholder message
289
+ - 2c93ff1: - fix: re-enable repeatable interrupt renders
290
+ - b0e3652: - chore: Update to latest of vnext
291
+ - 7643e71: - fix: make suggestions available
292
+ - d55a8bd: - feat(runtime): export v2 of the runtime as a subpackage
293
+ - fix(runtime): update method for merging tools in assignToolsToAgent
294
+ - fix: remove redundant agent instantiation code
295
+ - c38da1c: - feat: add suggestions support to 1.5
296
+ - 3c60073: - fix: better sync back-and-forth state, including initial state
297
+ - 962546c: - fix: resolve agent name directly from provider props
298
+ - ca8eb39: - fix: fix result arguments passed to tool calls
299
+ - c3d55e5: - fix: refactor interrupts mechanism to use a queue
300
+ - 5840bab: - fix: adjust dependencies
301
+ - 7808fac: - feat: add spinner indicator to show chat readiness for conversation
302
+ - c70210e: - feat: use copilotnext's single endpoint
303
+ - d2c57a1: - fix: export v2 styles
304
+ - Updated dependencies [b0e3652]
305
+ - Updated dependencies [4942f62]
306
+ - @copilotkit/runtime-client-gql@1.50.0-beta.4
307
+ - @copilotkit/shared@1.50.0-beta.4
308
+
309
+ ## 1.10.7-next.0
310
+
311
+ ### Patch Changes
312
+
313
+ - @copilotkit/runtime-client-gql@1.10.7-next.0
314
+ - @copilotkit/shared@1.10.7-next.0
315
+
316
+ ## 1.10.6
317
+
318
+ ### Patch Changes
319
+
320
+ - 3ac64bf: - fix: allow disabling actions in the new action hooks
321
+ - c9e499f: - feat: create targeted convenience wrappers around copilot action
322
+ - 8626c5a: - fix: surface errors also in production
323
+ - Updated dependencies [8626c5a]
324
+ - Updated dependencies [e0dd5d5]
325
+ - @copilotkit/runtime-client-gql@1.10.6
326
+ - @copilotkit/shared@1.10.6
327
+
328
+ ## 1.10.6-next.6
329
+
330
+ ### Patch Changes
331
+
332
+ - @copilotkit/runtime-client-gql@1.10.6-next.6
333
+ - @copilotkit/shared@1.10.6-next.6
334
+
335
+ ## 1.10.6-next.5
336
+
337
+ ### Patch Changes
338
+
339
+ - Updated dependencies [e0dd5d5]
340
+ - @copilotkit/shared@1.10.6-next.5
341
+ - @copilotkit/runtime-client-gql@1.10.6-next.5
342
+
343
+ ## 1.10.6-next.4
344
+
345
+ ### Patch Changes
346
+
347
+ - 8626c5a: - fix: surface errors also in production
348
+ - Updated dependencies [8626c5a]
349
+ - @copilotkit/runtime-client-gql@1.10.6-next.4
350
+ - @copilotkit/shared@1.10.6-next.4
351
+
352
+ ## 1.10.6-next.3
353
+
354
+ ### Patch Changes
355
+
356
+ - @copilotkit/runtime-client-gql@1.10.6-next.3
357
+ - @copilotkit/shared@1.10.6-next.3
358
+
359
+ ## 1.10.6-next.2
360
+
361
+ ### Patch Changes
362
+
363
+ - 3ac64bf: - fix: allow disabling actions in the new action hooks
364
+ - @copilotkit/runtime-client-gql@1.10.6-next.2
365
+ - @copilotkit/shared@1.10.6-next.2
366
+
367
+ ## 1.10.6-next.1
368
+
369
+ ### Patch Changes
370
+
371
+ - c9e499f: - feat: create targeted convenience wrappers around copilot action
372
+ - @copilotkit/runtime-client-gql@1.10.6-next.1
373
+ - @copilotkit/shared@1.10.6-next.1
374
+
375
+ ## 1.10.6-next.0
376
+
377
+ ### Patch Changes
378
+
379
+ - @copilotkit/runtime-client-gql@1.10.6-next.0
380
+ - @copilotkit/shared@1.10.6-next.0
381
+
382
+ ## 1.10.5
383
+
384
+ ### Patch Changes
385
+
386
+ - b7bc3a0: - feat: pass copilot readable context to agui agents
387
+ - f3fdd7a: - fix: stop chat from contacting agent that has errored
388
+ - 32c163e: - inspector visibility toggle in ConsoleTrigger component
389
+ - 6112a67: - fix: consider edge cases when regenerate button is used
390
+ - @copilotkit/runtime-client-gql@1.10.5
391
+ - @copilotkit/shared@1.10.5
392
+
393
+ ## 1.10.5-next.10
394
+
395
+ ### Patch Changes
396
+
397
+ - b79ed5c: - fix: prevent double action calls on none render copilot actions
398
+ - @copilotkit/runtime-client-gql@1.10.5-next.10
399
+ - @copilotkit/shared@1.10.5-next.10
400
+
401
+ ## 1.10.5-next.9
402
+
403
+ ### Patch Changes
404
+
405
+ - @copilotkit/runtime-client-gql@1.10.5-next.9
406
+ - @copilotkit/shared@1.10.5-next.9
407
+
408
+ ## 1.10.5-next.8
409
+
410
+ ### Patch Changes
411
+
412
+ - @copilotkit/runtime-client-gql@1.10.5-next.8
413
+ - @copilotkit/shared@1.10.5-next.8
414
+
415
+ ## 1.10.5-next.7
416
+
417
+ ### Patch Changes
418
+
419
+ - @copilotkit/runtime-client-gql@1.10.5-next.7
420
+ - @copilotkit/shared@1.10.5-next.7
421
+
422
+ ## 1.10.5-next.6
423
+
424
+ ### Patch Changes
425
+
426
+ - f3fdd7a: - fix: stop chat from contacting agent that has errored
427
+ - @copilotkit/runtime-client-gql@1.10.5-next.6
428
+ - @copilotkit/shared@1.10.5-next.6
429
+
430
+ ## 1.10.5-next.5
431
+
432
+ ### Patch Changes
433
+
434
+ - 6112a67: - fix: consider edge cases when regenerate button is used
435
+ - @copilotkit/runtime-client-gql@1.10.5-next.5
436
+ - @copilotkit/shared@1.10.5-next.5
437
+
438
+ ## 1.10.5-next.4
439
+
440
+ ### Patch Changes
441
+
442
+ - @copilotkit/runtime-client-gql@1.10.5-next.4
443
+ - @copilotkit/shared@1.10.5-next.4
444
+
445
+ ## 1.10.5-next.3
446
+
447
+ ### Patch Changes
448
+
449
+ - @copilotkit/runtime-client-gql@1.10.5-next.3
450
+ - @copilotkit/shared@1.10.5-next.3
451
+
452
+ ## 1.10.5-next.2
453
+
454
+ ### Patch Changes
455
+
456
+ - @copilotkit/runtime-client-gql@1.10.5-next.2
457
+ - @copilotkit/shared@1.10.5-next.2
458
+
459
+ ## 1.10.5-next.1
460
+
461
+ ### Patch Changes
462
+
463
+ - b7bc3a0: - feat: pass copilot readable context to agui agents
464
+ - @copilotkit/runtime-client-gql@1.10.5-next.1
465
+ - @copilotkit/shared@1.10.5-next.1
466
+
467
+ ## 1.10.5-next.0
468
+
469
+ ### Patch Changes
470
+
471
+ - 32c163e: - inspector visibility toggle in ConsoleTrigger component
472
+ - @copilotkit/runtime-client-gql@1.10.5-next.0
473
+ - @copilotkit/shared@1.10.5-next.0
474
+
475
+ ## 1.10.4
4
476
 
5
477
  ### Patch Changes
6
478
 
@@ -8,8 +480,8 @@
8
480
  - feat: add error as a message option and a component level onError
9
481
  - 052d54d: - fix: enable erasing chat state on new thread creation
10
482
  - Updated dependencies [a640d8e]
11
- - @copilotkit/shared@0.0.0-main-20250908181442
12
- - @copilotkit/runtime-client-gql@0.0.0-main-20250908181442
483
+ - @copilotkit/shared@1.10.4
484
+ - @copilotkit/runtime-client-gql@1.10.4
13
485
 
14
486
  ## 1.10.4-next.3
15
487
 
@@ -0,0 +1 @@
1
+ //# sourceMappingURL=chunk-36KQV2NA.mjs.map
@@ -3,12 +3,12 @@ import {
3
3
  CopilotKitIcon,
4
4
  ExclamationMarkTriangleIcon
5
5
  } from "./chunk-PIF5KJYI.mjs";
6
- import {
7
- useCopilotContext
8
- } from "./chunk-YHT6CWIY.mjs";
9
6
  import {
10
7
  useCopilotMessagesContext
11
- } from "./chunk-ZLQVRPDS.mjs";
8
+ } from "./chunk-DMLQZG75.mjs";
9
+ import {
10
+ useCopilotContext
11
+ } from "./chunk-AFNWX62Q.mjs";
12
12
 
13
13
  // src/components/dev-console/developer-console-modal.tsx
14
14
  import { COPILOTKIT_VERSION } from "@copilotkit/shared";
@@ -756,4 +756,4 @@ function ContextTab({ context }) {
756
756
  export {
757
757
  DeveloperConsoleModal
758
758
  };
759
- //# sourceMappingURL=chunk-DSDAZA3B.mjs.map
759
+ //# sourceMappingURL=chunk-3MHWEKFN.mjs.map
@@ -0,0 +1,32 @@
1
+ import {
2
+ useToast
3
+ } from "./chunk-EFL5OBKN.mjs";
4
+ import {
5
+ CopilotContext
6
+ } from "./chunk-AFNWX62Q.mjs";
7
+ import {
8
+ __spreadProps,
9
+ __spreadValues
10
+ } from "./chunk-SKC7AJIV.mjs";
11
+
12
+ // src/hooks/use-langgraph-interrupt.ts
13
+ import { useContext, useEffect } from "react";
14
+ import { dataToUUID } from "@copilotkit/shared";
15
+ function useLangGraphInterrupt(action, dependencies) {
16
+ const { setInterruptAction, removeInterruptAction, interruptActions, threadId } = useContext(CopilotContext);
17
+ const { addToast } = useToast();
18
+ const actionId = dataToUUID(action, "lgAction");
19
+ useEffect(() => {
20
+ if (!action)
21
+ return;
22
+ setInterruptAction(__spreadProps(__spreadValues({}, action), { id: actionId }));
23
+ return () => {
24
+ removeInterruptAction(actionId);
25
+ };
26
+ }, [setInterruptAction, removeInterruptAction, threadId, actionId, ...dependencies || []]);
27
+ }
28
+
29
+ export {
30
+ useLangGraphInterrupt
31
+ };
32
+ //# sourceMappingURL=chunk-4RRMC7L2.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/hooks/use-langgraph-interrupt.ts"],"sourcesContent":["import { useContext, useEffect, useMemo } from \"react\";\nimport { CopilotContext } from \"../context/copilot-context\";\nimport { LangGraphInterruptRender } from \"../types/interrupt-action\";\nimport { useToast } from \"../components/toast/toast-provider\";\nimport { dataToUUID } from \"@copilotkit/shared\";\n\nexport function useLangGraphInterrupt<TEventValue = any>(\n action: Omit<LangGraphInterruptRender<TEventValue>, \"id\">,\n dependencies?: any[],\n) {\n const { setInterruptAction, removeInterruptAction, interruptActions, threadId } =\n useContext(CopilotContext);\n const { addToast } = useToast();\n\n const actionId = dataToUUID(action, \"lgAction\");\n\n useEffect(() => {\n if (!action) return;\n\n // if (!action.enabled) {\n // TODO: if there are any other actions registered, we need to warn the user that a current action without \"enabled\" might render for everything\n // addToast({\n // type: \"warning\",\n // message: \"An action is already registered for the interrupt event\",\n // });\n // return;\n // }\n\n setInterruptAction({ ...action, id: actionId });\n\n // Cleanup: remove action on unmount\n return () => {\n removeInterruptAction(actionId);\n };\n }, [setInterruptAction, removeInterruptAction, threadId, actionId, ...(dependencies || [])]);\n}\n"],"mappings":";;;;;;;;;;;;AAAA,SAAS,YAAY,iBAA0B;AAI/C,SAAS,kBAAkB;AAEpB,SAAS,sBACd,QACA,cACA;AACA,QAAM,EAAE,oBAAoB,uBAAuB,kBAAkB,SAAS,IAC5E,WAAW,cAAc;AAC3B,QAAM,EAAE,SAAS,IAAI,SAAS;AAE9B,QAAM,WAAW,WAAW,QAAQ,UAAU;AAE9C,YAAU,MAAM;AACd,QAAI,CAAC;AAAQ;AAWb,uBAAmB,iCAAK,SAAL,EAAa,IAAI,SAAS,EAAC;AAG9C,WAAO,MAAM;AACX,4BAAsB,QAAQ;AAAA,IAChC;AAAA,EACF,GAAG,CAAC,oBAAoB,uBAAuB,UAAU,UAAU,GAAI,gBAAgB,CAAC,CAAE,CAAC;AAC7F;","names":[]}
@@ -1,9 +1,9 @@
1
1
  import {
2
- useCopilotChat
3
- } from "./chunk-CLAHAV6J.mjs";
2
+ useCopilotChatInternal
3
+ } from "./chunk-LSHFN2Y5.mjs";
4
4
 
5
5
  // src/hooks/use-copilot-chat.ts
6
- function useCopilotChat2(options = {}) {
6
+ function useCopilotChat(options = {}) {
7
7
  const {
8
8
  visibleMessages,
9
9
  appendMessage,
@@ -11,10 +11,11 @@ function useCopilotChat2(options = {}) {
11
11
  stopGeneration,
12
12
  reset,
13
13
  isLoading,
14
+ isAvailable,
14
15
  runChatCompletion,
15
16
  mcpServers,
16
17
  setMcpServers
17
- } = useCopilotChat(options);
18
+ } = useCopilotChatInternal(options);
18
19
  return {
19
20
  visibleMessages,
20
21
  appendMessage,
@@ -22,6 +23,7 @@ function useCopilotChat2(options = {}) {
22
23
  stopGeneration,
23
24
  reset,
24
25
  isLoading,
26
+ isAvailable,
25
27
  runChatCompletion,
26
28
  mcpServers,
27
29
  setMcpServers
@@ -29,6 +31,6 @@ function useCopilotChat2(options = {}) {
29
31
  }
30
32
 
31
33
  export {
32
- useCopilotChat2 as useCopilotChat
34
+ useCopilotChat
33
35
  };
34
- //# sourceMappingURL=chunk-HWM2Z3J3.mjs.map
36
+ //# sourceMappingURL=chunk-53K6WNJG.mjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/hooks/use-copilot-chat.ts"],"sourcesContent":["/**\n * `useCopilotChat` is a lightweight React hook for headless chat interactions.\n * Perfect for controlling the prebuilt chat components programmatically.\n *\n * **Open Source Friendly** - Works without requiring a free public license key.\n *\n * <Callout title=\"Looking for fully headless UI?\">\n * Get started with [useCopilotChatHeadless_c](https://docs.copilotkit.ai/reference/hooks/useCopilotChatHeadless_c).\n * </Callout>\n *\n * ## Use Cases\n *\n * - **Programmatic Messaging**: Send messages without displaying chat UI\n * - **Programmatic control**: Control prebuilt component programmatically\n * - **Background Operations**: Trigger AI interactions in the background\n * - **Fire-and-Forget**: Send messages without needing to read responses\n *\n * ## Usage\n *\n * ```tsx\n * import { TextMessage, MessageRole } from \"@copilotkit/runtime-client-gql\";\n *\n * const { appendMessage } = useCopilotChat();\n *\n * // Example usage without naming conflicts\n * const handleSendMessage = async (content: string) => {\n * await appendMessage(\n * new TextMessage({\n * role: MessageRole.User,\n * content,\n * })\n * );\n * };\n * ```\n *\n * ## Return Values\n * The following properties are returned from the hook:\n *\n * <PropertyReference name=\"visibleMessages\" type=\"DeprecatedGqlMessage[]\" deprecated>\n * Array of messages in old non-AG-UI format, use for compatibility only\n * </PropertyReference>\n *\n * <PropertyReference name=\"appendMessage\" type=\"(message: DeprecatedGqlMessage, options?) => Promise<void>\" deprecated>\n * Append message using old format, use `sendMessage` instead\n * </PropertyReference>\n *\n * <PropertyReference name=\"reloadMessages\" type=\"(messageId: string) => Promise<void>\">\n * Regenerate the response for a specific message by ID\n * </PropertyReference>\n *\n * <PropertyReference name=\"stopGeneration\" type=\"() => void\">\n * Stop the current message generation process\n * </PropertyReference>\n *\n * <PropertyReference name=\"reset\" type=\"() => void\">\n * Clear all messages and reset chat state completely\n * </PropertyReference>\n *\n * <PropertyReference name=\"isLoading\" type=\"boolean\">\n * Whether the chat is currently generating a response\n * </PropertyReference>\n *\n * <PropertyReference name=\"runChatCompletion\" type=\"() => Promise<Message[]>\">\n * Manually trigger chat completion for advanced usage\n * </PropertyReference>\n *\n * <PropertyReference name=\"mcpServers\" type=\"MCPServerConfig[]\">\n * Array of Model Context Protocol server configurations\n * </PropertyReference>\n *\n * <PropertyReference name=\"setMcpServers\" type=\"(servers: MCPServerConfig[]) => void\">\n * Update MCP server configurations for enhanced context\n * </PropertyReference>\n */\n\nimport {\n UseCopilotChatOptions,\n useCopilotChat as useCopilotChatInternal,\n UseCopilotChatReturn as UseCopilotChatReturnInternal,\n} from \"./use-copilot-chat_internal\";\n\n// Create a type that excludes message-related properties from the internal type\nexport type UseCopilotChatReturn = Omit<\n UseCopilotChatReturnInternal,\n | \"messages\"\n | \"sendMessage\"\n | \"suggestions\"\n | \"setSuggestions\"\n | \"generateSuggestions\"\n | \"isLoadingSuggestions\"\n | \"resetSuggestions\"\n | \"interrupt\"\n | \"setMessages\"\n | \"deleteMessage\"\n>;\n\n/**\n * A lightweight React hook for headless chat interactions.\n * Perfect for programmatic messaging, background operations, and custom UI implementations.\n *\n * **Open Source Friendly** - Works without requiring a `publicApiKey`.\n */\nexport function useCopilotChat(options: UseCopilotChatOptions = {}): UseCopilotChatReturn {\n const {\n visibleMessages,\n appendMessage,\n reloadMessages,\n stopGeneration,\n reset,\n isLoading,\n runChatCompletion,\n mcpServers,\n setMcpServers,\n } = useCopilotChatInternal(options);\n\n return {\n visibleMessages,\n appendMessage,\n reloadMessages,\n stopGeneration,\n reset,\n isLoading,\n runChatCompletion,\n mcpServers,\n setMcpServers,\n };\n}\n"],"mappings":";;;;;AAsGO,SAASA,gBAAe,UAAiC,CAAC,GAAyB;AACxF,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF,IAAI,eAAuB,OAAO;AAElC,SAAO;AAAA,IACL;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF;AACF;","names":["useCopilotChat"]}
1
+ {"version":3,"sources":["../src/hooks/use-copilot-chat.ts"],"sourcesContent":["/**\n * `useCopilotChat` is a lightweight React hook for headless chat interactions.\n * Perfect for controlling the prebuilt chat components programmatically.\n *\n * **Open Source Friendly** - Works without requiring a free public license key.\n *\n * <Callout title=\"Looking for fully headless UI?\">\n * Get started with [useCopilotChatHeadless_c](https://docs.copilotkit.ai/reference/hooks/useCopilotChatHeadless_c).\n * </Callout>\n *\n * ## Use Cases\n *\n * - **Programmatic Messaging**: Send messages without displaying chat UI\n * - **Programmatic control**: Control prebuilt component programmatically\n * - **Background Operations**: Trigger AI interactions in the background\n * - **Fire-and-Forget**: Send messages without needing to read responses\n *\n * ## Usage\n *\n * ```tsx\n * import { TextMessage, MessageRole } from \"@copilotkit/runtime-client-gql\";\n *\n * const { appendMessage } = useCopilotChat();\n *\n * // Example usage without naming conflicts\n * const handleSendMessage = async (content: string) => {\n * await appendMessage(\n * new TextMessage({\n * role: MessageRole.User,\n * content,\n * })\n * );\n * };\n * ```\n *\n * ## Return Values\n * The following properties are returned from the hook:\n *\n * <PropertyReference name=\"visibleMessages\" type=\"DeprecatedGqlMessage[]\" deprecated>\n * Array of messages in old non-AG-UI format, use for compatibility only\n * </PropertyReference>\n *\n * <PropertyReference name=\"appendMessage\" type=\"(message: DeprecatedGqlMessage, options?) => Promise<void>\" deprecated>\n * Append message using old format, use `sendMessage` instead\n * </PropertyReference>\n *\n * <PropertyReference name=\"reloadMessages\" type=\"(messageId: string) => Promise<void>\">\n * Regenerate the response for a specific message by ID\n * </PropertyReference>\n *\n * <PropertyReference name=\"stopGeneration\" type=\"() => void\">\n * Stop the current message generation process\n * </PropertyReference>\n *\n * <PropertyReference name=\"reset\" type=\"() => void\">\n * Clear all messages and reset chat state completely\n * </PropertyReference>\n *\n * <PropertyReference name=\"isLoading\" type=\"boolean\">\n * Whether the chat is currently generating a response\n * </PropertyReference>\n *\n * <PropertyReference name=\"runChatCompletion\" type=\"() => Promise<Message[]>\">\n * Manually trigger chat completion for advanced usage\n * </PropertyReference>\n *\n * <PropertyReference name=\"mcpServers\" type=\"MCPServerConfig[]\">\n * Array of Model Context Protocol server configurations\n * </PropertyReference>\n *\n * <PropertyReference name=\"setMcpServers\" type=\"(servers: MCPServerConfig[]) => void\">\n * Update MCP server configurations for enhanced context\n * </PropertyReference>\n */\n\nimport {\n UseCopilotChatOptions,\n useCopilotChatInternal,\n UseCopilotChatReturn as UseCopilotChatReturnInternal,\n} from \"./use-copilot-chat_internal\";\n\n// Create a type that excludes message-related properties from the internal type\nexport type UseCopilotChatReturn = Omit<\n UseCopilotChatReturnInternal,\n | \"messages\"\n | \"sendMessage\"\n | \"suggestions\"\n | \"setSuggestions\"\n | \"generateSuggestions\"\n | \"isLoadingSuggestions\"\n | \"resetSuggestions\"\n | \"interrupt\"\n | \"setMessages\"\n | \"deleteMessage\"\n>;\n\n/**\n * A lightweight React hook for headless chat interactions.\n * Perfect for programmatic messaging, background operations, and custom UI implementations.\n *\n * **Open Source Friendly** - Works without requiring a `publicApiKey`.\n */\n// TODO: Do we need this? If so, does it work properly? test.\nexport function useCopilotChat(options: UseCopilotChatOptions = {}): UseCopilotChatReturn {\n const {\n visibleMessages,\n appendMessage,\n reloadMessages,\n stopGeneration,\n reset,\n isLoading,\n isAvailable,\n runChatCompletion,\n mcpServers,\n setMcpServers,\n } = useCopilotChatInternal(options);\n\n return {\n visibleMessages,\n appendMessage,\n reloadMessages,\n stopGeneration,\n reset,\n isLoading,\n isAvailable,\n runChatCompletion,\n mcpServers,\n setMcpServers,\n };\n}\n"],"mappings":";;;;;AAuGO,SAAS,eAAe,UAAiC,CAAC,GAAyB;AACxF,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF,IAAI,uBAAuB,OAAO;AAElC,SAAO;AAAA,IACL;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF;AACF;","names":[]}
@@ -1,6 +1,3 @@
1
- import {
2
- shouldShowDevConsole
3
- } from "./chunk-ICIK2BSB.mjs";
4
1
  import {
5
2
  useToast
6
3
  } from "./chunk-EFL5OBKN.mjs";
@@ -62,15 +59,10 @@ var useCopilotRuntimeClient = (options) => {
62
59
  const routeError = (gqlError) => {
63
60
  const extensions = gqlError.extensions;
64
61
  const visibility = extensions == null ? void 0 : extensions.visibility;
65
- const isDev = shouldShowDevConsole(showDevConsole != null ? showDevConsole : false);
66
62
  if (visibility === ErrorVisibility.SILENT) {
67
63
  console.error("CopilotKit Silent Error:", gqlError.message);
68
64
  return;
69
65
  }
70
- if (!isDev) {
71
- console.error("CopilotKit Error (hidden in production):", gqlError.message);
72
- return;
73
- }
74
66
  const now = Date.now();
75
67
  const errorMessage = gqlError.message;
76
68
  if (lastStructuredErrorRef.current && lastStructuredErrorRef.current.message === errorMessage && now - lastStructuredErrorRef.current.timestamp < 150) {
@@ -92,17 +84,12 @@ var useCopilotRuntimeClient = (options) => {
92
84
  };
93
85
  graphQLErrors.forEach(routeError);
94
86
  } else {
95
- const isDev = shouldShowDevConsole(showDevConsole != null ? showDevConsole : false);
96
- if (!isDev) {
97
- console.error("CopilotKit Error (hidden in production):", error);
98
- } else {
99
- const fallbackError = new CopilotKitError({
100
- message: (error == null ? void 0 : error.message) || String(error),
101
- code: CopilotKitErrorCode.UNKNOWN
102
- });
103
- setBannerError(fallbackError);
104
- traceUIError(fallbackError, error);
105
- }
87
+ const fallbackError = new CopilotKitError({
88
+ message: (error == null ? void 0 : error.message) || String(error),
89
+ code: CopilotKitErrorCode.UNKNOWN
90
+ });
91
+ setBannerError(fallbackError);
92
+ traceUIError(fallbackError, error);
106
93
  }
107
94
  },
108
95
  handleGQLWarning: (message) => {
@@ -114,7 +101,7 @@ var useCopilotRuntimeClient = (options) => {
114
101
  setBannerError(warningError);
115
102
  }
116
103
  }));
117
- }, [runtimeOptions, setBannerError, showDevConsole, onError]);
104
+ }, [runtimeOptions, setBannerError, onError]);
118
105
  return runtimeClient;
119
106
  };
120
107
  function createStructuredError(gqlError) {
@@ -144,4 +131,4 @@ function createStructuredError(gqlError) {
144
131
  export {
145
132
  useCopilotRuntimeClient
146
133
  };
147
- //# sourceMappingURL=chunk-Q3MCVRO3.mjs.map
134
+ //# sourceMappingURL=chunk-6ESSSQ7Q.mjs.map