@copilotkit/react-ui 1.51.5-next.0 → 1.51.5-next.2

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 (339) hide show
  1. package/.attw.json +3 -0
  2. package/CHANGELOG.md +17 -0
  3. package/dist/index.cjs +2737 -0
  4. package/dist/index.cjs.map +1 -0
  5. package/dist/index.css +258 -70
  6. package/dist/index.css.map +1 -1
  7. package/dist/index.d.cts +781 -0
  8. package/dist/index.d.cts.map +1 -0
  9. package/dist/index.d.mts +781 -0
  10. package/dist/index.d.mts.map +1 -0
  11. package/dist/index.mjs +2685 -81
  12. package/dist/index.mjs.map +1 -1
  13. package/dist/index.umd.js +2750 -25
  14. package/dist/index.umd.js.map +1 -1
  15. package/package.json +19 -18
  16. package/src/components/chat/Popup.tsx +1 -1
  17. package/src/components/chat/Sidebar.tsx +1 -1
  18. package/tsdown.config.ts +58 -0
  19. package/vitest.config.mjs +11 -0
  20. package/dist/chunk-2QEDCM6H.mjs +0 -150
  21. package/dist/chunk-2QEDCM6H.mjs.map +0 -1
  22. package/dist/chunk-6SMTHXVA.mjs +0 -28
  23. package/dist/chunk-6SMTHXVA.mjs.map +0 -1
  24. package/dist/chunk-6TLDRWAD.mjs +0 -95
  25. package/dist/chunk-6TLDRWAD.mjs.map +0 -1
  26. package/dist/chunk-72FQQMQ2.mjs +0 -25
  27. package/dist/chunk-72FQQMQ2.mjs.map +0 -1
  28. package/dist/chunk-AOUHT4JR.mjs +0 -34
  29. package/dist/chunk-AOUHT4JR.mjs.map +0 -1
  30. package/dist/chunk-BNJX66OH.mjs +0 -118
  31. package/dist/chunk-BNJX66OH.mjs.map +0 -1
  32. package/dist/chunk-C27LZFA5.mjs +0 -97
  33. package/dist/chunk-C27LZFA5.mjs.map +0 -1
  34. package/dist/chunk-C7WM7GM3.mjs +0 -235
  35. package/dist/chunk-C7WM7GM3.mjs.map +0 -1
  36. package/dist/chunk-CNIC5HO5.mjs +0 -36
  37. package/dist/chunk-CNIC5HO5.mjs.map +0 -1
  38. package/dist/chunk-CQCXH5LY.mjs +0 -143
  39. package/dist/chunk-CQCXH5LY.mjs.map +0 -1
  40. package/dist/chunk-DM2V5WTG.mjs +0 -34
  41. package/dist/chunk-DM2V5WTG.mjs.map +0 -1
  42. package/dist/chunk-DSHTRV2R.mjs +0 -140
  43. package/dist/chunk-DSHTRV2R.mjs.map +0 -1
  44. package/dist/chunk-EACIYBQH.mjs +0 -32
  45. package/dist/chunk-EACIYBQH.mjs.map +0 -1
  46. package/dist/chunk-EFZPSZWO.mjs +0 -1
  47. package/dist/chunk-EFZPSZWO.mjs.map +0 -1
  48. package/dist/chunk-GBAPANZE.mjs +0 -323
  49. package/dist/chunk-GBAPANZE.mjs.map +0 -1
  50. package/dist/chunk-GFE5ZSPV.mjs +0 -112
  51. package/dist/chunk-GFE5ZSPV.mjs.map +0 -1
  52. package/dist/chunk-HHLX4MQN.mjs +0 -31
  53. package/dist/chunk-HHLX4MQN.mjs.map +0 -1
  54. package/dist/chunk-ICA2EXIX.mjs +0 -187
  55. package/dist/chunk-ICA2EXIX.mjs.map +0 -1
  56. package/dist/chunk-IU3WTXLQ.mjs +0 -1
  57. package/dist/chunk-IU3WTXLQ.mjs.map +0 -1
  58. package/dist/chunk-IWOCQACI.mjs +0 -73
  59. package/dist/chunk-IWOCQACI.mjs.map +0 -1
  60. package/dist/chunk-JGMFJZMG.mjs +0 -11
  61. package/dist/chunk-JGMFJZMG.mjs.map +0 -1
  62. package/dist/chunk-JYHRHKV5.mjs +0 -90
  63. package/dist/chunk-JYHRHKV5.mjs.map +0 -1
  64. package/dist/chunk-KXE2JCUH.mjs +0 -1
  65. package/dist/chunk-KXE2JCUH.mjs.map +0 -1
  66. package/dist/chunk-LIXN3OVQ.mjs +0 -405
  67. package/dist/chunk-LIXN3OVQ.mjs.map +0 -1
  68. package/dist/chunk-MC6PY7XH.mjs +0 -456
  69. package/dist/chunk-MC6PY7XH.mjs.map +0 -1
  70. package/dist/chunk-MMVDU6DF.mjs +0 -1
  71. package/dist/chunk-MMVDU6DF.mjs.map +0 -1
  72. package/dist/chunk-MRXNTQOX.mjs +0 -59
  73. package/dist/chunk-MRXNTQOX.mjs.map +0 -1
  74. package/dist/chunk-OQWEOBRX.mjs +0 -120
  75. package/dist/chunk-OQWEOBRX.mjs.map +0 -1
  76. package/dist/chunk-P34CL4LC.mjs +0 -82
  77. package/dist/chunk-P34CL4LC.mjs.map +0 -1
  78. package/dist/chunk-PF3QBO7V.mjs +0 -133
  79. package/dist/chunk-PF3QBO7V.mjs.map +0 -1
  80. package/dist/chunk-PLHTVHUW.mjs +0 -82
  81. package/dist/chunk-PLHTVHUW.mjs.map +0 -1
  82. package/dist/chunk-PP2A5RP6.mjs +0 -21
  83. package/dist/chunk-PP2A5RP6.mjs.map +0 -1
  84. package/dist/chunk-Q64GLWPQ.mjs +0 -30
  85. package/dist/chunk-Q64GLWPQ.mjs.map +0 -1
  86. package/dist/chunk-SC6JRFAJ.mjs +0 -1
  87. package/dist/chunk-SC6JRFAJ.mjs.map +0 -1
  88. package/dist/chunk-T26KLXLH.mjs +0 -1
  89. package/dist/chunk-T26KLXLH.mjs.map +0 -1
  90. package/dist/chunk-T4NNQG6T.mjs +0 -231
  91. package/dist/chunk-T4NNQG6T.mjs.map +0 -1
  92. package/dist/chunk-TGM5PKBF.mjs +0 -44
  93. package/dist/chunk-TGM5PKBF.mjs.map +0 -1
  94. package/dist/chunk-V7W6IM2V.mjs +0 -1
  95. package/dist/chunk-V7W6IM2V.mjs.map +0 -1
  96. package/dist/chunk-WB3YULQ4.mjs +0 -1
  97. package/dist/chunk-WB3YULQ4.mjs.map +0 -1
  98. package/dist/chunk-Y4FKRAKJ.mjs +0 -12
  99. package/dist/chunk-Y4FKRAKJ.mjs.map +0 -1
  100. package/dist/chunk-YDJ4YUUF.mjs +0 -141
  101. package/dist/chunk-YDJ4YUUF.mjs.map +0 -1
  102. package/dist/components/chat/Button.d.ts +0 -9
  103. package/dist/components/chat/Button.js +0 -73
  104. package/dist/components/chat/Button.js.map +0 -1
  105. package/dist/components/chat/Button.mjs +0 -10
  106. package/dist/components/chat/Button.mjs.map +0 -1
  107. package/dist/components/chat/Chat.d.ts +0 -204
  108. package/dist/components/chat/Chat.js +0 -2428
  109. package/dist/components/chat/Chat.js.map +0 -1
  110. package/dist/components/chat/Chat.mjs +0 -29
  111. package/dist/components/chat/Chat.mjs.map +0 -1
  112. package/dist/components/chat/ChatContext.d.ts +0 -145
  113. package/dist/components/chat/ChatContext.js +0 -383
  114. package/dist/components/chat/ChatContext.js.map +0 -1
  115. package/dist/components/chat/ChatContext.mjs +0 -13
  116. package/dist/components/chat/ChatContext.mjs.map +0 -1
  117. package/dist/components/chat/CodeBlock.d.ts +0 -14
  118. package/dist/components/chat/CodeBlock.js +0 -524
  119. package/dist/components/chat/CodeBlock.js.map +0 -1
  120. package/dist/components/chat/CodeBlock.mjs +0 -14
  121. package/dist/components/chat/CodeBlock.mjs.map +0 -1
  122. package/dist/components/chat/Header.d.ts +0 -9
  123. package/dist/components/chat/Header.js +0 -642
  124. package/dist/components/chat/Header.js.map +0 -1
  125. package/dist/components/chat/Header.mjs +0 -17
  126. package/dist/components/chat/Header.mjs.map +0 -1
  127. package/dist/components/chat/Icons.d.ts +0 -20
  128. package/dist/components/chat/Icons.js +0 -362
  129. package/dist/components/chat/Icons.js.map +0 -1
  130. package/dist/components/chat/Icons.mjs +0 -38
  131. package/dist/components/chat/Icons.mjs.map +0 -1
  132. package/dist/components/chat/ImageUploadQueue.d.ts +0 -13
  133. package/dist/components/chat/ImageUploadQueue.js +0 -106
  134. package/dist/components/chat/ImageUploadQueue.js.map +0 -1
  135. package/dist/components/chat/ImageUploadQueue.mjs +0 -8
  136. package/dist/components/chat/ImageUploadQueue.mjs.map +0 -1
  137. package/dist/components/chat/Input.d.ts +0 -9
  138. package/dist/components/chat/Input.js +0 -424
  139. package/dist/components/chat/Input.js.map +0 -1
  140. package/dist/components/chat/Input.mjs +0 -14
  141. package/dist/components/chat/Input.mjs.map +0 -1
  142. package/dist/components/chat/Markdown.d.ts +0 -10
  143. package/dist/components/chat/Markdown.js +0 -678
  144. package/dist/components/chat/Markdown.js.map +0 -1
  145. package/dist/components/chat/Markdown.mjs +0 -11
  146. package/dist/components/chat/Markdown.mjs.map +0 -1
  147. package/dist/components/chat/Messages.d.ts +0 -13
  148. package/dist/components/chat/Messages.js +0 -1242
  149. package/dist/components/chat/Messages.js.map +0 -1
  150. package/dist/components/chat/Messages.mjs +0 -20
  151. package/dist/components/chat/Messages.mjs.map +0 -1
  152. package/dist/components/chat/Modal.d.ts +0 -51
  153. package/dist/components/chat/Modal.js +0 -3294
  154. package/dist/components/chat/Modal.js.map +0 -1
  155. package/dist/components/chat/Modal.mjs +0 -38
  156. package/dist/components/chat/Modal.mjs.map +0 -1
  157. package/dist/components/chat/Popup.d.ts +0 -13
  158. package/dist/components/chat/Popup.js +0 -3305
  159. package/dist/components/chat/Popup.js.map +0 -1
  160. package/dist/components/chat/Popup.mjs +0 -39
  161. package/dist/components/chat/Popup.mjs.map +0 -1
  162. package/dist/components/chat/PoweredByTag.d.ts +0 -7
  163. package/dist/components/chat/PoweredByTag.js +0 -63
  164. package/dist/components/chat/PoweredByTag.js.map +0 -1
  165. package/dist/components/chat/PoweredByTag.mjs +0 -9
  166. package/dist/components/chat/PoweredByTag.mjs.map +0 -1
  167. package/dist/components/chat/Sidebar.d.ts +0 -13
  168. package/dist/components/chat/Sidebar.js +0 -3314
  169. package/dist/components/chat/Sidebar.js.map +0 -1
  170. package/dist/components/chat/Sidebar.mjs +0 -39
  171. package/dist/components/chat/Sidebar.mjs.map +0 -1
  172. package/dist/components/chat/Suggestion.d.ts +0 -12
  173. package/dist/components/chat/Suggestion.js +0 -68
  174. package/dist/components/chat/Suggestion.js.map +0 -1
  175. package/dist/components/chat/Suggestion.mjs +0 -9
  176. package/dist/components/chat/Suggestion.mjs.map +0 -1
  177. package/dist/components/chat/Suggestions.d.ts +0 -9
  178. package/dist/components/chat/Suggestions.js +0 -93
  179. package/dist/components/chat/Suggestions.js.map +0 -1
  180. package/dist/components/chat/Suggestions.mjs +0 -10
  181. package/dist/components/chat/Suggestions.mjs.map +0 -1
  182. package/dist/components/chat/Textarea.d.ts +0 -15
  183. package/dist/components/chat/Textarea.js +0 -87
  184. package/dist/components/chat/Textarea.js.map +0 -1
  185. package/dist/components/chat/Textarea.mjs +0 -8
  186. package/dist/components/chat/Textarea.mjs.map +0 -1
  187. package/dist/components/chat/Window.d.ts +0 -9
  188. package/dist/components/chat/Window.js +0 -166
  189. package/dist/components/chat/Window.js.map +0 -1
  190. package/dist/components/chat/Window.mjs +0 -10
  191. package/dist/components/chat/Window.mjs.map +0 -1
  192. package/dist/components/chat/index.d.ts +0 -18
  193. package/dist/components/chat/index.js +0 -3341
  194. package/dist/components/chat/index.js.map +0 -1
  195. package/dist/components/chat/index.mjs +0 -69
  196. package/dist/components/chat/index.mjs.map +0 -1
  197. package/dist/components/chat/messages/AssistantMessage.d.ts +0 -9
  198. package/dist/components/chat/messages/AssistantMessage.js +0 -807
  199. package/dist/components/chat/messages/AssistantMessage.js.map +0 -1
  200. package/dist/components/chat/messages/AssistantMessage.mjs +0 -13
  201. package/dist/components/chat/messages/AssistantMessage.mjs.map +0 -1
  202. package/dist/components/chat/messages/ErrorMessage.d.ts +0 -9
  203. package/dist/components/chat/messages/ErrorMessage.js +0 -756
  204. package/dist/components/chat/messages/ErrorMessage.js.map +0 -1
  205. package/dist/components/chat/messages/ErrorMessage.mjs +0 -72
  206. package/dist/components/chat/messages/ErrorMessage.mjs.map +0 -1
  207. package/dist/components/chat/messages/ImageRenderer.d.ts +0 -12
  208. package/dist/components/chat/messages/ImageRenderer.js +0 -68
  209. package/dist/components/chat/messages/ImageRenderer.js.map +0 -1
  210. package/dist/components/chat/messages/ImageRenderer.mjs +0 -8
  211. package/dist/components/chat/messages/ImageRenderer.mjs.map +0 -1
  212. package/dist/components/chat/messages/LegacyRenderMessage.d.ts +0 -28
  213. package/dist/components/chat/messages/LegacyRenderMessage.js +0 -1067
  214. package/dist/components/chat/messages/LegacyRenderMessage.js.map +0 -1
  215. package/dist/components/chat/messages/LegacyRenderMessage.mjs +0 -17
  216. package/dist/components/chat/messages/LegacyRenderMessage.mjs.map +0 -1
  217. package/dist/components/chat/messages/RenderMessage.d.ts +0 -9
  218. package/dist/components/chat/messages/RenderMessage.js +0 -942
  219. package/dist/components/chat/messages/RenderMessage.js.map +0 -1
  220. package/dist/components/chat/messages/RenderMessage.mjs +0 -16
  221. package/dist/components/chat/messages/RenderMessage.mjs.map +0 -1
  222. package/dist/components/chat/messages/UserMessage.d.ts +0 -9
  223. package/dist/components/chat/messages/UserMessage.js +0 -58
  224. package/dist/components/chat/messages/UserMessage.js.map +0 -1
  225. package/dist/components/chat/messages/UserMessage.mjs +0 -8
  226. package/dist/components/chat/messages/UserMessage.mjs.map +0 -1
  227. package/dist/components/chat/props.d.ts +0 -298
  228. package/dist/components/chat/props.js +0 -19
  229. package/dist/components/chat/props.js.map +0 -1
  230. package/dist/components/chat/props.mjs +0 -2
  231. package/dist/components/chat/props.mjs.map +0 -1
  232. package/dist/components/dev-console/console.d.ts +0 -11
  233. package/dist/components/dev-console/console.js +0 -595
  234. package/dist/components/dev-console/console.js.map +0 -1
  235. package/dist/components/dev-console/console.mjs +0 -17
  236. package/dist/components/dev-console/console.mjs.map +0 -1
  237. package/dist/components/dev-console/icons.d.ts +0 -9
  238. package/dist/components/dev-console/icons.js +0 -140
  239. package/dist/components/dev-console/icons.js.map +0 -1
  240. package/dist/components/dev-console/icons.mjs +0 -16
  241. package/dist/components/dev-console/icons.mjs.map +0 -1
  242. package/dist/components/dev-console/index.d.ts +0 -3
  243. package/dist/components/dev-console/index.js +0 -595
  244. package/dist/components/dev-console/index.js.map +0 -1
  245. package/dist/components/dev-console/index.mjs +0 -18
  246. package/dist/components/dev-console/index.mjs.map +0 -1
  247. package/dist/components/dev-console/types.d.ts +0 -9
  248. package/dist/components/dev-console/types.js +0 -19
  249. package/dist/components/dev-console/types.js.map +0 -1
  250. package/dist/components/dev-console/types.mjs +0 -1
  251. package/dist/components/dev-console/types.mjs.map +0 -1
  252. package/dist/components/dev-console/utils.d.ts +0 -10
  253. package/dist/components/dev-console/utils.js +0 -183
  254. package/dist/components/dev-console/utils.js.map +0 -1
  255. package/dist/components/dev-console/utils.mjs +0 -16
  256. package/dist/components/dev-console/utils.mjs.map +0 -1
  257. package/dist/components/help-modal/icons.d.ts +0 -9
  258. package/dist/components/help-modal/icons.js +0 -116
  259. package/dist/components/help-modal/icons.js.map +0 -1
  260. package/dist/components/help-modal/icons.mjs +0 -12
  261. package/dist/components/help-modal/icons.mjs.map +0 -1
  262. package/dist/components/help-modal/index.d.ts +0 -2
  263. package/dist/components/help-modal/index.js +0 -144
  264. package/dist/components/help-modal/index.js.map +0 -1
  265. package/dist/components/help-modal/index.mjs +0 -10
  266. package/dist/components/help-modal/index.mjs.map +0 -1
  267. package/dist/components/help-modal/modal.d.ts +0 -5
  268. package/dist/components/help-modal/modal.js +0 -142
  269. package/dist/components/help-modal/modal.js.map +0 -1
  270. package/dist/components/help-modal/modal.mjs +0 -9
  271. package/dist/components/help-modal/modal.mjs.map +0 -1
  272. package/dist/components/index.d.ts +0 -19
  273. package/dist/components/index.js +0 -3345
  274. package/dist/components/index.js.map +0 -1
  275. package/dist/components/index.mjs +0 -76
  276. package/dist/components/index.mjs.map +0 -1
  277. package/dist/context/index.d.ts +0 -2
  278. package/dist/context/index.js +0 -19
  279. package/dist/context/index.js.map +0 -1
  280. package/dist/context/index.mjs +0 -2
  281. package/dist/context/index.mjs.map +0 -1
  282. package/dist/hooks/index.d.ts +0 -2
  283. package/dist/hooks/index.js +0 -36
  284. package/dist/hooks/index.js.map +0 -1
  285. package/dist/hooks/index.mjs +0 -9
  286. package/dist/hooks/index.mjs.map +0 -1
  287. package/dist/hooks/use-copilot-chat-suggestions.d.ts +0 -66
  288. package/dist/hooks/use-copilot-chat-suggestions.js +0 -34
  289. package/dist/hooks/use-copilot-chat-suggestions.js.map +0 -1
  290. package/dist/hooks/use-copilot-chat-suggestions.mjs +0 -8
  291. package/dist/hooks/use-copilot-chat-suggestions.mjs.map +0 -1
  292. package/dist/hooks/use-copy-to-clipboard.d.ts +0 -9
  293. package/dist/hooks/use-copy-to-clipboard.js +0 -62
  294. package/dist/hooks/use-copy-to-clipboard.js.map +0 -1
  295. package/dist/hooks/use-copy-to-clipboard.mjs +0 -8
  296. package/dist/hooks/use-copy-to-clipboard.mjs.map +0 -1
  297. package/dist/hooks/use-dark-mode.d.ts +0 -3
  298. package/dist/hooks/use-dark-mode.js +0 -35
  299. package/dist/hooks/use-dark-mode.js.map +0 -1
  300. package/dist/hooks/use-dark-mode.mjs +0 -8
  301. package/dist/hooks/use-dark-mode.mjs.map +0 -1
  302. package/dist/hooks/use-push-to-talk.d.ts +0 -19
  303. package/dist/hooks/use-push-to-talk.js +0 -202
  304. package/dist/hooks/use-push-to-talk.js.map +0 -1
  305. package/dist/hooks/use-push-to-talk.mjs +0 -12
  306. package/dist/hooks/use-push-to-talk.mjs.map +0 -1
  307. package/dist/index.d.ts +0 -21
  308. package/dist/index.js +0 -3354
  309. package/dist/index.js.map +0 -1
  310. package/dist/lib/utils.d.ts +0 -4
  311. package/dist/lib/utils.js +0 -76
  312. package/dist/lib/utils.js.map +0 -1
  313. package/dist/lib/utils.mjs +0 -34
  314. package/dist/lib/utils.mjs.map +0 -1
  315. package/dist/types/css.d.ts +0 -22
  316. package/dist/types/css.js +0 -19
  317. package/dist/types/css.js.map +0 -1
  318. package/dist/types/css.mjs +0 -1
  319. package/dist/types/css.mjs.map +0 -1
  320. package/dist/types/index.d.ts +0 -3
  321. package/dist/types/index.js +0 -19
  322. package/dist/types/index.js.map +0 -1
  323. package/dist/types/index.mjs +0 -2
  324. package/dist/types/index.mjs.map +0 -1
  325. package/dist/types/suggestions.d.ts +0 -9
  326. package/dist/types/suggestions.js +0 -19
  327. package/dist/types/suggestions.js.map +0 -1
  328. package/dist/types/suggestions.mjs +0 -1
  329. package/dist/types/suggestions.mjs.map +0 -1
  330. package/dist/v2/index.css +0 -4
  331. package/dist/v2/index.css.map +0 -1
  332. package/dist/v2/index.d.ts +0 -2
  333. package/dist/v2/index.js +0 -2
  334. package/dist/v2/index.js.map +0 -1
  335. package/dist/v2/index.mjs +0 -2
  336. package/dist/v2/index.mjs.map +0 -1
  337. package/jest.config.js +0 -5
  338. package/rollup.config.mjs +0 -64
  339. package/tsup.config.ts +0 -15
@@ -1,642 +0,0 @@
1
- "use strict";
2
- var __create = Object.create;
3
- var __defProp = Object.defineProperty;
4
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
- var __getOwnPropNames = Object.getOwnPropertyNames;
6
- var __getProtoOf = Object.getPrototypeOf;
7
- var __hasOwnProp = Object.prototype.hasOwnProperty;
8
- var __export = (target, all) => {
9
- for (var name in all)
10
- __defProp(target, name, { get: all[name], enumerable: true });
11
- };
12
- var __copyProps = (to, from, except, desc) => {
13
- if (from && typeof from === "object" || typeof from === "function") {
14
- for (let key of __getOwnPropNames(from))
15
- if (!__hasOwnProp.call(to, key) && key !== except)
16
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
- }
18
- return to;
19
- };
20
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
- // If the importer is in node compatibility mode or this is not an ESM
22
- // file that has been converted to a CommonJS file using a Babel-
23
- // compatible transform (i.e. "__esModule" has not been set), then set
24
- // "default" to the CommonJS "module.exports" for node compatibility.
25
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
- mod
27
- ));
28
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
- var __async = (__this, __arguments, generator) => {
30
- return new Promise((resolve, reject) => {
31
- var fulfilled = (value) => {
32
- try {
33
- step(generator.next(value));
34
- } catch (e) {
35
- reject(e);
36
- }
37
- };
38
- var rejected = (value) => {
39
- try {
40
- step(generator.throw(value));
41
- } catch (e) {
42
- reject(e);
43
- }
44
- };
45
- var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
46
- step((generator = generator.apply(__this, __arguments)).next());
47
- });
48
- };
49
-
50
- // src/components/chat/Header.tsx
51
- var Header_exports = {};
52
- __export(Header_exports, {
53
- Header: () => Header
54
- });
55
- module.exports = __toCommonJS(Header_exports);
56
-
57
- // src/components/chat/ChatContext.tsx
58
- var import_react = __toESM(require("react"));
59
-
60
- // src/components/chat/Icons.tsx
61
- var import_jsx_runtime = require("react/jsx-runtime");
62
- var SmallSpinnerIcon = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
63
- "span",
64
- {
65
- className: "copilotKitSpinner",
66
- style: { width: "13px", height: "13px" }
67
- }
68
- );
69
-
70
- // src/components/chat/ChatContext.tsx
71
- var import_jsx_runtime2 = require("react/jsx-runtime");
72
- var ChatContext = import_react.default.createContext(
73
- void 0
74
- );
75
- function useChatContext() {
76
- const context = import_react.default.useContext(ChatContext);
77
- if (context === void 0) {
78
- throw new Error(
79
- "Context not found. Did you forget to wrap your app in a <ChatContextProvider> component?"
80
- );
81
- }
82
- return context;
83
- }
84
-
85
- // src/components/dev-console/utils.ts
86
- var import_react_core = require("@copilotkit/react-core");
87
- var import_react_core2 = require("@copilotkit/react-core");
88
- function getPublishedCopilotKitVersion(current, forceCheck = false) {
89
- return __async(this, null, function* () {
90
- const LOCAL_STORAGE_KEY = "__copilotkit_version_check__";
91
- const serializedVersion = localStorage.getItem(LOCAL_STORAGE_KEY);
92
- if (serializedVersion && !forceCheck) {
93
- try {
94
- const parsedVersion = JSON.parse(serializedVersion);
95
- const oneHour = 60 * 60 * 1e3;
96
- const now = (/* @__PURE__ */ new Date()).getTime();
97
- if (parsedVersion.current === current && now - new Date(parsedVersion.lastChecked).getTime() < oneHour) {
98
- return parsedVersion;
99
- }
100
- } catch (error) {
101
- console.error(
102
- "Failed to parse CopilotKitVersion from localStorage",
103
- error
104
- );
105
- }
106
- }
107
- try {
108
- const response = yield fetch(
109
- "https://api.cloud.copilotkit.ai/check-for-updates",
110
- {
111
- method: "POST",
112
- headers: {
113
- "Content-Type": "application/json"
114
- },
115
- body: JSON.stringify({
116
- packages: [
117
- {
118
- packageName: "@copilotkit/shared",
119
- packageVersion: current
120
- }
121
- ]
122
- })
123
- }
124
- );
125
- const data = yield response.json();
126
- const version = {
127
- current,
128
- lastChecked: (/* @__PURE__ */ new Date()).getTime(),
129
- latest: data.packages[0].latestVersion,
130
- severity: data.packages[0].severity,
131
- advisory: data.packages[0].advisory || null
132
- };
133
- localStorage.setItem(LOCAL_STORAGE_KEY, JSON.stringify(version));
134
- return version;
135
- } catch (error) {
136
- console.error("Failed to check for updates", error);
137
- throw error;
138
- }
139
- });
140
- }
141
- function logReadables(context) {
142
- console.log("%cCurrent Readables:", "font-size: 16px; font-weight: bold;");
143
- const readables = context.getContextString([], import_react_core.defaultCopilotContextCategories).trim();
144
- if (readables.length === 0) {
145
- console.log("No readables found");
146
- return;
147
- }
148
- console.log(readables);
149
- }
150
- function logActions(context) {
151
- console.log("%cCurrent Actions:", "font-size: 16px; font-weight: bold;");
152
- if (Object.values(context.actions).length === 0) {
153
- console.log("No actions found");
154
- return;
155
- }
156
- for (const action of Object.values(context.actions)) {
157
- console.group(action.name);
158
- console.log("name", action.name);
159
- console.log("description", action.description);
160
- console.log("parameters", action.parameters);
161
- console.groupEnd();
162
- }
163
- }
164
- function logMessages(context) {
165
- console.log("%cCurrent Messages:", "font-size: 16px; font-weight: bold;");
166
- if (context.messages.length === 0) {
167
- console.log("No messages found");
168
- return;
169
- }
170
- const tableData = context.messages.map((message) => {
171
- if (message.isTextMessage()) {
172
- return {
173
- id: message.id,
174
- type: "TextMessage",
175
- role: message.role,
176
- name: void 0,
177
- scope: void 0,
178
- content: message.content
179
- };
180
- } else if (message.isActionExecutionMessage()) {
181
- return {
182
- id: message.id,
183
- type: "ActionExecutionMessage",
184
- role: void 0,
185
- name: message.name,
186
- scope: message.parentMessageId,
187
- content: message.arguments
188
- };
189
- } else if (message.isResultMessage()) {
190
- return {
191
- id: message.id,
192
- type: "ResultMessage",
193
- role: void 0,
194
- name: message.actionName,
195
- scope: message.actionExecutionId,
196
- content: message.result
197
- };
198
- } else if (message.isAgentStateMessage()) {
199
- return {
200
- id: message.id,
201
- type: `AgentStateMessage (running: ${message.running})`,
202
- role: message.role,
203
- name: void 0,
204
- scope: message.threadId,
205
- content: message.state
206
- };
207
- }
208
- });
209
- console.table(tableData);
210
- }
211
-
212
- // src/components/dev-console/console.tsx
213
- var import_react_core3 = require("@copilotkit/react-core");
214
- var import_react3 = require("react");
215
-
216
- // src/components/dev-console/icons.tsx
217
- var import_jsx_runtime3 = require("react/jsx-runtime");
218
- var ExclamationMarkTriangleIcon = /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
219
- "svg",
220
- {
221
- width: "13.3967723px",
222
- height: "12px",
223
- viewBox: "0 0 13.3967723 12",
224
- version: "1.1",
225
- xmlns: "http://www.w3.org/2000/svg",
226
- children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("g", { id: "Page-1", stroke: "none", strokeWidth: "1", fill: "none", fillRule: "evenodd", children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("g", { id: "exclamation-triangle", fill: "#CD2121", children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
227
- "path",
228
- {
229
- d: "M5.39935802,0.75 C5.97670802,-0.25 7.42007802,-0.25 7.99742802,0.75 L13.193588,9.75 C13.770888,10.75 13.049288,12 11.894588,12 L1.50223802,12 C0.34753802,12 -0.37414898,10.75 0.20319802,9.75 L5.39935802,0.75 Z M6.69838802,2.5 C7.11260802,2.5 7.44838802,2.83579 7.44838802,3.25 L7.44838802,6.25 C7.44838802,6.66421 7.11260802,7 6.69838802,7 C6.28417802,7 5.94838802,6.66421 5.94838802,6.25 L5.94838802,3.25 C5.94838802,2.83579 6.28417802,2.5 6.69838802,2.5 Z M6.69838802,10.5 C7.25067802,10.5 7.69838802,10.0523 7.69838802,9.5 C7.69838802,8.9477 7.25067802,8.5 6.69838802,8.5 C6.14610802,8.5 5.69838802,8.9477 5.69838802,9.5 C5.69838802,10.0523 6.14610802,10.5 6.69838802,10.5 Z",
230
- id: "Shape"
231
- }
232
- ) }) })
233
- }
234
- );
235
- var ExclamationMarkIcon = /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
236
- "svg",
237
- {
238
- width: "14px",
239
- height: "14px",
240
- viewBox: "0 0 14 14",
241
- version: "1.1",
242
- xmlns: "http://www.w3.org/2000/svg",
243
- children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("g", { id: "Page-1", stroke: "none", strokeWidth: "1", fill: "none", fillRule: "evenodd", children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("g", { id: "exclamation-circle", fill: "#EC662C", children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
244
- "path",
245
- {
246
- d: "M7,14 C10.866,14 14,10.866 14,7 C14,3.13401 10.866,0 7,0 C3.13401,0 0,3.13401 0,7 C0,10.866 3.13401,14 7,14 Z M7,3 C7.41421,3 7.75,3.33579 7.75,3.75 L7.75,6.75 C7.75,7.16421 7.41421,7.5 7,7.5 C6.58579,7.5 6.25,7.16421 6.25,6.75 L6.25,3.75 C6.25,3.33579 6.58579,3 7,3 Z M7,11 C7.55228,11 8,10.5523 8,10 C8,9.4477 7.55228,9 7,9 C6.44772,9 6,9.4477 6,10 C6,10.5523 6.44772,11 7,11 Z",
247
- id: "Shape"
248
- }
249
- ) }) })
250
- }
251
- );
252
- var ChevronDownIcon = /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
253
- "svg",
254
- {
255
- width: "7px",
256
- height: "4px",
257
- viewBox: "0 0 7 4",
258
- version: "1.1",
259
- xmlns: "http://www.w3.org/2000/svg",
260
- fill: "currentColor",
261
- children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("g", { id: "Page-1", stroke: "none", strokeWidth: "1", fill: "none", fillRule: "evenodd", children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("g", { id: "Group", fill: "currentColor", fillRule: "nonzero", children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
262
- "path",
263
- {
264
- d: "M3.71690723,3.90271086 C3.59268176,4.03242971 3.39143629,4.03242971 3.26721082,3.90271086 L0.0853966595,0.57605615 C-0.0314221035,0.444981627 -0.0279751448,0.240725043 0.0931934622,0.114040675 C0.214362069,-0.0126436935 0.409725445,-0.0162475626 0.535093061,0.105888951 L3.49205902,3.19746006 L6.44902499,0.105888951 C6.52834574,0.0168884389 6.64780588,-0.0197473458 6.7605411,0.0103538404 C6.87327633,0.0404550266 6.96130636,0.132492308 6.99009696,0.250359396 C7.01888756,0.368226483 6.98384687,0.493124608 6.89872139,0.57605615 L3.71690723,3.90271086 Z",
265
- id: "Path"
266
- }
267
- ) }) })
268
- }
269
- );
270
- var CheckIcon = /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
271
- "svg",
272
- {
273
- width: "14px",
274
- height: "14px",
275
- viewBox: "0 0 14 14",
276
- version: "1.1",
277
- xmlns: "http://www.w3.org/2000/svg",
278
- children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("g", { id: "Page-1", stroke: "none", strokeWidth: "1", fill: "none", fillRule: "evenodd", children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
279
- "g",
280
- {
281
- id: "Group-2",
282
- transform: "translate(-118, 0)",
283
- fill: "#1BC030",
284
- fillRule: "nonzero",
285
- children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("g", { id: "Group", transform: "translate(118, 0)", children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
286
- "path",
287
- {
288
- 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",
289
- id: "Shape"
290
- }
291
- ) })
292
- }
293
- ) })
294
- }
295
- );
296
-
297
- // src/components/dev-console/console.tsx
298
- var import_react4 = require("@headlessui/react");
299
- var import_shared = require("@copilotkit/shared");
300
-
301
- // src/components/help-modal/modal.tsx
302
- var import_react2 = require("react");
303
-
304
- // src/components/help-modal/icons.tsx
305
- var import_jsx_runtime4 = require("react/jsx-runtime");
306
- var CloseIcon = () => /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
307
- "svg",
308
- {
309
- xmlns: "http://www.w3.org/2000/svg",
310
- fill: "none",
311
- viewBox: "0 0 24 24",
312
- strokeWidth: "1.5",
313
- stroke: "currentColor",
314
- width: "20",
315
- height: "20",
316
- children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
317
- "path",
318
- {
319
- strokeLinecap: "round",
320
- strokeLinejoin: "round",
321
- d: "M6 18L18 6M6 6l12 12"
322
- }
323
- )
324
- }
325
- );
326
-
327
- // src/components/help-modal/modal.tsx
328
- var import_jsx_runtime5 = require("react/jsx-runtime");
329
- function CopilotKitHelpModal() {
330
- const [showHelpModal, setShowHelpModal] = (0, import_react2.useState)(false);
331
- const buttonRef = (0, import_react2.useRef)(null);
332
- const popoverRef = (0, import_react2.useRef)(null);
333
- (0, import_react2.useEffect)(() => {
334
- const handleClickOutside = (event) => {
335
- if (popoverRef.current && !popoverRef.current.contains(event.target) && buttonRef.current && !buttonRef.current.contains(event.target)) {
336
- setShowHelpModal(false);
337
- }
338
- };
339
- if (showHelpModal) {
340
- document.addEventListener("mousedown", handleClickOutside);
341
- }
342
- return () => {
343
- document.removeEventListener("mousedown", handleClickOutside);
344
- };
345
- }, [showHelpModal]);
346
- const HelpButton = () => /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
347
- "button",
348
- {
349
- ref: buttonRef,
350
- onClick: () => setShowHelpModal(!showHelpModal),
351
- className: "copilotKitDebugMenuTriggerButton relative",
352
- "aria-label": "Open Help",
353
- children: "Help"
354
- }
355
- );
356
- return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "relative", children: [
357
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(HelpButton, {}),
358
- showHelpModal && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
359
- "div",
360
- {
361
- ref: popoverRef,
362
- className: "absolute mt-2 z-50",
363
- style: {
364
- top: "100%",
365
- right: "-120px",
366
- width: "380px"
367
- },
368
- children: /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "copilotKitHelpModal rounded-lg shadow-xl w-full p-4 flex-col relative", children: [
369
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
370
- "button",
371
- {
372
- className: "copilotKitHelpModalCloseButton absolute text-gray-400 hover:text-gray-600 focus:outline-none",
373
- style: { top: "10px", right: "10px" },
374
- onClick: () => setShowHelpModal(false),
375
- "aria-label": "Close",
376
- children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(CloseIcon, {})
377
- }
378
- ),
379
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className: "w-full flex mb-6 justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("h2", { className: "text-2xl font-bold", children: "Help Options" }) }),
380
- /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "space-y-4 mb-4", children: [
381
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className: "copilotKitHelpItemButton", children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
382
- "a",
383
- {
384
- href: "https://docs.copilotkit.ai/coagents/troubleshooting/common-issues",
385
- target: "_blank",
386
- rel: "noopener noreferrer",
387
- children: "Visit the Troubleshooting and FAQ section in the docs"
388
- }
389
- ) }),
390
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className: "copilotKitHelpItemButton", children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
391
- "a",
392
- {
393
- href: "https://go.copilotkit.ai/dev-console-support-discord",
394
- target: "_blank",
395
- rel: "noopener noreferrer",
396
- children: "Go to Discord Support Channel (Community Support)"
397
- }
398
- ) }),
399
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className: "copilotKitHelpItemButton", children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
400
- "a",
401
- {
402
- href: "https://go.copilotkit.ai/dev-console-support-slack",
403
- target: "_blank",
404
- rel: "noopener noreferrer",
405
- children: "Apply for Priority Direct Slack Support"
406
- }
407
- ) })
408
- ] })
409
- ] })
410
- }
411
- )
412
- ] });
413
- }
414
-
415
- // src/components/dev-console/console.tsx
416
- var import_jsx_runtime6 = require("react/jsx-runtime");
417
- function CopilotDevConsole() {
418
- const currentVersion = import_shared.COPILOTKIT_VERSION;
419
- const context = (0, import_react_core3.useCopilotContext)();
420
- const [showDevConsole, setShowDevConsole] = (0, import_react3.useState)(false);
421
- (0, import_react3.useEffect)(() => {
422
- setShowDevConsole((0, import_react_core2.shouldShowDevConsole)(context.showDevConsole));
423
- }, [context.showDevConsole]);
424
- const dontRunTwiceInDevMode = (0, import_react3.useRef)(false);
425
- const [versionStatus, setVersionStatus] = (0, import_react3.useState)("unknown");
426
- const [latestVersion, setLatestVersion] = (0, import_react3.useState)("");
427
- const consoleRef = (0, import_react3.useRef)(null);
428
- const [debugButtonMode, setDebugButtonMode] = (0, import_react3.useState)(
429
- "full"
430
- );
431
- const checkForUpdates = (force = false) => {
432
- setVersionStatus("checking");
433
- getPublishedCopilotKitVersion(currentVersion, force).then((v) => {
434
- setLatestVersion(v.latest);
435
- let versionOk = false;
436
- if (v.current === v.latest) {
437
- versionOk = true;
438
- } else if (/[a-zA-Z]/.test(v.current)) {
439
- versionOk = true;
440
- }
441
- if (versionOk) {
442
- setVersionStatus("latest");
443
- } else if (v.severity !== "low") {
444
- setVersionStatus("outdated");
445
- } else {
446
- setVersionStatus("update-available");
447
- }
448
- }).catch((e) => {
449
- console.error(e);
450
- setVersionStatus("unknown");
451
- });
452
- };
453
- (0, import_react3.useEffect)(() => {
454
- if (dontRunTwiceInDevMode.current === true) {
455
- return;
456
- }
457
- dontRunTwiceInDevMode.current = true;
458
- checkForUpdates();
459
- }, []);
460
- if (!showDevConsole) {
461
- return null;
462
- }
463
- return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(
464
- "div",
465
- {
466
- ref: consoleRef,
467
- className: "copilotKitDevConsole " + (versionStatus === "update-available" ? "copilotKitDevConsoleUpgrade" : "") + (versionStatus === "outdated" ? "copilotKitDevConsoleWarnOutdated" : ""),
468
- children: [
469
- /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
470
- VersionInfo,
471
- {
472
- showDevConsole: context.showDevConsole,
473
- versionStatus,
474
- currentVersion,
475
- latestVersion
476
- }
477
- ),
478
- /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(CopilotKitHelpModal, {}),
479
- /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
480
- DebugMenuButton,
481
- {
482
- setShowDevConsole,
483
- checkForUpdates,
484
- mode: debugButtonMode
485
- }
486
- )
487
- ]
488
- }
489
- );
490
- }
491
- function VersionInfo({
492
- showDevConsole,
493
- versionStatus,
494
- currentVersion,
495
- latestVersion
496
- }) {
497
- const [copyStatus, setCopyStatus] = (0, import_react3.useState)("");
498
- let versionLabel = "";
499
- let versionIcon = "";
500
- let currentVersionLabel = currentVersion;
501
- if (versionStatus === "latest") {
502
- versionLabel = "latest";
503
- versionIcon = CheckIcon;
504
- } else if (versionStatus === "checking") {
505
- versionLabel = "checking";
506
- versionIcon = SmallSpinnerIcon;
507
- } else if (versionStatus === "update-available") {
508
- versionLabel = "update available";
509
- versionIcon = ExclamationMarkIcon;
510
- currentVersionLabel = `${currentVersion} \u2192 ${latestVersion}`;
511
- } else if (versionStatus === "outdated") {
512
- versionLabel = "outdated";
513
- versionIcon = ExclamationMarkTriangleIcon;
514
- currentVersionLabel = `${currentVersion} \u2192 ${latestVersion}`;
515
- }
516
- let asideLabel = "";
517
- if (showDevConsole === true) {
518
- asideLabel = "(enabled)";
519
- }
520
- const installCommand = [
521
- `npm install`,
522
- `@copilotkit/react-core@${latestVersion}`,
523
- `@copilotkit/react-ui@${latestVersion}`,
524
- `@copilotkit/react-textarea@${latestVersion}`,
525
- `&& npm install @copilotkit/runtime@${latestVersion}`
526
- ].join(" ");
527
- const handleCopyClick = () => {
528
- navigator.clipboard.writeText(installCommand.trim()).then(() => {
529
- setCopyStatus("Command copied to clipboard!");
530
- setTimeout(() => setCopyStatus(""), 1e3);
531
- });
532
- };
533
- if (versionStatus === "update-available" || versionStatus === "outdated") {
534
- return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "copilotKitVersionInfo", children: [
535
- /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("p", { children: [
536
- currentVersionLabel,
537
- " ",
538
- versionIcon
539
- ] }),
540
- /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("button", { onClick: handleCopyClick, children: copyStatus || installCommand })
541
- ] });
542
- }
543
- return null;
544
- }
545
- function DebugMenuButton({
546
- setShowDevConsole,
547
- checkForUpdates,
548
- mode
549
- }) {
550
- const context = (0, import_react_core3.useCopilotContext)();
551
- const messagesContext = (0, import_react_core3.useCopilotMessagesContext)();
552
- return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_jsx_runtime6.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_react4.Menu, { children: [
553
- /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
554
- import_react4.MenuButton,
555
- {
556
- className: `copilotKitDebugMenuTriggerButton ${mode === "compact" ? "compact" : ""}`,
557
- children: mode == "compact" ? "Debug" : /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_jsx_runtime6.Fragment, { children: [
558
- "Debug ",
559
- ChevronDownIcon
560
- ] })
561
- }
562
- ),
563
- /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(
564
- import_react4.MenuItems,
565
- {
566
- transition: true,
567
- anchor: "bottom end",
568
- className: "copilotKitDebugMenu",
569
- style: { zIndex: 40 },
570
- children: [
571
- /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_react4.MenuItem, { children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
572
- "button",
573
- {
574
- className: "copilotKitDebugMenuItem",
575
- onClick: () => logReadables(context),
576
- children: "Log Readables"
577
- }
578
- ) }),
579
- /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_react4.MenuItem, { children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
580
- "button",
581
- {
582
- className: "copilotKitDebugMenuItem",
583
- onClick: () => logActions(context),
584
- children: "Log Actions"
585
- }
586
- ) }),
587
- /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_react4.MenuItem, { children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
588
- "button",
589
- {
590
- className: "copilotKitDebugMenuItem",
591
- onClick: () => logMessages(messagesContext),
592
- children: "Log Messages"
593
- }
594
- ) }),
595
- /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_react4.MenuItem, { children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
596
- "button",
597
- {
598
- className: "copilotKitDebugMenuItem",
599
- onClick: () => checkForUpdates(true),
600
- children: "Check for Updates"
601
- }
602
- ) }),
603
- /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("hr", {}),
604
- /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_react4.MenuItem, { children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
605
- "button",
606
- {
607
- className: "copilotKitDebugMenuItem",
608
- onClick: () => setShowDevConsole(false),
609
- children: "Hide Dev Console"
610
- }
611
- ) })
612
- ]
613
- }
614
- )
615
- ] }) });
616
- }
617
-
618
- // src/components/chat/Header.tsx
619
- var import_jsx_runtime7 = require("react/jsx-runtime");
620
- var Header = ({}) => {
621
- const { setOpen, icons, labels } = useChatContext();
622
- return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "copilotKitHeader", children: [
623
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { children: labels.title }),
624
- /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "copilotKitHeaderControls", children: [
625
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(CopilotDevConsole, {}),
626
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
627
- "button",
628
- {
629
- onClick: () => setOpen(false),
630
- "aria-label": "Close",
631
- className: "copilotKitHeaderCloseButton",
632
- children: icons.headerCloseIcon
633
- }
634
- )
635
- ] })
636
- ] });
637
- };
638
- // Annotate the CommonJS export names for ESM import in node:
639
- 0 && (module.exports = {
640
- Header
641
- });
642
- //# sourceMappingURL=Header.js.map