@copilotkit/vue 1.83.0 → 1.84.0
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--gNfCK8I.cjs +70 -0
- package/dist/use-render-activity-message--gNfCK8I.cjs.map +1 -0
- package/dist/{use-render-activity-message-mQvByEYF.js → use-render-activity-message-BQ_UwNGb.js} +5125 -5407
- package/dist/use-render-activity-message-BQ_UwNGb.js.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 +6 -6
- 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-B7sDGUl4.cjs +0 -70
- package/dist/use-render-activity-message-B7sDGUl4.cjs.map +0 -1
- package/dist/use-render-activity-message-mQvByEYF.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 o=require("@copilotkit/core"),a=require("@ag-ui/client"),e=require("../use-render-activity-message-B7sDGUl4.cjs"),n=require("@copilotkit/mcp-apps-renderer/activity"),c=require("@copilotkit/shared");Object.defineProperty(exports,"PROTOCOL_VERSION",{enumerable:!0,get:()=>a.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.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.CopilotThreadsDrawer=e._sfc_main$18;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.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.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.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;exports.vueBasicCatalog=e.vueBasicCatalog;Object.defineProperty(exports,"MCPAppsActivityContentSchema",{enumerable:!0,get:()=>n.MCPAppsActivityContentSchema});Object.defineProperty(exports,"MCPAppsActivityType",{enumerable:!0,get:()=>n.MCPAppsActivityType});Object.defineProperty(exports,"ɵrunMcpFollowUp",{enumerable:!0,get:()=>n.ɵrunMcpFollowUp});Object.defineProperty(exports,"createLicenseContextValue",{enumerable:!0,get:()=>c.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(a).forEach(t=>{t!=="default"&&!Object.prototype.hasOwnProperty.call(exports,t)&&Object.defineProperty(exports,t,{enumerable:!0,get:()=>a[t]})});
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("@copilotkit/core"),a=require("@ag-ui/client"),e=require("../use-render-activity-message--gNfCK8I.cjs"),n=require("@copilotkit/mcp-apps-renderer/activity"),c=require("@copilotkit/shared");Object.defineProperty(exports,"PROTOCOL_VERSION",{enumerable:!0,get:()=>a.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.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.CopilotThreadsDrawer=e._sfc_main$18;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.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.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.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;exports.vueBasicCatalog=e.vueBasicCatalog;Object.defineProperty(exports,"MCPAppsActivityContentSchema",{enumerable:!0,get:()=>n.MCPAppsActivityContentSchema});Object.defineProperty(exports,"MCPAppsActivityType",{enumerable:!0,get:()=>n.MCPAppsActivityType});Object.defineProperty(exports,"ɵrunMcpFollowUp",{enumerable:!0,get:()=>n.ɵrunMcpFollowUp});Object.defineProperty(exports,"createLicenseContextValue",{enumerable:!0,get:()=>c.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(a).forEach(t=>{t!=="default"&&!Object.prototype.hasOwnProperty.call(exports,t)&&Object.defineProperty(exports,t,{enumerable:!0,get:()=>a[t]})});
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
package/dist/v2/index.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export * from "@copilotkit/core";
|
|
2
2
|
export * from "@ag-ui/client";
|
|
3
3
|
import { PROTOCOL_VERSION as n } from "@ag-ui/client";
|
|
4
|
-
import { A as i, _ as c, a as S, b as h, c as m, d as u, e as r, f as p, g as l, h as C, i as b, i as g, i as d, B as v, j as E, C as R, k as I, l as A, m as T, n as M, o as y, p as O, q as x, r as P, s as f, t as U, u as F, v as V, w as D, x as w, y as L, z as K, D as B, E as G, F as H, G as k, H as J, I as j, J as q, K as z, L as N, M as Q, N as _, O as W, P as X, Q as Y, R as Z, S as $, T as aa, T as ea, T as ta, U as sa, U as na, V as oa, W as ia, X as ca, Y as Sa, Z as ha, $ as ma, a0 as ua, a1 as ra, a1 as pa, a1 as la, R as Ca, C as ba, a2 as ga, a3 as da, a4 as va, a5 as Ea, a6 as Ra, a7 as Ia, a8 as Aa, a9 as Ta, aa as Ma, ab as ya, ac as Oa, ad as xa, ae as Pa, af as fa, ag as Ua, ah as Fa, ai as Va, aj as Da, ak as wa, al as La, am as Ka, an as Ba, ao as Ga, a2 as Ha, ap as ka, aq as Ja, ar as ja, as as qa, at as za, au as Na, av as Qa, aw as _a, ax as Wa, ay as Xa, az as Ya, aA as Za, aB as $a, aC as ae, aD as ee, aE as te, aF as se, aG as ne, aH as oe, aI as ie, aJ as ce, aK as Se, aL as he, aM as me, aN as ue, aO as re, aP as pe, aQ as le, aR as Ce, aS as be, aT as ge, aU as de, aV as ve, aW as Ee, aX as Re, aY as Ie, aZ as Ae, a_ as Te, a$ as Me, b0 as ye, b1 as Oe, b2 as xe, b3 as Pe, b4 as fe, b5 as Ue, b0 as Fe, b6 as Ve, b7 as De, b8 as we, b9 as Le, ba as Ke, bb as Be, bc as Ge, bd as He, be as ke, bf as Je, bg as je, a3 as qe, bh as ze, bi as Ne, bj as Qe, bj as _e, bj as We, bk as Xe, bl as Ye, bm as Ze, bn as $e, bo as at, bp as et, bq as tt, br as st, bs as nt, bt as ot, bu as it, bv as ct, bw as St, bx as ht, by as mt, bz as ut, bA as rt, bB as pt, bC as lt, bD as Ct, bE as bt, bF as gt, bG as dt, bH as vt, bI as Et, bJ as Rt, bK as It, bL as At } from "../use-render-activity-message-
|
|
4
|
+
import { A as i, _ as c, a as S, b as h, c as m, d as u, e as r, f as p, g as l, h as C, i as b, i as g, i as d, B as v, j as E, C as R, k as I, l as A, m as T, n as M, o as y, p as O, q as x, r as P, s as f, t as U, u as F, v as V, w as D, x as w, y as L, z as K, D as B, E as G, F as H, G as k, H as J, I as j, J as q, K as z, L as N, M as Q, N as _, O as W, P as X, Q as Y, R as Z, S as $, T as aa, T as ea, T as ta, U as sa, U as na, V as oa, W as ia, X as ca, Y as Sa, Z as ha, $ as ma, a0 as ua, a1 as ra, a1 as pa, a1 as la, R as Ca, C as ba, a2 as ga, a3 as da, a4 as va, a5 as Ea, a6 as Ra, a7 as Ia, a8 as Aa, a9 as Ta, aa as Ma, ab as ya, ac as Oa, ad as xa, ae as Pa, af as fa, ag as Ua, ah as Fa, ai as Va, aj as Da, ak as wa, al as La, am as Ka, an as Ba, ao as Ga, a2 as Ha, ap as ka, aq as Ja, ar as ja, as as qa, at as za, au as Na, av as Qa, aw as _a, ax as Wa, ay as Xa, az as Ya, aA as Za, aB as $a, aC as ae, aD as ee, aE as te, aF as se, aG as ne, aH as oe, aI as ie, aJ as ce, aK as Se, aL as he, aM as me, aN as ue, aO as re, aP as pe, aQ as le, aR as Ce, aS as be, aT as ge, aU as de, aV as ve, aW as Ee, aX as Re, aY as Ie, aZ as Ae, a_ as Te, a$ as Me, b0 as ye, b1 as Oe, b2 as xe, b3 as Pe, b4 as fe, b5 as Ue, b0 as Fe, b6 as Ve, b7 as De, b8 as we, b9 as Le, ba as Ke, bb as Be, bc as Ge, bd as He, be as ke, bf as Je, bg as je, a3 as qe, bh as ze, bi as Ne, bj as Qe, bj as _e, bj as We, bk as Xe, bl as Ye, bm as Ze, bn as $e, bo as at, bp as et, bq as tt, br as st, bs as nt, bt as ot, bu as it, bv as ct, bw as St, bx as ht, by as mt, bz as ut, bA as rt, bB as pt, bC as lt, bD as Ct, bE as bt, bF as gt, bG as dt, bH as vt, bI as Et, bJ as Rt, bK as It, bL as At } from "../use-render-activity-message-BQ_UwNGb.js";
|
|
5
5
|
import { MCPAppsActivityContentSchema as Mt, MCPAppsActivityType as yt, ɵrunMcpFollowUp as Ot } from "@copilotkit/mcp-apps-renderer/activity";
|
|
6
6
|
import { createLicenseContextValue as Pt } from "@copilotkit/shared";
|
|
7
7
|
export {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@copilotkit/vue",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.84.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Vue 3 components and composables for CopilotKit",
|
|
6
6
|
"keywords": [
|
|
@@ -70,11 +70,11 @@
|
|
|
70
70
|
"streamdown-vue": "^1.0.29",
|
|
71
71
|
"zod": "^3.25.75",
|
|
72
72
|
"zod-to-json-schema": "^3.24.5",
|
|
73
|
-
"@copilotkit/core": "1.
|
|
74
|
-
"@copilotkit/
|
|
75
|
-
"@copilotkit/
|
|
76
|
-
"@copilotkit/web-
|
|
77
|
-
"@copilotkit/
|
|
73
|
+
"@copilotkit/core": "1.84.0",
|
|
74
|
+
"@copilotkit/mcp-apps-renderer": "1.84.0",
|
|
75
|
+
"@copilotkit/web-components": "1.84.0",
|
|
76
|
+
"@copilotkit/web-inspector": "1.84.0",
|
|
77
|
+
"@copilotkit/shared": "1.84.0"
|
|
78
78
|
},
|
|
79
79
|
"devDependencies": {
|
|
80
80
|
"@eslint/js": "^9.39.2",
|
|
@@ -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,
|
|
@@ -52,14 +57,28 @@ defineSlots<{
|
|
|
52
57
|
"toggle-button"?: (props: CopilotPopupViewToggleButtonSlotProps) => 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: [];
|
|
@@ -122,15 +141,12 @@ watch(
|
|
|
122
141
|
:on-finish-transcribe-with-audio="slotProps.onFinishTranscribeWithAudio"
|
|
123
142
|
v-bind="popupViewEventBindings(slotProps)"
|
|
124
143
|
>
|
|
125
|
-
<template v-if="$slots.header" #header="headerProps">
|
|
126
|
-
<slot name="header" v-bind="headerProps" />
|
|
127
|
-
</template>
|
|
128
|
-
|
|
129
144
|
<template
|
|
130
|
-
v-
|
|
131
|
-
|
|
145
|
+
v-for="slotName in forwardedSlotNames($slots, OWN_SLOTS)"
|
|
146
|
+
:key="slotName"
|
|
147
|
+
#[slotName]="forwardedProps"
|
|
132
148
|
>
|
|
133
|
-
<slot name="
|
|
149
|
+
<slot :name="slotName" v-bind="forwardedProps" />
|
|
134
150
|
</template>
|
|
135
151
|
|
|
136
152
|
<template #welcome-screen="welcomeScreenProps">
|
|
@@ -156,24 +172,6 @@ watch(
|
|
|
156
172
|
</template>
|
|
157
173
|
</CopilotPopupWelcomeScreen>
|
|
158
174
|
</template>
|
|
159
|
-
|
|
160
|
-
<template
|
|
161
|
-
v-if="$slots['message-view']"
|
|
162
|
-
#message-view="messageViewProps"
|
|
163
|
-
>
|
|
164
|
-
<slot name="message-view" v-bind="messageViewProps" />
|
|
165
|
-
</template>
|
|
166
|
-
|
|
167
|
-
<template v-if="$slots.input" #input="inputProps">
|
|
168
|
-
<slot name="input" v-bind="inputProps" />
|
|
169
|
-
</template>
|
|
170
|
-
|
|
171
|
-
<template
|
|
172
|
-
v-if="$slots['suggestion-view']"
|
|
173
|
-
#suggestion-view="suggestionViewProps"
|
|
174
|
-
>
|
|
175
|
-
<slot name="suggestion-view" v-bind="suggestionViewProps" />
|
|
176
|
-
</template>
|
|
177
175
|
</CopilotPopupView>
|
|
178
176
|
</template>
|
|
179
177
|
</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,
|
|
@@ -43,12 +45,16 @@ defineSlots<{
|
|
|
43
45
|
"scroll-to-bottom-button"?: (
|
|
44
46
|
props: CopilotChatScrollToBottomButtonSlotProps,
|
|
45
47
|
) => unknown;
|
|
48
|
+
interrupt?: (props: CopilotChatInterruptSlotProps) => unknown;
|
|
46
49
|
input?: (props: CopilotSidebarWelcomeScreenInputSlotProps) => unknown;
|
|
47
50
|
"suggestion-view"?: (
|
|
48
51
|
props: CopilotSidebarWelcomeScreenSuggestionViewSlotProps,
|
|
49
52
|
) => unknown;
|
|
50
53
|
"welcome-screen"?: (props: CopilotChatWelcomeScreenSlotProps) => unknown;
|
|
51
54
|
"welcome-message"?: () => unknown;
|
|
55
|
+
// Any other slot goes to the chat view, as on CopilotChat.
|
|
56
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
57
|
+
[key: string]: ((props: any) => unknown) | undefined;
|
|
52
58
|
}>();
|
|
53
59
|
|
|
54
60
|
const emit = defineEmits<{
|
|
@@ -111,47 +117,12 @@ const internalBindings = computed(() => ({
|
|
|
111
117
|
<template>
|
|
112
118
|
<CopilotChatConfigurationProvider :is-modal-default-open="defaultOpen">
|
|
113
119
|
<CopilotPopupViewInternal v-bind="internalBindings">
|
|
114
|
-
<template v-if="$slots.header" #header="slotProps">
|
|
115
|
-
<slot name="header" v-bind="slotProps" />
|
|
116
|
-
</template>
|
|
117
|
-
|
|
118
|
-
<template v-if="$slots['toggle-button']" #toggle-button="slotProps">
|
|
119
|
-
<slot name="toggle-button" v-bind="slotProps" />
|
|
120
|
-
</template>
|
|
121
|
-
|
|
122
|
-
<template v-if="$slots['message-view']" #message-view="slotProps">
|
|
123
|
-
<slot name="message-view" v-bind="slotProps" />
|
|
124
|
-
</template>
|
|
125
|
-
|
|
126
|
-
<template v-if="$slots['scroll-view']" #scroll-view="slotProps">
|
|
127
|
-
<slot name="scroll-view" v-bind="slotProps" />
|
|
128
|
-
</template>
|
|
129
|
-
|
|
130
|
-
<template v-if="$slots.feather" #feather="slotProps">
|
|
131
|
-
<slot name="feather" v-bind="slotProps" />
|
|
132
|
-
</template>
|
|
133
|
-
|
|
134
120
|
<template
|
|
135
|
-
v-
|
|
136
|
-
|
|
121
|
+
v-for="slotName in forwardedSlotNames($slots)"
|
|
122
|
+
:key="slotName"
|
|
123
|
+
#[slotName]="slotProps"
|
|
137
124
|
>
|
|
138
|
-
<slot name="
|
|
139
|
-
</template>
|
|
140
|
-
|
|
141
|
-
<template v-if="$slots.input" #input="slotProps">
|
|
142
|
-
<slot name="input" v-bind="slotProps" />
|
|
143
|
-
</template>
|
|
144
|
-
|
|
145
|
-
<template v-if="$slots['suggestion-view']" #suggestion-view="slotProps">
|
|
146
|
-
<slot name="suggestion-view" v-bind="slotProps" />
|
|
147
|
-
</template>
|
|
148
|
-
|
|
149
|
-
<template v-if="$slots['welcome-screen']" #welcome-screen="slotProps">
|
|
150
|
-
<slot name="welcome-screen" v-bind="slotProps" />
|
|
151
|
-
</template>
|
|
152
|
-
|
|
153
|
-
<template v-if="$slots['welcome-message']" #welcome-message>
|
|
154
|
-
<slot name="welcome-message" />
|
|
125
|
+
<slot :name="slotName" v-bind="slotProps" />
|
|
155
126
|
</template>
|
|
156
127
|
</CopilotPopupViewInternal>
|
|
157
128
|
</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,
|
|
@@ -60,14 +62,22 @@ defineSlots<{
|
|
|
60
62
|
"scroll-to-bottom-button"?: (
|
|
61
63
|
props: CopilotChatScrollToBottomButtonSlotProps,
|
|
62
64
|
) => unknown;
|
|
65
|
+
interrupt?: (props: CopilotChatInterruptSlotProps) => unknown;
|
|
63
66
|
input?: (props: CopilotSidebarWelcomeScreenInputSlotProps) => unknown;
|
|
64
67
|
"suggestion-view"?: (
|
|
65
68
|
props: CopilotSidebarWelcomeScreenSuggestionViewSlotProps,
|
|
66
69
|
) => unknown;
|
|
67
70
|
"welcome-screen"?: (props: CopilotChatWelcomeScreenSlotProps) => unknown;
|
|
68
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;
|
|
69
75
|
}>();
|
|
70
76
|
|
|
77
|
+
// Slots this component renders itself. It passes every other slot to the
|
|
78
|
+
// chat view.
|
|
79
|
+
const OWN_SLOTS = ["header", "toggle-button"] as const;
|
|
80
|
+
|
|
71
81
|
const emit = defineEmits<{
|
|
72
82
|
"submit-message": [value: string];
|
|
73
83
|
stop: [];
|
|
@@ -395,42 +405,12 @@ onBeforeUnmount(() => {
|
|
|
395
405
|
:on-finish-transcribe-with-audio="onFinishTranscribeWithAudio"
|
|
396
406
|
v-bind="chatViewBindings"
|
|
397
407
|
>
|
|
398
|
-
<template v-if="$slots['message-view']" #message-view="slotProps">
|
|
399
|
-
<slot name="message-view" v-bind="slotProps" />
|
|
400
|
-
</template>
|
|
401
|
-
|
|
402
|
-
<template v-if="$slots['scroll-view']" #scroll-view="slotProps">
|
|
403
|
-
<slot name="scroll-view" v-bind="slotProps" />
|
|
404
|
-
</template>
|
|
405
|
-
|
|
406
|
-
<template v-if="$slots.feather" #feather>
|
|
407
|
-
<slot name="feather" />
|
|
408
|
-
</template>
|
|
409
|
-
|
|
410
408
|
<template
|
|
411
|
-
v-
|
|
412
|
-
|
|
409
|
+
v-for="slotName in forwardedSlotNames($slots, OWN_SLOTS)"
|
|
410
|
+
:key="slotName"
|
|
411
|
+
#[slotName]="slotProps"
|
|
413
412
|
>
|
|
414
|
-
<slot name="
|
|
415
|
-
</template>
|
|
416
|
-
|
|
417
|
-
<template v-if="$slots.input" #input="slotProps">
|
|
418
|
-
<slot name="input" v-bind="slotProps" />
|
|
419
|
-
</template>
|
|
420
|
-
|
|
421
|
-
<template
|
|
422
|
-
v-if="$slots['suggestion-view']"
|
|
423
|
-
#suggestion-view="slotProps"
|
|
424
|
-
>
|
|
425
|
-
<slot name="suggestion-view" v-bind="slotProps" />
|
|
426
|
-
</template>
|
|
427
|
-
|
|
428
|
-
<template v-if="$slots['welcome-screen']" #welcome-screen="slotProps">
|
|
429
|
-
<slot name="welcome-screen" v-bind="slotProps" />
|
|
430
|
-
</template>
|
|
431
|
-
|
|
432
|
-
<template v-if="$slots['welcome-message']" #welcome-message>
|
|
433
|
-
<slot name="welcome-message" />
|
|
413
|
+
<slot :name="slotName" v-bind="slotProps" />
|
|
434
414
|
</template>
|
|
435
415
|
</CopilotChatView>
|
|
436
416
|
</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,
|
|
@@ -50,14 +55,28 @@ defineSlots<{
|
|
|
50
55
|
"toggle-button"?: (props: CopilotSidebarViewToggleButtonSlotProps) => unknown;
|
|
51
56
|
"chat-view"?: (props: CopilotChatViewOverrideSlotProps) => unknown;
|
|
52
57
|
"message-view"?: (props: CopilotChatMessageViewSlotProps) => unknown;
|
|
58
|
+
"scroll-view"?: (props: CopilotChatScrollViewSlotProps) => unknown;
|
|
59
|
+
feather?: (props: CopilotChatFeatherSlotProps) => unknown;
|
|
60
|
+
"scroll-to-bottom-button"?: (
|
|
61
|
+
props: CopilotChatScrollToBottomButtonSlotProps,
|
|
62
|
+
) => unknown;
|
|
63
|
+
interrupt?: (props: CopilotChatInterruptSlotProps) => unknown;
|
|
53
64
|
input?: (props: CopilotSidebarWelcomeScreenInputSlotProps) => unknown;
|
|
54
65
|
"suggestion-view"?: (
|
|
55
66
|
props: CopilotSidebarWelcomeScreenSuggestionViewSlotProps,
|
|
56
67
|
) => unknown;
|
|
57
68
|
"welcome-screen"?: (props: CopilotChatWelcomeScreenSlotProps) => unknown;
|
|
58
69
|
"welcome-message"?: () => unknown;
|
|
70
|
+
// Any other slot goes to the chat view, as on CopilotChat.
|
|
71
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
72
|
+
[key: string]: ((props: any) => unknown) | undefined;
|
|
59
73
|
}>();
|
|
60
74
|
|
|
75
|
+
// Slots this component renders itself and does not pass to the view. It passes
|
|
76
|
+
// every other slot to the view. It also renders `input` and `suggestion-view`
|
|
77
|
+
// in its welcome screen, so those two go to both places.
|
|
78
|
+
const OWN_SLOTS = ["chat-view", "welcome-screen", "welcome-message"] as const;
|
|
79
|
+
|
|
61
80
|
defineEmits<{
|
|
62
81
|
"submit-message": [value: string];
|
|
63
82
|
stop: [];
|
|
@@ -118,15 +137,12 @@ watch(
|
|
|
118
137
|
:on-finish-transcribe-with-audio="slotProps.onFinishTranscribeWithAudio"
|
|
119
138
|
v-bind="sidebarViewEventBindings(slotProps)"
|
|
120
139
|
>
|
|
121
|
-
<template v-if="$slots.header" #header="headerProps">
|
|
122
|
-
<slot name="header" v-bind="headerProps" />
|
|
123
|
-
</template>
|
|
124
|
-
|
|
125
140
|
<template
|
|
126
|
-
v-
|
|
127
|
-
|
|
141
|
+
v-for="slotName in forwardedSlotNames($slots, OWN_SLOTS)"
|
|
142
|
+
:key="slotName"
|
|
143
|
+
#[slotName]="forwardedProps"
|
|
128
144
|
>
|
|
129
|
-
<slot name="
|
|
145
|
+
<slot :name="slotName" v-bind="forwardedProps" />
|
|
130
146
|
</template>
|
|
131
147
|
|
|
132
148
|
<template #welcome-screen="welcomeScreenProps">
|
|
@@ -152,24 +168,6 @@ watch(
|
|
|
152
168
|
</template>
|
|
153
169
|
</CopilotSidebarWelcomeScreen>
|
|
154
170
|
</template>
|
|
155
|
-
|
|
156
|
-
<template
|
|
157
|
-
v-if="$slots['message-view']"
|
|
158
|
-
#message-view="messageViewProps"
|
|
159
|
-
>
|
|
160
|
-
<slot name="message-view" v-bind="messageViewProps" />
|
|
161
|
-
</template>
|
|
162
|
-
|
|
163
|
-
<template v-if="$slots.input" #input="inputProps">
|
|
164
|
-
<slot name="input" v-bind="inputProps" />
|
|
165
|
-
</template>
|
|
166
|
-
|
|
167
|
-
<template
|
|
168
|
-
v-if="$slots['suggestion-view']"
|
|
169
|
-
#suggestion-view="suggestionViewProps"
|
|
170
|
-
>
|
|
171
|
-
<slot name="suggestion-view" v-bind="suggestionViewProps" />
|
|
172
|
-
</template>
|
|
173
171
|
</CopilotSidebarView>
|
|
174
172
|
</template>
|
|
175
173
|
</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,
|
|
@@ -48,12 +50,16 @@ defineSlots<{
|
|
|
48
50
|
"scroll-to-bottom-button"?: (
|
|
49
51
|
props: CopilotChatScrollToBottomButtonSlotProps,
|
|
50
52
|
) => unknown;
|
|
53
|
+
interrupt?: (props: CopilotChatInterruptSlotProps) => unknown;
|
|
51
54
|
input?: (props: CopilotSidebarWelcomeScreenInputSlotProps) => unknown;
|
|
52
55
|
"suggestion-view"?: (
|
|
53
56
|
props: CopilotSidebarWelcomeScreenSuggestionViewSlotProps,
|
|
54
57
|
) => unknown;
|
|
55
58
|
"welcome-screen"?: (props: CopilotChatWelcomeScreenSlotProps) => unknown;
|
|
56
59
|
"welcome-message"?: () => unknown;
|
|
60
|
+
// Any other slot goes to the chat view, as on CopilotChat.
|
|
61
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
62
|
+
[key: string]: ((props: any) => unknown) | undefined;
|
|
57
63
|
}>();
|
|
58
64
|
|
|
59
65
|
const emit = defineEmits<{
|
|
@@ -115,47 +121,12 @@ const forwardedEventListeners = computed(() => {
|
|
|
115
121
|
<template>
|
|
116
122
|
<CopilotChatConfigurationProvider :is-modal-default-open="defaultOpen">
|
|
117
123
|
<CopilotSidebarViewInternal v-bind="internalBindings">
|
|
118
|
-
<template v-if="$slots.header" #header="slotProps">
|
|
119
|
-
<slot name="header" v-bind="slotProps" />
|
|
120
|
-
</template>
|
|
121
|
-
|
|
122
|
-
<template v-if="$slots['toggle-button']" #toggle-button="slotProps">
|
|
123
|
-
<slot name="toggle-button" v-bind="slotProps" />
|
|
124
|
-
</template>
|
|
125
|
-
|
|
126
|
-
<template v-if="$slots['message-view']" #message-view="slotProps">
|
|
127
|
-
<slot name="message-view" v-bind="slotProps" />
|
|
128
|
-
</template>
|
|
129
|
-
|
|
130
|
-
<template v-if="$slots['scroll-view']" #scroll-view="slotProps">
|
|
131
|
-
<slot name="scroll-view" v-bind="slotProps" />
|
|
132
|
-
</template>
|
|
133
|
-
|
|
134
|
-
<template v-if="$slots.feather" #feather="slotProps">
|
|
135
|
-
<slot name="feather" v-bind="slotProps" />
|
|
136
|
-
</template>
|
|
137
|
-
|
|
138
124
|
<template
|
|
139
|
-
v-
|
|
140
|
-
|
|
125
|
+
v-for="slotName in forwardedSlotNames($slots)"
|
|
126
|
+
:key="slotName"
|
|
127
|
+
#[slotName]="slotProps"
|
|
141
128
|
>
|
|
142
|
-
<slot name="
|
|
143
|
-
</template>
|
|
144
|
-
|
|
145
|
-
<template v-if="$slots.input" #input="slotProps">
|
|
146
|
-
<slot name="input" v-bind="slotProps" />
|
|
147
|
-
</template>
|
|
148
|
-
|
|
149
|
-
<template v-if="$slots['suggestion-view']" #suggestion-view="slotProps">
|
|
150
|
-
<slot name="suggestion-view" v-bind="slotProps" />
|
|
151
|
-
</template>
|
|
152
|
-
|
|
153
|
-
<template v-if="$slots['welcome-screen']" #welcome-screen="slotProps">
|
|
154
|
-
<slot name="welcome-screen" v-bind="slotProps" />
|
|
155
|
-
</template>
|
|
156
|
-
|
|
157
|
-
<template v-if="$slots['welcome-message']" #welcome-message>
|
|
158
|
-
<slot name="welcome-message" />
|
|
129
|
+
<slot :name="slotName" v-bind="slotProps" />
|
|
159
130
|
</template>
|
|
160
131
|
</CopilotSidebarViewInternal>
|
|
161
132
|
</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,
|
|
@@ -57,14 +59,22 @@ defineSlots<{
|
|
|
57
59
|
"scroll-to-bottom-button"?: (
|
|
58
60
|
props: CopilotChatScrollToBottomButtonSlotProps,
|
|
59
61
|
) => unknown;
|
|
62
|
+
interrupt?: (props: CopilotChatInterruptSlotProps) => unknown;
|
|
60
63
|
input?: (props: CopilotSidebarWelcomeScreenInputSlotProps) => unknown;
|
|
61
64
|
"suggestion-view"?: (
|
|
62
65
|
props: CopilotSidebarWelcomeScreenSuggestionViewSlotProps,
|
|
63
66
|
) => unknown;
|
|
64
67
|
"welcome-screen"?: (props: CopilotChatWelcomeScreenSlotProps) => unknown;
|
|
65
68
|
"welcome-message"?: () => unknown;
|
|
69
|
+
// Any other slot goes to the chat view, as on CopilotChat.
|
|
70
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
71
|
+
[key: string]: ((props: any) => unknown) | undefined;
|
|
66
72
|
}>();
|
|
67
73
|
|
|
74
|
+
// Slots this component renders itself. It passes every other slot to the
|
|
75
|
+
// chat view.
|
|
76
|
+
const OWN_SLOTS = ["header", "toggle-button"] as const;
|
|
77
|
+
|
|
68
78
|
const emit = defineEmits<{
|
|
69
79
|
"submit-message": [value: string];
|
|
70
80
|
stop: [];
|
|
@@ -310,42 +320,12 @@ onBeforeUnmount(() => {
|
|
|
310
320
|
:on-finish-transcribe-with-audio="onFinishTranscribeWithAudio"
|
|
311
321
|
v-bind="chatViewEventProps"
|
|
312
322
|
>
|
|
313
|
-
<template v-if="$slots['message-view']" #message-view="slotProps">
|
|
314
|
-
<slot name="message-view" v-bind="slotProps" />
|
|
315
|
-
</template>
|
|
316
|
-
|
|
317
|
-
<template v-if="$slots['scroll-view']" #scroll-view="slotProps">
|
|
318
|
-
<slot name="scroll-view" v-bind="slotProps" />
|
|
319
|
-
</template>
|
|
320
|
-
|
|
321
|
-
<template v-if="$slots.feather" #feather>
|
|
322
|
-
<slot name="feather" />
|
|
323
|
-
</template>
|
|
324
|
-
|
|
325
323
|
<template
|
|
326
|
-
v-
|
|
327
|
-
|
|
324
|
+
v-for="slotName in forwardedSlotNames($slots, OWN_SLOTS)"
|
|
325
|
+
:key="slotName"
|
|
326
|
+
#[slotName]="slotProps"
|
|
328
327
|
>
|
|
329
|
-
<slot name="
|
|
330
|
-
</template>
|
|
331
|
-
|
|
332
|
-
<template v-if="$slots.input" #input="slotProps">
|
|
333
|
-
<slot name="input" v-bind="slotProps" />
|
|
334
|
-
</template>
|
|
335
|
-
|
|
336
|
-
<template
|
|
337
|
-
v-if="$slots['suggestion-view']"
|
|
338
|
-
#suggestion-view="slotProps"
|
|
339
|
-
>
|
|
340
|
-
<slot name="suggestion-view" v-bind="slotProps" />
|
|
341
|
-
</template>
|
|
342
|
-
|
|
343
|
-
<template v-if="$slots['welcome-screen']" #welcome-screen="slotProps">
|
|
344
|
-
<slot name="welcome-screen" v-bind="slotProps" />
|
|
345
|
-
</template>
|
|
346
|
-
|
|
347
|
-
<template v-if="$slots['welcome-message']" #welcome-message>
|
|
348
|
-
<slot name="welcome-message" />
|
|
328
|
+
<slot :name="slotName" v-bind="slotProps" />
|
|
349
329
|
</template>
|
|
350
330
|
</CopilotChatView>
|
|
351
331
|
</div>
|