@copilotkit/vue 2.0.0-rc.1 → 2.0.0-rc.10

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 (317) hide show
  1. package/PARITY.md +13 -12
  2. package/README.md +1 -2
  3. package/dist/components/copilot-provider/CopilotKit.vue.d.ts +3 -1
  4. package/dist/components/copilot-provider/CopilotKit.vue.d.ts.map +1 -1
  5. package/dist/hooks/use-copilot-action.d.ts.map +1 -1
  6. package/dist/hooks/use-frontend-tool.d.ts +1 -1
  7. package/dist/hooks/use-frontend-tool.d.ts.map +1 -1
  8. package/dist/hooks/zod-parameters.d.ts +14 -0
  9. package/dist/hooks/zod-parameters.d.ts.map +1 -0
  10. package/dist/index.cjs +1 -76
  11. package/dist/index.cjs.map +1 -1
  12. package/dist/index.mjs +384 -14275
  13. package/dist/index.mjs.map +1 -1
  14. package/dist/use-render-activity-message-CTR_ziWV.js +18097 -0
  15. package/dist/use-render-activity-message-CTR_ziWV.js.map +1 -0
  16. package/dist/use-render-activity-message-Dky9_GRG.cjs +92 -0
  17. package/dist/use-render-activity-message-Dky9_GRG.cjs.map +1 -0
  18. package/dist/v2/components/A2UIMessageRenderer.d.ts +7 -0
  19. package/dist/v2/components/A2UIMessageRenderer.d.ts.map +1 -1
  20. package/dist/v2/components/A2UISurfaceActivityRenderer.vue.d.ts.map +1 -1
  21. package/dist/v2/components/LicenseWarningBanner.vue.d.ts.map +1 -1
  22. package/dist/v2/components/OpenGenerativeUIRenderer.d.ts +13 -45
  23. package/dist/v2/components/OpenGenerativeUIRenderer.d.ts.map +1 -1
  24. package/dist/v2/components/a2ui/A2UIBuiltInToolCallRenderer.d.ts +11 -2
  25. package/dist/v2/components/a2ui/A2UIBuiltInToolCallRenderer.d.ts.map +1 -1
  26. package/dist/v2/components/a2ui/A2UICatalogContext.d.ts +1 -1
  27. package/dist/v2/components/a2ui/A2UICatalogContext.d.ts.map +1 -1
  28. package/dist/v2/components/a2ui/A2UIRecoveryStates.d.ts +144 -0
  29. package/dist/v2/components/a2ui/A2UIRecoveryStates.d.ts.map +1 -0
  30. package/dist/v2/components/a2ui.d.ts +3 -7
  31. package/dist/v2/components/a2ui.d.ts.map +1 -1
  32. package/dist/v2/components/chat/CopilotChat.vue.d.ts +1 -0
  33. package/dist/v2/components/chat/CopilotChat.vue.d.ts.map +1 -1
  34. package/dist/v2/components/chat/CopilotChatAssistantMessage.vue.d.ts +3 -1
  35. package/dist/v2/components/chat/CopilotChatAssistantMessage.vue.d.ts.map +1 -1
  36. package/dist/v2/components/chat/CopilotChatAssistantToolbarButton.vue.d.ts +16 -0
  37. package/dist/v2/components/chat/CopilotChatAssistantToolbarButton.vue.d.ts.map +1 -0
  38. package/dist/v2/components/chat/CopilotChatAttachmentQueue.vue.d.ts.map +1 -1
  39. package/dist/v2/components/chat/CopilotChatAttachmentRenderer.vue.d.ts.map +1 -1
  40. package/dist/v2/components/chat/CopilotChatAudioRecorder.vue.d.ts.map +1 -1
  41. package/dist/v2/components/chat/CopilotChatFeedbackCommentPopover.vue.d.ts +22 -0
  42. package/dist/v2/components/chat/CopilotChatFeedbackCommentPopover.vue.d.ts.map +1 -0
  43. package/dist/v2/components/chat/CopilotChatInput.vue.d.ts +21 -232
  44. package/dist/v2/components/chat/CopilotChatInput.vue.d.ts.map +1 -1
  45. package/dist/v2/components/chat/CopilotChatInspectorButton.vue.d.ts +12 -0
  46. package/dist/v2/components/chat/CopilotChatInspectorButton.vue.d.ts.map +1 -0
  47. package/dist/v2/components/chat/CopilotChatLightbox.vue.d.ts +22 -0
  48. package/dist/v2/components/chat/CopilotChatLightbox.vue.d.ts.map +1 -0
  49. package/dist/v2/components/chat/CopilotChatMessageView.vue.d.ts +20 -0
  50. package/dist/v2/components/chat/CopilotChatMessageView.vue.d.ts.map +1 -1
  51. package/dist/v2/components/chat/CopilotChatReasoningMessage.vue.d.ts.map +1 -1
  52. package/dist/v2/components/chat/CopilotChatSuggestionPill.vue.d.ts.map +1 -1
  53. package/dist/v2/components/chat/CopilotChatSuggestionView.vue.d.ts.map +1 -1
  54. package/dist/v2/components/chat/CopilotChatToggleButton.vue.d.ts.map +1 -1
  55. package/dist/v2/components/chat/CopilotChatToolCallGroup.vue.d.ts +32 -0
  56. package/dist/v2/components/chat/CopilotChatToolCallGroup.vue.d.ts.map +1 -0
  57. package/dist/v2/components/chat/CopilotChatToolCallItem.vue.d.ts.map +1 -1
  58. package/dist/v2/components/chat/CopilotChatToolCallsView.vue.d.ts +11 -1
  59. package/dist/v2/components/chat/CopilotChatToolCallsView.vue.d.ts.map +1 -1
  60. package/dist/v2/components/chat/CopilotChatUserMessage.vue.d.ts.map +1 -1
  61. package/dist/v2/components/chat/CopilotChatView.vue.d.ts +1 -0
  62. package/dist/v2/components/chat/CopilotChatView.vue.d.ts.map +1 -1
  63. package/dist/v2/components/chat/CopilotChatWorkSummary.vue.d.ts +5 -0
  64. package/dist/v2/components/chat/CopilotChatWorkSummary.vue.d.ts.map +1 -0
  65. package/dist/v2/components/chat/CopilotModalHeader.vue.d.ts.map +1 -1
  66. package/dist/v2/components/chat/CopilotModalHeaderCloseButton.d.ts.map +1 -1
  67. package/dist/v2/components/chat/CopilotModalHeaderTitle.d.ts.map +1 -1
  68. package/dist/v2/components/chat/CopilotPopup.vue.d.ts +1 -0
  69. package/dist/v2/components/chat/CopilotPopup.vue.d.ts.map +1 -1
  70. package/dist/v2/components/chat/CopilotPopupView.vue.d.ts +1 -0
  71. package/dist/v2/components/chat/CopilotPopupView.vue.d.ts.map +1 -1
  72. package/dist/v2/components/chat/CopilotPopupViewInternal.vue.d.ts +1 -0
  73. package/dist/v2/components/chat/CopilotPopupViewInternal.vue.d.ts.map +1 -1
  74. package/dist/v2/components/chat/CopilotPopupWelcomeScreen.vue.d.ts.map +1 -1
  75. package/dist/v2/components/chat/CopilotSidebar.vue.d.ts +2 -0
  76. package/dist/v2/components/chat/CopilotSidebar.vue.d.ts.map +1 -1
  77. package/dist/v2/components/chat/CopilotSidebarView.vue.d.ts +2 -0
  78. package/dist/v2/components/chat/CopilotSidebarView.vue.d.ts.map +1 -1
  79. package/dist/v2/components/chat/CopilotSidebarViewInternal.vue.d.ts +2 -0
  80. package/dist/v2/components/chat/CopilotSidebarViewInternal.vue.d.ts.map +1 -1
  81. package/dist/v2/components/chat/CopilotSidebarWelcomeScreen.vue.d.ts.map +1 -1
  82. package/dist/v2/components/chat/StreamingMarkdownDefault.vue.d.ts.map +1 -1
  83. package/dist/v2/components/chat/copilotChatToolCallItemRender.d.ts +0 -1
  84. package/dist/v2/components/chat/copilotChatToolCallItemRender.d.ts.map +1 -1
  85. package/dist/v2/components/chat/index.d.ts +17 -1
  86. package/dist/v2/components/chat/index.d.ts.map +1 -1
  87. package/dist/v2/components/chat/inspector-shortcuts.d.ts +12 -0
  88. package/dist/v2/components/chat/inspector-shortcuts.d.ts.map +1 -0
  89. package/dist/v2/components/chat/message-feedback.d.ts +89 -0
  90. package/dist/v2/components/chat/message-feedback.d.ts.map +1 -0
  91. package/dist/v2/components/chat/tool-call-capture.d.ts +39 -0
  92. package/dist/v2/components/chat/tool-call-capture.d.ts.map +1 -0
  93. package/dist/v2/components/chat/tool-call-display-context.d.ts +22 -0
  94. package/dist/v2/components/chat/tool-call-display-context.d.ts.map +1 -0
  95. package/dist/v2/components/chat/tool-call-group-parts.d.ts +131 -0
  96. package/dist/v2/components/chat/tool-call-group-parts.d.ts.map +1 -0
  97. package/dist/v2/components/chat/turn-work.d.ts +33 -0
  98. package/dist/v2/components/chat/turn-work.d.ts.map +1 -0
  99. package/dist/v2/components/chat/types.d.ts +104 -5
  100. package/dist/v2/components/chat/types.d.ts.map +1 -1
  101. package/dist/v2/components/chat/use-chat-labels.d.ts +8 -0
  102. package/dist/v2/components/chat/use-chat-labels.d.ts.map +1 -0
  103. package/dist/v2/components/chat/use-lightbox.d.ts +18 -0
  104. package/dist/v2/components/chat/use-lightbox.d.ts.map +1 -0
  105. package/dist/v2/components/icons/index.d.ts +968 -1
  106. package/dist/v2/components/icons/index.d.ts.map +1 -1
  107. package/dist/v2/components/ui/CopilotDropdownMenuContent.vue.d.ts +55 -0
  108. package/dist/v2/components/ui/CopilotDropdownMenuContent.vue.d.ts.map +1 -0
  109. package/dist/v2/components/ui/CopilotPopover.vue.d.ts +40 -0
  110. package/dist/v2/components/ui/CopilotPopover.vue.d.ts.map +1 -0
  111. package/dist/v2/components/ui/CopilotTooltip.vue.d.ts +37 -0
  112. package/dist/v2/components/ui/CopilotTooltip.vue.d.ts.map +1 -0
  113. package/dist/v2/components/ui/dropdown-menu.d.ts +14 -0
  114. package/dist/v2/components/ui/dropdown-menu.d.ts.map +1 -0
  115. package/dist/v2/components/ui/floating.d.ts +84 -0
  116. package/dist/v2/components/ui/floating.d.ts.map +1 -0
  117. package/dist/v2/components/ui/presence.d.ts +9 -0
  118. package/dist/v2/components/ui/presence.d.ts.map +1 -0
  119. package/dist/v2/components/ui/use-id.d.ts +9 -0
  120. package/dist/v2/components/ui/use-id.d.ts.map +1 -0
  121. package/dist/v2/hooks/use-default-render-tool.d.ts +6 -0
  122. package/dist/v2/hooks/use-default-render-tool.d.ts.map +1 -1
  123. package/dist/v2/hooks/use-frontend-tool.d.ts +5 -0
  124. package/dist/v2/hooks/use-frontend-tool.d.ts.map +1 -1
  125. package/dist/v2/hooks/use-render-activity-message.d.ts +13 -9
  126. package/dist/v2/hooks/use-render-activity-message.d.ts.map +1 -1
  127. package/dist/v2/hooks/use-render-custom-messages.d.ts +5 -7
  128. package/dist/v2/hooks/use-render-custom-messages.d.ts.map +1 -1
  129. package/dist/v2/hooks/use-render-tool.d.ts +4 -0
  130. package/dist/v2/hooks/use-render-tool.d.ts.map +1 -1
  131. package/dist/v2/index.cjs +1 -1
  132. package/dist/v2/index.d.cts +3 -0
  133. package/dist/v2/index.d.mts +3 -0
  134. package/dist/v2/index.d.ts +3 -0
  135. package/dist/v2/index.d.ts.map +1 -1
  136. package/dist/v2/index.mjs +197 -197
  137. package/dist/v2/index.mjs.map +1 -1
  138. package/dist/v2/lib/message-feedback.d.ts +33 -0
  139. package/dist/v2/lib/message-feedback.d.ts.map +1 -0
  140. package/dist/v2/lib/processPartialHtml.d.ts +1 -2
  141. package/dist/v2/lib/processPartialHtml.d.ts.map +1 -1
  142. package/dist/v2/lib/vue-core.d.ts +0 -1
  143. package/dist/v2/lib/vue-core.d.ts.map +1 -1
  144. package/dist/v2/providers/CopilotChatConfigurationProvider.vue.d.ts.map +1 -1
  145. package/dist/v2/providers/CopilotKitProvider.types.d.ts +56 -6
  146. package/dist/v2/providers/CopilotKitProvider.types.d.ts.map +1 -1
  147. package/dist/v2/providers/CopilotKitProvider.vue.d.ts +6 -2
  148. package/dist/v2/providers/CopilotKitProvider.vue.d.ts.map +1 -1
  149. package/dist/v2/providers/index.d.ts +1 -1
  150. package/dist/v2/providers/index.d.ts.map +1 -1
  151. package/dist/v2/providers/keys.d.ts +8 -0
  152. package/dist/v2/providers/keys.d.ts.map +1 -1
  153. package/dist/v2/providers/types.d.ts +3 -37
  154. package/dist/v2/providers/types.d.ts.map +1 -1
  155. package/dist/v2/styles/CopilotKitStyles.d.ts +18 -0
  156. package/dist/v2/styles/CopilotKitStyles.d.ts.map +1 -0
  157. package/dist/v2/types/defineToolCallRenderer.d.ts +2 -0
  158. package/dist/v2/types/defineToolCallRenderer.d.ts.map +1 -1
  159. package/dist/v2/types/human-in-the-loop.d.ts +8 -29
  160. package/dist/v2/types/human-in-the-loop.d.ts.map +1 -1
  161. package/dist/v2/types/interrupt.d.ts +1 -22
  162. package/dist/v2/types/interrupt.d.ts.map +1 -1
  163. package/dist/v2/types/vue-activity-message-renderer.d.ts +16 -15
  164. package/dist/v2/types/vue-activity-message-renderer.d.ts.map +1 -1
  165. package/dist/v2/types/vue-custom-message-renderer.d.ts +7 -16
  166. package/dist/v2/types/vue-custom-message-renderer.d.ts.map +1 -1
  167. package/dist/v2/types/vue-tool-call-renderer.d.ts +16 -28
  168. package/dist/v2/types/vue-tool-call-renderer.d.ts.map +1 -1
  169. package/package.json +14 -27
  170. package/src/__tests__/build-entries.test.ts +27 -0
  171. package/src/components/copilot-provider/CopilotKit.vue +4 -1
  172. package/src/hooks/__tests__/zod-parameters.test.ts +520 -0
  173. package/src/hooks/use-copilot-action.ts +2 -1
  174. package/src/hooks/use-frontend-tool.ts +3 -6
  175. package/src/hooks/zod-parameters.ts +162 -0
  176. package/src/v2/__tests__/exports.test.ts +4 -2
  177. package/src/v2/components/A2UIMessageRenderer.ts +56 -68
  178. package/src/v2/components/A2UISurfaceActivityRenderer.vue +11 -23
  179. package/src/v2/components/LicenseWarningBanner.vue +31 -15
  180. package/src/v2/components/OpenGenerativeUIRenderer.ts +51 -373
  181. package/src/v2/components/__tests__/A2UIBasicCatalogColors.test.ts +8 -9
  182. package/src/v2/components/__tests__/A2UICatalogContext.test.ts +1 -1
  183. package/src/v2/components/__tests__/A2UIMessageRenderer.test.ts +63 -36
  184. package/src/v2/components/__tests__/LicenseWarningBanner.test.ts +20 -0
  185. package/src/v2/components/__tests__/OpenGenerativeUIRenderer.test.ts +55 -6
  186. package/src/v2/components/a2ui/A2UIBuiltInToolCallRenderer.ts +15 -258
  187. package/src/v2/components/a2ui/A2UICatalogContext.ts +10 -102
  188. package/src/v2/components/a2ui/A2UIRecoveryStates.ts +444 -0
  189. package/src/v2/components/a2ui/__tests__/A2UIRecoveryStates.test.ts +175 -0
  190. package/src/v2/components/a2ui.ts +1 -1
  191. package/src/v2/components/chat/CopilotChat.vue +26 -40
  192. package/src/v2/components/chat/CopilotChatAssistantMessage.vue +267 -67
  193. package/src/v2/components/chat/CopilotChatAssistantToolbarButton.vue +46 -0
  194. package/src/v2/components/chat/CopilotChatAttachmentQueue.vue +150 -173
  195. package/src/v2/components/chat/CopilotChatAttachmentRenderer.vue +77 -20
  196. package/src/v2/components/chat/CopilotChatAudioRecorder.vue +2 -2
  197. package/src/v2/components/chat/CopilotChatFeedbackCommentPopover.vue +240 -0
  198. package/src/v2/components/chat/CopilotChatInput.vue +250 -191
  199. package/src/v2/components/chat/CopilotChatInspectorButton.vue +331 -0
  200. package/src/v2/components/chat/CopilotChatLightbox.vue +105 -0
  201. package/src/v2/components/chat/CopilotChatMessageView.vue +262 -87
  202. package/src/v2/components/chat/CopilotChatReasoningMessage.vue +52 -35
  203. package/src/v2/components/chat/CopilotChatSuggestionPill.vue +5 -14
  204. package/src/v2/components/chat/CopilotChatSuggestionView.vue +1 -4
  205. package/src/v2/components/chat/CopilotChatToggleButton.vue +3 -9
  206. package/src/v2/components/chat/CopilotChatToggleButtonCloseIcon.ts +1 -1
  207. package/src/v2/components/chat/CopilotChatToggleButtonOpenIcon.ts +1 -1
  208. package/src/v2/components/chat/CopilotChatToolCallGroup.vue +353 -0
  209. package/src/v2/components/chat/CopilotChatToolCallItem.vue +24 -14
  210. package/src/v2/components/chat/CopilotChatToolCallsView.vue +194 -21
  211. package/src/v2/components/chat/CopilotChatUserMessage.vue +105 -42
  212. package/src/v2/components/chat/CopilotChatView.vue +37 -42
  213. package/src/v2/components/chat/CopilotChatWorkSummary.vue +111 -0
  214. package/src/v2/components/chat/CopilotModalHeader.vue +10 -8
  215. package/src/v2/components/chat/CopilotModalHeaderCloseButton.ts +7 -6
  216. package/src/v2/components/chat/CopilotModalHeaderTitle.ts +1 -4
  217. package/src/v2/components/chat/CopilotPopup.vue +3 -0
  218. package/src/v2/components/chat/CopilotPopupView.vue +1 -0
  219. package/src/v2/components/chat/CopilotPopupViewInternal.vue +9 -19
  220. package/src/v2/components/chat/CopilotPopupWelcomeScreen.vue +5 -8
  221. package/src/v2/components/chat/CopilotSidebar.vue +5 -0
  222. package/src/v2/components/chat/CopilotSidebarView.vue +2 -0
  223. package/src/v2/components/chat/CopilotSidebarViewInternal.vue +24 -17
  224. package/src/v2/components/chat/CopilotSidebarWelcomeScreen.vue +7 -10
  225. package/src/v2/components/chat/StreamingMarkdownDefault.vue +3 -5
  226. package/src/v2/components/chat/__tests__/CopilotChat.labels.test.ts +19 -4
  227. package/src/v2/components/chat/__tests__/CopilotChatActivityRendering.e2e.test.ts +26 -9
  228. package/src/v2/components/chat/__tests__/CopilotChatAssistantMessage.inspector.test.ts +269 -0
  229. package/src/v2/components/chat/__tests__/CopilotChatAssistantMessage.learningFeedback.test.ts +760 -0
  230. package/src/v2/components/chat/__tests__/CopilotChatAssistantMessage.slots.e2e.test.ts +3 -5
  231. package/src/v2/components/chat/__tests__/CopilotChatAssistantMessage.test.ts +2 -2
  232. package/src/v2/components/chat/__tests__/CopilotChatInput.addMenu.test.ts +328 -0
  233. package/src/v2/components/chat/__tests__/CopilotChatInput.slots.e2e.test.ts +6 -3
  234. package/src/v2/components/chat/__tests__/CopilotChatInput.test.ts +55 -14
  235. package/src/v2/components/chat/__tests__/CopilotChatLightbox.test.ts +160 -0
  236. package/src/v2/components/chat/__tests__/CopilotChatMessageView.test.ts +247 -403
  237. package/src/v2/components/chat/__tests__/CopilotChatMessageView.toolCallDisplay.test.ts +637 -0
  238. package/src/v2/components/chat/__tests__/CopilotChatSuggestionPill.test.ts +1 -1
  239. package/src/v2/components/chat/__tests__/CopilotChatSuggestionView.slots.e2e.test.ts +3 -1
  240. package/src/v2/components/chat/__tests__/CopilotChatToolCallsView.learning.test.ts +75 -0
  241. package/src/v2/components/chat/__tests__/CopilotChatUserMessage.attachments.test.ts +143 -0
  242. package/src/v2/components/chat/__tests__/CopilotChatView.inputOverlay.test.ts +5 -4
  243. package/src/v2/components/chat/__tests__/CopilotChatView.rootWidth.test.ts +7 -33
  244. package/src/v2/components/chat/__tests__/CopilotModalHeader.slots.e2e.test.ts +1 -1
  245. package/src/v2/components/chat/__tests__/CopilotPopupView.slots.e2e.test.ts +3 -3
  246. package/src/v2/components/chat/__tests__/CopilotSidebarView.position.test.ts +126 -0
  247. package/src/v2/components/chat/__tests__/messageFeedbackDefaults.test.ts +33 -0
  248. package/src/v2/components/chat/__tests__/modalChatDisplayProps.test.ts +44 -0
  249. package/src/v2/components/chat/copilotChatToolCallItemRender.ts +3 -19
  250. package/src/v2/components/chat/index.ts +2 -1
  251. package/src/v2/components/chat/inspector-shortcuts.ts +34 -0
  252. package/src/v2/components/chat/message-feedback.ts +291 -0
  253. package/src/v2/components/chat/tool-call-capture.ts +55 -0
  254. package/src/v2/components/chat/tool-call-display-context.ts +28 -0
  255. package/src/v2/components/chat/tool-call-group-parts.ts +251 -0
  256. package/src/v2/components/chat/turn-work.ts +52 -0
  257. package/src/v2/components/chat/types.ts +114 -4
  258. package/src/v2/components/chat/use-chat-labels.ts +16 -0
  259. package/src/v2/components/chat/use-lightbox.ts +64 -0
  260. package/src/v2/components/icons/__tests__/icons.test.ts +72 -68
  261. package/src/v2/components/icons/index.ts +109 -23
  262. package/src/v2/components/ui/CopilotDropdownMenuContent.vue +465 -0
  263. package/src/v2/components/ui/CopilotPopover.vue +138 -0
  264. package/src/v2/components/ui/CopilotTooltip.vue +237 -0
  265. package/src/v2/components/ui/__tests__/CopilotTooltip.test.ts +168 -0
  266. package/src/v2/components/ui/dropdown-menu.ts +15 -0
  267. package/src/v2/components/ui/floating.ts +321 -0
  268. package/src/v2/components/ui/presence.ts +54 -0
  269. package/src/v2/components/ui/use-id.ts +16 -0
  270. package/src/v2/hooks/__tests__/use-frontend-tool.e2e.test.ts +62 -1
  271. package/src/v2/hooks/__tests__/use-render-activity-message.test.ts +105 -0
  272. package/src/v2/hooks/__tests__/use-render-tool.test.ts +3 -6
  273. package/src/v2/hooks/__tests__/zod-regression.test.ts +5 -4
  274. package/src/v2/hooks/use-default-render-tool.ts +123 -62
  275. package/src/v2/hooks/use-frontend-tool.ts +10 -10
  276. package/src/v2/hooks/use-render-activity-message.ts +27 -48
  277. package/src/v2/hooks/use-render-custom-messages.ts +14 -35
  278. package/src/v2/hooks/use-render-tool.ts +8 -0
  279. package/src/v2/index.ts +3 -0
  280. package/src/v2/lib/__tests__/message-feedback.test.ts +152 -0
  281. package/src/v2/lib/message-feedback.ts +120 -0
  282. package/src/v2/lib/processPartialHtml.ts +6 -21
  283. package/src/v2/lib/vue-core.ts +3 -5
  284. package/src/v2/providers/CopilotChatConfigurationProvider.vue +29 -2
  285. package/src/v2/providers/CopilotKitProvider.types.ts +57 -5
  286. package/src/v2/providers/CopilotKitProvider.vue +177 -114
  287. package/src/v2/providers/__tests__/CopilotChatConfigurationProvider.openThread.test.ts +69 -0
  288. package/src/v2/providers/__tests__/CopilotKitProvider.a2ui.test.ts +1 -1
  289. package/src/v2/providers/__tests__/CopilotKitProvider.headersAtSendTime.test.ts +3 -3
  290. package/src/v2/providers/__tests__/CopilotKitProvider.learning.test.ts +536 -0
  291. package/src/v2/providers/__tests__/CopilotKitProvider.test.ts +17 -33
  292. package/src/v2/providers/index.ts +4 -1
  293. package/src/v2/providers/keys.ts +12 -0
  294. package/src/v2/providers/types.ts +3 -38
  295. package/src/v2/styles/CopilotKitStyles.ts +95 -0
  296. package/src/v2/styles/__tests__/CopilotKitStyles.client.test.ts +149 -0
  297. package/src/v2/styles/__tests__/CopilotKitStyles.ssr.test.ts +71 -0
  298. package/src/v2/types/__tests__/defineToolCallRenderer.test.ts +28 -33
  299. package/src/v2/types/defineToolCallRenderer.ts +9 -4
  300. package/src/v2/types/human-in-the-loop.ts +8 -32
  301. package/src/v2/types/interrupt.ts +7 -31
  302. package/src/v2/types/vue-activity-message-renderer.ts +24 -15
  303. package/src/v2/types/vue-custom-message-renderer.ts +12 -16
  304. package/src/v2/types/vue-tool-call-renderer.ts +23 -31
  305. package/vite.config.ts +5 -5
  306. package/dist/styles.css +0 -2
  307. package/dist/v2/components/chat/BasicMarkdown.vue.d.ts +0 -9
  308. package/dist/v2/components/chat/BasicMarkdown.vue.d.ts.map +0 -1
  309. package/dist/v2/lib/transcription-client.d.ts +0 -19
  310. package/dist/v2/lib/transcription-client.d.ts.map +0 -1
  311. package/scripts/scope-preflight.mjs +0 -100
  312. package/src/styles/globals.css +0 -233
  313. package/src/v2/components/chat/BasicMarkdown.vue +0 -158
  314. package/src/v2/components/chat/__tests__/BasicMarkdown.test.ts +0 -69
  315. package/src/v2/lib/__tests__/processPartialHtml.test.ts +0 -84
  316. package/src/v2/lib/__tests__/transcription-client.test.ts +0 -67
  317. package/src/v2/lib/transcription-client.ts +0 -151
@@ -1,7 +1,7 @@
1
1
  import type { Component } from "vue";
2
2
  import type { AbstractAgent } from "@ag-ui/client";
3
3
  import type { CopilotKitHeadersSource } from "@copilotkit/core";
4
- import type { CopilotKitProviderProps } from "./CopilotKitProvider.types";
4
+ import type { CopilotKitLearningOptions, CopilotKitProviderProps } from "./CopilotKitProvider.types";
5
5
  import type { SandboxFunction, VueActivityMessageRenderer, VueFrontendTool } from "../types";
6
6
  declare var __VLS_1: {};
7
7
  type __VLS_Slots = {} & {
@@ -10,8 +10,10 @@ type __VLS_Slots = {} & {
10
10
  declare const __VLS_component: import("vue").DefineComponent<CopilotKitProviderProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<CopilotKitProviderProps> & Readonly<{}>, {
11
11
  renderActivityMessages: VueActivityMessageRenderer<unknown>[];
12
12
  renderCustomMessages: import("..").VueCustomMessageRenderer[];
13
- properties: Record<string, unknown>;
14
13
  headers: CopilotKitHeadersSource;
14
+ nonce: string;
15
+ injectStyles: boolean;
16
+ properties: Record<string, unknown>;
15
17
  useSingleEndpoint: boolean;
16
18
  agents__unsafe_dev_only: Record<string, AbstractAgent>;
17
19
  selfManagedAgents: Record<string, AbstractAgent>;
@@ -27,10 +29,12 @@ declare const __VLS_component: import("vue").DefineComponent<CopilotKitProviderP
27
29
  catalog?: any;
28
30
  loadingComponent?: Component;
29
31
  includeSchema?: boolean;
32
+ recovery?: import("..").A2UIRecoveryRendererOptions;
30
33
  };
31
34
  mcpApps: {
32
35
  allowSameOriginFallback?: boolean;
33
36
  };
37
+ learning: boolean | CopilotKitLearningOptions;
34
38
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
35
39
  declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
36
40
  export default _default;
@@ -1 +1 @@
1
- {"version":3,"file":"CopilotKitProvider.vue.d.ts","sourceRoot":"","sources":["../../../src/v2/providers/CopilotKitProvider.vue"],"names":[],"mappings":"AAq2BA,OAAO,KAAK,EAAE,SAAS,EAAuB,MAAM,KAAK,CAAC;AAE1D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAEnD,OAAO,KAAK,EAGV,uBAAuB,EAExB,MAAM,kBAAkB,CAAC;AAkC1B,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,4BAA4B,CAAC;AAC1E,OAAO,KAAK,EACV,eAAe,EACf,0BAA0B,EAC1B,eAAe,EAGhB,MAAM,UAAU,CAAC;AA21BlB,QAAA,IAAI,OAAO,IAAW,CAAE;AACxB,KAAK,WAAW,GAAG,EAAE,GACnB;IAAE,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,OAAO,KAAK,GAAG,CAAA;CAAE,CAAC;AA4B/C,QAAA,MAAM,eAAe;;;;;;;;;;;wBAt7BrB,CApxB6B;mBAoxB7B,CAnxB4B;;;;aAmxB5B,CA3wB2C;eA2wB3C,CA1wBK;wBA0wBL,CA1wBiC;qBA0wBjC,CAhwB2D;;;+BAgwB3D,CA1vBqD;;6EAurDnD,CAAC;wBACkB,eAAe,CAAC,OAAO,eAAe,EAAE,WAAW,CAAC;AAAzE,wBAA0E;AAa1E,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
1
+ {"version":3,"file":"CopilotKitProvider.vue.d.ts","sourceRoot":"","sources":["../../../src/v2/providers/CopilotKitProvider.vue"],"names":[],"mappings":"AA06BA,OAAO,KAAK,EAAE,SAAS,EAAuB,MAAM,KAAK,CAAC;AAC1D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAEnD,OAAO,KAAK,EAGV,uBAAuB,EAExB,MAAM,kBAAkB,CAAC;AAuC1B,OAAO,KAAK,EACV,yBAAyB,EACzB,uBAAuB,EACxB,MAAM,4BAA4B,CAAC;AACpC,OAAO,KAAK,EACV,eAAe,EACf,0BAA0B,EAC1B,eAAe,EAGhB,MAAM,UAAU,CAAC;AAs3BlB,QAAA,IAAI,OAAO,IAAW,CAAE;AACxB,KAAK,WAAW,GAAG,EAAE,GACnB;IAAE,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,OAAO,KAAK,GAAG,CAAA;CAAE,CAAC;AAyB/C,QAAA,MAAM,eAAe;;;;;;;;;;;;;wBA39BrB,CAh0BoB;mBAg0BpB,CA/zBS;;;;aA+zBT,CAvzByC;eAuzBzC,CAvzBkE;wBAuzBlE,CAtzBiB;qBAszBjB,CArxBgC;gBAqxBhC,CA5wBuB;;;+BA4wBvB,CA3vBa;;;6EA6tDX,CAAC;wBACkB,eAAe,CAAC,OAAO,eAAe,EAAE,WAAW,CAAC;AAAzE,wBAA0E;AAa1E,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
@@ -1,5 +1,5 @@
1
1
  export { default as CopilotKitProvider } from "./CopilotKitProvider.vue";
2
- export type { CopilotKitProviderProps } from "./CopilotKitProvider.types";
2
+ export type { CopilotKitLearningOptions, CopilotKitProviderProps, } from "./CopilotKitProvider.types";
3
3
  export type { DebugConfig } from "@copilotkit/shared";
4
4
  export { default as CopilotChatConfigurationProvider } from "./CopilotChatConfigurationProvider.vue";
5
5
  export type { CopilotChatConfigurationProviderProps } from "./CopilotChatConfigurationProvider.types";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/v2/providers/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,kBAAkB,EAAE,MAAM,0BAA0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EACzB,uBAAuB,EACvB,KAAK,mBAAmB,GACzB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAChE,OAAO,EAAE,2BAA2B,EAAE,MAAM,+BAA+B,CAAC;AAC5E,OAAO,EACL,wBAAwB,EACxB,KAAK,iBAAiB,EACtB,KAAK,6BAA6B,GACnC,MAAM,SAAS,CAAC;AACjB,YAAY,EAAE,sBAAsB,EAAE,MAAM,QAAQ,CAAC;AACrD,cAAc,qBAAqB,CAAC"}
@@ -24,4 +24,12 @@ export type VueInspectorContextValue = {
24
24
  openInspector: (request: VueInspectorOpenRequest) => void;
25
25
  };
26
26
  export declare const InspectorKey: InjectionKey<VueInspectorContextValue>;
27
+ export interface CopilotStyleOptions {
28
+ /** CSP nonce for the `<style>` tag. */
29
+ nonce?: string;
30
+ /** `false` when the app loads `@copilotkit/core/styles.css` itself. */
31
+ inject: boolean;
32
+ }
33
+ /** Passes the provider's style options to `<CopilotKitStyles>`. */
34
+ export declare const CopilotStyleOptionsKey: InjectionKey<ComputedRef<CopilotStyleOptions>>;
27
35
  //# sourceMappingURL=keys.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"keys.d.ts","sourceRoot":"","sources":["../../../src/v2/providers/keys.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,YAAY,EAAE,GAAG,EAAE,UAAU,EAAE,MAAM,KAAK,CAAC;AACtE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AACzD,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,SAAS,CAAC;AAC7D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAC1C,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAEhD,MAAM,WAAW,sBAAsB;IACrC,UAAU,EAAE,UAAU,CAAC,iBAAiB,CAAC,CAAC;IAC1C,oBAAoB,EAAE,G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,CAAC"}
@@ -1,40 +1,6 @@
1
- export declare const CopilotChatDefaultLabels: {
2
- readonly chatInputPlaceholder: "Type a message...";
3
- readonly chatInputToolbarStartTranscribeButtonLabel: "Transcribe";
4
- readonly chatInputToolbarCancelTranscribeButtonLabel: "Cancel";
5
- readonly chatInputToolbarFinishTranscribeButtonLabel: "Finish";
6
- readonly chatInputToolbarAddButtonLabel: "Add photos or files";
7
- readonly chatInputToolbarToolsButtonLabel: "Tools";
8
- readonly chatInputToolbarSendButtonLabel: "Send message";
9
- readonly chatInputToolbarStopButtonLabel: "Stop";
10
- readonly assistantMessageToolbarCopyCodeLabel: "Copy";
11
- readonly assistantMessageToolbarCopyCodeCopiedLabel: "Copied";
12
- readonly assistantMessageToolbarCopyMessageLabel: "Copy";
13
- readonly assistantMessageToolbarThumbsUpLabel: "Good response";
14
- readonly assistantMessageToolbarThumbsDownLabel: "Bad response";
15
- readonly assistantMessageToolbarReadAloudLabel: "Read aloud";
16
- readonly assistantMessageToolbarRegenerateLabel: "Regenerate";
17
- readonly userMessageToolbarCopyMessageLabel: "Copy";
18
- readonly userMessageToolbarEditMessageLabel: "Edit";
19
- readonly userMessageToolbarPreviousBranchLabel: "Previous branch";
20
- readonly userMessageToolbarNextBranchLabel: "Next branch";
21
- readonly chatDisclaimerText: "AI can make mistakes. Please verify important information.";
22
- readonly chatToggleOpenLabel: "Open chat";
23
- readonly chatToggleCloseLabel: "Close chat";
24
- readonly chatScrollToBottomLabel: "Scroll to bottom";
25
- readonly modalHeaderTitle: "CopilotKit Chat";
26
- readonly welcomeMessageText: "How can I help you today?";
27
- readonly reasoningMessageThinkingLabel: "Thinking…";
28
- readonly chatInputSlashMenuLabel: "Slash commands";
29
- readonly chatInputSlashMenuEmptyText: "No commands found";
30
- readonly attachmentRemoveButtonLabel: "Remove attachment";
31
- readonly attachmentPlayVideoButtonLabel: "Play video";
32
- readonly attachmentPreviewCloseButtonLabel: "Close preview";
33
- readonly modalHeaderCloseButtonLabel: "Close";
34
- readonly modalHeaderThreadsButtonLabel: "Open threads";
35
- readonly sidebarLabel: "Copilot chat sidebar";
36
- };
37
- export type CopilotChatLabels = typeof CopilotChatDefaultLabels;
1
+ import type { CopilotChatLabels } from "@copilotkit/core";
2
+ export { CopilotChatDefaultLabels } from "@copilotkit/core";
3
+ export type { CopilotChatLabels } from "@copilotkit/core";
38
4
  export interface CopilotChatConfigurationValue {
39
5
  labels: CopilotChatLabels;
40
6
  agentId: string;
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/v2/providers/types.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoC3B,CAAC;AAEX,MAAM,MAAM,iBAAiB,GAAG,OAAO,wBAAwB,CAAC;AAEhE,MAAM,WAAW,6BAA6B;IAC5C,MAAM,EAAE,iBAAiB,CAAC;IAC1B,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;IACjB;;;;;OAKG;IACH,mBAAmB,EAAE,OAAO,CAAC;IAC7B,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IACvC;;;;OAIG;IACH,iBAAiB,EAAE,CACjB,QAAQ,EAAE,MAAM,EAChB,OAAO,CAAC,EAAE;QAAE,QAAQ,CAAC,EAAE,OAAO,CAAA;KAAE,KAC7B,IAAI,CAAC;IACV;;;OAGG;IACH,cAAc,EAAE,MAAM,IAAI,CAAC;IAC3B,4DAA4D;IAC5D,UAAU,EAAE,OAAO,CAAC;IACpB;;;OAGG;IACH,aAAa,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IACvC,gFAAgF;IAChF,gBAAgB,EAAE,OAAO,CAAC;IAC1B,yEAAyE;IACzE,cAAc,EAAE,MAAM,MAAM,IAAI,CAAC;CAClC"}
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/v2/providers/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAE1D,OAAO,EAAE,wBAAwB,EAAE,MAAM,kBAAkB,CAAC;AAC5D,YAAY,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAE1D,MAAM,WAAW,6BAA6B;IAC5C,MAAM,EAAE,iBAAiB,CAAC;IAC1B,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;IACjB;;;;;OAKG;IACH,mBAAmB,EAAE,OAAO,CAAC;IAC7B,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IACvC;;;;OAIG;IACH,iBAAiB,EAAE,CACjB,QAAQ,EAAE,MAAM,EAChB,OAAO,CAAC,EAAE;QAAE,QAAQ,CAAC,EAAE,OAAO,CAAA;KAAE,KAC7B,IAAI,CAAC;IACV;;;OAGG;IACH,cAAc,EAAE,MAAM,IAAI,CAAC;IAC3B,4DAA4D;IAC5D,UAAU,EAAE,OAAO,CAAC;IACpB;;;OAGG;IACH,aAAa,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IACvC,gFAAgF;IAChF,gBAAgB,EAAE,OAAO,CAAC;IAC1B,yEAAyE;IACzE,cAAc,EAAE,MAAM,MAAM,IAAI,CAAC;CAClC"}
@@ -0,0 +1,18 @@
1
+ /**
2
+ * Renders the CSS for CopilotKit's UI, so apps never import a stylesheet.
3
+ * `CopilotChat` (and so `CopilotPopup` and `CopilotSidebar`) renders it for
4
+ * you. Render it yourself only when you build a layout from the chat parts
5
+ * without `CopilotChat`.
6
+ *
7
+ * The `<style>` tag renders in place, so it is in the server HTML and the page
8
+ * is styled before it hydrates. Only the first instance in the app renders the
9
+ * tag, so a page with many chats has one copy. When that instance unmounts, the
10
+ * next one renders the tag in the same update. The server and the client set
11
+ * up instances in the same order, so hydration matches.
12
+ *
13
+ * Renders nothing when `CopilotKitProvider` has `:inject-styles="false"`.
14
+ */
15
+ export declare const CopilotKitStyles: import("vue").DefineComponent<{}, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
16
+ [key: string]: any;
17
+ }> | null, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
18
+ //# sourceMappingURL=CopilotKitStyles.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CopilotKitStyles.d.ts","sourceRoot":"","sources":["../../../src/v2/styles/CopilotKitStyles.ts"],"names":[],"mappings":"AA2BA;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,gBAAgB;;kPAqD3B,CAAC"}
@@ -5,11 +5,13 @@ export declare function defineToolCallRenderer(def: {
5
5
  name: "*";
6
6
  render: VueToolCallRendererRenderFn<unknown>;
7
7
  agentId?: string;
8
+ group?: boolean;
8
9
  }): VueToolCallRenderer<unknown>;
9
10
  export declare function defineToolCallRenderer<S extends StandardSchemaV1>(def: {
10
11
  name: string;
11
12
  args: S;
12
13
  render: VueToolCallRendererRenderFn<InferSchemaOutput<S>>;
13
14
  agentId?: string;
15
+ group?: boolean;
14
16
  }): VueToolCallRenderer<InferSchemaOutput<S>>;
15
17
  //# sourceMappingURL=defineToolCallRenderer.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"defineToolCallRenderer.d.ts","sourceRoot":"","sources":["../../../src/v2/types/defineToolCallRenderer.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAC9E,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AACpE,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,0BAA0B,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AAC;IAC1D,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB,GAAG,mBAAmB,CAAC,iBAAiB,CAAC,CAAC,CAAC,CAAC,CAAC"}
@@ -1,33 +1,12 @@
1
- import type { FrontendTool, ToolCallStatus } from "@copilotkit/core";
1
+ import type { FrontendTool, HumanInTheLoopRenderProps } from "@copilotkit/core";
2
2
  import type { Component, VNodeChild } from "vue";
3
- export type VueHumanInTheLoopRenderProps<T> = {
4
- name: string;
5
- description: string;
6
- toolCallId: string;
7
- agentId?: string;
8
- args: Partial<T>;
9
- status: ToolCallStatus.InProgress;
10
- result: undefined;
11
- respond: undefined;
12
- } | {
13
- name: string;
14
- description: string;
15
- toolCallId: string;
16
- agentId?: string;
17
- args: T;
18
- status: ToolCallStatus.Executing;
19
- result: undefined;
20
- respond: (result: unknown) => Promise<void>;
21
- } | {
22
- name: string;
23
- description: string;
24
- toolCallId: string;
25
- agentId?: string;
26
- args: T;
27
- status: ToolCallStatus.Complete;
28
- result: string;
29
- respond: undefined;
30
- };
3
+ /**
4
+ * Props a Vue human-in-the-loop renderer receives. Same as core's
5
+ * `HumanInTheLoopRenderProps`.
6
+ *
7
+ * @typeParam T - The shape of the tool arguments.
8
+ */
9
+ export type VueHumanInTheLoopRenderProps<T> = HumanInTheLoopRenderProps<T>;
31
10
  export type VueHumanInTheLoopRenderFn<T> = ((props: VueHumanInTheLoopRenderProps<T>) => VNodeChild) | Component<VueHumanInTheLoopRenderProps<T>>;
32
11
  export type VueHumanInTheLoop<T extends Record<string, unknown> = Record<string, unknown>> = Omit<FrontendTool<T>, "handler"> & {
33
12
  render: VueHumanInTheLoopRenderFn<T>;
@@ -1 +1 @@
1
- {"version":3,"file":"human-in-the-loop.d.ts","sourceRoot":"","sources":["../../../src/v2/types/human-in-the-loop.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AACr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G,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,IACzD,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC,EAAE,SAAS,CAAC,GAAG;IACrC,MAAM,EAAE,yBAAyB,CAAC,CAAC,CAAC,CAAC;CACtC,CAAC"}
1
+ {"version":3,"file":"human-in-the-loop.d.ts","sourceRoot":"","sources":["../../../src/v2/types/human-in-the-loop.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,yBAAyB,EAAE,MAAM,kBAAkB,CAAC;AAChF,OAAO,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,KAAK,CAAC;AAEjD;;;;;GAKG;AACH,MAAM,MAAM,4BAA4B,CAAC,CAAC,IAAI,yBAAyB,CAAC,CAAC,CAAC,CAAC;AAE3E,MAAM,MAAM,yBAAyB,CAAC,CAAC,IACnC,CAAC,CAAC,KAAK,EAAE,4BAA4B,CAAC,CAAC,CAAC,KAAK,UAAU,CAAC,GACxD,SAAS,CAAC,4BAA4B,CAAC,CAAC,CAAC,CAAC,CAAC;AAE/C,MAAM,MAAM,iBAAiB,CAC3B,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,IACzD,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC,EAAE,SAAS,CAAC,GAAG;IACrC,MAAM,EAAE,yBAAyB,CAAC,CAAC,CAAC,CAAC;CACtC,CAAC"}
@@ -1,23 +1,2 @@
1
- import type { Interrupt, RunAgentResult } from "@ag-ui/client";
2
- export interface InterruptEvent<TValue = unknown> {
3
- name: string;
4
- value: TValue;
5
- }
6
- export type InterruptResolveFn = (payload?: unknown, interruptId?: string) => Promise<RunAgentResult | void>;
7
- export type InterruptCancelFn = (interruptId?: string) => Promise<RunAgentResult | void>;
8
- export interface InterruptHandlerProps<TValue = unknown> {
9
- event: InterruptEvent<TValue>;
10
- interrupt: Interrupt | null;
11
- interrupts: Interrupt[];
12
- resolve: InterruptResolveFn;
13
- cancel: InterruptCancelFn;
14
- }
15
- export interface InterruptRenderProps<TValue = unknown, TResult = unknown> {
16
- event: InterruptEvent<TValue>;
17
- interrupt: Interrupt | null;
18
- interrupts: Interrupt[];
19
- result: TResult;
20
- resolve: InterruptResolveFn;
21
- cancel: InterruptCancelFn;
22
- }
1
+ export type { InterruptEvent, InterruptResolveFn, InterruptCancelFn, InterruptHandlerProps, InterruptRenderProps, } from "@copilotkit/core";
23
2
  //# sourceMappingURL=interrupt.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"interrupt.d.ts","sourceRoot":"","sources":["../../../src/v2/types/interrupt.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAE/D,MAAM,WAAW,cAAc,CAAC,MAAM,GAAG,OAAO;IAC9C,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,MAAM,kBAAkB,GAAG,CAC/B,OAAO,CAAC,EAAE,OAAO,EACjB,WAAW,CAAC,EAAE,MAAM,KACjB,OAAO,CAAC,cAAc,GAAG,IAAI,CAAC,CAAC;AACpC,MAAM,MAAM,iBAAiB,GAAG,CAC9B,WAAW,CAAC,EAAE,MAAM,KACjB,OAAO,CAAC,cAAc,GAAG,IAAI,CAAC,CAAC;AAEpC,MAAM,WAAW,qBAAqB,CAAC,MAAM,GAAG,OAAO;IACrD,KAAK,EAAE,cAAc,CAAC,MAAM,CAAC,CAAC;IAC9B,SAAS,EAAE,SAAS,GAAG,IAAI,CAAC;IAC5B,UAAU,EAAE,SAAS,EAAE,CAAC;IACxB,OAAO,EAAE,kBAAkB,CAAC;IAC5B,MAAM,EAAE,iBAAiB,CAAC;CAC3B;AAED,MAAM,WAAW,oBAAoB,CAAC,MAAM,GAAG,OAAO,EAAE,OAAO,GAAG,OAAO;IACvE,KAAK,EAAE,cAAc,CAAC,MAAM,CAAC,CAAC;IAC9B,SAAS,EAAE,SAAS,GAAG,IAAI,CAAC;IAC5B,UAAU,EAAE,SAAS,EAAE,CAAC;IACxB,MAAM,EAAE,OAAO,CAAC;IAChB,OAAO,EAAE,kBAAkB,CAAC;IAC5B,MAAM,EAAE,iBAAiB,CAAC;CAC3B"}
1
+ {"version":3,"file":"interrupt.d.ts","sourceRoot":"","sources":["../../../src/v2/types/interrupt.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,cAAc,EACd,kBAAkB,EAClB,iBAAiB,EACjB,qBAAqB,EACrB,oBAAoB,GACrB,MAAM,kBAAkB,CAAC"}
@@ -1,18 +1,19 @@
1
- import type { ActivityMessage } from "@ag-ui/core";
2
- import type { AbstractAgent } from "@ag-ui/client";
3
- import type { z } from "zod";
1
+ import type { ActivityMessageRenderProps, ActivityMessageRendererDef } from "@copilotkit/core";
4
2
  import type { Component, VNodeChild } from "vue";
5
- export interface VueActivityMessageRendererProps<TActivityContent> {
6
- activityType: string;
7
- content: TActivityContent;
8
- message: ActivityMessage;
9
- agent: AbstractAgent | undefined;
10
- }
3
+ /**
4
+ * Props a Vue activity message renderer receives. Same as core's
5
+ * `ActivityMessageRenderProps`.
6
+ *
7
+ * @typeParam TActivityContent - The shape of the activity content.
8
+ */
9
+ export type VueActivityMessageRendererProps<TActivityContent> = ActivityMessageRenderProps<TActivityContent>;
11
10
  export type VueActivityMessageRendererRenderFn<TActivityContent> = ((props: VueActivityMessageRendererProps<TActivityContent>) => VNodeChild) | Component<VueActivityMessageRendererProps<TActivityContent>>;
12
- export interface VueActivityMessageRenderer<TActivityContent> {
13
- activityType: string;
14
- agentId?: string;
15
- content: z.ZodSchema<TActivityContent>;
16
- render: VueActivityMessageRendererRenderFn<TActivityContent>;
17
- }
11
+ /**
12
+ * A Vue activity message renderer registration. `content` takes any
13
+ * Standard Schema (zod, valibot, arktype, and so on). The chat validates the
14
+ * activity content with it and passes the result to `render`.
15
+ *
16
+ * @typeParam TActivityContent - The shape of the activity content.
17
+ */
18
+ export type VueActivityMessageRenderer<TActivityContent> = ActivityMessageRendererDef<TActivityContent, VueActivityMessageRendererRenderFn<TActivityContent>>;
18
19
  //# sourceMappingURL=vue-activity-message-renderer.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"vue-activity-message-renderer.d.ts","sourceRoot":"","sources":["../../../src/v2/types/vue-activity-message-renderer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AACnD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AACnD,OAAO,KAAK,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAC7B,OAAO,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,KAAK,CAAC;AAEjD,MAAM,WAAW,+BAA+B,CAAC,gBAAgB;IAC/D,YAAY,EAAE,MAAM,CAAC;IACrB,OAAO,EAAE,gBAAgB,CAAC;IAC1B,OAAO,EAAE,eAAe,CAAC;IACzB,KAAK,EAAE,aAAa,GAAG,SAAS,CAAC;CAClC;AAED,MAAM,MAAM,kCAAkC,CAAC,gBAAgB,IAC3D,CAAC,CAAC,KAAK,EAAE,+BAA+B,CAAC,gBAAgB,CAAC,KAAK,UAAU,CAAC,GAC1E,SAAS,CAAC,+BAA+B,CAAC,gBAAgB,CAAC,CAAC,CAAC;AAEjE,MAAM,WAAW,0BAA0B,CAAC,gBAAgB;IAC1D,YAAY,EAAE,MAAM,CAAC;IACrB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,CAAC,CAAC,SAAS,CAAC,gBAAgB,CAAC,CAAC;IACvC,MAAM,EAAE,kCAAkC,CAAC,gBAAgB,CAAC,CAAC;CAC9D"}
1
+ {"version":3,"file":"vue-activity-message-renderer.d.ts","sourceRoot":"","sources":["../../../src/v2/types/vue-activity-message-renderer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,0BAA0B,EAC1B,0BAA0B,EAC3B,MAAM,kBAAkB,CAAC;AAC1B,OAAO,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,KAAK,CAAC;AAEjD;;;;;GAKG;AACH,MAAM,MAAM,+BAA+B,CAAC,gBAAgB,IAC1D,0BAA0B,CAAC,gBAAgB,CAAC,CAAC;AAE/C,MAAM,MAAM,kCAAkC,CAAC,gBAAgB,IAC3D,CAAC,CAAC,KAAK,EAAE,+BAA+B,CAAC,gBAAgB,CAAC,KAAK,UAAU,CAAC,GAC1E,SAAS,CAAC,+BAA+B,CAAC,gBAAgB,CAAC,CAAC,CAAC;AAEjE;;;;;;GAMG;AACH,MAAM,MAAM,0BAA0B,CAAC,gBAAgB,IACrD,0BAA0B,CACxB,gBAAgB,EAChB,kCAAkC,CAAC,gBAAgB,CAAC,CACrD,CAAC"}
@@ -1,19 +1,10 @@
1
- import type { Message } from "@ag-ui/core";
1
+ import type { CustomMessageRendererDef, CustomMessageRendererPosition, CustomMessageRenderProps } from "@copilotkit/core";
2
2
  import type { Component, VNodeChild } from "vue";
3
- export type VueCustomMessageRendererPosition = "before" | "after";
4
- export interface VueCustomMessageRendererProps {
5
- message: Message;
6
- position: VueCustomMessageRendererPosition;
7
- runId: string;
8
- messageIndex: number;
9
- messageIndexInRun: number;
10
- numberOfMessagesInRun: number;
11
- agentId: string;
12
- stateSnapshot: unknown;
13
- }
3
+ /** Where a custom message renderer draws. Same as core's type. */
4
+ export type VueCustomMessageRendererPosition = CustomMessageRendererPosition;
5
+ /** Props a Vue custom message renderer receives. Same as core's type. */
6
+ export type VueCustomMessageRendererProps = CustomMessageRenderProps;
14
7
  export type VueCustomMessageRendererRenderFn = ((props: VueCustomMessageRendererProps) => VNodeChild) | Component<VueCustomMessageRendererProps>;
15
- export interface VueCustomMessageRenderer {
16
- agentId?: string;
17
- render: VueCustomMessageRendererRenderFn;
18
- }
8
+ /** A Vue custom message renderer registration. */
9
+ export type VueCustomMessageRenderer = CustomMessageRendererDef<VueCustomMessageRendererRenderFn>;
19
10
  //# sourceMappingURL=vue-custom-message-renderer.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"vue-custom-message-renderer.d.ts","sourceRoot":"","sources":["../../../src/v2/types/vue-custom-message-renderer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAC3C,OAAO,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,KAAK,CAAC;AAEjD,MAAM,MAAM,gCAAgC,GAAG,QAAQ,GAAG,OAAO,CAAC;AAElE,MAAM,WAAW,6BAA6B;IAC5C,OAAO,EAAE,OAAO,CAAC;IACjB,QAAQ,EAAE,gCAAgC,CAAC;IAC3C,KAAK,EAAE,MAAM,CAAC;IACd,YAAY,EAAE,MAAM,CAAC;IACrB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,qBAAqB,EAAE,MAAM,CAAC;IAC9B,OAAO,EAAE,MAAM,CAAC;IAChB,aAAa,EAAE,OAAO,CAAC;CACxB;AAED,MAAM,MAAM,gCAAgC,GACxC,CAAC,CAAC,KAAK,EAAE,6BAA6B,KAAK,UAAU,CAAC,GACtD,SAAS,CAAC,6BAA6B,CAAC,CAAC;AAE7C,MAAM,WAAW,wBAAwB;IACvC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,gCAAgC,CAAC;CAC1C"}
1
+ {"version":3,"file":"vue-custom-message-renderer.d.ts","sourceRoot":"","sources":["../../../src/v2/types/vue-custom-message-renderer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,wBAAwB,EACxB,6BAA6B,EAC7B,wBAAwB,EACzB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,KAAK,CAAC;AAEjD,kEAAkE;AAClE,MAAM,MAAM,gCAAgC,GAAG,6BAA6B,CAAC;AAE7E,yEAAyE;AACzE,MAAM,MAAM,6BAA6B,GAAG,wBAAwB,CAAC;AAErE,MAAM,MAAM,gCAAgC,GACxC,CAAC,CAAC,KAAK,EAAE,6BAA6B,KAAK,UAAU,CAAC,GACtD,SAAS,CAAC,6BAA6B,CAAC,CAAC;AAE7C,kDAAkD;AAClD,MAAM,MAAM,wBAAwB,GAClC,wBAAwB,CAAC,gCAAgC,CAAC,CAAC"}
@@ -1,37 +1,25 @@
1
- import type { ToolCallStatus } from "@copilotkit/core";
2
- import type { StandardSchemaV1 } from "@copilotkit/shared";
1
+ import type { ToolCallRenderProps, ToolCallRendererDef } from "@copilotkit/core";
3
2
  import type { Component, VNodeChild } from "vue";
4
3
  /**
5
- * Props passed to a Vue tool call render function.
4
+ * Props passed to a Vue tool call render function. Same as core's
5
+ * `ToolCallRenderProps`.
6
+ *
7
+ * @typeParam T - The shape of the tool arguments.
6
8
  */
7
- export type VueToolCallRendererRenderProps<T> = {
8
- name: string;
9
- toolCallId: string;
10
- args: Partial<T>;
11
- status: ToolCallStatus.InProgress;
12
- result: undefined;
13
- } | {
14
- name: string;
15
- toolCallId: string;
16
- args: T;
17
- status: ToolCallStatus.Executing;
18
- result: undefined;
19
- } | {
20
- name: string;
21
- toolCallId: string;
22
- args: T;
23
- status: ToolCallStatus.Complete;
24
- result: string;
25
- };
9
+ export type VueToolCallRendererRenderProps<T> = ToolCallRenderProps<T>;
26
10
  /**
27
11
  * Vue component or render function for tool call rendering.
28
12
  * Component is normalized to (props) => VNodeChild internally.
29
13
  */
30
14
  export type VueToolCallRendererRenderFn<T> = ((props: VueToolCallRendererRenderProps<T>) => VNodeChild) | Component<VueToolCallRendererRenderProps<T>>;
31
- export interface VueToolCallRenderer<T = unknown> {
32
- name: string;
33
- args: StandardSchemaV1<any, T>;
34
- agentId?: string;
35
- render: VueToolCallRendererRenderFn<T>;
36
- }
15
+ type VueToolCallRendererDef<T> = ToolCallRendererDef<T, VueToolCallRendererRenderFn<T>>;
16
+ /**
17
+ * A Vue tool call renderer registration: core's `ToolCallRendererDef` with a
18
+ * Vue render function. `args` is required here. Use `defineToolCallRenderer`
19
+ * to build one; it fills in `args` for a `"*"` renderer that has no schema.
20
+ *
21
+ * @typeParam T - The shape of the tool arguments.
22
+ */
23
+ export type VueToolCallRenderer<T = unknown> = VueToolCallRendererDef<T> & Required<Pick<VueToolCallRendererDef<T>, "args">>;
24
+ export {};
37
25
  //# sourceMappingURL=vue-tool-call-renderer.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"vue-tool-call-renderer.d.ts","sourceRoot":"","sources":["../../../src/v2/types/vue-tool-call-renderer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AACvD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAC3D,OAAO,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,KAAK,CAAC;AAEjD;;GAEG;AACH,MAAM,MAAM,8BAA8B,CAAC,CAAC,IACxC;IACE,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,MAAM,CAAC;IACnB,IAAI,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC;IACjB,MAAM,EAAE,cAAc,CAAC,UAAU,CAAC;IAClC,MAAM,EAAE,SAAS,CAAC;CACnB,GACD;IACE,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,MAAM,CAAC;IACnB,IAAI,EAAE,CAAC,CAAC;IACR,MAAM,EAAE,cAAc,CAAC,SAAS,CAAC;IACjC,MAAM,EAAE,SAAS,CAAC;CACnB,GACD;IACE,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,MAAM,CAAC;IACnB,IAAI,EAAE,CAAC,CAAC;IACR,MAAM,EAAE,cAAc,CAAC,QAAQ,CAAC;IAChC,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AAEN;;;GAGG;AACH,MAAM,MAAM,2BAA2B,CAAC,CAAC,IACrC,CAAC,CAAC,KAAK,EAAE,8BAA8B,CAAC,CAAC,CAAC,KAAK,UAAU,CAAC,GAC1D,SAAS,CAAC,8BAA8B,CAAC,CAAC,CAAC,CAAC,CAAC;AAEjD,MAAM,WAAW,mBAAmB,CAAC,CAAC,GAAG,OAAO;IAC9C,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,gBAAgB,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC;IAC/B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,2BAA2B,CAAC,CAAC,CAAC,CAAC;CACxC"}
1
+ {"version":3,"file":"vue-tool-call-renderer.d.ts","sourceRoot":"","sources":["../../../src/v2/types/vue-tool-call-renderer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,mBAAmB,EACnB,mBAAmB,EACpB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,KAAK,CAAC;AAEjD;;;;;GAKG;AACH,MAAM,MAAM,8BAA8B,CAAC,CAAC,IAAI,mBAAmB,CAAC,CAAC,CAAC,CAAC;AAEvE;;;GAGG;AACH,MAAM,MAAM,2BAA2B,CAAC,CAAC,IACrC,CAAC,CAAC,KAAK,EAAE,8BAA8B,CAAC,CAAC,CAAC,KAAK,UAAU,CAAC,GAC1D,SAAS,CAAC,8BAA8B,CAAC,CAAC,CAAC,CAAC,CAAC;AAEjD,KAAK,sBAAsB,CAAC,CAAC,IAAI,mBAAmB,CAClD,CAAC,EACD,2BAA2B,CAAC,CAAC,CAAC,CAC/B,CAAC;AAEF;;;;;;GAMG;AACH,MAAM,MAAM,mBAAmB,CAAC,CAAC,GAAG,OAAO,IAAI,sBAAsB,CAAC,CAAC,CAAC,GACtE,QAAQ,CAAC,IAAI,CAAC,sBAAsB,CAAC,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@copilotkit/vue",
3
- "version": "2.0.0-rc.1",
3
+ "version": "2.0.0-rc.10",
4
4
  "private": false,
5
5
  "description": "Vue 3 components and composables for CopilotKit",
6
6
  "keywords": [
@@ -20,9 +20,7 @@
20
20
  "url": "https://github.com/CopilotKit/CopilotKit.git"
21
21
  },
22
22
  "type": "module",
23
- "sideEffects": [
24
- "**/*.css"
25
- ],
23
+ "sideEffects": false,
26
24
  "main": "./dist/index.cjs",
27
25
  "module": "./dist/index.mjs",
28
26
  "types": "./dist/index.d.cts",
@@ -54,7 +52,6 @@
54
52
  "default": "./dist/v2/index.cjs"
55
53
  }
56
54
  },
57
- "./styles.css": "./dist/styles.css",
58
55
  "./package.json": "./package.json"
59
56
  },
60
57
  "publishConfig": {
@@ -64,38 +61,29 @@
64
61
  "@a2ui/web_core": "0.10.4",
65
62
  "@ag-ui/client": "1.0.2",
66
63
  "@ag-ui/core": "1.0.2",
67
- "@copilotkit/core": "2.0.0-rc.1",
68
- "@copilotkit/markdown-renderer": "2.0.0-rc.1",
69
- "@copilotkit/mcp-apps-renderer": "2.0.0-rc.1",
70
- "@copilotkit/shared": "2.0.0-rc.1",
71
- "@copilotkit/web-components": "2.0.0-rc.1",
72
- "@copilotkit/web-inspector": "2.0.0-rc.1",
73
- "@jetbrains/websandbox": "^1.1.3",
74
- "lucide-vue-next": "^0.525.0",
75
- "zod": "^3.25.75",
76
- "zod-to-json-schema": "^3.24.5"
64
+ "@copilotkit/a2ui-renderer": "2.0.0-rc.10",
65
+ "@copilotkit/core": "2.0.0-rc.10",
66
+ "@copilotkit/markdown-renderer": "2.0.0-rc.10",
67
+ "@copilotkit/mcp-apps-renderer": "2.0.0-rc.10",
68
+ "@copilotkit/shared": "2.0.0-rc.10",
69
+ "@copilotkit/web-components": "2.0.0-rc.10",
70
+ "@copilotkit/web-inspector": "2.0.0-rc.10",
71
+ "zod": "^4.2.0"
77
72
  },
78
73
  "devDependencies": {
79
74
  "@eslint/js": "^9.39.2",
80
- "@tailwindcss/cli": "^4.1.11",
81
- "@tailwindcss/postcss": "^4.1.11",
82
- "@tailwindcss/typography": "^0.5.16",
83
75
  "@testing-library/vue": "^8.1.0",
84
76
  "@types/node": "^22.15.3",
85
77
  "@vitejs/plugin-vue": "^5.2.1",
86
78
  "@vue/compiler-sfc": "^3.5.14",
87
79
  "@vue/test-utils": "^2.4.6",
88
80
  "arktype": "^2.1.29",
89
- "concurrently": "^9.1.0",
90
81
  "eslint": "^9.30.0",
91
82
  "eslint-plugin-vue": "^10.8.0",
92
83
  "globals": "^16.5.0",
93
84
  "jsdom": "^26.1.0",
94
85
  "phoenix": "^1.8.4",
95
- "postcss": "^8.5.6",
96
86
  "rxjs": "7.8.1",
97
- "tailwindcss": "^4.0.8",
98
- "tw-animate-css": "^1.3.5",
99
87
  "typescript": "5.8.2",
100
88
  "typescript-eslint": "^8.52.0",
101
89
  "valibot": "^1.3.0",
@@ -104,6 +92,7 @@
104
92
  "vue": "^3.5.28",
105
93
  "vue-eslint-parser": "^10.4.0",
106
94
  "vue-tsc": "^2.1.10",
95
+ "zod-v3": "npm:zod@^3.25.76",
107
96
  "@copilotkit/typescript-config": "1.55.0-next.8"
108
97
  },
109
98
  "peerDependencies": {
@@ -113,11 +102,9 @@
113
102
  "node": ">=20"
114
103
  },
115
104
  "scripts": {
116
- "build": "vite build && pnpm build:css && pnpm build:types",
117
- "build:css": "npx @tailwindcss/cli -i ./src/styles/globals.css -o ./dist/styles.css -m && node scripts/scope-preflight.mjs ./dist/styles.css",
105
+ "build": "vite build && pnpm build:types",
118
106
  "build:types": "vue-tsc -p tsconfig.json --declaration --emitDeclarationOnly --outDir dist --skipLibCheck && node -e \"const fs=require('fs');fs.cpSync('./dist/index.d.ts','./dist/index.d.mts');fs.cpSync('./dist/index.d.ts','./dist/index.d.cts');fs.cpSync('./dist/v2/index.d.ts','./dist/v2/index.d.mts');fs.cpSync('./dist/v2/index.d.ts','./dist/v2/index.d.cts')\"",
119
- "dev:css": "npx @tailwindcss/cli -i ./src/styles/globals.css -o ./dist/styles.css --watch --minify",
120
- "dev": "concurrently \"pnpm dev:css\" \"vite build --watch\"",
107
+ "dev": "vite build --watch",
121
108
  "test": "vitest run",
122
109
  "test:watch": "vitest",
123
110
  "test:coverage": "vitest run --coverage",
@@ -125,7 +112,7 @@
125
112
  "lint": "eslint .",
126
113
  "check-types": "vue-tsc --noEmit",
127
114
  "publint": "publint .",
128
- "attw": "attw --pack . --profile node16 --exclude-entrypoints ./styles.css --ignore-rules internal-resolution-error",
115
+ "attw": "attw --pack . --profile node16 --ignore-rules internal-resolution-error",
129
116
  "clean": "node -e \"const fs=require('fs');fs.rmSync('dist',{recursive:true,force:true})\""
130
117
  }
131
118
  }
@@ -0,0 +1,27 @@
1
+ // @vitest-environment node
2
+ import { describe, expect, it } from "vitest";
3
+ import type { LibraryOptions } from "vite";
4
+ import config from "../../vite.config";
5
+ import { useFrontendTool as v1UseFrontendTool } from "../hooks/use-frontend-tool";
6
+ import { useFrontendTool as v2UseFrontendTool } from "../v2/hooks/use-frontend-tool";
7
+
8
+ // The package's "./v2" export points at the build's "v2/index" entry, and "."
9
+ // at "index". Each entry must build from the module that matches its export.
10
+ const entries = (config.build?.lib as LibraryOptions).entry as Record<
11
+ string,
12
+ string
13
+ >;
14
+
15
+ describe("library build entries", () => {
16
+ it("builds @copilotkit/vue/v2 from the v2 module, with the v2 hooks", async () => {
17
+ const v2 = await import(/* @vite-ignore */ entries["v2/index"]!);
18
+
19
+ expect(v2.useFrontendTool).toBe(v2UseFrontendTool);
20
+ });
21
+
22
+ it("builds @copilotkit/vue from the root module, with the v1-compatible hooks", async () => {
23
+ const root = await import(/* @vite-ignore */ entries.index!);
24
+
25
+ expect(root.useFrontendTool).toBe(v1UseFrontendTool);
26
+ });
27
+ });
@@ -8,7 +8,10 @@
8
8
  import type { CopilotKitProps } from "./types";
9
9
  import CopilotKitProvider from "../../v2/providers/CopilotKitProvider.vue";
10
10
 
11
- const props = defineProps<CopilotKitProps>();
11
+ // Vue casts an absent boolean prop to `false`, so keep the provider's default.
12
+ const props = withDefaults(defineProps<CopilotKitProps>(), {
13
+ injectStyles: true,
14
+ });
12
15
  </script>
13
16
 
14
17
  <template>