@copilotkit/vue 2.0.0-rc.15 → 2.0.0-rc.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/PARITY.md +2 -2
- package/dist/index.cjs +1 -1
- package/dist/index.mjs +2 -2
- package/dist/{use-render-activity-message-a4iLQujA.js → use-render-activity-message-C-TidR4k.js} +5478 -5760
- package/dist/use-render-activity-message-C-TidR4k.js.map +1 -0
- package/dist/use-render-activity-message-DActAcoq.cjs +92 -0
- package/dist/use-render-activity-message-DActAcoq.cjs.map +1 -0
- package/dist/v2/components/chat/CopilotChat.vue.d.ts +1 -1
- package/dist/v2/components/chat/CopilotChatView.vue.d.ts +1 -1
- package/dist/v2/components/chat/CopilotPopup.vue.d.ts +7 -2
- package/dist/v2/components/chat/CopilotPopup.vue.d.ts.map +1 -1
- package/dist/v2/components/chat/CopilotPopupView.vue.d.ts +4 -2
- package/dist/v2/components/chat/CopilotPopupView.vue.d.ts.map +1 -1
- package/dist/v2/components/chat/CopilotPopupViewInternal.vue.d.ts +4 -2
- package/dist/v2/components/chat/CopilotPopupViewInternal.vue.d.ts.map +1 -1
- package/dist/v2/components/chat/CopilotSidebar.vue.d.ts +7 -2
- package/dist/v2/components/chat/CopilotSidebar.vue.d.ts.map +1 -1
- package/dist/v2/components/chat/CopilotSidebarView.vue.d.ts +4 -2
- package/dist/v2/components/chat/CopilotSidebarView.vue.d.ts.map +1 -1
- package/dist/v2/components/chat/CopilotSidebarViewInternal.vue.d.ts +4 -2
- package/dist/v2/components/chat/CopilotSidebarViewInternal.vue.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 +16 -12
- package/dist/v2/components/chat/index.d.ts.map +1 -1
- package/dist/v2/components/chat/types.d.ts +7 -1
- package/dist/v2/components/chat/types.d.ts.map +1 -1
- package/dist/v2/index.cjs +1 -1
- package/dist/v2/index.mjs +1 -1
- package/package.json +8 -8
- 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 +14 -34
- 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 +14 -34
- package/src/v2/components/chat/__tests__/CopilotPopup.test.ts +90 -1
- package/src/v2/components/chat/__tests__/CopilotSidebar.test.ts +90 -1
- package/src/v2/components/chat/forwarded-slots.ts +17 -0
- package/src/v2/components/chat/types.ts +8 -0
- package/dist/use-render-activity-message-_mkY3bPT.cjs +0 -92
- package/dist/use-render-activity-message-_mkY3bPT.cjs.map +0 -1
- package/dist/use-render-activity-message-a4iLQujA.js.map +0 -1
package/dist/v2/index.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("@copilotkit/core"),n=require("@ag-ui/client"),e=require("../use-render-activity-message-_mkY3bPT.cjs"),o=require("@copilotkit/mcp-apps-renderer/activity"),c=require("@copilotkit/shared");Object.defineProperty(exports,"CopilotChatDefaultLabels",{enumerable:!0,get:()=>a.CopilotChatDefaultLabels});Object.defineProperty(exports,"extractCompleteStyles",{enumerable:!0,get:()=>a.ɵextractCompleteStyles});Object.defineProperty(exports,"processPartialHtml",{enumerable:!0,get:()=>a.ɵprocessPartialHtml});Object.defineProperty(exports,"PROTOCOL_VERSION",{enumerable:!0,get:()=>n.PROTOCOL_VERSION});exports.A2UIActivityContentSchema=e.A2UIActivityContentSchema;exports.A2UISurfaceActivityRenderer=e._sfc_main;exports.A2UISurfaceActivityType=e.A2UISurfaceActivityType;exports.ActivityDeltaEventSchema=e.ActivityDeltaEventSchema;exports.ActivityMessageSchema=e.ActivityMessageSchema;exports.ActivitySnapshotEventSchema=e.ActivitySnapshotEventSchema;exports.AddOperationSchema=e.AddOperationSchema;exports.AgentCapabilitiesSchema=e.AgentCapabilitiesSchema;exports.AssistantMessageSchema=e.AssistantMessageSchema;exports.AttributableSchema=e.AttributableSchema;exports.AudioInputContentSchema=e.AudioPartSchema;exports.AudioInputPartSchema=e.AudioPartSchema;exports.AudioPartSchema=e.AudioPartSchema;exports.BaseEventSchema=e.BaseEventSchema;exports.BaseMessageSchema=e.BaseMessageSchema;exports.ContentPartSchema=e.ContentPartSchema;exports.ContextSchema=e.ContextSchema;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.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.CopilotChatToolCallGroup=e._sfc_main$11;exports.CopilotChatToolCallsView=e._sfc_main$12;exports.CopilotChatUserMessage=e._sfc_main$13;exports.CopilotChatView=e._sfc_main$14;exports.CopilotChatWorkSummary=e._sfc_main$15;exports.CopilotKitCoreVue=e.CopilotKitCoreVue;exports.CopilotKitInspector=e._sfc_main$16;exports.CopilotKitProvider=e._sfc_main$17;exports.CopilotKitStyles=e.CopilotKitStyles;exports.CopilotModalHeader=e.CopilotModalHeader;exports.CopilotPopup=e._sfc_main$18;exports.CopilotPopupView=e.CopilotPopupView;exports.CopilotSidebar=e._sfc_main$19;exports.CopilotSidebarView=e.CopilotSidebarView;exports.CopilotThreadsDrawer=e._sfc_main$20;exports.CopyOperationSchema=e.CopyOperationSchema;exports.CustomEventSchema=e.CustomEventSchema;exports.DataSourceSchema=e.DataSourceSchema;exports.DeveloperMessageSchema=e.DeveloperMessageSchema;exports.DocumentInputContentSchema=e.DocumentPartSchema;exports.DocumentInputPartSchema=e.DocumentPartSchema;exports.DocumentPartSchema=e.DocumentPartSchema;exports.EventSchema=e.EventSchema;exports.EventSchemas=e.EventSchema;exports.EventTypeSchema=e.EventTypeSchema;exports.ExecutionCapabilitiesSchema=e.ExecutionCapabilitiesSchema;exports.FileSourceSchema=e.FileSourceSchema;exports.FunctionCallSchema=e.FunctionCallSchema;exports.GenerateSandboxedUiArgsSchema=e.GenerateSandboxedUiArgsSchema;exports.HumanInTheLoopCapabilitiesSchema=e.HumanInTheLoopCapabilitiesSchema;exports.IdentityCapabilitiesSchema=e.IdentityCapabilitiesSchema;exports.ImageInputContentSchema=e.ImagePartSchema;exports.ImageInputPartSchema=e.ImagePartSchema;exports.ImagePartSchema=e.ImagePartSchema;exports.InputContentDataSourceSchema=e.DataSourceSchema;exports.InputContentSchema=e.ContentPartSchema;exports.InputContentSourceSchema=e.PartSourceSchema;exports.InputContentUrlSourceSchema=e.UrlSourceSchema;exports.InterruptSchema=e.InterruptSchema;exports.JsonPatchOperationSchema=e.JsonPatchOperationSchema;exports.JsonPatchSchema=e.JsonPatchSchema;exports.JsonPointerSchema=e.JsonPointerSchema;exports.LicenseContextKey=e.LicenseContextKey;exports.MARKDOWN_RENDERER_KEY=e.MARKDOWN_RENDERER_KEY;exports.MCPAppsActivityRenderer=e.MCPAppsActivityRenderer;exports.MessageSchema=e.MessageSchema;exports.MessagesSnapshotEventSchema=e.MessagesSnapshotEventSchema;exports.MetadataSchema=e.MetadataSchema;exports.MoveOperationSchema=e.MoveOperationSchema;exports.MultiAgentCapabilitiesSchema=e.MultiAgentCapabilitiesSchema;exports.MultimodalCapabilitiesSchema=e.MultimodalCapabilitiesSchema;exports.MultimodalInputCapabilitiesSchema=e.MultimodalInputCapabilitiesSchema;exports.MultimodalOutputCapabilitiesSchema=e.MultimodalOutputCapabilitiesSchema;exports.OpenGenerativeUIActivityRenderer=e.OpenGenerativeUIActivityRenderer;exports.OpenGenerativeUIActivityType=e.OpenGenerativeUIActivityType;exports.OpenGenerativeUIContentSchema=e.OpenGenerativeUIContentSchema;exports.OpenGenerativeUIRenderer=e.OpenGenerativeUIRenderer;exports.OpenGenerativeUIToolRenderer=e.OpenGenerativeUIToolRenderer;exports.OptionalMetadataSchema=e.OptionalMetadataSchema;exports.OutputCapabilitiesSchema=e.OutputCapabilitiesSchema;exports.PartSourceSchema=e.PartSourceSchema;exports.RawEventSchema=e.RawEventSchema;exports.ReasoningCapabilitiesSchema=e.ReasoningCapabilitiesSchema;exports.ReasoningEncryptedValueEventSchema=e.ReasoningEncryptedValueEventSchema;exports.ReasoningEncryptedValueSubtypeSchema=e.ReasoningEncryptedValueSubtypeSchema;exports.ReasoningEndEventSchema=e.ReasoningEndEventSchema;exports.ReasoningMessageChunkEventSchema=e.ReasoningMessageChunkEventSchema;exports.ReasoningMessageContentEventSchema=e.ReasoningMessageContentEventSchema;exports.ReasoningMessageEndEventSchema=e.ReasoningMessageEndEventSchema;exports.ReasoningMessageSchema=e.ReasoningMessageSchema;exports.ReasoningMessageStartEventSchema=e.ReasoningMessageStartEventSchema;exports.ReasoningStartEventSchema=e.ReasoningStartEventSchema;exports.RemoveOperationSchema=e.RemoveOperationSchema;exports.ReplaceOperationSchema=e.ReplaceOperationSchema;exports.ResumeEntrySchema=e.ResumeEntrySchema;exports.RoleSchema=e.RoleSchema;exports.RunAgentInputSchema=e.RunAgentInputSchema;exports.RunErrorEventSchema=e.RunErrorEventSchema;exports.RunFinishedCancelledOutcomeSchema=e.RunFinishedCancelledOutcomeSchema;exports.RunFinishedEventSchema=e.RunFinishedEventSchema;exports.RunFinishedInterruptOutcomeSchema=e.RunFinishedInterruptOutcomeSchema;exports.RunFinishedOutcomeSchema=e.RunFinishedOutcomeSchema;exports.RunFinishedSuccessOutcomeSchema=e.RunFinishedSuccessOutcomeSchema;exports.RunStartedEventSchema=e.RunStartedEventSchema;exports.StateCapabilitiesSchema=e.StateCapabilitiesSchema;exports.StateDeltaEventSchema=e.StateDeltaEventSchema;exports.StateSchema=e.StateSchema;exports.StateSnapshotEventSchema=e.StateSnapshotEventSchema;exports.StepFinishedEventSchema=e.StepFinishedEventSchema;exports.StepStartedEventSchema=e.StepStartedEventSchema;exports.StreamingMarkdownDefault=e._sfc_main$21;exports.SubagentErrorEventSchema=e.SubagentErrorEventSchema;exports.SubagentFinishedEventSchema=e.SubagentFinishedEventSchema;exports.SubagentFinishedOutcomeSchema=e.SubagentFinishedOutcomeSchema;exports.SubagentFinishedSuccessOutcomeSchema=e.SubagentFinishedSuccessOutcomeSchema;exports.SubagentFinishedSuspendedOutcomeSchema=e.SubagentFinishedSuspendedOutcomeSchema;exports.SubagentInfoSchema=e.SubagentInfoSchema;exports.SubagentRunIdSchema=e.SubagentRunIdSchema;exports.SubagentStartedEventSchema=e.SubagentStartedEventSchema;exports.SystemMessageSchema=e.SystemMessageSchema;exports.TestOperationSchema=e.TestOperationSchema;exports.TextInputContentSchema=e.TextPartSchema;exports.TextMessageChunkEventSchema=e.TextMessageChunkEventSchema;exports.TextMessageContentEventSchema=e.TextMessageContentEventSchema;exports.TextMessageEndEventSchema=e.TextMessageEndEventSchema;exports.TextMessageRoleSchema=e.TextMessageRoleSchema;exports.TextMessageStartEventSchema=e.TextMessageStartEventSchema;exports.TextPartSchema=e.TextPartSchema;exports.TokenUsageSchema=e.TokenUsageSchema;exports.ToolCallArgsEventSchema=e.ToolCallArgsEventSchema;exports.ToolCallChunkEventSchema=e.ToolCallChunkEventSchema;exports.ToolCallEndEventSchema=e.ToolCallEndEventSchema;exports.ToolCallResultEventSchema=e.ToolCallResultEventSchema;exports.ToolCallSchema=e.ToolCallSchema;exports.ToolCallStartEventSchema=e.ToolCallStartEventSchema;exports.ToolMessageSchema=e.ToolMessageSchema;exports.ToolSchema=e.ToolSchema;exports.ToolsCapabilitiesSchema=e.ToolsCapabilitiesSchema;exports.TransportCapabilitiesSchema=e.TransportCapabilitiesSchema;exports.UrlSourceSchema=e.UrlSourceSchema;exports.UseAgentUpdate=e.UseAgentUpdate;exports.UserMessageSchema=e.UserMessageSchema;exports.VideoInputContentSchema=e.VideoPartSchema;exports.VideoInputPartSchema=e.VideoPartSchema;exports.VideoPartSchema=e.VideoPartSchema;exports.createA2UIMessageRenderer=e.createA2UIMessageRenderer;exports.createDefaultLicenseRef=e.createDefaultLicenseRef;exports.defineToolCallRenderer=e.defineToolCallRenderer;exports.getOperationSurfaceId=e.getOperationSurfaceId;exports.isVueComponentRenderer=e.isVueComponentRenderer;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.useKeyboardHeight=e.useKeyboardHeight;exports.useLicenseContext=e.useLicenseContext;exports.useMarkdownRenderer=e.useMarkdownRenderer;exports.useRenderActivityMessage=e.useRenderActivityMessage;exports.useRenderCustomMessages=e.useRenderCustomMessages;exports.useRenderTool=e.useRenderTool;exports.useSandboxFunctions=e.useSandboxFunctions;exports.useSuggestions=e.useSuggestions;exports.useThreads=e.useThreads;exports.vueBasicCatalog=e.vueBasicCatalog;Object.defineProperty(exports,"MCPAppsActivityContentSchema",{enumerable:!0,get:()=>o.MCPAppsActivityContentSchema});Object.defineProperty(exports,"MCPAppsActivityType",{enumerable:!0,get:()=>o.MCPAppsActivityType});Object.defineProperty(exports,"ɵrunMcpFollowUp",{enumerable:!0,get:()=>o.ɵrunMcpFollowUp});Object.defineProperty(exports,"createLicenseContextValue",{enumerable:!0,get:()=>c.createLicenseContextValue});Object.keys(a).forEach(t=>{t!=="default"&&!Object.prototype.hasOwnProperty.call(exports,t)&&Object.defineProperty(exports,t,{enumerable:!0,get:()=>a[t]})});Object.keys(n).forEach(t=>{t!=="default"&&!Object.prototype.hasOwnProperty.call(exports,t)&&Object.defineProperty(exports,t,{enumerable:!0,get:()=>n[t]})});
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("@copilotkit/core"),n=require("@ag-ui/client"),e=require("../use-render-activity-message-DActAcoq.cjs"),o=require("@copilotkit/mcp-apps-renderer/activity"),c=require("@copilotkit/shared");Object.defineProperty(exports,"CopilotChatDefaultLabels",{enumerable:!0,get:()=>a.CopilotChatDefaultLabels});Object.defineProperty(exports,"extractCompleteStyles",{enumerable:!0,get:()=>a.ɵextractCompleteStyles});Object.defineProperty(exports,"processPartialHtml",{enumerable:!0,get:()=>a.ɵprocessPartialHtml});Object.defineProperty(exports,"PROTOCOL_VERSION",{enumerable:!0,get:()=>n.PROTOCOL_VERSION});exports.A2UIActivityContentSchema=e.A2UIActivityContentSchema;exports.A2UISurfaceActivityRenderer=e._sfc_main;exports.A2UISurfaceActivityType=e.A2UISurfaceActivityType;exports.ActivityDeltaEventSchema=e.ActivityDeltaEventSchema;exports.ActivityMessageSchema=e.ActivityMessageSchema;exports.ActivitySnapshotEventSchema=e.ActivitySnapshotEventSchema;exports.AddOperationSchema=e.AddOperationSchema;exports.AgentCapabilitiesSchema=e.AgentCapabilitiesSchema;exports.AssistantMessageSchema=e.AssistantMessageSchema;exports.AttributableSchema=e.AttributableSchema;exports.AudioInputContentSchema=e.AudioPartSchema;exports.AudioInputPartSchema=e.AudioPartSchema;exports.AudioPartSchema=e.AudioPartSchema;exports.BaseEventSchema=e.BaseEventSchema;exports.BaseMessageSchema=e.BaseMessageSchema;exports.ContentPartSchema=e.ContentPartSchema;exports.ContextSchema=e.ContextSchema;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.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.CopilotChatToolCallGroup=e._sfc_main$11;exports.CopilotChatToolCallsView=e._sfc_main$12;exports.CopilotChatUserMessage=e._sfc_main$13;exports.CopilotChatView=e._sfc_main$14;exports.CopilotChatWorkSummary=e._sfc_main$15;exports.CopilotKitCoreVue=e.CopilotKitCoreVue;exports.CopilotKitInspector=e._sfc_main$16;exports.CopilotKitProvider=e._sfc_main$17;exports.CopilotKitStyles=e.CopilotKitStyles;exports.CopilotModalHeader=e.CopilotModalHeader;exports.CopilotPopup=e._sfc_main$18;exports.CopilotPopupView=e.CopilotPopupView;exports.CopilotSidebar=e._sfc_main$19;exports.CopilotSidebarView=e.CopilotSidebarView;exports.CopilotThreadsDrawer=e._sfc_main$20;exports.CopyOperationSchema=e.CopyOperationSchema;exports.CustomEventSchema=e.CustomEventSchema;exports.DataSourceSchema=e.DataSourceSchema;exports.DeveloperMessageSchema=e.DeveloperMessageSchema;exports.DocumentInputContentSchema=e.DocumentPartSchema;exports.DocumentInputPartSchema=e.DocumentPartSchema;exports.DocumentPartSchema=e.DocumentPartSchema;exports.EventSchema=e.EventSchema;exports.EventSchemas=e.EventSchema;exports.EventTypeSchema=e.EventTypeSchema;exports.ExecutionCapabilitiesSchema=e.ExecutionCapabilitiesSchema;exports.FileSourceSchema=e.FileSourceSchema;exports.FunctionCallSchema=e.FunctionCallSchema;exports.GenerateSandboxedUiArgsSchema=e.GenerateSandboxedUiArgsSchema;exports.HumanInTheLoopCapabilitiesSchema=e.HumanInTheLoopCapabilitiesSchema;exports.IdentityCapabilitiesSchema=e.IdentityCapabilitiesSchema;exports.ImageInputContentSchema=e.ImagePartSchema;exports.ImageInputPartSchema=e.ImagePartSchema;exports.ImagePartSchema=e.ImagePartSchema;exports.InputContentDataSourceSchema=e.DataSourceSchema;exports.InputContentSchema=e.ContentPartSchema;exports.InputContentSourceSchema=e.PartSourceSchema;exports.InputContentUrlSourceSchema=e.UrlSourceSchema;exports.InterruptSchema=e.InterruptSchema;exports.JsonPatchOperationSchema=e.JsonPatchOperationSchema;exports.JsonPatchSchema=e.JsonPatchSchema;exports.JsonPointerSchema=e.JsonPointerSchema;exports.LicenseContextKey=e.LicenseContextKey;exports.MARKDOWN_RENDERER_KEY=e.MARKDOWN_RENDERER_KEY;exports.MCPAppsActivityRenderer=e.MCPAppsActivityRenderer;exports.MessageSchema=e.MessageSchema;exports.MessagesSnapshotEventSchema=e.MessagesSnapshotEventSchema;exports.MetadataSchema=e.MetadataSchema;exports.MoveOperationSchema=e.MoveOperationSchema;exports.MultiAgentCapabilitiesSchema=e.MultiAgentCapabilitiesSchema;exports.MultimodalCapabilitiesSchema=e.MultimodalCapabilitiesSchema;exports.MultimodalInputCapabilitiesSchema=e.MultimodalInputCapabilitiesSchema;exports.MultimodalOutputCapabilitiesSchema=e.MultimodalOutputCapabilitiesSchema;exports.OpenGenerativeUIActivityRenderer=e.OpenGenerativeUIActivityRenderer;exports.OpenGenerativeUIActivityType=e.OpenGenerativeUIActivityType;exports.OpenGenerativeUIContentSchema=e.OpenGenerativeUIContentSchema;exports.OpenGenerativeUIRenderer=e.OpenGenerativeUIRenderer;exports.OpenGenerativeUIToolRenderer=e.OpenGenerativeUIToolRenderer;exports.OptionalMetadataSchema=e.OptionalMetadataSchema;exports.OutputCapabilitiesSchema=e.OutputCapabilitiesSchema;exports.PartSourceSchema=e.PartSourceSchema;exports.RawEventSchema=e.RawEventSchema;exports.ReasoningCapabilitiesSchema=e.ReasoningCapabilitiesSchema;exports.ReasoningEncryptedValueEventSchema=e.ReasoningEncryptedValueEventSchema;exports.ReasoningEncryptedValueSubtypeSchema=e.ReasoningEncryptedValueSubtypeSchema;exports.ReasoningEndEventSchema=e.ReasoningEndEventSchema;exports.ReasoningMessageChunkEventSchema=e.ReasoningMessageChunkEventSchema;exports.ReasoningMessageContentEventSchema=e.ReasoningMessageContentEventSchema;exports.ReasoningMessageEndEventSchema=e.ReasoningMessageEndEventSchema;exports.ReasoningMessageSchema=e.ReasoningMessageSchema;exports.ReasoningMessageStartEventSchema=e.ReasoningMessageStartEventSchema;exports.ReasoningStartEventSchema=e.ReasoningStartEventSchema;exports.RemoveOperationSchema=e.RemoveOperationSchema;exports.ReplaceOperationSchema=e.ReplaceOperationSchema;exports.ResumeEntrySchema=e.ResumeEntrySchema;exports.RoleSchema=e.RoleSchema;exports.RunAgentInputSchema=e.RunAgentInputSchema;exports.RunErrorEventSchema=e.RunErrorEventSchema;exports.RunFinishedCancelledOutcomeSchema=e.RunFinishedCancelledOutcomeSchema;exports.RunFinishedEventSchema=e.RunFinishedEventSchema;exports.RunFinishedInterruptOutcomeSchema=e.RunFinishedInterruptOutcomeSchema;exports.RunFinishedOutcomeSchema=e.RunFinishedOutcomeSchema;exports.RunFinishedSuccessOutcomeSchema=e.RunFinishedSuccessOutcomeSchema;exports.RunStartedEventSchema=e.RunStartedEventSchema;exports.StateCapabilitiesSchema=e.StateCapabilitiesSchema;exports.StateDeltaEventSchema=e.StateDeltaEventSchema;exports.StateSchema=e.StateSchema;exports.StateSnapshotEventSchema=e.StateSnapshotEventSchema;exports.StepFinishedEventSchema=e.StepFinishedEventSchema;exports.StepStartedEventSchema=e.StepStartedEventSchema;exports.StreamingMarkdownDefault=e._sfc_main$21;exports.SubagentErrorEventSchema=e.SubagentErrorEventSchema;exports.SubagentFinishedEventSchema=e.SubagentFinishedEventSchema;exports.SubagentFinishedOutcomeSchema=e.SubagentFinishedOutcomeSchema;exports.SubagentFinishedSuccessOutcomeSchema=e.SubagentFinishedSuccessOutcomeSchema;exports.SubagentFinishedSuspendedOutcomeSchema=e.SubagentFinishedSuspendedOutcomeSchema;exports.SubagentInfoSchema=e.SubagentInfoSchema;exports.SubagentRunIdSchema=e.SubagentRunIdSchema;exports.SubagentStartedEventSchema=e.SubagentStartedEventSchema;exports.SystemMessageSchema=e.SystemMessageSchema;exports.TestOperationSchema=e.TestOperationSchema;exports.TextInputContentSchema=e.TextPartSchema;exports.TextMessageChunkEventSchema=e.TextMessageChunkEventSchema;exports.TextMessageContentEventSchema=e.TextMessageContentEventSchema;exports.TextMessageEndEventSchema=e.TextMessageEndEventSchema;exports.TextMessageRoleSchema=e.TextMessageRoleSchema;exports.TextMessageStartEventSchema=e.TextMessageStartEventSchema;exports.TextPartSchema=e.TextPartSchema;exports.TokenUsageSchema=e.TokenUsageSchema;exports.ToolCallArgsEventSchema=e.ToolCallArgsEventSchema;exports.ToolCallChunkEventSchema=e.ToolCallChunkEventSchema;exports.ToolCallEndEventSchema=e.ToolCallEndEventSchema;exports.ToolCallResultEventSchema=e.ToolCallResultEventSchema;exports.ToolCallSchema=e.ToolCallSchema;exports.ToolCallStartEventSchema=e.ToolCallStartEventSchema;exports.ToolMessageSchema=e.ToolMessageSchema;exports.ToolSchema=e.ToolSchema;exports.ToolsCapabilitiesSchema=e.ToolsCapabilitiesSchema;exports.TransportCapabilitiesSchema=e.TransportCapabilitiesSchema;exports.UrlSourceSchema=e.UrlSourceSchema;exports.UseAgentUpdate=e.UseAgentUpdate;exports.UserMessageSchema=e.UserMessageSchema;exports.VideoInputContentSchema=e.VideoPartSchema;exports.VideoInputPartSchema=e.VideoPartSchema;exports.VideoPartSchema=e.VideoPartSchema;exports.createA2UIMessageRenderer=e.createA2UIMessageRenderer;exports.createDefaultLicenseRef=e.createDefaultLicenseRef;exports.defineToolCallRenderer=e.defineToolCallRenderer;exports.getOperationSurfaceId=e.getOperationSurfaceId;exports.isVueComponentRenderer=e.isVueComponentRenderer;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.useKeyboardHeight=e.useKeyboardHeight;exports.useLicenseContext=e.useLicenseContext;exports.useMarkdownRenderer=e.useMarkdownRenderer;exports.useRenderActivityMessage=e.useRenderActivityMessage;exports.useRenderCustomMessages=e.useRenderCustomMessages;exports.useRenderTool=e.useRenderTool;exports.useSandboxFunctions=e.useSandboxFunctions;exports.useSuggestions=e.useSuggestions;exports.useThreads=e.useThreads;exports.vueBasicCatalog=e.vueBasicCatalog;Object.defineProperty(exports,"MCPAppsActivityContentSchema",{enumerable:!0,get:()=>o.MCPAppsActivityContentSchema});Object.defineProperty(exports,"MCPAppsActivityType",{enumerable:!0,get:()=>o.MCPAppsActivityType});Object.defineProperty(exports,"ɵrunMcpFollowUp",{enumerable:!0,get:()=>o.ɵrunMcpFollowUp});Object.defineProperty(exports,"createLicenseContextValue",{enumerable:!0,get:()=>c.createLicenseContextValue});Object.keys(a).forEach(t=>{t!=="default"&&!Object.prototype.hasOwnProperty.call(exports,t)&&Object.defineProperty(exports,t,{enumerable:!0,get:()=>a[t]})});Object.keys(n).forEach(t=>{t!=="default"&&!Object.prototype.hasOwnProperty.call(exports,t)&&Object.defineProperty(exports,t,{enumerable:!0,get:()=>n[t]})});
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
package/dist/v2/index.mjs
CHANGED
|
@@ -2,7 +2,7 @@ export * from "@copilotkit/core";
|
|
|
2
2
|
import { CopilotChatDefaultLabels as s, ɵextractCompleteStyles as n, ɵprocessPartialHtml as o } from "@copilotkit/core";
|
|
3
3
|
export * from "@ag-ui/client";
|
|
4
4
|
import { PROTOCOL_VERSION as S } from "@ag-ui/client";
|
|
5
|
-
import { A as m, _ as r, a as u, b as l, c as p, d as C, e as b, f as g, g as d, h as v, i as E, i as R, i as I, B as M, j as A, C as T, k as y, l as O, m as x, n as P, o as f, p as U, q as V, r as D, s as F, t as w, u as K, v as L, w as k, x as G, y as B, z as H, D as J, E as N, F as W, G as _, H as j, I as q, J as z, K as Q, L as Y, M as X, N as Z, O as $, P as aa, Q as ea, R as ta, S as sa, T as na, U as oa, V as ia, V as ca, V as Sa, W as ha, W as ma, X as ra, Y as ua, Z as la, $ as pa, a0 as Ca, a1 as ba, a2 as ga, a3 as da, a3 as va, a3 as Ea, T as Ra, C as Ia, a4 as Ma, a5 as Aa, a6 as Ta, a7 as ya, a8 as Oa, a9 as xa, aa as Pa, ab as fa, ac as Ua, ad as Va, ae as Da, af as Fa, ag as wa, ah as Ka, ai as La, aj as ka, ak as Ga, al as Ba, am as Ha, an as Ja, ao as Na, ap as Wa, aq as _a, ar as ja, a4 as qa, as as za, at as Qa, au as Ya, av as Xa, aw as Za, ax as $a, ay as ae, az as ee, aA as te, aB as se, aC as ne, aD as oe, aE as ie, aF as ce, aG as Se, aH as he, aI as me, aJ as re, aK as ue, aL as le, aM as pe, aN as Ce, aO as be, aP as ge, aQ as de, aR as ve, aS as Ee, aT as Re, aU as Ie, aV as Me, aW as Ae, aX as Te, aY as ye, aZ as Oe, a_ as xe, a$ as Pe, b0 as fe, b1 as Ue, b2 as Ve, b3 as De, b4 as Fe, b5 as we, b6 as Ke, b7 as Le, b8 as ke, b9 as Ge, b4 as Be, ba as He, bb as Je, bc as Ne, bd as We, be as _e, bf as je, bg as qe, bh as ze, bi as Qe, bj as Ye, bk as Xe, a5 as Ze, bl as $e, bm as at, bn as et, bn as tt, bn as st, bo as nt, bp as ot, bq as it, br as ct, bs as St, bt as ht, bu as mt, bv as rt, bw as ut, bx as lt, by as pt, bz as Ct, bA as bt, bB as gt, bC as dt, bD as vt, bE as Et, bF as Rt, bG as It, bH as Mt, bI as At, bJ as Tt, bK as yt, bL as Ot, bM as xt, bN as Pt, bO as ft } from "../use-render-activity-message-
|
|
5
|
+
import { A as m, _ as r, a as u, b as l, c as p, d as C, e as b, f as g, g as d, h as v, i as E, i as R, i as I, B as M, j as A, C as T, k as y, l as O, m as x, n as P, o as f, p as U, q as V, r as D, s as F, t as w, u as K, v as L, w as k, x as G, y as B, z as H, D as J, E as N, F as W, G as _, H as j, I as q, J as z, K as Q, L as Y, M as X, N as Z, O as $, P as aa, Q as ea, R as ta, S as sa, T as na, U as oa, V as ia, V as ca, V as Sa, W as ha, W as ma, X as ra, Y as ua, Z as la, $ as pa, a0 as Ca, a1 as ba, a2 as ga, a3 as da, a3 as va, a3 as Ea, T as Ra, C as Ia, a4 as Ma, a5 as Aa, a6 as Ta, a7 as ya, a8 as Oa, a9 as xa, aa as Pa, ab as fa, ac as Ua, ad as Va, ae as Da, af as Fa, ag as wa, ah as Ka, ai as La, aj as ka, ak as Ga, al as Ba, am as Ha, an as Ja, ao as Na, ap as Wa, aq as _a, ar as ja, a4 as qa, as as za, at as Qa, au as Ya, av as Xa, aw as Za, ax as $a, ay as ae, az as ee, aA as te, aB as se, aC as ne, aD as oe, aE as ie, aF as ce, aG as Se, aH as he, aI as me, aJ as re, aK as ue, aL as le, aM as pe, aN as Ce, aO as be, aP as ge, aQ as de, aR as ve, aS as Ee, aT as Re, aU as Ie, aV as Me, aW as Ae, aX as Te, aY as ye, aZ as Oe, a_ as xe, a$ as Pe, b0 as fe, b1 as Ue, b2 as Ve, b3 as De, b4 as Fe, b5 as we, b6 as Ke, b7 as Le, b8 as ke, b9 as Ge, b4 as Be, ba as He, bb as Je, bc as Ne, bd as We, be as _e, bf as je, bg as qe, bh as ze, bi as Qe, bj as Ye, bk as Xe, a5 as Ze, bl as $e, bm as at, bn as et, bn as tt, bn as st, bo as nt, bp as ot, bq as it, br as ct, bs as St, bt as ht, bu as mt, bv as rt, bw as ut, bx as lt, by as pt, bz as Ct, bA as bt, bB as gt, bC as dt, bD as vt, bE as Et, bF as Rt, bG as It, bH as Mt, bI as At, bJ as Tt, bK as yt, bL as Ot, bM as xt, bN as Pt, bO as ft } from "../use-render-activity-message-C-TidR4k.js";
|
|
6
6
|
import { MCPAppsActivityContentSchema as Vt, MCPAppsActivityType as Dt, ɵrunMcpFollowUp as Ft } from "@copilotkit/mcp-apps-renderer/activity";
|
|
7
7
|
import { createLicenseContextValue as Kt } from "@copilotkit/shared";
|
|
8
8
|
export {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@copilotkit/vue",
|
|
3
|
-
"version": "2.0.0-rc.
|
|
3
|
+
"version": "2.0.0-rc.16",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Vue 3 components and composables for CopilotKit",
|
|
6
6
|
"keywords": [
|
|
@@ -61,13 +61,13 @@
|
|
|
61
61
|
"@a2ui/web_core": "0.10.4",
|
|
62
62
|
"@ag-ui/client": "1.0.2",
|
|
63
63
|
"@ag-ui/core": "1.0.2",
|
|
64
|
-
"@copilotkit/a2ui-renderer": "2.0.0-rc.
|
|
65
|
-
"@copilotkit/core": "2.0.0-rc.
|
|
66
|
-
"@copilotkit/markdown": "2.0.0-rc.
|
|
67
|
-
"@copilotkit/mcp-apps-renderer": "2.0.0-rc.
|
|
68
|
-
"@copilotkit/shared": "2.0.0-rc.
|
|
69
|
-
"@copilotkit/web-components": "2.0.0-rc.
|
|
70
|
-
"@copilotkit/web-inspector": "2.0.0-rc.
|
|
64
|
+
"@copilotkit/a2ui-renderer": "2.0.0-rc.16",
|
|
65
|
+
"@copilotkit/core": "2.0.0-rc.16",
|
|
66
|
+
"@copilotkit/markdown": "2.0.0-rc.16",
|
|
67
|
+
"@copilotkit/mcp-apps-renderer": "2.0.0-rc.16",
|
|
68
|
+
"@copilotkit/shared": "2.0.0-rc.16",
|
|
69
|
+
"@copilotkit/web-components": "2.0.0-rc.16",
|
|
70
|
+
"@copilotkit/web-inspector": "2.0.0-rc.16",
|
|
71
71
|
"zod": "^4.2.0"
|
|
72
72
|
},
|
|
73
73
|
"devDependencies": {
|
|
@@ -4,9 +4,14 @@ import CopilotChat from "./CopilotChat.vue";
|
|
|
4
4
|
import CopilotPopupView from "./CopilotPopupView.vue";
|
|
5
5
|
import CopilotPopupWelcomeScreen from "./CopilotPopupWelcomeScreen.vue";
|
|
6
6
|
import InlineFeatureWarning from "../InlineFeatureWarning.vue";
|
|
7
|
+
import { forwardedSlotNames } from "./forwarded-slots";
|
|
7
8
|
import { useLicenseContext } from "../../providers/useLicenseContext";
|
|
8
9
|
import type {
|
|
10
|
+
CopilotChatFeatherSlotProps,
|
|
11
|
+
CopilotChatInterruptSlotProps,
|
|
9
12
|
CopilotChatMessageViewSlotProps,
|
|
13
|
+
CopilotChatScrollToBottomButtonSlotProps,
|
|
14
|
+
CopilotChatScrollViewSlotProps,
|
|
10
15
|
CopilotChatViewOverrideSlotProps,
|
|
11
16
|
CopilotChatWelcomeScreenSlotProps,
|
|
12
17
|
CopilotPopupProps,
|
|
@@ -53,14 +58,28 @@ defineSlots<{
|
|
|
53
58
|
"toggle-button"?: (props: CopilotPopupViewToggleButtonSlotProps) => unknown;
|
|
54
59
|
"chat-view"?: (props: CopilotChatViewOverrideSlotProps) => unknown;
|
|
55
60
|
"message-view"?: (props: CopilotChatMessageViewSlotProps) => unknown;
|
|
61
|
+
"scroll-view"?: (props: CopilotChatScrollViewSlotProps) => unknown;
|
|
62
|
+
feather?: (props: CopilotChatFeatherSlotProps) => unknown;
|
|
63
|
+
"scroll-to-bottom-button"?: (
|
|
64
|
+
props: CopilotChatScrollToBottomButtonSlotProps,
|
|
65
|
+
) => unknown;
|
|
66
|
+
interrupt?: (props: CopilotChatInterruptSlotProps) => unknown;
|
|
56
67
|
input?: (props: CopilotSidebarWelcomeScreenInputSlotProps) => unknown;
|
|
57
68
|
"suggestion-view"?: (
|
|
58
69
|
props: CopilotSidebarWelcomeScreenSuggestionViewSlotProps,
|
|
59
70
|
) => unknown;
|
|
60
71
|
"welcome-screen"?: (props: CopilotChatWelcomeScreenSlotProps) => unknown;
|
|
61
72
|
"welcome-message"?: () => unknown;
|
|
73
|
+
// Any other slot goes to the chat view, as on CopilotChat.
|
|
74
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
75
|
+
[key: string]: ((props: any) => unknown) | undefined;
|
|
62
76
|
}>();
|
|
63
77
|
|
|
78
|
+
// Slots this component renders itself and does not pass to the view. It passes
|
|
79
|
+
// every other slot to the view. It also renders `input` and `suggestion-view`
|
|
80
|
+
// in its welcome screen, so those two go to both places.
|
|
81
|
+
const OWN_SLOTS = ["chat-view", "welcome-screen", "welcome-message"] as const;
|
|
82
|
+
|
|
64
83
|
defineEmits<{
|
|
65
84
|
"submit-message": [value: string];
|
|
66
85
|
stop: [];
|
|
@@ -125,15 +144,12 @@ watch(
|
|
|
125
144
|
:on-finish-transcribe-with-audio="slotProps.onFinishTranscribeWithAudio"
|
|
126
145
|
v-bind="popupViewEventBindings(slotProps)"
|
|
127
146
|
>
|
|
128
|
-
<template v-if="$slots.header" #header="headerProps">
|
|
129
|
-
<slot name="header" v-bind="headerProps" />
|
|
130
|
-
</template>
|
|
131
|
-
|
|
132
147
|
<template
|
|
133
|
-
v-
|
|
134
|
-
|
|
148
|
+
v-for="slotName in forwardedSlotNames($slots, OWN_SLOTS)"
|
|
149
|
+
:key="slotName"
|
|
150
|
+
#[slotName]="forwardedProps"
|
|
135
151
|
>
|
|
136
|
-
<slot name="
|
|
152
|
+
<slot :name="slotName" v-bind="forwardedProps" />
|
|
137
153
|
</template>
|
|
138
154
|
|
|
139
155
|
<template #welcome-screen="welcomeScreenProps">
|
|
@@ -159,24 +175,6 @@ watch(
|
|
|
159
175
|
</template>
|
|
160
176
|
</CopilotPopupWelcomeScreen>
|
|
161
177
|
</template>
|
|
162
|
-
|
|
163
|
-
<template
|
|
164
|
-
v-if="$slots['message-view']"
|
|
165
|
-
#message-view="messageViewProps"
|
|
166
|
-
>
|
|
167
|
-
<slot name="message-view" v-bind="messageViewProps" />
|
|
168
|
-
</template>
|
|
169
|
-
|
|
170
|
-
<template v-if="$slots.input" #input="inputProps">
|
|
171
|
-
<slot name="input" v-bind="inputProps" />
|
|
172
|
-
</template>
|
|
173
|
-
|
|
174
|
-
<template
|
|
175
|
-
v-if="$slots['suggestion-view']"
|
|
176
|
-
#suggestion-view="suggestionViewProps"
|
|
177
|
-
>
|
|
178
|
-
<slot name="suggestion-view" v-bind="suggestionViewProps" />
|
|
179
|
-
</template>
|
|
180
178
|
</CopilotPopupView>
|
|
181
179
|
</template>
|
|
182
180
|
</CopilotChat>
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
2
|
import { computed, useAttrs } from "vue";
|
|
3
3
|
import CopilotChatConfigurationProvider from "../../providers/CopilotChatConfigurationProvider.vue";
|
|
4
|
+
import { forwardedSlotNames } from "./forwarded-slots";
|
|
4
5
|
import CopilotPopupViewInternal from "./CopilotPopupViewInternal.vue";
|
|
5
6
|
import type {
|
|
6
7
|
CopilotChatFeatherSlotProps,
|
|
8
|
+
CopilotChatInterruptSlotProps,
|
|
7
9
|
CopilotChatMessageViewSlotProps,
|
|
8
10
|
CopilotChatScrollToBottomButtonSlotProps,
|
|
9
11
|
CopilotChatScrollViewSlotProps,
|
|
@@ -44,12 +46,16 @@ defineSlots<{
|
|
|
44
46
|
"scroll-to-bottom-button"?: (
|
|
45
47
|
props: CopilotChatScrollToBottomButtonSlotProps,
|
|
46
48
|
) => unknown;
|
|
49
|
+
interrupt?: (props: CopilotChatInterruptSlotProps) => unknown;
|
|
47
50
|
input?: (props: CopilotSidebarWelcomeScreenInputSlotProps) => unknown;
|
|
48
51
|
"suggestion-view"?: (
|
|
49
52
|
props: CopilotSidebarWelcomeScreenSuggestionViewSlotProps,
|
|
50
53
|
) => unknown;
|
|
51
54
|
"welcome-screen"?: (props: CopilotChatWelcomeScreenSlotProps) => unknown;
|
|
52
55
|
"welcome-message"?: () => unknown;
|
|
56
|
+
// Any other slot goes to the chat view, as on CopilotChat.
|
|
57
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
58
|
+
[key: string]: ((props: any) => unknown) | undefined;
|
|
53
59
|
}>();
|
|
54
60
|
|
|
55
61
|
const emit = defineEmits<{
|
|
@@ -112,47 +118,12 @@ const internalBindings = computed(() => ({
|
|
|
112
118
|
<template>
|
|
113
119
|
<CopilotChatConfigurationProvider :is-modal-default-open="defaultOpen">
|
|
114
120
|
<CopilotPopupViewInternal v-bind="internalBindings">
|
|
115
|
-
<template v-if="$slots.header" #header="slotProps">
|
|
116
|
-
<slot name="header" v-bind="slotProps" />
|
|
117
|
-
</template>
|
|
118
|
-
|
|
119
|
-
<template v-if="$slots['toggle-button']" #toggle-button="slotProps">
|
|
120
|
-
<slot name="toggle-button" v-bind="slotProps" />
|
|
121
|
-
</template>
|
|
122
|
-
|
|
123
|
-
<template v-if="$slots['message-view']" #message-view="slotProps">
|
|
124
|
-
<slot name="message-view" v-bind="slotProps" />
|
|
125
|
-
</template>
|
|
126
|
-
|
|
127
|
-
<template v-if="$slots['scroll-view']" #scroll-view="slotProps">
|
|
128
|
-
<slot name="scroll-view" v-bind="slotProps" />
|
|
129
|
-
</template>
|
|
130
|
-
|
|
131
|
-
<template v-if="$slots.feather" #feather="slotProps">
|
|
132
|
-
<slot name="feather" v-bind="slotProps" />
|
|
133
|
-
</template>
|
|
134
|
-
|
|
135
121
|
<template
|
|
136
|
-
v-
|
|
137
|
-
|
|
122
|
+
v-for="slotName in forwardedSlotNames($slots)"
|
|
123
|
+
:key="slotName"
|
|
124
|
+
#[slotName]="slotProps"
|
|
138
125
|
>
|
|
139
|
-
<slot name="
|
|
140
|
-
</template>
|
|
141
|
-
|
|
142
|
-
<template v-if="$slots.input" #input="slotProps">
|
|
143
|
-
<slot name="input" v-bind="slotProps" />
|
|
144
|
-
</template>
|
|
145
|
-
|
|
146
|
-
<template v-if="$slots['suggestion-view']" #suggestion-view="slotProps">
|
|
147
|
-
<slot name="suggestion-view" v-bind="slotProps" />
|
|
148
|
-
</template>
|
|
149
|
-
|
|
150
|
-
<template v-if="$slots['welcome-screen']" #welcome-screen="slotProps">
|
|
151
|
-
<slot name="welcome-screen" v-bind="slotProps" />
|
|
152
|
-
</template>
|
|
153
|
-
|
|
154
|
-
<template v-if="$slots['welcome-message']" #welcome-message>
|
|
155
|
-
<slot name="welcome-message" />
|
|
126
|
+
<slot :name="slotName" v-bind="slotProps" />
|
|
156
127
|
</template>
|
|
157
128
|
</CopilotPopupViewInternal>
|
|
158
129
|
</CopilotChatConfigurationProvider>
|
|
@@ -13,8 +13,10 @@ import { useCopilotChatConfiguration } from "../../providers/useCopilotChatConfi
|
|
|
13
13
|
import CopilotChatToggleButton from "./CopilotChatToggleButton.vue";
|
|
14
14
|
import CopilotChatView from "./CopilotChatView.vue";
|
|
15
15
|
import CopilotModalHeader from "./CopilotModalHeader.vue";
|
|
16
|
+
import { forwardedSlotNames } from "./forwarded-slots";
|
|
16
17
|
import type {
|
|
17
18
|
CopilotChatFeatherSlotProps,
|
|
19
|
+
CopilotChatInterruptSlotProps,
|
|
18
20
|
CopilotChatMessageViewSlotProps,
|
|
19
21
|
CopilotChatScrollToBottomButtonSlotProps,
|
|
20
22
|
CopilotChatScrollViewSlotProps,
|
|
@@ -61,14 +63,22 @@ defineSlots<{
|
|
|
61
63
|
"scroll-to-bottom-button"?: (
|
|
62
64
|
props: CopilotChatScrollToBottomButtonSlotProps,
|
|
63
65
|
) => unknown;
|
|
66
|
+
interrupt?: (props: CopilotChatInterruptSlotProps) => unknown;
|
|
64
67
|
input?: (props: CopilotSidebarWelcomeScreenInputSlotProps) => unknown;
|
|
65
68
|
"suggestion-view"?: (
|
|
66
69
|
props: CopilotSidebarWelcomeScreenSuggestionViewSlotProps,
|
|
67
70
|
) => unknown;
|
|
68
71
|
"welcome-screen"?: (props: CopilotChatWelcomeScreenSlotProps) => unknown;
|
|
69
72
|
"welcome-message"?: () => unknown;
|
|
73
|
+
// Any other slot goes to the chat view, as on CopilotChat.
|
|
74
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
75
|
+
[key: string]: ((props: any) => unknown) | undefined;
|
|
70
76
|
}>();
|
|
71
77
|
|
|
78
|
+
// Slots this component renders itself. It passes every other slot to the
|
|
79
|
+
// chat view.
|
|
80
|
+
const OWN_SLOTS = ["header", "toggle-button"] as const;
|
|
81
|
+
|
|
72
82
|
const emit = defineEmits<{
|
|
73
83
|
"submit-message": [value: string];
|
|
74
84
|
stop: [];
|
|
@@ -385,42 +395,12 @@ onBeforeUnmount(() => {
|
|
|
385
395
|
:on-finish-transcribe-with-audio="onFinishTranscribeWithAudio"
|
|
386
396
|
v-bind="chatViewBindings"
|
|
387
397
|
>
|
|
388
|
-
<template v-if="$slots['message-view']" #message-view="slotProps">
|
|
389
|
-
<slot name="message-view" v-bind="slotProps" />
|
|
390
|
-
</template>
|
|
391
|
-
|
|
392
|
-
<template v-if="$slots['scroll-view']" #scroll-view="slotProps">
|
|
393
|
-
<slot name="scroll-view" v-bind="slotProps" />
|
|
394
|
-
</template>
|
|
395
|
-
|
|
396
|
-
<template v-if="$slots.feather" #feather>
|
|
397
|
-
<slot name="feather" />
|
|
398
|
-
</template>
|
|
399
|
-
|
|
400
398
|
<template
|
|
401
|
-
v-
|
|
402
|
-
|
|
399
|
+
v-for="slotName in forwardedSlotNames($slots, OWN_SLOTS)"
|
|
400
|
+
:key="slotName"
|
|
401
|
+
#[slotName]="slotProps"
|
|
403
402
|
>
|
|
404
|
-
<slot name="
|
|
405
|
-
</template>
|
|
406
|
-
|
|
407
|
-
<template v-if="$slots.input" #input="slotProps">
|
|
408
|
-
<slot name="input" v-bind="slotProps" />
|
|
409
|
-
</template>
|
|
410
|
-
|
|
411
|
-
<template
|
|
412
|
-
v-if="$slots['suggestion-view']"
|
|
413
|
-
#suggestion-view="slotProps"
|
|
414
|
-
>
|
|
415
|
-
<slot name="suggestion-view" v-bind="slotProps" />
|
|
416
|
-
</template>
|
|
417
|
-
|
|
418
|
-
<template v-if="$slots['welcome-screen']" #welcome-screen="slotProps">
|
|
419
|
-
<slot name="welcome-screen" v-bind="slotProps" />
|
|
420
|
-
</template>
|
|
421
|
-
|
|
422
|
-
<template v-if="$slots['welcome-message']" #welcome-message>
|
|
423
|
-
<slot name="welcome-message" />
|
|
403
|
+
<slot :name="slotName" v-bind="slotProps" />
|
|
424
404
|
</template>
|
|
425
405
|
</CopilotChatView>
|
|
426
406
|
</div>
|
|
@@ -4,9 +4,14 @@ import CopilotChat from "./CopilotChat.vue";
|
|
|
4
4
|
import CopilotSidebarView from "./CopilotSidebarView.vue";
|
|
5
5
|
import CopilotSidebarWelcomeScreen from "./CopilotSidebarWelcomeScreen.vue";
|
|
6
6
|
import InlineFeatureWarning from "../InlineFeatureWarning.vue";
|
|
7
|
+
import { forwardedSlotNames } from "./forwarded-slots";
|
|
7
8
|
import { useLicenseContext } from "../../providers/useLicenseContext";
|
|
8
9
|
import type {
|
|
10
|
+
CopilotChatFeatherSlotProps,
|
|
11
|
+
CopilotChatInterruptSlotProps,
|
|
9
12
|
CopilotChatMessageViewSlotProps,
|
|
13
|
+
CopilotChatScrollToBottomButtonSlotProps,
|
|
14
|
+
CopilotChatScrollViewSlotProps,
|
|
10
15
|
CopilotChatViewOverrideSlotProps,
|
|
11
16
|
CopilotChatWelcomeScreenSlotProps,
|
|
12
17
|
CopilotSidebarProps,
|
|
@@ -52,14 +57,28 @@ defineSlots<{
|
|
|
52
57
|
"toggle-button"?: (props: CopilotSidebarViewToggleButtonSlotProps) => unknown;
|
|
53
58
|
"chat-view"?: (props: CopilotChatViewOverrideSlotProps) => unknown;
|
|
54
59
|
"message-view"?: (props: CopilotChatMessageViewSlotProps) => unknown;
|
|
60
|
+
"scroll-view"?: (props: CopilotChatScrollViewSlotProps) => unknown;
|
|
61
|
+
feather?: (props: CopilotChatFeatherSlotProps) => unknown;
|
|
62
|
+
"scroll-to-bottom-button"?: (
|
|
63
|
+
props: CopilotChatScrollToBottomButtonSlotProps,
|
|
64
|
+
) => unknown;
|
|
65
|
+
interrupt?: (props: CopilotChatInterruptSlotProps) => unknown;
|
|
55
66
|
input?: (props: CopilotSidebarWelcomeScreenInputSlotProps) => unknown;
|
|
56
67
|
"suggestion-view"?: (
|
|
57
68
|
props: CopilotSidebarWelcomeScreenSuggestionViewSlotProps,
|
|
58
69
|
) => unknown;
|
|
59
70
|
"welcome-screen"?: (props: CopilotChatWelcomeScreenSlotProps) => unknown;
|
|
60
71
|
"welcome-message"?: () => unknown;
|
|
72
|
+
// Any other slot goes to the chat view, as on CopilotChat.
|
|
73
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
74
|
+
[key: string]: ((props: any) => unknown) | undefined;
|
|
61
75
|
}>();
|
|
62
76
|
|
|
77
|
+
// Slots this component renders itself and does not pass to the view. It passes
|
|
78
|
+
// every other slot to the view. It also renders `input` and `suggestion-view`
|
|
79
|
+
// in its welcome screen, so those two go to both places.
|
|
80
|
+
const OWN_SLOTS = ["chat-view", "welcome-screen", "welcome-message"] as const;
|
|
81
|
+
|
|
63
82
|
defineEmits<{
|
|
64
83
|
"submit-message": [value: string];
|
|
65
84
|
stop: [];
|
|
@@ -123,15 +142,12 @@ watch(
|
|
|
123
142
|
:on-finish-transcribe-with-audio="slotProps.onFinishTranscribeWithAudio"
|
|
124
143
|
v-bind="sidebarViewEventBindings(slotProps)"
|
|
125
144
|
>
|
|
126
|
-
<template v-if="$slots.header" #header="headerProps">
|
|
127
|
-
<slot name="header" v-bind="headerProps" />
|
|
128
|
-
</template>
|
|
129
|
-
|
|
130
145
|
<template
|
|
131
|
-
v-
|
|
132
|
-
|
|
146
|
+
v-for="slotName in forwardedSlotNames($slots, OWN_SLOTS)"
|
|
147
|
+
:key="slotName"
|
|
148
|
+
#[slotName]="forwardedProps"
|
|
133
149
|
>
|
|
134
|
-
<slot name="
|
|
150
|
+
<slot :name="slotName" v-bind="forwardedProps" />
|
|
135
151
|
</template>
|
|
136
152
|
|
|
137
153
|
<template #welcome-screen="welcomeScreenProps">
|
|
@@ -157,24 +173,6 @@ watch(
|
|
|
157
173
|
</template>
|
|
158
174
|
</CopilotSidebarWelcomeScreen>
|
|
159
175
|
</template>
|
|
160
|
-
|
|
161
|
-
<template
|
|
162
|
-
v-if="$slots['message-view']"
|
|
163
|
-
#message-view="messageViewProps"
|
|
164
|
-
>
|
|
165
|
-
<slot name="message-view" v-bind="messageViewProps" />
|
|
166
|
-
</template>
|
|
167
|
-
|
|
168
|
-
<template v-if="$slots.input" #input="inputProps">
|
|
169
|
-
<slot name="input" v-bind="inputProps" />
|
|
170
|
-
</template>
|
|
171
|
-
|
|
172
|
-
<template
|
|
173
|
-
v-if="$slots['suggestion-view']"
|
|
174
|
-
#suggestion-view="suggestionViewProps"
|
|
175
|
-
>
|
|
176
|
-
<slot name="suggestion-view" v-bind="suggestionViewProps" />
|
|
177
|
-
</template>
|
|
178
176
|
</CopilotSidebarView>
|
|
179
177
|
</template>
|
|
180
178
|
</CopilotChat>
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
2
|
import { computed, useAttrs } from "vue";
|
|
3
3
|
import CopilotChatConfigurationProvider from "../../providers/CopilotChatConfigurationProvider.vue";
|
|
4
|
+
import { forwardedSlotNames } from "./forwarded-slots";
|
|
4
5
|
import CopilotSidebarViewInternal from "./CopilotSidebarViewInternal.vue";
|
|
5
6
|
import type {
|
|
6
7
|
CopilotChatFeatherSlotProps,
|
|
8
|
+
CopilotChatInterruptSlotProps,
|
|
7
9
|
CopilotChatWelcomeScreenSlotProps,
|
|
8
10
|
CopilotChatMessageViewSlotProps,
|
|
9
11
|
CopilotChatScrollToBottomButtonSlotProps,
|
|
@@ -50,12 +52,16 @@ defineSlots<{
|
|
|
50
52
|
"scroll-to-bottom-button"?: (
|
|
51
53
|
props: CopilotChatScrollToBottomButtonSlotProps,
|
|
52
54
|
) => unknown;
|
|
55
|
+
interrupt?: (props: CopilotChatInterruptSlotProps) => unknown;
|
|
53
56
|
input?: (props: CopilotSidebarWelcomeScreenInputSlotProps) => unknown;
|
|
54
57
|
"suggestion-view"?: (
|
|
55
58
|
props: CopilotSidebarWelcomeScreenSuggestionViewSlotProps,
|
|
56
59
|
) => unknown;
|
|
57
60
|
"welcome-screen"?: (props: CopilotChatWelcomeScreenSlotProps) => unknown;
|
|
58
61
|
"welcome-message"?: () => unknown;
|
|
62
|
+
// Any other slot goes to the chat view, as on CopilotChat.
|
|
63
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
64
|
+
[key: string]: ((props: any) => unknown) | undefined;
|
|
59
65
|
}>();
|
|
60
66
|
|
|
61
67
|
const emit = defineEmits<{
|
|
@@ -117,47 +123,12 @@ const forwardedEventListeners = computed(() => {
|
|
|
117
123
|
<template>
|
|
118
124
|
<CopilotChatConfigurationProvider :is-modal-default-open="defaultOpen">
|
|
119
125
|
<CopilotSidebarViewInternal v-bind="internalBindings">
|
|
120
|
-
<template v-if="$slots.header" #header="slotProps">
|
|
121
|
-
<slot name="header" v-bind="slotProps" />
|
|
122
|
-
</template>
|
|
123
|
-
|
|
124
|
-
<template v-if="$slots['toggle-button']" #toggle-button="slotProps">
|
|
125
|
-
<slot name="toggle-button" v-bind="slotProps" />
|
|
126
|
-
</template>
|
|
127
|
-
|
|
128
|
-
<template v-if="$slots['message-view']" #message-view="slotProps">
|
|
129
|
-
<slot name="message-view" v-bind="slotProps" />
|
|
130
|
-
</template>
|
|
131
|
-
|
|
132
|
-
<template v-if="$slots['scroll-view']" #scroll-view="slotProps">
|
|
133
|
-
<slot name="scroll-view" v-bind="slotProps" />
|
|
134
|
-
</template>
|
|
135
|
-
|
|
136
|
-
<template v-if="$slots.feather" #feather="slotProps">
|
|
137
|
-
<slot name="feather" v-bind="slotProps" />
|
|
138
|
-
</template>
|
|
139
|
-
|
|
140
126
|
<template
|
|
141
|
-
v-
|
|
142
|
-
|
|
127
|
+
v-for="slotName in forwardedSlotNames($slots)"
|
|
128
|
+
:key="slotName"
|
|
129
|
+
#[slotName]="slotProps"
|
|
143
130
|
>
|
|
144
|
-
<slot name="
|
|
145
|
-
</template>
|
|
146
|
-
|
|
147
|
-
<template v-if="$slots.input" #input="slotProps">
|
|
148
|
-
<slot name="input" v-bind="slotProps" />
|
|
149
|
-
</template>
|
|
150
|
-
|
|
151
|
-
<template v-if="$slots['suggestion-view']" #suggestion-view="slotProps">
|
|
152
|
-
<slot name="suggestion-view" v-bind="slotProps" />
|
|
153
|
-
</template>
|
|
154
|
-
|
|
155
|
-
<template v-if="$slots['welcome-screen']" #welcome-screen="slotProps">
|
|
156
|
-
<slot name="welcome-screen" v-bind="slotProps" />
|
|
157
|
-
</template>
|
|
158
|
-
|
|
159
|
-
<template v-if="$slots['welcome-message']" #welcome-message>
|
|
160
|
-
<slot name="welcome-message" />
|
|
131
|
+
<slot :name="slotName" v-bind="slotProps" />
|
|
161
132
|
</template>
|
|
162
133
|
</CopilotSidebarViewInternal>
|
|
163
134
|
</CopilotChatConfigurationProvider>
|
|
@@ -13,8 +13,10 @@ import { useCopilotChatConfiguration } from "../../providers/useCopilotChatConfi
|
|
|
13
13
|
import CopilotChatToggleButton from "./CopilotChatToggleButton.vue";
|
|
14
14
|
import CopilotChatView from "./CopilotChatView.vue";
|
|
15
15
|
import CopilotModalHeader from "./CopilotModalHeader.vue";
|
|
16
|
+
import { forwardedSlotNames } from "./forwarded-slots";
|
|
16
17
|
import type {
|
|
17
18
|
CopilotChatFeatherSlotProps,
|
|
19
|
+
CopilotChatInterruptSlotProps,
|
|
18
20
|
CopilotChatMessageViewSlotProps,
|
|
19
21
|
CopilotChatScrollToBottomButtonSlotProps,
|
|
20
22
|
CopilotChatScrollViewSlotProps,
|
|
@@ -59,14 +61,22 @@ defineSlots<{
|
|
|
59
61
|
"scroll-to-bottom-button"?: (
|
|
60
62
|
props: CopilotChatScrollToBottomButtonSlotProps,
|
|
61
63
|
) => unknown;
|
|
64
|
+
interrupt?: (props: CopilotChatInterruptSlotProps) => unknown;
|
|
62
65
|
input?: (props: CopilotSidebarWelcomeScreenInputSlotProps) => unknown;
|
|
63
66
|
"suggestion-view"?: (
|
|
64
67
|
props: CopilotSidebarWelcomeScreenSuggestionViewSlotProps,
|
|
65
68
|
) => unknown;
|
|
66
69
|
"welcome-screen"?: (props: CopilotChatWelcomeScreenSlotProps) => unknown;
|
|
67
70
|
"welcome-message"?: () => unknown;
|
|
71
|
+
// Any other slot goes to the chat view, as on CopilotChat.
|
|
72
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
73
|
+
[key: string]: ((props: any) => unknown) | undefined;
|
|
68
74
|
}>();
|
|
69
75
|
|
|
76
|
+
// Slots this component renders itself. It passes every other slot to the
|
|
77
|
+
// chat view.
|
|
78
|
+
const OWN_SLOTS = ["header", "toggle-button"] as const;
|
|
79
|
+
|
|
70
80
|
const emit = defineEmits<{
|
|
71
81
|
"submit-message": [value: string];
|
|
72
82
|
stop: [];
|
|
@@ -317,42 +327,12 @@ onBeforeUnmount(() => {
|
|
|
317
327
|
:on-finish-transcribe-with-audio="onFinishTranscribeWithAudio"
|
|
318
328
|
v-bind="chatViewEventProps"
|
|
319
329
|
>
|
|
320
|
-
<template v-if="$slots['message-view']" #message-view="slotProps">
|
|
321
|
-
<slot name="message-view" v-bind="slotProps" />
|
|
322
|
-
</template>
|
|
323
|
-
|
|
324
|
-
<template v-if="$slots['scroll-view']" #scroll-view="slotProps">
|
|
325
|
-
<slot name="scroll-view" v-bind="slotProps" />
|
|
326
|
-
</template>
|
|
327
|
-
|
|
328
|
-
<template v-if="$slots.feather" #feather>
|
|
329
|
-
<slot name="feather" />
|
|
330
|
-
</template>
|
|
331
|
-
|
|
332
330
|
<template
|
|
333
|
-
v-
|
|
334
|
-
|
|
331
|
+
v-for="slotName in forwardedSlotNames($slots, OWN_SLOTS)"
|
|
332
|
+
:key="slotName"
|
|
333
|
+
#[slotName]="slotProps"
|
|
335
334
|
>
|
|
336
|
-
<slot name="
|
|
337
|
-
</template>
|
|
338
|
-
|
|
339
|
-
<template v-if="$slots.input" #input="slotProps">
|
|
340
|
-
<slot name="input" v-bind="slotProps" />
|
|
341
|
-
</template>
|
|
342
|
-
|
|
343
|
-
<template
|
|
344
|
-
v-if="$slots['suggestion-view']"
|
|
345
|
-
#suggestion-view="slotProps"
|
|
346
|
-
>
|
|
347
|
-
<slot name="suggestion-view" v-bind="slotProps" />
|
|
348
|
-
</template>
|
|
349
|
-
|
|
350
|
-
<template v-if="$slots['welcome-screen']" #welcome-screen="slotProps">
|
|
351
|
-
<slot name="welcome-screen" v-bind="slotProps" />
|
|
352
|
-
</template>
|
|
353
|
-
|
|
354
|
-
<template v-if="$slots['welcome-message']" #welcome-message>
|
|
355
|
-
<slot name="welcome-message" />
|
|
335
|
+
<slot :name="slotName" v-bind="slotProps" />
|
|
356
336
|
</template>
|
|
357
337
|
</CopilotChatView>
|
|
358
338
|
</div>
|