@copilotkit/vue 1.57.1
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/AGENTS.md +50 -0
- package/CHANGELOG.md +13 -0
- package/PARITY.md +434 -0
- package/README.md +396 -0
- package/dist/components/copilot-provider/CopilotKit.vue.d.ts +20 -0
- package/dist/components/copilot-provider/CopilotKit.vue.d.ts.map +1 -0
- package/dist/components/copilot-provider/index.d.ts +3 -0
- package/dist/components/copilot-provider/index.d.ts.map +1 -0
- package/dist/components/copilot-provider/types.d.ts +22 -0
- package/dist/components/copilot-provider/types.d.ts.map +1 -0
- package/dist/hooks/index.d.ts +7 -0
- package/dist/hooks/index.d.ts.map +1 -0
- package/dist/hooks/use-copilot-action.d.ts +27 -0
- package/dist/hooks/use-copilot-action.d.ts.map +1 -0
- package/dist/hooks/use-copilot-readable.d.ts +20 -0
- package/dist/hooks/use-copilot-readable.d.ts.map +1 -0
- package/dist/hooks/use-frontend-tool.d.ts +21 -0
- package/dist/hooks/use-frontend-tool.d.ts.map +1 -0
- package/dist/index.cjs +2 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +10 -0
- package/dist/index.d.mts +10 -0
- package/dist/index.d.ts +10 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.mjs +252 -0
- package/dist/index.mjs.map +1 -0
- package/dist/styles.css +2 -0
- package/dist/use-render-activity-message-BRL1Rpl-.cjs +85 -0
- package/dist/use-render-activity-message-BRL1Rpl-.cjs.map +1 -0
- package/dist/use-render-activity-message-CqtxiFSs.js +8927 -0
- package/dist/use-render-activity-message-CqtxiFSs.js.map +1 -0
- package/dist/v2/components/A2UIMessageRenderer.d.ts +9 -0
- package/dist/v2/components/A2UIMessageRenderer.d.ts.map +1 -0
- package/dist/v2/components/A2UISurfaceActivityRenderer.vue.d.ts +16 -0
- package/dist/v2/components/A2UISurfaceActivityRenderer.vue.d.ts.map +1 -0
- package/dist/v2/components/CopilotKitInspector.vue.d.ts +7 -0
- package/dist/v2/components/CopilotKitInspector.vue.d.ts.map +1 -0
- package/dist/v2/components/InlineFeatureWarning.vue.d.ts +6 -0
- package/dist/v2/components/InlineFeatureWarning.vue.d.ts.map +1 -0
- package/dist/v2/components/LicenseWarningBanner.vue.d.ts +18 -0
- package/dist/v2/components/LicenseWarningBanner.vue.d.ts.map +1 -0
- package/dist/v2/components/MCPAppsActivityRenderer.d.ts +88 -0
- package/dist/v2/components/MCPAppsActivityRenderer.d.ts.map +1 -0
- package/dist/v2/components/OpenGenerativeUIRenderer.d.ts +154 -0
- package/dist/v2/components/OpenGenerativeUIRenderer.d.ts.map +1 -0
- package/dist/v2/components/a2ui/A2UIBuiltInToolCallRenderer.d.ts +19 -0
- package/dist/v2/components/a2ui/A2UIBuiltInToolCallRenderer.d.ts.map +1 -0
- package/dist/v2/components/a2ui/A2UICatalogContext.d.ts +16 -0
- package/dist/v2/components/a2ui/A2UICatalogContext.d.ts.map +1 -0
- package/dist/v2/components/a2ui/VueSurface.d.ts +62 -0
- package/dist/v2/components/a2ui/VueSurface.d.ts.map +1 -0
- package/dist/v2/components/a2ui/adapter.d.ts +38 -0
- package/dist/v2/components/a2ui/adapter.d.ts.map +1 -0
- package/dist/v2/components/a2ui/catalog.d.ts +29 -0
- package/dist/v2/components/a2ui/catalog.d.ts.map +1 -0
- package/dist/v2/components/a2ui/index.d.ts +5 -0
- package/dist/v2/components/a2ui/index.d.ts.map +1 -0
- package/dist/v2/components/a2ui/utils.d.ts +18 -0
- package/dist/v2/components/a2ui/utils.d.ts.map +1 -0
- package/dist/v2/components/a2ui.d.ts +12 -0
- package/dist/v2/components/a2ui.d.ts.map +1 -0
- package/dist/v2/components/chat/CopilotChat.vue.d.ts +50 -0
- package/dist/v2/components/chat/CopilotChat.vue.d.ts.map +1 -0
- package/dist/v2/components/chat/CopilotChatAssistantMessage.vue.d.ts +164 -0
- package/dist/v2/components/chat/CopilotChatAssistantMessage.vue.d.ts.map +1 -0
- package/dist/v2/components/chat/CopilotChatAttachmentQueue.vue.d.ts +12 -0
- package/dist/v2/components/chat/CopilotChatAttachmentQueue.vue.d.ts.map +1 -0
- package/dist/v2/components/chat/CopilotChatAttachmentRenderer.vue.d.ts +7 -0
- package/dist/v2/components/chat/CopilotChatAttachmentRenderer.vue.d.ts.map +1 -0
- package/dist/v2/components/chat/CopilotChatAudioRecorder.vue.d.ts +12 -0
- package/dist/v2/components/chat/CopilotChatAudioRecorder.vue.d.ts.map +1 -0
- package/dist/v2/components/chat/CopilotChatInput.vue.d.ts +290 -0
- package/dist/v2/components/chat/CopilotChatInput.vue.d.ts.map +1 -0
- package/dist/v2/components/chat/CopilotChatMessageView.vue.d.ts +72 -0
- package/dist/v2/components/chat/CopilotChatMessageView.vue.d.ts.map +1 -0
- package/dist/v2/components/chat/CopilotChatReasoningMessage.vue.d.ts +65 -0
- package/dist/v2/components/chat/CopilotChatReasoningMessage.vue.d.ts.map +1 -0
- package/dist/v2/components/chat/CopilotChatSuggestionPill.vue.d.ts +27 -0
- package/dist/v2/components/chat/CopilotChatSuggestionPill.vue.d.ts.map +1 -0
- package/dist/v2/components/chat/CopilotChatSuggestionView.vue.d.ts +26 -0
- package/dist/v2/components/chat/CopilotChatSuggestionView.vue.d.ts.map +1 -0
- package/dist/v2/components/chat/CopilotChatToggleButton.vue.d.ts +17 -0
- package/dist/v2/components/chat/CopilotChatToggleButton.vue.d.ts.map +1 -0
- package/dist/v2/components/chat/CopilotChatToggleButtonCloseIcon.d.ts +5 -0
- package/dist/v2/components/chat/CopilotChatToggleButtonCloseIcon.d.ts.map +1 -0
- package/dist/v2/components/chat/CopilotChatToggleButtonOpenIcon.d.ts +5 -0
- package/dist/v2/components/chat/CopilotChatToggleButtonOpenIcon.d.ts.map +1 -0
- package/dist/v2/components/chat/CopilotChatToolCallsView.vue.d.ts +21 -0
- package/dist/v2/components/chat/CopilotChatToolCallsView.vue.d.ts.map +1 -0
- package/dist/v2/components/chat/CopilotChatUserMessage.vue.d.ts +34 -0
- package/dist/v2/components/chat/CopilotChatUserMessage.vue.d.ts.map +1 -0
- package/dist/v2/components/chat/CopilotChatView.vue.d.ts +106 -0
- package/dist/v2/components/chat/CopilotChatView.vue.d.ts.map +1 -0
- package/dist/v2/components/chat/CopilotModalHeader.vue.d.ts +15 -0
- package/dist/v2/components/chat/CopilotModalHeader.vue.d.ts.map +1 -0
- package/dist/v2/components/chat/CopilotModalHeaderCloseButton.d.ts +5 -0
- package/dist/v2/components/chat/CopilotModalHeaderCloseButton.d.ts.map +1 -0
- package/dist/v2/components/chat/CopilotModalHeaderTitle.d.ts +5 -0
- package/dist/v2/components/chat/CopilotModalHeaderTitle.d.ts.map +1 -0
- package/dist/v2/components/chat/CopilotPopup.vue.d.ts +50 -0
- package/dist/v2/components/chat/CopilotPopup.vue.d.ts.map +1 -0
- package/dist/v2/components/chat/CopilotPopupView.vue.d.ts +55 -0
- package/dist/v2/components/chat/CopilotPopupView.vue.d.ts.map +1 -0
- package/dist/v2/components/chat/CopilotPopupViewInternal.vue.d.ts +55 -0
- package/dist/v2/components/chat/CopilotPopupViewInternal.vue.d.ts.map +1 -0
- package/dist/v2/components/chat/CopilotPopupWelcomeScreen.vue.d.ts +28 -0
- package/dist/v2/components/chat/CopilotPopupWelcomeScreen.vue.d.ts.map +1 -0
- package/dist/v2/components/chat/CopilotSidebar.vue.d.ts +48 -0
- package/dist/v2/components/chat/CopilotSidebar.vue.d.ts.map +1 -0
- package/dist/v2/components/chat/CopilotSidebarView.vue.d.ts +62 -0
- package/dist/v2/components/chat/CopilotSidebarView.vue.d.ts.map +1 -0
- package/dist/v2/components/chat/CopilotSidebarViewInternal.vue.d.ts +53 -0
- package/dist/v2/components/chat/CopilotSidebarViewInternal.vue.d.ts.map +1 -0
- package/dist/v2/components/chat/CopilotSidebarWelcomeScreen.vue.d.ts +28 -0
- package/dist/v2/components/chat/CopilotSidebarWelcomeScreen.vue.d.ts.map +1 -0
- package/dist/v2/components/chat/audioRecorder.d.ts +11 -0
- package/dist/v2/components/chat/audioRecorder.d.ts.map +1 -0
- package/dist/v2/components/chat/index.d.ts +682 -0
- package/dist/v2/components/chat/index.d.ts.map +1 -0
- package/dist/v2/components/chat/last-user-message-context.d.ts +29 -0
- package/dist/v2/components/chat/last-user-message-context.d.ts.map +1 -0
- package/dist/v2/components/chat/normalize-auto-scroll.d.ts +3 -0
- package/dist/v2/components/chat/normalize-auto-scroll.d.ts.map +1 -0
- package/dist/v2/components/chat/types.d.ts +380 -0
- package/dist/v2/components/chat/types.d.ts.map +1 -0
- package/dist/v2/components/icons/index.d.ts +2 -0
- package/dist/v2/components/icons/index.d.ts.map +1 -0
- package/dist/v2/components/index.d.ts +8 -0
- package/dist/v2/components/index.d.ts.map +1 -0
- package/dist/v2/hooks/index.d.ts +24 -0
- package/dist/v2/hooks/index.d.ts.map +1 -0
- package/dist/v2/hooks/use-agent-context.d.ts +24 -0
- package/dist/v2/hooks/use-agent-context.d.ts.map +1 -0
- package/dist/v2/hooks/use-agent.d.ts +53 -0
- package/dist/v2/hooks/use-agent.d.ts.map +1 -0
- package/dist/v2/hooks/use-attachments.d.ts +21 -0
- package/dist/v2/hooks/use-attachments.d.ts.map +1 -0
- package/dist/v2/hooks/use-capabilities.d.ts +16 -0
- package/dist/v2/hooks/use-capabilities.d.ts.map +1 -0
- package/dist/v2/hooks/use-component.d.ts +13 -0
- package/dist/v2/hooks/use-component.d.ts.map +1 -0
- package/dist/v2/hooks/use-configure-suggestions.d.ts +24 -0
- package/dist/v2/hooks/use-configure-suggestions.d.ts.map +1 -0
- package/dist/v2/hooks/use-default-render-tool.d.ts +14 -0
- package/dist/v2/hooks/use-default-render-tool.d.ts.map +1 -0
- package/dist/v2/hooks/use-frontend-tool.d.ts +19 -0
- package/dist/v2/hooks/use-frontend-tool.d.ts.map +1 -0
- package/dist/v2/hooks/use-human-in-the-loop.d.ts +19 -0
- package/dist/v2/hooks/use-human-in-the-loop.d.ts.map +1 -0
- package/dist/v2/hooks/use-interrupt.d.ts +36 -0
- package/dist/v2/hooks/use-interrupt.d.ts.map +1 -0
- package/dist/v2/hooks/use-katex-styles.d.ts +22 -0
- package/dist/v2/hooks/use-katex-styles.d.ts.map +1 -0
- package/dist/v2/hooks/use-keyboard-height.d.ts +33 -0
- package/dist/v2/hooks/use-keyboard-height.d.ts.map +1 -0
- package/dist/v2/hooks/use-pin-to-send.d.ts +28 -0
- package/dist/v2/hooks/use-pin-to-send.d.ts.map +1 -0
- package/dist/v2/hooks/use-render-activity-message.d.ts +21 -0
- package/dist/v2/hooks/use-render-activity-message.d.ts.map +1 -0
- package/dist/v2/hooks/use-render-custom-messages.d.ts +27 -0
- package/dist/v2/hooks/use-render-custom-messages.d.ts.map +1 -0
- package/dist/v2/hooks/use-render-tool.d.ts +36 -0
- package/dist/v2/hooks/use-render-tool.d.ts.map +1 -0
- package/dist/v2/hooks/use-suggestions.d.ts +26 -0
- package/dist/v2/hooks/use-suggestions.d.ts.map +1 -0
- package/dist/v2/hooks/use-threads.d.ts +42 -0
- package/dist/v2/hooks/use-threads.d.ts.map +1 -0
- package/dist/v2/index.cjs +2 -0
- package/dist/v2/index.cjs.map +1 -0
- package/dist/v2/index.d.cts +9 -0
- package/dist/v2/index.d.mts +9 -0
- package/dist/v2/index.d.ts +9 -0
- package/dist/v2/index.d.ts.map +1 -0
- package/dist/v2/index.mjs +75 -0
- package/dist/v2/index.mjs.map +1 -0
- package/dist/v2/lib/processPartialHtml.d.ts +3 -0
- package/dist/v2/lib/processPartialHtml.d.ts.map +1 -0
- package/dist/v2/lib/shallow-stable.d.ts +7 -0
- package/dist/v2/lib/shallow-stable.d.ts.map +1 -0
- package/dist/v2/lib/transcription-client.d.ts +19 -0
- package/dist/v2/lib/transcription-client.d.ts.map +1 -0
- package/dist/v2/lib/vue-core.d.ts +47 -0
- package/dist/v2/lib/vue-core.d.ts.map +1 -0
- package/dist/v2/providers/CopilotChatConfigurationProvider.types.d.ts +15 -0
- package/dist/v2/providers/CopilotChatConfigurationProvider.types.d.ts.map +1 -0
- package/dist/v2/providers/CopilotChatConfigurationProvider.vue.d.ts +17 -0
- package/dist/v2/providers/CopilotChatConfigurationProvider.vue.d.ts.map +1 -0
- package/dist/v2/providers/CopilotKitProvider.types.d.ts +61 -0
- package/dist/v2/providers/CopilotKitProvider.types.d.ts.map +1 -0
- package/dist/v2/providers/CopilotKitProvider.vue.d.ts +37 -0
- package/dist/v2/providers/CopilotKitProvider.vue.d.ts.map +1 -0
- package/dist/v2/providers/SandboxFunctionsContext.d.ts +4 -0
- package/dist/v2/providers/SandboxFunctionsContext.d.ts.map +1 -0
- package/dist/v2/providers/index.d.ts +13 -0
- package/dist/v2/providers/index.d.ts.map +1 -0
- package/dist/v2/providers/keys.d.ts +17 -0
- package/dist/v2/providers/keys.d.ts.map +1 -0
- package/dist/v2/providers/license-context.d.ts +7 -0
- package/dist/v2/providers/license-context.d.ts.map +1 -0
- package/dist/v2/providers/types.d.ts +38 -0
- package/dist/v2/providers/types.d.ts.map +1 -0
- package/dist/v2/providers/useCopilotChatConfiguration.d.ts +4 -0
- package/dist/v2/providers/useCopilotChatConfiguration.d.ts.map +1 -0
- package/dist/v2/providers/useCopilotKit.d.ts +2 -0
- package/dist/v2/providers/useCopilotKit.d.ts.map +1 -0
- package/dist/v2/providers/useLicenseContext.d.ts +14 -0
- package/dist/v2/providers/useLicenseContext.d.ts.map +1 -0
- package/dist/v2/types/a2ui.d.ts +5 -0
- package/dist/v2/types/a2ui.d.ts.map +1 -0
- package/dist/v2/types/defineToolCallRenderer.d.ts +15 -0
- package/dist/v2/types/defineToolCallRenderer.d.ts.map +1 -0
- package/dist/v2/types/frontend-tool.d.ts +6 -0
- package/dist/v2/types/frontend-tool.d.ts.map +1 -0
- package/dist/v2/types/human-in-the-loop.d.ts +29 -0
- package/dist/v2/types/human-in-the-loop.d.ts.map +1 -0
- package/dist/v2/types/index.d.ts +10 -0
- package/dist/v2/types/index.d.ts.map +1 -0
- package/dist/v2/types/interrupt.d.ts +14 -0
- package/dist/v2/types/interrupt.d.ts.map +1 -0
- package/dist/v2/types/sandbox-function.d.ts +8 -0
- package/dist/v2/types/sandbox-function.d.ts.map +1 -0
- package/dist/v2/types/vue-activity-message-renderer.d.ts +18 -0
- package/dist/v2/types/vue-activity-message-renderer.d.ts.map +1 -0
- package/dist/v2/types/vue-custom-message-renderer.d.ts +19 -0
- package/dist/v2/types/vue-custom-message-renderer.d.ts.map +1 -0
- package/dist/v2/types/vue-tool-call-renderer.d.ts +37 -0
- package/dist/v2/types/vue-tool-call-renderer.d.ts.map +1 -0
- package/env.d.ts +7 -0
- package/eslint.config.mjs +42 -0
- package/package.json +130 -0
- package/scripts/scope-preflight.mjs +100 -0
- package/src/components/copilot-provider/CopilotKit.vue +18 -0
- package/src/components/copilot-provider/index.ts +2 -0
- package/src/components/copilot-provider/types.ts +24 -0
- package/src/hooks/index.ts +9 -0
- package/src/hooks/use-copilot-action.ts +168 -0
- package/src/hooks/use-copilot-readable.ts +75 -0
- package/src/hooks/use-frontend-tool.ts +76 -0
- package/src/index.ts +12 -0
- package/src/styles/globals.css +314 -0
- package/src/v2/__tests__/exports.test.ts +35 -0
- package/src/v2/__tests__/mocks/web-inspector.ts +5 -0
- package/src/v2/__tests__/setup.ts +141 -0
- package/src/v2/__tests__/utils/agents.ts +391 -0
- package/src/v2/__tests__/utils/mount.ts +83 -0
- package/src/v2/__tests__/utils/test-helpers.ts +712 -0
- package/src/v2/components/A2UIMessageRenderer.ts +125 -0
- package/src/v2/components/A2UISurfaceActivityRenderer.vue +186 -0
- package/src/v2/components/CopilotKitInspector.vue +42 -0
- package/src/v2/components/InlineFeatureWarning.vue +35 -0
- package/src/v2/components/LicenseWarningBanner.vue +196 -0
- package/src/v2/components/MCPAppsActivityRenderer.ts +778 -0
- package/src/v2/components/OpenGenerativeUIRenderer.ts +550 -0
- package/src/v2/components/__tests__/A2UIMessageRenderer.test.ts +271 -0
- package/src/v2/components/__tests__/CopilotKitInspector.test.ts +57 -0
- package/src/v2/components/__tests__/MCPAppsActivityRenderer.e2e.test.ts +851 -0
- package/src/v2/components/__tests__/MCPAppsActivityRenderer.test.ts +237 -0
- package/src/v2/components/__tests__/OpenGenerativeUIRenderer.test.ts +516 -0
- package/src/v2/components/a2ui/A2UIBuiltInToolCallRenderer.ts +295 -0
- package/src/v2/components/a2ui/A2UICatalogContext.ts +190 -0
- package/src/v2/components/a2ui/VueSurface.ts +144 -0
- package/src/v2/components/a2ui/adapter.ts +156 -0
- package/src/v2/components/a2ui/catalog.ts +858 -0
- package/src/v2/components/a2ui/index.ts +7 -0
- package/src/v2/components/a2ui/utils.ts +67 -0
- package/src/v2/components/a2ui.ts +30 -0
- package/src/v2/components/chat/CopilotChat.vue +777 -0
- package/src/v2/components/chat/CopilotChatAssistantMessage.vue +891 -0
- package/src/v2/components/chat/CopilotChatAttachmentQueue.vue +411 -0
- package/src/v2/components/chat/CopilotChatAttachmentRenderer.vue +87 -0
- package/src/v2/components/chat/CopilotChatAudioRecorder.vue +269 -0
- package/src/v2/components/chat/CopilotChatInput.vue +1271 -0
- package/src/v2/components/chat/CopilotChatMessageView.vue +476 -0
- package/src/v2/components/chat/CopilotChatReasoningMessage.vue +247 -0
- package/src/v2/components/chat/CopilotChatSuggestionPill.vue +56 -0
- package/src/v2/components/chat/CopilotChatSuggestionView.vue +93 -0
- package/src/v2/components/chat/CopilotChatToggleButton.vue +145 -0
- package/src/v2/components/chat/CopilotChatToggleButtonCloseIcon.ts +17 -0
- package/src/v2/components/chat/CopilotChatToggleButtonOpenIcon.ts +18 -0
- package/src/v2/components/chat/CopilotChatToolCallsView.vue +161 -0
- package/src/v2/components/chat/CopilotChatUserMessage.vue +322 -0
- package/src/v2/components/chat/CopilotChatView.vue +740 -0
- package/src/v2/components/chat/CopilotModalHeader.vue +73 -0
- package/src/v2/components/chat/CopilotModalHeaderCloseButton.ts +38 -0
- package/src/v2/components/chat/CopilotModalHeaderTitle.ts +22 -0
- package/src/v2/components/chat/CopilotPopup.vue +182 -0
- package/src/v2/components/chat/CopilotPopupView.vue +168 -0
- package/src/v2/components/chat/CopilotPopupViewInternal.vue +453 -0
- package/src/v2/components/chat/CopilotPopupWelcomeScreen.vue +140 -0
- package/src/v2/components/chat/CopilotSidebar.vue +178 -0
- package/src/v2/components/chat/CopilotSidebarView.vue +172 -0
- package/src/v2/components/chat/CopilotSidebarViewInternal.vue +366 -0
- package/src/v2/components/chat/CopilotSidebarWelcomeScreen.vue +142 -0
- package/src/v2/components/chat/__tests__/CopilotChat.attachments.test.ts +237 -0
- package/src/v2/components/chat/__tests__/CopilotChat.e2e.test.ts +1240 -0
- package/src/v2/components/chat/__tests__/CopilotChat.licenseWarning.test.ts +138 -0
- package/src/v2/components/chat/__tests__/CopilotChat.onError.test.ts +85 -0
- package/src/v2/components/chat/__tests__/CopilotChat.slots.e2e.test.ts +141 -0
- package/src/v2/components/chat/__tests__/CopilotChat.test.ts +652 -0
- package/src/v2/components/chat/__tests__/CopilotChatActivityRendering.e2e.test.ts +683 -0
- package/src/v2/components/chat/__tests__/CopilotChatAssistantMessage.slots.e2e.test.ts +768 -0
- package/src/v2/components/chat/__tests__/CopilotChatAssistantMessage.test.ts +1108 -0
- package/src/v2/components/chat/__tests__/CopilotChatAssistantMessage.thumbs.test.ts +87 -0
- package/src/v2/components/chat/__tests__/CopilotChatAttachmentQueue.test.ts +277 -0
- package/src/v2/components/chat/__tests__/CopilotChatAttachmentRenderer.test.ts +124 -0
- package/src/v2/components/chat/__tests__/CopilotChatCopyButton.clipboard.test.ts +230 -0
- package/src/v2/components/chat/__tests__/CopilotChatInput.bottomAnchored.test.ts +83 -0
- package/src/v2/components/chat/__tests__/CopilotChatInput.slots.e2e.test.ts +1139 -0
- package/src/v2/components/chat/__tests__/CopilotChatInput.test.ts +1051 -0
- package/src/v2/components/chat/__tests__/CopilotChatMessageView.slots.e2e.test.ts +141 -0
- package/src/v2/components/chat/__tests__/CopilotChatMessageView.test.ts +494 -0
- package/src/v2/components/chat/__tests__/CopilotChatPropsRerender.e2e.test.ts +181 -0
- package/src/v2/components/chat/__tests__/CopilotChatReasoningMessage.test.ts +73 -0
- package/src/v2/components/chat/__tests__/CopilotChatSuggestionPill.test.ts +73 -0
- package/src/v2/components/chat/__tests__/CopilotChatSuggestionView.slots.e2e.test.ts +674 -0
- package/src/v2/components/chat/__tests__/CopilotChatSuggestionView.test.ts +91 -0
- package/src/v2/components/chat/__tests__/CopilotChatToggleButton.test.ts +93 -0
- package/src/v2/components/chat/__tests__/CopilotChatToolCallsView.test.ts +382 -0
- package/src/v2/components/chat/__tests__/CopilotChatToolRendering.e2e.test.ts +1019 -0
- package/src/v2/components/chat/__tests__/CopilotChatToolRerenders.e2e.test.ts +516 -0
- package/src/v2/components/chat/__tests__/CopilotChatUserMessage.slots.e2e.test.ts +701 -0
- package/src/v2/components/chat/__tests__/CopilotChatUserMessage.test.ts +337 -0
- package/src/v2/components/chat/__tests__/CopilotChatView.connectingGate.test.ts +135 -0
- package/src/v2/components/chat/__tests__/CopilotChatView.inputOverlay.test.ts +278 -0
- package/src/v2/components/chat/__tests__/CopilotChatView.onClick.e2e.test.ts +1082 -0
- package/src/v2/components/chat/__tests__/CopilotChatView.pinToSend.test.ts +166 -0
- package/src/v2/components/chat/__tests__/CopilotChatView.slots.e2e.test.ts +1145 -0
- package/src/v2/components/chat/__tests__/CopilotChatView.test.ts +374 -0
- package/src/v2/components/chat/__tests__/CopilotModalHeader.slots.e2e.test.ts +636 -0
- package/src/v2/components/chat/__tests__/CopilotModalHeader.test.ts +112 -0
- package/src/v2/components/chat/__tests__/CopilotPopup.test.ts +58 -0
- package/src/v2/components/chat/__tests__/CopilotPopupView.slots.e2e.test.ts +725 -0
- package/src/v2/components/chat/__tests__/CopilotPopupView.test.ts +112 -0
- package/src/v2/components/chat/__tests__/CopilotSidebar.test.ts +58 -0
- package/src/v2/components/chat/__tests__/CopilotSidebarView.slots.e2e.test.ts +603 -0
- package/src/v2/components/chat/__tests__/CopilotSidebarView.test.ts +214 -0
- package/src/v2/components/chat/__tests__/MCPAppsUiMessage.e2e.test.ts +394 -0
- package/src/v2/components/chat/__tests__/copilot-chat-throttle.test.ts +82 -0
- package/src/v2/components/chat/__tests__/normalize-auto-scroll.test.ts +39 -0
- package/src/v2/components/chat/audioRecorder.ts +15 -0
- package/src/v2/components/chat/index.ts +52 -0
- package/src/v2/components/chat/last-user-message-context.ts +39 -0
- package/src/v2/components/chat/normalize-auto-scroll.ts +17 -0
- package/src/v2/components/chat/types.ts +481 -0
- package/src/v2/components/icons/__tests__/icons.test.ts +86 -0
- package/src/v2/components/icons/index.ts +22 -0
- package/src/v2/components/index.ts +7 -0
- package/src/v2/hooks/__tests__/standard-schema-types.test.ts +149 -0
- package/src/v2/hooks/__tests__/standard-schema.test.ts +315 -0
- package/src/v2/hooks/__tests__/use-agent-context-timing.e2e.test.ts +144 -0
- package/src/v2/hooks/__tests__/use-agent-context.test.ts +271 -0
- package/src/v2/hooks/__tests__/use-agent-error-state.test.ts +64 -0
- package/src/v2/hooks/__tests__/use-agent-stability.test.ts +268 -0
- package/src/v2/hooks/__tests__/use-agent-thread-isolation.test.ts +433 -0
- package/src/v2/hooks/__tests__/use-agent-throttle.test.ts +747 -0
- package/src/v2/hooks/__tests__/use-agent.e2e.test.ts +187 -0
- package/src/v2/hooks/__tests__/use-agent.test.ts +126 -0
- package/src/v2/hooks/__tests__/use-attachments.test.ts +181 -0
- package/src/v2/hooks/__tests__/use-component.test.ts +145 -0
- package/src/v2/hooks/__tests__/use-configure-suggestions.e2e.test.ts +527 -0
- package/src/v2/hooks/__tests__/use-configure-suggestions.test.ts +399 -0
- package/src/v2/hooks/__tests__/use-default-render-tool.test.ts +214 -0
- package/src/v2/hooks/__tests__/use-frontend-tool-available.test.ts +220 -0
- package/src/v2/hooks/__tests__/use-frontend-tool.e2e.test.ts +2320 -0
- package/src/v2/hooks/__tests__/use-frontend-tool.test.ts +648 -0
- package/src/v2/hooks/__tests__/use-human-in-the-loop.e2e.test.ts +1379 -0
- package/src/v2/hooks/__tests__/use-human-in-the-loop.test.ts +282 -0
- package/src/v2/hooks/__tests__/use-interrupt.test.ts +345 -0
- package/src/v2/hooks/__tests__/use-katex-styles.test.ts +69 -0
- package/src/v2/hooks/__tests__/use-keyboard-height.test.ts +199 -0
- package/src/v2/hooks/__tests__/use-pin-to-send.test.ts +363 -0
- package/src/v2/hooks/__tests__/use-render-tool.test.ts +329 -0
- package/src/v2/hooks/__tests__/use-suggestions.e2e.test.ts +397 -0
- package/src/v2/hooks/__tests__/use-suggestions.test.ts +198 -0
- package/src/v2/hooks/__tests__/use-threads.test.ts +1041 -0
- package/src/v2/hooks/__tests__/zod-regression.test.ts +339 -0
- package/src/v2/hooks/index.ts +29 -0
- package/src/v2/hooks/use-agent-context.ts +55 -0
- package/src/v2/hooks/use-agent.ts +345 -0
- package/src/v2/hooks/use-attachments.ts +261 -0
- package/src/v2/hooks/use-capabilities.ts +30 -0
- package/src/v2/hooks/use-component.ts +46 -0
- package/src/v2/hooks/use-configure-suggestions.ts +252 -0
- package/src/v2/hooks/use-default-render-tool.ts +130 -0
- package/src/v2/hooks/use-frontend-tool.ts +68 -0
- package/src/v2/hooks/use-human-in-the-loop.ts +90 -0
- package/src/v2/hooks/use-interrupt.ts +257 -0
- package/src/v2/hooks/use-katex-styles.ts +44 -0
- package/src/v2/hooks/use-keyboard-height.ts +87 -0
- package/src/v2/hooks/use-pin-to-send.ts +160 -0
- package/src/v2/hooks/use-render-activity-message.ts +92 -0
- package/src/v2/hooks/use-render-custom-messages.ts +129 -0
- package/src/v2/hooks/use-render-tool.ts +128 -0
- package/src/v2/hooks/use-suggestions.ts +98 -0
- package/src/v2/hooks/use-threads.ts +208 -0
- package/src/v2/index.ts +11 -0
- package/src/v2/lib/__tests__/processPartialHtml.test.ts +84 -0
- package/src/v2/lib/__tests__/transcription-client.test.ts +65 -0
- package/src/v2/lib/processPartialHtml.ts +21 -0
- package/src/v2/lib/shallow-stable.ts +54 -0
- package/src/v2/lib/transcription-client.ts +151 -0
- package/src/v2/lib/vue-core.ts +161 -0
- package/src/v2/providers/CopilotChatConfigurationProvider.types.ts +15 -0
- package/src/v2/providers/CopilotChatConfigurationProvider.vue +95 -0
- package/src/v2/providers/CopilotKitProvider.types.ts +66 -0
- package/src/v2/providers/CopilotKitProvider.vue +653 -0
- package/src/v2/providers/SandboxFunctionsContext.ts +11 -0
- package/src/v2/providers/__tests__/CopilotChatConfigurationProvider.test.ts +309 -0
- package/src/v2/providers/__tests__/CopilotKitProvider.debug.test.ts +295 -0
- package/src/v2/providers/__tests__/CopilotKitProvider.license.test.ts +110 -0
- package/src/v2/providers/__tests__/CopilotKitProvider.onError.test.ts +67 -0
- package/src/v2/providers/__tests__/CopilotKitProvider.renderCustomMessages.e2e.test.ts +901 -0
- package/src/v2/providers/__tests__/CopilotKitProvider.sandboxFunctions.test.ts +141 -0
- package/src/v2/providers/__tests__/CopilotKitProvider.stability.test.ts +871 -0
- package/src/v2/providers/__tests__/CopilotKitProvider.test.ts +603 -0
- package/src/v2/providers/__tests__/CopilotKitProvider.wildcard.test.ts +104 -0
- package/src/v2/providers/index.ts +21 -0
- package/src/v2/providers/keys.ts +25 -0
- package/src/v2/providers/license-context.ts +16 -0
- package/src/v2/providers/types.ts +40 -0
- package/src/v2/providers/useCopilotChatConfiguration.ts +11 -0
- package/src/v2/providers/useCopilotKit.ts +11 -0
- package/src/v2/providers/useLicenseContext.ts +21 -0
- package/src/v2/types/__tests__/defineToolCallRenderer.test.ts +157 -0
- package/src/v2/types/a2ui.ts +5 -0
- package/src/v2/types/defineToolCallRenderer.ts +32 -0
- package/src/v2/types/frontend-tool.ts +8 -0
- package/src/v2/types/human-in-the-loop.ts +38 -0
- package/src/v2/types/index.ts +9 -0
- package/src/v2/types/interrupt.ts +15 -0
- package/src/v2/types/sandbox-function.ts +8 -0
- package/src/v2/types/vue-activity-message-renderer.ts +22 -0
- package/src/v2/types/vue-custom-message-renderer.ts +24 -0
- package/src/v2/types/vue-tool-call-renderer.ts +44 -0
- package/tsconfig.json +27 -0
- package/vite.config.ts +49 -0
- package/vitest.config.ts +23 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-component.d.ts","sourceRoot":"","sources":["../../../src/v2/hooks/use-component.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAC9E,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,KAAK,CAAC;AAErC,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,KAAK,CAAC;AAGvC,KAAK,gBAAgB,CAAC,CAAC,IAAI,CAAC,SAAS,gBAAgB,GACjD,iBAAiB,CAAC,CAAC,CAAC,GACpB,GAAG,CAAC;AAER,wBAAgB,YAAY,CAC1B,OAAO,SAAS,gBAAgB,GAAG,SAAS,GAAG,SAAS,EAExD,MAAM,EAAE;IACN,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,MAAM,EAAE,SAAS,CAAC,OAAO,CAAC,gBAAgB,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;IACtD,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,EACD,IAAI,CAAC,EAAE,WAAW,CAAC,OAAO,CAAC,EAAE,GAC5B,IAAI,CAwBN"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { WatchSource } from "vue";
|
|
2
|
+
import type { DynamicSuggestionsConfig, Suggestion, StaticSuggestionsConfig } from "@copilotkit/core";
|
|
3
|
+
type StaticSuggestionInput = Omit<Suggestion, "isLoading"> & Partial<Pick<Suggestion, "isLoading">>;
|
|
4
|
+
type StaticSuggestionsConfigInput = Omit<StaticSuggestionsConfig, "suggestions"> & {
|
|
5
|
+
suggestions: StaticSuggestionInput[];
|
|
6
|
+
};
|
|
7
|
+
type SuggestionsConfigInput = DynamicSuggestionsConfig | StaticSuggestionsConfigInput;
|
|
8
|
+
/**
|
|
9
|
+
* Registers a suggestions configuration (dynamic or static) for the current
|
|
10
|
+
* chat context.
|
|
11
|
+
*
|
|
12
|
+
* Configuration is kept in sync reactively and removed on scope cleanup.
|
|
13
|
+
*
|
|
14
|
+
* @example
|
|
15
|
+
* ```ts
|
|
16
|
+
* useConfigureSuggestions({
|
|
17
|
+
* instructions: "Suggest concise next steps for the user",
|
|
18
|
+
* available: "always",
|
|
19
|
+
* });
|
|
20
|
+
* ```
|
|
21
|
+
*/
|
|
22
|
+
export declare function useConfigureSuggestions(config: SuggestionsConfigInput | null | undefined, deps?: WatchSource<unknown>[]): void;
|
|
23
|
+
export {};
|
|
24
|
+
//# sourceMappingURL=use-configure-suggestions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-configure-suggestions.d.ts","sourceRoot":"","sources":["../../../src/v2/hooks/use-configure-suggestions.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,KAAK,CAAC;AAIvC,OAAO,KAAK,EACV,wBAAwB,EACxB,UAAU,EACV,uBAAuB,EAExB,MAAM,kBAAkB,CAAC;AAE1B,KAAK,qBAAqB,GAAG,IAAI,CAAC,UAAU,EAAE,WAAW,CAAC,GACxD,OAAO,CAAC,IAAI,CAAC,UAAU,EAAE,WAAW,CAAC,CAAC,CAAC;AAEzC,KAAK,4BAA4B,GAAG,IAAI,CACtC,uBAAuB,EACvB,aAAa,CACd,GAAG;IACF,WAAW,EAAE,qBAAqB,EAAE,CAAC;CACtC,CAAC;AAEF,KAAK,sBAAsB,GACvB,wBAAwB,GACxB,4BAA4B,CAAC;AAiBjC;;;;;;;;;;;;;GAaG;AACH,wBAAgB,uBAAuB,CACrC,MAAM,EAAE,sBAAsB,GAAG,IAAI,GAAG,SAAS,EACjD,IAAI,CAAC,EAAE,WAAW,CAAC,OAAO,CAAC,EAAE,GAC5B,IAAI,CAiMN"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { WatchSource } from "vue";
|
|
2
|
+
import type { Component, VNodeChild } from "vue";
|
|
3
|
+
type DefaultRenderProps = {
|
|
4
|
+
name: string;
|
|
5
|
+
toolCallId: string;
|
|
6
|
+
parameters: unknown;
|
|
7
|
+
status: "inProgress" | "executing" | "complete";
|
|
8
|
+
result: string | undefined;
|
|
9
|
+
};
|
|
10
|
+
export declare function useDefaultRenderTool(config?: {
|
|
11
|
+
render?: ((props: DefaultRenderProps) => VNodeChild) | Component<DefaultRenderProps>;
|
|
12
|
+
}, deps?: WatchSource<unknown>[]): void;
|
|
13
|
+
export {};
|
|
14
|
+
//# sourceMappingURL=use-default-render-tool.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-default-render-tool.d.ts","sourceRoot":"","sources":["../../../src/v2/hooks/use-default-render-tool.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,KAAK,CAAC;AACvC,OAAO,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,KAAK,CAAC;AAGjD,KAAK,kBAAkB,GAAG;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,OAAO,CAAC;IACpB,MAAM,EAAE,YAAY,GAAG,WAAW,GAAG,UAAU,CAAC;IAChD,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC;CAC5B,CAAC;AA8FF,wBAAgB,oBAAoB,CAClC,MAAM,CAAC,EAAE;IACP,MAAM,CAAC,EACH,CAAC,CAAC,KAAK,EAAE,kBAAkB,KAAK,UAAU,CAAC,GAC3C,SAAS,CAAC,kBAAkB,CAAC,CAAC;CACnC,EACD,IAAI,CAAC,EAAE,WAAW,CAAC,OAAO,CAAC,EAAE,GAC5B,IAAI,CAiBN"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { WatchSource } from "vue";
|
|
2
|
+
import type { VueFrontendTool } from "../types";
|
|
3
|
+
/**
|
|
4
|
+
* Registers a frontend tool and optional renderer with CopilotKit core.
|
|
5
|
+
*
|
|
6
|
+
* The tool registration is reactive to provided dependencies and is cleaned up
|
|
7
|
+
* automatically when the current scope is disposed.
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* ```ts
|
|
11
|
+
* useFrontendTool({
|
|
12
|
+
* name: "sayHello",
|
|
13
|
+
* parameters: z.object({ name: z.string() }),
|
|
14
|
+
* handler: async ({ name }) => `Hello ${name}`,
|
|
15
|
+
* });
|
|
16
|
+
* ```
|
|
17
|
+
*/
|
|
18
|
+
export declare function useFrontendTool<T extends Record<string, unknown>>(tool: VueFrontendTool<T>, deps?: WatchSource<unknown>[]): void;
|
|
19
|
+
//# sourceMappingURL=use-frontend-tool.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-frontend-tool.d.ts","sourceRoot":"","sources":["../../../src/v2/hooks/use-frontend-tool.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,KAAK,CAAC;AAEvC,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAKhD;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,eAAe,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC/D,IAAI,EAAE,eAAe,CAAC,CAAC,CAAC,EACxB,IAAI,CAAC,EAAE,WAAW,CAAC,OAAO,CAAC,EAAE,QA0C9B"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { WatchSource } from "vue";
|
|
2
|
+
import type { VueHumanInTheLoop } from "../types";
|
|
3
|
+
/**
|
|
4
|
+
* Registers a human-in-the-loop frontend tool.
|
|
5
|
+
*
|
|
6
|
+
* The tool pauses execution until `respond` is called from the rendered
|
|
7
|
+
* component during the `executing` phase.
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* ```ts
|
|
11
|
+
* useHumanInTheLoop({
|
|
12
|
+
* name: "approveAction",
|
|
13
|
+
* parameters: z.object({ reason: z.string() }),
|
|
14
|
+
* render: ApprovalCard,
|
|
15
|
+
* });
|
|
16
|
+
* ```
|
|
17
|
+
*/
|
|
18
|
+
export declare function useHumanInTheLoop<T extends Record<string, unknown>>(tool: VueHumanInTheLoop<T>, deps?: WatchSource<unknown>[]): void;
|
|
19
|
+
//# sourceMappingURL=use-human-in-the-loop.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-human-in-the-loop.d.ts","sourceRoot":"","sources":["../../../src/v2/hooks/use-human-in-the-loop.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,KAAK,CAAC;AAIvC,OAAO,KAAK,EAEV,iBAAiB,EAGlB,MAAM,UAAU,CAAC;AAElB;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,iBAAiB,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EACjE,IAAI,EAAE,iBAAiB,CAAC,CAAC,CAAC,EAC1B,IAAI,CAAC,EAAE,WAAW,CAAC,OAAO,CAAC,EAAE,QA4D9B"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import type { ComputedRef, Ref } from "vue";
|
|
2
|
+
import type { InterruptEvent, InterruptHandlerProps, InterruptRenderProps } from "../types/interrupt";
|
|
3
|
+
export type { InterruptEvent, InterruptHandlerProps, InterruptRenderProps };
|
|
4
|
+
type InterruptHandlerFn<TValue, TResult> = (props: InterruptHandlerProps<TValue>) => TResult | PromiseLike<TResult>;
|
|
5
|
+
type InterruptResultFromHandler<THandler> = THandler extends (...args: never[]) => infer TResult ? TResult extends PromiseLike<infer TResolved> ? TResolved | null : TResult | null : null;
|
|
6
|
+
type InterruptResult<TValue, TResult> = InterruptResultFromHandler<InterruptHandlerFn<TValue, TResult>>;
|
|
7
|
+
export interface UseInterruptConfig<TValue = unknown, TResult = never> {
|
|
8
|
+
handler?: InterruptHandlerFn<TValue, TResult>;
|
|
9
|
+
enabled?: (event: InterruptEvent<TValue>) => boolean;
|
|
10
|
+
agentId?: string;
|
|
11
|
+
renderInChat?: boolean;
|
|
12
|
+
}
|
|
13
|
+
export interface UseInterruptResult<TValue = unknown, TResult = never> {
|
|
14
|
+
interrupt: Ref<InterruptEvent<TValue> | null>;
|
|
15
|
+
result: Ref<InterruptResult<TValue, TResult>>;
|
|
16
|
+
hasInterrupt: ComputedRef<boolean>;
|
|
17
|
+
resolveInterrupt: (response: unknown) => void;
|
|
18
|
+
slotProps: ComputedRef<InterruptRenderProps<TValue, InterruptResult<TValue, TResult>> | null>;
|
|
19
|
+
}
|
|
20
|
+
export declare function isPromiseLike<TValue>(value: TValue | PromiseLike<TValue>): value is PromiseLike<TValue>;
|
|
21
|
+
/**
|
|
22
|
+
* Vue composable for handling `on_interrupt` custom events from an agent.
|
|
23
|
+
*
|
|
24
|
+
* It tracks the latest pending interrupt, optionally derives UI data via
|
|
25
|
+
* `handler`, and can publish slot state into `CopilotChat` so consumers render
|
|
26
|
+
* interrupts through the `#interrupt` slot instead of render functions/TSX.
|
|
27
|
+
*
|
|
28
|
+
* @example
|
|
29
|
+
* ```ts
|
|
30
|
+
* const { interrupt, hasInterrupt, resolveInterrupt } = useInterrupt({
|
|
31
|
+
* handler: ({ event }) => ({ label: String(event.value) }),
|
|
32
|
+
* });
|
|
33
|
+
* ```
|
|
34
|
+
*/
|
|
35
|
+
export declare function useInterrupt<TValue = unknown, TResult = never>(config?: UseInterruptConfig<TValue, TResult>): UseInterruptResult<TValue, TResult>;
|
|
36
|
+
//# sourceMappingURL=use-interrupt.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-interrupt.d.ts","sourceRoot":"","sources":["../../../src/v2/hooks/use-interrupt.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAG5C,OAAO,KAAK,EACV,cAAc,EACd,qBAAqB,EACrB,oBAAoB,EACrB,MAAM,oBAAoB,CAAC;AAE5B,YAAY,EAAE,cAAc,EAAE,qBAAqB,EAAE,oBAAoB,EAAE,CAAC;AAI5E,KAAK,kBAAkB,CAAC,MAAM,EAAE,OAAO,IAAI,CACzC,KAAK,EAAE,qBAAqB,CAAC,MAAM,CAAC,KACjC,OAAO,GAAG,WAAW,CAAC,OAAO,CAAC,CAAC;AAEpC,KAAK,0BAA0B,CAAC,QAAQ,IAAI,QAAQ,SAAS,CAC3D,GAAG,IAAI,EAAE,KAAK,EAAE,KACb,MAAM,OAAO,GACd,OAAO,SAAS,WAAW,CAAC,MAAM,SAAS,CAAC,GAC1C,SAAS,GAAG,IAAI,GAChB,OAAO,GAAG,IAAI,GAChB,IAAI,CAAC;AAET,KAAK,eAAe,CAAC,MAAM,EAAE,OAAO,IAAI,0BAA0B,CAChE,kBAAkB,CAAC,MAAM,EAAE,OAAO,CAAC,CACpC,CAAC;AAEF,MAAM,WAAW,kBAAkB,CAAC,MAAM,GAAG,OAAO,EAAE,OAAO,GAAG,KAAK;IACnE,OAAO,CAAC,EAAE,kBAAkB,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC9C,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,cAAc,CAAC,MAAM,CAAC,KAAK,OAAO,CAAC;IACrD,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,YAAY,CAAC,EAAE,OAAO,CAAC;CACxB;AAED,MAAM,WAAW,kBAAkB,CAAC,MAAM,GAAG,OAAO,EAAE,OAAO,GAAG,KAAK;IACnE,SAAS,EAAE,GAAG,CAAC,cAAc,CAAC,MAAM,CAAC,GAAG,IAAI,CAAC,CAAC;IAC9C,MAAM,EAAE,GAAG,CAAC,eAAe,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;IAC9C,YAAY,EAAE,WAAW,CAAC,OAAO,CAAC,CAAC;IACnC,gBAAgB,EAAE,CAAC,QAAQ,EAAE,OAAO,KAAK,IAAI,CAAC;IAC9C,SAAS,EAAE,WAAW,CAAC,oBAAoB,CACzC,MAAM,EACN,eAAe,CAAC,MAAM,EAAE,OAAO,CAAC,CACjC,GAAG,IAAI,CAAC,CAAC;CACX;AAED,wBAAgB,aAAa,CAAC,MAAM,EAClC,KAAK,EAAE,MAAM,GAAG,WAAW,CAAC,MAAM,CAAC,GAClC,KAAK,IAAI,WAAW,CAAC,MAAM,CAAC,CAM9B;AAkBD;;;;;;;;;;;;;GAaG;AACH,wBAAgB,YAAY,CAAC,MAAM,GAAG,OAAO,EAAE,OAAO,GAAG,KAAK,EAC5D,MAAM,GAAE,kBAAkB,CAAC,MAAM,EAAE,OAAO,CAAM,GAC/C,kBAAkB,CAAC,MAAM,EAAE,OAAO,CAAC,CAsKrC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Dynamically loads KaTeX CSS at runtime to avoid Next.js-style
|
|
3
|
+
* "Global CSS cannot be imported from within node_modules" build errors and
|
|
4
|
+
* to keep the CSS out of the static import graph.
|
|
5
|
+
*
|
|
6
|
+
* Uses a module-level singleton flag so the stylesheet is only loaded once,
|
|
7
|
+
* regardless of how many components call this composable.
|
|
8
|
+
*
|
|
9
|
+
* Mirrors the React `useKatexStyles` hook: returns `void`, never throws, and
|
|
10
|
+
* logs a warning with equivalent intent if the dynamic import fails.
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* ```vue
|
|
14
|
+
* <script setup lang="ts">
|
|
15
|
+
* import { useKatexStyles } from "@copilotkit/vue";
|
|
16
|
+
*
|
|
17
|
+
* useKatexStyles();
|
|
18
|
+
* </script>
|
|
19
|
+
* ```
|
|
20
|
+
*/
|
|
21
|
+
export declare function useKatexStyles(): void;
|
|
22
|
+
//# sourceMappingURL=use-katex-styles.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-katex-styles.d.ts","sourceRoot":"","sources":["../../../src/v2/hooks/use-katex-styles.ts"],"names":[],"mappings":"AAMA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,cAAc,IAAI,IAAI,CAiBrC"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { type Ref } from "vue";
|
|
2
|
+
/**
|
|
3
|
+
* Vue-idiomatic result of {@link useKeyboardHeight}. Fields mirror the React
|
|
4
|
+
* `KeyboardState` shape (`isKeyboardOpen`, `keyboardHeight`, `availableHeight`,
|
|
5
|
+
* `viewportHeight`) and are exposed as readonly refs so consumers can bind them
|
|
6
|
+
* reactively inside templates or computed values.
|
|
7
|
+
*/
|
|
8
|
+
export interface KeyboardState {
|
|
9
|
+
isKeyboardOpen: Readonly<Ref<boolean>>;
|
|
10
|
+
keyboardHeight: Readonly<Ref<number>>;
|
|
11
|
+
availableHeight: Readonly<Ref<number>>;
|
|
12
|
+
viewportHeight: Readonly<Ref<number>>;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Composable to detect mobile keyboard appearance and calculate available
|
|
16
|
+
* viewport height. Uses the Visual Viewport API to track keyboard state on
|
|
17
|
+
* mobile devices.
|
|
18
|
+
*
|
|
19
|
+
* Mirrors the React `useKeyboardHeight` hook: returns `keyboardHeight` as the
|
|
20
|
+
* difference between `window.innerHeight` and `visualViewport.height`, clamped
|
|
21
|
+
* to `0`, and reports the keyboard as open when the diff exceeds `150` px.
|
|
22
|
+
*
|
|
23
|
+
* @example
|
|
24
|
+
* ```vue
|
|
25
|
+
* <script setup lang="ts">
|
|
26
|
+
* import { useKeyboardHeight } from "@copilotkit/vue";
|
|
27
|
+
*
|
|
28
|
+
* const { isKeyboardOpen, keyboardHeight } = useKeyboardHeight();
|
|
29
|
+
* </script>
|
|
30
|
+
* ```
|
|
31
|
+
*/
|
|
32
|
+
export declare function useKeyboardHeight(): KeyboardState;
|
|
33
|
+
//# sourceMappingURL=use-keyboard-height.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-keyboard-height.d.ts","sourceRoot":"","sources":["../../../src/v2/hooks/use-keyboard-height.ts"],"names":[],"mappings":"AAAA,OAAO,EAA6C,KAAK,GAAG,EAAE,MAAM,KAAK,CAAC;AAE1E;;;;;GAKG;AACH,MAAM,WAAW,aAAa;IAC5B,cAAc,EAAE,QAAQ,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC;IACvC,cAAc,EAAE,QAAQ,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC;IACtC,eAAe,EAAE,QAAQ,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC;IACvC,cAAc,EAAE,QAAQ,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC;CACvC;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,iBAAiB,IAAI,aAAa,CAqDjD"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { type Ref } from "vue";
|
|
2
|
+
export interface UsePinToSendOptions {
|
|
3
|
+
scrollRef: Ref<HTMLElement | null>;
|
|
4
|
+
contentRef: Ref<HTMLElement | null>;
|
|
5
|
+
spacerRef: Ref<HTMLElement | null>;
|
|
6
|
+
topOffset?: number;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Vue counterpart of React's `usePinToSend` (`packages/react-core/src/v2/hooks/use-pin-to-send.ts`).
|
|
10
|
+
*
|
|
11
|
+
* Anchors the chat scroll container so the most recent user message stays
|
|
12
|
+
* pinned near the top of the viewport while the assistant streams a
|
|
13
|
+
* response beneath it.
|
|
14
|
+
*
|
|
15
|
+
* Implementation parity with React:
|
|
16
|
+
* - Reads the latest user message via the `LastUserMessageContext`
|
|
17
|
+
* equivalent (`LastUserMessageKey` + `Ref<LastUserMessageState>`).
|
|
18
|
+
* - On each `sendNonce` increment, sizes the spacer to
|
|
19
|
+
* `viewportHeight - bubbleHeight - topOffset` and scrolls so the bubble
|
|
20
|
+
* sits `topOffset` from the viewport top (padding above the bubble is
|
|
21
|
+
* pushed off-screen).
|
|
22
|
+
* - Installs a shrink-only `ResizeObserver` on `contentRef` that collapses
|
|
23
|
+
* the spacer as the assistant response grows; never grows it back.
|
|
24
|
+
* - Cancels the scheduled `requestAnimationFrame` and disconnects the
|
|
25
|
+
* `ResizeObserver` on subsequent re-runs and on scope dispose.
|
|
26
|
+
*/
|
|
27
|
+
export declare function usePinToSend({ scrollRef, contentRef, spacerRef, topOffset, }: UsePinToSendOptions): void;
|
|
28
|
+
//# sourceMappingURL=use-pin-to-send.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-pin-to-send.d.ts","sourceRoot":"","sources":["../../../src/v2/hooks/use-pin-to-send.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiB,KAAK,GAAG,EAAE,MAAM,KAAK,CAAC;AAM9C,MAAM,WAAW,mBAAmB;IAClC,SAAS,EAAE,GAAG,CAAC,WAAW,GAAG,IAAI,CAAC,CAAC;IACnC,UAAU,EAAE,GAAG,CAAC,WAAW,GAAG,IAAI,CAAC,CAAC;IACpC,SAAS,EAAE,GAAG,CAAC,WAAW,GAAG,IAAI,CAAC,CAAC;IACnC,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,YAAY,CAAC,EAC3B,SAAS,EACT,UAAU,EACV,SAAS,EACT,SAAc,GACf,EAAE,mBAAmB,GAAG,IAAI,CAkH5B"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { Component } from "vue";
|
|
2
|
+
import type { ActivityMessage } from "@ag-ui/core";
|
|
3
|
+
import type { VueActivityMessageRenderer, VueActivityMessageRendererProps } from "../types";
|
|
4
|
+
interface ActivityRendererResult {
|
|
5
|
+
renderer: Component<VueActivityMessageRendererProps<unknown>>;
|
|
6
|
+
props: VueActivityMessageRendererProps<unknown>;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Returns helpers for rendering activity messages.
|
|
10
|
+
*
|
|
11
|
+
* Matches the React `useRenderActivityMessage` API: `findRenderer` locates a
|
|
12
|
+
* registered renderer by activity type (preferring agent-scoped over global,
|
|
13
|
+
* with `"*"` as a wildcard fallback), and `renderActivityMessage` resolves the
|
|
14
|
+
* renderer and validates the content schema.
|
|
15
|
+
*/
|
|
16
|
+
export declare function useRenderActivityMessage(): {
|
|
17
|
+
renderActivityMessage: (message: ActivityMessage) => ActivityRendererResult | null;
|
|
18
|
+
findRenderer: (activityType: string) => VueActivityMessageRenderer<unknown> | null;
|
|
19
|
+
};
|
|
20
|
+
export {};
|
|
21
|
+
//# sourceMappingURL=use-render-activity-message.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-render-activity-message.d.ts","sourceRoot":"","sources":["../../../src/v2/hooks/use-render-activity-message.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,KAAK,CAAC;AACrC,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAKnD,OAAO,KAAK,EACV,0BAA0B,EAC1B,+BAA+B,EAChC,MAAM,UAAU,CAAC;AAElB,UAAU,sBAAsB;IAC9B,QAAQ,EAAE,SAAS,CAAC,+BAA+B,CAAC,OAAO,CAAC,CAAC,CAAC;IAC9D,KAAK,EAAE,+BAA+B,CAAC,OAAO,CAAC,CAAC;CACjD;AAED;;;;;;;GAOG;AACH,wBAAgB,wBAAwB;qCA8B3B,eAAe,KACvB,sBAAsB,GAAG,IAAI;iCArBhB,MAAM,KACnB,0BAA0B,CAAC,OAAO,CAAC,GAAG,IAAI;EAuD9C"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { Component, VNodeChild } from "vue";
|
|
2
|
+
import type { Message } from "@ag-ui/core";
|
|
3
|
+
import type { VueCustomMessageRendererPosition, VueCustomMessageRendererProps } from "../types";
|
|
4
|
+
interface UseRenderCustomMessagesParams {
|
|
5
|
+
message: Message;
|
|
6
|
+
position: VueCustomMessageRendererPosition;
|
|
7
|
+
}
|
|
8
|
+
interface CustomMessageRendererResult {
|
|
9
|
+
renderer: Component<VueCustomMessageRendererProps> | ((props: VueCustomMessageRendererProps) => VNodeChild);
|
|
10
|
+
props: VueCustomMessageRendererProps;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Returns a function that resolves the appropriate custom message renderer for
|
|
14
|
+
* a given message and position.
|
|
15
|
+
*
|
|
16
|
+
* Matches the React `useRenderCustomMessages` API: filters registered
|
|
17
|
+
* renderers by the current agent, preferring agent-scoped renderers over
|
|
18
|
+
* global ones, and computes the full renderer props (runId, indices, state
|
|
19
|
+
* snapshot).
|
|
20
|
+
*
|
|
21
|
+
* The returned function yields `null` if no chat configuration is available
|
|
22
|
+
* (i.e. when called outside a `CopilotChat` component tree) or if no
|
|
23
|
+
* matching renderer is found.
|
|
24
|
+
*/
|
|
25
|
+
export declare function useRenderCustomMessages(): (params: UseRenderCustomMessagesParams) => CustomMessageRendererResult | null;
|
|
26
|
+
export {};
|
|
27
|
+
//# sourceMappingURL=use-render-custom-messages.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-render-custom-messages.d.ts","sourceRoot":"","sources":["../../../src/v2/hooks/use-render-custom-messages.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,KAAK,CAAC;AACjD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAI3C,OAAO,KAAK,EACV,gCAAgC,EAChC,6BAA6B,EAC9B,MAAM,UAAU,CAAC;AAElB,UAAU,6BAA6B;IACrC,OAAO,EAAE,OAAO,CAAC;IACjB,QAAQ,EAAE,gCAAgC,CAAC;CAC5C;AAED,UAAU,2BAA2B;IACnC,QAAQ,EACJ,SAAS,CAAC,6BAA6B,CAAC,GACxC,CAAC,CAAC,KAAK,EAAE,6BAA6B,KAAK,UAAU,CAAC,CAAC;IAC3D,KAAK,EAAE,6BAA6B,CAAC;CACtC;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,uBAAuB,KAKnC,QAAQ,6BAA6B,KACpC,2BAA2B,GAAG,IAAI,CAuFtC"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import type { Component, WatchSource, VNodeChild } from "vue";
|
|
2
|
+
import type { StandardSchemaV1, InferSchemaOutput } from "@copilotkit/shared";
|
|
3
|
+
export interface RenderToolInProgressProps<S extends StandardSchemaV1> {
|
|
4
|
+
name: string;
|
|
5
|
+
toolCallId: string;
|
|
6
|
+
parameters: Partial<InferSchemaOutput<S>>;
|
|
7
|
+
status: "inProgress";
|
|
8
|
+
result: undefined;
|
|
9
|
+
}
|
|
10
|
+
export interface RenderToolExecutingProps<S extends StandardSchemaV1> {
|
|
11
|
+
name: string;
|
|
12
|
+
toolCallId: string;
|
|
13
|
+
parameters: InferSchemaOutput<S>;
|
|
14
|
+
status: "executing";
|
|
15
|
+
result: undefined;
|
|
16
|
+
}
|
|
17
|
+
export interface RenderToolCompleteProps<S extends StandardSchemaV1> {
|
|
18
|
+
name: string;
|
|
19
|
+
toolCallId: string;
|
|
20
|
+
parameters: InferSchemaOutput<S>;
|
|
21
|
+
status: "complete";
|
|
22
|
+
result: string;
|
|
23
|
+
}
|
|
24
|
+
export type RenderToolProps<S extends StandardSchemaV1> = RenderToolInProgressProps<S> | RenderToolExecutingProps<S> | RenderToolCompleteProps<S>;
|
|
25
|
+
export declare function useRenderTool(config: {
|
|
26
|
+
name: "*";
|
|
27
|
+
render: ((props: any) => VNodeChild) | Component<any>;
|
|
28
|
+
agentId?: string;
|
|
29
|
+
}, deps?: WatchSource<unknown>[]): void;
|
|
30
|
+
export declare function useRenderTool<S extends StandardSchemaV1>(config: {
|
|
31
|
+
name: string;
|
|
32
|
+
parameters: S;
|
|
33
|
+
render: ((props: RenderToolProps<S>) => VNodeChild) | Component<RenderToolProps<S>>;
|
|
34
|
+
agentId?: string;
|
|
35
|
+
}, deps?: WatchSource<unknown>[]): void;
|
|
36
|
+
//# sourceMappingURL=use-render-tool.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-render-tool.d.ts","sourceRoot":"","sources":["../../../src/v2/hooks/use-render-tool.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,KAAK,CAAC;AAC9D,OAAO,KAAK,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAU9E,MAAM,WAAW,yBAAyB,CAAC,CAAC,SAAS,gBAAgB;IACnE,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,OAAO,CAAC,iBAAiB,CAAC,CAAC,CAAC,CAAC,CAAC;IAC1C,MAAM,EAAE,YAAY,CAAC;IACrB,MAAM,EAAE,SAAS,CAAC;CACnB;AAED,MAAM,WAAW,wBAAwB,CAAC,CAAC,SAAS,gBAAgB;IAClE,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,iBAAiB,CAAC,CAAC,CAAC,CAAC;IACjC,MAAM,EAAE,WAAW,CAAC;IACpB,MAAM,EAAE,SAAS,CAAC;CACnB;AAED,MAAM,WAAW,uBAAuB,CAAC,CAAC,SAAS,gBAAgB;IACjE,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,iBAAiB,CAAC,CAAC,CAAC,CAAC;IACjC,MAAM,EAAE,UAAU,CAAC;IACnB,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,MAAM,eAAe,CAAC,CAAC,SAAS,gBAAgB,IAClD,yBAAyB,CAAC,CAAC,CAAC,GAC5B,wBAAwB,CAAC,CAAC,CAAC,GAC3B,uBAAuB,CAAC,CAAC,CAAC,CAAC;AAW/B,wBAAgB,aAAa,CAC3B,MAAM,EAAE;IACN,IAAI,EAAE,GAAG,CAAC;IACV,MAAM,EAAE,CAAC,CAAC,KAAK,EAAE,GAAG,KAAK,UAAU,CAAC,GAAG,SAAS,CAAC,GAAG,CAAC,CAAC;IACtD,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,EACD,IAAI,CAAC,EAAE,WAAW,CAAC,OAAO,CAAC,EAAE,GAC5B,IAAI,CAAC;AAER,wBAAgB,aAAa,CAAC,CAAC,SAAS,gBAAgB,EACtD,MAAM,EAAE;IACN,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,CAAC,CAAC;IACd,MAAM,EACF,CAAC,CAAC,KAAK,EAAE,eAAe,CAAC,CAAC,CAAC,KAAK,UAAU,CAAC,GAC3C,SAAS,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC,CAAC;IAClC,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,EACD,IAAI,CAAC,EAAE,WAAW,CAAC,OAAO,CAAC,EAAE,GAC5B,IAAI,CAAC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { MaybeRefOrGetter, Ref } from "vue";
|
|
2
|
+
import type { Suggestion } from "@copilotkit/core";
|
|
3
|
+
export interface UseSuggestionsOptions {
|
|
4
|
+
agentId?: MaybeRefOrGetter<string | undefined>;
|
|
5
|
+
}
|
|
6
|
+
export interface UseSuggestionsResult {
|
|
7
|
+
suggestions: Ref<Suggestion[]>;
|
|
8
|
+
isLoading: Ref<boolean>;
|
|
9
|
+
reloadSuggestions: () => void;
|
|
10
|
+
clearSuggestions: () => void;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Provides reactive access to agent suggestions.
|
|
14
|
+
*
|
|
15
|
+
* It tracks suggestion updates for the resolved agent and exposes helpers to
|
|
16
|
+
* reload or clear suggestions.
|
|
17
|
+
*
|
|
18
|
+
* @example
|
|
19
|
+
* ```ts
|
|
20
|
+
* const { suggestions, isLoading, reloadSuggestions } = useSuggestions({
|
|
21
|
+
* agentId: "default",
|
|
22
|
+
* });
|
|
23
|
+
* ```
|
|
24
|
+
*/
|
|
25
|
+
export declare function useSuggestions(options?: UseSuggestionsOptions): UseSuggestionsResult;
|
|
26
|
+
//# sourceMappingURL=use-suggestions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-suggestions.d.ts","sourceRoot":"","sources":["../../../src/v2/hooks/use-suggestions.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,gBAAgB,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AACjD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAKnD,MAAM,WAAW,qBAAqB;IACpC,OAAO,CAAC,EAAE,gBAAgB,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC;CAChD;AAED,MAAM,WAAW,oBAAoB;IACnC,WAAW,EAAE,GAAG,CAAC,UAAU,EAAE,CAAC,CAAC;IAC/B,SAAS,EAAE,GAAG,CAAC,OAAO,CAAC,CAAC;IACxB,iBAAiB,EAAE,MAAM,IAAI,CAAC;IAC9B,gBAAgB,EAAE,MAAM,IAAI,CAAC;CAC9B;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,cAAc,CAC5B,OAAO,GAAE,qBAA0B,GAClC,oBAAoB,CAgEtB"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import type { MaybeRefOrGetter, Ref } from "vue";
|
|
2
|
+
export interface Thread {
|
|
3
|
+
id: string;
|
|
4
|
+
agentId: string;
|
|
5
|
+
name: string | null;
|
|
6
|
+
archived: boolean;
|
|
7
|
+
createdAt: string;
|
|
8
|
+
updatedAt: string;
|
|
9
|
+
/**
|
|
10
|
+
* ISO-8601 timestamp of the most recent agent run on this thread. Absent
|
|
11
|
+
* when the thread has never been run. Prefer this over `updatedAt` for
|
|
12
|
+
* user-facing "last activity" displays — it is not bumped by metadata-only
|
|
13
|
+
* actions like rename or archive.
|
|
14
|
+
*/
|
|
15
|
+
lastRunAt?: string;
|
|
16
|
+
}
|
|
17
|
+
export interface UseThreadsInput {
|
|
18
|
+
agentId: MaybeRefOrGetter<string>;
|
|
19
|
+
includeArchived?: MaybeRefOrGetter<boolean | undefined>;
|
|
20
|
+
limit?: MaybeRefOrGetter<number | undefined>;
|
|
21
|
+
}
|
|
22
|
+
export interface UseThreadsResult {
|
|
23
|
+
threads: Ref<Thread[]>;
|
|
24
|
+
isLoading: Ref<boolean>;
|
|
25
|
+
error: Ref<Error | null>;
|
|
26
|
+
hasMoreThreads: Ref<boolean>;
|
|
27
|
+
isFetchingMoreThreads: Ref<boolean>;
|
|
28
|
+
fetchMoreThreads: () => void;
|
|
29
|
+
renameThread: (threadId: string, name: string) => Promise<void>;
|
|
30
|
+
archiveThread: (threadId: string) => Promise<void>;
|
|
31
|
+
deleteThread: (threadId: string) => Promise<void>;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Vue composable for listing and managing Intelligence platform threads.
|
|
35
|
+
*
|
|
36
|
+
* The hook fetches threads for the runtime-authenticated user and the given
|
|
37
|
+
* `agentId`, then keeps the result in sync via the core thread store's realtime
|
|
38
|
+
* channel when available. Inputs accept refs/computeds to make thread context
|
|
39
|
+
* changes reactive.
|
|
40
|
+
*/
|
|
41
|
+
export declare function useThreads(input: UseThreadsInput): UseThreadsResult;
|
|
42
|
+
//# sourceMappingURL=use-threads.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-threads.d.ts","sourceRoot":"","sources":["../../../src/v2/hooks/use-threads.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,gBAAgB,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAajD,MAAM,WAAW,MAAM;IACrB,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,QAAQ,EAAE,OAAO,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB;;;;;OAKG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,eAAe;IAC9B,OAAO,EAAE,gBAAgB,CAAC,MAAM,CAAC,CAAC;IAClC,eAAe,CAAC,EAAE,gBAAgB,CAAC,OAAO,GAAG,SAAS,CAAC,CAAC;IACxD,KAAK,CAAC,EAAE,gBAAgB,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC;CAC9C;AAED,MAAM,WAAW,gBAAgB;IAC/B,OAAO,EAAE,GAAG,CAAC,MAAM,EAAE,CAAC,CAAC;IACvB,SAAS,EAAE,GAAG,CAAC,OAAO,CAAC,CAAC;IACxB,KAAK,EAAE,GAAG,CAAC,KAAK,GAAG,IAAI,CAAC,CAAC;IACzB,cAAc,EAAE,GAAG,CAAC,OAAO,CAAC,CAAC;IAC7B,qBAAqB,EAAE,GAAG,CAAC,OAAO,CAAC,CAAC;IACpC,gBAAgB,EAAE,MAAM,IAAI,CAAC;IAC7B,YAAY,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAChE,aAAa,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IACnD,YAAY,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;CACnD;AAcD;;;;;;;GAOG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,eAAe,GAAG,gBAAgB,CA2InE"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("@copilotkit/core"),i=require("@ag-ui/client"),e=require("../use-render-activity-message-BRL1Rpl-.cjs"),n=require("@copilotkit/shared");exports.A2UIActivityContentSchema=e.A2UIActivityContentSchema;exports.A2UISurfaceActivityRenderer=e._sfc_main;exports.A2UISurfaceActivityType=e.A2UISurfaceActivityType;exports.CopilotChat=e.CopilotChat;exports.CopilotChatAssistantMessage=e._sfc_main$1;exports.CopilotChatAttachmentQueue=e._sfc_main$2;exports.CopilotChatAttachmentRenderer=e._sfc_main$3;exports.CopilotChatAudioRecorder=e._sfc_main$4;exports.CopilotChatConfigurationProvider=e._sfc_main$5;exports.CopilotChatDefaultLabels=e.CopilotChatDefaultLabels;exports.CopilotChatInput=e._sfc_main$6;exports.CopilotChatMessageView=e._sfc_main$7;exports.CopilotChatReasoningMessage=e._sfc_main$8;exports.CopilotChatSuggestionPill=e._sfc_main$9;exports.CopilotChatSuggestionView=e._sfc_main$10;exports.CopilotChatToggleButton=e.CopilotChatToggleButton;exports.CopilotChatToggleButtonCloseIcon=e.CopilotChatToggleButtonCloseIcon;exports.CopilotChatToggleButtonOpenIcon=e.CopilotChatToggleButtonOpenIcon;exports.CopilotChatToolCallsView=e._sfc_main$11;exports.CopilotChatUserMessage=e._sfc_main$12;exports.CopilotChatView=e._sfc_main$13;exports.CopilotKitCoreVue=e.CopilotKitCoreVue;exports.CopilotKitInspector=e._sfc_main$14;exports.CopilotKitProvider=e._sfc_main$15;exports.CopilotModalHeader=e.CopilotModalHeader;exports.CopilotPopup=e._sfc_main$16;exports.CopilotPopupView=e.CopilotPopupView;exports.CopilotSidebar=e._sfc_main$17;exports.CopilotSidebarView=e.CopilotSidebarView;exports.GenerateSandboxedUiArgsSchema=e.GenerateSandboxedUiArgsSchema;exports.LicenseContextKey=e.LicenseContextKey;exports.MCPAppsActivityContentSchema=e.MCPAppsActivityContentSchema;exports.MCPAppsActivityRenderer=e.MCPAppsActivityRenderer;exports.MCPAppsActivityType=e.MCPAppsActivityType;exports.OpenGenerativeUIActivityRenderer=e.OpenGenerativeUIActivityRenderer;exports.OpenGenerativeUIActivityType=e.OpenGenerativeUIActivityType;exports.OpenGenerativeUIContentSchema=e.OpenGenerativeUIContentSchema;exports.OpenGenerativeUIRenderer=e.OpenGenerativeUIRenderer;exports.OpenGenerativeUIToolRenderer=e.OpenGenerativeUIToolRenderer;exports.UseAgentUpdate=e.UseAgentUpdate;exports.createA2UIMessageRenderer=e.createA2UIMessageRenderer;exports.createDefaultLicenseRef=e.createDefaultLicenseRef;exports.defineToolCallRenderer=e.defineToolCallRenderer;exports.extractCompleteStyles=e.extractCompleteStyles;exports.getOperationSurfaceId=e.getOperationSurfaceId;exports.processPartialHtml=e.processPartialHtml;exports.useAgent=e.useAgent;exports.useAgentContext=e.useAgentContext;exports.useAttachments=e.useAttachments;exports.useCapabilities=e.useCapabilities;exports.useComponent=e.useComponent;exports.useConfigureSuggestions=e.useConfigureSuggestions;exports.useCopilotChatConfiguration=e.useCopilotChatConfiguration;exports.useCopilotKit=e.useCopilotKit;exports.useDefaultRenderTool=e.useDefaultRenderTool;exports.useFrontendTool=e.useFrontendTool;exports.useHumanInTheLoop=e.useHumanInTheLoop;exports.useInterrupt=e.useInterrupt;exports.useKatexStyles=e.useKatexStyles;exports.useKeyboardHeight=e.useKeyboardHeight;exports.useLicenseContext=e.useLicenseContext;exports.useRenderActivityMessage=e.useRenderActivityMessage;exports.useRenderCustomMessages=e.useRenderCustomMessages;exports.useRenderTool=e.useRenderTool;exports.useSandboxFunctions=e.useSandboxFunctions;exports.useSuggestions=e.useSuggestions;exports.useThreads=e.useThreads;Object.defineProperty(exports,"createLicenseContextValue",{enumerable:!0,get:()=>n.createLicenseContextValue});Object.keys(o).forEach(t=>{t!=="default"&&!Object.prototype.hasOwnProperty.call(exports,t)&&Object.defineProperty(exports,t,{enumerable:!0,get:()=>o[t]})});Object.keys(i).forEach(t=>{t!=="default"&&!Object.prototype.hasOwnProperty.call(exports,t)&&Object.defineProperty(exports,t,{enumerable:!0,get:()=>i[t]})});
|
|
2
|
+
//# sourceMappingURL=index.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export * from "@copilotkit/core";
|
|
2
|
+
export * from "@ag-ui/client";
|
|
3
|
+
export * from "./components";
|
|
4
|
+
export * from "./hooks";
|
|
5
|
+
export * from "./providers";
|
|
6
|
+
export * from "./types";
|
|
7
|
+
export * from "./lib/vue-core";
|
|
8
|
+
export * from "./lib/processPartialHtml";
|
|
9
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export * from "@copilotkit/core";
|
|
2
|
+
export * from "@ag-ui/client";
|
|
3
|
+
export * from "./components";
|
|
4
|
+
export * from "./hooks";
|
|
5
|
+
export * from "./providers";
|
|
6
|
+
export * from "./types";
|
|
7
|
+
export * from "./lib/vue-core";
|
|
8
|
+
export * from "./lib/processPartialHtml";
|
|
9
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export * from "@copilotkit/core";
|
|
2
|
+
export * from "@ag-ui/client";
|
|
3
|
+
export * from "./components";
|
|
4
|
+
export * from "./hooks";
|
|
5
|
+
export * from "./providers";
|
|
6
|
+
export * from "./types";
|
|
7
|
+
export * from "./lib/vue-core";
|
|
8
|
+
export * from "./lib/processPartialHtml";
|
|
9
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/v2/index.ts"],"names":[],"mappings":"AACA,cAAc,kBAAkB,CAAC;AACjC,cAAc,eAAe,CAAC;AAG9B,cAAc,cAAc,CAAC;AAC7B,cAAc,SAAS,CAAC;AACxB,cAAc,aAAa,CAAC;AAC5B,cAAc,SAAS,CAAC;AACxB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,0BAA0B,CAAC"}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
export * from "@copilotkit/core";
|
|
2
|
+
export * from "@ag-ui/client";
|
|
3
|
+
import { A as o, _ as i, a as n, C, b as r, c as p, d as l, e as u, f as c, g, h as d, i as h, j as A, k as S, l as m, m as v, n as y, o as I, p as f, q as R, r as T, s as U, t as x, u as M, v as P, w as b, x as V, y as K, z as O, G as w, L as G, M as L, B as H, D as B, O as D, E as F, F as Q, H as j, I as k, U as q, J as z, K as E, N as J, P as N, Q as W, R as X, S as Y, T as Z, V as _, W as $, X as ee, Y as ae, Z as te, $ as se, a0 as oe, a1 as ie, a2 as ne, a3 as Ce, a4 as re, a5 as pe, a6 as le, a7 as ue, a8 as ce, a9 as ge, aa as de, ab as he, ac as Ae } from "../use-render-activity-message-CqtxiFSs.js";
|
|
4
|
+
import { createLicenseContextValue as me } from "@copilotkit/shared";
|
|
5
|
+
export {
|
|
6
|
+
o as A2UIActivityContentSchema,
|
|
7
|
+
i as A2UISurfaceActivityRenderer,
|
|
8
|
+
n as A2UISurfaceActivityType,
|
|
9
|
+
C as CopilotChat,
|
|
10
|
+
r as CopilotChatAssistantMessage,
|
|
11
|
+
p as CopilotChatAttachmentQueue,
|
|
12
|
+
l as CopilotChatAttachmentRenderer,
|
|
13
|
+
u as CopilotChatAudioRecorder,
|
|
14
|
+
c as CopilotChatConfigurationProvider,
|
|
15
|
+
g as CopilotChatDefaultLabels,
|
|
16
|
+
d as CopilotChatInput,
|
|
17
|
+
h as CopilotChatMessageView,
|
|
18
|
+
A as CopilotChatReasoningMessage,
|
|
19
|
+
S as CopilotChatSuggestionPill,
|
|
20
|
+
m as CopilotChatSuggestionView,
|
|
21
|
+
v as CopilotChatToggleButton,
|
|
22
|
+
y as CopilotChatToggleButtonCloseIcon,
|
|
23
|
+
I as CopilotChatToggleButtonOpenIcon,
|
|
24
|
+
f as CopilotChatToolCallsView,
|
|
25
|
+
R as CopilotChatUserMessage,
|
|
26
|
+
T as CopilotChatView,
|
|
27
|
+
U as CopilotKitCoreVue,
|
|
28
|
+
x as CopilotKitInspector,
|
|
29
|
+
M as CopilotKitProvider,
|
|
30
|
+
P as CopilotModalHeader,
|
|
31
|
+
b as CopilotPopup,
|
|
32
|
+
V as CopilotPopupView,
|
|
33
|
+
K as CopilotSidebar,
|
|
34
|
+
O as CopilotSidebarView,
|
|
35
|
+
w as GenerateSandboxedUiArgsSchema,
|
|
36
|
+
G as LicenseContextKey,
|
|
37
|
+
L as MCPAppsActivityContentSchema,
|
|
38
|
+
H as MCPAppsActivityRenderer,
|
|
39
|
+
B as MCPAppsActivityType,
|
|
40
|
+
D as OpenGenerativeUIActivityRenderer,
|
|
41
|
+
F as OpenGenerativeUIActivityType,
|
|
42
|
+
Q as OpenGenerativeUIContentSchema,
|
|
43
|
+
j as OpenGenerativeUIRenderer,
|
|
44
|
+
k as OpenGenerativeUIToolRenderer,
|
|
45
|
+
q as UseAgentUpdate,
|
|
46
|
+
z as createA2UIMessageRenderer,
|
|
47
|
+
E as createDefaultLicenseRef,
|
|
48
|
+
me as createLicenseContextValue,
|
|
49
|
+
J as defineToolCallRenderer,
|
|
50
|
+
N as extractCompleteStyles,
|
|
51
|
+
W as getOperationSurfaceId,
|
|
52
|
+
X as processPartialHtml,
|
|
53
|
+
Y as useAgent,
|
|
54
|
+
Z as useAgentContext,
|
|
55
|
+
_ as useAttachments,
|
|
56
|
+
$ as useCapabilities,
|
|
57
|
+
ee as useComponent,
|
|
58
|
+
ae as useConfigureSuggestions,
|
|
59
|
+
te as useCopilotChatConfiguration,
|
|
60
|
+
se as useCopilotKit,
|
|
61
|
+
oe as useDefaultRenderTool,
|
|
62
|
+
ie as useFrontendTool,
|
|
63
|
+
ne as useHumanInTheLoop,
|
|
64
|
+
Ce as useInterrupt,
|
|
65
|
+
re as useKatexStyles,
|
|
66
|
+
pe as useKeyboardHeight,
|
|
67
|
+
le as useLicenseContext,
|
|
68
|
+
ue as useRenderActivityMessage,
|
|
69
|
+
ce as useRenderCustomMessages,
|
|
70
|
+
ge as useRenderTool,
|
|
71
|
+
de as useSandboxFunctions,
|
|
72
|
+
he as useSuggestions,
|
|
73
|
+
Ae as useThreads
|
|
74
|
+
};
|
|
75
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"processPartialHtml.d.ts","sourceRoot":"","sources":["../../../src/v2/lib/processPartialHtml.ts"],"names":[],"mappings":"AAAA,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAG1D;AAED,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAevD"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { MaybeRefOrGetter, ShallowRef } from "vue";
|
|
2
|
+
/**
|
|
3
|
+
* Keeps reference identity stable for shallow-equal plain-object inputs.
|
|
4
|
+
* Non-plain objects keep strict reference equality semantics.
|
|
5
|
+
*/
|
|
6
|
+
export declare function useShallowStableRef<T>(value: MaybeRefOrGetter<T>): Readonly<ShallowRef<T>>;
|
|
7
|
+
//# sourceMappingURL=shallow-stable.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shallow-stable.d.ts","sourceRoot":"","sources":["../../../src/v2/lib/shallow-stable.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,gBAAgB,EAAE,UAAU,EAAE,MAAM,KAAK,CAAC;AAyBxD;;;GAGG;AACH,wBAAgB,mBAAmB,CAAC,CAAC,EACnC,KAAK,EAAE,gBAAgB,CAAC,CAAC,CAAC,GACzB,QAAQ,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAqBzB"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { CopilotKitCoreVue } from "./vue-core";
|
|
2
|
+
import { TranscriptionErrorCode } from "@copilotkit/shared";
|
|
3
|
+
export interface TranscriptionResult {
|
|
4
|
+
text: string;
|
|
5
|
+
size: number;
|
|
6
|
+
type: string;
|
|
7
|
+
}
|
|
8
|
+
export interface TranscriptionErrorInfo {
|
|
9
|
+
code: TranscriptionErrorCode;
|
|
10
|
+
message: string;
|
|
11
|
+
retryable: boolean;
|
|
12
|
+
}
|
|
13
|
+
export { TranscriptionErrorCode };
|
|
14
|
+
export declare class TranscriptionError extends Error {
|
|
15
|
+
readonly info: TranscriptionErrorInfo;
|
|
16
|
+
constructor(info: TranscriptionErrorInfo);
|
|
17
|
+
}
|
|
18
|
+
export declare function transcribeAudio(core: CopilotKitCoreVue, audioBlob: Blob, filename?: string): Promise<TranscriptionResult>;
|
|
19
|
+
//# sourceMappingURL=transcription-client.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"transcription-client.d.ts","sourceRoot":"","sources":["../../../src/v2/lib/transcription-client.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AACpD,OAAO,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;AAG5D,MAAM,WAAW,mBAAmB;IAClC,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,sBAAsB;IACrC,IAAI,EAAE,sBAAsB,CAAC;IAC7B,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,OAAO,CAAC;CACpB;AAED,OAAO,EAAE,sBAAsB,EAAE,CAAC;AAuClC,qBAAa,kBAAmB,SAAQ,KAAK;IAC3C,SAAgB,IAAI,EAAE,sBAAsB,CAAC;gBAEjC,IAAI,EAAE,sBAAsB;CAKzC;AAED,wBAAsB,eAAe,CACnC,IAAI,EAAE,iBAAiB,EACvB,SAAS,EAAE,IAAI,EACf,QAAQ,GAAE,MAAyB,GAClC,OAAO,CAAC,mBAAmB,CAAC,CAiF9B"}
|