@copilotkit/react-core 1.68.3-canary.1787220377 → 1.69.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/dist/{copilotkit-EFunREg5.cjs → copilotkit-DOMr3DRO.cjs} +26 -78
- package/dist/copilotkit-DOMr3DRO.cjs.map +1 -0
- package/dist/{copilotkit-B1K0Tgnz.d.cts → copilotkit-DYM5ChMS.d.cts} +8 -35
- package/dist/copilotkit-DYM5ChMS.d.cts.map +1 -0
- package/dist/{copilotkit-CZjzQPdq.d.mts → copilotkit-pkDPhwkR.d.mts} +8 -35
- package/dist/copilotkit-pkDPhwkR.d.mts.map +1 -0
- package/dist/{copilotkit-DT2FmOwK.mjs → copilotkit-ykQW_VJZ.mjs} +27 -73
- package/dist/copilotkit-ykQW_VJZ.mjs.map +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.mts +1 -1
- package/dist/index.mjs +1 -1
- package/dist/index.umd.js +0 -1
- package/dist/index.umd.js.map +1 -1
- package/dist/v2/index.cjs +1 -2
- package/dist/v2/index.d.cts +2 -2
- package/dist/v2/index.d.mts +2 -2
- package/dist/v2/index.mjs +2 -2
- package/dist/v2/index.umd.js +25 -72
- package/dist/v2/index.umd.js.map +1 -1
- package/package.json +8 -8
- package/skills/react-core/SKILL.md +1 -1
- package/skills/react-core/references/provider-setup.md +22 -1
- package/skills/react-core/references/threads.md +1 -2
- package/dist/copilotkit-B1K0Tgnz.d.cts.map +0 -1
- package/dist/copilotkit-CZjzQPdq.d.mts.map +0 -1
- package/dist/copilotkit-DT2FmOwK.mjs.map +0 -1
- package/dist/copilotkit-EFunREg5.cjs.map +0 -1
package/dist/v2/index.cjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
4
|
-
const require_copilotkit = require('../copilotkit-
|
|
4
|
+
const require_copilotkit = require('../copilotkit-DOMr3DRO.cjs');
|
|
5
5
|
require("./index.css");
|
|
6
6
|
let _copilotkit_a2ui_renderer = require("@copilotkit/a2ui-renderer");
|
|
7
7
|
let _copilotkit_react_core_v2_context = require("@copilotkit/react-core/v2/context");
|
|
@@ -110,7 +110,6 @@ exports.useRenderCustomMessages = require_copilotkit.useRenderCustomMessages;
|
|
|
110
110
|
exports.useRenderTool = require_copilotkit.useRenderTool;
|
|
111
111
|
exports.useRenderToolCall = require_copilotkit.useRenderToolCall;
|
|
112
112
|
exports.useSandboxFunctions = require_copilotkit.useSandboxFunctions;
|
|
113
|
-
exports.useSubagent = require_copilotkit.useSubagent;
|
|
114
113
|
exports.useSuggestions = require_copilotkit.useSuggestions;
|
|
115
114
|
exports.useThreads = require_copilotkit.useThreads$1;
|
|
116
115
|
exports.ɵrunMcpFollowUp = require_copilotkit.ɵrunMcpFollowUp;
|
package/dist/v2/index.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { $ as
|
|
1
|
+
import { $ as useRenderTool, $t as CopilotPopupViewProps, A as UseAttachmentsReturn, An as CopilotChatAssistantMessage, At as MCPAppsActivityType, B as useMemories, Bn as CopilotChatConfigurationValue, Bt as CopilotChatAttachmentQueue, C as MemoryScope, Cn as CopilotChatSuggestionViewProps, Ct as OpenGenerativeUIActivityType, D as UseLearningContainersArgs, Dn as CopilotChatReasoningMessageProps, Dt as MCPAppsActivityContent, E as useLearningContainersInCurrentThread, En as CopilotChatReasoningMessage, Et as OpenGenerativeUIToolRenderer, F as LearnFromUserActionInput, Fn as CopilotChatInput, Ft as WildcardToolCallRender, G as AgentContextInput, Gn as CopilotChatAudioRecorder, Gt as UseThreadsInput, H as useInterrupt, Hn as useCopilotChatConfiguration, Ht as CopilotThreadsDrawerProps, I as LearnFromUserActionResult, In as CopilotChatInputProps, It as Attachment, J as useCapabilities, Jt as CopilotPopup, K as JsonSerializable, Kt as UseThreadsResult, L as UseLearnFromUserActionRecorder, Ln as ToolsMenuItem, Lt as AttachmentModality, M as LearnFromUserActionInCurrentThreadInput, Mn as CopilotChatFeedbackMessage, Mt as ɵrunMcpFollowUp, N as UseLearnFromUserActionInCurrentThreadRecorder, Nn as CopilotChatToolCallsView, Nt as CopilotKitInspector, O as useLearningContainers, On as CopilotChatUserMessage, Ot as MCPAppsActivityContentSchema, P as useLearnFromUserActionInCurrentThread, Pn as CopilotChatToolCallsViewProps, Pt as CopilotKitInspectorProps, Q as useDefaultRenderTool, Qt as CopilotPopupView, R as useLearnFromUserAction, Rn as CopilotChatConfigurationProvider, Rt as AttachmentsConfig, S as MemoryKind, Sn as CopilotChatSuggestionView, St as OpenGenerativeUIActivityRenderer, T as UseLearningContainersInCurrentThreadArgs, Tn as CopilotChatSuggestionPillProps, Tt as OpenGenerativeUIContentSchema, U as useConfigureSuggestions, Un as AudioRecorderError, Ut as CopilotThreadsDrawerRowRenderer, V as UseInterruptConfig, Vn as CopilotChatLabels, Vt as CopilotThreadsDrawer, W as useSuggestions, Wn as AudioRecorderState, Wt as Thread, X as useAgent, Xt as CopilotSidebar, Y as UseAgentUpdate, Yt as CopilotPopupProps, Z as useHumanInTheLoop, Zt as CopilotSidebarProps, _ as CopilotKitCoreReact, _n as IntelligenceIndicatorProps, _t as ReactCustomMessageRenderer, a as A2UIMessageRendererOptions, an as CopilotChatToggleButtonProps, at as InterruptCancelFn, b as Memory, bn as IntelligenceIndicatorView, bt as GenerateSandboxedUiArgs, c as InspectorAnchor, cn as CopilotChat, ct as InterruptRenderProps, d as CopilotKitProvider, dn as CopilotChatViewProps, dt as defineToolCallRenderer, en as CopilotSidebarView, et as useComponent, f as CopilotKitProviderProps, fn as AutoScrollMode, ft as ReactHumanInTheLoop, g as useLicenseContext, gn as IntelligenceIndicator, gt as useRenderCustomMessages, h as useCopilotKit, hn as INTELLIGENCE_TURN_HEAD, ht as ReactToolCallRenderer, i as A2UIActionInterceptor, in as CopilotChatToggleButton, it as Interrupt, j as useAttachments, jn as CopilotChatAssistantMessageProps, jt as ɵMcpFollowUpHost, k as UseAttachmentsProps, kn as CopilotChatUserMessageProps, kt as MCPAppsActivityRenderer, l as SandboxFunctionsContext, ln as CopilotChatProps, lt as InterruptResolveFn, m as CopilotKitContextValue, mn as CopilotChatMessageViewProps, mt as ReactActivityMessageRenderer, nn as CopilotModalHeader, nt as useRenderActivityMessage, o as A2UIUserAction, on as DefaultCloseIcon, ot as InterruptEvent, p as A2UIRecoveryRendererOptions, pn as CopilotChatMessageView, pt as ReactFrontendTool, q as useAgentContext, qt as useThreads, r as CopilotKitProps, rn as CopilotModalHeaderProps, rt as SandboxFunction, s as createA2UIMessageRenderer, sn as DefaultOpenIcon, st as InterruptHandlerProps, t as CopilotKit, tn as CopilotSidebarViewProps, tt as useFrontendTool, u as useSandboxFunctions, un as CopilotChatView, ut as ResumeEntry, v as CopilotKitCoreReactConfig, vn as getIntelligenceTurnAnchors, vt as ReactCustomMessageRendererPosition, w as NewMemory, wn as CopilotChatSuggestionPill, wt as OpenGenerativeUIContent, x as MemoryChanges, xn as IntelligenceIndicatorViewProps, xt as GenerateSandboxedUiArgsSchema, y as CopilotKitCoreReactSubscriber, yn as IntelligenceIndicatorStatus, yt as useRenderToolCall, z as UseMemoriesResult, zn as CopilotChatConfigurationProviderProps, zt as CopilotChatAttachmentRenderer } from "../copilotkit-DYM5ChMS.cjs";
|
|
2
2
|
import { Theme as A2UITheme, defaultTheme as a2uiDefaultTheme } from "@copilotkit/a2ui-renderer";
|
|
3
3
|
export * from "@copilotkit/core";
|
|
4
4
|
export * from "@ag-ui/client";
|
|
5
|
-
export { type A2UIActionInterceptor, type A2UIMessageRendererOptions, type A2UIRecoveryRendererOptions, type A2UITheme, type A2UIUserAction, AgentContextInput, Attachment, AttachmentModality, AttachmentsConfig, AudioRecorderError, AudioRecorderState, AutoScrollMode, CopilotChat, CopilotChatAssistantMessage, CopilotChatAssistantMessageProps, CopilotChatAttachmentQueue, CopilotChatAttachmentRenderer, CopilotChatAudioRecorder, CopilotChatConfigurationProvider, CopilotChatConfigurationProviderProps, CopilotChatConfigurationValue, CopilotChatInput, CopilotChatInputProps, CopilotChatLabels, CopilotChatMessageView, CopilotChatMessageViewProps, CopilotChatProps, CopilotChatReasoningMessage, CopilotChatReasoningMessageProps, CopilotChatSuggestionPill, CopilotChatSuggestionPillProps, CopilotChatSuggestionView, CopilotChatSuggestionViewProps, CopilotChatToggleButton, DefaultCloseIcon as CopilotChatToggleButtonCloseIcon, DefaultOpenIcon as CopilotChatToggleButtonOpenIcon, CopilotChatToggleButtonProps, CopilotChatToolCallsView, CopilotChatToolCallsViewProps, CopilotChatUserMessage, CopilotChatUserMessageProps, CopilotChatView, CopilotChatViewProps, CopilotKit, CopilotKitContextValue, CopilotKitCoreReact, CopilotKitCoreReactConfig, CopilotKitCoreReactSubscriber, CopilotKitInspector, CopilotKitInspectorProps, type CopilotKitProps, CopilotKitProvider, CopilotKitProviderProps, CopilotModalHeader, CopilotModalHeaderProps, CopilotPopup, CopilotPopupProps, CopilotPopupView, CopilotPopupViewProps, CopilotSidebar, CopilotSidebarProps, CopilotSidebarView, CopilotSidebarViewProps, CopilotThreadsDrawer, CopilotThreadsDrawerProps, CopilotThreadsDrawerRowRenderer, GenerateSandboxedUiArgs, GenerateSandboxedUiArgsSchema, INTELLIGENCE_TURN_HEAD, InspectorAnchor, IntelligenceIndicator, IntelligenceIndicatorProps, IntelligenceIndicatorStatus, IntelligenceIndicatorView, IntelligenceIndicatorViewProps, Interrupt, InterruptCancelFn, InterruptEvent, InterruptHandlerProps, InterruptRenderProps, InterruptResolveFn, JsonSerializable, LearnFromUserActionInCurrentThreadInput, LearnFromUserActionInput, LearnFromUserActionResult, MCPAppsActivityContent, MCPAppsActivityContentSchema, MCPAppsActivityRenderer, MCPAppsActivityType, Memory, MemoryChanges, MemoryKind, MemoryScope, NewMemory, OpenGenerativeUIActivityRenderer, OpenGenerativeUIActivityType, OpenGenerativeUIContent, OpenGenerativeUIContentSchema, OpenGenerativeUIToolRenderer, ReactActivityMessageRenderer, ReactCustomMessageRenderer, ReactCustomMessageRendererPosition, ReactFrontendTool, ReactHumanInTheLoop, ReactToolCallRenderer, ResumeEntry, SandboxFunction, SandboxFunctionsContext,
|
|
5
|
+
export { type A2UIActionInterceptor, type A2UIMessageRendererOptions, type A2UIRecoveryRendererOptions, type A2UITheme, type A2UIUserAction, AgentContextInput, Attachment, AttachmentModality, AttachmentsConfig, AudioRecorderError, AudioRecorderState, AutoScrollMode, CopilotChat, CopilotChatAssistantMessage, CopilotChatAssistantMessageProps, CopilotChatAttachmentQueue, CopilotChatAttachmentRenderer, CopilotChatAudioRecorder, CopilotChatConfigurationProvider, CopilotChatConfigurationProviderProps, CopilotChatConfigurationValue, CopilotChatFeedbackMessage, CopilotChatInput, CopilotChatInputProps, CopilotChatLabels, CopilotChatMessageView, CopilotChatMessageViewProps, CopilotChatProps, CopilotChatReasoningMessage, CopilotChatReasoningMessageProps, CopilotChatSuggestionPill, CopilotChatSuggestionPillProps, CopilotChatSuggestionView, CopilotChatSuggestionViewProps, CopilotChatToggleButton, DefaultCloseIcon as CopilotChatToggleButtonCloseIcon, DefaultOpenIcon as CopilotChatToggleButtonOpenIcon, CopilotChatToggleButtonProps, CopilotChatToolCallsView, CopilotChatToolCallsViewProps, CopilotChatUserMessage, CopilotChatUserMessageProps, CopilotChatView, CopilotChatViewProps, CopilotKit, CopilotKitContextValue, CopilotKitCoreReact, CopilotKitCoreReactConfig, CopilotKitCoreReactSubscriber, CopilotKitInspector, CopilotKitInspectorProps, type CopilotKitProps, CopilotKitProvider, CopilotKitProviderProps, CopilotModalHeader, CopilotModalHeaderProps, CopilotPopup, CopilotPopupProps, CopilotPopupView, CopilotPopupViewProps, CopilotSidebar, CopilotSidebarProps, CopilotSidebarView, CopilotSidebarViewProps, CopilotThreadsDrawer, CopilotThreadsDrawerProps, CopilotThreadsDrawerRowRenderer, GenerateSandboxedUiArgs, GenerateSandboxedUiArgsSchema, INTELLIGENCE_TURN_HEAD, InspectorAnchor, IntelligenceIndicator, IntelligenceIndicatorProps, IntelligenceIndicatorStatus, IntelligenceIndicatorView, IntelligenceIndicatorViewProps, Interrupt, InterruptCancelFn, InterruptEvent, InterruptHandlerProps, InterruptRenderProps, InterruptResolveFn, JsonSerializable, LearnFromUserActionInCurrentThreadInput, LearnFromUserActionInput, LearnFromUserActionResult, MCPAppsActivityContent, MCPAppsActivityContentSchema, MCPAppsActivityRenderer, MCPAppsActivityType, Memory, MemoryChanges, MemoryKind, MemoryScope, NewMemory, OpenGenerativeUIActivityRenderer, OpenGenerativeUIActivityType, OpenGenerativeUIContent, OpenGenerativeUIContentSchema, OpenGenerativeUIToolRenderer, ReactActivityMessageRenderer, ReactCustomMessageRenderer, ReactCustomMessageRendererPosition, ReactFrontendTool, ReactHumanInTheLoop, ReactToolCallRenderer, ResumeEntry, SandboxFunction, SandboxFunctionsContext, Thread, ToolsMenuItem, UseAgentUpdate, UseAttachmentsProps, UseAttachmentsReturn, UseInterruptConfig, UseLearnFromUserActionInCurrentThreadRecorder, UseLearnFromUserActionRecorder, UseLearningContainersArgs, UseLearningContainersInCurrentThreadArgs, UseMemoriesResult, UseThreadsInput, UseThreadsResult, WildcardToolCallRender, a2uiDefaultTheme, createA2UIMessageRenderer, defineToolCallRenderer, getIntelligenceTurnAnchors, useAgent, useAgentContext, useAttachments, useCapabilities, useComponent, useConfigureSuggestions, useCopilotChatConfiguration, useCopilotKit, useDefaultRenderTool, useFrontendTool, useHumanInTheLoop, useInterrupt, useLearnFromUserAction, useLearnFromUserActionInCurrentThread, useLearningContainers, useLearningContainersInCurrentThread, useLicenseContext, useMemories, useRenderActivityMessage, useRenderCustomMessages, useRenderTool, useRenderToolCall, useSandboxFunctions, useSuggestions, useThreads, ɵMcpFollowUpHost, ɵrunMcpFollowUp };
|
package/dist/v2/index.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { $ as
|
|
1
|
+
import { $ as useRenderTool, $t as CopilotPopupViewProps, A as UseAttachmentsReturn, An as CopilotChatAssistantMessage, At as MCPAppsActivityType, B as useMemories, Bn as CopilotChatConfigurationValue, Bt as CopilotChatAttachmentQueue, C as MemoryScope, Cn as CopilotChatSuggestionViewProps, Ct as OpenGenerativeUIActivityType, D as UseLearningContainersArgs, Dn as CopilotChatReasoningMessageProps, Dt as MCPAppsActivityContent, E as useLearningContainersInCurrentThread, En as CopilotChatReasoningMessage, Et as OpenGenerativeUIToolRenderer, F as LearnFromUserActionInput, Fn as CopilotChatInput, Ft as WildcardToolCallRender, G as AgentContextInput, Gn as CopilotChatAudioRecorder, Gt as UseThreadsInput, H as useInterrupt, Hn as useCopilotChatConfiguration, Ht as CopilotThreadsDrawerProps, I as LearnFromUserActionResult, In as CopilotChatInputProps, It as Attachment, J as useCapabilities, Jt as CopilotPopup, K as JsonSerializable, Kt as UseThreadsResult, L as UseLearnFromUserActionRecorder, Ln as ToolsMenuItem, Lt as AttachmentModality, M as LearnFromUserActionInCurrentThreadInput, Mn as CopilotChatFeedbackMessage, Mt as ɵrunMcpFollowUp, N as UseLearnFromUserActionInCurrentThreadRecorder, Nn as CopilotChatToolCallsView, Nt as CopilotKitInspector, O as useLearningContainers, On as CopilotChatUserMessage, Ot as MCPAppsActivityContentSchema, P as useLearnFromUserActionInCurrentThread, Pn as CopilotChatToolCallsViewProps, Pt as CopilotKitInspectorProps, Q as useDefaultRenderTool, Qt as CopilotPopupView, R as useLearnFromUserAction, Rn as CopilotChatConfigurationProvider, Rt as AttachmentsConfig, S as MemoryKind, Sn as CopilotChatSuggestionView, St as OpenGenerativeUIActivityRenderer, T as UseLearningContainersInCurrentThreadArgs, Tn as CopilotChatSuggestionPillProps, Tt as OpenGenerativeUIContentSchema, U as useConfigureSuggestions, Un as AudioRecorderError, Ut as CopilotThreadsDrawerRowRenderer, V as UseInterruptConfig, Vn as CopilotChatLabels, Vt as CopilotThreadsDrawer, W as useSuggestions, Wn as AudioRecorderState, Wt as Thread, X as useAgent, Xt as CopilotSidebar, Y as UseAgentUpdate, Yt as CopilotPopupProps, Z as useHumanInTheLoop, Zt as CopilotSidebarProps, _ as useCopilotKit, _n as IntelligenceIndicatorProps, _t as ReactCustomMessageRenderer, a as A2UIMessageRendererOptions, an as CopilotChatToggleButtonProps, at as InterruptCancelFn, b as Memory, bn as IntelligenceIndicatorView, bt as GenerateSandboxedUiArgs, c as CopilotKitCoreReact, cn as CopilotChat, ct as InterruptRenderProps, d as InspectorAnchor, dn as CopilotChatViewProps, dt as defineToolCallRenderer, en as CopilotSidebarView, et as useComponent, f as SandboxFunctionsContext, fn as AutoScrollMode, ft as ReactHumanInTheLoop, g as CopilotKitProviderProps, gn as IntelligenceIndicator, gt as useRenderCustomMessages, h as CopilotKitProvider, hn as INTELLIGENCE_TURN_HEAD, ht as ReactToolCallRenderer, i as A2UIActionInterceptor, in as CopilotChatToggleButton, it as Interrupt, j as useAttachments, jn as CopilotChatAssistantMessageProps, jt as ɵMcpFollowUpHost, k as UseAttachmentsProps, kn as CopilotChatUserMessageProps, kt as MCPAppsActivityRenderer, l as CopilotKitCoreReactConfig, ln as CopilotChatProps, lt as InterruptResolveFn, m as CopilotKitContextValue, mn as CopilotChatMessageViewProps, mt as ReactActivityMessageRenderer, nn as CopilotModalHeader, nt as useRenderActivityMessage, o as A2UIUserAction, on as DefaultCloseIcon, ot as InterruptEvent, p as useSandboxFunctions, pn as CopilotChatMessageView, pt as ReactFrontendTool, q as useAgentContext, qt as useThreads, r as CopilotKitProps, rn as CopilotModalHeaderProps, rt as SandboxFunction, s as createA2UIMessageRenderer, sn as DefaultOpenIcon, st as InterruptHandlerProps, t as CopilotKit, tn as CopilotSidebarViewProps, tt as useFrontendTool, u as CopilotKitCoreReactSubscriber, un as CopilotChatView, ut as ResumeEntry, v as useLicenseContext, vn as getIntelligenceTurnAnchors, vt as ReactCustomMessageRendererPosition, w as NewMemory, wn as CopilotChatSuggestionPill, wt as OpenGenerativeUIContent, x as MemoryChanges, xn as IntelligenceIndicatorViewProps, xt as GenerateSandboxedUiArgsSchema, y as A2UIRecoveryRendererOptions, yn as IntelligenceIndicatorStatus, yt as useRenderToolCall, z as UseMemoriesResult, zn as CopilotChatConfigurationProviderProps, zt as CopilotChatAttachmentRenderer } from "../copilotkit-pkDPhwkR.mjs";
|
|
2
2
|
import { Theme as A2UITheme, defaultTheme as a2uiDefaultTheme } from "@copilotkit/a2ui-renderer";
|
|
3
3
|
export * from "@copilotkit/core";
|
|
4
4
|
export * from "@ag-ui/client";
|
|
5
|
-
export { type A2UIActionInterceptor, type A2UIMessageRendererOptions, type A2UIRecoveryRendererOptions, type A2UITheme, type A2UIUserAction, AgentContextInput, Attachment, AttachmentModality, AttachmentsConfig, AudioRecorderError, AudioRecorderState, AutoScrollMode, CopilotChat, CopilotChatAssistantMessage, CopilotChatAssistantMessageProps, CopilotChatAttachmentQueue, CopilotChatAttachmentRenderer, CopilotChatAudioRecorder, CopilotChatConfigurationProvider, CopilotChatConfigurationProviderProps, CopilotChatConfigurationValue, CopilotChatInput, CopilotChatInputProps, CopilotChatLabels, CopilotChatMessageView, CopilotChatMessageViewProps, CopilotChatProps, CopilotChatReasoningMessage, CopilotChatReasoningMessageProps, CopilotChatSuggestionPill, CopilotChatSuggestionPillProps, CopilotChatSuggestionView, CopilotChatSuggestionViewProps, CopilotChatToggleButton, DefaultCloseIcon as CopilotChatToggleButtonCloseIcon, DefaultOpenIcon as CopilotChatToggleButtonOpenIcon, CopilotChatToggleButtonProps, CopilotChatToolCallsView, CopilotChatToolCallsViewProps, CopilotChatUserMessage, CopilotChatUserMessageProps, CopilotChatView, CopilotChatViewProps, CopilotKit, CopilotKitContextValue, CopilotKitCoreReact, CopilotKitCoreReactConfig, CopilotKitCoreReactSubscriber, CopilotKitInspector, CopilotKitInspectorProps, type CopilotKitProps, CopilotKitProvider, CopilotKitProviderProps, CopilotModalHeader, CopilotModalHeaderProps, CopilotPopup, CopilotPopupProps, CopilotPopupView, CopilotPopupViewProps, CopilotSidebar, CopilotSidebarProps, CopilotSidebarView, CopilotSidebarViewProps, CopilotThreadsDrawer, CopilotThreadsDrawerProps, CopilotThreadsDrawerRowRenderer, GenerateSandboxedUiArgs, GenerateSandboxedUiArgsSchema, INTELLIGENCE_TURN_HEAD, InspectorAnchor, IntelligenceIndicator, IntelligenceIndicatorProps, IntelligenceIndicatorStatus, IntelligenceIndicatorView, IntelligenceIndicatorViewProps, Interrupt, InterruptCancelFn, InterruptEvent, InterruptHandlerProps, InterruptRenderProps, InterruptResolveFn, JsonSerializable, LearnFromUserActionInCurrentThreadInput, LearnFromUserActionInput, LearnFromUserActionResult, MCPAppsActivityContent, MCPAppsActivityContentSchema, MCPAppsActivityRenderer, MCPAppsActivityType, Memory, MemoryChanges, MemoryKind, MemoryScope, NewMemory, OpenGenerativeUIActivityRenderer, OpenGenerativeUIActivityType, OpenGenerativeUIContent, OpenGenerativeUIContentSchema, OpenGenerativeUIToolRenderer, ReactActivityMessageRenderer, ReactCustomMessageRenderer, ReactCustomMessageRendererPosition, ReactFrontendTool, ReactHumanInTheLoop, ReactToolCallRenderer, ResumeEntry, SandboxFunction, SandboxFunctionsContext,
|
|
5
|
+
export { type A2UIActionInterceptor, type A2UIMessageRendererOptions, type A2UIRecoveryRendererOptions, type A2UITheme, type A2UIUserAction, AgentContextInput, Attachment, AttachmentModality, AttachmentsConfig, AudioRecorderError, AudioRecorderState, AutoScrollMode, CopilotChat, CopilotChatAssistantMessage, CopilotChatAssistantMessageProps, CopilotChatAttachmentQueue, CopilotChatAttachmentRenderer, CopilotChatAudioRecorder, CopilotChatConfigurationProvider, CopilotChatConfigurationProviderProps, CopilotChatConfigurationValue, CopilotChatFeedbackMessage, CopilotChatInput, CopilotChatInputProps, CopilotChatLabels, CopilotChatMessageView, CopilotChatMessageViewProps, CopilotChatProps, CopilotChatReasoningMessage, CopilotChatReasoningMessageProps, CopilotChatSuggestionPill, CopilotChatSuggestionPillProps, CopilotChatSuggestionView, CopilotChatSuggestionViewProps, CopilotChatToggleButton, DefaultCloseIcon as CopilotChatToggleButtonCloseIcon, DefaultOpenIcon as CopilotChatToggleButtonOpenIcon, CopilotChatToggleButtonProps, CopilotChatToolCallsView, CopilotChatToolCallsViewProps, CopilotChatUserMessage, CopilotChatUserMessageProps, CopilotChatView, CopilotChatViewProps, CopilotKit, CopilotKitContextValue, CopilotKitCoreReact, CopilotKitCoreReactConfig, CopilotKitCoreReactSubscriber, CopilotKitInspector, CopilotKitInspectorProps, type CopilotKitProps, CopilotKitProvider, CopilotKitProviderProps, CopilotModalHeader, CopilotModalHeaderProps, CopilotPopup, CopilotPopupProps, CopilotPopupView, CopilotPopupViewProps, CopilotSidebar, CopilotSidebarProps, CopilotSidebarView, CopilotSidebarViewProps, CopilotThreadsDrawer, CopilotThreadsDrawerProps, CopilotThreadsDrawerRowRenderer, GenerateSandboxedUiArgs, GenerateSandboxedUiArgsSchema, INTELLIGENCE_TURN_HEAD, InspectorAnchor, IntelligenceIndicator, IntelligenceIndicatorProps, IntelligenceIndicatorStatus, IntelligenceIndicatorView, IntelligenceIndicatorViewProps, Interrupt, InterruptCancelFn, InterruptEvent, InterruptHandlerProps, InterruptRenderProps, InterruptResolveFn, JsonSerializable, LearnFromUserActionInCurrentThreadInput, LearnFromUserActionInput, LearnFromUserActionResult, MCPAppsActivityContent, MCPAppsActivityContentSchema, MCPAppsActivityRenderer, MCPAppsActivityType, Memory, MemoryChanges, MemoryKind, MemoryScope, NewMemory, OpenGenerativeUIActivityRenderer, OpenGenerativeUIActivityType, OpenGenerativeUIContent, OpenGenerativeUIContentSchema, OpenGenerativeUIToolRenderer, ReactActivityMessageRenderer, ReactCustomMessageRenderer, ReactCustomMessageRendererPosition, ReactFrontendTool, ReactHumanInTheLoop, ReactToolCallRenderer, ResumeEntry, SandboxFunction, SandboxFunctionsContext, Thread, ToolsMenuItem, UseAgentUpdate, UseAttachmentsProps, UseAttachmentsReturn, UseInterruptConfig, UseLearnFromUserActionInCurrentThreadRecorder, UseLearnFromUserActionRecorder, UseLearningContainersArgs, UseLearningContainersInCurrentThreadArgs, UseMemoriesResult, UseThreadsInput, UseThreadsResult, WildcardToolCallRender, a2uiDefaultTheme, createA2UIMessageRenderer, defineToolCallRenderer, getIntelligenceTurnAnchors, useAgent, useAgentContext, useAttachments, useCapabilities, useComponent, useConfigureSuggestions, useCopilotChatConfiguration, useCopilotKit, useDefaultRenderTool, useFrontendTool, useHumanInTheLoop, useInterrupt, useLearnFromUserAction, useLearnFromUserActionInCurrentThread, useLearningContainers, useLearningContainersInCurrentThread, useLicenseContext, useMemories, useRenderActivityMessage, useRenderCustomMessages, useRenderTool, useRenderToolCall, useSandboxFunctions, useSuggestions, useThreads, ɵMcpFollowUpHost, ɵrunMcpFollowUp };
|
package/dist/v2/index.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
|
|
3
|
-
import { $ as useCapabilities, A as CopilotChatMessageView, At as
|
|
3
|
+
import { $ as useCapabilities, A as CopilotChatMessageView, At as CopilotChatAudioRecorder, B as CopilotChatAssistantMessage_default, C as CopilotModalHeader, Ct as MCPAppsActivityRenderer, D as CopilotChat, Dt as useRenderToolCall, E as DefaultOpenIcon, Et as CopilotKitInspector, F as CopilotChatSuggestionView, G as useLearnFromUserActionInCurrentThread, H as useLearningContainersInCurrentThread, I as CopilotChatSuggestionPill, J as useThreads, K as useLearnFromUserAction, L as CopilotChatReasoningMessage_default, M as IntelligenceIndicator, Mt as useCopilotChatConfiguration, N as getIntelligenceTurnAnchors, O as CopilotChatView_default, Ot as CopilotChatInput_default, P as IntelligenceIndicatorView, Q as useAgentContext, R as CopilotChatUserMessage_default, S as CopilotSidebarView, St as MCPAppsActivityContentSchema, T as DefaultCloseIcon, Tt as ɵrunMcpFollowUp, U as useLearningContainers, V as CopilotChatToolCallsView, W as useAttachments, X as useConfigureSuggestions, Y as useInterrupt, Z as useSuggestions, _ as WildcardToolCallRender, _t as OpenGenerativeUIActivityType, at as useComponent, b as CopilotSidebar, bt as SandboxFunctionsContext, ct as useRenderCustomMessages, dt as useLicenseContext, et as UseAgentUpdate, ft as CopilotKitCoreReact, gt as OpenGenerativeUIActivityRenderer, ht as GenerateSandboxedUiArgsSchema, it as useRenderTool, j as INTELLIGENCE_TURN_HEAD, jt as CopilotChatConfigurationProvider, k as CopilotChatAttachmentQueue, kt as AudioRecorderError, lt as CopilotKitProvider, mt as createA2UIMessageRenderer, nt as useHumanInTheLoop, ot as useFrontendTool, pt as defineToolCallRenderer, q as useMemories, rt as useDefaultRenderTool, st as useRenderActivityMessage, t as CopilotKit, tt as useAgent, ut as useCopilotKit, v as CopilotThreadsDrawer, vt as OpenGenerativeUIContentSchema, w as CopilotChatToggleButton, wt as MCPAppsActivityType, x as CopilotPopupView, xt as useSandboxFunctions, y as CopilotPopup, yt as OpenGenerativeUIToolRenderer, z as CopilotChatAttachmentRenderer } from "../copilotkit-ykQW_VJZ.mjs";
|
|
4
4
|
import "./index.css";
|
|
5
5
|
import { defaultTheme as a2uiDefaultTheme } from "@copilotkit/a2ui-renderer";
|
|
6
6
|
|
|
@@ -8,4 +8,4 @@ export * from "@copilotkit/core"
|
|
|
8
8
|
|
|
9
9
|
export * from "@ag-ui/client"
|
|
10
10
|
|
|
11
|
-
export { AudioRecorderError, CopilotChat, CopilotChatAssistantMessage_default as CopilotChatAssistantMessage, CopilotChatAttachmentQueue, CopilotChatAttachmentRenderer, CopilotChatAudioRecorder, CopilotChatConfigurationProvider, CopilotChatInput_default as CopilotChatInput, CopilotChatMessageView, CopilotChatReasoningMessage_default as CopilotChatReasoningMessage, CopilotChatSuggestionPill, CopilotChatSuggestionView, CopilotChatToggleButton, DefaultCloseIcon as CopilotChatToggleButtonCloseIcon, DefaultOpenIcon as CopilotChatToggleButtonOpenIcon, CopilotChatToolCallsView, CopilotChatUserMessage_default as CopilotChatUserMessage, CopilotChatView_default as CopilotChatView, CopilotKit, CopilotKitCoreReact, CopilotKitInspector, CopilotKitProvider, CopilotModalHeader, CopilotPopup, CopilotPopupView, CopilotSidebar, CopilotSidebarView, CopilotThreadsDrawer, GenerateSandboxedUiArgsSchema, INTELLIGENCE_TURN_HEAD, IntelligenceIndicator, IntelligenceIndicatorView, MCPAppsActivityContentSchema, MCPAppsActivityRenderer, MCPAppsActivityType, OpenGenerativeUIActivityRenderer, OpenGenerativeUIActivityType, OpenGenerativeUIContentSchema, OpenGenerativeUIToolRenderer, SandboxFunctionsContext, UseAgentUpdate, WildcardToolCallRender, a2uiDefaultTheme, createA2UIMessageRenderer, defineToolCallRenderer, getIntelligenceTurnAnchors, useAgent, useAgentContext, useAttachments, useCapabilities, useComponent, useConfigureSuggestions, useCopilotChatConfiguration, useCopilotKit, useDefaultRenderTool, useFrontendTool, useHumanInTheLoop, useInterrupt, useLearnFromUserAction, useLearnFromUserActionInCurrentThread, useLearningContainers, useLearningContainersInCurrentThread, useLicenseContext, useMemories, useRenderActivityMessage, useRenderCustomMessages, useRenderTool, useRenderToolCall, useSandboxFunctions,
|
|
11
|
+
export { AudioRecorderError, CopilotChat, CopilotChatAssistantMessage_default as CopilotChatAssistantMessage, CopilotChatAttachmentQueue, CopilotChatAttachmentRenderer, CopilotChatAudioRecorder, CopilotChatConfigurationProvider, CopilotChatInput_default as CopilotChatInput, CopilotChatMessageView, CopilotChatReasoningMessage_default as CopilotChatReasoningMessage, CopilotChatSuggestionPill, CopilotChatSuggestionView, CopilotChatToggleButton, DefaultCloseIcon as CopilotChatToggleButtonCloseIcon, DefaultOpenIcon as CopilotChatToggleButtonOpenIcon, CopilotChatToolCallsView, CopilotChatUserMessage_default as CopilotChatUserMessage, CopilotChatView_default as CopilotChatView, CopilotKit, CopilotKitCoreReact, CopilotKitInspector, CopilotKitProvider, CopilotModalHeader, CopilotPopup, CopilotPopupView, CopilotSidebar, CopilotSidebarView, CopilotThreadsDrawer, GenerateSandboxedUiArgsSchema, INTELLIGENCE_TURN_HEAD, IntelligenceIndicator, IntelligenceIndicatorView, MCPAppsActivityContentSchema, MCPAppsActivityRenderer, MCPAppsActivityType, OpenGenerativeUIActivityRenderer, OpenGenerativeUIActivityType, OpenGenerativeUIContentSchema, OpenGenerativeUIToolRenderer, SandboxFunctionsContext, UseAgentUpdate, WildcardToolCallRender, a2uiDefaultTheme, createA2UIMessageRenderer, defineToolCallRenderer, getIntelligenceTurnAnchors, useAgent, useAgentContext, useAttachments, useCapabilities, useComponent, useConfigureSuggestions, useCopilotChatConfiguration, useCopilotKit, useDefaultRenderTool, useFrontendTool, useHumanInTheLoop, useInterrupt, useLearnFromUserAction, useLearnFromUserActionInCurrentThread, useLearningContainers, useLearningContainersInCurrentThread, useLicenseContext, useMemories, useRenderActivityMessage, useRenderCustomMessages, useRenderTool, useRenderToolCall, useSandboxFunctions, useSuggestions, useThreads, ɵrunMcpFollowUp };
|
package/dist/v2/index.umd.js
CHANGED
|
@@ -4657,75 +4657,6 @@ window.parent.postMessage({jsonrpc:"2.0",method:"ui/notifications/sandbox-proxy-
|
|
|
4657
4657
|
};
|
|
4658
4658
|
}
|
|
4659
4659
|
|
|
4660
|
-
//#endregion
|
|
4661
|
-
//#region src/v2/hooks/use-subagent.tsx
|
|
4662
|
-
const warnedAmbiguousNames = /* @__PURE__ */ new Set();
|
|
4663
|
-
function resolveSubagent(subagents, subagentRunId, subagentName) {
|
|
4664
|
-
if (subagentRunId) {
|
|
4665
|
-
const match = subagents[subagentRunId];
|
|
4666
|
-
return match ? { ...match } : void 0;
|
|
4667
|
-
}
|
|
4668
|
-
if (subagentName) {
|
|
4669
|
-
const matches = Object.values(subagents).filter((s) => s.name === subagentName);
|
|
4670
|
-
if (matches.length === 0) return;
|
|
4671
|
-
const chosen = matches[matches.length - 1];
|
|
4672
|
-
return matches.length > 1 ? {
|
|
4673
|
-
...chosen,
|
|
4674
|
-
isAmbiguous: true,
|
|
4675
|
-
matchCount: matches.length
|
|
4676
|
-
} : { ...chosen };
|
|
4677
|
-
}
|
|
4678
|
-
}
|
|
4679
|
-
/**
|
|
4680
|
-
* Read a subagent's live lifecycle state (name, description, running status)
|
|
4681
|
-
* from the CopilotKit core subagent registry, by id or by declared name.
|
|
4682
|
-
*
|
|
4683
|
-
* @example
|
|
4684
|
-
* const sub = useSubagent({ subagentRunId: message.subagentRunId });
|
|
4685
|
-
* // sub?.name, sub?.description, sub?.status
|
|
4686
|
-
*/
|
|
4687
|
-
function useSubagent(params) {
|
|
4688
|
-
const { subagentRunId, subagentName, agentId } = params;
|
|
4689
|
-
const { copilotkit } = useCopilotKit();
|
|
4690
|
-
const config = useCopilotChatConfiguration();
|
|
4691
|
-
const resolvedAgentId = (0, react.useMemo)(() => agentId ?? config?.agentId ?? _copilotkit_shared.DEFAULT_AGENT_ID, [agentId, config?.agentId]);
|
|
4692
|
-
const [subagent, setSubagent] = (0, react.useState)(() => resolveSubagent(copilotkit.getSubagents(resolvedAgentId), subagentRunId, subagentName));
|
|
4693
|
-
(0, react.useEffect)(() => {
|
|
4694
|
-
setSubagent(resolveSubagent(copilotkit.getSubagents(resolvedAgentId), subagentRunId, subagentName));
|
|
4695
|
-
}, [
|
|
4696
|
-
copilotkit,
|
|
4697
|
-
resolvedAgentId,
|
|
4698
|
-
subagentRunId,
|
|
4699
|
-
subagentName
|
|
4700
|
-
]);
|
|
4701
|
-
(0, react.useEffect)(() => {
|
|
4702
|
-
const subscription = copilotkit.subscribe({ onSubagentsChanged: ({ agentId: changedAgentId, subagents }) => {
|
|
4703
|
-
if (changedAgentId !== resolvedAgentId) return;
|
|
4704
|
-
setSubagent(resolveSubagent(subagents, subagentRunId, subagentName));
|
|
4705
|
-
} });
|
|
4706
|
-
return () => {
|
|
4707
|
-
subscription.unsubscribe();
|
|
4708
|
-
};
|
|
4709
|
-
}, [
|
|
4710
|
-
copilotkit,
|
|
4711
|
-
resolvedAgentId,
|
|
4712
|
-
subagentRunId,
|
|
4713
|
-
subagentName
|
|
4714
|
-
]);
|
|
4715
|
-
(0, react.useEffect)(() => {
|
|
4716
|
-
if (process.env.NODE_ENV === "production" || !subagentName || !subagent?.isAmbiguous) return;
|
|
4717
|
-
const key = `${subagentName}:${subagent.matchCount}`;
|
|
4718
|
-
if (warnedAmbiguousNames.has(key)) return;
|
|
4719
|
-
warnedAmbiguousNames.add(key);
|
|
4720
|
-
console.warn(`[CopilotKit] useSubagent({ subagentName: ${JSON.stringify(subagentName)} }) matched ${subagent.matchCount} subagents. Returning the most recently started one; pass a subagentRunId for a stable reference.`);
|
|
4721
|
-
}, [
|
|
4722
|
-
subagentName,
|
|
4723
|
-
subagent?.isAmbiguous,
|
|
4724
|
-
subagent?.matchCount
|
|
4725
|
-
]);
|
|
4726
|
-
return subagent;
|
|
4727
|
-
}
|
|
4728
|
-
|
|
4729
4660
|
//#endregion
|
|
4730
4661
|
//#region src/v2/hooks/use-capabilities.tsx
|
|
4731
4662
|
/**
|
|
@@ -7408,6 +7339,30 @@ window.parent.postMessage({jsonrpc:"2.0",method:"ui/notifications/sandbox-proxy-
|
|
|
7408
7339
|
const deduplicatedMessages = (0, react.useMemo)(() => deduplicateMessages(messages), [messages]);
|
|
7409
7340
|
if (process.env.NODE_ENV === "development" && deduplicatedMessages.length < messages.length) console.warn(`CopilotChatMessageView: Merged ${messages.length - deduplicatedMessages.length} message(s) with duplicate IDs.`);
|
|
7410
7341
|
const { Component: AssistantComponent, slotProps: assistantSlotProps } = (0, react.useMemo)(() => resolveSlotComponent(assistantMessage, CopilotChatAssistantMessage_default), [assistantMessage]);
|
|
7342
|
+
const agentId = config?.agentId;
|
|
7343
|
+
const threadId = config?.threadId;
|
|
7344
|
+
const assistantSlotPropsWithFeedback = (0, react.useMemo)(() => {
|
|
7345
|
+
const onThumbsUp = assistantSlotProps?.onThumbsUp;
|
|
7346
|
+
const onThumbsDown = assistantSlotProps?.onThumbsDown;
|
|
7347
|
+
if (!onThumbsUp && !onThumbsDown) return assistantSlotProps;
|
|
7348
|
+
const withRawEvent = (message) => {
|
|
7349
|
+
const rawEvent = agentId === void 0 || threadId === void 0 ? void 0 : copilotkit.getRawEventForMessage(agentId, threadId, message.id);
|
|
7350
|
+
return rawEvent === void 0 ? message : {
|
|
7351
|
+
...message,
|
|
7352
|
+
rawEvent
|
|
7353
|
+
};
|
|
7354
|
+
};
|
|
7355
|
+
return {
|
|
7356
|
+
...assistantSlotProps,
|
|
7357
|
+
...onThumbsUp && { onThumbsUp: (message) => onThumbsUp(withRawEvent(message)) },
|
|
7358
|
+
...onThumbsDown && { onThumbsDown: (message) => onThumbsDown(withRawEvent(message)) }
|
|
7359
|
+
};
|
|
7360
|
+
}, [
|
|
7361
|
+
assistantSlotProps,
|
|
7362
|
+
agentId,
|
|
7363
|
+
threadId,
|
|
7364
|
+
copilotkit
|
|
7365
|
+
]);
|
|
7411
7366
|
const { Component: UserComponent, slotProps: userSlotProps } = (0, react.useMemo)(() => resolveSlotComponent(userMessage, CopilotChatUserMessage_default), [userMessage]);
|
|
7412
7367
|
const { Component: ReasoningComponent, slotProps: reasoningSlotProps } = (0, react.useMemo)(() => resolveSlotComponent(reasoningMessage, CopilotChatReasoningMessage_default), [reasoningMessage]);
|
|
7413
7368
|
const scrollElementFromCtx = (0, react.useContext)(ScrollElementContext);
|
|
@@ -7447,7 +7402,7 @@ window.parent.postMessage({jsonrpc:"2.0",method:"ui/notifications/sandbox-proxy-
|
|
|
7447
7402
|
messages,
|
|
7448
7403
|
isRunning,
|
|
7449
7404
|
AssistantMessageComponent: AssistantComponent,
|
|
7450
|
-
slotProps:
|
|
7405
|
+
slotProps: assistantSlotPropsWithFeedback
|
|
7451
7406
|
}, message.id));
|
|
7452
7407
|
else if (message.role === "user") elements.push(/* @__PURE__ */ (0, react_jsx_runtime.jsx)(MemoizedUserMessage, {
|
|
7453
7408
|
message,
|
|
@@ -11448,7 +11403,6 @@ window.parent.postMessage({jsonrpc:"2.0",method:"ui/notifications/sandbox-proxy-
|
|
|
11448
11403
|
...v2Props,
|
|
11449
11404
|
showDevConsole: showInspector,
|
|
11450
11405
|
renderCustomMessages: renderArr,
|
|
11451
|
-
useSingleEndpoint: props.useSingleEndpoint ?? true,
|
|
11452
11406
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(CopilotKitInternal, {
|
|
11453
11407
|
...props,
|
|
11454
11408
|
children
|
|
@@ -12023,7 +11977,6 @@ exports.useRenderCustomMessages = useRenderCustomMessages;
|
|
|
12023
11977
|
exports.useRenderTool = useRenderTool;
|
|
12024
11978
|
exports.useRenderToolCall = useRenderToolCall;
|
|
12025
11979
|
exports.useSandboxFunctions = useSandboxFunctions;
|
|
12026
|
-
exports.useSubagent = useSubagent;
|
|
12027
11980
|
exports.useSuggestions = useSuggestions;
|
|
12028
11981
|
exports.useThreads = useThreads;
|
|
12029
11982
|
exports.ɵrunMcpFollowUp = ɵrunMcpFollowUp;
|