@copilotkit/react-core 1.69.3 → 1.70.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-JdHy0xdu.mjs → copilotkit-B7aFKfQR.mjs} +65 -21
- package/dist/copilotkit-B7aFKfQR.mjs.map +1 -0
- package/dist/{copilotkit-BPeh62mW.cjs → copilotkit-BE76j111.cjs} +70 -20
- package/dist/copilotkit-BE76j111.cjs.map +1 -0
- package/dist/{copilotkit-CrNUgJiq.d.cts → copilotkit-BuzP0VeG.d.cts} +31 -4
- package/dist/copilotkit-BuzP0VeG.d.cts.map +1 -0
- package/dist/{copilotkit-DgO31tBq.d.mts → copilotkit-CbZGwElm.d.mts} +31 -4
- package/dist/copilotkit-CbZGwElm.d.mts.map +1 -0
- package/dist/index.cjs +93 -21
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +17 -2
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.mts +17 -2
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +93 -21
- package/dist/index.mjs.map +1 -1
- package/dist/index.umd.js +133 -32
- package/dist/index.umd.js.map +1 -1
- package/dist/v2/headless.cjs +14 -7
- package/dist/v2/headless.cjs.map +1 -1
- package/dist/v2/headless.d.cts.map +1 -1
- package/dist/v2/headless.d.mts.map +1 -1
- package/dist/v2/headless.mjs +14 -7
- package/dist/v2/headless.mjs.map +1 -1
- package/dist/v2/index.cjs +2 -1
- 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 +64 -19
- package/dist/v2/index.umd.js.map +1 -1
- package/package.json +9 -9
- package/skills/react-core/SKILL.md +1 -1
- package/dist/copilotkit-BPeh62mW.cjs.map +0 -1
- package/dist/copilotkit-CrNUgJiq.d.cts.map +0 -1
- package/dist/copilotkit-DgO31tBq.d.mts.map +0 -1
- package/dist/copilotkit-JdHy0xdu.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-BE76j111.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");
|
|
@@ -56,6 +56,7 @@ Object.defineProperty(exports, 'CopilotSidebarView', {
|
|
|
56
56
|
exports.CopilotThreadsDrawer = require_copilotkit.CopilotThreadsDrawer;
|
|
57
57
|
exports.GenerateSandboxedUiArgsSchema = require_copilotkit.GenerateSandboxedUiArgsSchema;
|
|
58
58
|
exports.INTELLIGENCE_TURN_HEAD = require_copilotkit.INTELLIGENCE_TURN_HEAD;
|
|
59
|
+
exports.INTERRUPT_EVENT_NAME = require_copilotkit.INTERRUPT_EVENT_NAME;
|
|
59
60
|
exports.IntelligenceIndicator = require_copilotkit.IntelligenceIndicator;
|
|
60
61
|
exports.IntelligenceIndicatorView = require_copilotkit.IntelligenceIndicatorView;
|
|
61
62
|
exports.MCPAppsActivityContentSchema = require_copilotkit.MCPAppsActivityContentSchema;
|
package/dist/v2/index.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { $ as useRenderTool, $t as
|
|
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-BuzP0VeG.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, 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 };
|
|
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, INTERRUPT_EVENT_NAME, 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 useRenderTool, $t as
|
|
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-CbZGwElm.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, 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 };
|
|
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, INTERRUPT_EVENT_NAME, 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
|
|
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-B7aFKfQR.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, useSuggestions, useThreads, ɵrunMcpFollowUp };
|
|
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, INTERRUPT_EVENT_NAME, 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
|
@@ -1367,7 +1367,7 @@ _radix_ui_react_dropdown_menu = __toESM(_radix_ui_react_dropdown_menu);
|
|
|
1367
1367
|
side: "bottom",
|
|
1368
1368
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("p", {
|
|
1369
1369
|
className: "cpk:flex cpk:items-center cpk:gap-1 cpk:text-xs cpk:font-medium",
|
|
1370
|
-
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children:
|
|
1370
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: labels.chatInputToolbarAddButtonLabel }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("code", {
|
|
1371
1371
|
className: "cpk:rounded cpk:bg-[#4a4a4a] cpk:px-1 cpk:py-[1px] cpk:font-mono cpk:text-[11px] cpk:text-white cpk:dark:bg-[#e0e0e0] cpk:dark:text-black",
|
|
1372
1372
|
children: "/"
|
|
1373
1373
|
})]
|
|
@@ -3551,6 +3551,8 @@ window.parent.postMessage({jsonrpc:"2.0",method:"ui/notifications/sandbox-proxy-
|
|
|
3551
3551
|
const a2uiCatalogProvided = !!a2ui?.catalog;
|
|
3552
3552
|
const a2uiActive = runtimeA2UIEnabled || a2uiCatalogProvided;
|
|
3553
3553
|
const [runtimeLicenseStatus, setRuntimeLicenseStatus] = (0, react.useState)(void 0);
|
|
3554
|
+
const [runtimeEntitlements, setRuntimeEntitlements] = (0, react.useState)(void 0);
|
|
3555
|
+
const [runtimeEntitlementRetryPending, setRuntimeEntitlementRetryPending] = (0, react.useState)(false);
|
|
3554
3556
|
const requestInspectorOpen = (0, react.useCallback)((request) => {
|
|
3555
3557
|
setInspectorOpenRequest({ ...request });
|
|
3556
3558
|
}, []);
|
|
@@ -3741,6 +3743,8 @@ window.parent.postMessage({jsonrpc:"2.0",method:"ui/notifications/sandbox-proxy-
|
|
|
3741
3743
|
setRuntimeA2UIEnabled(copilotkit.a2uiEnabled);
|
|
3742
3744
|
setRuntimeOpenGenUIEnabled(copilotkit.openGenerativeUIEnabled);
|
|
3743
3745
|
setRuntimeLicenseStatus(copilotkit.licenseStatus);
|
|
3746
|
+
setRuntimeEntitlements(copilotkit.runtimeEntitlements);
|
|
3747
|
+
setRuntimeEntitlementRetryPending(copilotkit.runtimeEntitlementRetryPending);
|
|
3744
3748
|
};
|
|
3745
3749
|
const subscription = copilotkit.subscribe({ onRuntimeConnectionStatusChanged: syncRuntimeInfo });
|
|
3746
3750
|
syncRuntimeInfo();
|
|
@@ -3881,7 +3885,26 @@ window.parent.postMessage({jsonrpc:"2.0",method:"ui/notifications/sandbox-proxy-
|
|
|
3881
3885
|
copilotkit,
|
|
3882
3886
|
executingToolCallIds
|
|
3883
3887
|
}), [copilotkit, executingToolCallIds]);
|
|
3884
|
-
const
|
|
3888
|
+
const retryableRuntimeEntitlementFailure = runtimeEntitlements?.status !== "ready" && runtimeEntitlements?.error.retryable === true;
|
|
3889
|
+
const hasNonReadyRuntimeEntitlement = runtimeEntitlements !== void 0 && runtimeEntitlements.status !== "ready";
|
|
3890
|
+
const hasLegacyRuntimeEntitlementFallback = runtimeLicenseStatus === "valid" || runtimeLicenseStatus === "expiring";
|
|
3891
|
+
const runtimeEntitlementRetryInProgress = retryableRuntimeEntitlementFailure && runtimeEntitlementRetryPending && !hasLegacyRuntimeEntitlementFallback;
|
|
3892
|
+
const runtimeEntitlementFailureSettled = hasNonReadyRuntimeEntitlement && !runtimeEntitlementRetryInProgress && !hasLegacyRuntimeEntitlementFallback;
|
|
3893
|
+
const licenseContextValue = (0, react.useMemo)(() => {
|
|
3894
|
+
const runtimeLicenseContext = (0, _copilotkit_shared.createLicenseContextValue)(runtimeEntitlementRetryInProgress ? void 0 : runtimeLicenseStatus, runtimeEntitlements);
|
|
3895
|
+
if (!runtimeEntitlementFailureSettled) return runtimeLicenseContext;
|
|
3896
|
+
return {
|
|
3897
|
+
...runtimeLicenseContext,
|
|
3898
|
+
checkFeature: () => false,
|
|
3899
|
+
getLimit: () => null
|
|
3900
|
+
};
|
|
3901
|
+
}, [
|
|
3902
|
+
runtimeEntitlementFailureSettled,
|
|
3903
|
+
runtimeEntitlementRetryInProgress,
|
|
3904
|
+
runtimeEntitlements,
|
|
3905
|
+
runtimeLicenseStatus
|
|
3906
|
+
]);
|
|
3907
|
+
const runtimeLicenseWarningStatus = runtimeEntitlementRetryInProgress ? void 0 : licenseContextValue.status ?? void 0;
|
|
3885
3908
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(SandboxFunctionsContext.Provider, {
|
|
3886
3909
|
value: sandboxFunctionsList,
|
|
3887
3910
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(CopilotKitContext.Provider, {
|
|
@@ -3901,10 +3924,10 @@ window.parent.postMessage({jsonrpc:"2.0",method:"ui/notifications/sandbox-proxy-
|
|
|
3901
3924
|
openRequest: inspectorOpenRequest
|
|
3902
3925
|
}) : null]
|
|
3903
3926
|
}),
|
|
3904
|
-
|
|
3905
|
-
|
|
3906
|
-
|
|
3907
|
-
|
|
3927
|
+
runtimeLicenseWarningStatus === "none" && !resolvedPublicKey && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(LicenseWarningBanner, { type: "no_license" }),
|
|
3928
|
+
runtimeLicenseWarningStatus === "expired" && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(LicenseWarningBanner, { type: "expired" }),
|
|
3929
|
+
runtimeLicenseWarningStatus === "invalid" && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(LicenseWarningBanner, { type: "invalid" }),
|
|
3930
|
+
runtimeLicenseWarningStatus === "expiring" && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(LicenseWarningBanner, { type: "expiring" })
|
|
3908
3931
|
]
|
|
3909
3932
|
})
|
|
3910
3933
|
})
|
|
@@ -4004,7 +4027,7 @@ window.parent.postMessage({jsonrpc:"2.0",method:"ui/notifications/sandbox-proxy-
|
|
|
4004
4027
|
function useFrontendTool(tool, deps) {
|
|
4005
4028
|
const { copilotkit } = useCopilotKit();
|
|
4006
4029
|
const extraDeps = deps ?? EMPTY_DEPS$1;
|
|
4007
|
-
(0, react.
|
|
4030
|
+
(0, react.useLayoutEffect)(() => {
|
|
4008
4031
|
const name = tool.name;
|
|
4009
4032
|
if (copilotkit.getTool({
|
|
4010
4033
|
toolName: name,
|
|
@@ -4371,6 +4394,8 @@ window.parent.postMessage({jsonrpc:"2.0",method:"ui/notifications/sandbox-proxy-
|
|
|
4371
4394
|
|
|
4372
4395
|
//#endregion
|
|
4373
4396
|
//#region src/v2/hooks/use-human-in-the-loop.tsx
|
|
4397
|
+
/** Registration name of a catch-all tool: handles any otherwise-unhandled call. */
|
|
4398
|
+
const WILDCARD_TOOL_NAME = "*";
|
|
4374
4399
|
function useHumanInTheLoop(tool, deps) {
|
|
4375
4400
|
const { copilotkit } = useCopilotKit();
|
|
4376
4401
|
const resolvePromiseRef = (0, react.useRef)(null);
|
|
@@ -4406,10 +4431,11 @@ window.parent.postMessage({jsonrpc:"2.0",method:"ui/notifications/sandbox-proxy-
|
|
|
4406
4431
|
}, []);
|
|
4407
4432
|
const RenderComponent = (0, react.useCallback)((props) => {
|
|
4408
4433
|
const ToolComponent = tool.render;
|
|
4434
|
+
const name = tool.name === WILDCARD_TOOL_NAME ? props.name : tool.name;
|
|
4409
4435
|
if (props.status === _copilotkit_core.ToolCallStatus.InProgress) {
|
|
4410
4436
|
const enhancedProps = {
|
|
4411
4437
|
...props,
|
|
4412
|
-
name
|
|
4438
|
+
name,
|
|
4413
4439
|
description: tool.description || "",
|
|
4414
4440
|
agentId: tool.agentId,
|
|
4415
4441
|
respond: void 0
|
|
@@ -4418,7 +4444,7 @@ window.parent.postMessage({jsonrpc:"2.0",method:"ui/notifications/sandbox-proxy-
|
|
|
4418
4444
|
} else if (props.status === _copilotkit_core.ToolCallStatus.Executing) {
|
|
4419
4445
|
const enhancedProps = {
|
|
4420
4446
|
...props,
|
|
4421
|
-
name
|
|
4447
|
+
name,
|
|
4422
4448
|
description: tool.description || "",
|
|
4423
4449
|
agentId: tool.agentId,
|
|
4424
4450
|
respond
|
|
@@ -4427,7 +4453,7 @@ window.parent.postMessage({jsonrpc:"2.0",method:"ui/notifications/sandbox-proxy-
|
|
|
4427
4453
|
} else if (props.status === _copilotkit_core.ToolCallStatus.Complete) {
|
|
4428
4454
|
const enhancedProps = {
|
|
4429
4455
|
...props,
|
|
4430
|
-
name
|
|
4456
|
+
name,
|
|
4431
4457
|
description: tool.description || "",
|
|
4432
4458
|
agentId: tool.agentId,
|
|
4433
4459
|
respond: void 0
|
|
@@ -4447,7 +4473,7 @@ window.parent.postMessage({jsonrpc:"2.0",method:"ui/notifications/sandbox-proxy-
|
|
|
4447
4473
|
handler,
|
|
4448
4474
|
render: RenderComponent
|
|
4449
4475
|
}, deps);
|
|
4450
|
-
(0, react.
|
|
4476
|
+
(0, react.useLayoutEffect)(() => {
|
|
4451
4477
|
return () => {
|
|
4452
4478
|
copilotkit.removeHookRenderToolCall(tool.name, tool.agentId);
|
|
4453
4479
|
};
|
|
@@ -4912,8 +4938,12 @@ window.parent.postMessage({jsonrpc:"2.0",method:"ui/notifications/sandbox-proxy-
|
|
|
4912
4938
|
}
|
|
4913
4939
|
|
|
4914
4940
|
//#endregion
|
|
4915
|
-
//#region src/v2/
|
|
4941
|
+
//#region src/v2/types/interrupt.ts
|
|
4942
|
+
/** Name of the legacy custom event agents emit to signal an interrupt. */
|
|
4916
4943
|
const INTERRUPT_EVENT_NAME = "on_interrupt";
|
|
4944
|
+
|
|
4945
|
+
//#endregion
|
|
4946
|
+
//#region src/v2/hooks/use-interrupt.tsx
|
|
4917
4947
|
function isPromiseLike(value) {
|
|
4918
4948
|
return (typeof value === "object" || typeof value === "function") && value !== null && typeof Reflect.get(value, "then") === "function";
|
|
4919
4949
|
}
|
|
@@ -5250,7 +5280,7 @@ window.parent.postMessage({jsonrpc:"2.0",method:"ui/notifications/sandbox-proxy-
|
|
|
5250
5280
|
*/
|
|
5251
5281
|
function useThreads({ agentId, includeArchived, limit, enabled = true }) {
|
|
5252
5282
|
const { copilotkit } = useCopilotKit();
|
|
5253
|
-
const [store] = (0, react.useState)(() => (0, _copilotkit_core.ɵcreateThreadStore)({ fetch:
|
|
5283
|
+
const [store] = (0, react.useState)(() => (0, _copilotkit_core.ɵcreateThreadStore)({ fetch: copilotkit.ɵruntimeFetch }));
|
|
5254
5284
|
const coreThreads = useThreadStoreSelector(store, _copilotkit_core.ɵselectThreads);
|
|
5255
5285
|
const threads = (0, react.useMemo)(() => coreThreads.map(({ id, agentId, name, archived, createdAt, updatedAt, lastRunAt }) => ({
|
|
5256
5286
|
id,
|
|
@@ -5949,21 +5979,35 @@ window.parent.postMessage({jsonrpc:"2.0",method:"ui/notifications/sandbox-proxy-
|
|
|
5949
5979
|
|
|
5950
5980
|
//#endregion
|
|
5951
5981
|
//#region src/v2/components/chat/CopilotChatAssistantMessage.tsx
|
|
5982
|
+
/**
|
|
5983
|
+
* Binds the Inspector action to the active chat without making the full
|
|
5984
|
+
* assistant message subscribe to chat configuration changes.
|
|
5985
|
+
*/
|
|
5986
|
+
function BoundInspectorButton({ inspectorButton, messageId, openInspector, ...props }) {
|
|
5987
|
+
const chatConfiguration = useCopilotChatConfiguration();
|
|
5988
|
+
return renderSlot(inspectorButton, CopilotChatAssistantMessage.InspectorButton, {
|
|
5989
|
+
...props,
|
|
5990
|
+
onClick: () => openInspector({
|
|
5991
|
+
messageId,
|
|
5992
|
+
threadId: chatConfiguration?.threadId,
|
|
5993
|
+
agentId: chatConfiguration?.agentId
|
|
5994
|
+
})
|
|
5995
|
+
});
|
|
5996
|
+
}
|
|
5952
5997
|
function CopilotChatAssistantMessage({ message, messages, isRunning, onThumbsUp, onThumbsDown, onReadAloud, onRegenerate, additionalToolbarItems, toolbarVisible = true, markdownRenderer, toolbar, copyButton, inspectorButton, thumbsUpButton, thumbsDownButton, readAloudButton, regenerateButton, toolCallsView, children, className, ...props }) {
|
|
5953
5998
|
useKatexStyles();
|
|
5954
5999
|
const { isInspectorEnabled, openInspector } = useCopilotKitInspector();
|
|
5955
|
-
const chatConfiguration = useCopilotChatConfiguration();
|
|
5956
6000
|
const boundMarkdownRenderer = renderSlot(markdownRenderer, CopilotChatAssistantMessage.MarkdownRenderer, { content: message.content || "" });
|
|
5957
6001
|
const boundCopyButton = renderSlot(copyButton, CopilotChatAssistantMessage.CopyButton, { onClick: async () => {
|
|
5958
6002
|
if (message.content) return await (0, _copilotkit_shared.copyToClipboard)(message.content);
|
|
5959
6003
|
return false;
|
|
5960
6004
|
} });
|
|
5961
6005
|
const boundThumbsUpButton = renderSlot(thumbsUpButton, CopilotChatAssistantMessage.ThumbsUpButton, { onClick: onThumbsUp ? () => onThumbsUp(message) : void 0 });
|
|
5962
|
-
const boundInspectorButton =
|
|
6006
|
+
const boundInspectorButton = /* @__PURE__ */ (0, react_jsx_runtime.jsx)(BoundInspectorButton, {
|
|
6007
|
+
inspectorButton,
|
|
5963
6008
|
messageId: message.id,
|
|
5964
|
-
|
|
5965
|
-
|
|
5966
|
-
}) });
|
|
6009
|
+
openInspector
|
|
6010
|
+
});
|
|
5967
6011
|
const boundThumbsDownButton = renderSlot(thumbsDownButton, CopilotChatAssistantMessage.ThumbsDownButton, { onClick: onThumbsDown ? () => onThumbsDown(message) : void 0 });
|
|
5968
6012
|
const boundReadAloudButton = renderSlot(readAloudButton, CopilotChatAssistantMessage.ReadAloudButton, { onClick: onReadAloud ? () => onReadAloud(message) : void 0 });
|
|
5969
6013
|
const boundRegenerateButton = renderSlot(regenerateButton, CopilotChatAssistantMessage.RegenerateButton, { onClick: onRegenerate ? () => onRegenerate(message) : void 0 });
|
|
@@ -8543,7 +8587,7 @@ window.parent.postMessage({jsonrpc:"2.0",method:"ui/notifications/sandbox-proxy-
|
|
|
8543
8587
|
const startRunActivityReconnectRef = (0, react.useRef)(null);
|
|
8544
8588
|
const runtimeStatus = copilotkit.runtimeConnectionStatus === _copilotkit_core.CopilotKitCoreRuntimeConnectionStatus.Connected ? "Connected" : copilotkit.runtimeConnectionStatus;
|
|
8545
8589
|
const hasNativeIntelligenceRunActivity = hasExplicitThreadId && runtimeStatus === "Connected" && !!copilotkit.intelligence?.wsUrl && copilotkit.threadEndpoints?.realtimeMetadata === true;
|
|
8546
|
-
const [standaloneRunActivityStore] = (0, react.useState)(() => (0, _copilotkit_core.ɵcreateThreadStore)({ fetch:
|
|
8590
|
+
const [standaloneRunActivityStore] = (0, react.useState)(() => (0, _copilotkit_core.ɵcreateThreadStore)({ fetch: copilotkit.ɵruntimeFetch }));
|
|
8547
8591
|
const previousThreadRef = (0, react.useRef)(null);
|
|
8548
8592
|
const hasExplicitThreadIdRef = (0, react.useRef)(hasExplicitThreadId);
|
|
8549
8593
|
hasExplicitThreadIdRef.current = hasExplicitThreadId;
|
|
@@ -12080,6 +12124,7 @@ Object.defineProperty(exports, 'CopilotSidebarView', {
|
|
|
12080
12124
|
exports.CopilotThreadsDrawer = CopilotThreadsDrawer;
|
|
12081
12125
|
exports.GenerateSandboxedUiArgsSchema = GenerateSandboxedUiArgsSchema;
|
|
12082
12126
|
exports.INTELLIGENCE_TURN_HEAD = INTELLIGENCE_TURN_HEAD;
|
|
12127
|
+
exports.INTERRUPT_EVENT_NAME = INTERRUPT_EVENT_NAME;
|
|
12083
12128
|
exports.IntelligenceIndicator = IntelligenceIndicator;
|
|
12084
12129
|
exports.IntelligenceIndicatorView = IntelligenceIndicatorView;
|
|
12085
12130
|
exports.MCPAppsActivityContentSchema = MCPAppsActivityContentSchema;
|