@copilotkit/vue 2.0.0-rc.1 → 2.0.0-rc.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/PARITY.md +13 -12
- package/README.md +1 -2
- package/dist/components/copilot-provider/CopilotKit.vue.d.ts +3 -1
- package/dist/components/copilot-provider/CopilotKit.vue.d.ts.map +1 -1
- package/dist/hooks/use-copilot-action.d.ts.map +1 -1
- package/dist/hooks/use-frontend-tool.d.ts +1 -1
- package/dist/hooks/use-frontend-tool.d.ts.map +1 -1
- package/dist/hooks/zod-parameters.d.ts +14 -0
- package/dist/hooks/zod-parameters.d.ts.map +1 -0
- package/dist/index.cjs +1 -76
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +384 -14275
- package/dist/index.mjs.map +1 -1
- package/dist/use-render-activity-message-CTR_ziWV.js +18097 -0
- package/dist/use-render-activity-message-CTR_ziWV.js.map +1 -0
- package/dist/use-render-activity-message-Dky9_GRG.cjs +92 -0
- package/dist/use-render-activity-message-Dky9_GRG.cjs.map +1 -0
- package/dist/v2/components/A2UIMessageRenderer.d.ts +7 -0
- package/dist/v2/components/A2UIMessageRenderer.d.ts.map +1 -1
- package/dist/v2/components/A2UISurfaceActivityRenderer.vue.d.ts.map +1 -1
- package/dist/v2/components/LicenseWarningBanner.vue.d.ts.map +1 -1
- package/dist/v2/components/OpenGenerativeUIRenderer.d.ts +13 -45
- package/dist/v2/components/OpenGenerativeUIRenderer.d.ts.map +1 -1
- package/dist/v2/components/a2ui/A2UIBuiltInToolCallRenderer.d.ts +11 -2
- package/dist/v2/components/a2ui/A2UIBuiltInToolCallRenderer.d.ts.map +1 -1
- package/dist/v2/components/a2ui/A2UICatalogContext.d.ts +1 -1
- package/dist/v2/components/a2ui/A2UICatalogContext.d.ts.map +1 -1
- package/dist/v2/components/a2ui/A2UIRecoveryStates.d.ts +144 -0
- package/dist/v2/components/a2ui/A2UIRecoveryStates.d.ts.map +1 -0
- package/dist/v2/components/a2ui.d.ts +3 -7
- package/dist/v2/components/a2ui.d.ts.map +1 -1
- package/dist/v2/components/chat/CopilotChat.vue.d.ts +1 -0
- package/dist/v2/components/chat/CopilotChat.vue.d.ts.map +1 -1
- package/dist/v2/components/chat/CopilotChatAssistantMessage.vue.d.ts +3 -1
- package/dist/v2/components/chat/CopilotChatAssistantMessage.vue.d.ts.map +1 -1
- package/dist/v2/components/chat/CopilotChatAssistantToolbarButton.vue.d.ts +16 -0
- package/dist/v2/components/chat/CopilotChatAssistantToolbarButton.vue.d.ts.map +1 -0
- package/dist/v2/components/chat/CopilotChatAttachmentQueue.vue.d.ts.map +1 -1
- package/dist/v2/components/chat/CopilotChatAttachmentRenderer.vue.d.ts.map +1 -1
- package/dist/v2/components/chat/CopilotChatAudioRecorder.vue.d.ts.map +1 -1
- package/dist/v2/components/chat/CopilotChatFeedbackCommentPopover.vue.d.ts +22 -0
- package/dist/v2/components/chat/CopilotChatFeedbackCommentPopover.vue.d.ts.map +1 -0
- package/dist/v2/components/chat/CopilotChatInput.vue.d.ts +21 -232
- package/dist/v2/components/chat/CopilotChatInput.vue.d.ts.map +1 -1
- package/dist/v2/components/chat/CopilotChatInspectorButton.vue.d.ts +12 -0
- package/dist/v2/components/chat/CopilotChatInspectorButton.vue.d.ts.map +1 -0
- package/dist/v2/components/chat/CopilotChatLightbox.vue.d.ts +22 -0
- package/dist/v2/components/chat/CopilotChatLightbox.vue.d.ts.map +1 -0
- package/dist/v2/components/chat/CopilotChatMessageView.vue.d.ts +20 -0
- package/dist/v2/components/chat/CopilotChatMessageView.vue.d.ts.map +1 -1
- package/dist/v2/components/chat/CopilotChatReasoningMessage.vue.d.ts.map +1 -1
- package/dist/v2/components/chat/CopilotChatSuggestionPill.vue.d.ts.map +1 -1
- package/dist/v2/components/chat/CopilotChatSuggestionView.vue.d.ts.map +1 -1
- package/dist/v2/components/chat/CopilotChatToggleButton.vue.d.ts.map +1 -1
- package/dist/v2/components/chat/CopilotChatToolCallGroup.vue.d.ts +32 -0
- package/dist/v2/components/chat/CopilotChatToolCallGroup.vue.d.ts.map +1 -0
- package/dist/v2/components/chat/CopilotChatToolCallItem.vue.d.ts.map +1 -1
- package/dist/v2/components/chat/CopilotChatToolCallsView.vue.d.ts +11 -1
- package/dist/v2/components/chat/CopilotChatToolCallsView.vue.d.ts.map +1 -1
- package/dist/v2/components/chat/CopilotChatUserMessage.vue.d.ts.map +1 -1
- package/dist/v2/components/chat/CopilotChatView.vue.d.ts +1 -0
- package/dist/v2/components/chat/CopilotChatView.vue.d.ts.map +1 -1
- package/dist/v2/components/chat/CopilotChatWorkSummary.vue.d.ts +5 -0
- package/dist/v2/components/chat/CopilotChatWorkSummary.vue.d.ts.map +1 -0
- package/dist/v2/components/chat/CopilotModalHeader.vue.d.ts.map +1 -1
- package/dist/v2/components/chat/CopilotModalHeaderCloseButton.d.ts.map +1 -1
- package/dist/v2/components/chat/CopilotModalHeaderTitle.d.ts.map +1 -1
- package/dist/v2/components/chat/CopilotPopup.vue.d.ts +1 -0
- package/dist/v2/components/chat/CopilotPopup.vue.d.ts.map +1 -1
- package/dist/v2/components/chat/CopilotPopupView.vue.d.ts +1 -0
- package/dist/v2/components/chat/CopilotPopupView.vue.d.ts.map +1 -1
- package/dist/v2/components/chat/CopilotPopupViewInternal.vue.d.ts +1 -0
- package/dist/v2/components/chat/CopilotPopupViewInternal.vue.d.ts.map +1 -1
- package/dist/v2/components/chat/CopilotPopupWelcomeScreen.vue.d.ts.map +1 -1
- package/dist/v2/components/chat/CopilotSidebar.vue.d.ts +2 -0
- package/dist/v2/components/chat/CopilotSidebar.vue.d.ts.map +1 -1
- package/dist/v2/components/chat/CopilotSidebarView.vue.d.ts +2 -0
- package/dist/v2/components/chat/CopilotSidebarView.vue.d.ts.map +1 -1
- package/dist/v2/components/chat/CopilotSidebarViewInternal.vue.d.ts +2 -0
- package/dist/v2/components/chat/CopilotSidebarViewInternal.vue.d.ts.map +1 -1
- package/dist/v2/components/chat/CopilotSidebarWelcomeScreen.vue.d.ts.map +1 -1
- package/dist/v2/components/chat/StreamingMarkdownDefault.vue.d.ts.map +1 -1
- package/dist/v2/components/chat/copilotChatToolCallItemRender.d.ts +0 -1
- package/dist/v2/components/chat/copilotChatToolCallItemRender.d.ts.map +1 -1
- package/dist/v2/components/chat/index.d.ts +17 -1
- package/dist/v2/components/chat/index.d.ts.map +1 -1
- package/dist/v2/components/chat/inspector-shortcuts.d.ts +12 -0
- package/dist/v2/components/chat/inspector-shortcuts.d.ts.map +1 -0
- package/dist/v2/components/chat/message-feedback.d.ts +89 -0
- package/dist/v2/components/chat/message-feedback.d.ts.map +1 -0
- package/dist/v2/components/chat/tool-call-capture.d.ts +39 -0
- package/dist/v2/components/chat/tool-call-capture.d.ts.map +1 -0
- package/dist/v2/components/chat/tool-call-display-context.d.ts +22 -0
- package/dist/v2/components/chat/tool-call-display-context.d.ts.map +1 -0
- package/dist/v2/components/chat/tool-call-group-parts.d.ts +131 -0
- package/dist/v2/components/chat/tool-call-group-parts.d.ts.map +1 -0
- package/dist/v2/components/chat/turn-work.d.ts +33 -0
- package/dist/v2/components/chat/turn-work.d.ts.map +1 -0
- package/dist/v2/components/chat/types.d.ts +104 -5
- package/dist/v2/components/chat/types.d.ts.map +1 -1
- package/dist/v2/components/chat/use-chat-labels.d.ts +8 -0
- package/dist/v2/components/chat/use-chat-labels.d.ts.map +1 -0
- package/dist/v2/components/chat/use-lightbox.d.ts +18 -0
- package/dist/v2/components/chat/use-lightbox.d.ts.map +1 -0
- package/dist/v2/components/icons/index.d.ts +968 -1
- package/dist/v2/components/icons/index.d.ts.map +1 -1
- package/dist/v2/components/ui/CopilotDropdownMenuContent.vue.d.ts +55 -0
- package/dist/v2/components/ui/CopilotDropdownMenuContent.vue.d.ts.map +1 -0
- package/dist/v2/components/ui/CopilotPopover.vue.d.ts +40 -0
- package/dist/v2/components/ui/CopilotPopover.vue.d.ts.map +1 -0
- package/dist/v2/components/ui/CopilotTooltip.vue.d.ts +37 -0
- package/dist/v2/components/ui/CopilotTooltip.vue.d.ts.map +1 -0
- package/dist/v2/components/ui/dropdown-menu.d.ts +14 -0
- package/dist/v2/components/ui/dropdown-menu.d.ts.map +1 -0
- package/dist/v2/components/ui/floating.d.ts +84 -0
- package/dist/v2/components/ui/floating.d.ts.map +1 -0
- package/dist/v2/components/ui/presence.d.ts +9 -0
- package/dist/v2/components/ui/presence.d.ts.map +1 -0
- package/dist/v2/components/ui/use-id.d.ts +9 -0
- package/dist/v2/components/ui/use-id.d.ts.map +1 -0
- package/dist/v2/hooks/use-default-render-tool.d.ts +6 -0
- package/dist/v2/hooks/use-default-render-tool.d.ts.map +1 -1
- package/dist/v2/hooks/use-frontend-tool.d.ts +5 -0
- package/dist/v2/hooks/use-frontend-tool.d.ts.map +1 -1
- package/dist/v2/hooks/use-render-activity-message.d.ts +13 -9
- package/dist/v2/hooks/use-render-activity-message.d.ts.map +1 -1
- package/dist/v2/hooks/use-render-custom-messages.d.ts +5 -7
- package/dist/v2/hooks/use-render-custom-messages.d.ts.map +1 -1
- package/dist/v2/hooks/use-render-tool.d.ts +4 -0
- package/dist/v2/hooks/use-render-tool.d.ts.map +1 -1
- package/dist/v2/index.cjs +1 -1
- package/dist/v2/index.d.cts +3 -0
- package/dist/v2/index.d.mts +3 -0
- package/dist/v2/index.d.ts +3 -0
- package/dist/v2/index.d.ts.map +1 -1
- package/dist/v2/index.mjs +197 -197
- package/dist/v2/index.mjs.map +1 -1
- package/dist/v2/lib/message-feedback.d.ts +33 -0
- package/dist/v2/lib/message-feedback.d.ts.map +1 -0
- package/dist/v2/lib/processPartialHtml.d.ts +1 -2
- package/dist/v2/lib/processPartialHtml.d.ts.map +1 -1
- package/dist/v2/lib/vue-core.d.ts +0 -1
- package/dist/v2/lib/vue-core.d.ts.map +1 -1
- package/dist/v2/providers/CopilotChatConfigurationProvider.vue.d.ts.map +1 -1
- package/dist/v2/providers/CopilotKitProvider.types.d.ts +56 -6
- package/dist/v2/providers/CopilotKitProvider.types.d.ts.map +1 -1
- package/dist/v2/providers/CopilotKitProvider.vue.d.ts +6 -2
- package/dist/v2/providers/CopilotKitProvider.vue.d.ts.map +1 -1
- package/dist/v2/providers/index.d.ts +1 -1
- package/dist/v2/providers/index.d.ts.map +1 -1
- package/dist/v2/providers/keys.d.ts +8 -0
- package/dist/v2/providers/keys.d.ts.map +1 -1
- package/dist/v2/providers/types.d.ts +3 -37
- package/dist/v2/providers/types.d.ts.map +1 -1
- package/dist/v2/styles/CopilotKitStyles.d.ts +18 -0
- package/dist/v2/styles/CopilotKitStyles.d.ts.map +1 -0
- package/dist/v2/types/defineToolCallRenderer.d.ts +2 -0
- package/dist/v2/types/defineToolCallRenderer.d.ts.map +1 -1
- package/dist/v2/types/human-in-the-loop.d.ts +8 -29
- package/dist/v2/types/human-in-the-loop.d.ts.map +1 -1
- package/dist/v2/types/interrupt.d.ts +1 -22
- package/dist/v2/types/interrupt.d.ts.map +1 -1
- package/dist/v2/types/vue-activity-message-renderer.d.ts +16 -15
- package/dist/v2/types/vue-activity-message-renderer.d.ts.map +1 -1
- package/dist/v2/types/vue-custom-message-renderer.d.ts +7 -16
- package/dist/v2/types/vue-custom-message-renderer.d.ts.map +1 -1
- package/dist/v2/types/vue-tool-call-renderer.d.ts +16 -28
- package/dist/v2/types/vue-tool-call-renderer.d.ts.map +1 -1
- package/package.json +14 -27
- package/src/__tests__/build-entries.test.ts +27 -0
- package/src/components/copilot-provider/CopilotKit.vue +4 -1
- package/src/hooks/__tests__/zod-parameters.test.ts +520 -0
- package/src/hooks/use-copilot-action.ts +2 -1
- package/src/hooks/use-frontend-tool.ts +3 -6
- package/src/hooks/zod-parameters.ts +162 -0
- package/src/v2/__tests__/exports.test.ts +4 -2
- package/src/v2/components/A2UIMessageRenderer.ts +56 -68
- package/src/v2/components/A2UISurfaceActivityRenderer.vue +11 -23
- package/src/v2/components/LicenseWarningBanner.vue +31 -15
- package/src/v2/components/OpenGenerativeUIRenderer.ts +51 -373
- package/src/v2/components/__tests__/A2UIBasicCatalogColors.test.ts +8 -9
- package/src/v2/components/__tests__/A2UICatalogContext.test.ts +1 -1
- package/src/v2/components/__tests__/A2UIMessageRenderer.test.ts +63 -36
- package/src/v2/components/__tests__/LicenseWarningBanner.test.ts +20 -0
- package/src/v2/components/__tests__/OpenGenerativeUIRenderer.test.ts +55 -6
- package/src/v2/components/a2ui/A2UIBuiltInToolCallRenderer.ts +15 -258
- package/src/v2/components/a2ui/A2UICatalogContext.ts +10 -102
- package/src/v2/components/a2ui/A2UIRecoveryStates.ts +444 -0
- package/src/v2/components/a2ui/__tests__/A2UIRecoveryStates.test.ts +175 -0
- package/src/v2/components/a2ui.ts +1 -1
- package/src/v2/components/chat/CopilotChat.vue +26 -40
- package/src/v2/components/chat/CopilotChatAssistantMessage.vue +267 -67
- package/src/v2/components/chat/CopilotChatAssistantToolbarButton.vue +46 -0
- package/src/v2/components/chat/CopilotChatAttachmentQueue.vue +150 -173
- package/src/v2/components/chat/CopilotChatAttachmentRenderer.vue +77 -20
- package/src/v2/components/chat/CopilotChatAudioRecorder.vue +2 -2
- package/src/v2/components/chat/CopilotChatFeedbackCommentPopover.vue +240 -0
- package/src/v2/components/chat/CopilotChatInput.vue +250 -191
- package/src/v2/components/chat/CopilotChatInspectorButton.vue +331 -0
- package/src/v2/components/chat/CopilotChatLightbox.vue +105 -0
- package/src/v2/components/chat/CopilotChatMessageView.vue +262 -87
- package/src/v2/components/chat/CopilotChatReasoningMessage.vue +52 -35
- package/src/v2/components/chat/CopilotChatSuggestionPill.vue +5 -14
- package/src/v2/components/chat/CopilotChatSuggestionView.vue +1 -4
- package/src/v2/components/chat/CopilotChatToggleButton.vue +3 -9
- package/src/v2/components/chat/CopilotChatToggleButtonCloseIcon.ts +1 -1
- package/src/v2/components/chat/CopilotChatToggleButtonOpenIcon.ts +1 -1
- package/src/v2/components/chat/CopilotChatToolCallGroup.vue +353 -0
- package/src/v2/components/chat/CopilotChatToolCallItem.vue +24 -14
- package/src/v2/components/chat/CopilotChatToolCallsView.vue +194 -21
- package/src/v2/components/chat/CopilotChatUserMessage.vue +105 -42
- package/src/v2/components/chat/CopilotChatView.vue +37 -42
- package/src/v2/components/chat/CopilotChatWorkSummary.vue +111 -0
- package/src/v2/components/chat/CopilotModalHeader.vue +10 -8
- package/src/v2/components/chat/CopilotModalHeaderCloseButton.ts +7 -6
- package/src/v2/components/chat/CopilotModalHeaderTitle.ts +1 -4
- package/src/v2/components/chat/CopilotPopup.vue +3 -0
- package/src/v2/components/chat/CopilotPopupView.vue +1 -0
- package/src/v2/components/chat/CopilotPopupViewInternal.vue +9 -19
- package/src/v2/components/chat/CopilotPopupWelcomeScreen.vue +5 -8
- package/src/v2/components/chat/CopilotSidebar.vue +5 -0
- package/src/v2/components/chat/CopilotSidebarView.vue +2 -0
- package/src/v2/components/chat/CopilotSidebarViewInternal.vue +24 -17
- package/src/v2/components/chat/CopilotSidebarWelcomeScreen.vue +7 -10
- package/src/v2/components/chat/StreamingMarkdownDefault.vue +3 -5
- package/src/v2/components/chat/__tests__/CopilotChat.labels.test.ts +19 -4
- package/src/v2/components/chat/__tests__/CopilotChatActivityRendering.e2e.test.ts +26 -9
- package/src/v2/components/chat/__tests__/CopilotChatAssistantMessage.inspector.test.ts +269 -0
- package/src/v2/components/chat/__tests__/CopilotChatAssistantMessage.learningFeedback.test.ts +760 -0
- package/src/v2/components/chat/__tests__/CopilotChatAssistantMessage.slots.e2e.test.ts +3 -5
- package/src/v2/components/chat/__tests__/CopilotChatAssistantMessage.test.ts +2 -2
- package/src/v2/components/chat/__tests__/CopilotChatInput.addMenu.test.ts +328 -0
- package/src/v2/components/chat/__tests__/CopilotChatInput.slots.e2e.test.ts +6 -3
- package/src/v2/components/chat/__tests__/CopilotChatInput.test.ts +55 -14
- package/src/v2/components/chat/__tests__/CopilotChatLightbox.test.ts +160 -0
- package/src/v2/components/chat/__tests__/CopilotChatMessageView.test.ts +247 -403
- package/src/v2/components/chat/__tests__/CopilotChatMessageView.toolCallDisplay.test.ts +637 -0
- package/src/v2/components/chat/__tests__/CopilotChatSuggestionPill.test.ts +1 -1
- package/src/v2/components/chat/__tests__/CopilotChatSuggestionView.slots.e2e.test.ts +3 -1
- package/src/v2/components/chat/__tests__/CopilotChatToolCallsView.learning.test.ts +75 -0
- package/src/v2/components/chat/__tests__/CopilotChatUserMessage.attachments.test.ts +143 -0
- package/src/v2/components/chat/__tests__/CopilotChatView.inputOverlay.test.ts +5 -4
- package/src/v2/components/chat/__tests__/CopilotChatView.rootWidth.test.ts +7 -33
- package/src/v2/components/chat/__tests__/CopilotModalHeader.slots.e2e.test.ts +1 -1
- package/src/v2/components/chat/__tests__/CopilotPopupView.slots.e2e.test.ts +3 -3
- package/src/v2/components/chat/__tests__/CopilotSidebarView.position.test.ts +126 -0
- package/src/v2/components/chat/__tests__/messageFeedbackDefaults.test.ts +33 -0
- package/src/v2/components/chat/__tests__/modalChatDisplayProps.test.ts +44 -0
- package/src/v2/components/chat/copilotChatToolCallItemRender.ts +3 -19
- package/src/v2/components/chat/index.ts +2 -1
- package/src/v2/components/chat/inspector-shortcuts.ts +34 -0
- package/src/v2/components/chat/message-feedback.ts +291 -0
- package/src/v2/components/chat/tool-call-capture.ts +55 -0
- package/src/v2/components/chat/tool-call-display-context.ts +28 -0
- package/src/v2/components/chat/tool-call-group-parts.ts +251 -0
- package/src/v2/components/chat/turn-work.ts +52 -0
- package/src/v2/components/chat/types.ts +114 -4
- package/src/v2/components/chat/use-chat-labels.ts +16 -0
- package/src/v2/components/chat/use-lightbox.ts +64 -0
- package/src/v2/components/icons/__tests__/icons.test.ts +72 -68
- package/src/v2/components/icons/index.ts +109 -23
- package/src/v2/components/ui/CopilotDropdownMenuContent.vue +465 -0
- package/src/v2/components/ui/CopilotPopover.vue +138 -0
- package/src/v2/components/ui/CopilotTooltip.vue +237 -0
- package/src/v2/components/ui/__tests__/CopilotTooltip.test.ts +168 -0
- package/src/v2/components/ui/dropdown-menu.ts +15 -0
- package/src/v2/components/ui/floating.ts +321 -0
- package/src/v2/components/ui/presence.ts +54 -0
- package/src/v2/components/ui/use-id.ts +16 -0
- package/src/v2/hooks/__tests__/use-frontend-tool.e2e.test.ts +62 -1
- package/src/v2/hooks/__tests__/use-render-activity-message.test.ts +105 -0
- package/src/v2/hooks/__tests__/use-render-tool.test.ts +3 -6
- package/src/v2/hooks/__tests__/zod-regression.test.ts +5 -4
- package/src/v2/hooks/use-default-render-tool.ts +123 -62
- package/src/v2/hooks/use-frontend-tool.ts +10 -10
- package/src/v2/hooks/use-render-activity-message.ts +27 -48
- package/src/v2/hooks/use-render-custom-messages.ts +14 -35
- package/src/v2/hooks/use-render-tool.ts +8 -0
- package/src/v2/index.ts +3 -0
- package/src/v2/lib/__tests__/message-feedback.test.ts +152 -0
- package/src/v2/lib/message-feedback.ts +120 -0
- package/src/v2/lib/processPartialHtml.ts +6 -21
- package/src/v2/lib/vue-core.ts +3 -5
- package/src/v2/providers/CopilotChatConfigurationProvider.vue +29 -2
- package/src/v2/providers/CopilotKitProvider.types.ts +57 -5
- package/src/v2/providers/CopilotKitProvider.vue +177 -114
- package/src/v2/providers/__tests__/CopilotChatConfigurationProvider.openThread.test.ts +69 -0
- package/src/v2/providers/__tests__/CopilotKitProvider.a2ui.test.ts +1 -1
- package/src/v2/providers/__tests__/CopilotKitProvider.headersAtSendTime.test.ts +3 -3
- package/src/v2/providers/__tests__/CopilotKitProvider.learning.test.ts +536 -0
- package/src/v2/providers/__tests__/CopilotKitProvider.test.ts +17 -33
- package/src/v2/providers/index.ts +4 -1
- package/src/v2/providers/keys.ts +12 -0
- package/src/v2/providers/types.ts +3 -38
- package/src/v2/styles/CopilotKitStyles.ts +95 -0
- package/src/v2/styles/__tests__/CopilotKitStyles.client.test.ts +149 -0
- package/src/v2/styles/__tests__/CopilotKitStyles.ssr.test.ts +71 -0
- package/src/v2/types/__tests__/defineToolCallRenderer.test.ts +28 -33
- package/src/v2/types/defineToolCallRenderer.ts +9 -4
- package/src/v2/types/human-in-the-loop.ts +8 -32
- package/src/v2/types/interrupt.ts +7 -31
- package/src/v2/types/vue-activity-message-renderer.ts +24 -15
- package/src/v2/types/vue-custom-message-renderer.ts +12 -16
- package/src/v2/types/vue-tool-call-renderer.ts +23 -31
- package/vite.config.ts +5 -5
- package/dist/styles.css +0 -2
- package/dist/v2/components/chat/BasicMarkdown.vue.d.ts +0 -9
- package/dist/v2/components/chat/BasicMarkdown.vue.d.ts.map +0 -1
- package/dist/v2/lib/transcription-client.d.ts +0 -19
- package/dist/v2/lib/transcription-client.d.ts.map +0 -1
- package/scripts/scope-preflight.mjs +0 -100
- package/src/styles/globals.css +0 -233
- package/src/v2/components/chat/BasicMarkdown.vue +0 -158
- package/src/v2/components/chat/__tests__/BasicMarkdown.test.ts +0 -69
- package/src/v2/lib/__tests__/processPartialHtml.test.ts +0 -84
- package/src/v2/lib/__tests__/transcription-client.test.ts +0 -67
- package/src/v2/lib/transcription-client.ts +0 -151
|
@@ -1,49 +1,222 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
-
import { useSlots } from "vue";
|
|
2
|
+
import { computed, defineComponent, h, inject, provide, useSlots } from "vue";
|
|
3
|
+
import type { PropType } from "vue";
|
|
4
|
+
import type { Slots, VNode } from "vue";
|
|
3
5
|
import type { AssistantMessage, Message } from "@ag-ui/core";
|
|
4
|
-
import
|
|
6
|
+
import {
|
|
7
|
+
ɵgetToolCallLayouts,
|
|
8
|
+
ɵgetToolCallRendererNames,
|
|
9
|
+
} from "@copilotkit/core";
|
|
10
|
+
import type {
|
|
11
|
+
CopilotChatToolCallDisplay,
|
|
12
|
+
ToolCallEntry,
|
|
13
|
+
} from "@copilotkit/core";
|
|
14
|
+
import { useCopilotKit } from "../../providers/useCopilotKit";
|
|
15
|
+
import type {
|
|
16
|
+
CopilotChatToolCallGroupAppearance,
|
|
17
|
+
CopilotChatToolCallRenderSlotProps,
|
|
18
|
+
CopilotChatToolCallsGroupSlotProps,
|
|
19
|
+
} from "./types";
|
|
5
20
|
import CopilotChatToolCallItem from "./CopilotChatToolCallItem.vue";
|
|
21
|
+
import CopilotChatToolCallGroup from "./CopilotChatToolCallGroup.vue";
|
|
22
|
+
import { CopilotChatCollapsible } from "./tool-call-group-parts";
|
|
23
|
+
import {
|
|
24
|
+
ToolCallDisplayContextKey,
|
|
25
|
+
ToolCallGroupContextKey,
|
|
26
|
+
} from "./tool-call-display-context";
|
|
27
|
+
import type { ToolCallGroupContextValue } from "./tool-call-display-context";
|
|
6
28
|
|
|
7
|
-
withDefaults(
|
|
29
|
+
const props = withDefaults(
|
|
8
30
|
defineProps<{
|
|
9
31
|
message: AssistantMessage;
|
|
10
32
|
messages?: Message[];
|
|
33
|
+
/**
|
|
34
|
+
* How to show the calls (see `CopilotChatToolCallDisplay`). Inside a
|
|
35
|
+
* message view it follows the view's `toolCallDisplay`; on its own it
|
|
36
|
+
* defaults to `"grouped"`.
|
|
37
|
+
*/
|
|
38
|
+
display?: CopilotChatToolCallDisplay;
|
|
11
39
|
}>(),
|
|
12
40
|
{
|
|
13
41
|
messages: () => [],
|
|
42
|
+
display: undefined,
|
|
14
43
|
},
|
|
15
44
|
);
|
|
16
45
|
|
|
17
46
|
defineSlots<{
|
|
18
47
|
"tool-call"?: (props: CopilotChatToolCallRenderSlotProps) => unknown;
|
|
48
|
+
/** Replaces a group of calls made in a row. */
|
|
49
|
+
"tool-calls-group"?: (props: CopilotChatToolCallsGroupSlotProps) => unknown;
|
|
19
50
|
[key: `tool-call-${string}`]: (
|
|
20
51
|
props: CopilotChatToolCallRenderSlotProps,
|
|
21
52
|
) => unknown;
|
|
22
53
|
}>();
|
|
23
54
|
|
|
24
55
|
type ToolCallSlotName = "tool-call" | `tool-call-${string}`;
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
56
|
+
|
|
57
|
+
const appearances: Partial<
|
|
58
|
+
Record<CopilotChatToolCallDisplay, CopilotChatToolCallGroupAppearance>
|
|
59
|
+
> = {
|
|
60
|
+
grouped: "card",
|
|
61
|
+
line: "line",
|
|
62
|
+
stacked: "stack",
|
|
63
|
+
};
|
|
64
|
+
|
|
65
|
+
const componentSlots = useSlots() as Slots;
|
|
66
|
+
const { copilotkit } = useCopilotKit();
|
|
67
|
+
const context = inject(ToolCallDisplayContextKey, null);
|
|
68
|
+
|
|
69
|
+
/** The slots that draw tool calls, which each call's item renders. */
|
|
70
|
+
function getToolCallSlotNames(): ToolCallSlotName[] {
|
|
71
|
+
return Object.keys(componentSlots).filter(
|
|
72
|
+
(name): name is ToolCallSlotName =>
|
|
73
|
+
name === "tool-call" || name.startsWith("tool-call-"),
|
|
74
|
+
);
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
const display = computed(
|
|
78
|
+
() => props.display ?? context?.value.display ?? "grouped",
|
|
79
|
+
);
|
|
80
|
+
|
|
81
|
+
// Inside a message view, groups can span messages, so the view lays them out
|
|
82
|
+
// for the whole list; on its own, this message's calls are grouped.
|
|
83
|
+
const layout = computed(() => {
|
|
84
|
+
if (display.value === "separate") return undefined;
|
|
85
|
+
const viewLayout = context?.value.layouts.get(props.message.id);
|
|
86
|
+
if (viewLayout) return viewLayout;
|
|
87
|
+
const rendererNames = ɵgetToolCallRendererNames(
|
|
88
|
+
copilotkit.value.renderToolCalls,
|
|
89
|
+
{ slotNames: getToolCallSlotNames() },
|
|
90
|
+
);
|
|
91
|
+
return ɵgetToolCallLayouts(
|
|
92
|
+
[props.message],
|
|
93
|
+
props.messages,
|
|
94
|
+
rendererNames,
|
|
95
|
+
).get(props.message.id);
|
|
96
|
+
});
|
|
97
|
+
|
|
98
|
+
// Whether the agent may still finish a trailing group's calls. Without a
|
|
99
|
+
// message view there's no run state, so a call with no result is assumed to
|
|
100
|
+
// be running, as the built-in card has always shown it.
|
|
101
|
+
const groupActive = (trailing: boolean) =>
|
|
102
|
+
trailing && (context ? context.value.isRunning : true);
|
|
103
|
+
|
|
104
|
+
const appearance = computed(() => appearances[display.value] ?? "card");
|
|
105
|
+
|
|
106
|
+
const workOpen = computed(() => context?.value.workOpen.get(props.message.id));
|
|
107
|
+
|
|
108
|
+
/**
|
|
109
|
+
* `"turn"` display: draws the built-in card's calls as compact rows, the way
|
|
110
|
+
* an open line group does, without a group around them.
|
|
111
|
+
*/
|
|
112
|
+
const TurnRows = defineComponent({
|
|
113
|
+
props: {
|
|
114
|
+
calls: { type: Array as PropType<ToolCallEntry[]>, required: true },
|
|
115
|
+
active: { type: Boolean, required: true },
|
|
116
|
+
},
|
|
117
|
+
setup(rowProps, { slots }) {
|
|
118
|
+
provide(
|
|
119
|
+
ToolCallGroupContextKey,
|
|
120
|
+
computed<ToolCallGroupContextValue>(() => ({
|
|
121
|
+
appearance: "line",
|
|
122
|
+
failedIds: new Set(
|
|
123
|
+
rowProps.calls
|
|
124
|
+
.filter((call) => call.toolMessage?.error)
|
|
125
|
+
.map((call) => call.toolCall.id),
|
|
126
|
+
),
|
|
127
|
+
active: rowProps.active,
|
|
128
|
+
})),
|
|
129
|
+
);
|
|
130
|
+
return () => slots.default?.();
|
|
131
|
+
},
|
|
132
|
+
});
|
|
133
|
+
|
|
134
|
+
/** Draws one call through the registered renderers and tool-call slots. */
|
|
135
|
+
function renderCall(call: ToolCallEntry): VNode {
|
|
136
|
+
const slots: Record<string, Slots[string]> = {};
|
|
137
|
+
for (const name of getToolCallSlotNames()) slots[name] = componentSlots[name];
|
|
138
|
+
return h(
|
|
139
|
+
CopilotChatToolCallItem,
|
|
140
|
+
{
|
|
141
|
+
key: call.toolCall.id,
|
|
142
|
+
toolCall: call.toolCall,
|
|
143
|
+
messages: props.messages,
|
|
144
|
+
},
|
|
145
|
+
slots,
|
|
146
|
+
);
|
|
31
147
|
}
|
|
32
148
|
</script>
|
|
33
149
|
|
|
34
150
|
<template>
|
|
35
|
-
<
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
<template
|
|
42
|
-
v-for="slotName in getForwardedSlotNames()"
|
|
43
|
-
:key="slotName"
|
|
44
|
-
#[slotName]="slotProps"
|
|
151
|
+
<template v-if="!layout">
|
|
152
|
+
<CopilotChatToolCallItem
|
|
153
|
+
v-for="toolCall in message.toolCalls ?? []"
|
|
154
|
+
:key="toolCall.id"
|
|
155
|
+
:tool-call="toolCall"
|
|
156
|
+
:messages="messages"
|
|
45
157
|
>
|
|
46
|
-
<
|
|
158
|
+
<template
|
|
159
|
+
v-for="slotName in getToolCallSlotNames()"
|
|
160
|
+
:key="slotName"
|
|
161
|
+
#[slotName]="slotProps"
|
|
162
|
+
>
|
|
163
|
+
<slot :name="slotName" v-bind="slotProps ?? {}" />
|
|
164
|
+
</template>
|
|
165
|
+
</CopilotChatToolCallItem>
|
|
166
|
+
</template>
|
|
167
|
+
<template v-else>
|
|
168
|
+
<template v-for="segment in layout.segments" :key="segment.id">
|
|
169
|
+
<CopilotChatToolCallItem
|
|
170
|
+
v-if="segment.kind === 'call'"
|
|
171
|
+
:tool-call="segment.call.toolCall"
|
|
172
|
+
:messages="messages"
|
|
173
|
+
>
|
|
174
|
+
<template
|
|
175
|
+
v-for="slotName in getToolCallSlotNames()"
|
|
176
|
+
:key="slotName"
|
|
177
|
+
#[slotName]="slotProps"
|
|
178
|
+
>
|
|
179
|
+
<slot :name="slotName" v-bind="slotProps ?? {}" />
|
|
180
|
+
</template>
|
|
181
|
+
</CopilotChatToolCallItem>
|
|
182
|
+
<!-- A row per call, in the open while the agent works; the message view
|
|
183
|
+
folds them away with the rest of the work once it's done. -->
|
|
184
|
+
<CopilotChatCollapsible
|
|
185
|
+
v-else-if="display === 'turn'"
|
|
186
|
+
:open="workOpen ?? true"
|
|
187
|
+
class="cpk-tool-calls-view-turn"
|
|
188
|
+
>
|
|
189
|
+
<div class="cpk-tool-calls-view-turn-rows">
|
|
190
|
+
<TurnRows
|
|
191
|
+
:calls="segment.calls"
|
|
192
|
+
:active="groupActive(segment.trailing)"
|
|
193
|
+
>
|
|
194
|
+
<component
|
|
195
|
+
:is="renderCall(call)"
|
|
196
|
+
v-for="call in segment.calls"
|
|
197
|
+
:key="call.toolCall.id"
|
|
198
|
+
/>
|
|
199
|
+
</TurnRows>
|
|
200
|
+
</div>
|
|
201
|
+
</CopilotChatCollapsible>
|
|
202
|
+
<slot
|
|
203
|
+
v-else
|
|
204
|
+
name="tool-calls-group"
|
|
205
|
+
:calls="segment.calls"
|
|
206
|
+
:appearance="appearance"
|
|
207
|
+
:is-active="groupActive(segment.trailing)"
|
|
208
|
+
:render-call="renderCall"
|
|
209
|
+
>
|
|
210
|
+
<CopilotChatToolCallGroup
|
|
211
|
+
:calls="segment.calls"
|
|
212
|
+
:appearance="appearance"
|
|
213
|
+
:is-active="groupActive(segment.trailing)"
|
|
214
|
+
>
|
|
215
|
+
<template #call="{ call }">
|
|
216
|
+
<component :is="renderCall(call)" />
|
|
217
|
+
</template>
|
|
218
|
+
</CopilotChatToolCallGroup>
|
|
219
|
+
</slot>
|
|
47
220
|
</template>
|
|
48
|
-
</
|
|
221
|
+
</template>
|
|
49
222
|
</template>
|
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
2
|
import { computed, onBeforeUnmount, ref } from "vue";
|
|
3
3
|
import type { UserMessage } from "@ag-ui/core";
|
|
4
|
+
import type {
|
|
5
|
+
AudioInputPart,
|
|
6
|
+
DocumentInputPart,
|
|
7
|
+
ImageInputPart,
|
|
8
|
+
VideoInputPart,
|
|
9
|
+
} from "@copilotkit/shared";
|
|
4
10
|
import { useCopilotChatConfiguration } from "../../providers/useCopilotChatConfiguration";
|
|
5
11
|
import { CopilotChatDefaultLabels } from "../../providers/types";
|
|
6
12
|
import {
|
|
@@ -10,6 +16,8 @@ import {
|
|
|
10
16
|
IconCopy,
|
|
11
17
|
IconEdit,
|
|
12
18
|
} from "../icons";
|
|
19
|
+
import CopilotTooltip from "../ui/CopilotTooltip.vue";
|
|
20
|
+
import CopilotChatAttachmentRenderer from "./CopilotChatAttachmentRenderer.vue";
|
|
13
21
|
import type {
|
|
14
22
|
CopilotChatUserMessageBranchNavigationSlotProps,
|
|
15
23
|
CopilotChatUserMessageCopyButtonSlotProps,
|
|
@@ -61,12 +69,9 @@ const labels = computed(() => config.value?.labels ?? CopilotChatDefaultLabels);
|
|
|
61
69
|
const copied = ref(false);
|
|
62
70
|
let copiedResetTimeout: ReturnType<typeof setTimeout> | null = null;
|
|
63
71
|
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
"cpk
|
|
67
|
-
"cpk:hover:text-[rgb(93,93,93)] cpk:dark:text-[rgb(243,243,243)] cpk:dark:hover:bg-[#303030]",
|
|
68
|
-
"cpk:dark:hover:text-[rgb(243,243,243)] cpk:disabled:pointer-events-none cpk:disabled:opacity-50",
|
|
69
|
-
].join(" ");
|
|
72
|
+
// Styles live in @copilotkit/core (ui/button.css, user-message.css).
|
|
73
|
+
const toolbarButtonClass =
|
|
74
|
+
"cpk-button cpk-button-assistant-message-toolbar cpk-button-size-default";
|
|
70
75
|
|
|
71
76
|
function flattenUserMessageContent(content?: UserMessage["content"]): string {
|
|
72
77
|
if (!content) {
|
|
@@ -94,6 +99,38 @@ function flattenUserMessageContent(content?: UserMessage["content"]): string {
|
|
|
94
99
|
.join("\n");
|
|
95
100
|
}
|
|
96
101
|
|
|
102
|
+
type MediaPart =
|
|
103
|
+
| ImageInputPart
|
|
104
|
+
| AudioInputPart
|
|
105
|
+
| VideoInputPart
|
|
106
|
+
| DocumentInputPart;
|
|
107
|
+
|
|
108
|
+
function getMediaParts(content: UserMessage["content"]): MediaPart[] {
|
|
109
|
+
if (!content || typeof content === "string") return [];
|
|
110
|
+
return content.filter(
|
|
111
|
+
(part): part is MediaPart =>
|
|
112
|
+
part.type === "image" ||
|
|
113
|
+
part.type === "audio" ||
|
|
114
|
+
part.type === "video" ||
|
|
115
|
+
part.type === "document",
|
|
116
|
+
);
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
function getFilename(part: MediaPart): string | undefined {
|
|
120
|
+
const meta = part.metadata;
|
|
121
|
+
if (
|
|
122
|
+
meta != null &&
|
|
123
|
+
typeof meta === "object" &&
|
|
124
|
+
"filename" in meta &&
|
|
125
|
+
typeof meta.filename === "string"
|
|
126
|
+
) {
|
|
127
|
+
return meta.filename;
|
|
128
|
+
}
|
|
129
|
+
return undefined;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
const mediaParts = computed(() => getMediaParts(props.message.content));
|
|
133
|
+
|
|
97
134
|
const flattenedContent = computed(() =>
|
|
98
135
|
flattenUserMessageContent(props.message.content),
|
|
99
136
|
);
|
|
@@ -204,21 +241,31 @@ onBeforeUnmount(() => {
|
|
|
204
241
|
<div
|
|
205
242
|
data-copilotkit
|
|
206
243
|
data-testid="copilot-user-message"
|
|
207
|
-
class="
|
|
244
|
+
class="copilotKitMessage copilotKitUserMessage cpk-user-message"
|
|
208
245
|
:data-message-id="message.id"
|
|
209
246
|
v-bind="$attrs"
|
|
210
247
|
>
|
|
248
|
+
<div
|
|
249
|
+
v-if="mediaParts.length > 0"
|
|
250
|
+
class="cpk-user-message-attachments"
|
|
251
|
+
data-testid="copilot-user-message-attachments"
|
|
252
|
+
>
|
|
253
|
+
<CopilotChatAttachmentRenderer
|
|
254
|
+
v-for="(part, index) in mediaParts"
|
|
255
|
+
:key="index"
|
|
256
|
+
:type="part.type"
|
|
257
|
+
:source="part.source"
|
|
258
|
+
:filename="getFilename(part)"
|
|
259
|
+
/>
|
|
260
|
+
</div>
|
|
261
|
+
|
|
211
262
|
<slot
|
|
212
263
|
name="message-renderer"
|
|
213
264
|
:message="message"
|
|
214
265
|
:content="flattenedContent"
|
|
215
266
|
:is-multiline="isMultiline"
|
|
216
267
|
>
|
|
217
|
-
<div
|
|
218
|
-
class="cpk:prose cpk:dark:prose-invert cpk:bg-muted cpk:relative cpk:max-w-[80%] cpk:rounded-[18px] cpk:px-4 cpk:py-1.5 cpk:inline-block cpk:whitespace-pre-wrap"
|
|
219
|
-
:data-multiline="isMultiline ? 'true' : undefined"
|
|
220
|
-
:class="{ 'cpk:py-3': isMultiline }"
|
|
221
|
-
>
|
|
268
|
+
<div class="cpk-user-message-bubble">
|
|
222
269
|
{{ flattenedContent }}
|
|
223
270
|
</div>
|
|
224
271
|
</slot>
|
|
@@ -230,9 +277,10 @@ onBeforeUnmount(() => {
|
|
|
230
277
|
:has-edit-action="hasEditAction"
|
|
231
278
|
>
|
|
232
279
|
<div
|
|
233
|
-
|
|
280
|
+
data-testid="copilot-user-toolbar"
|
|
281
|
+
class="cpk-user-message-toolbar"
|
|
234
282
|
>
|
|
235
|
-
<div class="cpk
|
|
283
|
+
<div class="cpk-user-message-toolbar-items">
|
|
236
284
|
<slot name="toolbar-items" />
|
|
237
285
|
|
|
238
286
|
<slot
|
|
@@ -241,17 +289,26 @@ onBeforeUnmount(() => {
|
|
|
241
289
|
:copied="copied"
|
|
242
290
|
:label="labels.userMessageToolbarCopyMessageLabel"
|
|
243
291
|
>
|
|
244
|
-
<
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
:aria-label="labels.userMessageToolbarCopyMessageLabel"
|
|
249
|
-
:title="labels.userMessageToolbarCopyMessageLabel"
|
|
250
|
-
@click="handleCopyMessage"
|
|
292
|
+
<CopilotTooltip
|
|
293
|
+
v-slot="{ triggerProps }"
|
|
294
|
+
:content="labels.userMessageToolbarCopyMessageLabel"
|
|
295
|
+
side="bottom"
|
|
251
296
|
>
|
|
252
|
-
<
|
|
253
|
-
|
|
254
|
-
|
|
297
|
+
<button
|
|
298
|
+
data-testid="copilot-user-copy-button"
|
|
299
|
+
type="button"
|
|
300
|
+
:class="toolbarButtonClass"
|
|
301
|
+
:aria-label="labels.userMessageToolbarCopyMessageLabel"
|
|
302
|
+
v-bind="triggerProps"
|
|
303
|
+
@click="handleCopyMessage"
|
|
304
|
+
>
|
|
305
|
+
<IconCheck
|
|
306
|
+
v-if="copied"
|
|
307
|
+
class="cpk-user-message-toolbar-icon"
|
|
308
|
+
/>
|
|
309
|
+
<IconCopy v-else class="cpk-user-message-toolbar-icon" />
|
|
310
|
+
</button>
|
|
311
|
+
</CopilotTooltip>
|
|
255
312
|
</slot>
|
|
256
313
|
|
|
257
314
|
<slot
|
|
@@ -260,15 +317,22 @@ onBeforeUnmount(() => {
|
|
|
260
317
|
:on-edit="handleEditMessage"
|
|
261
318
|
:label="labels.userMessageToolbarEditMessageLabel"
|
|
262
319
|
>
|
|
263
|
-
<
|
|
264
|
-
|
|
265
|
-
:
|
|
266
|
-
|
|
267
|
-
:title="labels.userMessageToolbarEditMessageLabel"
|
|
268
|
-
@click="handleEditMessage"
|
|
320
|
+
<CopilotTooltip
|
|
321
|
+
v-slot="{ triggerProps }"
|
|
322
|
+
:content="labels.userMessageToolbarEditMessageLabel"
|
|
323
|
+
side="bottom"
|
|
269
324
|
>
|
|
270
|
-
<
|
|
271
|
-
|
|
325
|
+
<button
|
|
326
|
+
data-testid="copilot-edit-button"
|
|
327
|
+
type="button"
|
|
328
|
+
:class="toolbarButtonClass"
|
|
329
|
+
:aria-label="labels.userMessageToolbarEditMessageLabel"
|
|
330
|
+
v-bind="triggerProps"
|
|
331
|
+
@click="handleEditMessage"
|
|
332
|
+
>
|
|
333
|
+
<IconEdit class="cpk-user-message-toolbar-icon" />
|
|
334
|
+
</button>
|
|
335
|
+
</CopilotTooltip>
|
|
272
336
|
</slot>
|
|
273
337
|
|
|
274
338
|
<slot
|
|
@@ -284,33 +348,32 @@ onBeforeUnmount(() => {
|
|
|
284
348
|
:go-prev="goPrev"
|
|
285
349
|
:go-next="goNext"
|
|
286
350
|
>
|
|
287
|
-
<div
|
|
351
|
+
<div
|
|
352
|
+
data-testid="copilot-branch-navigation"
|
|
353
|
+
class="cpk-user-message-branch-navigation"
|
|
354
|
+
>
|
|
288
355
|
<button
|
|
289
356
|
type="button"
|
|
290
357
|
:class="toolbarButtonClass"
|
|
291
|
-
class="cpk
|
|
358
|
+
class="cpk-user-message-branch-button"
|
|
292
359
|
:disabled="!canGoPrev"
|
|
293
360
|
:aria-label="labels.userMessageToolbarPreviousBranchLabel"
|
|
294
|
-
:title="labels.userMessageToolbarPreviousBranchLabel"
|
|
295
361
|
@click="goPrev"
|
|
296
362
|
>
|
|
297
|
-
<IconChevronLeft class="cpk
|
|
363
|
+
<IconChevronLeft class="cpk-user-message-branch-icon" />
|
|
298
364
|
</button>
|
|
299
|
-
<span
|
|
300
|
-
class="cpk:text-sm cpk:text-muted-foreground cpk:px-0 cpk:font-medium"
|
|
301
|
-
>
|
|
365
|
+
<span class="cpk-user-message-branch-counter">
|
|
302
366
|
{{ branchIndex + 1 }}/{{ numberOfBranches }}
|
|
303
367
|
</span>
|
|
304
368
|
<button
|
|
305
369
|
type="button"
|
|
306
370
|
:class="toolbarButtonClass"
|
|
307
|
-
class="cpk
|
|
371
|
+
class="cpk-user-message-branch-button"
|
|
308
372
|
:disabled="!canGoNext"
|
|
309
373
|
:aria-label="labels.userMessageToolbarNextBranchLabel"
|
|
310
|
-
:title="labels.userMessageToolbarNextBranchLabel"
|
|
311
374
|
@click="goNext"
|
|
312
375
|
>
|
|
313
|
-
<IconChevronRight class="cpk
|
|
376
|
+
<IconChevronRight class="cpk-user-message-branch-icon" />
|
|
314
377
|
</button>
|
|
315
378
|
</div>
|
|
316
379
|
</slot>
|