@copilotkit/react-core 1.72.0 → 1.72.1-canary.sp-longthread-perf
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-qK-Q3rmE.mjs → copilotkit-B2TZRWwp.mjs} +80 -26
- package/dist/copilotkit-B2TZRWwp.mjs.map +1 -0
- package/dist/{copilotkit-DsMFLrpY.d.mts → copilotkit-BRPxLJnI.d.mts} +3 -3
- package/dist/{copilotkit-DsMFLrpY.d.mts.map → copilotkit-BRPxLJnI.d.mts.map} +1 -1
- package/dist/{copilotkit-gopQXrTQ.cjs → copilotkit-BV7MguMm.cjs} +80 -26
- package/dist/copilotkit-BV7MguMm.cjs.map +1 -0
- package/dist/{copilotkit-DoHSqB_u.d.cts → copilotkit-D5fPO8hJ.d.cts} +3 -3
- package/dist/{copilotkit-DoHSqB_u.d.cts.map → copilotkit-D5fPO8hJ.d.cts.map} +1 -1
- 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 +9 -4
- package/dist/index.umd.js.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 +79 -25
- package/dist/v2/index.umd.js.map +1 -1
- package/package.json +9 -9
- package/dist/copilotkit-gopQXrTQ.cjs.map +0 -1
- package/dist/copilotkit-qK-Q3rmE.mjs.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-BV7MguMm.cjs');
|
|
5
5
|
require("./index.css");
|
|
6
6
|
let _copilotkit_a2ui_renderer = require("@copilotkit/a2ui-renderer");
|
|
7
7
|
let _copilotkit_mcp_apps_renderer_activity = require("@copilotkit/mcp-apps-renderer/activity");
|
package/dist/v2/index.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $ as useRenderTool, $t as CopilotPopupView, A as UseAttachmentsReturn, An as CopilotChatUserMessageProps, At as MCPAppsActivityRenderer, B as useMemories, Bn as CopilotChatConfigurationProviderProps, Bt as CopilotChatAttachmentRenderer, C as MemoryScope, Cn as CopilotChatSuggestionView, Ct as OpenGenerativeUIActivityRenderer, D as UseLearningContainersArgs, Dn as CopilotChatReasoningMessage, Dt as OpenGenerativeUIToolRenderer, E as useLearningContainersInCurrentThread, En as CopilotChatSuggestionPillProps, Et as OpenGenerativeUIContentSchema, F as LearnFromUserActionInput, Fn as CopilotChatToolCallsViewProps, Ft as CopilotKitInspectorProps, G as AgentContextInput, Gn as AudioRecorderState, Gt as Thread, H as useInterrupt, Hn as CopilotChatLabels, Ht as CopilotThreadsDrawer, I as LearnFromUserActionResult, In as CopilotChatInput, It as WildcardToolCallRender, J as useCapabilities, Jt as useThreads, K as JsonSerializable, Kn as CopilotChatAudioRecorder, Kt as UseThreadsInput, L as UseLearnFromUserActionRecorder, Ln as CopilotChatInputProps, Lt as Attachment, M as LearnFromUserActionInCurrentThreadInput, Mn as CopilotChatAssistantMessageProps, Mt as ɵMcpFollowUpHost, N as UseLearnFromUserActionInCurrentThreadRecorder, Nn as CopilotChatFeedbackMessage, Nt as ɵrunMcpFollowUp, O as useLearningContainers, On as CopilotChatReasoningMessageProps, Ot as MCPAppsActivityContent, P as useLearnFromUserActionInCurrentThread, Pn as CopilotChatToolCallsView, Pt as CopilotKitInspector, Q as useDefaultRenderTool, Qt as CopilotSidebarProps, R as useLearnFromUserAction, Rn as ToolsMenuItem, Rt as AttachmentModality, S as MemoryKind, Sn as IntelligenceIndicatorViewProps, St as GenerateSandboxedUiArgsSchema, T as UseLearningContainersInCurrentThreadArgs, Tn as CopilotChatSuggestionPill, Tt as OpenGenerativeUIContent, U as useConfigureSuggestions, Un as useCopilotChatConfiguration, Ut as CopilotThreadsDrawerProps, V as UseInterruptConfig, Vn as CopilotChatConfigurationValue, Vt as CopilotChatAttachmentQueue, W as useSuggestions, Wn as AudioRecorderError, Wt as CopilotThreadsDrawerRowRenderer, X as useAgent, Xt as CopilotPopupProps, Y as UseAgentUpdate, Yt as CopilotPopup, Z as useHumanInTheLoop, Zt as CopilotSidebar, _ as CopilotKitCoreReact, _n as IntelligenceIndicator, _t as useRenderCustomMessages, a as A2UIMessageRendererOptions, an as CopilotChatToggleButton, at as Interrupt, b as Memory, bn as IntelligenceIndicatorStatus, bt as useRenderToolCall, c as InspectorAnchor, cn as DefaultOpenIcon, ct as InterruptHandlerProps, d as CopilotKitProvider, dn as CopilotChatView, dt as ResumeEntry, en as CopilotPopupViewProps, et as useComponent, f as CopilotKitProviderProps, fn as CopilotChatViewProps, ft as defineToolCallRenderer, g as useLicenseContext, gn as INTELLIGENCE_TURN_HEAD, gt as ReactToolCallRenderer, h as useCopilotKit, hn as CopilotChatMessageViewProps, ht as ReactActivityMessageRenderer, i as A2UIActionInterceptor, in as CopilotModalHeaderProps, it as INTERRUPT_EVENT_NAME, j as useAttachments, jn as CopilotChatAssistantMessage, jt as MCPAppsActivityType, k as UseAttachmentsProps, kn as CopilotChatUserMessage, kt as MCPAppsActivityContentSchema, l as SandboxFunctionsContext, ln as CopilotChat, lt as InterruptRenderProps, m as CopilotKitContextValue, mn as CopilotChatMessageView, mt as ReactFrontendTool, nn as CopilotSidebarViewProps, nt as useRenderActivityMessage, o as A2UIUserAction, on as CopilotChatToggleButtonProps, ot as InterruptCancelFn, p as A2UIRecoveryRendererOptions, pn as AutoScrollMode, pt as ReactHumanInTheLoop, q as useAgentContext, qt as UseThreadsResult, r as CopilotKitProps, rn as CopilotModalHeader, rt as SandboxFunction, s as createA2UIMessageRenderer, sn as DefaultCloseIcon, st as InterruptEvent, t as CopilotKit, tn as CopilotSidebarView, tt as useFrontendTool, u as useSandboxFunctions, un as CopilotChatProps, ut as InterruptResolveFn, v as CopilotKitCoreReactConfig, vn as IntelligenceIndicatorProps, vt as ReactCustomMessageRenderer, w as NewMemory, wn as CopilotChatSuggestionViewProps, wt as OpenGenerativeUIActivityType, x as MemoryChanges, xn as IntelligenceIndicatorView, xt as GenerateSandboxedUiArgs, y as CopilotKitCoreReactSubscriber, yn as getIntelligenceTurnAnchors, yt as ReactCustomMessageRendererPosition, z as UseMemoriesResult, zn as CopilotChatConfigurationProvider, zt as AttachmentsConfig } from "../copilotkit-
|
|
1
|
+
import { $ as useRenderTool, $t as CopilotPopupView, A as UseAttachmentsReturn, An as CopilotChatUserMessageProps, At as MCPAppsActivityRenderer, B as useMemories, Bn as CopilotChatConfigurationProviderProps, Bt as CopilotChatAttachmentRenderer, C as MemoryScope, Cn as CopilotChatSuggestionView, Ct as OpenGenerativeUIActivityRenderer, D as UseLearningContainersArgs, Dn as CopilotChatReasoningMessage, Dt as OpenGenerativeUIToolRenderer, E as useLearningContainersInCurrentThread, En as CopilotChatSuggestionPillProps, Et as OpenGenerativeUIContentSchema, F as LearnFromUserActionInput, Fn as CopilotChatToolCallsViewProps, Ft as CopilotKitInspectorProps, G as AgentContextInput, Gn as AudioRecorderState, Gt as Thread, H as useInterrupt, Hn as CopilotChatLabels, Ht as CopilotThreadsDrawer, I as LearnFromUserActionResult, In as CopilotChatInput, It as WildcardToolCallRender, J as useCapabilities, Jt as useThreads, K as JsonSerializable, Kn as CopilotChatAudioRecorder, Kt as UseThreadsInput, L as UseLearnFromUserActionRecorder, Ln as CopilotChatInputProps, Lt as Attachment, M as LearnFromUserActionInCurrentThreadInput, Mn as CopilotChatAssistantMessageProps, Mt as ɵMcpFollowUpHost, N as UseLearnFromUserActionInCurrentThreadRecorder, Nn as CopilotChatFeedbackMessage, Nt as ɵrunMcpFollowUp, O as useLearningContainers, On as CopilotChatReasoningMessageProps, Ot as MCPAppsActivityContent, P as useLearnFromUserActionInCurrentThread, Pn as CopilotChatToolCallsView, Pt as CopilotKitInspector, Q as useDefaultRenderTool, Qt as CopilotSidebarProps, R as useLearnFromUserAction, Rn as ToolsMenuItem, Rt as AttachmentModality, S as MemoryKind, Sn as IntelligenceIndicatorViewProps, St as GenerateSandboxedUiArgsSchema, T as UseLearningContainersInCurrentThreadArgs, Tn as CopilotChatSuggestionPill, Tt as OpenGenerativeUIContent, U as useConfigureSuggestions, Un as useCopilotChatConfiguration, Ut as CopilotThreadsDrawerProps, V as UseInterruptConfig, Vn as CopilotChatConfigurationValue, Vt as CopilotChatAttachmentQueue, W as useSuggestions, Wn as AudioRecorderError, Wt as CopilotThreadsDrawerRowRenderer, X as useAgent, Xt as CopilotPopupProps, Y as UseAgentUpdate, Yt as CopilotPopup, Z as useHumanInTheLoop, Zt as CopilotSidebar, _ as CopilotKitCoreReact, _n as IntelligenceIndicator, _t as useRenderCustomMessages, a as A2UIMessageRendererOptions, an as CopilotChatToggleButton, at as Interrupt, b as Memory, bn as IntelligenceIndicatorStatus, bt as useRenderToolCall, c as InspectorAnchor, cn as DefaultOpenIcon, ct as InterruptHandlerProps, d as CopilotKitProvider, dn as CopilotChatView, dt as ResumeEntry, en as CopilotPopupViewProps, et as useComponent, f as CopilotKitProviderProps, fn as CopilotChatViewProps, ft as defineToolCallRenderer, g as useLicenseContext, gn as INTELLIGENCE_TURN_HEAD, gt as ReactToolCallRenderer, h as useCopilotKit, hn as CopilotChatMessageViewProps, ht as ReactActivityMessageRenderer, i as A2UIActionInterceptor, in as CopilotModalHeaderProps, it as INTERRUPT_EVENT_NAME, j as useAttachments, jn as CopilotChatAssistantMessage, jt as MCPAppsActivityType, k as UseAttachmentsProps, kn as CopilotChatUserMessage, kt as MCPAppsActivityContentSchema, l as SandboxFunctionsContext, ln as CopilotChat, lt as InterruptRenderProps, m as CopilotKitContextValue, mn as CopilotChatMessageView, mt as ReactFrontendTool, nn as CopilotSidebarViewProps, nt as useRenderActivityMessage, o as A2UIUserAction, on as CopilotChatToggleButtonProps, ot as InterruptCancelFn, p as A2UIRecoveryRendererOptions, pn as AutoScrollMode, pt as ReactHumanInTheLoop, q as useAgentContext, qt as UseThreadsResult, r as CopilotKitProps, rn as CopilotModalHeader, rt as SandboxFunction, s as createA2UIMessageRenderer, sn as DefaultCloseIcon, st as InterruptEvent, t as CopilotKit, tn as CopilotSidebarView, tt as useFrontendTool, u as useSandboxFunctions, un as CopilotChatProps, ut as InterruptResolveFn, v as CopilotKitCoreReactConfig, vn as IntelligenceIndicatorProps, vt as ReactCustomMessageRenderer, w as NewMemory, wn as CopilotChatSuggestionViewProps, wt as OpenGenerativeUIActivityType, x as MemoryChanges, xn as IntelligenceIndicatorView, xt as GenerateSandboxedUiArgs, y as CopilotKitCoreReactSubscriber, yn as getIntelligenceTurnAnchors, yt as ReactCustomMessageRendererPosition, z as UseMemoriesResult, zn as CopilotChatConfigurationProvider, zt as AttachmentsConfig } from "../copilotkit-D5fPO8hJ.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 useRenderTool, $t as CopilotPopupView, A as UseAttachmentsReturn, An as CopilotChatUserMessageProps, At as MCPAppsActivityRenderer, B as useMemories, Bn as CopilotChatConfigurationProviderProps, Bt as CopilotChatAttachmentRenderer, C as MemoryScope, Cn as CopilotChatSuggestionView, Ct as OpenGenerativeUIActivityRenderer, D as UseLearningContainersArgs, Dn as CopilotChatReasoningMessage, Dt as OpenGenerativeUIToolRenderer, E as useLearningContainersInCurrentThread, En as CopilotChatSuggestionPillProps, Et as OpenGenerativeUIContentSchema, F as LearnFromUserActionInput, Fn as CopilotChatToolCallsViewProps, Ft as CopilotKitInspectorProps, G as AgentContextInput, Gn as AudioRecorderState, Gt as Thread, H as useInterrupt, Hn as CopilotChatLabels, Ht as CopilotThreadsDrawer, I as LearnFromUserActionResult, In as CopilotChatInput, It as WildcardToolCallRender, J as useCapabilities, Jt as useThreads, K as JsonSerializable, Kn as CopilotChatAudioRecorder, Kt as UseThreadsInput, L as UseLearnFromUserActionRecorder, Ln as CopilotChatInputProps, Lt as Attachment, M as LearnFromUserActionInCurrentThreadInput, Mn as CopilotChatAssistantMessageProps, Mt as ɵMcpFollowUpHost, N as UseLearnFromUserActionInCurrentThreadRecorder, Nn as CopilotChatFeedbackMessage, Nt as ɵrunMcpFollowUp, O as useLearningContainers, On as CopilotChatReasoningMessageProps, Ot as MCPAppsActivityContent, P as useLearnFromUserActionInCurrentThread, Pn as CopilotChatToolCallsView, Pt as CopilotKitInspector, Q as useDefaultRenderTool, Qt as CopilotSidebarProps, R as useLearnFromUserAction, Rn as ToolsMenuItem, Rt as AttachmentModality, S as MemoryKind, Sn as IntelligenceIndicatorViewProps, St as GenerateSandboxedUiArgsSchema, T as UseLearningContainersInCurrentThreadArgs, Tn as CopilotChatSuggestionPill, Tt as OpenGenerativeUIContent, U as useConfigureSuggestions, Un as useCopilotChatConfiguration, Ut as CopilotThreadsDrawerProps, V as UseInterruptConfig, Vn as CopilotChatConfigurationValue, Vt as CopilotChatAttachmentQueue, W as useSuggestions, Wn as AudioRecorderError, Wt as CopilotThreadsDrawerRowRenderer, X as useAgent, Xt as CopilotPopupProps, Y as UseAgentUpdate, Yt as CopilotPopup, Z as useHumanInTheLoop, Zt as CopilotSidebar, _ as useCopilotKit, _n as IntelligenceIndicator, _t as useRenderCustomMessages, a as A2UIMessageRendererOptions, an as CopilotChatToggleButton, at as Interrupt, b as Memory, bn as IntelligenceIndicatorStatus, bt as useRenderToolCall, c as CopilotKitCoreReact, cn as DefaultOpenIcon, ct as InterruptHandlerProps, d as InspectorAnchor, dn as CopilotChatView, dt as ResumeEntry, en as CopilotPopupViewProps, et as useComponent, f as SandboxFunctionsContext, fn as CopilotChatViewProps, ft as defineToolCallRenderer, g as CopilotKitProviderProps, gn as INTELLIGENCE_TURN_HEAD, gt as ReactToolCallRenderer, h as CopilotKitProvider, hn as CopilotChatMessageViewProps, ht as ReactActivityMessageRenderer, i as A2UIActionInterceptor, in as CopilotModalHeaderProps, it as INTERRUPT_EVENT_NAME, j as useAttachments, jn as CopilotChatAssistantMessage, jt as MCPAppsActivityType, k as UseAttachmentsProps, kn as CopilotChatUserMessage, kt as MCPAppsActivityContentSchema, l as CopilotKitCoreReactConfig, ln as CopilotChat, lt as InterruptRenderProps, m as CopilotKitContextValue, mn as CopilotChatMessageView, mt as ReactFrontendTool, nn as CopilotSidebarViewProps, nt as useRenderActivityMessage, o as A2UIUserAction, on as CopilotChatToggleButtonProps, ot as InterruptCancelFn, p as useSandboxFunctions, pn as AutoScrollMode, pt as ReactHumanInTheLoop, q as useAgentContext, qt as UseThreadsResult, r as CopilotKitProps, rn as CopilotModalHeader, rt as SandboxFunction, s as createA2UIMessageRenderer, sn as DefaultCloseIcon, st as InterruptEvent, t as CopilotKit, tn as CopilotSidebarView, tt as useFrontendTool, u as CopilotKitCoreReactSubscriber, un as CopilotChatProps, ut as InterruptResolveFn, v as useLicenseContext, vn as IntelligenceIndicatorProps, vt as ReactCustomMessageRenderer, w as NewMemory, wn as CopilotChatSuggestionViewProps, wt as OpenGenerativeUIActivityType, x as MemoryChanges, xn as IntelligenceIndicatorView, xt as GenerateSandboxedUiArgs, y as A2UIRecoveryRendererOptions, yn as getIntelligenceTurnAnchors, yt as ReactCustomMessageRendererPosition, z as UseMemoriesResult, zn as CopilotChatConfigurationProvider, zt as AttachmentsConfig } from "../copilotkit-
|
|
1
|
+
import { $ as useRenderTool, $t as CopilotPopupView, A as UseAttachmentsReturn, An as CopilotChatUserMessageProps, At as MCPAppsActivityRenderer, B as useMemories, Bn as CopilotChatConfigurationProviderProps, Bt as CopilotChatAttachmentRenderer, C as MemoryScope, Cn as CopilotChatSuggestionView, Ct as OpenGenerativeUIActivityRenderer, D as UseLearningContainersArgs, Dn as CopilotChatReasoningMessage, Dt as OpenGenerativeUIToolRenderer, E as useLearningContainersInCurrentThread, En as CopilotChatSuggestionPillProps, Et as OpenGenerativeUIContentSchema, F as LearnFromUserActionInput, Fn as CopilotChatToolCallsViewProps, Ft as CopilotKitInspectorProps, G as AgentContextInput, Gn as AudioRecorderState, Gt as Thread, H as useInterrupt, Hn as CopilotChatLabels, Ht as CopilotThreadsDrawer, I as LearnFromUserActionResult, In as CopilotChatInput, It as WildcardToolCallRender, J as useCapabilities, Jt as useThreads, K as JsonSerializable, Kn as CopilotChatAudioRecorder, Kt as UseThreadsInput, L as UseLearnFromUserActionRecorder, Ln as CopilotChatInputProps, Lt as Attachment, M as LearnFromUserActionInCurrentThreadInput, Mn as CopilotChatAssistantMessageProps, Mt as ɵMcpFollowUpHost, N as UseLearnFromUserActionInCurrentThreadRecorder, Nn as CopilotChatFeedbackMessage, Nt as ɵrunMcpFollowUp, O as useLearningContainers, On as CopilotChatReasoningMessageProps, Ot as MCPAppsActivityContent, P as useLearnFromUserActionInCurrentThread, Pn as CopilotChatToolCallsView, Pt as CopilotKitInspector, Q as useDefaultRenderTool, Qt as CopilotSidebarProps, R as useLearnFromUserAction, Rn as ToolsMenuItem, Rt as AttachmentModality, S as MemoryKind, Sn as IntelligenceIndicatorViewProps, St as GenerateSandboxedUiArgsSchema, T as UseLearningContainersInCurrentThreadArgs, Tn as CopilotChatSuggestionPill, Tt as OpenGenerativeUIContent, U as useConfigureSuggestions, Un as useCopilotChatConfiguration, Ut as CopilotThreadsDrawerProps, V as UseInterruptConfig, Vn as CopilotChatConfigurationValue, Vt as CopilotChatAttachmentQueue, W as useSuggestions, Wn as AudioRecorderError, Wt as CopilotThreadsDrawerRowRenderer, X as useAgent, Xt as CopilotPopupProps, Y as UseAgentUpdate, Yt as CopilotPopup, Z as useHumanInTheLoop, Zt as CopilotSidebar, _ as useCopilotKit, _n as IntelligenceIndicator, _t as useRenderCustomMessages, a as A2UIMessageRendererOptions, an as CopilotChatToggleButton, at as Interrupt, b as Memory, bn as IntelligenceIndicatorStatus, bt as useRenderToolCall, c as CopilotKitCoreReact, cn as DefaultOpenIcon, ct as InterruptHandlerProps, d as InspectorAnchor, dn as CopilotChatView, dt as ResumeEntry, en as CopilotPopupViewProps, et as useComponent, f as SandboxFunctionsContext, fn as CopilotChatViewProps, ft as defineToolCallRenderer, g as CopilotKitProviderProps, gn as INTELLIGENCE_TURN_HEAD, gt as ReactToolCallRenderer, h as CopilotKitProvider, hn as CopilotChatMessageViewProps, ht as ReactActivityMessageRenderer, i as A2UIActionInterceptor, in as CopilotModalHeaderProps, it as INTERRUPT_EVENT_NAME, j as useAttachments, jn as CopilotChatAssistantMessage, jt as MCPAppsActivityType, k as UseAttachmentsProps, kn as CopilotChatUserMessage, kt as MCPAppsActivityContentSchema, l as CopilotKitCoreReactConfig, ln as CopilotChat, lt as InterruptRenderProps, m as CopilotKitContextValue, mn as CopilotChatMessageView, mt as ReactFrontendTool, nn as CopilotSidebarViewProps, nt as useRenderActivityMessage, o as A2UIUserAction, on as CopilotChatToggleButtonProps, ot as InterruptCancelFn, p as useSandboxFunctions, pn as AutoScrollMode, pt as ReactHumanInTheLoop, q as useAgentContext, qt as UseThreadsResult, r as CopilotKitProps, rn as CopilotModalHeader, rt as SandboxFunction, s as createA2UIMessageRenderer, sn as DefaultCloseIcon, st as InterruptEvent, t as CopilotKit, tn as CopilotSidebarView, tt as useFrontendTool, u as CopilotKitCoreReactSubscriber, un as CopilotChatProps, ut as InterruptResolveFn, v as useLicenseContext, vn as IntelligenceIndicatorProps, vt as ReactCustomMessageRenderer, w as NewMemory, wn as CopilotChatSuggestionViewProps, wt as OpenGenerativeUIActivityType, x as MemoryChanges, xn as IntelligenceIndicatorView, xt as GenerateSandboxedUiArgs, y as A2UIRecoveryRendererOptions, yn as getIntelligenceTurnAnchors, yt as ReactCustomMessageRendererPosition, z as UseMemoriesResult, zn as CopilotChatConfigurationProvider, zt as AttachmentsConfig } from "../copilotkit-BRPxLJnI.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 useAgentContext, A as CopilotChatMessageView, At as AudioRecorderError, B as CopilotChatAssistantMessage_default, C as CopilotModalHeader, Ct as MCPAppsActivityContentSchema, D as CopilotChat, Dt as CopilotKitInspector, E as DefaultOpenIcon, Et as ɵrunMcpFollowUp, 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 CopilotChatConfigurationProvider, N as getIntelligenceTurnAnchors, Nt as useCopilotChatConfiguration, O as CopilotChatView_default, Ot as useRenderToolCall, P as IntelligenceIndicatorView, Q as useSuggestions, R as CopilotChatUserMessage_default, S as CopilotSidebarView, St as useSandboxFunctions, T as DefaultCloseIcon, Tt as MCPAppsActivityType, U as useLearningContainers, V as CopilotChatToolCallsView, W as useAttachments, X as INTERRUPT_EVENT_NAME, Y as useInterrupt, Z as useConfigureSuggestions, _ as WildcardToolCallRender, _t as OpenGenerativeUIActivityRenderer, at as useRenderTool, b as CopilotSidebar, bt as OpenGenerativeUIToolRenderer, ct as useRenderActivityMessage, dt as useCopilotKit, et as useCapabilities, ft as useLicenseContext, gt as GenerateSandboxedUiArgsSchema, ht as createA2UIMessageRenderer, it as useDefaultRenderTool, j as INTELLIGENCE_TURN_HEAD, jt as CopilotChatAudioRecorder, k as CopilotChatAttachmentQueue, kt as CopilotChatInput_default, lt as useRenderCustomMessages, mt as defineToolCallRenderer, nt as useAgent, ot as useComponent, pt as CopilotKitCoreReact, q as useMemories, rt as useHumanInTheLoop, st as useFrontendTool, t as CopilotKit, tt as UseAgentUpdate, ut as CopilotKitProvider, v as CopilotThreadsDrawer, vt as OpenGenerativeUIActivityType, w as CopilotChatToggleButton, wt as MCPAppsActivityRenderer, x as CopilotPopupView, xt as SandboxFunctionsContext, y as CopilotPopup, yt as OpenGenerativeUIContentSchema, z as CopilotChatAttachmentRenderer } from "../copilotkit-
|
|
3
|
+
import { $ as useAgentContext, A as CopilotChatMessageView, At as AudioRecorderError, B as CopilotChatAssistantMessage_default, C as CopilotModalHeader, Ct as MCPAppsActivityContentSchema, D as CopilotChat, Dt as CopilotKitInspector, E as DefaultOpenIcon, Et as ɵrunMcpFollowUp, 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 CopilotChatConfigurationProvider, N as getIntelligenceTurnAnchors, Nt as useCopilotChatConfiguration, O as CopilotChatView_default, Ot as useRenderToolCall, P as IntelligenceIndicatorView, Q as useSuggestions, R as CopilotChatUserMessage_default, S as CopilotSidebarView, St as useSandboxFunctions, T as DefaultCloseIcon, Tt as MCPAppsActivityType, U as useLearningContainers, V as CopilotChatToolCallsView, W as useAttachments, X as INTERRUPT_EVENT_NAME, Y as useInterrupt, Z as useConfigureSuggestions, _ as WildcardToolCallRender, _t as OpenGenerativeUIActivityRenderer, at as useRenderTool, b as CopilotSidebar, bt as OpenGenerativeUIToolRenderer, ct as useRenderActivityMessage, dt as useCopilotKit, et as useCapabilities, ft as useLicenseContext, gt as GenerateSandboxedUiArgsSchema, ht as createA2UIMessageRenderer, it as useDefaultRenderTool, j as INTELLIGENCE_TURN_HEAD, jt as CopilotChatAudioRecorder, k as CopilotChatAttachmentQueue, kt as CopilotChatInput_default, lt as useRenderCustomMessages, mt as defineToolCallRenderer, nt as useAgent, ot as useComponent, pt as CopilotKitCoreReact, q as useMemories, rt as useHumanInTheLoop, st as useFrontendTool, t as CopilotKit, tt as UseAgentUpdate, ut as CopilotKitProvider, v as CopilotThreadsDrawer, vt as OpenGenerativeUIActivityType, w as CopilotChatToggleButton, wt as MCPAppsActivityRenderer, x as CopilotPopupView, xt as SandboxFunctionsContext, y as CopilotPopup, yt as OpenGenerativeUIContentSchema, z as CopilotChatAttachmentRenderer } from "../copilotkit-B2TZRWwp.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
|
@@ -3871,8 +3871,8 @@ _radix_ui_react_dropdown_menu = __toESM(_radix_ui_react_dropdown_menu);
|
|
|
3871
3871
|
if (aHasAgent === (b.agentId !== void 0)) return 0;
|
|
3872
3872
|
return aHasAgent ? -1 : 1;
|
|
3873
3873
|
});
|
|
3874
|
+
if (!customMessageRenderers.length) return null;
|
|
3874
3875
|
return function(params) {
|
|
3875
|
-
if (!customMessageRenderers.length) return null;
|
|
3876
3876
|
const { message, position } = params;
|
|
3877
3877
|
const resolvedRunId = copilotkit.getRunIdForMessage(agentId, threadId, message.id) ?? copilotkit.getRunIdsForThread(agentId, threadId).slice(-1)[0];
|
|
3878
3878
|
const runId = resolvedRunId ?? `missing-run-id:${message.id}`;
|
|
@@ -7045,6 +7045,32 @@ _radix_ui_react_dropdown_menu = __toESM(_radix_ui_react_dropdown_menu);
|
|
|
7045
7045
|
*/
|
|
7046
7046
|
const ScrollElementContext = react.default.createContext(null);
|
|
7047
7047
|
|
|
7048
|
+
//#endregion
|
|
7049
|
+
//#region src/v2/components/chat/scroll-pinned-context.ts
|
|
7050
|
+
/**
|
|
7051
|
+
* True while the pin-to-bottom behaviour is actively following the bottom of
|
|
7052
|
+
* the thread — i.e. `use-stick-to-bottom` will animate the scroll position to
|
|
7053
|
+
* the bottom the next time the content grows.
|
|
7054
|
+
*
|
|
7055
|
+
* Only CopilotChatView's pin-to-bottom branch provides this. The other scroll
|
|
7056
|
+
* modes leave it `false`, which is correct: nothing else writes the scroll
|
|
7057
|
+
* position on its own, so no one is competing with the virtualizer.
|
|
7058
|
+
*
|
|
7059
|
+
* Why this exists: the virtualizer and `use-stick-to-bottom` both write
|
|
7060
|
+
* `scrollTop` on the same element. The virtualizer writes it to compensate
|
|
7061
|
+
* when a row above the viewport turns out taller than its estimate, so that
|
|
7062
|
+
* what the reader is looking at does not shift. That compensation is essential
|
|
7063
|
+
* while the reader is scrolled up — and pointless while pinned to the bottom,
|
|
7064
|
+
* because the pin is about to move the scroll position anyway. Worse than
|
|
7065
|
+
* pointless: the compensation changes the virtual container's height, the pin
|
|
7066
|
+
* reads that as content growth and animates, the animation brings unmeasured
|
|
7067
|
+
* rows into view, they measure, and the two keep shoving each other.
|
|
7068
|
+
*
|
|
7069
|
+
* Consumed by CopilotChatMessageView to stand the virtualizer down while the
|
|
7070
|
+
* pin owns the scroll position.
|
|
7071
|
+
*/
|
|
7072
|
+
const ScrollPinnedContext = react.default.createContext(false);
|
|
7073
|
+
|
|
7048
7074
|
//#endregion
|
|
7049
7075
|
//#region src/v2/components/intelligence-indicator/IntelligenceIndicatorView.tsx
|
|
7050
7076
|
/**
|
|
@@ -7510,6 +7536,7 @@ _radix_ui_react_dropdown_menu = __toESM(_radix_ui_react_dropdown_menu);
|
|
|
7510
7536
|
}
|
|
7511
7537
|
const VIRTUALIZE_THRESHOLD = 50;
|
|
7512
7538
|
function CopilotChatMessageView({ messages = [], assistantMessage, userMessage, reasoningMessage, cursor, intelligenceIndicator, isRunning = false, children, className, ...props }) {
|
|
7539
|
+
const isPinnedToBottom = (0, react.useContext)(ScrollPinnedContext);
|
|
7513
7540
|
const renderCustomMessage = useRenderCustomMessages();
|
|
7514
7541
|
const { renderActivityMessage } = useRenderActivityMessage();
|
|
7515
7542
|
const { copilotkit } = useCopilotKit();
|
|
@@ -7575,17 +7602,36 @@ _radix_ui_react_dropdown_menu = __toESM(_radix_ui_react_dropdown_menu);
|
|
|
7575
7602
|
if (process.env.NODE_ENV !== "production" && scrollElementFromCtx && scrollElementFromCtx.clientHeight === 0) console.warn("[CopilotKit] Chat scroll container has clientHeight=0 — virtualization disabled. Ensure the chat is rendered in a visible container with a non-zero height.");
|
|
7576
7603
|
}, [scrollElementFromCtx]);
|
|
7577
7604
|
const shouldVirtualize = !!scrollElement && !children && deduplicatedMessages.length > VIRTUALIZE_THRESHOLD;
|
|
7605
|
+
const measuredRef = react.default.useRef({
|
|
7606
|
+
count: 0,
|
|
7607
|
+
total: 0
|
|
7608
|
+
});
|
|
7609
|
+
const isPinnedToBottomRef = react.default.useRef(isPinnedToBottom);
|
|
7610
|
+
const shouldAdjustScrollOnResize = react.default.useCallback(() => !isPinnedToBottomRef.current, []);
|
|
7611
|
+
const estimateRowSize = react.default.useCallback(() => {
|
|
7612
|
+
const { count, total } = measuredRef.current;
|
|
7613
|
+
return count > 0 ? Math.max(1, Math.round(total / count)) : 100;
|
|
7614
|
+
}, []);
|
|
7578
7615
|
const virtualizer = (0, _tanstack_react_virtual.useVirtualizer)({
|
|
7579
7616
|
count: shouldVirtualize ? deduplicatedMessages.length : 0,
|
|
7580
7617
|
getScrollElement: () => scrollElement,
|
|
7581
|
-
estimateSize:
|
|
7618
|
+
estimateSize: estimateRowSize,
|
|
7582
7619
|
overscan: 5,
|
|
7583
|
-
measureElement: (el) =>
|
|
7620
|
+
measureElement: (el) => {
|
|
7621
|
+
const height = el?.getBoundingClientRect().height ?? 0;
|
|
7622
|
+
if (height > 0) {
|
|
7623
|
+
measuredRef.current.count += 1;
|
|
7624
|
+
measuredRef.current.total += height;
|
|
7625
|
+
}
|
|
7626
|
+
return height;
|
|
7627
|
+
},
|
|
7584
7628
|
initialRect: {
|
|
7585
7629
|
width: 0,
|
|
7586
7630
|
height: 600
|
|
7587
7631
|
}
|
|
7588
7632
|
});
|
|
7633
|
+
isPinnedToBottomRef.current = isPinnedToBottom;
|
|
7634
|
+
virtualizer.shouldAdjustScrollPositionOnItemSizeChange = shouldAdjustScrollOnResize;
|
|
7589
7635
|
const firstMessageId = deduplicatedMessages[0]?.id;
|
|
7590
7636
|
(0, react.useLayoutEffect)(() => {
|
|
7591
7637
|
if (!shouldVirtualize || !deduplicatedMessages.length) return;
|
|
@@ -7594,7 +7640,7 @@ _radix_ui_react_dropdown_menu = __toESM(_radix_ui_react_dropdown_menu);
|
|
|
7594
7640
|
const intelligenceTurnAnchors = (0, react.useMemo)(() => getIntelligenceTurnAnchors(deduplicatedMessages), [deduplicatedMessages]);
|
|
7595
7641
|
const renderMessageBlock = (message) => {
|
|
7596
7642
|
const elements = [];
|
|
7597
|
-
const stateSnapshot = getStateSnapshotForMessage(message.id);
|
|
7643
|
+
const stateSnapshot = renderCustomMessage ? getStateSnapshotForMessage(message.id) : void 0;
|
|
7598
7644
|
if (renderCustomMessage) elements.push(/* @__PURE__ */ (0, react_jsx_runtime.jsx)(MemoizedCustomMessage, {
|
|
7599
7645
|
message,
|
|
7600
7646
|
position: "before",
|
|
@@ -8238,25 +8284,28 @@ _radix_ui_react_dropdown_menu = __toESM(_radix_ui_react_dropdown_menu);
|
|
|
8238
8284
|
const BoundFeather = renderSlot(feather, CopilotChatView.Feather, {});
|
|
8239
8285
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ScrollElementContext.Provider, {
|
|
8240
8286
|
value: scrollEl,
|
|
8241
|
-
children: /* @__PURE__ */ (0, react_jsx_runtime.
|
|
8242
|
-
|
|
8243
|
-
|
|
8244
|
-
|
|
8245
|
-
|
|
8246
|
-
|
|
8247
|
-
|
|
8248
|
-
|
|
8249
|
-
|
|
8250
|
-
children
|
|
8287
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ScrollPinnedContext.Provider, {
|
|
8288
|
+
value: isAtBottom,
|
|
8289
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [
|
|
8290
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(use_stick_to_bottom.StickToBottom.Content, {
|
|
8291
|
+
className: "cpk:overflow-y-auto cpk:overflow-x-hidden",
|
|
8292
|
+
style: {
|
|
8293
|
+
flex: "1 1 0%",
|
|
8294
|
+
minHeight: 0
|
|
8295
|
+
},
|
|
8296
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
8297
|
+
className: "cpk:px-4 cpk:@3xl:px-0 cpk:[div[data-sidebar-chat]_&]:px-8 cpk:[div[data-popup-chat]_&]:px-6",
|
|
8298
|
+
children
|
|
8299
|
+
})
|
|
8300
|
+
}),
|
|
8301
|
+
BoundFeather,
|
|
8302
|
+
!isAtBottom && !isResizing && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
8303
|
+
className: "cpk:absolute cpk:inset-x-0 cpk:flex cpk:justify-center cpk:z-30 cpk:pointer-events-none",
|
|
8304
|
+
style: { bottom: `${inputContainerHeight + SCROLL_BUTTON_OFFSET}px` },
|
|
8305
|
+
children: renderSlot(scrollToBottomButton, CopilotChatView.ScrollToBottomButton, { onClick: () => scrollToBottom() })
|
|
8251
8306
|
})
|
|
8252
|
-
})
|
|
8253
|
-
|
|
8254
|
-
!isAtBottom && !isResizing && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
8255
|
-
className: "cpk:absolute cpk:inset-x-0 cpk:flex cpk:justify-center cpk:z-30 cpk:pointer-events-none",
|
|
8256
|
-
style: { bottom: `${inputContainerHeight + SCROLL_BUTTON_OFFSET}px` },
|
|
8257
|
-
children: renderSlot(scrollToBottomButton, CopilotChatView.ScrollToBottomButton, { onClick: () => scrollToBottom() })
|
|
8258
|
-
})
|
|
8259
|
-
] })
|
|
8307
|
+
] })
|
|
8308
|
+
})
|
|
8260
8309
|
});
|
|
8261
8310
|
};
|
|
8262
8311
|
const PinToSendScrollContainer = ({ children, scrollRef, contentRef, scrollToBottom, scrollToBottomButton, feather, inputContainerHeight, isResizing, nonAutoScrollEl, nonAutoScrollRefCallback, showScrollButton, className, ...props }) => {
|
|
@@ -11876,6 +11925,7 @@ _radix_ui_react_dropdown_menu = __toESM(_radix_ui_react_dropdown_menu);
|
|
|
11876
11925
|
}
|
|
11877
11926
|
function CopilotKitInternal(cpkProps) {
|
|
11878
11927
|
const { children, ...props } = cpkProps;
|
|
11928
|
+
const { copilotkit } = useCopilotKit();
|
|
11879
11929
|
/**
|
|
11880
11930
|
* This will throw an error if the props are invalid.
|
|
11881
11931
|
*/
|
|
@@ -11911,10 +11961,14 @@ _radix_ui_react_dropdown_menu = __toESM(_radix_ui_react_dropdown_menu);
|
|
|
11911
11961
|
});
|
|
11912
11962
|
}, []);
|
|
11913
11963
|
const getContextString = (0, react.useCallback)((documents, categories) => {
|
|
11914
|
-
|
|
11964
|
+
const documentsString = documents.map((document) => {
|
|
11915
11965
|
return `${document.name} (${document.sourceApplication}):\n${document.getContents()}`;
|
|
11916
|
-
}).join("\n\n")
|
|
11917
|
-
|
|
11966
|
+
}).join("\n\n");
|
|
11967
|
+
const nonDocumentStrings = printTree(categories);
|
|
11968
|
+
const readableContextString = copilotkit.getContextForAgent().map(({ description, value }) => `${description}:\n${value}`).join("\n\n");
|
|
11969
|
+
const existingContextString = `${documentsString}\n\n${nonDocumentStrings}`;
|
|
11970
|
+
return readableContextString ? `${existingContextString}\n\n${readableContextString}` : existingContextString;
|
|
11971
|
+
}, [copilotkit, printTree]);
|
|
11918
11972
|
const addContext = (0, react.useCallback)((context, parentId, categories = defaultCopilotContextCategories) => {
|
|
11919
11973
|
return addElement(context, categories, parentId);
|
|
11920
11974
|
}, [addElement]);
|