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

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-2np7y4Qt.cjs +92 -0
  15. package/dist/use-render-activity-message-2np7y4Qt.cjs.map +1 -0
  16. package/dist/use-render-activity-message-D59E9t0x.js +18097 -0
  17. package/dist/use-render-activity-message-D59E9t0x.js.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
@@ -6,24 +6,73 @@ import type {
6
6
  ToolMessage,
7
7
  UserMessage,
8
8
  } from "@ag-ui/core";
9
+ import type { VNode } from "vue";
9
10
  import type { CopilotKitCoreErrorCode, ToolCallStatus } from "@copilotkit/core";
10
11
  import type { Suggestion } from "@copilotkit/core";
11
12
  import type {
12
13
  Attachment,
13
14
  AttachmentsConfig,
14
15
  AttachmentModality,
16
+ InputContentSource,
15
17
  } from "@copilotkit/shared";
16
- import type { CopilotChatLabels } from "../../providers/types";
18
+ import type {
19
+ CopilotChatLabels,
20
+ CopilotChatToolCallDisplay,
21
+ ToolCallEntry,
22
+ } from "@copilotkit/core";
17
23
  import type { InterruptEvent } from "../../types";
18
24
  import type { AutoScrollMode } from "./normalize-auto-scroll";
19
25
 
20
26
  export type CopilotChatInputMode = "input" | "transcribe" | "processing";
21
27
  export type { Attachment, AttachmentsConfig, AttachmentModality };
22
28
  export type { AutoScrollMode };
29
+ export type { CopilotChatToolCallDisplay, ToolCallEntry };
30
+
31
+ /** How a `CopilotChatToolCallGroup` draws its calls. */
32
+ export type CopilotChatToolCallGroupAppearance = "card" | "line" | "stack";
33
+
34
+ /** Props of the `#tool-calls-group` slot, which replaces a group of calls. */
35
+ export interface CopilotChatToolCallsGroupSlotProps {
36
+ /** The calls in the group, in order. */
37
+ calls: ToolCallEntry[];
38
+ /** The appearance the view's `toolCallDisplay` asks for. */
39
+ appearance: CopilotChatToolCallGroupAppearance;
40
+ /** The agent is running and nothing follows the group, so more calls may join it. */
41
+ isActive: boolean;
42
+ /**
43
+ * Draws one call through the registered renderers and tool-call slots.
44
+ * Render the VNode with `<component :is="renderCall(call)" />`.
45
+ */
46
+ renderCall: (call: ToolCallEntry) => VNode;
47
+ }
48
+
49
+ /**
50
+ * Props of `CopilotChatWorkSummary` and of the `#work-summary` slot, which
51
+ * replaces the "Working… / Worked for 9s" line of the `"turn"` display.
52
+ */
53
+ export interface CopilotChatWorkSummarySlotProps {
54
+ /** The agent is still working on this reply. */
55
+ isWorking: boolean;
56
+ /** Whether the work (narration and tool calls) is showing. */
57
+ isOpen: boolean;
58
+ /** The tool calls the reply made. */
59
+ calls: ToolCallEntry[];
60
+ /**
61
+ * How long the agent has worked on the reply, in ms, summed over its runs
62
+ * so time spent waiting between them doesn't count. Only known for replies
63
+ * this client watched start; without it the summary shows the tool count.
64
+ */
65
+ elapsedMs?: number;
66
+ /** When the current run started (epoch ms), while the agent is working. */
67
+ workingSince?: number;
68
+ /** Opens or closes the reply's work. */
69
+ onClick: () => void;
70
+ }
23
71
 
24
72
  export interface CopilotChatAttachmentRendererProps {
25
73
  type: AttachmentModality;
26
- source: Attachment["source"];
74
+ /** Any AG-UI content source, as in React; a `file` handle shows no preview. */
75
+ source: InputContentSource;
27
76
  filename?: string;
28
77
  className?: string;
29
78
  }
@@ -94,6 +143,20 @@ export interface CopilotChatViewProps {
94
143
  onDragLeave?: (event: DragEvent) => void;
95
144
  onDrop?: (event: DragEvent) => void;
96
145
  onFinishTranscribeWithAudio?: (audioBlob: Blob) => void | Promise<void>;
146
+ /**
147
+ * How tool calls show. Defaults to `"grouped"`: calls made in a row share
148
+ * one card that opens to a row per call. `"line"` and `"stacked"` group
149
+ * them too; `"separate"` gives every call its own card. Calls drawn by a
150
+ * renderer that does not set `group: true`, or by a tool-call slot, always
151
+ * show on their own.
152
+ */
153
+ toolCallDisplay?: CopilotChatToolCallDisplay;
154
+ /**
155
+ * Whether reply thumbs record ratings for Automatic Learning once a
156
+ * Trajectory has started. Defaults to `true`; set `false` to keep the
157
+ * thumbs to your own `thumbs-up` / `thumbs-down` handlers and slots.
158
+ */
159
+ messageFeedback?: boolean;
97
160
  }
98
161
 
99
162
  export interface CopilotChatProps extends Omit<
@@ -319,13 +382,56 @@ export interface CopilotChatAssistantMessageCopyButtonSlotProps {
319
382
  label: string;
320
383
  }
321
384
 
385
+ /**
386
+ * Attributes and listeners that let a thumb record a Learning rating and open
387
+ * its comment popover. Bind them on the thumb's `<button>` with `v-bind`;
388
+ * they are empty while the chat records no ratings.
389
+ */
390
+ export type CopilotChatAssistantMessageThumbProps = Record<string, unknown>;
391
+
322
392
  export interface CopilotChatAssistantMessageThumbsUpButtonSlotProps {
323
- onThumbsUp: () => void;
393
+ /**
394
+ * Rates the reply. Pass the click event, so the comment points at the
395
+ * clicked thumb and a keyboard click moves focus into it.
396
+ */
397
+ onThumbsUp: (event?: MouseEvent) => void;
324
398
  label: string;
399
+ /** This rating is the chosen one (Learning only). */
400
+ pressed: boolean;
401
+ thumbProps: CopilotChatAssistantMessageThumbProps;
325
402
  }
326
403
 
327
404
  export interface CopilotChatAssistantMessageThumbsDownButtonSlotProps {
328
- onThumbsDown: () => void;
405
+ /** See {@link CopilotChatAssistantMessageThumbsUpButtonSlotProps.onThumbsUp}. */
406
+ onThumbsDown: (event?: MouseEvent) => void;
407
+ label: string;
408
+ /** This rating is the chosen one (Learning only). */
409
+ pressed: boolean;
410
+ thumbProps: CopilotChatAssistantMessageThumbProps;
411
+ }
412
+
413
+ /** Props of the `feedback-comment` slot: the comment field of a rating. */
414
+ export interface CopilotChatAssistantMessageFeedbackCommentSlotProps {
415
+ value: string;
416
+ /** The comment already saved. */
417
+ savedComment: string;
418
+ /** Bind as `:ref` on the text field, so a keyboard rating can focus it. */
419
+ inputRef: (element: unknown) => void;
420
+ onChange: (value: string) => void;
421
+ /** Saves the comment, closes the popover and returns focus to the thumb. */
422
+ onSubmit: () => void;
423
+ onEditingChange: (editing: boolean) => void;
424
+ /**
425
+ * Focus left the form for `next`, or for no focusable element when null.
426
+ * Not called when the window loses focus.
427
+ */
428
+ onLeave: (next: Element | null) => void;
429
+ }
430
+
431
+ /** Props of the `inspector-button` slot. */
432
+ export interface CopilotChatAssistantMessageInspectorButtonSlotProps {
433
+ /** Opens this message in the Inspector. */
434
+ onInspect: () => void;
329
435
  label: string;
330
436
  }
331
437
 
@@ -498,6 +604,8 @@ export interface CopilotSidebarViewToggleButtonSlotProps {
498
604
  export interface CopilotSidebarViewProps extends CopilotChatViewProps {
499
605
  width?: number | string;
500
606
  defaultOpen?: boolean;
607
+ /** The edge the sidebar docks to. Defaults to `"right"`. */
608
+ position?: "left" | "right";
501
609
  }
502
610
 
503
611
  export type CopilotPopupViewHeaderSlotProps = CopilotSidebarViewHeaderSlotProps;
@@ -533,4 +641,6 @@ export interface CopilotPopupProps extends CopilotChatProps {
533
641
  export interface CopilotSidebarProps extends CopilotChatProps {
534
642
  width?: number | string;
535
643
  defaultOpen?: boolean;
644
+ /** The edge the sidebar docks to. Defaults to `"right"`. */
645
+ position?: CopilotSidebarViewProps["position"];
536
646
  }
@@ -0,0 +1,16 @@
1
+ import { computed } from "vue";
2
+ import { CopilotChatDefaultLabels } from "@copilotkit/core";
3
+ import type { CopilotChatLabels } from "@copilotkit/core";
4
+ import { useCopilotChatConfiguration } from "../../providers/useCopilotChatConfiguration";
5
+
6
+ /**
7
+ * The chat labels in effect: the surrounding chat configuration's, or the
8
+ * default English labels outside a chat.
9
+ * @internal
10
+ */
11
+ export function useChatLabels() {
12
+ const config = useCopilotChatConfiguration();
13
+ return computed<Readonly<CopilotChatLabels>>(
14
+ () => config.value?.labels ?? CopilotChatDefaultLabels,
15
+ );
16
+ }
@@ -0,0 +1,64 @@
1
+ import { nextTick, ref } from "vue";
2
+ import { useCopilotId } from "../ui/use-id";
3
+
4
+ type DocWithVT = Document & {
5
+ startViewTransition?: (cb: () => void | Promise<void>) => {
6
+ finished: Promise<void>;
7
+ };
8
+ };
9
+
10
+ /**
11
+ * Opens and closes a lightbox, using the View Transition API to morph the
12
+ * thumbnail into the full-screen content, as React's `useLightbox`.
13
+ *
14
+ * `view-transition-name` must be on exactly one element at a time: on the
15
+ * thumbnail in the old state, and on the lightbox content (bind `vtName` to
16
+ * it) in the new one. The transition callback waits for Vue to render the
17
+ * change, so the API can snapshot old and new correctly.
18
+ * @internal
19
+ */
20
+ export function useLightbox() {
21
+ const thumbnailRef = ref<HTMLElement | null>(null);
22
+ const open = ref(false);
23
+ // A custom ident: Vue's ids can hold characters CSS does not allow there.
24
+ const vtName = useCopilotId("cpk-lightbox").replace(/[^\w-]/g, "-");
25
+
26
+ const openLightbox = () => {
27
+ const thumb = thumbnailRef.value;
28
+ const doc =
29
+ typeof document === "undefined" ? undefined : (document as DocWithVT);
30
+
31
+ if (doc?.startViewTransition && thumb) {
32
+ thumb.style.viewTransitionName = vtName;
33
+ doc.startViewTransition(async () => {
34
+ thumb.style.viewTransitionName = "";
35
+ open.value = true;
36
+ await nextTick();
37
+ });
38
+ } else {
39
+ open.value = true;
40
+ }
41
+ };
42
+
43
+ const closeLightbox = () => {
44
+ const thumb = thumbnailRef.value;
45
+ const doc =
46
+ typeof document === "undefined" ? undefined : (document as DocWithVT);
47
+
48
+ if (doc?.startViewTransition && thumb) {
49
+ const transition = doc.startViewTransition(async () => {
50
+ open.value = false;
51
+ await nextTick();
52
+ thumb.style.viewTransitionName = vtName;
53
+ });
54
+ const clear = () => {
55
+ thumb.style.viewTransitionName = "";
56
+ };
57
+ transition.finished.then(clear, clear);
58
+ } else {
59
+ open.value = false;
60
+ }
61
+ };
62
+
63
+ return { thumbnailRef, vtName, open, openLightbox, closeLightbox };
64
+ }
@@ -1,86 +1,90 @@
1
1
  import { describe, expect, it } from "vitest";
2
+ import { h } from "vue";
2
3
  import { mount } from "@vue/test-utils";
3
- import {
4
- IconArrowUp,
5
- IconCheck,
6
- IconCheckCircle,
7
- IconChevronDown,
8
- IconChevronLeft,
9
- IconChevronRight,
10
- IconCircle,
11
- IconCopy,
12
- IconEdit,
13
- IconLoader2,
14
- IconMessageCircle,
15
- IconMic,
16
- IconPlus,
17
- IconRefreshCw,
18
- IconSquare,
19
- IconThumbsDown,
20
- IconThumbsUp,
21
- IconVolume2,
22
- IconX,
23
- } from "../index";
4
+ import { CopilotIcon, IconCircle, IconPlay, IconX } from "../index";
24
5
 
25
- describe("icons adapter", () => {
26
- it("exports all expected icon aliases", () => {
27
- const icons = [
28
- IconMessageCircle,
29
- IconX,
30
- IconChevronDown,
31
- IconPlus,
32
- IconMic,
33
- IconArrowUp,
34
- IconCheck,
35
- IconSquare,
36
- IconLoader2,
37
- IconCopy,
38
- IconEdit,
39
- IconChevronLeft,
40
- IconChevronRight,
41
- IconThumbsUp,
42
- IconThumbsDown,
43
- IconVolume2,
44
- IconRefreshCw,
45
- IconCheckCircle,
46
- IconCircle,
47
- ];
6
+ describe("CopilotIcon", () => {
7
+ it("draws the named icon with Lucide's classes and default attributes", () => {
8
+ const svg = mount(CopilotIcon, { props: { name: "X" } }).find("svg");
48
9
 
49
- for (const icon of icons) {
50
- expect(icon).toBeDefined();
51
- }
10
+ expect(svg.classes()).toEqual(["lucide", "lucide-x"]);
11
+ expect(svg.attributes()).toMatchObject({
12
+ xmlns: "http://www.w3.org/2000/svg",
13
+ width: "24",
14
+ height: "24",
15
+ viewBox: "0 0 24 24",
16
+ fill: "none",
17
+ stroke: "currentColor",
18
+ "stroke-width": "2",
19
+ "stroke-linecap": "round",
20
+ "stroke-linejoin": "round",
21
+ });
22
+ expect(svg.findAll("path").map((path) => path.attributes("d"))).toEqual([
23
+ "M18 6 6 18",
24
+ "m6 6 12 12",
25
+ ]);
52
26
  });
53
27
 
54
- it("renders svg icons from aliases", () => {
55
- const xWrapper = mount(IconX);
56
- const loaderWrapper = mount(IconLoader2);
28
+ it("draws circle and polygon nodes", () => {
29
+ const circle = mount(IconCircle).find("svg").find("circle");
30
+ const polygon = mount(IconPlay).find("svg").find("polygon");
57
31
 
58
- expect(xWrapper.find("svg").exists()).toBe(true);
59
- expect(loaderWrapper.find("svg").exists()).toBe(true);
32
+ expect(circle.attributes()).toMatchObject({ cx: "12", cy: "12", r: "10" });
33
+ expect(polygon.attributes("points")).toBe("6 3 20 12 6 21 6 3");
60
34
  });
61
35
 
62
- it("passes through classes, size, style, and accessibility attributes", () => {
63
- const wrapper = mount(IconX, {
36
+ it("applies size, color and stroke-width", () => {
37
+ const svg = mount(IconX, {
38
+ props: { size: 18, color: "red", strokeWidth: 1.75 },
39
+ }).find("svg");
40
+
41
+ expect(svg.attributes()).toMatchObject({
42
+ width: "18",
43
+ height: "18",
44
+ stroke: "red",
45
+ "stroke-width": "1.75",
46
+ });
47
+ });
48
+
49
+ it("passes other attributes to the svg after the Lucide classes", () => {
50
+ const svg = mount(IconX, {
64
51
  attrs: {
65
52
  class: "icon-class",
66
- width: "18",
67
- height: "20",
68
- "stroke-width": "1.5",
69
- role: "img",
70
- "aria-hidden": "true",
53
+ fill: "currentColor",
54
+ "data-testid": "close-icon",
71
55
  style: "color: rgb(255, 0, 0);",
72
56
  },
73
- });
57
+ }).find("svg");
58
+
59
+ expect(svg.classes()).toEqual(["lucide", "lucide-x", "icon-class"]);
60
+ expect(svg.attributes("fill")).toBe("currentColor");
61
+ expect(svg.attributes("data-testid")).toBe("close-icon");
62
+ expect(svg.attributes("style")).toContain("color: rgb(255, 0, 0)");
63
+ });
74
64
 
75
- const svg = wrapper.find("svg");
65
+ it("hides an unnamed icon from screen readers", () => {
66
+ const svg = mount(IconX).find("svg");
76
67
 
77
- expect(svg.exists()).toBe(true);
78
- expect(svg.classes()).toContain("icon-class");
79
- expect(svg.attributes("width")).toBe("18");
80
- expect(svg.attributes("height")).toBe("20");
81
- expect(svg.attributes("stroke-width")).toBe("1.5");
82
- expect(svg.attributes("role")).toBe("img");
83
68
  expect(svg.attributes("aria-hidden")).toBe("true");
84
- expect(svg.attributes("style")).toContain("color");
69
+ });
70
+
71
+ it("keeps a named icon visible to screen readers", () => {
72
+ const labelled = mount(IconX, { attrs: { "aria-label": "Close" } }).find(
73
+ "svg",
74
+ );
75
+ const withRole = mount(IconX, { attrs: { role: "img" } }).find("svg");
76
+
77
+ expect(labelled.attributes("aria-hidden")).toBeUndefined();
78
+ expect(labelled.attributes("aria-label")).toBe("Close");
79
+ expect(withRole.attributes("aria-hidden")).toBeUndefined();
80
+ });
81
+
82
+ it("keeps an icon with slot content visible to screen readers", () => {
83
+ const svg = mount(IconX, {
84
+ slots: { default: () => h("title", "Close") },
85
+ }).find("svg");
86
+
87
+ expect(svg.attributes("aria-hidden")).toBeUndefined();
88
+ expect(svg.find("title").text()).toBe("Close");
85
89
  });
86
90
  });
@@ -1,23 +1,109 @@
1
- export {
2
- MessageCircle as IconMessageCircle,
3
- X as IconX,
4
- ChevronDown as IconChevronDown,
5
- Plus as IconPlus,
6
- Mic as IconMic,
7
- ArrowUp as IconArrowUp,
8
- Check as IconCheck,
9
- Square as IconSquare,
10
- Loader2 as IconLoader2,
11
- Copy as IconCopy,
12
- Download as IconDownload,
13
- Edit as IconEdit,
14
- ChevronLeft as IconChevronLeft,
15
- ChevronRight as IconChevronRight,
16
- ThumbsUp as IconThumbsUp,
17
- ThumbsDown as IconThumbsDown,
18
- Volume2 as IconVolume2,
19
- RefreshCw as IconRefreshCw,
20
- CheckCircle as IconCheckCircle,
21
- Circle as IconCircle,
22
- PanelLeftOpen as IconPanelLeftOpen,
23
- } from "lucide-vue-next";
1
+ import { defineComponent, h } from "vue";
2
+ import type { PropType } from "vue";
3
+ import { ɵcopilotIcons, ɵcopilotIconSvgAttributes } from "@copilotkit/core";
4
+ import type { CopilotIconName } from "@copilotkit/core";
5
+
6
+ /** True when the attributes give the icon an accessible name or role. */
7
+ function hasAccessibleAttribute(attributes: object) {
8
+ return Object.keys(attributes).some(
9
+ (key) => key.startsWith("aria-") || key === "role" || key === "title",
10
+ );
11
+ }
12
+
13
+ /** Props that change how an icon is drawn. Other attributes go on the `<svg>`. */
14
+ const iconDrawProps = {
15
+ /** Width and height of the icon. Defaults to `24`. */
16
+ size: { type: [Number, String], default: 24 },
17
+ /** Line color. Defaults to `currentColor`. */
18
+ color: { type: String, default: "currentColor" },
19
+ /** Line width. Defaults to `2`. */
20
+ strokeWidth: { type: [Number, String], default: 2 },
21
+ };
22
+
23
+ /**
24
+ * Draws one of the chat icons as an inline `<svg>`.
25
+ *
26
+ * The `<svg>` has the classes `lucide lucide-<icon name>`, so CSS that selects
27
+ * them (for example `svg.lucide-arrow-up`) keeps working. The icon is hidden
28
+ * from screen readers unless you give it an `aria-*` attribute, a `role` or a
29
+ * `title`. Other attributes, such as `class` or `fill`, go on the `<svg>`.
30
+ *
31
+ * Props:
32
+ * - `name`: the chat icon, for example `"ArrowUp"` or `"X"`.
33
+ * - `size`: width and height. Defaults to `24`.
34
+ * - `stroke-width`: line width. Defaults to `2`.
35
+ * - `color`: line color. Defaults to `currentColor`.
36
+ *
37
+ * @example
38
+ * ```vue
39
+ * <CopilotIcon name="ArrowUp" class="cpk-chat-input-send-icon" />
40
+ * <CopilotIcon name="X" aria-label="Close" />
41
+ * ```
42
+ */
43
+ export const CopilotIcon = defineComponent({
44
+ name: "CopilotIcon",
45
+ props: {
46
+ /** The chat icon to draw, for example `"ArrowUp"`. */
47
+ name: { type: String as PropType<CopilotIconName>, required: true },
48
+ ...iconDrawProps,
49
+ },
50
+ setup(props, { attrs, slots }) {
51
+ return () => {
52
+ const icon = ɵcopilotIcons[props.name];
53
+ const content = slots.default?.() ?? [];
54
+ const isDecorative =
55
+ content.length === 0 && !hasAccessibleAttribute(attrs);
56
+ return h(
57
+ "svg",
58
+ {
59
+ ...ɵcopilotIconSvgAttributes,
60
+ width: props.size,
61
+ height: props.size,
62
+ stroke: props.color,
63
+ "stroke-width": props.strokeWidth,
64
+ class: ["lucide", `lucide-${icon.name}`],
65
+ "aria-hidden": isDecorative ? "true" : undefined,
66
+ },
67
+ [...icon.nodes.map((node) => h(node.tag, node.attributes)), ...content],
68
+ );
69
+ };
70
+ },
71
+ });
72
+
73
+ /**
74
+ * Internal. Makes a component that draws one chat icon, such as `IconArrowUp`.
75
+ * It takes the same `size`, `color` and `stroke-width` props as `CopilotIcon`.
76
+ */
77
+ function defineIcon(name: CopilotIconName) {
78
+ return defineComponent({
79
+ name: `Icon${name}`,
80
+ props: iconDrawProps,
81
+ setup(props, { slots }) {
82
+ return () => h(CopilotIcon, { name, ...props }, slots);
83
+ },
84
+ });
85
+ }
86
+
87
+ export const IconArrowUp = defineIcon("ArrowUp");
88
+ export const IconCheck = defineIcon("Check");
89
+ export const IconChevronDown = defineIcon("ChevronDown");
90
+ export const IconChevronLeft = defineIcon("ChevronLeft");
91
+ export const IconChevronRight = defineIcon("ChevronRight");
92
+ export const IconCircle = defineIcon("Circle");
93
+ export const IconCopy = defineIcon("Copy");
94
+ export const IconEdit = defineIcon("Edit");
95
+ export const IconEyeOff = defineIcon("EyeOff");
96
+ export const IconLoader2 = defineIcon("Loader2");
97
+ export const IconMessageCircle = defineIcon("MessageCircle");
98
+ export const IconMic = defineIcon("Mic");
99
+ export const IconPanelLeftOpen = defineIcon("PanelLeftOpen");
100
+ export const IconPlay = defineIcon("Play");
101
+ export const IconPlus = defineIcon("Plus");
102
+ export const IconRefreshCw = defineIcon("RefreshCw");
103
+ export const IconSquare = defineIcon("Square");
104
+ export const IconThumbsDown = defineIcon("ThumbsDown");
105
+ export const IconThumbsUp = defineIcon("ThumbsUp");
106
+ export const IconUpload = defineIcon("Upload");
107
+ export const IconVolume2 = defineIcon("Volume2");
108
+ export const IconWrench = defineIcon("Wrench");
109
+ export const IconX = defineIcon("X");