@copilotkit/vue 2.0.0-rc.2 → 2.0.0-rc.21

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 (335) hide show
  1. package/PARITY.md +3 -3
  2. package/dist/hooks/use-copilot-action.d.ts.map +1 -1
  3. package/dist/hooks/use-frontend-tool.d.ts +1 -1
  4. package/dist/hooks/use-frontend-tool.d.ts.map +1 -1
  5. package/dist/hooks/zod-parameters.d.ts +14 -0
  6. package/dist/hooks/zod-parameters.d.ts.map +1 -0
  7. package/dist/index.cjs +1 -73
  8. package/dist/index.cjs.map +1 -1
  9. package/dist/index.mjs +365 -16920
  10. package/dist/index.mjs.map +1 -1
  11. package/dist/use-render-activity-message-BAhbpSDh.js +16200 -0
  12. package/dist/use-render-activity-message-BAhbpSDh.js.map +1 -0
  13. package/dist/use-render-activity-message-DJ6q1qHV.cjs +114 -0
  14. package/dist/use-render-activity-message-DJ6q1qHV.cjs.map +1 -0
  15. package/dist/v2/components/A2UIMessageRenderer.d.ts +14 -0
  16. package/dist/v2/components/A2UIMessageRenderer.d.ts.map +1 -1
  17. package/dist/v2/components/A2UISurfaceActivityRenderer.vue.d.ts +10 -3
  18. package/dist/v2/components/A2UISurfaceActivityRenderer.vue.d.ts.map +1 -1
  19. package/dist/v2/components/CopilotKitInspector.vue.d.ts +5 -1
  20. package/dist/v2/components/CopilotKitInspector.vue.d.ts.map +1 -1
  21. package/dist/v2/components/InlineFeatureWarning.vue.d.ts.map +1 -1
  22. package/dist/v2/components/LicenseWarningBanner.vue.d.ts +2 -2
  23. package/dist/v2/components/LicenseWarningBanner.vue.d.ts.map +1 -1
  24. package/dist/v2/components/MCPAppsActivityRenderer.d.ts.map +1 -1
  25. package/dist/v2/components/OpenGenerativeUIRenderer.d.ts +13 -59
  26. package/dist/v2/components/OpenGenerativeUIRenderer.d.ts.map +1 -1
  27. package/dist/v2/components/a2ui/A2UIBuiltInToolCallRenderer.d.ts +0 -5
  28. package/dist/v2/components/a2ui/A2UIBuiltInToolCallRenderer.d.ts.map +1 -1
  29. package/dist/v2/components/a2ui/A2UICatalogContext.d.ts +10 -15
  30. package/dist/v2/components/a2ui/A2UICatalogContext.d.ts.map +1 -1
  31. package/dist/v2/components/a2ui/A2UIRecoveryStates.d.ts +14 -130
  32. package/dist/v2/components/a2ui/A2UIRecoveryStates.d.ts.map +1 -1
  33. package/dist/v2/components/a2ui/catalog.d.ts.map +1 -1
  34. package/dist/v2/components/a2ui/utils.d.ts +3 -15
  35. package/dist/v2/components/a2ui/utils.d.ts.map +1 -1
  36. package/dist/v2/components/a2ui.d.ts +9 -8
  37. package/dist/v2/components/a2ui.d.ts.map +1 -1
  38. package/dist/v2/components/chat/CopilotChat.vue.d.ts +2 -2
  39. package/dist/v2/components/chat/CopilotChat.vue.d.ts.map +1 -1
  40. package/dist/v2/components/chat/CopilotChatAssistantMessage.vue.d.ts.map +1 -1
  41. package/dist/v2/components/chat/CopilotChatAttachmentQueue.vue.d.ts.map +1 -1
  42. package/dist/v2/components/chat/CopilotChatAttachmentRenderer.vue.d.ts.map +1 -1
  43. package/dist/v2/components/chat/CopilotChatAudioRecorder.vue.d.ts +4 -8
  44. package/dist/v2/components/chat/CopilotChatAudioRecorder.vue.d.ts.map +1 -1
  45. package/dist/v2/components/chat/CopilotChatFeedbackCommentPopover.vue.d.ts +1 -1
  46. package/dist/v2/components/chat/CopilotChatFeedbackCommentPopover.vue.d.ts.map +1 -1
  47. package/dist/v2/components/chat/CopilotChatInput.vue.d.ts +6 -270
  48. package/dist/v2/components/chat/CopilotChatInput.vue.d.ts.map +1 -1
  49. package/dist/v2/components/chat/CopilotChatInspectorButton.vue.d.ts.map +1 -1
  50. package/dist/v2/components/chat/CopilotChatLightbox.vue.d.ts.map +1 -1
  51. package/dist/v2/components/chat/CopilotChatMessageView.vue.d.ts +1 -1
  52. package/dist/v2/components/chat/CopilotChatMessageView.vue.d.ts.map +1 -1
  53. package/dist/v2/components/chat/CopilotChatReasoningMessage.vue.d.ts.map +1 -1
  54. package/dist/v2/components/chat/CopilotChatToolCallGroup.vue.d.ts +1 -1
  55. package/dist/v2/components/chat/CopilotChatToolCallGroup.vue.d.ts.map +1 -1
  56. package/dist/v2/components/chat/CopilotChatToolCallItem.vue.d.ts.map +1 -1
  57. package/dist/v2/components/chat/CopilotChatToolCallsView.vue.d.ts +1 -1
  58. package/dist/v2/components/chat/CopilotChatToolCallsView.vue.d.ts.map +1 -1
  59. package/dist/v2/components/chat/CopilotChatUserMessage.vue.d.ts.map +1 -1
  60. package/dist/v2/components/chat/CopilotChatView.vue.d.ts +3 -3
  61. package/dist/v2/components/chat/CopilotChatView.vue.d.ts.map +1 -1
  62. package/dist/v2/components/chat/CopilotChatWorkSummary.vue.d.ts.map +1 -1
  63. package/dist/v2/components/chat/CopilotModalHeader.vue.d.ts.map +1 -1
  64. package/dist/v2/components/chat/CopilotPopup.vue.d.ts +8 -3
  65. package/dist/v2/components/chat/CopilotPopup.vue.d.ts.map +1 -1
  66. package/dist/v2/components/chat/CopilotPopupView.vue.d.ts +5 -3
  67. package/dist/v2/components/chat/CopilotPopupView.vue.d.ts.map +1 -1
  68. package/dist/v2/components/chat/CopilotPopupViewInternal.vue.d.ts +5 -3
  69. package/dist/v2/components/chat/CopilotPopupViewInternal.vue.d.ts.map +1 -1
  70. package/dist/v2/components/chat/CopilotSidebar.vue.d.ts +8 -3
  71. package/dist/v2/components/chat/CopilotSidebar.vue.d.ts.map +1 -1
  72. package/dist/v2/components/chat/CopilotSidebarView.vue.d.ts +6 -4
  73. package/dist/v2/components/chat/CopilotSidebarView.vue.d.ts.map +1 -1
  74. package/dist/v2/components/chat/CopilotSidebarViewInternal.vue.d.ts +6 -4
  75. package/dist/v2/components/chat/CopilotSidebarViewInternal.vue.d.ts.map +1 -1
  76. package/dist/v2/components/chat/CopilotThreadsDrawer.vue.d.ts.map +1 -1
  77. package/dist/v2/components/chat/StreamingMarkdownDefault.vue.d.ts +1 -0
  78. package/dist/v2/components/chat/StreamingMarkdownDefault.vue.d.ts.map +1 -1
  79. package/dist/v2/components/chat/audioRecorder.d.ts +3 -4
  80. package/dist/v2/components/chat/audioRecorder.d.ts.map +1 -1
  81. package/dist/v2/components/chat/copilotChatToolCallItemRender.d.ts +3 -3
  82. package/dist/v2/components/chat/copilotChatToolCallItemRender.d.ts.map +1 -1
  83. package/dist/v2/components/chat/forwarded-slots.d.ts +12 -0
  84. package/dist/v2/components/chat/forwarded-slots.d.ts.map +1 -0
  85. package/dist/v2/components/chat/index.d.ts +34 -31
  86. package/dist/v2/components/chat/index.d.ts.map +1 -1
  87. package/dist/v2/components/chat/inspector-shortcuts.d.ts +2 -1
  88. package/dist/v2/components/chat/inspector-shortcuts.d.ts.map +1 -1
  89. package/dist/v2/components/chat/message-feedback.d.ts +18 -49
  90. package/dist/v2/components/chat/message-feedback.d.ts.map +1 -1
  91. package/dist/v2/components/chat/tool-call-display-context.d.ts +4 -19
  92. package/dist/v2/components/chat/tool-call-display-context.d.ts.map +1 -1
  93. package/dist/v2/components/chat/tool-call-group-parts.d.ts +7 -20
  94. package/dist/v2/components/chat/tool-call-group-parts.d.ts.map +1 -1
  95. package/dist/v2/components/chat/turn-work.d.ts +0 -2
  96. package/dist/v2/components/chat/turn-work.d.ts.map +1 -1
  97. package/dist/v2/components/chat/types.d.ts +9 -4
  98. package/dist/v2/components/chat/types.d.ts.map +1 -1
  99. package/dist/v2/components/chat/use-chat-labels.d.ts +8 -0
  100. package/dist/v2/components/chat/use-chat-labels.d.ts.map +1 -0
  101. package/dist/v2/components/chat/use-copy-feedback.d.ts +11 -0
  102. package/dist/v2/components/chat/use-copy-feedback.d.ts.map +1 -0
  103. package/dist/v2/components/chat/use-lightbox.d.ts.map +1 -1
  104. package/dist/v2/components/icons/index.d.ts +968 -1
  105. package/dist/v2/components/icons/index.d.ts.map +1 -1
  106. package/dist/v2/components/ui/CopilotDropdownMenuContent.vue.d.ts +1 -1
  107. package/dist/v2/components/ui/CopilotDropdownMenuContent.vue.d.ts.map +1 -1
  108. package/dist/v2/hooks/use-agent-context.d.ts +2 -3
  109. package/dist/v2/hooks/use-agent-context.d.ts.map +1 -1
  110. package/dist/v2/hooks/use-agent.d.ts +4 -1
  111. package/dist/v2/hooks/use-agent.d.ts.map +1 -1
  112. package/dist/v2/hooks/use-attachments.d.ts +7 -0
  113. package/dist/v2/hooks/use-attachments.d.ts.map +1 -1
  114. package/dist/v2/hooks/use-capabilities.d.ts.map +1 -1
  115. package/dist/v2/hooks/use-component.d.ts +1 -0
  116. package/dist/v2/hooks/use-component.d.ts.map +1 -1
  117. package/dist/v2/hooks/use-configure-suggestions.d.ts +4 -9
  118. package/dist/v2/hooks/use-configure-suggestions.d.ts.map +1 -1
  119. package/dist/v2/hooks/use-default-render-tool.d.ts.map +1 -1
  120. package/dist/v2/hooks/use-frontend-tool.d.ts +5 -0
  121. package/dist/v2/hooks/use-frontend-tool.d.ts.map +1 -1
  122. package/dist/v2/hooks/use-human-in-the-loop.d.ts +2 -1
  123. package/dist/v2/hooks/use-human-in-the-loop.d.ts.map +1 -1
  124. package/dist/v2/hooks/use-interrupt.d.ts +0 -1
  125. package/dist/v2/hooks/use-interrupt.d.ts.map +1 -1
  126. package/dist/v2/hooks/use-keyboard-height.d.ts +1 -1
  127. package/dist/v2/hooks/use-keyboard-height.d.ts.map +1 -1
  128. package/dist/v2/hooks/use-pin-to-send.d.ts +4 -12
  129. package/dist/v2/hooks/use-pin-to-send.d.ts.map +1 -1
  130. package/dist/v2/hooks/use-render-activity-message.d.ts +13 -9
  131. package/dist/v2/hooks/use-render-activity-message.d.ts.map +1 -1
  132. package/dist/v2/hooks/use-render-custom-messages.d.ts +5 -7
  133. package/dist/v2/hooks/use-render-custom-messages.d.ts.map +1 -1
  134. package/dist/v2/hooks/use-suggestions.d.ts.map +1 -1
  135. package/dist/v2/hooks/use-threads.d.ts +0 -8
  136. package/dist/v2/hooks/use-threads.d.ts.map +1 -1
  137. package/dist/v2/index.cjs +1 -1
  138. package/dist/v2/index.mjs +197 -200
  139. package/dist/v2/index.mjs.map +1 -1
  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/shallow-stable.d.ts.map +1 -1
  143. package/dist/v2/lib/vue-core.d.ts +12 -12
  144. package/dist/v2/lib/vue-core.d.ts.map +1 -1
  145. package/dist/v2/providers/CopilotChatConfigurationProvider.vue.d.ts.map +1 -1
  146. package/dist/v2/providers/CopilotKitProvider.types.d.ts +9 -129
  147. package/dist/v2/providers/CopilotKitProvider.types.d.ts.map +1 -1
  148. package/dist/v2/providers/CopilotKitProvider.vue.d.ts +9 -10
  149. package/dist/v2/providers/CopilotKitProvider.vue.d.ts.map +1 -1
  150. package/dist/v2/providers/chat-configuration-store-key.d.ts +8 -0
  151. package/dist/v2/providers/chat-configuration-store-key.d.ts.map +1 -0
  152. package/dist/v2/providers/markdown-renderer.d.ts +4 -2
  153. package/dist/v2/providers/markdown-renderer.d.ts.map +1 -1
  154. package/dist/v2/providers/types.d.ts +3 -46
  155. package/dist/v2/providers/types.d.ts.map +1 -1
  156. package/dist/v2/providers/use-inspector-thread-override.d.ts +5 -0
  157. package/dist/v2/providers/use-inspector-thread-override.d.ts.map +1 -1
  158. package/dist/v2/types/human-in-the-loop.d.ts +8 -29
  159. package/dist/v2/types/human-in-the-loop.d.ts.map +1 -1
  160. package/dist/v2/types/interrupt.d.ts +1 -22
  161. package/dist/v2/types/interrupt.d.ts.map +1 -1
  162. package/dist/v2/types/vue-activity-message-renderer.d.ts +16 -15
  163. package/dist/v2/types/vue-activity-message-renderer.d.ts.map +1 -1
  164. package/dist/v2/types/vue-custom-message-renderer.d.ts +7 -16
  165. package/dist/v2/types/vue-custom-message-renderer.d.ts.map +1 -1
  166. package/dist/v2/types/vue-tool-call-renderer.d.ts +16 -35
  167. package/dist/v2/types/vue-tool-call-renderer.d.ts.map +1 -1
  168. package/package.json +10 -11
  169. package/src/__tests__/build-entries.test.ts +27 -0
  170. package/src/hooks/__tests__/zod-parameters.test.ts +520 -0
  171. package/src/hooks/use-copilot-action.ts +2 -1
  172. package/src/hooks/use-frontend-tool.ts +3 -6
  173. package/src/hooks/zod-parameters.ts +162 -0
  174. package/src/v2/__tests__/exports.test.ts +10 -0
  175. package/src/v2/__tests__/mocks/web-inspector.ts +6 -0
  176. package/src/v2/__tests__/utils/test-helpers.ts +34 -4
  177. package/src/v2/components/A2UIMessageRenderer.ts +98 -68
  178. package/src/v2/components/A2UISurfaceActivityRenderer.vue +68 -103
  179. package/src/v2/components/CopilotKitInspector.vue +104 -51
  180. package/src/v2/components/InlineFeatureWarning.vue +20 -21
  181. package/src/v2/components/LicenseWarningBanner.vue +27 -135
  182. package/src/v2/components/MCPAppsActivityRenderer.ts +75 -201
  183. package/src/v2/components/OpenGenerativeUIRenderer.ts +122 -446
  184. package/src/v2/components/__tests__/A2UIMessageRenderer.test.ts +171 -8
  185. package/src/v2/components/__tests__/CopilotKitInspector.test.ts +42 -0
  186. package/src/v2/components/__tests__/LicenseWarningBanner.test.ts +60 -0
  187. package/src/v2/components/__tests__/OpenGenerativeUIRenderer.test.ts +64 -8
  188. package/src/v2/components/__tests__/OpenGenerativeUIToolRenderer.test.ts +38 -0
  189. package/src/v2/components/a2ui/A2UIBuiltInToolCallRenderer.ts +2 -7
  190. package/src/v2/components/a2ui/A2UICatalogContext.ts +27 -185
  191. package/src/v2/components/a2ui/A2UIRecoveryStates.ts +127 -327
  192. package/src/v2/components/a2ui/catalog.ts +3 -3
  193. package/src/v2/components/a2ui/utils.ts +13 -65
  194. package/src/v2/components/a2ui.ts +15 -22
  195. package/src/v2/components/chat/CopilotChat.vue +147 -356
  196. package/src/v2/components/chat/CopilotChatAssistantMessage.vue +19 -43
  197. package/src/v2/components/chat/CopilotChatAttachmentQueue.vue +36 -55
  198. package/src/v2/components/chat/CopilotChatAttachmentRenderer.vue +14 -6
  199. package/src/v2/components/chat/CopilotChatAudioRecorder.vue +19 -246
  200. package/src/v2/components/chat/CopilotChatFeedbackCommentPopover.vue +2 -2
  201. package/src/v2/components/chat/CopilotChatInput.vue +108 -436
  202. package/src/v2/components/chat/CopilotChatInspectorButton.vue +45 -108
  203. package/src/v2/components/chat/CopilotChatLightbox.vue +10 -31
  204. package/src/v2/components/chat/CopilotChatMessageView.vue +82 -210
  205. package/src/v2/components/chat/CopilotChatReasoningMessage.vue +7 -15
  206. package/src/v2/components/chat/CopilotChatToolCallGroup.vue +63 -71
  207. package/src/v2/components/chat/CopilotChatToolCallItem.vue +8 -6
  208. package/src/v2/components/chat/CopilotChatToolCallsView.vue +31 -32
  209. package/src/v2/components/chat/CopilotChatUserMessage.vue +24 -112
  210. package/src/v2/components/chat/CopilotChatView.vue +33 -28
  211. package/src/v2/components/chat/CopilotChatWorkSummary.vue +26 -36
  212. package/src/v2/components/chat/CopilotModalHeader.vue +11 -23
  213. package/src/v2/components/chat/CopilotPopup.vue +23 -25
  214. package/src/v2/components/chat/CopilotPopupView.vue +10 -39
  215. package/src/v2/components/chat/CopilotPopupViewInternal.vue +35 -131
  216. package/src/v2/components/chat/CopilotSidebar.vue +23 -25
  217. package/src/v2/components/chat/CopilotSidebarView.vue +10 -39
  218. package/src/v2/components/chat/CopilotSidebarViewInternal.vue +38 -59
  219. package/src/v2/components/chat/CopilotThreadsDrawer.vue +37 -102
  220. package/src/v2/components/chat/StreamingMarkdownDefault.vue +15 -28
  221. package/src/v2/components/chat/__tests__/CopilotChat.labels.test.ts +19 -4
  222. package/src/v2/components/chat/__tests__/CopilotChat.test.ts +12 -10
  223. package/src/v2/components/chat/__tests__/CopilotChatActivityRendering.e2e.test.ts +26 -9
  224. package/src/v2/components/chat/__tests__/CopilotChatAssistantMessage.learningFeedback.test.ts +5 -5
  225. package/src/v2/components/chat/__tests__/CopilotChatAttachmentQueue.test.ts +28 -0
  226. package/src/v2/components/chat/__tests__/CopilotChatInput.test.ts +89 -1
  227. package/src/v2/components/chat/__tests__/CopilotChatMessageView.test.ts +247 -403
  228. package/src/v2/components/chat/__tests__/CopilotChatMessageView.toolCallDisplay.test.ts +1 -99
  229. package/src/v2/components/chat/__tests__/CopilotPopup.test.ts +90 -1
  230. package/src/v2/components/chat/__tests__/CopilotPopupView.test.ts +19 -0
  231. package/src/v2/components/chat/__tests__/CopilotSidebar.test.ts +90 -1
  232. package/src/v2/components/chat/__tests__/CopilotSidebarView.position.test.ts +32 -8
  233. package/src/v2/components/chat/__tests__/CopilotSidebarView.test.ts +2 -1
  234. package/src/v2/components/chat/__tests__/StreamingMarkdownDefault.test.ts +54 -0
  235. package/src/v2/components/chat/audioRecorder.ts +4 -7
  236. package/src/v2/components/chat/copilotChatToolCallItemRender.ts +24 -89
  237. package/src/v2/components/chat/forwarded-slots.ts +17 -0
  238. package/src/v2/components/chat/index.ts +0 -1
  239. package/src/v2/components/chat/inspector-shortcuts.ts +10 -16
  240. package/src/v2/components/chat/message-feedback.ts +62 -197
  241. package/src/v2/components/chat/tool-call-display-context.ts +6 -22
  242. package/src/v2/components/chat/tool-call-group-parts.ts +47 -108
  243. package/src/v2/components/chat/turn-work.ts +0 -9
  244. package/src/v2/components/chat/types.ts +12 -4
  245. package/src/v2/components/chat/use-chat-labels.ts +16 -0
  246. package/src/v2/components/chat/use-copy-feedback.ts +21 -0
  247. package/src/v2/components/chat/use-lightbox.ts +15 -33
  248. package/src/v2/components/icons/__tests__/icons.test.ts +72 -68
  249. package/src/v2/components/icons/index.ts +109 -27
  250. package/src/v2/hooks/__tests__/use-agent-error-state.test.ts +5 -3
  251. package/src/v2/hooks/__tests__/use-agent-stability.test.ts +25 -4
  252. package/src/v2/hooks/__tests__/use-agent-throttle.test.ts +5 -1
  253. package/src/v2/hooks/__tests__/use-agent.test.ts +6 -3
  254. package/src/v2/hooks/__tests__/use-component.test.ts +21 -0
  255. package/src/v2/hooks/__tests__/use-configure-suggestions.test.ts +30 -1
  256. package/src/v2/hooks/__tests__/use-default-render-tool.test.ts +10 -10
  257. package/src/v2/hooks/__tests__/use-frontend-tool.e2e.test.ts +66 -1
  258. package/src/v2/hooks/__tests__/use-human-in-the-loop.e2e.test.ts +6 -1
  259. package/src/v2/hooks/__tests__/use-human-in-the-loop.test.ts +187 -12
  260. package/src/v2/hooks/__tests__/use-interrupt.test.ts +97 -0
  261. package/src/v2/hooks/__tests__/use-render-activity-message.test.ts +106 -0
  262. package/src/v2/hooks/__tests__/use-render-tool.test.ts +3 -6
  263. package/src/v2/hooks/__tests__/use-threads.test.ts +48 -6
  264. package/src/v2/hooks/__tests__/zod-regression.test.ts +5 -4
  265. package/src/v2/hooks/use-agent-context.ts +4 -10
  266. package/src/v2/hooks/use-agent.ts +86 -290
  267. package/src/v2/hooks/use-attachments.ts +48 -168
  268. package/src/v2/hooks/use-capabilities.ts +2 -7
  269. package/src/v2/hooks/use-component.ts +7 -4
  270. package/src/v2/hooks/use-configure-suggestions.ts +28 -218
  271. package/src/v2/hooks/use-default-render-tool.ts +34 -94
  272. package/src/v2/hooks/use-frontend-tool.ts +10 -10
  273. package/src/v2/hooks/use-human-in-the-loop.ts +11 -80
  274. package/src/v2/hooks/use-interrupt.ts +29 -308
  275. package/src/v2/hooks/use-keyboard-height.ts +17 -40
  276. package/src/v2/hooks/use-pin-to-send.ts +15 -99
  277. package/src/v2/hooks/use-render-activity-message.ts +31 -55
  278. package/src/v2/hooks/use-render-custom-messages.ts +24 -88
  279. package/src/v2/hooks/use-suggestions.ts +9 -33
  280. package/src/v2/hooks/use-threads.ts +43 -273
  281. package/src/v2/lib/__tests__/shallow-stable.test.ts +54 -0
  282. package/src/v2/lib/__tests__/vue-core-renderers.test.ts +42 -0
  283. package/src/v2/lib/processPartialHtml.ts +6 -21
  284. package/src/v2/lib/shallow-stable.ts +2 -16
  285. package/src/v2/lib/vue-core.ts +69 -78
  286. package/src/v2/providers/CopilotChatConfigurationProvider.vue +48 -186
  287. package/src/v2/providers/CopilotKitProvider.types.ts +12 -132
  288. package/src/v2/providers/CopilotKitProvider.vue +237 -510
  289. package/src/v2/providers/__tests__/CopilotChatConfigurationProvider.test.ts +22 -2
  290. package/src/v2/providers/__tests__/CopilotKitProvider.a2ui.test.ts +20 -2
  291. package/src/v2/providers/__tests__/CopilotKitProvider.config.test.ts +124 -0
  292. package/src/v2/providers/__tests__/CopilotKitProvider.headersAtSendTime.test.ts +3 -3
  293. package/src/v2/providers/__tests__/CopilotKitProvider.learning.test.ts +3 -1
  294. package/src/v2/providers/__tests__/CopilotKitProvider.sandboxFunctions.test.ts +4 -1
  295. package/src/v2/providers/__tests__/CopilotKitProvider.test.ts +53 -26
  296. package/src/v2/providers/chat-configuration-store-key.ts +9 -0
  297. package/src/v2/providers/markdown-renderer.ts +8 -2
  298. package/src/v2/providers/types.ts +3 -49
  299. package/src/v2/providers/use-inspector-thread-override.ts +22 -80
  300. package/src/v2/types/__tests__/defineToolCallRenderer.test.ts +28 -33
  301. package/src/v2/types/defineToolCallRenderer.ts +5 -4
  302. package/src/v2/types/human-in-the-loop.ts +8 -32
  303. package/src/v2/types/interrupt.ts +7 -31
  304. package/src/v2/types/vue-activity-message-renderer.ts +24 -15
  305. package/src/v2/types/vue-custom-message-renderer.ts +12 -16
  306. package/src/v2/types/vue-tool-call-renderer.ts +23 -38
  307. package/tsconfig.json +0 -1
  308. package/vite.config.ts +8 -5
  309. package/vitest.config.ts +12 -7
  310. package/dist/v2/components/chat/BasicMarkdown.vue.d.ts +0 -9
  311. package/dist/v2/components/chat/BasicMarkdown.vue.d.ts.map +0 -1
  312. package/dist/v2/components/chat/normalize-auto-scroll.d.ts +0 -3
  313. package/dist/v2/components/chat/normalize-auto-scroll.d.ts.map +0 -1
  314. package/dist/v2/components/chat/tool-call-layout.d.ts +0 -115
  315. package/dist/v2/components/chat/tool-call-layout.d.ts.map +0 -1
  316. package/dist/v2/lib/is-mobile-viewport.d.ts +0 -15
  317. package/dist/v2/lib/is-mobile-viewport.d.ts.map +0 -1
  318. package/dist/v2/lib/message-feedback.d.ts +0 -33
  319. package/dist/v2/lib/message-feedback.d.ts.map +0 -1
  320. package/dist/v2/lib/transcription-client.d.ts +0 -19
  321. package/dist/v2/lib/transcription-client.d.ts.map +0 -1
  322. package/src/v2/components/__tests__/A2UICatalogContext.test.ts +0 -63
  323. package/src/v2/components/a2ui/__tests__/A2UIRecoveryStates.test.ts +0 -175
  324. package/src/v2/components/chat/BasicMarkdown.vue +0 -160
  325. package/src/v2/components/chat/__tests__/BasicMarkdown.test.ts +0 -69
  326. package/src/v2/components/chat/__tests__/normalize-auto-scroll.test.ts +0 -39
  327. package/src/v2/components/chat/normalize-auto-scroll.ts +0 -17
  328. package/src/v2/components/chat/tool-call-layout.ts +0 -304
  329. package/src/v2/lib/__tests__/is-mobile-viewport.test.ts +0 -48
  330. package/src/v2/lib/__tests__/message-feedback.test.ts +0 -152
  331. package/src/v2/lib/__tests__/processPartialHtml.test.ts +0 -84
  332. package/src/v2/lib/__tests__/transcription-client.test.ts +0 -67
  333. package/src/v2/lib/is-mobile-viewport.ts +0 -23
  334. package/src/v2/lib/message-feedback.ts +0 -120
  335. package/src/v2/lib/transcription-client.ts +0 -151
@@ -1,19 +1,9 @@
1
1
  import type { A2UIRecoveryRendererOptions } from "../components/a2ui/A2UIRecoveryStates";
2
- import type { AbstractAgent } from "@ag-ui/client";
3
- import type { CopilotKitCoreErrorCode, CopilotKitHeadersSource, CopilotKitMessageFilter, LearningConfig } from "@copilotkit/core";
4
- import type { DebugConfig } from "@copilotkit/shared";
2
+ import type { ɵA2UIActionInterceptor, ɵA2UIBaseOptions, ɵCopilotKitLearningOptions, ɵCopilotKitProviderBaseOptions } from "@copilotkit/core";
5
3
  import type { A2UITheme, SandboxFunction, VueActivityMessageRenderer, VueCustomMessageRenderer, VueFrontendTool, VueHumanInTheLoop, VueToolCallRenderer } from "../types";
6
4
  import type { Component } from "vue";
7
5
  import type { MarkdownRendererValue } from "./markdown-renderer";
8
- export interface CopilotKitProviderProps {
9
- runtimeUrl?: string;
10
- /**
11
- * Headers sent with every request. A record, or a sync or async builder
12
- * that runs when each request is sent. An inline arrow is fine. The builder
13
- * should be cheap; cache tokens in it.
14
- */
15
- headers?: CopilotKitHeadersSource;
16
- credentials?: RequestCredentials;
6
+ export interface CopilotKitProviderProps extends ɵCopilotKitProviderBaseOptions {
17
7
  /**
18
8
  * CSP nonce for the `<style>` tag CopilotKit adds. Set it when your
19
9
  * Content-Security-Policy limits `style-src` to a nonce.
@@ -25,42 +15,6 @@ export interface CopilotKitProviderProps {
25
15
  * @default true
26
16
  */
27
17
  injectStyles?: boolean;
28
- /**
29
- * Rewrites the message list sent to runtime agents on every run.
30
- *
31
- * CopilotKit sends the whole thread each time. When your agent already
32
- * stores the conversation, most of that payload is waste, and an agent that
33
- * merges the inbound list with its own store can show the model every turn
34
- * twice. Return the messages to send:
35
- *
36
- * ```vue
37
- * <CopilotKitProvider
38
- * runtime-url="/api/copilotkit"
39
- * :message-filter="(messages) => messages.slice(-1)"
40
- * />
41
- * ```
42
- *
43
- * The filter changes the request body only. The transcript the UI renders is
44
- * untouched. Broken tool-call pairs are repaired before the request is sent,
45
- * so a filter this blunt cannot strand a tool result mid-HITL.
46
- *
47
- * Agents reached through your CopilotRuntime honor this. An agent your app
48
- * passes in directly does not, and neither Intelligence runs nor suggestion
49
- * runs are ever filtered.
50
- */
51
- messageFilter?: CopilotKitMessageFilter;
52
- defaultThrottleMs?: number;
53
- publicApiKey?: string;
54
- publicLicenseKey?: string;
55
- /**
56
- * Signed license token for offline verification of CopilotKit Intelligence features.
57
- * Obtain from https://dashboard.operations.copilotkit.ai.
58
- */
59
- licenseToken?: string;
60
- properties?: Record<string, unknown>;
61
- useSingleEndpoint?: boolean;
62
- agents__unsafe_dev_only?: Record<string, AbstractAgent>;
63
- selfManagedAgents?: Record<string, AbstractAgent>;
64
18
  renderToolCalls?: VueToolCallRenderer<any>[];
65
19
  renderActivityMessages?: VueActivityMessageRenderer<unknown>[];
66
20
  renderCustomMessages?: VueCustomMessageRenderer[];
@@ -70,60 +24,29 @@ export interface CopilotKitProviderProps {
70
24
  sandboxFunctions?: SandboxFunction[];
71
25
  designSkill?: string;
72
26
  };
73
- /**
74
- * @deprecated This prop no longer controls the Inspector. Use
75
- * `enableInspector` instead.
76
- */
77
- showDevConsole?: boolean | "auto";
78
27
  /**
79
28
  * Disable the CopilotKit Inspector in development.
80
29
  * The Inspector is enabled by default in development browser builds and is
81
30
  * always disabled in production and during server rendering.
82
31
  */
83
32
  enableInspector?: boolean;
84
- onError?: (event: {
85
- error: Error;
86
- code: CopilotKitCoreErrorCode;
87
- context: Record<string, any>;
88
- }) => void | Promise<void>;
89
- a2ui?: {
33
+ a2ui?: ɵA2UIBaseOptions & {
90
34
  theme?: A2UITheme;
91
35
  catalog?: any;
92
36
  loadingComponent?: Component;
93
- /**
94
- * When true (the default), the full component schemas from the catalog are
95
- * sent as agent context so the agent knows what components and props are
96
- * available. The A2UI middleware can overwrite this with a server-side
97
- * schema if configured.
98
- *
99
- * When false, the agent context still describes the catalog, but only by its
100
- * catalog ID and the names of its custom components, without their JSON
101
- * schemas. The component schema entry and the A2UI generation and design
102
- * guidelines are not sent. With the CopilotKit LangGraph middleware's
103
- * injected A2UI tool, the A2UI subagent then gets the component names only;
104
- * a host can still give it a composition guide through the middleware's
105
- * guidelines (`a2uiParams.guidelines.compositionGuide` in TypeScript,
106
- * `a2ui_params["guidelines"]["composition_guide"]` in Python).
107
- */
108
- includeSchema?: boolean;
109
37
  /**
110
38
  * Options for the A2UI error-recovery status UI: how long before the
111
39
  * transient "Retrying…" hint appears, after how many attempts, and how
112
40
  * much retry/debug detail to surface. When omitted, defaults apply.
113
41
  */
114
42
  recovery?: A2UIRecoveryRendererOptions;
115
- };
116
- /** Configuration for the built-in MCP Apps renderer. */
117
- mcpApps?: {
118
43
  /**
119
- * Restore `allow-same-origin` on the MCP App sandbox. Default `false`.
120
- *
121
- * **Unsafe.** The widget then runs with your page's origin: it can read
122
- * your cookies, storage and DOM, and call your APIs as the signed-in user.
123
- * Only set it for widgets you wrote and trust that need `localStorage`,
124
- * `IndexedDB` or cookies. By default widgets get an opaque origin.
44
+ * Intercept A2UI user actions before they reach the agent: return `null`
45
+ * to handle an action client-side (e.g. a `navigate` event), return an
46
+ * action to forward that one instead, or return nothing to forward it
47
+ * unchanged.
125
48
  */
126
- allowSameOriginFallback?: boolean;
49
+ onAction?: ɵA2UIActionInterceptor;
127
50
  };
128
51
  /**
129
52
  * Global markdown renderer for assistant/reasoning messages. Either a Vue
@@ -134,50 +57,7 @@ export interface CopilotKitProviderProps {
134
57
  * a per-message slot still wins.
135
58
  */
136
59
  markdownRenderer?: MarkdownRendererValue;
137
- /**
138
- * Enable debug logging for the client-side event pipeline.
139
- *
140
- * Accepts:
141
- * - `true` / `false` to toggle events + lifecycle logging (verbose off).
142
- * - `{ events?: boolean; lifecycle?: boolean; verbose?: boolean }` for granular control.
143
- */
144
- debug?: DebugConfig;
145
- /**
146
- * Turns on interaction capture (`@copilotkit/learning`). `learning` (short
147
- * for `:learning="true"`) records with the default options; pass an object
148
- * for options. `false` or omitting the prop turns capture off and cancels
149
- * startup. Without a sink, Core authenticates with the runtime and sends
150
- * browser events to Intelligence; a custom sink keeps the standalone
151
- * collector behavior. Updated settings apply to the next Trajectory.
152
- *
153
- * Capture starts after mount. Set `trajectoryId` to use your own ID;
154
- * otherwise the provider generates one. The generated ID stays the same
155
- * across rerenders, reconnects and option changes; turning capture off,
156
- * setting `autoStart: false` or supplying a `trajectoryId` ends it, and the
157
- * next generated Trajectory gets a new ID. Read the active ID from
158
- * `copilotkit.trajectoryId`.
159
- *
160
- * Set `autoStart: false` to start capture yourself with `startTrajectory()`.
161
- * Capture stops on unmount, including manually started Trajectories.
162
- *
163
- * @example
164
- * <CopilotKitProvider runtime-url="/api/copilotkit" learning>
165
- */
166
- learning?: boolean | CopilotKitLearningOptions;
167
60
  }
168
61
  /** The object form of the `learning` prop. */
169
- export type CopilotKitLearningOptions = LearningConfig & {
170
- /**
171
- * Starts a Trajectory after mount. Defaults to `true`; set `false` to call
172
- * `startTrajectory()` yourself.
173
- */
174
- autoStart?: boolean;
175
- trajectoryId?: string;
176
- /**
177
- * Used only by explicit custom sinks. Authenticated capture warns and ignores
178
- * this option; assign Learning Spaces on the server with
179
- * `getTrajectoryLearningContainerIds` on `CopilotKitIntelligence`.
180
- */
181
- learningContainerIds?: string[];
182
- };
62
+ export type CopilotKitLearningOptions = ɵCopilotKitLearningOptions;
183
63
  //# sourceMappingURL=CopilotKitProvider.types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"CopilotKitProvider.types.d.ts","sourceRoot":"","sources":["../../../src/v2/providers/CopilotKitProvider.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,uCAAuC,CAAC;AACzF,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AACnD,OAAO,KAAK,EACV,uBAAuB,EACvB,uBAAuB,EACvB,uBAAuB,EACvB,cAAc,EACf,MAAM,kBAAkB,CAAC;AAC1B,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,KAAK,EACV,SAAS,EACT,eAAe,EACf,0BAA0B,EAC1B,wBAAwB,EACxB,eAAe,EACf,iBAAiB,EACjB,mBAAmB,EACpB,MAAM,UAAU,CAAC;AAClB,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,KAAK,CAAC;AACrC,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAC;AAEjE,MAAM,WAAW,uBAAuB;IACtC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;;;OAIG;IACH,OAAO,CAAC,EAAE,uBAAuB,CAAC;IAClC,WAAW,CAAC,EAAE,kBAAkB,CAAC;IACjC;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;;OAIG;IACH,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB;;;;;;;;;;;;;;;;;;;;;;OAsBG;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CAAC,EAAE,GAAG,CAAC;QACd,gBAAgB,CAAC,EAAE,SAAS,CAAC;QAC7B;;;;;;;;;;;;;;WAcG;QACH,aAAa,CAAC,EAAE,OAAO,CAAC;QACxB;;;;WAIG;QACH,QAAQ,CAAC,EAAE,2BAA2B,CAAC;KACxC,CAAC;IACF,wDAAwD;IACxD,OAAO,CAAC,EAAE;QACR;;;;;;;WAOG;QACH,uBAAuB,CAAC,EAAE,OAAO,CAAC;KACnC,CAAC;IACF;;;;;;;OAOG;IACH,gBAAgB,CAAC,EAAE,qBAAqB,CAAC;IACzC;;;;;;OAMG;IACH,KAAK,CAAC,EAAE,WAAW,CAAC;IACpB;;;;;;;;;;;;;;;;;;;;OAoBG;IACH,QAAQ,CAAC,EAAE,OAAO,GAAG,yBAAyB,CAAC;CAChD;AAED,8CAA8C;AAC9C,MAAM,MAAM,yBAAyB,GAAG,cAAc,GAAG;IACvD;;;OAGG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB;;;;OAIG;IACH,oBAAoB,CAAC,EAAE,MAAM,EAAE,CAAC;CACjC,CAAC"}
1
+ {"version":3,"file":"CopilotKitProvider.types.d.ts","sourceRoot":"","sources":["../../../src/v2/providers/CopilotKitProvider.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,uCAAuC,CAAC;AACzF,OAAO,KAAK,EACV,sBAAsB,EACtB,gBAAgB,EAChB,0BAA0B,EAC1B,8BAA8B,EAC/B,MAAM,kBAAkB,CAAC;AAC1B,OAAO,KAAK,EACV,SAAS,EACT,eAAe,EACf,0BAA0B,EAC1B,wBAAwB,EACxB,eAAe,EACf,iBAAiB,EACjB,mBAAmB,EACpB,MAAM,UAAU,CAAC;AAClB,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,KAAK,CAAC;AACrC,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAC;AAEjE,MAAM,WAAW,uBAAwB,SAAQ,8BAA8B;IAC7E;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;;OAIG;IACH,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,eAAe,CAAC,EAAE,mBAAmB,CAAC,GAAG,CAAC,EAAE,CAAC;IAC7C,sBAAsB,CAAC,EAAE,0BAA0B,CAAC,OAAO,CAAC,EAAE,CAAC;IAC/D,oBAAoB,CAAC,EAAE,wBAAwB,EAAE,CAAC;IAClD,aAAa,CAAC,EAAE,eAAe,EAAE,CAAC;IAClC,cAAc,CAAC,EAAE,iBAAiB,EAAE,CAAC;IACrC,gBAAgB,CAAC,EAAE;QACjB,gBAAgB,CAAC,EAAE,eAAe,EAAE,CAAC;QACrC,WAAW,CAAC,EAAE,MAAM,CAAC;KACtB,CAAC;IACF;;;;OAIG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,IAAI,CAAC,EAAE,gBAAgB,GAAG;QACxB,KAAK,CAAC,EAAE,SAAS,CAAC;QAClB,OAAO,CAAC,EAAE,GAAG,CAAC;QACd,gBAAgB,CAAC,EAAE,SAAS,CAAC;QAC7B;;;;WAIG;QACH,QAAQ,CAAC,EAAE,2BAA2B,CAAC;QACvC;;;;;WAKG;QACH,QAAQ,CAAC,EAAE,sBAAsB,CAAC;KACnC,CAAC;IACF;;;;;;;OAOG;IACH,gBAAgB,CAAC,EAAE,qBAAqB,CAAC;CAC1C;AAED,8CAA8C;AAC9C,MAAM,MAAM,yBAAyB,GAAG,0BAA0B,CAAC"}
@@ -1,7 +1,6 @@
1
1
  import type { Component } from "vue";
2
- import type { AbstractAgent } from "@ag-ui/client";
3
2
  import type { CopilotKitHeadersSource } from "@copilotkit/core";
4
- import type { CopilotKitLearningOptions, CopilotKitProviderProps } from "./CopilotKitProvider.types";
3
+ import type { CopilotKitProviderProps } from "./CopilotKitProvider.types";
5
4
  import type { SandboxFunction, VueActivityMessageRenderer, VueFrontendTool } from "../types";
6
5
  declare var __VLS_1: {};
7
6
  type __VLS_Slots = {} & {
@@ -10,13 +9,8 @@ type __VLS_Slots = {} & {
10
9
  declare const __VLS_component: import("vue").DefineComponent<CopilotKitProviderProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<CopilotKitProviderProps> & Readonly<{}>, {
11
10
  renderActivityMessages: VueActivityMessageRenderer<unknown>[];
12
11
  renderCustomMessages: import("..").VueCustomMessageRenderer[];
13
- properties: Record<string, unknown>;
14
- headers: CopilotKitHeadersSource;
15
12
  nonce: string;
16
13
  injectStyles: boolean;
17
- useSingleEndpoint: boolean;
18
- agents__unsafe_dev_only: Record<string, AbstractAgent>;
19
- selfManagedAgents: Record<string, AbstractAgent>;
20
14
  frontendTools: VueFrontendTool[];
21
15
  humanInTheLoop: import("..").VueHumanInTheLoop[];
22
16
  openGenerativeUI: {
@@ -24,17 +18,22 @@ declare const __VLS_component: import("vue").DefineComponent<CopilotKitProviderP
24
18
  designSkill?: string;
25
19
  };
26
20
  enableInspector: boolean;
27
- a2ui: {
21
+ a2ui: import("@copilotkit/core").ɵA2UIBaseOptions & {
28
22
  theme?: import("..").A2UITheme;
29
23
  catalog?: any;
30
24
  loadingComponent?: Component;
31
- includeSchema?: boolean;
32
25
  recovery?: import("..").A2UIRecoveryRendererOptions;
26
+ onAction?: import("@copilotkit/core").ɵA2UIActionInterceptor;
33
27
  };
28
+ headers: CopilotKitHeadersSource;
29
+ properties: Record<string, unknown>;
30
+ useSingleEndpoint: boolean;
31
+ agents__unsafe_dev_only: Record<string, import("@ag-ui/client").AbstractAgent>;
32
+ selfManagedAgents: Record<string, import("@ag-ui/client").AbstractAgent>;
34
33
  mcpApps: {
35
34
  allowSameOriginFallback?: boolean;
36
35
  };
37
- learning: boolean | CopilotKitLearningOptions;
36
+ learning: boolean | import("@copilotkit/core").ɵCopilotKitLearningOptions;
38
37
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
39
38
  declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
40
39
  export default _default;
@@ -1 +1 @@
1
- {"version":3,"file":"CopilotKitProvider.vue.d.ts","sourceRoot":"","sources":["../../../src/v2/providers/CopilotKitProvider.vue"],"names":[],"mappings":"AAk+BA,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;AAuC1B,OAAO,KAAK,EACV,yBAAyB,EACzB,uBAAuB,EACxB,MAAM,4BAA4B,CAAC;AACpC,OAAO,KAAK,EACV,eAAe,EACf,0BAA0B,EAC1B,eAAe,EAGhB,MAAM,UAAU,CAAC;AA88BlB,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;;;;;;;;;;;;;wBApjCrB,CA93BwC;mBA83BxC,CA73B2B;;;;aA63B3B,CAn3B4B;eAm3B5B,CAn3BqD;wBAm3BrD,CAn3BiF;qBAm3BjF,CA12BS;gBA02BT,CAn2Bc;;;+BAm2Bd,CAl1BI;;;6EA64DF,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":"AAgtBA,OAAO,KAAK,EAAE,SAAS,EAAuB,MAAM,KAAK,CAAC;AAQ1D,OAAO,KAAK,EACV,uBAAuB,EAGxB,MAAM,kBAAkB,CAAC;AAwC1B,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,4BAA4B,CAAC;AAC1E,OAAO,KAAK,EACV,eAAe,EACf,0BAA0B,EAC1B,eAAe,EAGhB,MAAM,UAAU,CAAC;AA4qBlB,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;AA0B/C,QAAA,MAAM,eAAe;;;;;;;;wBAhxBrB,CAtpBe;mBAspBf,CArpBgB;;;;aAqpBhB,CA3oBc;eA2oBd,CA1oBsB;wBA0oBtB,CAxoBQ;gBAwoBR,CAnoB8D;gBAmoB9D,CA1nBO;;;;;;;;+BAs6C22+D,CAAC;;;6EArBj3+D,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"}
@@ -0,0 +1,8 @@
1
+ import type { InjectionKey } from "vue";
2
+ import type { ɵChatConfigurationStore } from "@copilotkit/core";
3
+ /**
4
+ * The nearest `CopilotChatConfigurationProvider`'s core store, so a nested
5
+ * provider can link its own store to it.
6
+ */
7
+ export declare const ChatConfigurationStoreKey: InjectionKey<ɵChatConfigurationStore>;
8
+ //# sourceMappingURL=chat-configuration-store-key.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"chat-configuration-store-key.d.ts","sourceRoot":"","sources":["../../../src/v2/providers/chat-configuration-store-key.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,KAAK,CAAC;AACxC,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,kBAAkB,CAAC;AAEhE;;;GAGG;AACH,eAAO,MAAM,yBAAyB,EAAE,YAAY,CAAC,uBAAuB,CACnC,CAAC"}
@@ -1,12 +1,14 @@
1
1
  import type { Component, InjectionKey } from "vue";
2
- import type { VueStreamingMarkdownNodeRenderers } from "@copilotkit/markdown-renderer/vue";
3
- import type { StreamingMarkdownParserOptions } from "@copilotkit/markdown-renderer";
2
+ import type { VueStreamingMarkdownCitationClickHandler, VueStreamingMarkdownLinkClickHandler, VueStreamingMarkdownNodeRenderers } from "@copilotkit/markdown/vue";
3
+ import type { StreamingMarkdownParserOptions } from "@copilotkit/markdown";
4
4
  /** Config for the built-in Vue default renderer (pass instead of a component). */
5
5
  export interface DefaultMarkdownRendererProps {
6
6
  nodeRenderers?: VueStreamingMarkdownNodeRenderers;
7
7
  caret?: boolean;
8
8
  options?: Partial<StreamingMarkdownParserOptions>;
9
9
  class?: string;
10
+ onLinkClick?: VueStreamingMarkdownLinkClickHandler;
11
+ onCitationClick?: VueStreamingMarkdownCitationClickHandler;
10
12
  }
11
13
  export type MarkdownRendererValue = Component | DefaultMarkdownRendererProps;
12
14
  /** Injection key for a global markdown renderer component (or `undefined`). */
@@ -1 +1 @@
1
- {"version":3,"file":"markdown-renderer.d.ts","sourceRoot":"","sources":["../../../src/v2/providers/markdown-renderer.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,KAAK,CAAC;AACnD,OAAO,KAAK,EAAE,iCAAiC,EAAE,MAAM,mCAAmC,CAAC;AAC3F,OAAO,KAAK,EAAE,8BAA8B,EAAE,MAAM,+BAA+B,CAAC;AAEpF,kFAAkF;AAClF,MAAM,WAAW,4BAA4B;IAC3C,aAAa,CAAC,EAAE,iCAAiC,CAAC;IAClD,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,OAAO,CAAC,EAAE,OAAO,CAAC,8BAA8B,CAAC,CAAC;IAClD,KAAK,CAAC,EAAE,MAAM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S,CAOzE"}
@@ -1,49 +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 assistantMessageToolbarInspectorLabel: "View in Inspector";
14
- readonly assistantMessageToolbarInspectorDescription: "Open this message in the Inspector";
15
- readonly assistantMessageToolbarInspectorLocalOnlyLabel: "Local only";
16
- readonly assistantMessageToolbarInspectorLocalOnlyDescription: "Only visible on localhost or loopback hosts in development. Never shown in production.";
17
- readonly assistantMessageToolbarInspectorTitle: "CopilotKit Inspector";
18
- readonly assistantMessageToolbarInspectorHideLabel: "Hide this icon";
19
- readonly assistantMessageToolbarInspectorHideDescription: "Until you reload this page";
20
- readonly assistantMessageToolbarThumbsUpLabel: "Good response";
21
- readonly assistantMessageToolbarThumbsDownLabel: "Bad response";
22
- readonly assistantMessageFeedbackCommentPlaceholder: "Add a comment (optional)";
23
- readonly assistantMessageFeedbackCommentSubmitLabel: "Send comment";
24
- readonly assistantMessageToolbarReadAloudLabel: "Read aloud";
25
- readonly assistantMessageToolbarRegenerateLabel: "Regenerate";
26
- readonly userMessageToolbarCopyMessageLabel: "Copy";
27
- readonly userMessageToolbarEditMessageLabel: "Edit";
28
- readonly userMessageToolbarPreviousBranchLabel: "Previous branch";
29
- readonly userMessageToolbarNextBranchLabel: "Next branch";
30
- readonly chatDisclaimerText: "AI can make mistakes. Please verify important information.";
31
- readonly chatToggleOpenLabel: "Open chat";
32
- readonly chatToggleCloseLabel: "Close chat";
33
- readonly chatScrollToBottomLabel: "Scroll to bottom";
34
- readonly modalHeaderTitle: "CopilotKit Chat";
35
- readonly welcomeMessageText: "How can I help you today?";
36
- readonly reasoningMessageThinkingLabel: "Thinking…";
37
- readonly chatInputSlashMenuLabel: "Slash commands";
38
- readonly chatInputSlashMenuEmptyText: "No commands found";
39
- readonly attachmentRemoveButtonLabel: "Remove attachment";
40
- readonly attachmentPlayVideoButtonLabel: "Play video";
41
- readonly attachmentPreviewCloseButtonLabel: "Close preview";
42
- readonly modalHeaderCloseButtonLabel: "Close";
43
- readonly modalHeaderThreadsButtonLabel: "Open threads";
44
- readonly sidebarLabel: "Copilot chat sidebar";
45
- };
46
- 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";
47
4
  export interface CopilotChatConfigurationValue {
48
5
  labels: CopilotChatLabels;
49
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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+C3B,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;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,IAAI,CAAC;IACvC,gFAAgF;IAChF,gBAAgB,EAAE,OAAO,CAAC;IAC1B,yEAAyE;IACzE,cAAc,EAAE,MAAM,MAAM,IAAI,CAAC;CAClC"}
@@ -1,4 +1,9 @@
1
1
  import type { Ref } from "vue";
2
+ /**
3
+ * Apply the Inspector's "view this thread" requests to a chat. Core's
4
+ * `ɵInspectorThreadOverride` owns the state machine; this composable binds it
5
+ * to the component's lifetime and Vue reactivity.
6
+ */
2
7
  export declare function useInspectorThreadOverride(args: {
3
8
  agentId: Ref<string>;
4
9
  baseThreadId: Ref<string>;
@@ -1 +1 @@
1
- {"version":3,"file":"use-inspector-thread-override.d.ts","sourceRoot":"","sources":["../../../src/v2/providers/use-inspector-thread-override.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAgB/B,wBAAgB,0BAA0B,CAAC,IAAI,EAAE;IAC/C,OAAO,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;IACrB,YAAY,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;CAC3B,GAAG;IACF,iBAAiB,EAAE,GAAG,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC;IACtC,kBAAkB,EAAE,GAAG,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC;IACvC,qBAAqB,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,IAAI,CAAC;CACpD,CA0EA"}
1
+ {"version":3,"file":"use-inspector-thread-override.d.ts","sourceRoot":"","sources":["../../../src/v2/providers/use-inspector-thread-override.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAG/B;;;;GAIG;AACH,wBAAgB,0BAA0B,CAAC,IAAI,EAAE;IAC/C,OAAO,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;IACrB,YAAY,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;CAC3B,GAAG;IACF,iBAAiB,EAAE,GAAG,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC;IACtC,kBAAkB,EAAE,GAAG,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC;IACvC,qBAAqB,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,IAAI,CAAC;CACpD,CAwBA"}
@@ -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,M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,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
+ {"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,44 +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
- /**
36
- * Whether calls this renderer draws join the chat's tool-call groups (see
37
- * `toolCallDisplay` on `CopilotChatMessageView`). CopilotKit's built-in card
38
- * sets it; a renderer that leaves it unset always shows its calls on their
39
- * own, since the chat can't tell what it draws (it may even draw nothing).
40
- */
41
- group?: boolean;
42
- render: VueToolCallRendererRenderFn<T>;
43
- }
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 {};
44
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,MAA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