@copilotkit/vue 2.0.0-rc.0 → 2.0.0-rc.2
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/index.cjs +43 -46
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +10170 -7506
- package/dist/index.mjs.map +1 -1
- 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/a2ui/A2UIBuiltInToolCallRenderer.d.ts +11 -2
- package/dist/v2/components/a2ui/A2UIBuiltInToolCallRenderer.d.ts.map +1 -1
- package/dist/v2/components/a2ui/A2UIRecoveryStates.d.ts +136 -0
- package/dist/v2/components/a2ui/A2UIRecoveryStates.d.ts.map +1 -0
- package/dist/v2/components/chat/BasicMarkdown.vue.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 +69 -16
- 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/index.d.ts +17 -0
- 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 +39 -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 +144 -0
- package/dist/v2/components/chat/tool-call-group-parts.d.ts.map +1 -0
- package/dist/v2/components/chat/tool-call-layout.d.ts +115 -0
- package/dist/v2/components/chat/tool-call-layout.d.ts.map +1 -0
- package/dist/v2/components/chat/turn-work.d.ts +35 -0
- package/dist/v2/components/chat/turn-work.d.ts.map +1 -0
- package/dist/v2/components/chat/types.d.ts +104 -4
- package/dist/v2/components/chat/types.d.ts.map +1 -1
- 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 +1 -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-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 +165 -162
- package/dist/v2/lib/message-feedback.d.ts +33 -0
- package/dist/v2/lib/message-feedback.d.ts.map +1 -0
- package/dist/v2/providers/CopilotChatConfigurationProvider.vue.d.ts.map +1 -1
- package/dist/v2/providers/CopilotKitProvider.types.d.ts +56 -1
- package/dist/v2/providers/CopilotKitProvider.types.d.ts.map +1 -1
- package/dist/v2/providers/CopilotKitProvider.vue.d.ts +5 -1
- 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 +9 -0
- 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/vue-tool-call-renderer.d.ts +7 -0
- package/dist/v2/types/vue-tool-call-renderer.d.ts.map +1 -1
- package/package.json +11 -23
- package/src/components/copilot-provider/CopilotKit.vue +4 -1
- package/src/v2/__tests__/exports.test.ts +4 -2
- package/src/v2/components/A2UIMessageRenderer.ts +55 -67
- package/src/v2/components/A2UISurfaceActivityRenderer.vue +11 -23
- package/src/v2/components/__tests__/A2UIBasicCatalogColors.test.ts +8 -9
- package/src/v2/components/__tests__/A2UIMessageRenderer.test.ts +63 -36
- package/src/v2/components/a2ui/A2UIBuiltInToolCallRenderer.ts +14 -257
- package/src/v2/components/a2ui/A2UIRecoveryStates.ts +444 -0
- package/src/v2/components/a2ui/__tests__/A2UIRecoveryStates.test.ts +175 -0
- package/src/v2/components/chat/BasicMarkdown.vue +8 -6
- package/src/v2/components/chat/CopilotChat.vue +7 -0
- 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 +141 -168
- package/src/v2/components/chat/CopilotChatAttachmentRenderer.vue +67 -18
- 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 +210 -161
- 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 +261 -18
- package/src/v2/components/chat/CopilotChatReasoningMessage.vue +21 -22
- 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 +330 -0
- package/src/v2/components/chat/CopilotChatToolCallItem.vue +21 -11
- package/src/v2/components/chat/CopilotChatToolCallsView.vue +192 -21
- package/src/v2/components/chat/CopilotChatUserMessage.vue +105 -42
- package/src/v2/components/chat/CopilotChatView.vue +33 -38
- package/src/v2/components/chat/CopilotChatWorkSummary.vue +85 -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__/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 +22 -13
- package/src/v2/components/chat/__tests__/CopilotChatLightbox.test.ts +160 -0
- package/src/v2/components/chat/__tests__/CopilotChatMessageView.toolCallDisplay.test.ts +735 -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/index.ts +2 -0
- 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 +49 -0
- package/src/v2/components/chat/tool-call-group-parts.ts +292 -0
- package/src/v2/components/chat/tool-call-layout.ts +304 -0
- package/src/v2/components/chat/turn-work.ts +61 -0
- package/src/v2/components/chat/types.ts +113 -3
- package/src/v2/components/chat/use-lightbox.ts +64 -0
- package/src/v2/components/icons/index.ts +4 -0
- 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/use-default-render-tool.ts +123 -62
- 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/providers/CopilotChatConfigurationProvider.vue +29 -2
- package/src/v2/providers/CopilotKitProvider.types.ts +57 -0
- package/src/v2/providers/CopilotKitProvider.vue +125 -3
- package/src/v2/providers/__tests__/CopilotChatConfigurationProvider.openThread.test.ts +69 -0
- package/src/v2/providers/__tests__/CopilotKitProvider.learning.test.ts +534 -0
- package/src/v2/providers/index.ts +4 -1
- package/src/v2/providers/keys.ts +12 -0
- package/src/v2/providers/types.ts +11 -0
- 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/defineToolCallRenderer.ts +4 -0
- package/src/v2/types/vue-tool-call-renderer.ts +7 -0
- package/vite.config.ts +2 -1
- package/dist/styles.css +0 -2
- package/scripts/scope-preflight.mjs +0 -100
- package/src/styles/globals.css +0 -233
|
@@ -7,6 +7,8 @@ import {
|
|
|
7
7
|
} from "@copilotkit/shared";
|
|
8
8
|
import type { Attachment } from "@copilotkit/shared";
|
|
9
9
|
import type { CopilotChatAttachmentQueueProps } from "./types";
|
|
10
|
+
import { IconPlay } from "../icons";
|
|
11
|
+
import CopilotChatLightbox from "./CopilotChatLightbox.vue";
|
|
10
12
|
import { useCopilotChatConfiguration } from "../../providers/useCopilotChatConfiguration";
|
|
11
13
|
import { CopilotChatDefaultLabels } from "../../providers/types";
|
|
12
14
|
|
|
@@ -25,7 +27,16 @@ const labels = computed(() => config.value?.labels ?? CopilotChatDefaultLabels);
|
|
|
25
27
|
const activeLightboxAttachment = ref<Attachment | null>(null);
|
|
26
28
|
const documentBlobUrl = ref<string | null>(null);
|
|
27
29
|
|
|
28
|
-
const
|
|
30
|
+
const lightboxLabel = computed(() => {
|
|
31
|
+
const attachment = activeLightboxAttachment.value;
|
|
32
|
+
if (!attachment) return undefined;
|
|
33
|
+
if (attachment.filename) return attachment.filename;
|
|
34
|
+
return attachment.type === "image"
|
|
35
|
+
? "Image attachment"
|
|
36
|
+
: attachment.type === "video"
|
|
37
|
+
? "Video attachment"
|
|
38
|
+
: "Document";
|
|
39
|
+
});
|
|
29
40
|
const isPreviewableDocument = computed(() => {
|
|
30
41
|
const attachment = activeLightboxAttachment.value;
|
|
31
42
|
if (!attachment || attachment.type !== "document") return false;
|
|
@@ -78,20 +89,6 @@ watch(
|
|
|
78
89
|
{ immediate: true },
|
|
79
90
|
);
|
|
80
91
|
|
|
81
|
-
watch(isLightboxOpen, (open, _previous, onCleanup) => {
|
|
82
|
-
if (!open || typeof document === "undefined") return;
|
|
83
|
-
|
|
84
|
-
const handleKeydown = (event: KeyboardEvent) => {
|
|
85
|
-
if (event.key === "Escape") {
|
|
86
|
-
closeLightbox();
|
|
87
|
-
}
|
|
88
|
-
};
|
|
89
|
-
document.addEventListener("keydown", handleKeydown);
|
|
90
|
-
onCleanup(() => {
|
|
91
|
-
document.removeEventListener("keydown", handleKeydown);
|
|
92
|
-
});
|
|
93
|
-
});
|
|
94
|
-
|
|
95
92
|
onBeforeUnmount(() => {
|
|
96
93
|
if (documentBlobUrl.value) {
|
|
97
94
|
URL.revokeObjectURL(documentBlobUrl.value);
|
|
@@ -120,12 +117,12 @@ function closeLightbox() {
|
|
|
120
117
|
|
|
121
118
|
function cardClassName(attachment: Attachment) {
|
|
122
119
|
if (attachment.type === "image" || attachment.type === "video") {
|
|
123
|
-
return "cpk
|
|
120
|
+
return "cpk-attachment-queue-item-media";
|
|
124
121
|
}
|
|
125
122
|
if (attachment.type === "audio") {
|
|
126
|
-
return "cpk
|
|
123
|
+
return "cpk-attachment-queue-item-audio";
|
|
127
124
|
}
|
|
128
|
-
return "cpk
|
|
125
|
+
return "cpk-attachment-queue-item-document";
|
|
129
126
|
}
|
|
130
127
|
|
|
131
128
|
function isPdf(mimeType: string | undefined): boolean {
|
|
@@ -160,92 +157,87 @@ function createBlobUrl(
|
|
|
160
157
|
<template>
|
|
161
158
|
<div
|
|
162
159
|
v-if="props.attachments.length > 0"
|
|
163
|
-
class="cpk
|
|
160
|
+
class="cpk-attachment-queue"
|
|
164
161
|
:class="props.className"
|
|
165
162
|
data-testid="copilot-chat-attachment-queue"
|
|
166
163
|
>
|
|
167
164
|
<div
|
|
168
165
|
v-for="attachment in props.attachments"
|
|
169
166
|
:key="attachment.id"
|
|
170
|
-
class="cpk
|
|
167
|
+
class="cpk-attachment-queue-item"
|
|
171
168
|
:class="cardClassName(attachment)"
|
|
172
169
|
data-testid="copilot-chat-attachment-item"
|
|
173
170
|
:data-card-type="attachment.type"
|
|
174
171
|
>
|
|
175
172
|
<div
|
|
176
173
|
v-if="attachment.status === 'uploading'"
|
|
177
|
-
class="cpk
|
|
174
|
+
class="cpk-attachment-queue-uploading-overlay"
|
|
178
175
|
data-testid="copilot-chat-attachment-uploading-overlay"
|
|
179
176
|
>
|
|
180
|
-
<div
|
|
181
|
-
class="cpk:w-5 cpk:h-5 cpk:border-2 cpk:border-white cpk:border-t-transparent cpk:rounded-full cpk:animate-spin"
|
|
182
|
-
/>
|
|
177
|
+
<div class="cpk-attachment-queue-uploading-spinner" />
|
|
183
178
|
</div>
|
|
184
179
|
|
|
185
180
|
<template v-if="attachment.status === 'ready'">
|
|
186
181
|
<button
|
|
187
182
|
v-if="attachment.type === 'image'"
|
|
188
183
|
type="button"
|
|
189
|
-
class="cpk
|
|
184
|
+
class="cpk-attachment-queue-preview-button"
|
|
190
185
|
data-testid="copilot-chat-attachment-image-button"
|
|
191
186
|
@click="openLightbox(attachment)"
|
|
192
187
|
>
|
|
193
188
|
<img
|
|
194
189
|
:src="getSourceUrl(attachment.source)"
|
|
195
190
|
:alt="attachment.filename || 'Image attachment'"
|
|
196
|
-
class="cpk
|
|
191
|
+
class="cpk-attachment-queue-image"
|
|
197
192
|
data-testid="copilot-chat-attachment-image-thumbnail"
|
|
198
193
|
/>
|
|
199
194
|
</button>
|
|
200
195
|
|
|
201
|
-
<
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
/>
|
|
196
|
+
<template v-else-if="attachment.type === 'video'">
|
|
197
|
+
<div class="cpk-attachment-queue-video">
|
|
198
|
+
<img
|
|
199
|
+
v-if="attachment.thumbnail"
|
|
200
|
+
:src="attachment.thumbnail"
|
|
201
|
+
:alt="attachment.filename || 'Video thumbnail'"
|
|
202
|
+
class="cpk-attachment-queue-video-thumbnail"
|
|
203
|
+
data-testid="copilot-chat-attachment-video-thumbnail"
|
|
204
|
+
/>
|
|
205
|
+
<video
|
|
206
|
+
v-else
|
|
207
|
+
:src="getSourceUrl(attachment.source)"
|
|
208
|
+
preload="metadata"
|
|
209
|
+
muted
|
|
210
|
+
class="cpk-attachment-queue-video-thumbnail"
|
|
211
|
+
data-testid="copilot-chat-attachment-video-fallback"
|
|
212
|
+
/>
|
|
213
|
+
</div>
|
|
220
214
|
<button
|
|
221
215
|
type="button"
|
|
222
|
-
class="cpk
|
|
216
|
+
class="cpk-attachment-queue-video-play-button"
|
|
223
217
|
:aria-label="labels.attachmentPlayVideoButtonLabel"
|
|
224
218
|
data-testid="copilot-chat-attachment-video-play"
|
|
225
219
|
@click="openLightbox(attachment)"
|
|
226
220
|
>
|
|
227
|
-
<div
|
|
228
|
-
class="cpk
|
|
229
|
-
>
|
|
230
|
-
▶
|
|
221
|
+
<div class="cpk-attachment-queue-video-play-badge">
|
|
222
|
+
<IconPlay class="cpk-attachment-queue-video-play-icon" />
|
|
231
223
|
</div>
|
|
232
224
|
</button>
|
|
233
|
-
</
|
|
225
|
+
</template>
|
|
234
226
|
|
|
235
227
|
<div
|
|
236
228
|
v-else-if="attachment.type === 'audio'"
|
|
237
|
-
class="cpk
|
|
229
|
+
class="cpk-attachment-queue-audio"
|
|
238
230
|
>
|
|
239
231
|
<audio
|
|
240
232
|
:src="getSourceUrl(attachment.source)"
|
|
241
233
|
controls
|
|
242
234
|
preload="metadata"
|
|
243
|
-
class="cpk
|
|
235
|
+
class="cpk-attachment-queue-audio-player"
|
|
244
236
|
data-testid="copilot-chat-attachment-audio-player"
|
|
245
237
|
/>
|
|
246
238
|
<span
|
|
247
239
|
v-if="attachment.filename"
|
|
248
|
-
class="cpk
|
|
240
|
+
class="cpk-attachment-queue-audio-filename"
|
|
249
241
|
>
|
|
250
242
|
{{ attachment.filename }}
|
|
251
243
|
</span>
|
|
@@ -254,13 +246,12 @@ function createBlobUrl(
|
|
|
254
246
|
<button
|
|
255
247
|
v-else
|
|
256
248
|
type="button"
|
|
257
|
-
class="cpk
|
|
258
|
-
:class="
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
"
|
|
249
|
+
class="cpk-attachment-queue-preview-button cpk-attachment-queue-document"
|
|
250
|
+
:class="{
|
|
251
|
+
'cpk-attachment-queue-document-previewable':
|
|
252
|
+
isPdf(attachment.source.mimeType) ||
|
|
253
|
+
isText(attachment.source.mimeType),
|
|
254
|
+
}"
|
|
264
255
|
data-testid="copilot-chat-attachment-document-button"
|
|
265
256
|
@click="
|
|
266
257
|
(isPdf(attachment.source.mimeType) ||
|
|
@@ -268,21 +259,19 @@ function createBlobUrl(
|
|
|
268
259
|
openLightbox(attachment)
|
|
269
260
|
"
|
|
270
261
|
>
|
|
271
|
-
<div
|
|
272
|
-
class="cpk:w-8 cpk:h-8 cpk:rounded-md cpk:bg-primary cpk:text-primary-foreground cpk:flex cpk:items-center cpk:justify-center cpk:text-[10px] cpk:font-semibold cpk:shrink-0"
|
|
273
|
-
>
|
|
262
|
+
<div class="cpk-attachment-queue-document-icon">
|
|
274
263
|
{{ getDocumentIcon(attachment.source.mimeType ?? "") }}
|
|
275
264
|
</div>
|
|
276
|
-
<div class="cpk
|
|
265
|
+
<div class="cpk-attachment-queue-document-info">
|
|
277
266
|
<span
|
|
278
|
-
class="cpk
|
|
267
|
+
class="cpk-attachment-queue-document-name"
|
|
279
268
|
data-testid="copilot-chat-attachment-document-filename"
|
|
280
269
|
>
|
|
281
270
|
{{ attachment.filename || "Document" }}
|
|
282
271
|
</span>
|
|
283
272
|
<span
|
|
284
273
|
v-if="attachment.size != null"
|
|
285
|
-
class="cpk
|
|
274
|
+
class="cpk-attachment-queue-document-size"
|
|
286
275
|
>
|
|
287
276
|
{{ formatFileSize(attachment.size) }}
|
|
288
277
|
</span>
|
|
@@ -292,13 +281,13 @@ function createBlobUrl(
|
|
|
292
281
|
|
|
293
282
|
<div
|
|
294
283
|
v-else
|
|
295
|
-
class="cpk
|
|
284
|
+
class="cpk-attachment-queue-placeholder"
|
|
296
285
|
data-testid="copilot-chat-attachment-placeholder"
|
|
297
286
|
/>
|
|
298
287
|
|
|
299
288
|
<button
|
|
300
289
|
type="button"
|
|
301
|
-
class="cpk
|
|
290
|
+
class="cpk-attachment-queue-remove-button"
|
|
302
291
|
:aria-label="labels.attachmentRemoveButtonLabel"
|
|
303
292
|
@click="emit('remove-attachment', attachment.id)"
|
|
304
293
|
>
|
|
@@ -307,110 +296,94 @@ function createBlobUrl(
|
|
|
307
296
|
</div>
|
|
308
297
|
</div>
|
|
309
298
|
|
|
310
|
-
<
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
>
|
|
323
|
-
✕
|
|
324
|
-
</button>
|
|
299
|
+
<CopilotChatLightbox
|
|
300
|
+
v-if="activeLightboxAttachment"
|
|
301
|
+
:label="lightboxLabel"
|
|
302
|
+
@close="closeLightbox"
|
|
303
|
+
>
|
|
304
|
+
<img
|
|
305
|
+
v-if="activeLightboxAttachment.type === 'image'"
|
|
306
|
+
:src="getSourceUrl(activeLightboxAttachment.source)"
|
|
307
|
+
:alt="activeLightboxAttachment.filename || 'Image attachment'"
|
|
308
|
+
class="cpk-attachment-queue-lightbox-image"
|
|
309
|
+
data-testid="copilot-chat-attachment-lightbox-image"
|
|
310
|
+
/>
|
|
325
311
|
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
312
|
+
<video
|
|
313
|
+
v-else-if="activeLightboxAttachment.type === 'video'"
|
|
314
|
+
:src="getSourceUrl(activeLightboxAttachment.source)"
|
|
315
|
+
controls
|
|
316
|
+
autoplay
|
|
317
|
+
class="cpk-attachment-queue-lightbox-video"
|
|
318
|
+
data-testid="copilot-chat-attachment-lightbox-video"
|
|
319
|
+
/>
|
|
334
320
|
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
321
|
+
<template v-else-if="activeLightboxAttachment.type === 'document'">
|
|
322
|
+
<iframe
|
|
323
|
+
v-if="
|
|
324
|
+
isPreviewableDocument &&
|
|
325
|
+
isPdf(activeLightboxAttachment.source.mimeType) &&
|
|
326
|
+
lightboxDocumentSource
|
|
327
|
+
"
|
|
328
|
+
:src="lightboxDocumentSource"
|
|
329
|
+
:title="activeLightboxAttachment.filename || 'PDF preview'"
|
|
330
|
+
class="cpk-attachment-queue-pdf-preview"
|
|
331
|
+
data-testid="copilot-chat-attachment-lightbox-document-iframe"
|
|
332
|
+
/>
|
|
343
333
|
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
334
|
+
<div
|
|
335
|
+
v-else-if="
|
|
336
|
+
isPreviewableDocument &&
|
|
337
|
+
isText(activeLightboxAttachment.source.mimeType)
|
|
338
|
+
"
|
|
339
|
+
class="cpk-attachment-queue-text-preview"
|
|
340
|
+
>
|
|
341
|
+
<div
|
|
342
|
+
v-if="activeLightboxAttachment.filename"
|
|
343
|
+
class="cpk-attachment-queue-text-preview-filename"
|
|
344
|
+
>
|
|
345
|
+
{{ activeLightboxAttachment.filename }}
|
|
346
|
+
</div>
|
|
347
|
+
<pre
|
|
348
|
+
v-if="decodedTextPreview !== null"
|
|
349
|
+
class="cpk-attachment-queue-text-preview-content"
|
|
350
|
+
data-testid="copilot-chat-attachment-lightbox-document-text"
|
|
351
|
+
>{{ decodedTextPreview }}</pre
|
|
352
|
+
>
|
|
353
|
+
<iframe
|
|
354
|
+
v-else-if="lightboxDocumentSource"
|
|
355
|
+
:src="lightboxDocumentSource"
|
|
356
|
+
:title="activeLightboxAttachment.filename || 'Text preview'"
|
|
357
|
+
class="cpk-attachment-queue-text-preview-frame"
|
|
358
|
+
data-testid="copilot-chat-attachment-lightbox-document-iframe"
|
|
359
|
+
/>
|
|
360
|
+
</div>
|
|
356
361
|
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
>{{ decodedTextPreview }}</pre
|
|
369
|
-
>
|
|
370
|
-
<iframe
|
|
371
|
-
v-else-if="lightboxDocumentSource"
|
|
372
|
-
:src="lightboxDocumentSource"
|
|
373
|
-
:title="activeLightboxAttachment.filename || 'Text preview'"
|
|
374
|
-
class="cpk:w-full cpk:h-[80vh] cpk:border-none"
|
|
375
|
-
data-testid="copilot-chat-attachment-lightbox-document-iframe"
|
|
376
|
-
/>
|
|
362
|
+
<div
|
|
363
|
+
v-else
|
|
364
|
+
class="cpk-attachment-queue-document-card"
|
|
365
|
+
data-testid="copilot-chat-attachment-lightbox-document-fallback"
|
|
366
|
+
>
|
|
367
|
+
<div class="cpk-attachment-queue-document-card-icon">
|
|
368
|
+
{{ getDocumentIcon(activeLightboxAttachment.source.mimeType ?? "") }}
|
|
369
|
+
</div>
|
|
370
|
+
<div class="cpk-attachment-queue-document-card-details">
|
|
371
|
+
<div class="cpk-attachment-queue-document-card-name">
|
|
372
|
+
{{ activeLightboxAttachment.filename || "Document" }}
|
|
377
373
|
</div>
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
class="cpk:w-16 cpk:h-16 cpk:rounded-xl cpk:bg-primary cpk:text-primary-foreground cpk:flex cpk:items-center cpk:justify-center cpk:text-xl cpk:font-bold"
|
|
386
|
-
>
|
|
387
|
-
{{
|
|
388
|
-
getDocumentIcon(activeLightboxAttachment.source.mimeType ?? "")
|
|
389
|
-
}}
|
|
390
|
-
</div>
|
|
391
|
-
<div class="cpk:text-center">
|
|
392
|
-
<div
|
|
393
|
-
class="cpk:text-base cpk:font-medium cpk:text-gray-800 cpk:dark:text-gray-200"
|
|
394
|
-
>
|
|
395
|
-
{{ activeLightboxAttachment.filename || "Document" }}
|
|
396
|
-
</div>
|
|
397
|
-
<div
|
|
398
|
-
class="cpk:text-sm cpk:text-gray-500 cpk:dark:text-gray-400 cpk:mt-1"
|
|
399
|
-
>
|
|
400
|
-
{{ activeLightboxAttachment.source.mimeType || "Unknown type" }}
|
|
401
|
-
{{
|
|
402
|
-
activeLightboxAttachment.size != null
|
|
403
|
-
? ` · ${formatFileSize(activeLightboxAttachment.size)}`
|
|
404
|
-
: ""
|
|
405
|
-
}}
|
|
406
|
-
</div>
|
|
407
|
-
</div>
|
|
408
|
-
<div class="cpk:text-xs cpk:text-gray-400 cpk:dark:text-gray-500">
|
|
409
|
-
No preview available for this file type
|
|
410
|
-
</div>
|
|
374
|
+
<div class="cpk-attachment-queue-document-card-meta">
|
|
375
|
+
{{ activeLightboxAttachment.source.mimeType || "Unknown type" }}
|
|
376
|
+
{{
|
|
377
|
+
activeLightboxAttachment.size != null
|
|
378
|
+
? ` · ${formatFileSize(activeLightboxAttachment.size)}`
|
|
379
|
+
: ""
|
|
380
|
+
}}
|
|
411
381
|
</div>
|
|
412
|
-
</
|
|
382
|
+
</div>
|
|
383
|
+
<div class="cpk-attachment-queue-document-card-note">
|
|
384
|
+
No preview available for this file type
|
|
385
|
+
</div>
|
|
413
386
|
</div>
|
|
414
|
-
</
|
|
415
|
-
</
|
|
387
|
+
</template>
|
|
388
|
+
</CopilotChatLightbox>
|
|
416
389
|
</template>
|
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
import { computed, ref } from "vue";
|
|
3
3
|
import { getDocumentIcon, getSourceUrl } from "@copilotkit/shared";
|
|
4
4
|
import type { CopilotChatAttachmentRendererProps } from "./types";
|
|
5
|
+
import CopilotChatLightbox from "./CopilotChatLightbox.vue";
|
|
6
|
+
import { useLightbox } from "./use-lightbox";
|
|
5
7
|
|
|
6
8
|
const props = withDefaults(defineProps<CopilotChatAttachmentRendererProps>(), {
|
|
7
9
|
filename: undefined,
|
|
@@ -13,21 +15,59 @@ const sourceUrl = computed(() => getSourceUrl(props.source));
|
|
|
13
15
|
const documentLabel = computed(
|
|
14
16
|
() => props.filename || props.source.mimeType || "Unknown type",
|
|
15
17
|
);
|
|
18
|
+
const documentAriaLabel = computed(
|
|
19
|
+
() => props.filename || props.source.mimeType || "Document attachment",
|
|
20
|
+
);
|
|
21
|
+
|
|
22
|
+
const imageButton = ref<HTMLButtonElement | null>(null);
|
|
23
|
+
const {
|
|
24
|
+
thumbnailRef,
|
|
25
|
+
vtName,
|
|
26
|
+
open: lightboxOpen,
|
|
27
|
+
openLightbox,
|
|
28
|
+
closeLightbox,
|
|
29
|
+
} = useLightbox();
|
|
16
30
|
</script>
|
|
17
31
|
|
|
18
32
|
<template>
|
|
19
|
-
<img
|
|
33
|
+
<!-- React opens the lightbox from the <img>; a button around it lets
|
|
34
|
+
keyboard users open it too. The button has no look of its own. -->
|
|
35
|
+
<button
|
|
20
36
|
v-if="props.type === 'image' && !imageLoadFailed"
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
class="cpk
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
37
|
+
ref="imageButton"
|
|
38
|
+
type="button"
|
|
39
|
+
class="cpk-attachment-renderer-image-button"
|
|
40
|
+
data-testid="copilot-chat-attachment-renderer-image-button"
|
|
41
|
+
@click="openLightbox"
|
|
42
|
+
>
|
|
43
|
+
<img
|
|
44
|
+
ref="thumbnailRef"
|
|
45
|
+
:src="sourceUrl"
|
|
46
|
+
alt="Image attachment"
|
|
47
|
+
class="cpk-attachment-renderer cpk-attachment-renderer-image"
|
|
48
|
+
:class="props.className"
|
|
49
|
+
data-testid="copilot-chat-attachment-renderer-image"
|
|
50
|
+
@error="imageLoadFailed = true"
|
|
51
|
+
/>
|
|
52
|
+
<!-- Teleported to the body; inside the button only to keep one root. -->
|
|
53
|
+
<CopilotChatLightbox
|
|
54
|
+
v-if="lightboxOpen"
|
|
55
|
+
label="Image attachment"
|
|
56
|
+
:return-focus-to="imageButton"
|
|
57
|
+
@close="closeLightbox"
|
|
58
|
+
>
|
|
59
|
+
<img
|
|
60
|
+
:style="{ viewTransitionName: vtName }"
|
|
61
|
+
:src="sourceUrl"
|
|
62
|
+
alt="Image attachment"
|
|
63
|
+
class="cpk-attachment-renderer-lightbox-image"
|
|
64
|
+
data-testid="copilot-chat-attachment-renderer-lightbox-image"
|
|
65
|
+
/>
|
|
66
|
+
</CopilotChatLightbox>
|
|
67
|
+
</button>
|
|
28
68
|
<div
|
|
29
69
|
v-else-if="props.type === 'image'"
|
|
30
|
-
class="cpk
|
|
70
|
+
class="cpk-attachment-renderer cpk-attachment-renderer-image-error"
|
|
31
71
|
:class="props.className"
|
|
32
72
|
data-testid="copilot-chat-attachment-renderer-image-fallback"
|
|
33
73
|
>
|
|
@@ -36,7 +76,7 @@ const documentLabel = computed(
|
|
|
36
76
|
|
|
37
77
|
<div
|
|
38
78
|
v-else-if="props.type === 'audio'"
|
|
39
|
-
class="cpk
|
|
79
|
+
class="cpk-attachment-renderer cpk-attachment-renderer-audio"
|
|
40
80
|
:class="props.className"
|
|
41
81
|
data-testid="copilot-chat-attachment-renderer-audio"
|
|
42
82
|
>
|
|
@@ -44,11 +84,11 @@ const documentLabel = computed(
|
|
|
44
84
|
:src="sourceUrl"
|
|
45
85
|
controls
|
|
46
86
|
preload="metadata"
|
|
47
|
-
class="cpk
|
|
87
|
+
class="cpk-attachment-renderer-audio-player"
|
|
48
88
|
/>
|
|
49
89
|
<span
|
|
50
90
|
v-if="props.filename"
|
|
51
|
-
class="cpk
|
|
91
|
+
class="cpk-attachment-renderer-audio-filename"
|
|
52
92
|
data-testid="copilot-chat-attachment-renderer-audio-filename"
|
|
53
93
|
>
|
|
54
94
|
{{ props.filename }}
|
|
@@ -60,28 +100,37 @@ const documentLabel = computed(
|
|
|
60
100
|
:src="sourceUrl"
|
|
61
101
|
controls
|
|
62
102
|
preload="metadata"
|
|
63
|
-
class="cpk
|
|
103
|
+
class="cpk-attachment-renderer cpk-attachment-renderer-video"
|
|
64
104
|
:class="props.className"
|
|
65
105
|
data-testid="copilot-chat-attachment-renderer-video"
|
|
66
106
|
/>
|
|
67
107
|
|
|
68
|
-
|
|
108
|
+
<!-- `download` is honoured for same-origin, data: and blob: URLs. Browsers
|
|
109
|
+
ignore it for cross-origin URLs unless the server sends
|
|
110
|
+
`Content-Disposition: attachment`; `target="_blank"` keeps those from
|
|
111
|
+
navigating the chat away and opens the file in a new tab instead. -->
|
|
112
|
+
<a
|
|
69
113
|
v-else
|
|
70
|
-
|
|
114
|
+
:href="sourceUrl"
|
|
115
|
+
:download="props.filename ?? ''"
|
|
116
|
+
target="_blank"
|
|
117
|
+
rel="noopener noreferrer"
|
|
118
|
+
:aria-label="documentAriaLabel"
|
|
119
|
+
class="cpk-attachment-renderer cpk-attachment-renderer-document"
|
|
71
120
|
:class="props.className"
|
|
72
121
|
data-testid="copilot-chat-attachment-renderer-document"
|
|
73
122
|
>
|
|
74
123
|
<span
|
|
75
|
-
class="cpk
|
|
124
|
+
class="cpk-attachment-renderer-document-icon"
|
|
76
125
|
data-testid="copilot-chat-attachment-renderer-document-icon"
|
|
77
126
|
>
|
|
78
127
|
{{ getDocumentIcon(props.source.mimeType ?? "") }}
|
|
79
128
|
</span>
|
|
80
129
|
<span
|
|
81
|
-
class="cpk
|
|
130
|
+
class="cpk-attachment-renderer-document-name"
|
|
82
131
|
data-testid="copilot-chat-attachment-renderer-document-label"
|
|
83
132
|
>
|
|
84
133
|
{{ documentLabel }}
|
|
85
134
|
</span>
|
|
86
|
-
</
|
|
135
|
+
</a>
|
|
87
136
|
</template>
|
|
@@ -263,7 +263,7 @@ defineExpose({
|
|
|
263
263
|
</script>
|
|
264
264
|
|
|
265
265
|
<template>
|
|
266
|
-
<div data-copilotkit class="cpk
|
|
267
|
-
<canvas ref="canvasRef" class="cpk
|
|
266
|
+
<div data-copilotkit class="cpk-audio-recorder" v-bind="attrs">
|
|
267
|
+
<canvas ref="canvasRef" class="cpk-audio-recorder-canvas" />
|
|
268
268
|
</div>
|
|
269
269
|
</template>
|