@copilotkit/vue 2.0.0-rc.3 → 2.0.0-rc.30
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/CONTRIBUTOR_GUIDE.md +1 -1
- package/PARITY.md +3 -3
- 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 -73
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +365 -16920
- package/dist/index.mjs.map +1 -1
- package/dist/use-render-activity-message-BZJ33B_r.cjs +113 -0
- package/dist/use-render-activity-message-BZJ33B_r.cjs.map +1 -0
- package/dist/use-render-activity-message-DrR407LQ.js +15901 -0
- package/dist/use-render-activity-message-DrR407LQ.js.map +1 -0
- package/dist/v2/components/A2UIMessageRenderer.d.ts +14 -0
- package/dist/v2/components/A2UIMessageRenderer.d.ts.map +1 -1
- package/dist/v2/components/A2UISurfaceActivityRenderer.vue.d.ts +10 -3
- package/dist/v2/components/A2UISurfaceActivityRenderer.vue.d.ts.map +1 -1
- package/dist/v2/components/CopilotKitInspector.vue.d.ts +5 -1
- package/dist/v2/components/CopilotKitInspector.vue.d.ts.map +1 -1
- package/dist/v2/components/InlineFeatureWarning.vue.d.ts.map +1 -1
- package/dist/v2/components/LicenseWarningBanner.vue.d.ts +2 -2
- package/dist/v2/components/LicenseWarningBanner.vue.d.ts.map +1 -1
- package/dist/v2/components/MCPAppsActivityRenderer.d.ts.map +1 -1
- package/dist/v2/components/OpenGenerativeUIRenderer.d.ts +13 -59
- package/dist/v2/components/OpenGenerativeUIRenderer.d.ts.map +1 -1
- package/dist/v2/components/a2ui/A2UIBuiltInToolCallRenderer.d.ts +3 -11
- package/dist/v2/components/a2ui/A2UIBuiltInToolCallRenderer.d.ts.map +1 -1
- package/dist/v2/components/a2ui/A2UICatalogContext.d.ts +10 -15
- package/dist/v2/components/a2ui/A2UICatalogContext.d.ts.map +1 -1
- package/dist/v2/components/a2ui/A2UIRecoveryStates.d.ts +14 -130
- package/dist/v2/components/a2ui/A2UIRecoveryStates.d.ts.map +1 -1
- package/dist/v2/components/a2ui/catalog.d.ts.map +1 -1
- package/dist/v2/components/a2ui/utils.d.ts +3 -15
- package/dist/v2/components/a2ui/utils.d.ts.map +1 -1
- package/dist/v2/components/a2ui.d.ts +9 -8
- package/dist/v2/components/a2ui.d.ts.map +1 -1
- package/dist/v2/components/chat/CopilotChat.vue.d.ts +2 -2
- package/dist/v2/components/chat/CopilotChat.vue.d.ts.map +1 -1
- package/dist/v2/components/chat/CopilotChatAssistantMessage.vue.d.ts.map +1 -1
- 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 +4 -8
- package/dist/v2/components/chat/CopilotChatAudioRecorder.vue.d.ts.map +1 -1
- package/dist/v2/components/chat/CopilotChatFeedbackCommentPopover.vue.d.ts +1 -1
- package/dist/v2/components/chat/CopilotChatFeedbackCommentPopover.vue.d.ts.map +1 -1
- package/dist/v2/components/chat/CopilotChatInput.vue.d.ts +7 -286
- package/dist/v2/components/chat/CopilotChatInput.vue.d.ts.map +1 -1
- package/dist/v2/components/chat/CopilotChatInspectorButton.vue.d.ts.map +1 -1
- package/dist/v2/components/chat/CopilotChatLightbox.vue.d.ts.map +1 -1
- package/dist/v2/components/chat/CopilotChatMessageView.vue.d.ts +1 -1
- 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/CopilotChatToolCallGroup.vue.d.ts +1 -1
- package/dist/v2/components/chat/CopilotChatToolCallGroup.vue.d.ts.map +1 -1
- package/dist/v2/components/chat/CopilotChatToolCallItem.vue.d.ts.map +1 -1
- package/dist/v2/components/chat/CopilotChatToolCallsView.vue.d.ts +1 -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 +3 -3
- package/dist/v2/components/chat/CopilotChatView.vue.d.ts.map +1 -1
- package/dist/v2/components/chat/CopilotChatWorkSummary.vue.d.ts.map +1 -1
- package/dist/v2/components/chat/CopilotModalHeader.vue.d.ts.map +1 -1
- package/dist/v2/components/chat/CopilotPopup.vue.d.ts +8 -3
- package/dist/v2/components/chat/CopilotPopup.vue.d.ts.map +1 -1
- package/dist/v2/components/chat/CopilotPopupView.vue.d.ts +5 -3
- package/dist/v2/components/chat/CopilotPopupView.vue.d.ts.map +1 -1
- package/dist/v2/components/chat/CopilotPopupViewInternal.vue.d.ts +5 -3
- package/dist/v2/components/chat/CopilotPopupViewInternal.vue.d.ts.map +1 -1
- package/dist/v2/components/chat/CopilotSidebar.vue.d.ts +8 -3
- package/dist/v2/components/chat/CopilotSidebar.vue.d.ts.map +1 -1
- package/dist/v2/components/chat/CopilotSidebarView.vue.d.ts +6 -4
- package/dist/v2/components/chat/CopilotSidebarView.vue.d.ts.map +1 -1
- package/dist/v2/components/chat/CopilotSidebarViewInternal.vue.d.ts +6 -4
- package/dist/v2/components/chat/CopilotSidebarViewInternal.vue.d.ts.map +1 -1
- package/dist/v2/components/chat/CopilotThreadsDrawer.vue.d.ts.map +1 -1
- package/dist/v2/components/chat/StreamingMarkdownDefault.vue.d.ts +1 -0
- package/dist/v2/components/chat/StreamingMarkdownDefault.vue.d.ts.map +1 -1
- package/dist/v2/components/chat/audioRecorder.d.ts +3 -4
- package/dist/v2/components/chat/audioRecorder.d.ts.map +1 -1
- package/dist/v2/components/chat/copilotChatToolCallItemRender.d.ts +4 -4
- package/dist/v2/components/chat/copilotChatToolCallItemRender.d.ts.map +1 -1
- package/dist/v2/components/chat/forwarded-slots.d.ts +12 -0
- package/dist/v2/components/chat/forwarded-slots.d.ts.map +1 -0
- package/dist/v2/components/chat/index.d.ts +34 -31
- package/dist/v2/components/chat/index.d.ts.map +1 -1
- package/dist/v2/components/chat/inspector-shortcuts.d.ts +2 -1
- package/dist/v2/components/chat/inspector-shortcuts.d.ts.map +1 -1
- package/dist/v2/components/chat/message-feedback.d.ts +38 -49
- package/dist/v2/components/chat/message-feedback.d.ts.map +1 -1
- package/dist/v2/components/chat/tool-call-display-context.d.ts +4 -19
- package/dist/v2/components/chat/tool-call-display-context.d.ts.map +1 -1
- package/dist/v2/components/chat/tool-call-group-parts.d.ts +7 -20
- package/dist/v2/components/chat/tool-call-group-parts.d.ts.map +1 -1
- package/dist/v2/components/chat/turn-work.d.ts +0 -2
- package/dist/v2/components/chat/turn-work.d.ts.map +1 -1
- package/dist/v2/components/chat/types.d.ts +9 -4
- 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-copy-feedback.d.ts +11 -0
- package/dist/v2/components/chat/use-copy-feedback.d.ts.map +1 -0
- package/dist/v2/components/chat/use-lightbox.d.ts.map +1 -1
- 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 +1 -1
- package/dist/v2/components/ui/CopilotDropdownMenuContent.vue.d.ts.map +1 -1
- package/dist/v2/hooks/use-agent-context.d.ts +2 -3
- package/dist/v2/hooks/use-agent-context.d.ts.map +1 -1
- package/dist/v2/hooks/use-agent.d.ts +4 -1
- package/dist/v2/hooks/use-agent.d.ts.map +1 -1
- package/dist/v2/hooks/use-attachments.d.ts +7 -0
- package/dist/v2/hooks/use-attachments.d.ts.map +1 -1
- package/dist/v2/hooks/use-capabilities.d.ts.map +1 -1
- package/dist/v2/hooks/use-component.d.ts +1 -0
- package/dist/v2/hooks/use-component.d.ts.map +1 -1
- package/dist/v2/hooks/use-configure-suggestions.d.ts +4 -9
- package/dist/v2/hooks/use-configure-suggestions.d.ts.map +1 -1
- package/dist/v2/hooks/use-default-render-tool.d.ts +2 -7
- 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-human-in-the-loop.d.ts +2 -1
- package/dist/v2/hooks/use-human-in-the-loop.d.ts.map +1 -1
- package/dist/v2/hooks/use-interrupt.d.ts +0 -1
- package/dist/v2/hooks/use-interrupt.d.ts.map +1 -1
- package/dist/v2/hooks/use-keyboard-height.d.ts +1 -1
- package/dist/v2/hooks/use-keyboard-height.d.ts.map +1 -1
- package/dist/v2/hooks/use-pin-to-send.d.ts +4 -12
- package/dist/v2/hooks/use-pin-to-send.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 +1 -1
- package/dist/v2/hooks/use-render-tool.d.ts.map +1 -1
- package/dist/v2/hooks/use-suggestions.d.ts.map +1 -1
- package/dist/v2/hooks/use-threads.d.ts +6 -23
- package/dist/v2/hooks/use-threads.d.ts.map +1 -1
- package/dist/v2/index.cjs +1 -1
- package/dist/v2/index.mjs +197 -200
- package/dist/v2/index.mjs.map +1 -1
- package/dist/v2/lib/processPartialHtml.d.ts +1 -2
- package/dist/v2/lib/processPartialHtml.d.ts.map +1 -1
- package/dist/v2/lib/shallow-stable.d.ts.map +1 -1
- package/dist/v2/lib/vue-core.d.ts +33 -19
- 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 +9 -129
- package/dist/v2/providers/CopilotKitProvider.types.d.ts.map +1 -1
- package/dist/v2/providers/CopilotKitProvider.vue.d.ts +9 -10
- package/dist/v2/providers/CopilotKitProvider.vue.d.ts.map +1 -1
- package/dist/v2/providers/chat-configuration-store-key.d.ts +8 -0
- package/dist/v2/providers/chat-configuration-store-key.d.ts.map +1 -0
- package/dist/v2/providers/markdown-renderer.d.ts +4 -2
- package/dist/v2/providers/markdown-renderer.d.ts.map +1 -1
- package/dist/v2/providers/types.d.ts +3 -46
- package/dist/v2/providers/types.d.ts.map +1 -1
- package/dist/v2/providers/use-inspector-thread-override.d.ts +5 -0
- package/dist/v2/providers/use-inspector-thread-override.d.ts.map +1 -1
- package/dist/v2/types/defineToolCallRenderer.d.ts +1 -1
- 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 -35
- package/dist/v2/types/vue-tool-call-renderer.d.ts.map +1 -1
- package/package.json +12 -13
- package/src/__tests__/build-entries.test.ts +29 -0
- 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 +10 -0
- package/src/v2/__tests__/mocks/web-inspector.ts +6 -0
- package/src/v2/__tests__/utils/test-helpers.ts +34 -4
- package/src/v2/components/A2UIMessageRenderer.ts +98 -68
- package/src/v2/components/A2UISurfaceActivityRenderer.vue +68 -103
- package/src/v2/components/CopilotKitInspector.vue +104 -51
- package/src/v2/components/InlineFeatureWarning.vue +20 -21
- package/src/v2/components/LicenseWarningBanner.vue +27 -135
- package/src/v2/components/MCPAppsActivityRenderer.ts +75 -201
- package/src/v2/components/OpenGenerativeUIRenderer.ts +122 -446
- package/src/v2/components/__tests__/A2UIMessageRenderer.test.ts +171 -8
- package/src/v2/components/__tests__/CopilotKitInspector.test.ts +42 -0
- package/src/v2/components/__tests__/LicenseWarningBanner.test.ts +60 -0
- package/src/v2/components/__tests__/OpenGenerativeUIRenderer.test.ts +64 -8
- package/src/v2/components/__tests__/OpenGenerativeUIToolRenderer.test.ts +38 -0
- package/src/v2/components/a2ui/A2UIBuiltInToolCallRenderer.ts +6 -26
- package/src/v2/components/a2ui/A2UICatalogContext.ts +27 -185
- package/src/v2/components/a2ui/A2UIRecoveryStates.ts +127 -327
- package/src/v2/components/a2ui/catalog.ts +3 -3
- package/src/v2/components/a2ui/utils.ts +13 -65
- package/src/v2/components/a2ui.ts +15 -22
- package/src/v2/components/chat/CopilotChat.vue +121 -498
- package/src/v2/components/chat/CopilotChatAssistantMessage.vue +47 -184
- package/src/v2/components/chat/CopilotChatAttachmentQueue.vue +36 -55
- package/src/v2/components/chat/CopilotChatAttachmentRenderer.vue +14 -6
- package/src/v2/components/chat/CopilotChatAudioRecorder.vue +19 -246
- package/src/v2/components/chat/CopilotChatFeedbackCommentPopover.vue +12 -77
- package/src/v2/components/chat/CopilotChatInput.vue +139 -654
- package/src/v2/components/chat/CopilotChatInspectorButton.vue +45 -108
- package/src/v2/components/chat/CopilotChatLightbox.vue +10 -31
- package/src/v2/components/chat/CopilotChatMessageView.vue +96 -274
- package/src/v2/components/chat/CopilotChatReasoningMessage.vue +27 -62
- package/src/v2/components/chat/CopilotChatToolCallGroup.vue +63 -71
- package/src/v2/components/chat/CopilotChatToolCallItem.vue +8 -6
- package/src/v2/components/chat/CopilotChatToolCallsView.vue +31 -32
- package/src/v2/components/chat/CopilotChatUserMessage.vue +24 -112
- package/src/v2/components/chat/CopilotChatView.vue +123 -161
- package/src/v2/components/chat/CopilotChatWorkSummary.vue +26 -36
- package/src/v2/components/chat/CopilotModalHeader.vue +11 -23
- package/src/v2/components/chat/CopilotPopup.vue +23 -25
- package/src/v2/components/chat/CopilotPopupView.vue +10 -39
- package/src/v2/components/chat/CopilotPopupViewInternal.vue +49 -185
- package/src/v2/components/chat/CopilotSidebar.vue +23 -25
- package/src/v2/components/chat/CopilotSidebarView.vue +10 -39
- package/src/v2/components/chat/CopilotSidebarViewInternal.vue +56 -100
- package/src/v2/components/chat/CopilotThreadsDrawer.vue +43 -105
- package/src/v2/components/chat/StreamingMarkdownDefault.vue +15 -28
- package/src/v2/components/chat/__tests__/CopilotChat.labels.test.ts +19 -4
- package/src/v2/components/chat/__tests__/CopilotChat.test.ts +12 -10
- package/src/v2/components/chat/__tests__/CopilotChatActivityRendering.e2e.test.ts +26 -9
- package/src/v2/components/chat/__tests__/CopilotChatAssistantMessage.learningFeedback.test.ts +5 -5
- package/src/v2/components/chat/__tests__/CopilotChatAttachmentQueue.test.ts +28 -0
- package/src/v2/components/chat/__tests__/CopilotChatInput.test.ts +132 -1
- package/src/v2/components/chat/__tests__/CopilotChatMessageView.test.ts +247 -403
- package/src/v2/components/chat/__tests__/CopilotChatMessageView.toolCallDisplay.test.ts +1 -99
- package/src/v2/components/chat/__tests__/CopilotChatView.pinToSend.test.ts +43 -1
- package/src/v2/components/chat/__tests__/CopilotPopup.test.ts +90 -1
- package/src/v2/components/chat/__tests__/CopilotPopupView.test.ts +19 -0
- package/src/v2/components/chat/__tests__/CopilotSidebar.test.ts +90 -1
- package/src/v2/components/chat/__tests__/CopilotSidebarView.position.test.ts +32 -8
- package/src/v2/components/chat/__tests__/CopilotSidebarView.test.ts +2 -1
- package/src/v2/components/chat/__tests__/StreamingMarkdownDefault.test.ts +54 -0
- package/src/v2/components/chat/audioRecorder.ts +4 -7
- package/src/v2/components/chat/copilotChatToolCallItemRender.ts +25 -90
- package/src/v2/components/chat/forwarded-slots.ts +17 -0
- package/src/v2/components/chat/index.ts +0 -1
- package/src/v2/components/chat/inspector-shortcuts.ts +10 -16
- package/src/v2/components/chat/message-feedback.ts +92 -195
- package/src/v2/components/chat/tool-call-display-context.ts +6 -22
- package/src/v2/components/chat/tool-call-group-parts.ts +47 -108
- package/src/v2/components/chat/turn-work.ts +0 -9
- package/src/v2/components/chat/types.ts +12 -4
- package/src/v2/components/chat/use-chat-labels.ts +16 -0
- package/src/v2/components/chat/use-copy-feedback.ts +21 -0
- package/src/v2/components/chat/use-lightbox.ts +15 -33
- package/src/v2/components/icons/__tests__/icons.test.ts +72 -68
- package/src/v2/components/icons/index.ts +109 -27
- package/src/v2/hooks/__tests__/use-agent-error-state.test.ts +5 -3
- package/src/v2/hooks/__tests__/use-agent-stability.test.ts +25 -4
- package/src/v2/hooks/__tests__/use-agent-throttle.test.ts +5 -1
- package/src/v2/hooks/__tests__/use-agent.test.ts +6 -3
- package/src/v2/hooks/__tests__/use-component.test.ts +21 -0
- package/src/v2/hooks/__tests__/use-configure-suggestions.test.ts +30 -1
- package/src/v2/hooks/__tests__/use-default-render-tool.test.ts +10 -10
- package/src/v2/hooks/__tests__/use-frontend-tool.e2e.test.ts +66 -1
- package/src/v2/hooks/__tests__/use-human-in-the-loop.e2e.test.ts +6 -1
- package/src/v2/hooks/__tests__/use-human-in-the-loop.test.ts +187 -12
- package/src/v2/hooks/__tests__/use-interrupt.test.ts +97 -0
- package/src/v2/hooks/__tests__/use-render-activity-message.test.ts +106 -0
- package/src/v2/hooks/__tests__/use-render-tool.test.ts +3 -6
- package/src/v2/hooks/__tests__/use-threads.test.ts +48 -6
- package/src/v2/hooks/__tests__/zod-regression.test.ts +5 -4
- package/src/v2/hooks/use-agent-context.ts +4 -10
- package/src/v2/hooks/use-agent.ts +86 -290
- package/src/v2/hooks/use-attachments.ts +48 -168
- package/src/v2/hooks/use-capabilities.ts +2 -7
- package/src/v2/hooks/use-component.ts +7 -4
- package/src/v2/hooks/use-configure-suggestions.ts +29 -220
- package/src/v2/hooks/use-default-render-tool.ts +31 -152
- package/src/v2/hooks/use-frontend-tool.ts +15 -25
- package/src/v2/hooks/use-human-in-the-loop.ts +11 -80
- package/src/v2/hooks/use-interrupt.ts +29 -308
- package/src/v2/hooks/use-keyboard-height.ts +17 -40
- package/src/v2/hooks/use-pin-to-send.ts +15 -99
- package/src/v2/hooks/use-render-activity-message.ts +35 -57
- package/src/v2/hooks/use-render-custom-messages.ts +24 -88
- package/src/v2/hooks/use-render-tool.ts +2 -4
- package/src/v2/hooks/use-suggestions.ts +17 -36
- package/src/v2/hooks/use-threads.ts +49 -288
- package/src/v2/lib/__tests__/shallow-stable.test.ts +54 -0
- package/src/v2/lib/__tests__/vue-core-renderers.test.ts +42 -0
- package/src/v2/lib/processPartialHtml.ts +6 -21
- package/src/v2/lib/shallow-stable.ts +2 -16
- package/src/v2/lib/vue-core.ts +90 -85
- package/src/v2/providers/CopilotChatConfigurationProvider.vue +48 -186
- package/src/v2/providers/CopilotKitProvider.types.ts +12 -132
- package/src/v2/providers/CopilotKitProvider.vue +291 -641
- package/src/v2/providers/__tests__/CopilotChatConfigurationProvider.test.ts +22 -2
- package/src/v2/providers/__tests__/CopilotKitProvider.a2ui.test.ts +38 -2
- package/src/v2/providers/__tests__/CopilotKitProvider.config.test.ts +124 -0
- package/src/v2/providers/__tests__/CopilotKitProvider.headersAtSendTime.test.ts +3 -3
- package/src/v2/providers/__tests__/CopilotKitProvider.learning.test.ts +3 -1
- package/src/v2/providers/__tests__/CopilotKitProvider.sandboxFunctions.test.ts +4 -1
- package/src/v2/providers/__tests__/CopilotKitProvider.test.ts +88 -28
- package/src/v2/providers/chat-configuration-store-key.ts +9 -0
- package/src/v2/providers/markdown-renderer.ts +8 -2
- package/src/v2/providers/types.ts +3 -49
- package/src/v2/providers/use-inspector-thread-override.ts +22 -80
- package/src/v2/types/__tests__/defineToolCallRenderer.test.ts +28 -33
- package/src/v2/types/defineToolCallRenderer.ts +7 -6
- 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 -38
- package/tsconfig.json +0 -1
- package/vite.config.ts +8 -5
- package/vitest.config.ts +12 -7
- 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/components/chat/normalize-auto-scroll.d.ts +0 -3
- package/dist/v2/components/chat/normalize-auto-scroll.d.ts.map +0 -1
- package/dist/v2/components/chat/tool-call-layout.d.ts +0 -115
- package/dist/v2/components/chat/tool-call-layout.d.ts.map +0 -1
- package/dist/v2/lib/is-mobile-viewport.d.ts +0 -15
- package/dist/v2/lib/is-mobile-viewport.d.ts.map +0 -1
- package/dist/v2/lib/message-feedback.d.ts +0 -33
- package/dist/v2/lib/message-feedback.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/src/v2/components/__tests__/A2UICatalogContext.test.ts +0 -63
- package/src/v2/components/a2ui/__tests__/A2UIRecoveryStates.test.ts +0 -175
- package/src/v2/components/chat/BasicMarkdown.vue +0 -160
- package/src/v2/components/chat/__tests__/BasicMarkdown.test.ts +0 -69
- package/src/v2/components/chat/__tests__/normalize-auto-scroll.test.ts +0 -39
- package/src/v2/components/chat/normalize-auto-scroll.ts +0 -17
- package/src/v2/components/chat/tool-call-layout.ts +0 -304
- package/src/v2/lib/__tests__/is-mobile-viewport.test.ts +0 -48
- package/src/v2/lib/__tests__/message-feedback.test.ts +0 -152
- 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/is-mobile-viewport.ts +0 -23
- package/src/v2/lib/message-feedback.ts +0 -120
- package/src/v2/lib/transcription-client.ts +0 -151
|
@@ -1,19 +1,9 @@
|
|
|
1
1
|
import type { A2UIRecoveryRendererOptions } from "../components/a2ui/A2UIRecoveryStates";
|
|
2
|
-
import type {
|
|
3
|
-
import type { CopilotKitCoreErrorCode, CopilotKitHeadersSource, CopilotKitMessageFilter, LearningConfig } from "@copilotkit/core";
|
|
4
|
-
import type { DebugConfig } from "@copilotkit/shared";
|
|
2
|
+
import type { ɵA2UIActionInterceptor, ɵA2UIBaseOptions, ɵCopilotKitLearningOptions, ɵCopilotKitProviderBaseOptions } from "@copilotkit/core";
|
|
5
3
|
import type { A2UITheme, SandboxFunction, VueActivityMessageRenderer, VueCustomMessageRenderer, VueFrontendTool, VueHumanInTheLoop, VueToolCallRenderer } from "../types";
|
|
6
4
|
import type { Component } from "vue";
|
|
7
5
|
import type { MarkdownRendererValue } from "./markdown-renderer";
|
|
8
|
-
export interface CopilotKitProviderProps {
|
|
9
|
-
runtimeUrl?: string;
|
|
10
|
-
/**
|
|
11
|
-
* Headers sent with every request. A record, or a sync or async builder
|
|
12
|
-
* that runs when each request is sent. An inline arrow is fine. The builder
|
|
13
|
-
* should be cheap; cache tokens in it.
|
|
14
|
-
*/
|
|
15
|
-
headers?: CopilotKitHeadersSource;
|
|
16
|
-
credentials?: RequestCredentials;
|
|
6
|
+
export interface CopilotKitProviderProps extends ɵCopilotKitProviderBaseOptions {
|
|
17
7
|
/**
|
|
18
8
|
* CSP nonce for the `<style>` tag CopilotKit adds. Set it when your
|
|
19
9
|
* Content-Security-Policy limits `style-src` to a nonce.
|
|
@@ -25,42 +15,6 @@ export interface CopilotKitProviderProps {
|
|
|
25
15
|
* @default true
|
|
26
16
|
*/
|
|
27
17
|
injectStyles?: boolean;
|
|
28
|
-
/**
|
|
29
|
-
* Rewrites the message list sent to runtime agents on every run.
|
|
30
|
-
*
|
|
31
|
-
* CopilotKit sends the whole thread each time. When your agent already
|
|
32
|
-
* stores the conversation, most of that payload is waste, and an agent that
|
|
33
|
-
* merges the inbound list with its own store can show the model every turn
|
|
34
|
-
* twice. Return the messages to send:
|
|
35
|
-
*
|
|
36
|
-
* ```vue
|
|
37
|
-
* <CopilotKitProvider
|
|
38
|
-
* runtime-url="/api/copilotkit"
|
|
39
|
-
* :message-filter="(messages) => messages.slice(-1)"
|
|
40
|
-
* />
|
|
41
|
-
* ```
|
|
42
|
-
*
|
|
43
|
-
* The filter changes the request body only. The transcript the UI renders is
|
|
44
|
-
* untouched. Broken tool-call pairs are repaired before the request is sent,
|
|
45
|
-
* so a filter this blunt cannot strand a tool result mid-HITL.
|
|
46
|
-
*
|
|
47
|
-
* Agents reached through your CopilotRuntime honor this. An agent your app
|
|
48
|
-
* passes in directly does not, and neither Intelligence runs nor suggestion
|
|
49
|
-
* runs are ever filtered.
|
|
50
|
-
*/
|
|
51
|
-
messageFilter?: CopilotKitMessageFilter;
|
|
52
|
-
defaultThrottleMs?: number;
|
|
53
|
-
publicApiKey?: string;
|
|
54
|
-
publicLicenseKey?: string;
|
|
55
|
-
/**
|
|
56
|
-
* Signed license token for offline verification of CopilotKit Intelligence features.
|
|
57
|
-
* Obtain from https://dashboard.operations.copilotkit.ai.
|
|
58
|
-
*/
|
|
59
|
-
licenseToken?: string;
|
|
60
|
-
properties?: Record<string, unknown>;
|
|
61
|
-
useSingleEndpoint?: boolean;
|
|
62
|
-
agents__unsafe_dev_only?: Record<string, AbstractAgent>;
|
|
63
|
-
selfManagedAgents?: Record<string, AbstractAgent>;
|
|
64
18
|
renderToolCalls?: VueToolCallRenderer<any>[];
|
|
65
19
|
renderActivityMessages?: VueActivityMessageRenderer<unknown>[];
|
|
66
20
|
renderCustomMessages?: VueCustomMessageRenderer[];
|
|
@@ -70,60 +24,29 @@ export interface CopilotKitProviderProps {
|
|
|
70
24
|
sandboxFunctions?: SandboxFunction[];
|
|
71
25
|
designSkill?: string;
|
|
72
26
|
};
|
|
73
|
-
/**
|
|
74
|
-
* @deprecated This prop no longer controls the Inspector. Use
|
|
75
|
-
* `enableInspector` instead.
|
|
76
|
-
*/
|
|
77
|
-
showDevConsole?: boolean | "auto";
|
|
78
27
|
/**
|
|
79
28
|
* Disable the CopilotKit Inspector in development.
|
|
80
29
|
* The Inspector is enabled by default in development browser builds and is
|
|
81
30
|
* always disabled in production and during server rendering.
|
|
82
31
|
*/
|
|
83
32
|
enableInspector?: boolean;
|
|
84
|
-
|
|
85
|
-
error: Error;
|
|
86
|
-
code: CopilotKitCoreErrorCode;
|
|
87
|
-
context: Record<string, any>;
|
|
88
|
-
}) => void | Promise<void>;
|
|
89
|
-
a2ui?: {
|
|
33
|
+
a2ui?: ɵA2UIBaseOptions & {
|
|
90
34
|
theme?: A2UITheme;
|
|
91
35
|
catalog?: any;
|
|
92
36
|
loadingComponent?: Component;
|
|
93
|
-
/**
|
|
94
|
-
* When true (the default), the full component schemas from the catalog are
|
|
95
|
-
* sent as agent context so the agent knows what components and props are
|
|
96
|
-
* available. The A2UI middleware can overwrite this with a server-side
|
|
97
|
-
* schema if configured.
|
|
98
|
-
*
|
|
99
|
-
* When false, the agent context still describes the catalog, but only by its
|
|
100
|
-
* catalog ID and the names of its custom components, without their JSON
|
|
101
|
-
* schemas. The component schema entry and the A2UI generation and design
|
|
102
|
-
* guidelines are not sent. With the CopilotKit LangGraph middleware's
|
|
103
|
-
* injected A2UI tool, the A2UI subagent then gets the component names only;
|
|
104
|
-
* a host can still give it a composition guide through the middleware's
|
|
105
|
-
* guidelines (`a2uiParams.guidelines.compositionGuide` in TypeScript,
|
|
106
|
-
* `a2ui_params["guidelines"]["composition_guide"]` in Python).
|
|
107
|
-
*/
|
|
108
|
-
includeSchema?: boolean;
|
|
109
37
|
/**
|
|
110
38
|
* Options for the A2UI error-recovery status UI: how long before the
|
|
111
39
|
* transient "Retrying…" hint appears, after how many attempts, and how
|
|
112
40
|
* much retry/debug detail to surface. When omitted, defaults apply.
|
|
113
41
|
*/
|
|
114
42
|
recovery?: A2UIRecoveryRendererOptions;
|
|
115
|
-
};
|
|
116
|
-
/** Configuration for the built-in MCP Apps renderer. */
|
|
117
|
-
mcpApps?: {
|
|
118
43
|
/**
|
|
119
|
-
*
|
|
120
|
-
*
|
|
121
|
-
*
|
|
122
|
-
*
|
|
123
|
-
* Only set it for widgets you wrote and trust that need `localStorage`,
|
|
124
|
-
* `IndexedDB` or cookies. By default widgets get an opaque origin.
|
|
44
|
+
* Intercept A2UI user actions before they reach the agent: return `null`
|
|
45
|
+
* to handle an action client-side (e.g. a `navigate` event), return an
|
|
46
|
+
* action to forward that one instead, or return nothing to forward it
|
|
47
|
+
* unchanged.
|
|
125
48
|
*/
|
|
126
|
-
|
|
49
|
+
onAction?: ɵA2UIActionInterceptor;
|
|
127
50
|
};
|
|
128
51
|
/**
|
|
129
52
|
* Global markdown renderer for assistant/reasoning messages. Either a Vue
|
|
@@ -134,50 +57,7 @@ export interface CopilotKitProviderProps {
|
|
|
134
57
|
* a per-message slot still wins.
|
|
135
58
|
*/
|
|
136
59
|
markdownRenderer?: MarkdownRendererValue;
|
|
137
|
-
/**
|
|
138
|
-
* Enable debug logging for the client-side event pipeline.
|
|
139
|
-
*
|
|
140
|
-
* Accepts:
|
|
141
|
-
* - `true` / `false` to toggle events + lifecycle logging (verbose off).
|
|
142
|
-
* - `{ events?: boolean; lifecycle?: boolean; verbose?: boolean }` for granular control.
|
|
143
|
-
*/
|
|
144
|
-
debug?: DebugConfig;
|
|
145
|
-
/**
|
|
146
|
-
* Turns on interaction capture (`@copilotkit/learning`). `learning` (short
|
|
147
|
-
* for `:learning="true"`) records with the default options; pass an object
|
|
148
|
-
* for options. `false` or omitting the prop turns capture off and cancels
|
|
149
|
-
* startup. Without a sink, Core authenticates with the runtime and sends
|
|
150
|
-
* browser events to Intelligence; a custom sink keeps the standalone
|
|
151
|
-
* collector behavior. Updated settings apply to the next Trajectory.
|
|
152
|
-
*
|
|
153
|
-
* Capture starts after mount. Set `trajectoryId` to use your own ID;
|
|
154
|
-
* otherwise the provider generates one. The generated ID stays the same
|
|
155
|
-
* across rerenders, reconnects and option changes; turning capture off,
|
|
156
|
-
* setting `autoStart: false` or supplying a `trajectoryId` ends it, and the
|
|
157
|
-
* next generated Trajectory gets a new ID. Read the active ID from
|
|
158
|
-
* `copilotkit.trajectoryId`.
|
|
159
|
-
*
|
|
160
|
-
* Set `autoStart: false` to start capture yourself with `startTrajectory()`.
|
|
161
|
-
* Capture stops on unmount, including manually started Trajectories.
|
|
162
|
-
*
|
|
163
|
-
* @example
|
|
164
|
-
* <CopilotKitProvider runtime-url="/api/copilotkit" learning>
|
|
165
|
-
*/
|
|
166
|
-
learning?: boolean | CopilotKitLearningOptions;
|
|
167
60
|
}
|
|
168
61
|
/** The object form of the `learning` prop. */
|
|
169
|
-
export type CopilotKitLearningOptions =
|
|
170
|
-
/**
|
|
171
|
-
* Starts a Trajectory after mount. Defaults to `true`; set `false` to call
|
|
172
|
-
* `startTrajectory()` yourself.
|
|
173
|
-
*/
|
|
174
|
-
autoStart?: boolean;
|
|
175
|
-
trajectoryId?: string;
|
|
176
|
-
/**
|
|
177
|
-
* Used only by explicit custom sinks. Authenticated capture warns and ignores
|
|
178
|
-
* this option; assign Learning Spaces on the server with
|
|
179
|
-
* `getTrajectoryLearningContainerIds` on `CopilotKitIntelligence`.
|
|
180
|
-
*/
|
|
181
|
-
learningContainerIds?: string[];
|
|
182
|
-
};
|
|
62
|
+
export type CopilotKitLearningOptions = ɵCopilotKitLearningOptions;
|
|
183
63
|
//# sourceMappingURL=CopilotKitProvider.types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CopilotKitProvider.types.d.ts","sourceRoot":"","sources":["../../../src/v2/providers/CopilotKitProvider.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,uCAAuC,CAAC;AACzF,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"CopilotKitProvider.types.d.ts","sourceRoot":"","sources":["../../../src/v2/providers/CopilotKitProvider.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,uCAAuC,CAAC;AACzF,OAAO,KAAK,EACV,sBAAsB,EACtB,gBAAgB,EAChB,0BAA0B,EAC1B,8BAA8B,EAC/B,MAAM,kBAAkB,CAAC;AAC1B,OAAO,KAAK,EACV,SAAS,EACT,eAAe,EACf,0BAA0B,EAC1B,wBAAwB,EACxB,eAAe,EACf,iBAAiB,EACjB,mBAAmB,EACpB,MAAM,UAAU,CAAC;AAClB,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,KAAK,CAAC;AACrC,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAC;AAEjE,MAAM,WAAW,uBAAwB,SAAQ,8BAA8B;IAC7E;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;;OAIG;IACH,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,eAAe,CAAC,EAAE,mBAAmB,CAAC,GAAG,CAAC,EAAE,CAAC;IAC7C,sBAAsB,CAAC,EAAE,0BAA0B,CAAC,OAAO,CAAC,EAAE,CAAC;IAC/D,oBAAoB,CAAC,EAAE,wBAAwB,EAAE,CAAC;IAClD,aAAa,CAAC,EAAE,eAAe,EAAE,CAAC;IAClC,cAAc,CAAC,EAAE,iBAAiB,EAAE,CAAC;IACrC,gBAAgB,CAAC,EAAE;QACjB,gBAAgB,CAAC,EAAE,eAAe,EAAE,CAAC;QACrC,WAAW,CAAC,EAAE,MAAM,CAAC;KACtB,CAAC;IACF;;;;OAIG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,IAAI,CAAC,EAAE,gBAAgB,GAAG;QACxB,KAAK,CAAC,EAAE,SAAS,CAAC;QAClB,OAAO,CAAC,EAAE,GAAG,CAAC;QACd,gBAAgB,CAAC,EAAE,SAAS,CAAC;QAC7B;;;;WAIG;QACH,QAAQ,CAAC,EAAE,2BAA2B,CAAC;QACvC;;;;;WAKG;QACH,QAAQ,CAAC,EAAE,sBAAsB,CAAC;KACnC,CAAC;IACF;;;;;;;OAOG;IACH,gBAAgB,CAAC,EAAE,qBAAqB,CAAC;CAC1C;AAED,8CAA8C;AAC9C,MAAM,MAAM,yBAAyB,GAAG,0BAA0B,CAAC"}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import type { Component } from "vue";
|
|
2
|
-
import type { AbstractAgent } from "@ag-ui/client";
|
|
3
2
|
import type { CopilotKitHeadersSource } from "@copilotkit/core";
|
|
4
|
-
import type {
|
|
3
|
+
import type { CopilotKitProviderProps } from "./CopilotKitProvider.types";
|
|
5
4
|
import type { SandboxFunction, VueActivityMessageRenderer, VueFrontendTool } from "../types";
|
|
6
5
|
declare var __VLS_1: {};
|
|
7
6
|
type __VLS_Slots = {} & {
|
|
@@ -10,13 +9,8 @@ type __VLS_Slots = {} & {
|
|
|
10
9
|
declare const __VLS_component: import("vue").DefineComponent<CopilotKitProviderProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<CopilotKitProviderProps> & Readonly<{}>, {
|
|
11
10
|
renderActivityMessages: VueActivityMessageRenderer<unknown>[];
|
|
12
11
|
renderCustomMessages: import("..").VueCustomMessageRenderer[];
|
|
13
|
-
properties: Record<string, unknown>;
|
|
14
|
-
headers: CopilotKitHeadersSource;
|
|
15
12
|
nonce: string;
|
|
16
13
|
injectStyles: boolean;
|
|
17
|
-
useSingleEndpoint: boolean;
|
|
18
|
-
agents__unsafe_dev_only: Record<string, AbstractAgent>;
|
|
19
|
-
selfManagedAgents: Record<string, AbstractAgent>;
|
|
20
14
|
frontendTools: VueFrontendTool[];
|
|
21
15
|
humanInTheLoop: import("..").VueHumanInTheLoop[];
|
|
22
16
|
openGenerativeUI: {
|
|
@@ -24,17 +18,22 @@ declare const __VLS_component: import("vue").DefineComponent<CopilotKitProviderP
|
|
|
24
18
|
designSkill?: string;
|
|
25
19
|
};
|
|
26
20
|
enableInspector: boolean;
|
|
27
|
-
a2ui: {
|
|
21
|
+
a2ui: import("@copilotkit/core").ɵA2UIBaseOptions & {
|
|
28
22
|
theme?: import("..").A2UITheme;
|
|
29
23
|
catalog?: any;
|
|
30
24
|
loadingComponent?: Component;
|
|
31
|
-
includeSchema?: boolean;
|
|
32
25
|
recovery?: import("..").A2UIRecoveryRendererOptions;
|
|
26
|
+
onAction?: import("@copilotkit/core").ɵA2UIActionInterceptor;
|
|
33
27
|
};
|
|
28
|
+
headers: CopilotKitHeadersSource;
|
|
29
|
+
properties: Record<string, unknown>;
|
|
30
|
+
useSingleEndpoint: boolean;
|
|
31
|
+
agents__unsafe_dev_only: Record<string, import("@ag-ui/client").AbstractAgent>;
|
|
32
|
+
selfManagedAgents: Record<string, import("@ag-ui/client").AbstractAgent>;
|
|
34
33
|
mcpApps: {
|
|
35
34
|
allowSameOriginFallback?: boolean;
|
|
36
35
|
};
|
|
37
|
-
learning: boolean | CopilotKitLearningOptions;
|
|
36
|
+
learning: boolean | import("@copilotkit/core").ɵCopilotKitLearningOptions;
|
|
38
37
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
39
38
|
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
40
39
|
export default _default;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CopilotKitProvider.vue.d.ts","sourceRoot":"","sources":["../../../src/v2/providers/CopilotKitProvider.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"CopilotKitProvider.vue.d.ts","sourceRoot":"","sources":["../../../src/v2/providers/CopilotKitProvider.vue"],"names":[],"mappings":"AAkoBA,OAAO,KAAK,EAAE,SAAS,EAAuB,MAAM,KAAK,CAAC;AAa1D,OAAO,KAAK,EACV,uBAAuB,EAKxB,MAAM,kBAAkB,CAAC;AAsC1B,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,4BAA4B,CAAC;AAC1E,OAAO,KAAK,EACV,eAAe,EACf,0BAA0B,EAC1B,eAAe,EAGhB,MAAM,UAAU,CAAC;AA2lBlB,QAAA,IAAI,OAAO,IAAW,CAAE;AACxB,KAAK,WAAW,GAAG,EAAE,GACnB;IAAE,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,OAAO,KAAK,GAAG,CAAA;CAAE,CAAC;AA0B/C,QAAA,MAAM,eAAe;;;;;;;;wBAnsBrB,CAvkBkB;mBAukBlB,CAvkBuD;;;;aAukBvD,CA7jBW;eA6jBX,CA5jBa;wBA4jBb,CA5jByC;gBA4jBzC,CAnjBkC;gBAmjBlC,CA5iBA;;;;;;;;+BA2wC6p2E,CAAC;;;6EArB5p2E,CAAC;wBACkB,eAAe,CAAC,OAAO,eAAe,EAAE,WAAW,CAAC;AAAzE,wBAA0E;AAa1E,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { InjectionKey } from "vue";
|
|
2
|
+
import type { ɵChatConfigurationStore } from "@copilotkit/core";
|
|
3
|
+
/**
|
|
4
|
+
* The nearest `CopilotChatConfigurationProvider`'s core store, so a nested
|
|
5
|
+
* provider can link its own store to it.
|
|
6
|
+
*/
|
|
7
|
+
export declare const ChatConfigurationStoreKey: InjectionKey<ɵChatConfigurationStore>;
|
|
8
|
+
//# sourceMappingURL=chat-configuration-store-key.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chat-configuration-store-key.d.ts","sourceRoot":"","sources":["../../../src/v2/providers/chat-configuration-store-key.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,KAAK,CAAC;AACxC,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,kBAAkB,CAAC;AAEhE;;;GAGG;AACH,eAAO,MAAM,yBAAyB,EAAE,YAAY,CAAC,uBAAuB,CACnC,CAAC"}
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
import type { Component, InjectionKey } from "vue";
|
|
2
|
-
import type { VueStreamingMarkdownNodeRenderers } from "@copilotkit/markdown
|
|
3
|
-
import type { StreamingMarkdownParserOptions } from "@copilotkit/markdown
|
|
2
|
+
import type { VueStreamingMarkdownCitationClickHandler, VueStreamingMarkdownLinkClickHandler, VueStreamingMarkdownNodeRenderers } from "@copilotkit/markdown/vue";
|
|
3
|
+
import type { StreamingMarkdownParserOptions } from "@copilotkit/markdown";
|
|
4
4
|
/** Config for the built-in Vue default renderer (pass instead of a component). */
|
|
5
5
|
export interface DefaultMarkdownRendererProps {
|
|
6
6
|
nodeRenderers?: VueStreamingMarkdownNodeRenderers;
|
|
7
7
|
caret?: boolean;
|
|
8
8
|
options?: Partial<StreamingMarkdownParserOptions>;
|
|
9
9
|
class?: string;
|
|
10
|
+
onLinkClick?: VueStreamingMarkdownLinkClickHandler;
|
|
11
|
+
onCitationClick?: VueStreamingMarkdownCitationClickHandler;
|
|
10
12
|
}
|
|
11
13
|
export type MarkdownRendererValue = Component | DefaultMarkdownRendererProps;
|
|
12
14
|
/** Injection key for a global markdown renderer component (or `undefined`). */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"markdown-renderer.d.ts","sourceRoot":"","sources":["../../../src/v2/providers/markdown-renderer.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,KAAK,CAAC;AACnD,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"markdown-renderer.d.ts","sourceRoot":"","sources":["../../../src/v2/providers/markdown-renderer.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,KAAK,CAAC;AACnD,OAAO,KAAK,EACV,wCAAwC,EACxC,oCAAoC,EACpC,iCAAiC,EAClC,MAAM,0BAA0B,CAAC;AAClC,OAAO,KAAK,EAAE,8BAA8B,EAAE,MAAM,sBAAsB,CAAC;AAE3E,kFAAkF;AAClF,MAAM,WAAW,4BAA4B;IAC3C,aAAa,CAAC,EAAE,iCAAiC,CAAC;IAClD,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,OAAO,CAAC,EAAE,OAAO,CAAC,8BAA8B,CAAC,CAAC;IAClD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,oCAAoC,CAAC;IACnD,eAAe,CAAC,EAAE,wCAAwC,CAAC;CAC5D;AAED,MAAM,MAAM,qBAAqB,GAAG,SAAS,GAAG,4BAA4B,CAAC;AAE7E,+EAA+E;AAC/E,eAAO,MAAM,qBAAqB,EAAE,YAAY,CAC9C,qBAAqB,GAAG,SAAS,CACO,CAAC;AAE3C;;;;;GAKG;AACH,wBAAgB,mBAAmB,IAAI,qBAAqB,GAAG,SAAS,CAEvE;AAED,yFAAyF;AACzF,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,SAAS,CAOzE"}
|
|
@@ -1,49 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
readonly chatInputToolbarCancelTranscribeButtonLabel: "Cancel";
|
|
5
|
-
readonly chatInputToolbarFinishTranscribeButtonLabel: "Finish";
|
|
6
|
-
readonly chatInputToolbarAddButtonLabel: "Add photos or files";
|
|
7
|
-
readonly chatInputToolbarToolsButtonLabel: "Tools";
|
|
8
|
-
readonly chatInputToolbarSendButtonLabel: "Send message";
|
|
9
|
-
readonly chatInputToolbarStopButtonLabel: "Stop";
|
|
10
|
-
readonly assistantMessageToolbarCopyCodeLabel: "Copy";
|
|
11
|
-
readonly assistantMessageToolbarCopyCodeCopiedLabel: "Copied";
|
|
12
|
-
readonly assistantMessageToolbarCopyMessageLabel: "Copy";
|
|
13
|
-
readonly assistantMessageToolbarInspectorLabel: "View in Inspector";
|
|
14
|
-
readonly assistantMessageToolbarInspectorDescription: "Open this message in the Inspector";
|
|
15
|
-
readonly assistantMessageToolbarInspectorLocalOnlyLabel: "Local only";
|
|
16
|
-
readonly assistantMessageToolbarInspectorLocalOnlyDescription: "Only visible on localhost or loopback hosts in development. Never shown in production.";
|
|
17
|
-
readonly assistantMessageToolbarInspectorTitle: "CopilotKit Inspector";
|
|
18
|
-
readonly assistantMessageToolbarInspectorHideLabel: "Hide this icon";
|
|
19
|
-
readonly assistantMessageToolbarInspectorHideDescription: "Until you reload this page";
|
|
20
|
-
readonly assistantMessageToolbarThumbsUpLabel: "Good response";
|
|
21
|
-
readonly assistantMessageToolbarThumbsDownLabel: "Bad response";
|
|
22
|
-
readonly assistantMessageFeedbackCommentPlaceholder: "Add a comment (optional)";
|
|
23
|
-
readonly assistantMessageFeedbackCommentSubmitLabel: "Send comment";
|
|
24
|
-
readonly assistantMessageToolbarReadAloudLabel: "Read aloud";
|
|
25
|
-
readonly assistantMessageToolbarRegenerateLabel: "Regenerate";
|
|
26
|
-
readonly userMessageToolbarCopyMessageLabel: "Copy";
|
|
27
|
-
readonly userMessageToolbarEditMessageLabel: "Edit";
|
|
28
|
-
readonly userMessageToolbarPreviousBranchLabel: "Previous branch";
|
|
29
|
-
readonly userMessageToolbarNextBranchLabel: "Next branch";
|
|
30
|
-
readonly chatDisclaimerText: "AI can make mistakes. Please verify important information.";
|
|
31
|
-
readonly chatToggleOpenLabel: "Open chat";
|
|
32
|
-
readonly chatToggleCloseLabel: "Close chat";
|
|
33
|
-
readonly chatScrollToBottomLabel: "Scroll to bottom";
|
|
34
|
-
readonly modalHeaderTitle: "CopilotKit Chat";
|
|
35
|
-
readonly welcomeMessageText: "How can I help you today?";
|
|
36
|
-
readonly reasoningMessageThinkingLabel: "Thinking…";
|
|
37
|
-
readonly chatInputSlashMenuLabel: "Slash commands";
|
|
38
|
-
readonly chatInputSlashMenuEmptyText: "No commands found";
|
|
39
|
-
readonly attachmentRemoveButtonLabel: "Remove attachment";
|
|
40
|
-
readonly attachmentPlayVideoButtonLabel: "Play video";
|
|
41
|
-
readonly attachmentPreviewCloseButtonLabel: "Close preview";
|
|
42
|
-
readonly modalHeaderCloseButtonLabel: "Close";
|
|
43
|
-
readonly modalHeaderThreadsButtonLabel: "Open threads";
|
|
44
|
-
readonly sidebarLabel: "Copilot chat sidebar";
|
|
45
|
-
};
|
|
46
|
-
export type CopilotChatLabels = typeof CopilotChatDefaultLabels;
|
|
1
|
+
import type { CopilotChatLabels } from "@copilotkit/core";
|
|
2
|
+
export { CopilotChatDefaultLabels } from "@copilotkit/core";
|
|
3
|
+
export type { CopilotChatLabels } from "@copilotkit/core";
|
|
47
4
|
export interface CopilotChatConfigurationValue {
|
|
48
5
|
labels: CopilotChatLabels;
|
|
49
6
|
agentId: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/v2/providers/types.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/v2/providers/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAE1D,OAAO,EAAE,wBAAwB,EAAE,MAAM,kBAAkB,CAAC;AAC5D,YAAY,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAE1D,MAAM,WAAW,6BAA6B;IAC5C,MAAM,EAAE,iBAAiB,CAAC;IAC1B,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;IACjB;;;;;OAKG;IACH,mBAAmB,EAAE,OAAO,CAAC;IAC7B,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IACvC;;;;OAIG;IACH,iBAAiB,EAAE,CACjB,QAAQ,EAAE,MAAM,EAChB,OAAO,CAAC,EAAE;QAAE,QAAQ,CAAC,EAAE,OAAO,CAAA;KAAE,KAC7B,IAAI,CAAC;IACV;;;OAGG;IACH,cAAc,EAAE,MAAM,IAAI,CAAC;IAC3B,4DAA4D;IAC5D,UAAU,EAAE,OAAO,CAAC;IACpB;;;OAGG;IACH,aAAa,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IACvC,gFAAgF;IAChF,gBAAgB,EAAE,OAAO,CAAC;IAC1B,yEAAyE;IACzE,cAAc,EAAE,MAAM,MAAM,IAAI,CAAC;CAClC"}
|
|
@@ -1,4 +1,9 @@
|
|
|
1
1
|
import type { Ref } from "vue";
|
|
2
|
+
/**
|
|
3
|
+
* Apply the Inspector's "view this thread" requests to a chat. Core's
|
|
4
|
+
* `ɵInspectorThreadOverride` owns the state machine; this composable binds it
|
|
5
|
+
* to the component's lifetime and Vue reactivity.
|
|
6
|
+
*/
|
|
2
7
|
export declare function useInspectorThreadOverride(args: {
|
|
3
8
|
agentId: Ref<string>;
|
|
4
9
|
baseThreadId: Ref<string>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-inspector-thread-override.d.ts","sourceRoot":"","sources":["../../../src/v2/providers/use-inspector-thread-override.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"use-inspector-thread-override.d.ts","sourceRoot":"","sources":["../../../src/v2/providers/use-inspector-thread-override.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAG/B;;;;GAIG;AACH,wBAAgB,0BAA0B,CAAC,IAAI,EAAE;IAC/C,OAAO,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;IACrB,YAAY,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;CAC3B,GAAG;IACF,iBAAiB,EAAE,GAAG,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC;IACtC,kBAAkB,EAAE,GAAG,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC;IACvC,qBAAqB,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,IAAI,CAAC;CACpD,CAwBA"}
|
|
@@ -6,7 +6,7 @@ export declare function defineToolCallRenderer(def: {
|
|
|
6
6
|
render: VueToolCallRendererRenderFn<unknown>;
|
|
7
7
|
agentId?: string;
|
|
8
8
|
group?: boolean;
|
|
9
|
-
}): VueToolCallRenderer
|
|
9
|
+
}): VueToolCallRenderer;
|
|
10
10
|
export declare function defineToolCallRenderer<S extends StandardSchemaV1>(def: {
|
|
11
11
|
name: string;
|
|
12
12
|
args: S;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"defineToolCallRenderer.d.ts","sourceRoot":"","sources":["../../../src/v2/types/defineToolCallRenderer.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAC9E,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AACpE,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,0BAA0B,CAAC;AAE5E,wBAAgB,sBAAsB,CAAC,GAAG,EAAE;IAC1C,IAAI,EAAE,GAAG,CAAC;IACV,MAAM,EAAE,2BAA2B,CAAC,OAAO,CAAC,CAAC;IAC7C,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB,GAAG,mBAAmB,CAAC
|
|
1
|
+
{"version":3,"file":"defineToolCallRenderer.d.ts","sourceRoot":"","sources":["../../../src/v2/types/defineToolCallRenderer.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAC9E,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AACpE,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,0BAA0B,CAAC;AAE5E,wBAAgB,sBAAsB,CAAC,GAAG,EAAE;IAC1C,IAAI,EAAE,GAAG,CAAC;IACV,MAAM,EAAE,2BAA2B,CAAC,OAAO,CAAC,CAAC;IAC7C,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB,GAAG,mBAAmB,CAAC;AAExB,wBAAgB,sBAAsB,CAAC,CAAC,SAAS,gBAAgB,EAAE,GAAG,EAAE;IACtE,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,CAAC,CAAC;IACR,MAAM,EAAE,2BAA2B,CAAC,iBAAiB,CAAC,CAAC,CAAC,CAAC,CAAC;IAC1D,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB,GAAG,mBAAmB,CAAC,iBAAiB,CAAC,CAAC,CAAC,CAAC,CAAC"}
|
|
@@ -1,33 +1,12 @@
|
|
|
1
|
-
import type { FrontendTool,
|
|
1
|
+
import type { FrontendTool, HumanInTheLoopRenderProps } from "@copilotkit/core";
|
|
2
2
|
import type { Component, VNodeChild } from "vue";
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
result: undefined;
|
|
11
|
-
respond: undefined;
|
|
12
|
-
} | {
|
|
13
|
-
name: string;
|
|
14
|
-
description: string;
|
|
15
|
-
toolCallId: string;
|
|
16
|
-
agentId?: string;
|
|
17
|
-
args: T;
|
|
18
|
-
status: ToolCallStatus.Executing;
|
|
19
|
-
result: undefined;
|
|
20
|
-
respond: (result: unknown) => Promise<void>;
|
|
21
|
-
} | {
|
|
22
|
-
name: string;
|
|
23
|
-
description: string;
|
|
24
|
-
toolCallId: string;
|
|
25
|
-
agentId?: string;
|
|
26
|
-
args: T;
|
|
27
|
-
status: ToolCallStatus.Complete;
|
|
28
|
-
result: string;
|
|
29
|
-
respond: undefined;
|
|
30
|
-
};
|
|
3
|
+
/**
|
|
4
|
+
* Props a Vue human-in-the-loop renderer receives. Same as core's
|
|
5
|
+
* `HumanInTheLoopRenderProps`.
|
|
6
|
+
*
|
|
7
|
+
* @typeParam T - The shape of the tool arguments.
|
|
8
|
+
*/
|
|
9
|
+
export type VueHumanInTheLoopRenderProps<T> = HumanInTheLoopRenderProps<T>;
|
|
31
10
|
export type VueHumanInTheLoopRenderFn<T> = ((props: VueHumanInTheLoopRenderProps<T>) => VNodeChild) | Component<VueHumanInTheLoopRenderProps<T>>;
|
|
32
11
|
export type VueHumanInTheLoop<T extends Record<string, unknown> = Record<string, unknown>> = Omit<FrontendTool<T>, "handler"> & {
|
|
33
12
|
render: VueHumanInTheLoopRenderFn<T>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"human-in-the-loop.d.ts","sourceRoot":"","sources":["../../../src/v2/types/human-in-the-loop.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,
|
|
1
|
+
{"version":3,"file":"human-in-the-loop.d.ts","sourceRoot":"","sources":["../../../src/v2/types/human-in-the-loop.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,yBAAyB,EAAE,MAAM,kBAAkB,CAAC;AAChF,OAAO,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,KAAK,CAAC;AAEjD;;;;;GAKG;AACH,MAAM,MAAM,4BAA4B,CAAC,CAAC,IAAI,yBAAyB,CAAC,CAAC,CAAC,CAAC;AAE3E,MAAM,MAAM,yBAAyB,CAAC,CAAC,IACnC,CAAC,CAAC,KAAK,EAAE,4BAA4B,CAAC,CAAC,CAAC,KAAK,UAAU,CAAC,GACxD,SAAS,CAAC,4BAA4B,CAAC,CAAC,CAAC,CAAC,CAAC;AAE/C,MAAM,MAAM,iBAAiB,CAC3B,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,IACzD,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC,EAAE,SAAS,CAAC,GAAG;IACrC,MAAM,EAAE,yBAAyB,CAAC,CAAC,CAAC,CAAC;CACtC,CAAC"}
|
|
@@ -1,23 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
export interface InterruptEvent<TValue = unknown> {
|
|
3
|
-
name: string;
|
|
4
|
-
value: TValue;
|
|
5
|
-
}
|
|
6
|
-
export type InterruptResolveFn = (payload?: unknown, interruptId?: string) => Promise<RunAgentResult | void>;
|
|
7
|
-
export type InterruptCancelFn = (interruptId?: string) => Promise<RunAgentResult | void>;
|
|
8
|
-
export interface InterruptHandlerProps<TValue = unknown> {
|
|
9
|
-
event: InterruptEvent<TValue>;
|
|
10
|
-
interrupt: Interrupt | null;
|
|
11
|
-
interrupts: Interrupt[];
|
|
12
|
-
resolve: InterruptResolveFn;
|
|
13
|
-
cancel: InterruptCancelFn;
|
|
14
|
-
}
|
|
15
|
-
export interface InterruptRenderProps<TValue = unknown, TResult = unknown> {
|
|
16
|
-
event: InterruptEvent<TValue>;
|
|
17
|
-
interrupt: Interrupt | null;
|
|
18
|
-
interrupts: Interrupt[];
|
|
19
|
-
result: TResult;
|
|
20
|
-
resolve: InterruptResolveFn;
|
|
21
|
-
cancel: InterruptCancelFn;
|
|
22
|
-
}
|
|
1
|
+
export type { InterruptEvent, InterruptResolveFn, InterruptCancelFn, InterruptHandlerProps, InterruptRenderProps, } from "@copilotkit/core";
|
|
23
2
|
//# sourceMappingURL=interrupt.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"interrupt.d.ts","sourceRoot":"","sources":["../../../src/v2/types/interrupt.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"interrupt.d.ts","sourceRoot":"","sources":["../../../src/v2/types/interrupt.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,cAAc,EACd,kBAAkB,EAClB,iBAAiB,EACjB,qBAAqB,EACrB,oBAAoB,GACrB,MAAM,kBAAkB,CAAC"}
|
|
@@ -1,18 +1,19 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type { AbstractAgent } from "@ag-ui/client";
|
|
3
|
-
import type { z } from "zod";
|
|
1
|
+
import type { ActivityMessageRenderProps, ActivityMessageRendererDef } from "@copilotkit/core";
|
|
4
2
|
import type { Component, VNodeChild } from "vue";
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
3
|
+
/**
|
|
4
|
+
* Props a Vue activity message renderer receives. Same as core's
|
|
5
|
+
* `ActivityMessageRenderProps`.
|
|
6
|
+
*
|
|
7
|
+
* @typeParam TActivityContent - The shape of the activity content.
|
|
8
|
+
*/
|
|
9
|
+
export type VueActivityMessageRendererProps<TActivityContent> = ActivityMessageRenderProps<TActivityContent>;
|
|
11
10
|
export type VueActivityMessageRendererRenderFn<TActivityContent> = ((props: VueActivityMessageRendererProps<TActivityContent>) => VNodeChild) | Component<VueActivityMessageRendererProps<TActivityContent>>;
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
11
|
+
/**
|
|
12
|
+
* A Vue activity message renderer registration. `content` takes any
|
|
13
|
+
* Standard Schema (zod, valibot, arktype, and so on). The chat validates the
|
|
14
|
+
* activity content with it and passes the result to `render`.
|
|
15
|
+
*
|
|
16
|
+
* @typeParam TActivityContent - The shape of the activity content.
|
|
17
|
+
*/
|
|
18
|
+
export type VueActivityMessageRenderer<TActivityContent> = ActivityMessageRendererDef<TActivityContent, VueActivityMessageRendererRenderFn<TActivityContent>>;
|
|
18
19
|
//# sourceMappingURL=vue-activity-message-renderer.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vue-activity-message-renderer.d.ts","sourceRoot":"","sources":["../../../src/v2/types/vue-activity-message-renderer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"vue-activity-message-renderer.d.ts","sourceRoot":"","sources":["../../../src/v2/types/vue-activity-message-renderer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,0BAA0B,EAC1B,0BAA0B,EAC3B,MAAM,kBAAkB,CAAC;AAC1B,OAAO,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,KAAK,CAAC;AAEjD;;;;;GAKG;AACH,MAAM,MAAM,+BAA+B,CAAC,gBAAgB,IAC1D,0BAA0B,CAAC,gBAAgB,CAAC,CAAC;AAE/C,MAAM,MAAM,kCAAkC,CAAC,gBAAgB,IAC3D,CAAC,CAAC,KAAK,EAAE,+BAA+B,CAAC,gBAAgB,CAAC,KAAK,UAAU,CAAC,GAC1E,SAAS,CAAC,+BAA+B,CAAC,gBAAgB,CAAC,CAAC,CAAC;AAEjE;;;;;;GAMG;AACH,MAAM,MAAM,0BAA0B,CAAC,gBAAgB,IACrD,0BAA0B,CACxB,gBAAgB,EAChB,kCAAkC,CAAC,gBAAgB,CAAC,CACrD,CAAC"}
|
|
@@ -1,19 +1,10 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { CustomMessageRendererDef, CustomMessageRendererPosition, CustomMessageRenderProps } from "@copilotkit/core";
|
|
2
2
|
import type { Component, VNodeChild } from "vue";
|
|
3
|
-
|
|
4
|
-
export
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
runId: string;
|
|
8
|
-
messageIndex: number;
|
|
9
|
-
messageIndexInRun: number;
|
|
10
|
-
numberOfMessagesInRun: number;
|
|
11
|
-
agentId: string;
|
|
12
|
-
stateSnapshot: unknown;
|
|
13
|
-
}
|
|
3
|
+
/** Where a custom message renderer draws. Same as core's type. */
|
|
4
|
+
export type VueCustomMessageRendererPosition = CustomMessageRendererPosition;
|
|
5
|
+
/** Props a Vue custom message renderer receives. Same as core's type. */
|
|
6
|
+
export type VueCustomMessageRendererProps = CustomMessageRenderProps;
|
|
14
7
|
export type VueCustomMessageRendererRenderFn = ((props: VueCustomMessageRendererProps) => VNodeChild) | Component<VueCustomMessageRendererProps>;
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
render: VueCustomMessageRendererRenderFn;
|
|
18
|
-
}
|
|
8
|
+
/** A Vue custom message renderer registration. */
|
|
9
|
+
export type VueCustomMessageRenderer = CustomMessageRendererDef<VueCustomMessageRendererRenderFn>;
|
|
19
10
|
//# sourceMappingURL=vue-custom-message-renderer.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vue-custom-message-renderer.d.ts","sourceRoot":"","sources":["../../../src/v2/types/vue-custom-message-renderer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"vue-custom-message-renderer.d.ts","sourceRoot":"","sources":["../../../src/v2/types/vue-custom-message-renderer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,wBAAwB,EACxB,6BAA6B,EAC7B,wBAAwB,EACzB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,KAAK,CAAC;AAEjD,kEAAkE;AAClE,MAAM,MAAM,gCAAgC,GAAG,6BAA6B,CAAC;AAE7E,yEAAyE;AACzE,MAAM,MAAM,6BAA6B,GAAG,wBAAwB,CAAC;AAErE,MAAM,MAAM,gCAAgC,GACxC,CAAC,CAAC,KAAK,EAAE,6BAA6B,KAAK,UAAU,CAAC,GACtD,SAAS,CAAC,6BAA6B,CAAC,CAAC;AAE7C,kDAAkD;AAClD,MAAM,MAAM,wBAAwB,GAClC,wBAAwB,CAAC,gCAAgC,CAAC,CAAC"}
|
|
@@ -1,44 +1,25 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type { StandardSchemaV1 } from "@copilotkit/shared";
|
|
1
|
+
import type { ToolCallRenderProps, ToolCallRendererDef } from "@copilotkit/core";
|
|
3
2
|
import type { Component, VNodeChild } from "vue";
|
|
4
3
|
/**
|
|
5
|
-
* Props passed to a Vue tool call render function.
|
|
4
|
+
* Props passed to a Vue tool call render function. Same as core's
|
|
5
|
+
* `ToolCallRenderProps`.
|
|
6
|
+
*
|
|
7
|
+
* @typeParam T - The shape of the tool arguments.
|
|
6
8
|
*/
|
|
7
|
-
export type VueToolCallRendererRenderProps<T> =
|
|
8
|
-
name: string;
|
|
9
|
-
toolCallId: string;
|
|
10
|
-
args: Partial<T>;
|
|
11
|
-
status: ToolCallStatus.InProgress;
|
|
12
|
-
result: undefined;
|
|
13
|
-
} | {
|
|
14
|
-
name: string;
|
|
15
|
-
toolCallId: string;
|
|
16
|
-
args: T;
|
|
17
|
-
status: ToolCallStatus.Executing;
|
|
18
|
-
result: undefined;
|
|
19
|
-
} | {
|
|
20
|
-
name: string;
|
|
21
|
-
toolCallId: string;
|
|
22
|
-
args: T;
|
|
23
|
-
status: ToolCallStatus.Complete;
|
|
24
|
-
result: string;
|
|
25
|
-
};
|
|
9
|
+
export type VueToolCallRendererRenderProps<T> = ToolCallRenderProps<T>;
|
|
26
10
|
/**
|
|
27
11
|
* Vue component or render function for tool call rendering.
|
|
28
12
|
* Component is normalized to (props) => VNodeChild internally.
|
|
29
13
|
*/
|
|
30
14
|
export type VueToolCallRendererRenderFn<T> = ((props: VueToolCallRendererRenderProps<T>) => VNodeChild) | Component<VueToolCallRendererRenderProps<T>>;
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
group?: boolean;
|
|
42
|
-
render: VueToolCallRendererRenderFn<T>;
|
|
43
|
-
}
|
|
15
|
+
type VueToolCallRendererDef<T> = ToolCallRendererDef<T, VueToolCallRendererRenderFn<T>>;
|
|
16
|
+
/**
|
|
17
|
+
* A Vue tool call renderer registration: core's `ToolCallRendererDef` with a
|
|
18
|
+
* Vue render function. `args` is required here. Use `defineToolCallRenderer`
|
|
19
|
+
* to build one; it fills in `args` for a `"*"` renderer that has no schema.
|
|
20
|
+
*
|
|
21
|
+
* @typeParam T - The shape of the tool arguments.
|
|
22
|
+
*/
|
|
23
|
+
export type VueToolCallRenderer<T = unknown> = VueToolCallRendererDef<T> & Required<Pick<VueToolCallRendererDef<T>, "args">>;
|
|
24
|
+
export {};
|
|
44
25
|
//# sourceMappingURL=vue-tool-call-renderer.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vue-tool-call-renderer.d.ts","sourceRoot":"","sources":["../../../src/v2/types/vue-tool-call-renderer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"vue-tool-call-renderer.d.ts","sourceRoot":"","sources":["../../../src/v2/types/vue-tool-call-renderer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,mBAAmB,EACnB,mBAAmB,EACpB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,KAAK,CAAC;AAEjD;;;;;GAKG;AACH,MAAM,MAAM,8BAA8B,CAAC,CAAC,IAAI,mBAAmB,CAAC,CAAC,CAAC,CAAC;AAEvE;;;GAGG;AACH,MAAM,MAAM,2BAA2B,CAAC,CAAC,IACrC,CAAC,CAAC,KAAK,EAAE,8BAA8B,CAAC,CAAC,CAAC,KAAK,UAAU,CAAC,GAC1D,SAAS,CAAC,8BAA8B,CAAC,CAAC,CAAC,CAAC,CAAC;AAEjD,KAAK,sBAAsB,CAAC,CAAC,IAAI,mBAAmB,CAClD,CAAC,EACD,2BAA2B,CAAC,CAAC,CAAC,CAC/B,CAAC;AAEF;;;;;;GAMG;AACH,MAAM,MAAM,mBAAmB,CAAC,CAAC,GAAG,OAAO,IAAI,sBAAsB,CAAC,CAAC,CAAC,GACtE,QAAQ,CAAC,IAAI,CAAC,sBAAsB,CAAC,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,CAAC"}
|