@copilotkit/react-core 1.63.0 → 1.63.2
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-CN_LykOC.d.mts → copilotkit-BE1n5tSI.d.mts} +16 -1
- package/dist/{copilotkit-CN_LykOC.d.mts.map → copilotkit-BE1n5tSI.d.mts.map} +1 -1
- package/dist/{copilotkit-BLh58_Tt.mjs → copilotkit-CN2JVeH3.mjs} +101 -77
- package/dist/copilotkit-CN2JVeH3.mjs.map +1 -0
- package/dist/{copilotkit-BHs-vx6l.d.cts → copilotkit-CXvuYw_F.d.cts} +16 -1
- package/dist/{copilotkit-BHs-vx6l.d.cts.map → copilotkit-CXvuYw_F.d.cts.map} +1 -1
- package/dist/{copilotkit-nu7NwzH6.cjs → copilotkit-DDVfoiRM.cjs} +99 -75
- package/dist/copilotkit-DDVfoiRM.cjs.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 +98 -74
- package/dist/index.umd.js.map +1 -1
- package/dist/v2/headless.cjs +98 -74
- package/dist/v2/headless.cjs.map +1 -1
- package/dist/v2/headless.d.cts +15 -0
- package/dist/v2/headless.d.cts.map +1 -1
- package/dist/v2/headless.d.mts +15 -0
- package/dist/v2/headless.d.mts.map +1 -1
- package/dist/v2/headless.mjs +100 -76
- package/dist/v2/headless.mjs.map +1 -1
- package/dist/v2/index.cjs +1 -1
- package/dist/v2/index.d.cts +1 -1
- package/dist/v2/index.d.mts +1 -1
- package/dist/v2/index.mjs +1 -1
- package/dist/v2/index.umd.js +98 -74
- package/dist/v2/index.umd.js.map +1 -1
- package/package.json +7 -7
- package/dist/copilotkit-BLh58_Tt.mjs.map +0 -1
- package/dist/copilotkit-nu7NwzH6.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-DDVfoiRM.cjs');
|
|
5
5
|
require("./index.css");
|
|
6
6
|
let _copilotkit_a2ui_renderer = require("@copilotkit/a2ui-renderer");
|
|
7
7
|
|
package/dist/v2/index.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $ as useComponent, $t as CopilotSidebarView, A as useAttachments, An as CopilotChatAssistantMessageProps, At as ɵMcpFollowUpHost, B as UseInterruptConfig, Bn as useCopilotChatConfiguration, Bt as CopilotThreadsDrawer, C as NewMemory, Cn as CopilotChatSuggestionPill, Ct as OpenGenerativeUIContent, D as useLearningContainers, Dn as CopilotChatUserMessage, Dt as MCPAppsActivityContentSchema, E as UseLearningContainersArgs, En as CopilotChatReasoningMessageProps, Et as MCPAppsActivityContent, F as LearnFromUserActionResult, Fn as ToolsMenuItem, Ft as Attachment, G as JsonSerializable, Gt as UseThreadsResult, H as useConfigureSuggestions, Hn as AudioRecorderState, Ht as CopilotThreadsDrawerRowRenderer, I as UseLearnFromUserActionRecorder, In as CopilotChatConfigurationProvider, It as AttachmentModality, J as UseAgentUpdate, Jt as CopilotPopupProps, K as useAgentContext, Kt as useThreads, L as useLearnFromUserAction, Ln as CopilotChatConfigurationProviderProps, Lt as AttachmentsConfig, M as UseLearnFromUserActionInCurrentThreadRecorder, Mn as CopilotChatToolCallsViewProps, Mt as CopilotKitInspector, N as useLearnFromUserActionInCurrentThread, Nn as CopilotChatInput, Nt as CopilotKitInspectorProps, O as UseAttachmentsProps, On as CopilotChatUserMessageProps, Ot as MCPAppsActivityRenderer, P as LearnFromUserActionInput, Pn as CopilotChatInputProps, Pt as WildcardToolCallRender, Q as useRenderTool, Qt as CopilotPopupViewProps, R as UseMemoriesResult, Rn as CopilotChatConfigurationValue, Rt as CopilotChatAttachmentRenderer, S as MemoryScope, Sn as CopilotChatSuggestionViewProps, St as OpenGenerativeUIActivityType, T as useLearningContainersInCurrentThread, Tn as CopilotChatReasoningMessage, Tt as OpenGenerativeUIToolRenderer, U as useSuggestions, Un as CopilotChatAudioRecorder, Ut as Thread, V as useInterrupt, Vn as AudioRecorderError, Vt as CopilotThreadsDrawerProps, W as AgentContextInput, Wt as UseThreadsInput, X as useHumanInTheLoop, Xt as CopilotSidebarProps, Y as useAgent, Yt as CopilotSidebar, Z as useDefaultRenderTool, Zt as CopilotPopupView, _ as CopilotKitCoreReactConfig, _n as getIntelligenceTurnAnchors, _t as ReactCustomMessageRendererPosition, a as A2UIMessageRendererOptions, an as DefaultCloseIcon, at as InterruptEvent, b as MemoryChanges, bn as IntelligenceIndicatorViewProps, bt as GenerateSandboxedUiArgsSchema, c as InspectorAnchor, cn as CopilotChatProps, ct as InterruptResolveFn, d as CopilotKitProvider, dn as AutoScrollMode, dt as ReactHumanInTheLoop, en as CopilotSidebarViewProps, et as useFrontendTool, f as CopilotKitProviderProps, fn as CopilotChatMessageView, ft as ReactFrontendTool, g as CopilotKitCoreReact, gn as IntelligenceIndicatorProps, gt as ReactCustomMessageRenderer, h as useCopilotKit, hn as IntelligenceIndicator, ht as useRenderCustomMessages, i as A2UIActionInterceptor, in as CopilotChatToggleButtonProps, it as InterruptCancelFn, j as LearnFromUserActionInCurrentThreadInput, jn as CopilotChatToolCallsView, jt as ɵrunMcpFollowUp, k as UseAttachmentsReturn, kn as CopilotChatAssistantMessage, kt as MCPAppsActivityType, l as SandboxFunctionsContext, ln as CopilotChatView, lt as ResumeEntry, m as CopilotKitContextValue, mn as INTELLIGENCE_TURN_HEAD, mt as ReactToolCallRenderer, nn as CopilotModalHeaderProps, nt as SandboxFunction, o as A2UIUserAction, on as DefaultOpenIcon, ot as InterruptHandlerProps, p as A2UIRecoveryRendererOptions, pn as CopilotChatMessageViewProps, pt as ReactActivityMessageRenderer, q as useCapabilities, qt as CopilotPopup, r as CopilotKitProps, rn as CopilotChatToggleButton, rt as Interrupt, s as createA2UIMessageRenderer, sn as CopilotChat, st as InterruptRenderProps, t as CopilotKit, tn as CopilotModalHeader, tt as useRenderActivityMessage, u as useSandboxFunctions, un as CopilotChatViewProps, ut as defineToolCallRenderer, v as CopilotKitCoreReactSubscriber, vn as IntelligenceIndicatorStatus, vt as useRenderToolCall, w as UseLearningContainersInCurrentThreadArgs, wn as CopilotChatSuggestionPillProps, wt as OpenGenerativeUIContentSchema, x as MemoryKind, xn as CopilotChatSuggestionView, xt as OpenGenerativeUIActivityRenderer, y as Memory, yn as IntelligenceIndicatorView, yt as GenerateSandboxedUiArgs, z as useMemories, zn as CopilotChatLabels, zt as CopilotChatAttachmentQueue } from "../copilotkit-
|
|
1
|
+
import { $ as useComponent, $t as CopilotSidebarView, A as useAttachments, An as CopilotChatAssistantMessageProps, At as ɵMcpFollowUpHost, B as UseInterruptConfig, Bn as useCopilotChatConfiguration, Bt as CopilotThreadsDrawer, C as NewMemory, Cn as CopilotChatSuggestionPill, Ct as OpenGenerativeUIContent, D as useLearningContainers, Dn as CopilotChatUserMessage, Dt as MCPAppsActivityContentSchema, E as UseLearningContainersArgs, En as CopilotChatReasoningMessageProps, Et as MCPAppsActivityContent, F as LearnFromUserActionResult, Fn as ToolsMenuItem, Ft as Attachment, G as JsonSerializable, Gt as UseThreadsResult, H as useConfigureSuggestions, Hn as AudioRecorderState, Ht as CopilotThreadsDrawerRowRenderer, I as UseLearnFromUserActionRecorder, In as CopilotChatConfigurationProvider, It as AttachmentModality, J as UseAgentUpdate, Jt as CopilotPopupProps, K as useAgentContext, Kt as useThreads, L as useLearnFromUserAction, Ln as CopilotChatConfigurationProviderProps, Lt as AttachmentsConfig, M as UseLearnFromUserActionInCurrentThreadRecorder, Mn as CopilotChatToolCallsViewProps, Mt as CopilotKitInspector, N as useLearnFromUserActionInCurrentThread, Nn as CopilotChatInput, Nt as CopilotKitInspectorProps, O as UseAttachmentsProps, On as CopilotChatUserMessageProps, Ot as MCPAppsActivityRenderer, P as LearnFromUserActionInput, Pn as CopilotChatInputProps, Pt as WildcardToolCallRender, Q as useRenderTool, Qt as CopilotPopupViewProps, R as UseMemoriesResult, Rn as CopilotChatConfigurationValue, Rt as CopilotChatAttachmentRenderer, S as MemoryScope, Sn as CopilotChatSuggestionViewProps, St as OpenGenerativeUIActivityType, T as useLearningContainersInCurrentThread, Tn as CopilotChatReasoningMessage, Tt as OpenGenerativeUIToolRenderer, U as useSuggestions, Un as CopilotChatAudioRecorder, Ut as Thread, V as useInterrupt, Vn as AudioRecorderError, Vt as CopilotThreadsDrawerProps, W as AgentContextInput, Wt as UseThreadsInput, X as useHumanInTheLoop, Xt as CopilotSidebarProps, Y as useAgent, Yt as CopilotSidebar, Z as useDefaultRenderTool, Zt as CopilotPopupView, _ as CopilotKitCoreReactConfig, _n as getIntelligenceTurnAnchors, _t as ReactCustomMessageRendererPosition, a as A2UIMessageRendererOptions, an as DefaultCloseIcon, at as InterruptEvent, b as MemoryChanges, bn as IntelligenceIndicatorViewProps, bt as GenerateSandboxedUiArgsSchema, c as InspectorAnchor, cn as CopilotChatProps, ct as InterruptResolveFn, d as CopilotKitProvider, dn as AutoScrollMode, dt as ReactHumanInTheLoop, en as CopilotSidebarViewProps, et as useFrontendTool, f as CopilotKitProviderProps, fn as CopilotChatMessageView, ft as ReactFrontendTool, g as CopilotKitCoreReact, gn as IntelligenceIndicatorProps, gt as ReactCustomMessageRenderer, h as useCopilotKit, hn as IntelligenceIndicator, ht as useRenderCustomMessages, i as A2UIActionInterceptor, in as CopilotChatToggleButtonProps, it as InterruptCancelFn, j as LearnFromUserActionInCurrentThreadInput, jn as CopilotChatToolCallsView, jt as ɵrunMcpFollowUp, k as UseAttachmentsReturn, kn as CopilotChatAssistantMessage, kt as MCPAppsActivityType, l as SandboxFunctionsContext, ln as CopilotChatView, lt as ResumeEntry, m as CopilotKitContextValue, mn as INTELLIGENCE_TURN_HEAD, mt as ReactToolCallRenderer, nn as CopilotModalHeaderProps, nt as SandboxFunction, o as A2UIUserAction, on as DefaultOpenIcon, ot as InterruptHandlerProps, p as A2UIRecoveryRendererOptions, pn as CopilotChatMessageViewProps, pt as ReactActivityMessageRenderer, q as useCapabilities, qt as CopilotPopup, r as CopilotKitProps, rn as CopilotChatToggleButton, rt as Interrupt, s as createA2UIMessageRenderer, sn as CopilotChat, st as InterruptRenderProps, t as CopilotKit, tn as CopilotModalHeader, tt as useRenderActivityMessage, u as useSandboxFunctions, un as CopilotChatViewProps, ut as defineToolCallRenderer, v as CopilotKitCoreReactSubscriber, vn as IntelligenceIndicatorStatus, vt as useRenderToolCall, w as UseLearningContainersInCurrentThreadArgs, wn as CopilotChatSuggestionPillProps, wt as OpenGenerativeUIContentSchema, x as MemoryKind, xn as CopilotChatSuggestionView, xt as OpenGenerativeUIActivityRenderer, y as Memory, yn as IntelligenceIndicatorView, yt as GenerateSandboxedUiArgs, z as useMemories, zn as CopilotChatLabels, zt as CopilotChatAttachmentQueue } from "../copilotkit-CXvuYw_F.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";
|
package/dist/v2/index.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $ as useComponent, $t as CopilotSidebarView, A as useAttachments, An as CopilotChatAssistantMessageProps, At as ɵMcpFollowUpHost, B as UseInterruptConfig, Bn as useCopilotChatConfiguration, Bt as CopilotThreadsDrawer, C as NewMemory, Cn as CopilotChatSuggestionPill, Ct as OpenGenerativeUIContent, D as useLearningContainers, Dn as CopilotChatUserMessage, Dt as MCPAppsActivityContentSchema, E as UseLearningContainersArgs, En as CopilotChatReasoningMessageProps, Et as MCPAppsActivityContent, F as LearnFromUserActionResult, Fn as ToolsMenuItem, Ft as Attachment, G as JsonSerializable, Gt as UseThreadsResult, H as useConfigureSuggestions, Hn as AudioRecorderState, Ht as CopilotThreadsDrawerRowRenderer, I as UseLearnFromUserActionRecorder, In as CopilotChatConfigurationProvider, It as AttachmentModality, J as UseAgentUpdate, Jt as CopilotPopupProps, K as useAgentContext, Kt as useThreads, L as useLearnFromUserAction, Ln as CopilotChatConfigurationProviderProps, Lt as AttachmentsConfig, M as UseLearnFromUserActionInCurrentThreadRecorder, Mn as CopilotChatToolCallsViewProps, Mt as CopilotKitInspector, N as useLearnFromUserActionInCurrentThread, Nn as CopilotChatInput, Nt as CopilotKitInspectorProps, O as UseAttachmentsProps, On as CopilotChatUserMessageProps, Ot as MCPAppsActivityRenderer, P as LearnFromUserActionInput, Pn as CopilotChatInputProps, Pt as WildcardToolCallRender, Q as useRenderTool, Qt as CopilotPopupViewProps, R as UseMemoriesResult, Rn as CopilotChatConfigurationValue, Rt as CopilotChatAttachmentRenderer, S as MemoryScope, Sn as CopilotChatSuggestionViewProps, St as OpenGenerativeUIActivityType, T as useLearningContainersInCurrentThread, Tn as CopilotChatReasoningMessage, Tt as OpenGenerativeUIToolRenderer, U as useSuggestions, Un as CopilotChatAudioRecorder, Ut as Thread, V as useInterrupt, Vn as AudioRecorderError, Vt as CopilotThreadsDrawerProps, W as AgentContextInput, Wt as UseThreadsInput, X as useHumanInTheLoop, Xt as CopilotSidebarProps, Y as useAgent, Yt as CopilotSidebar, Z as useDefaultRenderTool, Zt as CopilotPopupView, _ as CopilotKitCoreReactConfig, _n as getIntelligenceTurnAnchors, _t as ReactCustomMessageRendererPosition, a as A2UIMessageRendererOptions, an as DefaultCloseIcon, at as InterruptEvent, b as MemoryChanges, bn as IntelligenceIndicatorViewProps, bt as GenerateSandboxedUiArgsSchema, c as InspectorAnchor, cn as CopilotChatProps, ct as InterruptResolveFn, d as CopilotKitProvider, dn as AutoScrollMode, dt as ReactHumanInTheLoop, en as CopilotSidebarViewProps, et as useFrontendTool, f as CopilotKitProviderProps, fn as CopilotChatMessageView, ft as ReactFrontendTool, g as CopilotKitCoreReact, gn as IntelligenceIndicatorProps, gt as ReactCustomMessageRenderer, h as useCopilotKit, hn as IntelligenceIndicator, ht as useRenderCustomMessages, i as A2UIActionInterceptor, in as CopilotChatToggleButtonProps, it as InterruptCancelFn, j as LearnFromUserActionInCurrentThreadInput, jn as CopilotChatToolCallsView, jt as ɵrunMcpFollowUp, k as UseAttachmentsReturn, kn as CopilotChatAssistantMessage, kt as MCPAppsActivityType, l as SandboxFunctionsContext, ln as CopilotChatView, lt as ResumeEntry, m as CopilotKitContextValue, mn as INTELLIGENCE_TURN_HEAD, mt as ReactToolCallRenderer, nn as CopilotModalHeaderProps, nt as SandboxFunction, o as A2UIUserAction, on as DefaultOpenIcon, ot as InterruptHandlerProps, p as A2UIRecoveryRendererOptions, pn as CopilotChatMessageViewProps, pt as ReactActivityMessageRenderer, q as useCapabilities, qt as CopilotPopup, r as CopilotKitProps, rn as CopilotChatToggleButton, rt as Interrupt, s as createA2UIMessageRenderer, sn as CopilotChat, st as InterruptRenderProps, t as CopilotKit, tn as CopilotModalHeader, tt as useRenderActivityMessage, u as useSandboxFunctions, un as CopilotChatViewProps, ut as defineToolCallRenderer, v as CopilotKitCoreReactSubscriber, vn as IntelligenceIndicatorStatus, vt as useRenderToolCall, w as UseLearningContainersInCurrentThreadArgs, wn as CopilotChatSuggestionPillProps, wt as OpenGenerativeUIContentSchema, x as MemoryKind, xn as CopilotChatSuggestionView, xt as OpenGenerativeUIActivityRenderer, y as Memory, yn as IntelligenceIndicatorView, yt as GenerateSandboxedUiArgs, z as useMemories, zn as CopilotChatLabels, zt as CopilotChatAttachmentQueue } from "../copilotkit-
|
|
1
|
+
import { $ as useComponent, $t as CopilotSidebarView, A as useAttachments, An as CopilotChatAssistantMessageProps, At as ɵMcpFollowUpHost, B as UseInterruptConfig, Bn as useCopilotChatConfiguration, Bt as CopilotThreadsDrawer, C as NewMemory, Cn as CopilotChatSuggestionPill, Ct as OpenGenerativeUIContent, D as useLearningContainers, Dn as CopilotChatUserMessage, Dt as MCPAppsActivityContentSchema, E as UseLearningContainersArgs, En as CopilotChatReasoningMessageProps, Et as MCPAppsActivityContent, F as LearnFromUserActionResult, Fn as ToolsMenuItem, Ft as Attachment, G as JsonSerializable, Gt as UseThreadsResult, H as useConfigureSuggestions, Hn as AudioRecorderState, Ht as CopilotThreadsDrawerRowRenderer, I as UseLearnFromUserActionRecorder, In as CopilotChatConfigurationProvider, It as AttachmentModality, J as UseAgentUpdate, Jt as CopilotPopupProps, K as useAgentContext, Kt as useThreads, L as useLearnFromUserAction, Ln as CopilotChatConfigurationProviderProps, Lt as AttachmentsConfig, M as UseLearnFromUserActionInCurrentThreadRecorder, Mn as CopilotChatToolCallsViewProps, Mt as CopilotKitInspector, N as useLearnFromUserActionInCurrentThread, Nn as CopilotChatInput, Nt as CopilotKitInspectorProps, O as UseAttachmentsProps, On as CopilotChatUserMessageProps, Ot as MCPAppsActivityRenderer, P as LearnFromUserActionInput, Pn as CopilotChatInputProps, Pt as WildcardToolCallRender, Q as useRenderTool, Qt as CopilotPopupViewProps, R as UseMemoriesResult, Rn as CopilotChatConfigurationValue, Rt as CopilotChatAttachmentRenderer, S as MemoryScope, Sn as CopilotChatSuggestionViewProps, St as OpenGenerativeUIActivityType, T as useLearningContainersInCurrentThread, Tn as CopilotChatReasoningMessage, Tt as OpenGenerativeUIToolRenderer, U as useSuggestions, Un as CopilotChatAudioRecorder, Ut as Thread, V as useInterrupt, Vn as AudioRecorderError, Vt as CopilotThreadsDrawerProps, W as AgentContextInput, Wt as UseThreadsInput, X as useHumanInTheLoop, Xt as CopilotSidebarProps, Y as useAgent, Yt as CopilotSidebar, Z as useDefaultRenderTool, Zt as CopilotPopupView, _ as CopilotKitCoreReactConfig, _n as getIntelligenceTurnAnchors, _t as ReactCustomMessageRendererPosition, a as A2UIMessageRendererOptions, an as DefaultCloseIcon, at as InterruptEvent, b as MemoryChanges, bn as IntelligenceIndicatorViewProps, bt as GenerateSandboxedUiArgsSchema, c as InspectorAnchor, cn as CopilotChatProps, ct as InterruptResolveFn, d as CopilotKitProvider, dn as AutoScrollMode, dt as ReactHumanInTheLoop, en as CopilotSidebarViewProps, et as useFrontendTool, f as CopilotKitProviderProps, fn as CopilotChatMessageView, ft as ReactFrontendTool, g as CopilotKitCoreReact, gn as IntelligenceIndicatorProps, gt as ReactCustomMessageRenderer, h as useCopilotKit, hn as IntelligenceIndicator, ht as useRenderCustomMessages, i as A2UIActionInterceptor, in as CopilotChatToggleButtonProps, it as InterruptCancelFn, j as LearnFromUserActionInCurrentThreadInput, jn as CopilotChatToolCallsView, jt as ɵrunMcpFollowUp, k as UseAttachmentsReturn, kn as CopilotChatAssistantMessage, kt as MCPAppsActivityType, l as SandboxFunctionsContext, ln as CopilotChatView, lt as ResumeEntry, m as CopilotKitContextValue, mn as INTELLIGENCE_TURN_HEAD, mt as ReactToolCallRenderer, nn as CopilotModalHeaderProps, nt as SandboxFunction, o as A2UIUserAction, on as DefaultOpenIcon, ot as InterruptHandlerProps, p as A2UIRecoveryRendererOptions, pn as CopilotChatMessageViewProps, pt as ReactActivityMessageRenderer, q as useCapabilities, qt as CopilotPopup, r as CopilotKitProps, rn as CopilotChatToggleButton, rt as Interrupt, s as createA2UIMessageRenderer, sn as CopilotChat, st as InterruptRenderProps, t as CopilotKit, tn as CopilotModalHeader, tt as useRenderActivityMessage, u as useSandboxFunctions, un as CopilotChatViewProps, ut as defineToolCallRenderer, v as CopilotKitCoreReactSubscriber, vn as IntelligenceIndicatorStatus, vt as useRenderToolCall, w as UseLearningContainersInCurrentThreadArgs, wn as CopilotChatSuggestionPillProps, wt as OpenGenerativeUIContentSchema, x as MemoryKind, xn as CopilotChatSuggestionView, xt as OpenGenerativeUIActivityRenderer, y as Memory, yn as IntelligenceIndicatorView, yt as GenerateSandboxedUiArgs, z as useMemories, zn as CopilotChatLabels, zt as CopilotChatAttachmentQueue } from "../copilotkit-BE1n5tSI.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";
|
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 CopilotChatConfigurationProvider, B as CopilotChatAssistantMessage_default, C as CopilotModalHeader, Ct as CopilotKitInspector, D as CopilotChat, Dt as CopilotChatInput_default, E as DefaultOpenIcon, Et as CopilotKitCoreReact, 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, N as getIntelligenceTurnAnchors, O as CopilotChatView_default, Ot as AudioRecorderError, P as IntelligenceIndicatorView, Q as useAgentContext, R as CopilotChatUserMessage_default, S as CopilotSidebarView, St as ɵrunMcpFollowUp, T as DefaultCloseIcon, Tt as useCopilotKit, U as useLearningContainers, V as CopilotChatToolCallsView, W as useAttachments, X as useConfigureSuggestions, Y as useInterrupt, Z as useSuggestions, _ as WildcardToolCallRender, _t as SandboxFunctionsContext, at as useComponent, b as CopilotSidebar, bt as MCPAppsActivityRenderer, ct as useRenderCustomMessages, dt as createA2UIMessageRenderer, et as UseAgentUpdate, ft as GenerateSandboxedUiArgsSchema, gt as OpenGenerativeUIToolRenderer, ht as OpenGenerativeUIContentSchema, it as useRenderTool, j as INTELLIGENCE_TURN_HEAD, jt as useCopilotChatConfiguration, k as CopilotChatAttachmentQueue, kt as CopilotChatAudioRecorder, lt as CopilotKitProvider, mt as OpenGenerativeUIActivityType, nt as useHumanInTheLoop, ot as useFrontendTool, pt as OpenGenerativeUIActivityRenderer, q as useMemories, rt as useDefaultRenderTool, st as useRenderActivityMessage, t as CopilotKit, tt as useAgent, ut as defineToolCallRenderer, v as CopilotThreadsDrawer, vt as useSandboxFunctions, w as CopilotChatToggleButton, wt as useRenderToolCall, x as CopilotPopupView, xt as MCPAppsActivityType, y as CopilotPopup, yt as MCPAppsActivityContentSchema, z as CopilotChatAttachmentRenderer } from "../copilotkit-
|
|
3
|
+
import { $ as useCapabilities, A as CopilotChatMessageView, At as CopilotChatConfigurationProvider, B as CopilotChatAssistantMessage_default, C as CopilotModalHeader, Ct as CopilotKitInspector, D as CopilotChat, Dt as CopilotChatInput_default, E as DefaultOpenIcon, Et as CopilotKitCoreReact, 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, N as getIntelligenceTurnAnchors, O as CopilotChatView_default, Ot as AudioRecorderError, P as IntelligenceIndicatorView, Q as useAgentContext, R as CopilotChatUserMessage_default, S as CopilotSidebarView, St as ɵrunMcpFollowUp, T as DefaultCloseIcon, Tt as useCopilotKit, U as useLearningContainers, V as CopilotChatToolCallsView, W as useAttachments, X as useConfigureSuggestions, Y as useInterrupt, Z as useSuggestions, _ as WildcardToolCallRender, _t as SandboxFunctionsContext, at as useComponent, b as CopilotSidebar, bt as MCPAppsActivityRenderer, ct as useRenderCustomMessages, dt as createA2UIMessageRenderer, et as UseAgentUpdate, ft as GenerateSandboxedUiArgsSchema, gt as OpenGenerativeUIToolRenderer, ht as OpenGenerativeUIContentSchema, it as useRenderTool, j as INTELLIGENCE_TURN_HEAD, jt as useCopilotChatConfiguration, k as CopilotChatAttachmentQueue, kt as CopilotChatAudioRecorder, lt as CopilotKitProvider, mt as OpenGenerativeUIActivityType, nt as useHumanInTheLoop, ot as useFrontendTool, pt as OpenGenerativeUIActivityRenderer, q as useMemories, rt as useDefaultRenderTool, st as useRenderActivityMessage, t as CopilotKit, tt as useAgent, ut as defineToolCallRenderer, v as CopilotThreadsDrawer, vt as useSandboxFunctions, w as CopilotChatToggleButton, wt as useRenderToolCall, x as CopilotPopupView, xt as MCPAppsActivityType, y as CopilotPopup, yt as MCPAppsActivityContentSchema, z as CopilotChatAttachmentRenderer } from "../copilotkit-CN2JVeH3.mjs";
|
|
4
4
|
import "./index.css";
|
|
5
5
|
import { defaultTheme as a2uiDefaultTheme } from "@copilotkit/a2ui-renderer";
|
|
6
6
|
|
package/dist/v2/index.umd.js
CHANGED
|
@@ -4411,11 +4411,14 @@ window.parent.postMessage({jsonrpc:"2.0",method:"ui/notifications/sandbox-proxy-
|
|
|
4411
4411
|
const [, forceUpdate] = (0, react.useReducer)((x) => x + 1, 0);
|
|
4412
4412
|
const updateFlags = (0, react.useMemo)(() => updates ?? ALL_UPDATES, [JSON.stringify(updates)]);
|
|
4413
4413
|
const provisionalAgentCache = (0, react.useRef)(/* @__PURE__ */ new Map());
|
|
4414
|
-
const agent = (0, react.useMemo)(() => {
|
|
4414
|
+
const { agent, isReady } = (0, react.useMemo)(() => {
|
|
4415
4415
|
const existing = copilotkit.getAgent(resolvedAgentId);
|
|
4416
4416
|
if (existing) {
|
|
4417
4417
|
provisionalAgentCache.current.delete(resolvedAgentId);
|
|
4418
|
-
return
|
|
4418
|
+
return {
|
|
4419
|
+
agent: existing,
|
|
4420
|
+
isReady: true
|
|
4421
|
+
};
|
|
4419
4422
|
}
|
|
4420
4423
|
const isRuntimeConfigured = copilotkit.runtimeUrl !== void 0;
|
|
4421
4424
|
const status = copilotkit.runtimeConnectionStatus;
|
|
@@ -4423,7 +4426,10 @@ window.parent.postMessage({jsonrpc:"2.0",method:"ui/notifications/sandbox-proxy-
|
|
|
4423
4426
|
const cached = provisionalAgentCache.current.get(resolvedAgentId);
|
|
4424
4427
|
if (cached) {
|
|
4425
4428
|
copilotkit.applyHeadersToAgent(cached);
|
|
4426
|
-
return
|
|
4429
|
+
return {
|
|
4430
|
+
agent: cached,
|
|
4431
|
+
isReady: false
|
|
4432
|
+
};
|
|
4427
4433
|
}
|
|
4428
4434
|
const provisional = new _copilotkit_core.ProxiedCopilotRuntimeAgent({
|
|
4429
4435
|
runtimeUrl: copilotkit.runtimeUrl,
|
|
@@ -4433,13 +4439,19 @@ window.parent.postMessage({jsonrpc:"2.0",method:"ui/notifications/sandbox-proxy-
|
|
|
4433
4439
|
});
|
|
4434
4440
|
copilotkit.applyHeadersToAgent(provisional);
|
|
4435
4441
|
provisionalAgentCache.current.set(resolvedAgentId, provisional);
|
|
4436
|
-
return
|
|
4442
|
+
return {
|
|
4443
|
+
agent: provisional,
|
|
4444
|
+
isReady: false
|
|
4445
|
+
};
|
|
4437
4446
|
}
|
|
4438
4447
|
if (isRuntimeConfigured && status === _copilotkit_core.CopilotKitCoreRuntimeConnectionStatus.Error) {
|
|
4439
4448
|
const cached = provisionalAgentCache.current.get(resolvedAgentId);
|
|
4440
4449
|
if (cached) {
|
|
4441
4450
|
copilotkit.applyHeadersToAgent(cached);
|
|
4442
|
-
return
|
|
4451
|
+
return {
|
|
4452
|
+
agent: cached,
|
|
4453
|
+
isReady: false
|
|
4454
|
+
};
|
|
4443
4455
|
}
|
|
4444
4456
|
const provisional = new _copilotkit_core.ProxiedCopilotRuntimeAgent({
|
|
4445
4457
|
runtimeUrl: copilotkit.runtimeUrl,
|
|
@@ -4449,7 +4461,10 @@ window.parent.postMessage({jsonrpc:"2.0",method:"ui/notifications/sandbox-proxy-
|
|
|
4449
4461
|
});
|
|
4450
4462
|
copilotkit.applyHeadersToAgent(provisional);
|
|
4451
4463
|
provisionalAgentCache.current.set(resolvedAgentId, provisional);
|
|
4452
|
-
return
|
|
4464
|
+
return {
|
|
4465
|
+
agent: provisional,
|
|
4466
|
+
isReady: false
|
|
4467
|
+
};
|
|
4453
4468
|
}
|
|
4454
4469
|
const knownAgents = Object.keys(copilotkit.agents ?? {});
|
|
4455
4470
|
const runtimePart = isRuntimeConfigured ? `runtimeUrl=${copilotkit.runtimeUrl}` : "no runtimeUrl";
|
|
@@ -4510,7 +4525,10 @@ window.parent.postMessage({jsonrpc:"2.0",method:"ui/notifications/sandbox-proxy-
|
|
|
4510
4525
|
configThreadId,
|
|
4511
4526
|
configHasExplicitThreadId
|
|
4512
4527
|
]);
|
|
4513
|
-
return {
|
|
4528
|
+
return {
|
|
4529
|
+
agent,
|
|
4530
|
+
isReady
|
|
4531
|
+
};
|
|
4514
4532
|
}
|
|
4515
4533
|
|
|
4516
4534
|
//#endregion
|
|
@@ -4818,8 +4836,9 @@ window.parent.postMessage({jsonrpc:"2.0",method:"ui/notifications/sandbox-proxy-
|
|
|
4818
4836
|
const pendingRef = (0, react.useRef)(pending);
|
|
4819
4837
|
pendingRef.current = pending;
|
|
4820
4838
|
const [handlerResult, setHandlerResult] = (0, react.useState)(null);
|
|
4821
|
-
const
|
|
4839
|
+
const interruptStateRef = (0, react.useRef)(new _copilotkit_core.ɵInterruptState());
|
|
4822
4840
|
(0, react.useEffect)(() => {
|
|
4841
|
+
const interruptState = interruptStateRef.current;
|
|
4823
4842
|
let localLegacy = null;
|
|
4824
4843
|
let localStandard = null;
|
|
4825
4844
|
const subscription = agent.subscribe({
|
|
@@ -4835,106 +4854,111 @@ window.parent.postMessage({jsonrpc:"2.0",method:"ui/notifications/sandbox-proxy-
|
|
|
4835
4854
|
onRunStartedEvent: () => {
|
|
4836
4855
|
localLegacy = null;
|
|
4837
4856
|
localStandard = null;
|
|
4838
|
-
|
|
4857
|
+
interruptState.clear();
|
|
4839
4858
|
setPending(null);
|
|
4840
4859
|
},
|
|
4841
4860
|
onRunFinalized: () => {
|
|
4842
|
-
if (localStandard && localStandard.length > 0)
|
|
4843
|
-
|
|
4844
|
-
|
|
4845
|
-
})
|
|
4846
|
-
|
|
4847
|
-
|
|
4848
|
-
|
|
4849
|
-
});
|
|
4861
|
+
if (localStandard && localStandard.length > 0) {
|
|
4862
|
+
interruptState.setStandard(localStandard);
|
|
4863
|
+
setPending(interruptState.pending);
|
|
4864
|
+
} else if (localLegacy) {
|
|
4865
|
+
interruptState.setLegacy(localLegacy);
|
|
4866
|
+
setPending(interruptState.pending);
|
|
4867
|
+
}
|
|
4850
4868
|
localLegacy = null;
|
|
4851
4869
|
localStandard = null;
|
|
4852
4870
|
},
|
|
4853
4871
|
onRunFailed: () => {
|
|
4854
4872
|
localLegacy = null;
|
|
4855
4873
|
localStandard = null;
|
|
4856
|
-
|
|
4874
|
+
interruptState.clear();
|
|
4857
4875
|
setPending(null);
|
|
4858
4876
|
}
|
|
4859
4877
|
});
|
|
4860
|
-
return () =>
|
|
4878
|
+
return () => {
|
|
4879
|
+
subscription.unsubscribe();
|
|
4880
|
+
interruptState.clear();
|
|
4881
|
+
};
|
|
4861
4882
|
}, [agent]);
|
|
4862
|
-
const
|
|
4863
|
-
|
|
4864
|
-
|
|
4865
|
-
if (
|
|
4866
|
-
|
|
4867
|
-
|
|
4868
|
-
setPending(null);
|
|
4869
|
-
return;
|
|
4870
|
-
}
|
|
4871
|
-
const resume = (0, _ag_ui_client.buildResumeArray)(interrupts, responsesRef.current);
|
|
4872
|
-
for (const i of interrupts) {
|
|
4873
|
-
if (!i.toolCallId) continue;
|
|
4874
|
-
const response = responsesRef.current[i.id];
|
|
4875
|
-
const content = response.status === "cancelled" ? { status: "cancelled" } : response.payload ?? { status: "resolved" };
|
|
4876
|
-
agent.addMessage({
|
|
4877
|
-
id: (0, _ag_ui_client.randomUUID)(),
|
|
4878
|
-
role: "tool",
|
|
4879
|
-
toolCallId: i.toolCallId,
|
|
4880
|
-
content: JSON.stringify(content)
|
|
4881
|
-
});
|
|
4882
|
-
}
|
|
4883
|
-
responsesRef.current = {};
|
|
4884
|
-
try {
|
|
4883
|
+
const resolve = (0, react.useCallback)(async (payload, interruptId) => {
|
|
4884
|
+
const current = pendingRef.current;
|
|
4885
|
+
if (!current) return;
|
|
4886
|
+
if (current.kind === "standard" && current.interrupts.length > 1 && interruptId === void 0) console.warn(`[CopilotKit] useInterrupt: resolve()/cancel() called without an interruptId while ${current.interrupts.length} interrupts are open; defaulting to the first. Pass an interruptId to address a specific interrupt.`);
|
|
4887
|
+
const decision = interruptStateRef.current.resolve(payload, interruptId);
|
|
4888
|
+
if (decision.kind === "legacy-resume") try {
|
|
4885
4889
|
return await copilotkit.runAgent({
|
|
4886
4890
|
agent,
|
|
4887
|
-
|
|
4891
|
+
forwardedProps: { command: {
|
|
4892
|
+
resume: decision.payload,
|
|
4893
|
+
interruptEvent: decision.interruptValue
|
|
4894
|
+
} }
|
|
4888
4895
|
});
|
|
4889
4896
|
} catch (err) {
|
|
4890
4897
|
console.error("[CopilotKit] useInterrupt resolve: runAgent rejected; clearing pending + rethrowing", err);
|
|
4891
4898
|
setPending(null);
|
|
4892
4899
|
throw err;
|
|
4893
4900
|
}
|
|
4894
|
-
|
|
4895
|
-
|
|
4896
|
-
|
|
4897
|
-
|
|
4898
|
-
|
|
4901
|
+
if (decision.kind === "expired") {
|
|
4902
|
+
console.error(`[CopilotKit] useInterrupt: interrupt ${decision.interrupt.id} expired at ${decision.interrupt.expiresAt}; not resuming.`);
|
|
4903
|
+
interruptStateRef.current.clear();
|
|
4904
|
+
setPending(null);
|
|
4905
|
+
return;
|
|
4906
|
+
}
|
|
4907
|
+
if (decision.kind !== "resume") return;
|
|
4908
|
+
for (const toolResult of decision.toolResults) agent.addMessage({
|
|
4909
|
+
id: (0, _ag_ui_client.randomUUID)(),
|
|
4910
|
+
role: "tool",
|
|
4911
|
+
toolCallId: toolResult.toolCallId,
|
|
4912
|
+
content: toolResult.content
|
|
4913
|
+
});
|
|
4914
|
+
try {
|
|
4899
4915
|
return await copilotkit.runAgent({
|
|
4900
4916
|
agent,
|
|
4901
|
-
|
|
4902
|
-
resume: payload,
|
|
4903
|
-
interruptEvent: current.event.value
|
|
4904
|
-
} }
|
|
4917
|
+
resume: decision.resume
|
|
4905
4918
|
});
|
|
4906
4919
|
} catch (err) {
|
|
4907
4920
|
console.error("[CopilotKit] useInterrupt resolve: runAgent rejected; clearing pending + rethrowing", err);
|
|
4921
|
+
interruptStateRef.current.clear();
|
|
4908
4922
|
setPending(null);
|
|
4909
4923
|
throw err;
|
|
4910
4924
|
}
|
|
4911
|
-
|
|
4912
|
-
const id = interruptId ?? current.interrupts[0]?.id;
|
|
4913
|
-
if (!id) return;
|
|
4914
|
-
responsesRef.current[id] = {
|
|
4915
|
-
status: "resolved",
|
|
4916
|
-
payload
|
|
4917
|
-
};
|
|
4918
|
-
return submitStandardIfComplete(current.interrupts);
|
|
4919
|
-
}, [
|
|
4920
|
-
agent,
|
|
4921
|
-
copilotkit,
|
|
4922
|
-
submitStandardIfComplete
|
|
4923
|
-
]);
|
|
4925
|
+
}, [agent, copilotkit]);
|
|
4924
4926
|
const cancel = (0, react.useCallback)(async (interruptId) => {
|
|
4925
4927
|
const current = pendingRef.current;
|
|
4926
4928
|
if (!current) return;
|
|
4927
|
-
if (current.kind === "
|
|
4929
|
+
if (current.kind === "standard" && current.interrupts.length > 1 && interruptId === void 0) console.warn(`[CopilotKit] useInterrupt: resolve()/cancel() called without an interruptId while ${current.interrupts.length} interrupts are open; defaulting to the first. Pass an interruptId to address a specific interrupt.`);
|
|
4930
|
+
const decision = interruptStateRef.current.cancel(interruptId);
|
|
4931
|
+
if (decision.kind === "dismiss") {
|
|
4928
4932
|
console.warn("[CopilotKit] useInterrupt: cancel() is not supported for legacy on_interrupt interrupts; dismissing.");
|
|
4933
|
+
interruptStateRef.current.clear();
|
|
4929
4934
|
setPending(null);
|
|
4930
4935
|
return;
|
|
4931
4936
|
}
|
|
4932
|
-
if (
|
|
4933
|
-
|
|
4934
|
-
|
|
4935
|
-
|
|
4936
|
-
|
|
4937
|
-
|
|
4937
|
+
if (decision.kind === "expired") {
|
|
4938
|
+
console.error(`[CopilotKit] useInterrupt: interrupt ${decision.interrupt.id} expired at ${decision.interrupt.expiresAt}; not resuming.`);
|
|
4939
|
+
interruptStateRef.current.clear();
|
|
4940
|
+
setPending(null);
|
|
4941
|
+
return;
|
|
4942
|
+
}
|
|
4943
|
+
if (decision.kind !== "resume") return;
|
|
4944
|
+
for (const toolResult of decision.toolResults) agent.addMessage({
|
|
4945
|
+
id: (0, _ag_ui_client.randomUUID)(),
|
|
4946
|
+
role: "tool",
|
|
4947
|
+
toolCallId: toolResult.toolCallId,
|
|
4948
|
+
content: toolResult.content
|
|
4949
|
+
});
|
|
4950
|
+
try {
|
|
4951
|
+
return await copilotkit.runAgent({
|
|
4952
|
+
agent,
|
|
4953
|
+
resume: decision.resume
|
|
4954
|
+
});
|
|
4955
|
+
} catch (err) {
|
|
4956
|
+
console.error("[CopilotKit] useInterrupt resolve: runAgent rejected; clearing pending + rethrowing", err);
|
|
4957
|
+
interruptStateRef.current.clear();
|
|
4958
|
+
setPending(null);
|
|
4959
|
+
throw err;
|
|
4960
|
+
}
|
|
4961
|
+
}, [agent, copilotkit]);
|
|
4938
4962
|
const renderRef = (0, react.useRef)(config.render);
|
|
4939
4963
|
renderRef.current = config.render;
|
|
4940
4964
|
const enabledRef = (0, react.useRef)(config.enabled);
|
|
@@ -4976,7 +5000,7 @@ window.parent.postMessage({jsonrpc:"2.0",method:"ui/notifications/sandbox-proxy-
|
|
|
4976
5000
|
maybePromise = handler({
|
|
4977
5001
|
event: legacyEvent,
|
|
4978
5002
|
interrupt: pending.kind === "standard" ? pending.interrupts[0] : null,
|
|
4979
|
-
interrupts: pending.kind === "standard" ? pending.interrupts : [],
|
|
5003
|
+
interrupts: pending.kind === "standard" ? [...pending.interrupts] : [],
|
|
4980
5004
|
resolve: resolveRef.current,
|
|
4981
5005
|
cancel: cancelRef.current
|
|
4982
5006
|
});
|
|
@@ -5005,7 +5029,7 @@ window.parent.postMessage({jsonrpc:"2.0",method:"ui/notifications/sandbox-proxy-
|
|
|
5005
5029
|
return renderRef.current({
|
|
5006
5030
|
event: legacyEvent,
|
|
5007
5031
|
interrupt: pending.kind === "standard" ? pending.interrupts[0] : null,
|
|
5008
|
-
interrupts: pending.kind === "standard" ? pending.interrupts : [],
|
|
5032
|
+
interrupts: pending.kind === "standard" ? [...pending.interrupts] : [],
|
|
5009
5033
|
result: handlerResult,
|
|
5010
5034
|
resolve,
|
|
5011
5035
|
cancel
|