@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
@@ -9,10 +9,14 @@ import {
9
9
  watch,
10
10
  } from "vue";
11
11
  import type { Message } from "@ag-ui/core";
12
+ import {
13
+ ɵgetChatViewState,
14
+ ɵisScrolledToBottom,
15
+ ɵnormalizeAutoScroll,
16
+ } from "@copilotkit/core";
12
17
  import type { Suggestion } from "@copilotkit/core";
13
18
  import type { Attachment } from "@copilotkit/shared";
14
- import { useCopilotChatConfiguration } from "../../providers/useCopilotChatConfiguration";
15
- import { CopilotChatDefaultLabels } from "../../providers/types";
19
+ import { useChatLabels } from "./use-chat-labels";
16
20
  import { useKeyboardHeight } from "../../hooks/use-keyboard-height";
17
21
  import { usePinToSend } from "../../hooks/use-pin-to-send";
18
22
  import { IconChevronDown, IconUpload } from "../icons";
@@ -20,7 +24,6 @@ import CopilotChatInput from "./CopilotChatInput.vue";
20
24
  import CopilotChatAttachmentQueue from "./CopilotChatAttachmentQueue.vue";
21
25
  import CopilotChatMessageView from "./CopilotChatMessageView.vue";
22
26
  import CopilotChatSuggestionView from "./CopilotChatSuggestionView.vue";
23
- import { normalizeAutoScroll } from "./normalize-auto-scroll";
24
27
  import type {
25
28
  CopilotChatInputMode,
26
29
  CopilotChatInterruptSlotProps,
@@ -31,7 +34,6 @@ import type {
31
34
  // Vertical gap between the scroll-to-bottom button and the input container.
32
35
  // Mirrors React `CopilotChatView` `SCROLL_BUTTON_OFFSET`.
33
36
  const SCROLL_BUTTON_OFFSET = 16;
34
- const SCROLL_BOTTOM_THRESHOLD = 12;
35
37
 
36
38
  const props = withDefaults(defineProps<CopilotChatViewProps>(), {
37
39
  messageFeedback: true,
@@ -127,8 +129,7 @@ const emit = defineEmits<{
127
129
  "finish-transcribe": [];
128
130
  }>();
129
131
 
130
- const config = useCopilotChatConfiguration();
131
- const labels = computed(() => config.value?.labels ?? CopilotChatDefaultLabels);
132
+ const labels = useChatLabels();
132
133
  const componentSlots = useSlots();
133
134
 
134
135
  const scrollContainerRef = ref<HTMLElement | null>(null);
@@ -142,8 +143,8 @@ const localInputValue = ref(props.inputValue ?? "");
142
143
 
143
144
  // Normalize the `autoScroll` prop into the canonical mode triplet
144
145
  // (`pin-to-bottom` | `pin-to-send` | `none`). Boolean back-compat is
145
- // preserved by `normalizeAutoScroll` (parity with React).
146
- const autoScrollMode = computed(() => normalizeAutoScroll(props.autoScroll));
146
+ // preserved by `ɵnormalizeAutoScroll` (parity with React).
147
+ const autoScrollMode = computed(() => ɵnormalizeAutoScroll(props.autoScroll));
147
148
  const isPinToBottomMode = computed(
148
149
  () => autoScrollMode.value === "pin-to-bottom",
149
150
  );
@@ -169,13 +170,23 @@ const effectiveKeyboardHeight = computed(() =>
169
170
  const resolvedInputValue = computed(() =>
170
171
  isControlledInput.value ? (props.inputValue ?? "") : localInputValue.value,
171
172
  );
172
- const hasSuggestions = computed(
173
- () =>
174
- !props.isConnecting &&
175
- !props.isRunning &&
176
- Array.isArray(props.suggestions) &&
177
- props.suggestions.length > 0,
173
+ // Suggestions, the welcome screen and the bottom padding follow core's rules:
174
+ // no suggestions while connecting or running, no generic welcome for a
175
+ // connecting or caller-picked thread.
176
+ const viewState = computed(() =>
177
+ ɵgetChatViewState({
178
+ messageCount: props.messages.length,
179
+ suggestionCount: Array.isArray(props.suggestions)
180
+ ? props.suggestions.length
181
+ : 0,
182
+ isRunning: props.isRunning,
183
+ isConnecting: props.isConnecting,
184
+ hasExplicitThreadId: props.hasExplicitThreadId,
185
+ welcomeScreenEnabled: props.welcomeScreen !== false,
186
+ inputContainerHeight: inputContainerHeight.value,
187
+ }),
178
188
  );
189
+ const hasSuggestions = computed(() => viewState.value.hasSuggestions);
179
190
  const hasAttachments = computed(
180
191
  () => Array.isArray(props.attachments) && props.attachments.length > 0,
181
192
  );
@@ -193,18 +204,12 @@ const forwardedMessageViewSlotNames = computed(() =>
193
204
  ),
194
205
  );
195
206
  const shouldShowWelcomeScreen = computed(
196
- () =>
197
- props.messages.length === 0 &&
198
- props.welcomeScreen !== false &&
199
- !props.isConnecting &&
200
- !props.hasExplicitThreadId,
207
+ () => viewState.value.showWelcomeScreen,
201
208
  );
202
- // Mirrors React: `paddingBottom = inputContainerHeight + (hasSuggestions ? 4 : 32)`.
203
- // React intentionally does NOT add bonus padding for attachments — the
204
- // attachment queue lives inside the input overlay, so its height is already
205
- // captured by the overlay's measured `inputContainerHeight`.
209
+ // No bonus padding for attachments: the attachment queue lives inside the
210
+ // input overlay, so its height is already in `inputContainerHeight`.
206
211
  const messagePaddingBottom = computed(
207
- () => `${inputContainerHeight.value + (hasSuggestions.value ? 4 : 32)}px`,
212
+ () => `${viewState.value.paddingBottom}px`,
208
213
  );
209
214
  const showScrollToBottomButton = computed(
210
215
  () => !shouldShowWelcomeScreen.value && !isAtBottom.value,
@@ -302,9 +307,7 @@ function updateIsAtBottom() {
302
307
  return;
303
308
  }
304
309
 
305
- const distance =
306
- element.scrollHeight - element.scrollTop - element.clientHeight;
307
- isAtBottom.value = distance <= SCROLL_BOTTOM_THRESHOLD;
310
+ isAtBottom.value = ɵisScrolledToBottom(element);
308
311
  }
309
312
 
310
313
  function syncInputContainerHeight() {
@@ -457,7 +460,9 @@ onBeforeUnmount(() => {
457
460
  >
458
461
  <div class="cpk-chat-view-drop-overlay-content">
459
462
  <IconUpload class="cpk-chat-view-drop-overlay-icon" />
460
- <span class="cpk-chat-view-drop-overlay-label">Drop files here</span>
463
+ <span class="cpk-chat-view-drop-overlay-label">{{
464
+ labels.chatDropFilesLabel
465
+ }}</span>
461
466
  </div>
462
467
  </div>
463
468
  <slot
@@ -5,10 +5,10 @@
5
5
  * for 9s · 7 tools" and toggles the work it folded away.
6
6
  */
7
7
  import { computed, ref, watch } from "vue";
8
+ import { ɵgetWorkSummaryText } from "@copilotkit/core";
8
9
  import { IconChevronRight } from "../icons";
9
10
  import type { CopilotChatWorkSummarySlotProps } from "./types";
10
- import { pluralize } from "./tool-call-group-parts";
11
- import { formatDuration } from "./turn-work";
11
+ import { useChatLabels } from "./use-chat-labels";
12
12
 
13
13
  // `onClick` falls through to the button.
14
14
  const props = defineProps<Omit<CopilotChatWorkSummarySlotProps, "onClick">>();
@@ -28,19 +28,16 @@ watch(
28
28
  { immediate: true },
29
29
  );
30
30
 
31
- const failed = computed(
32
- () => props.calls.filter((call) => call.toolMessage?.error).length,
33
- );
34
- const liveMs = computed(() =>
35
- props.elapsedMs !== undefined && props.workingSince !== undefined
36
- ? props.elapsedMs + Math.max(0, now.value - props.workingSince)
37
- : undefined,
38
- );
39
- // A finished reply worked for at least a second.
40
- const duration = computed(() =>
41
- props.elapsedMs !== undefined
42
- ? formatDuration(Math.max(1000, props.elapsedMs))
43
- : undefined,
31
+ const labels = useChatLabels();
32
+ const text = computed(() =>
33
+ ɵgetWorkSummaryText({
34
+ isWorking: props.isWorking,
35
+ calls: props.calls,
36
+ elapsedMs: props.elapsedMs,
37
+ workingSince: props.workingSince,
38
+ now: now.value,
39
+ labels: labels.value,
40
+ }),
44
41
  );
45
42
  </script>
46
43
 
@@ -53,27 +50,20 @@ const duration = computed(() =>
53
50
  :aria-expanded="isOpen ? 'true' : 'false'"
54
51
  class="cpk-work-summary"
55
52
  >
56
- <template v-if="isWorking">
57
- <span class="cpk-work-summary-label cpk-shimmer">Working</span>
58
- <span
59
- v-if="liveMs !== undefined"
60
- class="cpk-work-summary-detail cpk-work-summary-timer"
61
- >{{ formatDuration(liveMs) }}</span
62
- >
63
- </template>
64
- <template v-else>
65
- <span class="cpk-work-summary-label">{{
66
- duration
67
- ? `Worked for ${duration}`
68
- : `Used ${pluralize(calls.length, "tool")}`
69
- }}</span>
70
- <span v-if="duration" class="cpk-work-summary-detail">{{
71
- pluralize(calls.length, "tool")
72
- }}</span>
73
- <span v-if="failed > 0" class="cpk-work-summary-failed"
74
- >{{ failed }} failed</span
75
- >
76
- </template>
53
+ <span :class="['cpk-work-summary-label', isWorking && 'cpk-shimmer']">{{
54
+ text.label
55
+ }}</span>
56
+ <span
57
+ v-if="text.detail !== null"
58
+ :class="[
59
+ 'cpk-work-summary-detail',
60
+ isWorking && 'cpk-work-summary-timer',
61
+ ]"
62
+ >{{ text.detail }}</span
63
+ >
64
+ <span v-if="text.failed !== null" class="cpk-work-summary-failed">{{
65
+ text.failed
66
+ }}</span>
77
67
  <IconChevronRight
78
68
  aria-hidden="true"
79
69
  :class="[
@@ -2,7 +2,7 @@
2
2
  import { computed, onBeforeUnmount, onMounted, ref, useAttrs } from "vue";
3
3
  import { useCopilotChatConfiguration } from "../../providers/useCopilotChatConfiguration";
4
4
  import { CopilotChatDefaultLabels } from "../../providers/types";
5
- import { MOBILE_MAX_WIDTH_QUERY } from "../../lib/is-mobile-viewport";
5
+ import { ɵwatchMobileViewport } from "@copilotkit/core";
6
6
  import CopilotModalHeaderCloseButton from "./CopilotModalHeaderCloseButton";
7
7
  import CopilotModalHeaderTitle from "./CopilotModalHeaderTitle";
8
8
  import { IconPanelLeftOpen } from "../icons";
@@ -45,34 +45,22 @@ function handleClose() {
45
45
  config.value?.setModalOpen?.(false);
46
46
  }
47
47
 
48
- // Tracks whether the viewport is in the mobile range (MOBILE_MAX_WIDTH_QUERY) — the same
49
- // breakpoint the drawer + chat coordination use. SSR-safe: starts `false`
50
- // (desktop) so the server render and first client render agree, then syncs
51
- // on mount and on viewport changes.
48
+ // Tracks whether the viewport is in the mobile range — the same breakpoint
49
+ // the drawer + chat coordination use. SSR-safe: starts `false` (desktop) so
50
+ // the server render and first client render agree, then syncs on mount and
51
+ // on viewport changes.
52
52
  const isMobile = ref(false);
53
- let mobileMediaQuery: MediaQueryList | null = null;
54
-
55
- function syncIsMobile() {
56
- if (mobileMediaQuery) {
57
- isMobile.value = mobileMediaQuery.matches;
58
- }
59
- }
53
+ let stopWatchingMobile: (() => void) | undefined;
60
54
 
61
55
  onMounted(() => {
62
- if (
63
- typeof window === "undefined" ||
64
- typeof window.matchMedia !== "function"
65
- ) {
66
- return;
67
- }
68
- mobileMediaQuery = window.matchMedia(MOBILE_MAX_WIDTH_QUERY);
69
- mobileMediaQuery.addEventListener("change", syncIsMobile);
70
- syncIsMobile();
56
+ stopWatchingMobile = ɵwatchMobileViewport((mobile) => {
57
+ isMobile.value = mobile;
58
+ });
71
59
  });
72
60
 
73
61
  onBeforeUnmount(() => {
74
- mobileMediaQuery?.removeEventListener("change", syncIsMobile);
75
- mobileMediaQuery = null;
62
+ stopWatchingMobile?.();
63
+ stopWatchingMobile = undefined;
76
64
  });
77
65
 
78
66
  // The thread-list launcher renders ONLY when a <CopilotThreadsDrawer> wrapper
@@ -4,9 +4,14 @@ import CopilotChat from "./CopilotChat.vue";
4
4
  import CopilotPopupView from "./CopilotPopupView.vue";
5
5
  import CopilotPopupWelcomeScreen from "./CopilotPopupWelcomeScreen.vue";
6
6
  import InlineFeatureWarning from "../InlineFeatureWarning.vue";
7
+ import { forwardedSlotNames } from "./forwarded-slots";
7
8
  import { useLicenseContext } from "../../providers/useLicenseContext";
8
9
  import type {
10
+ CopilotChatFeatherSlotProps,
11
+ CopilotChatInterruptSlotProps,
9
12
  CopilotChatMessageViewSlotProps,
13
+ CopilotChatScrollToBottomButtonSlotProps,
14
+ CopilotChatScrollViewSlotProps,
10
15
  CopilotChatViewOverrideSlotProps,
11
16
  CopilotChatWelcomeScreenSlotProps,
12
17
  CopilotPopupProps,
@@ -53,14 +58,28 @@ defineSlots<{
53
58
  "toggle-button"?: (props: CopilotPopupViewToggleButtonSlotProps) => unknown;
54
59
  "chat-view"?: (props: CopilotChatViewOverrideSlotProps) => unknown;
55
60
  "message-view"?: (props: CopilotChatMessageViewSlotProps) => unknown;
61
+ "scroll-view"?: (props: CopilotChatScrollViewSlotProps) => unknown;
62
+ feather?: (props: CopilotChatFeatherSlotProps) => unknown;
63
+ "scroll-to-bottom-button"?: (
64
+ props: CopilotChatScrollToBottomButtonSlotProps,
65
+ ) => unknown;
66
+ interrupt?: (props: CopilotChatInterruptSlotProps) => unknown;
56
67
  input?: (props: CopilotSidebarWelcomeScreenInputSlotProps) => unknown;
57
68
  "suggestion-view"?: (
58
69
  props: CopilotSidebarWelcomeScreenSuggestionViewSlotProps,
59
70
  ) => unknown;
60
71
  "welcome-screen"?: (props: CopilotChatWelcomeScreenSlotProps) => unknown;
61
72
  "welcome-message"?: () => unknown;
73
+ // Any other slot goes to the chat view, as on CopilotChat.
74
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
75
+ [key: string]: ((props: any) => unknown) | undefined;
62
76
  }>();
63
77
 
78
+ // Slots this component renders itself and does not pass to the view. It passes
79
+ // every other slot to the view. It also renders `input` and `suggestion-view`
80
+ // in its welcome screen, so those two go to both places.
81
+ const OWN_SLOTS = ["chat-view", "welcome-screen", "welcome-message"] as const;
82
+
64
83
  defineEmits<{
65
84
  "submit-message": [value: string];
66
85
  stop: [];
@@ -125,15 +144,12 @@ watch(
125
144
  :on-finish-transcribe-with-audio="slotProps.onFinishTranscribeWithAudio"
126
145
  v-bind="popupViewEventBindings(slotProps)"
127
146
  >
128
- <template v-if="$slots.header" #header="headerProps">
129
- <slot name="header" v-bind="headerProps" />
130
- </template>
131
-
132
147
  <template
133
- v-if="$slots['toggle-button']"
134
- #toggle-button="toggleButtonProps"
148
+ v-for="slotName in forwardedSlotNames($slots, OWN_SLOTS)"
149
+ :key="slotName"
150
+ #[slotName]="forwardedProps"
135
151
  >
136
- <slot name="toggle-button" v-bind="toggleButtonProps" />
152
+ <slot :name="slotName" v-bind="forwardedProps" />
137
153
  </template>
138
154
 
139
155
  <template #welcome-screen="welcomeScreenProps">
@@ -159,24 +175,6 @@ watch(
159
175
  </template>
160
176
  </CopilotPopupWelcomeScreen>
161
177
  </template>
162
-
163
- <template
164
- v-if="$slots['message-view']"
165
- #message-view="messageViewProps"
166
- >
167
- <slot name="message-view" v-bind="messageViewProps" />
168
- </template>
169
-
170
- <template v-if="$slots.input" #input="inputProps">
171
- <slot name="input" v-bind="inputProps" />
172
- </template>
173
-
174
- <template
175
- v-if="$slots['suggestion-view']"
176
- #suggestion-view="suggestionViewProps"
177
- >
178
- <slot name="suggestion-view" v-bind="suggestionViewProps" />
179
- </template>
180
178
  </CopilotPopupView>
181
179
  </template>
182
180
  </CopilotChat>
@@ -1,9 +1,11 @@
1
1
  <script setup lang="ts">
2
2
  import { computed, useAttrs } from "vue";
3
3
  import CopilotChatConfigurationProvider from "../../providers/CopilotChatConfigurationProvider.vue";
4
+ import { forwardedSlotNames } from "./forwarded-slots";
4
5
  import CopilotPopupViewInternal from "./CopilotPopupViewInternal.vue";
5
6
  import type {
6
7
  CopilotChatFeatherSlotProps,
8
+ CopilotChatInterruptSlotProps,
7
9
  CopilotChatMessageViewSlotProps,
8
10
  CopilotChatScrollToBottomButtonSlotProps,
9
11
  CopilotChatScrollViewSlotProps,
@@ -44,12 +46,16 @@ defineSlots<{
44
46
  "scroll-to-bottom-button"?: (
45
47
  props: CopilotChatScrollToBottomButtonSlotProps,
46
48
  ) => unknown;
49
+ interrupt?: (props: CopilotChatInterruptSlotProps) => unknown;
47
50
  input?: (props: CopilotSidebarWelcomeScreenInputSlotProps) => unknown;
48
51
  "suggestion-view"?: (
49
52
  props: CopilotSidebarWelcomeScreenSuggestionViewSlotProps,
50
53
  ) => unknown;
51
54
  "welcome-screen"?: (props: CopilotChatWelcomeScreenSlotProps) => unknown;
52
55
  "welcome-message"?: () => unknown;
56
+ // Any other slot goes to the chat view, as on CopilotChat.
57
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
58
+ [key: string]: ((props: any) => unknown) | undefined;
53
59
  }>();
54
60
 
55
61
  const emit = defineEmits<{
@@ -112,47 +118,12 @@ const internalBindings = computed(() => ({
112
118
  <template>
113
119
  <CopilotChatConfigurationProvider :is-modal-default-open="defaultOpen">
114
120
  <CopilotPopupViewInternal v-bind="internalBindings">
115
- <template v-if="$slots.header" #header="slotProps">
116
- <slot name="header" v-bind="slotProps" />
117
- </template>
118
-
119
- <template v-if="$slots['toggle-button']" #toggle-button="slotProps">
120
- <slot name="toggle-button" v-bind="slotProps" />
121
- </template>
122
-
123
- <template v-if="$slots['message-view']" #message-view="slotProps">
124
- <slot name="message-view" v-bind="slotProps" />
125
- </template>
126
-
127
- <template v-if="$slots['scroll-view']" #scroll-view="slotProps">
128
- <slot name="scroll-view" v-bind="slotProps" />
129
- </template>
130
-
131
- <template v-if="$slots.feather" #feather="slotProps">
132
- <slot name="feather" v-bind="slotProps" />
133
- </template>
134
-
135
121
  <template
136
- v-if="$slots['scroll-to-bottom-button']"
137
- #scroll-to-bottom-button="slotProps"
122
+ v-for="slotName in forwardedSlotNames($slots)"
123
+ :key="slotName"
124
+ #[slotName]="slotProps"
138
125
  >
139
- <slot name="scroll-to-bottom-button" v-bind="slotProps" />
140
- </template>
141
-
142
- <template v-if="$slots.input" #input="slotProps">
143
- <slot name="input" v-bind="slotProps" />
144
- </template>
145
-
146
- <template v-if="$slots['suggestion-view']" #suggestion-view="slotProps">
147
- <slot name="suggestion-view" v-bind="slotProps" />
148
- </template>
149
-
150
- <template v-if="$slots['welcome-screen']" #welcome-screen="slotProps">
151
- <slot name="welcome-screen" v-bind="slotProps" />
152
- </template>
153
-
154
- <template v-if="$slots['welcome-message']" #welcome-message>
155
- <slot name="welcome-message" />
126
+ <slot :name="slotName" v-bind="slotProps" />
156
127
  </template>
157
128
  </CopilotPopupViewInternal>
158
129
  </CopilotChatConfigurationProvider>